@orchidui/dashboard 1.8.1-95 → 1.8.1-96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AccordionTrigger.vue_vue_type_script_setup_true_lang-BdmLII9i.js +295 -0
- package/dist/CalendarPrevButton.vue_vue_type_script_setup_true_lang-DpJRpFhK.js +891 -0
- package/dist/CardTitle.vue_vue_type_script_setup_true_lang-D2_Bj3jw.js +68 -0
- package/dist/Checkbox.vue_vue_type_script_setup_true_lang-C51LjITJ.js +172 -0
- package/dist/CollapsibleTrigger-fCarY5DJ.js +154 -0
- package/dist/Collection-COudIl-A.js +55 -0
- package/dist/ConfigProvider-7mV0D7Sp.js +6 -0
- package/dist/Dashboard/Card/OcCard.js +1 -1
- package/dist/Dashboard/TextEditor/QuillEditor.js +1 -1
- package/dist/DialogContent.vue_vue_type_script_setup_true_lang-CdrrrG29.js +68 -0
- package/dist/DialogOverlay-Cj3UTjZ8.js +309 -0
- package/dist/DialogPortal-zAvO8zt4.js +23 -0
- package/dist/DialogTrigger-BIF1A4hk.js +72 -0
- package/dist/DismissableLayer-C7IJliOb.js +151 -0
- package/dist/FocusScope--pJ6bboI.js +121 -0
- package/dist/FormMessage.vue_vue_type_script_setup_true_lang-DwlnFEn2.js +92 -0
- package/dist/Input.vue_vue_type_script_setup_true_lang-BrjsUUvL.js +27 -0
- package/dist/Label.vue_vue_type_script_setup_true_lang-D_LMIKBv.js +51 -0
- package/dist/ListboxItem-CjMk-mEX.js +417 -0
- package/dist/MenuSubTrigger-CUrxnPwO.js +845 -0
- package/dist/{OcCard-D3be6IMj.js → OcCard-B3SCzVwn.js} +54 -58
- package/dist/{OcLottieAnimation-0mdksHMn.js → OcLottieAnimation-DeMoIDaX.js} +1 -1
- package/dist/PopoverTrigger.vue_vue_type_script_setup_true_lang-DtI_qIyx.js +394 -0
- package/dist/PopperContent-BT3Svcc3.js +1465 -0
- package/dist/Presence-CxfTrw6l.js +133 -0
- package/dist/Primitive-B3twiLO1.js +44 -0
- package/dist/{QuillEditor-DRwC0sgJ.js → QuillEditor-hFQ0MJZO.js} +556 -579
- package/dist/RadioGroupItem.vue_vue_type_script_setup_true_lang-BNfRYIhL.js +297 -0
- package/dist/RovingFocusGroup-0OHdFQl0.js +92 -0
- package/dist/RovingFocusItem-s7Ug6oxb.js +82 -0
- package/dist/SelectValue.vue_vue_type_script_setup_true_lang-CVsYrN1R.js +1255 -0
- package/dist/Separator-DRam5i7g.js +54 -0
- package/dist/Separator.vue_vue_type_script_setup_true_lang-DGPbh6Dt.js +27 -0
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-k1A7l6Y-.js +17 -0
- package/dist/Switch.vue_vue_type_script_setup_true_lang-94ZKgnTz.js +135 -0
- package/dist/Teleport-DnUewq5H.js +25 -0
- package/dist/Textarea.vue_vue_type_script_setup_true_lang-DKazues9.js +27 -0
- package/dist/TooltipTrigger.vue_vue_type_script_setup_true_lang-CZ3AuN38.js +426 -0
- package/dist/VisuallyHidden-DMAU4heD.js +41 -0
- package/dist/VisuallyHiddenInput-DvJnsVHt.js +59 -0
- package/dist/_commonjsHelpers-B4e78b8K.js +28 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/array-CqVTtuYm.js +6 -0
- package/dist/arrays-4jDZqbdb.js +20 -0
- package/dist/check-C2tzJ0Gk.js +11 -0
- package/dist/chevron-down-CnpAlizg.js +13 -0
- package/dist/chevron-left-BOwFasou.js +13 -0
- package/dist/chevron-right-D308801z.js +13 -0
- package/dist/circle-A-6NpYiX.js +13 -0
- package/dist/clamp-BL1Rb24G.js +22 -0
- package/dist/constant-CuDQlTIy.js +3433 -0
- package/dist/createContext-CZEfaSVa.js +17 -0
- package/dist/createLucideIcon-eXqDwUWj.js +71 -0
- package/dist/ellipsis-CEG9G7eN.js +15 -0
- package/dist/getActiveElement-B-HWdUIb.js +11 -0
- package/dist/handleAndDispatchCustomEvent-Byh08EHr.js +11 -0
- package/dist/index-B3LW8uSH.js +133 -0
- package/dist/index-BIlpXuWX.js +3430 -0
- package/dist/index-BlGEiPHj.js +1246 -0
- package/dist/index-BwPb_idr.js +574 -0
- package/dist/index-C9julNQm.js +173 -0
- package/dist/index-C_aI-Wfj.js +34 -0
- package/dist/index-CumjCvqB.js +5703 -0
- package/dist/index-LqWMCtOd.js +809 -0
- package/dist/index-OpE2oGce.js +110 -0
- package/dist/index.js +3 -3
- package/dist/isValueEqualOrExist-BDSMUv8t.js +8 -0
- package/dist/lib/utils.js +5 -0
- package/dist/nullish-CjWwlQS3.js +6 -0
- package/dist/ohash.D__AXeF1-DX2n0b2C.js +106 -0
- package/dist/plus-CgluTYQY.js +14 -0
- package/dist/text-zwICaAnx.js +743 -0
- package/dist/ui/accordion/index.js +7 -0
- package/dist/ui/alert/index.js +64 -0
- package/dist/ui/alert-dialog/index.js +356 -0
- package/dist/ui/aspect-ratio/index.js +50 -0
- package/dist/ui/auto-form/constant.js +5 -0
- package/dist/ui/auto-form/dependencies.js +61 -0
- package/dist/ui/auto-form/index.js +227 -0
- package/dist/ui/auto-form/interface.js +4 -0
- package/dist/ui/auto-form/utils.js +89 -0
- package/dist/ui/avatar/index.js +189 -0
- package/dist/ui/badge/index.js +37 -0
- package/dist/ui/breadcrumb/index.js +126 -0
- package/dist/ui/button/index.js +55 -0
- package/dist/ui/calendar/index.js +15 -0
- package/dist/ui/card/index.js +38 -0
- package/dist/ui/carousel/index.js +174 -0
- package/dist/ui/carousel/interface.js +1 -0
- package/dist/ui/carousel/useCarousel.js +1288 -0
- package/dist/ui/chart/index.js +8 -0
- package/dist/ui/chart/interface.js +1 -0
- package/dist/ui/chart-area/index.js +331 -0
- package/dist/ui/chart-bar/index.js +490 -0
- package/dist/ui/chart-donut/index.js +509 -0
- package/dist/ui/chart-line/index.js +110 -0
- package/dist/ui/checkbox/index.js +4 -0
- package/dist/ui/collapsible/index.js +60 -0
- package/dist/ui/combobox/index.js +877 -0
- package/dist/ui/command/index.js +323 -0
- package/dist/ui/context-menu/index.js +734 -0
- package/dist/ui/dialog/index.js +169 -0
- package/dist/ui/drawer/index.js +971 -0
- package/dist/ui/dropdown-menu/index.js +723 -0
- package/dist/ui/form/index.js +13 -0
- package/dist/ui/form/injectionKeys.js +4 -0
- package/dist/ui/form/useFormField.js +25 -0
- package/dist/ui/hover-card/index.js +331 -0
- package/dist/ui/input/index.js +4 -0
- package/dist/ui/label/index.js +4 -0
- package/dist/ui/menubar/index.js +862 -0
- package/dist/ui/navigation-menu/index.js +873 -0
- package/dist/ui/number-field/index.js +682 -0
- package/dist/ui/pagination/index.js +444 -0
- package/dist/ui/pin-input/index.js +308 -0
- package/dist/ui/popover/index.js +6 -0
- package/dist/ui/progress/index.js +137 -0
- package/dist/ui/radio-group/index.js +5 -0
- package/dist/ui/range-calendar/index.js +986 -0
- package/dist/ui/resizable/index.js +1432 -0
- package/dist/ui/scroll-area/index.js +775 -0
- package/dist/ui/select/index.js +135 -0
- package/dist/ui/separator/index.js +4 -0
- package/dist/ui/sheet/index.js +188 -0
- package/dist/ui/sidebar/index.js +652 -0
- package/dist/ui/sidebar/utils.js +12 -0
- package/dist/ui/skeleton/index.js +4 -0
- package/dist/ui/slider/index.js +478 -0
- package/dist/ui/sonner/index.js +892 -0
- package/dist/ui/stepper/index.js +442 -0
- package/dist/ui/switch/index.js +4 -0
- package/dist/ui/table/index.js +153 -0
- package/dist/ui/tabs/index.js +280 -0
- package/dist/ui/tags-input/index.js +449 -0
- package/dist/ui/textarea/index.js +4 -0
- package/dist/ui/toast/index.js +738 -0
- package/dist/ui/toast/use-toast.js +85 -0
- package/dist/ui/toggle/index.js +6 -0
- package/dist/ui/toggle-group/index.js +112 -0
- package/dist/ui/tooltip/index.js +29 -0
- package/dist/useArrowNavigation-BRMPveaB.js +49 -0
- package/dist/useBodyScrollLock-CazCRZjZ.js +153 -0
- package/dist/useDirection-C3C_TLKm.js +14 -0
- package/dist/useFocusGuards-CyjC9cG9.js +26 -0
- package/dist/useFormControl-CFVC51Lp.js +11 -0
- package/dist/useForwardExpose-DZT6mL_U.js +37 -0
- package/dist/useForwardPropsEmits-0XKBv1pB.js +33 -0
- package/dist/useGraceArea-D7-GP1ii.js +137 -0
- package/dist/useId-reAg216X.js +13 -0
- package/dist/useKbd-BJNupnml.js +41 -0
- package/dist/useLocale-BfU0LC8Z.js +14 -0
- package/dist/useNonce-C1ZOgOp5.js +14 -0
- package/dist/usePrimitiveElement-BjwUvHih.js +15 -0
- package/dist/useSingleOrMultipleValue-BkTAaaJB.js +43 -0
- package/dist/useSize-BnyQ8FZF.js +37 -0
- package/dist/useTypeahead-oSidjyFF.js +40 -0
- package/dist/utils-DKNaYMZh.js +57 -0
- package/dist/utils-Dx9la83v.js +35 -0
- package/dist/utils-DxQ_ywGa.js +55 -0
- package/dist/utils-SFgRDk1R.js +2748 -0
- package/dist/utils-W-UiqiPE.js +1869 -0
- package/dist/vee-validate-Cf8JDJ_k.js +2232 -0
- package/dist/x-Cl6YllUK.js +14 -0
- package/package.json +264 -2
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { defineComponent as v, ref as C, toRefs as M, renderSlot as y, unref as t, createBlock as m, openBlock as g, mergeProps as D, withCtx as f, onMounted as A, createVNode as I, createCommentVNode as T } from "vue";
|
|
2
|
+
import { u as O } from "./useForwardExpose-DZT6mL_U.js";
|
|
3
|
+
import { P as F } from "./Primitive-B3twiLO1.js";
|
|
4
|
+
import { g as k } from "./utils-DxQ_ywGa.js";
|
|
5
|
+
import { u as $ } from "./useId-reAg216X.js";
|
|
6
|
+
import { g as _ } from "./getActiveElement-B-HWdUIb.js";
|
|
7
|
+
import { _ as R } from "./FocusScope--pJ6bboI.js";
|
|
8
|
+
import { _ as N } from "./DismissableLayer-C7IJliOb.js";
|
|
9
|
+
import { b as w } from "./useForwardPropsEmits-0XKBv1pB.js";
|
|
10
|
+
import { u as S, a as K } from "./useBodyScrollLock-CazCRZjZ.js";
|
|
11
|
+
import { P } from "./Presence-CxfTrw6l.js";
|
|
12
|
+
import { u as L } from "./index-BwPb_idr.js";
|
|
13
|
+
import { c as V } from "./createContext-CZEfaSVa.js";
|
|
14
|
+
const [E, U] = V("DialogRoot"), re = /* @__PURE__ */ v({
|
|
15
|
+
inheritAttrs: !1,
|
|
16
|
+
__name: "DialogRoot",
|
|
17
|
+
props: {
|
|
18
|
+
open: { type: Boolean, default: void 0 },
|
|
19
|
+
defaultOpen: { type: Boolean, default: !1 },
|
|
20
|
+
modal: { type: Boolean, default: !0 }
|
|
21
|
+
},
|
|
22
|
+
emits: ["update:open"],
|
|
23
|
+
setup(d, { emit: l }) {
|
|
24
|
+
const a = d, e = L(a, "open", l, {
|
|
25
|
+
defaultValue: a.defaultOpen,
|
|
26
|
+
passive: a.open === void 0
|
|
27
|
+
}), u = C(), p = C(), { modal: i } = M(a);
|
|
28
|
+
return U({
|
|
29
|
+
open: e,
|
|
30
|
+
modal: i,
|
|
31
|
+
openModal: () => {
|
|
32
|
+
e.value = !0;
|
|
33
|
+
},
|
|
34
|
+
onOpenChange: (n) => {
|
|
35
|
+
e.value = n;
|
|
36
|
+
},
|
|
37
|
+
onOpenToggle: () => {
|
|
38
|
+
e.value = !e.value;
|
|
39
|
+
},
|
|
40
|
+
contentId: "",
|
|
41
|
+
titleId: "",
|
|
42
|
+
descriptionId: "",
|
|
43
|
+
triggerElement: u,
|
|
44
|
+
contentElement: p
|
|
45
|
+
}), (n, o) => y(n.$slots, "default", {
|
|
46
|
+
open: t(e),
|
|
47
|
+
close: () => e.value = !1
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}), le = /* @__PURE__ */ v({
|
|
51
|
+
__name: "DialogClose",
|
|
52
|
+
props: {
|
|
53
|
+
asChild: { type: Boolean },
|
|
54
|
+
as: { default: "button" }
|
|
55
|
+
},
|
|
56
|
+
setup(d) {
|
|
57
|
+
const l = d;
|
|
58
|
+
O();
|
|
59
|
+
const a = E();
|
|
60
|
+
return (s, e) => (g(), m(t(F), D(l, {
|
|
61
|
+
type: s.as === "button" ? "button" : void 0,
|
|
62
|
+
onClick: e[0] || (e[0] = (u) => t(a).onOpenChange(!1))
|
|
63
|
+
}), {
|
|
64
|
+
default: f(() => [
|
|
65
|
+
y(s.$slots, "default")
|
|
66
|
+
]),
|
|
67
|
+
_: 3
|
|
68
|
+
}, 16, ["type"]));
|
|
69
|
+
}
|
|
70
|
+
}), W = "DialogTitle", G = "DialogContent";
|
|
71
|
+
function H({
|
|
72
|
+
titleName: d = W,
|
|
73
|
+
contentName: l = G,
|
|
74
|
+
componentLink: a = "dialog.html#title",
|
|
75
|
+
titleId: s,
|
|
76
|
+
descriptionId: e,
|
|
77
|
+
contentElement: u
|
|
78
|
+
}) {
|
|
79
|
+
const p = `Warning: \`${l}\` requires a \`${d}\` for the component to be accessible for screen reader users.
|
|
80
|
+
|
|
81
|
+
If you want to hide the \`${d}\`, you can wrap it with our VisuallyHidden component.
|
|
82
|
+
|
|
83
|
+
For more information, see https://www.reka-ui.com/docs/components/${a}`, i = `Warning: Missing \`Description\` or \`aria-describedby="undefined"\` for ${l}.`;
|
|
84
|
+
A(() => {
|
|
85
|
+
var r;
|
|
86
|
+
document.getElementById(s) || console.warn(p);
|
|
87
|
+
const o = (r = u.value) == null ? void 0 : r.getAttribute("aria-describedby");
|
|
88
|
+
e && o && (document.getElementById(e) || console.warn(i));
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
const h = /* @__PURE__ */ v({
|
|
92
|
+
__name: "DialogContentImpl",
|
|
93
|
+
props: {
|
|
94
|
+
forceMount: { type: Boolean },
|
|
95
|
+
trapFocus: { type: Boolean },
|
|
96
|
+
disableOutsidePointerEvents: { type: Boolean },
|
|
97
|
+
asChild: { type: Boolean },
|
|
98
|
+
as: {}
|
|
99
|
+
},
|
|
100
|
+
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"],
|
|
101
|
+
setup(d, { emit: l }) {
|
|
102
|
+
const a = d, s = l, e = E(), { forwardRef: u, currentElement: p } = O();
|
|
103
|
+
return e.titleId || (e.titleId = $(void 0, "reka-dialog-title")), e.descriptionId || (e.descriptionId = $(void 0, "reka-dialog-description")), A(() => {
|
|
104
|
+
e.contentElement = p, _() !== document.body && (e.triggerElement.value = _());
|
|
105
|
+
}), process.env.NODE_ENV !== "production" && H({
|
|
106
|
+
titleName: "DialogTitle",
|
|
107
|
+
contentName: "DialogContent",
|
|
108
|
+
componentLink: "dialog.html#title",
|
|
109
|
+
titleId: e.titleId,
|
|
110
|
+
descriptionId: e.descriptionId,
|
|
111
|
+
contentElement: p
|
|
112
|
+
}), (i, n) => (g(), m(t(R), {
|
|
113
|
+
"as-child": "",
|
|
114
|
+
loop: "",
|
|
115
|
+
trapped: a.trapFocus,
|
|
116
|
+
onMountAutoFocus: n[5] || (n[5] = (o) => s("openAutoFocus", o)),
|
|
117
|
+
onUnmountAutoFocus: n[6] || (n[6] = (o) => s("closeAutoFocus", o))
|
|
118
|
+
}, {
|
|
119
|
+
default: f(() => [
|
|
120
|
+
I(t(N), D({
|
|
121
|
+
id: t(e).contentId,
|
|
122
|
+
ref: t(u),
|
|
123
|
+
as: i.as,
|
|
124
|
+
"as-child": i.asChild,
|
|
125
|
+
"disable-outside-pointer-events": i.disableOutsidePointerEvents,
|
|
126
|
+
role: "dialog",
|
|
127
|
+
"aria-describedby": t(e).descriptionId,
|
|
128
|
+
"aria-labelledby": t(e).titleId,
|
|
129
|
+
"data-state": t(k)(t(e).open.value)
|
|
130
|
+
}, i.$attrs, {
|
|
131
|
+
onDismiss: n[0] || (n[0] = (o) => t(e).onOpenChange(!1)),
|
|
132
|
+
onEscapeKeyDown: n[1] || (n[1] = (o) => s("escapeKeyDown", o)),
|
|
133
|
+
onFocusOutside: n[2] || (n[2] = (o) => s("focusOutside", o)),
|
|
134
|
+
onInteractOutside: n[3] || (n[3] = (o) => s("interactOutside", o)),
|
|
135
|
+
onPointerDownOutside: n[4] || (n[4] = (o) => s("pointerDownOutside", o))
|
|
136
|
+
}), {
|
|
137
|
+
default: f(() => [
|
|
138
|
+
y(i.$slots, "default")
|
|
139
|
+
]),
|
|
140
|
+
_: 3
|
|
141
|
+
}, 16, ["id", "as", "as-child", "disable-outside-pointer-events", "aria-describedby", "aria-labelledby", "data-state"])
|
|
142
|
+
]),
|
|
143
|
+
_: 3
|
|
144
|
+
}, 8, ["trapped"]));
|
|
145
|
+
}
|
|
146
|
+
}), j = /* @__PURE__ */ v({
|
|
147
|
+
__name: "DialogContentModal",
|
|
148
|
+
props: {
|
|
149
|
+
forceMount: { type: Boolean },
|
|
150
|
+
trapFocus: { type: Boolean },
|
|
151
|
+
disableOutsidePointerEvents: { type: Boolean },
|
|
152
|
+
asChild: { type: Boolean },
|
|
153
|
+
as: {}
|
|
154
|
+
},
|
|
155
|
+
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"],
|
|
156
|
+
setup(d, { emit: l }) {
|
|
157
|
+
const a = d, s = l, e = E(), u = w(s), { forwardRef: p, currentElement: i } = O();
|
|
158
|
+
return S(i), (n, o) => (g(), m(h, D({ ...a, ...t(u) }, {
|
|
159
|
+
ref: t(p),
|
|
160
|
+
"trap-focus": t(e).open.value,
|
|
161
|
+
"disable-outside-pointer-events": !0,
|
|
162
|
+
onCloseAutoFocus: o[0] || (o[0] = (r) => {
|
|
163
|
+
var c;
|
|
164
|
+
r.defaultPrevented || (r.preventDefault(), (c = t(e).triggerElement.value) == null || c.focus());
|
|
165
|
+
}),
|
|
166
|
+
onPointerDownOutside: o[1] || (o[1] = (r) => {
|
|
167
|
+
const c = r.detail.originalEvent, B = c.button === 0 && c.ctrlKey === !0;
|
|
168
|
+
(c.button === 2 || B) && r.preventDefault();
|
|
169
|
+
}),
|
|
170
|
+
onFocusOutside: o[2] || (o[2] = (r) => {
|
|
171
|
+
r.preventDefault();
|
|
172
|
+
})
|
|
173
|
+
}), {
|
|
174
|
+
default: f(() => [
|
|
175
|
+
y(n.$slots, "default")
|
|
176
|
+
]),
|
|
177
|
+
_: 3
|
|
178
|
+
}, 16, ["trap-focus"]));
|
|
179
|
+
}
|
|
180
|
+
}), q = /* @__PURE__ */ v({
|
|
181
|
+
__name: "DialogContentNonModal",
|
|
182
|
+
props: {
|
|
183
|
+
forceMount: { type: Boolean },
|
|
184
|
+
trapFocus: { type: Boolean },
|
|
185
|
+
disableOutsidePointerEvents: { type: Boolean },
|
|
186
|
+
asChild: { type: Boolean },
|
|
187
|
+
as: {}
|
|
188
|
+
},
|
|
189
|
+
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"],
|
|
190
|
+
setup(d, { emit: l }) {
|
|
191
|
+
const a = d, e = w(l);
|
|
192
|
+
O();
|
|
193
|
+
const u = E(), p = C(!1), i = C(!1);
|
|
194
|
+
return (n, o) => (g(), m(h, D({ ...a, ...t(e) }, {
|
|
195
|
+
"trap-focus": !1,
|
|
196
|
+
"disable-outside-pointer-events": !1,
|
|
197
|
+
onCloseAutoFocus: o[0] || (o[0] = (r) => {
|
|
198
|
+
var c;
|
|
199
|
+
r.defaultPrevented || (p.value || (c = t(u).triggerElement.value) == null || c.focus(), r.preventDefault()), p.value = !1, i.value = !1;
|
|
200
|
+
}),
|
|
201
|
+
onInteractOutside: o[1] || (o[1] = (r) => {
|
|
202
|
+
var b;
|
|
203
|
+
r.defaultPrevented || (p.value = !0, r.detail.originalEvent.type === "pointerdown" && (i.value = !0));
|
|
204
|
+
const c = r.target;
|
|
205
|
+
((b = t(u).triggerElement.value) == null ? void 0 : b.contains(c)) && r.preventDefault(), r.detail.originalEvent.type === "focusin" && i.value && r.preventDefault();
|
|
206
|
+
})
|
|
207
|
+
}), {
|
|
208
|
+
default: f(() => [
|
|
209
|
+
y(n.$slots, "default")
|
|
210
|
+
]),
|
|
211
|
+
_: 3
|
|
212
|
+
}, 16));
|
|
213
|
+
}
|
|
214
|
+
}), ue = /* @__PURE__ */ v({
|
|
215
|
+
__name: "DialogContent",
|
|
216
|
+
props: {
|
|
217
|
+
forceMount: { type: Boolean },
|
|
218
|
+
trapFocus: { type: Boolean },
|
|
219
|
+
disableOutsidePointerEvents: { type: Boolean },
|
|
220
|
+
asChild: { type: Boolean },
|
|
221
|
+
as: {}
|
|
222
|
+
},
|
|
223
|
+
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"],
|
|
224
|
+
setup(d, { emit: l }) {
|
|
225
|
+
const a = d, s = l, e = E(), u = w(s), { forwardRef: p } = O();
|
|
226
|
+
return (i, n) => (g(), m(t(P), {
|
|
227
|
+
present: i.forceMount || t(e).open.value
|
|
228
|
+
}, {
|
|
229
|
+
default: f(() => [
|
|
230
|
+
t(e).modal.value ? (g(), m(j, D({
|
|
231
|
+
key: 0,
|
|
232
|
+
ref: t(p)
|
|
233
|
+
}, { ...a, ...t(u), ...i.$attrs }), {
|
|
234
|
+
default: f(() => [
|
|
235
|
+
y(i.$slots, "default")
|
|
236
|
+
]),
|
|
237
|
+
_: 3
|
|
238
|
+
}, 16)) : (g(), m(q, D({
|
|
239
|
+
key: 1,
|
|
240
|
+
ref: t(p)
|
|
241
|
+
}, { ...a, ...t(u), ...i.$attrs }), {
|
|
242
|
+
default: f(() => [
|
|
243
|
+
y(i.$slots, "default")
|
|
244
|
+
]),
|
|
245
|
+
_: 3
|
|
246
|
+
}, 16))
|
|
247
|
+
]),
|
|
248
|
+
_: 3
|
|
249
|
+
}, 8, ["present"]));
|
|
250
|
+
}
|
|
251
|
+
}), z = /* @__PURE__ */ v({
|
|
252
|
+
__name: "DialogOverlayImpl",
|
|
253
|
+
props: {
|
|
254
|
+
asChild: { type: Boolean },
|
|
255
|
+
as: {}
|
|
256
|
+
},
|
|
257
|
+
setup(d) {
|
|
258
|
+
const l = E();
|
|
259
|
+
return K(!0), O(), (a, s) => (g(), m(t(F), {
|
|
260
|
+
as: a.as,
|
|
261
|
+
"as-child": a.asChild,
|
|
262
|
+
"data-state": t(l).open.value ? "open" : "closed",
|
|
263
|
+
style: { "pointer-events": "auto" }
|
|
264
|
+
}, {
|
|
265
|
+
default: f(() => [
|
|
266
|
+
y(a.$slots, "default")
|
|
267
|
+
]),
|
|
268
|
+
_: 3
|
|
269
|
+
}, 8, ["as", "as-child", "data-state"]));
|
|
270
|
+
}
|
|
271
|
+
}), de = /* @__PURE__ */ v({
|
|
272
|
+
__name: "DialogOverlay",
|
|
273
|
+
props: {
|
|
274
|
+
forceMount: { type: Boolean },
|
|
275
|
+
asChild: { type: Boolean },
|
|
276
|
+
as: {}
|
|
277
|
+
},
|
|
278
|
+
setup(d) {
|
|
279
|
+
const l = E(), { forwardRef: a } = O();
|
|
280
|
+
return (s, e) => {
|
|
281
|
+
var u;
|
|
282
|
+
return (u = t(l)) != null && u.modal.value ? (g(), m(t(P), {
|
|
283
|
+
key: 0,
|
|
284
|
+
present: s.forceMount || t(l).open.value
|
|
285
|
+
}, {
|
|
286
|
+
default: f(() => [
|
|
287
|
+
I(z, D(s.$attrs, {
|
|
288
|
+
ref: t(a),
|
|
289
|
+
as: s.as,
|
|
290
|
+
"as-child": s.asChild
|
|
291
|
+
}), {
|
|
292
|
+
default: f(() => [
|
|
293
|
+
y(s.$slots, "default")
|
|
294
|
+
]),
|
|
295
|
+
_: 3
|
|
296
|
+
}, 16, ["as", "as-child"])
|
|
297
|
+
]),
|
|
298
|
+
_: 3
|
|
299
|
+
}, 8, ["present"])) : T("", !0);
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
export {
|
|
304
|
+
re as _,
|
|
305
|
+
de as a,
|
|
306
|
+
ue as b,
|
|
307
|
+
le as c,
|
|
308
|
+
E as i
|
|
309
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineComponent as r, createBlock as a, openBlock as n, unref as p, normalizeProps as s, guardReactiveProps as l, withCtx as c, renderSlot as f } from "vue";
|
|
2
|
+
import { _ as i } from "./Teleport-DnUewq5H.js";
|
|
3
|
+
const u = /* @__PURE__ */ r({
|
|
4
|
+
__name: "DialogPortal",
|
|
5
|
+
props: {
|
|
6
|
+
to: {},
|
|
7
|
+
disabled: { type: Boolean },
|
|
8
|
+
defer: { type: Boolean },
|
|
9
|
+
forceMount: { type: Boolean }
|
|
10
|
+
},
|
|
11
|
+
setup(e) {
|
|
12
|
+
const o = e;
|
|
13
|
+
return (t, _) => (n(), a(p(i), s(l(o)), {
|
|
14
|
+
default: c(() => [
|
|
15
|
+
f(t.$slots, "default")
|
|
16
|
+
]),
|
|
17
|
+
_: 3
|
|
18
|
+
}, 16));
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
u as _
|
|
23
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { defineComponent as s, createBlock as i, openBlock as l, unref as o, mergeProps as p, withCtx as d, renderSlot as u, onMounted as g } from "vue";
|
|
2
|
+
import { u as c } from "./useForwardExpose-DZT6mL_U.js";
|
|
3
|
+
import { P as f } from "./Primitive-B3twiLO1.js";
|
|
4
|
+
import { i as m } from "./DialogOverlay-Cj3UTjZ8.js";
|
|
5
|
+
import { u as h } from "./useId-reAg216X.js";
|
|
6
|
+
const D = /* @__PURE__ */ s({
|
|
7
|
+
__name: "DialogDescription",
|
|
8
|
+
props: {
|
|
9
|
+
asChild: { type: Boolean },
|
|
10
|
+
as: { default: "p" }
|
|
11
|
+
},
|
|
12
|
+
setup(t) {
|
|
13
|
+
const a = t;
|
|
14
|
+
c();
|
|
15
|
+
const e = m();
|
|
16
|
+
return (n, r) => (l(), i(o(f), p(a, {
|
|
17
|
+
id: o(e).descriptionId
|
|
18
|
+
}), {
|
|
19
|
+
default: d(() => [
|
|
20
|
+
u(n.$slots, "default")
|
|
21
|
+
]),
|
|
22
|
+
_: 3
|
|
23
|
+
}, 16, ["id"]));
|
|
24
|
+
}
|
|
25
|
+
}), I = /* @__PURE__ */ s({
|
|
26
|
+
__name: "DialogTitle",
|
|
27
|
+
props: {
|
|
28
|
+
asChild: { type: Boolean },
|
|
29
|
+
as: { default: "h2" }
|
|
30
|
+
},
|
|
31
|
+
setup(t) {
|
|
32
|
+
const a = t, e = m();
|
|
33
|
+
return c(), (n, r) => (l(), i(o(f), p(a, {
|
|
34
|
+
id: o(e).titleId
|
|
35
|
+
}), {
|
|
36
|
+
default: d(() => [
|
|
37
|
+
u(n.$slots, "default")
|
|
38
|
+
]),
|
|
39
|
+
_: 3
|
|
40
|
+
}, 16, ["id"]));
|
|
41
|
+
}
|
|
42
|
+
}), $ = /* @__PURE__ */ s({
|
|
43
|
+
__name: "DialogTrigger",
|
|
44
|
+
props: {
|
|
45
|
+
asChild: { type: Boolean },
|
|
46
|
+
as: { default: "button" }
|
|
47
|
+
},
|
|
48
|
+
setup(t) {
|
|
49
|
+
const a = t, e = m(), { forwardRef: n, currentElement: r } = c();
|
|
50
|
+
return e.contentId || (e.contentId = h(void 0, "reka-dialog-content")), g(() => {
|
|
51
|
+
e.triggerElement.value = r.value;
|
|
52
|
+
}), (_, v) => (l(), i(o(f), p(a, {
|
|
53
|
+
ref: o(n),
|
|
54
|
+
type: _.as === "button" ? "button" : void 0,
|
|
55
|
+
"aria-haspopup": "dialog",
|
|
56
|
+
"aria-expanded": o(e).open.value || !1,
|
|
57
|
+
"aria-controls": o(e).open.value ? o(e).contentId : void 0,
|
|
58
|
+
"data-state": o(e).open.value ? "open" : "closed",
|
|
59
|
+
onClick: o(e).onOpenToggle
|
|
60
|
+
}), {
|
|
61
|
+
default: d(() => [
|
|
62
|
+
u(_.$slots, "default")
|
|
63
|
+
]),
|
|
64
|
+
_: 3
|
|
65
|
+
}, 16, ["type", "aria-expanded", "aria-controls", "data-state", "onClick"]));
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
export {
|
|
69
|
+
D as _,
|
|
70
|
+
I as a,
|
|
71
|
+
$ as b
|
|
72
|
+
};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { ref as P, watchEffect as h, toValue as O, nextTick as L, defineComponent as B, reactive as T, computed as D, createBlock as F, openBlock as S, unref as E, normalizeStyle as x, withCtx as W, renderSlot as k } from "vue";
|
|
2
|
+
import { i as b, o as I } from "./index-BwPb_idr.js";
|
|
3
|
+
import { h as C } from "./handleAndDispatchCustomEvent-Byh08EHr.js";
|
|
4
|
+
import { u as _ } from "./useForwardExpose-DZT6mL_U.js";
|
|
5
|
+
import { P as A } from "./Primitive-B3twiLO1.js";
|
|
6
|
+
const z = "dismissableLayer.pointerDownOutside", R = "dismissableLayer.focusOutside";
|
|
7
|
+
function g(r, s) {
|
|
8
|
+
const n = s.closest(
|
|
9
|
+
"[data-dismissable-layer]"
|
|
10
|
+
), t = r.dataset.dismissableLayer === "" ? r : r.querySelector(
|
|
11
|
+
"[data-dismissable-layer]"
|
|
12
|
+
), o = Array.from(
|
|
13
|
+
r.ownerDocument.querySelectorAll("[data-dismissable-layer]")
|
|
14
|
+
);
|
|
15
|
+
return !!(n && (t === n || o.indexOf(t) < o.indexOf(n)));
|
|
16
|
+
}
|
|
17
|
+
function K(r, s, n = !0) {
|
|
18
|
+
var c;
|
|
19
|
+
const t = ((c = s == null ? void 0 : s.value) == null ? void 0 : c.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), o = P(!1), i = P(() => {
|
|
20
|
+
});
|
|
21
|
+
return h((a) => {
|
|
22
|
+
if (!b || !O(n))
|
|
23
|
+
return;
|
|
24
|
+
const u = async (v) => {
|
|
25
|
+
const w = v.target;
|
|
26
|
+
if (!(!(s != null && s.value) || !w)) {
|
|
27
|
+
if (g(s.value, w)) {
|
|
28
|
+
o.value = !1;
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (v.target && !o.value) {
|
|
32
|
+
let p = function() {
|
|
33
|
+
C(
|
|
34
|
+
z,
|
|
35
|
+
r,
|
|
36
|
+
m
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
const m = { originalEvent: v };
|
|
40
|
+
v.pointerType === "touch" ? (t.removeEventListener("click", i.value), i.value = p, t.addEventListener("click", i.value, {
|
|
41
|
+
once: !0
|
|
42
|
+
})) : p();
|
|
43
|
+
} else
|
|
44
|
+
t.removeEventListener("click", i.value);
|
|
45
|
+
o.value = !1;
|
|
46
|
+
}
|
|
47
|
+
}, f = window.setTimeout(() => {
|
|
48
|
+
t.addEventListener("pointerdown", u);
|
|
49
|
+
}, 0);
|
|
50
|
+
a(() => {
|
|
51
|
+
window.clearTimeout(f), t.removeEventListener("pointerdown", u), t.removeEventListener("click", i.value);
|
|
52
|
+
});
|
|
53
|
+
}), {
|
|
54
|
+
onPointerDownCapture: () => {
|
|
55
|
+
O(n) && (o.value = !0);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function U(r, s, n = !0) {
|
|
60
|
+
var i;
|
|
61
|
+
const t = ((i = s == null ? void 0 : s.value) == null ? void 0 : i.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), o = P(!1);
|
|
62
|
+
return h((c) => {
|
|
63
|
+
if (!b || !O(n))
|
|
64
|
+
return;
|
|
65
|
+
const a = async (u) => {
|
|
66
|
+
if (!(s != null && s.value))
|
|
67
|
+
return;
|
|
68
|
+
await L(), await L();
|
|
69
|
+
const f = u.target;
|
|
70
|
+
!s.value || !f || g(s.value, f) || u.target && !o.value && C(
|
|
71
|
+
R,
|
|
72
|
+
r,
|
|
73
|
+
{ originalEvent: u }
|
|
74
|
+
);
|
|
75
|
+
};
|
|
76
|
+
t.addEventListener("focusin", a), c(() => t.removeEventListener("focusin", a));
|
|
77
|
+
}), {
|
|
78
|
+
onFocusCapture: () => {
|
|
79
|
+
O(n) && (o.value = !0);
|
|
80
|
+
},
|
|
81
|
+
onBlurCapture: () => {
|
|
82
|
+
O(n) && (o.value = !1);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
const d = T({
|
|
87
|
+
layersRoot: /* @__PURE__ */ new Set(),
|
|
88
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
89
|
+
branches: /* @__PURE__ */ new Set()
|
|
90
|
+
}), $ = /* @__PURE__ */ B({
|
|
91
|
+
__name: "DismissableLayer",
|
|
92
|
+
props: {
|
|
93
|
+
disableOutsidePointerEvents: { type: Boolean, default: !1 },
|
|
94
|
+
asChild: { type: Boolean },
|
|
95
|
+
as: {}
|
|
96
|
+
},
|
|
97
|
+
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "dismiss"],
|
|
98
|
+
setup(r, { emit: s }) {
|
|
99
|
+
const n = r, t = s, { forwardRef: o, currentElement: i } = _(), c = D(
|
|
100
|
+
() => {
|
|
101
|
+
var e;
|
|
102
|
+
return ((e = i.value) == null ? void 0 : e.ownerDocument) ?? globalThis.document;
|
|
103
|
+
}
|
|
104
|
+
), a = D(() => d.layersRoot), u = D(() => i.value ? Array.from(a.value).indexOf(i.value) : -1), f = D(() => d.layersWithOutsidePointerEventsDisabled.size > 0), v = D(() => {
|
|
105
|
+
const e = Array.from(a.value), [y] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), l = e.indexOf(y);
|
|
106
|
+
return u.value >= l;
|
|
107
|
+
}), w = K(async (e) => {
|
|
108
|
+
const y = [...d.branches].some(
|
|
109
|
+
(l) => l == null ? void 0 : l.contains(e.target)
|
|
110
|
+
);
|
|
111
|
+
!v.value || y || (t("pointerDownOutside", e), t("interactOutside", e), await L(), e.defaultPrevented || t("dismiss"));
|
|
112
|
+
}, i), p = U((e) => {
|
|
113
|
+
[...d.branches].some(
|
|
114
|
+
(l) => l == null ? void 0 : l.contains(e.target)
|
|
115
|
+
) || (t("focusOutside", e), t("interactOutside", e), e.defaultPrevented || t("dismiss"));
|
|
116
|
+
}, i);
|
|
117
|
+
I("Escape", (e) => {
|
|
118
|
+
u.value === a.value.size - 1 && (t("escapeKeyDown", e), e.defaultPrevented || t("dismiss"));
|
|
119
|
+
});
|
|
120
|
+
let m;
|
|
121
|
+
return h((e) => {
|
|
122
|
+
i.value && (n.disableOutsidePointerEvents && (d.layersWithOutsidePointerEventsDisabled.size === 0 && (m = c.value.body.style.pointerEvents, c.value.body.style.pointerEvents = "none"), d.layersWithOutsidePointerEventsDisabled.add(i.value)), a.value.add(i.value), e(() => {
|
|
123
|
+
n.disableOutsidePointerEvents && d.layersWithOutsidePointerEventsDisabled.size === 1 && (c.value.body.style.pointerEvents = m);
|
|
124
|
+
}));
|
|
125
|
+
}), h((e) => {
|
|
126
|
+
e(() => {
|
|
127
|
+
i.value && (a.value.delete(i.value), d.layersWithOutsidePointerEventsDisabled.delete(i.value));
|
|
128
|
+
});
|
|
129
|
+
}), (e, y) => (S(), F(E(A), {
|
|
130
|
+
ref: E(o),
|
|
131
|
+
"as-child": e.asChild,
|
|
132
|
+
as: e.as,
|
|
133
|
+
"data-dismissable-layer": "",
|
|
134
|
+
style: x({
|
|
135
|
+
pointerEvents: f.value ? v.value ? "auto" : "none" : void 0
|
|
136
|
+
}),
|
|
137
|
+
onFocusCapture: E(p).onFocusCapture,
|
|
138
|
+
onBlurCapture: E(p).onBlurCapture,
|
|
139
|
+
onPointerdownCapture: E(w).onPointerDownCapture
|
|
140
|
+
}, {
|
|
141
|
+
default: W(() => [
|
|
142
|
+
k(e.$slots, "default")
|
|
143
|
+
]),
|
|
144
|
+
_: 3
|
|
145
|
+
}, 8, ["as-child", "as", "style", "onFocusCapture", "onBlurCapture", "onPointerdownCapture"]));
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
export {
|
|
149
|
+
$ as _,
|
|
150
|
+
d as c
|
|
151
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { ref as g, defineComponent as L, reactive as A, watchEffect as y, nextTick as _, createBlock as S, openBlock as w, unref as K, withCtx as N, renderSlot as x } from "vue";
|
|
2
|
+
import { d as U, i as B } from "./index-BwPb_idr.js";
|
|
3
|
+
import { A as v, f as P, g as D, a as i, b as E, E as T, c as I } from "./utils-DKNaYMZh.js";
|
|
4
|
+
import { u as M } from "./useForwardExpose-DZT6mL_U.js";
|
|
5
|
+
import { g as h } from "./getActiveElement-B-HWdUIb.js";
|
|
6
|
+
import { P as R } from "./Primitive-B3twiLO1.js";
|
|
7
|
+
const G = U(() => g([]));
|
|
8
|
+
function H() {
|
|
9
|
+
const n = G();
|
|
10
|
+
return {
|
|
11
|
+
add(o) {
|
|
12
|
+
const s = n.value[0];
|
|
13
|
+
o !== s && (s == null || s.pause()), n.value = O(n.value, o), n.value.unshift(o);
|
|
14
|
+
},
|
|
15
|
+
remove(o) {
|
|
16
|
+
var s;
|
|
17
|
+
n.value = O(n.value, o), (s = n.value[0]) == null || s.resume();
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function O(n, o) {
|
|
22
|
+
const s = [...n], l = s.indexOf(o);
|
|
23
|
+
return l !== -1 && s.splice(l, 1), s;
|
|
24
|
+
}
|
|
25
|
+
function V(n) {
|
|
26
|
+
return n.filter((o) => o.tagName !== "A");
|
|
27
|
+
}
|
|
28
|
+
const W = /* @__PURE__ */ L({
|
|
29
|
+
__name: "FocusScope",
|
|
30
|
+
props: {
|
|
31
|
+
loop: { type: Boolean, default: !1 },
|
|
32
|
+
trapped: { type: Boolean, default: !1 },
|
|
33
|
+
asChild: { type: Boolean },
|
|
34
|
+
as: {}
|
|
35
|
+
},
|
|
36
|
+
emits: ["mountAutoFocus", "unmountAutoFocus"],
|
|
37
|
+
setup(n, { emit: o }) {
|
|
38
|
+
const s = n, l = o, { currentRef: k, currentElement: b } = M(), p = g(null), F = H(), m = A({
|
|
39
|
+
paused: !1,
|
|
40
|
+
pause() {
|
|
41
|
+
this.paused = !0;
|
|
42
|
+
},
|
|
43
|
+
resume() {
|
|
44
|
+
this.paused = !1;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
y((t) => {
|
|
48
|
+
if (!B)
|
|
49
|
+
return;
|
|
50
|
+
const e = b.value;
|
|
51
|
+
if (!s.trapped)
|
|
52
|
+
return;
|
|
53
|
+
function a(c) {
|
|
54
|
+
if (m.paused || !e)
|
|
55
|
+
return;
|
|
56
|
+
const f = c.target;
|
|
57
|
+
e.contains(f) ? p.value = f : i(p.value, { select: !0 });
|
|
58
|
+
}
|
|
59
|
+
function d(c) {
|
|
60
|
+
if (m.paused || !e)
|
|
61
|
+
return;
|
|
62
|
+
const f = c.relatedTarget;
|
|
63
|
+
f !== null && (e.contains(f) || i(p.value, { select: !0 }));
|
|
64
|
+
}
|
|
65
|
+
function u(c) {
|
|
66
|
+
e.contains(p.value) || i(e);
|
|
67
|
+
}
|
|
68
|
+
document.addEventListener("focusin", a), document.addEventListener("focusout", d);
|
|
69
|
+
const r = new MutationObserver(u);
|
|
70
|
+
e && r.observe(e, { childList: !0, subtree: !0 }), t(() => {
|
|
71
|
+
document.removeEventListener("focusin", a), document.removeEventListener("focusout", d), r.disconnect();
|
|
72
|
+
});
|
|
73
|
+
}), y(async (t) => {
|
|
74
|
+
const e = b.value;
|
|
75
|
+
if (await _(), !e)
|
|
76
|
+
return;
|
|
77
|
+
F.add(m);
|
|
78
|
+
const a = h();
|
|
79
|
+
if (!e.contains(a)) {
|
|
80
|
+
const u = new CustomEvent(v, T);
|
|
81
|
+
e.addEventListener(v, (r) => l("mountAutoFocus", r)), e.dispatchEvent(u), u.defaultPrevented || (P(V(D(e)), {
|
|
82
|
+
select: !0
|
|
83
|
+
}), h() === a && i(e));
|
|
84
|
+
}
|
|
85
|
+
t(() => {
|
|
86
|
+
e.removeEventListener(v, (c) => l("mountAutoFocus", c));
|
|
87
|
+
const u = new CustomEvent(E, T), r = (c) => {
|
|
88
|
+
l("unmountAutoFocus", c);
|
|
89
|
+
};
|
|
90
|
+
e.addEventListener(E, r), e.dispatchEvent(u), setTimeout(() => {
|
|
91
|
+
u.defaultPrevented || i(a ?? document.body, { select: !0 }), e.removeEventListener(E, r), F.remove(m);
|
|
92
|
+
}, 0);
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
function C(t) {
|
|
96
|
+
if (!s.loop && !s.trapped || m.paused)
|
|
97
|
+
return;
|
|
98
|
+
const e = t.key === "Tab" && !t.altKey && !t.ctrlKey && !t.metaKey, a = h();
|
|
99
|
+
if (e && a) {
|
|
100
|
+
const d = t.currentTarget, [u, r] = I(d);
|
|
101
|
+
u && r ? !t.shiftKey && a === r ? (t.preventDefault(), s.loop && i(u, { select: !0 })) : t.shiftKey && a === u && (t.preventDefault(), s.loop && i(r, { select: !0 })) : a === d && t.preventDefault();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return (t, e) => (w(), S(K(R), {
|
|
105
|
+
ref_key: "currentRef",
|
|
106
|
+
ref: k,
|
|
107
|
+
tabindex: "-1",
|
|
108
|
+
"as-child": t.asChild,
|
|
109
|
+
as: t.as,
|
|
110
|
+
onKeydown: C
|
|
111
|
+
}, {
|
|
112
|
+
default: N(() => [
|
|
113
|
+
x(t.$slots, "default")
|
|
114
|
+
]),
|
|
115
|
+
_: 3
|
|
116
|
+
}, 8, ["as-child", "as"]));
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
export {
|
|
120
|
+
W as _
|
|
121
|
+
};
|