@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,68 @@
|
|
|
1
|
+
import { defineComponent as r, createElementBlock as t, openBlock as c, normalizeClass as n, unref as o, renderSlot as l } from "vue";
|
|
2
|
+
import { c as p } from "./utils-SFgRDk1R.js";
|
|
3
|
+
const m = /* @__PURE__ */ r({
|
|
4
|
+
__name: "Card",
|
|
5
|
+
props: {
|
|
6
|
+
class: {}
|
|
7
|
+
},
|
|
8
|
+
setup(s) {
|
|
9
|
+
const e = s;
|
|
10
|
+
return (a, d) => (c(), t("div", {
|
|
11
|
+
class: n(
|
|
12
|
+
o(p)(
|
|
13
|
+
"rounded-lg border bg-card text-card-foreground shadow-sm",
|
|
14
|
+
e.class
|
|
15
|
+
)
|
|
16
|
+
)
|
|
17
|
+
}, [
|
|
18
|
+
l(a.$slots, "default")
|
|
19
|
+
], 2));
|
|
20
|
+
}
|
|
21
|
+
}), f = /* @__PURE__ */ r({
|
|
22
|
+
__name: "CardContent",
|
|
23
|
+
props: {
|
|
24
|
+
class: {}
|
|
25
|
+
},
|
|
26
|
+
setup(s) {
|
|
27
|
+
const e = s;
|
|
28
|
+
return (a, d) => (c(), t("div", {
|
|
29
|
+
class: n(o(p)("p-6 pt-0", e.class))
|
|
30
|
+
}, [
|
|
31
|
+
l(a.$slots, "default")
|
|
32
|
+
], 2));
|
|
33
|
+
}
|
|
34
|
+
}), i = /* @__PURE__ */ r({
|
|
35
|
+
__name: "CardHeader",
|
|
36
|
+
props: {
|
|
37
|
+
class: {}
|
|
38
|
+
},
|
|
39
|
+
setup(s) {
|
|
40
|
+
const e = s;
|
|
41
|
+
return (a, d) => (c(), t("div", {
|
|
42
|
+
class: n(o(p)("flex flex-col gap-y-1.5 p-6", e.class))
|
|
43
|
+
}, [
|
|
44
|
+
l(a.$slots, "default")
|
|
45
|
+
], 2));
|
|
46
|
+
}
|
|
47
|
+
}), g = /* @__PURE__ */ r({
|
|
48
|
+
__name: "CardTitle",
|
|
49
|
+
props: {
|
|
50
|
+
class: {}
|
|
51
|
+
},
|
|
52
|
+
setup(s) {
|
|
53
|
+
const e = s;
|
|
54
|
+
return (a, d) => (c(), t("h3", {
|
|
55
|
+
class: n(
|
|
56
|
+
o(p)("text-2xl font-semibold leading-none tracking-tight", e.class)
|
|
57
|
+
)
|
|
58
|
+
}, [
|
|
59
|
+
l(a.$slots, "default")
|
|
60
|
+
], 2));
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
export {
|
|
64
|
+
m as _,
|
|
65
|
+
f as a,
|
|
66
|
+
i as b,
|
|
67
|
+
g as c
|
|
68
|
+
};
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { defineComponent as C, computed as h, createBlock as p, openBlock as v, resolveDynamicComponent as j, unref as e, mergeProps as k, withKeys as x, withModifiers as M, withCtx as u, renderSlot as V, createCommentVNode as I, createVNode as y } from "vue";
|
|
2
|
+
import { c as K } from "./utils-SFgRDk1R.js";
|
|
3
|
+
import { u as N } from "./useForwardPropsEmits-0XKBv1pB.js";
|
|
4
|
+
import { u as O } from "./index-BwPb_idr.js";
|
|
5
|
+
import { c as q } from "./createContext-CZEfaSVa.js";
|
|
6
|
+
import { u as $ } from "./useForwardExpose-DZT6mL_U.js";
|
|
7
|
+
import { i as B } from "./nullish-CjWwlQS3.js";
|
|
8
|
+
import { i as _ } from "./isValueEqualOrExist-BDSMUv8t.js";
|
|
9
|
+
import { u as A } from "./useFormControl-CFVC51Lp.js";
|
|
10
|
+
import { _ as D } from "./RovingFocusItem-s7Ug6oxb.js";
|
|
11
|
+
import { P as R } from "./Primitive-B3twiLO1.js";
|
|
12
|
+
import { _ as L } from "./VisuallyHiddenInput-DvJnsVHt.js";
|
|
13
|
+
import { i as T } from "./ohash.D__AXeF1-DX2n0b2C.js";
|
|
14
|
+
import { P as z } from "./Presence-CxfTrw6l.js";
|
|
15
|
+
import { C as H } from "./check-C2tzJ0Gk.js";
|
|
16
|
+
import { r as J } from "./index-OpE2oGce.js";
|
|
17
|
+
const [Q, pe] = q("CheckboxGroupRoot");
|
|
18
|
+
function b(l) {
|
|
19
|
+
return l === "indeterminate";
|
|
20
|
+
}
|
|
21
|
+
function S(l) {
|
|
22
|
+
return b(l) ? "indeterminate" : l ? "checked" : "unchecked";
|
|
23
|
+
}
|
|
24
|
+
const [U, W] = q("CheckboxRoot"), X = /* @__PURE__ */ C({
|
|
25
|
+
inheritAttrs: !1,
|
|
26
|
+
__name: "CheckboxRoot",
|
|
27
|
+
props: {
|
|
28
|
+
defaultValue: { type: [Boolean, String] },
|
|
29
|
+
modelValue: { type: [Boolean, String, null], default: void 0 },
|
|
30
|
+
disabled: { type: Boolean },
|
|
31
|
+
value: { default: "on" },
|
|
32
|
+
id: {},
|
|
33
|
+
asChild: { type: Boolean },
|
|
34
|
+
as: { default: "button" },
|
|
35
|
+
name: {},
|
|
36
|
+
required: { type: Boolean }
|
|
37
|
+
},
|
|
38
|
+
emits: ["update:modelValue"],
|
|
39
|
+
setup(l, { emit: n }) {
|
|
40
|
+
const t = l, r = n, { forwardRef: c, currentElement: m } = $(), o = Q(null), s = O(t, "modelValue", r, {
|
|
41
|
+
defaultValue: t.defaultValue,
|
|
42
|
+
passive: t.modelValue === void 0
|
|
43
|
+
}), d = h(() => (o == null ? void 0 : o.disabled.value) || t.disabled), i = h(() => B(o == null ? void 0 : o.modelValue.value) ? s.value === "indeterminate" ? "indeterminate" : s.value : _(o.modelValue.value, t.value));
|
|
44
|
+
function E() {
|
|
45
|
+
if (B(o == null ? void 0 : o.modelValue.value))
|
|
46
|
+
s.value = b(s.value) ? !0 : !s.value;
|
|
47
|
+
else {
|
|
48
|
+
const a = [...o.modelValue.value || []];
|
|
49
|
+
if (_(a, t.value)) {
|
|
50
|
+
const g = a.findIndex((f) => T(f, t.value));
|
|
51
|
+
a.splice(g, 1);
|
|
52
|
+
} else
|
|
53
|
+
a.push(t.value);
|
|
54
|
+
o.modelValue.value = a;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
const F = A(m), P = h(() => {
|
|
58
|
+
var a;
|
|
59
|
+
return t.id && m.value ? (a = document.querySelector(`[for="${t.id}"]`)) == null ? void 0 : a.innerText : void 0;
|
|
60
|
+
});
|
|
61
|
+
return W({
|
|
62
|
+
disabled: d,
|
|
63
|
+
state: i
|
|
64
|
+
}), (a, g) => {
|
|
65
|
+
var f, w;
|
|
66
|
+
return v(), p(j((f = e(o)) != null && f.rovingFocus.value ? e(D) : e(R)), k(a.$attrs, {
|
|
67
|
+
id: a.id,
|
|
68
|
+
ref: e(c),
|
|
69
|
+
role: "checkbox",
|
|
70
|
+
"as-child": a.asChild,
|
|
71
|
+
as: a.as,
|
|
72
|
+
type: a.as === "button" ? "button" : void 0,
|
|
73
|
+
"aria-checked": e(b)(i.value) ? "mixed" : i.value,
|
|
74
|
+
"aria-required": a.required,
|
|
75
|
+
"aria-label": a.$attrs["aria-label"] || P.value,
|
|
76
|
+
"data-state": e(S)(i.value),
|
|
77
|
+
"data-disabled": d.value ? "" : void 0,
|
|
78
|
+
disabled: d.value,
|
|
79
|
+
focusable: (w = e(o)) != null && w.rovingFocus.value ? !d.value : void 0,
|
|
80
|
+
onKeydown: x(M(() => {
|
|
81
|
+
}, ["prevent"]), ["enter"]),
|
|
82
|
+
onClick: E
|
|
83
|
+
}), {
|
|
84
|
+
default: u(() => [
|
|
85
|
+
V(a.$slots, "default", {
|
|
86
|
+
modelValue: e(s),
|
|
87
|
+
state: i.value
|
|
88
|
+
}),
|
|
89
|
+
e(F) && a.name && !e(o) ? (v(), p(e(L), {
|
|
90
|
+
key: 0,
|
|
91
|
+
type: "checkbox",
|
|
92
|
+
checked: !!i.value,
|
|
93
|
+
name: a.name,
|
|
94
|
+
value: a.value,
|
|
95
|
+
disabled: d.value,
|
|
96
|
+
required: a.required
|
|
97
|
+
}, null, 8, ["checked", "name", "value", "disabled", "required"])) : I("", !0)
|
|
98
|
+
]),
|
|
99
|
+
_: 3
|
|
100
|
+
}, 16, ["id", "as-child", "as", "type", "aria-checked", "aria-required", "aria-label", "data-state", "data-disabled", "disabled", "focusable", "onKeydown"]);
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
}), Y = /* @__PURE__ */ C({
|
|
104
|
+
__name: "CheckboxIndicator",
|
|
105
|
+
props: {
|
|
106
|
+
forceMount: { type: Boolean },
|
|
107
|
+
asChild: { type: Boolean },
|
|
108
|
+
as: { default: "span" }
|
|
109
|
+
},
|
|
110
|
+
setup(l) {
|
|
111
|
+
const { forwardRef: n } = $(), t = U();
|
|
112
|
+
return (r, c) => (v(), p(e(z), {
|
|
113
|
+
present: r.forceMount || e(b)(e(t).state.value) || e(t).state.value === !0
|
|
114
|
+
}, {
|
|
115
|
+
default: u(() => [
|
|
116
|
+
y(e(R), k({
|
|
117
|
+
ref: e(n),
|
|
118
|
+
"data-state": e(S)(e(t).state.value),
|
|
119
|
+
"data-disabled": e(t).disabled.value ? "" : void 0,
|
|
120
|
+
style: { pointerEvents: "none" },
|
|
121
|
+
"as-child": r.asChild,
|
|
122
|
+
as: r.as
|
|
123
|
+
}, r.$attrs), {
|
|
124
|
+
default: u(() => [
|
|
125
|
+
V(r.$slots, "default")
|
|
126
|
+
]),
|
|
127
|
+
_: 3
|
|
128
|
+
}, 16, ["data-state", "data-disabled", "as-child", "as"])
|
|
129
|
+
]),
|
|
130
|
+
_: 3
|
|
131
|
+
}, 8, ["present"]));
|
|
132
|
+
}
|
|
133
|
+
}), ve = /* @__PURE__ */ C({
|
|
134
|
+
__name: "Checkbox",
|
|
135
|
+
props: {
|
|
136
|
+
defaultValue: { type: [Boolean, String] },
|
|
137
|
+
modelValue: { type: [Boolean, String, null] },
|
|
138
|
+
disabled: { type: Boolean },
|
|
139
|
+
value: {},
|
|
140
|
+
id: {},
|
|
141
|
+
asChild: { type: Boolean },
|
|
142
|
+
as: { type: [String, Object, Function] },
|
|
143
|
+
name: {},
|
|
144
|
+
required: { type: Boolean },
|
|
145
|
+
class: {}
|
|
146
|
+
},
|
|
147
|
+
emits: ["update:modelValue"],
|
|
148
|
+
setup(l, { emit: n }) {
|
|
149
|
+
const t = l, r = n, c = J(t, "class"), m = N(c, r);
|
|
150
|
+
return (o, s) => (v(), p(e(X), k(e(m), {
|
|
151
|
+
class: e(K)(
|
|
152
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
153
|
+
t.class
|
|
154
|
+
)
|
|
155
|
+
}), {
|
|
156
|
+
default: u(() => [
|
|
157
|
+
y(e(Y), { class: "flex h-full w-full items-center justify-center text-current" }, {
|
|
158
|
+
default: u(() => [
|
|
159
|
+
V(o.$slots, "default", {}, () => [
|
|
160
|
+
y(e(H), { class: "h-4 w-4" })
|
|
161
|
+
])
|
|
162
|
+
]),
|
|
163
|
+
_: 3
|
|
164
|
+
})
|
|
165
|
+
]),
|
|
166
|
+
_: 3
|
|
167
|
+
}, 16, ["class"]));
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
export {
|
|
171
|
+
ve as _
|
|
172
|
+
};
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { defineComponent as b, toRefs as x, createBlock as y, openBlock as C, unref as e, withCtx as m, renderSlot as _, ref as u, computed as w, watch as P, nextTick as A, onMounted as D, createVNode as F, mergeProps as I, createCommentVNode as M } from "vue";
|
|
2
|
+
import { u as T, e as H } from "./index-BwPb_idr.js";
|
|
3
|
+
import { u as V } from "./useId-reAg216X.js";
|
|
4
|
+
import { u as g } from "./useForwardExpose-DZT6mL_U.js";
|
|
5
|
+
import { P as E } from "./Presence-CxfTrw6l.js";
|
|
6
|
+
import { P as k } from "./Primitive-B3twiLO1.js";
|
|
7
|
+
import { c as q } from "./createContext-CZEfaSVa.js";
|
|
8
|
+
const [$, S] = q("CollapsibleRoot"), U = /* @__PURE__ */ b({
|
|
9
|
+
__name: "CollapsibleRoot",
|
|
10
|
+
props: {
|
|
11
|
+
defaultOpen: { type: Boolean, default: !1 },
|
|
12
|
+
open: { type: Boolean, default: void 0 },
|
|
13
|
+
disabled: { type: Boolean },
|
|
14
|
+
unmountOnHide: { type: Boolean, default: !0 },
|
|
15
|
+
asChild: { type: Boolean },
|
|
16
|
+
as: {}
|
|
17
|
+
},
|
|
18
|
+
emits: ["update:open"],
|
|
19
|
+
setup(l, { expose: d, emit: s }) {
|
|
20
|
+
const n = l, o = T(n, "open", s, {
|
|
21
|
+
defaultValue: n.defaultOpen,
|
|
22
|
+
passive: n.open === void 0
|
|
23
|
+
}), { disabled: i, unmountOnHide: p } = x(n);
|
|
24
|
+
return S({
|
|
25
|
+
contentId: "",
|
|
26
|
+
disabled: i,
|
|
27
|
+
open: o,
|
|
28
|
+
unmountOnHide: p,
|
|
29
|
+
onOpenToggle: () => {
|
|
30
|
+
i.value || (o.value = !o.value);
|
|
31
|
+
}
|
|
32
|
+
}), d({ open: o }), g(), (r, f) => (C(), y(e(k), {
|
|
33
|
+
as: r.as,
|
|
34
|
+
"as-child": n.asChild,
|
|
35
|
+
"data-state": e(o) ? "open" : "closed",
|
|
36
|
+
"data-disabled": e(i) ? "" : void 0
|
|
37
|
+
}, {
|
|
38
|
+
default: m(() => [
|
|
39
|
+
_(r.$slots, "default", { open: e(o) })
|
|
40
|
+
]),
|
|
41
|
+
_: 3
|
|
42
|
+
}, 8, ["as", "as-child", "data-state", "data-disabled"]));
|
|
43
|
+
}
|
|
44
|
+
}), W = /* @__PURE__ */ b({
|
|
45
|
+
inheritAttrs: !1,
|
|
46
|
+
__name: "CollapsibleContent",
|
|
47
|
+
props: {
|
|
48
|
+
forceMount: { type: Boolean },
|
|
49
|
+
asChild: { type: Boolean },
|
|
50
|
+
as: {}
|
|
51
|
+
},
|
|
52
|
+
emits: ["contentFound"],
|
|
53
|
+
setup(l, { emit: d }) {
|
|
54
|
+
const s = l, n = d, a = $();
|
|
55
|
+
a.contentId || (a.contentId = V(void 0, "reka-collapsible-content"));
|
|
56
|
+
const o = u(), { forwardRef: i, currentElement: p } = g(), r = u(0), f = u(0), B = w(() => a.open.value), v = u(B.value), c = u();
|
|
57
|
+
P(
|
|
58
|
+
() => {
|
|
59
|
+
var t;
|
|
60
|
+
return [B.value, (t = o.value) == null ? void 0 : t.present];
|
|
61
|
+
},
|
|
62
|
+
async () => {
|
|
63
|
+
await A();
|
|
64
|
+
const t = p.value;
|
|
65
|
+
if (!t)
|
|
66
|
+
return;
|
|
67
|
+
c.value = c.value || {
|
|
68
|
+
transitionDuration: t.style.transitionDuration,
|
|
69
|
+
animationName: t.style.animationName
|
|
70
|
+
}, t.style.transitionDuration = "0s", t.style.animationName = "none";
|
|
71
|
+
const h = t.getBoundingClientRect();
|
|
72
|
+
f.value = h.height, r.value = h.width, v.value || (t.style.transitionDuration = c.value.transitionDuration, t.style.animationName = c.value.animationName);
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
immediate: !0
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
const N = w(() => v.value && a.open.value);
|
|
79
|
+
return D(() => {
|
|
80
|
+
requestAnimationFrame(() => {
|
|
81
|
+
v.value = !1;
|
|
82
|
+
});
|
|
83
|
+
}), H(p, "beforematch", (t) => {
|
|
84
|
+
requestAnimationFrame(() => {
|
|
85
|
+
a.onOpenToggle(), n("contentFound");
|
|
86
|
+
});
|
|
87
|
+
}), (t, h) => (C(), y(e(E), {
|
|
88
|
+
ref_key: "presentRef",
|
|
89
|
+
ref: o,
|
|
90
|
+
present: t.forceMount || e(a).open.value,
|
|
91
|
+
"force-mount": !0
|
|
92
|
+
}, {
|
|
93
|
+
default: m(({ present: O }) => {
|
|
94
|
+
var R;
|
|
95
|
+
return [
|
|
96
|
+
F(e(k), I(t.$attrs, {
|
|
97
|
+
id: e(a).contentId,
|
|
98
|
+
ref: e(i),
|
|
99
|
+
"as-child": s.asChild,
|
|
100
|
+
as: t.as,
|
|
101
|
+
hidden: O ? void 0 : e(a).unmountOnHide.value ? "" : "until-found",
|
|
102
|
+
"data-state": N.value ? void 0 : e(a).open.value ? "open" : "closed",
|
|
103
|
+
"data-disabled": (R = e(a).disabled) != null && R.value ? "" : void 0,
|
|
104
|
+
style: {
|
|
105
|
+
"--reka-collapsible-content-height": `${f.value}px`,
|
|
106
|
+
"--reka-collapsible-content-width": `${r.value}px`
|
|
107
|
+
}
|
|
108
|
+
}), {
|
|
109
|
+
default: m(() => [
|
|
110
|
+
!e(a).unmountOnHide.value || O ? _(t.$slots, "default", { key: 0 }) : M("", !0)
|
|
111
|
+
]),
|
|
112
|
+
_: 2
|
|
113
|
+
}, 1040, ["id", "as-child", "as", "hidden", "data-state", "data-disabled", "style"])
|
|
114
|
+
];
|
|
115
|
+
}),
|
|
116
|
+
_: 3
|
|
117
|
+
}, 8, ["present"]));
|
|
118
|
+
}
|
|
119
|
+
}), X = /* @__PURE__ */ b({
|
|
120
|
+
__name: "CollapsibleTrigger",
|
|
121
|
+
props: {
|
|
122
|
+
asChild: { type: Boolean },
|
|
123
|
+
as: { default: "button" }
|
|
124
|
+
},
|
|
125
|
+
setup(l) {
|
|
126
|
+
const d = l;
|
|
127
|
+
g();
|
|
128
|
+
const s = $();
|
|
129
|
+
return (n, a) => {
|
|
130
|
+
var o, i;
|
|
131
|
+
return C(), y(e(k), {
|
|
132
|
+
type: n.as === "button" ? "button" : void 0,
|
|
133
|
+
as: n.as,
|
|
134
|
+
"as-child": d.asChild,
|
|
135
|
+
"aria-controls": e(s).contentId,
|
|
136
|
+
"aria-expanded": e(s).open.value,
|
|
137
|
+
"data-state": e(s).open.value ? "open" : "closed",
|
|
138
|
+
"data-disabled": (o = e(s).disabled) != null && o.value ? "" : void 0,
|
|
139
|
+
disabled: (i = e(s).disabled) == null ? void 0 : i.value,
|
|
140
|
+
onClick: e(s).onOpenToggle
|
|
141
|
+
}, {
|
|
142
|
+
default: m(() => [
|
|
143
|
+
_(n.$slots, "default")
|
|
144
|
+
]),
|
|
145
|
+
_: 3
|
|
146
|
+
}, 8, ["type", "as", "as-child", "aria-controls", "aria-expanded", "data-state", "data-disabled", "disabled", "onClick"]);
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
export {
|
|
151
|
+
U as _,
|
|
152
|
+
W as a,
|
|
153
|
+
X as b
|
|
154
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ref as s, provide as h, inject as k, defineComponent as m, watch as w, h as u, watchEffect as x, markRaw as T, computed as f } from "vue";
|
|
2
|
+
import { u as v } from "./usePrimitiveElement-BjwUvHih.js";
|
|
3
|
+
import { S as p } from "./Primitive-B3twiLO1.js";
|
|
4
|
+
const d = "data-reka-collection-item";
|
|
5
|
+
function z(M = {}) {
|
|
6
|
+
const { key: A = "", isProvider: y = !1 } = M, c = `${A}CollectionProvider`;
|
|
7
|
+
let e;
|
|
8
|
+
if (y) {
|
|
9
|
+
const o = s(/* @__PURE__ */ new Map());
|
|
10
|
+
e = {
|
|
11
|
+
collectionRef: s(),
|
|
12
|
+
itemMap: o
|
|
13
|
+
}, h(c, e);
|
|
14
|
+
} else
|
|
15
|
+
e = k(c);
|
|
16
|
+
const C = (o = !1) => {
|
|
17
|
+
const t = e.collectionRef.value;
|
|
18
|
+
if (!t)
|
|
19
|
+
return [];
|
|
20
|
+
const r = Array.from(t.querySelectorAll(`[${d}]`)), l = Array.from(e.itemMap.value.values()).sort(
|
|
21
|
+
(n, a) => r.indexOf(n.ref) - r.indexOf(a.ref)
|
|
22
|
+
);
|
|
23
|
+
return o ? l : l.filter((n) => n.ref.dataset.disabled !== "");
|
|
24
|
+
}, E = m({
|
|
25
|
+
name: "CollectionSlot",
|
|
26
|
+
setup(o, { slots: t }) {
|
|
27
|
+
const { primitiveElement: r, currentElement: i } = v();
|
|
28
|
+
return w(i, () => {
|
|
29
|
+
e.collectionRef.value = i.value;
|
|
30
|
+
}), () => u(p, { ref: r }, t);
|
|
31
|
+
}
|
|
32
|
+
}), I = m({
|
|
33
|
+
name: "CollectionItem",
|
|
34
|
+
inheritAttrs: !1,
|
|
35
|
+
props: {
|
|
36
|
+
value: {
|
|
37
|
+
// It accepts any value
|
|
38
|
+
validator: () => !0
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
setup(o, { slots: t, attrs: r }) {
|
|
42
|
+
const { primitiveElement: i, currentElement: l } = v();
|
|
43
|
+
return x((n) => {
|
|
44
|
+
if (l.value) {
|
|
45
|
+
const a = T(l.value);
|
|
46
|
+
e.itemMap.value.set(a, { ref: l.value, value: o.value }), n(() => e.itemMap.value.delete(a));
|
|
47
|
+
}
|
|
48
|
+
}), () => u(p, { ...r, [d]: "", ref: i }, t);
|
|
49
|
+
}
|
|
50
|
+
}), R = f(() => Array.from(e.itemMap.value.values())), S = f(() => e.itemMap.value.size);
|
|
51
|
+
return { getItems: C, reactiveItems: R, itemMapSize: S, CollectionSlot: E, CollectionItem: I };
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
z as u
|
|
55
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { defineComponent as p, createBlock as u, openBlock as m, unref as t, normalizeProps as g, guardReactiveProps as y, withCtx as o, renderSlot as f, createVNode as e, mergeProps as b, createElementVNode as w } from "vue";
|
|
2
|
+
import { u as _ } from "./useForwardPropsEmits-0XKBv1pB.js";
|
|
3
|
+
import { _ as B, a as $, b as x, c as O } from "./DialogOverlay-Cj3UTjZ8.js";
|
|
4
|
+
import { c as h } from "./utils-SFgRDk1R.js";
|
|
5
|
+
import { _ as P } from "./DialogPortal-zAvO8zt4.js";
|
|
6
|
+
import { X as k } from "./x-Cl6YllUK.js";
|
|
7
|
+
import { r as v } from "./index-OpE2oGce.js";
|
|
8
|
+
const S = /* @__PURE__ */ p({
|
|
9
|
+
__name: "Dialog",
|
|
10
|
+
props: {
|
|
11
|
+
open: { type: Boolean },
|
|
12
|
+
defaultOpen: { type: Boolean },
|
|
13
|
+
modal: { type: Boolean }
|
|
14
|
+
},
|
|
15
|
+
emits: ["update:open"],
|
|
16
|
+
setup(a, { emit: s }) {
|
|
17
|
+
const r = _(a, s);
|
|
18
|
+
return (i, l) => (m(), u(t(B), g(y(t(r))), {
|
|
19
|
+
default: o(() => [
|
|
20
|
+
f(i.$slots, "default")
|
|
21
|
+
]),
|
|
22
|
+
_: 3
|
|
23
|
+
}, 16));
|
|
24
|
+
}
|
|
25
|
+
}), V = /* @__PURE__ */ p({
|
|
26
|
+
__name: "DialogContent",
|
|
27
|
+
props: {
|
|
28
|
+
forceMount: { type: Boolean },
|
|
29
|
+
trapFocus: { type: Boolean },
|
|
30
|
+
disableOutsidePointerEvents: { type: Boolean },
|
|
31
|
+
asChild: { type: Boolean },
|
|
32
|
+
as: { type: [String, Object, Function] },
|
|
33
|
+
class: {}
|
|
34
|
+
},
|
|
35
|
+
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"],
|
|
36
|
+
setup(a, { emit: s }) {
|
|
37
|
+
const n = a, d = s, r = v(n, "class"), i = _(r, d);
|
|
38
|
+
return (l, c) => (m(), u(t(P), null, {
|
|
39
|
+
default: o(() => [
|
|
40
|
+
e(t($), { class: "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" }),
|
|
41
|
+
e(t(x), b(t(i), {
|
|
42
|
+
class: t(h)(
|
|
43
|
+
"fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
44
|
+
n.class
|
|
45
|
+
)
|
|
46
|
+
}), {
|
|
47
|
+
default: o(() => [
|
|
48
|
+
f(l.$slots, "default"),
|
|
49
|
+
e(t(O), { class: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground" }, {
|
|
50
|
+
default: o(() => [
|
|
51
|
+
e(t(k), { class: "w-4 h-4" }),
|
|
52
|
+
c[0] || (c[0] = w("span", { class: "sr-only" }, "Close", -1))
|
|
53
|
+
]),
|
|
54
|
+
_: 1,
|
|
55
|
+
__: [0]
|
|
56
|
+
})
|
|
57
|
+
]),
|
|
58
|
+
_: 3
|
|
59
|
+
}, 16, ["class"])
|
|
60
|
+
]),
|
|
61
|
+
_: 3
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
export {
|
|
66
|
+
S as _,
|
|
67
|
+
V as a
|
|
68
|
+
};
|