cisse-vue-ui 0.5.30 → 0.5.32
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/{DarkModeToggle.vue_vue_type_script_setup_true_lang-BBIkEeLJ.js → DarkModeToggle.vue_vue_type_script_setup_true_lang-0K4ucPlO.js} +2 -2
- package/dist/{DarkModeToggle.vue_vue_type_script_setup_true_lang-BBIkEeLJ.js.map → DarkModeToggle.vue_vue_type_script_setup_true_lang-0K4ucPlO.js.map} +1 -1
- package/dist/{DarkModeToggle.vue_vue_type_script_setup_true_lang-BHabkuFp.cjs → DarkModeToggle.vue_vue_type_script_setup_true_lang-DOrIWBcH.cjs} +2 -2
- package/dist/{DarkModeToggle.vue_vue_type_script_setup_true_lang-BHabkuFp.cjs.map → DarkModeToggle.vue_vue_type_script_setup_true_lang-DOrIWBcH.cjs.map} +1 -1
- package/dist/{Combobox.vue_vue_type_script_setup_true_lang-Dlza3xUG.js → IconPicker.vue_vue_type_script_setup_true_lang-Ch1x6Ap9.js} +474 -180
- package/dist/IconPicker.vue_vue_type_script_setup_true_lang-Ch1x6Ap9.js.map +1 -0
- package/dist/{Combobox.vue_vue_type_script_setup_true_lang-C2z3wwmX.cjs → IconPicker.vue_vue_type_script_setup_true_lang-agY_E72J.cjs} +474 -180
- package/dist/IconPicker.vue_vue_type_script_setup_true_lang-agY_E72J.cjs.map +1 -0
- package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-6Hqk04te.cjs → PageLayout.vue_vue_type_script_setup_true_lang-DTVojbLU.cjs} +15 -3
- package/dist/PageLayout.vue_vue_type_script_setup_true_lang-DTVojbLU.cjs.map +1 -0
- package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-C1zrOWOi.js → PageLayout.vue_vue_type_script_setup_true_lang-DcSTegL0.js} +16 -4
- package/dist/PageLayout.vue_vue_type_script_setup_true_lang-DcSTegL0.js.map +1 -0
- package/dist/components/core/index.cjs +1 -1
- package/dist/components/core/index.js +1 -1
- package/dist/components/form/IconPicker.vue.d.ts +33 -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 +1 -0
- package/dist/components/form/index.js +3 -2
- package/dist/components/index.cjs +19 -18
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +5 -4
- package/dist/components/layout/BaseLayout.vue.d.ts +5 -1
- package/dist/components/layout/index.cjs +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/{index-CJwlO351.js → index-BaWpldIJ.js} +58 -3
- package/dist/{index-CJwlO351.js.map → index-BaWpldIJ.js.map} +1 -1
- package/dist/{index-ChV8B_ZB.cjs → index-ChwvHG2L.cjs} +20 -19
- package/dist/index-ChwvHG2L.cjs.map +1 -0
- package/dist/{index-CUNU12xk.cjs → index-D1x3TH9k.cjs} +56 -1
- package/dist/{index-CUNU12xk.cjs.map → index-D1x3TH9k.cjs.map} +1 -1
- package/dist/index-DaA7OpRC.js +76 -0
- package/dist/index-DaA7OpRC.js.map +1 -0
- package/dist/index.cjs +20 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -5
- package/dist/style.css +1 -1
- package/dist/types/components.d.ts +1 -0
- package/package.json +1 -1
- package/dist/Combobox.vue_vue_type_script_setup_true_lang-C2z3wwmX.cjs.map +0 -1
- package/dist/Combobox.vue_vue_type_script_setup_true_lang-Dlza3xUG.js.map +0 -1
- package/dist/PageLayout.vue_vue_type_script_setup_true_lang-6Hqk04te.cjs.map +0 -1
- package/dist/PageLayout.vue_vue_type_script_setup_true_lang-C1zrOWOi.js.map +0 -1
- package/dist/index-CFtit7xh.js +0 -75
- package/dist/index-CFtit7xh.js.map +0 -1
- package/dist/index-ChV8B_ZB.cjs.map +0 -1
|
@@ -3,9 +3,9 @@ import { u as useId } from "./useId-xeHj7rkg.js";
|
|
|
3
3
|
import { Icon } from "@iconify/vue";
|
|
4
4
|
import { u as useDropdown } from "./useDropdown-iVu14E6s.js";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js";
|
|
6
|
-
import { o as onClickOutside } from "./index-
|
|
7
|
-
const _hoisted_1$
|
|
8
|
-
const _sfc_main$
|
|
6
|
+
import { o as onClickOutside, u as useDebounceFn } from "./index-BaWpldIJ.js";
|
|
7
|
+
const _hoisted_1$e = ["data-error", "for"];
|
|
8
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
9
9
|
__name: "FormLabel",
|
|
10
10
|
props: {
|
|
11
11
|
error: { type: [String, Boolean] },
|
|
@@ -19,12 +19,12 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
19
19
|
class: "block text-sm font-medium text-gray-700 data-[error=true]:text-red-500 dark:text-gray-300"
|
|
20
20
|
}, [
|
|
21
21
|
renderSlot(_ctx.$slots, "default")
|
|
22
|
-
], 8, _hoisted_1$
|
|
22
|
+
], 8, _hoisted_1$e);
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
|
-
const _hoisted_1$
|
|
27
|
-
const _sfc_main$
|
|
26
|
+
const _hoisted_1$d = ["id", "data-error", "role", "aria-live"];
|
|
27
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
28
28
|
__name: "FormHelp",
|
|
29
29
|
props: {
|
|
30
30
|
id: {},
|
|
@@ -43,12 +43,12 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
43
43
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
44
44
|
createTextVNode(toDisplayString(__props.text ?? ""), 1)
|
|
45
45
|
])
|
|
46
|
-
], 8, _hoisted_1$
|
|
46
|
+
], 8, _hoisted_1$d);
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
-
const _hoisted_1$
|
|
51
|
-
const _sfc_main$
|
|
50
|
+
const _hoisted_1$c = ["id", "disabled", "name", "placeholder", "type", "required", "aria-invalid", "aria-required", "aria-describedby"];
|
|
51
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
52
52
|
__name: "FormInput",
|
|
53
53
|
props: /* @__PURE__ */ mergeModels({
|
|
54
54
|
type: { default: "text" },
|
|
@@ -81,35 +81,35 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
81
81
|
"aria-required": props.required || void 0,
|
|
82
82
|
"aria-describedby": props.describedBy || void 0,
|
|
83
83
|
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-hidden 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"
|
|
84
|
-
}, _ctx.$attrs), null, 16, _hoisted_1$
|
|
84
|
+
}, _ctx.$attrs), null, 16, _hoisted_1$c)), [
|
|
85
85
|
[vModelDynamic, modelValue.value]
|
|
86
86
|
]);
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
|
-
const _hoisted_1$
|
|
91
|
-
const _hoisted_2$
|
|
92
|
-
const _hoisted_3$
|
|
93
|
-
const _hoisted_4$
|
|
94
|
-
const _hoisted_5$
|
|
90
|
+
const _hoisted_1$b = { class: "relative" };
|
|
91
|
+
const _hoisted_2$a = ["id", "disabled", "aria-expanded", "aria-controls", "aria-invalid", "aria-describedby"];
|
|
92
|
+
const _hoisted_3$9 = { class: "flex-1 truncate" };
|
|
93
|
+
const _hoisted_4$7 = ["id", "aria-label"];
|
|
94
|
+
const _hoisted_5$6 = {
|
|
95
95
|
key: 0,
|
|
96
96
|
class: "sticky top-0 border-b border-gray-200 bg-white p-2 dark:border-gray-700 dark:bg-gray-800"
|
|
97
97
|
};
|
|
98
|
-
const _hoisted_6$
|
|
99
|
-
const _hoisted_7$
|
|
98
|
+
const _hoisted_6$6 = { 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" };
|
|
99
|
+
const _hoisted_7$6 = {
|
|
100
100
|
key: 1,
|
|
101
101
|
class: "px-4 py-3 text-sm text-gray-500 dark:text-gray-400",
|
|
102
102
|
role: "status"
|
|
103
103
|
};
|
|
104
|
-
const _hoisted_8$
|
|
105
|
-
const _hoisted_9$
|
|
106
|
-
const _hoisted_10$
|
|
104
|
+
const _hoisted_8$5 = { class: "py-1" };
|
|
105
|
+
const _hoisted_9$3 = ["aria-selected", "data-index", "onClick", "onMouseenter"];
|
|
106
|
+
const _hoisted_10$3 = {
|
|
107
107
|
key: 1,
|
|
108
108
|
class: "size-4 shrink-0",
|
|
109
109
|
"aria-hidden": "true"
|
|
110
110
|
};
|
|
111
|
-
const _hoisted_11$
|
|
112
|
-
const _sfc_main$
|
|
111
|
+
const _hoisted_11$3 = { class: "flex-1" };
|
|
112
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
113
113
|
__name: "FormSelect",
|
|
114
114
|
props: /* @__PURE__ */ mergeModels({
|
|
115
115
|
options: {},
|
|
@@ -227,7 +227,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
227
227
|
return [base, state, text, props.triggerClass];
|
|
228
228
|
});
|
|
229
229
|
return (_ctx, _cache) => {
|
|
230
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
230
|
+
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
231
231
|
createElementVNode("button", {
|
|
232
232
|
id: triggerId.value,
|
|
233
233
|
ref_key: "triggerRef",
|
|
@@ -247,14 +247,14 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
247
247
|
option: selectedOption.value,
|
|
248
248
|
placeholder: __props.placeholder
|
|
249
249
|
}, () => [
|
|
250
|
-
createElementVNode("span", _hoisted_3$
|
|
250
|
+
createElementVNode("span", _hoisted_3$9, toDisplayString(displayValue.value), 1)
|
|
251
251
|
]),
|
|
252
252
|
createVNode(unref(Icon), {
|
|
253
253
|
icon: "lucide:chevron-down",
|
|
254
254
|
class: normalizeClass(["size-4 shrink-0 text-gray-400 transition-transform", unref(isOpen) && "rotate-180"]),
|
|
255
255
|
"aria-hidden": "true"
|
|
256
256
|
}, null, 8, ["class"])
|
|
257
|
-
], 42, _hoisted_2$
|
|
257
|
+
], 42, _hoisted_2$a),
|
|
258
258
|
(openBlock(), createBlock(Teleport, {
|
|
259
259
|
to: "body",
|
|
260
260
|
disabled: !__props.teleport
|
|
@@ -281,8 +281,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
281
281
|
!__props.teleport && "absolute mt-1 w-full"
|
|
282
282
|
])
|
|
283
283
|
}, [
|
|
284
|
-
__props.searchable ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
285
|
-
createElementVNode("div", _hoisted_6$
|
|
284
|
+
__props.searchable ? (openBlock(), createElementBlock("div", _hoisted_5$6, [
|
|
285
|
+
createElementVNode("div", _hoisted_6$6, [
|
|
286
286
|
createVNode(unref(Icon), {
|
|
287
287
|
icon: "lucide:search",
|
|
288
288
|
class: "size-4 text-gray-400",
|
|
@@ -302,8 +302,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
302
302
|
])
|
|
303
303
|
])
|
|
304
304
|
])) : createCommentVNode("", true),
|
|
305
|
-
filteredOptions.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_7$
|
|
306
|
-
createElementVNode("div", _hoisted_8$
|
|
305
|
+
filteredOptions.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_7$6, toDisplayString(__props.noResultsText), 1)) : createCommentVNode("", true),
|
|
306
|
+
createElementVNode("div", _hoisted_8$5, [
|
|
307
307
|
(openBlock(true), createElementBlock(Fragment, null, renderList(filteredOptions.value, (option, index) => {
|
|
308
308
|
return openBlock(), createElementBlock("button", {
|
|
309
309
|
key: String(option.value),
|
|
@@ -330,13 +330,13 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
330
330
|
icon: "lucide:check",
|
|
331
331
|
class: "size-4 shrink-0 text-primary",
|
|
332
332
|
"aria-hidden": "true"
|
|
333
|
-
})) : (openBlock(), createElementBlock("span", _hoisted_10$
|
|
334
|
-
createElementVNode("span", _hoisted_11$
|
|
333
|
+
})) : (openBlock(), createElementBlock("span", _hoisted_10$3)),
|
|
334
|
+
createElementVNode("span", _hoisted_11$3, toDisplayString(option.label), 1)
|
|
335
335
|
])
|
|
336
|
-
], 42, _hoisted_9$
|
|
336
|
+
], 42, _hoisted_9$3);
|
|
337
337
|
}), 128))
|
|
338
338
|
])
|
|
339
|
-
], 14, _hoisted_4$
|
|
339
|
+
], 14, _hoisted_4$7)) : createCommentVNode("", true)
|
|
340
340
|
]),
|
|
341
341
|
_: 3
|
|
342
342
|
})
|
|
@@ -345,8 +345,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
347
|
});
|
|
348
|
-
const _hoisted_1$
|
|
349
|
-
const _sfc_main$
|
|
348
|
+
const _hoisted_1$a = ["hidden"];
|
|
349
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
350
350
|
__name: "FormGroup",
|
|
351
351
|
props: /* @__PURE__ */ mergeModels({
|
|
352
352
|
label: {},
|
|
@@ -385,7 +385,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
385
385
|
}, [
|
|
386
386
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
387
387
|
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
388
|
-
__props.label ? (openBlock(), createBlock(_sfc_main$
|
|
388
|
+
__props.label ? (openBlock(), createBlock(_sfc_main$e, {
|
|
389
389
|
key: 0,
|
|
390
390
|
"html-for": inputId.value,
|
|
391
391
|
error: __props.error
|
|
@@ -397,7 +397,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
397
397
|
}, 8, ["html-for", "error"])) : createCommentVNode("", true)
|
|
398
398
|
]),
|
|
399
399
|
renderSlot(_ctx.$slots, "input", {}, () => [
|
|
400
|
-
isSelect.value ? (openBlock(), createBlock(_sfc_main$
|
|
400
|
+
isSelect.value ? (openBlock(), createBlock(_sfc_main$b, mergeProps({
|
|
401
401
|
key: 0,
|
|
402
402
|
modelValue: modelValue.value,
|
|
403
403
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event)
|
|
@@ -405,7 +405,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
405
405
|
id: inputId.value,
|
|
406
406
|
invalid: Boolean(__props.error),
|
|
407
407
|
"described-by": hasError.value ? helpId.value : void 0
|
|
408
|
-
}), null, 16, ["modelValue", "id", "invalid", "described-by"])) : (openBlock(), createBlock(_sfc_main$
|
|
408
|
+
}), null, 16, ["modelValue", "id", "invalid", "described-by"])) : (openBlock(), createBlock(_sfc_main$c, mergeProps({
|
|
409
409
|
key: 1,
|
|
410
410
|
modelValue: modelValue.value,
|
|
411
411
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => modelValue.value = $event)
|
|
@@ -415,7 +415,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
415
415
|
"described-by": hasError.value ? helpId.value : void 0
|
|
416
416
|
}), null, 16, ["modelValue", "id", "invalid", "described-by"]))
|
|
417
417
|
]),
|
|
418
|
-
hasError.value ? (openBlock(), createBlock(_sfc_main$
|
|
418
|
+
hasError.value ? (openBlock(), createBlock(_sfc_main$d, {
|
|
419
419
|
key: 0,
|
|
420
420
|
id: helpId.value,
|
|
421
421
|
error: true
|
|
@@ -426,13 +426,13 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
426
426
|
_: 1
|
|
427
427
|
}, 8, ["id"])) : createCommentVNode("", true)
|
|
428
428
|
])
|
|
429
|
-
], 12, _hoisted_1$
|
|
429
|
+
], 12, _hoisted_1$a);
|
|
430
430
|
};
|
|
431
431
|
}
|
|
432
432
|
});
|
|
433
|
-
const _hoisted_1$
|
|
434
|
-
const _hoisted_2$
|
|
435
|
-
const _sfc_main$
|
|
433
|
+
const _hoisted_1$9 = { class: "relative" };
|
|
434
|
+
const _hoisted_2$9 = ["disabled", "placeholder", "value"];
|
|
435
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
436
436
|
__name: "SearchInput",
|
|
437
437
|
props: {
|
|
438
438
|
modelValue: {},
|
|
@@ -448,7 +448,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
448
448
|
emit("update:modelValue", target.value);
|
|
449
449
|
};
|
|
450
450
|
return (_ctx, _cache) => {
|
|
451
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
451
|
+
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
452
452
|
createVNode(unref(Icon), {
|
|
453
453
|
icon: __props.icon,
|
|
454
454
|
class: "absolute top-1/2 left-3 size-5 -translate-y-1/2 text-gray-400"
|
|
@@ -460,19 +460,19 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
460
460
|
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",
|
|
461
461
|
type: "text",
|
|
462
462
|
onInput: handleInput
|
|
463
|
-
}, null, 40, _hoisted_2$
|
|
463
|
+
}, null, 40, _hoisted_2$9)
|
|
464
464
|
]);
|
|
465
465
|
};
|
|
466
466
|
}
|
|
467
467
|
});
|
|
468
|
-
const _hoisted_1$
|
|
469
|
-
const _hoisted_2$
|
|
468
|
+
const _hoisted_1$8 = ["id", "aria-checked", "aria-labelledby", "aria-describedby", "disabled"];
|
|
469
|
+
const _hoisted_2$8 = {
|
|
470
470
|
key: 0,
|
|
471
471
|
class: "flex flex-col"
|
|
472
472
|
};
|
|
473
|
-
const _hoisted_3$
|
|
474
|
-
const _hoisted_4$
|
|
475
|
-
const _sfc_main$
|
|
473
|
+
const _hoisted_3$8 = ["id"];
|
|
474
|
+
const _hoisted_4$6 = ["id"];
|
|
475
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
476
476
|
__name: "Switch",
|
|
477
477
|
props: {
|
|
478
478
|
modelValue: { type: Boolean, default: false },
|
|
@@ -536,35 +536,35 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
536
536
|
]),
|
|
537
537
|
"aria-hidden": "true"
|
|
538
538
|
}, null, 2)
|
|
539
|
-
], 10, _hoisted_1$
|
|
540
|
-
__props.label || __props.description ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
539
|
+
], 10, _hoisted_1$8),
|
|
540
|
+
__props.label || __props.description ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
|
|
541
541
|
__props.label ? (openBlock(), createElementBlock("span", {
|
|
542
542
|
key: 0,
|
|
543
543
|
id: labelId.value,
|
|
544
544
|
class: "text-sm font-medium text-gray-900 dark:text-white"
|
|
545
|
-
}, toDisplayString(__props.label), 9, _hoisted_3$
|
|
545
|
+
}, toDisplayString(__props.label), 9, _hoisted_3$8)) : createCommentVNode("", true),
|
|
546
546
|
__props.description ? (openBlock(), createElementBlock("span", {
|
|
547
547
|
key: 1,
|
|
548
548
|
id: descriptionId.value,
|
|
549
549
|
class: "text-sm text-gray-500 dark:text-gray-400"
|
|
550
|
-
}, toDisplayString(__props.description), 9, _hoisted_4$
|
|
550
|
+
}, toDisplayString(__props.description), 9, _hoisted_4$6)) : createCommentVNode("", true)
|
|
551
551
|
])) : createCommentVNode("", true)
|
|
552
552
|
], 2);
|
|
553
553
|
};
|
|
554
554
|
}
|
|
555
555
|
});
|
|
556
|
-
const _hoisted_1$
|
|
557
|
-
const _hoisted_2$
|
|
556
|
+
const _hoisted_1$7 = { class: "w-full" };
|
|
557
|
+
const _hoisted_2$7 = {
|
|
558
558
|
key: 0,
|
|
559
559
|
class: "mb-2 flex justify-between text-sm"
|
|
560
560
|
};
|
|
561
|
-
const _hoisted_3$
|
|
562
|
-
const _hoisted_4$
|
|
563
|
-
const _hoisted_5$
|
|
564
|
-
const _hoisted_6$
|
|
565
|
-
const _hoisted_7$
|
|
566
|
-
const _hoisted_8$
|
|
567
|
-
const _sfc_main$
|
|
561
|
+
const _hoisted_3$7 = { class: "text-gray-600 dark:text-gray-400" };
|
|
562
|
+
const _hoisted_4$5 = { class: "font-medium text-gray-900 dark:text-white" };
|
|
563
|
+
const _hoisted_5$5 = { class: "text-gray-600 dark:text-gray-400" };
|
|
564
|
+
const _hoisted_6$5 = { class: "relative" };
|
|
565
|
+
const _hoisted_7$5 = ["value", "min", "max", "step", "disabled"];
|
|
566
|
+
const _hoisted_8$4 = { class: "pointer-events-none absolute inset-y-0 left-0 flex items-center" };
|
|
567
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
568
568
|
__name: "Slider",
|
|
569
569
|
props: /* @__PURE__ */ mergeModels({
|
|
570
570
|
min: { default: 0 },
|
|
@@ -595,13 +595,13 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
595
595
|
modelValue.value = Number(target.value);
|
|
596
596
|
};
|
|
597
597
|
return (_ctx, _cache) => {
|
|
598
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
599
|
-
__props.showValue ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
600
|
-
createElementVNode("span", _hoisted_3$
|
|
601
|
-
createElementVNode("span", _hoisted_4$
|
|
602
|
-
createElementVNode("span", _hoisted_5$
|
|
598
|
+
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
599
|
+
__props.showValue ? (openBlock(), createElementBlock("div", _hoisted_2$7, [
|
|
600
|
+
createElementVNode("span", _hoisted_3$7, toDisplayString(__props.min), 1),
|
|
601
|
+
createElementVNode("span", _hoisted_4$5, toDisplayString(displayValue.value), 1),
|
|
602
|
+
createElementVNode("span", _hoisted_5$5, toDisplayString(__props.max), 1)
|
|
603
603
|
])) : createCommentVNode("", true),
|
|
604
|
-
createElementVNode("div", _hoisted_6$
|
|
604
|
+
createElementVNode("div", _hoisted_6$5, [
|
|
605
605
|
createElementVNode("input", {
|
|
606
606
|
type: "range",
|
|
607
607
|
value: modelValue.value,
|
|
@@ -611,8 +611,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
611
611
|
disabled: __props.disabled,
|
|
612
612
|
class: "slider-input w-full cursor-pointer appearance-none bg-transparent disabled:cursor-not-allowed disabled:opacity-50",
|
|
613
613
|
onInput: handleInput
|
|
614
|
-
}, null, 40, _hoisted_7$
|
|
615
|
-
createElementVNode("div", _hoisted_8$
|
|
614
|
+
}, null, 40, _hoisted_7$5),
|
|
615
|
+
createElementVNode("div", _hoisted_8$4, [
|
|
616
616
|
createElementVNode("div", {
|
|
617
617
|
class: "h-2 rounded-full bg-primary",
|
|
618
618
|
style: normalizeStyle({ width: `${percentage.value}%` })
|
|
@@ -623,27 +623,27 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
623
623
|
};
|
|
624
624
|
}
|
|
625
625
|
});
|
|
626
|
-
const Slider = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
627
|
-
const _hoisted_1$
|
|
628
|
-
const _hoisted_2$
|
|
629
|
-
const _hoisted_3$
|
|
630
|
-
const _hoisted_4$
|
|
631
|
-
const _hoisted_5$
|
|
632
|
-
const _hoisted_6$
|
|
633
|
-
const _hoisted_7$
|
|
626
|
+
const Slider = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-c25e2c2a"]]);
|
|
627
|
+
const _hoisted_1$6 = { class: "relative" };
|
|
628
|
+
const _hoisted_2$6 = ["id", "disabled", "aria-expanded", "aria-controls"];
|
|
629
|
+
const _hoisted_3$6 = { class: "flex-1 truncate" };
|
|
630
|
+
const _hoisted_4$4 = { class: "flex items-center gap-1" };
|
|
631
|
+
const _hoisted_5$4 = ["id", "aria-label"];
|
|
632
|
+
const _hoisted_6$4 = { class: "mb-4 flex items-center justify-between" };
|
|
633
|
+
const _hoisted_7$4 = {
|
|
634
634
|
class: "font-medium text-gray-900 dark:text-white",
|
|
635
635
|
"aria-live": "polite",
|
|
636
636
|
"aria-atomic": "true"
|
|
637
637
|
};
|
|
638
|
-
const _hoisted_8$
|
|
638
|
+
const _hoisted_8$3 = {
|
|
639
639
|
class: "mb-2 grid grid-cols-7 gap-1",
|
|
640
640
|
role: "row"
|
|
641
641
|
};
|
|
642
|
-
const _hoisted_9$
|
|
643
|
-
const _hoisted_10$
|
|
644
|
-
const _hoisted_11$
|
|
645
|
-
const _hoisted_12 = { class: "mt-4 border-t border-gray-200 pt-3 dark:border-gray-700" };
|
|
646
|
-
const _sfc_main$
|
|
642
|
+
const _hoisted_9$2 = ["abbr"];
|
|
643
|
+
const _hoisted_10$2 = ["id", "aria-label"];
|
|
644
|
+
const _hoisted_11$2 = ["aria-label", "aria-selected", "aria-disabled", "disabled", "onClick"];
|
|
645
|
+
const _hoisted_12$1 = { class: "mt-4 border-t border-gray-200 pt-3 dark:border-gray-700" };
|
|
646
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
647
647
|
__name: "DatePicker",
|
|
648
648
|
props: /* @__PURE__ */ mergeModels({
|
|
649
649
|
placeholder: { default: "Select date" },
|
|
@@ -767,7 +767,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
767
767
|
return formatter.format(date);
|
|
768
768
|
};
|
|
769
769
|
return (_ctx, _cache) => {
|
|
770
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
770
|
+
return openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
771
771
|
createElementVNode("button", {
|
|
772
772
|
id: triggerId.value,
|
|
773
773
|
ref_key: "triggerRef",
|
|
@@ -785,8 +785,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
785
785
|
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
786
786
|
(...args) => unref(toggle) && unref(toggle)(...args))
|
|
787
787
|
}, [
|
|
788
|
-
createElementVNode("span", _hoisted_3$
|
|
789
|
-
createElementVNode("div", _hoisted_4$
|
|
788
|
+
createElementVNode("span", _hoisted_3$6, toDisplayString(displayValue.value || __props.placeholder), 1),
|
|
789
|
+
createElementVNode("div", _hoisted_4$4, [
|
|
790
790
|
modelValue.value ? (openBlock(), createElementBlock("button", {
|
|
791
791
|
key: 0,
|
|
792
792
|
type: "button",
|
|
@@ -806,7 +806,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
806
806
|
"aria-hidden": "true"
|
|
807
807
|
})
|
|
808
808
|
])
|
|
809
|
-
], 10, _hoisted_2$
|
|
809
|
+
], 10, _hoisted_2$6),
|
|
810
810
|
(openBlock(), createBlock(Teleport, {
|
|
811
811
|
to: "body",
|
|
812
812
|
disabled: !__props.teleport
|
|
@@ -831,7 +831,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
831
831
|
style: normalizeStyle(unref(dropdownStyle)),
|
|
832
832
|
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"
|
|
833
833
|
}, [
|
|
834
|
-
createElementVNode("div", _hoisted_6$
|
|
834
|
+
createElementVNode("div", _hoisted_6$4, [
|
|
835
835
|
createElementVNode("button", {
|
|
836
836
|
type: "button",
|
|
837
837
|
class: "rounded p-1 hover:bg-gray-100 dark:hover:bg-gray-700",
|
|
@@ -844,7 +844,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
844
844
|
"aria-hidden": "true"
|
|
845
845
|
})
|
|
846
846
|
]),
|
|
847
|
-
createElementVNode("span", _hoisted_7$
|
|
847
|
+
createElementVNode("span", _hoisted_7$4, toDisplayString(monthYear.value), 1),
|
|
848
848
|
createElementVNode("button", {
|
|
849
849
|
type: "button",
|
|
850
850
|
class: "rounded p-1 hover:bg-gray-100 dark:hover:bg-gray-700",
|
|
@@ -858,14 +858,14 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
858
858
|
})
|
|
859
859
|
])
|
|
860
860
|
]),
|
|
861
|
-
createElementVNode("div", _hoisted_8$
|
|
861
|
+
createElementVNode("div", _hoisted_8$3, [
|
|
862
862
|
(openBlock(true), createElementBlock(Fragment, null, renderList(weekDays.value, (day) => {
|
|
863
863
|
return openBlock(), createElementBlock("div", {
|
|
864
864
|
key: day,
|
|
865
865
|
class: "text-center text-xs font-medium text-gray-500 dark:text-gray-400",
|
|
866
866
|
role: "columnheader",
|
|
867
867
|
abbr: day
|
|
868
|
-
}, toDisplayString(day), 9, _hoisted_9$
|
|
868
|
+
}, toDisplayString(day), 9, _hoisted_9$2);
|
|
869
869
|
}), 128))
|
|
870
870
|
]),
|
|
871
871
|
createElementVNode("div", {
|
|
@@ -892,17 +892,17 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
892
892
|
day.isSelected && "bg-primary text-white font-semibold"
|
|
893
893
|
]),
|
|
894
894
|
onClick: ($event) => selectDate(day)
|
|
895
|
-
}, toDisplayString(day.date.getDate()), 11, _hoisted_11$
|
|
895
|
+
}, toDisplayString(day.date.getDate()), 11, _hoisted_11$2);
|
|
896
896
|
}), 128))
|
|
897
|
-
], 8, _hoisted_10$
|
|
898
|
-
createElementVNode("div", _hoisted_12, [
|
|
897
|
+
], 8, _hoisted_10$2),
|
|
898
|
+
createElementVNode("div", _hoisted_12$1, [
|
|
899
899
|
createElementVNode("button", {
|
|
900
900
|
type: "button",
|
|
901
901
|
class: "w-full rounded py-1.5 text-sm font-medium text-primary hover:bg-primary/10",
|
|
902
902
|
onClick: _cache[1] || (_cache[1] = ($event) => selectDate({ date: /* @__PURE__ */ new Date(), isDisabled: false }))
|
|
903
903
|
}, " Today ")
|
|
904
904
|
])
|
|
905
|
-
], 12, _hoisted_5$
|
|
905
|
+
], 12, _hoisted_5$4)) : createCommentVNode("", true)
|
|
906
906
|
]),
|
|
907
907
|
_: 1
|
|
908
908
|
})
|
|
@@ -911,27 +911,27 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
911
911
|
};
|
|
912
912
|
}
|
|
913
913
|
});
|
|
914
|
-
const _hoisted_1$
|
|
915
|
-
const _hoisted_2$
|
|
916
|
-
const _hoisted_3$
|
|
917
|
-
const _hoisted_4$
|
|
918
|
-
const _hoisted_5$
|
|
914
|
+
const _hoisted_1$5 = { class: "space-y-4" };
|
|
915
|
+
const _hoisted_2$5 = ["accept", "multiple", "disabled"];
|
|
916
|
+
const _hoisted_3$5 = { class: "space-y-2" };
|
|
917
|
+
const _hoisted_4$3 = { class: "text-sm font-medium text-gray-700 dark:text-gray-300" };
|
|
918
|
+
const _hoisted_5$3 = {
|
|
919
919
|
key: 0,
|
|
920
920
|
class: "text-xs text-gray-500 dark:text-gray-400"
|
|
921
921
|
};
|
|
922
|
-
const _hoisted_6$
|
|
922
|
+
const _hoisted_6$3 = {
|
|
923
923
|
key: 1,
|
|
924
924
|
class: "text-xs text-gray-500 dark:text-gray-400"
|
|
925
925
|
};
|
|
926
|
-
const _hoisted_7$
|
|
926
|
+
const _hoisted_7$3 = {
|
|
927
927
|
key: 0,
|
|
928
928
|
class: "space-y-2"
|
|
929
929
|
};
|
|
930
|
-
const _hoisted_8$
|
|
931
|
-
const _hoisted_9 = { class: "text-sm font-medium text-gray-700 dark:text-gray-300 truncate" };
|
|
932
|
-
const _hoisted_10 = { class: "text-xs text-gray-500 dark:text-gray-400" };
|
|
933
|
-
const _hoisted_11 = ["onClick"];
|
|
934
|
-
const _sfc_main$
|
|
930
|
+
const _hoisted_8$2 = { class: "flex-1 min-w-0" };
|
|
931
|
+
const _hoisted_9$1 = { class: "text-sm font-medium text-gray-700 dark:text-gray-300 truncate" };
|
|
932
|
+
const _hoisted_10$1 = { class: "text-xs text-gray-500 dark:text-gray-400" };
|
|
933
|
+
const _hoisted_11$1 = ["onClick"];
|
|
934
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
935
935
|
__name: "FileUpload",
|
|
936
936
|
props: {
|
|
937
937
|
accept: {},
|
|
@@ -1059,7 +1059,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1059
1059
|
return "heroicons:document";
|
|
1060
1060
|
};
|
|
1061
1061
|
return (_ctx, _cache) => {
|
|
1062
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1062
|
+
return openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
1063
1063
|
createElementVNode("div", {
|
|
1064
1064
|
class: normalizeClass(dropzoneClasses.value),
|
|
1065
1065
|
onDrop: withModifiers(handleDrop, ["prevent"]),
|
|
@@ -1076,18 +1076,18 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1076
1076
|
multiple: __props.multiple,
|
|
1077
1077
|
disabled: __props.disabled,
|
|
1078
1078
|
onChange: handleInputChange
|
|
1079
|
-
}, null, 40, _hoisted_2$
|
|
1080
|
-
createElementVNode("div", _hoisted_3$
|
|
1079
|
+
}, null, 40, _hoisted_2$5),
|
|
1080
|
+
createElementVNode("div", _hoisted_3$5, [
|
|
1081
1081
|
createVNode(unref(Icon), {
|
|
1082
1082
|
icon: "heroicons:cloud-arrow-up",
|
|
1083
1083
|
class: normalizeClass(["size-12 mx-auto text-gray-400", { "text-primary-500": isDragging.value }])
|
|
1084
1084
|
}, null, 8, ["class"]),
|
|
1085
|
-
createElementVNode("p", _hoisted_4$
|
|
1086
|
-
__props.description ? (openBlock(), createElementBlock("p", _hoisted_5$
|
|
1087
|
-
__props.maxSize ? (openBlock(), createElementBlock("p", _hoisted_6$
|
|
1085
|
+
createElementVNode("p", _hoisted_4$3, toDisplayString(__props.label), 1),
|
|
1086
|
+
__props.description ? (openBlock(), createElementBlock("p", _hoisted_5$3, toDisplayString(__props.description), 1)) : createCommentVNode("", true),
|
|
1087
|
+
__props.maxSize ? (openBlock(), createElementBlock("p", _hoisted_6$3, " Max size: " + toDisplayString(formatSize(__props.maxSize)), 1)) : createCommentVNode("", true)
|
|
1088
1088
|
])
|
|
1089
1089
|
], 34),
|
|
1090
|
-
files.value.length > 0 ? (openBlock(), createElementBlock("ul", _hoisted_7$
|
|
1090
|
+
files.value.length > 0 ? (openBlock(), createElementBlock("ul", _hoisted_7$3, [
|
|
1091
1091
|
(openBlock(true), createElementBlock(Fragment, null, renderList(files.value, (uploadedFile) => {
|
|
1092
1092
|
return openBlock(), createElementBlock("li", {
|
|
1093
1093
|
key: uploadedFile.id,
|
|
@@ -1097,9 +1097,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1097
1097
|
icon: getFileIcon(uploadedFile.file),
|
|
1098
1098
|
class: "size-8 text-gray-400"
|
|
1099
1099
|
}, null, 8, ["icon"]),
|
|
1100
|
-
createElementVNode("div", _hoisted_8$
|
|
1101
|
-
createElementVNode("p", _hoisted_9, toDisplayString(uploadedFile.file.name), 1),
|
|
1102
|
-
createElementVNode("p", _hoisted_10, toDisplayString(formatSize(uploadedFile.file.size)), 1)
|
|
1100
|
+
createElementVNode("div", _hoisted_8$2, [
|
|
1101
|
+
createElementVNode("p", _hoisted_9$1, toDisplayString(uploadedFile.file.name), 1),
|
|
1102
|
+
createElementVNode("p", _hoisted_10$1, toDisplayString(formatSize(uploadedFile.file.size)), 1)
|
|
1103
1103
|
]),
|
|
1104
1104
|
createElementVNode("button", {
|
|
1105
1105
|
type: "button",
|
|
@@ -1110,7 +1110,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1110
1110
|
icon: "heroicons:x-mark",
|
|
1111
1111
|
class: "size-5"
|
|
1112
1112
|
})
|
|
1113
|
-
], 8, _hoisted_11)
|
|
1113
|
+
], 8, _hoisted_11$1)
|
|
1114
1114
|
]);
|
|
1115
1115
|
}), 128))
|
|
1116
1116
|
])) : createCommentVNode("", true)
|
|
@@ -1118,13 +1118,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1118
1118
|
};
|
|
1119
1119
|
}
|
|
1120
1120
|
});
|
|
1121
|
-
const _hoisted_1$
|
|
1122
|
-
const _hoisted_2$
|
|
1123
|
-
const _hoisted_3$
|
|
1121
|
+
const _hoisted_1$4 = { class: "flex items-center gap-1" };
|
|
1122
|
+
const _hoisted_2$4 = ["disabled", "onClick", "onMousemove"];
|
|
1123
|
+
const _hoisted_3$4 = {
|
|
1124
1124
|
key: 0,
|
|
1125
1125
|
class: "ml-2 text-sm font-medium text-gray-700 dark:text-gray-300"
|
|
1126
1126
|
};
|
|
1127
|
-
const _sfc_main$
|
|
1127
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
1128
1128
|
__name: "Rating",
|
|
1129
1129
|
props: {
|
|
1130
1130
|
modelValue: { default: 0 },
|
|
@@ -1187,7 +1187,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1187
1187
|
hoverValue.value = null;
|
|
1188
1188
|
};
|
|
1189
1189
|
return (_ctx, _cache) => {
|
|
1190
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1190
|
+
return openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
1191
1191
|
createElementVNode("div", {
|
|
1192
1192
|
class: "flex items-center",
|
|
1193
1193
|
onMouseleave: handleMouseLeave
|
|
@@ -1219,29 +1219,29 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1219
1219
|
class: normalizeClass([sizeClasses.value, __props.color])
|
|
1220
1220
|
}, null, 8, ["icon", "class"])
|
|
1221
1221
|
], 4)
|
|
1222
|
-
], 42, _hoisted_2$
|
|
1222
|
+
], 42, _hoisted_2$4);
|
|
1223
1223
|
}), 128))
|
|
1224
1224
|
], 32),
|
|
1225
|
-
__props.showValue ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
1225
|
+
__props.showValue ? (openBlock(), createElementBlock("span", _hoisted_3$4, toDisplayString(__props.modelValue.toFixed(__props.allowHalf ? 1 : 0)), 1)) : createCommentVNode("", true)
|
|
1226
1226
|
]);
|
|
1227
1227
|
};
|
|
1228
1228
|
}
|
|
1229
1229
|
});
|
|
1230
|
-
const _hoisted_1$
|
|
1231
|
-
const _hoisted_2$
|
|
1230
|
+
const _hoisted_1$3 = { class: "relative inline-block" };
|
|
1231
|
+
const _hoisted_2$3 = {
|
|
1232
1232
|
key: 0,
|
|
1233
1233
|
class: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"
|
|
1234
1234
|
};
|
|
1235
|
-
const _hoisted_3$
|
|
1236
|
-
const _hoisted_4$
|
|
1237
|
-
const _hoisted_5$
|
|
1238
|
-
const _hoisted_6$
|
|
1239
|
-
const _hoisted_7$
|
|
1235
|
+
const _hoisted_3$3 = ["disabled"];
|
|
1236
|
+
const _hoisted_4$2 = { class: "text-sm font-mono text-gray-700 dark:text-gray-300" };
|
|
1237
|
+
const _hoisted_5$2 = { class: "grid grid-cols-5 gap-2 mb-3" };
|
|
1238
|
+
const _hoisted_6$2 = ["title", "onClick"];
|
|
1239
|
+
const _hoisted_7$2 = {
|
|
1240
1240
|
key: 0,
|
|
1241
1241
|
class: "flex items-center gap-2 pt-3 border-t border-gray-200 dark:border-gray-700"
|
|
1242
1242
|
};
|
|
1243
|
-
const _hoisted_8 = ["value"];
|
|
1244
|
-
const _sfc_main$
|
|
1243
|
+
const _hoisted_8$1 = ["value"];
|
|
1244
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
1245
1245
|
__name: "ColorPicker",
|
|
1246
1246
|
props: {
|
|
1247
1247
|
modelValue: { default: "#3b82f6" },
|
|
@@ -1310,8 +1310,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1310
1310
|
isOpen.value = false;
|
|
1311
1311
|
};
|
|
1312
1312
|
return (_ctx, _cache) => {
|
|
1313
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1314
|
-
__props.label ? (openBlock(), createElementBlock("label", _hoisted_2$
|
|
1313
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
1314
|
+
__props.label ? (openBlock(), createElementBlock("label", _hoisted_2$3, toDisplayString(__props.label), 1)) : createCommentVNode("", true),
|
|
1315
1315
|
createElementVNode("button", {
|
|
1316
1316
|
type: "button",
|
|
1317
1317
|
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 }]),
|
|
@@ -1322,12 +1322,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1322
1322
|
class: "size-6 rounded border border-gray-200 dark:border-gray-600",
|
|
1323
1323
|
style: normalizeStyle({ backgroundColor: __props.modelValue })
|
|
1324
1324
|
}, null, 4),
|
|
1325
|
-
createElementVNode("span", _hoisted_4$
|
|
1325
|
+
createElementVNode("span", _hoisted_4$2, toDisplayString(__props.modelValue), 1),
|
|
1326
1326
|
createVNode(unref(Icon), {
|
|
1327
1327
|
icon: "heroicons:chevron-down",
|
|
1328
1328
|
class: normalizeClass(["size-4 text-gray-400", { "rotate-180": isOpen.value }])
|
|
1329
1329
|
}, null, 8, ["class"])
|
|
1330
|
-
], 10, _hoisted_3$
|
|
1330
|
+
], 10, _hoisted_3$3),
|
|
1331
1331
|
(openBlock(), createBlock(Teleport, {
|
|
1332
1332
|
to: teleportTarget.value,
|
|
1333
1333
|
disabled: teleportDisabled.value
|
|
@@ -1347,7 +1347,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1347
1347
|
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
1348
1348
|
}, ["stop"]))
|
|
1349
1349
|
}, [
|
|
1350
|
-
createElementVNode("div", _hoisted_5$
|
|
1350
|
+
createElementVNode("div", _hoisted_5$2, [
|
|
1351
1351
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.swatches, (color) => {
|
|
1352
1352
|
return openBlock(), createElementBlock("button", {
|
|
1353
1353
|
key: color,
|
|
@@ -1366,16 +1366,16 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1366
1366
|
["#ffffff", "#f9fafb", "#f3f4f6", "#e5e7eb", "#eab308", "#f59e0b"].includes(color) ? "text-gray-800" : "text-white"
|
|
1367
1367
|
]])
|
|
1368
1368
|
}, null, 8, ["class"])) : createCommentVNode("", true)
|
|
1369
|
-
], 14, _hoisted_6$
|
|
1369
|
+
], 14, _hoisted_6$2);
|
|
1370
1370
|
}), 128))
|
|
1371
1371
|
]),
|
|
1372
|
-
__props.showInput ? (openBlock(), createElementBlock("div", _hoisted_7$
|
|
1372
|
+
__props.showInput ? (openBlock(), createElementBlock("div", _hoisted_7$2, [
|
|
1373
1373
|
createElementVNode("input", {
|
|
1374
1374
|
type: "color",
|
|
1375
1375
|
value: __props.modelValue,
|
|
1376
1376
|
class: "size-8 rounded cursor-pointer border-0 p-0",
|
|
1377
1377
|
onInput: handleNativeInput
|
|
1378
|
-
}, null, 40, _hoisted_8),
|
|
1378
|
+
}, null, 40, _hoisted_8$1),
|
|
1379
1379
|
withDirectives(createElementVNode("input", {
|
|
1380
1380
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
|
|
1381
1381
|
type: "text",
|
|
@@ -1401,16 +1401,16 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1401
1401
|
};
|
|
1402
1402
|
}
|
|
1403
1403
|
});
|
|
1404
|
-
const _hoisted_1$
|
|
1405
|
-
const _hoisted_2$
|
|
1404
|
+
const _hoisted_1$2 = { class: "space-y-2" };
|
|
1405
|
+
const _hoisted_2$2 = {
|
|
1406
1406
|
key: 0,
|
|
1407
1407
|
class: "flex justify-between text-sm font-medium text-gray-700 dark:text-gray-300"
|
|
1408
1408
|
};
|
|
1409
|
-
const _hoisted_3$
|
|
1409
|
+
const _hoisted_3$2 = {
|
|
1410
1410
|
key: 1,
|
|
1411
1411
|
class: "flex justify-between text-xs text-gray-500 dark:text-gray-400"
|
|
1412
1412
|
};
|
|
1413
|
-
const _sfc_main$
|
|
1413
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1414
1414
|
__name: "RangeSlider",
|
|
1415
1415
|
props: {
|
|
1416
1416
|
modelValue: { default: () => [25, 75] },
|
|
@@ -1488,8 +1488,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1488
1488
|
}
|
|
1489
1489
|
};
|
|
1490
1490
|
return (_ctx, _cache) => {
|
|
1491
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1492
|
-
__props.showLabels ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
1491
|
+
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
1492
|
+
__props.showLabels ? (openBlock(), createElementBlock("div", _hoisted_2$2, [
|
|
1493
1493
|
createElementVNode("span", null, toDisplayString(__props.formatLabel(minValue.value)), 1),
|
|
1494
1494
|
createElementVNode("span", null, toDisplayString(__props.formatLabel(maxValue.value)), 1)
|
|
1495
1495
|
])) : createCommentVNode("", true),
|
|
@@ -1522,7 +1522,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1522
1522
|
onMousedown: _cache[1] || (_cache[1] = ($event) => handleMouseDown("max"))
|
|
1523
1523
|
}, null, 38)
|
|
1524
1524
|
], 2),
|
|
1525
|
-
__props.showMinMax ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
1525
|
+
__props.showMinMax ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
|
|
1526
1526
|
createElementVNode("span", null, toDisplayString(__props.formatLabel(__props.min)), 1),
|
|
1527
1527
|
createElementVNode("span", null, toDisplayString(__props.formatLabel(__props.max)), 1)
|
|
1528
1528
|
])) : createCommentVNode("", true)
|
|
@@ -1530,18 +1530,18 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1530
1530
|
};
|
|
1531
1531
|
}
|
|
1532
1532
|
});
|
|
1533
|
-
const _hoisted_1 = ["aria-expanded", "aria-controls"];
|
|
1534
|
-
const _hoisted_2 = ["id", "name", "placeholder", "disabled", "aria-controls"];
|
|
1535
|
-
const _hoisted_3 = { class: "flex items-center gap-1" };
|
|
1536
|
-
const _hoisted_4 = ["id", "aria-label", "aria-multiselectable"];
|
|
1537
|
-
const _hoisted_5 = ["aria-selected", "aria-disabled", "disabled", "onClick"];
|
|
1538
|
-
const _hoisted_6 = { class: "flex-1" };
|
|
1539
|
-
const _hoisted_7 = {
|
|
1533
|
+
const _hoisted_1$1 = ["aria-expanded", "aria-controls"];
|
|
1534
|
+
const _hoisted_2$1 = ["id", "name", "placeholder", "disabled", "aria-controls"];
|
|
1535
|
+
const _hoisted_3$1 = { class: "flex items-center gap-1" };
|
|
1536
|
+
const _hoisted_4$1 = ["id", "aria-label", "aria-multiselectable"];
|
|
1537
|
+
const _hoisted_5$1 = ["aria-selected", "aria-disabled", "disabled", "onClick"];
|
|
1538
|
+
const _hoisted_6$1 = { class: "flex-1" };
|
|
1539
|
+
const _hoisted_7$1 = {
|
|
1540
1540
|
key: 1,
|
|
1541
1541
|
class: "px-3 py-2 text-center text-sm text-gray-500 dark:text-gray-400",
|
|
1542
1542
|
role: "status"
|
|
1543
1543
|
};
|
|
1544
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1544
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
1545
1545
|
__name: "Combobox",
|
|
1546
1546
|
props: {
|
|
1547
1547
|
modelValue: {},
|
|
@@ -1672,10 +1672,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1672
1672
|
class: "flex-1 border-none bg-transparent text-sm text-gray-900 outline-hidden placeholder:text-gray-400 dark:text-gray-100 dark:placeholder:text-gray-500",
|
|
1673
1673
|
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
1674
1674
|
}, ["stop"]))
|
|
1675
|
-
}, null, 8, _hoisted_2)), [
|
|
1675
|
+
}, null, 8, _hoisted_2$1)), [
|
|
1676
1676
|
[vModelText, search.value]
|
|
1677
1677
|
]),
|
|
1678
|
-
createElementVNode("div", _hoisted_3, [
|
|
1678
|
+
createElementVNode("div", _hoisted_3$1, [
|
|
1679
1679
|
__props.clearable && selectedOptions.value.length > 0 && !__props.disabled ? (openBlock(), createElementBlock("button", {
|
|
1680
1680
|
key: 0,
|
|
1681
1681
|
type: "button",
|
|
@@ -1698,7 +1698,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1698
1698
|
"aria-hidden": "true"
|
|
1699
1699
|
}, null, 8, ["class"])
|
|
1700
1700
|
])
|
|
1701
|
-
], 10, _hoisted_1),
|
|
1701
|
+
], 10, _hoisted_1$1),
|
|
1702
1702
|
(openBlock(), createBlock(Teleport, {
|
|
1703
1703
|
to: teleportTarget.value,
|
|
1704
1704
|
disabled: teleportDisabled.value
|
|
@@ -1748,16 +1748,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1748
1748
|
class: "size-3"
|
|
1749
1749
|
})) : createCommentVNode("", true)
|
|
1750
1750
|
], 2)) : createCommentVNode("", true),
|
|
1751
|
-
createElementVNode("span", _hoisted_6, toDisplayString(option.label), 1),
|
|
1751
|
+
createElementVNode("span", _hoisted_6$1, toDisplayString(option.label), 1),
|
|
1752
1752
|
!__props.multiple && isSelected(option) ? (openBlock(), createBlock(unref(Icon), {
|
|
1753
1753
|
key: 1,
|
|
1754
1754
|
icon: "lucide:check",
|
|
1755
1755
|
class: "size-4 text-primary",
|
|
1756
1756
|
"aria-hidden": "true"
|
|
1757
1757
|
})) : createCommentVNode("", true)
|
|
1758
|
-
], 10, _hoisted_5);
|
|
1759
|
-
}), 128)) : (openBlock(), createElementBlock("div", _hoisted_7, toDisplayString(__props.noResultsText), 1))
|
|
1760
|
-
], 8, _hoisted_4)) : createCommentVNode("", true)
|
|
1758
|
+
], 10, _hoisted_5$1);
|
|
1759
|
+
}), 128)) : (openBlock(), createElementBlock("div", _hoisted_7$1, toDisplayString(__props.noResultsText), 1))
|
|
1760
|
+
], 8, _hoisted_4$1)) : createCommentVNode("", true)
|
|
1761
1761
|
]),
|
|
1762
1762
|
_: 1
|
|
1763
1763
|
})
|
|
@@ -1766,20 +1766,314 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1766
1766
|
};
|
|
1767
1767
|
}
|
|
1768
1768
|
});
|
|
1769
|
+
const _hoisted_1 = { class: "relative" };
|
|
1770
|
+
const _hoisted_2 = {
|
|
1771
|
+
key: 0,
|
|
1772
|
+
class: "text-red-500 ml-0.5"
|
|
1773
|
+
};
|
|
1774
|
+
const _hoisted_3 = ["id", "disabled", "aria-invalid", "aria-describedby"];
|
|
1775
|
+
const _hoisted_4 = {
|
|
1776
|
+
key: 0,
|
|
1777
|
+
class: "flex items-center gap-2 flex-1"
|
|
1778
|
+
};
|
|
1779
|
+
const _hoisted_5 = { class: "flex h-8 w-8 items-center justify-center rounded bg-gray-100 dark:bg-gray-800" };
|
|
1780
|
+
const _hoisted_6 = { class: "text-gray-700 dark:text-gray-300 font-mono text-xs truncate" };
|
|
1781
|
+
const _hoisted_7 = {
|
|
1782
|
+
key: 1,
|
|
1783
|
+
class: "flex-1 text-gray-400 dark:text-gray-500"
|
|
1784
|
+
};
|
|
1785
|
+
const _hoisted_8 = { class: "relative mb-4" };
|
|
1786
|
+
const _hoisted_9 = ["placeholder"];
|
|
1787
|
+
const _hoisted_10 = {
|
|
1788
|
+
key: 0,
|
|
1789
|
+
class: "absolute right-3 top-1/2 -translate-y-1/2"
|
|
1790
|
+
};
|
|
1791
|
+
const _hoisted_11 = { class: "max-h-64 overflow-y-auto" };
|
|
1792
|
+
const _hoisted_12 = {
|
|
1793
|
+
key: 0,
|
|
1794
|
+
class: "py-8 text-center text-sm text-gray-500"
|
|
1795
|
+
};
|
|
1796
|
+
const _hoisted_13 = {
|
|
1797
|
+
key: 1,
|
|
1798
|
+
class: "grid grid-cols-8 gap-1"
|
|
1799
|
+
};
|
|
1800
|
+
const _hoisted_14 = ["title", "onClick"];
|
|
1801
|
+
const _hoisted_15 = { class: "mt-4 flex items-center justify-between border-t border-gray-200 pt-4 dark:border-gray-700" };
|
|
1802
|
+
const _hoisted_16 = { class: "text-xs text-gray-500" };
|
|
1803
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1804
|
+
__name: "IconPicker",
|
|
1805
|
+
props: /* @__PURE__ */ mergeModels({
|
|
1806
|
+
label: {},
|
|
1807
|
+
placeholder: { default: "Rechercher une icône..." },
|
|
1808
|
+
help: {},
|
|
1809
|
+
error: {},
|
|
1810
|
+
required: { type: Boolean },
|
|
1811
|
+
disabled: { type: Boolean },
|
|
1812
|
+
id: {},
|
|
1813
|
+
collections: { default: () => ["mdi", "heroicons", "lucide"] },
|
|
1814
|
+
limit: { default: 48 }
|
|
1815
|
+
}, {
|
|
1816
|
+
"modelValue": { default: "" },
|
|
1817
|
+
"modelModifiers": {}
|
|
1818
|
+
}),
|
|
1819
|
+
emits: ["update:modelValue"],
|
|
1820
|
+
setup(__props) {
|
|
1821
|
+
const props = __props;
|
|
1822
|
+
const modelValue = useModel(__props, "modelValue");
|
|
1823
|
+
const { id: generatedId, related } = useId({ prefix: "iconpicker", id: props.id });
|
|
1824
|
+
const inputId = computed(() => props.id ?? generatedId.value);
|
|
1825
|
+
const helpId = computed(() => related("help"));
|
|
1826
|
+
const searchQuery = ref("");
|
|
1827
|
+
const isOpen = ref(false);
|
|
1828
|
+
const isLoading = ref(false);
|
|
1829
|
+
const searchResults = ref([]);
|
|
1830
|
+
const popularIcons = [
|
|
1831
|
+
"mdi:heart",
|
|
1832
|
+
"mdi:star",
|
|
1833
|
+
"mdi:home",
|
|
1834
|
+
"mdi:account",
|
|
1835
|
+
"mdi:email",
|
|
1836
|
+
"mdi:phone",
|
|
1837
|
+
"mdi:calendar",
|
|
1838
|
+
"mdi:clock",
|
|
1839
|
+
"mdi:check",
|
|
1840
|
+
"mdi:close",
|
|
1841
|
+
"mdi:plus",
|
|
1842
|
+
"mdi:minus",
|
|
1843
|
+
"mdi:stethoscope",
|
|
1844
|
+
"mdi:hospital",
|
|
1845
|
+
"mdi:medical-bag",
|
|
1846
|
+
"mdi:pill",
|
|
1847
|
+
"mdi:heart-pulse",
|
|
1848
|
+
"mdi:tooth",
|
|
1849
|
+
"mdi:eye",
|
|
1850
|
+
"mdi:brain",
|
|
1851
|
+
"mdi:lungs",
|
|
1852
|
+
"mdi:bone",
|
|
1853
|
+
"heroicons:heart",
|
|
1854
|
+
"heroicons:star",
|
|
1855
|
+
"heroicons:home",
|
|
1856
|
+
"heroicons:user",
|
|
1857
|
+
"heroicons:envelope",
|
|
1858
|
+
"heroicons:phone",
|
|
1859
|
+
"heroicons:calendar",
|
|
1860
|
+
"heroicons:clock",
|
|
1861
|
+
"heroicons:check",
|
|
1862
|
+
"heroicons:x-mark",
|
|
1863
|
+
"heroicons:plus",
|
|
1864
|
+
"heroicons:minus",
|
|
1865
|
+
"lucide:heart",
|
|
1866
|
+
"lucide:star",
|
|
1867
|
+
"lucide:home",
|
|
1868
|
+
"lucide:user",
|
|
1869
|
+
"lucide:mail",
|
|
1870
|
+
"lucide:phone",
|
|
1871
|
+
"lucide:calendar",
|
|
1872
|
+
"lucide:clock",
|
|
1873
|
+
"lucide:check",
|
|
1874
|
+
"lucide:x",
|
|
1875
|
+
"lucide:plus",
|
|
1876
|
+
"lucide:minus"
|
|
1877
|
+
];
|
|
1878
|
+
const displayedIcons = computed(() => {
|
|
1879
|
+
if (searchQuery.value && searchResults.value.length > 0) {
|
|
1880
|
+
return searchResults.value;
|
|
1881
|
+
}
|
|
1882
|
+
return popularIcons;
|
|
1883
|
+
});
|
|
1884
|
+
const hasError = computed(() => props.error && typeof props.error === "string");
|
|
1885
|
+
async function searchIcons(query) {
|
|
1886
|
+
if (!query || query.length < 2) {
|
|
1887
|
+
searchResults.value = [];
|
|
1888
|
+
return;
|
|
1889
|
+
}
|
|
1890
|
+
isLoading.value = true;
|
|
1891
|
+
try {
|
|
1892
|
+
const collectionsParam = props.collections.join(",");
|
|
1893
|
+
const response = await fetch(
|
|
1894
|
+
`https://api.iconify.design/search?query=${encodeURIComponent(query)}&limit=${props.limit}&prefixes=${collectionsParam}`
|
|
1895
|
+
);
|
|
1896
|
+
const data = await response.json();
|
|
1897
|
+
searchResults.value = data.icons || [];
|
|
1898
|
+
} catch (error) {
|
|
1899
|
+
console.error("Failed to search icons:", error);
|
|
1900
|
+
searchResults.value = [];
|
|
1901
|
+
} finally {
|
|
1902
|
+
isLoading.value = false;
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
const debouncedSearch = useDebounceFn(searchIcons, 300);
|
|
1906
|
+
watch(searchQuery, (query) => {
|
|
1907
|
+
debouncedSearch(query);
|
|
1908
|
+
});
|
|
1909
|
+
function selectIcon(icon) {
|
|
1910
|
+
modelValue.value = icon;
|
|
1911
|
+
isOpen.value = false;
|
|
1912
|
+
searchQuery.value = "";
|
|
1913
|
+
}
|
|
1914
|
+
function clearSelection() {
|
|
1915
|
+
modelValue.value = "";
|
|
1916
|
+
}
|
|
1917
|
+
function openPicker() {
|
|
1918
|
+
if (!props.disabled) {
|
|
1919
|
+
isOpen.value = true;
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
function closePicker() {
|
|
1923
|
+
isOpen.value = false;
|
|
1924
|
+
searchQuery.value = "";
|
|
1925
|
+
}
|
|
1926
|
+
return (_ctx, _cache) => {
|
|
1927
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
1928
|
+
__props.label ? (openBlock(), createBlock(_sfc_main$e, {
|
|
1929
|
+
key: 0,
|
|
1930
|
+
"html-for": inputId.value,
|
|
1931
|
+
error: __props.error
|
|
1932
|
+
}, {
|
|
1933
|
+
default: withCtx(() => [
|
|
1934
|
+
createTextVNode(toDisplayString(__props.label) + " ", 1),
|
|
1935
|
+
__props.required ? (openBlock(), createElementBlock("span", _hoisted_2, "*")) : createCommentVNode("", true)
|
|
1936
|
+
]),
|
|
1937
|
+
_: 1
|
|
1938
|
+
}, 8, ["html-for", "error"])) : createCommentVNode("", true),
|
|
1939
|
+
createElementVNode("button", {
|
|
1940
|
+
id: inputId.value,
|
|
1941
|
+
type: "button",
|
|
1942
|
+
disabled: __props.disabled,
|
|
1943
|
+
"aria-invalid": hasError.value || void 0,
|
|
1944
|
+
"aria-describedby": hasError.value ? helpId.value : void 0,
|
|
1945
|
+
class: normalizeClass(["mt-1 flex w-full items-center gap-3 rounded-md border bg-white px-3 py-2 text-left text-sm shadow-sm transition-colors focus:outline-none focus:ring-2 focus:ring-primary dark:bg-gray-900", [
|
|
1946
|
+
hasError.value ? "border-red-500 focus:border-red-500 focus:ring-red-500" : "border-gray-300 focus:border-primary dark:border-gray-700",
|
|
1947
|
+
__props.disabled ? "cursor-not-allowed bg-gray-50 dark:bg-gray-950" : "cursor-pointer hover:border-gray-400 dark:hover:border-gray-600"
|
|
1948
|
+
]]),
|
|
1949
|
+
onClick: openPicker
|
|
1950
|
+
}, [
|
|
1951
|
+
modelValue.value ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
1952
|
+
createElementVNode("div", _hoisted_5, [
|
|
1953
|
+
createVNode(unref(Icon), {
|
|
1954
|
+
icon: modelValue.value,
|
|
1955
|
+
class: "h-5 w-5 text-gray-700 dark:text-gray-300"
|
|
1956
|
+
}, null, 8, ["icon"])
|
|
1957
|
+
]),
|
|
1958
|
+
createElementVNode("span", _hoisted_6, toDisplayString(modelValue.value), 1)
|
|
1959
|
+
])) : (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(__props.placeholder), 1)),
|
|
1960
|
+
modelValue.value && !__props.disabled ? (openBlock(), createElementBlock("button", {
|
|
1961
|
+
key: 2,
|
|
1962
|
+
type: "button",
|
|
1963
|
+
class: "p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",
|
|
1964
|
+
onClick: withModifiers(clearSelection, ["stop"])
|
|
1965
|
+
}, [
|
|
1966
|
+
createVNode(unref(Icon), {
|
|
1967
|
+
icon: "lucide:x",
|
|
1968
|
+
class: "h-4 w-4"
|
|
1969
|
+
})
|
|
1970
|
+
])) : createCommentVNode("", true),
|
|
1971
|
+
createVNode(unref(Icon), {
|
|
1972
|
+
icon: "lucide:chevron-down",
|
|
1973
|
+
class: "h-4 w-4 text-gray-400"
|
|
1974
|
+
})
|
|
1975
|
+
], 10, _hoisted_3),
|
|
1976
|
+
__props.help && !hasError.value ? (openBlock(), createBlock(_sfc_main$d, {
|
|
1977
|
+
key: 1,
|
|
1978
|
+
id: helpId.value
|
|
1979
|
+
}, {
|
|
1980
|
+
default: withCtx(() => [
|
|
1981
|
+
createTextVNode(toDisplayString(__props.help), 1)
|
|
1982
|
+
]),
|
|
1983
|
+
_: 1
|
|
1984
|
+
}, 8, ["id"])) : createCommentVNode("", true),
|
|
1985
|
+
hasError.value ? (openBlock(), createBlock(_sfc_main$d, {
|
|
1986
|
+
key: 2,
|
|
1987
|
+
id: helpId.value,
|
|
1988
|
+
error: true
|
|
1989
|
+
}, {
|
|
1990
|
+
default: withCtx(() => [
|
|
1991
|
+
createTextVNode(toDisplayString(__props.error), 1)
|
|
1992
|
+
]),
|
|
1993
|
+
_: 1
|
|
1994
|
+
}, 8, ["id"])) : createCommentVNode("", true),
|
|
1995
|
+
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
1996
|
+
isOpen.value ? (openBlock(), createElementBlock("div", {
|
|
1997
|
+
key: 0,
|
|
1998
|
+
class: "fixed inset-0 z-50",
|
|
1999
|
+
onClick: closePicker
|
|
2000
|
+
}, [
|
|
2001
|
+
createElementVNode("div", {
|
|
2002
|
+
class: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-full max-w-md rounded-lg border border-gray-200 bg-white p-4 shadow-xl dark:border-gray-700 dark:bg-gray-900",
|
|
2003
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
2004
|
+
}, ["stop"]))
|
|
2005
|
+
}, [
|
|
2006
|
+
createElementVNode("div", _hoisted_8, [
|
|
2007
|
+
createVNode(unref(Icon), {
|
|
2008
|
+
icon: "lucide:search",
|
|
2009
|
+
class: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"
|
|
2010
|
+
}),
|
|
2011
|
+
withDirectives(createElementVNode("input", {
|
|
2012
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchQuery.value = $event),
|
|
2013
|
+
type: "text",
|
|
2014
|
+
placeholder: __props.placeholder,
|
|
2015
|
+
class: "w-full rounded-md border border-gray-300 bg-white py-2 pl-10 pr-4 text-sm text-gray-800 placeholder-gray-400 focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary dark:border-gray-700 dark:bg-gray-800 dark:text-gray-200 dark:placeholder-gray-500",
|
|
2016
|
+
autofocus: ""
|
|
2017
|
+
}, null, 8, _hoisted_9), [
|
|
2018
|
+
[vModelText, searchQuery.value]
|
|
2019
|
+
]),
|
|
2020
|
+
isLoading.value ? (openBlock(), createElementBlock("div", _hoisted_10, [
|
|
2021
|
+
createVNode(unref(Icon), {
|
|
2022
|
+
icon: "lucide:loader-2",
|
|
2023
|
+
class: "h-4 w-4 animate-spin text-gray-400"
|
|
2024
|
+
})
|
|
2025
|
+
])) : createCommentVNode("", true)
|
|
2026
|
+
]),
|
|
2027
|
+
createElementVNode("div", _hoisted_11, [
|
|
2028
|
+
displayedIcons.value.length === 0 && searchQuery.value ? (openBlock(), createElementBlock("div", _hoisted_12, ' Aucune icône trouvée pour "' + toDisplayString(searchQuery.value) + '" ', 1)) : (openBlock(), createElementBlock("div", _hoisted_13, [
|
|
2029
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(displayedIcons.value, (icon) => {
|
|
2030
|
+
return openBlock(), createElementBlock("button", {
|
|
2031
|
+
key: icon,
|
|
2032
|
+
type: "button",
|
|
2033
|
+
class: normalizeClass(["flex h-9 w-9 items-center justify-center rounded transition-colors", [
|
|
2034
|
+
modelValue.value === icon ? "bg-primary text-white" : "hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-700 dark:text-gray-300"
|
|
2035
|
+
]]),
|
|
2036
|
+
title: icon,
|
|
2037
|
+
onClick: ($event) => selectIcon(icon)
|
|
2038
|
+
}, [
|
|
2039
|
+
createVNode(unref(Icon), {
|
|
2040
|
+
icon,
|
|
2041
|
+
class: "h-5 w-5"
|
|
2042
|
+
}, null, 8, ["icon"])
|
|
2043
|
+
], 10, _hoisted_14);
|
|
2044
|
+
}), 128))
|
|
2045
|
+
]))
|
|
2046
|
+
]),
|
|
2047
|
+
createElementVNode("div", _hoisted_15, [
|
|
2048
|
+
createElementVNode("p", _hoisted_16, toDisplayString(searchQuery.value ? `${displayedIcons.value.length} résultats` : "Icônes populaires"), 1),
|
|
2049
|
+
createElementVNode("button", {
|
|
2050
|
+
type: "button",
|
|
2051
|
+
class: "text-sm text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",
|
|
2052
|
+
onClick: closePicker
|
|
2053
|
+
}, " Fermer ")
|
|
2054
|
+
])
|
|
2055
|
+
])
|
|
2056
|
+
])) : createCommentVNode("", true)
|
|
2057
|
+
]))
|
|
2058
|
+
]);
|
|
2059
|
+
};
|
|
2060
|
+
}
|
|
2061
|
+
});
|
|
1769
2062
|
export {
|
|
1770
2063
|
Slider as S,
|
|
1771
|
-
_sfc_main$
|
|
1772
|
-
_sfc_main$
|
|
1773
|
-
_sfc_main$
|
|
1774
|
-
_sfc_main$
|
|
1775
|
-
_sfc_main$
|
|
1776
|
-
_sfc_main$
|
|
1777
|
-
_sfc_main$
|
|
1778
|
-
_sfc_main$
|
|
1779
|
-
_sfc_main$
|
|
1780
|
-
_sfc_main$
|
|
1781
|
-
_sfc_main$
|
|
1782
|
-
_sfc_main$
|
|
1783
|
-
_sfc_main as l
|
|
2064
|
+
_sfc_main$e as _,
|
|
2065
|
+
_sfc_main$d as a,
|
|
2066
|
+
_sfc_main$c as b,
|
|
2067
|
+
_sfc_main$b as c,
|
|
2068
|
+
_sfc_main$a as d,
|
|
2069
|
+
_sfc_main$9 as e,
|
|
2070
|
+
_sfc_main$8 as f,
|
|
2071
|
+
_sfc_main$6 as g,
|
|
2072
|
+
_sfc_main$5 as h,
|
|
2073
|
+
_sfc_main$4 as i,
|
|
2074
|
+
_sfc_main$3 as j,
|
|
2075
|
+
_sfc_main$2 as k,
|
|
2076
|
+
_sfc_main$1 as l,
|
|
2077
|
+
_sfc_main as m
|
|
1784
2078
|
};
|
|
1785
|
-
//# sourceMappingURL=
|
|
2079
|
+
//# sourceMappingURL=IconPicker.vue_vue_type_script_setup_true_lang-Ch1x6Ap9.js.map
|