@orchidui/dashboard 1.8.1-93 → 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/Charts/BarChart/OcBarChart.js +1 -1
- package/dist/Dashboard/Charts/BarRaceChart/OcBarRaceChart.js +1 -1
- package/dist/Dashboard/Charts/LineChart/OcLineChart.js +1 -1
- package/dist/Dashboard/Charts/PieChart/OcPieChart.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/{OcBarChart-CgKo9rAM.js → OcBarChart-DFnF2-u0.js} +2 -2
- package/dist/{OcBarRaceChart-D_XrqdiO.js → OcBarRaceChart-B6S4Rrlq.js} +3 -3
- package/dist/{OcCard-BpqC7suH.js → OcCard-B3SCzVwn.js} +54 -58
- package/dist/OcCodeBlock-CBdVqav7.js +37 -0
- package/dist/{OcLineChart-dAL6sRiP.js → OcLineChart-CTDLgo1v.js} +2 -2
- package/dist/OcLottieAnimation-DeMoIDaX.js +7747 -0
- package/dist/{OcPieChart-Kn-CkXip.js → OcPieChart-NSv6CW-L.js} +4 -4
- 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-hFQ0MJZO.js +9529 -0
- 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 +14 -14
- 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 +265 -3
- package/dist/OcCodeBlock-chTpuRDc.js +0 -63
- package/dist/OcLottieAnimation-EBkAB8-y.js +0 -7741
- package/dist/QuillEditor-BHWfmp5D.js +0 -9544
- /package/dist/{style.css → dashboard.css} +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { defineComponent as c, createBlock as p, openBlock as n, unref as s, withCtx as f, renderSlot as m, createElementBlock as u, normalizeClass as _, provide as I, toValue as $ } from "vue";
|
|
2
|
+
import { useFormField as i } from "./ui/form/useFormField.js";
|
|
3
|
+
import { S as F } from "./Primitive-B3twiLO1.js";
|
|
4
|
+
import { c as d } from "./utils-SFgRDk1R.js";
|
|
5
|
+
import { FORM_ITEM_INJECTION_KEY as h } from "./ui/form/injectionKeys.js";
|
|
6
|
+
import { u as x } from "./useId-reAg216X.js";
|
|
7
|
+
import { _ as b } from "./Label.vue_vue_type_script_setup_true_lang-D_LMIKBv.js";
|
|
8
|
+
import { E as g } from "./vee-validate-Cf8JDJ_k.js";
|
|
9
|
+
const N = /* @__PURE__ */ c({
|
|
10
|
+
__name: "FormControl",
|
|
11
|
+
setup(o) {
|
|
12
|
+
const { error: e, formItemId: r, formDescriptionId: t, formMessageId: a } = i();
|
|
13
|
+
return (l, C) => (n(), p(s(F), {
|
|
14
|
+
id: s(r),
|
|
15
|
+
"aria-describedby": s(e) ? `${s(t)} ${s(a)}` : `${s(t)}`,
|
|
16
|
+
"aria-invalid": !!s(e)
|
|
17
|
+
}, {
|
|
18
|
+
default: f(() => [
|
|
19
|
+
m(l.$slots, "default")
|
|
20
|
+
]),
|
|
21
|
+
_: 3
|
|
22
|
+
}, 8, ["id", "aria-describedby", "aria-invalid"]));
|
|
23
|
+
}
|
|
24
|
+
}), v = ["id"], T = /* @__PURE__ */ c({
|
|
25
|
+
__name: "FormDescription",
|
|
26
|
+
props: {
|
|
27
|
+
class: {}
|
|
28
|
+
},
|
|
29
|
+
setup(o) {
|
|
30
|
+
const e = o, { formDescriptionId: r } = i();
|
|
31
|
+
return (t, a) => (n(), u("p", {
|
|
32
|
+
id: s(r),
|
|
33
|
+
class: _(s(d)("text-sm text-muted-foreground", e.class))
|
|
34
|
+
}, [
|
|
35
|
+
m(t.$slots, "default")
|
|
36
|
+
], 10, v));
|
|
37
|
+
}
|
|
38
|
+
}), j = /* @__PURE__ */ c({
|
|
39
|
+
__name: "FormItem",
|
|
40
|
+
props: {
|
|
41
|
+
class: {}
|
|
42
|
+
},
|
|
43
|
+
setup(o) {
|
|
44
|
+
const e = o, r = x();
|
|
45
|
+
return I(h, r), (t, a) => (n(), u("div", {
|
|
46
|
+
class: _(s(d)("space-y-2", e.class))
|
|
47
|
+
}, [
|
|
48
|
+
m(t.$slots, "default")
|
|
49
|
+
], 2));
|
|
50
|
+
}
|
|
51
|
+
}), w = /* @__PURE__ */ c({
|
|
52
|
+
__name: "FormLabel",
|
|
53
|
+
props: {
|
|
54
|
+
for: {},
|
|
55
|
+
asChild: { type: Boolean },
|
|
56
|
+
as: { type: [String, Object, Function] },
|
|
57
|
+
class: {}
|
|
58
|
+
},
|
|
59
|
+
setup(o) {
|
|
60
|
+
const e = o, { error: r, formItemId: t } = i();
|
|
61
|
+
return (a, l) => (n(), p(s(b), {
|
|
62
|
+
class: _(s(d)(
|
|
63
|
+
s(r) && "text-destructive",
|
|
64
|
+
e.class
|
|
65
|
+
)),
|
|
66
|
+
for: s(t)
|
|
67
|
+
}, {
|
|
68
|
+
default: f(() => [
|
|
69
|
+
m(a.$slots, "default")
|
|
70
|
+
]),
|
|
71
|
+
_: 3
|
|
72
|
+
}, 8, ["class", "for"]));
|
|
73
|
+
}
|
|
74
|
+
}), z = /* @__PURE__ */ c({
|
|
75
|
+
__name: "FormMessage",
|
|
76
|
+
setup(o) {
|
|
77
|
+
const { name: e, formMessageId: r } = i();
|
|
78
|
+
return (t, a) => (n(), p(s(g), {
|
|
79
|
+
id: s(r),
|
|
80
|
+
as: "p",
|
|
81
|
+
name: $(s(e)),
|
|
82
|
+
class: "text-sm font-medium text-destructive"
|
|
83
|
+
}, null, 8, ["id", "name"]));
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
export {
|
|
87
|
+
N as _,
|
|
88
|
+
T as a,
|
|
89
|
+
j as b,
|
|
90
|
+
w as c,
|
|
91
|
+
z as d
|
|
92
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineComponent as n, withDirectives as u, createElementBlock as a, openBlock as d, normalizeClass as f, unref as t, isRef as m, vModelText as c } from "vue";
|
|
2
|
+
import { a as p } from "./index-B3LW8uSH.js";
|
|
3
|
+
import { c as b } from "./utils-SFgRDk1R.js";
|
|
4
|
+
const k = /* @__PURE__ */ n({
|
|
5
|
+
__name: "Input",
|
|
6
|
+
props: {
|
|
7
|
+
defaultValue: {},
|
|
8
|
+
modelValue: {},
|
|
9
|
+
class: {}
|
|
10
|
+
},
|
|
11
|
+
emits: ["update:modelValue"],
|
|
12
|
+
setup(s, { emit: r }) {
|
|
13
|
+
const e = s, o = p(e, "modelValue", r, {
|
|
14
|
+
passive: !0,
|
|
15
|
+
defaultValue: e.defaultValue
|
|
16
|
+
});
|
|
17
|
+
return (x, l) => u((d(), a("input", {
|
|
18
|
+
"onUpdate:modelValue": l[0] || (l[0] = (i) => m(o) ? o.value = i : null),
|
|
19
|
+
class: f(t(b)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-foreground file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", e.class))
|
|
20
|
+
}, null, 2)), [
|
|
21
|
+
[c, t(o)]
|
|
22
|
+
]);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
export {
|
|
26
|
+
k as _
|
|
27
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { defineComponent as l, createBlock as n, openBlock as p, unref as s, mergeProps as i, withCtx as d, renderSlot as c } from "vue";
|
|
2
|
+
import { c as m } from "./utils-SFgRDk1R.js";
|
|
3
|
+
import { u as f } from "./useForwardExpose-DZT6mL_U.js";
|
|
4
|
+
import { P as u } from "./Primitive-B3twiLO1.js";
|
|
5
|
+
import { r as _ } from "./index-OpE2oGce.js";
|
|
6
|
+
const b = /* @__PURE__ */ l({
|
|
7
|
+
__name: "Label",
|
|
8
|
+
props: {
|
|
9
|
+
for: {},
|
|
10
|
+
asChild: { type: Boolean },
|
|
11
|
+
as: { default: "label" }
|
|
12
|
+
},
|
|
13
|
+
setup(r) {
|
|
14
|
+
const e = r;
|
|
15
|
+
return f(), (a, o) => (p(), n(s(u), i(e, {
|
|
16
|
+
onMousedown: o[0] || (o[0] = (t) => {
|
|
17
|
+
!t.defaultPrevented && t.detail > 1 && t.preventDefault();
|
|
18
|
+
})
|
|
19
|
+
}), {
|
|
20
|
+
default: d(() => [
|
|
21
|
+
c(a.$slots, "default")
|
|
22
|
+
]),
|
|
23
|
+
_: 3
|
|
24
|
+
}, 16));
|
|
25
|
+
}
|
|
26
|
+
}), B = /* @__PURE__ */ l({
|
|
27
|
+
__name: "Label",
|
|
28
|
+
props: {
|
|
29
|
+
for: {},
|
|
30
|
+
asChild: { type: Boolean },
|
|
31
|
+
as: { type: [String, Object, Function] },
|
|
32
|
+
class: {}
|
|
33
|
+
},
|
|
34
|
+
setup(r) {
|
|
35
|
+
const e = r, a = _(e, "class");
|
|
36
|
+
return (o, t) => (p(), n(s(b), i(s(a), {
|
|
37
|
+
class: s(m)(
|
|
38
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
39
|
+
e.class
|
|
40
|
+
)
|
|
41
|
+
}), {
|
|
42
|
+
default: d(() => [
|
|
43
|
+
c(o.$slots, "default")
|
|
44
|
+
]),
|
|
45
|
+
_: 3
|
|
46
|
+
}, 16, ["class"]));
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export {
|
|
50
|
+
B as _
|
|
51
|
+
};
|
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
import { computed as B, unref as t, defineComponent as N, toRefs as be, ref as x, watch as Ce, nextTick as D, createBlock as I, openBlock as L, withCtx as K, renderSlot as S, createCommentVNode as Ee, createVNode as ie, withKeys as A, withModifiers as O, mergeProps as le, watchSyncEffect as we, onMounted as xe, onUnmounted as Ke, withMemo as ke } from "vue";
|
|
2
|
+
import { u as J } from "./Collection-COudIl-A.js";
|
|
3
|
+
import { u as ne, c as X, r as Fe } from "./index-BwPb_idr.js";
|
|
4
|
+
import { P as T } from "./Primitive-B3twiLO1.js";
|
|
5
|
+
import { u as se } from "./useId-reAg216X.js";
|
|
6
|
+
import { c as Q } from "./createContext-CZEfaSVa.js";
|
|
7
|
+
import { u as re } from "./usePrimitiveElement-BjwUvHih.js";
|
|
8
|
+
import { i as Be } from "./ohash.D__AXeF1-DX2n0b2C.js";
|
|
9
|
+
import { u as Ie } from "./useForwardExpose-DZT6mL_U.js";
|
|
10
|
+
import { h as Le } from "./handleAndDispatchCustomEvent-Byh08EHr.js";
|
|
11
|
+
import { g as Ve } from "./utils-Dx9la83v.js";
|
|
12
|
+
import { u as _e } from "./useTypeahead-oSidjyFF.js";
|
|
13
|
+
import { u as He } from "./useDirection-C3C_TLKm.js";
|
|
14
|
+
import { u as Ae } from "./useFormControl-CFVC51Lp.js";
|
|
15
|
+
import { _ as Ne } from "./VisuallyHiddenInput-DvJnsVHt.js";
|
|
16
|
+
import { u as Se } from "./useKbd-BJNupnml.js";
|
|
17
|
+
import { f as Te } from "./arrays-4jDZqbdb.js";
|
|
18
|
+
function lt(s) {
|
|
19
|
+
const c = B(() => t(s)), o = B(() => new Intl.Collator("en", { usage: "search", ...c.value }));
|
|
20
|
+
return {
|
|
21
|
+
startsWith: (d, l) => l.length === 0 ? !0 : (d = d.normalize("NFC"), l = l.normalize("NFC"), o.value.compare(d.slice(0, l.length), l) === 0),
|
|
22
|
+
endsWith: (d, l) => l.length === 0 ? !0 : (d = d.normalize("NFC"), l = l.normalize("NFC"), o.value.compare(d.slice(-l.length), l) === 0),
|
|
23
|
+
contains: (d, l) => {
|
|
24
|
+
if (l.length === 0)
|
|
25
|
+
return !0;
|
|
26
|
+
d = d.normalize("NFC"), l = l.normalize("NFC");
|
|
27
|
+
let n = 0;
|
|
28
|
+
const b = l.length;
|
|
29
|
+
for (; n + b <= d.length; n++) {
|
|
30
|
+
const m = d.slice(n, n + b);
|
|
31
|
+
if (o.value.compare(l, m) === 0)
|
|
32
|
+
return !0;
|
|
33
|
+
}
|
|
34
|
+
return !1;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function $e(s, c, o) {
|
|
39
|
+
return s === void 0 ? !1 : Array.isArray(s) ? s.some((u) => H(u, c, o)) : H(s, c, o);
|
|
40
|
+
}
|
|
41
|
+
function H(s, c, o) {
|
|
42
|
+
return s === void 0 || c === void 0 ? !1 : typeof s == "string" ? s === c : typeof o == "function" ? o(s, c) : typeof o == "string" ? (s == null ? void 0 : s[o]) === (c == null ? void 0 : c[o]) : Be(s, c);
|
|
43
|
+
}
|
|
44
|
+
const [Y, Pe] = Q("ListboxRoot"), nt = /* @__PURE__ */ N({
|
|
45
|
+
__name: "ListboxRoot",
|
|
46
|
+
props: {
|
|
47
|
+
modelValue: {},
|
|
48
|
+
defaultValue: {},
|
|
49
|
+
multiple: { type: Boolean },
|
|
50
|
+
orientation: { default: "vertical" },
|
|
51
|
+
dir: {},
|
|
52
|
+
disabled: { type: Boolean },
|
|
53
|
+
selectionBehavior: { default: "toggle" },
|
|
54
|
+
highlightOnHover: { type: Boolean },
|
|
55
|
+
by: {},
|
|
56
|
+
asChild: { type: Boolean },
|
|
57
|
+
as: {},
|
|
58
|
+
name: {},
|
|
59
|
+
required: { type: Boolean }
|
|
60
|
+
},
|
|
61
|
+
emits: ["update:modelValue", "highlight", "entryFocus", "leave"],
|
|
62
|
+
setup(s, { expose: c, emit: o }) {
|
|
63
|
+
const u = s, p = o, { multiple: r, highlightOnHover: d, orientation: l, disabled: n, selectionBehavior: b, dir: m } = be(u), { getItems: y } = J({ isProvider: !0 }), { handleTypeaheadSearch: k } = _e(), { primitiveElement: $, currentElement: v } = re(), w = Se(), P = He(m), ue = Ae(v), M = x(), V = x(!1), q = x(!0), h = ne(u, "modelValue", p, {
|
|
64
|
+
defaultValue: u.defaultValue ?? (r.value ? [] : void 0),
|
|
65
|
+
passive: u.modelValue === void 0,
|
|
66
|
+
deep: !0
|
|
67
|
+
});
|
|
68
|
+
function de(e) {
|
|
69
|
+
if (V.value = !0, u.multiple) {
|
|
70
|
+
const a = Array.isArray(h.value) ? [...h.value] : [], i = a.findIndex((f) => H(f, e, u.by));
|
|
71
|
+
u.selectionBehavior === "toggle" ? (i === -1 ? a.push(e) : a.splice(i, 1), h.value = a) : (h.value = [e], M.value = e);
|
|
72
|
+
} else
|
|
73
|
+
u.selectionBehavior === "toggle" && H(h.value, e, u.by) ? h.value = void 0 : h.value = e;
|
|
74
|
+
setTimeout(() => {
|
|
75
|
+
V.value = !1;
|
|
76
|
+
}, 1);
|
|
77
|
+
}
|
|
78
|
+
const g = x(null), z = x(null), F = x(!1), G = x(!1), Z = X(), W = X(), ee = X();
|
|
79
|
+
function j() {
|
|
80
|
+
return y().map((e) => e.ref).filter((e) => e.dataset.disabled !== "");
|
|
81
|
+
}
|
|
82
|
+
function C(e, a = !0) {
|
|
83
|
+
if (!e)
|
|
84
|
+
return;
|
|
85
|
+
g.value = e, q.value && g.value.focus(), a && g.value.scrollIntoView({ block: "nearest" });
|
|
86
|
+
const i = y().find((f) => f.ref === e);
|
|
87
|
+
p("highlight", i);
|
|
88
|
+
}
|
|
89
|
+
function ce(e) {
|
|
90
|
+
if (F.value)
|
|
91
|
+
ee.trigger(e);
|
|
92
|
+
else {
|
|
93
|
+
const a = y().find((i) => H(i.value, e, u.by));
|
|
94
|
+
a && (g.value = a.ref, C(a.ref));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
function fe(e) {
|
|
98
|
+
g.value && g.value.isConnected && (e.preventDefault(), e.stopPropagation(), G.value || g.value.click());
|
|
99
|
+
}
|
|
100
|
+
function me(e) {
|
|
101
|
+
if (q.value) {
|
|
102
|
+
if (V.value = !0, F.value)
|
|
103
|
+
W.trigger(e);
|
|
104
|
+
else {
|
|
105
|
+
const a = e.altKey || e.ctrlKey || e.metaKey;
|
|
106
|
+
if (a && e.key === "a" && r.value) {
|
|
107
|
+
const i = y(), f = i.map((E) => E.value);
|
|
108
|
+
h.value = [...f], e.preventDefault(), C(i[i.length - 1].ref);
|
|
109
|
+
} else if (!a) {
|
|
110
|
+
const i = k(e.key, y());
|
|
111
|
+
i && C(i);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
setTimeout(() => {
|
|
115
|
+
V.value = !1;
|
|
116
|
+
}, 1);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function ve() {
|
|
120
|
+
G.value = !0;
|
|
121
|
+
}
|
|
122
|
+
function pe() {
|
|
123
|
+
requestAnimationFrame(() => {
|
|
124
|
+
G.value = !1;
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
function te() {
|
|
128
|
+
D(() => {
|
|
129
|
+
const e = new KeyboardEvent("keydown", { key: "PageUp" });
|
|
130
|
+
oe(e);
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function U(e) {
|
|
134
|
+
const a = g.value;
|
|
135
|
+
a != null && a.isConnected && (z.value = a), g.value = null, p("leave", e);
|
|
136
|
+
}
|
|
137
|
+
function he(e) {
|
|
138
|
+
var i, f;
|
|
139
|
+
const a = new CustomEvent("listbox.entryFocus", { bubbles: !1, cancelable: !0 });
|
|
140
|
+
if ((i = e.currentTarget) == null || i.dispatchEvent(a), p("entryFocus", a), !a.defaultPrevented)
|
|
141
|
+
if (z.value)
|
|
142
|
+
C(z.value);
|
|
143
|
+
else {
|
|
144
|
+
const E = (f = j()) == null ? void 0 : f[0];
|
|
145
|
+
C(E);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
function oe(e) {
|
|
149
|
+
const a = Ve(e, l.value, P.value);
|
|
150
|
+
if (!a)
|
|
151
|
+
return;
|
|
152
|
+
let i = j();
|
|
153
|
+
if (g.value) {
|
|
154
|
+
if (a === "last")
|
|
155
|
+
i.reverse();
|
|
156
|
+
else if (a === "prev" || a === "next") {
|
|
157
|
+
a === "prev" && i.reverse();
|
|
158
|
+
const f = i.indexOf(g.value);
|
|
159
|
+
i = i.slice(f + 1);
|
|
160
|
+
}
|
|
161
|
+
ge(e, i[0]);
|
|
162
|
+
}
|
|
163
|
+
if (i.length) {
|
|
164
|
+
const f = !g.value && a === "prev" ? i.length - 1 : 0;
|
|
165
|
+
C(i[f]);
|
|
166
|
+
}
|
|
167
|
+
if (F.value)
|
|
168
|
+
return W.trigger(e);
|
|
169
|
+
}
|
|
170
|
+
function ge(e, a) {
|
|
171
|
+
var f;
|
|
172
|
+
if (!(F.value || u.selectionBehavior !== "replace" || !r.value || !Array.isArray(h.value) || (e.altKey || e.ctrlKey || e.metaKey) && !e.shiftKey) && e.shiftKey) {
|
|
173
|
+
const E = y().filter((_) => _.ref.dataset.disabled !== "");
|
|
174
|
+
let R = (f = E.find((_) => _.ref === a)) == null ? void 0 : f.value;
|
|
175
|
+
if (e.key === w.END ? R = E[E.length - 1].value : e.key === w.HOME && (R = E[0].value), !R || !M.value)
|
|
176
|
+
return;
|
|
177
|
+
const ye = Te(E.map((_) => _.value), M.value, R);
|
|
178
|
+
h.value = ye;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
async function ae(e) {
|
|
182
|
+
if (await D(), F.value)
|
|
183
|
+
Z.trigger(e);
|
|
184
|
+
else {
|
|
185
|
+
const a = j(), i = a.find((f) => f.dataset.state === "checked");
|
|
186
|
+
i ? C(i) : a.length && C(a[0]);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return Ce(h, () => {
|
|
190
|
+
V.value || D(() => {
|
|
191
|
+
ae();
|
|
192
|
+
});
|
|
193
|
+
}, { immediate: !0, deep: !0 }), c({
|
|
194
|
+
highlightedElement: g,
|
|
195
|
+
highlightItem: ce,
|
|
196
|
+
highlightFirstItem: te,
|
|
197
|
+
highlightSelected: ae,
|
|
198
|
+
getItems: y
|
|
199
|
+
}), Pe({
|
|
200
|
+
modelValue: h,
|
|
201
|
+
// @ts-expect-error ignoring
|
|
202
|
+
onValueChange: de,
|
|
203
|
+
multiple: r,
|
|
204
|
+
orientation: l,
|
|
205
|
+
dir: P,
|
|
206
|
+
disabled: n,
|
|
207
|
+
highlightOnHover: d,
|
|
208
|
+
highlightedElement: g,
|
|
209
|
+
isVirtual: F,
|
|
210
|
+
virtualFocusHook: Z,
|
|
211
|
+
virtualKeydownHook: W,
|
|
212
|
+
virtualHighlightHook: ee,
|
|
213
|
+
by: u.by,
|
|
214
|
+
firstValue: M,
|
|
215
|
+
selectionBehavior: b,
|
|
216
|
+
focusable: q,
|
|
217
|
+
onLeave: U,
|
|
218
|
+
onEnter: he,
|
|
219
|
+
changeHighlight: C,
|
|
220
|
+
onKeydownEnter: fe,
|
|
221
|
+
onKeydownNavigation: oe,
|
|
222
|
+
onKeydownTypeAhead: me,
|
|
223
|
+
onCompositionStart: ve,
|
|
224
|
+
onCompositionEnd: pe,
|
|
225
|
+
highlightFirstItem: te
|
|
226
|
+
}), (e, a) => (L(), I(t(T), {
|
|
227
|
+
ref_key: "primitiveElement",
|
|
228
|
+
ref: $,
|
|
229
|
+
as: e.as,
|
|
230
|
+
"as-child": e.asChild,
|
|
231
|
+
dir: t(P),
|
|
232
|
+
"data-disabled": t(n) ? "" : void 0,
|
|
233
|
+
onPointerleave: U,
|
|
234
|
+
onFocusout: a[0] || (a[0] = async (i) => {
|
|
235
|
+
const f = i.relatedTarget || i.target;
|
|
236
|
+
await D(), g.value && t(v) && !t(v).contains(f) && U(i);
|
|
237
|
+
})
|
|
238
|
+
}, {
|
|
239
|
+
default: K(() => [
|
|
240
|
+
S(e.$slots, "default", { modelValue: t(h) }),
|
|
241
|
+
t(ue) && e.name ? (L(), I(t(Ne), {
|
|
242
|
+
key: 0,
|
|
243
|
+
name: e.name,
|
|
244
|
+
value: t(h),
|
|
245
|
+
disabled: t(n),
|
|
246
|
+
required: e.required
|
|
247
|
+
}, null, 8, ["name", "value", "disabled", "required"])) : Ee("", !0)
|
|
248
|
+
]),
|
|
249
|
+
_: 3
|
|
250
|
+
}, 8, ["as", "as-child", "dir", "data-disabled"]));
|
|
251
|
+
}
|
|
252
|
+
}), st = /* @__PURE__ */ N({
|
|
253
|
+
__name: "ListboxContent",
|
|
254
|
+
props: {
|
|
255
|
+
asChild: { type: Boolean },
|
|
256
|
+
as: {}
|
|
257
|
+
},
|
|
258
|
+
setup(s) {
|
|
259
|
+
const { CollectionSlot: c } = J(), o = Y(), u = Fe(!1, 10);
|
|
260
|
+
return (p, r) => (L(), I(t(c), null, {
|
|
261
|
+
default: K(() => [
|
|
262
|
+
ie(t(T), {
|
|
263
|
+
role: "listbox",
|
|
264
|
+
as: p.as,
|
|
265
|
+
"as-child": p.asChild,
|
|
266
|
+
tabindex: t(o).focusable.value ? t(o).highlightedElement.value ? "-1" : "0" : void 0,
|
|
267
|
+
"aria-orientation": t(o).orientation.value,
|
|
268
|
+
"aria-multiselectable": !!t(o).multiple.value,
|
|
269
|
+
"data-orientation": t(o).orientation.value,
|
|
270
|
+
onMousedown: r[0] || (r[0] = O((d) => u.value = !0, ["left"])),
|
|
271
|
+
onFocus: r[1] || (r[1] = (d) => {
|
|
272
|
+
t(u) || t(o).onEnter(d);
|
|
273
|
+
}),
|
|
274
|
+
onKeydown: [
|
|
275
|
+
r[2] || (r[2] = A(O((d) => {
|
|
276
|
+
t(o).focusable.value && t(o).onKeydownNavigation(d);
|
|
277
|
+
}, ["prevent"]), ["down", "up", "left", "right", "home", "end"])),
|
|
278
|
+
A(t(o).onKeydownEnter, ["enter"]),
|
|
279
|
+
t(o).onKeydownTypeAhead
|
|
280
|
+
]
|
|
281
|
+
}, {
|
|
282
|
+
default: K(() => [
|
|
283
|
+
S(p.$slots, "default")
|
|
284
|
+
]),
|
|
285
|
+
_: 3
|
|
286
|
+
}, 8, ["as", "as-child", "tabindex", "aria-orientation", "aria-multiselectable", "data-orientation", "onKeydown"])
|
|
287
|
+
]),
|
|
288
|
+
_: 3
|
|
289
|
+
}));
|
|
290
|
+
}
|
|
291
|
+
}), [rt, Me] = Q("ListboxGroup"), ut = /* @__PURE__ */ N({
|
|
292
|
+
__name: "ListboxGroup",
|
|
293
|
+
props: {
|
|
294
|
+
asChild: { type: Boolean },
|
|
295
|
+
as: {}
|
|
296
|
+
},
|
|
297
|
+
setup(s) {
|
|
298
|
+
const c = s, o = se(void 0, "reka-listbox-group");
|
|
299
|
+
return Me({ id: o }), (u, p) => (L(), I(t(T), le({ role: "group" }, c, { "aria-labelledby": t(o) }), {
|
|
300
|
+
default: K(() => [
|
|
301
|
+
S(u.$slots, "default")
|
|
302
|
+
]),
|
|
303
|
+
_: 3
|
|
304
|
+
}, 16, ["aria-labelledby"]));
|
|
305
|
+
}
|
|
306
|
+
}), dt = /* @__PURE__ */ N({
|
|
307
|
+
__name: "ListboxFilter",
|
|
308
|
+
props: {
|
|
309
|
+
modelValue: {},
|
|
310
|
+
autoFocus: { type: Boolean },
|
|
311
|
+
disabled: { type: Boolean },
|
|
312
|
+
asChild: { type: Boolean },
|
|
313
|
+
as: { default: "input" }
|
|
314
|
+
},
|
|
315
|
+
emits: ["update:modelValue"],
|
|
316
|
+
setup(s, { emit: c }) {
|
|
317
|
+
const o = s, p = ne(o, "modelValue", c, {
|
|
318
|
+
defaultValue: "",
|
|
319
|
+
passive: o.modelValue === void 0
|
|
320
|
+
}), r = Y(), { primitiveElement: d, currentElement: l } = re(), n = B(() => o.disabled || r.disabled.value || !1), b = x();
|
|
321
|
+
return we(() => {
|
|
322
|
+
var m;
|
|
323
|
+
return b.value = (m = r.highlightedElement.value) == null ? void 0 : m.id;
|
|
324
|
+
}), xe(() => {
|
|
325
|
+
r.focusable.value = !1, setTimeout(() => {
|
|
326
|
+
var m;
|
|
327
|
+
o.autoFocus && ((m = l.value) == null || m.focus());
|
|
328
|
+
}, 1);
|
|
329
|
+
}), Ke(() => {
|
|
330
|
+
r.focusable.value = !0;
|
|
331
|
+
}), (m, y) => (L(), I(t(T), {
|
|
332
|
+
ref_key: "primitiveElement",
|
|
333
|
+
ref: d,
|
|
334
|
+
as: m.as,
|
|
335
|
+
"as-child": m.asChild,
|
|
336
|
+
value: t(p),
|
|
337
|
+
disabled: n.value ? "" : void 0,
|
|
338
|
+
"data-disabled": n.value ? "" : void 0,
|
|
339
|
+
"aria-disabled": n.value ?? void 0,
|
|
340
|
+
"aria-activedescendant": b.value,
|
|
341
|
+
type: "text",
|
|
342
|
+
onKeydown: [
|
|
343
|
+
A(O(t(r).onKeydownNavigation, ["prevent"]), ["down", "up", "home", "end"]),
|
|
344
|
+
A(t(r).onKeydownEnter, ["enter"])
|
|
345
|
+
],
|
|
346
|
+
onInput: y[0] || (y[0] = (k) => {
|
|
347
|
+
p.value = k.target.value, t(r).highlightFirstItem(k);
|
|
348
|
+
}),
|
|
349
|
+
onCompositionstart: t(r).onCompositionStart,
|
|
350
|
+
onCompositionend: t(r).onCompositionEnd
|
|
351
|
+
}, {
|
|
352
|
+
default: K(() => [
|
|
353
|
+
S(m.$slots, "default", { modelValue: t(p) })
|
|
354
|
+
]),
|
|
355
|
+
_: 3
|
|
356
|
+
}, 8, ["as", "as-child", "value", "disabled", "data-disabled", "aria-disabled", "aria-activedescendant", "onKeydown", "onCompositionstart", "onCompositionend"]));
|
|
357
|
+
}
|
|
358
|
+
}), Re = "listbox.select", [ct, De] = Q("ListboxItem"), ft = /* @__PURE__ */ N({
|
|
359
|
+
__name: "ListboxItem",
|
|
360
|
+
props: {
|
|
361
|
+
value: {},
|
|
362
|
+
disabled: { type: Boolean },
|
|
363
|
+
asChild: { type: Boolean },
|
|
364
|
+
as: { default: "div" }
|
|
365
|
+
},
|
|
366
|
+
emits: ["select"],
|
|
367
|
+
setup(s, { emit: c }) {
|
|
368
|
+
const o = s, u = c, p = se(void 0, "reka-listbox-item"), { CollectionItem: r } = J(), { forwardRef: d, currentElement: l } = Ie(), n = Y(), b = B(() => l.value === n.highlightedElement.value), m = B(() => $e(n.modelValue.value, o.value, n.by)), y = B(() => n.disabled.value || o.disabled);
|
|
369
|
+
async function k(v) {
|
|
370
|
+
u("select", v), !(v != null && v.defaultPrevented) && !y.value && v && (n.onValueChange(o.value), n.changeHighlight(l.value));
|
|
371
|
+
}
|
|
372
|
+
function $(v) {
|
|
373
|
+
const w = { originalEvent: v, value: o.value };
|
|
374
|
+
Le(Re, k, w);
|
|
375
|
+
}
|
|
376
|
+
return De({
|
|
377
|
+
isSelected: m
|
|
378
|
+
}), (v, w) => (L(), I(t(r), { value: v.value }, {
|
|
379
|
+
default: K(() => [
|
|
380
|
+
ke([b.value, m.value], () => ie(t(T), le({ id: t(p) }, v.$attrs, {
|
|
381
|
+
ref: t(d),
|
|
382
|
+
role: "option",
|
|
383
|
+
tabindex: t(n).focusable.value ? b.value ? "0" : "-1" : -1,
|
|
384
|
+
"aria-selected": m.value,
|
|
385
|
+
as: v.as,
|
|
386
|
+
"as-child": v.asChild,
|
|
387
|
+
disabled: y.value ? "" : void 0,
|
|
388
|
+
"data-disabled": y.value ? "" : void 0,
|
|
389
|
+
"data-highlighted": b.value ? "" : void 0,
|
|
390
|
+
"data-state": m.value ? "checked" : "unchecked",
|
|
391
|
+
onClick: $,
|
|
392
|
+
onKeydown: A(O($, ["prevent"]), ["space"]),
|
|
393
|
+
onPointermove: w[0] || (w[0] = (P) => {
|
|
394
|
+
t(n).highlightedElement.value !== t(l) && (t(n).highlightOnHover.value ? t(n).changeHighlight(t(l), !1) : t(n).focusable.value || t(n).changeHighlight(t(l), !1));
|
|
395
|
+
})
|
|
396
|
+
}), {
|
|
397
|
+
default: K(() => [
|
|
398
|
+
S(v.$slots, "default")
|
|
399
|
+
]),
|
|
400
|
+
_: 3
|
|
401
|
+
}, 16, ["id", "tabindex", "aria-selected", "as", "as-child", "disabled", "data-disabled", "data-highlighted", "data-state", "onKeydown"]), w, 1)
|
|
402
|
+
]),
|
|
403
|
+
_: 3
|
|
404
|
+
}, 8, ["value"]));
|
|
405
|
+
}
|
|
406
|
+
});
|
|
407
|
+
export {
|
|
408
|
+
nt as _,
|
|
409
|
+
ut as a,
|
|
410
|
+
dt as b,
|
|
411
|
+
ft as c,
|
|
412
|
+
st as d,
|
|
413
|
+
Y as e,
|
|
414
|
+
ct as f,
|
|
415
|
+
rt as i,
|
|
416
|
+
lt as u
|
|
417
|
+
};
|