@auronui/vue 1.0.10 → 1.0.12
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/cjs/index.cjs +690 -423
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/autocomplete/Autocomplete.context.js.map +1 -1
- package/dist/components/autocomplete/Autocomplete.js.map +1 -1
- package/dist/components/autocomplete/Autocomplete.vue_vue_type_script_setup_true_lang.js +119 -14
- package/dist/components/autocomplete/Autocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/autocomplete/AutocompleteCreateItem.js +7 -0
- package/dist/components/autocomplete/AutocompleteCreateItem.js.map +1 -0
- package/dist/components/autocomplete/AutocompleteCreateItem.vue_vue_type_script_setup_true_lang.js +57 -0
- package/dist/components/autocomplete/AutocompleteCreateItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/autocomplete/AutocompleteInput.js.map +1 -1
- package/dist/components/autocomplete/AutocompleteInput.vue_vue_type_script_setup_true_lang.js +40 -9
- package/dist/components/autocomplete/AutocompleteInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/autocomplete/AutocompleteItem.js.map +1 -1
- package/dist/components/autocomplete/AutocompleteItem.vue_vue_type_script_setup_true_lang.js +33 -5
- package/dist/components/autocomplete/AutocompleteItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/autocomplete/AutocompleteOverflowChips.js +7 -0
- package/dist/components/autocomplete/AutocompleteOverflowChips.js.map +1 -0
- package/dist/components/autocomplete/AutocompleteOverflowChips.vue_vue_type_script_setup_true_lang.js +88 -0
- package/dist/components/autocomplete/AutocompleteOverflowChips.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/form/Form.js.map +1 -1
- package/dist/components/form/Form.vue_vue_type_script_setup_true_lang.js +123 -8
- package/dist/components/form/Form.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/form/FormField.js.map +1 -1
- package/dist/components/form/FormField.vue_vue_type_script_setup_true_lang.js +30 -2
- package/dist/components/form/FormField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/form/form.context.js.map +1 -1
- package/dist/components/form/validation.js +23 -3
- package/dist/components/form/validation.js.map +1 -1
- package/dist/components/select/Select.context.js.map +1 -1
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/select/Select.vue_vue_type_script_setup_true_lang.js +12 -1
- package/dist/components/select/Select.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/select/SelectOverflowChips.js +7 -0
- package/dist/components/select/SelectOverflowChips.js.map +1 -0
- package/dist/components/select/SelectOverflowChips.vue_vue_type_script_setup_true_lang.js +85 -0
- package/dist/components/select/SelectOverflowChips.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/select/SelectValue.js.map +1 -1
- package/dist/components/select/SelectValue.vue_vue_type_script_setup_true_lang.js +6 -1
- package/dist/components/select/SelectValue.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/index.d.ts +397 -423
- package/dist/index.js +2 -7
- package/package.json +4 -4
- package/dist/components/tag/Tag.js +0 -7
- package/dist/components/tag/Tag.js.map +0 -1
- package/dist/components/tag/Tag.vue_vue_type_script_setup_true_lang.js +0 -69
- package/dist/components/tag/Tag.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/components/tag/TagDelete.js +0 -7
- package/dist/components/tag/TagDelete.js.map +0 -1
- package/dist/components/tag/TagDelete.vue_vue_type_script_setup_true_lang.js +0 -49
- package/dist/components/tag/TagDelete.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/components/tag/TagText.js +0 -7
- package/dist/components/tag/TagText.js.map +0 -1
- package/dist/components/tag/TagText.vue_vue_type_script_setup_true_lang.js +0 -18
- package/dist/components/tag/TagText.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/components/tag-group/TagGroup.context.js +0 -7
- package/dist/components/tag-group/TagGroup.context.js.map +0 -1
- package/dist/components/tag-group/TagGroup.js +0 -7
- package/dist/components/tag-group/TagGroup.js.map +0 -1
- package/dist/components/tag-group/TagGroup.vue_vue_type_script_setup_true_lang.js +0 -142
- package/dist/components/tag-group/TagGroup.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/components/tag-group/TagGroupInput.js +0 -7
- package/dist/components/tag-group/TagGroupInput.js.map +0 -1
- package/dist/components/tag-group/TagGroupInput.vue_vue_type_script_setup_true_lang.js +0 -37
- package/dist/components/tag-group/TagGroupInput.vue_vue_type_script_setup_true_lang.js.map +0 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -373,7 +373,7 @@ function createContext(contextName) {
|
|
|
373
373
|
}
|
|
374
374
|
//#endregion
|
|
375
375
|
//#region src/components/spinner/Spinner.vue?vue&type=script&setup=true&lang.ts
|
|
376
|
-
var _hoisted_1$
|
|
376
|
+
var _hoisted_1$61 = ["aria-label"];
|
|
377
377
|
var _hoisted_2$32 = {
|
|
378
378
|
"data-slot": "spinner-icon",
|
|
379
379
|
viewBox: "0 0 24 24",
|
|
@@ -381,9 +381,9 @@ var _hoisted_2$32 = {
|
|
|
381
381
|
width: "100%",
|
|
382
382
|
height: "100%"
|
|
383
383
|
};
|
|
384
|
-
var _hoisted_3$
|
|
385
|
-
var _hoisted_4$
|
|
386
|
-
var _hoisted_5$
|
|
384
|
+
var _hoisted_3$20 = { fill: "none" };
|
|
385
|
+
var _hoisted_4$13 = ["fill"];
|
|
386
|
+
var _hoisted_5$9 = ["fill"];
|
|
387
387
|
//#endregion
|
|
388
388
|
//#region src/components/spinner/Spinner.vue
|
|
389
389
|
var Spinner_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -435,25 +435,25 @@ var Spinner_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
435
435
|
offset: "100%",
|
|
436
436
|
"stop-color": "currentColor",
|
|
437
437
|
"stop-opacity": "0.55"
|
|
438
|
-
}, null, -1)])])]), (0, vue.createElementVNode)("g", _hoisted_3$
|
|
438
|
+
}, null, -1)])])]), (0, vue.createElementVNode)("g", _hoisted_3$20, [
|
|
439
439
|
_cache[2] || (_cache[2] = (0, vue.createElementVNode)("path", { d: "m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z" }, null, -1)),
|
|
440
440
|
(0, vue.createElementVNode)("path", {
|
|
441
441
|
d: "M8.749.021a1.5 1.5 0 0 1 .497 2.958A7.5 7.5 0 0 0 3 10.375a7.5 7.5 0 0 0 7.5 7.5v3c-5.799 0-10.5-4.7-10.5-10.5C0 5.23 3.726.865 8.749.021",
|
|
442
442
|
fill: `url(#${gradId1})`,
|
|
443
443
|
transform: "translate(1.5 1.625)"
|
|
444
|
-
}, null, 8, _hoisted_4$
|
|
444
|
+
}, null, 8, _hoisted_4$13),
|
|
445
445
|
(0, vue.createElementVNode)("path", {
|
|
446
446
|
d: "M15.392 2.673a1.5 1.5 0 0 1 2.119-.115A10.48 10.48 0 0 1 21 10.375c0 5.8-4.701 10.5-10.5 10.5v-3a7.5 7.5 0 0 0 5.007-13.084a1.5 1.5 0 0 1-.115-2.118",
|
|
447
447
|
fill: `url(#${gradId2})`,
|
|
448
448
|
transform: "translate(1.5 1.625)"
|
|
449
|
-
}, null, 8, _hoisted_5$
|
|
450
|
-
])]))], 10, _hoisted_1$
|
|
449
|
+
}, null, 8, _hoisted_5$9)
|
|
450
|
+
])]))], 10, _hoisted_1$61);
|
|
451
451
|
};
|
|
452
452
|
}
|
|
453
453
|
});
|
|
454
454
|
//#endregion
|
|
455
455
|
//#region src/components/separator/Separator.vue?vue&type=script&setup=true&lang.ts
|
|
456
|
-
var _hoisted_1$
|
|
456
|
+
var _hoisted_1$60 = { class: "separator__content" };
|
|
457
457
|
//#endregion
|
|
458
458
|
//#region src/components/separator/Separator.vue
|
|
459
459
|
var Separator_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -487,7 +487,7 @@ var Separator_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
487
487
|
"aria-orientation": "horizontal"
|
|
488
488
|
}, [
|
|
489
489
|
_cache[0] || (_cache[0] = (0, vue.createElementVNode)("div", { class: "separator__line" }, null, -1)),
|
|
490
|
-
(0, vue.createElementVNode)("div", _hoisted_1$
|
|
490
|
+
(0, vue.createElementVNode)("div", _hoisted_1$60, [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
491
491
|
_cache[1] || (_cache[1] = (0, vue.createElementVNode)("div", { class: "separator__line" }, null, -1))
|
|
492
492
|
], 2));
|
|
493
493
|
};
|
|
@@ -539,7 +539,7 @@ var Text_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
539
539
|
});
|
|
540
540
|
//#endregion
|
|
541
541
|
//#region src/components/label/Label.vue?vue&type=script&setup=true&lang.ts
|
|
542
|
-
var _hoisted_1$
|
|
542
|
+
var _hoisted_1$59 = ["for"];
|
|
543
543
|
//#endregion
|
|
544
544
|
//#region src/components/label/Label.vue
|
|
545
545
|
var Label_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -571,13 +571,13 @@ var Label_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
571
571
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("label", {
|
|
572
572
|
class: (0, vue.normalizeClass)(classes.value),
|
|
573
573
|
for: props.for
|
|
574
|
-
}, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$
|
|
574
|
+
}, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$59);
|
|
575
575
|
};
|
|
576
576
|
}
|
|
577
577
|
});
|
|
578
578
|
//#endregion
|
|
579
579
|
//#region src/components/description/Description.vue?vue&type=script&setup=true&lang.ts
|
|
580
|
-
var _hoisted_1$
|
|
580
|
+
var _hoisted_1$58 = ["id"];
|
|
581
581
|
//#endregion
|
|
582
582
|
//#region src/components/description/Description.vue
|
|
583
583
|
var Description_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -593,7 +593,7 @@ var Description_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
593
593
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("p", {
|
|
594
594
|
id: props.id,
|
|
595
595
|
class: (0, vue.normalizeClass)(classes.value)
|
|
596
|
-
}, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$
|
|
596
|
+
}, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$58);
|
|
597
597
|
};
|
|
598
598
|
}
|
|
599
599
|
});
|
|
@@ -661,7 +661,7 @@ var Badge_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
661
661
|
});
|
|
662
662
|
//#endregion
|
|
663
663
|
//#region src/components/chip/Chip.vue?vue&type=script&setup=true&lang.ts
|
|
664
|
-
var _hoisted_1$
|
|
664
|
+
var _hoisted_1$57 = ["aria-label"];
|
|
665
665
|
//#endregion
|
|
666
666
|
//#region src/components/chip/Chip.vue
|
|
667
667
|
var Chip_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -734,7 +734,7 @@ var Chip_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
734
734
|
y1: "6",
|
|
735
735
|
x2: "18",
|
|
736
736
|
y2: "18"
|
|
737
|
-
})], -1)])], 10, _hoisted_1$
|
|
737
|
+
})], -1)])], 10, _hoisted_1$57)) : (0, vue.createCommentVNode)("", true)
|
|
738
738
|
], 2);
|
|
739
739
|
};
|
|
740
740
|
}
|
|
@@ -767,7 +767,7 @@ var Surface_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
767
767
|
var { useProvide: useCardProvide, useInject: useCardInject, key: cardContextKey } = createContext("Card");
|
|
768
768
|
//#endregion
|
|
769
769
|
//#region src/components/card/Card.vue?vue&type=script&setup=true&lang.ts
|
|
770
|
-
var _hoisted_1$
|
|
770
|
+
var _hoisted_1$56 = [
|
|
771
771
|
"role",
|
|
772
772
|
"tabindex",
|
|
773
773
|
"aria-disabled",
|
|
@@ -843,7 +843,7 @@ var Card_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
843
843
|
"data-disabled": __props.isDisabled || void 0,
|
|
844
844
|
onClick,
|
|
845
845
|
onKeydown
|
|
846
|
-
}, [(0, vue.renderSlot)(_ctx.$slots, "default")], 42, _hoisted_1$
|
|
846
|
+
}, [(0, vue.renderSlot)(_ctx.$slots, "default")], 42, _hoisted_1$56);
|
|
847
847
|
};
|
|
848
848
|
}
|
|
849
849
|
});
|
|
@@ -1068,7 +1068,7 @@ var Button_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1068
1068
|
});
|
|
1069
1069
|
//#endregion
|
|
1070
1070
|
//#region src/components/button/ButtonGroup.vue?vue&type=script&setup=true&lang.ts
|
|
1071
|
-
var _hoisted_1$
|
|
1071
|
+
var _hoisted_1$55 = ["data-orientation"];
|
|
1072
1072
|
//#endregion
|
|
1073
1073
|
//#region src/components/button/ButtonGroup.vue
|
|
1074
1074
|
var ButtonGroup_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -1133,7 +1133,7 @@ var ButtonGroup_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1133
1133
|
class: (0, vue.normalizeClass)((0, vue.unref)(composeClassName)(slotFns.value.base(), props.class)),
|
|
1134
1134
|
"data-orientation": props.orientation,
|
|
1135
1135
|
role: "group"
|
|
1136
|
-
}, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$
|
|
1136
|
+
}, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$55);
|
|
1137
1137
|
};
|
|
1138
1138
|
}
|
|
1139
1139
|
});
|
|
@@ -1205,7 +1205,7 @@ var CloseButton_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1205
1205
|
var { useProvide: useToggleButtonGroupProvide, useInject: useToggleButtonGroupInject, key: toggleButtonGroupContextKey } = createContext("ToggleButtonGroup");
|
|
1206
1206
|
//#endregion
|
|
1207
1207
|
//#region src/components/button/ToggleButton.vue?vue&type=script&setup=true&lang.ts
|
|
1208
|
-
var _hoisted_1$
|
|
1208
|
+
var _hoisted_1$54 = ["disabled", "data-orientation"];
|
|
1209
1209
|
//#endregion
|
|
1210
1210
|
//#region src/components/button/ToggleButton.vue
|
|
1211
1211
|
var ToggleButton_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -1276,7 +1276,7 @@ var ToggleButton_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1276
1276
|
disabled: isDisabled.value || void 0,
|
|
1277
1277
|
"data-orientation": (0, vue.unref)(groupCtx).orientation.value,
|
|
1278
1278
|
type: "button"
|
|
1279
|
-
}, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$
|
|
1279
|
+
}, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$54)]),
|
|
1280
1280
|
_: 3
|
|
1281
1281
|
}, 8, [
|
|
1282
1282
|
"disabled",
|
|
@@ -1288,7 +1288,7 @@ var ToggleButton_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1288
1288
|
});
|
|
1289
1289
|
//#endregion
|
|
1290
1290
|
//#region src/components/button/ToggleButtonGroup.vue?vue&type=script&setup=true&lang.ts
|
|
1291
|
-
var _hoisted_1$
|
|
1291
|
+
var _hoisted_1$53 = ["data-orientation"];
|
|
1292
1292
|
//#endregion
|
|
1293
1293
|
//#region src/components/button/ToggleButtonGroup.vue
|
|
1294
1294
|
var ToggleButtonGroup_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -1355,7 +1355,7 @@ var ToggleButtonGroup_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1355
1355
|
class: (0, vue.normalizeClass)((0, vue.unref)(composeClassName)(slotFns.value.base(), props.class)),
|
|
1356
1356
|
"data-orientation": props.orientation,
|
|
1357
1357
|
role: "group"
|
|
1358
|
-
}, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$
|
|
1358
|
+
}, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$53);
|
|
1359
1359
|
};
|
|
1360
1360
|
}
|
|
1361
1361
|
});
|
|
@@ -1454,6 +1454,7 @@ function useFormInject() {
|
|
|
1454
1454
|
//#endregion
|
|
1455
1455
|
//#region src/components/form/validation.ts
|
|
1456
1456
|
var EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
1457
|
+
var URL_REGEX = /^(https?:\/\/)?([\w-]+\.)+[\w-]+(\/[\w\-./?%&=]*)?$/i;
|
|
1457
1458
|
function isEmpty(value) {
|
|
1458
1459
|
if (value === void 0 || value === null || value === "" || value === false) return true;
|
|
1459
1460
|
if (Array.isArray(value) && value.length === 0) return true;
|
|
@@ -1483,20 +1484,35 @@ function resolvePatternRule(rule) {
|
|
|
1483
1484
|
};
|
|
1484
1485
|
return rule;
|
|
1485
1486
|
}
|
|
1486
|
-
|
|
1487
|
+
function resolveStringRule(rule) {
|
|
1488
|
+
if (typeof rule === "string") return {
|
|
1489
|
+
value: rule,
|
|
1490
|
+
message: void 0
|
|
1491
|
+
};
|
|
1492
|
+
return rule;
|
|
1493
|
+
}
|
|
1494
|
+
async function runValidation(value, rules, validate, context) {
|
|
1487
1495
|
if (!rules && !validate) return void 0;
|
|
1488
1496
|
if (rules?.required !== void 0) {
|
|
1489
1497
|
const { enabled, message } = resolveSimpleRule(rules.required);
|
|
1490
1498
|
if (enabled && isEmpty(value)) return message ?? "This field is required";
|
|
1491
1499
|
}
|
|
1492
1500
|
if (isEmpty(value)) {
|
|
1493
|
-
if (validate) return await validate(value);
|
|
1501
|
+
if (validate) return await validate(value, context);
|
|
1494
1502
|
return;
|
|
1495
1503
|
}
|
|
1496
1504
|
if (rules?.email !== void 0) {
|
|
1497
1505
|
const { enabled, message } = resolveSimpleRule(rules.email);
|
|
1498
1506
|
if (enabled && !EMAIL_REGEX.test(String(value))) return message ?? "Enter a valid email address";
|
|
1499
1507
|
}
|
|
1508
|
+
if (rules?.url !== void 0) {
|
|
1509
|
+
const { enabled, message } = resolveSimpleRule(rules.url);
|
|
1510
|
+
if (enabled && !URL_REGEX.test(String(value))) return message ?? "Enter a valid URL";
|
|
1511
|
+
}
|
|
1512
|
+
if (rules?.integer !== void 0) {
|
|
1513
|
+
const { enabled, message } = resolveSimpleRule(rules.integer);
|
|
1514
|
+
if (enabled && !Number.isInteger(Number(value))) return message ?? "Must be a whole number";
|
|
1515
|
+
}
|
|
1500
1516
|
if (rules?.pattern !== void 0) {
|
|
1501
1517
|
const { value: regex, message } = resolvePatternRule(rules.pattern);
|
|
1502
1518
|
if (!regex.test(String(value))) return message ?? "Invalid format";
|
|
@@ -1517,7 +1533,11 @@ async function runValidation(value, rules, validate) {
|
|
|
1517
1533
|
const { value: maxVal, message } = resolveNumericRule(rules.max);
|
|
1518
1534
|
if (Number(value) > maxVal) return message ?? `Must be at most ${maxVal}`;
|
|
1519
1535
|
}
|
|
1520
|
-
if (
|
|
1536
|
+
if (rules?.matches !== void 0) {
|
|
1537
|
+
const { value: fieldName, message } = resolveStringRule(rules.matches);
|
|
1538
|
+
if (value !== context?.values[fieldName]) return message ?? `Must match ${fieldName}`;
|
|
1539
|
+
}
|
|
1540
|
+
if (validate) return await validate(value, context);
|
|
1521
1541
|
}
|
|
1522
1542
|
//#endregion
|
|
1523
1543
|
//#region src/components/form/Form.vue
|
|
@@ -1531,31 +1551,75 @@ var Form_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1531
1551
|
},
|
|
1532
1552
|
class: { default: void 0 }
|
|
1533
1553
|
},
|
|
1534
|
-
emits: [
|
|
1535
|
-
|
|
1554
|
+
emits: [
|
|
1555
|
+
"submit",
|
|
1556
|
+
"invalid",
|
|
1557
|
+
"reset"
|
|
1558
|
+
],
|
|
1559
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1536
1560
|
const props = __props;
|
|
1537
1561
|
const emit = __emit;
|
|
1538
1562
|
const errors = (0, vue.ref)({});
|
|
1539
1563
|
const isSubmitting = (0, vue.ref)(false);
|
|
1564
|
+
const isSubmitted = (0, vue.ref)(false);
|
|
1565
|
+
const submitCount = (0, vue.ref)(0);
|
|
1540
1566
|
const fields = /* @__PURE__ */ new Map();
|
|
1567
|
+
const fieldCount = (0, vue.ref)(0);
|
|
1541
1568
|
function registerField(reg) {
|
|
1542
1569
|
fields.set(reg.name, reg);
|
|
1570
|
+
fieldCount.value++;
|
|
1543
1571
|
}
|
|
1544
1572
|
function unregisterField(name) {
|
|
1545
1573
|
fields.delete(name);
|
|
1574
|
+
fieldCount.value--;
|
|
1546
1575
|
const next = { ...errors.value };
|
|
1547
1576
|
delete next[name];
|
|
1548
1577
|
errors.value = next;
|
|
1549
1578
|
}
|
|
1579
|
+
const isValid = (0, vue.computed)(() => {
|
|
1580
|
+
fieldCount.value;
|
|
1581
|
+
return Object.keys(errors.value).length === 0;
|
|
1582
|
+
});
|
|
1583
|
+
const isDirty = (0, vue.computed)(() => {
|
|
1584
|
+
fieldCount.value;
|
|
1585
|
+
for (const field of fields.values()) if (field.dirty.value) return true;
|
|
1586
|
+
return false;
|
|
1587
|
+
});
|
|
1588
|
+
const isTouched = (0, vue.computed)(() => {
|
|
1589
|
+
fieldCount.value;
|
|
1590
|
+
for (const field of fields.values()) if (field.touched.value) return true;
|
|
1591
|
+
return false;
|
|
1592
|
+
});
|
|
1593
|
+
function getAllValues() {
|
|
1594
|
+
const values = {};
|
|
1595
|
+
for (const [name, field] of fields.entries()) values[name] = field.getValue();
|
|
1596
|
+
return values;
|
|
1597
|
+
}
|
|
1550
1598
|
async function triggerFieldValidation(name) {
|
|
1551
1599
|
const field = fields.get(name);
|
|
1552
1600
|
if (!field) return;
|
|
1553
|
-
const error = await runValidation(field.getValue(), field.rules, field.validate);
|
|
1601
|
+
const error = await runValidation(field.getValue(), field.rules, field.validate, { values: getAllValues() });
|
|
1554
1602
|
const next = { ...errors.value };
|
|
1555
1603
|
if (error) next[name] = error;
|
|
1556
1604
|
else delete next[name];
|
|
1557
1605
|
errors.value = next;
|
|
1558
1606
|
}
|
|
1607
|
+
async function trigger(name) {
|
|
1608
|
+
if (name) {
|
|
1609
|
+
await triggerFieldValidation(name);
|
|
1610
|
+
return !errors.value[name];
|
|
1611
|
+
}
|
|
1612
|
+
const results = await Promise.all([...fields.entries()].map(async ([fieldName, field]) => {
|
|
1613
|
+
return {
|
|
1614
|
+
name: fieldName,
|
|
1615
|
+
error: await runValidation(field.getValue(), field.rules, field.validate, { values: getAllValues() })
|
|
1616
|
+
};
|
|
1617
|
+
}));
|
|
1618
|
+
const next = {};
|
|
1619
|
+
for (const { name: fieldName, error } of results) if (error) next[fieldName] = error;
|
|
1620
|
+
errors.value = next;
|
|
1621
|
+
return Object.keys(next).length === 0;
|
|
1622
|
+
}
|
|
1559
1623
|
function setErrors(newErrors) {
|
|
1560
1624
|
errors.value = {
|
|
1561
1625
|
...errors.value,
|
|
@@ -1563,12 +1627,43 @@ var Form_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1563
1627
|
};
|
|
1564
1628
|
isSubmitting.value = false;
|
|
1565
1629
|
}
|
|
1630
|
+
function setError(name, message) {
|
|
1631
|
+
errors.value = {
|
|
1632
|
+
...errors.value,
|
|
1633
|
+
[name]: message
|
|
1634
|
+
};
|
|
1635
|
+
}
|
|
1636
|
+
function clearErrors(name) {
|
|
1637
|
+
if (name) {
|
|
1638
|
+
const next = { ...errors.value };
|
|
1639
|
+
delete next[name];
|
|
1640
|
+
errors.value = next;
|
|
1641
|
+
} else errors.value = {};
|
|
1642
|
+
}
|
|
1643
|
+
function getValues() {
|
|
1644
|
+
return getAllValues();
|
|
1645
|
+
}
|
|
1646
|
+
function setValue(name, value) {
|
|
1647
|
+
const field = fields.get(name);
|
|
1648
|
+
if (field) field.setValue(value);
|
|
1649
|
+
}
|
|
1650
|
+
function reset() {
|
|
1651
|
+
for (const field of fields.values()) field.reset();
|
|
1652
|
+
errors.value = {};
|
|
1653
|
+
isSubmitting.value = false;
|
|
1654
|
+
isSubmitted.value = false;
|
|
1655
|
+
submitCount.value = 0;
|
|
1656
|
+
emit("reset");
|
|
1657
|
+
}
|
|
1566
1658
|
async function handleSubmit() {
|
|
1567
1659
|
isSubmitting.value = true;
|
|
1660
|
+
submitCount.value++;
|
|
1661
|
+
const values = getAllValues();
|
|
1662
|
+
const context = { values };
|
|
1568
1663
|
const results = await Promise.all([...fields.entries()].map(async ([name, field]) => {
|
|
1569
1664
|
return {
|
|
1570
1665
|
name,
|
|
1571
|
-
error: await runValidation(field.getValue(), field.rules, field.validate)
|
|
1666
|
+
error: await runValidation(field.getValue(), field.rules, field.validate, context)
|
|
1572
1667
|
};
|
|
1573
1668
|
}));
|
|
1574
1669
|
const nextErrors = {};
|
|
@@ -1576,12 +1671,13 @@ var Form_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1576
1671
|
if (Object.keys(nextErrors).length > 0) {
|
|
1577
1672
|
errors.value = nextErrors;
|
|
1578
1673
|
isSubmitting.value = false;
|
|
1674
|
+
isSubmitted.value = true;
|
|
1579
1675
|
emit("invalid", nextErrors);
|
|
1580
1676
|
return;
|
|
1581
1677
|
}
|
|
1582
1678
|
errors.value = {};
|
|
1583
|
-
|
|
1584
|
-
|
|
1679
|
+
isSubmitted.value = true;
|
|
1680
|
+
isSubmitting.value = false;
|
|
1585
1681
|
emit("submit", {
|
|
1586
1682
|
values,
|
|
1587
1683
|
setErrors
|
|
@@ -1590,12 +1686,39 @@ var Form_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1590
1686
|
(0, vue.provide)(formContextKey, {
|
|
1591
1687
|
errors,
|
|
1592
1688
|
isSubmitting,
|
|
1689
|
+
isSubmitted,
|
|
1690
|
+
submitCount,
|
|
1593
1691
|
isDisabled: (0, vue.computed)(() => props.isDisabled),
|
|
1692
|
+
isValid,
|
|
1693
|
+
isDirty,
|
|
1694
|
+
isTouched,
|
|
1594
1695
|
validationMode: (0, vue.computed)(() => props.validationMode),
|
|
1595
1696
|
registerField,
|
|
1596
1697
|
unregisterField,
|
|
1597
1698
|
triggerFieldValidation,
|
|
1598
|
-
setErrors
|
|
1699
|
+
setErrors,
|
|
1700
|
+
setError,
|
|
1701
|
+
clearErrors,
|
|
1702
|
+
getValues,
|
|
1703
|
+
setValue,
|
|
1704
|
+
trigger,
|
|
1705
|
+
reset
|
|
1706
|
+
});
|
|
1707
|
+
__expose({
|
|
1708
|
+
errors,
|
|
1709
|
+
isSubmitting,
|
|
1710
|
+
isSubmitted,
|
|
1711
|
+
submitCount,
|
|
1712
|
+
isValid,
|
|
1713
|
+
isDirty,
|
|
1714
|
+
isTouched,
|
|
1715
|
+
getValues,
|
|
1716
|
+
setValue,
|
|
1717
|
+
setErrors,
|
|
1718
|
+
setError,
|
|
1719
|
+
clearErrors,
|
|
1720
|
+
trigger,
|
|
1721
|
+
reset
|
|
1599
1722
|
});
|
|
1600
1723
|
return (_ctx, _cache) => {
|
|
1601
1724
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("form", {
|
|
@@ -1604,8 +1727,20 @@ var Form_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1604
1727
|
onSubmit: (0, vue.withModifiers)(handleSubmit, ["prevent"])
|
|
1605
1728
|
}, [(0, vue.renderSlot)(_ctx.$slots, "default", {
|
|
1606
1729
|
isSubmitting: isSubmitting.value,
|
|
1730
|
+
isSubmitted: isSubmitted.value,
|
|
1731
|
+
submitCount: submitCount.value,
|
|
1607
1732
|
isDisabled: props.isDisabled,
|
|
1608
|
-
|
|
1733
|
+
isValid: isValid.value,
|
|
1734
|
+
isDirty: isDirty.value,
|
|
1735
|
+
isTouched: isTouched.value,
|
|
1736
|
+
errors: errors.value,
|
|
1737
|
+
getValues,
|
|
1738
|
+
setValue,
|
|
1739
|
+
setErrors,
|
|
1740
|
+
setError,
|
|
1741
|
+
clearErrors,
|
|
1742
|
+
trigger,
|
|
1743
|
+
reset
|
|
1609
1744
|
})], 34);
|
|
1610
1745
|
};
|
|
1611
1746
|
}
|
|
@@ -1617,6 +1752,7 @@ var FormField_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1617
1752
|
__name: "FormField",
|
|
1618
1753
|
props: /* @__PURE__ */ (0, vue.mergeModels)({
|
|
1619
1754
|
name: {},
|
|
1755
|
+
defaultValue: {},
|
|
1620
1756
|
rules: {},
|
|
1621
1757
|
validate: { type: Function },
|
|
1622
1758
|
validationMode: {}
|
|
@@ -1630,6 +1766,8 @@ var FormField_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1630
1766
|
const modelValue = (0, vue.useModel)(__props, "modelValue");
|
|
1631
1767
|
const ctx = useFormInject();
|
|
1632
1768
|
const localError = (0, vue.ref)(void 0);
|
|
1769
|
+
const touched = (0, vue.ref)(false);
|
|
1770
|
+
const dirty = (0, vue.ref)(props.defaultValue !== void 0 && modelValue.value !== props.defaultValue);
|
|
1633
1771
|
const fieldError = (0, vue.computed)(() => ctx ? ctx.errors.value[props.name] : localError.value);
|
|
1634
1772
|
const hasBeenInvalid = (0, vue.ref)(false);
|
|
1635
1773
|
(0, vue.watch)(fieldError, (error) => {
|
|
@@ -1638,10 +1776,27 @@ var FormField_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1638
1776
|
const isInvalid = (0, vue.computed)(() => !!fieldError.value);
|
|
1639
1777
|
const isDisabled = (0, vue.computed)(() => ctx?.isDisabled.value ?? false);
|
|
1640
1778
|
const validationMode = (0, vue.computed)(() => props.validationMode ?? ctx?.validationMode.value ?? "on-submit");
|
|
1779
|
+
(0, vue.watch)(modelValue, (val) => {
|
|
1780
|
+
dirty.value = val !== props.defaultValue;
|
|
1781
|
+
});
|
|
1782
|
+
function resetField() {
|
|
1783
|
+
modelValue.value = props.defaultValue;
|
|
1784
|
+
localError.value = void 0;
|
|
1785
|
+
touched.value = false;
|
|
1786
|
+
dirty.value = false;
|
|
1787
|
+
hasBeenInvalid.value = false;
|
|
1788
|
+
}
|
|
1641
1789
|
(0, vue.onMounted)(() => {
|
|
1642
1790
|
ctx?.registerField({
|
|
1643
1791
|
name: props.name,
|
|
1644
1792
|
getValue: () => modelValue.value,
|
|
1793
|
+
getDefaultValue: () => props.defaultValue,
|
|
1794
|
+
setValue: (val) => {
|
|
1795
|
+
modelValue.value = val;
|
|
1796
|
+
},
|
|
1797
|
+
reset: resetField,
|
|
1798
|
+
touched,
|
|
1799
|
+
dirty,
|
|
1645
1800
|
rules: props.rules,
|
|
1646
1801
|
validate: props.validate
|
|
1647
1802
|
});
|
|
@@ -1650,7 +1805,8 @@ var FormField_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1650
1805
|
ctx?.unregisterField(props.name);
|
|
1651
1806
|
});
|
|
1652
1807
|
async function triggerValidation(val) {
|
|
1653
|
-
const
|
|
1808
|
+
const context = ctx ? { values: ctx.getValues() } : void 0;
|
|
1809
|
+
const error = await runValidation(val, props.rules, props.validate, context);
|
|
1654
1810
|
if (ctx) {
|
|
1655
1811
|
const next = { ...ctx.errors.value };
|
|
1656
1812
|
if (error) next[props.name] = error;
|
|
@@ -1663,6 +1819,7 @@ var FormField_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1663
1819
|
if (validationMode.value === "on-change" || hasBeenInvalid.value) await triggerValidation(val);
|
|
1664
1820
|
}
|
|
1665
1821
|
async function handleBlur() {
|
|
1822
|
+
touched.value = true;
|
|
1666
1823
|
if (validationMode.value === "on-blur") await triggerValidation(modelValue.value);
|
|
1667
1824
|
}
|
|
1668
1825
|
const fieldProps = (0, vue.computed)(() => ({
|
|
@@ -1675,13 +1832,19 @@ var FormField_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1675
1832
|
onBlur: handleBlur
|
|
1676
1833
|
}));
|
|
1677
1834
|
return (_ctx, _cache) => {
|
|
1678
|
-
return (0, vue.renderSlot)(_ctx.$slots, "default", {
|
|
1835
|
+
return (0, vue.renderSlot)(_ctx.$slots, "default", {
|
|
1836
|
+
fieldProps: fieldProps.value,
|
|
1837
|
+
touched: touched.value,
|
|
1838
|
+
dirty: dirty.value,
|
|
1839
|
+
error: fieldError.value,
|
|
1840
|
+
isInvalid: isInvalid.value
|
|
1841
|
+
});
|
|
1679
1842
|
};
|
|
1680
1843
|
}
|
|
1681
1844
|
});
|
|
1682
1845
|
//#endregion
|
|
1683
1846
|
//#region src/components/input/Input.vue?vue&type=script&setup=true&lang.ts
|
|
1684
|
-
var _hoisted_1$
|
|
1847
|
+
var _hoisted_1$52 = [
|
|
1685
1848
|
"data-invalid",
|
|
1686
1849
|
"data-disabled",
|
|
1687
1850
|
"data-readonly",
|
|
@@ -1690,13 +1853,13 @@ var _hoisted_1$50 = [
|
|
|
1690
1853
|
"data-has-helper"
|
|
1691
1854
|
];
|
|
1692
1855
|
var _hoisted_2$31 = ["for"];
|
|
1693
|
-
var _hoisted_3$
|
|
1856
|
+
var _hoisted_3$19 = {
|
|
1694
1857
|
key: 0,
|
|
1695
1858
|
"aria-hidden": "true"
|
|
1696
1859
|
};
|
|
1697
|
-
var _hoisted_4$
|
|
1698
|
-
var _hoisted_5$
|
|
1699
|
-
var _hoisted_6$
|
|
1860
|
+
var _hoisted_4$12 = ["data-filled"];
|
|
1861
|
+
var _hoisted_5$8 = ["for"];
|
|
1862
|
+
var _hoisted_6$6 = {
|
|
1700
1863
|
key: 0,
|
|
1701
1864
|
"aria-hidden": "true"
|
|
1702
1865
|
};
|
|
@@ -1851,7 +2014,7 @@ var Input_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1851
2014
|
key: 0,
|
|
1852
2015
|
for: inputId.value,
|
|
1853
2016
|
class: (0, vue.normalizeClass)(slotFns.value.label())
|
|
1854
|
-
}, [(0, vue.createTextVNode)((0, vue.toDisplayString)(__props.label), 1), __props.isRequired ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$
|
|
2017
|
+
}, [(0, vue.createTextVNode)((0, vue.toDisplayString)(__props.label), 1), __props.isRequired ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$19, " *")) : (0, vue.createCommentVNode)("", true)], 10, _hoisted_2$31)) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("div", { class: (0, vue.normalizeClass)(slotFns.value.mainWrapper()) }, [(0, vue.createElementVNode)("div", {
|
|
1855
2018
|
class: (0, vue.normalizeClass)(slotFns.value.inputWrapper()),
|
|
1856
2019
|
"data-filled": hasLabel.value ? isFilled.value || void 0 : void 0
|
|
1857
2020
|
}, [
|
|
@@ -1859,7 +2022,7 @@ var Input_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1859
2022
|
key: 0,
|
|
1860
2023
|
for: inputId.value,
|
|
1861
2024
|
class: (0, vue.normalizeClass)(slotFns.value.label())
|
|
1862
|
-
}, [(0, vue.createTextVNode)((0, vue.toDisplayString)(__props.label), 1), __props.isRequired ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_6$
|
|
2025
|
+
}, [(0, vue.createTextVNode)((0, vue.toDisplayString)(__props.label), 1), __props.isRequired ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_6$6, " *")) : (0, vue.createCommentVNode)("", true)], 10, _hoisted_5$8)) : (0, vue.createCommentVNode)("", true),
|
|
1863
2026
|
_ctx.$slots.startContent ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
|
|
1864
2027
|
key: 1,
|
|
1865
2028
|
class: (0, vue.normalizeClass)(slotFns.value.startContent())
|
|
@@ -1935,7 +2098,7 @@ var Input_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1935
2098
|
cy: "12",
|
|
1936
2099
|
r: "3"
|
|
1937
2100
|
}, null, -1)])]))], 10, _hoisted_8$1)) : (0, vue.createCommentVNode)("", true)
|
|
1938
|
-
], 10, _hoisted_4$
|
|
2101
|
+
], 10, _hoisted_4$12), hasHelper.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
1939
2102
|
key: 0,
|
|
1940
2103
|
class: (0, vue.normalizeClass)(slotFns.value.helperWrapper())
|
|
1941
2104
|
}, [showError.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
@@ -1946,13 +2109,13 @@ var Input_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1946
2109
|
key: 1,
|
|
1947
2110
|
id: descriptionId.value,
|
|
1948
2111
|
class: (0, vue.normalizeClass)(slotFns.value.description())
|
|
1949
|
-
}, (0, vue.toDisplayString)(__props.description), 11, _hoisted_12)) : (0, vue.createCommentVNode)("", true)], 2)) : (0, vue.createCommentVNode)("", true)], 2)], 10, _hoisted_1$
|
|
2112
|
+
}, (0, vue.toDisplayString)(__props.description), 11, _hoisted_12)) : (0, vue.createCommentVNode)("", true)], 2)) : (0, vue.createCommentVNode)("", true)], 2)], 10, _hoisted_1$52);
|
|
1950
2113
|
};
|
|
1951
2114
|
}
|
|
1952
2115
|
});
|
|
1953
2116
|
//#endregion
|
|
1954
2117
|
//#region src/components/textarea/Textarea.vue?vue&type=script&setup=true&lang.ts
|
|
1955
|
-
var _hoisted_1$
|
|
2118
|
+
var _hoisted_1$51 = [
|
|
1956
2119
|
"data-invalid",
|
|
1957
2120
|
"data-disabled",
|
|
1958
2121
|
"data-readonly",
|
|
@@ -1961,13 +2124,13 @@ var _hoisted_1$49 = [
|
|
|
1961
2124
|
"data-has-helper"
|
|
1962
2125
|
];
|
|
1963
2126
|
var _hoisted_2$30 = ["for"];
|
|
1964
|
-
var _hoisted_3$
|
|
2127
|
+
var _hoisted_3$18 = {
|
|
1965
2128
|
key: 0,
|
|
1966
2129
|
"aria-hidden": "true"
|
|
1967
2130
|
};
|
|
1968
|
-
var _hoisted_4$
|
|
1969
|
-
var _hoisted_5$
|
|
1970
|
-
var _hoisted_6$
|
|
2131
|
+
var _hoisted_4$11 = ["data-filled"];
|
|
2132
|
+
var _hoisted_5$7 = ["for"];
|
|
2133
|
+
var _hoisted_6$5 = {
|
|
1971
2134
|
key: 0,
|
|
1972
2135
|
"aria-hidden": "true"
|
|
1973
2136
|
};
|
|
@@ -2091,7 +2254,7 @@ var Textarea_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2091
2254
|
key: 0,
|
|
2092
2255
|
for: inputId.value,
|
|
2093
2256
|
class: (0, vue.normalizeClass)(slotFns.value.label())
|
|
2094
|
-
}, [(0, vue.createTextVNode)((0, vue.toDisplayString)(__props.label), 1), __props.isRequired ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$
|
|
2257
|
+
}, [(0, vue.createTextVNode)((0, vue.toDisplayString)(__props.label), 1), __props.isRequired ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$18, " *")) : (0, vue.createCommentVNode)("", true)], 10, _hoisted_2$30)) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("div", { class: (0, vue.normalizeClass)(slotFns.value.mainWrapper()) }, [(0, vue.createElementVNode)("div", {
|
|
2095
2258
|
class: (0, vue.normalizeClass)(slotFns.value.inputWrapper()),
|
|
2096
2259
|
"data-filled": hasLabel.value ? isFilled.value || void 0 : void 0
|
|
2097
2260
|
}, [
|
|
@@ -2099,7 +2262,7 @@ var Textarea_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2099
2262
|
key: 0,
|
|
2100
2263
|
for: inputId.value,
|
|
2101
2264
|
class: (0, vue.normalizeClass)(slotFns.value.label())
|
|
2102
|
-
}, [(0, vue.createTextVNode)((0, vue.toDisplayString)(__props.label), 1), __props.isRequired ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_6$
|
|
2265
|
+
}, [(0, vue.createTextVNode)((0, vue.toDisplayString)(__props.label), 1), __props.isRequired ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_6$5, " *")) : (0, vue.createCommentVNode)("", true)], 10, _hoisted_5$7)) : (0, vue.createCommentVNode)("", true),
|
|
2103
2266
|
_ctx.$slots.startContent ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
|
|
2104
2267
|
key: 1,
|
|
2105
2268
|
class: (0, vue.normalizeClass)(slotFns.value.startContent())
|
|
@@ -2158,7 +2321,7 @@ var Textarea_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2158
2321
|
y2: "15"
|
|
2159
2322
|
})
|
|
2160
2323
|
], -1)])], 2)) : (0, vue.createCommentVNode)("", true)
|
|
2161
|
-
], 10, _hoisted_4$
|
|
2324
|
+
], 10, _hoisted_4$11), hasHelper.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
2162
2325
|
key: 0,
|
|
2163
2326
|
class: (0, vue.normalizeClass)(slotFns.value.helperWrapper())
|
|
2164
2327
|
}, [showError.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
@@ -2169,13 +2332,13 @@ var Textarea_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2169
2332
|
key: 1,
|
|
2170
2333
|
id: descriptionId.value,
|
|
2171
2334
|
class: (0, vue.normalizeClass)(slotFns.value.description())
|
|
2172
|
-
}, (0, vue.toDisplayString)(__props.description), 11, _hoisted_9)) : (0, vue.createCommentVNode)("", true)], 2)) : (0, vue.createCommentVNode)("", true)], 2)], 10, _hoisted_1$
|
|
2335
|
+
}, (0, vue.toDisplayString)(__props.description), 11, _hoisted_9)) : (0, vue.createCommentVNode)("", true)], 2)) : (0, vue.createCommentVNode)("", true)], 2)], 10, _hoisted_1$51);
|
|
2173
2336
|
};
|
|
2174
2337
|
}
|
|
2175
2338
|
});
|
|
2176
2339
|
//#endregion
|
|
2177
2340
|
//#region src/components/number-field/NumberField.vue?vue&type=script&setup=true&lang.ts
|
|
2178
|
-
var _hoisted_1$
|
|
2341
|
+
var _hoisted_1$50 = ["for"];
|
|
2179
2342
|
//#endregion
|
|
2180
2343
|
//#region src/components/number-field/NumberField.vue
|
|
2181
2344
|
var NumberField_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -2255,7 +2418,7 @@ var NumberField_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2255
2418
|
for: resolvedInputId.value,
|
|
2256
2419
|
class: (0, vue.normalizeClass)(isLabelVisible.value ? void 0 : "sr-only"),
|
|
2257
2420
|
"data-slot": "label"
|
|
2258
|
-
}, (0, vue.toDisplayString)(props.label || props.ariaLabel), 11, _hoisted_1$
|
|
2421
|
+
}, (0, vue.toDisplayString)(props.label || props.ariaLabel), 11, _hoisted_1$50)) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("div", {
|
|
2259
2422
|
class: (0, vue.normalizeClass)(slotFns.value.group()),
|
|
2260
2423
|
"data-slot": "group"
|
|
2261
2424
|
}, [
|
|
@@ -2318,7 +2481,7 @@ var NumberField_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2318
2481
|
});
|
|
2319
2482
|
//#endregion
|
|
2320
2483
|
//#region src/components/fieldset/Fieldset.vue?vue&type=script&setup=true&lang.ts
|
|
2321
|
-
var _hoisted_1$
|
|
2484
|
+
var _hoisted_1$49 = ["disabled"];
|
|
2322
2485
|
//#endregion
|
|
2323
2486
|
//#region src/components/fieldset/Fieldset.vue
|
|
2324
2487
|
var Fieldset_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -2346,7 +2509,7 @@ var Fieldset_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2346
2509
|
}, [props.legend ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("legend", {
|
|
2347
2510
|
key: 0,
|
|
2348
2511
|
class: (0, vue.normalizeClass)((0, vue.unref)(styles).legend())
|
|
2349
|
-
}, (0, vue.toDisplayString)(props.legend), 3)) : (0, vue.createCommentVNode)("", true), (0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$
|
|
2512
|
+
}, (0, vue.toDisplayString)(props.legend), 3)) : (0, vue.createCommentVNode)("", true), (0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$49);
|
|
2350
2513
|
};
|
|
2351
2514
|
}
|
|
2352
2515
|
});
|
|
@@ -2355,7 +2518,7 @@ var Fieldset_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2355
2518
|
var { useProvide: useCheckboxGroupProvide, useInject: useCheckboxGroupInject, key: checkboxGroupContextKey } = createContext("CheckboxGroup");
|
|
2356
2519
|
//#endregion
|
|
2357
2520
|
//#region src/components/checkbox/Checkbox.vue?vue&type=script&setup=true&lang.ts
|
|
2358
|
-
var _hoisted_1$
|
|
2521
|
+
var _hoisted_1$48 = {
|
|
2359
2522
|
key: 0,
|
|
2360
2523
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2361
2524
|
width: "12",
|
|
@@ -2442,7 +2605,7 @@ var Checkbox_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2442
2605
|
"onUpdate:modelValue": handleUpdate
|
|
2443
2606
|
}), {
|
|
2444
2607
|
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("span", { class: (0, vue.normalizeClass)(slotFns.value.control()) }, [(0, vue.createVNode)((0, vue.unref)(reka_ui.CheckboxIndicator), { class: (0, vue.normalizeClass)(slotFns.value.indicator()) }, {
|
|
2445
|
-
default: (0, vue.withCtx)(() => [props.isIndeterminate ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
2608
|
+
default: (0, vue.withCtx)(() => [props.isIndeterminate ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$48, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("line", {
|
|
2446
2609
|
x1: "5",
|
|
2447
2610
|
y1: "12",
|
|
2448
2611
|
x2: "19",
|
|
@@ -2463,9 +2626,9 @@ var Checkbox_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2463
2626
|
});
|
|
2464
2627
|
//#endregion
|
|
2465
2628
|
//#region src/components/checkbox/CheckboxGroup.vue?vue&type=script&setup=true&lang.ts
|
|
2466
|
-
var _hoisted_1$
|
|
2629
|
+
var _hoisted_1$47 = ["aria-labelledby", "data-orientation"];
|
|
2467
2630
|
var _hoisted_2$28 = { class: "checkbox-group__wrapper" };
|
|
2468
|
-
var _hoisted_3$
|
|
2631
|
+
var _hoisted_3$17 = {
|
|
2469
2632
|
key: 1,
|
|
2470
2633
|
class: "checkbox-group__description"
|
|
2471
2634
|
};
|
|
@@ -2520,8 +2683,8 @@ var CheckboxGroup_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2520
2683
|
class: "checkbox-group__label"
|
|
2521
2684
|
}, (0, vue.toDisplayString)(props.label), 1)) : (0, vue.createCommentVNode)("", true),
|
|
2522
2685
|
(0, vue.createElementVNode)("div", _hoisted_2$28, [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
2523
|
-
props.description ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$
|
|
2524
|
-
], 10, _hoisted_1$
|
|
2686
|
+
props.description ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$17, (0, vue.toDisplayString)(props.description), 1)) : (0, vue.createCommentVNode)("", true)
|
|
2687
|
+
], 10, _hoisted_1$47);
|
|
2525
2688
|
};
|
|
2526
2689
|
}
|
|
2527
2690
|
});
|
|
@@ -2572,7 +2735,7 @@ var Radio_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2572
2735
|
});
|
|
2573
2736
|
//#endregion
|
|
2574
2737
|
//#region src/components/radio/RadioGroup.vue?vue&type=script&setup=true&lang.ts
|
|
2575
|
-
var _hoisted_1$
|
|
2738
|
+
var _hoisted_1$46 = { class: "radio-group__wrapper" };
|
|
2576
2739
|
var _hoisted_2$27 = {
|
|
2577
2740
|
key: 1,
|
|
2578
2741
|
class: "radio-group__description"
|
|
@@ -2622,7 +2785,7 @@ var RadioGroup_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2622
2785
|
id: labelId,
|
|
2623
2786
|
class: "radio-group__label"
|
|
2624
2787
|
}, (0, vue.toDisplayString)(props.label), 1)) : (0, vue.createCommentVNode)("", true),
|
|
2625
|
-
(0, vue.createElementVNode)("div", _hoisted_1$
|
|
2788
|
+
(0, vue.createElementVNode)("div", _hoisted_1$46, [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
2626
2789
|
props.description ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_2$27, (0, vue.toDisplayString)(props.description), 1)) : (0, vue.createCommentVNode)("", true)
|
|
2627
2790
|
]),
|
|
2628
2791
|
_: 3
|
|
@@ -2714,7 +2877,7 @@ var Switch_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2714
2877
|
});
|
|
2715
2878
|
//#endregion
|
|
2716
2879
|
//#region src/components/switch/SwitchGroup.vue?vue&type=script&setup=true&lang.ts
|
|
2717
|
-
var _hoisted_1$
|
|
2880
|
+
var _hoisted_1$45 = ["aria-labelledby", "data-orientation"];
|
|
2718
2881
|
var _hoisted_2$26 = {
|
|
2719
2882
|
key: 1,
|
|
2720
2883
|
class: "switch-group__description"
|
|
@@ -2771,7 +2934,7 @@ var SwitchGroup_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2771
2934
|
}, (0, vue.toDisplayString)(props.label), 1)) : (0, vue.createCommentVNode)("", true),
|
|
2772
2935
|
(0, vue.createElementVNode)("div", { class: (0, vue.normalizeClass)(groupSlots.value.items()) }, [(0, vue.renderSlot)(_ctx.$slots, "default")], 2),
|
|
2773
2936
|
props.description ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_2$26, (0, vue.toDisplayString)(props.description), 1)) : (0, vue.createCommentVNode)("", true)
|
|
2774
|
-
], 10, _hoisted_1$
|
|
2937
|
+
], 10, _hoisted_1$45);
|
|
2775
2938
|
};
|
|
2776
2939
|
}
|
|
2777
2940
|
});
|
|
@@ -12583,7 +12746,7 @@ var AlertDialogOverlay_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
12583
12746
|
});
|
|
12584
12747
|
//#endregion
|
|
12585
12748
|
//#region src/components/alert-dialog/AlertDialogContent.vue?vue&type=script&setup=true&lang.ts
|
|
12586
|
-
var _hoisted_1$
|
|
12749
|
+
var _hoisted_1$44 = ["data-placement"];
|
|
12587
12750
|
//#endregion
|
|
12588
12751
|
//#region src/components/alert-dialog/AlertDialogContent.vue
|
|
12589
12752
|
var AlertDialogContent_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -12618,7 +12781,7 @@ var AlertDialogContent_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
12618
12781
|
}, {
|
|
12619
12782
|
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
12620
12783
|
_: 3
|
|
12621
|
-
}, 8, ["class", "data-placement"])], 10, _hoisted_1$
|
|
12784
|
+
}, 8, ["class", "data-placement"])], 10, _hoisted_1$44)]),
|
|
12622
12785
|
_: 3
|
|
12623
12786
|
});
|
|
12624
12787
|
};
|
|
@@ -12768,7 +12931,7 @@ var AlertDialogDescription_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
12768
12931
|
});
|
|
12769
12932
|
//#endregion
|
|
12770
12933
|
//#region src/components/alert-dialog/AlertDialogIcon.vue?vue&type=script&setup=true&lang.ts
|
|
12771
|
-
var _hoisted_1$
|
|
12934
|
+
var _hoisted_1$43 = {
|
|
12772
12935
|
key: 0,
|
|
12773
12936
|
"data-slot": "alert-dialog-default-icon",
|
|
12774
12937
|
viewBox: "0 0 24 24",
|
|
@@ -12788,7 +12951,7 @@ var _hoisted_2$25 = {
|
|
|
12788
12951
|
"stroke-linecap": "round",
|
|
12789
12952
|
"stroke-linejoin": "round"
|
|
12790
12953
|
};
|
|
12791
|
-
var _hoisted_3$
|
|
12954
|
+
var _hoisted_3$16 = {
|
|
12792
12955
|
key: 2,
|
|
12793
12956
|
"data-slot": "alert-dialog-default-icon",
|
|
12794
12957
|
viewBox: "0 0 24 24",
|
|
@@ -12798,7 +12961,7 @@ var _hoisted_3$17 = {
|
|
|
12798
12961
|
"stroke-linecap": "round",
|
|
12799
12962
|
"stroke-linejoin": "round"
|
|
12800
12963
|
};
|
|
12801
|
-
var _hoisted_4$
|
|
12964
|
+
var _hoisted_4$10 = {
|
|
12802
12965
|
key: 3,
|
|
12803
12966
|
"data-slot": "alert-dialog-default-icon",
|
|
12804
12967
|
viewBox: "0 0 24 24",
|
|
@@ -12830,7 +12993,7 @@ var AlertDialogIcon_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
12830
12993
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
|
|
12831
12994
|
class: (0, vue.normalizeClass)((0, vue.unref)(composeClassName)((0, vue.unref)(styles).icon({ status: resolvedStatus() }), props.class)),
|
|
12832
12995
|
"aria-hidden": "true"
|
|
12833
|
-
}, [(0, vue.renderSlot)(_ctx.$slots, "default", {}, () => [resolvedStatus() === "danger" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
12996
|
+
}, [(0, vue.renderSlot)(_ctx.$slots, "default", {}, () => [resolvedStatus() === "danger" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$43, [..._cache[0] || (_cache[0] = [
|
|
12834
12997
|
(0, vue.createElementVNode)("circle", {
|
|
12835
12998
|
cx: "12",
|
|
12836
12999
|
cy: "12",
|
|
@@ -12842,11 +13005,11 @@ var AlertDialogIcon_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
12842
13005
|
(0, vue.createElementVNode)("path", { d: "M12 3.5 2.8 19.5a1.2 1.2 0 0 0 1 1.8h16.4a1.2 1.2 0 0 0 1-1.8L12 3.5Z" }, null, -1),
|
|
12843
13006
|
(0, vue.createElementVNode)("path", { d: "M12 10v4" }, null, -1),
|
|
12844
13007
|
(0, vue.createElementVNode)("path", { d: "M12 17.5h.01" }, null, -1)
|
|
12845
|
-
])])) : resolvedStatus() === "success" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_3$
|
|
13008
|
+
])])) : resolvedStatus() === "success" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_3$16, [..._cache[2] || (_cache[2] = [(0, vue.createElementVNode)("circle", {
|
|
12846
13009
|
cx: "12",
|
|
12847
13010
|
cy: "12",
|
|
12848
13011
|
r: "9"
|
|
12849
|
-
}, null, -1), (0, vue.createElementVNode)("path", { d: "m8.5 12.5 2.5 2.5 4.5-5" }, null, -1)])])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_4$
|
|
13012
|
+
}, null, -1), (0, vue.createElementVNode)("path", { d: "m8.5 12.5 2.5 2.5 4.5-5" }, null, -1)])])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_4$10, [..._cache[3] || (_cache[3] = [
|
|
12850
13013
|
(0, vue.createElementVNode)("circle", {
|
|
12851
13014
|
cx: "12",
|
|
12852
13015
|
cy: "12",
|
|
@@ -13218,7 +13381,7 @@ var Tabs_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
13218
13381
|
});
|
|
13219
13382
|
//#endregion
|
|
13220
13383
|
//#region src/components/tabs/TabList.vue?vue&type=script&setup=true&lang.ts
|
|
13221
|
-
var _hoisted_1$
|
|
13384
|
+
var _hoisted_1$42 = {
|
|
13222
13385
|
key: 0,
|
|
13223
13386
|
class: "tabs__overflow-menu",
|
|
13224
13387
|
role: "menu"
|
|
@@ -13480,7 +13643,7 @@ var TabList_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
13480
13643
|
"stroke-linejoin": "round"
|
|
13481
13644
|
})], -1))]),
|
|
13482
13645
|
_: 1
|
|
13483
|
-
}, 8, ["aria-expanded"]), dropdownOpen.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
13646
|
+
}, 8, ["aria-expanded"]), dropdownOpen.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$42, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(hiddenTabs.value, (tab) => {
|
|
13484
13647
|
return (0, vue.openBlock)(), (0, vue.createBlock)(Button_default, {
|
|
13485
13648
|
key: tab.value,
|
|
13486
13649
|
variant: "ghost",
|
|
@@ -13831,7 +13994,7 @@ var Collapsible_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
13831
13994
|
});
|
|
13832
13995
|
//#endregion
|
|
13833
13996
|
//#region src/components/collapsible/CollapsibleTrigger.vue?vue&type=script&setup=true&lang.ts
|
|
13834
|
-
var _hoisted_1$
|
|
13997
|
+
var _hoisted_1$41 = ["data-state"];
|
|
13835
13998
|
//#endregion
|
|
13836
13999
|
//#region src/components/collapsible/CollapsibleTrigger.vue
|
|
13837
14000
|
var CollapsibleTrigger_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -13858,7 +14021,7 @@ var CollapsibleTrigger_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
13858
14021
|
"stroke-linejoin": "round",
|
|
13859
14022
|
"aria-hidden": "true",
|
|
13860
14023
|
focusable: "false"
|
|
13861
|
-
}, [(0, vue.createElementVNode)("polyline", { points: "6 9 12 15 18 9" })], -1)])], 10, _hoisted_1$
|
|
14024
|
+
}, [(0, vue.createElementVNode)("polyline", { points: "6 9 12 15 18 9" })], -1)])], 10, _hoisted_1$41)]),
|
|
13862
14025
|
_: 3
|
|
13863
14026
|
}, 8, ["class"]);
|
|
13864
14027
|
};
|
|
@@ -14004,9 +14167,9 @@ var Breadcrumbs_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
14004
14167
|
});
|
|
14005
14168
|
//#endregion
|
|
14006
14169
|
//#region src/components/breadcrumbs/BreadcrumbItem.vue?vue&type=script&setup=true&lang.ts
|
|
14007
|
-
var _hoisted_1$
|
|
14170
|
+
var _hoisted_1$40 = ["aria-current"];
|
|
14008
14171
|
var _hoisted_2$24 = ["href"];
|
|
14009
|
-
var _hoisted_3$
|
|
14172
|
+
var _hoisted_3$15 = {
|
|
14010
14173
|
key: 1,
|
|
14011
14174
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14012
14175
|
viewBox: "0 0 24 24",
|
|
@@ -14048,7 +14211,7 @@ var BreadcrumbItem_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
14048
14211
|
key: 2,
|
|
14049
14212
|
class: (0, vue.normalizeClass)((0, vue.unref)(ctx).slotFns.value.separator()),
|
|
14050
14213
|
"aria-hidden": "true"
|
|
14051
|
-
}, [SeparatorRenderer.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(SeparatorRenderer.value), { key: 0 })) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_3$
|
|
14214
|
+
}, [SeparatorRenderer.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(SeparatorRenderer.value), { key: 0 })) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_3$15, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("polyline", { points: "9 6 15 12 9 18" }, null, -1)])]))], 2)) : (0, vue.createCommentVNode)("", true)], 10, _hoisted_1$40);
|
|
14052
14215
|
};
|
|
14053
14216
|
}
|
|
14054
14217
|
});
|
|
@@ -14241,7 +14404,7 @@ var ToolbarToggleItem_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
14241
14404
|
});
|
|
14242
14405
|
//#endregion
|
|
14243
14406
|
//#region src/components/alert/Alert.vue?vue&type=script&setup=true&lang.ts
|
|
14244
|
-
var _hoisted_1$
|
|
14407
|
+
var _hoisted_1$39 = {
|
|
14245
14408
|
key: 0,
|
|
14246
14409
|
"data-slot": "alert-default-icon",
|
|
14247
14410
|
viewBox: "0 0 24 24",
|
|
@@ -14261,7 +14424,7 @@ var _hoisted_2$23 = {
|
|
|
14261
14424
|
"stroke-linecap": "round",
|
|
14262
14425
|
"stroke-linejoin": "round"
|
|
14263
14426
|
};
|
|
14264
|
-
var _hoisted_3$
|
|
14427
|
+
var _hoisted_3$14 = {
|
|
14265
14428
|
key: 2,
|
|
14266
14429
|
"data-slot": "alert-default-icon",
|
|
14267
14430
|
viewBox: "0 0 24 24",
|
|
@@ -14271,7 +14434,7 @@ var _hoisted_3$15 = {
|
|
|
14271
14434
|
"stroke-linecap": "round",
|
|
14272
14435
|
"stroke-linejoin": "round"
|
|
14273
14436
|
};
|
|
14274
|
-
var _hoisted_4$
|
|
14437
|
+
var _hoisted_4$9 = {
|
|
14275
14438
|
key: 3,
|
|
14276
14439
|
"data-slot": "alert-default-icon",
|
|
14277
14440
|
viewBox: "0 0 24 24",
|
|
@@ -14336,7 +14499,7 @@ var Alert_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
14336
14499
|
(0, vue.renderSlot)(_ctx.$slots, "icon", {}, () => [(0, vue.createElementVNode)("span", {
|
|
14337
14500
|
class: (0, vue.normalizeClass)(styles.value.indicator()),
|
|
14338
14501
|
"aria-hidden": "true"
|
|
14339
|
-
}, [__props.severity === "default" || __props.severity === "primary" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
14502
|
+
}, [__props.severity === "default" || __props.severity === "primary" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$39, [..._cache[0] || (_cache[0] = [
|
|
14340
14503
|
(0, vue.createElementVNode)("circle", {
|
|
14341
14504
|
cx: "12",
|
|
14342
14505
|
cy: "12",
|
|
@@ -14348,11 +14511,11 @@ var Alert_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
14348
14511
|
cx: "12",
|
|
14349
14512
|
cy: "12",
|
|
14350
14513
|
r: "9"
|
|
14351
|
-
}, null, -1), (0, vue.createElementVNode)("path", { d: "m8.5 12.5 2.5 2.5 4.5-5" }, null, -1)])])) : __props.severity === "warning" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_3$
|
|
14514
|
+
}, null, -1), (0, vue.createElementVNode)("path", { d: "m8.5 12.5 2.5 2.5 4.5-5" }, null, -1)])])) : __props.severity === "warning" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_3$14, [..._cache[2] || (_cache[2] = [
|
|
14352
14515
|
(0, vue.createElementVNode)("path", { d: "M12 3.5 2.8 19.5a1.2 1.2 0 0 0 1 1.8h16.4a1.2 1.2 0 0 0 1-1.8L12 3.5Z" }, null, -1),
|
|
14353
14516
|
(0, vue.createElementVNode)("path", { d: "M12 10v4" }, null, -1),
|
|
14354
14517
|
(0, vue.createElementVNode)("path", { d: "M12 17.5h.01" }, null, -1)
|
|
14355
|
-
])])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_4$
|
|
14518
|
+
])])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_4$9, [..._cache[3] || (_cache[3] = [
|
|
14356
14519
|
(0, vue.createElementVNode)("circle", {
|
|
14357
14520
|
cx: "12",
|
|
14358
14521
|
cy: "12",
|
|
@@ -14710,7 +14873,7 @@ function useToast() {
|
|
|
14710
14873
|
}
|
|
14711
14874
|
//#endregion
|
|
14712
14875
|
//#region src/components/toast/ToastViewport.vue?vue&type=script&setup=true&lang.ts
|
|
14713
|
-
var _hoisted_1$
|
|
14876
|
+
var _hoisted_1$38 = { class: "flex shrink-0 items-center gap-1 ml-auto" };
|
|
14714
14877
|
//#endregion
|
|
14715
14878
|
//#region src/components/toast/ToastViewport.vue
|
|
14716
14879
|
var ToastViewport_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -14780,7 +14943,7 @@ var ToastViewport_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
14780
14943
|
}, 1024), toast.description ? ((0, vue.openBlock)(), (0, vue.createBlock)(ToastDescription_default, { key: 0 }, {
|
|
14781
14944
|
default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)((0, vue.toDisplayString)(toast.description), 1)]),
|
|
14782
14945
|
_: 2
|
|
14783
|
-
}, 1024)) : (0, vue.createCommentVNode)("", true)], 2), (0, vue.createElementVNode)("div", _hoisted_1$
|
|
14946
|
+
}, 1024)) : (0, vue.createCommentVNode)("", true)], 2), (0, vue.createElementVNode)("div", _hoisted_1$38, [toast.action ? ((0, vue.openBlock)(), (0, vue.createBlock)(ToastAction_default, {
|
|
14784
14947
|
key: 0,
|
|
14785
14948
|
"alt-text": toast.action.label,
|
|
14786
14949
|
onClick: toast.action.onClick
|
|
@@ -14969,7 +15132,7 @@ var ListBoxSection_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
14969
15132
|
var { useProvide: useSelectProvide, useInject: useSelectInject, key: selectContextKey } = createContext("Select");
|
|
14970
15133
|
//#endregion
|
|
14971
15134
|
//#region src/components/select/Select.vue?vue&type=script&setup=true&lang.ts
|
|
14972
|
-
var _hoisted_1$
|
|
15135
|
+
var _hoisted_1$37 = [
|
|
14973
15136
|
"data-invalid",
|
|
14974
15137
|
"data-disabled",
|
|
14975
15138
|
"data-readonly",
|
|
@@ -14978,12 +15141,12 @@ var _hoisted_1$35 = [
|
|
|
14978
15141
|
"data-has-helper"
|
|
14979
15142
|
];
|
|
14980
15143
|
var _hoisted_2$22 = ["for"];
|
|
14981
|
-
var _hoisted_3$
|
|
15144
|
+
var _hoisted_3$13 = {
|
|
14982
15145
|
key: 0,
|
|
14983
15146
|
"aria-hidden": "true"
|
|
14984
15147
|
};
|
|
14985
|
-
var _hoisted_4$
|
|
14986
|
-
var _hoisted_5$
|
|
15148
|
+
var _hoisted_4$8 = ["id"];
|
|
15149
|
+
var _hoisted_5$6 = ["id"];
|
|
14987
15150
|
//#endregion
|
|
14988
15151
|
//#region src/components/select/Select.vue
|
|
14989
15152
|
var Select_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -15022,6 +15185,10 @@ var Select_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
15022
15185
|
class: {},
|
|
15023
15186
|
modelValue: { default: void 0 },
|
|
15024
15187
|
defaultValue: { default: void 0 },
|
|
15188
|
+
multiple: {
|
|
15189
|
+
type: Boolean,
|
|
15190
|
+
default: false
|
|
15191
|
+
},
|
|
15025
15192
|
open: {
|
|
15026
15193
|
type: Boolean,
|
|
15027
15194
|
default: void 0
|
|
@@ -15069,6 +15236,9 @@ var Select_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
15069
15236
|
if (Array.isArray(value)) return value.map((v) => itemRegistry.get(v) ?? v).filter(Boolean).join(", ");
|
|
15070
15237
|
return itemRegistry.get(value) ?? value;
|
|
15071
15238
|
};
|
|
15239
|
+
function removeValue(value) {
|
|
15240
|
+
emit("update:modelValue", (Array.isArray(props.modelValue) ? props.modelValue : []).filter((v) => v !== value));
|
|
15241
|
+
}
|
|
15072
15242
|
useSelectProvide({
|
|
15073
15243
|
isDisabled: (0, vue.toRef)(props, "isDisabled"),
|
|
15074
15244
|
isInvalid: (0, vue.toRef)(props, "isInvalid"),
|
|
@@ -15081,8 +15251,10 @@ var Select_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
15081
15251
|
label: (0, vue.toRef)(props, "label"),
|
|
15082
15252
|
ariaDescribedBy,
|
|
15083
15253
|
slots: slotFns,
|
|
15254
|
+
multiple: (0, vue.toRef)(props, "multiple"),
|
|
15084
15255
|
registerItem,
|
|
15085
|
-
itemLabel
|
|
15256
|
+
itemLabel,
|
|
15257
|
+
removeValue
|
|
15086
15258
|
});
|
|
15087
15259
|
return (_ctx, _cache) => {
|
|
15088
15260
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
@@ -15097,9 +15269,10 @@ var Select_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
15097
15269
|
key: 0,
|
|
15098
15270
|
for: triggerId.value,
|
|
15099
15271
|
class: (0, vue.normalizeClass)(slotFns.value.label())
|
|
15100
|
-
}, [(0, vue.createTextVNode)((0, vue.toDisplayString)(__props.label), 1), __props.isRequired ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$
|
|
15272
|
+
}, [(0, vue.createTextVNode)((0, vue.toDisplayString)(__props.label), 1), __props.isRequired ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$13, " *")) : (0, vue.createCommentVNode)("", true)], 10, _hoisted_2$22)) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("div", { class: (0, vue.normalizeClass)(slotFns.value.mainWrapper()) }, [(0, vue.createVNode)((0, vue.unref)(reka_ui.SelectRoot), {
|
|
15101
15273
|
"model-value": props.modelValue,
|
|
15102
15274
|
"default-value": props.defaultValue,
|
|
15275
|
+
multiple: props.multiple,
|
|
15103
15276
|
open: props.open,
|
|
15104
15277
|
"default-open": props.defaultOpen,
|
|
15105
15278
|
disabled: props.isDisabled,
|
|
@@ -15113,6 +15286,7 @@ var Select_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
15113
15286
|
}, 8, [
|
|
15114
15287
|
"model-value",
|
|
15115
15288
|
"default-value",
|
|
15289
|
+
"multiple",
|
|
15116
15290
|
"open",
|
|
15117
15291
|
"default-open",
|
|
15118
15292
|
"disabled",
|
|
@@ -15125,17 +15299,17 @@ var Select_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
15125
15299
|
key: 0,
|
|
15126
15300
|
id: errorMessageId.value,
|
|
15127
15301
|
class: (0, vue.normalizeClass)(slotFns.value.errorMessage())
|
|
15128
|
-
}, (0, vue.toDisplayString)(__props.errorMessage), 11, _hoisted_4$
|
|
15302
|
+
}, (0, vue.toDisplayString)(__props.errorMessage), 11, _hoisted_4$8)) : showDescription.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
15129
15303
|
key: 1,
|
|
15130
15304
|
id: descriptionId.value,
|
|
15131
15305
|
class: (0, vue.normalizeClass)(slotFns.value.description())
|
|
15132
|
-
}, (0, vue.toDisplayString)(__props.description), 11, _hoisted_5$
|
|
15306
|
+
}, (0, vue.toDisplayString)(__props.description), 11, _hoisted_5$6)) : (0, vue.createCommentVNode)("", true)], 2)) : (0, vue.createCommentVNode)("", true)], 2)], 10, _hoisted_1$37);
|
|
15133
15307
|
};
|
|
15134
15308
|
}
|
|
15135
15309
|
});
|
|
15136
15310
|
//#endregion
|
|
15137
15311
|
//#region src/components/select/SelectTrigger.vue?vue&type=script&setup=true&lang.ts
|
|
15138
|
-
var _hoisted_1$
|
|
15312
|
+
var _hoisted_1$36 = ["for"];
|
|
15139
15313
|
var _hoisted_2$21 = {
|
|
15140
15314
|
key: 0,
|
|
15141
15315
|
"aria-hidden": "true"
|
|
@@ -15171,7 +15345,7 @@ var SelectTrigger_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
15171
15345
|
key: 0,
|
|
15172
15346
|
for: (0, vue.unref)(ctx).triggerId.value,
|
|
15173
15347
|
class: (0, vue.normalizeClass)((0, vue.unref)(ctx).slots.value.label())
|
|
15174
|
-
}, [(0, vue.createTextVNode)((0, vue.toDisplayString)((0, vue.unref)(ctx).label.value), 1), (0, vue.unref)(ctx).isRequired.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_2$21, " *")) : (0, vue.createCommentVNode)("", true)], 10, _hoisted_1$
|
|
15348
|
+
}, [(0, vue.createTextVNode)((0, vue.toDisplayString)((0, vue.unref)(ctx).label.value), 1), (0, vue.unref)(ctx).isRequired.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_2$21, " *")) : (0, vue.createCommentVNode)("", true)], 10, _hoisted_1$36)) : (0, vue.createCommentVNode)("", true),
|
|
15175
15349
|
_ctx.$slots.startContent ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
|
|
15176
15350
|
key: 1,
|
|
15177
15351
|
class: (0, vue.normalizeClass)((0, vue.unref)(ctx).slots.value.startContent()),
|
|
@@ -15211,6 +15385,87 @@ var SelectTrigger_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
15211
15385
|
}
|
|
15212
15386
|
});
|
|
15213
15387
|
//#endregion
|
|
15388
|
+
//#region src/components/select/SelectOverflowChips.vue?vue&type=script&setup=true&lang.ts
|
|
15389
|
+
var _hoisted_1$35 = {
|
|
15390
|
+
ref: "container",
|
|
15391
|
+
style: {
|
|
15392
|
+
"display": "flex",
|
|
15393
|
+
"flex-wrap": "nowrap",
|
|
15394
|
+
"align-items": "center",
|
|
15395
|
+
"gap": "4px",
|
|
15396
|
+
"overflow": "hidden",
|
|
15397
|
+
"flex": "1",
|
|
15398
|
+
"min-width": "0"
|
|
15399
|
+
}
|
|
15400
|
+
};
|
|
15401
|
+
//#endregion
|
|
15402
|
+
//#region src/components/select/SelectOverflowChips.vue
|
|
15403
|
+
var SelectOverflowChips_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
15404
|
+
__name: "SelectOverflowChips",
|
|
15405
|
+
props: {
|
|
15406
|
+
values: {},
|
|
15407
|
+
getLabel: { type: Function }
|
|
15408
|
+
},
|
|
15409
|
+
setup(__props) {
|
|
15410
|
+
const props = __props;
|
|
15411
|
+
const containerEl = (0, vue.useTemplateRef)("container");
|
|
15412
|
+
const visibleCount = (0, vue.ref)(props.values.length);
|
|
15413
|
+
const overflowCount = (0, vue.computed)(() => Math.max(0, props.values.length - visibleCount.value));
|
|
15414
|
+
let measuring = false;
|
|
15415
|
+
async function reflow() {
|
|
15416
|
+
if (measuring) return;
|
|
15417
|
+
measuring = true;
|
|
15418
|
+
try {
|
|
15419
|
+
const el = containerEl.value;
|
|
15420
|
+
if (!el) return;
|
|
15421
|
+
visibleCount.value = props.values.length;
|
|
15422
|
+
await (0, vue.nextTick)();
|
|
15423
|
+
const chips = [...el.querySelectorAll("[data-chip-item]")];
|
|
15424
|
+
if (!chips.length) return;
|
|
15425
|
+
const containerW = el.offsetWidth;
|
|
15426
|
+
if (!containerW) return;
|
|
15427
|
+
const BADGE_W = 76;
|
|
15428
|
+
let usedW = 0;
|
|
15429
|
+
let n = 0;
|
|
15430
|
+
for (let i = 0; i < chips.length; i++) {
|
|
15431
|
+
const gap = i > 0 ? 4 : 0;
|
|
15432
|
+
const chipW = chips[i].offsetWidth;
|
|
15433
|
+
const budget = i === chips.length - 1 ? containerW : containerW - BADGE_W;
|
|
15434
|
+
if (usedW + gap + chipW > budget) break;
|
|
15435
|
+
usedW += gap + chipW;
|
|
15436
|
+
n++;
|
|
15437
|
+
}
|
|
15438
|
+
visibleCount.value = Math.max(1, n);
|
|
15439
|
+
} finally {
|
|
15440
|
+
measuring = false;
|
|
15441
|
+
}
|
|
15442
|
+
}
|
|
15443
|
+
(0, vue.onMounted)(reflow);
|
|
15444
|
+
(0, _vueuse_core.useResizeObserver)(containerEl, reflow);
|
|
15445
|
+
(0, vue.watch)(() => props.values.join("\0"), () => reflow(), { flush: "post" });
|
|
15446
|
+
return (_ctx, _cache) => {
|
|
15447
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$35, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.values, (val, i) => {
|
|
15448
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)(Chip_default, {
|
|
15449
|
+
key: val,
|
|
15450
|
+
"data-chip-item": "",
|
|
15451
|
+
size: "sm",
|
|
15452
|
+
style: (0, vue.normalizeStyle)(i >= visibleCount.value ? "display: none" : void 0)
|
|
15453
|
+
}, {
|
|
15454
|
+
default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)((0, vue.toDisplayString)(__props.getLabel(val)), 1)]),
|
|
15455
|
+
_: 2
|
|
15456
|
+
}, 1032, ["style"]);
|
|
15457
|
+
}), 128)), overflowCount.value > 0 ? ((0, vue.openBlock)(), (0, vue.createBlock)(Chip_default, {
|
|
15458
|
+
key: 0,
|
|
15459
|
+
size: "sm",
|
|
15460
|
+
color: "default"
|
|
15461
|
+
}, {
|
|
15462
|
+
default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)(" +" + (0, vue.toDisplayString)(overflowCount.value) + " more ", 1)]),
|
|
15463
|
+
_: 1
|
|
15464
|
+
})) : (0, vue.createCommentVNode)("", true)], 512);
|
|
15465
|
+
};
|
|
15466
|
+
}
|
|
15467
|
+
});
|
|
15468
|
+
//#endregion
|
|
15214
15469
|
//#region src/components/select/SelectValue.vue
|
|
15215
15470
|
var SelectValue_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
15216
15471
|
__name: "SelectValue",
|
|
@@ -15227,7 +15482,11 @@ var SelectValue_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
15227
15482
|
placeholder: props.placeholder,
|
|
15228
15483
|
"data-slot": "value"
|
|
15229
15484
|
}, {
|
|
15230
|
-
default: (0, vue.withCtx)(({ selectedLabel, modelValue }) => [
|
|
15485
|
+
default: (0, vue.withCtx)(({ selectedLabel, modelValue }) => [(0, vue.unref)(ctx).multiple.value && Array.isArray(modelValue) && modelValue.length > 0 ? ((0, vue.openBlock)(), (0, vue.createBlock)(SelectOverflowChips_default, {
|
|
15486
|
+
key: 0,
|
|
15487
|
+
values: modelValue,
|
|
15488
|
+
"get-label": (0, vue.unref)(ctx).itemLabel
|
|
15489
|
+
}, null, 8, ["values", "get-label"])) : (0, vue.unref)(ctx).multiple.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 1 }, [(0, vue.createTextVNode)((0, vue.toDisplayString)(props.placeholder), 1)], 64)) : selectedLabel && selectedLabel.length > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 2 }, [(0, vue.createTextVNode)((0, vue.toDisplayString)(selectedLabel.join(", ")), 1)], 64)) : modelValue != null && (Array.isArray(modelValue) ? modelValue.length > 0 : modelValue !== "") ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 3 }, [(0, vue.createTextVNode)((0, vue.toDisplayString)((0, vue.unref)(ctx).itemLabel(Array.isArray(modelValue) ? modelValue : modelValue.toString())), 1)], 64)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 4 }, [(0, vue.createTextVNode)((0, vue.toDisplayString)(props.placeholder), 1)], 64))]),
|
|
15231
15490
|
_: 1
|
|
15232
15491
|
}, 8, ["class", "placeholder"]);
|
|
15233
15492
|
};
|
|
@@ -15475,13 +15734,13 @@ var DropdownMenu_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
15475
15734
|
});
|
|
15476
15735
|
//#endregion
|
|
15477
15736
|
//#region src/components/dropdown/DropdownItem.vue?vue&type=script&setup=true&lang.ts
|
|
15478
|
-
var _hoisted_1$
|
|
15737
|
+
var _hoisted_1$34 = { class: "flex flex-1 flex-col" };
|
|
15479
15738
|
var _hoisted_2$20 = { "data-slot": "label" };
|
|
15480
|
-
var _hoisted_3$
|
|
15739
|
+
var _hoisted_3$12 = {
|
|
15481
15740
|
key: 0,
|
|
15482
15741
|
"data-slot": "description"
|
|
15483
15742
|
};
|
|
15484
|
-
var _hoisted_4$
|
|
15743
|
+
var _hoisted_4$7 = {
|
|
15485
15744
|
key: 0,
|
|
15486
15745
|
"data-slot": "shortcut",
|
|
15487
15746
|
class: "ml-auto text-xs text-muted font-mono"
|
|
@@ -15515,8 +15774,8 @@ var DropdownItem_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
15515
15774
|
}, {
|
|
15516
15775
|
default: (0, vue.withCtx)(() => [
|
|
15517
15776
|
(0, vue.renderSlot)(_ctx.$slots, "startContent"),
|
|
15518
|
-
(0, vue.createElementVNode)("div", _hoisted_1$
|
|
15519
|
-
props.shortcut ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("kbd", _hoisted_4$
|
|
15777
|
+
(0, vue.createElementVNode)("div", _hoisted_1$34, [(0, vue.createElementVNode)("span", _hoisted_2$20, [(0, vue.renderSlot)(_ctx.$slots, "default")]), props.description ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$12, (0, vue.toDisplayString)(props.description), 1)) : (0, vue.createCommentVNode)("", true)]),
|
|
15778
|
+
props.shortcut ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("kbd", _hoisted_4$7, (0, vue.toDisplayString)(props.shortcut), 1)) : (0, vue.createCommentVNode)("", true),
|
|
15520
15779
|
(0, vue.renderSlot)(_ctx.$slots, "endContent")
|
|
15521
15780
|
]),
|
|
15522
15781
|
_: 3
|
|
@@ -15850,22 +16109,22 @@ var DropdownSubContent_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
15850
16109
|
var { useProvide: useComboBoxProvide, useInject: useComboBoxInject, key: comboBoxContextKey } = createContext("ComboBox");
|
|
15851
16110
|
//#endregion
|
|
15852
16111
|
//#region src/components/combo-box/ComboBox.vue?vue&type=script&setup=true&lang.ts
|
|
15853
|
-
var _hoisted_1$
|
|
16112
|
+
var _hoisted_1$33 = ["aria-invalid"];
|
|
15854
16113
|
var _hoisted_2$19 = ["id"];
|
|
15855
|
-
var _hoisted_3$
|
|
16114
|
+
var _hoisted_3$11 = {
|
|
15856
16115
|
key: 0,
|
|
15857
16116
|
"aria-hidden": "true"
|
|
15858
16117
|
};
|
|
15859
|
-
var _hoisted_4$
|
|
16118
|
+
var _hoisted_4$6 = {
|
|
15860
16119
|
key: 1,
|
|
15861
16120
|
"data-slot": "helper-wrapper"
|
|
15862
16121
|
};
|
|
15863
|
-
var _hoisted_5$
|
|
16122
|
+
var _hoisted_5$5 = {
|
|
15864
16123
|
key: 0,
|
|
15865
16124
|
"data-slot": "error-message",
|
|
15866
16125
|
"aria-live": "polite"
|
|
15867
16126
|
};
|
|
15868
|
-
var _hoisted_6$
|
|
16127
|
+
var _hoisted_6$4 = {
|
|
15869
16128
|
key: 1,
|
|
15870
16129
|
"data-slot": "description"
|
|
15871
16130
|
};
|
|
@@ -15982,7 +16241,7 @@ var ComboBox_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
15982
16241
|
key: 0,
|
|
15983
16242
|
id: (0, vue.unref)(labelId),
|
|
15984
16243
|
"data-slot": "label"
|
|
15985
|
-
}, [(0, vue.createTextVNode)((0, vue.toDisplayString)(props.label) + " ", 1), props.isRequired ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$
|
|
16244
|
+
}, [(0, vue.createTextVNode)((0, vue.toDisplayString)(props.label) + " ", 1), props.isRequired ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$11, " *")) : (0, vue.createCommentVNode)("", true)], 8, _hoisted_2$19)) : (0, vue.createCommentVNode)("", true),
|
|
15986
16245
|
(0, vue.createVNode)((0, vue.unref)(reka_ui.ComboboxRoot), {
|
|
15987
16246
|
modelValue: internalValue.value,
|
|
15988
16247
|
"onUpdate:modelValue": [_cache[0] || (_cache[0] = ($event) => internalValue.value = $event), _cache[1] || (_cache[1] = ($event) => handleModelValueUpdate($event))],
|
|
@@ -16005,8 +16264,8 @@ var ComboBox_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16005
16264
|
"required",
|
|
16006
16265
|
"filter-function"
|
|
16007
16266
|
]),
|
|
16008
|
-
props.description || props.isInvalid && props.errorMessage ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_4$
|
|
16009
|
-
], 10, _hoisted_1$
|
|
16267
|
+
props.description || props.isInvalid && props.errorMessage ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_4$6, [props.isInvalid && props.errorMessage ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("p", _hoisted_5$5, (0, vue.toDisplayString)(props.errorMessage), 1)) : props.description ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("p", _hoisted_6$4, (0, vue.toDisplayString)(props.description), 1)) : (0, vue.createCommentVNode)("", true)])) : (0, vue.createCommentVNode)("", true)
|
|
16268
|
+
], 10, _hoisted_1$33);
|
|
16010
16269
|
};
|
|
16011
16270
|
}
|
|
16012
16271
|
});
|
|
@@ -16279,7 +16538,7 @@ var ComboBoxEmpty_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16279
16538
|
var { useProvide: useAutocompleteProvide, useInject: useAutocompleteInject, key: autocompleteContextKey } = createContext("Autocomplete");
|
|
16280
16539
|
//#endregion
|
|
16281
16540
|
//#region src/components/autocomplete/Autocomplete.vue?vue&type=script&setup=true&lang.ts
|
|
16282
|
-
var _hoisted_1$
|
|
16541
|
+
var _hoisted_1$32 = [
|
|
16283
16542
|
"data-invalid",
|
|
16284
16543
|
"data-disabled",
|
|
16285
16544
|
"data-readonly",
|
|
@@ -16288,12 +16547,12 @@ var _hoisted_1$31 = [
|
|
|
16288
16547
|
"data-has-helper"
|
|
16289
16548
|
];
|
|
16290
16549
|
var _hoisted_2$18 = ["for"];
|
|
16291
|
-
var _hoisted_3$
|
|
16550
|
+
var _hoisted_3$10 = {
|
|
16292
16551
|
key: 0,
|
|
16293
16552
|
"aria-hidden": "true"
|
|
16294
16553
|
};
|
|
16295
|
-
var _hoisted_4$
|
|
16296
|
-
var _hoisted_5$
|
|
16554
|
+
var _hoisted_4$5 = ["id"];
|
|
16555
|
+
var _hoisted_5$4 = ["id"];
|
|
16297
16556
|
//#endregion
|
|
16298
16557
|
//#region src/components/autocomplete/Autocomplete.vue
|
|
16299
16558
|
var Autocomplete_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -16332,6 +16591,11 @@ var Autocomplete_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16332
16591
|
class: {},
|
|
16333
16592
|
modelValue: { default: void 0 },
|
|
16334
16593
|
defaultValue: { default: void 0 },
|
|
16594
|
+
multiple: {
|
|
16595
|
+
type: Boolean,
|
|
16596
|
+
default: false
|
|
16597
|
+
},
|
|
16598
|
+
multipleOverflow: { default: "wrap" },
|
|
16335
16599
|
open: {
|
|
16336
16600
|
type: Boolean,
|
|
16337
16601
|
default: void 0
|
|
@@ -16355,7 +16619,11 @@ var Autocomplete_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16355
16619
|
default: true
|
|
16356
16620
|
}
|
|
16357
16621
|
},
|
|
16358
|
-
emits: [
|
|
16622
|
+
emits: [
|
|
16623
|
+
"update:modelValue",
|
|
16624
|
+
"update:open",
|
|
16625
|
+
"create"
|
|
16626
|
+
],
|
|
16359
16627
|
setup(__props, { emit: __emit }) {
|
|
16360
16628
|
const props = __props;
|
|
16361
16629
|
const emit = __emit;
|
|
@@ -16376,9 +16644,15 @@ var Autocomplete_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16376
16644
|
}
|
|
16377
16645
|
const isLoading = (0, vue.ref)(false);
|
|
16378
16646
|
const internalItems = (0, vue.ref)([...props.items]);
|
|
16647
|
+
const selectedValues = (0, vue.ref)(props.multiple && Array.isArray(props.modelValue) ? [...props.modelValue] : []);
|
|
16648
|
+
const internalOpen = (0, vue.ref)(props.defaultOpen ?? false);
|
|
16649
|
+
let selectingItem = false;
|
|
16379
16650
|
const isOpen = (0, vue.ref)(props.defaultOpen ?? false);
|
|
16380
16651
|
const termAtOpen = (0, vue.ref)("");
|
|
16381
16652
|
const isUserTyping = (0, vue.ref)(false);
|
|
16653
|
+
const singleOpen = (0, vue.ref)(props.open ?? props.defaultOpen ?? false);
|
|
16654
|
+
let blockReopen = false;
|
|
16655
|
+
let blockReopenTimer;
|
|
16382
16656
|
const effectiveIgnoreFilter = (0, vue.computed)(() => {
|
|
16383
16657
|
if (props.loadItems) return true;
|
|
16384
16658
|
if (!props.filterOnOpen && isOpen.value && !isUserTyping.value) return true;
|
|
@@ -16397,9 +16671,14 @@ var Autocomplete_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16397
16671
|
for (const [value, label] of slotItemRegistry.value) if (label === displayed) return value;
|
|
16398
16672
|
return displayed;
|
|
16399
16673
|
}
|
|
16400
|
-
const
|
|
16401
|
-
const
|
|
16674
|
+
const singleModelValue = (0, vue.computed)(() => props.multiple ? void 0 : props.modelValue);
|
|
16675
|
+
const searchTerm = (0, vue.ref)(labelFor(singleModelValue.value));
|
|
16676
|
+
const isFilled = (0, vue.computed)(() => props.multiple ? selectedValues.value.length > 0 || !!searchTerm.value : !!searchTerm.value);
|
|
16402
16677
|
const hasItems = (0, vue.computed)(() => internalItems.value.length > 0);
|
|
16678
|
+
const selectedLabels = (0, vue.computed)(() => selectedValues.value.map((v) => ({
|
|
16679
|
+
value: v,
|
|
16680
|
+
label: labelFor(v) || v
|
|
16681
|
+
})));
|
|
16403
16682
|
const descriptionId = (0, vue.computed)(() => `${inputId.value}-description`);
|
|
16404
16683
|
const errorMessageId = (0, vue.computed)(() => `${inputId.value}-error`);
|
|
16405
16684
|
const showError = (0, vue.computed)(() => props.isInvalid && !!props.errorMessage);
|
|
@@ -16410,22 +16689,96 @@ var Autocomplete_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16410
16689
|
if (showDescription.value) return descriptionId.value;
|
|
16411
16690
|
});
|
|
16412
16691
|
(0, vue.watch)(() => props.modelValue, (val) => {
|
|
16413
|
-
|
|
16414
|
-
|
|
16692
|
+
if (props.multiple) {
|
|
16693
|
+
if (Array.isArray(val)) selectedValues.value = [...val];
|
|
16694
|
+
} else {
|
|
16695
|
+
const next = labelFor(val);
|
|
16696
|
+
if (searchTerm.value !== next) searchTerm.value = next;
|
|
16697
|
+
}
|
|
16698
|
+
});
|
|
16699
|
+
(0, vue.watch)(() => props.open, (val) => {
|
|
16700
|
+
if (!props.multiple && val !== void 0) singleOpen.value = val;
|
|
16415
16701
|
});
|
|
16416
16702
|
(0, vue.watch)(searchTerm, (displayed) => {
|
|
16703
|
+
if (props.multiple) {
|
|
16704
|
+
if (isOpen.value && displayed !== termAtOpen.value) isUserTyping.value = true;
|
|
16705
|
+
return;
|
|
16706
|
+
}
|
|
16417
16707
|
const next = valueFor(displayed);
|
|
16418
|
-
if (next !== (
|
|
16708
|
+
if (next !== (singleModelValue.value ?? "")) emit("update:modelValue", next);
|
|
16419
16709
|
if (isOpen.value && displayed !== termAtOpen.value) isUserTyping.value = true;
|
|
16420
16710
|
});
|
|
16421
16711
|
function handleOpenChange(val) {
|
|
16712
|
+
if (props.multiple) {
|
|
16713
|
+
isOpen.value = val;
|
|
16714
|
+
internalOpen.value = !val && selectingItem ? true : val;
|
|
16715
|
+
selectingItem = false;
|
|
16716
|
+
if (val) {
|
|
16717
|
+
termAtOpen.value = searchTerm.value;
|
|
16718
|
+
isUserTyping.value = false;
|
|
16719
|
+
} else isUserTyping.value = false;
|
|
16720
|
+
emit("update:open", val);
|
|
16721
|
+
return;
|
|
16722
|
+
}
|
|
16723
|
+
if (val && blockReopen) return;
|
|
16422
16724
|
isOpen.value = val;
|
|
16725
|
+
singleOpen.value = val;
|
|
16423
16726
|
if (val) {
|
|
16424
16727
|
termAtOpen.value = searchTerm.value;
|
|
16425
16728
|
isUserTyping.value = false;
|
|
16426
16729
|
} else isUserTyping.value = false;
|
|
16427
16730
|
emit("update:open", val);
|
|
16428
16731
|
}
|
|
16732
|
+
function onMultipleSelect(value) {
|
|
16733
|
+
selectingItem = true;
|
|
16734
|
+
const idx = selectedValues.value.indexOf(value);
|
|
16735
|
+
selectedValues.value = idx === -1 ? [...selectedValues.value, value] : selectedValues.value.filter((_, i) => i !== idx);
|
|
16736
|
+
searchTerm.value = "";
|
|
16737
|
+
isUserTyping.value = false;
|
|
16738
|
+
emit("update:modelValue", selectedValues.value);
|
|
16739
|
+
}
|
|
16740
|
+
function removeValue(value) {
|
|
16741
|
+
selectedValues.value = selectedValues.value.filter((v) => v !== value);
|
|
16742
|
+
emit("update:modelValue", selectedValues.value);
|
|
16743
|
+
}
|
|
16744
|
+
function clearAll() {
|
|
16745
|
+
selectedValues.value = [];
|
|
16746
|
+
emit("update:modelValue", []);
|
|
16747
|
+
}
|
|
16748
|
+
function isSelected(value) {
|
|
16749
|
+
return selectedValues.value.includes(value);
|
|
16750
|
+
}
|
|
16751
|
+
const hasExactMatch = (0, vue.computed)(() => {
|
|
16752
|
+
const term = searchTerm.value.trim().toLowerCase();
|
|
16753
|
+
if (!term) return false;
|
|
16754
|
+
if (internalItems.value.some((i) => (i.label ?? i.textValue ?? i.value).toLowerCase() === term)) return true;
|
|
16755
|
+
for (const label of slotItemRegistry.value.values()) if (label.toLowerCase() === term) return true;
|
|
16756
|
+
return false;
|
|
16757
|
+
});
|
|
16758
|
+
function onCreateValue(value) {
|
|
16759
|
+
const trimmed = value.trim();
|
|
16760
|
+
if (!trimmed) return;
|
|
16761
|
+
if (props.multiple) {
|
|
16762
|
+
if (!selectedValues.value.includes(trimmed)) {
|
|
16763
|
+
selectingItem = true;
|
|
16764
|
+
selectedValues.value = [...selectedValues.value, trimmed];
|
|
16765
|
+
emit("update:modelValue", selectedValues.value);
|
|
16766
|
+
}
|
|
16767
|
+
searchTerm.value = "";
|
|
16768
|
+
isUserTyping.value = false;
|
|
16769
|
+
} else {
|
|
16770
|
+
searchTerm.value = trimmed;
|
|
16771
|
+
emit("update:modelValue", trimmed);
|
|
16772
|
+
isOpen.value = false;
|
|
16773
|
+
singleOpen.value = false;
|
|
16774
|
+
blockReopen = true;
|
|
16775
|
+
clearTimeout(blockReopenTimer);
|
|
16776
|
+
blockReopenTimer = setTimeout(() => {
|
|
16777
|
+
blockReopen = false;
|
|
16778
|
+
}, 300);
|
|
16779
|
+
}
|
|
16780
|
+
emit("create", trimmed);
|
|
16781
|
+
}
|
|
16429
16782
|
let debounceTimer;
|
|
16430
16783
|
async function runLoadItems(query) {
|
|
16431
16784
|
if (!props.loadItems) return;
|
|
@@ -16452,12 +16805,14 @@ var Autocomplete_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16452
16805
|
if (!props.loadItems) internalItems.value = [...newItems];
|
|
16453
16806
|
});
|
|
16454
16807
|
(0, vue.watch)(internalItems, () => {
|
|
16455
|
-
|
|
16456
|
-
|
|
16808
|
+
if (props.multiple) return;
|
|
16809
|
+
const next = labelFor(singleModelValue.value);
|
|
16810
|
+
if (next && searchTerm.value !== next && valueFor(searchTerm.value) === (singleModelValue.value ?? "")) searchTerm.value = next;
|
|
16457
16811
|
});
|
|
16458
16812
|
(0, vue.watch)(slotItemRegistry, () => {
|
|
16459
|
-
|
|
16460
|
-
|
|
16813
|
+
if (props.multiple) return;
|
|
16814
|
+
const next = labelFor(singleModelValue.value);
|
|
16815
|
+
if (next && searchTerm.value !== next && valueFor(searchTerm.value) === (singleModelValue.value ?? "")) searchTerm.value = next;
|
|
16461
16816
|
});
|
|
16462
16817
|
const slotFns = (0, vue.computed)(() => (0, _auronui_styles.autocompleteVariants)({
|
|
16463
16818
|
variant: props.variant,
|
|
@@ -16487,8 +16842,19 @@ var Autocomplete_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16487
16842
|
truncateItems: (0, vue.toRef)(props, "truncateItems"),
|
|
16488
16843
|
hasItems,
|
|
16489
16844
|
slots: slotFns,
|
|
16845
|
+
multiple: (0, vue.toRef)(props, "multiple"),
|
|
16846
|
+
multipleOverflow: (0, vue.toRef)(props, "multipleOverflow"),
|
|
16847
|
+
selectedValues,
|
|
16848
|
+
selectedLabels,
|
|
16849
|
+
onMultipleSelect,
|
|
16850
|
+
removeValue,
|
|
16851
|
+
clearAll,
|
|
16852
|
+
isSelected,
|
|
16490
16853
|
registerItem,
|
|
16491
|
-
unregisterItem
|
|
16854
|
+
unregisterItem,
|
|
16855
|
+
searchTerm,
|
|
16856
|
+
hasExactMatch,
|
|
16857
|
+
onCreateValue
|
|
16492
16858
|
});
|
|
16493
16859
|
return (_ctx, _cache) => {
|
|
16494
16860
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
@@ -16503,11 +16869,10 @@ var Autocomplete_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16503
16869
|
key: 0,
|
|
16504
16870
|
for: inputId.value,
|
|
16505
16871
|
class: (0, vue.normalizeClass)(slotFns.value.label())
|
|
16506
|
-
}, [(0, vue.createTextVNode)((0, vue.toDisplayString)(__props.label), 1), __props.isRequired ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$
|
|
16872
|
+
}, [(0, vue.createTextVNode)((0, vue.toDisplayString)(__props.label), 1), __props.isRequired ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$10, " *")) : (0, vue.createCommentVNode)("", true)], 10, _hoisted_2$18)) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("div", { class: (0, vue.normalizeClass)(slotFns.value.mainWrapper()) }, [(0, vue.createVNode)((0, vue.unref)(reka_ui.AutocompleteRoot), {
|
|
16507
16873
|
"model-value": searchTerm.value,
|
|
16508
16874
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchTerm.value = $event),
|
|
16509
|
-
open: props.
|
|
16510
|
-
"default-open": props.defaultOpen,
|
|
16875
|
+
open: props.multiple ? internalOpen.value : singleOpen.value,
|
|
16511
16876
|
disabled: props.isDisabled,
|
|
16512
16877
|
required: props.isRequired,
|
|
16513
16878
|
"ignore-filter": effectiveIgnoreFilter.value,
|
|
@@ -16522,7 +16887,6 @@ var Autocomplete_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16522
16887
|
}, 8, [
|
|
16523
16888
|
"model-value",
|
|
16524
16889
|
"open",
|
|
16525
|
-
"default-open",
|
|
16526
16890
|
"disabled",
|
|
16527
16891
|
"required",
|
|
16528
16892
|
"ignore-filter"
|
|
@@ -16533,11 +16897,95 @@ var Autocomplete_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16533
16897
|
key: 0,
|
|
16534
16898
|
id: errorMessageId.value,
|
|
16535
16899
|
class: (0, vue.normalizeClass)(slotFns.value.errorMessage())
|
|
16536
|
-
}, (0, vue.toDisplayString)(__props.errorMessage), 11, _hoisted_4$
|
|
16900
|
+
}, (0, vue.toDisplayString)(__props.errorMessage), 11, _hoisted_4$5)) : showDescription.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
16537
16901
|
key: 1,
|
|
16538
16902
|
id: descriptionId.value,
|
|
16539
16903
|
class: (0, vue.normalizeClass)(slotFns.value.description())
|
|
16540
|
-
}, (0, vue.toDisplayString)(__props.description), 11, _hoisted_5$
|
|
16904
|
+
}, (0, vue.toDisplayString)(__props.description), 11, _hoisted_5$4)) : (0, vue.createCommentVNode)("", true)], 2)) : (0, vue.createCommentVNode)("", true)], 2)], 10, _hoisted_1$32);
|
|
16905
|
+
};
|
|
16906
|
+
}
|
|
16907
|
+
});
|
|
16908
|
+
//#endregion
|
|
16909
|
+
//#region src/components/autocomplete/AutocompleteOverflowChips.vue?vue&type=script&setup=true&lang.ts
|
|
16910
|
+
var _hoisted_1$31 = {
|
|
16911
|
+
ref: "container",
|
|
16912
|
+
style: {
|
|
16913
|
+
"display": "flex",
|
|
16914
|
+
"flex-wrap": "nowrap",
|
|
16915
|
+
"align-items": "center",
|
|
16916
|
+
"gap": "4px",
|
|
16917
|
+
"overflow": "hidden",
|
|
16918
|
+
"flex": "1",
|
|
16919
|
+
"min-width": "0"
|
|
16920
|
+
}
|
|
16921
|
+
};
|
|
16922
|
+
//#endregion
|
|
16923
|
+
//#region src/components/autocomplete/AutocompleteOverflowChips.vue
|
|
16924
|
+
var AutocompleteOverflowChips_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
16925
|
+
__name: "AutocompleteOverflowChips",
|
|
16926
|
+
props: {
|
|
16927
|
+
values: {},
|
|
16928
|
+
getLabel: { type: Function },
|
|
16929
|
+
removeValue: { type: Function }
|
|
16930
|
+
},
|
|
16931
|
+
setup(__props) {
|
|
16932
|
+
const props = __props;
|
|
16933
|
+
const containerEl = (0, vue.useTemplateRef)("container");
|
|
16934
|
+
const visibleCount = (0, vue.ref)(props.values.length);
|
|
16935
|
+
const overflowCount = (0, vue.computed)(() => Math.max(0, props.values.length - visibleCount.value));
|
|
16936
|
+
let measuring = false;
|
|
16937
|
+
async function reflow() {
|
|
16938
|
+
if (measuring) return;
|
|
16939
|
+
measuring = true;
|
|
16940
|
+
try {
|
|
16941
|
+
const el = containerEl.value;
|
|
16942
|
+
if (!el) return;
|
|
16943
|
+
visibleCount.value = props.values.length;
|
|
16944
|
+
await (0, vue.nextTick)();
|
|
16945
|
+
const chips = [...el.querySelectorAll("[data-chip-item]")];
|
|
16946
|
+
if (!chips.length) return;
|
|
16947
|
+
const containerW = el.offsetWidth;
|
|
16948
|
+
if (!containerW) return;
|
|
16949
|
+
const BADGE_W = 76;
|
|
16950
|
+
let usedW = 0;
|
|
16951
|
+
let n = 0;
|
|
16952
|
+
for (let i = 0; i < chips.length; i++) {
|
|
16953
|
+
const gap = i > 0 ? 4 : 0;
|
|
16954
|
+
const chipW = chips[i].offsetWidth;
|
|
16955
|
+
const budget = i === chips.length - 1 ? containerW : containerW - BADGE_W;
|
|
16956
|
+
if (usedW + gap + chipW > budget) break;
|
|
16957
|
+
usedW += gap + chipW;
|
|
16958
|
+
n++;
|
|
16959
|
+
}
|
|
16960
|
+
visibleCount.value = Math.max(1, n);
|
|
16961
|
+
} finally {
|
|
16962
|
+
measuring = false;
|
|
16963
|
+
}
|
|
16964
|
+
}
|
|
16965
|
+
(0, vue.onMounted)(reflow);
|
|
16966
|
+
(0, _vueuse_core.useResizeObserver)(containerEl, reflow);
|
|
16967
|
+
(0, vue.watch)(() => props.values.join("\0"), () => reflow(), { flush: "post" });
|
|
16968
|
+
return (_ctx, _cache) => {
|
|
16969
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$31, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.values, (val, i) => {
|
|
16970
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)(Chip_default, {
|
|
16971
|
+
key: val,
|
|
16972
|
+
"data-chip-item": "",
|
|
16973
|
+
size: "sm",
|
|
16974
|
+
"is-closable": "",
|
|
16975
|
+
style: (0, vue.normalizeStyle)(i >= visibleCount.value ? "display: none" : void 0),
|
|
16976
|
+
onClose: (0, vue.withModifiers)(($event) => __props.removeValue(val), ["stop"])
|
|
16977
|
+
}, {
|
|
16978
|
+
default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)((0, vue.toDisplayString)(__props.getLabel(val)), 1)]),
|
|
16979
|
+
_: 2
|
|
16980
|
+
}, 1032, ["style", "onClose"]);
|
|
16981
|
+
}), 128)), overflowCount.value > 0 ? ((0, vue.openBlock)(), (0, vue.createBlock)(Chip_default, {
|
|
16982
|
+
key: 0,
|
|
16983
|
+
size: "sm",
|
|
16984
|
+
color: "default"
|
|
16985
|
+
}, {
|
|
16986
|
+
default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)(" +" + (0, vue.toDisplayString)(overflowCount.value) + " more ", 1)]),
|
|
16987
|
+
_: 1
|
|
16988
|
+
})) : (0, vue.createCommentVNode)("", true)], 512);
|
|
16541
16989
|
};
|
|
16542
16990
|
}
|
|
16543
16991
|
});
|
|
@@ -16561,6 +17009,8 @@ var AutocompleteInput_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16561
17009
|
const ctx = useAutocompleteInject();
|
|
16562
17010
|
const { focused: isFocused } = (0, _vueuse_core.useFocusWithin)((0, vue.useTemplateRef)("anchor"));
|
|
16563
17011
|
const showInsideLabel = (0, vue.computed)(() => ctx.hasLabel.value && ctx.labelPlacement.value === "inside");
|
|
17012
|
+
const effectivePlaceholder = (0, vue.computed)(() => ctx.multiple.value && ctx.selectedValues.value.length > 0 ? void 0 : props.placeholder);
|
|
17013
|
+
const getLabel = (v) => ctx.selectedLabels.value.find((l) => l.value === v)?.label ?? v;
|
|
16564
17014
|
return (_ctx, _cache) => {
|
|
16565
17015
|
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(reka_ui.AutocompleteAnchor), {
|
|
16566
17016
|
ref: "anchor",
|
|
@@ -16570,6 +17020,7 @@ var AutocompleteInput_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16570
17020
|
"data-invalid": (0, vue.unref)(ctx).isInvalid.value || void 0,
|
|
16571
17021
|
"data-disabled": (0, vue.unref)(ctx).isDisabled.value || void 0,
|
|
16572
17022
|
"data-readonly": (0, vue.unref)(ctx).isReadonly.value || void 0,
|
|
17023
|
+
"data-multiple-overflow": (0, vue.unref)(ctx).multiple.value ? (0, vue.unref)(ctx).multipleOverflow.value : void 0,
|
|
16573
17024
|
"data-slot": "trigger"
|
|
16574
17025
|
}, {
|
|
16575
17026
|
default: (0, vue.withCtx)(() => [
|
|
@@ -16583,15 +17034,38 @@ var AutocompleteInput_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16583
17034
|
class: (0, vue.normalizeClass)((0, vue.unref)(ctx).slots.value.startContent()),
|
|
16584
17035
|
"data-slot": "start-content"
|
|
16585
17036
|
}, [(0, vue.renderSlot)(_ctx.$slots, "startContent")], 2)) : (0, vue.createCommentVNode)("", true),
|
|
17037
|
+
(0, vue.unref)(ctx).multiple.value && (0, vue.unref)(ctx).multipleOverflow.value === "collapse" && (0, vue.unref)(ctx).selectedValues.value.length > 0 ? ((0, vue.openBlock)(), (0, vue.createBlock)(AutocompleteOverflowChips_default, {
|
|
17038
|
+
key: 2,
|
|
17039
|
+
values: (0, vue.unref)(ctx).selectedValues.value,
|
|
17040
|
+
"get-label": getLabel,
|
|
17041
|
+
"remove-value": (0, vue.unref)(ctx).removeValue
|
|
17042
|
+
}, null, 8, ["values", "remove-value"])) : (0, vue.unref)(ctx).multiple.value && (0, vue.unref)(ctx).multipleOverflow.value === "wrap" ? ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, { key: 3 }, (0, vue.renderList)((0, vue.unref)(ctx).selectedLabels.value, (item) => {
|
|
17043
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)(Chip_default, {
|
|
17044
|
+
key: item.value,
|
|
17045
|
+
size: "sm",
|
|
17046
|
+
"is-closable": "",
|
|
17047
|
+
"close-aria-label": `Remove ${item.label}`,
|
|
17048
|
+
"data-slot": "selected-chip",
|
|
17049
|
+
onClose: (0, vue.withModifiers)(($event) => (0, vue.unref)(ctx).removeValue(item.value), ["stop"])
|
|
17050
|
+
}, {
|
|
17051
|
+
default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)((0, vue.toDisplayString)(item.label), 1)]),
|
|
17052
|
+
_: 2
|
|
17053
|
+
}, 1032, ["close-aria-label", "onClose"]);
|
|
17054
|
+
}), 128)) : (0, vue.createCommentVNode)("", true),
|
|
16586
17055
|
(0, vue.createVNode)((0, vue.unref)(reka_ui.AutocompleteInput), {
|
|
16587
17056
|
id: (0, vue.unref)(ctx).inputId.value,
|
|
16588
|
-
placeholder:
|
|
17057
|
+
placeholder: effectivePlaceholder.value,
|
|
16589
17058
|
disabled: (0, vue.unref)(ctx).isDisabled.value,
|
|
16590
17059
|
readonly: (0, vue.unref)(ctx).isReadonly.value,
|
|
16591
17060
|
required: (0, vue.unref)(ctx).isRequired.value,
|
|
16592
17061
|
"aria-invalid": (0, vue.unref)(ctx).isInvalid.value || void 0,
|
|
16593
17062
|
"aria-describedby": (0, vue.unref)(ctx).ariaDescribedBy.value,
|
|
16594
17063
|
class: (0, vue.normalizeClass)((0, vue.unref)(ctx).slots.value.input()),
|
|
17064
|
+
style: (0, vue.normalizeStyle)((0, vue.unref)(ctx).multiple.value && (0, vue.unref)(ctx).multipleOverflow.value === "collapse" && (0, vue.unref)(ctx).selectedValues.value.length > 0 ? {
|
|
17065
|
+
flex: "0 0 auto",
|
|
17066
|
+
minWidth: "80px",
|
|
17067
|
+
width: "auto"
|
|
17068
|
+
} : void 0),
|
|
16595
17069
|
"data-slot": "input",
|
|
16596
17070
|
autocomplete: "off"
|
|
16597
17071
|
}, null, 8, [
|
|
@@ -16602,15 +17076,17 @@ var AutocompleteInput_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16602
17076
|
"required",
|
|
16603
17077
|
"aria-invalid",
|
|
16604
17078
|
"aria-describedby",
|
|
16605
|
-
"class"
|
|
17079
|
+
"class",
|
|
17080
|
+
"style"
|
|
16606
17081
|
]),
|
|
16607
17082
|
(0, vue.createVNode)((0, vue.unref)(reka_ui.AutocompleteCancel), {
|
|
16608
17083
|
class: (0, vue.normalizeClass)((0, vue.unref)(ctx).slots.value.clearButton()),
|
|
16609
17084
|
"data-empty": !(0, vue.unref)(ctx).isFilled.value || (0, vue.unref)(ctx).isReadonly.value || (0, vue.unref)(ctx).isDisabled.value ? "true" : void 0,
|
|
16610
17085
|
"data-slot": "clear-button",
|
|
16611
|
-
"aria-label": "Clear"
|
|
17086
|
+
"aria-label": "Clear",
|
|
17087
|
+
onClick: _cache[0] || (_cache[0] = ($event) => (0, vue.unref)(ctx).multiple.value ? (0, vue.unref)(ctx).clearAll() : void 0)
|
|
16612
17088
|
}, {
|
|
16613
|
-
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "clearIcon", {}, () => [_cache[
|
|
17089
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "clearIcon", {}, () => [_cache[1] || (_cache[1] = (0, vue.createElementVNode)("svg", {
|
|
16614
17090
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16615
17091
|
width: "10",
|
|
16616
17092
|
height: "10",
|
|
@@ -16636,19 +17112,19 @@ var AutocompleteInput_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16636
17112
|
_: 3
|
|
16637
17113
|
}, 8, ["class", "data-empty"]),
|
|
16638
17114
|
(0, vue.unref)(ctx).isLoading.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
|
|
16639
|
-
key:
|
|
17115
|
+
key: 4,
|
|
16640
17116
|
class: (0, vue.normalizeClass)((0, vue.unref)(ctx).slots.value.indicator()),
|
|
16641
17117
|
"data-slot": "autocomplete-loading-indicator",
|
|
16642
17118
|
role: "status",
|
|
16643
17119
|
"aria-live": "polite",
|
|
16644
17120
|
"aria-label": "Loading suggestions"
|
|
16645
17121
|
}, [(0, vue.createVNode)(Spinner_default, { size: "sm" })], 2)) : ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(reka_ui.AutocompleteTrigger), {
|
|
16646
|
-
key:
|
|
17122
|
+
key: 5,
|
|
16647
17123
|
class: (0, vue.normalizeClass)((0, vue.unref)(ctx).slots.value.indicator()),
|
|
16648
17124
|
"data-slot": "autocomplete-default-indicator",
|
|
16649
17125
|
"aria-label": "Toggle suggestions"
|
|
16650
17126
|
}, {
|
|
16651
|
-
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "triggerIcon", {}, () => [_cache[
|
|
17127
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "triggerIcon", {}, () => [_cache[2] || (_cache[2] = (0, vue.createElementVNode)("svg", {
|
|
16652
17128
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16653
17129
|
width: "16",
|
|
16654
17130
|
height: "16",
|
|
@@ -16670,7 +17146,8 @@ var AutocompleteInput_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16670
17146
|
"data-focused",
|
|
16671
17147
|
"data-invalid",
|
|
16672
17148
|
"data-disabled",
|
|
16673
|
-
"data-readonly"
|
|
17149
|
+
"data-readonly",
|
|
17150
|
+
"data-multiple-overflow"
|
|
16674
17151
|
]);
|
|
16675
17152
|
};
|
|
16676
17153
|
}
|
|
@@ -16799,6 +17276,11 @@ var _hoisted_1$28 = {
|
|
|
16799
17276
|
class: "autocomplete-item__text",
|
|
16800
17277
|
"data-slot": "item-text"
|
|
16801
17278
|
};
|
|
17279
|
+
var _hoisted_2$16 = {
|
|
17280
|
+
key: 1,
|
|
17281
|
+
class: "list-box-item__indicator",
|
|
17282
|
+
"data-slot": "list-box-item-indicator"
|
|
17283
|
+
};
|
|
16802
17284
|
//#endregion
|
|
16803
17285
|
//#region src/components/autocomplete/AutocompleteItem.vue
|
|
16804
17286
|
var AutocompleteItem_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -16827,25 +17309,35 @@ var AutocompleteItem_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16827
17309
|
if (!vnodes) return props.value;
|
|
16828
17310
|
return extractText(vnodes).trim() || props.value;
|
|
16829
17311
|
});
|
|
17312
|
+
const isChecked = (0, vue.computed)(() => ctx.multiple.value && ctx.isSelected(props.value));
|
|
16830
17313
|
(0, vue.onMounted)(() => {
|
|
16831
17314
|
ctx.registerItem(props.value, displayText.value);
|
|
16832
17315
|
});
|
|
16833
17316
|
(0, vue.onUnmounted)(() => {
|
|
16834
17317
|
ctx.unregisterItem(props.value);
|
|
16835
17318
|
});
|
|
17319
|
+
function handleSelect(event) {
|
|
17320
|
+
if (ctx.multiple.value) {
|
|
17321
|
+
event.preventDefault();
|
|
17322
|
+
ctx.onMultipleSelect(props.value);
|
|
17323
|
+
}
|
|
17324
|
+
}
|
|
16836
17325
|
return (_ctx, _cache) => {
|
|
16837
17326
|
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(reka_ui.AutocompleteItem), {
|
|
16838
17327
|
value: displayText.value,
|
|
16839
17328
|
"text-value": displayText.value,
|
|
16840
17329
|
disabled: props.isDisabled,
|
|
16841
17330
|
"data-item-value": props.value,
|
|
17331
|
+
"data-selected": isChecked.value || void 0,
|
|
16842
17332
|
class: "list-box-item list-box-item--default",
|
|
16843
|
-
"data-slot": "list-box-item"
|
|
17333
|
+
"data-slot": "list-box-item",
|
|
17334
|
+
onSelect: handleSelect
|
|
16844
17335
|
}, {
|
|
16845
17336
|
default: (0, vue.withCtx)(() => [
|
|
16846
17337
|
(0, vue.renderSlot)(_ctx.$slots, "startContent"),
|
|
16847
17338
|
(0, vue.createElementVNode)("span", _hoisted_1$28, [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
16848
|
-
(0, vue.
|
|
17339
|
+
!(0, vue.unref)(ctx).multiple.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(reka_ui.ComboboxItemIndicator), {
|
|
17340
|
+
key: 0,
|
|
16849
17341
|
class: "list-box-item__indicator",
|
|
16850
17342
|
"data-slot": "list-box-item-indicator"
|
|
16851
17343
|
}, {
|
|
@@ -16863,7 +17355,19 @@ var AutocompleteItem_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16863
17355
|
"aria-hidden": "true"
|
|
16864
17356
|
}, [(0, vue.createElementVNode)("polyline", { points: "20 6 9 17 4 12" })], -1))])]),
|
|
16865
17357
|
_: 3
|
|
16866
|
-
}),
|
|
17358
|
+
})) : isChecked.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_2$16, [(0, vue.renderSlot)(_ctx.$slots, "selectedIcon", {}, () => [_cache[1] || (_cache[1] = (0, vue.createElementVNode)("svg", {
|
|
17359
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17360
|
+
width: "12",
|
|
17361
|
+
height: "12",
|
|
17362
|
+
viewBox: "0 0 24 24",
|
|
17363
|
+
fill: "none",
|
|
17364
|
+
stroke: "currentColor",
|
|
17365
|
+
"stroke-width": "3",
|
|
17366
|
+
"stroke-linecap": "round",
|
|
17367
|
+
"stroke-linejoin": "round",
|
|
17368
|
+
"data-slot": "list-box-item-indicator--checkmark",
|
|
17369
|
+
"aria-hidden": "true"
|
|
17370
|
+
}, [(0, vue.createElementVNode)("polyline", { points: "20 6 9 17 4 12" })], -1))])])) : (0, vue.createCommentVNode)("", true),
|
|
16867
17371
|
(0, vue.renderSlot)(_ctx.$slots, "endContent")
|
|
16868
17372
|
]),
|
|
16869
17373
|
_: 3
|
|
@@ -16871,293 +17375,62 @@ var AutocompleteItem_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16871
17375
|
"value",
|
|
16872
17376
|
"text-value",
|
|
16873
17377
|
"disabled",
|
|
16874
|
-
"data-item-value"
|
|
16875
|
-
|
|
16876
|
-
};
|
|
16877
|
-
}
|
|
16878
|
-
});
|
|
16879
|
-
//#endregion
|
|
16880
|
-
//#region src/components/tag-group/TagGroup.context.ts
|
|
16881
|
-
var { useProvide: useTagGroupProvide, useInject: useTagGroupInject, key: tagGroupContextKey } = createContext("TagGroup");
|
|
16882
|
-
//#endregion
|
|
16883
|
-
//#region src/components/tag-group/TagGroupInput.vue
|
|
16884
|
-
var TagGroupInput_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
16885
|
-
__name: "TagGroupInput",
|
|
16886
|
-
props: {
|
|
16887
|
-
placeholder: { default: void 0 },
|
|
16888
|
-
class: { default: void 0 }
|
|
16889
|
-
},
|
|
16890
|
-
setup(__props) {
|
|
16891
|
-
const props = __props;
|
|
16892
|
-
const ctx = useTagGroupInject({
|
|
16893
|
-
variant: (0, vue.computed)(() => "default"),
|
|
16894
|
-
size: (0, vue.computed)(() => "md"),
|
|
16895
|
-
isDisabled: (0, vue.computed)(() => false),
|
|
16896
|
-
readOnly: (0, vue.computed)(() => false)
|
|
16897
|
-
});
|
|
16898
|
-
const isDisabled = (0, vue.computed)(() => ctx.isDisabled.value);
|
|
16899
|
-
return (_ctx, _cache) => {
|
|
16900
|
-
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(reka_ui.TagsInputInput), {
|
|
16901
|
-
placeholder: __props.placeholder,
|
|
16902
|
-
disabled: isDisabled.value || void 0,
|
|
16903
|
-
class: (0, vue.normalizeClass)(props.class),
|
|
16904
|
-
"data-slot": "input"
|
|
16905
|
-
}, null, 8, [
|
|
16906
|
-
"placeholder",
|
|
16907
|
-
"disabled",
|
|
16908
|
-
"class"
|
|
17378
|
+
"data-item-value",
|
|
17379
|
+
"data-selected"
|
|
16909
17380
|
]);
|
|
16910
17381
|
};
|
|
16911
17382
|
}
|
|
16912
17383
|
});
|
|
16913
17384
|
//#endregion
|
|
16914
|
-
//#region src/components/
|
|
16915
|
-
var _hoisted_1$27 =
|
|
16916
|
-
"
|
|
16917
|
-
"data-
|
|
16918
|
-
"data-disabled",
|
|
16919
|
-
"data-readonly"
|
|
16920
|
-
];
|
|
16921
|
-
var _hoisted_2$16 = ["id"];
|
|
16922
|
-
var _hoisted_3$10 = {
|
|
16923
|
-
key: 0,
|
|
16924
|
-
"aria-hidden": "true"
|
|
16925
|
-
};
|
|
16926
|
-
var _hoisted_4$5 = {
|
|
16927
|
-
key: 1,
|
|
16928
|
-
class: "flex flex-col gap-0.5 px-1",
|
|
16929
|
-
"data-slot": "helper-wrapper"
|
|
16930
|
-
};
|
|
16931
|
-
var _hoisted_5$4 = {
|
|
16932
|
-
key: 0,
|
|
16933
|
-
class: "text-sm text-danger",
|
|
16934
|
-
"data-slot": "error-message",
|
|
16935
|
-
"aria-live": "polite"
|
|
16936
|
-
};
|
|
16937
|
-
var _hoisted_6$4 = {
|
|
16938
|
-
key: 1,
|
|
16939
|
-
class: "text-sm text-default-400",
|
|
16940
|
-
"data-slot": "description"
|
|
17385
|
+
//#region src/components/autocomplete/AutocompleteCreateItem.vue?vue&type=script&setup=true&lang.ts
|
|
17386
|
+
var _hoisted_1$27 = {
|
|
17387
|
+
class: "autocomplete-item__text",
|
|
17388
|
+
"data-slot": "item-text"
|
|
16941
17389
|
};
|
|
16942
17390
|
//#endregion
|
|
16943
|
-
//#region src/components/
|
|
16944
|
-
var
|
|
16945
|
-
__name: "
|
|
17391
|
+
//#region src/components/autocomplete/AutocompleteCreateItem.vue
|
|
17392
|
+
var AutocompleteCreateItem_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
17393
|
+
__name: "AutocompleteCreateItem",
|
|
16946
17394
|
props: {
|
|
16947
|
-
|
|
16948
|
-
|
|
16949
|
-
label: { default: void 0 },
|
|
16950
|
-
placeholder: { default: "Add a tag" },
|
|
16951
|
-
description: { default: void 0 },
|
|
16952
|
-
errorMessage: { default: void 0 },
|
|
16953
|
-
isInvalid: {
|
|
16954
|
-
type: Boolean,
|
|
16955
|
-
default: false
|
|
16956
|
-
},
|
|
16957
|
-
isDisabled: {
|
|
16958
|
-
type: Boolean,
|
|
16959
|
-
default: false
|
|
16960
|
-
},
|
|
16961
|
-
readOnly: {
|
|
16962
|
-
type: Boolean,
|
|
16963
|
-
default: false
|
|
16964
|
-
},
|
|
16965
|
-
isRequired: {
|
|
16966
|
-
type: Boolean,
|
|
16967
|
-
default: false
|
|
16968
|
-
},
|
|
16969
|
-
allowsDuplicates: {
|
|
16970
|
-
type: Boolean,
|
|
16971
|
-
default: false
|
|
16972
|
-
},
|
|
16973
|
-
maxTags: { default: void 0 },
|
|
16974
|
-
delimiter: { default: "," },
|
|
16975
|
-
variant: { default: "default" },
|
|
16976
|
-
size: { default: "md" },
|
|
16977
|
-
class: { default: void 0 }
|
|
16978
|
-
},
|
|
16979
|
-
emits: [
|
|
16980
|
-
"update:modelValue",
|
|
16981
|
-
"add",
|
|
16982
|
-
"remove",
|
|
16983
|
-
"invalid"
|
|
16984
|
-
],
|
|
16985
|
-
setup(__props, { emit: __emit }) {
|
|
16986
|
-
const props = __props;
|
|
16987
|
-
const emit = __emit;
|
|
16988
|
-
const labelId = (0, vue.useId)();
|
|
16989
|
-
const slotFns = (0, _auronui_styles.tagGroupVariants)();
|
|
16990
|
-
useTagGroupProvide({
|
|
16991
|
-
variant: (0, vue.toRef)(props, "variant"),
|
|
16992
|
-
size: (0, vue.toRef)(props, "size"),
|
|
16993
|
-
isDisabled: (0, vue.toRef)(props, "isDisabled"),
|
|
16994
|
-
readOnly: (0, vue.toRef)(props, "readOnly")
|
|
16995
|
-
});
|
|
16996
|
-
function onUpdateModelValue(value) {
|
|
16997
|
-
emit("update:modelValue", value);
|
|
16998
|
-
}
|
|
16999
|
-
return (_ctx, _cache) => {
|
|
17000
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
17001
|
-
class: (0, vue.normalizeClass)((0, vue.unref)(slotFns).base()),
|
|
17002
|
-
"data-invalid": props.isInvalid || void 0,
|
|
17003
|
-
"data-required": props.isRequired || void 0,
|
|
17004
|
-
"data-disabled": props.isDisabled || void 0,
|
|
17005
|
-
"data-readonly": props.readOnly || void 0,
|
|
17006
|
-
"data-slot": "tag-group"
|
|
17007
|
-
}, [
|
|
17008
|
-
props.label ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("label", {
|
|
17009
|
-
key: 0,
|
|
17010
|
-
id: (0, vue.unref)(labelId),
|
|
17011
|
-
class: "text-sm font-medium text-default-foreground w-fit",
|
|
17012
|
-
"data-slot": "label"
|
|
17013
|
-
}, [(0, vue.createTextVNode)((0, vue.toDisplayString)(props.label) + " ", 1), props.isRequired ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$10, " *")) : (0, vue.createCommentVNode)("", true)], 8, _hoisted_2$16)) : (0, vue.createCommentVNode)("", true),
|
|
17014
|
-
(0, vue.createVNode)((0, vue.unref)(reka_ui.TagsInputRoot), {
|
|
17015
|
-
"model-value": props.modelValue,
|
|
17016
|
-
"default-value": props.defaultValue,
|
|
17017
|
-
disabled: props.isDisabled,
|
|
17018
|
-
max: props.maxTags ?? 0,
|
|
17019
|
-
delimiter: props.delimiter,
|
|
17020
|
-
duplicate: props.allowsDuplicates,
|
|
17021
|
-
"aria-labelledby": props.label ? (0, vue.unref)(labelId) : void 0,
|
|
17022
|
-
"aria-invalid": props.isInvalid || void 0,
|
|
17023
|
-
"aria-required": props.isRequired || void 0,
|
|
17024
|
-
class: (0, vue.normalizeClass)((0, vue.unref)(slotFns).list()),
|
|
17025
|
-
"onUpdate:modelValue": onUpdateModelValue
|
|
17026
|
-
}, {
|
|
17027
|
-
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default"), !props.readOnly ? ((0, vue.openBlock)(), (0, vue.createBlock)(TagGroupInput_default, {
|
|
17028
|
-
key: 0,
|
|
17029
|
-
placeholder: props.placeholder
|
|
17030
|
-
}, null, 8, ["placeholder"])) : (0, vue.createCommentVNode)("", true)]),
|
|
17031
|
-
_: 3
|
|
17032
|
-
}, 8, [
|
|
17033
|
-
"model-value",
|
|
17034
|
-
"default-value",
|
|
17035
|
-
"disabled",
|
|
17036
|
-
"max",
|
|
17037
|
-
"delimiter",
|
|
17038
|
-
"duplicate",
|
|
17039
|
-
"aria-labelledby",
|
|
17040
|
-
"aria-invalid",
|
|
17041
|
-
"aria-required",
|
|
17042
|
-
"class"
|
|
17043
|
-
]),
|
|
17044
|
-
props.description || props.isInvalid && props.errorMessage ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_4$5, [props.isInvalid && props.errorMessage ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("p", _hoisted_5$4, (0, vue.toDisplayString)(props.errorMessage), 1)) : props.description ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("p", _hoisted_6$4, (0, vue.toDisplayString)(props.description), 1)) : (0, vue.createCommentVNode)("", true)])) : (0, vue.createCommentVNode)("", true)
|
|
17045
|
-
], 10, _hoisted_1$27);
|
|
17046
|
-
};
|
|
17047
|
-
}
|
|
17048
|
-
});
|
|
17049
|
-
//#endregion
|
|
17050
|
-
//#region src/components/tag/TagText.vue
|
|
17051
|
-
var TagText_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
17052
|
-
__name: "TagText",
|
|
17053
|
-
setup(__props) {
|
|
17054
|
-
return (_ctx, _cache) => {
|
|
17055
|
-
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(reka_ui.TagsInputItemText), null, {
|
|
17056
|
-
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
17057
|
-
_: 3
|
|
17058
|
-
});
|
|
17059
|
-
};
|
|
17060
|
-
}
|
|
17061
|
-
});
|
|
17062
|
-
//#endregion
|
|
17063
|
-
//#region src/components/tag/TagDelete.vue
|
|
17064
|
-
var TagDelete_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
17065
|
-
__name: "TagDelete",
|
|
17066
|
-
emits: ["remove"],
|
|
17067
|
-
setup(__props, { emit: __emit }) {
|
|
17068
|
-
const emit = __emit;
|
|
17069
|
-
const slots = (0, _auronui_styles.tagVariants)();
|
|
17070
|
-
function handleClick() {
|
|
17071
|
-
emit("remove");
|
|
17072
|
-
}
|
|
17073
|
-
return (_ctx, _cache) => {
|
|
17074
|
-
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(reka_ui.TagsInputItemDelete), {
|
|
17075
|
-
class: (0, vue.normalizeClass)((0, vue.unref)(slots).removeButton()),
|
|
17076
|
-
"aria-label": "Remove tag",
|
|
17077
|
-
onClick: handleClick
|
|
17078
|
-
}, {
|
|
17079
|
-
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = (0, vue.createElementVNode)("svg", {
|
|
17080
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
17081
|
-
viewBox: "0 0 24 24",
|
|
17082
|
-
fill: "none",
|
|
17083
|
-
stroke: "currentColor",
|
|
17084
|
-
"stroke-width": "2",
|
|
17085
|
-
"stroke-linecap": "round",
|
|
17086
|
-
"stroke-linejoin": "round",
|
|
17087
|
-
"aria-hidden": "true",
|
|
17088
|
-
focusable: "false"
|
|
17089
|
-
}, [(0, vue.createElementVNode)("line", {
|
|
17090
|
-
x1: "18",
|
|
17091
|
-
y1: "6",
|
|
17092
|
-
x2: "6",
|
|
17093
|
-
y2: "18"
|
|
17094
|
-
}), (0, vue.createElementVNode)("line", {
|
|
17095
|
-
x1: "6",
|
|
17096
|
-
y1: "6",
|
|
17097
|
-
x2: "18",
|
|
17098
|
-
y2: "18"
|
|
17099
|
-
})], -1))])]),
|
|
17100
|
-
_: 3
|
|
17101
|
-
}, 8, ["class"]);
|
|
17102
|
-
};
|
|
17103
|
-
}
|
|
17104
|
-
});
|
|
17105
|
-
//#endregion
|
|
17106
|
-
//#region src/components/tag/Tag.vue
|
|
17107
|
-
var Tag_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
17108
|
-
__name: "Tag",
|
|
17109
|
-
props: {
|
|
17110
|
-
value: {},
|
|
17111
|
-
textValue: { default: void 0 },
|
|
17112
|
-
isDisabled: {
|
|
17113
|
-
type: Boolean,
|
|
17114
|
-
default: void 0
|
|
17115
|
-
},
|
|
17116
|
-
isReadOnly: {
|
|
17117
|
-
type: Boolean,
|
|
17395
|
+
label: {
|
|
17396
|
+
type: [String, Function],
|
|
17118
17397
|
default: void 0
|
|
17119
17398
|
},
|
|
17120
|
-
variant: { default: void 0 },
|
|
17121
|
-
size: { default: void 0 },
|
|
17122
17399
|
class: { default: void 0 }
|
|
17123
17400
|
},
|
|
17124
|
-
|
|
17125
|
-
setup(__props, { emit: __emit }) {
|
|
17401
|
+
setup(__props) {
|
|
17126
17402
|
const props = __props;
|
|
17127
|
-
const
|
|
17128
|
-
const
|
|
17129
|
-
const
|
|
17130
|
-
const
|
|
17131
|
-
const
|
|
17132
|
-
|
|
17133
|
-
|
|
17134
|
-
|
|
17135
|
-
|
|
17136
|
-
|
|
17137
|
-
|
|
17138
|
-
|
|
17139
|
-
|
|
17403
|
+
const ctx = useAutocompleteInject();
|
|
17404
|
+
const comboboxCtx = (0, reka_ui.injectComboboxRootContext)();
|
|
17405
|
+
const term = (0, vue.computed)(() => ctx.searchTerm.value.trim());
|
|
17406
|
+
const isVisible = (0, vue.computed)(() => !!term.value && !ctx.hasExactMatch.value);
|
|
17407
|
+
const displayLabel = (0, vue.computed)(() => {
|
|
17408
|
+
if (typeof props.label === "function") return props.label(term.value);
|
|
17409
|
+
return props.label ?? `Create "${term.value}"`;
|
|
17410
|
+
});
|
|
17411
|
+
function handleSelect(event) {
|
|
17412
|
+
event.preventDefault();
|
|
17413
|
+
ctx.onCreateValue(term.value);
|
|
17414
|
+
if (ctx.multiple.value) comboboxCtx.inputElement.value?.focus();
|
|
17415
|
+
else comboboxCtx.onOpenChange(false);
|
|
17140
17416
|
}
|
|
17141
17417
|
return (_ctx, _cache) => {
|
|
17142
|
-
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(reka_ui.
|
|
17143
|
-
|
|
17144
|
-
|
|
17145
|
-
|
|
17146
|
-
"
|
|
17418
|
+
return isVisible.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(reka_ui.AutocompleteItem), {
|
|
17419
|
+
key: term.value,
|
|
17420
|
+
value: term.value,
|
|
17421
|
+
"text-value": term.value,
|
|
17422
|
+
class: (0, vue.normalizeClass)(["list-box-item list-box-item--default", props.class]),
|
|
17423
|
+
"data-slot": "list-box-item",
|
|
17424
|
+
"data-create-item": "",
|
|
17425
|
+
onSelect: handleSelect
|
|
17147
17426
|
}, {
|
|
17148
|
-
default: (0, vue.withCtx)(() => [(0, vue.
|
|
17149
|
-
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, vue.createTextVNode)((0, vue.toDisplayString)(__props.textValue ?? __props.value), 1)])]),
|
|
17150
|
-
_: 3
|
|
17151
|
-
}), showDelete.value ? ((0, vue.openBlock)(), (0, vue.createBlock)(TagDelete_default, {
|
|
17152
|
-
key: 0,
|
|
17153
|
-
onRemove
|
|
17154
|
-
})) : (0, vue.createCommentVNode)("", true)]),
|
|
17427
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default", { term: term.value }, () => [(0, vue.createElementVNode)("span", _hoisted_1$27, (0, vue.toDisplayString)(displayLabel.value), 1)])]),
|
|
17155
17428
|
_: 3
|
|
17156
17429
|
}, 8, [
|
|
17157
17430
|
"value",
|
|
17158
|
-
"
|
|
17431
|
+
"text-value",
|
|
17159
17432
|
"class"
|
|
17160
|
-
]);
|
|
17433
|
+
])) : (0, vue.createCommentVNode)("", true);
|
|
17161
17434
|
};
|
|
17162
17435
|
}
|
|
17163
17436
|
});
|
|
@@ -26876,6 +27149,7 @@ exports.AlertTitle = AlertTitle_default;
|
|
|
26876
27149
|
exports.AspectRatio = AspectRatio_default;
|
|
26877
27150
|
exports.Autocomplete = Autocomplete_default;
|
|
26878
27151
|
exports.AutocompleteContent = AutocompleteContent_default;
|
|
27152
|
+
exports.AutocompleteCreateItem = AutocompleteCreateItem_default;
|
|
26879
27153
|
exports.AutocompleteInput = AutocompleteInput_default;
|
|
26880
27154
|
exports.AutocompleteItem = AutocompleteItem_default;
|
|
26881
27155
|
exports.Avatar = Avatar_default;
|
|
@@ -27018,11 +27292,7 @@ exports.TableHeader = TableHeader_default;
|
|
|
27018
27292
|
exports.TableHeaderCell = TableHeaderCell_default;
|
|
27019
27293
|
exports.TableRow = TableRow_default;
|
|
27020
27294
|
exports.Tabs = Tabs_default;
|
|
27021
|
-
exports.Tag =
|
|
27022
|
-
exports.TagDelete = TagDelete_default;
|
|
27023
|
-
exports.TagGroup = TagGroup_default;
|
|
27024
|
-
exports.TagGroupInput = TagGroupInput_default;
|
|
27025
|
-
exports.TagText = TagText_default;
|
|
27295
|
+
exports.Tag = Chip_default;
|
|
27026
27296
|
exports.Text = Text_default;
|
|
27027
27297
|
exports.Textarea = Textarea_default;
|
|
27028
27298
|
exports.TimeField = TimeField_default;
|
|
@@ -27067,7 +27337,6 @@ exports.stepperContextKey = stepperContextKey;
|
|
|
27067
27337
|
exports.surfaceContextKey = surfaceContextKey;
|
|
27068
27338
|
exports.switchGroupContextKey = switchGroupContextKey;
|
|
27069
27339
|
exports.tableContextKey = tableContextKey;
|
|
27070
|
-
exports.tagGroupContextKey = tagGroupContextKey;
|
|
27071
27340
|
exports.treeContextKey = treeContextKey;
|
|
27072
27341
|
exports.useAutocompleteInject = useAutocompleteInject;
|
|
27073
27342
|
exports.useAutocompleteProvide = useAutocompleteProvide;
|
|
@@ -27095,8 +27364,6 @@ exports.useSwitchGroupProvide = useSwitchGroupProvide;
|
|
|
27095
27364
|
exports.useTableInject = useTableInject;
|
|
27096
27365
|
exports.useTableKeyboardNav = useTableKeyboardNav;
|
|
27097
27366
|
exports.useTableProvide = useTableProvide;
|
|
27098
|
-
exports.useTagGroupInject = useTagGroupInject;
|
|
27099
|
-
exports.useTagGroupProvide = useTagGroupProvide;
|
|
27100
27367
|
exports.useToast = useToast;
|
|
27101
27368
|
|
|
27102
27369
|
//# sourceMappingURL=index.cjs.map
|