Separator-C1SW00JP.mjs
2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import { P as Primitive } from './server.mjs';
import { defineComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, renderSlot, computed, unref, mergeProps } from 'vue';
var BaseSeparator_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
__name: "BaseSeparator",
props: {
orientation: {
type: String,
required: false,
default: "horizontal"
},
decorative: {
type: Boolean,
required: false
},
asChild: {
type: Boolean,
required: false
},
as: {
type: null,
required: false
}
},
setup(__props) {
const props = __props;
const ORIENTATIONS = ["horizontal", "vertical"];
function isValidOrientation(orientation) {
return ORIENTATIONS.includes(orientation);
}
const computedOrientation = computed(() => isValidOrientation(props.orientation) ? props.orientation : "horizontal");
const ariaOrientation = computed(() => computedOrientation.value === "vertical" ? props.orientation : void 0);
const semanticProps = computed(() => props.decorative ? { role: "none" } : {
"aria-orientation": ariaOrientation.value,
"role": "separator"
});
return (_ctx, _cache) => {
return openBlock(), createBlock(unref(Primitive), mergeProps({
as: _ctx.as,
"as-child": _ctx.asChild,
"data-orientation": computedOrientation.value
}, semanticProps.value), {
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
_: 3
}, 16, [
"as",
"as-child",
"data-orientation"
]);
};
}
});
var BaseSeparator_default = BaseSeparator_vue_vue_type_script_setup_true_lang_default;
var Separator_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
__name: "Separator",
props: {
orientation: {
type: String,
required: false,
default: "horizontal"
},
decorative: {
type: Boolean,
required: false
},
asChild: {
type: Boolean,
required: false
},
as: {
type: null,
required: false
}
},
setup(__props) {
const props = __props;
return (_ctx, _cache) => {
return openBlock(), createBlock(BaseSeparator_default, normalizeProps(guardReactiveProps(props)), {
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
_: 3
}, 16);
};
}
});
var Separator_default = Separator_vue_vue_type_script_setup_true_lang_default;
export { Separator_default as S };
//# sourceMappingURL=Separator-C1SW00JP.mjs.map