@enos5/enos-vue-default 1.8.18 → 1.9.1
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/{code-Dr6ZiI2B.js → code-B8pHdi9W.js} +2 -2
- package/dist/{code-Dr6ZiI2B.js.map → code-B8pHdi9W.js.map} +1 -1
- package/dist/components/CheckboxInput.vue.d.ts +9 -0
- package/dist/components/CheckboxMultipleInput.vue.d.ts +9 -0
- package/dist/components/ColorPicker.vue.d.ts +9 -0
- package/dist/components/CustomSelect.vue.d.ts +9 -0
- package/dist/components/DateInput.vue.d.ts +9 -0
- package/dist/components/DateRangeInput.vue.d.ts +9 -0
- package/dist/components/ImageInput.vue.d.ts +9 -0
- package/dist/components/InputGroup.vue.d.ts +1237 -0
- package/dist/components/NotationInput.vue.d.ts +9 -0
- package/dist/components/RadioInput.vue.d.ts +9 -0
- package/dist/components/RadioMultipleInput.vue.d.ts +9 -0
- package/dist/components/SelectInput.vue.d.ts +9 -0
- package/dist/components/TextArea.vue.d.ts +9 -0
- package/dist/components/TextInput.vue.d.ts +9 -0
- package/dist/components/TinyEditor.vue.d.ts +9 -0
- package/dist/components/ToggleInput.vue.d.ts +9 -0
- package/dist/{default-CQQ0KHN3.js → default-CA9ynSrU.js} +2 -2
- package/dist/{default-CQQ0KHN3.js.map → default-CA9ynSrU.js.map} +1 -1
- package/dist/{dom-B7gMyJhi.js → dom-4lhd1Ept.js} +2 -2
- package/dist/{dom-B7gMyJhi.js.map → dom-4lhd1Ept.js.map} +1 -1
- package/dist/{image-CGzRqs95.js → image-BeWt4zEx.js} +2 -2
- package/dist/{image-CGzRqs95.js.map → image-BeWt4zEx.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/index.node.js +1 -1
- package/dist/{link-BDTaA2M5.js → link-I00eDCbV.js} +2 -2
- package/dist/{link-BDTaA2M5.js.map → link-I00eDCbV.js.map} +1 -1
- package/dist/{lists-DMBUpc-N.js → lists-vBFc7KBM.js} +2 -2
- package/dist/{lists-DMBUpc-N.js.map → lists-vBFc7KBM.js.map} +1 -1
- package/dist/{plugin-DtrUVzLD.js → plugin-BQjbCN0r.js} +626 -361
- package/dist/plugin-BQjbCN0r.js.map +1 -0
- package/dist/{silver-BCjjUqyn.js → silver-CZmkZQ_0.js} +2 -2
- package/dist/{silver-BCjjUqyn.js.map → silver-CZmkZQ_0.js.map} +1 -1
- package/dist/styles.css +49 -15
- package/dist/{table-C7jiTuUB.js → table-DT5Z4VFh.js} +2 -2
- package/dist/{table-C7jiTuUB.js.map → table-DT5Z4VFh.js.map} +1 -1
- package/dist/{tinymce-DYdrH-XJ.js → tinymce-B6RzJMSu.js} +2 -2
- package/dist/{tinymce-DYdrH-XJ.js.map → tinymce-B6RzJMSu.js.map} +1 -1
- package/package.json +1 -1
- package/dist/plugin-DtrUVzLD.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fragment, Teleport, Transition, cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, h, inject, isVNode, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onUnmounted, openBlock, provide, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, useAttrs, useSlots, vModelCheckbox, vModelText, vShow, watch, withCtx, withDirectives, withModifiers } from "vue";
|
|
1
|
+
import { Fragment, Teleport, Transition, cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, h, inject, isVNode, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onUnmounted, openBlock, provide, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, toHandlers, unref, useAttrs, useSlots, vModelCheckbox, vModelText, vShow, watch, withCtx, withDirectives, withModifiers } from "vue";
|
|
2
2
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon, ExclamationCircleIcon, ExclamationTriangleIcon, EyeDropperIcon, LockClosedIcon, MagnifyingGlassIcon, PencilSquareIcon, PhotoIcon, XMarkIcon } from "@heroicons/vue/24/outline";
|
|
3
3
|
import Editor from "@tinymce/tinymce-vue";
|
|
4
4
|
import { useI18n } from "vue-i18n";
|
|
@@ -36,12 +36,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
36
36
|
}) : target, mod));
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/components/CardTabs.vue
|
|
39
|
-
var _hoisted_1$
|
|
40
|
-
var _hoisted_2$
|
|
39
|
+
var _hoisted_1$37 = { class: "border-b border-neutral-200 bg-neutral-50/80 p-2 dark:border-neutral-800 dark:bg-neutral-900/80" };
|
|
40
|
+
var _hoisted_2$22 = {
|
|
41
41
|
role: "tablist",
|
|
42
42
|
class: "flex overflow-hidden rounded-lg bg-white shadow-sm ring-1 ring-neutral-200 dark:bg-neutral-950 dark:ring-neutral-800"
|
|
43
43
|
};
|
|
44
|
-
var _hoisted_3$
|
|
44
|
+
var _hoisted_3$16 = [
|
|
45
45
|
"aria-selected",
|
|
46
46
|
"tabindex",
|
|
47
47
|
"onClick",
|
|
@@ -106,7 +106,7 @@ var _sfc_main$40 = {
|
|
|
106
106
|
focusTabAtIndex(targetIndex);
|
|
107
107
|
};
|
|
108
108
|
return (_ctx, _cache) => {
|
|
109
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
109
|
+
return openBlock(), createElementBlock("div", _hoisted_1$37, [createElementVNode("div", _hoisted_2$22, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.tabs, (tab, index) => {
|
|
110
110
|
return openBlock(), createElementBlock("button", {
|
|
111
111
|
key: tab.value,
|
|
112
112
|
ref_for: true,
|
|
@@ -123,18 +123,18 @@ var _sfc_main$40 = {
|
|
|
123
123
|
]),
|
|
124
124
|
onClick: ($event) => activateTab(tab.value),
|
|
125
125
|
onKeydown: ($event) => onTabKeydown($event, index)
|
|
126
|
-
}, toDisplayString(tab.label), 47, _hoisted_3$
|
|
126
|
+
}, toDisplayString(tab.label), 47, _hoisted_3$16);
|
|
127
127
|
}), 128))])]);
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
131
|
//#endregion
|
|
132
132
|
//#region src/components/Card.vue
|
|
133
|
-
var _hoisted_1$
|
|
133
|
+
var _hoisted_1$36 = {
|
|
134
134
|
key: 0,
|
|
135
135
|
class: "mb-4"
|
|
136
136
|
};
|
|
137
|
-
var _hoisted_2$
|
|
137
|
+
var _hoisted_2$21 = {
|
|
138
138
|
key: 1,
|
|
139
139
|
class: "mb-4 text-xl font-semibold tracking-tight text-neutral-950 dark:text-neutral-50"
|
|
140
140
|
};
|
|
@@ -204,7 +204,7 @@ var _sfc_main$39 = {
|
|
|
204
204
|
"active-tab": __props.activeTab,
|
|
205
205
|
"onUpdate:activeTab": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:activeTab", $event)),
|
|
206
206
|
onTabClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("tab-click", $event))
|
|
207
|
-
}, null, 8, ["tabs", "active-tab"])) : createCommentVNode("", true), createElementVNode("div", { class: normalizeClass(__props.paddingClass) }, [_ctx.$slots.customTitle ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
207
|
+
}, null, 8, ["tabs", "active-tab"])) : createCommentVNode("", true), createElementVNode("div", { class: normalizeClass(__props.paddingClass) }, [_ctx.$slots.customTitle ? (openBlock(), createElementBlock("div", _hoisted_1$36, [renderSlot(_ctx.$slots, "customTitle")])) : __props.title ? (openBlock(), createElementBlock("h3", _hoisted_2$21, toDisplayString(__props.title), 1)) : createCommentVNode("", true), createElementVNode("div", { class: normalizeClass(["relative", __props.tabs.length > 0 ? "overflow-hidden" : "overflow-visible"]) }, [createVNode(Transition, {
|
|
208
208
|
"enter-active-class": "transition-all duration-200 ease-in-out",
|
|
209
209
|
"enter-from-class": slideDirection.value === "right" ? "translate-x-full opacity-0" : "-translate-x-full opacity-0",
|
|
210
210
|
"enter-to-class": "translate-x-0 opacity-100",
|
|
@@ -271,7 +271,7 @@ var _sfc_main$37 = {
|
|
|
271
271
|
};
|
|
272
272
|
//#endregion
|
|
273
273
|
//#region src/components/ActionMessage.vue
|
|
274
|
-
var _hoisted_1$
|
|
274
|
+
var _hoisted_1$35 = { class: "text-sm text-gray-600" };
|
|
275
275
|
var _sfc_main$36 = {
|
|
276
276
|
__name: "ActionMessage",
|
|
277
277
|
props: { on: Boolean },
|
|
@@ -282,7 +282,7 @@ var _sfc_main$36 = {
|
|
|
282
282
|
"leave-from-class": "opacity-100",
|
|
283
283
|
"leave-to-class": "opacity-0"
|
|
284
284
|
}, {
|
|
285
|
-
default: withCtx(() => [withDirectives(createElementVNode("div", _hoisted_1$
|
|
285
|
+
default: withCtx(() => [withDirectives(createElementVNode("div", _hoisted_1$35, [renderSlot(_ctx.$slots, "default")], 512), [[vShow, __props.on]])]),
|
|
286
286
|
_: 3
|
|
287
287
|
})]);
|
|
288
288
|
};
|
|
@@ -298,35 +298,35 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
|
298
298
|
//#endregion
|
|
299
299
|
//#region src/components/SectionTitle.vue
|
|
300
300
|
var _sfc_main$35 = {};
|
|
301
|
-
var _hoisted_1$
|
|
302
|
-
var _hoisted_2$
|
|
303
|
-
var _hoisted_3$
|
|
304
|
-
var _hoisted_4$
|
|
305
|
-
var _hoisted_5$
|
|
301
|
+
var _hoisted_1$34 = { class: "md:col-span-1 flex justify-between" };
|
|
302
|
+
var _hoisted_2$20 = { class: "px-4 sm:px-0" };
|
|
303
|
+
var _hoisted_3$15 = { class: "text-xl font-semibold tracking-tight text-neutral-950 dark:text-neutral-50" };
|
|
304
|
+
var _hoisted_4$11 = { class: "mt-1 max-w-2xl text-sm text-neutral-600 dark:text-neutral-200" };
|
|
305
|
+
var _hoisted_5$8 = { class: "px-4 sm:px-0" };
|
|
306
306
|
function _sfc_render(_ctx, _cache) {
|
|
307
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
307
|
+
return openBlock(), createElementBlock("div", _hoisted_1$34, [createElementVNode("div", _hoisted_2$20, [createElementVNode("h3", _hoisted_3$15, [renderSlot(_ctx.$slots, "title")]), createElementVNode("p", _hoisted_4$11, [renderSlot(_ctx.$slots, "description")])]), createElementVNode("div", _hoisted_5$8, [renderSlot(_ctx.$slots, "aside")])]);
|
|
308
308
|
}
|
|
309
309
|
var SectionTitle_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$35, [["render", _sfc_render]]);
|
|
310
310
|
//#endregion
|
|
311
311
|
//#region src/components/ActionSection.vue
|
|
312
|
-
var _hoisted_1$
|
|
313
|
-
var _hoisted_2$
|
|
314
|
-
var _hoisted_3$
|
|
312
|
+
var _hoisted_1$33 = { class: "md:grid md:grid-cols-3 md:gap-6" };
|
|
313
|
+
var _hoisted_2$19 = { class: "mt-5 md:mt-0 md:col-span-2" };
|
|
314
|
+
var _hoisted_3$14 = { class: "rounded-lg border border-neutral-200 bg-white px-4 py-5 shadow-sm dark:border-neutral-800 dark:bg-neutral-950 sm:p-6" };
|
|
315
315
|
var _sfc_main$34 = {
|
|
316
316
|
__name: "ActionSection",
|
|
317
317
|
setup(__props) {
|
|
318
318
|
return (_ctx, _cache) => {
|
|
319
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
319
|
+
return openBlock(), createElementBlock("div", _hoisted_1$33, [createVNode(SectionTitle_default, null, {
|
|
320
320
|
title: withCtx(() => [renderSlot(_ctx.$slots, "title")]),
|
|
321
321
|
description: withCtx(() => [renderSlot(_ctx.$slots, "description")]),
|
|
322
322
|
_: 3
|
|
323
|
-
}), createElementVNode("div", _hoisted_2$
|
|
323
|
+
}), createElementVNode("div", _hoisted_2$19, [createElementVNode("div", _hoisted_3$14, [renderSlot(_ctx.$slots, "content")])])]);
|
|
324
324
|
};
|
|
325
325
|
}
|
|
326
326
|
};
|
|
327
327
|
//#endregion
|
|
328
328
|
//#region src/components/Badge.vue
|
|
329
|
-
var _hoisted_1$
|
|
329
|
+
var _hoisted_1$32 = { class: "sr-only" };
|
|
330
330
|
var _sfc_main$33 = {
|
|
331
331
|
__name: "Badge",
|
|
332
332
|
props: {
|
|
@@ -431,7 +431,7 @@ var _sfc_main$33 = {
|
|
|
431
431
|
return __props.type === "dot" ? (openBlock(), createElementBlock("span", {
|
|
432
432
|
key: 0,
|
|
433
433
|
class: normalizeClass(["inline-flex items-center justify-center w-6 h-6 rounded-full", colorClasses[__props.color].bg])
|
|
434
|
-
}, [createElementVNode("span", { class: normalizeClass(["w-2 h-2 rounded-full", colorClasses[__props.color].dot]) }, null, 2), createElementVNode("span", _hoisted_1$
|
|
434
|
+
}, [createElementVNode("span", { class: normalizeClass(["w-2 h-2 rounded-full", colorClasses[__props.color].dot]) }, null, 2), createElementVNode("span", _hoisted_1$32, [renderSlot(_ctx.$slots, "default")])], 2)) : (openBlock(), createElementBlock("span", {
|
|
435
435
|
key: 1,
|
|
436
436
|
class: normalizeClass(["inline-flex items-center font-medium", [
|
|
437
437
|
colorClasses[__props.color].bg,
|
|
@@ -445,7 +445,7 @@ var _sfc_main$33 = {
|
|
|
445
445
|
};
|
|
446
446
|
//#endregion
|
|
447
447
|
//#region src/components/Button.vue
|
|
448
|
-
var _hoisted_1$
|
|
448
|
+
var _hoisted_1$31 = ["type", "disabled"];
|
|
449
449
|
var _sfc_main$32 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
450
450
|
__name: "Button",
|
|
451
451
|
props: {
|
|
@@ -509,13 +509,13 @@ var _sfc_main$32 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
509
509
|
type: __props.type,
|
|
510
510
|
disabled: __props.disabled,
|
|
511
511
|
class: buttonClasses.value
|
|
512
|
-
}), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_1$
|
|
512
|
+
}), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_1$31);
|
|
513
513
|
};
|
|
514
514
|
}
|
|
515
515
|
});
|
|
516
516
|
//#endregion
|
|
517
517
|
//#region src/components/Checkbox.vue
|
|
518
|
-
var _hoisted_1$
|
|
518
|
+
var _hoisted_1$30 = ["value"];
|
|
519
519
|
var _sfc_main$31 = {
|
|
520
520
|
__name: "Checkbox",
|
|
521
521
|
props: {
|
|
@@ -546,13 +546,13 @@ var _sfc_main$31 = {
|
|
|
546
546
|
type: "checkbox",
|
|
547
547
|
value: __props.value,
|
|
548
548
|
class: "rounded border-neutral-300 text-neutral-900 shadow-sm focus:ring-neutral-900 dark:border-neutral-700 dark:bg-neutral-950 dark:text-neutral-100 dark:focus:ring-neutral-100"
|
|
549
|
-
}, null, 8, _hoisted_1$
|
|
549
|
+
}, null, 8, _hoisted_1$30)), [[vModelCheckbox, proxyChecked.value]]);
|
|
550
550
|
};
|
|
551
551
|
}
|
|
552
552
|
};
|
|
553
553
|
//#endregion
|
|
554
554
|
//#region src/components/CheckboxInput.vue
|
|
555
|
-
var _hoisted_1$
|
|
555
|
+
var _hoisted_1$29 = [
|
|
556
556
|
"name",
|
|
557
557
|
"checked",
|
|
558
558
|
"disabled"
|
|
@@ -597,6 +597,10 @@ var _sfc_main$30 = {
|
|
|
597
597
|
disabled: {
|
|
598
598
|
type: Boolean,
|
|
599
599
|
default: false
|
|
600
|
+
},
|
|
601
|
+
ui: {
|
|
602
|
+
type: Object,
|
|
603
|
+
default: () => ({})
|
|
600
604
|
}
|
|
601
605
|
},
|
|
602
606
|
emits: ["update:modelValue"],
|
|
@@ -615,11 +619,15 @@ var _sfc_main$30 = {
|
|
|
615
619
|
emit("update:modelValue", event.target.checked ? props.value : props.uncheckedValue);
|
|
616
620
|
};
|
|
617
621
|
return (_ctx, _cache) => {
|
|
618
|
-
return openBlock(), createElementBlock("label", { class: normalizeClass([
|
|
622
|
+
return openBlock(), createElementBlock("label", { class: normalizeClass([
|
|
623
|
+
"inline-flex items-center gap-2 rounded-full border px-3 py-1 text-sm font-medium select-none transition-colors",
|
|
624
|
+
props.ui.root,
|
|
619
625
|
isChecked.value ? "border-neutral-900 bg-neutral-900 text-neutral-50 dark:border-neutral-700 dark:bg-neutral-800 dark:text-neutral-50" : "border-neutral-200 text-neutral-600 dark:border-neutral-700 dark:text-neutral-300",
|
|
620
626
|
__props.disabled ? "opacity-60 cursor-not-allowed" : "cursor-pointer",
|
|
621
|
-
hasFocus.value && !__props.disabled ? "ring-2 ring-neutral-900/20 ring-offset-2 ring-offset-white dark:ring-neutral-100/20 dark:ring-offset-neutral-950" : ""
|
|
622
|
-
|
|
627
|
+
hasFocus.value && !__props.disabled ? "ring-2 ring-neutral-900/20 ring-offset-2 ring-offset-white dark:ring-neutral-100/20 dark:ring-offset-neutral-950" : "",
|
|
628
|
+
isChecked.value ? props.ui.controlChecked : props.ui.controlUnchecked,
|
|
629
|
+
hasFocus.value && !__props.disabled ? props.ui.focus : ""
|
|
630
|
+
]) }, [
|
|
623
631
|
createElementVNode("input", {
|
|
624
632
|
type: "checkbox",
|
|
625
633
|
class: "sr-only",
|
|
@@ -629,34 +637,34 @@ var _sfc_main$30 = {
|
|
|
629
637
|
onChange,
|
|
630
638
|
onFocus: handleFocus,
|
|
631
639
|
onBlur: handleBlur
|
|
632
|
-
}, null, 40, _hoisted_1$
|
|
633
|
-
createElementVNode("span", { class: normalizeClass([
|
|
634
|
-
|
|
640
|
+
}, null, 40, _hoisted_1$29),
|
|
641
|
+
createElementVNode("span", { class: normalizeClass([
|
|
642
|
+
"inline-flex h-4 w-4 items-center justify-center border text-[10px] font-bold leading-none",
|
|
643
|
+
props.ui.control,
|
|
644
|
+
isChecked.value ? "border-current bg-white/15 text-current dark:bg-neutral-900/15" : "border-neutral-400 text-transparent dark:border-neutral-500",
|
|
645
|
+
"rounded"
|
|
646
|
+
]) }, [createElementVNode("span", { class: normalizeClass(props.ui.indicator) }, "✓", 2)], 2),
|
|
647
|
+
createElementVNode("span", { class: normalizeClass(props.ui.label) }, toDisplayString(__props.label), 3)
|
|
635
648
|
], 2);
|
|
636
649
|
};
|
|
637
650
|
}
|
|
638
651
|
};
|
|
639
652
|
//#endregion
|
|
640
653
|
//#region src/components/TextInput.vue
|
|
641
|
-
var _hoisted_1$
|
|
642
|
-
var _hoisted_2$20 = {
|
|
643
|
-
key: 0,
|
|
644
|
-
class: "absolute inset-y-0 left-0 flex items-center pointer-events-none pl-3"
|
|
645
|
-
};
|
|
646
|
-
var _hoisted_3$14 = [
|
|
654
|
+
var _hoisted_1$28 = [
|
|
647
655
|
"type",
|
|
648
656
|
"value",
|
|
649
657
|
"disabled"
|
|
650
658
|
];
|
|
651
|
-
var
|
|
652
|
-
var
|
|
659
|
+
var _hoisted_2$18 = ["aria-label"];
|
|
660
|
+
var _hoisted_3$13 = {
|
|
653
661
|
key: 0,
|
|
654
662
|
class: "h-5 w-5",
|
|
655
663
|
fill: "none",
|
|
656
664
|
stroke: "currentColor",
|
|
657
665
|
viewBox: "0 0 24 24"
|
|
658
666
|
};
|
|
659
|
-
var
|
|
667
|
+
var _hoisted_4$10 = {
|
|
660
668
|
key: 1,
|
|
661
669
|
class: "h-5 w-5",
|
|
662
670
|
fill: "none",
|
|
@@ -682,6 +690,10 @@ var _sfc_main$29 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
682
690
|
disabledClass: {
|
|
683
691
|
type: String,
|
|
684
692
|
default: "!border-neutral-200 !bg-neutral-100 !text-neutral-500 dark:!border-neutral-800 dark:!bg-neutral-900 dark:!text-neutral-500"
|
|
693
|
+
},
|
|
694
|
+
ui: {
|
|
695
|
+
type: Object,
|
|
696
|
+
default: () => ({})
|
|
685
697
|
}
|
|
686
698
|
},
|
|
687
699
|
emits: ["update:modelValue", "blur"],
|
|
@@ -703,7 +715,8 @@ var _sfc_main$29 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
703
715
|
const inputClasses = computed(() => [
|
|
704
716
|
"w-full min-w-0 max-w-full rounded-lg border border-neutral-200 bg-white text-neutral-950 shadow-sm outline-none transition-colors placeholder:text-neutral-400 focus:border-neutral-900 focus:ring-2 focus:ring-neutral-950/10 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50 dark:placeholder:text-neutral-500 dark:focus:border-neutral-100 dark:focus:ring-neutral-100/10",
|
|
705
717
|
attrs.class,
|
|
706
|
-
isPasswordField.value ? "pr-10 pl-10" : ""
|
|
718
|
+
isPasswordField.value ? "pr-10 pl-10" : "",
|
|
719
|
+
props.ui.input
|
|
707
720
|
]);
|
|
708
721
|
const toggleVisibility = () => {
|
|
709
722
|
revealed.value = !revealed.value;
|
|
@@ -719,8 +732,11 @@ var _sfc_main$29 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
719
732
|
});
|
|
720
733
|
__expose({ focus: () => input.value?.focus() });
|
|
721
734
|
return (_ctx, _cache) => {
|
|
722
|
-
return openBlock(), createElementBlock("div",
|
|
723
|
-
isPasswordField.value ? (openBlock(), createElementBlock("div",
|
|
735
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(["relative flex items-center", props.ui.root]) }, [
|
|
736
|
+
isPasswordField.value ? (openBlock(), createElementBlock("div", {
|
|
737
|
+
key: 0,
|
|
738
|
+
class: normalizeClass(["absolute inset-y-0 left-0 flex items-center pointer-events-none pl-3", props.ui.leadingIcon])
|
|
739
|
+
}, [createVNode(unref(LockClosedIcon), { class: "h-5 w-5 text-neutral-400 dark:text-neutral-200" })], 2)) : createCommentVNode("", true),
|
|
724
740
|
createElementVNode("input", mergeProps({
|
|
725
741
|
ref_key: "input",
|
|
726
742
|
ref: input
|
|
@@ -732,19 +748,19 @@ var _sfc_main$29 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
732
748
|
onInput: _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", $event.target.value)),
|
|
733
749
|
onBlur: _cache[1] || (_cache[1] = ($event) => emit("blur", $event)),
|
|
734
750
|
onWheel: handleWheel
|
|
735
|
-
}), null, 16,
|
|
751
|
+
}), null, 16, _hoisted_1$28),
|
|
736
752
|
isPasswordField.value ? (openBlock(), createElementBlock("button", {
|
|
737
753
|
key: 1,
|
|
738
754
|
type: "button",
|
|
739
|
-
class: "absolute inset-y-0 right-0 flex items-center pr-3 text-neutral-400 transition-colors hover:text-neutral-700 focus:outline-none dark:text-neutral-200 dark:hover:text-neutral-50",
|
|
755
|
+
class: normalizeClass(["absolute inset-y-0 right-0 flex items-center pr-3 text-neutral-400 transition-colors hover:text-neutral-700 focus:outline-none dark:text-neutral-200 dark:hover:text-neutral-50", props.ui.trailingAction]),
|
|
740
756
|
"aria-label": revealed.value ? "Hide password" : "Show password",
|
|
741
757
|
onClick: toggleVisibility
|
|
742
|
-
}, [revealed.value ? (openBlock(), createElementBlock("svg",
|
|
758
|
+
}, [revealed.value ? (openBlock(), createElementBlock("svg", _hoisted_3$13, [..._cache[2] || (_cache[2] = [createElementVNode("path", {
|
|
743
759
|
"stroke-linecap": "round",
|
|
744
760
|
"stroke-linejoin": "round",
|
|
745
761
|
"stroke-width": "2",
|
|
746
762
|
d: "M13.875 18.825A10.05 10.05 0 0112 19c-5 0-9.27-3.11-11-7 1.01-2.27 2.78-4.1 5-5.32m3.08-1.3A9.96 9.96 0 0112 5c5 0 9.27 3.11 11 7a11.03 11.03 0 01-4.16 4.91M15 12a3 3 0 00-3-3m0 0a3 3 0 00-2.94 3.59M3 3l18 18"
|
|
747
|
-
}, null, -1)])])) : (openBlock(), createElementBlock("svg",
|
|
763
|
+
}, null, -1)])])) : (openBlock(), createElementBlock("svg", _hoisted_4$10, [..._cache[3] || (_cache[3] = [createElementVNode("path", {
|
|
748
764
|
"stroke-linecap": "round",
|
|
749
765
|
"stroke-linejoin": "round",
|
|
750
766
|
"stroke-width": "2",
|
|
@@ -754,14 +770,14 @@ var _sfc_main$29 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
754
770
|
"stroke-linejoin": "round",
|
|
755
771
|
"stroke-width": "2",
|
|
756
772
|
d: "M2.458 12C3.732 7.943 7.523 5 12 5s8.268 2.943 9.542 7c-1.274 4.057-5.065 7-9.542 7S3.732 16.057 2.458 12z"
|
|
757
|
-
}, null, -1)])]))],
|
|
758
|
-
]);
|
|
773
|
+
}, null, -1)])]))], 10, _hoisted_2$18)) : createCommentVNode("", true)
|
|
774
|
+
], 2);
|
|
759
775
|
};
|
|
760
776
|
}
|
|
761
777
|
});
|
|
762
778
|
//#endregion
|
|
763
779
|
//#region src/components/TextArea.vue
|
|
764
|
-
var _hoisted_1$
|
|
780
|
+
var _hoisted_1$27 = ["value", "disabled"];
|
|
765
781
|
var DEFAULT_MAX_LENGTH = 1e3;
|
|
766
782
|
var _sfc_main$28 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
767
783
|
__name: "TextArea",
|
|
@@ -778,6 +794,10 @@ var _sfc_main$28 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
778
794
|
autoResize: {
|
|
779
795
|
type: Boolean,
|
|
780
796
|
default: true
|
|
797
|
+
},
|
|
798
|
+
ui: {
|
|
799
|
+
type: Object,
|
|
800
|
+
default: () => ({})
|
|
781
801
|
}
|
|
782
802
|
},
|
|
783
803
|
emits: ["update:modelValue"],
|
|
@@ -794,7 +814,8 @@ var _sfc_main$28 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
794
814
|
const textareaClasses = computed(() => [
|
|
795
815
|
"w-full min-w-0 max-w-full rounded-lg border border-neutral-200 bg-white px-4 py-3 text-sm text-neutral-950 shadow-sm outline-none transition-colors placeholder:text-neutral-400 focus:border-neutral-900 focus:ring-2 focus:ring-neutral-950/10 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50 dark:placeholder:text-neutral-500 dark:focus:border-neutral-100 dark:focus:ring-neutral-100/10",
|
|
796
816
|
props.autoResize ? "resize-none overflow-y-auto" : "resize-y",
|
|
797
|
-
attrs.class
|
|
817
|
+
attrs.class,
|
|
818
|
+
props.ui.input
|
|
798
819
|
]);
|
|
799
820
|
const resizeTextarea = () => {
|
|
800
821
|
if (!props.autoResize || !textarea.value) return;
|
|
@@ -818,7 +839,7 @@ var _sfc_main$28 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
818
839
|
});
|
|
819
840
|
__expose({ focus: () => textarea.value?.focus() });
|
|
820
841
|
return (_ctx, _cache) => {
|
|
821
|
-
return openBlock(), createElementBlock("div",
|
|
842
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(props.ui.root) }, [createElementVNode("textarea", mergeProps({
|
|
822
843
|
ref_key: "textarea",
|
|
823
844
|
ref: textarea
|
|
824
845
|
}, textareaAttrs.value, {
|
|
@@ -826,25 +847,25 @@ var _sfc_main$28 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
826
847
|
value: props.modelValue,
|
|
827
848
|
disabled: props.disabled,
|
|
828
849
|
onInput: updateValue
|
|
829
|
-
}), null, 16, _hoisted_1$
|
|
850
|
+
}), null, 16, _hoisted_1$27)], 2);
|
|
830
851
|
};
|
|
831
852
|
}
|
|
832
853
|
});
|
|
833
854
|
//#endregion
|
|
834
855
|
//#region src/components/CustomSelect.vue
|
|
835
|
-
var _hoisted_1$
|
|
836
|
-
var _hoisted_2$
|
|
837
|
-
var _hoisted_3$
|
|
856
|
+
var _hoisted_1$26 = { class: "flex h-5 items-center gap-1" };
|
|
857
|
+
var _hoisted_2$17 = ["placeholder"];
|
|
858
|
+
var _hoisted_3$12 = [
|
|
838
859
|
"data-option-value",
|
|
839
860
|
"onClick",
|
|
840
861
|
"onFocus",
|
|
841
862
|
"onKeydown"
|
|
842
863
|
];
|
|
843
|
-
var _hoisted_4$
|
|
864
|
+
var _hoisted_4$9 = {
|
|
844
865
|
key: 0,
|
|
845
866
|
class: "flex items-center gap-3"
|
|
846
867
|
};
|
|
847
|
-
var _hoisted_5$
|
|
868
|
+
var _hoisted_5$7 = [
|
|
848
869
|
"checked",
|
|
849
870
|
"disabled",
|
|
850
871
|
"onChange"
|
|
@@ -1005,6 +1026,10 @@ var _sfc_main$27 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
1005
1026
|
noOptionsText: {
|
|
1006
1027
|
type: String,
|
|
1007
1028
|
default: "No options available"
|
|
1029
|
+
},
|
|
1030
|
+
ui: {
|
|
1031
|
+
type: Object,
|
|
1032
|
+
default: () => ({})
|
|
1008
1033
|
}
|
|
1009
1034
|
},
|
|
1010
1035
|
emits: ["update:modelValue"],
|
|
@@ -1078,6 +1103,48 @@ var _sfc_main$27 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
1078
1103
|
const hasVisibleOptions = computed(() => filteredOptions.value.length > 0);
|
|
1079
1104
|
const visibleOptions = computed(() => filteredOptions.value);
|
|
1080
1105
|
const canClearSelection = computed(() => !props.multiple && !props.placeholderDisabled && !props.disabled && props.modelValue !== null && props.modelValue !== void 0 && props.modelValue !== "");
|
|
1106
|
+
const triggerClasses = computed(() => [
|
|
1107
|
+
props.baseClass,
|
|
1108
|
+
selectedDeletedOption.value || props.multiple && selectedMultipleOptions.value.some(optionDeleted) ? props.deletedSelectedClass : props.normalTextClass,
|
|
1109
|
+
{ "text-neutral-50": isDarkMode.value && !(selectedDeletedOption.value || props.multiple && selectedMultipleOptions.value.some(optionDeleted)) },
|
|
1110
|
+
"flex items-center justify-between cursor-pointer",
|
|
1111
|
+
attrs.class,
|
|
1112
|
+
props.ui.trigger
|
|
1113
|
+
]);
|
|
1114
|
+
const triggerValueClasses = computed(() => [(props.multiple && selectedMultipleOptions.value.length === 0 || !props.multiple && !props.modelValue) && props.placeholder ? props.placeholderClass : null, props.multiple && selectedMultipleOptions.value.length === 0 || !props.multiple && !props.modelValue ? props.ui.placeholder : props.ui.value]);
|
|
1115
|
+
const clearButtonClasses = computed(() => ["inline-flex size-5 shrink-0 items-center justify-center rounded-full text-neutral-400 transition hover:bg-neutral-100 hover:text-neutral-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950/20 dark:hover:bg-neutral-900 dark:hover:text-neutral-200 dark:focus-visible:ring-neutral-100/20", props.ui.clearButton]);
|
|
1116
|
+
const chevronClasses = computed(() => [
|
|
1117
|
+
"size-5 text-neutral-400 transition-transform dark:text-neutral-200",
|
|
1118
|
+
{ "rotate-180": isOpen.value },
|
|
1119
|
+
props.ui.chevron
|
|
1120
|
+
]);
|
|
1121
|
+
const dropdownClasses = computed(() => [
|
|
1122
|
+
props.dropdownClass,
|
|
1123
|
+
{ "bg-neutral-950 border-neutral-800": isDarkMode.value },
|
|
1124
|
+
props.ui.dropdown
|
|
1125
|
+
]);
|
|
1126
|
+
const searchInputClasses = computed(() => [props.searchInputClass, props.ui.searchInput]);
|
|
1127
|
+
const emptyStateClasses = computed(() => [
|
|
1128
|
+
props.dropdownOptionClass,
|
|
1129
|
+
props.placeholderClass,
|
|
1130
|
+
"cursor-default",
|
|
1131
|
+
props.ui.option,
|
|
1132
|
+
props.ui.placeholder
|
|
1133
|
+
]);
|
|
1134
|
+
const optionClasses = (option) => [
|
|
1135
|
+
props.dropdownOptionClass,
|
|
1136
|
+
optionDeleted(option) ? props.deletedOptionClass : props.optionClass,
|
|
1137
|
+
props.ui.option,
|
|
1138
|
+
{ "text-neutral-50": isDarkMode.value && !optionDeleted(option) },
|
|
1139
|
+
{
|
|
1140
|
+
[props.dropdownHighlightedClass]: optionIsHighlighted(option),
|
|
1141
|
+
[props.dropdownSelectedClass]: props.multiple ? optionIsSelected(option) : optionValue(option) === props.modelValue || String(optionValue(option)) === String(props.modelValue),
|
|
1142
|
+
"rounded-b-lg": option === availableOptions.value[availableOptions.value.length - 1],
|
|
1143
|
+
"rounded-lg": availableOptions.value.length === 1
|
|
1144
|
+
},
|
|
1145
|
+
optionIsHighlighted(option) ? props.ui.optionHighlighted : null,
|
|
1146
|
+
(props.multiple ? optionIsSelected(option) : optionValue(option) === props.modelValue || String(optionValue(option)) === String(props.modelValue)) ? props.ui.optionSelected : null
|
|
1147
|
+
];
|
|
1081
1148
|
const displayText = computed(() => {
|
|
1082
1149
|
if (props.multiple) {
|
|
1083
1150
|
if (selectedMultipleOptions.value.length === 0) return props.placeholder;
|
|
@@ -1350,29 +1417,23 @@ var _sfc_main$27 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
1350
1417
|
return openBlock(), createElementBlock("div", {
|
|
1351
1418
|
ref_key: "rootRef",
|
|
1352
1419
|
ref: rootRef,
|
|
1353
|
-
class: "relative",
|
|
1420
|
+
class: normalizeClass(["relative", props.ui.root]),
|
|
1354
1421
|
onClick: toggleDropdown
|
|
1355
1422
|
}, [createElementVNode("div", mergeProps({
|
|
1356
1423
|
ref_key: "triggerRef",
|
|
1357
1424
|
ref: triggerRef,
|
|
1358
|
-
class:
|
|
1359
|
-
__props.baseClass,
|
|
1360
|
-
selectedDeletedOption.value || __props.multiple && selectedMultipleOptions.value.some(optionDeleted) ? __props.deletedSelectedClass : __props.normalTextClass,
|
|
1361
|
-
{ "text-neutral-50": isDarkMode.value && !(selectedDeletedOption.value || __props.multiple && selectedMultipleOptions.value.some(optionDeleted)) },
|
|
1362
|
-
"flex items-center justify-between cursor-pointer",
|
|
1363
|
-
unref(attrs).class
|
|
1364
|
-
]
|
|
1425
|
+
class: triggerClasses.value
|
|
1365
1426
|
}, unref(attrs), { tabindex: "0" }), [createElementVNode("span", {
|
|
1366
|
-
class: normalizeClass(
|
|
1427
|
+
class: normalizeClass(triggerValueClasses.value),
|
|
1367
1428
|
style: normalizeStyle(darkTextStyle.value)
|
|
1368
|
-
}, toDisplayString(displayText.value), 7), createElementVNode("div", _hoisted_1$
|
|
1429
|
+
}, toDisplayString(displayText.value), 7), createElementVNode("div", _hoisted_1$26, [canClearSelection.value ? (openBlock(), createElementBlock("button", {
|
|
1369
1430
|
key: 0,
|
|
1370
1431
|
type: "button",
|
|
1371
|
-
class:
|
|
1432
|
+
class: normalizeClass(clearButtonClasses.value),
|
|
1372
1433
|
"aria-label": "Clear selection",
|
|
1373
1434
|
onClick: withModifiers(clearSelection, ["stop", "prevent"]),
|
|
1374
1435
|
onPointerdown: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
|
|
1375
|
-
}, [createVNode(unref(XMarkIcon), { class: "size-4" })],
|
|
1436
|
+
}, [createVNode(unref(XMarkIcon), { class: "size-4" })], 34)) : createCommentVNode("", true), createVNode(unref(ChevronDownIcon), { class: normalizeClass(chevronClasses.value) }, null, 8, ["class"])])], 16), isMounted.value ? (openBlock(), createBlock(Teleport, {
|
|
1376
1437
|
key: 0,
|
|
1377
1438
|
to: teleportTarget.value
|
|
1378
1439
|
}, [createVNode(Transition, {
|
|
@@ -1387,9 +1448,9 @@ var _sfc_main$27 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
1387
1448
|
key: 0,
|
|
1388
1449
|
ref_key: "dropdownMenuRef",
|
|
1389
1450
|
ref: dropdownMenuRef,
|
|
1390
|
-
class: normalizeClass({ dark: isDarkMode.value }),
|
|
1451
|
+
class: normalizeClass([{ dark: isDarkMode.value }, props.ui.dropdownRoot]),
|
|
1391
1452
|
style: normalizeStyle(dropdownStyle.value)
|
|
1392
|
-
}, [createElementVNode("div", { class: normalizeClass(
|
|
1453
|
+
}, [createElementVNode("div", { class: normalizeClass(dropdownClasses.value) }, [
|
|
1393
1454
|
__props.searchable ? withDirectives((openBlock(), createElementBlock("input", {
|
|
1394
1455
|
key: 0,
|
|
1395
1456
|
ref_key: "searchInputRef",
|
|
@@ -1397,10 +1458,10 @@ var _sfc_main$27 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
1397
1458
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => searchQuery.value = $event),
|
|
1398
1459
|
type: "text",
|
|
1399
1460
|
placeholder: __props.searchPlaceholder,
|
|
1400
|
-
class: normalizeClass(
|
|
1461
|
+
class: normalizeClass(searchInputClasses.value),
|
|
1401
1462
|
onClick: _cache[2] || (_cache[2] = withModifiers(() => {}, ["stop"])),
|
|
1402
1463
|
onKeydown: _cache[3] || (_cache[3] = withModifiers(() => {}, ["stop"]))
|
|
1403
|
-
}, null, 42, _hoisted_2$
|
|
1464
|
+
}, null, 42, _hoisted_2$17)), [[vModelText, searchQuery.value]]) : createCommentVNode("", true),
|
|
1404
1465
|
selectedDeletedOption.value ? (openBlock(), createElementBlock("div", {
|
|
1405
1466
|
key: 1,
|
|
1406
1467
|
class: normalizeClass([
|
|
@@ -1411,11 +1472,7 @@ var _sfc_main$27 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
1411
1472
|
}, toDisplayString(optionText(selectedDeletedOption.value)), 3)) : createCommentVNode("", true),
|
|
1412
1473
|
!hasVisibleOptions.value ? (openBlock(), createElementBlock("div", {
|
|
1413
1474
|
key: 2,
|
|
1414
|
-
class: normalizeClass(
|
|
1415
|
-
__props.dropdownOptionClass,
|
|
1416
|
-
__props.placeholderClass,
|
|
1417
|
-
"cursor-default"
|
|
1418
|
-
]),
|
|
1475
|
+
class: normalizeClass(emptyStateClasses.value),
|
|
1419
1476
|
style: normalizeStyle(darkTextStyle.value)
|
|
1420
1477
|
}, toDisplayString(__props.noOptionsText), 7)) : createCommentVNode("", true),
|
|
1421
1478
|
(openBlock(true), createElementBlock(Fragment, null, renderList(filteredOptions.value, (option) => {
|
|
@@ -1424,36 +1481,26 @@ var _sfc_main$27 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
1424
1481
|
"data-option-value": String(optionValue(option) ?? ""),
|
|
1425
1482
|
"data-select-option": "true",
|
|
1426
1483
|
tabindex: "-1",
|
|
1427
|
-
class: normalizeClass(
|
|
1428
|
-
__props.dropdownOptionClass,
|
|
1429
|
-
optionDeleted(option) ? __props.deletedOptionClass : __props.optionClass,
|
|
1430
|
-
{ "text-neutral-50": isDarkMode.value && !optionDeleted(option) },
|
|
1431
|
-
{
|
|
1432
|
-
[__props.dropdownHighlightedClass]: optionIsHighlighted(option),
|
|
1433
|
-
[__props.dropdownSelectedClass]: __props.multiple ? optionIsSelected(option) : optionValue(option) === __props.modelValue || String(optionValue(option)) === String(__props.modelValue),
|
|
1434
|
-
"rounded-b-lg": option === availableOptions.value[availableOptions.value.length - 1],
|
|
1435
|
-
"rounded-lg": availableOptions.value.length === 1
|
|
1436
|
-
}
|
|
1437
|
-
]),
|
|
1484
|
+
class: normalizeClass(optionClasses(option)),
|
|
1438
1485
|
onClick: withModifiers(($event) => __props.multiple ? toggleMultipleOption(option) : selectOption(option), ["stop"]),
|
|
1439
1486
|
onFocus: ($event) => highlightedOptionValue.value = String(optionValue(option) ?? ""),
|
|
1440
1487
|
onKeydown: ($event) => handleOptionKeydown($event, option)
|
|
1441
|
-
}, [__props.multiple ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
1488
|
+
}, [__props.multiple ? (openBlock(), createElementBlock("div", _hoisted_4$9, [createElementVNode("input", {
|
|
1442
1489
|
type: "checkbox",
|
|
1443
|
-
class: "h-4 w-4 rounded border-neutral-300 text-neutral-900 focus:ring-neutral-900",
|
|
1490
|
+
class: normalizeClass(["h-4 w-4 rounded border-neutral-300 text-neutral-900 focus:ring-neutral-900", props.ui.optionControl]),
|
|
1444
1491
|
checked: optionIsSelected(option),
|
|
1445
1492
|
disabled: __props.disabled,
|
|
1446
1493
|
tabindex: "-1",
|
|
1447
1494
|
onClick: _cache[4] || (_cache[4] = withModifiers(() => {}, ["stop"])),
|
|
1448
1495
|
onChange: withModifiers(($event) => toggleMultipleOption(option), ["stop"])
|
|
1449
|
-
}, null,
|
|
1496
|
+
}, null, 42, _hoisted_5$7), createElementVNode("span", { style: normalizeStyle(darkTextStyle.value) }, toDisplayString(optionText(option)), 5)])) : (openBlock(), createElementBlock("span", {
|
|
1450
1497
|
key: 1,
|
|
1451
1498
|
style: normalizeStyle(darkTextStyle.value)
|
|
1452
|
-
}, toDisplayString(optionText(option)), 5))], 42, _hoisted_3$
|
|
1499
|
+
}, toDisplayString(optionText(option)), 5))], 42, _hoisted_3$12);
|
|
1453
1500
|
}), 128))
|
|
1454
1501
|
], 2)], 6)) : createCommentVNode("", true)]),
|
|
1455
1502
|
_: 1
|
|
1456
|
-
})], 8, ["to"])) : createCommentVNode("", true)],
|
|
1503
|
+
})], 8, ["to"])) : createCommentVNode("", true)], 2);
|
|
1457
1504
|
};
|
|
1458
1505
|
}
|
|
1459
1506
|
});
|
|
@@ -1615,6 +1662,10 @@ var _sfc_main$26 = {
|
|
|
1615
1662
|
noOptionsText: {
|
|
1616
1663
|
type: String,
|
|
1617
1664
|
default: "No options available"
|
|
1665
|
+
},
|
|
1666
|
+
ui: {
|
|
1667
|
+
type: Object,
|
|
1668
|
+
default: () => ({})
|
|
1618
1669
|
}
|
|
1619
1670
|
},
|
|
1620
1671
|
emits: ["update:modelValue"],
|
|
@@ -1648,6 +1699,7 @@ var _sfc_main$26 = {
|
|
|
1648
1699
|
"search-placeholder": __props.searchPlaceholder,
|
|
1649
1700
|
"search-input-class": __props.searchInputClass,
|
|
1650
1701
|
"no-options-text": __props.noOptionsText,
|
|
1702
|
+
ui: __props.ui,
|
|
1651
1703
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", $event))
|
|
1652
1704
|
}, _ctx.$attrs), null, 16, [
|
|
1653
1705
|
"model-value",
|
|
@@ -1675,14 +1727,15 @@ var _sfc_main$26 = {
|
|
|
1675
1727
|
"searchable",
|
|
1676
1728
|
"search-placeholder",
|
|
1677
1729
|
"search-input-class",
|
|
1678
|
-
"no-options-text"
|
|
1730
|
+
"no-options-text",
|
|
1731
|
+
"ui"
|
|
1679
1732
|
]);
|
|
1680
1733
|
};
|
|
1681
1734
|
}
|
|
1682
1735
|
};
|
|
1683
1736
|
//#endregion
|
|
1684
1737
|
//#region src/components/DateInput.vue
|
|
1685
|
-
var _hoisted_1$
|
|
1738
|
+
var _hoisted_1$25 = [
|
|
1686
1739
|
"type",
|
|
1687
1740
|
"lang",
|
|
1688
1741
|
"max",
|
|
@@ -1715,6 +1768,10 @@ var DateInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
1715
1768
|
disabledClass: {
|
|
1716
1769
|
type: String,
|
|
1717
1770
|
default: "!border-neutral-200 !bg-neutral-100 !text-neutral-500 dark:!border-neutral-800 dark:!bg-neutral-900 dark:!text-neutral-500"
|
|
1771
|
+
},
|
|
1772
|
+
ui: {
|
|
1773
|
+
type: Object,
|
|
1774
|
+
default: () => ({})
|
|
1718
1775
|
}
|
|
1719
1776
|
},
|
|
1720
1777
|
emits: ["update:modelValue"],
|
|
@@ -1739,7 +1796,11 @@ var DateInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
1739
1796
|
const { class: _class, type: _type, lang: _lang, ...rest } = attrs;
|
|
1740
1797
|
return rest;
|
|
1741
1798
|
});
|
|
1742
|
-
const inputClasses = computed(() => [
|
|
1799
|
+
const inputClasses = computed(() => [
|
|
1800
|
+
"date-input w-full rounded-lg border border-neutral-200 bg-white px-4 py-3 text-sm text-neutral-950 shadow-sm outline-none transition-colors focus:border-neutral-900 focus:ring-2 focus:ring-neutral-950/10 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50 dark:focus:border-neutral-100 dark:focus:ring-neutral-100/10",
|
|
1801
|
+
attrs.class,
|
|
1802
|
+
props.ui.input
|
|
1803
|
+
]);
|
|
1743
1804
|
const normalizeDateValue = (rawValue) => {
|
|
1744
1805
|
if (typeof rawValue !== "string") return "";
|
|
1745
1806
|
return rawValue.replace(/^(\d{4})\d+/, "$1");
|
|
@@ -1769,34 +1830,23 @@ var DateInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
1769
1830
|
disabled: props.disabled,
|
|
1770
1831
|
onInput: handleDateInput,
|
|
1771
1832
|
onChange: handleDateInput
|
|
1772
|
-
}), null, 16, _hoisted_1$
|
|
1833
|
+
}), null, 16, _hoisted_1$25);
|
|
1773
1834
|
};
|
|
1774
1835
|
}
|
|
1775
|
-
}), [["__scopeId", "data-v-
|
|
1836
|
+
}), [["__scopeId", "data-v-6342acda"]]);
|
|
1776
1837
|
//#endregion
|
|
1777
1838
|
//#region src/components/DateRangeInput.vue
|
|
1778
|
-
var _hoisted_1$
|
|
1779
|
-
var _hoisted_2$
|
|
1780
|
-
|
|
1781
|
-
class: "text-sm font-medium text-neutral-700 dark:text-neutral-300 mb-1 block"
|
|
1782
|
-
};
|
|
1783
|
-
var _hoisted_3$12 = ["value", "disabled"];
|
|
1784
|
-
var _hoisted_4$9 = { class: "p-4" };
|
|
1785
|
-
var _hoisted_5$7 = { class: "mb-4 flex items-center justify-between" };
|
|
1786
|
-
var _hoisted_6$7 = { class: "text-sm font-medium text-neutral-900 dark:text-neutral-50" };
|
|
1787
|
-
var _hoisted_7$7 = { class: "grid grid-cols-7 gap-1 mb-2" };
|
|
1788
|
-
var _hoisted_8$5 = { class: "grid grid-cols-7 gap-1" };
|
|
1789
|
-
var _hoisted_9$4 = [
|
|
1839
|
+
var _hoisted_1$24 = ["value", "disabled"];
|
|
1840
|
+
var _hoisted_2$16 = { class: "grid grid-cols-7 gap-1" };
|
|
1841
|
+
var _hoisted_3$11 = [
|
|
1790
1842
|
"disabled",
|
|
1791
1843
|
"onClick",
|
|
1792
1844
|
"onMouseenter"
|
|
1793
1845
|
];
|
|
1794
|
-
var
|
|
1795
|
-
var
|
|
1796
|
-
var
|
|
1797
|
-
var
|
|
1798
|
-
var _hoisted_14$3 = { key: 1 };
|
|
1799
|
-
var _hoisted_15$3 = { key: 2 };
|
|
1846
|
+
var _hoisted_4$8 = { class: "flex items-center justify-between" };
|
|
1847
|
+
var _hoisted_5$6 = { key: 0 };
|
|
1848
|
+
var _hoisted_6$6 = { key: 1 };
|
|
1849
|
+
var _hoisted_7$6 = { key: 2 };
|
|
1800
1850
|
var DateRangeInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
1801
1851
|
__name: "DateRangeInput",
|
|
1802
1852
|
props: {
|
|
@@ -1842,6 +1892,10 @@ var DateRangeInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
1842
1892
|
locale: {
|
|
1843
1893
|
type: String,
|
|
1844
1894
|
default: "en"
|
|
1895
|
+
},
|
|
1896
|
+
ui: {
|
|
1897
|
+
type: Object,
|
|
1898
|
+
default: () => ({})
|
|
1845
1899
|
}
|
|
1846
1900
|
},
|
|
1847
1901
|
emits: ["update:modelValue"],
|
|
@@ -1930,7 +1984,11 @@ var DateRangeInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
1930
1984
|
const daysDiff = Math.ceil((selected - start) / (1e3 * 60 * 60 * 24)) + 1;
|
|
1931
1985
|
return daysDiff >= props.minDays && (props.maxDays === null || daysDiff <= props.maxDays);
|
|
1932
1986
|
};
|
|
1933
|
-
const inputClasses = computed(() => [
|
|
1987
|
+
const inputClasses = computed(() => [
|
|
1988
|
+
"date-range-input w-full rounded-lg border border-neutral-200 bg-white px-4 py-3 text-sm text-neutral-950 shadow-sm outline-none transition-colors focus:border-neutral-900 focus:ring-2 focus:ring-neutral-950/10 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50 dark:focus:border-neutral-100 dark:focus:ring-neutral-100/10 cursor-pointer",
|
|
1989
|
+
attrs.class,
|
|
1990
|
+
props.ui.trigger
|
|
1991
|
+
]);
|
|
1934
1992
|
const toggleCalendar = () => {
|
|
1935
1993
|
if (!props.disabled) if (isOpen.value) {
|
|
1936
1994
|
if (startDate.value && !endDate.value) emit("update:modelValue", {
|
|
@@ -2049,8 +2107,11 @@ var DateRangeInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
2049
2107
|
document.removeEventListener("click", closeCalendar);
|
|
2050
2108
|
});
|
|
2051
2109
|
return (_ctx, _cache) => {
|
|
2052
|
-
return openBlock(), createElementBlock("div",
|
|
2053
|
-
__props.label ? (openBlock(), createElementBlock("label",
|
|
2110
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(["relative", props.ui.root]) }, [
|
|
2111
|
+
__props.label ? (openBlock(), createElementBlock("label", {
|
|
2112
|
+
key: 0,
|
|
2113
|
+
class: normalizeClass(["text-sm font-medium text-neutral-700 dark:text-neutral-300 mb-1 block", props.ui.label])
|
|
2114
|
+
}, toDisplayString(__props.label), 3)) : createCommentVNode("", true),
|
|
2054
2115
|
createElementVNode("input", {
|
|
2055
2116
|
ref_key: "inputRef",
|
|
2056
2117
|
ref: inputRef,
|
|
@@ -2059,18 +2120,18 @@ var DateRangeInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
2059
2120
|
value: displayText.value,
|
|
2060
2121
|
disabled: props.disabled,
|
|
2061
2122
|
onClick: toggleCalendar
|
|
2062
|
-
}, null, 10,
|
|
2123
|
+
}, null, 10, _hoisted_1$24),
|
|
2063
2124
|
isOpen.value ? (openBlock(), createElementBlock("div", {
|
|
2064
2125
|
key: 1,
|
|
2065
2126
|
ref_key: "calendarRef",
|
|
2066
2127
|
ref: calendarRef,
|
|
2067
|
-
class: "absolute top-full left-0 z-50 mt-1 w-80 rounded-lg border border-neutral-200 bg-white shadow-xl dark:border-neutral-800 dark:bg-neutral-950",
|
|
2128
|
+
class: normalizeClass(["absolute top-full left-0 z-50 mt-1 w-80 rounded-lg border border-neutral-200 bg-white shadow-xl dark:border-neutral-800 dark:bg-neutral-950", props.ui.panel]),
|
|
2068
2129
|
onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
|
|
2069
|
-
}, [createElementVNode("div",
|
|
2070
|
-
createElementVNode("div",
|
|
2130
|
+
}, [createElementVNode("div", { class: normalizeClass(["p-4", props.ui.panelContent]) }, [
|
|
2131
|
+
createElementVNode("div", { class: normalizeClass(["mb-4 flex items-center justify-between", props.ui.header]) }, [
|
|
2071
2132
|
createElementVNode("button", {
|
|
2072
2133
|
type: "button",
|
|
2073
|
-
class: "p-1 rounded hover:bg-neutral-100 dark:hover:bg-neutral-800 transition-colors",
|
|
2134
|
+
class: normalizeClass(["p-1 rounded hover:bg-neutral-100 dark:hover:bg-neutral-800 transition-colors", props.ui.navButton]),
|
|
2074
2135
|
onClick: previousMonth
|
|
2075
2136
|
}, [..._cache[1] || (_cache[1] = [createElementVNode("svg", {
|
|
2076
2137
|
class: "w-4 h-4 text-neutral-600 dark:text-neutral-400",
|
|
@@ -2082,11 +2143,11 @@ var DateRangeInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
2082
2143
|
"stroke-linejoin": "round",
|
|
2083
2144
|
"stroke-width": "2",
|
|
2084
2145
|
d: "M15 19l-7-7 7-7"
|
|
2085
|
-
})], -1)])]),
|
|
2086
|
-
createElementVNode("div",
|
|
2146
|
+
})], -1)])], 2),
|
|
2147
|
+
createElementVNode("div", { class: normalizeClass(["text-sm font-medium text-neutral-900 dark:text-neutral-50", props.ui.monthLabel]) }, toDisplayString(monthNames.value[currentMonth.value]) + " " + toDisplayString(currentYear.value), 3),
|
|
2087
2148
|
createElementVNode("button", {
|
|
2088
2149
|
type: "button",
|
|
2089
|
-
class: "p-1 rounded hover:bg-neutral-100 dark:hover:bg-neutral-800 transition-colors",
|
|
2150
|
+
class: normalizeClass(["p-1 rounded hover:bg-neutral-100 dark:hover:bg-neutral-800 transition-colors", props.ui.navButton]),
|
|
2090
2151
|
onClick: nextMonth
|
|
2091
2152
|
}, [..._cache[2] || (_cache[2] = [createElementVNode("svg", {
|
|
2092
2153
|
class: "w-4 h-4 text-neutral-600 dark:text-neutral-400",
|
|
@@ -2098,63 +2159,64 @@ var DateRangeInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
2098
2159
|
"stroke-linejoin": "round",
|
|
2099
2160
|
"stroke-width": "2",
|
|
2100
2161
|
d: "M9 5l7 7-7 7"
|
|
2101
|
-
})], -1)])])
|
|
2102
|
-
]),
|
|
2103
|
-
createElementVNode("div",
|
|
2162
|
+
})], -1)])], 2)
|
|
2163
|
+
], 2),
|
|
2164
|
+
createElementVNode("div", { class: normalizeClass(["grid grid-cols-7 gap-1 mb-2", props.ui.weekdays]) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(dayNames.value, (day) => {
|
|
2104
2165
|
return openBlock(), createElementBlock("div", {
|
|
2105
2166
|
key: day,
|
|
2106
|
-
class: "text-xs font-medium text-neutral-500 dark:text-neutral-400 text-center py-1"
|
|
2107
|
-
}, toDisplayString(day),
|
|
2108
|
-
}), 128))]),
|
|
2109
|
-
createElementVNode("div",
|
|
2167
|
+
class: normalizeClass(["text-xs font-medium text-neutral-500 dark:text-neutral-400 text-center py-1", props.ui.weekday])
|
|
2168
|
+
}, toDisplayString(day), 3);
|
|
2169
|
+
}), 128))], 2),
|
|
2170
|
+
createElementVNode("div", _hoisted_2$16, [(openBlock(true), createElementBlock(Fragment, null, renderList(calendarDays.value, (day) => {
|
|
2110
2171
|
return openBlock(), createElementBlock("div", {
|
|
2111
2172
|
key: day.date.toISOString(),
|
|
2112
2173
|
class: "relative"
|
|
2113
2174
|
}, [createElementVNode("button", {
|
|
2114
2175
|
type: "button",
|
|
2115
|
-
class: normalizeClass([
|
|
2116
|
-
"
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2176
|
+
class: normalizeClass([
|
|
2177
|
+
"w-8 h-8 text-xs rounded transition-colors",
|
|
2178
|
+
props.ui.day,
|
|
2179
|
+
day.isToday && !day.isSelected ? props.ui.dayToday : null,
|
|
2180
|
+
day.isDisabled ? props.ui.dayDisabled : null,
|
|
2181
|
+
day.isSelected ? props.ui.daySelected : null,
|
|
2182
|
+
day.isInRange ? props.ui.dayInRange : null,
|
|
2183
|
+
day.isHoveredInRange ? props.ui.dayHovered : null,
|
|
2184
|
+
{
|
|
2185
|
+
"text-neutral-400 dark:text-neutral-600": !day.isCurrentMonth,
|
|
2186
|
+
"text-neutral-900 dark:text-neutral-50": day.isCurrentMonth && !day.isDisabled,
|
|
2187
|
+
"text-neutral-300 dark:text-neutral-500 cursor-not-allowed": day.isDisabled,
|
|
2188
|
+
"bg-neutral-200 dark:bg-neutral-700": day.isToday && !day.isSelected,
|
|
2189
|
+
"bg-blue-500 text-white hover:bg-blue-600": day.isSelected,
|
|
2190
|
+
"bg-blue-100 dark:bg-blue-900": day.isInRange,
|
|
2191
|
+
"bg-blue-50 dark:bg-blue-950": day.isHoveredInRange,
|
|
2192
|
+
"hover:bg-neutral-100 dark:hover:bg-neutral-800": !day.isDisabled,
|
|
2193
|
+
"rounded-l-full": day.isStartDate && !day.isEndDate,
|
|
2194
|
+
"rounded-r-full": day.isEndDate && !day.isStartDate,
|
|
2195
|
+
"rounded-full": day.isStartDate && day.isEndDate
|
|
2196
|
+
}
|
|
2197
|
+
]),
|
|
2128
2198
|
disabled: day.isDisabled,
|
|
2129
2199
|
onClick: ($event) => selectDate(day.date),
|
|
2130
2200
|
onMouseenter: ($event) => handleDateHover(day.date),
|
|
2131
2201
|
onMouseleave: handleDateLeave
|
|
2132
|
-
}, toDisplayString(day.date.getDate()), 43,
|
|
2202
|
+
}, toDisplayString(day.date.getDate()), 43, _hoisted_3$11)]);
|
|
2133
2203
|
}), 128))]),
|
|
2134
|
-
createElementVNode("div",
|
|
2204
|
+
createElementVNode("div", { class: normalizeClass(["mt-4 pt-4 border-t border-neutral-200 dark:border-neutral-800", props.ui.footer]) }, [createElementVNode("div", _hoisted_4$8, [createElementVNode("div", { class: normalizeClass(["text-xs text-neutral-500 dark:text-neutral-400", props.ui.footerText]) }, [startDate.value && endDate.value ? (openBlock(), createElementBlock("div", _hoisted_5$6, " Range: " + toDisplayString(daysBetween.value) + " days ", 1)) : startDate.value ? (openBlock(), createElementBlock("div", _hoisted_6$6, " Select end date ")) : (openBlock(), createElementBlock("div", _hoisted_7$6, " Select start date "))], 2), startDate.value || endDate.value ? (openBlock(), createElementBlock("button", {
|
|
2135
2205
|
key: 0,
|
|
2136
2206
|
type: "button",
|
|
2137
|
-
class: "text-xs text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 transition-colors",
|
|
2207
|
+
class: normalizeClass(["text-xs text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 transition-colors", props.ui.clearButton]),
|
|
2138
2208
|
onClick: clearSelection
|
|
2139
|
-
}, " Clear ")) : createCommentVNode("", true)])])
|
|
2140
|
-
])],
|
|
2141
|
-
]);
|
|
2209
|
+
}, " Clear ", 2)) : createCommentVNode("", true)])], 2)
|
|
2210
|
+
], 2)], 2)) : createCommentVNode("", true)
|
|
2211
|
+
], 2);
|
|
2142
2212
|
};
|
|
2143
2213
|
}
|
|
2144
|
-
}), [["__scopeId", "data-v-
|
|
2214
|
+
}), [["__scopeId", "data-v-bbfd1ca8"]]);
|
|
2145
2215
|
//#endregion
|
|
2146
2216
|
//#region src/components/ImageInput.vue
|
|
2147
|
-
var _hoisted_1$
|
|
2148
|
-
var _hoisted_2$
|
|
2149
|
-
var _hoisted_3$
|
|
2150
|
-
var _hoisted_4$8 = {
|
|
2151
|
-
key: 0,
|
|
2152
|
-
class: "mt-4 rounded-lg border border-neutral-200 bg-neutral-50 p-4 dark:border-neutral-800 dark:bg-neutral-900/50"
|
|
2153
|
-
};
|
|
2154
|
-
var _hoisted_5$6 = { class: "flex items-center space-x-4" };
|
|
2155
|
-
var _hoisted_6$6 = ["src"];
|
|
2156
|
-
var _hoisted_7$6 = { class: "text-sm font-medium text-neutral-900 dark:text-neutral-50" };
|
|
2157
|
-
var _hoisted_8$4 = { class: "text-xs text-neutral-500 dark:text-neutral-200" };
|
|
2217
|
+
var _hoisted_1$23 = ["accept"];
|
|
2218
|
+
var _hoisted_2$15 = { class: "flex items-center space-x-4" };
|
|
2219
|
+
var _hoisted_3$10 = ["src"];
|
|
2158
2220
|
var _sfc_main$23 = {
|
|
2159
2221
|
__name: "ImageInput",
|
|
2160
2222
|
props: {
|
|
@@ -2177,6 +2239,10 @@ var _sfc_main$23 = {
|
|
|
2177
2239
|
attrs: {
|
|
2178
2240
|
type: Object,
|
|
2179
2241
|
default: () => ({})
|
|
2242
|
+
},
|
|
2243
|
+
ui: {
|
|
2244
|
+
type: Object,
|
|
2245
|
+
default: () => ({})
|
|
2180
2246
|
}
|
|
2181
2247
|
},
|
|
2182
2248
|
emits: ["update:modelValue"],
|
|
@@ -2187,23 +2253,25 @@ var _sfc_main$23 = {
|
|
|
2187
2253
|
emit("update:modelValue", event.target.files?.[0] ?? null);
|
|
2188
2254
|
};
|
|
2189
2255
|
return (_ctx, _cache) => {
|
|
2190
|
-
return openBlock(), createElementBlock("div",
|
|
2256
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(props.ui.root) }, [createElementVNode("div", { class: normalizeClass(["relative", props.ui.inputWrapper]) }, [createElementVNode("div", { class: normalizeClass(["absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", props.ui.leadingIcon]) }, [createVNode(unref(PhotoIcon), { class: "size-5 text-neutral-400 dark:text-neutral-200" })], 2), createElementVNode("input", mergeProps(__props.attrs, {
|
|
2191
2257
|
type: "file",
|
|
2192
2258
|
accept: __props.accept,
|
|
2193
|
-
class: "block w-full cursor-pointer rounded-lg border border-neutral-200 bg-white py-3 pl-10 pr-4 text-sm text-neutral-700 shadow-sm transition-all duration-200 file:mr-4 file:rounded-md file:border-0 file:bg-neutral-900 file:px-4 file:py-2 file:text-sm file:font-medium file:text-neutral-50 hover:file:bg-neutral-800 focus:border-neutral-900 focus:outline-none focus:ring-2 focus:ring-neutral-950/10 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-100 dark:file:bg-neutral-800 dark:file:text-neutral-50 dark:hover:file:bg-neutral-700 dark:focus:border-neutral-100 dark:focus:ring-neutral-100/10",
|
|
2259
|
+
class: ["block w-full cursor-pointer rounded-lg border border-neutral-200 bg-white py-3 pl-10 pr-4 text-sm text-neutral-700 shadow-sm transition-all duration-200 file:mr-4 file:rounded-md file:border-0 file:bg-neutral-900 file:px-4 file:py-2 file:text-sm file:font-medium file:text-neutral-50 hover:file:bg-neutral-800 focus:border-neutral-900 focus:outline-none focus:ring-2 focus:ring-neutral-950/10 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-100 dark:file:bg-neutral-800 dark:file:text-neutral-50 dark:hover:file:bg-neutral-700 dark:focus:border-neutral-100 dark:focus:ring-neutral-100/10", props.ui.input],
|
|
2194
2260
|
onChange: handleFileChange
|
|
2195
|
-
}), null, 16,
|
|
2261
|
+
}), null, 16, _hoisted_1$23)], 2), props.currentImageUrl ? (openBlock(), createElementBlock("div", {
|
|
2262
|
+
key: 0,
|
|
2263
|
+
class: normalizeClass(["mt-4 rounded-lg border border-neutral-200 bg-neutral-50 p-4 dark:border-neutral-800 dark:bg-neutral-900/50", props.ui.previewCard])
|
|
2264
|
+
}, [createElementVNode("div", _hoisted_2$15, [createElementVNode("img", {
|
|
2196
2265
|
src: props.currentImageUrl,
|
|
2197
2266
|
alt: "Current logo",
|
|
2198
|
-
class: "h-16 w-auto max-w-24 object-contain rounded-lg shadow-sm"
|
|
2199
|
-
}, null,
|
|
2267
|
+
class: normalizeClass(["h-16 w-auto max-w-24 object-contain rounded-lg shadow-sm", props.ui.previewImage])
|
|
2268
|
+
}, null, 10, _hoisted_3$10), createElementVNode("div", null, [createElementVNode("p", { class: normalizeClass(["text-sm font-medium text-neutral-900 dark:text-neutral-50", props.ui.previewTitle]) }, toDisplayString(props.currentLabel), 3), createElementVNode("p", { class: normalizeClass(["text-xs text-neutral-500 dark:text-neutral-200", props.ui.previewText]) }, toDisplayString(props.currentSubtext), 3)])])], 2)) : createCommentVNode("", true)], 2);
|
|
2200
2269
|
};
|
|
2201
2270
|
}
|
|
2202
2271
|
};
|
|
2203
2272
|
//#endregion
|
|
2204
2273
|
//#region src/components/NotationInput.vue
|
|
2205
|
-
var _hoisted_1$
|
|
2206
|
-
var _hoisted_2$16 = ["disabled", "onClick"];
|
|
2274
|
+
var _hoisted_1$22 = ["disabled", "onClick"];
|
|
2207
2275
|
var _sfc_main$22 = {
|
|
2208
2276
|
__name: "NotationInput",
|
|
2209
2277
|
props: {
|
|
@@ -2222,6 +2290,10 @@ var _sfc_main$22 = {
|
|
|
2222
2290
|
disabled: {
|
|
2223
2291
|
type: Boolean,
|
|
2224
2292
|
default: false
|
|
2293
|
+
},
|
|
2294
|
+
ui: {
|
|
2295
|
+
type: Object,
|
|
2296
|
+
default: () => ({})
|
|
2225
2297
|
}
|
|
2226
2298
|
},
|
|
2227
2299
|
emits: ["update:modelValue"],
|
|
@@ -2234,26 +2306,29 @@ var _sfc_main$22 = {
|
|
|
2234
2306
|
const isSelected = (option) => String(option) === String(props.modelValue ?? "");
|
|
2235
2307
|
const selectOption = (option) => emit("update:modelValue", option);
|
|
2236
2308
|
return (_ctx, _cache) => {
|
|
2237
|
-
return openBlock(), createElementBlock("div",
|
|
2309
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(["flex h-12 overflow-hidden rounded-lg border border-neutral-200 bg-white text-sm dark:border-neutral-800 dark:bg-neutral-950", props.ui.root]) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(normalizedOptions.value, (option, idx) => {
|
|
2238
2310
|
return openBlock(), createElementBlock("button", {
|
|
2239
2311
|
key: `notation-${idx}-${option}`,
|
|
2240
2312
|
type: "button",
|
|
2241
|
-
class: normalizeClass([
|
|
2313
|
+
class: normalizeClass([
|
|
2314
|
+
"flex-1 border-l border-neutral-200 px-2 text-center font-semibold transition-colors duration-150 first:border-l-0 dark:border-neutral-800",
|
|
2315
|
+
props.ui.option,
|
|
2242
2316
|
idx === 0 ? "rounded-l-lg" : "",
|
|
2243
2317
|
idx === normalizedOptions.value.length - 1 ? "rounded-r-lg" : "",
|
|
2244
2318
|
isSelected(option) ? "bg-neutral-900 text-neutral-50 dark:bg-neutral-800 dark:text-neutral-50" : "bg-white text-neutral-700 hover:bg-neutral-100 dark:bg-neutral-950 dark:text-neutral-100 dark:hover:bg-neutral-900",
|
|
2245
|
-
"focus-visible:ring-2 focus-visible:ring-neutral-900/20 focus-visible:ring-offset-0 dark:focus-visible:ring-neutral-100/20"
|
|
2246
|
-
|
|
2319
|
+
"focus-visible:ring-2 focus-visible:ring-neutral-900/20 focus-visible:ring-offset-0 dark:focus-visible:ring-neutral-100/20",
|
|
2320
|
+
isSelected(option) ? props.ui.optionSelected : props.ui.optionUnselected
|
|
2321
|
+
]),
|
|
2247
2322
|
disabled: __props.disabled,
|
|
2248
2323
|
onClick: ($event) => selectOption(option)
|
|
2249
|
-
}, toDisplayString(option), 11,
|
|
2250
|
-
}), 128))]);
|
|
2324
|
+
}, toDisplayString(option), 11, _hoisted_1$22);
|
|
2325
|
+
}), 128))], 2);
|
|
2251
2326
|
};
|
|
2252
2327
|
}
|
|
2253
2328
|
};
|
|
2254
2329
|
//#endregion
|
|
2255
2330
|
//#region src/components/RadioInput.vue
|
|
2256
|
-
var _hoisted_1$
|
|
2331
|
+
var _hoisted_1$21 = [
|
|
2257
2332
|
"name",
|
|
2258
2333
|
"value",
|
|
2259
2334
|
"checked",
|
|
@@ -2290,6 +2365,10 @@ var _sfc_main$21 = {
|
|
|
2290
2365
|
disabled: {
|
|
2291
2366
|
type: Boolean,
|
|
2292
2367
|
default: false
|
|
2368
|
+
},
|
|
2369
|
+
ui: {
|
|
2370
|
+
type: Object,
|
|
2371
|
+
default: () => ({})
|
|
2293
2372
|
}
|
|
2294
2373
|
},
|
|
2295
2374
|
emits: ["update:modelValue"],
|
|
@@ -2306,11 +2385,15 @@ var _sfc_main$21 = {
|
|
|
2306
2385
|
};
|
|
2307
2386
|
const onChange = () => emit("update:modelValue", props.value);
|
|
2308
2387
|
return (_ctx, _cache) => {
|
|
2309
|
-
return openBlock(), createElementBlock("label", { class: normalizeClass([
|
|
2388
|
+
return openBlock(), createElementBlock("label", { class: normalizeClass([
|
|
2389
|
+
"inline-flex items-center rounded-full border px-3 py-1 text-sm font-medium select-none transition-colors",
|
|
2390
|
+
props.ui.root,
|
|
2310
2391
|
isChecked.value ? "border-neutral-900 bg-neutral-900 text-neutral-50 dark:border-neutral-700 dark:bg-neutral-800 dark:text-neutral-50" : "border-neutral-200 text-neutral-600 dark:border-neutral-800 dark:text-neutral-100",
|
|
2311
2392
|
__props.disabled ? "opacity-60 cursor-not-allowed" : "cursor-pointer",
|
|
2312
|
-
hasFocus.value && !__props.disabled ? "ring-2 ring-neutral-900/20 ring-offset-2 ring-offset-white dark:ring-neutral-100/20 dark:ring-offset-neutral-950" : ""
|
|
2313
|
-
|
|
2393
|
+
hasFocus.value && !__props.disabled ? "ring-2 ring-neutral-900/20 ring-offset-2 ring-offset-white dark:ring-neutral-100/20 dark:ring-offset-neutral-950" : "",
|
|
2394
|
+
isChecked.value ? props.ui.controlChecked : props.ui.controlUnchecked,
|
|
2395
|
+
hasFocus.value && !__props.disabled ? props.ui.focus : ""
|
|
2396
|
+
]) }, [createElementVNode("input", {
|
|
2314
2397
|
type: "radio",
|
|
2315
2398
|
class: "sr-only",
|
|
2316
2399
|
name: __props.name,
|
|
@@ -2320,21 +2403,17 @@ var _sfc_main$21 = {
|
|
|
2320
2403
|
onChange,
|
|
2321
2404
|
onFocus: handleFocus,
|
|
2322
2405
|
onBlur: handleBlur
|
|
2323
|
-
}, null, 40, _hoisted_1$
|
|
2406
|
+
}, null, 40, _hoisted_1$21), createElementVNode("span", { class: normalizeClass(props.ui.label) }, [createElementVNode("span", { class: normalizeClass(props.ui.indicator) }, toDisplayString(isChecked.value ? "✓" : "○"), 3), createTextVNode(" " + toDisplayString(__props.label), 1)], 2)], 2);
|
|
2324
2407
|
};
|
|
2325
2408
|
}
|
|
2326
2409
|
};
|
|
2327
2410
|
//#endregion
|
|
2328
2411
|
//#region src/components/ToggleInput.vue
|
|
2329
|
-
var _hoisted_1$
|
|
2412
|
+
var _hoisted_1$20 = [
|
|
2330
2413
|
"name",
|
|
2331
2414
|
"checked",
|
|
2332
2415
|
"disabled"
|
|
2333
2416
|
];
|
|
2334
|
-
var _hoisted_2$15 = {
|
|
2335
|
-
key: 0,
|
|
2336
|
-
class: "text-sm text-neutral-700 dark:text-neutral-200"
|
|
2337
|
-
};
|
|
2338
2417
|
var _sfc_main$20 = {
|
|
2339
2418
|
__name: "ToggleInput",
|
|
2340
2419
|
props: {
|
|
@@ -2375,6 +2454,10 @@ var _sfc_main$20 = {
|
|
|
2375
2454
|
disabled: {
|
|
2376
2455
|
type: Boolean,
|
|
2377
2456
|
default: false
|
|
2457
|
+
},
|
|
2458
|
+
ui: {
|
|
2459
|
+
type: Object,
|
|
2460
|
+
default: () => ({})
|
|
2378
2461
|
}
|
|
2379
2462
|
},
|
|
2380
2463
|
emits: ["update:modelValue", "blur"],
|
|
@@ -2394,7 +2477,13 @@ var _sfc_main$20 = {
|
|
|
2394
2477
|
emit("update:modelValue", event.target.checked ? props.value : props.uncheckedValue);
|
|
2395
2478
|
};
|
|
2396
2479
|
return (_ctx, _cache) => {
|
|
2397
|
-
return openBlock(), createElementBlock("label", { class: normalizeClass([
|
|
2480
|
+
return openBlock(), createElementBlock("label", { class: normalizeClass([
|
|
2481
|
+
"inline-flex items-center gap-3 select-none",
|
|
2482
|
+
props.ui.root,
|
|
2483
|
+
__props.disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer",
|
|
2484
|
+
hasFocus.value && !__props.disabled ? "rounded-full ring-2 ring-neutral-900/20 ring-offset-2 ring-offset-white dark:ring-neutral-100/20 dark:ring-offset-neutral-950" : "",
|
|
2485
|
+
hasFocus.value && !__props.disabled ? props.ui.focus : ""
|
|
2486
|
+
]) }, [
|
|
2398
2487
|
createElementVNode("input", {
|
|
2399
2488
|
type: "checkbox",
|
|
2400
2489
|
class: "sr-only",
|
|
@@ -2404,19 +2493,30 @@ var _sfc_main$20 = {
|
|
|
2404
2493
|
onChange,
|
|
2405
2494
|
onFocus: handleFocus,
|
|
2406
2495
|
onBlur: handleBlur
|
|
2407
|
-
}, null, 40, _hoisted_1$
|
|
2496
|
+
}, null, 40, _hoisted_1$20),
|
|
2408
2497
|
createElementVNode("span", {
|
|
2409
2498
|
"aria-hidden": "true",
|
|
2410
|
-
class: normalizeClass([
|
|
2411
|
-
|
|
2412
|
-
|
|
2499
|
+
class: normalizeClass([
|
|
2500
|
+
"relative inline-flex h-6 w-11 items-center rounded-full border transition-colors duration-200",
|
|
2501
|
+
props.ui.control,
|
|
2502
|
+
isChecked.value ? "border-neutral-900 bg-neutral-900 dark:border-neutral-100 dark:bg-neutral-100" : "border-neutral-300 bg-neutral-200 dark:border-neutral-700 dark:bg-neutral-800",
|
|
2503
|
+
isChecked.value ? props.ui.controlChecked : props.ui.controlUnchecked
|
|
2504
|
+
])
|
|
2505
|
+
}, [createElementVNode("span", { class: normalizeClass([
|
|
2506
|
+
"inline-block size-4 rounded-full bg-white shadow-sm transition-transform duration-200 dark:bg-neutral-950",
|
|
2507
|
+
props.ui.indicator,
|
|
2508
|
+
isChecked.value ? "translate-x-6" : "translate-x-1"
|
|
2509
|
+
]) }, null, 2)], 2),
|
|
2510
|
+
__props.label ? (openBlock(), createElementBlock("span", {
|
|
2511
|
+
key: 0,
|
|
2512
|
+
class: normalizeClass(["text-sm text-neutral-700 dark:text-neutral-200", props.ui.label])
|
|
2513
|
+
}, toDisplayString(__props.label), 3)) : createCommentVNode("", true)
|
|
2413
2514
|
], 2);
|
|
2414
2515
|
};
|
|
2415
2516
|
}
|
|
2416
2517
|
};
|
|
2417
2518
|
//#endregion
|
|
2418
2519
|
//#region src/components/RadioMultipleInput.vue
|
|
2419
|
-
var _hoisted_1$22 = { class: "flex flex-wrap gap-3" };
|
|
2420
2520
|
var _sfc_main$19 = {
|
|
2421
2521
|
__name: "RadioMultipleInput",
|
|
2422
2522
|
props: {
|
|
@@ -2439,6 +2539,10 @@ var _sfc_main$19 = {
|
|
|
2439
2539
|
disabled: {
|
|
2440
2540
|
type: Boolean,
|
|
2441
2541
|
default: false
|
|
2542
|
+
},
|
|
2543
|
+
ui: {
|
|
2544
|
+
type: Object,
|
|
2545
|
+
default: () => ({})
|
|
2442
2546
|
}
|
|
2443
2547
|
},
|
|
2444
2548
|
emits: ["update:modelValue"],
|
|
@@ -2450,7 +2554,7 @@ var _sfc_main$19 = {
|
|
|
2450
2554
|
});
|
|
2451
2555
|
const selectOption = (option) => emit("update:modelValue", option);
|
|
2452
2556
|
return (_ctx, _cache) => {
|
|
2453
|
-
return openBlock(), createElementBlock("div",
|
|
2557
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(["flex flex-wrap gap-3", props.ui.group]) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(normalizedOptions.value, (option) => {
|
|
2454
2558
|
return openBlock(), createBlock(_sfc_main$16, {
|
|
2455
2559
|
key: `radio-${__props.name ?? "group"}-${option}`,
|
|
2456
2560
|
type: "radio-input",
|
|
@@ -2459,24 +2563,22 @@ var _sfc_main$19 = {
|
|
|
2459
2563
|
value: option,
|
|
2460
2564
|
label: option,
|
|
2461
2565
|
disabled: __props.disabled,
|
|
2566
|
+
ui: props.ui.item ?? props.ui,
|
|
2462
2567
|
"onUpdate:modelValue": selectOption
|
|
2463
2568
|
}, null, 8, [
|
|
2464
2569
|
"model-value",
|
|
2465
2570
|
"name",
|
|
2466
2571
|
"value",
|
|
2467
2572
|
"label",
|
|
2468
|
-
"disabled"
|
|
2573
|
+
"disabled",
|
|
2574
|
+
"ui"
|
|
2469
2575
|
]);
|
|
2470
|
-
}), 128))]);
|
|
2576
|
+
}), 128))], 2);
|
|
2471
2577
|
};
|
|
2472
2578
|
}
|
|
2473
2579
|
};
|
|
2474
2580
|
//#endregion
|
|
2475
2581
|
//#region src/components/TinyEditor.vue
|
|
2476
|
-
var _hoisted_1$21 = {
|
|
2477
|
-
key: 0,
|
|
2478
|
-
class: "min-h-[12rem] w-full rounded-lg border border-slate-300 bg-slate-50"
|
|
2479
|
-
};
|
|
2480
2582
|
var _sfc_main$18 = {
|
|
2481
2583
|
__name: "TinyEditor",
|
|
2482
2584
|
props: {
|
|
@@ -2521,6 +2623,10 @@ var _sfc_main$18 = {
|
|
|
2521
2623
|
outputFormat: {
|
|
2522
2624
|
type: String,
|
|
2523
2625
|
default: "html"
|
|
2626
|
+
},
|
|
2627
|
+
ui: {
|
|
2628
|
+
type: Object,
|
|
2629
|
+
default: () => ({})
|
|
2524
2630
|
}
|
|
2525
2631
|
},
|
|
2526
2632
|
emits: [
|
|
@@ -2550,18 +2656,18 @@ var _sfc_main$18 = {
|
|
|
2550
2656
|
});
|
|
2551
2657
|
};
|
|
2552
2658
|
const loadTinyMce = async () => {
|
|
2553
|
-
const tinymceModule = await import("./tinymce-
|
|
2659
|
+
const tinymceModule = await import("./tinymce-B6RzJMSu.js").then((m) => /* @__PURE__ */ __toESM(m.default));
|
|
2554
2660
|
const tinymce = tinymceModule.default ?? tinymceModule;
|
|
2555
2661
|
if (typeof globalThis !== "undefined" && !globalThis.tinymce) globalThis.tinymce = tinymce;
|
|
2556
2662
|
await Promise.all([
|
|
2557
|
-
import("./dom-
|
|
2558
|
-
import("./default-
|
|
2559
|
-
import("./silver-
|
|
2560
|
-
import("./code-
|
|
2561
|
-
import("./image-
|
|
2562
|
-
import("./link-
|
|
2563
|
-
import("./lists-
|
|
2564
|
-
import("./table-
|
|
2663
|
+
import("./dom-4lhd1Ept.js"),
|
|
2664
|
+
import("./default-CA9ynSrU.js"),
|
|
2665
|
+
import("./silver-CZmkZQ_0.js"),
|
|
2666
|
+
import("./code-B8pHdi9W.js"),
|
|
2667
|
+
import("./image-BeWt4zEx.js"),
|
|
2668
|
+
import("./link-I00eDCbV.js"),
|
|
2669
|
+
import("./lists-vBFc7KBM.js"),
|
|
2670
|
+
import("./table-DT5Z4VFh.js")
|
|
2565
2671
|
]);
|
|
2566
2672
|
isEditorReady.value = true;
|
|
2567
2673
|
};
|
|
@@ -2640,10 +2746,17 @@ var _sfc_main$18 = {
|
|
|
2640
2746
|
}
|
|
2641
2747
|
});
|
|
2642
2748
|
return (_ctx, _cache) => {
|
|
2643
|
-
return openBlock(), createElementBlock("div", {
|
|
2749
|
+
return openBlock(), createElementBlock("div", {
|
|
2750
|
+
key: editorKey.value,
|
|
2751
|
+
class: normalizeClass(props.ui.root)
|
|
2752
|
+
}, [!isEditorReady.value ? (openBlock(), createElementBlock("div", {
|
|
2753
|
+
key: 0,
|
|
2754
|
+
class: normalizeClass(["min-h-[12rem] w-full rounded-lg border border-slate-300 bg-slate-50", props.ui.container])
|
|
2755
|
+
}, null, 2)) : (openBlock(), createBlock(unref(Editor), {
|
|
2644
2756
|
key: 1,
|
|
2645
2757
|
ref_key: "editorComponentRef",
|
|
2646
2758
|
ref: editorComponentRef,
|
|
2759
|
+
class: normalizeClass([props.ui.container, props.ui.editorFrame]),
|
|
2647
2760
|
"initial-value": content.value,
|
|
2648
2761
|
"license-key": __props.licenseKey,
|
|
2649
2762
|
readonly: __props.readonly,
|
|
@@ -2653,72 +2766,63 @@ var _sfc_main$18 = {
|
|
|
2653
2766
|
onInput: handleEditorInput,
|
|
2654
2767
|
onBlur: handleEditorBlur
|
|
2655
2768
|
}, null, 8, [
|
|
2769
|
+
"class",
|
|
2656
2770
|
"initial-value",
|
|
2657
2771
|
"license-key",
|
|
2658
2772
|
"readonly",
|
|
2659
2773
|
"output-format",
|
|
2660
2774
|
"init"
|
|
2661
|
-
]))]);
|
|
2775
|
+
]))], 2);
|
|
2662
2776
|
};
|
|
2663
2777
|
}
|
|
2664
2778
|
};
|
|
2665
2779
|
//#endregion
|
|
2666
2780
|
//#region src/components/ColorPicker.vue
|
|
2667
|
-
var _hoisted_1$
|
|
2668
|
-
var _hoisted_2$14 = [
|
|
2781
|
+
var _hoisted_1$19 = [
|
|
2669
2782
|
"name",
|
|
2670
2783
|
"value",
|
|
2671
2784
|
"disabled",
|
|
2672
2785
|
"required"
|
|
2673
2786
|
];
|
|
2674
|
-
var
|
|
2675
|
-
var
|
|
2787
|
+
var _hoisted_2$14 = ["disabled", "aria-expanded"];
|
|
2788
|
+
var _hoisted_3$9 = { class: "min-w-0 flex-1" };
|
|
2789
|
+
var _hoisted_4$7 = { class: "flex items-start gap-3" };
|
|
2676
2790
|
var _hoisted_5$5 = { class: "min-w-0 flex-1" };
|
|
2677
|
-
var _hoisted_6$5 =
|
|
2678
|
-
var _hoisted_7$5 = { class: "
|
|
2679
|
-
var _hoisted_8$3 =
|
|
2680
|
-
var _hoisted_9$3 = {
|
|
2681
|
-
var _hoisted_10$3 = { class: "color-picker-checker relative size-14 shrink-0 overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-700" };
|
|
2682
|
-
var _hoisted_11$3 = { class: "min-w-0 flex-1" };
|
|
2683
|
-
var _hoisted_12$2 = { class: "text-xs font-medium uppercase tracking-[0.16em] text-neutral-500 dark:text-neutral-400" };
|
|
2684
|
-
var _hoisted_13$2 = { class: "truncate font-mono text-base text-neutral-900 dark:text-neutral-50" };
|
|
2685
|
-
var _hoisted_14$2 = ["disabled", "aria-label"];
|
|
2686
|
-
var _hoisted_15$2 = { class: "mt-4 space-y-4" };
|
|
2687
|
-
var _hoisted_16$1 = ["aria-label", "aria-valuenow"];
|
|
2688
|
-
var _hoisted_17$1 = {
|
|
2791
|
+
var _hoisted_6$5 = ["disabled", "aria-label"];
|
|
2792
|
+
var _hoisted_7$5 = { class: "mt-4 space-y-4" };
|
|
2793
|
+
var _hoisted_8$3 = ["aria-label", "aria-valuenow"];
|
|
2794
|
+
var _hoisted_9$3 = {
|
|
2689
2795
|
key: 0,
|
|
2690
2796
|
class: "absolute inset-0 bg-[linear-gradient(to_right,#fff,transparent)]"
|
|
2691
2797
|
};
|
|
2692
|
-
var
|
|
2798
|
+
var _hoisted_10$3 = {
|
|
2693
2799
|
key: 2,
|
|
2694
2800
|
class: "absolute inset-0 bg-[linear-gradient(to_top,#000,transparent)]"
|
|
2695
2801
|
};
|
|
2696
|
-
var
|
|
2697
|
-
var
|
|
2802
|
+
var _hoisted_11$3 = { class: "space-y-3" };
|
|
2803
|
+
var _hoisted_12$2 = {
|
|
2698
2804
|
key: 0,
|
|
2699
2805
|
class: "space-y-2"
|
|
2700
2806
|
};
|
|
2701
|
-
var
|
|
2702
|
-
var
|
|
2703
|
-
var _hoisted_23 = [
|
|
2807
|
+
var _hoisted_13$2 = ["for"];
|
|
2808
|
+
var _hoisted_14$2 = [
|
|
2704
2809
|
"id",
|
|
2705
2810
|
"disabled",
|
|
2706
2811
|
"value"
|
|
2707
2812
|
];
|
|
2708
|
-
var
|
|
2813
|
+
var _hoisted_15$2 = {
|
|
2709
2814
|
key: 1,
|
|
2710
2815
|
class: "space-y-2"
|
|
2711
2816
|
};
|
|
2712
|
-
var
|
|
2713
|
-
var
|
|
2714
|
-
var _hoisted_27 = [
|
|
2817
|
+
var _hoisted_16$1 = ["for"];
|
|
2818
|
+
var _hoisted_17$1 = [
|
|
2715
2819
|
"id",
|
|
2716
2820
|
"disabled",
|
|
2717
2821
|
"value"
|
|
2718
2822
|
];
|
|
2719
|
-
var
|
|
2720
|
-
var
|
|
2721
|
-
var
|
|
2823
|
+
var _hoisted_18$1 = { class: "space-y-2" };
|
|
2824
|
+
var _hoisted_19 = ["for"];
|
|
2825
|
+
var _hoisted_20 = [
|
|
2722
2826
|
"id",
|
|
2723
2827
|
"maxlength",
|
|
2724
2828
|
"placeholder",
|
|
@@ -2751,6 +2855,10 @@ var ColorPicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
2751
2855
|
variant: {
|
|
2752
2856
|
type: String,
|
|
2753
2857
|
default: "classic"
|
|
2858
|
+
},
|
|
2859
|
+
ui: {
|
|
2860
|
+
type: Object,
|
|
2861
|
+
default: () => ({})
|
|
2754
2862
|
}
|
|
2755
2863
|
},
|
|
2756
2864
|
emits: ["update:modelValue", "blur"],
|
|
@@ -2946,7 +3054,8 @@ var ColorPicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
2946
3054
|
const triggerClasses = computed(() => [
|
|
2947
3055
|
"group flex w-full items-center gap-3 rounded-lg border border-neutral-200 bg-white px-3 py-3 text-left text-sm text-neutral-950 shadow-sm outline-none transition-colors focus:border-neutral-900 focus:ring-2 focus:ring-neutral-950/10 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50 dark:focus:border-neutral-100 dark:focus:ring-neutral-100/10",
|
|
2948
3056
|
attrs.class,
|
|
2949
|
-
props.disabled ? props.disabledClass : ""
|
|
3057
|
+
props.disabled ? props.disabledClass : "",
|
|
3058
|
+
props.ui.trigger
|
|
2950
3059
|
]);
|
|
2951
3060
|
const hiddenInputRequired = computed(() => Boolean(attrs.required) && !props.disabled);
|
|
2952
3061
|
const hexInputPlaceholder = computed(() => props.allowAlpha ? "#RRGGBBAA" : "#RRGGBB");
|
|
@@ -3171,7 +3280,7 @@ var ColorPicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
3171
3280
|
});
|
|
3172
3281
|
__expose({ focus: () => triggerRef.value?.focus() });
|
|
3173
3282
|
return (_ctx, _cache) => {
|
|
3174
|
-
return openBlock(), createElementBlock("div",
|
|
3283
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(["relative w-full", props.ui.root]) }, [
|
|
3175
3284
|
fieldName.value ? (openBlock(), createElementBlock("input", {
|
|
3176
3285
|
key: 0,
|
|
3177
3286
|
type: "hidden",
|
|
@@ -3179,7 +3288,7 @@ var ColorPicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
3179
3288
|
value: emittedValue.value,
|
|
3180
3289
|
disabled: props.disabled,
|
|
3181
3290
|
required: hiddenInputRequired.value
|
|
3182
|
-
}, null, 8,
|
|
3291
|
+
}, null, 8, _hoisted_1$19)) : createCommentVNode("", true),
|
|
3183
3292
|
createElementVNode("button", mergeProps({
|
|
3184
3293
|
ref_key: "triggerRef",
|
|
3185
3294
|
ref: triggerRef
|
|
@@ -3191,13 +3300,17 @@ var ColorPicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
3191
3300
|
"aria-haspopup": "dialog",
|
|
3192
3301
|
onClick: togglePanel
|
|
3193
3302
|
}), [
|
|
3194
|
-
createElementVNode("span",
|
|
3303
|
+
createElementVNode("span", { class: normalizeClass(["color-picker-checker relative inline-flex size-10 shrink-0 overflow-hidden rounded-lg border border-neutral-200 dark:border-neutral-700", props.ui.swatch]) }, [createElementVNode("span", {
|
|
3195
3304
|
class: "absolute inset-0",
|
|
3196
3305
|
style: normalizeStyle({ backgroundColor: swatchColor.value })
|
|
3197
|
-
}, null, 4)]),
|
|
3198
|
-
createElementVNode("span",
|
|
3199
|
-
createVNode(unref(ChevronDownIcon), { class: normalizeClass([
|
|
3200
|
-
|
|
3306
|
+
}, null, 4)], 2),
|
|
3307
|
+
createElementVNode("span", _hoisted_3$9, [createElementVNode("span", { class: normalizeClass(["block text-xs font-medium uppercase tracking-[0.16em] text-neutral-500 dark:text-neutral-400", props.ui.sectionLabel]) }, toDisplayString(unref(t)("Color")), 3), createElementVNode("span", { class: normalizeClass(["block truncate font-mono text-sm text-neutral-900 dark:text-neutral-50", props.ui.value]) }, toDisplayString(emittedValue.value), 3)]),
|
|
3308
|
+
createVNode(unref(ChevronDownIcon), { class: normalizeClass([
|
|
3309
|
+
"size-4 shrink-0 text-neutral-400 transition-transform dark:text-neutral-500",
|
|
3310
|
+
isOpen.value ? "rotate-180" : "",
|
|
3311
|
+
props.ui.chevron
|
|
3312
|
+
]) }, null, 8, ["class"])
|
|
3313
|
+
], 16, _hoisted_2$14),
|
|
3201
3314
|
(openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(Transition, {
|
|
3202
3315
|
"enter-active-class": "transition duration-150 ease-out",
|
|
3203
3316
|
"enter-from-class": "opacity-0 translate-y-1",
|
|
@@ -3210,27 +3323,31 @@ var ColorPicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
3210
3323
|
key: 0,
|
|
3211
3324
|
ref_key: "panelRef",
|
|
3212
3325
|
ref: panelRef,
|
|
3213
|
-
class: "z-50",
|
|
3326
|
+
class: normalizeClass(["z-50", props.ui.panelRoot]),
|
|
3214
3327
|
style: normalizeStyle(panelStyle.value)
|
|
3215
|
-
}, [createElementVNode("div",
|
|
3216
|
-
createElementVNode("div",
|
|
3328
|
+
}, [createElementVNode("div", { class: normalizeClass(["rounded-2xl border border-neutral-200 bg-white/96 p-4 shadow-2xl shadow-neutral-950/12 backdrop-blur dark:border-neutral-800 dark:bg-neutral-950/96 dark:shadow-black/30", props.ui.panel]) }, [createElementVNode("div", _hoisted_4$7, [
|
|
3329
|
+
createElementVNode("div", { class: normalizeClass(["color-picker-checker relative size-14 shrink-0 overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-700", props.ui.previewSwatch]) }, [createElementVNode("span", {
|
|
3217
3330
|
class: "absolute inset-0",
|
|
3218
3331
|
style: normalizeStyle({ backgroundColor: swatchColor.value })
|
|
3219
|
-
}, null, 4)]),
|
|
3220
|
-
createElementVNode("div",
|
|
3332
|
+
}, null, 4)], 2),
|
|
3333
|
+
createElementVNode("div", _hoisted_5$5, [createElementVNode("p", { class: normalizeClass(["text-xs font-medium uppercase tracking-[0.16em] text-neutral-500 dark:text-neutral-400", props.ui.sectionLabel]) }, toDisplayString(unref(t)("Selected color")), 3), createElementVNode("p", { class: normalizeClass(["truncate font-mono text-base text-neutral-900 dark:text-neutral-50", props.ui.value]) }, toDisplayString(emittedValue.value), 3)]),
|
|
3221
3334
|
supportsEyeDropper.value ? (openBlock(), createElementBlock("button", {
|
|
3222
3335
|
key: 0,
|
|
3223
3336
|
type: "button",
|
|
3224
|
-
class: normalizeClass([
|
|
3337
|
+
class: normalizeClass([
|
|
3338
|
+
"inline-flex size-10 items-center justify-center rounded-xl border border-neutral-200 text-neutral-600 transition-colors hover:bg-neutral-100 focus:outline-none focus:ring-2 focus:ring-neutral-950/10 dark:border-neutral-800 dark:text-neutral-300 dark:hover:bg-neutral-900 dark:focus:ring-neutral-100/10",
|
|
3339
|
+
props.disabled ? "cursor-not-allowed opacity-50" : "",
|
|
3340
|
+
props.ui.eyedropperButton
|
|
3341
|
+
]),
|
|
3225
3342
|
disabled: props.disabled,
|
|
3226
3343
|
"aria-label": unref(t)("Pick color from screen"),
|
|
3227
3344
|
onClick: pickFromScreen
|
|
3228
|
-
}, [createVNode(unref(EyeDropperIcon), { class: "size-5" })], 10,
|
|
3229
|
-
]), createElementVNode("div",
|
|
3345
|
+
}, [createVNode(unref(EyeDropperIcon), { class: "size-5" })], 10, _hoisted_6$5)) : createCommentVNode("", true)
|
|
3346
|
+
]), createElementVNode("div", _hoisted_7$5, [
|
|
3230
3347
|
createElementVNode("div", {
|
|
3231
3348
|
ref_key: "saturationRef",
|
|
3232
3349
|
ref: saturationRef,
|
|
3233
|
-
class: "relative h-48 cursor-crosshair overflow-hidden rounded-2xl border border-neutral-200 dark:border-neutral-800",
|
|
3350
|
+
class: normalizeClass(["relative h-48 cursor-crosshair overflow-hidden rounded-2xl border border-neutral-200 dark:border-neutral-800", props.ui.saturationArea]),
|
|
3234
3351
|
style: normalizeStyle(saturationAreaStyle.value),
|
|
3235
3352
|
tabindex: "0",
|
|
3236
3353
|
role: "slider",
|
|
@@ -3241,40 +3358,40 @@ var ColorPicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
3241
3358
|
onPointerdown: _cache[0] || (_cache[0] = ($event) => beginDrag($event, updateFromSaturationPointer)),
|
|
3242
3359
|
onKeydown: updateFromSaturationKey
|
|
3243
3360
|
}, [
|
|
3244
|
-
!isRainbowVariant.value ? (openBlock(), createElementBlock("div",
|
|
3245
|
-
isRainbowVariant.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [_cache[1] || (_cache[1] = createElementVNode("div", { class: "absolute inset-x-0 top-0 h-1/2 bg-[linear-gradient(to_bottom,#fff,transparent)]" }, null, -1)), _cache[2] || (_cache[2] = createElementVNode("div", { class: "absolute inset-x-0 bottom-0 h-1/2 bg-[linear-gradient(to_bottom,transparent,#000)]" }, null, -1))], 64)) : (openBlock(), createElementBlock("div",
|
|
3361
|
+
!isRainbowVariant.value ? (openBlock(), createElementBlock("div", _hoisted_9$3)) : createCommentVNode("", true),
|
|
3362
|
+
isRainbowVariant.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [_cache[1] || (_cache[1] = createElementVNode("div", { class: "absolute inset-x-0 top-0 h-1/2 bg-[linear-gradient(to_bottom,#fff,transparent)]" }, null, -1)), _cache[2] || (_cache[2] = createElementVNode("div", { class: "absolute inset-x-0 bottom-0 h-1/2 bg-[linear-gradient(to_bottom,transparent,#000)]" }, null, -1))], 64)) : (openBlock(), createElementBlock("div", _hoisted_10$3)),
|
|
3246
3363
|
createElementVNode("span", {
|
|
3247
|
-
class: "pointer-events-none absolute size-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgba(0,0,0,0.3)]",
|
|
3364
|
+
class: normalizeClass(["pointer-events-none absolute size-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgba(0,0,0,0.3)]", props.ui.saturationHandle]),
|
|
3248
3365
|
style: normalizeStyle(saturationHandleStyle.value)
|
|
3249
|
-
}, null,
|
|
3250
|
-
],
|
|
3251
|
-
createElementVNode("div",
|
|
3366
|
+
}, null, 6)
|
|
3367
|
+
], 46, _hoisted_8$3),
|
|
3368
|
+
createElementVNode("div", _hoisted_11$3, [!isRainbowVariant.value ? (openBlock(), createElementBlock("div", _hoisted_12$2, [createElementVNode("div", { class: normalizeClass(["flex items-center justify-between text-xs font-medium text-neutral-500 dark:text-neutral-400", props.ui.sectionLabel]) }, [createElementVNode("label", { for: fieldId.value ? `${fieldId.value}-hue` : void 0 }, toDisplayString(unref(t)("Hue")), 9, _hoisted_13$2), createElementVNode("span", null, toDisplayString(Math.round(hue.value)) + "°", 1)], 2), createElementVNode("input", {
|
|
3252
3369
|
id: fieldId.value ? `${fieldId.value}-hue` : void 0,
|
|
3253
3370
|
type: "range",
|
|
3254
3371
|
min: "0",
|
|
3255
3372
|
max: "360",
|
|
3256
3373
|
step: "1",
|
|
3257
|
-
class: "color-picker-range",
|
|
3374
|
+
class: normalizeClass(["color-picker-range", props.ui.range]),
|
|
3258
3375
|
disabled: props.disabled,
|
|
3259
3376
|
value: hue.value,
|
|
3260
3377
|
style: { "background": "linear-gradient(90deg, #FF0000 0%, #FFFF00 17%, #00FF00 33%, #00FFFF 50%, #0000FF 67%, #FF00FF 83%, #FF0000 100%)" },
|
|
3261
3378
|
onInput: handleHueInput
|
|
3262
|
-
}, null,
|
|
3379
|
+
}, null, 42, _hoisted_14$2)])) : createCommentVNode("", true), props.allowAlpha ? (openBlock(), createElementBlock("div", _hoisted_15$2, [createElementVNode("div", { class: normalizeClass(["flex items-center justify-between text-xs font-medium text-neutral-500 dark:text-neutral-400", props.ui.sectionLabel]) }, [createElementVNode("label", { for: fieldId.value ? `${fieldId.value}-alpha` : void 0 }, toDisplayString(unref(t)("Opacity")), 9, _hoisted_16$1), createElementVNode("span", null, toDisplayString(opacityPercent.value) + "%", 1)], 2), createElementVNode("input", {
|
|
3263
3380
|
id: fieldId.value ? `${fieldId.value}-alpha` : void 0,
|
|
3264
3381
|
type: "range",
|
|
3265
3382
|
min: "0",
|
|
3266
3383
|
max: "100",
|
|
3267
3384
|
step: "1",
|
|
3268
|
-
class: "color-picker-range",
|
|
3385
|
+
class: normalizeClass(["color-picker-range", props.ui.range]),
|
|
3269
3386
|
disabled: props.disabled,
|
|
3270
3387
|
value: opacityPercent.value,
|
|
3271
3388
|
style: normalizeStyle({ background: alphaGradient.value }),
|
|
3272
3389
|
onInput: handleAlphaInput
|
|
3273
|
-
}, null,
|
|
3274
|
-
createElementVNode("div",
|
|
3390
|
+
}, null, 46, _hoisted_17$1)])) : createCommentVNode("", true)]),
|
|
3391
|
+
createElementVNode("div", _hoisted_18$1, [createElementVNode("label", {
|
|
3275
3392
|
for: fieldId.value ? `${fieldId.value}-hex` : void 0,
|
|
3276
|
-
class: "text-xs font-medium uppercase tracking-[0.16em] text-neutral-500 dark:text-neutral-400"
|
|
3277
|
-
}, toDisplayString(unref(t)("Hex value")),
|
|
3393
|
+
class: normalizeClass(["text-xs font-medium uppercase tracking-[0.16em] text-neutral-500 dark:text-neutral-400", props.ui.sectionLabel])
|
|
3394
|
+
}, toDisplayString(unref(t)("Hex value")), 11, _hoisted_19), createElementVNode("input", {
|
|
3278
3395
|
id: fieldId.value ? `${fieldId.value}-hex` : void 0,
|
|
3279
3396
|
ref_key: "hexInputRef",
|
|
3280
3397
|
ref: hexInputRef,
|
|
@@ -3284,31 +3401,31 @@ var ColorPicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
3284
3401
|
autocapitalize: "characters",
|
|
3285
3402
|
maxlength: props.allowAlpha ? 9 : 7,
|
|
3286
3403
|
placeholder: hexInputPlaceholder.value,
|
|
3287
|
-
class: "w-full rounded-xl border border-neutral-200 bg-white px-3 py-2.5 font-mono text-sm text-neutral-950 shadow-sm outline-none transition-colors focus:border-neutral-900 focus:ring-2 focus:ring-neutral-950/10 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50 dark:focus:border-neutral-100 dark:focus:ring-neutral-100/10",
|
|
3404
|
+
class: normalizeClass(["w-full rounded-xl border border-neutral-200 bg-white px-3 py-2.5 font-mono text-sm text-neutral-950 shadow-sm outline-none transition-colors focus:border-neutral-900 focus:ring-2 focus:ring-neutral-950/10 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50 dark:focus:border-neutral-100 dark:focus:ring-neutral-100/10", props.ui.hexInput]),
|
|
3288
3405
|
value: displayValue.value,
|
|
3289
3406
|
disabled: props.disabled,
|
|
3290
3407
|
onInput: handleHexInput,
|
|
3291
3408
|
onBlur: handleHexBlur
|
|
3292
|
-
}, null,
|
|
3293
|
-
])])],
|
|
3409
|
+
}, null, 42, _hoisted_20)])
|
|
3410
|
+
])], 2)], 6)) : createCommentVNode("", true)]),
|
|
3294
3411
|
_: 1
|
|
3295
3412
|
})]))
|
|
3296
|
-
]);
|
|
3413
|
+
], 2);
|
|
3297
3414
|
};
|
|
3298
3415
|
}
|
|
3299
|
-
}), [["__scopeId", "data-v-
|
|
3416
|
+
}), [["__scopeId", "data-v-ace35bd9"]]);
|
|
3300
3417
|
//#endregion
|
|
3301
3418
|
//#region src/components/InputGroup.vue
|
|
3302
|
-
var _hoisted_1$
|
|
3419
|
+
var _hoisted_1$18 = ["for"];
|
|
3303
3420
|
var _hoisted_2$13 = {
|
|
3304
|
-
key:
|
|
3305
|
-
class: "
|
|
3306
|
-
};
|
|
3307
|
-
var _hoisted_3$9 = {
|
|
3308
|
-
key: 18,
|
|
3309
|
-
class: "flex items-center mt-2 text-sm text-red-600"
|
|
3421
|
+
key: 3,
|
|
3422
|
+
class: "relative"
|
|
3310
3423
|
};
|
|
3311
3424
|
var defaultFieldClass = "block w-full rounded-lg border border-neutral-200 bg-white px-4 py-3 text-sm text-neutral-950 placeholder:text-neutral-400 shadow-sm transition-all duration-200 focus:border-neutral-900 focus:outline-none focus:ring-2 focus:ring-neutral-950/10 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50 dark:placeholder:text-neutral-500 dark:focus:border-neutral-100 dark:focus:ring-neutral-100/10";
|
|
3425
|
+
var defaultLabelClass = "mb-1 block text-base font-semibold text-gray-900 dark:text-gray-50";
|
|
3426
|
+
var defaultHelperTextClass = "mb-1 block text-xs text-gray-500";
|
|
3427
|
+
var defaultErrorClass = "mt-2 flex items-center text-sm text-red-600";
|
|
3428
|
+
var defaultErrorIconClass = "mr-1 h-4 w-4 flex-shrink-0";
|
|
3312
3429
|
var _sfc_main$16 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
3313
3430
|
__name: "InputGroup",
|
|
3314
3431
|
props: {
|
|
@@ -3549,6 +3666,74 @@ var _sfc_main$16 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
3549
3666
|
noOptionsText: {
|
|
3550
3667
|
type: String,
|
|
3551
3668
|
default: void 0
|
|
3669
|
+
},
|
|
3670
|
+
rootClass: {
|
|
3671
|
+
type: [
|
|
3672
|
+
String,
|
|
3673
|
+
Array,
|
|
3674
|
+
Object
|
|
3675
|
+
],
|
|
3676
|
+
default: void 0
|
|
3677
|
+
},
|
|
3678
|
+
labelClass: {
|
|
3679
|
+
type: [
|
|
3680
|
+
String,
|
|
3681
|
+
Array,
|
|
3682
|
+
Object
|
|
3683
|
+
],
|
|
3684
|
+
default: void 0
|
|
3685
|
+
},
|
|
3686
|
+
helperTextClass: {
|
|
3687
|
+
type: [
|
|
3688
|
+
String,
|
|
3689
|
+
Array,
|
|
3690
|
+
Object
|
|
3691
|
+
],
|
|
3692
|
+
default: void 0
|
|
3693
|
+
},
|
|
3694
|
+
errorClass: {
|
|
3695
|
+
type: [
|
|
3696
|
+
String,
|
|
3697
|
+
Array,
|
|
3698
|
+
Object
|
|
3699
|
+
],
|
|
3700
|
+
default: void 0
|
|
3701
|
+
},
|
|
3702
|
+
errorIconClass: {
|
|
3703
|
+
type: [
|
|
3704
|
+
String,
|
|
3705
|
+
Array,
|
|
3706
|
+
Object
|
|
3707
|
+
],
|
|
3708
|
+
default: void 0
|
|
3709
|
+
},
|
|
3710
|
+
errorTextClass: {
|
|
3711
|
+
type: [
|
|
3712
|
+
String,
|
|
3713
|
+
Array,
|
|
3714
|
+
Object
|
|
3715
|
+
],
|
|
3716
|
+
default: void 0
|
|
3717
|
+
},
|
|
3718
|
+
leadingIconClass: {
|
|
3719
|
+
type: [
|
|
3720
|
+
String,
|
|
3721
|
+
Array,
|
|
3722
|
+
Object
|
|
3723
|
+
],
|
|
3724
|
+
default: void 0
|
|
3725
|
+
},
|
|
3726
|
+
trailingIconClass: {
|
|
3727
|
+
type: [
|
|
3728
|
+
String,
|
|
3729
|
+
Array,
|
|
3730
|
+
Object
|
|
3731
|
+
],
|
|
3732
|
+
default: void 0
|
|
3733
|
+
},
|
|
3734
|
+
ui: {
|
|
3735
|
+
type: Object,
|
|
3736
|
+
default: () => ({})
|
|
3552
3737
|
}
|
|
3553
3738
|
},
|
|
3554
3739
|
emits: ["update:modelValue", "blur"],
|
|
@@ -3556,7 +3741,16 @@ var _sfc_main$16 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
3556
3741
|
const props = __props;
|
|
3557
3742
|
const emit = __emit;
|
|
3558
3743
|
const attrs = useAttrs();
|
|
3744
|
+
const slots = useSlots();
|
|
3559
3745
|
const updateValue = (value) => emit("update:modelValue", value);
|
|
3746
|
+
const onUpdateModelValue = (value) => emit("update:modelValue", value);
|
|
3747
|
+
const onBlur = (event) => emit("blur", event);
|
|
3748
|
+
const fieldListeners = {
|
|
3749
|
+
"update:modelValue": onUpdateModelValue,
|
|
3750
|
+
blur: onBlur
|
|
3751
|
+
};
|
|
3752
|
+
const hasLeadingIconSlot = computed(() => Boolean(slots["leading-icon"]));
|
|
3753
|
+
const hasTrailingIconSlot = computed(() => Boolean(slots["trailing-icon"]));
|
|
3560
3754
|
const hasError = computed(() => Boolean(props.errorMessage));
|
|
3561
3755
|
const showsInlineChoiceControl = computed(() => isCheckboxSingleType.value || isRadioSingleType.value || isToggleSingleType.value);
|
|
3562
3756
|
const fieldId = computed(() => {
|
|
@@ -3591,14 +3785,23 @@ var _sfc_main$16 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
3591
3785
|
const isSelectType = computed(() => props.type === "select");
|
|
3592
3786
|
const isTextLikeType = computed(() => textLikeTypes.includes(props.type));
|
|
3593
3787
|
const isNoComponentType = computed(() => noComponentTypes.includes(props.type));
|
|
3788
|
+
const supportsAutoDecoratedField = computed(() => isTextLikeType.value && props.type !== "password" || isDateType.value);
|
|
3789
|
+
const showsLeadingIcon = computed(() => supportsAutoDecoratedField.value && hasLeadingIconSlot.value);
|
|
3790
|
+
const showsTrailingIcon = computed(() => supportsAutoDecoratedField.value && hasTrailingIconSlot.value);
|
|
3791
|
+
const decoratedFieldClass = computed(() => [showsLeadingIcon.value ? "pl-10" : null, showsTrailingIcon.value ? "pr-10" : null]);
|
|
3594
3792
|
const textInputBindings = computed(() => ({
|
|
3595
3793
|
...attrs,
|
|
3596
|
-
class: [
|
|
3794
|
+
class: [
|
|
3795
|
+
defaultFieldClass,
|
|
3796
|
+
attrs.class,
|
|
3797
|
+
decoratedFieldClass.value
|
|
3798
|
+
],
|
|
3597
3799
|
type: props.type,
|
|
3598
3800
|
name: props.name,
|
|
3599
3801
|
modelValue: props.modelValue,
|
|
3600
3802
|
disabled: props.disabled,
|
|
3601
|
-
disabledClass: props.disabledClass
|
|
3803
|
+
disabledClass: props.disabledClass,
|
|
3804
|
+
ui: props.ui
|
|
3602
3805
|
}));
|
|
3603
3806
|
const textAreaBindings = computed(() => ({
|
|
3604
3807
|
...attrs,
|
|
@@ -3606,17 +3809,23 @@ var _sfc_main$16 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
3606
3809
|
name: props.name,
|
|
3607
3810
|
modelValue: props.modelValue,
|
|
3608
3811
|
disabled: props.disabled,
|
|
3609
|
-
disabledClass: props.disabledClass
|
|
3812
|
+
disabledClass: props.disabledClass,
|
|
3813
|
+
ui: props.ui
|
|
3610
3814
|
}));
|
|
3611
3815
|
const dateBindings = computed(() => ({
|
|
3612
3816
|
...attrs,
|
|
3613
|
-
class: [
|
|
3817
|
+
class: [
|
|
3818
|
+
defaultFieldClass,
|
|
3819
|
+
attrs.class,
|
|
3820
|
+
decoratedFieldClass.value
|
|
3821
|
+
],
|
|
3614
3822
|
name: props.name,
|
|
3615
3823
|
modelValue: props.modelValue,
|
|
3616
3824
|
locale: props.locale,
|
|
3617
3825
|
withTimestamp: props.type === "datetime-local" || props.withTimestamp,
|
|
3618
3826
|
disabled: props.disabled,
|
|
3619
|
-
disabledClass: props.disabledClass
|
|
3827
|
+
disabledClass: props.disabledClass,
|
|
3828
|
+
ui: props.ui
|
|
3620
3829
|
}));
|
|
3621
3830
|
const selectBindings = computed(() => {
|
|
3622
3831
|
const inputProps = {
|
|
@@ -3634,7 +3843,8 @@ var _sfc_main$16 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
3634
3843
|
labelKey: props.labelKey,
|
|
3635
3844
|
valueKey: props.valueKey,
|
|
3636
3845
|
deletedKey: props.deletedKey,
|
|
3637
|
-
optionLabel: props.optionLabel
|
|
3846
|
+
optionLabel: props.optionLabel,
|
|
3847
|
+
ui: props.ui
|
|
3638
3848
|
};
|
|
3639
3849
|
if (props.baseClass !== void 0) inputProps.baseClass = props.baseClass;
|
|
3640
3850
|
if (props.normalTextClass !== void 0) inputProps.normalTextClass = props.normalTextClass;
|
|
@@ -3654,42 +3864,48 @@ var _sfc_main$16 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
3654
3864
|
name: props.name,
|
|
3655
3865
|
modelValue: props.modelValue,
|
|
3656
3866
|
options: props.options,
|
|
3657
|
-
disabled: props.disabled
|
|
3867
|
+
disabled: props.disabled,
|
|
3868
|
+
ui: props.ui
|
|
3658
3869
|
}));
|
|
3659
3870
|
const checkboxBindings = computed(() => ({
|
|
3660
3871
|
...attrs,
|
|
3661
3872
|
name: props.name,
|
|
3662
3873
|
modelValue: props.modelValue,
|
|
3663
3874
|
options: props.options,
|
|
3664
|
-
disabled: props.disabled
|
|
3875
|
+
disabled: props.disabled,
|
|
3876
|
+
ui: props.ui
|
|
3665
3877
|
}));
|
|
3666
3878
|
const radioBindings = computed(() => ({
|
|
3667
3879
|
...attrs,
|
|
3668
3880
|
modelValue: props.modelValue,
|
|
3669
3881
|
options: props.options,
|
|
3670
3882
|
name: props.name ?? attrs.name,
|
|
3671
|
-
disabled: props.disabled
|
|
3883
|
+
disabled: props.disabled,
|
|
3884
|
+
ui: props.ui
|
|
3672
3885
|
}));
|
|
3673
3886
|
const checkboxSingleBindings = computed(() => ({
|
|
3674
3887
|
...attrs,
|
|
3675
3888
|
name: props.name,
|
|
3676
3889
|
modelValue: props.modelValue,
|
|
3677
3890
|
label: props.label || attrs.label || "",
|
|
3678
|
-
disabled: props.disabled
|
|
3891
|
+
disabled: props.disabled,
|
|
3892
|
+
ui: props.ui
|
|
3679
3893
|
}));
|
|
3680
3894
|
const radioSingleBindings = computed(() => ({
|
|
3681
3895
|
...attrs,
|
|
3682
3896
|
modelValue: props.modelValue,
|
|
3683
3897
|
label: props.label || attrs.label || "",
|
|
3684
3898
|
name: props.name ?? attrs.name,
|
|
3685
|
-
disabled: props.disabled
|
|
3899
|
+
disabled: props.disabled,
|
|
3900
|
+
ui: props.ui
|
|
3686
3901
|
}));
|
|
3687
3902
|
const toggleSingleBindings = computed(() => ({
|
|
3688
3903
|
...attrs,
|
|
3689
3904
|
name: props.name,
|
|
3690
3905
|
modelValue: props.modelValue,
|
|
3691
3906
|
label: props.label || attrs.label || "",
|
|
3692
|
-
disabled: props.disabled
|
|
3907
|
+
disabled: props.disabled,
|
|
3908
|
+
ui: props.ui
|
|
3693
3909
|
}));
|
|
3694
3910
|
const imageBindings = computed(() => {
|
|
3695
3911
|
return {
|
|
@@ -3698,7 +3914,8 @@ var _sfc_main$16 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
3698
3914
|
modelValue: props.modelValue,
|
|
3699
3915
|
currentImageUrl: props.currentImageUrl,
|
|
3700
3916
|
currentLabel: props.currentLabel,
|
|
3701
|
-
currentSubtext: props.currentSubtext
|
|
3917
|
+
currentSubtext: props.currentSubtext,
|
|
3918
|
+
ui: props.ui
|
|
3702
3919
|
};
|
|
3703
3920
|
});
|
|
3704
3921
|
const tinyEditorBindings = computed(() => {
|
|
@@ -3709,7 +3926,8 @@ var _sfc_main$16 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
3709
3926
|
height: props.height,
|
|
3710
3927
|
menubar: props.menubar,
|
|
3711
3928
|
licenseKey: props.licenseKey,
|
|
3712
|
-
outputFormat: props.outputFormat
|
|
3929
|
+
outputFormat: props.outputFormat,
|
|
3930
|
+
ui: props.ui
|
|
3713
3931
|
};
|
|
3714
3932
|
if (props.toolbar !== void 0) inputProps.toolbar = props.toolbar;
|
|
3715
3933
|
if (props.plugins !== void 0) inputProps.plugins = props.plugins;
|
|
@@ -3729,7 +3947,8 @@ var _sfc_main$16 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
3729
3947
|
endLabel: props.endLabel,
|
|
3730
3948
|
locale: props.locale,
|
|
3731
3949
|
disabled: props.disabled,
|
|
3732
|
-
disabledClass: props.disabledClass
|
|
3950
|
+
disabledClass: props.disabledClass,
|
|
3951
|
+
ui: props.ui
|
|
3733
3952
|
}));
|
|
3734
3953
|
const colorPickerBindings = computed(() => ({
|
|
3735
3954
|
...attrs,
|
|
@@ -3739,83 +3958,123 @@ var _sfc_main$16 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
3739
3958
|
disabled: props.disabled,
|
|
3740
3959
|
disabledClass: props.disabledClass,
|
|
3741
3960
|
allowAlpha: props.allowAlpha,
|
|
3742
|
-
variant: props.variant
|
|
3961
|
+
variant: props.variant,
|
|
3962
|
+
ui: props.ui
|
|
3743
3963
|
}));
|
|
3964
|
+
const resolvedFieldComponent = computed(() => {
|
|
3965
|
+
if (isTextareaType.value) return _sfc_main$28;
|
|
3966
|
+
if (isTinyEditorType.value) return _sfc_main$18;
|
|
3967
|
+
if (isColorPickerType.value) return ColorPicker_default;
|
|
3968
|
+
if (isSelectType.value) return _sfc_main$26;
|
|
3969
|
+
if (isDateType.value) return DateInput_default;
|
|
3970
|
+
if (isDateRangeType.value) return DateRangeInput_default;
|
|
3971
|
+
if (isTextLikeType.value) return _sfc_main$29;
|
|
3972
|
+
if (isImageType.value) return _sfc_main$23;
|
|
3973
|
+
if (isCheckboxSingleType.value) return _sfc_main$30;
|
|
3974
|
+
if (isRadioSingleType.value) return _sfc_main$21;
|
|
3975
|
+
if (isToggleSingleType.value) return _sfc_main$20;
|
|
3976
|
+
if (isNotationType.value) return _sfc_main$22;
|
|
3977
|
+
if (isCheckboxType.value) return _sfc_main$15;
|
|
3978
|
+
if (isRadioType.value) return _sfc_main$19;
|
|
3979
|
+
return null;
|
|
3980
|
+
});
|
|
3981
|
+
const resolvedFieldBindings = computed(() => {
|
|
3982
|
+
if (isTextareaType.value) return textAreaBindings.value;
|
|
3983
|
+
if (isTinyEditorType.value) return tinyEditorBindings.value;
|
|
3984
|
+
if (isColorPickerType.value) return colorPickerBindings.value;
|
|
3985
|
+
if (isSelectType.value) return selectBindings.value;
|
|
3986
|
+
if (isDateType.value) return dateBindings.value;
|
|
3987
|
+
if (isDateRangeType.value) return dateRangeBindings.value;
|
|
3988
|
+
if (isTextLikeType.value) return textInputBindings.value;
|
|
3989
|
+
if (isImageType.value) return imageBindings.value;
|
|
3990
|
+
if (isCheckboxSingleType.value) return checkboxSingleBindings.value;
|
|
3991
|
+
if (isRadioSingleType.value) return radioSingleBindings.value;
|
|
3992
|
+
if (isToggleSingleType.value) return toggleSingleBindings.value;
|
|
3993
|
+
if (isNotationType.value) return notationBindings.value;
|
|
3994
|
+
if (isCheckboxType.value) return checkboxBindings.value;
|
|
3995
|
+
if (isRadioType.value) return radioBindings.value;
|
|
3996
|
+
return {};
|
|
3997
|
+
});
|
|
3744
3998
|
return (_ctx, _cache) => {
|
|
3745
|
-
return openBlock(), createElementBlock("div",
|
|
3999
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(__props.rootClass) }, [renderSlot(_ctx.$slots, "wrapper", {
|
|
4000
|
+
fieldId: fieldId.value,
|
|
4001
|
+
label: __props.label,
|
|
4002
|
+
helperText: __props.helperText,
|
|
4003
|
+
errorMessage: __props.errorMessage,
|
|
4004
|
+
hasError: hasError.value,
|
|
4005
|
+
showsInlineChoiceControl: showsInlineChoiceControl.value,
|
|
4006
|
+
fieldComponent: resolvedFieldComponent.value,
|
|
4007
|
+
fieldBindings: resolvedFieldBindings.value,
|
|
4008
|
+
fieldListeners,
|
|
4009
|
+
onUpdateModelValue,
|
|
4010
|
+
onBlur,
|
|
4011
|
+
labelClass: props.labelClass ?? defaultLabelClass,
|
|
4012
|
+
helperTextClass: props.helperTextClass ?? defaultHelperTextClass,
|
|
4013
|
+
errorClass: props.errorClass ?? defaultErrorClass,
|
|
4014
|
+
errorIconClass: props.errorIconClass ?? defaultErrorIconClass,
|
|
4015
|
+
errorTextClass: props.errorTextClass,
|
|
4016
|
+
type: __props.type,
|
|
4017
|
+
modelValue: __props.modelValue,
|
|
4018
|
+
updateValue,
|
|
4019
|
+
attrs: unref(attrs)
|
|
4020
|
+
}, () => [
|
|
3746
4021
|
!showsInlineChoiceControl.value && (_ctx.$slots.label || __props.label) ? renderSlot(_ctx.$slots, "label", {
|
|
3747
4022
|
key: 0,
|
|
3748
4023
|
label: __props.label,
|
|
3749
|
-
for: fieldId.value
|
|
4024
|
+
for: fieldId.value,
|
|
4025
|
+
labelClass: props.labelClass ?? defaultLabelClass
|
|
3750
4026
|
}, () => [__props.label ? (openBlock(), createElementBlock("label", {
|
|
3751
4027
|
key: 0,
|
|
3752
4028
|
for: fieldId.value,
|
|
3753
|
-
class:
|
|
3754
|
-
}, toDisplayString(__props.label),
|
|
3755
|
-
__props.helperText && !showsInlineChoiceControl.value ? (
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
}
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
"onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => emit("update:modelValue", $event)),
|
|
3779
|
-
onBlur: _cache[15] || (_cache[15] = ($event) => emit("blur", $event))
|
|
3780
|
-
}), null, 16)) : isCheckboxSingleType.value ? (openBlock(), createBlock(_sfc_main$30, mergeProps({ key: 10 }, checkboxSingleBindings.value, {
|
|
3781
|
-
"onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => emit("update:modelValue", $event)),
|
|
3782
|
-
onBlur: _cache[17] || (_cache[17] = ($event) => emit("blur", $event))
|
|
3783
|
-
}), null, 16)) : isRadioSingleType.value ? (openBlock(), createBlock(_sfc_main$21, mergeProps({ key: 11 }, radioSingleBindings.value, {
|
|
3784
|
-
"onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => emit("update:modelValue", $event)),
|
|
3785
|
-
onBlur: _cache[19] || (_cache[19] = ($event) => emit("blur", $event))
|
|
3786
|
-
}), null, 16)) : isToggleSingleType.value ? (openBlock(), createBlock(_sfc_main$20, mergeProps({ key: 12 }, toggleSingleBindings.value, {
|
|
3787
|
-
"onUpdate:modelValue": _cache[20] || (_cache[20] = ($event) => emit("update:modelValue", $event)),
|
|
3788
|
-
onBlur: _cache[21] || (_cache[21] = ($event) => emit("blur", $event))
|
|
3789
|
-
}), null, 16)) : isNotationType.value ? (openBlock(), createBlock(_sfc_main$22, mergeProps({ key: 13 }, notationBindings.value, {
|
|
3790
|
-
"onUpdate:modelValue": _cache[22] || (_cache[22] = ($event) => emit("update:modelValue", $event)),
|
|
3791
|
-
onBlur: _cache[23] || (_cache[23] = ($event) => emit("blur", $event))
|
|
3792
|
-
}), null, 16)) : isCheckboxType.value ? (openBlock(), createBlock(_sfc_main$15, mergeProps({ key: 14 }, checkboxBindings.value, {
|
|
3793
|
-
"onUpdate:modelValue": _cache[24] || (_cache[24] = ($event) => emit("update:modelValue", $event)),
|
|
3794
|
-
onBlur: _cache[25] || (_cache[25] = ($event) => emit("blur", $event))
|
|
3795
|
-
}), null, 16)) : isRadioType.value ? (openBlock(), createBlock(_sfc_main$19, mergeProps({ key: 15 }, radioBindings.value, {
|
|
3796
|
-
"onUpdate:modelValue": _cache[26] || (_cache[26] = ($event) => emit("update:modelValue", $event)),
|
|
3797
|
-
onBlur: _cache[27] || (_cache[27] = ($event) => emit("blur", $event))
|
|
3798
|
-
}), null, 16)) : isNoComponentType.value ? renderSlot(_ctx.$slots, "unsupported-type", {
|
|
3799
|
-
key: 16,
|
|
4029
|
+
class: normalizeClass(props.labelClass ?? defaultLabelClass)
|
|
4030
|
+
}, toDisplayString(__props.label), 11, _hoisted_1$18)) : createCommentVNode("", true)]) : createCommentVNode("", true),
|
|
4031
|
+
__props.helperText && !showsInlineChoiceControl.value ? renderSlot(_ctx.$slots, "helper", {
|
|
4032
|
+
key: 1,
|
|
4033
|
+
helperText: __props.helperText,
|
|
4034
|
+
helperTextClass: props.helperTextClass ?? defaultHelperTextClass
|
|
4035
|
+
}, () => [createElementVNode("span", { class: normalizeClass(props.helperTextClass ?? defaultHelperTextClass) }, toDisplayString(__props.helperText), 3)]) : createCommentVNode("", true),
|
|
4036
|
+
resolvedFieldComponent.value && !showsLeadingIcon.value && !showsTrailingIcon.value ? (openBlock(), createBlock(resolveDynamicComponent(resolvedFieldComponent.value), mergeProps({ key: 2 }, resolvedFieldBindings.value, toHandlers(fieldListeners)), null, 16)) : resolvedFieldComponent.value ? (openBlock(), createElementBlock("div", _hoisted_2$13, [
|
|
4037
|
+
showsLeadingIcon.value ? (openBlock(), createElementBlock("div", {
|
|
4038
|
+
key: 0,
|
|
4039
|
+
class: normalizeClass(["pointer-events-none absolute inset-y-0 left-0 z-10 flex items-center pl-3 text-neutral-400 dark:text-neutral-200", props.leadingIconClass])
|
|
4040
|
+
}, [renderSlot(_ctx.$slots, "leading-icon", {
|
|
4041
|
+
type: __props.type,
|
|
4042
|
+
fieldId: fieldId.value
|
|
4043
|
+
})], 2)) : createCommentVNode("", true),
|
|
4044
|
+
(openBlock(), createBlock(resolveDynamicComponent(resolvedFieldComponent.value), mergeProps(resolvedFieldBindings.value, toHandlers(fieldListeners)), null, 16)),
|
|
4045
|
+
showsTrailingIcon.value ? (openBlock(), createElementBlock("div", {
|
|
4046
|
+
key: 1,
|
|
4047
|
+
class: normalizeClass(["pointer-events-none absolute inset-y-0 right-0 z-10 flex items-center pr-3 text-neutral-400 dark:text-neutral-200", props.trailingIconClass])
|
|
4048
|
+
}, [renderSlot(_ctx.$slots, "trailing-icon", {
|
|
4049
|
+
type: __props.type,
|
|
4050
|
+
fieldId: fieldId.value
|
|
4051
|
+
})], 2)) : createCommentVNode("", true)
|
|
4052
|
+
])) : isNoComponentType.value ? renderSlot(_ctx.$slots, "unsupported-type", {
|
|
4053
|
+
key: 4,
|
|
3800
4054
|
type: __props.type,
|
|
3801
4055
|
modelValue: __props.modelValue,
|
|
3802
4056
|
updateValue,
|
|
3803
4057
|
attrs: unref(attrs)
|
|
3804
4058
|
}) : renderSlot(_ctx.$slots, "unsupported-type", {
|
|
3805
|
-
key:
|
|
4059
|
+
key: 5,
|
|
3806
4060
|
type: __props.type,
|
|
3807
4061
|
modelValue: __props.modelValue,
|
|
3808
4062
|
updateValue,
|
|
3809
4063
|
attrs: unref(attrs)
|
|
3810
4064
|
}),
|
|
3811
|
-
hasError.value ? (
|
|
3812
|
-
|
|
4065
|
+
hasError.value ? renderSlot(_ctx.$slots, "error", {
|
|
4066
|
+
key: 6,
|
|
4067
|
+
errorMessage: __props.errorMessage,
|
|
4068
|
+
errorClass: props.errorClass ?? defaultErrorClass,
|
|
4069
|
+
errorIconClass: props.errorIconClass ?? defaultErrorIconClass,
|
|
4070
|
+
errorTextClass: props.errorTextClass
|
|
4071
|
+
}, () => [createElementVNode("div", { class: normalizeClass(props.errorClass ?? defaultErrorClass) }, [createVNode(unref(ExclamationCircleIcon), { class: normalizeClass(props.errorIconClass ?? defaultErrorIconClass) }, null, 8, ["class"]), createElementVNode("span", { class: normalizeClass(props.errorTextClass) }, toDisplayString(__props.errorMessage), 3)], 2)]) : createCommentVNode("", true)
|
|
4072
|
+
])], 2);
|
|
3813
4073
|
};
|
|
3814
4074
|
}
|
|
3815
4075
|
});
|
|
3816
4076
|
//#endregion
|
|
3817
4077
|
//#region src/components/CheckboxMultipleInput.vue
|
|
3818
|
-
var _hoisted_1$18 = { class: "flex flex-wrap gap-3" };
|
|
3819
4078
|
var _sfc_main$15 = {
|
|
3820
4079
|
__name: "CheckboxMultipleInput",
|
|
3821
4080
|
props: {
|
|
@@ -3834,6 +4093,10 @@ var _sfc_main$15 = {
|
|
|
3834
4093
|
disabled: {
|
|
3835
4094
|
type: Boolean,
|
|
3836
4095
|
default: false
|
|
4096
|
+
},
|
|
4097
|
+
ui: {
|
|
4098
|
+
type: Object,
|
|
4099
|
+
default: () => ({})
|
|
3837
4100
|
}
|
|
3838
4101
|
},
|
|
3839
4102
|
emits: ["update:modelValue"],
|
|
@@ -3854,7 +4117,7 @@ var _sfc_main$15 = {
|
|
|
3854
4117
|
emit("update:modelValue", nextSelection);
|
|
3855
4118
|
};
|
|
3856
4119
|
return (_ctx, _cache) => {
|
|
3857
|
-
return openBlock(), createElementBlock("div",
|
|
4120
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(["flex flex-wrap gap-3", props.ui.group]) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(normalizedOptions.value, (option) => {
|
|
3858
4121
|
return openBlock(), createBlock(_sfc_main$16, {
|
|
3859
4122
|
key: `checkbox-${option}`,
|
|
3860
4123
|
type: "checkbox-input",
|
|
@@ -3864,15 +4127,17 @@ var _sfc_main$15 = {
|
|
|
3864
4127
|
"unchecked-value": false,
|
|
3865
4128
|
label: option,
|
|
3866
4129
|
disabled: __props.disabled,
|
|
4130
|
+
ui: props.ui.item ?? props.ui,
|
|
3867
4131
|
"onUpdate:modelValue": (checked) => updateSelection(option, checked)
|
|
3868
4132
|
}, null, 8, [
|
|
3869
4133
|
"name",
|
|
3870
4134
|
"model-value",
|
|
3871
4135
|
"label",
|
|
3872
4136
|
"disabled",
|
|
4137
|
+
"ui",
|
|
3873
4138
|
"onUpdate:modelValue"
|
|
3874
4139
|
]);
|
|
3875
|
-
}), 128))]);
|
|
4140
|
+
}), 128))], 2);
|
|
3876
4141
|
};
|
|
3877
4142
|
}
|
|
3878
4143
|
};
|
|
@@ -6283,4 +6548,4 @@ var plugin_default = { install(app) {
|
|
|
6283
6548
|
//#endregion
|
|
6284
6549
|
export { SectionTitle_default as $, _sfc_main$12 as A, _sfc_main$22 as B, _sfc_main$5 as C, _sfc_main$9 as D, _sfc_main$8 as E, ColorPicker_default as F, _sfc_main$27 as G, DateRangeInput_default as H, _sfc_main$18 as I, _sfc_main$30 as J, _sfc_main$28 as K, _sfc_main$19 as L, _sfc_main$14 as M, _sfc_main$15 as N, _sfc_main$10 as O, _sfc_main$16 as P, _sfc_main$34 as Q, _sfc_main$20 as R, useSidebar as S, _sfc_main$7 as T, DateInput_default as U, _sfc_main$23 as V, _sfc_main$26 as W, _sfc_main$32 as X, _sfc_main$31 as Y, _sfc_main$33 as Z, SidebarGroupContent_default as _, _sfc_main$1 as a, __commonJSMin as at, SidebarContent_default as b, _sfc_main$4 as c, SidebarMenuItem_default as d, _sfc_main$36 as et, SidebarMenuButton_default as f, SidebarGroupLabel_default as g, SidebarHeader_default as h, _sfc_main as i, _sfc_main$40 as it, _sfc_main$13 as j, _sfc_main$11 as k, SidebarTrigger_default as l, SidebarInset_default as m, ToastContainer_default as n, _sfc_main$38 as nt, _sfc_main$2 as o, SidebarMenu_default as p, _sfc_main$29 as q, Toast_default as r, _sfc_main$39 as rt, _sfc_main$3 as s, plugin_default as t, _sfc_main$37 as tt, SidebarProvider_default as u, SidebarGroup_default as v, _sfc_main$6 as w, Sidebar_default as x, SidebarFooter_default as y, _sfc_main$21 as z };
|
|
6285
6550
|
|
|
6286
|
-
//# sourceMappingURL=plugin-
|
|
6551
|
+
//# sourceMappingURL=plugin-BQjbCN0r.js.map
|