cisse-vue-ui 0.5.21 → 0.5.22
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/{ListSkeleton.vue_vue_type_script_setup_true_lang-D3_Oddwt.js → Button.vue_vue_type_script_setup_true_lang-DKE8elsf.js} +102 -7
- package/dist/Button.vue_vue_type_script_setup_true_lang-DKE8elsf.js.map +1 -0
- package/dist/{ListSkeleton.vue_vue_type_script_setup_true_lang-CrEu33_J.cjs → Button.vue_vue_type_script_setup_true_lang-DrGM65ny.cjs} +101 -6
- package/dist/Button.vue_vue_type_script_setup_true_lang-DrGM65ny.cjs.map +1 -0
- package/dist/{RangeSlider.vue_vue_type_script_setup_true_lang-B79_S1JL.js → Combobox.vue_vue_type_script_setup_true_lang-DhcLb6DX.js} +408 -185
- package/dist/Combobox.vue_vue_type_script_setup_true_lang-DhcLb6DX.js.map +1 -0
- package/dist/{RangeSlider.vue_vue_type_script_setup_true_lang-ClH-pyK8.cjs → Combobox.vue_vue_type_script_setup_true_lang-FdUrjmSG.cjs} +435 -212
- package/dist/Combobox.vue_vue_type_script_setup_true_lang-FdUrjmSG.cjs.map +1 -0
- package/dist/{Skeleton.vue_vue_type_script_setup_true_lang-Q4PcIELi.js → ConfirmDialog.vue_vue_type_script_setup_true_lang-CNucAMQg.js} +234 -119
- package/dist/ConfirmDialog.vue_vue_type_script_setup_true_lang-CNucAMQg.js.map +1 -0
- package/dist/{Skeleton.vue_vue_type_script_setup_true_lang-CsDMGhaT.cjs → ConfirmDialog.vue_vue_type_script_setup_true_lang-DXb9wQQv.cjs} +233 -118
- package/dist/ConfirmDialog.vue_vue_type_script_setup_true_lang-DXb9wQQv.cjs.map +1 -0
- package/dist/{Timeline.vue_vue_type_script_setup_true_lang-ykGksWXN.js → DarkModeToggle.vue_vue_type_script_setup_true_lang-43fxlbro.js} +109 -357
- package/dist/DarkModeToggle.vue_vue_type_script_setup_true_lang-43fxlbro.js.map +1 -0
- package/dist/{Timeline.vue_vue_type_script_setup_true_lang-C5SKEGPG.cjs → DarkModeToggle.vue_vue_type_script_setup_true_lang-BoB48313.cjs} +148 -396
- package/dist/DarkModeToggle.vue_vue_type_script_setup_true_lang-BoB48313.cjs.map +1 -0
- package/dist/components/core/DarkModeToggle.stories.d.ts +15 -0
- package/dist/components/core/DarkModeToggle.test.d.ts +1 -0
- package/dist/components/core/DarkModeToggle.vue.d.ts +21 -0
- package/dist/components/core/index.cjs +22 -20
- package/dist/components/core/index.cjs.map +1 -1
- package/dist/components/core/index.d.ts +2 -0
- package/dist/components/core/index.js +16 -14
- package/dist/components/core/index.js.map +1 -1
- package/dist/components/feedback/ConfirmDialog.stories.d.ts +12 -0
- package/dist/components/feedback/ConfirmDialog.test.d.ts +1 -0
- package/dist/components/feedback/ConfirmDialog.vue.d.ts +53 -0
- package/dist/components/feedback/Modal.vue.d.ts +11 -2
- package/dist/components/feedback/Progress.vue.d.ts +1 -1
- package/dist/components/feedback/index.cjs +17 -16
- package/dist/components/feedback/index.cjs.map +1 -1
- package/dist/components/feedback/index.d.ts +2 -0
- package/dist/components/feedback/index.js +6 -5
- package/dist/components/form/ColorPicker.vue.d.ts +3 -0
- package/dist/components/form/Combobox.stories.d.ts +15 -0
- package/dist/components/form/Combobox.test.d.ts +1 -0
- package/dist/components/form/Combobox.vue.d.ts +46 -0
- package/dist/components/form/index.cjs +17 -16
- package/dist/components/form/index.cjs.map +1 -1
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/form/index.js +3 -2
- package/dist/components/index.cjs +55 -52
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +33 -30
- package/dist/composables/index.cjs +3 -2
- package/dist/composables/index.cjs.map +1 -1
- package/dist/composables/index.js +9 -8
- package/dist/composables/index.js.map +1 -1
- package/dist/index-D7HVSFi2.cjs +337 -0
- package/dist/index-D7HVSFi2.cjs.map +1 -0
- package/dist/index-DZYqrXV0.js +75 -0
- package/dist/index-DZYqrXV0.js.map +1 -0
- package/dist/index-Dghdw1yo.js +338 -0
- package/dist/index-Dghdw1yo.js.map +1 -0
- package/dist/index-DjEv91o4.cjs +74 -0
- package/dist/index-DjEv91o4.cjs.map +1 -0
- package/dist/index.cjs +59 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +43 -39
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/useDarkMode-Cl5QWTlC.js +53 -0
- package/dist/useDarkMode-Cl5QWTlC.js.map +1 -0
- package/dist/useDarkMode-DLZcJEUQ.cjs +52 -0
- package/dist/useDarkMode-DLZcJEUQ.cjs.map +1 -0
- package/dist/{useToast-CRh_sG82.cjs → useToast-Bk60GArg.cjs} +1 -50
- package/dist/useToast-Bk60GArg.cjs.map +1 -0
- package/dist/{useToast-DwFOkewC.js → useToast-ina5g3mj.js} +6 -55
- package/dist/useToast-ina5g3mj.js.map +1 -0
- package/package.json +1 -1
- package/dist/Checkbox.vue_vue_type_script_setup_true_lang-B-nLCCNY.js +0 -54
- package/dist/Checkbox.vue_vue_type_script_setup_true_lang-B-nLCCNY.js.map +0 -1
- package/dist/Checkbox.vue_vue_type_script_setup_true_lang-DIoHDji4.cjs +0 -53
- package/dist/Checkbox.vue_vue_type_script_setup_true_lang-DIoHDji4.cjs.map +0 -1
- package/dist/ListSkeleton.vue_vue_type_script_setup_true_lang-CrEu33_J.cjs.map +0 -1
- package/dist/ListSkeleton.vue_vue_type_script_setup_true_lang-D3_Oddwt.js.map +0 -1
- package/dist/RangeSlider.vue_vue_type_script_setup_true_lang-B79_S1JL.js.map +0 -1
- package/dist/RangeSlider.vue_vue_type_script_setup_true_lang-ClH-pyK8.cjs.map +0 -1
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-CsDMGhaT.cjs.map +0 -1
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-Q4PcIELi.js.map +0 -1
- package/dist/Timeline.vue_vue_type_script_setup_true_lang-C5SKEGPG.cjs.map +0 -1
- package/dist/Timeline.vue_vue_type_script_setup_true_lang-ykGksWXN.js.map +0 -1
- package/dist/index-C3NAM2ds.js +0 -72
- package/dist/index-C3NAM2ds.js.map +0 -1
- package/dist/index-Ti1RIOEG.cjs +0 -71
- package/dist/index-Ti1RIOEG.cjs.map +0 -1
- package/dist/useToast-CRh_sG82.cjs.map +0 -1
- package/dist/useToast-DwFOkewC.js.map +0 -1
|
@@ -2,8 +2,9 @@ import { defineComponent, createElementBlock, openBlock, renderSlot, createTextV
|
|
|
2
2
|
import { Icon } from "@iconify/vue";
|
|
3
3
|
import { u as useDropdown } from "./useDropdown-iVu14E6s.js";
|
|
4
4
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js";
|
|
5
|
-
|
|
6
|
-
const
|
|
5
|
+
import { o as onClickOutside } from "./index-Dghdw1yo.js";
|
|
6
|
+
const _hoisted_1$d = ["data-error", "for"];
|
|
7
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
7
8
|
__name: "FormLabel",
|
|
8
9
|
props: {
|
|
9
10
|
error: { type: [String, Boolean] },
|
|
@@ -17,12 +18,12 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
17
18
|
class: "block text-sm font-medium text-gray-700 data-[error=true]:text-red-500 dark:text-gray-300"
|
|
18
19
|
}, [
|
|
19
20
|
renderSlot(_ctx.$slots, "default")
|
|
20
|
-
], 8, _hoisted_1$
|
|
21
|
+
], 8, _hoisted_1$d);
|
|
21
22
|
};
|
|
22
23
|
}
|
|
23
24
|
});
|
|
24
|
-
const _hoisted_1$
|
|
25
|
-
const _sfc_main$
|
|
25
|
+
const _hoisted_1$c = ["data-error"];
|
|
26
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
26
27
|
__name: "FormHelp",
|
|
27
28
|
props: {
|
|
28
29
|
error: { type: Boolean },
|
|
@@ -37,12 +38,12 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
37
38
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
38
39
|
createTextVNode(toDisplayString(__props.text ?? ""), 1)
|
|
39
40
|
])
|
|
40
|
-
], 8, _hoisted_1$
|
|
41
|
+
], 8, _hoisted_1$c);
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
44
|
});
|
|
44
|
-
const _hoisted_1$
|
|
45
|
-
const _sfc_main$
|
|
45
|
+
const _hoisted_1$b = ["id", "disabled", "name", "placeholder", "type"];
|
|
46
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
46
47
|
__name: "FormInput",
|
|
47
48
|
props: /* @__PURE__ */ mergeModels({
|
|
48
49
|
type: { default: "text" },
|
|
@@ -68,21 +69,21 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
68
69
|
placeholder: __props.placeholder,
|
|
69
70
|
type: __props.type,
|
|
70
71
|
class: "mt-1 block w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm text-gray-800 placeholder-gray-400 shadow-sm user-invalid:border-red-500 user-invalid:text-red-600 focus:border-primary focus:ring-1 focus:ring-primary focus:outline-none focus:user-invalid:border-red-500 focus:user-invalid:ring-red-500 disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none dark:border-gray-700 dark:bg-gray-900 dark:text-gray-200 dark:placeholder-gray-500 dark:focus:border-primary dark:focus:ring-primary dark:disabled:border-gray-800 dark:disabled:bg-gray-950 dark:disabled:text-gray-500"
|
|
71
|
-
}, _ctx.$attrs), null, 16, _hoisted_1$
|
|
72
|
+
}, _ctx.$attrs), null, 16, _hoisted_1$b)), [
|
|
72
73
|
[vModelDynamic, modelValue.value]
|
|
73
74
|
]);
|
|
74
75
|
};
|
|
75
76
|
}
|
|
76
77
|
});
|
|
77
|
-
const _hoisted_1$
|
|
78
|
-
const _hoisted_2$
|
|
79
|
-
const _hoisted_3$
|
|
80
|
-
const _hoisted_4$
|
|
78
|
+
const _hoisted_1$a = { class: "relative" };
|
|
79
|
+
const _hoisted_2$9 = ["id", "disabled"];
|
|
80
|
+
const _hoisted_3$8 = { class: "flex-1 truncate" };
|
|
81
|
+
const _hoisted_4$6 = {
|
|
81
82
|
key: 0,
|
|
82
83
|
class: "sticky top-0 border-b border-gray-200 bg-white p-2 dark:border-gray-700 dark:bg-gray-800"
|
|
83
84
|
};
|
|
84
|
-
const _hoisted_5$
|
|
85
|
-
const _hoisted_6$
|
|
85
|
+
const _hoisted_5$5 = { class: "flex items-center gap-2 rounded-md border border-gray-300 bg-gray-50 px-2 py-1.5 dark:border-gray-600 dark:bg-gray-900" };
|
|
86
|
+
const _hoisted_6$5 = {
|
|
86
87
|
key: 1,
|
|
87
88
|
class: "px-4 py-3 text-sm text-gray-500 dark:text-gray-400"
|
|
88
89
|
};
|
|
@@ -93,7 +94,7 @@ const _hoisted_9$2 = {
|
|
|
93
94
|
class: "size-4 shrink-0"
|
|
94
95
|
};
|
|
95
96
|
const _hoisted_10$2 = { class: "flex-1" };
|
|
96
|
-
const _sfc_main$
|
|
97
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
97
98
|
__name: "FormSelect",
|
|
98
99
|
props: /* @__PURE__ */ mergeModels({
|
|
99
100
|
options: {},
|
|
@@ -206,7 +207,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
206
207
|
return [base, state, text, props.triggerClass];
|
|
207
208
|
});
|
|
208
209
|
return (_ctx, _cache) => {
|
|
209
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
210
|
+
return openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
210
211
|
createElementVNode("button", {
|
|
211
212
|
id: __props.id ?? __props.name ?? void 0,
|
|
212
213
|
ref_key: "triggerRef",
|
|
@@ -221,13 +222,13 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
221
222
|
option: selectedOption.value,
|
|
222
223
|
placeholder: __props.placeholder
|
|
223
224
|
}, () => [
|
|
224
|
-
createElementVNode("span", _hoisted_3$
|
|
225
|
+
createElementVNode("span", _hoisted_3$8, toDisplayString(displayValue.value), 1)
|
|
225
226
|
]),
|
|
226
227
|
createVNode(unref(Icon), {
|
|
227
228
|
icon: "lucide:chevron-down",
|
|
228
229
|
class: normalizeClass(["size-4 shrink-0 text-gray-400 transition-transform", unref(isOpen) && "rotate-180"])
|
|
229
230
|
}, null, 8, ["class"])
|
|
230
|
-
], 42, _hoisted_2$
|
|
231
|
+
], 42, _hoisted_2$9),
|
|
231
232
|
(openBlock(), createBlock(Teleport, {
|
|
232
233
|
to: "body",
|
|
233
234
|
disabled: !__props.teleport
|
|
@@ -251,8 +252,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
251
252
|
!__props.teleport && "absolute mt-1 w-full"
|
|
252
253
|
])
|
|
253
254
|
}, [
|
|
254
|
-
__props.searchable ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
255
|
-
createElementVNode("div", _hoisted_5$
|
|
255
|
+
__props.searchable ? (openBlock(), createElementBlock("div", _hoisted_4$6, [
|
|
256
|
+
createElementVNode("div", _hoisted_5$5, [
|
|
256
257
|
createVNode(unref(Icon), {
|
|
257
258
|
icon: "lucide:search",
|
|
258
259
|
class: "size-4 text-gray-400"
|
|
@@ -270,7 +271,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
270
271
|
])
|
|
271
272
|
])
|
|
272
273
|
])) : createCommentVNode("", true),
|
|
273
|
-
filteredOptions.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_6$
|
|
274
|
+
filteredOptions.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_6$5, toDisplayString(__props.noResultsText), 1)) : createCommentVNode("", true),
|
|
274
275
|
createElementVNode("div", _hoisted_7$4, [
|
|
275
276
|
(openBlock(true), createElementBlock(Fragment, null, renderList(filteredOptions.value, (option, index) => {
|
|
276
277
|
return openBlock(), createElementBlock("button", {
|
|
@@ -310,8 +311,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
310
311
|
};
|
|
311
312
|
}
|
|
312
313
|
});
|
|
313
|
-
const _hoisted_1$
|
|
314
|
-
const _sfc_main$
|
|
314
|
+
const _hoisted_1$9 = ["hidden"];
|
|
315
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
315
316
|
__name: "FormGroup",
|
|
316
317
|
props: /* @__PURE__ */ mergeModels({
|
|
317
318
|
label: {},
|
|
@@ -344,7 +345,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
344
345
|
}, [
|
|
345
346
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
346
347
|
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
347
|
-
__props.label ? (openBlock(), createBlock(_sfc_main$
|
|
348
|
+
__props.label ? (openBlock(), createBlock(_sfc_main$d, {
|
|
348
349
|
key: 0,
|
|
349
350
|
"html-for": __props.id ?? __props.name,
|
|
350
351
|
error: __props.error
|
|
@@ -356,17 +357,17 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
356
357
|
}, 8, ["html-for", "error"])) : createCommentVNode("", true)
|
|
357
358
|
]),
|
|
358
359
|
renderSlot(_ctx.$slots, "input", {}, () => [
|
|
359
|
-
isSelect.value ? (openBlock(), createBlock(_sfc_main$
|
|
360
|
+
isSelect.value ? (openBlock(), createBlock(_sfc_main$a, mergeProps({
|
|
360
361
|
key: 0,
|
|
361
362
|
modelValue: modelValue.value,
|
|
362
363
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event)
|
|
363
|
-
}, { ..._ctx.$attrs, ..._ctx.$props }), null, 16, ["modelValue"])) : (openBlock(), createBlock(_sfc_main$
|
|
364
|
+
}, { ..._ctx.$attrs, ..._ctx.$props }), null, 16, ["modelValue"])) : (openBlock(), createBlock(_sfc_main$b, mergeProps({
|
|
364
365
|
key: 1,
|
|
365
366
|
modelValue: modelValue.value,
|
|
366
367
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => modelValue.value = $event)
|
|
367
368
|
}, { ..._ctx.$attrs, ..._ctx.$props }), null, 16, ["modelValue"]))
|
|
368
369
|
]),
|
|
369
|
-
__props.error && typeof __props.error === "string" ? (openBlock(), createBlock(_sfc_main$
|
|
370
|
+
__props.error && typeof __props.error === "string" ? (openBlock(), createBlock(_sfc_main$c, {
|
|
370
371
|
key: 0,
|
|
371
372
|
error: true
|
|
372
373
|
}, {
|
|
@@ -376,13 +377,13 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
376
377
|
_: 1
|
|
377
378
|
})) : createCommentVNode("", true)
|
|
378
379
|
])
|
|
379
|
-
], 12, _hoisted_1$
|
|
380
|
+
], 12, _hoisted_1$9);
|
|
380
381
|
};
|
|
381
382
|
}
|
|
382
383
|
});
|
|
383
|
-
const _hoisted_1$
|
|
384
|
-
const _hoisted_2$
|
|
385
|
-
const _sfc_main$
|
|
384
|
+
const _hoisted_1$8 = { class: "relative" };
|
|
385
|
+
const _hoisted_2$8 = ["disabled", "placeholder", "value"];
|
|
386
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
386
387
|
__name: "SearchInput",
|
|
387
388
|
props: {
|
|
388
389
|
modelValue: {},
|
|
@@ -398,7 +399,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
398
399
|
emit("update:modelValue", target.value);
|
|
399
400
|
};
|
|
400
401
|
return (_ctx, _cache) => {
|
|
401
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
402
|
+
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
402
403
|
createVNode(unref(Icon), {
|
|
403
404
|
icon: __props.icon,
|
|
404
405
|
class: "absolute top-1/2 left-3 h-5 w-5 -translate-y-1/2 text-gray-400"
|
|
@@ -410,25 +411,25 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
410
411
|
class: "focus:border-primary focus:ring-primary w-full rounded-lg border border-gray-300 bg-white py-2 pr-4 pl-10 text-gray-900 placeholder-gray-400 transition-colors disabled:cursor-not-allowed disabled:opacity-50 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-100 dark:placeholder-gray-500",
|
|
411
412
|
type: "text",
|
|
412
413
|
onInput: handleInput
|
|
413
|
-
}, null, 40, _hoisted_2$
|
|
414
|
+
}, null, 40, _hoisted_2$8)
|
|
414
415
|
]);
|
|
415
416
|
};
|
|
416
417
|
}
|
|
417
418
|
});
|
|
418
|
-
const _hoisted_1$
|
|
419
|
-
const _hoisted_2$
|
|
419
|
+
const _hoisted_1$7 = ["aria-checked", "disabled"];
|
|
420
|
+
const _hoisted_2$7 = {
|
|
420
421
|
key: 0,
|
|
421
422
|
class: "flex flex-col"
|
|
422
423
|
};
|
|
423
|
-
const _hoisted_3$
|
|
424
|
+
const _hoisted_3$7 = {
|
|
424
425
|
key: 0,
|
|
425
426
|
class: "text-sm font-medium text-gray-900 dark:text-white"
|
|
426
427
|
};
|
|
427
|
-
const _hoisted_4$
|
|
428
|
+
const _hoisted_4$5 = {
|
|
428
429
|
key: 1,
|
|
429
430
|
class: "text-sm text-gray-500 dark:text-gray-400"
|
|
430
431
|
};
|
|
431
|
-
const _sfc_main$
|
|
432
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
432
433
|
__name: "Switch",
|
|
433
434
|
props: {
|
|
434
435
|
modelValue: { type: Boolean, default: false },
|
|
@@ -483,27 +484,27 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
483
484
|
__props.modelValue ? translateSizes[__props.size] : "translate-x-1"
|
|
484
485
|
])
|
|
485
486
|
}, null, 2)
|
|
486
|
-
], 10, _hoisted_1$
|
|
487
|
-
__props.label || __props.description ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
488
|
-
__props.label ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
489
|
-
__props.description ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
487
|
+
], 10, _hoisted_1$7),
|
|
488
|
+
__props.label || __props.description ? (openBlock(), createElementBlock("div", _hoisted_2$7, [
|
|
489
|
+
__props.label ? (openBlock(), createElementBlock("span", _hoisted_3$7, toDisplayString(__props.label), 1)) : createCommentVNode("", true),
|
|
490
|
+
__props.description ? (openBlock(), createElementBlock("span", _hoisted_4$5, toDisplayString(__props.description), 1)) : createCommentVNode("", true)
|
|
490
491
|
])) : createCommentVNode("", true)
|
|
491
492
|
], 2);
|
|
492
493
|
};
|
|
493
494
|
}
|
|
494
495
|
});
|
|
495
|
-
const _hoisted_1$
|
|
496
|
-
const _hoisted_2$
|
|
496
|
+
const _hoisted_1$6 = { class: "w-full" };
|
|
497
|
+
const _hoisted_2$6 = {
|
|
497
498
|
key: 0,
|
|
498
499
|
class: "mb-2 flex justify-between text-sm"
|
|
499
500
|
};
|
|
500
|
-
const _hoisted_3$
|
|
501
|
-
const _hoisted_4$
|
|
502
|
-
const _hoisted_5$
|
|
503
|
-
const _hoisted_6$
|
|
501
|
+
const _hoisted_3$6 = { class: "text-gray-600 dark:text-gray-400" };
|
|
502
|
+
const _hoisted_4$4 = { class: "font-medium text-gray-900 dark:text-white" };
|
|
503
|
+
const _hoisted_5$4 = { class: "text-gray-600 dark:text-gray-400" };
|
|
504
|
+
const _hoisted_6$4 = { class: "relative" };
|
|
504
505
|
const _hoisted_7$3 = ["value", "min", "max", "step", "disabled"];
|
|
505
506
|
const _hoisted_8$3 = { class: "pointer-events-none absolute inset-y-0 left-0 flex items-center" };
|
|
506
|
-
const _sfc_main$
|
|
507
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
507
508
|
__name: "Slider",
|
|
508
509
|
props: /* @__PURE__ */ mergeModels({
|
|
509
510
|
min: { default: 0 },
|
|
@@ -534,13 +535,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
534
535
|
modelValue.value = Number(target.value);
|
|
535
536
|
};
|
|
536
537
|
return (_ctx, _cache) => {
|
|
537
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
538
|
-
__props.showValue ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
539
|
-
createElementVNode("span", _hoisted_3$
|
|
540
|
-
createElementVNode("span", _hoisted_4$
|
|
541
|
-
createElementVNode("span", _hoisted_5$
|
|
538
|
+
return openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
539
|
+
__props.showValue ? (openBlock(), createElementBlock("div", _hoisted_2$6, [
|
|
540
|
+
createElementVNode("span", _hoisted_3$6, toDisplayString(__props.min), 1),
|
|
541
|
+
createElementVNode("span", _hoisted_4$4, toDisplayString(displayValue.value), 1),
|
|
542
|
+
createElementVNode("span", _hoisted_5$4, toDisplayString(__props.max), 1)
|
|
542
543
|
])) : createCommentVNode("", true),
|
|
543
|
-
createElementVNode("div", _hoisted_6$
|
|
544
|
+
createElementVNode("div", _hoisted_6$4, [
|
|
544
545
|
createElementVNode("input", {
|
|
545
546
|
type: "range",
|
|
546
547
|
value: modelValue.value,
|
|
@@ -562,18 +563,18 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
562
563
|
};
|
|
563
564
|
}
|
|
564
565
|
});
|
|
565
|
-
const Slider = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
566
|
-
const _hoisted_1$
|
|
567
|
-
const _hoisted_2$
|
|
568
|
-
const _hoisted_3$
|
|
569
|
-
const _hoisted_4$
|
|
570
|
-
const _hoisted_5$
|
|
571
|
-
const _hoisted_6$
|
|
566
|
+
const Slider = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-a411f1b4"]]);
|
|
567
|
+
const _hoisted_1$5 = { class: "relative" };
|
|
568
|
+
const _hoisted_2$5 = ["disabled"];
|
|
569
|
+
const _hoisted_3$5 = { class: "flex-1 truncate" };
|
|
570
|
+
const _hoisted_4$3 = { class: "flex items-center gap-1" };
|
|
571
|
+
const _hoisted_5$3 = { class: "mb-4 flex items-center justify-between" };
|
|
572
|
+
const _hoisted_6$3 = { class: "font-medium text-gray-900 dark:text-white" };
|
|
572
573
|
const _hoisted_7$2 = { class: "mb-2 grid grid-cols-7 gap-1" };
|
|
573
574
|
const _hoisted_8$2 = { class: "grid grid-cols-7 gap-1" };
|
|
574
575
|
const _hoisted_9$1 = ["disabled", "onClick"];
|
|
575
576
|
const _hoisted_10$1 = { class: "mt-4 border-t border-gray-200 pt-3 dark:border-gray-700" };
|
|
576
|
-
const _sfc_main$
|
|
577
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
577
578
|
__name: "DatePicker",
|
|
578
579
|
props: /* @__PURE__ */ mergeModels({
|
|
579
580
|
placeholder: { default: "Select date" },
|
|
@@ -683,7 +684,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
683
684
|
modelValue.value = null;
|
|
684
685
|
};
|
|
685
686
|
return (_ctx, _cache) => {
|
|
686
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
687
|
+
return openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
687
688
|
createElementVNode("button", {
|
|
688
689
|
ref_key: "triggerRef",
|
|
689
690
|
ref: triggerRef,
|
|
@@ -697,8 +698,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
697
698
|
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
698
699
|
(...args) => unref(toggle) && unref(toggle)(...args))
|
|
699
700
|
}, [
|
|
700
|
-
createElementVNode("span", _hoisted_3$
|
|
701
|
-
createElementVNode("div", _hoisted_4$
|
|
701
|
+
createElementVNode("span", _hoisted_3$5, toDisplayString(displayValue.value || __props.placeholder), 1),
|
|
702
|
+
createElementVNode("div", _hoisted_4$3, [
|
|
702
703
|
modelValue.value ? (openBlock(), createElementBlock("button", {
|
|
703
704
|
key: 0,
|
|
704
705
|
type: "button",
|
|
@@ -715,7 +716,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
715
716
|
class: "size-4 text-gray-400"
|
|
716
717
|
})
|
|
717
718
|
])
|
|
718
|
-
], 10, _hoisted_2$
|
|
719
|
+
], 10, _hoisted_2$5),
|
|
719
720
|
(openBlock(), createBlock(Teleport, {
|
|
720
721
|
to: "body",
|
|
721
722
|
disabled: !__props.teleport
|
|
@@ -736,7 +737,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
736
737
|
style: normalizeStyle(unref(dropdownStyle)),
|
|
737
738
|
class: "z-[9999] w-72 rounded-lg border border-gray-200 bg-white p-4 shadow-lg dark:border-gray-700 dark:bg-gray-800"
|
|
738
739
|
}, [
|
|
739
|
-
createElementVNode("div", _hoisted_5$
|
|
740
|
+
createElementVNode("div", _hoisted_5$3, [
|
|
740
741
|
createElementVNode("button", {
|
|
741
742
|
type: "button",
|
|
742
743
|
class: "rounded p-1 hover:bg-gray-100 dark:hover:bg-gray-700",
|
|
@@ -747,7 +748,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
747
748
|
class: "size-5 text-gray-600 dark:text-gray-400"
|
|
748
749
|
})
|
|
749
750
|
]),
|
|
750
|
-
createElementVNode("span", _hoisted_6$
|
|
751
|
+
createElementVNode("span", _hoisted_6$3, toDisplayString(monthYear.value), 1),
|
|
751
752
|
createElementVNode("button", {
|
|
752
753
|
type: "button",
|
|
753
754
|
class: "rounded p-1 hover:bg-gray-100 dark:hover:bg-gray-700",
|
|
@@ -801,15 +802,15 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
801
802
|
};
|
|
802
803
|
}
|
|
803
804
|
});
|
|
804
|
-
const _hoisted_1$
|
|
805
|
-
const _hoisted_2$
|
|
806
|
-
const _hoisted_3$
|
|
807
|
-
const _hoisted_4$
|
|
808
|
-
const _hoisted_5$
|
|
805
|
+
const _hoisted_1$4 = { class: "space-y-4" };
|
|
806
|
+
const _hoisted_2$4 = ["accept", "multiple", "disabled"];
|
|
807
|
+
const _hoisted_3$4 = { class: "space-y-2" };
|
|
808
|
+
const _hoisted_4$2 = { class: "text-sm font-medium text-gray-700 dark:text-gray-300" };
|
|
809
|
+
const _hoisted_5$2 = {
|
|
809
810
|
key: 0,
|
|
810
811
|
class: "text-xs text-gray-500 dark:text-gray-400"
|
|
811
812
|
};
|
|
812
|
-
const _hoisted_6$
|
|
813
|
+
const _hoisted_6$2 = {
|
|
813
814
|
key: 1,
|
|
814
815
|
class: "text-xs text-gray-500 dark:text-gray-400"
|
|
815
816
|
};
|
|
@@ -821,7 +822,7 @@ const _hoisted_8$1 = { class: "flex-1 min-w-0" };
|
|
|
821
822
|
const _hoisted_9 = { class: "text-sm font-medium text-gray-700 dark:text-gray-300 truncate" };
|
|
822
823
|
const _hoisted_10 = { class: "text-xs text-gray-500 dark:text-gray-400" };
|
|
823
824
|
const _hoisted_11 = ["onClick"];
|
|
824
|
-
const _sfc_main$
|
|
825
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
825
826
|
__name: "FileUpload",
|
|
826
827
|
props: {
|
|
827
828
|
accept: {},
|
|
@@ -949,7 +950,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
949
950
|
return "heroicons:document";
|
|
950
951
|
};
|
|
951
952
|
return (_ctx, _cache) => {
|
|
952
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
953
|
+
return openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
953
954
|
createElementVNode("div", {
|
|
954
955
|
class: normalizeClass(dropzoneClasses.value),
|
|
955
956
|
onDrop: withModifiers(handleDrop, ["prevent"]),
|
|
@@ -966,15 +967,15 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
966
967
|
multiple: __props.multiple,
|
|
967
968
|
disabled: __props.disabled,
|
|
968
969
|
onChange: handleInputChange
|
|
969
|
-
}, null, 40, _hoisted_2$
|
|
970
|
-
createElementVNode("div", _hoisted_3$
|
|
970
|
+
}, null, 40, _hoisted_2$4),
|
|
971
|
+
createElementVNode("div", _hoisted_3$4, [
|
|
971
972
|
createVNode(unref(Icon), {
|
|
972
973
|
icon: "heroicons:cloud-arrow-up",
|
|
973
974
|
class: normalizeClass(["w-12 h-12 mx-auto text-gray-400", { "text-primary-500": isDragging.value }])
|
|
974
975
|
}, null, 8, ["class"]),
|
|
975
|
-
createElementVNode("p", _hoisted_4$
|
|
976
|
-
__props.description ? (openBlock(), createElementBlock("p", _hoisted_5$
|
|
977
|
-
__props.maxSize ? (openBlock(), createElementBlock("p", _hoisted_6$
|
|
976
|
+
createElementVNode("p", _hoisted_4$2, toDisplayString(__props.label), 1),
|
|
977
|
+
__props.description ? (openBlock(), createElementBlock("p", _hoisted_5$2, toDisplayString(__props.description), 1)) : createCommentVNode("", true),
|
|
978
|
+
__props.maxSize ? (openBlock(), createElementBlock("p", _hoisted_6$2, " Max size: " + toDisplayString(formatSize(__props.maxSize)), 1)) : createCommentVNode("", true)
|
|
978
979
|
])
|
|
979
980
|
], 34),
|
|
980
981
|
files.value.length > 0 ? (openBlock(), createElementBlock("ul", _hoisted_7$1, [
|
|
@@ -1008,13 +1009,13 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1008
1009
|
};
|
|
1009
1010
|
}
|
|
1010
1011
|
});
|
|
1011
|
-
const _hoisted_1$
|
|
1012
|
-
const _hoisted_2$
|
|
1013
|
-
const _hoisted_3$
|
|
1012
|
+
const _hoisted_1$3 = { class: "flex items-center gap-1" };
|
|
1013
|
+
const _hoisted_2$3 = ["disabled", "onClick", "onMousemove"];
|
|
1014
|
+
const _hoisted_3$3 = {
|
|
1014
1015
|
key: 0,
|
|
1015
1016
|
class: "ml-2 text-sm font-medium text-gray-700 dark:text-gray-300"
|
|
1016
1017
|
};
|
|
1017
|
-
const _sfc_main$
|
|
1018
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
1018
1019
|
__name: "Rating",
|
|
1019
1020
|
props: {
|
|
1020
1021
|
modelValue: { default: 0 },
|
|
@@ -1077,7 +1078,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1077
1078
|
hoverValue.value = null;
|
|
1078
1079
|
};
|
|
1079
1080
|
return (_ctx, _cache) => {
|
|
1080
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1081
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
1081
1082
|
createElementVNode("div", {
|
|
1082
1083
|
class: "flex items-center",
|
|
1083
1084
|
onMouseleave: handleMouseLeave
|
|
@@ -1109,29 +1110,29 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1109
1110
|
class: normalizeClass([sizeClasses.value, __props.color])
|
|
1110
1111
|
}, null, 8, ["icon", "class"])
|
|
1111
1112
|
], 4)
|
|
1112
|
-
], 42, _hoisted_2$
|
|
1113
|
+
], 42, _hoisted_2$3);
|
|
1113
1114
|
}), 128))
|
|
1114
1115
|
], 32),
|
|
1115
|
-
__props.showValue ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
1116
|
+
__props.showValue ? (openBlock(), createElementBlock("span", _hoisted_3$3, toDisplayString(__props.modelValue.toFixed(__props.allowHalf ? 1 : 0)), 1)) : createCommentVNode("", true)
|
|
1116
1117
|
]);
|
|
1117
1118
|
};
|
|
1118
1119
|
}
|
|
1119
1120
|
});
|
|
1120
|
-
const _hoisted_1$
|
|
1121
|
-
const _hoisted_2$
|
|
1121
|
+
const _hoisted_1$2 = { class: "relative inline-block" };
|
|
1122
|
+
const _hoisted_2$2 = {
|
|
1122
1123
|
key: 0,
|
|
1123
1124
|
class: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"
|
|
1124
1125
|
};
|
|
1125
|
-
const _hoisted_3$
|
|
1126
|
-
const _hoisted_4 = { class: "text-sm font-mono text-gray-700 dark:text-gray-300" };
|
|
1127
|
-
const _hoisted_5 = { class: "grid grid-cols-5 gap-2 mb-3" };
|
|
1128
|
-
const _hoisted_6 = ["title", "onClick"];
|
|
1126
|
+
const _hoisted_3$2 = ["disabled"];
|
|
1127
|
+
const _hoisted_4$1 = { class: "text-sm font-mono text-gray-700 dark:text-gray-300" };
|
|
1128
|
+
const _hoisted_5$1 = { class: "grid grid-cols-5 gap-2 mb-3" };
|
|
1129
|
+
const _hoisted_6$1 = ["title", "onClick"];
|
|
1129
1130
|
const _hoisted_7 = {
|
|
1130
1131
|
key: 0,
|
|
1131
1132
|
class: "flex items-center gap-2 pt-3 border-t border-gray-200 dark:border-gray-700"
|
|
1132
1133
|
};
|
|
1133
1134
|
const _hoisted_8 = ["value"];
|
|
1134
|
-
const _sfc_main$
|
|
1135
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1135
1136
|
__name: "ColorPicker",
|
|
1136
1137
|
props: {
|
|
1137
1138
|
modelValue: { default: "#3b82f6" },
|
|
@@ -1159,11 +1160,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1159
1160
|
] },
|
|
1160
1161
|
showInput: { type: Boolean, default: true },
|
|
1161
1162
|
disabled: { type: Boolean, default: false },
|
|
1162
|
-
label: {}
|
|
1163
|
+
label: {},
|
|
1164
|
+
teleport: { type: [String, Boolean], default: false }
|
|
1163
1165
|
},
|
|
1164
1166
|
emits: ["update:modelValue"],
|
|
1165
1167
|
setup(__props, { emit: __emit }) {
|
|
1166
1168
|
const props = __props;
|
|
1169
|
+
const teleportDisabled = computed(() => props.teleport === false);
|
|
1170
|
+
const teleportTarget = computed(() => props.teleport === false ? "body" : props.teleport);
|
|
1167
1171
|
const emit = __emit;
|
|
1168
1172
|
const isOpen = ref(false);
|
|
1169
1173
|
const inputValue = ref(props.modelValue);
|
|
@@ -1197,8 +1201,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1197
1201
|
isOpen.value = false;
|
|
1198
1202
|
};
|
|
1199
1203
|
return (_ctx, _cache) => {
|
|
1200
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1201
|
-
__props.label ? (openBlock(), createElementBlock("label", _hoisted_2$
|
|
1204
|
+
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
1205
|
+
__props.label ? (openBlock(), createElementBlock("label", _hoisted_2$2, toDisplayString(__props.label), 1)) : createCommentVNode("", true),
|
|
1202
1206
|
createElementVNode("button", {
|
|
1203
1207
|
type: "button",
|
|
1204
1208
|
class: normalizeClass(["flex items-center gap-2 px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors", { "opacity-50 cursor-not-allowed": __props.disabled }]),
|
|
@@ -1209,90 +1213,95 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1209
1213
|
class: "w-6 h-6 rounded border border-gray-200 dark:border-gray-600",
|
|
1210
1214
|
style: normalizeStyle({ backgroundColor: __props.modelValue })
|
|
1211
1215
|
}, null, 4),
|
|
1212
|
-
createElementVNode("span", _hoisted_4, toDisplayString(__props.modelValue), 1),
|
|
1216
|
+
createElementVNode("span", _hoisted_4$1, toDisplayString(__props.modelValue), 1),
|
|
1213
1217
|
createVNode(unref(Icon), {
|
|
1214
1218
|
icon: "heroicons:chevron-down",
|
|
1215
1219
|
class: normalizeClass(["w-4 h-4 text-gray-400", { "rotate-180": isOpen.value }])
|
|
1216
1220
|
}, null, 8, ["class"])
|
|
1217
|
-
], 10, _hoisted_3$
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1221
|
+
], 10, _hoisted_3$2),
|
|
1222
|
+
(openBlock(), createBlock(Teleport, {
|
|
1223
|
+
to: teleportTarget.value,
|
|
1224
|
+
disabled: teleportDisabled.value
|
|
1225
|
+
}, [
|
|
1226
|
+
createVNode(Transition, {
|
|
1227
|
+
"enter-active-class": "transition duration-100 ease-out",
|
|
1228
|
+
"enter-from-class": "opacity-0 scale-95",
|
|
1229
|
+
"enter-to-class": "opacity-100 scale-100",
|
|
1230
|
+
"leave-active-class": "transition duration-75 ease-in",
|
|
1231
|
+
"leave-from-class": "opacity-100 scale-100",
|
|
1232
|
+
"leave-to-class": "opacity-0 scale-95"
|
|
1233
|
+
}, {
|
|
1234
|
+
default: withCtx(() => [
|
|
1235
|
+
isOpen.value ? (openBlock(), createElementBlock("div", {
|
|
1236
|
+
key: 0,
|
|
1237
|
+
class: "absolute z-50 mt-2 p-3 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg",
|
|
1238
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
1239
|
+
}, ["stop"]))
|
|
1240
|
+
}, [
|
|
1241
|
+
createElementVNode("div", _hoisted_5$1, [
|
|
1242
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.swatches, (color) => {
|
|
1243
|
+
return openBlock(), createElementBlock("button", {
|
|
1244
|
+
key: color,
|
|
1245
|
+
type: "button",
|
|
1246
|
+
class: normalizeClass(["w-8 h-8 rounded-lg border-2 transition-transform hover:scale-110 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-1", [
|
|
1247
|
+
__props.modelValue === color ? "border-primary-500 ring-2 ring-primary-500 ring-offset-1" : "border-transparent"
|
|
1248
|
+
]]),
|
|
1249
|
+
style: normalizeStyle({ backgroundColor: color }),
|
|
1250
|
+
title: color,
|
|
1251
|
+
onClick: ($event) => selectColor(color)
|
|
1252
|
+
}, [
|
|
1253
|
+
__props.modelValue === color ? (openBlock(), createBlock(unref(Icon), {
|
|
1254
|
+
key: 0,
|
|
1255
|
+
icon: "heroicons:check",
|
|
1256
|
+
class: normalizeClass(["w-4 h-4 mx-auto", [
|
|
1257
|
+
["#ffffff", "#f9fafb", "#f3f4f6", "#e5e7eb", "#eab308", "#f59e0b"].includes(color) ? "text-gray-800" : "text-white"
|
|
1258
|
+
]])
|
|
1259
|
+
}, null, 8, ["class"])) : createCommentVNode("", true)
|
|
1260
|
+
], 14, _hoisted_6$1);
|
|
1261
|
+
}), 128))
|
|
1262
|
+
]),
|
|
1263
|
+
__props.showInput ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
1264
|
+
createElementVNode("input", {
|
|
1265
|
+
type: "color",
|
|
1266
|
+
value: __props.modelValue,
|
|
1267
|
+
class: "w-8 h-8 rounded cursor-pointer border-0 p-0",
|
|
1268
|
+
onInput: handleNativeInput
|
|
1269
|
+
}, null, 40, _hoisted_8),
|
|
1270
|
+
withDirectives(createElementVNode("input", {
|
|
1271
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
|
|
1272
|
+
type: "text",
|
|
1273
|
+
class: "flex-1 px-2 py-1 text-sm font-mono border border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-900 dark:text-white",
|
|
1274
|
+
placeholder: "#000000",
|
|
1275
|
+
onChange: handleInputChange,
|
|
1276
|
+
onKeyup: withKeys(handleInputChange, ["enter"])
|
|
1277
|
+
}, null, 544), [
|
|
1278
|
+
[vModelText, inputValue.value]
|
|
1279
|
+
])
|
|
1280
|
+
])) : createCommentVNode("", true)
|
|
1272
1281
|
])) : createCommentVNode("", true)
|
|
1273
|
-
])
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
+
]),
|
|
1283
|
+
_: 1
|
|
1284
|
+
}),
|
|
1285
|
+
isOpen.value ? (openBlock(), createElementBlock("div", {
|
|
1286
|
+
key: 0,
|
|
1287
|
+
class: "fixed inset-0 z-40",
|
|
1288
|
+
onClick: closePicker
|
|
1289
|
+
})) : createCommentVNode("", true)
|
|
1290
|
+
], 8, ["to", "disabled"]))
|
|
1282
1291
|
]);
|
|
1283
1292
|
};
|
|
1284
1293
|
}
|
|
1285
1294
|
});
|
|
1286
|
-
const _hoisted_1 = { class: "space-y-2" };
|
|
1287
|
-
const _hoisted_2 = {
|
|
1295
|
+
const _hoisted_1$1 = { class: "space-y-2" };
|
|
1296
|
+
const _hoisted_2$1 = {
|
|
1288
1297
|
key: 0,
|
|
1289
1298
|
class: "flex justify-between text-sm font-medium text-gray-700 dark:text-gray-300"
|
|
1290
1299
|
};
|
|
1291
|
-
const _hoisted_3 = {
|
|
1300
|
+
const _hoisted_3$1 = {
|
|
1292
1301
|
key: 1,
|
|
1293
1302
|
class: "flex justify-between text-xs text-gray-500 dark:text-gray-400"
|
|
1294
1303
|
};
|
|
1295
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1304
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
1296
1305
|
__name: "RangeSlider",
|
|
1297
1306
|
props: {
|
|
1298
1307
|
modelValue: { default: () => [25, 75] },
|
|
@@ -1370,8 +1379,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1370
1379
|
}
|
|
1371
1380
|
};
|
|
1372
1381
|
return (_ctx, _cache) => {
|
|
1373
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
1374
|
-
__props.showLabels ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
1382
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
1383
|
+
__props.showLabels ? (openBlock(), createElementBlock("div", _hoisted_2$1, [
|
|
1375
1384
|
createElementVNode("span", null, toDisplayString(__props.formatLabel(minValue.value)), 1),
|
|
1376
1385
|
createElementVNode("span", null, toDisplayString(__props.formatLabel(maxValue.value)), 1)
|
|
1377
1386
|
])) : createCommentVNode("", true),
|
|
@@ -1404,7 +1413,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1404
1413
|
onMousedown: _cache[1] || (_cache[1] = ($event) => handleMouseDown("max"))
|
|
1405
1414
|
}, null, 38)
|
|
1406
1415
|
], 2),
|
|
1407
|
-
__props.showMinMax ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
1416
|
+
__props.showMinMax ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
1408
1417
|
createElementVNode("span", null, toDisplayString(__props.formatLabel(__props.min)), 1),
|
|
1409
1418
|
createElementVNode("span", null, toDisplayString(__props.formatLabel(__props.max)), 1)
|
|
1410
1419
|
])) : createCommentVNode("", true)
|
|
@@ -1412,19 +1421,233 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1412
1421
|
};
|
|
1413
1422
|
}
|
|
1414
1423
|
});
|
|
1424
|
+
const _hoisted_1 = ["id", "name", "placeholder", "disabled"];
|
|
1425
|
+
const _hoisted_2 = { class: "flex items-center gap-1" };
|
|
1426
|
+
const _hoisted_3 = {
|
|
1427
|
+
key: 0,
|
|
1428
|
+
class: "absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-lg border border-gray-200 bg-white py-1 shadow-lg dark:border-gray-700 dark:bg-gray-900"
|
|
1429
|
+
};
|
|
1430
|
+
const _hoisted_4 = ["disabled", "onClick"];
|
|
1431
|
+
const _hoisted_5 = { class: "flex-1" };
|
|
1432
|
+
const _hoisted_6 = {
|
|
1433
|
+
key: 1,
|
|
1434
|
+
class: "px-3 py-2 text-center text-sm text-gray-500 dark:text-gray-400"
|
|
1435
|
+
};
|
|
1436
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1437
|
+
__name: "Combobox",
|
|
1438
|
+
props: {
|
|
1439
|
+
modelValue: {},
|
|
1440
|
+
options: {},
|
|
1441
|
+
placeholder: { default: "Select..." },
|
|
1442
|
+
searchPlaceholder: { default: "Search..." },
|
|
1443
|
+
multiple: { type: Boolean, default: false },
|
|
1444
|
+
disabled: { type: Boolean, default: false },
|
|
1445
|
+
clearable: { type: Boolean, default: false },
|
|
1446
|
+
noResultsText: { default: "No results found" },
|
|
1447
|
+
name: {},
|
|
1448
|
+
id: {},
|
|
1449
|
+
teleport: { type: [String, Boolean], default: false }
|
|
1450
|
+
},
|
|
1451
|
+
emits: ["update:modelValue"],
|
|
1452
|
+
setup(__props, { emit: __emit }) {
|
|
1453
|
+
const props = __props;
|
|
1454
|
+
const teleportDisabled = computed(() => props.teleport === false);
|
|
1455
|
+
const teleportTarget = computed(() => props.teleport === false ? "body" : props.teleport);
|
|
1456
|
+
const emit = __emit;
|
|
1457
|
+
const containerRef = ref();
|
|
1458
|
+
const inputRef = ref();
|
|
1459
|
+
const isOpen = ref(false);
|
|
1460
|
+
const search = ref("");
|
|
1461
|
+
onClickOutside(containerRef, () => {
|
|
1462
|
+
isOpen.value = false;
|
|
1463
|
+
});
|
|
1464
|
+
const filteredOptions = computed(() => {
|
|
1465
|
+
if (!search.value) return props.options;
|
|
1466
|
+
const query = search.value.toLowerCase();
|
|
1467
|
+
return props.options.filter(
|
|
1468
|
+
(opt) => opt.label.toLowerCase().includes(query)
|
|
1469
|
+
);
|
|
1470
|
+
});
|
|
1471
|
+
const selectedOptions = computed(() => {
|
|
1472
|
+
if (props.modelValue === null || props.modelValue === void 0) return [];
|
|
1473
|
+
const values = Array.isArray(props.modelValue) ? props.modelValue : [props.modelValue];
|
|
1474
|
+
return props.options.filter((opt) => values.includes(opt.value));
|
|
1475
|
+
});
|
|
1476
|
+
const displayValue = computed(() => {
|
|
1477
|
+
var _a;
|
|
1478
|
+
if (selectedOptions.value.length === 0) return "";
|
|
1479
|
+
if (props.multiple) {
|
|
1480
|
+
return selectedOptions.value.map((o) => o.label).join(", ");
|
|
1481
|
+
}
|
|
1482
|
+
return ((_a = selectedOptions.value[0]) == null ? void 0 : _a.label) || "";
|
|
1483
|
+
});
|
|
1484
|
+
const isSelected = (option) => {
|
|
1485
|
+
if (props.modelValue === null || props.modelValue === void 0) return false;
|
|
1486
|
+
if (Array.isArray(props.modelValue)) {
|
|
1487
|
+
return props.modelValue.includes(option.value);
|
|
1488
|
+
}
|
|
1489
|
+
return props.modelValue === option.value;
|
|
1490
|
+
};
|
|
1491
|
+
const toggleOption = (option) => {
|
|
1492
|
+
if (option.disabled) return;
|
|
1493
|
+
if (props.multiple) {
|
|
1494
|
+
const currentValues = Array.isArray(props.modelValue) ? [...props.modelValue] : [];
|
|
1495
|
+
const index = currentValues.indexOf(option.value);
|
|
1496
|
+
if (index === -1) {
|
|
1497
|
+
currentValues.push(option.value);
|
|
1498
|
+
} else {
|
|
1499
|
+
currentValues.splice(index, 1);
|
|
1500
|
+
}
|
|
1501
|
+
emit("update:modelValue", currentValues);
|
|
1502
|
+
} else {
|
|
1503
|
+
emit("update:modelValue", option.value);
|
|
1504
|
+
isOpen.value = false;
|
|
1505
|
+
search.value = "";
|
|
1506
|
+
}
|
|
1507
|
+
};
|
|
1508
|
+
const clear = () => {
|
|
1509
|
+
emit("update:modelValue", props.multiple ? [] : null);
|
|
1510
|
+
search.value = "";
|
|
1511
|
+
};
|
|
1512
|
+
const openDropdown = () => {
|
|
1513
|
+
if (props.disabled) return;
|
|
1514
|
+
isOpen.value = true;
|
|
1515
|
+
nextTick(() => {
|
|
1516
|
+
var _a;
|
|
1517
|
+
(_a = inputRef.value) == null ? void 0 : _a.focus();
|
|
1518
|
+
});
|
|
1519
|
+
};
|
|
1520
|
+
watch(isOpen, (open) => {
|
|
1521
|
+
if (!open) {
|
|
1522
|
+
search.value = "";
|
|
1523
|
+
}
|
|
1524
|
+
});
|
|
1525
|
+
return (_ctx, _cache) => {
|
|
1526
|
+
return openBlock(), createElementBlock("div", {
|
|
1527
|
+
ref_key: "containerRef",
|
|
1528
|
+
ref: containerRef,
|
|
1529
|
+
class: "relative"
|
|
1530
|
+
}, [
|
|
1531
|
+
createElementVNode("div", {
|
|
1532
|
+
class: normalizeClass([
|
|
1533
|
+
"flex min-h-[42px] w-full cursor-pointer items-center rounded-lg border bg-white px-3 py-2 transition-colors",
|
|
1534
|
+
"dark:bg-gray-900",
|
|
1535
|
+
__props.disabled ? "cursor-not-allowed border-gray-200 bg-gray-50 dark:border-gray-700 dark:bg-gray-800" : isOpen.value ? "border-primary ring-2 ring-primary/20" : "border-gray-300 hover:border-gray-400 dark:border-gray-600 dark:hover:border-gray-500"
|
|
1536
|
+
]),
|
|
1537
|
+
onClick: openDropdown
|
|
1538
|
+
}, [
|
|
1539
|
+
!isOpen.value ? (openBlock(), createElementBlock("span", {
|
|
1540
|
+
key: 0,
|
|
1541
|
+
class: normalizeClass([
|
|
1542
|
+
"flex-1 truncate text-sm",
|
|
1543
|
+
selectedOptions.value.length ? "text-gray-900 dark:text-gray-100" : "text-gray-400 dark:text-gray-500"
|
|
1544
|
+
])
|
|
1545
|
+
}, toDisplayString(displayValue.value || __props.placeholder), 3)) : withDirectives((openBlock(), createElementBlock("input", {
|
|
1546
|
+
key: 1,
|
|
1547
|
+
id: __props.id,
|
|
1548
|
+
ref_key: "inputRef",
|
|
1549
|
+
ref: inputRef,
|
|
1550
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => search.value = $event),
|
|
1551
|
+
type: "text",
|
|
1552
|
+
name: __props.name,
|
|
1553
|
+
placeholder: __props.searchPlaceholder,
|
|
1554
|
+
disabled: __props.disabled,
|
|
1555
|
+
class: "flex-1 border-none bg-transparent text-sm text-gray-900 outline-none placeholder:text-gray-400 dark:text-gray-100 dark:placeholder:text-gray-500",
|
|
1556
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
1557
|
+
}, ["stop"]))
|
|
1558
|
+
}, null, 8, _hoisted_1)), [
|
|
1559
|
+
[vModelText, search.value]
|
|
1560
|
+
]),
|
|
1561
|
+
createElementVNode("div", _hoisted_2, [
|
|
1562
|
+
__props.clearable && selectedOptions.value.length > 0 && !__props.disabled ? (openBlock(), createElementBlock("button", {
|
|
1563
|
+
key: 0,
|
|
1564
|
+
type: "button",
|
|
1565
|
+
class: "rounded p-0.5 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",
|
|
1566
|
+
onClick: withModifiers(clear, ["stop"])
|
|
1567
|
+
}, [
|
|
1568
|
+
createVNode(unref(Icon), {
|
|
1569
|
+
icon: "lucide:x",
|
|
1570
|
+
class: "h-4 w-4"
|
|
1571
|
+
})
|
|
1572
|
+
])) : createCommentVNode("", true),
|
|
1573
|
+
createVNode(unref(Icon), {
|
|
1574
|
+
icon: "lucide:chevron-down",
|
|
1575
|
+
class: normalizeClass([
|
|
1576
|
+
"h-4 w-4 text-gray-400 transition-transform",
|
|
1577
|
+
isOpen.value && "rotate-180"
|
|
1578
|
+
])
|
|
1579
|
+
}, null, 8, ["class"])
|
|
1580
|
+
])
|
|
1581
|
+
], 2),
|
|
1582
|
+
(openBlock(), createBlock(Teleport, {
|
|
1583
|
+
to: teleportTarget.value,
|
|
1584
|
+
disabled: teleportDisabled.value
|
|
1585
|
+
}, [
|
|
1586
|
+
createVNode(Transition, {
|
|
1587
|
+
"enter-active-class": "transition duration-100 ease-out",
|
|
1588
|
+
"enter-from-class": "transform scale-95 opacity-0",
|
|
1589
|
+
"enter-to-class": "transform scale-100 opacity-100",
|
|
1590
|
+
"leave-active-class": "transition duration-75 ease-in",
|
|
1591
|
+
"leave-from-class": "transform scale-100 opacity-100",
|
|
1592
|
+
"leave-to-class": "transform scale-95 opacity-0"
|
|
1593
|
+
}, {
|
|
1594
|
+
default: withCtx(() => [
|
|
1595
|
+
isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
1596
|
+
filteredOptions.value.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(filteredOptions.value, (option) => {
|
|
1597
|
+
return openBlock(), createElementBlock("button", {
|
|
1598
|
+
key: option.value,
|
|
1599
|
+
type: "button",
|
|
1600
|
+
disabled: option.disabled,
|
|
1601
|
+
class: normalizeClass([
|
|
1602
|
+
"flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition-colors",
|
|
1603
|
+
option.disabled ? "cursor-not-allowed text-gray-400 dark:text-gray-500" : isSelected(option) ? "bg-primary/10 text-primary dark:bg-primary/20" : "text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-800"
|
|
1604
|
+
]),
|
|
1605
|
+
onClick: ($event) => toggleOption(option)
|
|
1606
|
+
}, [
|
|
1607
|
+
__props.multiple ? (openBlock(), createElementBlock("span", {
|
|
1608
|
+
key: 0,
|
|
1609
|
+
class: normalizeClass([
|
|
1610
|
+
"flex h-4 w-4 items-center justify-center rounded border",
|
|
1611
|
+
isSelected(option) ? "border-primary bg-primary text-white" : "border-gray-300 dark:border-gray-600"
|
|
1612
|
+
])
|
|
1613
|
+
}, [
|
|
1614
|
+
isSelected(option) ? (openBlock(), createBlock(unref(Icon), {
|
|
1615
|
+
key: 0,
|
|
1616
|
+
icon: "lucide:check",
|
|
1617
|
+
class: "h-3 w-3"
|
|
1618
|
+
})) : createCommentVNode("", true)
|
|
1619
|
+
], 2)) : createCommentVNode("", true),
|
|
1620
|
+
createElementVNode("span", _hoisted_5, toDisplayString(option.label), 1),
|
|
1621
|
+
!__props.multiple && isSelected(option) ? (openBlock(), createBlock(unref(Icon), {
|
|
1622
|
+
key: 1,
|
|
1623
|
+
icon: "lucide:check",
|
|
1624
|
+
class: "h-4 w-4 text-primary"
|
|
1625
|
+
})) : createCommentVNode("", true)
|
|
1626
|
+
], 10, _hoisted_4);
|
|
1627
|
+
}), 128)) : (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(__props.noResultsText), 1))
|
|
1628
|
+
])) : createCommentVNode("", true)
|
|
1629
|
+
]),
|
|
1630
|
+
_: 1
|
|
1631
|
+
})
|
|
1632
|
+
], 8, ["to", "disabled"]))
|
|
1633
|
+
], 512);
|
|
1634
|
+
};
|
|
1635
|
+
}
|
|
1636
|
+
});
|
|
1415
1637
|
export {
|
|
1416
1638
|
Slider as S,
|
|
1417
|
-
_sfc_main$
|
|
1418
|
-
_sfc_main$
|
|
1419
|
-
_sfc_main$
|
|
1420
|
-
_sfc_main$
|
|
1421
|
-
_sfc_main$
|
|
1422
|
-
_sfc_main$
|
|
1423
|
-
_sfc_main$
|
|
1424
|
-
_sfc_main$
|
|
1425
|
-
_sfc_main$
|
|
1426
|
-
_sfc_main$
|
|
1427
|
-
_sfc_main$
|
|
1428
|
-
_sfc_main as k
|
|
1639
|
+
_sfc_main$d as _,
|
|
1640
|
+
_sfc_main$c as a,
|
|
1641
|
+
_sfc_main$b as b,
|
|
1642
|
+
_sfc_main$a as c,
|
|
1643
|
+
_sfc_main$9 as d,
|
|
1644
|
+
_sfc_main$8 as e,
|
|
1645
|
+
_sfc_main$7 as f,
|
|
1646
|
+
_sfc_main$5 as g,
|
|
1647
|
+
_sfc_main$4 as h,
|
|
1648
|
+
_sfc_main$3 as i,
|
|
1649
|
+
_sfc_main$2 as j,
|
|
1650
|
+
_sfc_main$1 as k,
|
|
1651
|
+
_sfc_main as l
|
|
1429
1652
|
};
|
|
1430
|
-
//# sourceMappingURL=
|
|
1653
|
+
//# sourceMappingURL=Combobox.vue_vue_type_script_setup_true_lang-DhcLb6DX.js.map
|