@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,877 @@
|
|
|
1
|
+
import { defineComponent as m, createBlock as p, openBlock as u, unref as e, withCtx as r, createVNode as I, mergeProps as v, renderSlot as f, toRefs as J, ref as E, computed as P, reactive as fe, watch as z, nextTick as M, getCurrentInstance as be, onMounted as R, isRef as de, onUnmounted as Q, resolveDynamicComponent as he, createCommentVNode as K, normalizeProps as U, createTextVNode as q, withKeys as ge, withModifiers as ve, toDisplayString as ue, guardReactiveProps as X, createElementBlock as ye, Fragment as _e } from "vue";
|
|
2
|
+
import { a as pe, u as j } from "../../useForwardPropsEmits-0XKBv1pB.js";
|
|
3
|
+
import { u as W, c as Ce } from "../../index-BwPb_idr.js";
|
|
4
|
+
import { b as xe, _ as Be, a as we } from "../../PopperContent-BT3Svcc3.js";
|
|
5
|
+
import { c as Y } from "../../createContext-CZEfaSVa.js";
|
|
6
|
+
import { u as Z } from "../../usePrimitiveElement-BjwUvHih.js";
|
|
7
|
+
import { u as Se } from "../../useDirection-C3C_TLKm.js";
|
|
8
|
+
import { u as $e, _ as Oe, d as Ie, a as ke, e as Ve, b as Ee, c as Pe, f as Fe } from "../../ListboxItem-CjMk-mEX.js";
|
|
9
|
+
import { c as F } from "../../utils-SFgRDk1R.js";
|
|
10
|
+
import { u as $ } from "../../useForwardExpose-DZT6mL_U.js";
|
|
11
|
+
import { P as S } from "../../Primitive-B3twiLO1.js";
|
|
12
|
+
import { r as D } from "../../index-OpE2oGce.js";
|
|
13
|
+
import { u as A } from "../../useId-reAg216X.js";
|
|
14
|
+
import { _ as De } from "../../Teleport-DnUewq5H.js";
|
|
15
|
+
import { a as Te, u as Re } from "../../useBodyScrollLock-CazCRZjZ.js";
|
|
16
|
+
import { _ as je } from "../../DismissableLayer-C7IJliOb.js";
|
|
17
|
+
import { P as Le } from "../../Presence-CxfTrw6l.js";
|
|
18
|
+
import { u as Ge } from "../../useNonce-C1ZOgOp5.js";
|
|
19
|
+
const ze = /* @__PURE__ */ m({
|
|
20
|
+
__name: "ComboboxAnchor",
|
|
21
|
+
props: {
|
|
22
|
+
reference: {},
|
|
23
|
+
asChild: { type: Boolean },
|
|
24
|
+
as: {}
|
|
25
|
+
},
|
|
26
|
+
setup(l) {
|
|
27
|
+
const { forwardRef: n } = $();
|
|
28
|
+
return (t, a) => (u(), p(e(xe), {
|
|
29
|
+
"as-child": "",
|
|
30
|
+
reference: t.reference
|
|
31
|
+
}, {
|
|
32
|
+
default: r(() => [
|
|
33
|
+
I(e(S), v({
|
|
34
|
+
ref: e(n),
|
|
35
|
+
"as-child": t.asChild,
|
|
36
|
+
as: t.as
|
|
37
|
+
}, t.$attrs), {
|
|
38
|
+
default: r(() => [
|
|
39
|
+
f(t.$slots, "default")
|
|
40
|
+
]),
|
|
41
|
+
_: 3
|
|
42
|
+
}, 16, ["as-child", "as"])
|
|
43
|
+
]),
|
|
44
|
+
_: 3
|
|
45
|
+
}, 8, ["reference"]));
|
|
46
|
+
}
|
|
47
|
+
}), [O, Me] = Y("ComboboxRoot"), Ke = /* @__PURE__ */ m({
|
|
48
|
+
__name: "ComboboxRoot",
|
|
49
|
+
props: {
|
|
50
|
+
open: { type: Boolean, default: void 0 },
|
|
51
|
+
defaultOpen: { type: Boolean },
|
|
52
|
+
resetSearchTermOnBlur: { type: Boolean, default: !0 },
|
|
53
|
+
resetSearchTermOnSelect: { type: Boolean, default: !0 },
|
|
54
|
+
ignoreFilter: { type: Boolean },
|
|
55
|
+
modelValue: {},
|
|
56
|
+
defaultValue: {},
|
|
57
|
+
multiple: { type: Boolean },
|
|
58
|
+
dir: {},
|
|
59
|
+
disabled: { type: Boolean },
|
|
60
|
+
highlightOnHover: { type: Boolean },
|
|
61
|
+
by: {},
|
|
62
|
+
asChild: { type: Boolean },
|
|
63
|
+
as: {},
|
|
64
|
+
name: {},
|
|
65
|
+
required: { type: Boolean }
|
|
66
|
+
},
|
|
67
|
+
emits: ["update:modelValue", "highlight", "update:open"],
|
|
68
|
+
setup(l, { expose: n, emit: t }) {
|
|
69
|
+
var le, re, ie;
|
|
70
|
+
const a = l, o = t, { primitiveElement: s, currentElement: i } = Z(), { multiple: c, disabled: y, ignoreFilter: k, resetSearchTermOnSelect: _, dir: C } = J(a), d = Se(C), b = W(a, "modelValue", o, {
|
|
71
|
+
defaultValue: a.defaultValue ?? (c.value ? [] : void 0),
|
|
72
|
+
passive: a.modelValue === void 0,
|
|
73
|
+
deep: !0
|
|
74
|
+
}), g = W(a, "open", o, {
|
|
75
|
+
defaultValue: a.defaultOpen,
|
|
76
|
+
passive: a.open === void 0
|
|
77
|
+
});
|
|
78
|
+
async function V(h) {
|
|
79
|
+
var x, B;
|
|
80
|
+
g.value = h, w.search = "", h ? (await M(), (x = s.value) == null || x.highlightSelected(), H.value = !0) : H.value = !1, (B = N.value) == null || B.focus(), setTimeout(() => {
|
|
81
|
+
!h && a.resetSearchTermOnBlur && ee.trigger();
|
|
82
|
+
}, 1);
|
|
83
|
+
}
|
|
84
|
+
const ee = Ce(), H = E(!1), te = E(!1), N = E(), oe = E(), ae = P(() => {
|
|
85
|
+
var h;
|
|
86
|
+
return ((h = s.value) == null ? void 0 : h.highlightedElement) ?? void 0;
|
|
87
|
+
}), L = E(/* @__PURE__ */ new Map()), se = E(/* @__PURE__ */ new Map()), { contains: me } = $e({ sensitivity: "base" }), w = fe({
|
|
88
|
+
search: "",
|
|
89
|
+
filtered: {
|
|
90
|
+
/** The count of all visible items. */
|
|
91
|
+
count: 0,
|
|
92
|
+
/** Map from visible item id to its search score. */
|
|
93
|
+
items: /* @__PURE__ */ new Map(),
|
|
94
|
+
/** Set of groups with at least one visible item. */
|
|
95
|
+
groups: /* @__PURE__ */ new Set()
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
function ne() {
|
|
99
|
+
if (!w.search || a.ignoreFilter || te.value) {
|
|
100
|
+
w.filtered.count = L.value.size;
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
w.filtered.groups = /* @__PURE__ */ new Set();
|
|
104
|
+
let h = 0;
|
|
105
|
+
for (const [x, B] of L.value) {
|
|
106
|
+
const G = me(B, w.search);
|
|
107
|
+
w.filtered.items.set(x, G ? 1 : 0), G && h++;
|
|
108
|
+
}
|
|
109
|
+
for (const [x, B] of se.value)
|
|
110
|
+
for (const G of B)
|
|
111
|
+
if (w.filtered.items.get(G) > 0) {
|
|
112
|
+
w.filtered.groups.add(x);
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
w.filtered.count = h;
|
|
116
|
+
}
|
|
117
|
+
z([() => w.search, () => L.value.size], () => {
|
|
118
|
+
ne();
|
|
119
|
+
}, { immediate: !0 }), z(() => g.value, () => {
|
|
120
|
+
M(() => {
|
|
121
|
+
g.value && ne();
|
|
122
|
+
});
|
|
123
|
+
}, { flush: "post" });
|
|
124
|
+
const T = be();
|
|
125
|
+
return R(() => {
|
|
126
|
+
var h, x, B;
|
|
127
|
+
T != null && T.exposed && (T.exposed.highlightItem = (h = s.value) == null ? void 0 : h.highlightItem, T.exposed.highlightFirstItem = (x = s.value) == null ? void 0 : x.highlightFirstItem, T.exposed.highlightSelected = (B = s.value) == null ? void 0 : B.highlightSelected);
|
|
128
|
+
}), n({
|
|
129
|
+
filtered: P(() => w.filtered),
|
|
130
|
+
highlightedElement: ae,
|
|
131
|
+
highlightItem: (le = s.value) == null ? void 0 : le.highlightItem,
|
|
132
|
+
highlightFirstItem: (re = s.value) == null ? void 0 : re.highlightFirstItem,
|
|
133
|
+
highlightSelected: (ie = s.value) == null ? void 0 : ie.highlightSelected
|
|
134
|
+
}), Me({
|
|
135
|
+
modelValue: b,
|
|
136
|
+
multiple: c,
|
|
137
|
+
disabled: y,
|
|
138
|
+
open: g,
|
|
139
|
+
onOpenChange: V,
|
|
140
|
+
contentId: "",
|
|
141
|
+
isUserInputted: H,
|
|
142
|
+
isVirtual: te,
|
|
143
|
+
inputElement: N,
|
|
144
|
+
highlightedElement: ae,
|
|
145
|
+
onInputElementChange: (h) => N.value = h,
|
|
146
|
+
triggerElement: oe,
|
|
147
|
+
onTriggerElementChange: (h) => oe.value = h,
|
|
148
|
+
parentElement: i,
|
|
149
|
+
resetSearchTermOnSelect: _,
|
|
150
|
+
onResetSearchTerm: ee.on,
|
|
151
|
+
allItems: L,
|
|
152
|
+
allGroups: se,
|
|
153
|
+
filterState: w,
|
|
154
|
+
ignoreFilter: k
|
|
155
|
+
}), (h, x) => (u(), p(e(Be), null, {
|
|
156
|
+
default: r(() => [
|
|
157
|
+
I(e(Oe), v({
|
|
158
|
+
ref_key: "primitiveElement",
|
|
159
|
+
ref: s
|
|
160
|
+
}, h.$attrs, {
|
|
161
|
+
modelValue: e(b),
|
|
162
|
+
"onUpdate:modelValue": x[0] || (x[0] = (B) => de(b) ? b.value = B : null),
|
|
163
|
+
style: {
|
|
164
|
+
pointerEvents: e(g) ? "auto" : void 0
|
|
165
|
+
},
|
|
166
|
+
as: h.as,
|
|
167
|
+
"as-child": h.asChild,
|
|
168
|
+
dir: e(d),
|
|
169
|
+
multiple: e(c),
|
|
170
|
+
name: h.name,
|
|
171
|
+
required: h.required,
|
|
172
|
+
disabled: e(y),
|
|
173
|
+
"highlight-on-hover": !0,
|
|
174
|
+
by: a.by,
|
|
175
|
+
onHighlight: x[1] || (x[1] = (B) => o("highlight", B))
|
|
176
|
+
}), {
|
|
177
|
+
default: r(() => [
|
|
178
|
+
f(h.$slots, "default", {
|
|
179
|
+
open: e(g),
|
|
180
|
+
modelValue: e(b)
|
|
181
|
+
})
|
|
182
|
+
]),
|
|
183
|
+
_: 3
|
|
184
|
+
}, 16, ["modelValue", "style", "as", "as-child", "dir", "multiple", "name", "required", "disabled", "by"])
|
|
185
|
+
]),
|
|
186
|
+
_: 3
|
|
187
|
+
}));
|
|
188
|
+
}
|
|
189
|
+
}), [_t, Ue] = Y("ComboboxContent"), qe = /* @__PURE__ */ m({
|
|
190
|
+
__name: "ComboboxContentImpl",
|
|
191
|
+
props: {
|
|
192
|
+
position: { default: "inline" },
|
|
193
|
+
bodyLock: { type: Boolean },
|
|
194
|
+
side: {},
|
|
195
|
+
sideOffset: {},
|
|
196
|
+
align: {},
|
|
197
|
+
alignOffset: {},
|
|
198
|
+
avoidCollisions: { type: Boolean },
|
|
199
|
+
collisionBoundary: {},
|
|
200
|
+
collisionPadding: {},
|
|
201
|
+
arrowPadding: {},
|
|
202
|
+
sticky: {},
|
|
203
|
+
hideWhenDetached: { type: Boolean },
|
|
204
|
+
positionStrategy: {},
|
|
205
|
+
updatePositionStrategy: {},
|
|
206
|
+
disableUpdateOnLayoutShift: { type: Boolean },
|
|
207
|
+
prioritizePosition: { type: Boolean },
|
|
208
|
+
reference: {},
|
|
209
|
+
asChild: { type: Boolean },
|
|
210
|
+
as: {},
|
|
211
|
+
disableOutsidePointerEvents: { type: Boolean }
|
|
212
|
+
},
|
|
213
|
+
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside"],
|
|
214
|
+
setup(l, { emit: n }) {
|
|
215
|
+
const t = l, a = n, { position: o } = J(t), s = O(), { forwardRef: i, currentElement: c } = $();
|
|
216
|
+
Te(t.bodyLock), Re(s.parentElement);
|
|
217
|
+
const y = P(() => t.position === "popper" ? t : {}), k = pe(y.value), _ = {
|
|
218
|
+
// Ensure border-box for floating-ui calculations
|
|
219
|
+
boxSizing: "border-box",
|
|
220
|
+
"--reka-combobox-content-transform-origin": "var(--reka-popper-transform-origin)",
|
|
221
|
+
"--reka-combobox-content-available-width": "var(--reka-popper-available-width)",
|
|
222
|
+
"--reka-combobox-content-available-height": "var(--reka-popper-available-height)",
|
|
223
|
+
"--reka-combobox-trigger-width": "var(--reka-popper-anchor-width)",
|
|
224
|
+
"--reka-combobox-trigger-height": "var(--reka-popper-anchor-height)"
|
|
225
|
+
};
|
|
226
|
+
Ue({ position: o });
|
|
227
|
+
const C = E(!1);
|
|
228
|
+
return R(() => {
|
|
229
|
+
s.inputElement.value && (C.value = c.value.contains(s.inputElement.value), C.value && s.inputElement.value.focus());
|
|
230
|
+
}), Q(() => {
|
|
231
|
+
var d;
|
|
232
|
+
C.value && ((d = s.triggerElement.value) == null || d.focus());
|
|
233
|
+
}), (d, b) => (u(), p(e(Ie), { "as-child": "" }, {
|
|
234
|
+
default: r(() => [
|
|
235
|
+
I(e(je), {
|
|
236
|
+
"as-child": "",
|
|
237
|
+
"disable-outside-pointer-events": d.disableOutsidePointerEvents,
|
|
238
|
+
onDismiss: b[0] || (b[0] = (g) => e(s).onOpenChange(!1)),
|
|
239
|
+
onFocusOutside: b[1] || (b[1] = (g) => {
|
|
240
|
+
var V;
|
|
241
|
+
(V = e(s).parentElement.value) != null && V.contains(g.target) && g.preventDefault(), a("focusOutside", g);
|
|
242
|
+
}),
|
|
243
|
+
onInteractOutside: b[2] || (b[2] = (g) => a("interactOutside", g)),
|
|
244
|
+
onEscapeKeyDown: b[3] || (b[3] = (g) => a("escapeKeyDown", g)),
|
|
245
|
+
onPointerDownOutside: b[4] || (b[4] = (g) => {
|
|
246
|
+
var V;
|
|
247
|
+
(V = e(s).parentElement.value) != null && V.contains(g.target) && g.preventDefault(), a("pointerDownOutside", g);
|
|
248
|
+
})
|
|
249
|
+
}, {
|
|
250
|
+
default: r(() => [
|
|
251
|
+
(u(), p(he(e(o) === "popper" ? e(we) : e(S)), v({ ...d.$attrs, ...e(k) }, {
|
|
252
|
+
id: e(s).contentId,
|
|
253
|
+
ref: e(i),
|
|
254
|
+
"data-state": e(s).open.value ? "open" : "closed",
|
|
255
|
+
style: {
|
|
256
|
+
// flex layout so we can place the scroll buttons properly
|
|
257
|
+
display: "flex",
|
|
258
|
+
flexDirection: "column",
|
|
259
|
+
// reset the outline by default as the content MAY get focused
|
|
260
|
+
outline: "none",
|
|
261
|
+
...e(o) === "popper" ? _ : {}
|
|
262
|
+
}
|
|
263
|
+
}), {
|
|
264
|
+
default: r(() => [
|
|
265
|
+
f(d.$slots, "default")
|
|
266
|
+
]),
|
|
267
|
+
_: 3
|
|
268
|
+
}, 16, ["id", "data-state", "style"]))
|
|
269
|
+
]),
|
|
270
|
+
_: 3
|
|
271
|
+
}, 8, ["disable-outside-pointer-events"])
|
|
272
|
+
]),
|
|
273
|
+
_: 3
|
|
274
|
+
}));
|
|
275
|
+
}
|
|
276
|
+
}), Ct = /* @__PURE__ */ m({
|
|
277
|
+
__name: "ComboboxCancel",
|
|
278
|
+
props: {
|
|
279
|
+
asChild: { type: Boolean },
|
|
280
|
+
as: { default: "button" }
|
|
281
|
+
},
|
|
282
|
+
setup(l) {
|
|
283
|
+
const n = l;
|
|
284
|
+
$();
|
|
285
|
+
const t = O();
|
|
286
|
+
function a() {
|
|
287
|
+
t.filterState.search = "", t.inputElement.value && (t.inputElement.value.value = "", t.inputElement.value.focus());
|
|
288
|
+
}
|
|
289
|
+
return (o, s) => (u(), p(e(S), v({
|
|
290
|
+
type: o.as === "button" ? "button" : void 0
|
|
291
|
+
}, n, {
|
|
292
|
+
tabindex: "-1",
|
|
293
|
+
onClick: a
|
|
294
|
+
}), {
|
|
295
|
+
default: r(() => [
|
|
296
|
+
f(o.$slots, "default")
|
|
297
|
+
]),
|
|
298
|
+
_: 3
|
|
299
|
+
}, 16, ["type"]));
|
|
300
|
+
}
|
|
301
|
+
}), Ae = /* @__PURE__ */ m({
|
|
302
|
+
__name: "ComboboxContent",
|
|
303
|
+
props: {
|
|
304
|
+
forceMount: { type: Boolean },
|
|
305
|
+
position: {},
|
|
306
|
+
bodyLock: { type: Boolean },
|
|
307
|
+
side: {},
|
|
308
|
+
sideOffset: {},
|
|
309
|
+
align: {},
|
|
310
|
+
alignOffset: {},
|
|
311
|
+
avoidCollisions: { type: Boolean },
|
|
312
|
+
collisionBoundary: {},
|
|
313
|
+
collisionPadding: {},
|
|
314
|
+
arrowPadding: {},
|
|
315
|
+
sticky: {},
|
|
316
|
+
hideWhenDetached: { type: Boolean },
|
|
317
|
+
positionStrategy: {},
|
|
318
|
+
updatePositionStrategy: {},
|
|
319
|
+
disableUpdateOnLayoutShift: { type: Boolean },
|
|
320
|
+
prioritizePosition: { type: Boolean },
|
|
321
|
+
reference: {},
|
|
322
|
+
asChild: { type: Boolean },
|
|
323
|
+
as: {},
|
|
324
|
+
disableOutsidePointerEvents: { type: Boolean }
|
|
325
|
+
},
|
|
326
|
+
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside"],
|
|
327
|
+
setup(l, { emit: n }) {
|
|
328
|
+
const o = j(l, n), { forwardRef: s } = $(), i = O();
|
|
329
|
+
return i.contentId || (i.contentId = A(void 0, "reka-combobox-content")), (c, y) => (u(), p(e(Le), {
|
|
330
|
+
present: c.forceMount || e(i).open.value
|
|
331
|
+
}, {
|
|
332
|
+
default: r(() => [
|
|
333
|
+
I(qe, v({ ...e(o), ...c.$attrs }, { ref: e(s) }), {
|
|
334
|
+
default: r(() => [
|
|
335
|
+
f(c.$slots, "default")
|
|
336
|
+
]),
|
|
337
|
+
_: 3
|
|
338
|
+
}, 16)
|
|
339
|
+
]),
|
|
340
|
+
_: 3
|
|
341
|
+
}, 8, ["present"]));
|
|
342
|
+
}
|
|
343
|
+
}), He = /* @__PURE__ */ m({
|
|
344
|
+
__name: "ComboboxEmpty",
|
|
345
|
+
props: {
|
|
346
|
+
asChild: { type: Boolean },
|
|
347
|
+
as: {}
|
|
348
|
+
},
|
|
349
|
+
setup(l) {
|
|
350
|
+
const n = l, t = O(), a = P(
|
|
351
|
+
() => t.ignoreFilter.value ? t.allItems.value.size === 0 : !!t.filterState.search && t.filterState.filtered.count === 0
|
|
352
|
+
);
|
|
353
|
+
return (o, s) => a.value ? (u(), p(e(S), U(v({ key: 0 }, n)), {
|
|
354
|
+
default: r(() => [
|
|
355
|
+
f(o.$slots, "default", {}, () => [
|
|
356
|
+
s[0] || (s[0] = q("No options"))
|
|
357
|
+
])
|
|
358
|
+
]),
|
|
359
|
+
_: 3
|
|
360
|
+
}, 16)) : K("", !0);
|
|
361
|
+
}
|
|
362
|
+
}), [ce, Ne] = Y("ComboboxGroup"), We = /* @__PURE__ */ m({
|
|
363
|
+
__name: "ComboboxGroup",
|
|
364
|
+
props: {
|
|
365
|
+
asChild: { type: Boolean },
|
|
366
|
+
as: {}
|
|
367
|
+
},
|
|
368
|
+
setup(l) {
|
|
369
|
+
const n = l, t = A(void 0, "reka-combobox-group"), a = O(), o = P(() => a.ignoreFilter.value ? !0 : a.filterState.search ? a.filterState.filtered.groups.has(t) : !0), s = Ne({
|
|
370
|
+
id: t,
|
|
371
|
+
labelId: ""
|
|
372
|
+
});
|
|
373
|
+
return R(() => {
|
|
374
|
+
a.allGroups.value.has(t) || a.allGroups.value.set(t, /* @__PURE__ */ new Set());
|
|
375
|
+
}), Q(() => {
|
|
376
|
+
a.allGroups.value.delete(t);
|
|
377
|
+
}), (i, c) => (u(), p(e(ke), v({
|
|
378
|
+
id: e(t),
|
|
379
|
+
"aria-labelledby": e(s).labelId
|
|
380
|
+
}, n, {
|
|
381
|
+
hidden: o.value ? void 0 : !0
|
|
382
|
+
}), {
|
|
383
|
+
default: r(() => [
|
|
384
|
+
f(i.$slots, "default")
|
|
385
|
+
]),
|
|
386
|
+
_: 3
|
|
387
|
+
}, 16, ["id", "aria-labelledby", "hidden"]));
|
|
388
|
+
}
|
|
389
|
+
}), Je = /* @__PURE__ */ m({
|
|
390
|
+
__name: "ComboboxInput",
|
|
391
|
+
props: {
|
|
392
|
+
displayValue: {},
|
|
393
|
+
modelValue: {},
|
|
394
|
+
autoFocus: { type: Boolean },
|
|
395
|
+
disabled: { type: Boolean },
|
|
396
|
+
asChild: { type: Boolean },
|
|
397
|
+
as: { default: "input" }
|
|
398
|
+
},
|
|
399
|
+
emits: ["update:modelValue"],
|
|
400
|
+
setup(l, { emit: n }) {
|
|
401
|
+
const t = l, a = n, o = O(), s = Ve(), { primitiveElement: i, currentElement: c } = Z(), y = W(t, "modelValue", a, {
|
|
402
|
+
passive: t.modelValue === void 0
|
|
403
|
+
});
|
|
404
|
+
R(() => {
|
|
405
|
+
c.value && o.onInputElementChange(c.value);
|
|
406
|
+
});
|
|
407
|
+
function k(d) {
|
|
408
|
+
o.open.value || o.onOpenChange(!0);
|
|
409
|
+
}
|
|
410
|
+
function _(d) {
|
|
411
|
+
const b = d.target;
|
|
412
|
+
o.open.value ? o.filterState.search = b.value : (o.onOpenChange(!0), M(() => {
|
|
413
|
+
b.value && (o.filterState.search = b.value, s.highlightFirstItem(d));
|
|
414
|
+
}));
|
|
415
|
+
}
|
|
416
|
+
function C() {
|
|
417
|
+
const d = o.modelValue.value;
|
|
418
|
+
t.displayValue ? y.value = t.displayValue(d) : !o.multiple.value && d && !Array.isArray(d) && typeof d != "object" ? y.value = d.toString() : y.value = "", M(() => {
|
|
419
|
+
y.value = y.value;
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
return o.onResetSearchTerm(() => {
|
|
423
|
+
C();
|
|
424
|
+
}), z(o.modelValue, async () => {
|
|
425
|
+
!o.isUserInputted.value && o.resetSearchTermOnSelect.value && C();
|
|
426
|
+
}, { immediate: !0, deep: !0 }), z(
|
|
427
|
+
() => t.modelValue,
|
|
428
|
+
() => {
|
|
429
|
+
t.modelValue !== void 0 && (o.filterState.search = t.modelValue);
|
|
430
|
+
}
|
|
431
|
+
), (d, b) => (u(), p(e(Ee), {
|
|
432
|
+
ref_key: "primitiveElement",
|
|
433
|
+
ref: i,
|
|
434
|
+
modelValue: e(y),
|
|
435
|
+
"onUpdate:modelValue": b[0] || (b[0] = (g) => de(y) ? y.value = g : null),
|
|
436
|
+
as: d.as,
|
|
437
|
+
"as-child": d.asChild,
|
|
438
|
+
"auto-focus": d.autoFocus,
|
|
439
|
+
"aria-expanded": e(o).open.value,
|
|
440
|
+
"aria-controls": e(o).contentId,
|
|
441
|
+
"aria-autocomplete": "list",
|
|
442
|
+
role: "combobox",
|
|
443
|
+
autocomplete: "false",
|
|
444
|
+
onInput: _,
|
|
445
|
+
onKeydown: ge(ve(k, ["prevent"]), ["down", "up"])
|
|
446
|
+
}, {
|
|
447
|
+
default: r(() => [
|
|
448
|
+
f(d.$slots, "default")
|
|
449
|
+
]),
|
|
450
|
+
_: 3
|
|
451
|
+
}, 8, ["modelValue", "as", "as-child", "auto-focus", "aria-expanded", "aria-controls", "onKeydown"]));
|
|
452
|
+
}
|
|
453
|
+
}), Qe = /* @__PURE__ */ m({
|
|
454
|
+
__name: "ComboboxItem",
|
|
455
|
+
props: {
|
|
456
|
+
textValue: {},
|
|
457
|
+
value: {},
|
|
458
|
+
disabled: { type: Boolean },
|
|
459
|
+
asChild: { type: Boolean },
|
|
460
|
+
as: {}
|
|
461
|
+
},
|
|
462
|
+
emits: ["select"],
|
|
463
|
+
setup(l, { emit: n }) {
|
|
464
|
+
const t = l, a = n, o = A(void 0, "reka-combobox-item"), s = O(), i = ce(null), { primitiveElement: c, currentElement: y } = Z();
|
|
465
|
+
if (t.value === "")
|
|
466
|
+
throw new Error(
|
|
467
|
+
"A <ComboboxItem /> must have a value prop that is not an empty string. This is because the Combobox value can be set to an empty string to clear the selection and show the placeholder."
|
|
468
|
+
);
|
|
469
|
+
const k = P(() => {
|
|
470
|
+
if (s.isVirtual.value || s.ignoreFilter.value || !s.filterState.search)
|
|
471
|
+
return !0;
|
|
472
|
+
{
|
|
473
|
+
const _ = s.filterState.filtered.items.get(o);
|
|
474
|
+
return _ === void 0 ? !0 : _ > 0;
|
|
475
|
+
}
|
|
476
|
+
});
|
|
477
|
+
return R(() => {
|
|
478
|
+
var C;
|
|
479
|
+
s.allItems.value.set(o, t.textValue || y.value.textContent || y.value.innerText);
|
|
480
|
+
const _ = i == null ? void 0 : i.id;
|
|
481
|
+
_ && (s.allGroups.value.has(_) ? (C = s.allGroups.value.get(_)) == null || C.add(o) : s.allGroups.value.set(_, /* @__PURE__ */ new Set([o])));
|
|
482
|
+
}), Q(() => {
|
|
483
|
+
s.allItems.value.delete(o);
|
|
484
|
+
}), (_, C) => k.value ? (u(), p(e(Pe), v({ key: 0 }, t, {
|
|
485
|
+
id: e(o),
|
|
486
|
+
ref_key: "primitiveElement",
|
|
487
|
+
ref: c,
|
|
488
|
+
disabled: e(s).disabled.value || _.disabled,
|
|
489
|
+
onSelect: C[0] || (C[0] = (d) => {
|
|
490
|
+
a("select", d), !d.defaultPrevented && !e(s).multiple.value && !_.disabled && !e(s).disabled.value && (d.preventDefault(), e(s).onOpenChange(!1), e(s).modelValue.value = t.value);
|
|
491
|
+
})
|
|
492
|
+
}), {
|
|
493
|
+
default: r(() => [
|
|
494
|
+
f(_.$slots, "default", {}, () => [
|
|
495
|
+
q(ue(_.value), 1)
|
|
496
|
+
])
|
|
497
|
+
]),
|
|
498
|
+
_: 3
|
|
499
|
+
}, 16, ["id", "disabled"])) : K("", !0);
|
|
500
|
+
}
|
|
501
|
+
}), Xe = /* @__PURE__ */ m({
|
|
502
|
+
__name: "ListboxItemIndicator",
|
|
503
|
+
props: {
|
|
504
|
+
asChild: { type: Boolean },
|
|
505
|
+
as: { default: "span" }
|
|
506
|
+
},
|
|
507
|
+
setup(l) {
|
|
508
|
+
const n = l;
|
|
509
|
+
$();
|
|
510
|
+
const t = Fe();
|
|
511
|
+
return (a, o) => e(t).isSelected.value ? (u(), p(e(S), v({
|
|
512
|
+
key: 0,
|
|
513
|
+
"aria-hidden": "true"
|
|
514
|
+
}, n), {
|
|
515
|
+
default: r(() => [
|
|
516
|
+
f(a.$slots, "default")
|
|
517
|
+
]),
|
|
518
|
+
_: 3
|
|
519
|
+
}, 16)) : K("", !0);
|
|
520
|
+
}
|
|
521
|
+
}), xt = /* @__PURE__ */ m({
|
|
522
|
+
__name: "ComboboxItemIndicator",
|
|
523
|
+
props: {
|
|
524
|
+
asChild: { type: Boolean },
|
|
525
|
+
as: { default: "span" }
|
|
526
|
+
},
|
|
527
|
+
setup(l) {
|
|
528
|
+
const n = l;
|
|
529
|
+
return (t, a) => (u(), p(e(Xe), U(X(n)), {
|
|
530
|
+
default: r(() => [
|
|
531
|
+
f(t.$slots, "default")
|
|
532
|
+
]),
|
|
533
|
+
_: 3
|
|
534
|
+
}, 16));
|
|
535
|
+
}
|
|
536
|
+
}), Ye = /* @__PURE__ */ m({
|
|
537
|
+
__name: "ComboboxLabel",
|
|
538
|
+
props: {
|
|
539
|
+
for: {},
|
|
540
|
+
asChild: { type: Boolean },
|
|
541
|
+
as: { default: "div" }
|
|
542
|
+
},
|
|
543
|
+
setup(l) {
|
|
544
|
+
const n = l;
|
|
545
|
+
$();
|
|
546
|
+
const t = ce({ id: "", labelId: "" });
|
|
547
|
+
return t.labelId || (t.labelId = A(void 0, "reka-combobox-group-label")), (a, o) => (u(), p(e(S), v(n, {
|
|
548
|
+
id: e(t).labelId
|
|
549
|
+
}), {
|
|
550
|
+
default: r(() => [
|
|
551
|
+
f(a.$slots, "default")
|
|
552
|
+
]),
|
|
553
|
+
_: 3
|
|
554
|
+
}, 16, ["id"]));
|
|
555
|
+
}
|
|
556
|
+
}), Ze = /* @__PURE__ */ m({
|
|
557
|
+
__name: "ComboboxPortal",
|
|
558
|
+
props: {
|
|
559
|
+
to: {},
|
|
560
|
+
disabled: { type: Boolean },
|
|
561
|
+
defer: { type: Boolean },
|
|
562
|
+
forceMount: { type: Boolean }
|
|
563
|
+
},
|
|
564
|
+
setup(l) {
|
|
565
|
+
const n = l;
|
|
566
|
+
return (t, a) => (u(), p(e(De), U(X(n)), {
|
|
567
|
+
default: r(() => [
|
|
568
|
+
f(t.$slots, "default")
|
|
569
|
+
]),
|
|
570
|
+
_: 3
|
|
571
|
+
}, 16));
|
|
572
|
+
}
|
|
573
|
+
}), et = /* @__PURE__ */ m({
|
|
574
|
+
__name: "ComboboxSeparator",
|
|
575
|
+
props: {
|
|
576
|
+
asChild: { type: Boolean },
|
|
577
|
+
as: {}
|
|
578
|
+
},
|
|
579
|
+
setup(l) {
|
|
580
|
+
const n = l;
|
|
581
|
+
return $(), (t, a) => (u(), p(e(S), v(n, { "aria-hidden": "true" }), {
|
|
582
|
+
default: r(() => [
|
|
583
|
+
f(t.$slots, "default")
|
|
584
|
+
]),
|
|
585
|
+
_: 3
|
|
586
|
+
}, 16));
|
|
587
|
+
}
|
|
588
|
+
}), Bt = /* @__PURE__ */ m({
|
|
589
|
+
__name: "ComboboxTrigger",
|
|
590
|
+
props: {
|
|
591
|
+
disabled: { type: Boolean },
|
|
592
|
+
asChild: { type: Boolean },
|
|
593
|
+
as: { default: "button" }
|
|
594
|
+
},
|
|
595
|
+
setup(l) {
|
|
596
|
+
const n = l, { forwardRef: t, currentElement: a } = $(), o = O(), s = P(() => n.disabled || o.disabled.value || !1);
|
|
597
|
+
return R(() => {
|
|
598
|
+
a.value && o.onTriggerElementChange(a.value);
|
|
599
|
+
}), (i, c) => (u(), p(e(S), v(n, {
|
|
600
|
+
ref: e(t),
|
|
601
|
+
type: i.as === "button" ? "button" : void 0,
|
|
602
|
+
tabindex: "-1",
|
|
603
|
+
"aria-label": "Show popup",
|
|
604
|
+
"aria-haspopup": "listbox",
|
|
605
|
+
"aria-expanded": e(o).open.value,
|
|
606
|
+
"aria-controls": e(o).contentId,
|
|
607
|
+
"data-state": e(o).open.value ? "open" : "closed",
|
|
608
|
+
disabled: s.value,
|
|
609
|
+
"data-disabled": s.value ? "" : void 0,
|
|
610
|
+
"aria-disabled": s.value ?? void 0,
|
|
611
|
+
onClick: c[0] || (c[0] = (y) => e(o).onOpenChange(!e(o).open.value))
|
|
612
|
+
}), {
|
|
613
|
+
default: r(() => [
|
|
614
|
+
f(i.$slots, "default")
|
|
615
|
+
]),
|
|
616
|
+
_: 3
|
|
617
|
+
}, 16, ["type", "aria-expanded", "aria-controls", "data-state", "disabled", "data-disabled", "aria-disabled"]));
|
|
618
|
+
}
|
|
619
|
+
}), tt = /* @__PURE__ */ m({
|
|
620
|
+
__name: "ComboboxViewport",
|
|
621
|
+
props: {
|
|
622
|
+
nonce: {},
|
|
623
|
+
asChild: { type: Boolean },
|
|
624
|
+
as: {}
|
|
625
|
+
},
|
|
626
|
+
setup(l) {
|
|
627
|
+
const n = l, { forwardRef: t } = $(), { nonce: a } = J(n), o = Ge(a), s = O();
|
|
628
|
+
return (i, c) => (u(), ye(_e, null, [
|
|
629
|
+
I(e(S), v({ ...i.$attrs, ...n }, {
|
|
630
|
+
ref: e(t),
|
|
631
|
+
"data-reka-combobox-viewport": "",
|
|
632
|
+
role: "presentation",
|
|
633
|
+
style: {
|
|
634
|
+
// we use position: 'relative' here on the `viewport` so that when we call
|
|
635
|
+
// `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
|
|
636
|
+
// (independent of the scrollUpButton).
|
|
637
|
+
position: "relative",
|
|
638
|
+
flex: e(s).isVirtual.value ? void 0 : 1,
|
|
639
|
+
overflow: "auto"
|
|
640
|
+
}
|
|
641
|
+
}), {
|
|
642
|
+
default: r(() => [
|
|
643
|
+
f(i.$slots, "default")
|
|
644
|
+
]),
|
|
645
|
+
_: 3
|
|
646
|
+
}, 16, ["style"]),
|
|
647
|
+
I(e(S), {
|
|
648
|
+
as: "style",
|
|
649
|
+
nonce: e(o)
|
|
650
|
+
}, {
|
|
651
|
+
default: r(() => c[0] || (c[0] = [
|
|
652
|
+
q(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-combobox-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-combobox-viewport]::-webkit-scrollbar { display: none; } ")
|
|
653
|
+
])),
|
|
654
|
+
_: 1
|
|
655
|
+
}, 8, ["nonce"])
|
|
656
|
+
], 64));
|
|
657
|
+
}
|
|
658
|
+
}), wt = /* @__PURE__ */ m({
|
|
659
|
+
__name: "Combobox",
|
|
660
|
+
props: {
|
|
661
|
+
open: { type: Boolean },
|
|
662
|
+
defaultOpen: { type: Boolean },
|
|
663
|
+
resetSearchTermOnBlur: { type: Boolean },
|
|
664
|
+
resetSearchTermOnSelect: { type: Boolean },
|
|
665
|
+
ignoreFilter: { type: Boolean },
|
|
666
|
+
modelValue: {},
|
|
667
|
+
defaultValue: {},
|
|
668
|
+
multiple: { type: Boolean },
|
|
669
|
+
dir: {},
|
|
670
|
+
disabled: { type: Boolean },
|
|
671
|
+
highlightOnHover: { type: Boolean },
|
|
672
|
+
by: { type: [String, Function] },
|
|
673
|
+
asChild: { type: Boolean },
|
|
674
|
+
as: { type: [String, Object, Function] },
|
|
675
|
+
name: {},
|
|
676
|
+
required: { type: Boolean }
|
|
677
|
+
},
|
|
678
|
+
emits: ["update:modelValue", "highlight", "update:open"],
|
|
679
|
+
setup(l, { emit: n }) {
|
|
680
|
+
const o = j(l, n);
|
|
681
|
+
return (s, i) => (u(), p(e(Ke), U(X(e(o))), {
|
|
682
|
+
default: r(() => [
|
|
683
|
+
f(s.$slots, "default")
|
|
684
|
+
]),
|
|
685
|
+
_: 3
|
|
686
|
+
}, 16));
|
|
687
|
+
}
|
|
688
|
+
}), St = /* @__PURE__ */ m({
|
|
689
|
+
__name: "ComboboxAnchor",
|
|
690
|
+
props: {
|
|
691
|
+
reference: {},
|
|
692
|
+
asChild: { type: Boolean },
|
|
693
|
+
as: { type: [String, Object, Function] },
|
|
694
|
+
class: {}
|
|
695
|
+
},
|
|
696
|
+
setup(l) {
|
|
697
|
+
const n = l, t = D(n, "class"), a = pe(t);
|
|
698
|
+
return (o, s) => (u(), p(e(ze), v(e(a), {
|
|
699
|
+
class: e(F)("w-[200px]", n.class)
|
|
700
|
+
}), {
|
|
701
|
+
default: r(() => [
|
|
702
|
+
f(o.$slots, "default")
|
|
703
|
+
]),
|
|
704
|
+
_: 3
|
|
705
|
+
}, 16, ["class"]));
|
|
706
|
+
}
|
|
707
|
+
}), $t = /* @__PURE__ */ m({
|
|
708
|
+
__name: "ComboboxEmpty",
|
|
709
|
+
props: {
|
|
710
|
+
asChild: { type: Boolean },
|
|
711
|
+
as: { type: [String, Object, Function] },
|
|
712
|
+
class: {}
|
|
713
|
+
},
|
|
714
|
+
setup(l) {
|
|
715
|
+
const n = l, t = D(n, "class");
|
|
716
|
+
return (a, o) => (u(), p(e(He), v(e(t), {
|
|
717
|
+
class: e(F)("py-6 text-center text-sm", n.class)
|
|
718
|
+
}), {
|
|
719
|
+
default: r(() => [
|
|
720
|
+
f(a.$slots, "default")
|
|
721
|
+
]),
|
|
722
|
+
_: 3
|
|
723
|
+
}, 16, ["class"]));
|
|
724
|
+
}
|
|
725
|
+
}), Ot = /* @__PURE__ */ m({
|
|
726
|
+
__name: "ComboboxGroup",
|
|
727
|
+
props: {
|
|
728
|
+
asChild: { type: Boolean },
|
|
729
|
+
as: { type: [String, Object, Function] },
|
|
730
|
+
class: {},
|
|
731
|
+
heading: {}
|
|
732
|
+
},
|
|
733
|
+
setup(l) {
|
|
734
|
+
const n = l, t = D(n, "class");
|
|
735
|
+
return (a, o) => (u(), p(e(We), v(e(t), {
|
|
736
|
+
class: e(F)("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", n.class)
|
|
737
|
+
}), {
|
|
738
|
+
default: r(() => [
|
|
739
|
+
a.heading ? (u(), p(e(Ye), {
|
|
740
|
+
key: 0,
|
|
741
|
+
class: "px-2 py-1.5 text-xs font-medium text-muted-foreground"
|
|
742
|
+
}, {
|
|
743
|
+
default: r(() => [
|
|
744
|
+
q(ue(a.heading), 1)
|
|
745
|
+
]),
|
|
746
|
+
_: 1
|
|
747
|
+
})) : K("", !0),
|
|
748
|
+
f(a.$slots, "default")
|
|
749
|
+
]),
|
|
750
|
+
_: 3
|
|
751
|
+
}, 16, ["class"]));
|
|
752
|
+
}
|
|
753
|
+
}), It = /* @__PURE__ */ m({
|
|
754
|
+
__name: "ComboboxInput",
|
|
755
|
+
props: {
|
|
756
|
+
displayValue: { type: Function },
|
|
757
|
+
modelValue: {},
|
|
758
|
+
autoFocus: { type: Boolean },
|
|
759
|
+
disabled: { type: Boolean },
|
|
760
|
+
asChild: { type: Boolean },
|
|
761
|
+
as: { type: [String, Object, Function] },
|
|
762
|
+
class: {}
|
|
763
|
+
},
|
|
764
|
+
emits: ["update:modelValue"],
|
|
765
|
+
setup(l, { emit: n }) {
|
|
766
|
+
const t = l, a = n, o = D(t, "class"), s = j(o, a);
|
|
767
|
+
return (i, c) => (u(), p(e(Je), v(e(s), {
|
|
768
|
+
class: e(F)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50", t.class)
|
|
769
|
+
}), {
|
|
770
|
+
default: r(() => [
|
|
771
|
+
f(i.$slots, "default")
|
|
772
|
+
]),
|
|
773
|
+
_: 3
|
|
774
|
+
}, 16, ["class"]));
|
|
775
|
+
}
|
|
776
|
+
}), kt = /* @__PURE__ */ m({
|
|
777
|
+
__name: "ComboboxItem",
|
|
778
|
+
props: {
|
|
779
|
+
textValue: {},
|
|
780
|
+
value: {},
|
|
781
|
+
disabled: { type: Boolean },
|
|
782
|
+
asChild: { type: Boolean },
|
|
783
|
+
as: { type: [String, Object, Function] },
|
|
784
|
+
class: {}
|
|
785
|
+
},
|
|
786
|
+
emits: ["select"],
|
|
787
|
+
setup(l, { emit: n }) {
|
|
788
|
+
const t = l, a = n, o = D(t, "class"), s = j(o, a);
|
|
789
|
+
return (i, c) => (u(), p(e(Qe), v(e(s), {
|
|
790
|
+
class: e(F)("relative flex cursor-default gap-2 select-none justify-between items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0", t.class)
|
|
791
|
+
}), {
|
|
792
|
+
default: r(() => [
|
|
793
|
+
f(i.$slots, "default")
|
|
794
|
+
]),
|
|
795
|
+
_: 3
|
|
796
|
+
}, 16, ["class"]));
|
|
797
|
+
}
|
|
798
|
+
}), Vt = /* @__PURE__ */ m({
|
|
799
|
+
__name: "ComboboxList",
|
|
800
|
+
props: {
|
|
801
|
+
forceMount: { type: Boolean },
|
|
802
|
+
position: { default: "popper" },
|
|
803
|
+
bodyLock: { type: Boolean },
|
|
804
|
+
side: {},
|
|
805
|
+
sideOffset: { default: 4 },
|
|
806
|
+
align: { default: "center" },
|
|
807
|
+
alignOffset: {},
|
|
808
|
+
avoidCollisions: { type: Boolean },
|
|
809
|
+
collisionBoundary: {},
|
|
810
|
+
collisionPadding: {},
|
|
811
|
+
arrowPadding: {},
|
|
812
|
+
sticky: {},
|
|
813
|
+
hideWhenDetached: { type: Boolean },
|
|
814
|
+
positionStrategy: {},
|
|
815
|
+
updatePositionStrategy: {},
|
|
816
|
+
disableUpdateOnLayoutShift: { type: Boolean },
|
|
817
|
+
prioritizePosition: { type: Boolean },
|
|
818
|
+
reference: {},
|
|
819
|
+
asChild: { type: Boolean },
|
|
820
|
+
as: {},
|
|
821
|
+
disableOutsidePointerEvents: { type: Boolean },
|
|
822
|
+
class: {}
|
|
823
|
+
},
|
|
824
|
+
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside"],
|
|
825
|
+
setup(l, { emit: n }) {
|
|
826
|
+
const t = l, a = n, o = D(t, "class"), s = j(o, a);
|
|
827
|
+
return (i, c) => (u(), p(e(Ze), null, {
|
|
828
|
+
default: r(() => [
|
|
829
|
+
I(e(Ae), v(e(s), {
|
|
830
|
+
class: e(F)("z-50 w-[200px] rounded-md border bg-popover text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", t.class)
|
|
831
|
+
}), {
|
|
832
|
+
default: r(() => [
|
|
833
|
+
I(e(tt), null, {
|
|
834
|
+
default: r(() => [
|
|
835
|
+
f(i.$slots, "default")
|
|
836
|
+
]),
|
|
837
|
+
_: 3
|
|
838
|
+
})
|
|
839
|
+
]),
|
|
840
|
+
_: 3
|
|
841
|
+
}, 16, ["class"])
|
|
842
|
+
]),
|
|
843
|
+
_: 3
|
|
844
|
+
}));
|
|
845
|
+
}
|
|
846
|
+
}), Et = /* @__PURE__ */ m({
|
|
847
|
+
__name: "ComboboxSeparator",
|
|
848
|
+
props: {
|
|
849
|
+
asChild: { type: Boolean },
|
|
850
|
+
as: { type: [String, Object, Function] },
|
|
851
|
+
class: {}
|
|
852
|
+
},
|
|
853
|
+
setup(l) {
|
|
854
|
+
const n = l, t = D(n, "class");
|
|
855
|
+
return (a, o) => (u(), p(e(et), v(e(t), {
|
|
856
|
+
class: e(F)("-mx-1 h-px bg-border", n.class)
|
|
857
|
+
}), {
|
|
858
|
+
default: r(() => [
|
|
859
|
+
f(a.$slots, "default")
|
|
860
|
+
]),
|
|
861
|
+
_: 3
|
|
862
|
+
}, 16, ["class"]));
|
|
863
|
+
}
|
|
864
|
+
});
|
|
865
|
+
export {
|
|
866
|
+
wt as Combobox,
|
|
867
|
+
St as ComboboxAnchor,
|
|
868
|
+
Ct as ComboboxCancel,
|
|
869
|
+
$t as ComboboxEmpty,
|
|
870
|
+
Ot as ComboboxGroup,
|
|
871
|
+
It as ComboboxInput,
|
|
872
|
+
kt as ComboboxItem,
|
|
873
|
+
xt as ComboboxItemIndicator,
|
|
874
|
+
Vt as ComboboxList,
|
|
875
|
+
Et as ComboboxSeparator,
|
|
876
|
+
Bt as ComboboxTrigger
|
|
877
|
+
};
|