@eldrajs/ui 0.2.8 → 0.2.9
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/CHANGELOG.md +45 -0
- package/README.md +259 -87
- package/dist/{VariantPicker-CjWUVhlm.js → VariantPicker-Da41_oGA.js} +2244 -1399
- package/dist/componentNames.d.ts +1 -1
- package/dist/components/button/Button.vue.d.ts +3 -0
- package/dist/components/button/types.d.ts +32 -3
- package/dist/components/card/ContentCard.vue.d.ts +1 -1
- package/dist/components/checkbox/Checkbox.vue.d.ts +2 -0
- package/dist/components/checkbox/types.d.ts +12 -1
- package/dist/components/chip/Chip.vue.d.ts +4 -3
- package/dist/components/dialog/Dialog.vue.d.ts +12 -7
- package/dist/components/dialog/types.d.ts +11 -2
- package/dist/components/drawer/Drawer.vue.d.ts +1 -0
- package/dist/components/field-wrapper/FieldWrapper.vue.d.ts +3 -0
- package/dist/components/field-wrapper/RequiredMark.vue.d.ts +15 -0
- package/dist/components/field-wrapper/context.d.ts +8 -0
- package/dist/components/field-wrapper/types.d.ts +12 -4
- package/dist/components/filter-panel/FilterGroup.vue.d.ts +1 -0
- package/dist/components/filter-panel/FilterPanel.vue.d.ts +3 -2
- package/dist/components/filter-panel/facets/ColourFacet.vue.d.ts +1 -0
- package/dist/components/filter-panel/facets/ListFacet.vue.d.ts +1 -0
- package/dist/components/filter-panel/facets/RangeFacet.vue.d.ts +2 -1
- package/dist/components/filter-panel/facets/SizeFacet.vue.d.ts +1 -0
- package/dist/components/filter-panel/facets/ToggleFacet.vue.d.ts +1 -0
- package/dist/components/input/Input.vue.d.ts +7 -2
- package/dist/components/input/classes.d.ts +9 -0
- package/dist/components/input/reassertValue.d.ts +13 -0
- package/dist/components/input/types.d.ts +14 -5
- package/dist/components/input/useAdornmentRoom.d.ts +15 -0
- package/dist/components/lightbox/Lightbox.vue.d.ts +1 -0
- package/dist/components/nav-menu/NavMenu.vue.d.ts +1 -0
- package/dist/components/pagination/Pagination.vue.d.ts +154 -0
- package/dist/components/pagination/types.d.ts +31 -0
- package/dist/components/popover/Popover.vue.d.ts +28 -1
- package/dist/components/popover/types.d.ts +57 -3
- package/dist/components/product-card/ProductCard.vue.d.ts +1 -1
- package/dist/components/radio/Radio.vue.d.ts +33 -0
- package/dist/components/radio/RadioGroup.vue.d.ts +4 -0
- package/dist/components/radio/recipes.d.ts +37 -0
- package/dist/components/radio/types.d.ts +64 -3
- package/dist/components/range-slider/RangeSlider.vue.d.ts +1 -0
- package/dist/components/search-bar/SearchBar.vue.d.ts +1 -0
- package/dist/components/search-modal/SearchModal.vue.d.ts +1 -0
- package/dist/components/select/MultiSelect.vue.d.ts +48 -1
- package/dist/components/select/Select.vue.d.ts +20 -0
- package/dist/components/select/SelectPanel.vue.d.ts +23 -0
- package/dist/components/select/SelectTags.vue.d.ts +50 -0
- package/dist/components/select/openRegistry.d.ts +14 -4
- package/dist/components/select/panelParts.d.ts +28 -2
- package/dist/components/select/types.d.ts +45 -7
- package/dist/components/select/useOptionList.d.ts +31 -4
- package/dist/components/select/usePopover.d.ts +36 -39
- package/dist/components/select/useSummaryFit.d.ts +21 -0
- package/dist/components/select/useTagRows.d.ts +17 -0
- package/dist/components/site-form/SiteForm.vue.d.ts +2 -1
- package/dist/components/switch/Switch.vue.d.ts +15 -8
- package/dist/components/switch/types.d.ts +25 -1
- package/dist/components/tabs/Tab.vue.d.ts +1 -0
- package/dist/components/tabs/context.d.ts +6 -2
- package/dist/components/tabs/types.d.ts +9 -0
- package/dist/components/textarea/Textarea.vue.d.ts +21 -1
- package/dist/components/textarea/types.d.ts +11 -2
- package/dist/components/toast/Toast.vue.d.ts +2 -0
- package/dist/components/toast/Toaster.vue.d.ts +7 -1
- package/dist/components/toast/types.d.ts +43 -2
- package/dist/components.css +312 -13
- package/dist/composables/useDialog.d.ts +7 -3
- package/dist/composables/useEldraScope.d.ts +26 -0
- package/dist/composables/useFloating.d.ts +21 -8
- package/dist/composables/useOverlay.d.ts +10 -5
- package/dist/composables/useToast.d.ts +3 -0
- package/dist/index.d.ts +7 -4
- package/dist/index.js +1296 -405
- package/dist/messages/en-US.d.ts +2 -0
- package/dist/messages/is-IS.js +1 -0
- package/dist/resolver.js +1 -0
- package/dist/scoped.css +4623 -0
- package/dist/style.css +312 -13
- package/dist/tailwind.css +43 -12
- package/dist/useMessages-B5nzZghs.js +592 -0
- package/dist/vee-validate.js +42 -6
- package/dist/vue-i18n/index.d.ts +50 -0
- package/dist/vue-i18n/shapes.d.ts +40 -0
- package/dist/vue-i18n.js +289 -0
- package/package.json +16 -3
package/dist/index.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as useHeadingTag, A as filterNumericBeforeInput, At as cx, B as FIELD_LIVE, C as useFloating, Ct as FORM_SUBMITTING_KEY, D as FormLayout_default, Dt as useEldraScope, E as useListbox, Et as provideEldraScope, F as CurrencyInput_default, G as currencySymbol, H as FIELD_SIZE, I as UnitInput_default, J as formatNumber, K as defaultUnitFormat, L as FIELD_BASE, M as applyMask, N as defaultCharacterMeaning, O as focusInvalid, Ot as joinIds, P as stripMask, Q as useSlotPresence, R as FIELD_CLEAR_BUTTON, S as useTeleportTarget, St as FORM_LAYOUT_KEY, T as normalizeText, Tt as ELDRA_SCOPE_KEY, U as createNumberFormat, V as FIELD_SEARCH_APPEARANCE, W as currencyFractionDigits, X as localeSeparators, Y as formatUnit, Z as parseLocaleNumber, _ as QuantityStepper_default, _t as Button_default, a as claimShortcut, at as useEldraUiCurrency, b as useOverlay, bt as ICON_SIZE_CLASS, c as SearchResultsPanel_default, ct as TAG_REMOVE_BUTTON, d as INPUT, dt as CheckboxGroup_default, et as CURRENCY_KEY, f as PLAIN_OPTION, ft as Checkbox_default, g as radioRecipe, gt as FIELD_KEY, h as optionCursor, ht as FieldError_default, i as SearchBar_default, it as provideEldraUiLocale, j as Input_default, jt as partClass, k as Switch_default, kt as useUiId, l as RadioGroup_default, lt as TAG_SHAPE, m as labelRecipe, mt as RequiredMark_default, n as Textarea_default, nt as LOCALE_KEY, o as ownsShortcut, ot as useEldraUiLocale, p as dotRecipe, pt as VisuallyHidden_default, q as formatCurrency, r as Select_default, rt as provideEldraUiCurrency, s as releaseShortcut, st as TAG_FILL, t as VariantPicker_default, tt as DEFAULT_UI_LOCALE, u as HINT, ut as tagPadding, v as MultiSelect_default, vt as Spinner_default, w as matchRange, wt as useControllableModel, x as topLayerDialog, xt as ICON_STROKE_WIDTH$4, y as usePopover, yt as Icon_default, z as FIELD_DISABLED } from "./VariantPicker-Da41_oGA.js";
|
|
2
|
+
import { i as enUS, n as provideEldraUiMessages, r as useMessages, t as MESSAGES_KEY } from "./useMessages-B5nzZghs.js";
|
|
2
3
|
import { Comment, Fragment, Teleport, Text, Transition, cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, h, inject, isRef, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, onServerPrefetch, onUnmounted, onUpdated, openBlock, provide, reactive, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toRef, toValue, unref, useAttrs, useId, useSlots, useTemplateRef, vModelText, vShow, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
3
4
|
import { dateTimeFormat } from "@eldrajs/sdk/format/date";
|
|
4
5
|
// src/components/accordion/context.ts
|
|
5
6
|
/** The key an `Accordion` provides its `AccordionContext` on. */
|
|
6
7
|
var ACCORDION_KEY = Symbol("eldra-ui:accordion");
|
|
8
|
+
// src/components/accordion/Accordion.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
+
var _hoisted_1$51 = ["data-eldra-slot", "data-eldra-scope"];
|
|
7
10
|
// src/components/accordion/Accordion.vue
|
|
8
11
|
var Accordion_default = /* @__PURE__ */ defineComponent({
|
|
9
12
|
__name: "Accordion",
|
|
@@ -16,6 +19,7 @@ var Accordion_default = /* @__PURE__ */ defineComponent({
|
|
|
16
19
|
classes: { default: void 0 }
|
|
17
20
|
},
|
|
18
21
|
setup(__props) {
|
|
22
|
+
const eldra = useEldraScope();
|
|
19
23
|
const props = __props;
|
|
20
24
|
/**
|
|
21
25
|
* Spec "Accordion" → Properties, `name` row: "generated" when `multiple` is `false` and no `name`
|
|
@@ -36,10 +40,12 @@ var Accordion_default = /* @__PURE__ */ defineComponent({
|
|
|
36
40
|
const rootClass = computed(() => partClass(cx("flex flex-col border-t border-border"), props.classes, "root"));
|
|
37
41
|
return (_ctx, _cache) => {
|
|
38
42
|
return openBlock(), createElementBlock("div", {
|
|
43
|
+
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
39
44
|
"data-eldra-ui": "",
|
|
45
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
40
46
|
"data-part": "root",
|
|
41
47
|
class: normalizeClass(rootClass.value)
|
|
42
|
-
}, [renderSlot(_ctx.$slots, "default")],
|
|
48
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$51);
|
|
43
49
|
};
|
|
44
50
|
}
|
|
45
51
|
});
|
|
@@ -234,10 +240,15 @@ function createPanelHeightAnimator(panel) {
|
|
|
234
240
|
};
|
|
235
241
|
}
|
|
236
242
|
// src/components/accordion/AccordionItem.vue?vue&type=script&setup=true&lang.ts
|
|
237
|
-
var _hoisted_1$
|
|
238
|
-
var _hoisted_2$
|
|
239
|
-
var _hoisted_3$
|
|
240
|
-
|
|
243
|
+
var _hoisted_1$50 = ["data-eldra-scope", "href"];
|
|
244
|
+
var _hoisted_2$39 = { class: "min-w-0 flex-1" };
|
|
245
|
+
var _hoisted_3$27 = [
|
|
246
|
+
"data-eldra-scope",
|
|
247
|
+
"name",
|
|
248
|
+
"open"
|
|
249
|
+
];
|
|
250
|
+
var _hoisted_4$20 = { class: "min-w-0 flex-1" };
|
|
251
|
+
var _hoisted_5$14 = ["data-eldra-slot"];
|
|
241
252
|
var TRIGGER_BASE$1 = "group flex w-full items-center justify-between gap-4 min-h-14 py-4 rounded-sm text-start cursor-pointer eldra-focus";
|
|
242
253
|
// src/components/accordion/AccordionItem.vue
|
|
243
254
|
var AccordionItem_default = /* @__PURE__ */ defineComponent({
|
|
@@ -255,6 +266,7 @@ var AccordionItem_default = /* @__PURE__ */ defineComponent({
|
|
|
255
266
|
},
|
|
256
267
|
emits: ["update:modelValue", "toggle"],
|
|
257
268
|
setup(__props, { emit: __emit }) {
|
|
269
|
+
const eldra = useEldraScope();
|
|
258
270
|
const props = __props;
|
|
259
271
|
const emit = __emit;
|
|
260
272
|
/** See `context.ts`. Optional: a standalone item with no `Accordion` above it reads nothing from
|
|
@@ -440,10 +452,11 @@ var AccordionItem_default = /* @__PURE__ */ defineComponent({
|
|
|
440
452
|
return isLinkRow.value ? (openBlock(), createElementBlock("a", {
|
|
441
453
|
key: 0,
|
|
442
454
|
"data-eldra-ui": "",
|
|
455
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
443
456
|
"data-part": "root",
|
|
444
457
|
class: normalizeClass(rootClass.value),
|
|
445
458
|
href: __props.href
|
|
446
|
-
}, [createElementVNode("span", _hoisted_2$
|
|
459
|
+
}, [createElementVNode("span", _hoisted_2$39, [(openBlock(), createBlock(resolveDynamicComponent(titleTag.value), {
|
|
447
460
|
"data-part": "title",
|
|
448
461
|
class: normalizeClass(titleClass.value)
|
|
449
462
|
}, {
|
|
@@ -453,11 +466,12 @@ var AccordionItem_default = /* @__PURE__ */ defineComponent({
|
|
|
453
466
|
key: 0,
|
|
454
467
|
"data-part": "help",
|
|
455
468
|
class: normalizeClass(helpClass.value)
|
|
456
|
-
}, toDisplayString(__props.help), 3)) : createCommentVNode("", true)])], 10, _hoisted_1$
|
|
469
|
+
}, toDisplayString(__props.help), 3)) : createCommentVNode("", true)])], 10, _hoisted_1$50)) : (openBlock(), createElementBlock("details", {
|
|
457
470
|
key: 1,
|
|
458
471
|
ref_key: "detailsRef",
|
|
459
472
|
ref: detailsRef,
|
|
460
473
|
"data-eldra-ui": "",
|
|
474
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
461
475
|
"data-part": "root",
|
|
462
476
|
class: normalizeClass(rootClass.value),
|
|
463
477
|
name: detailsName.value,
|
|
@@ -467,7 +481,7 @@ var AccordionItem_default = /* @__PURE__ */ defineComponent({
|
|
|
467
481
|
"data-part": "summary",
|
|
468
482
|
class: normalizeClass(summaryClass.value),
|
|
469
483
|
onClick: onSummaryClick
|
|
470
|
-
}, [createElementVNode("span", _hoisted_4$
|
|
484
|
+
}, [createElementVNode("span", _hoisted_4$20, [(openBlock(), createBlock(resolveDynamicComponent(titleTag.value), {
|
|
471
485
|
"data-part": "title",
|
|
472
486
|
class: normalizeClass(titleClass.value)
|
|
473
487
|
}, {
|
|
@@ -491,9 +505,10 @@ var AccordionItem_default = /* @__PURE__ */ defineComponent({
|
|
|
491
505
|
}, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "M6 9l6 6l6 -6" }, null, -1)])], 2))], 2), createElementVNode("div", {
|
|
492
506
|
ref_key: "panelRef",
|
|
493
507
|
ref: panelRef,
|
|
508
|
+
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
494
509
|
"data-part": "panel",
|
|
495
510
|
class: normalizeClass(panelClass.value)
|
|
496
|
-
}, [renderSlot(_ctx.$slots, "default")],
|
|
511
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_5$14)], 42, _hoisted_3$27));
|
|
497
512
|
};
|
|
498
513
|
}
|
|
499
514
|
});
|
|
@@ -519,7 +534,8 @@ function initialsFromName(name) {
|
|
|
519
534
|
return `${words[0].charAt(0)}${words[words.length - 1].charAt(0)}`.toUpperCase();
|
|
520
535
|
}
|
|
521
536
|
// src/components/avatar/Avatar.vue?vue&type=script&setup=true&lang.ts
|
|
522
|
-
var _hoisted_1$
|
|
537
|
+
var _hoisted_1$49 = ["data-eldra-scope"];
|
|
538
|
+
var _hoisted_2$38 = ["src"];
|
|
523
539
|
// src/components/avatar/Avatar.vue
|
|
524
540
|
var Avatar_default = /* @__PURE__ */ defineComponent({
|
|
525
541
|
__name: "Avatar",
|
|
@@ -534,6 +550,7 @@ var Avatar_default = /* @__PURE__ */ defineComponent({
|
|
|
534
550
|
classes: { default: void 0 }
|
|
535
551
|
},
|
|
536
552
|
setup(__props) {
|
|
553
|
+
const eldra = useEldraScope();
|
|
537
554
|
const props = __props;
|
|
538
555
|
/**
|
|
539
556
|
* Diameters (spec "Avatar" → Sizes): 2rem/2.5rem/3.5rem/6rem — exact multiples of this package's
|
|
@@ -608,6 +625,7 @@ var Avatar_default = /* @__PURE__ */ defineComponent({
|
|
|
608
625
|
return (_ctx, _cache) => {
|
|
609
626
|
return openBlock(), createElementBlock("span", mergeProps({
|
|
610
627
|
"data-eldra-ui": "",
|
|
628
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
611
629
|
"data-part": "root",
|
|
612
630
|
class: rootClass.value
|
|
613
631
|
}, rootAria.value), [showImage.value ? (openBlock(), createElementBlock("img", {
|
|
@@ -618,7 +636,7 @@ var Avatar_default = /* @__PURE__ */ defineComponent({
|
|
|
618
636
|
alt: "",
|
|
619
637
|
"aria-hidden": "true",
|
|
620
638
|
onError: onImageError
|
|
621
|
-
}, null, 42,
|
|
639
|
+
}, null, 42, _hoisted_2$38)) : showInitials.value ? (openBlock(), createElementBlock("span", {
|
|
622
640
|
key: 1,
|
|
623
641
|
"data-part": "initials",
|
|
624
642
|
class: normalizeClass(initialsClass.value),
|
|
@@ -639,13 +657,13 @@ var Avatar_default = /* @__PURE__ */ defineComponent({
|
|
|
639
657
|
cx: "12",
|
|
640
658
|
cy: "8",
|
|
641
659
|
r: "3.5"
|
|
642
|
-
}, null, -1), createElementVNode("path", { d: "M5 20c0 -4 3 -7 7 -7s7 3 7 7" }, null, -1)])], 2))], 16);
|
|
660
|
+
}, null, -1), createElementVNode("path", { d: "M5 20c0 -4 3 -7 7 -7s7 3 7 7" }, null, -1)])], 2))], 16, _hoisted_1$49);
|
|
643
661
|
};
|
|
644
662
|
}
|
|
645
663
|
});
|
|
646
664
|
// src/components/avatar/AvatarGroup.vue?vue&type=script&setup=true&lang.ts
|
|
647
|
-
var _hoisted_1$
|
|
648
|
-
var _hoisted_2$
|
|
665
|
+
var _hoisted_1$48 = ["data-eldra-scope", "aria-labelledby"];
|
|
666
|
+
var _hoisted_2$37 = ["id"];
|
|
649
667
|
var ITEM_SIZE = "sm";
|
|
650
668
|
/** `Avatar.vue`'s own `size-8` for `sm` — needed again here so the item wrapper (which draws the
|
|
651
669
|
* overlap and the ring) is exactly the avatar's own box, not a guess at its size. */
|
|
@@ -663,6 +681,7 @@ var AvatarGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
663
681
|
classes: { default: void 0 }
|
|
664
682
|
},
|
|
665
683
|
setup(__props) {
|
|
684
|
+
const eldra = useEldraScope();
|
|
666
685
|
const props = __props;
|
|
667
686
|
const messages = useMessages();
|
|
668
687
|
/**
|
|
@@ -693,6 +712,7 @@ var AvatarGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
693
712
|
return (_ctx, _cache) => {
|
|
694
713
|
return openBlock(), createElementBlock("div", {
|
|
695
714
|
"data-eldra-ui": "",
|
|
715
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
696
716
|
"data-part": "root",
|
|
697
717
|
class: normalizeClass(rootClass.value),
|
|
698
718
|
role: "group",
|
|
@@ -720,12 +740,13 @@ var AvatarGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
720
740
|
id: unref(srTextId),
|
|
721
741
|
"data-part": "srText",
|
|
722
742
|
class: normalizeClass(srTextClass.value)
|
|
723
|
-
}, toDisplayString(groupLabel.value), 11, _hoisted_2$
|
|
724
|
-
], 10, _hoisted_1$
|
|
743
|
+
}, toDisplayString(groupLabel.value), 11, _hoisted_2$37)
|
|
744
|
+
], 10, _hoisted_1$48);
|
|
725
745
|
};
|
|
726
746
|
}
|
|
727
747
|
});
|
|
728
748
|
// src/components/badge/Badge.vue?vue&type=script&setup=true&lang.ts
|
|
749
|
+
var _hoisted_1$47 = ["data-eldra-slot"];
|
|
729
750
|
var ICON_STROKE_WIDTH$3 = 2.25;
|
|
730
751
|
/**
|
|
731
752
|
* `variant` overrides `tone` (spec "Badge" → Properties): `sale` always reads as `accent`, `new`
|
|
@@ -753,6 +774,7 @@ var Badge_default = /* @__PURE__ */ defineComponent({
|
|
|
753
774
|
classes: { default: void 0 }
|
|
754
775
|
},
|
|
755
776
|
setup(__props) {
|
|
777
|
+
const eldra = useEldraScope();
|
|
756
778
|
const props = __props;
|
|
757
779
|
/** Badges never carry a literal 2.25 stroke on a shared `Icon` size, so the leading icon is drawn
|
|
758
780
|
* directly rather than through `Icon.vue`: none of that component's four sizes is the spec's
|
|
@@ -791,6 +813,7 @@ var Badge_default = /* @__PURE__ */ defineComponent({
|
|
|
791
813
|
return (_ctx, _cache) => {
|
|
792
814
|
return openBlock(), createBlock(resolveDynamicComponent(__props.as ?? "span"), {
|
|
793
815
|
"data-eldra-ui": "",
|
|
816
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
794
817
|
"data-part": "root",
|
|
795
818
|
class: normalizeClass(rootClass.value)
|
|
796
819
|
}, {
|
|
@@ -804,9 +827,10 @@ var Badge_default = /* @__PURE__ */ defineComponent({
|
|
|
804
827
|
focusable: "false"
|
|
805
828
|
}, null, 8, ["class"])) : createCommentVNode("", true),
|
|
806
829
|
createElementVNode("span", {
|
|
830
|
+
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
807
831
|
"data-part": "label",
|
|
808
832
|
class: normalizeClass(labelClass.value)
|
|
809
|
-
}, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])],
|
|
833
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])], 10, _hoisted_1$47),
|
|
810
834
|
__props.hiddenSuffix ? (openBlock(), createElementBlock("span", {
|
|
811
835
|
key: 1,
|
|
812
836
|
"data-part": "hiddenSuffix",
|
|
@@ -814,13 +838,13 @@ var Badge_default = /* @__PURE__ */ defineComponent({
|
|
|
814
838
|
}, toDisplayString(__props.hiddenSuffix), 3)) : createCommentVNode("", true)
|
|
815
839
|
]),
|
|
816
840
|
_: 3
|
|
817
|
-
}, 8, ["class"]);
|
|
841
|
+
}, 8, ["data-eldra-scope", "class"]);
|
|
818
842
|
};
|
|
819
843
|
}
|
|
820
844
|
});
|
|
821
845
|
// src/components/breadcrumb/Breadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
822
|
-
var _hoisted_1$
|
|
823
|
-
var _hoisted_2$
|
|
846
|
+
var _hoisted_1$46 = ["data-eldra-scope", "aria-label"];
|
|
847
|
+
var _hoisted_2$36 = ["aria-label"];
|
|
824
848
|
// src/components/breadcrumb/Breadcrumb.vue
|
|
825
849
|
var Breadcrumb_default = /* @__PURE__ */ defineComponent({
|
|
826
850
|
__name: "Breadcrumb",
|
|
@@ -836,6 +860,7 @@ var Breadcrumb_default = /* @__PURE__ */ defineComponent({
|
|
|
836
860
|
classes: { default: void 0 }
|
|
837
861
|
},
|
|
838
862
|
setup(__props) {
|
|
863
|
+
const eldra = useEldraScope();
|
|
839
864
|
const props = __props;
|
|
840
865
|
const m = useMessages();
|
|
841
866
|
/**
|
|
@@ -1093,6 +1118,7 @@ var Breadcrumb_default = /* @__PURE__ */ defineComponent({
|
|
|
1093
1118
|
return (_ctx, _cache) => {
|
|
1094
1119
|
return openBlock(), createElementBlock("nav", {
|
|
1095
1120
|
"data-eldra-ui": "",
|
|
1121
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
1096
1122
|
"data-part": "root",
|
|
1097
1123
|
"aria-label": unref(m).breadcrumbLabel,
|
|
1098
1124
|
class: normalizeClass(rootClass.value)
|
|
@@ -1151,7 +1177,7 @@ var Breadcrumb_default = /* @__PURE__ */ defineComponent({
|
|
|
1151
1177
|
class: normalizeClass(ellipsisClass.value),
|
|
1152
1178
|
"aria-label": unref(m).showMoreLevels(middleItems.value.length),
|
|
1153
1179
|
onClick: expand
|
|
1154
|
-
}, " … ", 10, _hoisted_2$
|
|
1180
|
+
}, " … ", 10, _hoisted_2$36)], 2)) : createCommentVNode("", true),
|
|
1155
1181
|
(openBlock(true), createElementBlock(Fragment, null, renderList(middleItems.value, (item, index) => {
|
|
1156
1182
|
return openBlock(), createElementBlock("li", {
|
|
1157
1183
|
key: `middle-${index}`,
|
|
@@ -1217,12 +1243,16 @@ var Breadcrumb_default = /* @__PURE__ */ defineComponent({
|
|
|
1217
1243
|
key: 0,
|
|
1218
1244
|
type: "application/ld+json",
|
|
1219
1245
|
textContent: toDisplayString(structuredDataJson.value)
|
|
1220
|
-
}, null, 8, ["textContent"])) : createCommentVNode("", true)], 10, _hoisted_1$
|
|
1246
|
+
}, null, 8, ["textContent"])) : createCommentVNode("", true)], 10, _hoisted_1$46);
|
|
1221
1247
|
};
|
|
1222
1248
|
}
|
|
1223
1249
|
});
|
|
1224
1250
|
// src/components/button/ButtonGroup.vue?vue&type=script&setup=true&lang.ts
|
|
1225
|
-
var _hoisted_1$
|
|
1251
|
+
var _hoisted_1$45 = [
|
|
1252
|
+
"data-eldra-slot",
|
|
1253
|
+
"data-eldra-scope",
|
|
1254
|
+
"role"
|
|
1255
|
+
];
|
|
1226
1256
|
var BASE$2 = "@container flex items-center";
|
|
1227
1257
|
var LOOSE = "flex-wrap gap-3";
|
|
1228
1258
|
// src/components/button/ButtonGroup.vue
|
|
@@ -1236,6 +1266,7 @@ var ButtonGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
1236
1266
|
classes: { default: void 0 }
|
|
1237
1267
|
},
|
|
1238
1268
|
setup(__props) {
|
|
1269
|
+
const eldra = useEldraScope();
|
|
1239
1270
|
const props = __props;
|
|
1240
1271
|
/**
|
|
1241
1272
|
* The layout helper from spec "Button" → Button group: a flex row that wraps, `space-3` gap, items
|
|
@@ -1257,11 +1288,13 @@ var ButtonGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
1257
1288
|
const rootClass = computed(() => partClass(cx(BASE$2, props.attached ? ATTACHED : LOOSE), props.classes, "root"));
|
|
1258
1289
|
return (_ctx, _cache) => {
|
|
1259
1290
|
return openBlock(), createElementBlock("div", {
|
|
1291
|
+
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
1260
1292
|
"data-eldra-ui": "",
|
|
1293
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
1261
1294
|
"data-part": "root",
|
|
1262
1295
|
class: normalizeClass(rootClass.value),
|
|
1263
1296
|
role: __props.attached ? "group" : void 0
|
|
1264
|
-
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$
|
|
1297
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$45);
|
|
1265
1298
|
};
|
|
1266
1299
|
}
|
|
1267
1300
|
});
|
|
@@ -2211,34 +2244,40 @@ function useCarousel(options) {
|
|
|
2211
2244
|
};
|
|
2212
2245
|
}
|
|
2213
2246
|
// src/components/carousel/Carousel.vue?vue&type=script&setup=true&lang.ts
|
|
2214
|
-
var _hoisted_1$
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
var
|
|
2221
|
-
var
|
|
2222
|
-
var
|
|
2223
|
-
var
|
|
2247
|
+
var _hoisted_1$44 = [
|
|
2248
|
+
"data-eldra-scope",
|
|
2249
|
+
"aria-label",
|
|
2250
|
+
"aria-describedby"
|
|
2251
|
+
];
|
|
2252
|
+
var _hoisted_2$35 = ["id"];
|
|
2253
|
+
var _hoisted_3$26 = ["data-eldra-slot"];
|
|
2254
|
+
var _hoisted_4$19 = ["data-eldra-scope"];
|
|
2255
|
+
var _hoisted_5$13 = ["disabled", "aria-label"];
|
|
2256
|
+
var _hoisted_6$9 = ["disabled", "aria-label"];
|
|
2257
|
+
var _hoisted_7$8 = [
|
|
2258
|
+
"data-eldra-slot",
|
|
2259
|
+
"tabindex",
|
|
2260
|
+
"aria-label"
|
|
2261
|
+
];
|
|
2262
|
+
var _hoisted_8$4 = {
|
|
2224
2263
|
key: 2,
|
|
2225
2264
|
class: "flex items-center justify-between gap-4"
|
|
2226
2265
|
};
|
|
2227
|
-
var
|
|
2228
|
-
var
|
|
2229
|
-
var
|
|
2266
|
+
var _hoisted_9$4 = ["aria-label"];
|
|
2267
|
+
var _hoisted_10$1 = { key: 1 };
|
|
2268
|
+
var _hoisted_11$1 = [
|
|
2230
2269
|
"aria-current",
|
|
2231
2270
|
"aria-label",
|
|
2232
2271
|
"onClick"
|
|
2233
2272
|
];
|
|
2234
|
-
var
|
|
2235
|
-
var
|
|
2273
|
+
var _hoisted_12$1 = { key: 3 };
|
|
2274
|
+
var _hoisted_13 = {
|
|
2236
2275
|
key: 4,
|
|
2237
2276
|
class: "flex shrink-0 items-center gap-2"
|
|
2238
2277
|
};
|
|
2239
|
-
var _hoisted_13 = ["disabled", "aria-label"];
|
|
2240
2278
|
var _hoisted_14 = ["disabled", "aria-label"];
|
|
2241
|
-
var _hoisted_15 =
|
|
2279
|
+
var _hoisted_15 = ["disabled", "aria-label"];
|
|
2280
|
+
var _hoisted_16 = { key: 5 };
|
|
2242
2281
|
var ARROW_BASE = "inline-flex size-11 shrink-0 cursor-pointer items-center justify-center rounded-full border border-border-strong bg-background text-text eldra-focus hover:border-text hover:bg-surface disabled:cursor-not-allowed disabled:opacity-45 disabled:hover:border-border-strong disabled:hover:bg-background";
|
|
2243
2282
|
// src/components/carousel/Carousel.vue
|
|
2244
2283
|
var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
@@ -2264,6 +2303,7 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2264
2303
|
},
|
|
2265
2304
|
emits: ["change"],
|
|
2266
2305
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
2306
|
+
const eldra = useEldraScope();
|
|
2267
2307
|
const props = __props;
|
|
2268
2308
|
const emit = __emit;
|
|
2269
2309
|
const messages = useMessages();
|
|
@@ -2440,6 +2480,7 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2440
2480
|
ref_key: "rootRef",
|
|
2441
2481
|
ref: rootRef,
|
|
2442
2482
|
"data-eldra-ui": "",
|
|
2483
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
2443
2484
|
"data-part": "root",
|
|
2444
2485
|
class: normalizeClass(rootClass.value),
|
|
2445
2486
|
"aria-roledescription": "carousel",
|
|
@@ -2451,12 +2492,17 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2451
2492
|
id: unref(instructionsId),
|
|
2452
2493
|
"data-part": "instructions",
|
|
2453
2494
|
class: normalizeClass(instructionsClass.value)
|
|
2454
|
-
}, toDisplayString(unref(messages).slideInstructions), 11, _hoisted_2$
|
|
2495
|
+
}, toDisplayString(unref(messages).slideInstructions), 11, _hoisted_2$35)) : createCommentVNode("", true),
|
|
2455
2496
|
__props.controls === "header" || _ctx.$slots.header ? (openBlock(), createElementBlock("div", {
|
|
2456
2497
|
key: 1,
|
|
2498
|
+
"data-eldra-slot": unref(eldra).slotHost("header"),
|
|
2457
2499
|
"data-part": "header",
|
|
2458
2500
|
class: normalizeClass(headerClass.value)
|
|
2459
|
-
}, [renderSlot(_ctx.$slots, "header"), __props.controls === "header" ? (openBlock(), createElementBlock("div",
|
|
2501
|
+
}, [renderSlot(_ctx.$slots, "header"), __props.controls === "header" ? (openBlock(), createElementBlock("div", {
|
|
2502
|
+
key: 0,
|
|
2503
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
2504
|
+
class: "flex shrink-0 items-center gap-2"
|
|
2505
|
+
}, [
|
|
2460
2506
|
__props.counter ? (openBlock(), createElementBlock("span", {
|
|
2461
2507
|
key: 0,
|
|
2462
2508
|
"data-part": "counter",
|
|
@@ -2482,7 +2528,7 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2482
2528
|
"stroke-linejoin": "round",
|
|
2483
2529
|
"aria-hidden": "true",
|
|
2484
2530
|
focusable: "false"
|
|
2485
|
-
}, [createElementVNode("path", { d: "M15 6l-6 6l6 6" })], -1)])], 10,
|
|
2531
|
+
}, [createElementVNode("path", { d: "M15 6l-6 6l6 6" })], -1)])], 10, _hoisted_5$13),
|
|
2486
2532
|
createElementVNode("button", {
|
|
2487
2533
|
ref_key: "nextButtonRef",
|
|
2488
2534
|
ref: nextButtonRef,
|
|
@@ -2502,11 +2548,12 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2502
2548
|
"stroke-linejoin": "round",
|
|
2503
2549
|
"aria-hidden": "true",
|
|
2504
2550
|
focusable: "false"
|
|
2505
|
-
}, [createElementVNode("path", { d: "M9 6l6 6l-6 6" })], -1)])], 10,
|
|
2506
|
-
])) : createCommentVNode("", true)],
|
|
2551
|
+
}, [createElementVNode("path", { d: "M9 6l6 6l-6 6" })], -1)])], 10, _hoisted_6$9)
|
|
2552
|
+
], 8, _hoisted_4$19)) : createCommentVNode("", true)], 10, _hoisted_3$26)) : createCommentVNode("", true),
|
|
2507
2553
|
createElementVNode("div", {
|
|
2508
2554
|
ref_key: "trackRef",
|
|
2509
2555
|
ref: trackRef,
|
|
2556
|
+
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
2510
2557
|
"data-part": "track",
|
|
2511
2558
|
tabindex: unref(trackFocusable) ? 0 : void 0,
|
|
2512
2559
|
"aria-label": unref(messages).slides,
|
|
@@ -2514,8 +2561,8 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2514
2561
|
class: normalizeClass(trackClass.value),
|
|
2515
2562
|
style: normalizeStyle(trackStyle.value),
|
|
2516
2563
|
onKeydown: _cache[2] || (_cache[2] = (...args) => unref(onTrackKeydown) && unref(onTrackKeydown)(...args))
|
|
2517
|
-
}, [renderSlot(_ctx.$slots, "default")], 46,
|
|
2518
|
-
showBelowRow.value ? (openBlock(), createElementBlock("div",
|
|
2564
|
+
}, [renderSlot(_ctx.$slots, "default")], 46, _hoisted_7$8),
|
|
2565
|
+
showBelowRow.value ? (openBlock(), createElementBlock("div", _hoisted_8$4, [
|
|
2519
2566
|
showPause.value ? (openBlock(), createElementBlock("button", {
|
|
2520
2567
|
key: 0,
|
|
2521
2568
|
type: "button",
|
|
@@ -2523,7 +2570,7 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2523
2570
|
class: normalizeClass(pauseClass.value),
|
|
2524
2571
|
"aria-label": unref(playing) ? unref(messages).pause : unref(messages).play,
|
|
2525
2572
|
onClick: _cache[3] || (_cache[3] = (...args) => unref(toggle) && unref(toggle)(...args))
|
|
2526
|
-
}, toDisplayString(unref(playing) ? unref(messages).pause : unref(messages).play), 11,
|
|
2573
|
+
}, toDisplayString(unref(playing) ? unref(messages).pause : unref(messages).play), 11, _hoisted_9$4)) : (openBlock(), createElementBlock("span", _hoisted_10$1)),
|
|
2527
2574
|
__props.dots ? (openBlock(), createElementBlock("div", {
|
|
2528
2575
|
key: 2,
|
|
2529
2576
|
"data-part": "dots",
|
|
@@ -2537,9 +2584,9 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2537
2584
|
"aria-current": dotNumber - 1 === unref(index) ? "true" : void 0,
|
|
2538
2585
|
"aria-label": unref(messages).goToSlide(dotNumber),
|
|
2539
2586
|
onClick: ($event) => unref(goTo)(dotNumber - 1)
|
|
2540
|
-
}, [..._cache[8] || (_cache[8] = [createElementVNode("span", { class: "eldra-carousel-dot" }, null, -1)])], 10,
|
|
2541
|
-
}), 128))], 2)) : (openBlock(), createElementBlock("span",
|
|
2542
|
-
__props.controls === "below" ? (openBlock(), createElementBlock("div",
|
|
2587
|
+
}, [..._cache[8] || (_cache[8] = [createElementVNode("span", { class: "eldra-carousel-dot" }, null, -1)])], 10, _hoisted_11$1);
|
|
2588
|
+
}), 128))], 2)) : (openBlock(), createElementBlock("span", _hoisted_12$1)),
|
|
2589
|
+
__props.controls === "below" ? (openBlock(), createElementBlock("div", _hoisted_13, [
|
|
2543
2590
|
createElementVNode("button", {
|
|
2544
2591
|
ref_key: "prevButtonRef",
|
|
2545
2592
|
ref: prevButtonRef,
|
|
@@ -2559,7 +2606,7 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2559
2606
|
"stroke-linejoin": "round",
|
|
2560
2607
|
"aria-hidden": "true",
|
|
2561
2608
|
focusable: "false"
|
|
2562
|
-
}, [createElementVNode("path", { d: "M15 6l-6 6l6 6" })], -1)])], 10,
|
|
2609
|
+
}, [createElementVNode("path", { d: "M15 6l-6 6l6 6" })], -1)])], 10, _hoisted_14),
|
|
2563
2610
|
__props.counter ? (openBlock(), createElementBlock("span", {
|
|
2564
2611
|
key: 0,
|
|
2565
2612
|
"data-part": "counter",
|
|
@@ -2585,10 +2632,10 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2585
2632
|
"stroke-linejoin": "round",
|
|
2586
2633
|
"aria-hidden": "true",
|
|
2587
2634
|
focusable: "false"
|
|
2588
|
-
}, [createElementVNode("path", { d: "M9 6l6 6l-6 6" })], -1)])], 10,
|
|
2589
|
-
])) : (openBlock(), createElementBlock("span",
|
|
2635
|
+
}, [createElementVNode("path", { d: "M9 6l6 6l-6 6" })], -1)])], 10, _hoisted_15)
|
|
2636
|
+
])) : (openBlock(), createElementBlock("span", _hoisted_16))
|
|
2590
2637
|
])) : createCommentVNode("", true)
|
|
2591
|
-
], 10, _hoisted_1$
|
|
2638
|
+
], 10, _hoisted_1$44);
|
|
2592
2639
|
};
|
|
2593
2640
|
}
|
|
2594
2641
|
});
|
|
@@ -2596,7 +2643,10 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2596
2643
|
/** The key a `ChipGroup` provides its `ChipGroupContext` on. */
|
|
2597
2644
|
var CHIP_GROUP_KEY = Symbol("eldra-ui:chip-group");
|
|
2598
2645
|
// src/components/chip/Chip.vue?vue&type=script&setup=true&lang.ts
|
|
2599
|
-
var _hoisted_1$
|
|
2646
|
+
var _hoisted_1$43 = ["data-eldra-slot"];
|
|
2647
|
+
var _hoisted_2$34 = ["data-eldra-slot"];
|
|
2648
|
+
var _hoisted_3$25 = ["data-eldra-slot"];
|
|
2649
|
+
var _hoisted_4$18 = ["aria-label", "disabled"];
|
|
2600
2650
|
var FILL_SELECTED = "bg-primary text-primary-contrast";
|
|
2601
2651
|
var FILL_DISABLED = "bg-surface-strong text-muted cursor-not-allowed";
|
|
2602
2652
|
/** Button's own `primary` hover mix: 14% toward `background`. */
|
|
@@ -2639,6 +2689,7 @@ var Chip_default = /* @__PURE__ */ defineComponent({
|
|
|
2639
2689
|
"select"
|
|
2640
2690
|
],
|
|
2641
2691
|
setup(__props, { emit: __emit }) {
|
|
2692
|
+
const eldra = useEldraScope();
|
|
2642
2693
|
const props = __props;
|
|
2643
2694
|
const emit = __emit;
|
|
2644
2695
|
const slots = useSlots();
|
|
@@ -2823,6 +2874,7 @@ var Chip_default = /* @__PURE__ */ defineComponent({
|
|
|
2823
2874
|
return (_ctx, _cache) => {
|
|
2824
2875
|
return openBlock(), createBlock(resolveDynamicComponent(rootTag.value), {
|
|
2825
2876
|
"data-eldra-ui": "",
|
|
2877
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
2826
2878
|
"data-part": "root",
|
|
2827
2879
|
class: normalizeClass(rootClass.value),
|
|
2828
2880
|
type: isInteractiveRoot.value ? "button" : void 0,
|
|
@@ -2836,6 +2888,7 @@ var Chip_default = /* @__PURE__ */ defineComponent({
|
|
|
2836
2888
|
default: withCtx(() => [
|
|
2837
2889
|
hasAvatar.value ? (openBlock(), createElementBlock("span", {
|
|
2838
2890
|
key: 0,
|
|
2891
|
+
"data-eldra-slot": unref(eldra).slotHost("avatar"),
|
|
2839
2892
|
"data-part": "avatar",
|
|
2840
2893
|
class: normalizeClass(avatarWrapClass.value)
|
|
2841
2894
|
}, [renderSlot(_ctx.$slots, "avatar", {}, () => [createVNode(Avatar_default, {
|
|
@@ -2852,19 +2905,21 @@ var Chip_default = /* @__PURE__ */ defineComponent({
|
|
|
2852
2905
|
"src",
|
|
2853
2906
|
"name",
|
|
2854
2907
|
"classes"
|
|
2855
|
-
])])],
|
|
2908
|
+
])])], 10, _hoisted_1$43)) : hasIcon.value ? (openBlock(), createElementBlock("span", {
|
|
2856
2909
|
key: 1,
|
|
2910
|
+
"data-eldra-slot": unref(eldra).slotHost("icon"),
|
|
2857
2911
|
"data-part": "icon",
|
|
2858
2912
|
class: normalizeClass(iconWrapClass.value)
|
|
2859
2913
|
}, [renderSlot(_ctx.$slots, "icon", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon), {
|
|
2860
2914
|
"stroke-width": ICON_STROKE_WIDTH[__props.size],
|
|
2861
2915
|
"aria-hidden": "true",
|
|
2862
2916
|
focusable: "false"
|
|
2863
|
-
}, null, 8, ["stroke-width"]))])],
|
|
2917
|
+
}, null, 8, ["stroke-width"]))])], 10, _hoisted_2$34)) : createCommentVNode("", true),
|
|
2864
2918
|
createElementVNode("span", {
|
|
2919
|
+
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
2865
2920
|
"data-part": "label",
|
|
2866
2921
|
class: normalizeClass(labelClass.value)
|
|
2867
|
-
}, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])],
|
|
2922
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])], 10, _hoisted_3$25),
|
|
2868
2923
|
__props.removable ? (openBlock(), createElementBlock("button", {
|
|
2869
2924
|
key: 2,
|
|
2870
2925
|
"data-part": "removeButton",
|
|
@@ -2884,10 +2939,11 @@ var Chip_default = /* @__PURE__ */ defineComponent({
|
|
|
2884
2939
|
"stroke-linejoin": "round",
|
|
2885
2940
|
"aria-hidden": "true",
|
|
2886
2941
|
focusable: "false"
|
|
2887
|
-
}, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "M18 6l-12 12" }, null, -1), createElementVNode("path", { d: "M6 6l12 12" }, null, -1)])], 2))], 42,
|
|
2942
|
+
}, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "M18 6l-12 12" }, null, -1), createElementVNode("path", { d: "M6 6l12 12" }, null, -1)])], 2))], 42, _hoisted_4$18)) : createCommentVNode("", true)
|
|
2888
2943
|
]),
|
|
2889
2944
|
_: 3
|
|
2890
2945
|
}, 40, [
|
|
2946
|
+
"data-eldra-scope",
|
|
2891
2947
|
"class",
|
|
2892
2948
|
"type",
|
|
2893
2949
|
"disabled",
|
|
@@ -2899,7 +2955,12 @@ var Chip_default = /* @__PURE__ */ defineComponent({
|
|
|
2899
2955
|
}
|
|
2900
2956
|
});
|
|
2901
2957
|
// src/components/chip/ChipGroup.vue?vue&type=script&setup=true&lang.ts
|
|
2902
|
-
var _hoisted_1$
|
|
2958
|
+
var _hoisted_1$42 = [
|
|
2959
|
+
"data-eldra-slot",
|
|
2960
|
+
"data-eldra-scope",
|
|
2961
|
+
"aria-label",
|
|
2962
|
+
"aria-disabled"
|
|
2963
|
+
];
|
|
2903
2964
|
// src/components/chip/ChipGroup.vue
|
|
2904
2965
|
var ChipGroup_default = /* @__PURE__ */ defineComponent({
|
|
2905
2966
|
__name: "ChipGroup",
|
|
@@ -2914,6 +2975,7 @@ var ChipGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
2914
2975
|
},
|
|
2915
2976
|
emits: ["update:modelValue"],
|
|
2916
2977
|
setup(__props, { emit: __emit }) {
|
|
2978
|
+
const eldra = useEldraScope();
|
|
2917
2979
|
const props = __props;
|
|
2918
2980
|
const emit = __emit;
|
|
2919
2981
|
function isSelected(value) {
|
|
@@ -2948,13 +3010,15 @@ var ChipGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
2948
3010
|
const rootClass = computed(() => partClass(cx("flex flex-wrap gap-2"), props.classes, "root"));
|
|
2949
3011
|
return (_ctx, _cache) => {
|
|
2950
3012
|
return openBlock(), createElementBlock("div", {
|
|
3013
|
+
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
2951
3014
|
"data-eldra-ui": "",
|
|
3015
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
2952
3016
|
"data-part": "root",
|
|
2953
3017
|
role: "group",
|
|
2954
3018
|
"aria-label": __props.ariaLabel,
|
|
2955
3019
|
"aria-disabled": __props.disabled ? "true" : void 0,
|
|
2956
3020
|
class: normalizeClass(rootClass.value)
|
|
2957
|
-
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$
|
|
3021
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$42);
|
|
2958
3022
|
};
|
|
2959
3023
|
}
|
|
2960
3024
|
});
|
|
@@ -2969,6 +3033,7 @@ var Container_default = /* @__PURE__ */ defineComponent({
|
|
|
2969
3033
|
as: { default: "div" }
|
|
2970
3034
|
},
|
|
2971
3035
|
setup(__props) {
|
|
3036
|
+
const eldra = useEldraScope();
|
|
2972
3037
|
const props = __props;
|
|
2973
3038
|
/**
|
|
2974
3039
|
* Spec "Container and section" → Sizes: the three finite widths cap the box at the token value —
|
|
@@ -3004,13 +3069,19 @@ var Container_default = /* @__PURE__ */ defineComponent({
|
|
|
3004
3069
|
const rootClass = computed(() => partClass(cx("mx-auto w-full", WIDTH[props.width], props.width === "full" ? "" : GUTTER), props.classes, "root"));
|
|
3005
3070
|
return (_ctx, _cache) => {
|
|
3006
3071
|
return openBlock(), createBlock(resolveDynamicComponent(__props.as), {
|
|
3072
|
+
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
3007
3073
|
"data-eldra-ui": "",
|
|
3074
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
3008
3075
|
"data-part": "root",
|
|
3009
3076
|
class: normalizeClass(rootClass.value)
|
|
3010
3077
|
}, {
|
|
3011
3078
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
3012
3079
|
_: 3
|
|
3013
|
-
}, 8, [
|
|
3080
|
+
}, 8, [
|
|
3081
|
+
"data-eldra-slot",
|
|
3082
|
+
"data-eldra-scope",
|
|
3083
|
+
"class"
|
|
3084
|
+
]);
|
|
3014
3085
|
};
|
|
3015
3086
|
}
|
|
3016
3087
|
});
|
|
@@ -3141,12 +3212,12 @@ function zoomEntry(entry, zoom) {
|
|
|
3141
3212
|
return `${entry.slice(0, start)}calc(${entry.slice(start)} * ${zoom})`;
|
|
3142
3213
|
}
|
|
3143
3214
|
// src/components/image/Image.vue?vue&type=script&setup=true&lang.ts
|
|
3144
|
-
var _hoisted_1$
|
|
3215
|
+
var _hoisted_1$41 = [
|
|
3145
3216
|
"src",
|
|
3146
3217
|
"width",
|
|
3147
3218
|
"height"
|
|
3148
3219
|
];
|
|
3149
|
-
var _hoisted_2$
|
|
3220
|
+
var _hoisted_2$33 = [
|
|
3150
3221
|
"src",
|
|
3151
3222
|
"srcset",
|
|
3152
3223
|
"sizes",
|
|
@@ -3156,12 +3227,12 @@ var _hoisted_2$22 = [
|
|
|
3156
3227
|
"loading",
|
|
3157
3228
|
"fetchpriority"
|
|
3158
3229
|
];
|
|
3159
|
-
var _hoisted_3$
|
|
3230
|
+
var _hoisted_3$24 = [
|
|
3160
3231
|
"role",
|
|
3161
3232
|
"aria-hidden",
|
|
3162
3233
|
"aria-label"
|
|
3163
3234
|
];
|
|
3164
|
-
var _hoisted_4$
|
|
3235
|
+
var _hoisted_4$17 = { "aria-hidden": "true" };
|
|
3165
3236
|
// src/components/image/Image.vue
|
|
3166
3237
|
var Image_default = /* @__PURE__ */ defineComponent({
|
|
3167
3238
|
inheritAttrs: false,
|
|
@@ -3196,6 +3267,7 @@ var Image_default = /* @__PURE__ */ defineComponent({
|
|
|
3196
3267
|
classes: { default: void 0 }
|
|
3197
3268
|
},
|
|
3198
3269
|
setup(__props) {
|
|
3270
|
+
const eldra = useEldraScope();
|
|
3199
3271
|
const props = __props;
|
|
3200
3272
|
const messages = useMessages();
|
|
3201
3273
|
/**
|
|
@@ -3308,6 +3380,7 @@ var Image_default = /* @__PURE__ */ defineComponent({
|
|
|
3308
3380
|
return (_ctx, _cache) => {
|
|
3309
3381
|
return openBlock(), createBlock(resolveDynamicComponent(hasCaption.value ? "figure" : "div"), {
|
|
3310
3382
|
"data-eldra-ui": "",
|
|
3383
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
3311
3384
|
"data-part": "root",
|
|
3312
3385
|
"data-eldra-image-crops": cropScope.value,
|
|
3313
3386
|
class: normalizeClass(rootClass.value),
|
|
@@ -3338,7 +3411,7 @@ var Image_default = /* @__PURE__ */ defineComponent({
|
|
|
3338
3411
|
playsinline: "",
|
|
3339
3412
|
width: __props.media.width,
|
|
3340
3413
|
height: __props.media.height
|
|
3341
|
-
}), toDisplayString(resolvedAlt.value), 17, _hoisted_1$
|
|
3414
|
+
}), toDisplayString(resolvedAlt.value), 17, _hoisted_1$41)) : __props.media ? (openBlock(), createElementBlock("img", mergeProps({
|
|
3342
3415
|
key: 2,
|
|
3343
3416
|
"data-part": "media",
|
|
3344
3417
|
class: mediaClass.value,
|
|
@@ -3353,7 +3426,7 @@ var Image_default = /* @__PURE__ */ defineComponent({
|
|
|
3353
3426
|
loading: loadingAttr.value,
|
|
3354
3427
|
decoding: "async",
|
|
3355
3428
|
fetchpriority: fetchPriority.value
|
|
3356
|
-
}), null, 16, _hoisted_2$
|
|
3429
|
+
}), null, 16, _hoisted_2$33)) : (openBlock(), createElementBlock("div", {
|
|
3357
3430
|
key: 3,
|
|
3358
3431
|
"data-part": "placeholder",
|
|
3359
3432
|
class: normalizeClass(placeholderClass.value),
|
|
@@ -3385,7 +3458,7 @@ var Image_default = /* @__PURE__ */ defineComponent({
|
|
|
3385
3458
|
}),
|
|
3386
3459
|
createElementVNode("path", { d: "M3 17l5.5 -5.5c.83 -.83 1.67 -.83 2.5 0l7 7" }),
|
|
3387
3460
|
createElementVNode("path", { d: "M14 15l1.5 -1.5c.83 -.83 1.67 -.83 2.5 0l3 3" })
|
|
3388
|
-
], -1)), createElementVNode("span", _hoisted_4$
|
|
3461
|
+
], -1)), createElementVNode("span", _hoisted_4$17, toDisplayString(unref(messages).noImage), 1)], 10, _hoisted_3$24))], 6),
|
|
3389
3462
|
hasCaption.value ? (openBlock(), createElementBlock("figcaption", {
|
|
3390
3463
|
key: 1,
|
|
3391
3464
|
"data-part": "caption",
|
|
@@ -3394,6 +3467,7 @@ var Image_default = /* @__PURE__ */ defineComponent({
|
|
|
3394
3467
|
]),
|
|
3395
3468
|
_: 1
|
|
3396
3469
|
}, 8, [
|
|
3470
|
+
"data-eldra-scope",
|
|
3397
3471
|
"data-eldra-image-crops",
|
|
3398
3472
|
"class",
|
|
3399
3473
|
"style"
|
|
@@ -3402,6 +3476,7 @@ var Image_default = /* @__PURE__ */ defineComponent({
|
|
|
3402
3476
|
}
|
|
3403
3477
|
});
|
|
3404
3478
|
// src/components/skeleton/Skeleton.vue?vue&type=script&setup=true&lang.ts
|
|
3479
|
+
var _hoisted_1$40 = ["data-eldra-scope"];
|
|
3405
3480
|
var TITLE_WIDTH_CLASS = "w-[60%]";
|
|
3406
3481
|
var PART = "line";
|
|
3407
3482
|
// src/components/skeleton/Skeleton.vue
|
|
@@ -3417,6 +3492,7 @@ var Skeleton_default = /* @__PURE__ */ defineComponent({
|
|
|
3417
3492
|
classes: { default: void 0 }
|
|
3418
3493
|
},
|
|
3419
3494
|
setup(__props) {
|
|
3495
|
+
const eldra = useEldraScope();
|
|
3420
3496
|
const props = __props;
|
|
3421
3497
|
/** See `SkeletonProps.busyLabel`'s own comment. */
|
|
3422
3498
|
const hasBusyLabel = computed(() => props.busyLabel !== void 0 && props.busyLabel !== null && props.busyLabel !== "");
|
|
@@ -3504,6 +3580,7 @@ var Skeleton_default = /* @__PURE__ */ defineComponent({
|
|
|
3504
3580
|
return (_ctx, _cache) => {
|
|
3505
3581
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
3506
3582
|
"data-eldra-ui": "",
|
|
3583
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
3507
3584
|
"data-part": "root",
|
|
3508
3585
|
class: rootClass.value,
|
|
3509
3586
|
style: rootStyle.value
|
|
@@ -3515,7 +3592,7 @@ var Skeleton_default = /* @__PURE__ */ defineComponent({
|
|
|
3515
3592
|
style: normalizeStyle(line.style),
|
|
3516
3593
|
"aria-hidden": "true"
|
|
3517
3594
|
}, null, 6);
|
|
3518
|
-
}), 128))], 16);
|
|
3595
|
+
}), 128))], 16, _hoisted_1$40);
|
|
3519
3596
|
};
|
|
3520
3597
|
}
|
|
3521
3598
|
});
|
|
@@ -3581,9 +3658,15 @@ var CUE_ARROW_PATHS = [
|
|
|
3581
3658
|
"M13 6l6 6"
|
|
3582
3659
|
];
|
|
3583
3660
|
// src/components/card/ContentCard.vue?vue&type=script&setup=true&lang.ts
|
|
3584
|
-
var _hoisted_1$
|
|
3585
|
-
var _hoisted_2$
|
|
3586
|
-
var _hoisted_3$
|
|
3661
|
+
var _hoisted_1$39 = ["data-eldra-scope", "aria-label"];
|
|
3662
|
+
var _hoisted_2$32 = ["data-eldra-scope"];
|
|
3663
|
+
var _hoisted_3$23 = ["data-eldra-slot"];
|
|
3664
|
+
var _hoisted_4$16 = ["data-eldra-slot"];
|
|
3665
|
+
var _hoisted_5$12 = ["data-eldra-slot"];
|
|
3666
|
+
var _hoisted_6$8 = ["datetime"];
|
|
3667
|
+
var _hoisted_7$7 = ["data-eldra-slot"];
|
|
3668
|
+
var _hoisted_8$3 = ["data-eldra-scope"];
|
|
3669
|
+
var _hoisted_9$3 = ["d"];
|
|
3587
3670
|
// src/components/card/ContentCard.vue
|
|
3588
3671
|
var ContentCard_default = /* @__PURE__ */ defineComponent({
|
|
3589
3672
|
__name: "ContentCard",
|
|
@@ -3608,6 +3691,7 @@ var ContentCard_default = /* @__PURE__ */ defineComponent({
|
|
|
3608
3691
|
classes: { default: void 0 }
|
|
3609
3692
|
},
|
|
3610
3693
|
setup(__props) {
|
|
3694
|
+
const eldra = useEldraScope();
|
|
3611
3695
|
const props = __props;
|
|
3612
3696
|
const messages = useMessages();
|
|
3613
3697
|
const slots = useSlots();
|
|
@@ -3734,6 +3818,7 @@ var ContentCard_default = /* @__PURE__ */ defineComponent({
|
|
|
3734
3818
|
return __props.loading ? (openBlock(), createElementBlock("div", {
|
|
3735
3819
|
key: 0,
|
|
3736
3820
|
"data-eldra-ui": "",
|
|
3821
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
3737
3822
|
"data-part": "root",
|
|
3738
3823
|
class: normalizeClass(rootClass.value),
|
|
3739
3824
|
role: "group",
|
|
@@ -3752,9 +3837,10 @@ var ContentCard_default = /* @__PURE__ */ defineComponent({
|
|
|
3752
3837
|
}, [createVNode(Skeleton_default, {
|
|
3753
3838
|
variant: "text",
|
|
3754
3839
|
lines: 3
|
|
3755
|
-
})], 2)], 10, _hoisted_1$
|
|
3840
|
+
})], 2)], 10, _hoisted_1$39)) : (openBlock(), createElementBlock("article", {
|
|
3756
3841
|
key: 1,
|
|
3757
3842
|
"data-eldra-ui": "",
|
|
3843
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
3758
3844
|
"data-part": "root",
|
|
3759
3845
|
class: normalizeClass(rootClass.value)
|
|
3760
3846
|
}, [hasImage.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -3771,45 +3857,51 @@ var ContentCard_default = /* @__PURE__ */ defineComponent({
|
|
|
3771
3857
|
}, [
|
|
3772
3858
|
hasEyebrow.value ? (openBlock(), createElementBlock("p", {
|
|
3773
3859
|
key: 0,
|
|
3860
|
+
"data-eldra-slot": unref(eldra).slotHost("eyebrow"),
|
|
3774
3861
|
"data-part": "eyebrow",
|
|
3775
3862
|
class: normalizeClass(eyebrowClass.value)
|
|
3776
|
-
}, [renderSlot(_ctx.$slots, "eyebrow", {}, () => [createTextVNode(toDisplayString(__props.eyebrow), 1)])],
|
|
3863
|
+
}, [renderSlot(_ctx.$slots, "eyebrow", {}, () => [createTextVNode(toDisplayString(__props.eyebrow), 1)])], 10, _hoisted_3$23)) : createCommentVNode("", true),
|
|
3777
3864
|
(openBlock(), createBlock(resolveDynamicComponent(unref(headingTag)), {
|
|
3778
3865
|
"data-part": "title",
|
|
3779
3866
|
class: normalizeClass(titleClass.value)
|
|
3780
3867
|
}, {
|
|
3781
3868
|
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(titleTag.value), mergeProps({
|
|
3869
|
+
"data-eldra-slot": unref(eldra).slotHost("title"),
|
|
3782
3870
|
"data-part": "titleLink",
|
|
3783
3871
|
class: titleLinkClass.value
|
|
3784
3872
|
}, titleAttrs.value), {
|
|
3785
3873
|
default: withCtx(() => [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])]),
|
|
3786
3874
|
_: 3
|
|
3787
|
-
}, 16, ["class"]))]),
|
|
3875
|
+
}, 16, ["data-eldra-slot", "class"]))]),
|
|
3788
3876
|
_: 3
|
|
3789
3877
|
}, 8, ["class"])),
|
|
3790
3878
|
hasExcerpt.value ? (openBlock(), createElementBlock("p", {
|
|
3791
3879
|
key: 1,
|
|
3880
|
+
"data-eldra-slot": unref(eldra).slotHost("excerpt"),
|
|
3792
3881
|
"data-part": "excerpt",
|
|
3793
3882
|
class: normalizeClass(excerptClass.value)
|
|
3794
|
-
}, [renderSlot(_ctx.$slots, "excerpt", {}, () => [createTextVNode(toDisplayString(__props.excerpt), 1)])],
|
|
3883
|
+
}, [renderSlot(_ctx.$slots, "excerpt", {}, () => [createTextVNode(toDisplayString(__props.excerpt), 1)])], 10, _hoisted_4$16)) : createCommentVNode("", true),
|
|
3795
3884
|
hasMetaLine.value ? (openBlock(), createElementBlock("p", {
|
|
3796
3885
|
key: 2,
|
|
3886
|
+
"data-eldra-slot": unref(eldra).slotHost("meta"),
|
|
3797
3887
|
"data-part": "meta",
|
|
3798
3888
|
class: normalizeClass(metaClass.value)
|
|
3799
3889
|
}, [renderSlot(_ctx.$slots, "meta", {}, () => [
|
|
3800
3890
|
formattedDate.value ? (openBlock(), createElementBlock("time", {
|
|
3801
3891
|
key: 0,
|
|
3802
3892
|
datetime: __props.date
|
|
3803
|
-
}, toDisplayString(formattedDate.value), 9,
|
|
3893
|
+
}, toDisplayString(formattedDate.value), 9, _hoisted_6$8)) : createCommentVNode("", true),
|
|
3804
3894
|
formattedDate.value && __props.meta ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(" · ")], 64)) : createCommentVNode("", true),
|
|
3805
3895
|
__props.meta ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(__props.meta), 1)], 64)) : createCommentVNode("", true)
|
|
3806
|
-
])],
|
|
3896
|
+
])], 10, _hoisted_5$12)) : createCommentVNode("", true),
|
|
3807
3897
|
showCue.value ? (openBlock(), createElementBlock("span", {
|
|
3808
3898
|
key: 3,
|
|
3899
|
+
"data-eldra-slot": unref(eldra).slotHost("cue"),
|
|
3809
3900
|
"data-part": "cue",
|
|
3810
3901
|
class: normalizeClass(cueClass.value),
|
|
3811
3902
|
"aria-hidden": "true"
|
|
3812
3903
|
}, [renderSlot(_ctx.$slots, "cue", {}, () => [createTextVNode(toDisplayString(__props.cue), 1)]), (openBlock(), createElementBlock("svg", {
|
|
3904
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
3813
3905
|
class: normalizeClass(unref(arrowClass)),
|
|
3814
3906
|
viewBox: "0 0 24 24",
|
|
3815
3907
|
fill: "none",
|
|
@@ -3823,9 +3915,9 @@ var ContentCard_default = /* @__PURE__ */ defineComponent({
|
|
|
3823
3915
|
return openBlock(), createElementBlock("path", {
|
|
3824
3916
|
key: d,
|
|
3825
3917
|
d
|
|
3826
|
-
}, null, 8,
|
|
3827
|
-
}), 128))],
|
|
3828
|
-
], 2)],
|
|
3918
|
+
}, null, 8, _hoisted_9$3);
|
|
3919
|
+
}), 128))], 10, _hoisted_8$3))], 10, _hoisted_7$7)) : createCommentVNode("", true)
|
|
3920
|
+
], 2)], 10, _hoisted_2$32));
|
|
3829
3921
|
};
|
|
3830
3922
|
}
|
|
3831
3923
|
});
|
|
@@ -3996,9 +4088,11 @@ function firstMeaningfulControl(root) {
|
|
|
3996
4088
|
* rule: "`Esc` … always closes it") — but only while this dialog is the top of the stack; a lower
|
|
3997
4089
|
* one ignores it outright (`preventDefault()`ed, so even the platform's own default action cannot
|
|
3998
4090
|
* close it). `onCancel` is a notification, not a guard — it cannot prevent the close, matching
|
|
3999
|
-
* the interface below (`() => void`, nothing to call `preventDefault()` on).
|
|
4091
|
+
* the interface below (`() => void`, nothing to call `preventDefault()` on). The one opt-out is
|
|
4092
|
+
* `closeOnEscape: false`, which ignores `Esc` the same way (no `onCancel`, no close).
|
|
4000
4093
|
* - **Backdrop click**: a `click` whose `target` is the `<dialog>` element itself — not a
|
|
4001
|
-
* descendant, which stops the target at that descendant
|
|
4094
|
+
* descendant, which stops the target at that descendant, and not a press that began inside the
|
|
4095
|
+
* panel and was released on the backdrop — closes it when `dismissable` is `true`
|
|
4002
4096
|
* (default) **and** this dialog is the top of the stack; a lower dialog's own backdrop click
|
|
4003
4097
|
* (unreachable in a real browser, where the topmost modal's full-viewport surface covers it, but
|
|
4004
4098
|
* reachable from a test dispatching the event directly) does nothing. `dismissable` is read on
|
|
@@ -4020,6 +4114,7 @@ function firstMeaningfulControl(root) {
|
|
|
4020
4114
|
function useDialog(options) {
|
|
4021
4115
|
const { open, setOpen, dialog } = options;
|
|
4022
4116
|
const dismissable = () => toValue(options.dismissable) ?? true;
|
|
4117
|
+
const closeOnEscape = () => toValue(options.closeOnEscape) ?? true;
|
|
4023
4118
|
/** Whatever had focus right before this dialog opened. Restored once it actually closes. */
|
|
4024
4119
|
let opener = null;
|
|
4025
4120
|
function focusInitial() {
|
|
@@ -4058,6 +4153,10 @@ function useDialog(options) {
|
|
|
4058
4153
|
event.preventDefault();
|
|
4059
4154
|
return;
|
|
4060
4155
|
}
|
|
4156
|
+
if (!closeOnEscape()) {
|
|
4157
|
+
event.preventDefault();
|
|
4158
|
+
return;
|
|
4159
|
+
}
|
|
4061
4160
|
options.onCancel?.();
|
|
4062
4161
|
close("escape");
|
|
4063
4162
|
}
|
|
@@ -4068,20 +4167,40 @@ function useDialog(options) {
|
|
|
4068
4167
|
opener?.focus();
|
|
4069
4168
|
opener = null;
|
|
4070
4169
|
}
|
|
4170
|
+
function onNativeKeydown(event) {
|
|
4171
|
+
if (event.key === "Escape" && !closeOnEscape()) event.preventDefault();
|
|
4172
|
+
}
|
|
4173
|
+
/**
|
|
4174
|
+
* Where the last press began: `true` on the backdrop, `false` inside the panel, `null` when no
|
|
4175
|
+
* press was seen (a click dispatched from code). A press that starts inside the panel and is
|
|
4176
|
+
* released on the backdrop (selecting text, dragging) fires its `click` on the `<dialog>` too,
|
|
4177
|
+
* and must not close it.
|
|
4178
|
+
*/
|
|
4179
|
+
let pressOnBackdrop = null;
|
|
4180
|
+
function onNativePointerdown(event) {
|
|
4181
|
+
pressOnBackdrop = event.target === dialog.value;
|
|
4182
|
+
}
|
|
4071
4183
|
function onNativeClick(event) {
|
|
4072
4184
|
const el = dialog.value;
|
|
4185
|
+
const pressedOnBackdrop = pressOnBackdrop;
|
|
4186
|
+
pressOnBackdrop = null;
|
|
4073
4187
|
if (el === null || event.target !== el || !dismissable() || !isOpenDialog(el)) return;
|
|
4188
|
+
if (pressedOnBackdrop === false) return;
|
|
4074
4189
|
close("backdrop");
|
|
4075
4190
|
}
|
|
4076
4191
|
function attach(el) {
|
|
4077
4192
|
el.addEventListener("cancel", onNativeCancel);
|
|
4078
4193
|
el.addEventListener("close", onNativeClose);
|
|
4194
|
+
el.addEventListener("pointerdown", onNativePointerdown);
|
|
4079
4195
|
el.addEventListener("click", onNativeClick);
|
|
4196
|
+
el.addEventListener("keydown", onNativeKeydown);
|
|
4080
4197
|
}
|
|
4081
4198
|
function detach(el) {
|
|
4082
4199
|
el.removeEventListener("cancel", onNativeCancel);
|
|
4083
4200
|
el.removeEventListener("close", onNativeClose);
|
|
4201
|
+
el.removeEventListener("pointerdown", onNativePointerdown);
|
|
4084
4202
|
el.removeEventListener("click", onNativeClick);
|
|
4203
|
+
el.removeEventListener("keydown", onNativeKeydown);
|
|
4085
4204
|
}
|
|
4086
4205
|
function sync(value) {
|
|
4087
4206
|
if (value) show();
|
|
@@ -4105,10 +4224,17 @@ function useDialog(options) {
|
|
|
4105
4224
|
};
|
|
4106
4225
|
}
|
|
4107
4226
|
// src/components/dialog/Dialog.vue?vue&type=script&setup=true&lang.ts
|
|
4108
|
-
var _hoisted_1$
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4227
|
+
var _hoisted_1$38 = [
|
|
4228
|
+
"data-eldra-scope",
|
|
4229
|
+
"aria-labelledby",
|
|
4230
|
+
"aria-describedby"
|
|
4231
|
+
];
|
|
4232
|
+
var _hoisted_2$31 = ["data-eldra-slot", "id"];
|
|
4233
|
+
var _hoisted_3$22 = ["id"];
|
|
4234
|
+
var _hoisted_4$15 = ["aria-label"];
|
|
4235
|
+
var _hoisted_5$11 = ["data-eldra-slot"];
|
|
4236
|
+
var _hoisted_6$7 = ["data-eldra-scope", "id"];
|
|
4237
|
+
var _hoisted_7$6 = ["data-eldra-slot"];
|
|
4112
4238
|
// src/components/dialog/Dialog.vue
|
|
4113
4239
|
var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
4114
4240
|
__name: "Dialog",
|
|
@@ -4117,13 +4243,21 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
4117
4243
|
type: Boolean,
|
|
4118
4244
|
default: void 0
|
|
4119
4245
|
},
|
|
4120
|
-
title: {},
|
|
4246
|
+
title: { default: void 0 },
|
|
4121
4247
|
description: { default: void 0 },
|
|
4122
4248
|
size: { default: "md" },
|
|
4123
4249
|
dismissable: {
|
|
4124
4250
|
type: Boolean,
|
|
4125
4251
|
default: true
|
|
4126
4252
|
},
|
|
4253
|
+
closeButton: {
|
|
4254
|
+
type: Boolean,
|
|
4255
|
+
default: true
|
|
4256
|
+
},
|
|
4257
|
+
closeOnEscape: {
|
|
4258
|
+
type: Boolean,
|
|
4259
|
+
default: true
|
|
4260
|
+
},
|
|
4127
4261
|
messages: { default: void 0 },
|
|
4128
4262
|
classes: { default: void 0 }
|
|
4129
4263
|
},
|
|
@@ -4143,6 +4277,7 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
4143
4277
|
* the full contract. This file only draws the anatomy and wires the three events a consumer needs
|
|
4144
4278
|
* (`update:modelValue`, `cancel`, `close`).
|
|
4145
4279
|
*/
|
|
4280
|
+
const eldra = useEldraScope();
|
|
4146
4281
|
const props = __props;
|
|
4147
4282
|
const emit = __emit;
|
|
4148
4283
|
const slots = useSlots();
|
|
@@ -4160,6 +4295,7 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
4160
4295
|
},
|
|
4161
4296
|
dialog: dialogEl,
|
|
4162
4297
|
dismissable: () => props.dismissable,
|
|
4298
|
+
closeOnEscape: () => props.closeOnEscape,
|
|
4163
4299
|
onCancel: () => emit("cancel")
|
|
4164
4300
|
});
|
|
4165
4301
|
/**
|
|
@@ -4184,7 +4320,7 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
4184
4320
|
close,
|
|
4185
4321
|
isTop
|
|
4186
4322
|
});
|
|
4187
|
-
const rootClass = computed(() => partClass(cx("hidden open:block m-auto border-0 bg-transparent p-0 text-text", "backdrop:bg-overlay focus:outline-none", "animate-eldra-dialog-in motion-reduce:animate-eldra-dialog-in-reduced"), props.classes, "root"));
|
|
4323
|
+
const rootClass = computed(() => partClass(cx("hidden open:block m-auto border-0 bg-transparent p-0", "text-[color:var(--eldra-dialog-text,var(--color-text))]", "backdrop:bg-[var(--eldra-dialog-backdrop,var(--color-overlay))] focus:outline-none", "animate-eldra-dialog-in motion-reduce:animate-eldra-dialog-in-reduced"), props.classes, "root"));
|
|
4188
4324
|
/**
|
|
4189
4325
|
* The visible box (spec "Dialog" → Sizes): the `<dialog>` itself stays transparent and unsized
|
|
4190
4326
|
* above, so this inner flex column carries the border/shadow/radius and the width/max-height
|
|
@@ -4192,9 +4328,11 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
4192
4328
|
* whole dialog past the viewport (`header`/`footer` are `shrink-0`, `body` alone is `flex-1
|
|
4193
4329
|
* overflow-y-auto`).
|
|
4194
4330
|
*/
|
|
4195
|
-
const panelClass = computed(() => partClass(cx("flex flex-col overflow-hidden rounded-lg border border-border bg-background
|
|
4196
|
-
const
|
|
4197
|
-
const
|
|
4331
|
+
const panelClass = computed(() => partClass(cx("flex flex-col overflow-hidden rounded-lg border shadow-md", "border-[color:var(--eldra-dialog-border,var(--color-border))]", "bg-[var(--eldra-dialog-background,var(--color-background))]", props.size === "sm" ? "eldra-dialog-width-sm" : "eldra-dialog-width", "eldra-dialog-max-height"), props.classes, "panel"));
|
|
4332
|
+
const hasTitle = computed(() => props.title !== void 0 || slots.title !== void 0);
|
|
4333
|
+
const hasHeader = computed(() => hasTitle.value || props.closeButton);
|
|
4334
|
+
const headerClass = computed(() => partClass(hasTitle.value ? "flex shrink-0 items-start justify-between gap-4 p-6 pb-0" : "flex shrink-0 items-start justify-end gap-4 p-6 pb-0", props.classes, "header"));
|
|
4335
|
+
const titleClass = computed(() => partClass(cx("min-w-0 text-dialog-title text-[color:var(--eldra-dialog-text,var(--color-text))]", slots.title !== void 0 && "flex-1"), props.classes, "title"));
|
|
4198
4336
|
/**
|
|
4199
4337
|
* Spec "Dialog" → States: rest transparent, hover `text` at 6% over the panel, active 11% and
|
|
4200
4338
|
* "moves down 1px". The 1px move is the same literal `Button`'s own press state replaced with a 2%
|
|
@@ -4206,32 +4344,42 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
4206
4344
|
* `src/styles/tailwind.css` and `src/__tests__/focus-transition.spec.ts`), so adding one here would
|
|
4207
4345
|
* fail that guard for no visual gain.
|
|
4208
4346
|
*/
|
|
4209
|
-
const closeClass = computed(() => partClass(cx("-m-1 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-sm", "text-text eldra-focus", "hover:bg-[color-mix(in_oklab,var(--eldra-color-text),transparent_94%)]", "active:scale-[0.98] active:bg-[color-mix(in_oklab,var(--eldra-color-text),transparent_89%)]"), props.classes, "close"));
|
|
4210
|
-
const bodyClass = computed(() => partClass("min-h-0 flex-1 overflow-y-auto px-6 py-4", props.classes, "body"));
|
|
4211
|
-
const descriptionClass = computed(() => partClass("text-body text-muted", props.classes, "description"));
|
|
4347
|
+
const closeClass = computed(() => partClass(cx("-m-1 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-sm", "text-[color:var(--eldra-dialog-text,var(--color-text))] eldra-focus", "hover:bg-[color-mix(in_oklab,var(--eldra-dialog-text,var(--eldra-color-text)),transparent_94%)]", "active:scale-[0.98]", "active:bg-[color-mix(in_oklab,var(--eldra-dialog-text,var(--eldra-color-text)),transparent_89%)]"), props.classes, "close"));
|
|
4348
|
+
const bodyClass = computed(() => partClass(cx("min-h-0 flex-1 overflow-y-auto px-6 py-4", !hasHeader.value && "pt-6"), props.classes, "body"));
|
|
4349
|
+
const descriptionClass = computed(() => partClass("text-body text-[color:var(--eldra-dialog-muted,var(--color-muted))]", props.classes, "description"));
|
|
4212
4350
|
const footerClass = computed(() => partClass("flex shrink-0 flex-wrap items-center justify-end gap-3 px-6 pt-4 pb-6", props.classes, "footer"));
|
|
4213
4351
|
return (_ctx, _cache) => {
|
|
4214
4352
|
return openBlock(), createElementBlock("dialog", {
|
|
4215
4353
|
ref_key: "dialogEl",
|
|
4216
4354
|
ref: dialogEl,
|
|
4217
4355
|
"data-eldra-ui": "",
|
|
4356
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
4218
4357
|
"data-part": "root",
|
|
4219
4358
|
class: normalizeClass(rootClass.value),
|
|
4220
|
-
"aria-labelledby": unref(titleId),
|
|
4359
|
+
"aria-labelledby": hasTitle.value ? unref(titleId) : void 0,
|
|
4221
4360
|
"aria-describedby": __props.description ? unref(descriptionId) : void 0,
|
|
4222
4361
|
onClose: onNativeClose
|
|
4223
4362
|
}, [createElementVNode("div", {
|
|
4224
4363
|
"data-part": "panel",
|
|
4225
4364
|
class: normalizeClass(panelClass.value)
|
|
4226
4365
|
}, [
|
|
4227
|
-
|
|
4366
|
+
hasHeader.value ? (openBlock(), createElementBlock("div", {
|
|
4367
|
+
key: 0,
|
|
4228
4368
|
"data-part": "header",
|
|
4229
4369
|
class: normalizeClass(headerClass.value)
|
|
4230
|
-
}, [
|
|
4370
|
+
}, [slots.title ? (openBlock(), createElementBlock("div", {
|
|
4371
|
+
key: 0,
|
|
4372
|
+
"data-eldra-slot": unref(eldra).slotHost("title"),
|
|
4231
4373
|
id: unref(titleId),
|
|
4232
4374
|
"data-part": "title",
|
|
4233
4375
|
class: normalizeClass(titleClass.value)
|
|
4234
|
-
},
|
|
4376
|
+
}, [renderSlot(_ctx.$slots, "title")], 10, _hoisted_2$31)) : __props.title !== void 0 ? (openBlock(), createElementBlock("h2", {
|
|
4377
|
+
key: 1,
|
|
4378
|
+
id: unref(titleId),
|
|
4379
|
+
"data-part": "title",
|
|
4380
|
+
class: normalizeClass(titleClass.value)
|
|
4381
|
+
}, toDisplayString(__props.title), 11, _hoisted_3$22)) : createCommentVNode("", true), __props.closeButton ? (openBlock(), createElementBlock("button", {
|
|
4382
|
+
key: 2,
|
|
4235
4383
|
type: "button",
|
|
4236
4384
|
"data-part": "close",
|
|
4237
4385
|
class: normalizeClass(closeClass.value),
|
|
@@ -4247,29 +4395,39 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
4247
4395
|
"stroke-linejoin": "round",
|
|
4248
4396
|
"aria-hidden": "true",
|
|
4249
4397
|
focusable: "false"
|
|
4250
|
-
}, [createElementVNode("path", { d: "M18 6l-12 12" }), createElementVNode("path", { d: "M6 6l12 12" })], -1)])], 10,
|
|
4398
|
+
}, [createElementVNode("path", { d: "M18 6l-12 12" }), createElementVNode("path", { d: "M6 6l12 12" })], -1)])], 10, _hoisted_4$15)) : createCommentVNode("", true)], 2)) : createCommentVNode("", true),
|
|
4251
4399
|
createElementVNode("div", {
|
|
4400
|
+
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
4252
4401
|
"data-part": "body",
|
|
4253
4402
|
class: normalizeClass(bodyClass.value)
|
|
4254
4403
|
}, [__props.description ? (openBlock(), createElementBlock("p", {
|
|
4255
4404
|
key: 0,
|
|
4405
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
4256
4406
|
id: unref(descriptionId),
|
|
4257
4407
|
"data-part": "description",
|
|
4258
4408
|
class: normalizeClass(descriptionClass.value)
|
|
4259
|
-
}, toDisplayString(__props.description), 11,
|
|
4260
|
-
|
|
4261
|
-
key:
|
|
4409
|
+
}, toDisplayString(__props.description), 11, _hoisted_6$7)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default")], 10, _hoisted_5$11),
|
|
4410
|
+
slots.footer ? (openBlock(), createElementBlock("div", {
|
|
4411
|
+
key: 1,
|
|
4412
|
+
"data-eldra-slot": unref(eldra).slotHost("footer"),
|
|
4262
4413
|
"data-part": "footer",
|
|
4263
4414
|
class: normalizeClass(footerClass.value)
|
|
4264
|
-
}, [renderSlot(_ctx.$slots, "footer")],
|
|
4265
|
-
], 2)], 42, _hoisted_1$
|
|
4415
|
+
}, [renderSlot(_ctx.$slots, "footer")], 10, _hoisted_7$6)) : createCommentVNode("", true)
|
|
4416
|
+
], 2)], 42, _hoisted_1$38);
|
|
4266
4417
|
};
|
|
4267
4418
|
}
|
|
4268
4419
|
});
|
|
4269
4420
|
// src/components/drawer/Drawer.vue?vue&type=script&setup=true&lang.ts
|
|
4270
|
-
var _hoisted_1$
|
|
4271
|
-
|
|
4272
|
-
|
|
4421
|
+
var _hoisted_1$37 = [
|
|
4422
|
+
"data-eldra-scope",
|
|
4423
|
+
"aria-labelledby",
|
|
4424
|
+
"aria-label"
|
|
4425
|
+
];
|
|
4426
|
+
var _hoisted_2$30 = ["data-eldra-slot"];
|
|
4427
|
+
var _hoisted_3$21 = ["data-eldra-scope", "id"];
|
|
4428
|
+
var _hoisted_4$14 = ["aria-label"];
|
|
4429
|
+
var _hoisted_5$10 = ["data-eldra-slot"];
|
|
4430
|
+
var _hoisted_6$6 = ["data-eldra-slot"];
|
|
4273
4431
|
var titleAreaClass = "min-w-0 flex-1";
|
|
4274
4432
|
// src/components/drawer/Drawer.vue
|
|
4275
4433
|
var Drawer_default = /* @__PURE__ */ defineComponent({
|
|
@@ -4309,6 +4467,7 @@ var Drawer_default = /* @__PURE__ */ defineComponent({
|
|
|
4309
4467
|
* file only draws the anatomy, the per-side slide and full-screen mobile variant, and the one
|
|
4310
4468
|
* behaviour `Dialog` does not need: which control gets initial focus differs by `side` (below).
|
|
4311
4469
|
*/
|
|
4470
|
+
const eldra = useEldraScope();
|
|
4312
4471
|
const props = __props;
|
|
4313
4472
|
const emit = __emit;
|
|
4314
4473
|
const slots = useSlots();
|
|
@@ -4414,6 +4573,7 @@ var Drawer_default = /* @__PURE__ */ defineComponent({
|
|
|
4414
4573
|
ref_key: "dialogEl",
|
|
4415
4574
|
ref: dialogEl,
|
|
4416
4575
|
"data-eldra-ui": "",
|
|
4576
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
4417
4577
|
"data-part": "root",
|
|
4418
4578
|
class: normalizeClass(rootClass.value),
|
|
4419
4579
|
"aria-labelledby": __props.title ? unref(titleId) : void 0,
|
|
@@ -4427,8 +4587,12 @@ var Drawer_default = /* @__PURE__ */ defineComponent({
|
|
|
4427
4587
|
createElementVNode("div", {
|
|
4428
4588
|
"data-part": "header",
|
|
4429
4589
|
class: normalizeClass(headerClass.value)
|
|
4430
|
-
}, [createElementVNode("div", {
|
|
4590
|
+
}, [createElementVNode("div", {
|
|
4591
|
+
"data-eldra-slot": unref(eldra).slotHost("header"),
|
|
4592
|
+
class: normalizeClass(titleAreaClass)
|
|
4593
|
+
}, [__props.title ? (openBlock(), createElementBlock("h2", {
|
|
4431
4594
|
key: 0,
|
|
4595
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
4432
4596
|
id: unref(titleId),
|
|
4433
4597
|
"data-part": "title",
|
|
4434
4598
|
class: normalizeClass(titleClass.value)
|
|
@@ -4436,7 +4600,7 @@ var Drawer_default = /* @__PURE__ */ defineComponent({
|
|
|
4436
4600
|
key: 0,
|
|
4437
4601
|
"data-part": "count",
|
|
4438
4602
|
class: normalizeClass(countClass.value)
|
|
4439
|
-
}, "(" + toDisplayString(__props.count) + ")", 3)) : createCommentVNode("", true)], 10,
|
|
4603
|
+
}, "(" + toDisplayString(__props.count) + ")", 3)) : createCommentVNode("", true)], 10, _hoisted_3$21)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "header")], 8, _hoisted_2$30), createElementVNode("button", {
|
|
4440
4604
|
ref_key: "closeButtonEl",
|
|
4441
4605
|
ref: closeButtonEl,
|
|
4442
4606
|
type: "button",
|
|
@@ -4454,20 +4618,24 @@ var Drawer_default = /* @__PURE__ */ defineComponent({
|
|
|
4454
4618
|
"stroke-linejoin": "round",
|
|
4455
4619
|
"aria-hidden": "true",
|
|
4456
4620
|
focusable: "false"
|
|
4457
|
-
}, [createElementVNode("path", { d: "M18 6l-12 12" }), createElementVNode("path", { d: "M6 6l12 12" })], -1)])], 10,
|
|
4621
|
+
}, [createElementVNode("path", { d: "M18 6l-12 12" }), createElementVNode("path", { d: "M6 6l12 12" })], -1)])], 10, _hoisted_4$14)], 2),
|
|
4458
4622
|
createElementVNode("div", {
|
|
4623
|
+
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
4459
4624
|
"data-part": "body",
|
|
4460
4625
|
class: normalizeClass(bodyClass.value)
|
|
4461
|
-
}, [renderSlot(_ctx.$slots, "default")],
|
|
4626
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_5$10),
|
|
4462
4627
|
unref(slots).footer ? (openBlock(), createElementBlock("div", {
|
|
4463
4628
|
key: 0,
|
|
4629
|
+
"data-eldra-slot": unref(eldra).slotHost("footer"),
|
|
4464
4630
|
"data-part": "footer",
|
|
4465
4631
|
class: normalizeClass(footerClass.value)
|
|
4466
|
-
}, [renderSlot(_ctx.$slots, "footer")],
|
|
4467
|
-
], 6)], 42, _hoisted_1$
|
|
4632
|
+
}, [renderSlot(_ctx.$slots, "footer")], 10, _hoisted_6$6)) : createCommentVNode("", true)
|
|
4633
|
+
], 6)], 42, _hoisted_1$37);
|
|
4468
4634
|
};
|
|
4469
4635
|
}
|
|
4470
4636
|
});
|
|
4637
|
+
// src/components/empty-state/EditorPlaceholder.vue?vue&type=script&setup=true&lang.ts
|
|
4638
|
+
var _hoisted_1$36 = ["data-eldra-scope"];
|
|
4471
4639
|
// src/components/empty-state/EditorPlaceholder.vue
|
|
4472
4640
|
var EditorPlaceholder_default = /* @__PURE__ */ defineComponent({
|
|
4473
4641
|
__name: "EditorPlaceholder",
|
|
@@ -4482,6 +4650,7 @@ var EditorPlaceholder_default = /* @__PURE__ */ defineComponent({
|
|
|
4482
4650
|
classes: { default: void 0 }
|
|
4483
4651
|
},
|
|
4484
4652
|
setup(__props) {
|
|
4653
|
+
const eldra = useEldraScope();
|
|
4485
4654
|
const props = __props;
|
|
4486
4655
|
/**
|
|
4487
4656
|
* The Studio page-builder's own hint for an unfilled block field (spec "Empty and error states" →
|
|
@@ -4501,6 +4670,7 @@ var EditorPlaceholder_default = /* @__PURE__ */ defineComponent({
|
|
|
4501
4670
|
return (_ctx, _cache) => {
|
|
4502
4671
|
return openBlock(), createElementBlock("div", {
|
|
4503
4672
|
"data-eldra-ui": "",
|
|
4673
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
4504
4674
|
"data-part": "root",
|
|
4505
4675
|
class: normalizeClass(rootClass.value)
|
|
4506
4676
|
}, [
|
|
@@ -4521,7 +4691,7 @@ var EditorPlaceholder_default = /* @__PURE__ */ defineComponent({
|
|
|
4521
4691
|
"data-part": "help",
|
|
4522
4692
|
class: normalizeClass(helpClass.value)
|
|
4523
4693
|
}, toDisplayString(__props.help), 3)) : createCommentVNode("", true)
|
|
4524
|
-
],
|
|
4694
|
+
], 10, _hoisted_1$36);
|
|
4525
4695
|
};
|
|
4526
4696
|
}
|
|
4527
4697
|
});
|
|
@@ -4541,8 +4711,9 @@ var ALERT_TRIANGLE_PATHS = [
|
|
|
4541
4711
|
"M12 16h.01"
|
|
4542
4712
|
];
|
|
4543
4713
|
// src/components/empty-state/EmptyState.vue?vue&type=script&setup=true&lang.ts
|
|
4544
|
-
var _hoisted_1$
|
|
4545
|
-
var _hoisted_2$
|
|
4714
|
+
var _hoisted_1$35 = ["data-eldra-scope", "role"];
|
|
4715
|
+
var _hoisted_2$29 = ["d"];
|
|
4716
|
+
var _hoisted_3$20 = ["data-eldra-slot"];
|
|
4546
4717
|
var ICON_STROKE_WIDTH$2 = 1.5;
|
|
4547
4718
|
// src/components/empty-state/EmptyState.vue
|
|
4548
4719
|
var EmptyState_default = /* @__PURE__ */ defineComponent({
|
|
@@ -4565,6 +4736,7 @@ var EmptyState_default = /* @__PURE__ */ defineComponent({
|
|
|
4565
4736
|
},
|
|
4566
4737
|
emits: ["retry"],
|
|
4567
4738
|
setup(__props, { emit: __emit }) {
|
|
4739
|
+
const eldra = useEldraScope();
|
|
4568
4740
|
const props = __props;
|
|
4569
4741
|
const emit = __emit;
|
|
4570
4742
|
const messages = useMessages();
|
|
@@ -4623,6 +4795,7 @@ var EmptyState_default = /* @__PURE__ */ defineComponent({
|
|
|
4623
4795
|
return (_ctx, _cache) => {
|
|
4624
4796
|
return openBlock(), createElementBlock("div", {
|
|
4625
4797
|
"data-eldra-ui": "",
|
|
4798
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
4626
4799
|
"data-part": "root",
|
|
4627
4800
|
class: normalizeClass(rootClass.value),
|
|
4628
4801
|
role: role.value
|
|
@@ -4652,7 +4825,7 @@ var EmptyState_default = /* @__PURE__ */ defineComponent({
|
|
|
4652
4825
|
return openBlock(), createElementBlock("path", {
|
|
4653
4826
|
key: d,
|
|
4654
4827
|
d
|
|
4655
|
-
}, null, 8, _hoisted_2$
|
|
4828
|
+
}, null, 8, _hoisted_2$29);
|
|
4656
4829
|
}), 128))]))], 2),
|
|
4657
4830
|
(openBlock(), createBlock(resolveDynamicComponent(unref(headingTag)), {
|
|
4658
4831
|
"data-part": "title",
|
|
@@ -4668,6 +4841,7 @@ var EmptyState_default = /* @__PURE__ */ defineComponent({
|
|
|
4668
4841
|
}, toDisplayString(__props.text), 3)) : createCommentVNode("", true),
|
|
4669
4842
|
hasActions.value ? (openBlock(), createElementBlock("div", {
|
|
4670
4843
|
key: 1,
|
|
4844
|
+
"data-eldra-slot": unref(eldra).slotHost("actions"),
|
|
4671
4845
|
"data-part": "actions",
|
|
4672
4846
|
class: normalizeClass(actionsClass.value)
|
|
4673
4847
|
}, [renderSlot(_ctx.$slots, "actions", { retrying: __props.retrying }, () => [__props.variant === "error" ? (openBlock(), createBlock(Button_default, {
|
|
@@ -4676,13 +4850,17 @@ var EmptyState_default = /* @__PURE__ */ defineComponent({
|
|
|
4676
4850
|
loading: __props.retrying,
|
|
4677
4851
|
label: unref(messages).tryAgain,
|
|
4678
4852
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("retry"))
|
|
4679
|
-
}, null, 8, ["loading", "label"])) : createCommentVNode("", true)])],
|
|
4680
|
-
], 10, _hoisted_1$
|
|
4853
|
+
}, null, 8, ["loading", "label"])) : createCommentVNode("", true)])], 10, _hoisted_3$20)) : createCommentVNode("", true)
|
|
4854
|
+
], 10, _hoisted_1$35);
|
|
4681
4855
|
};
|
|
4682
4856
|
}
|
|
4683
4857
|
});
|
|
4684
4858
|
// src/components/card/FeatureCard.vue?vue&type=script&setup=true&lang.ts
|
|
4685
|
-
var _hoisted_1$
|
|
4859
|
+
var _hoisted_1$34 = ["data-eldra-scope"];
|
|
4860
|
+
var _hoisted_2$28 = ["data-eldra-slot"];
|
|
4861
|
+
var _hoisted_3$19 = ["data-eldra-slot"];
|
|
4862
|
+
var _hoisted_4$13 = ["data-eldra-scope"];
|
|
4863
|
+
var _hoisted_5$9 = ["d"];
|
|
4686
4864
|
// src/components/card/FeatureCard.vue
|
|
4687
4865
|
var FeatureCard_default = /* @__PURE__ */ defineComponent({
|
|
4688
4866
|
__name: "FeatureCard",
|
|
@@ -4698,6 +4876,7 @@ var FeatureCard_default = /* @__PURE__ */ defineComponent({
|
|
|
4698
4876
|
classes: { default: void 0 }
|
|
4699
4877
|
},
|
|
4700
4878
|
setup(__props) {
|
|
4879
|
+
const eldra = useEldraScope();
|
|
4701
4880
|
const props = __props;
|
|
4702
4881
|
const messages = useMessages();
|
|
4703
4882
|
/** Spec "Feature card" → Properties, `href` row: "Makes the card linked." Same empty-string
|
|
@@ -4765,6 +4944,7 @@ var FeatureCard_default = /* @__PURE__ */ defineComponent({
|
|
|
4765
4944
|
return (_ctx, _cache) => {
|
|
4766
4945
|
return openBlock(), createElementBlock("div", {
|
|
4767
4946
|
"data-eldra-ui": "",
|
|
4947
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
4768
4948
|
"data-part": "root",
|
|
4769
4949
|
class: normalizeClass(rootClass.value)
|
|
4770
4950
|
}, [
|
|
@@ -4777,29 +4957,39 @@ var FeatureCard_default = /* @__PURE__ */ defineComponent({
|
|
|
4777
4957
|
size: "lg"
|
|
4778
4958
|
}, null, 8, ["icon"])], 2),
|
|
4779
4959
|
(openBlock(), createBlock(resolveDynamicComponent(unref(headingTag)), {
|
|
4960
|
+
"data-eldra-slot": unref(eldra).slotHost("title"),
|
|
4780
4961
|
"data-part": "title",
|
|
4781
4962
|
class: normalizeClass(titleClass.value)
|
|
4782
4963
|
}, {
|
|
4783
4964
|
default: withCtx(() => [hasHref.value ? (openBlock(), createBlock(resolveDynamicComponent(titleTag.value), mergeProps({
|
|
4784
4965
|
key: 0,
|
|
4966
|
+
"data-eldra-slot": unref(eldra).slotHost("title"),
|
|
4967
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
4785
4968
|
"data-part": "titleLink",
|
|
4786
4969
|
class: titleLinkClass.value
|
|
4787
4970
|
}, titleAttrs.value), {
|
|
4788
4971
|
default: withCtx(() => [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])]),
|
|
4789
4972
|
_: 3
|
|
4790
|
-
}, 16, [
|
|
4973
|
+
}, 16, [
|
|
4974
|
+
"data-eldra-slot",
|
|
4975
|
+
"data-eldra-scope",
|
|
4976
|
+
"class"
|
|
4977
|
+
])) : renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)], void 0, 1)]),
|
|
4791
4978
|
_: 3
|
|
4792
|
-
}, 8, ["class"])),
|
|
4979
|
+
}, 8, ["data-eldra-slot", "class"])),
|
|
4793
4980
|
createElementVNode("p", {
|
|
4981
|
+
"data-eldra-slot": unref(eldra).slotHost("body"),
|
|
4794
4982
|
"data-part": "body",
|
|
4795
4983
|
class: normalizeClass(bodyClass.value)
|
|
4796
|
-
}, [renderSlot(_ctx.$slots, "body", {}, () => [createTextVNode(toDisplayString(__props.body), 1)])],
|
|
4984
|
+
}, [renderSlot(_ctx.$slots, "body", {}, () => [createTextVNode(toDisplayString(__props.body), 1)])], 10, _hoisted_2$28),
|
|
4797
4985
|
hasHref.value ? (openBlock(), createElementBlock("span", {
|
|
4798
4986
|
key: 0,
|
|
4987
|
+
"data-eldra-slot": unref(eldra).slotHost("cue"),
|
|
4799
4988
|
"data-part": "cue",
|
|
4800
4989
|
class: normalizeClass(cueClass.value),
|
|
4801
4990
|
"aria-hidden": "true"
|
|
4802
4991
|
}, [renderSlot(_ctx.$slots, "cue", {}, () => [createTextVNode(toDisplayString(resolvedCue.value), 1)]), (openBlock(), createElementBlock("svg", {
|
|
4992
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
4803
4993
|
class: normalizeClass(unref(arrowClass)),
|
|
4804
4994
|
viewBox: "0 0 24 24",
|
|
4805
4995
|
fill: "none",
|
|
@@ -4813,15 +5003,17 @@ var FeatureCard_default = /* @__PURE__ */ defineComponent({
|
|
|
4813
5003
|
return openBlock(), createElementBlock("path", {
|
|
4814
5004
|
key: d,
|
|
4815
5005
|
d
|
|
4816
|
-
}, null, 8,
|
|
4817
|
-
}), 128))],
|
|
4818
|
-
],
|
|
5006
|
+
}, null, 8, _hoisted_5$9);
|
|
5007
|
+
}), 128))], 10, _hoisted_4$13))], 10, _hoisted_3$19)) : createCommentVNode("", true)
|
|
5008
|
+
], 10, _hoisted_1$34);
|
|
4819
5009
|
};
|
|
4820
5010
|
}
|
|
4821
5011
|
});
|
|
4822
5012
|
// src/components/field-wrapper/FieldWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
4823
|
-
var _hoisted_1$
|
|
4824
|
-
var _hoisted_2$
|
|
5013
|
+
var _hoisted_1$33 = ["data-eldra-scope"];
|
|
5014
|
+
var _hoisted_2$27 = ["data-eldra-slot"];
|
|
5015
|
+
var _hoisted_3$18 = ["data-eldra-slot", "id"];
|
|
5016
|
+
var _hoisted_4$12 = ["id"];
|
|
4825
5017
|
var GROUP_INLINE = "grid min-w-0 flex-[1_1_14rem] content-start gap-1";
|
|
4826
5018
|
var INLINE_ROW = "order-1 w-full basis-full";
|
|
4827
5019
|
/**
|
|
@@ -4837,7 +5029,7 @@ var LABEL_TYPE = "text-label text-text block w-fit";
|
|
|
4837
5029
|
var FieldWrapper_default = /* @__PURE__ */ defineComponent({
|
|
4838
5030
|
__name: "FieldWrapper",
|
|
4839
5031
|
props: {
|
|
4840
|
-
label: {},
|
|
5032
|
+
label: { default: void 0 },
|
|
4841
5033
|
id: { default: void 0 },
|
|
4842
5034
|
required: {
|
|
4843
5035
|
type: Boolean,
|
|
@@ -4861,6 +5053,7 @@ var FieldWrapper_default = /* @__PURE__ */ defineComponent({
|
|
|
4861
5053
|
classes: { default: void 0 }
|
|
4862
5054
|
},
|
|
4863
5055
|
setup(__props) {
|
|
5056
|
+
const eldra = useEldraScope();
|
|
4864
5057
|
const props = __props;
|
|
4865
5058
|
const slots = useSlots();
|
|
4866
5059
|
const m = useMessages();
|
|
@@ -4880,7 +5073,11 @@ var FieldWrapper_default = /* @__PURE__ */ defineComponent({
|
|
|
4880
5073
|
const errorId = computed(() => `${controlId.value}-error`);
|
|
4881
5074
|
const counterId = computed(() => `${controlId.value}-counter`);
|
|
4882
5075
|
/** Slots are not reactive; see `useSlotPresence` for the defect this avoids. */
|
|
4883
|
-
const slotContent = useSlotPresence(slots, [
|
|
5076
|
+
const slotContent = useSlotPresence(slots, [
|
|
5077
|
+
"error",
|
|
5078
|
+
"help",
|
|
5079
|
+
"label"
|
|
5080
|
+
]);
|
|
4884
5081
|
/**
|
|
4885
5082
|
* A slot counts as content: `<template #error>` is a richer way of writing the `error` prop (a
|
|
4886
5083
|
* message with a link in it, say), not a different feature, so it makes the field invalid and
|
|
@@ -4889,6 +5086,11 @@ var FieldWrapper_default = /* @__PURE__ */ defineComponent({
|
|
|
4889
5086
|
const hasError = computed(() => Boolean(props.error) || slotContent.value.error);
|
|
4890
5087
|
const hasHelp = computed(() => Boolean(props.help) || slotContent.value.help);
|
|
4891
5088
|
const hasCounter = computed(() => props.counter !== void 0);
|
|
5089
|
+
/**
|
|
5090
|
+
* A field with no visible label is one whose control is named some other way (`aria-label`), so
|
|
5091
|
+
* the wrapper draws no empty `<label>` for it. `label=""` still renders one, as it always has.
|
|
5092
|
+
*/
|
|
5093
|
+
const hasLabel = computed(() => props.label !== void 0 || slotContent.value.label);
|
|
4892
5094
|
const hasFoot = computed(() => hasHelp.value || hasCounter.value);
|
|
4893
5095
|
/**
|
|
4894
5096
|
* Spec "Field wrapper" → Accessibility: `aria-describedby="<error-id> <help-id> <counter-id>"` —
|
|
@@ -4913,6 +5115,7 @@ var FieldWrapper_default = /* @__PURE__ */ defineComponent({
|
|
|
4913
5115
|
const context = computed(() => ({
|
|
4914
5116
|
id: controlId.value,
|
|
4915
5117
|
labelId: labelId.value,
|
|
5118
|
+
labelled: hasLabel.value,
|
|
4916
5119
|
describedBy: describedBy.value,
|
|
4917
5120
|
invalid: hasError.value,
|
|
4918
5121
|
required: props.required,
|
|
@@ -4945,7 +5148,9 @@ var FieldWrapper_default = /* @__PURE__ */ defineComponent({
|
|
|
4945
5148
|
const isInline = computed(() => layout?.value === "inline" && !props.group);
|
|
4946
5149
|
/** Spec "Field wrapper" → Properties: a counter with no `value` is an empty field, so "0 / max". */
|
|
4947
5150
|
const count = computed(() => props.counter?.value ?? 0);
|
|
4948
|
-
const isOverLimit = computed(() => props.counter !== void 0 && count.value > props.counter.max);
|
|
5151
|
+
const isOverLimit = computed(() => props.counter?.max !== void 0 && count.value > props.counter.max);
|
|
5152
|
+
/** With no `max` the counter is the length alone: there is no limit to read it against. */
|
|
5153
|
+
const counterText = computed(() => props.counter?.max === void 0 ? String(count.value) : m.value.counter(count.value, props.counter.max));
|
|
4949
5154
|
/**
|
|
4950
5155
|
* One root, two shapes. A `group` is a `<fieldset>` named by its `<legend>` and described as a
|
|
4951
5156
|
* whole: there is no single control for a `<label for>` to point at, so `aria-describedby` and
|
|
@@ -4991,8 +5196,6 @@ var FieldWrapper_default = /* @__PURE__ */ defineComponent({
|
|
|
4991
5196
|
/** In an inline row the error and the foot take a full-width row of their own, below the button. */
|
|
4992
5197
|
const labelClass = computed(() => partClass(cx(LABEL_TYPE, "mb-0.5"), props.classes, "label"));
|
|
4993
5198
|
const legendClass = computed(() => partClass(cx(LABEL_TYPE, "mb-2 p-0"), props.classes, "legend"));
|
|
4994
|
-
/** 0.125rem start margin, `danger`, inheriting the label's weight 600. */
|
|
4995
|
-
const requiredMarkClass = computed(() => partClass("text-danger ms-0.5", props.classes, "requiredMark"));
|
|
4996
5199
|
/** 0.25rem start margin, `muted`, weight 400 against the label's 600. */
|
|
4997
5200
|
const optionalTextClass = computed(() => partClass("text-muted ms-1 font-normal", props.classes, "optionalText"));
|
|
4998
5201
|
/** The control's row. `min-w-0` because a grid item's default `auto` floor would let it overflow. */
|
|
@@ -5010,6 +5213,7 @@ var FieldWrapper_default = /* @__PURE__ */ defineComponent({
|
|
|
5010
5213
|
return openBlock(), createBlock(resolveDynamicComponent(__props.group ? "fieldset" : "div"), {
|
|
5011
5214
|
id: __props.group ? unref(controlId) : void 0,
|
|
5012
5215
|
"data-eldra-ui": "",
|
|
5216
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
5013
5217
|
"data-part": "root",
|
|
5014
5218
|
class: normalizeClass(rootClass.value),
|
|
5015
5219
|
tabindex: __props.group ? -1 : void 0,
|
|
@@ -5018,32 +5222,39 @@ var FieldWrapper_default = /* @__PURE__ */ defineComponent({
|
|
|
5018
5222
|
}, {
|
|
5019
5223
|
default: withCtx(() => [
|
|
5020
5224
|
createVNode(LabelAndControl, null, {
|
|
5021
|
-
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.group ? "legend" : "label"), {
|
|
5225
|
+
default: withCtx(() => [hasLabel.value ? (openBlock(), createBlock(resolveDynamicComponent(__props.group ? "legend" : "label"), {
|
|
5226
|
+
key: 0,
|
|
5227
|
+
"data-eldra-slot": unref(eldra).slotHost("label", "labelSuffix"),
|
|
5022
5228
|
id: labelId.value,
|
|
5023
5229
|
for: __props.group ? void 0 : unref(controlId),
|
|
5024
5230
|
"data-part": __props.group ? "legend" : "label",
|
|
5025
5231
|
class: normalizeClass(__props.group ? legendClass.value : labelClass.value)
|
|
5026
5232
|
}, {
|
|
5027
|
-
default: withCtx(() => [
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5233
|
+
default: withCtx(() => [
|
|
5234
|
+
renderSlot(_ctx.$slots, "label", {}, () => [createTextVNode(toDisplayString(__props.label), 1)]),
|
|
5235
|
+
__props.required ? (openBlock(), createBlock(RequiredMark_default, {
|
|
5236
|
+
key: 0,
|
|
5237
|
+
classes: __props.classes
|
|
5238
|
+
}, null, 8, ["classes"])) : __props.optional ? (openBlock(), createElementBlock("span", {
|
|
5239
|
+
key: 1,
|
|
5240
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
5241
|
+
"data-part": "optionalText",
|
|
5242
|
+
class: normalizeClass(optionalTextClass.value)
|
|
5243
|
+
}, "(" + toDisplayString(unref(m).optional) + ")", 11, _hoisted_1$33)) : createCommentVNode("", true),
|
|
5244
|
+
renderSlot(_ctx.$slots, "labelSuffix")
|
|
5245
|
+
]),
|
|
5037
5246
|
_: 3
|
|
5038
5247
|
}, 8, [
|
|
5248
|
+
"data-eldra-slot",
|
|
5039
5249
|
"id",
|
|
5040
5250
|
"for",
|
|
5041
5251
|
"data-part",
|
|
5042
5252
|
"class"
|
|
5043
|
-
])), createElementVNode("div", {
|
|
5253
|
+
])) : createCommentVNode("", true), createElementVNode("div", {
|
|
5254
|
+
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
5044
5255
|
"data-part": "control",
|
|
5045
5256
|
class: normalizeClass(controlClass.value)
|
|
5046
|
-
}, [renderSlot(_ctx.$slots, "default")],
|
|
5257
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_2$27)]),
|
|
5047
5258
|
_: 3
|
|
5048
5259
|
}),
|
|
5049
5260
|
hasError.value ? (openBlock(), createBlock(FieldError_default, {
|
|
@@ -5065,19 +5276,21 @@ var FieldWrapper_default = /* @__PURE__ */ defineComponent({
|
|
|
5065
5276
|
class: normalizeClass(footClass.value)
|
|
5066
5277
|
}, [hasHelp.value ? (openBlock(), createElementBlock("span", {
|
|
5067
5278
|
key: 0,
|
|
5279
|
+
"data-eldra-slot": unref(eldra).slotHost("help"),
|
|
5068
5280
|
id: helpId.value,
|
|
5069
5281
|
"data-part": "help",
|
|
5070
5282
|
class: normalizeClass(helpClass.value)
|
|
5071
|
-
}, [renderSlot(_ctx.$slots, "help", {}, () => [createTextVNode(toDisplayString(__props.help), 1)])], 10,
|
|
5283
|
+
}, [renderSlot(_ctx.$slots, "help", {}, () => [createTextVNode(toDisplayString(__props.help), 1)])], 10, _hoisted_3$18)) : createCommentVNode("", true), __props.counter ? (openBlock(), createElementBlock("span", {
|
|
5072
5284
|
key: 1,
|
|
5073
5285
|
id: counterId.value,
|
|
5074
5286
|
"data-part": "counter",
|
|
5075
5287
|
class: normalizeClass(counterClass.value)
|
|
5076
|
-
}, toDisplayString(
|
|
5288
|
+
}, toDisplayString(counterText.value), 11, _hoisted_4$12)) : createCommentVNode("", true)], 2)) : createCommentVNode("", true)
|
|
5077
5289
|
]),
|
|
5078
5290
|
_: 3
|
|
5079
5291
|
}, 8, [
|
|
5080
5292
|
"id",
|
|
5293
|
+
"data-eldra-scope",
|
|
5081
5294
|
"class",
|
|
5082
5295
|
"tabindex",
|
|
5083
5296
|
"aria-describedby",
|
|
@@ -5642,15 +5855,16 @@ var FACET_ROW_GUTTER = "-mx-2 px-2";
|
|
|
5642
5855
|
/** The same, at the swatch row's own tighter 0.375rem padding (spec → Sizes, Swatch row). */
|
|
5643
5856
|
var FACET_SWATCH_GUTTER = "-mx-1.5 px-1.5";
|
|
5644
5857
|
// src/components/filter-panel/facets/ColourFacet.vue?vue&type=script&setup=true&lang.ts
|
|
5645
|
-
var _hoisted_1$
|
|
5646
|
-
var _hoisted_2$
|
|
5858
|
+
var _hoisted_1$32 = ["data-eldra-scope"];
|
|
5859
|
+
var _hoisted_2$26 = ["data-part", "data-value"];
|
|
5860
|
+
var _hoisted_3$17 = [
|
|
5647
5861
|
"value",
|
|
5648
5862
|
"checked",
|
|
5649
5863
|
"disabled",
|
|
5650
5864
|
"aria-label",
|
|
5651
5865
|
"onChange"
|
|
5652
5866
|
];
|
|
5653
|
-
var
|
|
5867
|
+
var _hoisted_4$11 = ["data-part"];
|
|
5654
5868
|
var ROWS_BASE = "grid min-w-0 grid-cols-1 gap-x-6 gap-y-0.5 @min-[26rem]:grid-cols-2";
|
|
5655
5869
|
/**
|
|
5656
5870
|
* Spec → Sizes, Swatch tile row: "Grid of `repeat(auto-fill, minmax(4.25rem, 1fr))`, gaps 0.75rem
|
|
@@ -5723,6 +5937,7 @@ var ColourFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
5723
5937
|
* checked"). The check mark's own ink is picked from the swatch's relative luminance by
|
|
5724
5938
|
* `swatchInk.ts`, which is the only way a mark can stay visible on a colour nobody chose.
|
|
5725
5939
|
*/
|
|
5940
|
+
const eldra = useEldraScope();
|
|
5726
5941
|
const props = __props;
|
|
5727
5942
|
const emit = __emit;
|
|
5728
5943
|
const m = useMessages(() => props.messages);
|
|
@@ -5786,6 +6001,7 @@ var ColourFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
5786
6001
|
return (_ctx, _cache) => {
|
|
5787
6002
|
return openBlock(), createElementBlock("div", {
|
|
5788
6003
|
"data-eldra-ui": "",
|
|
6004
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
5789
6005
|
"data-part": "values",
|
|
5790
6006
|
class: normalizeClass(valuesClass.value)
|
|
5791
6007
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(values.value, (value) => {
|
|
@@ -5803,7 +6019,7 @@ var ColourFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
5803
6019
|
disabled: disabled(value),
|
|
5804
6020
|
"aria-label": nameOf(value),
|
|
5805
6021
|
onChange: ($event) => emit("toggle", value.value, $event.target.checked)
|
|
5806
|
-
}, null, 40,
|
|
6022
|
+
}, null, 40, _hoisted_3$17),
|
|
5807
6023
|
createElementVNode("span", { class: normalizeClass(ringClass(value)) }, [
|
|
5808
6024
|
createElementVNode("span", {
|
|
5809
6025
|
"data-part": "swatch",
|
|
@@ -5845,25 +6061,26 @@ var ColourFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
5845
6061
|
createElementVNode("span", {
|
|
5846
6062
|
"data-part": tiles.value ? "tileLabel" : "rowLabel",
|
|
5847
6063
|
class: normalizeClass(nameClass(value))
|
|
5848
|
-
}, toDisplayString(value.label), 11,
|
|
6064
|
+
}, toDisplayString(value.label), 11, _hoisted_4$11),
|
|
5849
6065
|
createElementVNode("span", {
|
|
5850
6066
|
"data-part": "count",
|
|
5851
6067
|
class: normalizeClass(countClass.value)
|
|
5852
6068
|
}, toDisplayString(value.count), 3)
|
|
5853
|
-
], 10,
|
|
5854
|
-
}), 128))],
|
|
6069
|
+
], 10, _hoisted_2$26);
|
|
6070
|
+
}), 128))], 10, _hoisted_1$32);
|
|
5855
6071
|
};
|
|
5856
6072
|
}
|
|
5857
6073
|
});
|
|
5858
6074
|
// src/components/filter-panel/facets/ListFacet.vue?vue&type=script&setup=true&lang.ts
|
|
5859
|
-
var _hoisted_1$
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
var
|
|
5864
|
-
var
|
|
5865
|
-
var
|
|
5866
|
-
var
|
|
6075
|
+
var _hoisted_1$31 = ["data-eldra-scope"];
|
|
6076
|
+
var _hoisted_2$25 = ["data-eldra-scope"];
|
|
6077
|
+
var _hoisted_3$16 = ["id"];
|
|
6078
|
+
var _hoisted_4$10 = ["data-eldra-scope"];
|
|
6079
|
+
var _hoisted_5$8 = ["data-eldra-scope"];
|
|
6080
|
+
var _hoisted_6$5 = ["aria-label"];
|
|
6081
|
+
var _hoisted_7$5 = ["data-eldra-scope"];
|
|
6082
|
+
var _hoisted_8$2 = ["data-eldra-scope"];
|
|
6083
|
+
var _hoisted_9$2 = ["data-eldra-scope"];
|
|
5867
6084
|
var SEARCH_BASE = "mb-2 w-full";
|
|
5868
6085
|
/** Spec → Sizes, Facet search: '"No matches" line: 0.875rem `muted`, 0.5rem vertical padding.' */
|
|
5869
6086
|
var NO_MATCHES_BASE = "text-body-sm text-muted";
|
|
@@ -5918,6 +6135,7 @@ var ListFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
5918
6135
|
* why it is a role on a wrapper rather than a tree widget: every row stays an ordinary checkbox in
|
|
5919
6136
|
* source order, so `Tab`, `Esc` and **Show all N** behave exactly as they do in a flat facet.
|
|
5920
6137
|
*/
|
|
6138
|
+
const eldra = useEldraScope();
|
|
5921
6139
|
const props = __props;
|
|
5922
6140
|
const emit = __emit;
|
|
5923
6141
|
const m = useMessages(() => props.messages);
|
|
@@ -5973,7 +6191,11 @@ var ListFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
5973
6191
|
const showAllClass = computed(() => partClass(SHOW_ALL_BASE, props.classes, "showAll"));
|
|
5974
6192
|
const checkboxClass = computed(() => partClass("", props.classes, "checkbox"));
|
|
5975
6193
|
return (_ctx, _cache) => {
|
|
5976
|
-
return openBlock(), createElementBlock("div",
|
|
6194
|
+
return openBlock(), createElementBlock("div", {
|
|
6195
|
+
"data-eldra-ui": "",
|
|
6196
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
6197
|
+
class: "min-w-0"
|
|
6198
|
+
}, [
|
|
5977
6199
|
searchable.value ? (openBlock(), createElementBlock("div", {
|
|
5978
6200
|
key: 0,
|
|
5979
6201
|
"data-part": "search",
|
|
@@ -5988,7 +6210,8 @@ var ListFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
5988
6210
|
placeholder: unref(m).filterPanelSearchPlaceholder(__props.facet.label),
|
|
5989
6211
|
"aria-controls": listId.value
|
|
5990
6212
|
}, {
|
|
5991
|
-
leadingIcon: withCtx(() => [
|
|
6213
|
+
leadingIcon: withCtx(() => [(openBlock(), createElementBlock("svg", {
|
|
6214
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
5992
6215
|
class: "size-4",
|
|
5993
6216
|
viewBox: "0 0 24 24",
|
|
5994
6217
|
fill: "none",
|
|
@@ -5998,7 +6221,7 @@ var ListFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
5998
6221
|
"stroke-linejoin": "round",
|
|
5999
6222
|
"aria-hidden": "true",
|
|
6000
6223
|
focusable: "false"
|
|
6001
|
-
}, [createElementVNode("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }), createElementVNode("path", { d: "M21 21l-6 -6" }
|
|
6224
|
+
}, [..._cache[2] || (_cache[2] = [createElementVNode("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }, null, -1), createElementVNode("path", { d: "M21 21l-6 -6" }, null, -1)])], 8, _hoisted_2$25))]),
|
|
6002
6225
|
_: 1
|
|
6003
6226
|
}, 8, [
|
|
6004
6227
|
"id",
|
|
@@ -6024,10 +6247,14 @@ var ListFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
6024
6247
|
},
|
|
6025
6248
|
onChange: ($event) => emit("toggle", row.value.value, $event)
|
|
6026
6249
|
}, {
|
|
6027
|
-
default: withCtx(() => [createElementVNode("span",
|
|
6250
|
+
default: withCtx(() => [createElementVNode("span", {
|
|
6251
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
6252
|
+
class: "min-w-0"
|
|
6253
|
+
}, toDisplayString(row.value.label), 9, _hoisted_4$10), createElementVNode("span", {
|
|
6254
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
6028
6255
|
"data-part": "count",
|
|
6029
6256
|
class: normalizeClass(countClass.value)
|
|
6030
|
-
}, toDisplayString(row.value.count),
|
|
6257
|
+
}, toDisplayString(row.value.count), 11, _hoisted_5$8)]),
|
|
6031
6258
|
_: 2
|
|
6032
6259
|
}, 1032, [
|
|
6033
6260
|
"model-value",
|
|
@@ -6055,10 +6282,14 @@ var ListFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
6055
6282
|
},
|
|
6056
6283
|
onChange: ($event) => emit("toggle", child.value, $event)
|
|
6057
6284
|
}, {
|
|
6058
|
-
default: withCtx(() => [createElementVNode("span",
|
|
6285
|
+
default: withCtx(() => [createElementVNode("span", {
|
|
6286
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
6287
|
+
class: "min-w-0"
|
|
6288
|
+
}, toDisplayString(child.label), 9, _hoisted_7$5), createElementVNode("span", {
|
|
6289
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
6059
6290
|
"data-part": "count",
|
|
6060
6291
|
class: normalizeClass(countClass.value)
|
|
6061
|
-
}, toDisplayString(child.count),
|
|
6292
|
+
}, toDisplayString(child.count), 11, _hoisted_8$2)]),
|
|
6062
6293
|
_: 2
|
|
6063
6294
|
}, 1032, [
|
|
6064
6295
|
"model-value",
|
|
@@ -6068,8 +6299,8 @@ var ListFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
6068
6299
|
"classes",
|
|
6069
6300
|
"onChange"
|
|
6070
6301
|
]);
|
|
6071
|
-
}), 128))], 8,
|
|
6072
|
-
}), 128))], 10,
|
|
6302
|
+
}), 128))], 8, _hoisted_6$5)) : createCommentVNode("", true)], 64);
|
|
6303
|
+
}), 128))], 10, _hoisted_3$16),
|
|
6073
6304
|
createElementVNode("span", {
|
|
6074
6305
|
"data-part": "noMatches",
|
|
6075
6306
|
role: "status",
|
|
@@ -6087,6 +6318,7 @@ var ListFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
6087
6318
|
onClick: _cache[1] || (_cache[1] = ($event) => expanded.value = !expanded.value)
|
|
6088
6319
|
}, {
|
|
6089
6320
|
trailingIcon: withCtx(() => [(openBlock(), createElementBlock("svg", {
|
|
6321
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
6090
6322
|
class: normalizeClass(["duration-base size-4 transition-[rotate] ease-out motion-reduce:transition-none", expanded.value ? "rotate-180" : ""]),
|
|
6091
6323
|
viewBox: "0 0 24 24",
|
|
6092
6324
|
fill: "none",
|
|
@@ -6096,7 +6328,7 @@ var ListFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
6096
6328
|
"stroke-linejoin": "round",
|
|
6097
6329
|
"aria-hidden": "true",
|
|
6098
6330
|
focusable: "false"
|
|
6099
|
-
}, [..._cache[3] || (_cache[3] = [createElementVNode("path", { d: "M6 9l6 6l6 -6" }, null, -1)])], 2))]),
|
|
6331
|
+
}, [..._cache[3] || (_cache[3] = [createElementVNode("path", { d: "M6 9l6 6l6 -6" }, null, -1)])], 10, _hoisted_9$2))]),
|
|
6100
6332
|
default: withCtx(() => [createTextVNode(toDisplayString(expanded.value ? unref(m).filterPanelShowFewer : unref(m).filterPanelShowAll(total.value)) + " ", 1)]),
|
|
6101
6333
|
_: 1
|
|
6102
6334
|
}, 8, [
|
|
@@ -6104,7 +6336,7 @@ var ListFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
6104
6336
|
"aria-expanded",
|
|
6105
6337
|
"aria-controls"
|
|
6106
6338
|
])) : createCommentVNode("", true)
|
|
6107
|
-
]);
|
|
6339
|
+
], 8, _hoisted_1$31);
|
|
6108
6340
|
};
|
|
6109
6341
|
}
|
|
6110
6342
|
});
|
|
@@ -6263,9 +6495,11 @@ function rangeKeyTransition(key, shiftKey, thumb, value, math) {
|
|
|
6263
6495
|
}
|
|
6264
6496
|
}
|
|
6265
6497
|
// src/components/range-slider/RangeSlider.vue?vue&type=script&setup=true&lang.ts
|
|
6266
|
-
var _hoisted_1$
|
|
6267
|
-
var _hoisted_2$
|
|
6268
|
-
var _hoisted_3$
|
|
6498
|
+
var _hoisted_1$30 = ["data-eldra-scope"];
|
|
6499
|
+
var _hoisted_2$24 = ["id"];
|
|
6500
|
+
var _hoisted_3$15 = ["data-eldra-slot", "aria-labelledby"];
|
|
6501
|
+
var _hoisted_4$9 = ["data-eldra-scope"];
|
|
6502
|
+
var _hoisted_5$7 = [
|
|
6269
6503
|
"data-thumb",
|
|
6270
6504
|
"data-dragging",
|
|
6271
6505
|
"aria-label",
|
|
@@ -6276,7 +6510,8 @@ var _hoisted_3$9 = [
|
|
|
6276
6510
|
"aria-disabled",
|
|
6277
6511
|
"onKeydown"
|
|
6278
6512
|
];
|
|
6279
|
-
var
|
|
6513
|
+
var _hoisted_6$4 = ["data-eldra-slot"];
|
|
6514
|
+
var _hoisted_7$4 = [
|
|
6280
6515
|
"data-input",
|
|
6281
6516
|
"inputmode",
|
|
6282
6517
|
"value",
|
|
@@ -6287,7 +6522,6 @@ var _hoisted_4$7 = [
|
|
|
6287
6522
|
"onBlur",
|
|
6288
6523
|
"onKeydown"
|
|
6289
6524
|
];
|
|
6290
|
-
/** Spec "Range slider" → Properties. */
|
|
6291
6525
|
var DEFAULT_MIN = 0;
|
|
6292
6526
|
var DEFAULT_MAX = 100;
|
|
6293
6527
|
var DEFAULT_STEP = 1;
|
|
@@ -6325,7 +6559,7 @@ var RANGE_DISABLED = "bg-border";
|
|
|
6325
6559
|
* list (`src/__tests__/focus-transition.spec.ts`), which is also why a thumb's position is never
|
|
6326
6560
|
* animated — see the spec's own Behaviour & motion note.
|
|
6327
6561
|
*/
|
|
6328
|
-
var THUMB_BASE = "eldra-range-thumb absolute top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border-border-strong bg-background
|
|
6562
|
+
var THUMB_BASE = "eldra-range-thumb absolute top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border-border-strong bg-background eldra-focus";
|
|
6329
6563
|
/**
|
|
6330
6564
|
* Spec → States, "Thumb hover" row: "a 0.25rem halo of `text` at 8%, edge `text`". The halo is the
|
|
6331
6565
|
* `eldra-range-thumb` utility's `::before`; the edge is this colour change. A plain
|
|
@@ -6399,6 +6633,8 @@ var RangeSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
6399
6633
|
* dragging it — a press is a drag of no distance — and the two thumbs' own (deliberately
|
|
6400
6634
|
* overlapping, 44px) targets can never argue about which one a press belongs to.
|
|
6401
6635
|
*/
|
|
6636
|
+
const eldra = useEldraScope();
|
|
6637
|
+
/** Spec "Range slider" → Properties. */
|
|
6402
6638
|
const props = __props;
|
|
6403
6639
|
const emit = __emit;
|
|
6404
6640
|
const m = useMessages(() => props.messages);
|
|
@@ -6758,6 +6994,7 @@ var RangeSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
6758
6994
|
return (_ctx, _cache) => {
|
|
6759
6995
|
return openBlock(), createElementBlock("div", {
|
|
6760
6996
|
"data-eldra-ui": "",
|
|
6997
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
6761
6998
|
"data-part": "root",
|
|
6762
6999
|
class: normalizeClass(rootClass.value)
|
|
6763
7000
|
}, [
|
|
@@ -6766,8 +7003,9 @@ var RangeSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
6766
7003
|
id: unref(labelId),
|
|
6767
7004
|
"data-part": "label",
|
|
6768
7005
|
class: normalizeClass(labelClass.value)
|
|
6769
|
-
}, toDisplayString(__props.label), 11,
|
|
7006
|
+
}, toDisplayString(__props.label), 11, _hoisted_2$24)) : createCommentVNode("", true),
|
|
6770
7007
|
createElementVNode("div", {
|
|
7008
|
+
"data-eldra-slot": unref(eldra).slotHost("track"),
|
|
6771
7009
|
role: "group",
|
|
6772
7010
|
"data-part": "group",
|
|
6773
7011
|
class: normalizeClass(groupClass.value),
|
|
@@ -6775,6 +7013,7 @@ var RangeSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
6775
7013
|
}, [__props.trackVisible ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [renderSlot(_ctx.$slots, "track", normalizeProps(guardReactiveProps(trackSlotProps.value))), createElementVNode("div", {
|
|
6776
7014
|
ref_key: "railEl",
|
|
6777
7015
|
ref: railEl,
|
|
7016
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
6778
7017
|
"data-part": "rail",
|
|
6779
7018
|
class: normalizeClass(railClass.value),
|
|
6780
7019
|
onPointerdown: onPointerDown,
|
|
@@ -6808,10 +7047,11 @@ var RangeSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
6808
7047
|
onKeydown: ($event) => onThumbKeydown($event, thumb.thumb),
|
|
6809
7048
|
onKeyup: onThumbKeyup,
|
|
6810
7049
|
onBlur: onThumbBlur
|
|
6811
|
-
}, null, 46,
|
|
6812
|
-
}), 128))],
|
|
7050
|
+
}, null, 46, _hoisted_5$7);
|
|
7051
|
+
}), 128))], 42, _hoisted_4$9)], 64)) : createCommentVNode("", true)], 10, _hoisted_3$15),
|
|
6813
7052
|
__props.inputs ? (openBlock(), createElementBlock("div", {
|
|
6814
7053
|
key: 1,
|
|
7054
|
+
"data-eldra-slot": unref(eldra).slotHost("inputs"),
|
|
6815
7055
|
"data-part": "inputs",
|
|
6816
7056
|
class: normalizeClass(inputsClass.value)
|
|
6817
7057
|
}, [renderSlot(_ctx.$slots, "inputs", normalizeProps(guardReactiveProps(inputsSlotProps.value)), () => [(openBlock(true), createElementBlock(Fragment, null, renderList(thumbs.value, (thumb, index) => {
|
|
@@ -6834,14 +7074,15 @@ var RangeSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
6834
7074
|
onFocus: ($event) => onInputFocus(thumb.thumb),
|
|
6835
7075
|
onBlur: ($event) => onInputBlur(thumb.thumb),
|
|
6836
7076
|
onKeydown: withKeys(withModifiers(($event) => onInputEnter(thumb.thumb), ["prevent"]), ["enter"])
|
|
6837
|
-
}, null, 42,
|
|
6838
|
-
}), 128))])],
|
|
6839
|
-
],
|
|
7077
|
+
}, null, 42, _hoisted_7$4)], 64);
|
|
7078
|
+
}), 128))])], 10, _hoisted_6$4)) : createCommentVNode("", true)
|
|
7079
|
+
], 10, _hoisted_1$30);
|
|
6840
7080
|
};
|
|
6841
7081
|
}
|
|
6842
7082
|
});
|
|
6843
7083
|
// src/components/filter-panel/Histogram.vue?vue&type=script&setup=true&lang.ts
|
|
6844
|
-
var _hoisted_1$
|
|
7084
|
+
var _hoisted_1$29 = ["data-eldra-scope"];
|
|
7085
|
+
var _hoisted_2$23 = ["data-inside"];
|
|
6845
7086
|
var ROOT_BASE$1 = "mb-1 flex h-10 w-full items-end gap-0.5";
|
|
6846
7087
|
/** Spec → States, Range: "histogram bars between the thumbs `border-strong`, outside
|
|
6847
7088
|
* `surface-strong`." */
|
|
@@ -6874,6 +7115,7 @@ var Histogram_default = /* @__PURE__ */ defineComponent({
|
|
|
6874
7115
|
* the whole information, and a catalogue whose busiest bucket holds 8% of the products would
|
|
6875
7116
|
* otherwise draw twenty-four flat lines.
|
|
6876
7117
|
*/
|
|
7118
|
+
const eldra = useEldraScope();
|
|
6877
7119
|
const props = __props;
|
|
6878
7120
|
const peak = computed(() => Math.max(...props.bars, 0));
|
|
6879
7121
|
const drawn = computed(() => props.bars.map((count, index) => ({
|
|
@@ -6897,6 +7139,7 @@ var Histogram_default = /* @__PURE__ */ defineComponent({
|
|
|
6897
7139
|
return (_ctx, _cache) => {
|
|
6898
7140
|
return openBlock(), createElementBlock("div", {
|
|
6899
7141
|
"data-eldra-ui": "",
|
|
7142
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
6900
7143
|
"data-part": "histogram",
|
|
6901
7144
|
class: normalizeClass(rootClass.value),
|
|
6902
7145
|
"aria-hidden": "true"
|
|
@@ -6907,12 +7150,14 @@ var Histogram_default = /* @__PURE__ */ defineComponent({
|
|
|
6907
7150
|
"data-inside": bar.inside ? "true" : "false",
|
|
6908
7151
|
class: normalizeClass(barClass(bar)),
|
|
6909
7152
|
style: normalizeStyle({ height: `${bar.height * 100}%` })
|
|
6910
|
-
}, null, 14,
|
|
6911
|
-
}), 128))],
|
|
7153
|
+
}, null, 14, _hoisted_2$23);
|
|
7154
|
+
}), 128))], 10, _hoisted_1$29);
|
|
6912
7155
|
};
|
|
6913
7156
|
}
|
|
6914
7157
|
});
|
|
6915
7158
|
// src/components/filter-panel/facets/RangeFacet.vue?vue&type=script&setup=true&lang.ts
|
|
7159
|
+
var _hoisted_1$28 = ["data-eldra-scope"];
|
|
7160
|
+
var _hoisted_2$22 = ["data-eldra-scope"];
|
|
6916
7161
|
var FIELDS_BASE = "col-span-full grid grid-cols-[1fr_auto_1fr] items-end gap-2";
|
|
6917
7162
|
/** Spec → Sizes: 'Label "Min" / "Max" 0.75rem weight 500 `muted`, 0.125rem above its Input sm.' */
|
|
6918
7163
|
var FIELD_LABEL = "mb-0.5 block text-filter-tile-count font-medium text-muted";
|
|
@@ -6967,6 +7212,7 @@ var RangeFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
6967
7212
|
* maximum adds ' or more'" needs: above the catalogue's highest price there is nothing left to
|
|
6968
7213
|
* exclude, so "$240 or more" is the honest announcement and "$240" is not.
|
|
6969
7214
|
*/
|
|
7215
|
+
const eldra = useEldraScope();
|
|
6970
7216
|
const props = __props;
|
|
6971
7217
|
const emit = __emit;
|
|
6972
7218
|
const m = useMessages(() => props.messages);
|
|
@@ -7087,6 +7333,7 @@ var RangeFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
7087
7333
|
return (_ctx, _cache) => {
|
|
7088
7334
|
return openBlock(), createElementBlock("div", {
|
|
7089
7335
|
"data-eldra-ui": "",
|
|
7336
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
7090
7337
|
"data-part": "range",
|
|
7091
7338
|
class: normalizeClass(rangeClass.value)
|
|
7092
7339
|
}, [createVNode(RangeSlider_default, {
|
|
@@ -7104,6 +7351,7 @@ var RangeFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
7104
7351
|
onChange: onCommit
|
|
7105
7352
|
}, createSlots({
|
|
7106
7353
|
inputs: withCtx(({ step: fieldStep, disabled, commit }) => [createElementVNode("div", {
|
|
7354
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
7107
7355
|
"data-part": "fields",
|
|
7108
7356
|
class: normalizeClass(fieldsClass.value)
|
|
7109
7357
|
}, [
|
|
@@ -7212,7 +7460,7 @@ var RangeFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
7212
7460
|
])]),
|
|
7213
7461
|
_: 2
|
|
7214
7462
|
}, 1032, ["label", "classes"]))
|
|
7215
|
-
],
|
|
7463
|
+
], 10, _hoisted_2$22)]),
|
|
7216
7464
|
_: 2
|
|
7217
7465
|
}, [showTrack.value && __props.facet.histogram && __props.facet.histogram.length > 0 ? {
|
|
7218
7466
|
name: "track",
|
|
@@ -7236,11 +7484,12 @@ var RangeFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
7236
7484
|
"min-label",
|
|
7237
7485
|
"max-label",
|
|
7238
7486
|
"track-visible"
|
|
7239
|
-
])],
|
|
7487
|
+
])], 10, _hoisted_1$28);
|
|
7240
7488
|
};
|
|
7241
7489
|
}
|
|
7242
7490
|
});
|
|
7243
7491
|
// src/components/link/Link.vue?vue&type=script&setup=true&lang.ts
|
|
7492
|
+
var _hoisted_1$27 = ["data-eldra-slot"];
|
|
7244
7493
|
var BASE$1 = "group eldra-focus eldra-link-radius";
|
|
7245
7494
|
/** Spec "Link" → States: `text` by default, `muted` turning `text` on hover. */
|
|
7246
7495
|
var SECTION$2 = "group-data-[section=primary]/section:text-primary-contrast group-data-[section=accent]/section:text-accent-contrast";
|
|
@@ -7285,6 +7534,7 @@ var Link_default = /* @__PURE__ */ defineComponent({
|
|
|
7285
7534
|
as: { default: void 0 }
|
|
7286
7535
|
},
|
|
7287
7536
|
setup(__props) {
|
|
7537
|
+
const eldra = useEldraScope();
|
|
7288
7538
|
const props = __props;
|
|
7289
7539
|
const m = useMessages();
|
|
7290
7540
|
/**
|
|
@@ -7347,14 +7597,16 @@ var Link_default = /* @__PURE__ */ defineComponent({
|
|
|
7347
7597
|
return (_ctx, _cache) => {
|
|
7348
7598
|
return openBlock(), createBlock(resolveDynamicComponent(tag.value), mergeProps({
|
|
7349
7599
|
"data-eldra-ui": "",
|
|
7600
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
7350
7601
|
"data-part": "root",
|
|
7351
7602
|
class: rootClass.value
|
|
7352
7603
|
}, rootAttrs.value), {
|
|
7353
7604
|
default: withCtx(() => [
|
|
7354
7605
|
createElementVNode("span", {
|
|
7606
|
+
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
7355
7607
|
"data-part": "label",
|
|
7356
7608
|
class: normalizeClass(labelClass.value)
|
|
7357
|
-
}, [renderSlot(_ctx.$slots, "default")],
|
|
7609
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$27),
|
|
7358
7610
|
showArrow.value ? (openBlock(), createElementBlock("svg", {
|
|
7359
7611
|
key: 0,
|
|
7360
7612
|
"data-part": "arrow",
|
|
@@ -7393,17 +7645,14 @@ var Link_default = /* @__PURE__ */ defineComponent({
|
|
|
7393
7645
|
})], 64)) : createCommentVNode("", true)
|
|
7394
7646
|
]),
|
|
7395
7647
|
_: 3
|
|
7396
|
-
}, 16, ["class"]);
|
|
7648
|
+
}, 16, ["data-eldra-scope", "class"]);
|
|
7397
7649
|
};
|
|
7398
7650
|
}
|
|
7399
7651
|
});
|
|
7400
7652
|
// src/components/filter-panel/facets/SizeFacet.vue?vue&type=script&setup=true&lang.ts
|
|
7401
|
-
var _hoisted_1$
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
};
|
|
7405
|
-
var _hoisted_2$13 = ["data-value"];
|
|
7406
|
-
var _hoisted_3$8 = [
|
|
7653
|
+
var _hoisted_1$26 = ["data-eldra-scope"];
|
|
7654
|
+
var _hoisted_2$21 = ["data-value"];
|
|
7655
|
+
var _hoisted_3$14 = [
|
|
7407
7656
|
"value",
|
|
7408
7657
|
"checked",
|
|
7409
7658
|
"disabled",
|
|
@@ -7468,6 +7717,7 @@ var SizeFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
7468
7717
|
* see `sizeSystemGroups`. A store that has not told us its systems gets one grid and no
|
|
7469
7718
|
* sub-headings, which is the honest rendering of "we do not know" rather than an invented heading.
|
|
7470
7719
|
*/
|
|
7720
|
+
const eldra = useEldraScope();
|
|
7471
7721
|
const props = __props;
|
|
7472
7722
|
const emit = __emit;
|
|
7473
7723
|
const m = useMessages(() => props.messages);
|
|
@@ -7504,7 +7754,11 @@ var SizeFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
7504
7754
|
const tileLabelClass = computed(() => partClass("", props.classes, "tileLabel"));
|
|
7505
7755
|
const sizeGuideClass = computed(() => partClass(SIZE_GUIDE_BASE, props.classes, "sizeGuide"));
|
|
7506
7756
|
return (_ctx, _cache) => {
|
|
7507
|
-
return openBlock(), createElementBlock("div",
|
|
7757
|
+
return openBlock(), createElementBlock("div", {
|
|
7758
|
+
"data-eldra-ui": "",
|
|
7759
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
7760
|
+
class: "min-w-0"
|
|
7761
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(groups.value, (group, index) => {
|
|
7508
7762
|
return openBlock(), createElementBlock(Fragment, { key: group.key ?? "" }, [group.key !== void 0 ? (openBlock(), createElementBlock("p", {
|
|
7509
7763
|
key: 0,
|
|
7510
7764
|
"data-part": "subheading",
|
|
@@ -7526,11 +7780,11 @@ var SizeFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
7526
7780
|
disabled: disabled(value),
|
|
7527
7781
|
"aria-label": nameOf(value),
|
|
7528
7782
|
onChange: ($event) => emit("toggle", value.value, $event.target.checked)
|
|
7529
|
-
}, null, 40, _hoisted_3$
|
|
7783
|
+
}, null, 40, _hoisted_3$14), createElementVNode("span", {
|
|
7530
7784
|
"data-part": "tileLabel",
|
|
7531
7785
|
class: normalizeClass(tileLabelClass.value),
|
|
7532
7786
|
"aria-hidden": "true"
|
|
7533
|
-
}, toDisplayString(value.label), 3)], 10, _hoisted_2$
|
|
7787
|
+
}, toDisplayString(value.label), 3)], 10, _hoisted_2$21);
|
|
7534
7788
|
}), 128))], 2)], 64);
|
|
7535
7789
|
}), 128)), __props.facet.sizeGuideHref ? (openBlock(), createBlock(Link_default, {
|
|
7536
7790
|
key: 0,
|
|
@@ -7540,12 +7794,13 @@ var SizeFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
7540
7794
|
}, {
|
|
7541
7795
|
default: withCtx(() => [createTextVNode(toDisplayString(unref(m).filterPanelSizeGuide), 1)]),
|
|
7542
7796
|
_: 1
|
|
7543
|
-
}, 8, ["href", "classes"])) : createCommentVNode("", true)]);
|
|
7797
|
+
}, 8, ["href", "classes"])) : createCommentVNode("", true)], 8, _hoisted_1$26);
|
|
7544
7798
|
};
|
|
7545
7799
|
}
|
|
7546
7800
|
});
|
|
7547
7801
|
// src/components/filter-panel/facets/ToggleFacet.vue?vue&type=script&setup=true&lang.ts
|
|
7548
|
-
var _hoisted_1$
|
|
7802
|
+
var _hoisted_1$25 = ["data-eldra-scope"];
|
|
7803
|
+
var _hoisted_2$20 = ["data-value"];
|
|
7549
7804
|
var VALUES_BASE = "flex min-w-0 flex-col gap-1";
|
|
7550
7805
|
/**
|
|
7551
7806
|
* Spec → Sizes, Switch row: "Min 2.25rem tall, space-between, 0.75rem gap."
|
|
@@ -7587,6 +7842,7 @@ var ToggleFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
7587
7842
|
* *outside* the switch as plain text (spec → Accessibility: "The count is plain text beside it"):
|
|
7588
7843
|
* inside, it would become part of the switch's name and be read as though it were the state.
|
|
7589
7844
|
*/
|
|
7845
|
+
const eldra = useEldraScope();
|
|
7590
7846
|
const props = __props;
|
|
7591
7847
|
const emit = __emit;
|
|
7592
7848
|
const values = computed(() => visibleFacetValues(props.facet));
|
|
@@ -7600,6 +7856,7 @@ var ToggleFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
7600
7856
|
return (_ctx, _cache) => {
|
|
7601
7857
|
return openBlock(), createElementBlock("div", {
|
|
7602
7858
|
"data-eldra-ui": "",
|
|
7859
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
7603
7860
|
"data-part": "values",
|
|
7604
7861
|
class: normalizeClass(valuesClass.value)
|
|
7605
7862
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(values.value, (value) => {
|
|
@@ -7625,21 +7882,21 @@ var ToggleFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
7625
7882
|
]), createElementVNode("span", {
|
|
7626
7883
|
"data-part": "count",
|
|
7627
7884
|
class: normalizeClass(countClass.value)
|
|
7628
|
-
}, toDisplayString(value.count), 3)], 10,
|
|
7629
|
-
}), 128))],
|
|
7885
|
+
}, toDisplayString(value.count), 3)], 10, _hoisted_2$20);
|
|
7886
|
+
}), 128))], 10, _hoisted_1$25);
|
|
7630
7887
|
};
|
|
7631
7888
|
}
|
|
7632
7889
|
});
|
|
7633
7890
|
// src/components/filter-panel/FilterGroup.vue?vue&type=script&setup=true&lang.ts
|
|
7634
|
-
var _hoisted_1$
|
|
7635
|
-
var _hoisted_2$
|
|
7636
|
-
var _hoisted_3$
|
|
7891
|
+
var _hoisted_1$24 = ["data-eldra-scope", "data-facet"];
|
|
7892
|
+
var _hoisted_2$19 = { class: "m-0" };
|
|
7893
|
+
var _hoisted_3$13 = [
|
|
7637
7894
|
"id",
|
|
7638
7895
|
"aria-expanded",
|
|
7639
7896
|
"aria-controls"
|
|
7640
7897
|
];
|
|
7641
|
-
var _hoisted_4$
|
|
7642
|
-
var _hoisted_5$6 = ["id"];
|
|
7898
|
+
var _hoisted_4$8 = ["data-eldra-scope"];
|
|
7899
|
+
var _hoisted_5$6 = ["data-eldra-slot", "id"];
|
|
7643
7900
|
var GROUP_BASE = "border-border border-b";
|
|
7644
7901
|
/**
|
|
7645
7902
|
* Spec → Sizes, Trigger row: "Full width, min 3rem tall, padding 0.75rem 0, gap 0.5rem,
|
|
@@ -7711,6 +7968,7 @@ var FilterGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
7711
7968
|
* into its search field, whether they pressed **Show all N**) across a collapse, and unmounting
|
|
7712
7969
|
* the body would silently throw both away on every close.
|
|
7713
7970
|
*/
|
|
7971
|
+
const eldra = useEldraScope();
|
|
7714
7972
|
const props = __props;
|
|
7715
7973
|
const emit = __emit;
|
|
7716
7974
|
const m = useMessages(() => props.messages);
|
|
@@ -7743,10 +8001,11 @@ var FilterGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
7743
8001
|
return (_ctx, _cache) => {
|
|
7744
8002
|
return openBlock(), createElementBlock("div", {
|
|
7745
8003
|
"data-eldra-ui": "",
|
|
8004
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
7746
8005
|
"data-part": "group",
|
|
7747
8006
|
"data-facet": __props.facet.id,
|
|
7748
8007
|
class: normalizeClass(groupClass.value)
|
|
7749
|
-
}, [createElementVNode("h3", _hoisted_2$
|
|
8008
|
+
}, [createElementVNode("h3", _hoisted_2$19, [createElementVNode("button", {
|
|
7750
8009
|
ref_key: "triggerEl",
|
|
7751
8010
|
ref: triggerEl,
|
|
7752
8011
|
type: "button",
|
|
@@ -7769,7 +8028,10 @@ var FilterGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
7769
8028
|
classes: { root: badgeClass.value },
|
|
7770
8029
|
"hidden-suffix": unref(m).selectedCount(__props.count)
|
|
7771
8030
|
}, {
|
|
7772
|
-
default: withCtx(() => [createElementVNode("span",
|
|
8031
|
+
default: withCtx(() => [createElementVNode("span", {
|
|
8032
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
8033
|
+
"aria-hidden": "true"
|
|
8034
|
+
}, toDisplayString(__props.count), 9, _hoisted_4$8)]),
|
|
7773
8035
|
_: 1
|
|
7774
8036
|
}, 8, ["classes", "hidden-suffix"])) : createCommentVNode("", true),
|
|
7775
8037
|
__props.summary.length > 0 ? (openBlock(), createElementBlock("span", {
|
|
@@ -7789,7 +8051,8 @@ var FilterGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
7789
8051
|
"aria-hidden": "true",
|
|
7790
8052
|
focusable: "false"
|
|
7791
8053
|
}, [..._cache[1] || (_cache[1] = [createElementVNode("path", { d: "M6 9l6 6l6 -6" }, null, -1)])], 2))
|
|
7792
|
-
], 10, _hoisted_3$
|
|
8054
|
+
], 10, _hoisted_3$13)]), withDirectives(createElementVNode("fieldset", {
|
|
8055
|
+
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
7793
8056
|
"data-part": "body",
|
|
7794
8057
|
id: __props.panelId,
|
|
7795
8058
|
class: normalizeClass(bodyClass.value),
|
|
@@ -7800,13 +8063,14 @@ var FilterGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
7800
8063
|
}, {
|
|
7801
8064
|
default: withCtx(() => [createTextVNode(toDisplayString(__props.facet.label), 1)]),
|
|
7802
8065
|
_: 1
|
|
7803
|
-
}, 8, ["classes"]), renderSlot(_ctx.$slots, "default")], 42, _hoisted_5$6), [[vShow, __props.open]])], 10, _hoisted_1$
|
|
8066
|
+
}, 8, ["classes"]), renderSlot(_ctx.$slots, "default")], 42, _hoisted_5$6), [[vShow, __props.open]])], 10, _hoisted_1$24);
|
|
7804
8067
|
};
|
|
7805
8068
|
}
|
|
7806
8069
|
});
|
|
7807
8070
|
// src/components/filter-panel/FilterPanel.vue?vue&type=script&setup=true&lang.ts
|
|
7808
|
-
var _hoisted_1$
|
|
7809
|
-
var _hoisted_2$
|
|
8071
|
+
var _hoisted_1$23 = ["data-eldra-scope", "aria-label"];
|
|
8072
|
+
var _hoisted_2$18 = ["aria-label"];
|
|
8073
|
+
var _hoisted_3$12 = ["data-eldra-slot"];
|
|
7810
8074
|
var ROOT_BASE = "@container min-w-0 text-control text-text";
|
|
7811
8075
|
/**
|
|
7812
8076
|
* The gutter the rows' own bleed needs, and it is load-bearing. The spec gives every option and
|
|
@@ -7882,6 +8146,7 @@ var FilterPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
7882
8146
|
* thresholds, which values are disabled — is a pure function in `useFilterPanel.ts`, and the check
|
|
7883
8147
|
* mark's ink is `swatchInk.ts`. This file is the markup and the focus management.
|
|
7884
8148
|
*/
|
|
8149
|
+
const eldra = useEldraScope();
|
|
7885
8150
|
const props = __props;
|
|
7886
8151
|
const emit = __emit;
|
|
7887
8152
|
const m = useMessages(() => props.messages);
|
|
@@ -8024,6 +8289,7 @@ var FilterPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
8024
8289
|
return (_ctx, _cache) => {
|
|
8025
8290
|
return openBlock(), createElementBlock("form", {
|
|
8026
8291
|
"data-eldra-ui": "",
|
|
8292
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
8027
8293
|
"data-part": "root",
|
|
8028
8294
|
class: normalizeClass(rootClass.value),
|
|
8029
8295
|
"aria-label": __props.label ?? unref(m).filterPanelLabel,
|
|
@@ -8077,7 +8343,7 @@ var FilterPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
8077
8343
|
"messages",
|
|
8078
8344
|
"onRemove"
|
|
8079
8345
|
])]);
|
|
8080
|
-
}), 128))], 10, _hoisted_2$
|
|
8346
|
+
}), 128))], 10, _hoisted_2$18)) : createCommentVNode("", true),
|
|
8081
8347
|
(openBlock(true), createElementBlock(Fragment, null, renderList(drawn.value, (facet, index) => {
|
|
8082
8348
|
return openBlock(), createBlock(FilterGroup_default, {
|
|
8083
8349
|
key: facet.id,
|
|
@@ -8206,6 +8472,7 @@ var FilterPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
8206
8472
|
}), 128)),
|
|
8207
8473
|
__props.mode === "drawer" ? (openBlock(), createElementBlock("div", {
|
|
8208
8474
|
key: 2,
|
|
8475
|
+
"data-eldra-slot": unref(eldra).slotHost("foot"),
|
|
8209
8476
|
"data-part": "foot",
|
|
8210
8477
|
class: normalizeClass(footClass.value)
|
|
8211
8478
|
}, [renderSlot(_ctx.$slots, "foot", {
|
|
@@ -8229,19 +8496,19 @@ var FilterPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
8229
8496
|
}, {
|
|
8230
8497
|
default: withCtx(() => [createTextVNode(toDisplayString(__props.resultCount === null ? unref(m).filterPanelShowProducts : unref(m).filterPanelShowResults(__props.resultCount)), 1)]),
|
|
8231
8498
|
_: 1
|
|
8232
|
-
})])],
|
|
8233
|
-
], 42, _hoisted_1$
|
|
8499
|
+
})])], 10, _hoisted_3$12)) : createCommentVNode("", true)
|
|
8500
|
+
], 42, _hoisted_1$23);
|
|
8234
8501
|
};
|
|
8235
8502
|
}
|
|
8236
8503
|
});
|
|
8237
8504
|
// src/components/lightbox/Lightbox.vue?vue&type=script&setup=true&lang.ts
|
|
8238
|
-
var _hoisted_1$
|
|
8239
|
-
var _hoisted_2$
|
|
8240
|
-
var _hoisted_3$
|
|
8241
|
-
var _hoisted_4$
|
|
8505
|
+
var _hoisted_1$22 = ["data-eldra-scope", "aria-label"];
|
|
8506
|
+
var _hoisted_2$17 = { key: 1 };
|
|
8507
|
+
var _hoisted_3$11 = ["aria-label"];
|
|
8508
|
+
var _hoisted_4$7 = ["disabled", "aria-label"];
|
|
8242
8509
|
var _hoisted_5$5 = ["aria-label"];
|
|
8243
|
-
var _hoisted_6$
|
|
8244
|
-
var _hoisted_7$
|
|
8510
|
+
var _hoisted_6$3 = ["disabled", "aria-label"];
|
|
8511
|
+
var _hoisted_7$3 = [
|
|
8245
8512
|
"aria-current",
|
|
8246
8513
|
"aria-label",
|
|
8247
8514
|
"onClick"
|
|
@@ -8294,6 +8561,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
|
|
|
8294
8561
|
* not a `loading` attribute (see the template's own comment on the track for why the *wrapper*
|
|
8295
8562
|
* stays mounted).
|
|
8296
8563
|
*/
|
|
8564
|
+
const eldra = useEldraScope();
|
|
8297
8565
|
const props = __props;
|
|
8298
8566
|
const emit = __emit;
|
|
8299
8567
|
const m = useMessages(() => props.messages);
|
|
@@ -8497,6 +8765,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
|
|
|
8497
8765
|
ref_key: "dialogEl",
|
|
8498
8766
|
ref: dialogEl,
|
|
8499
8767
|
"data-eldra-ui": "",
|
|
8768
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
8500
8769
|
"data-part": "root",
|
|
8501
8770
|
class: normalizeClass(rootClass.value),
|
|
8502
8771
|
"aria-label": __props.ariaLabel,
|
|
@@ -8512,7 +8781,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
|
|
|
8512
8781
|
"data-part": "counter",
|
|
8513
8782
|
"aria-hidden": "true",
|
|
8514
8783
|
class: normalizeClass(counterClass.value)
|
|
8515
|
-
}, toDisplayString(unref(m).counter(unref(carouselIndex) + 1, unref(count))), 3)) : (openBlock(), createElementBlock("span", _hoisted_2$
|
|
8784
|
+
}, toDisplayString(unref(m).counter(unref(carouselIndex) + 1, unref(count))), 3)) : (openBlock(), createElementBlock("span", _hoisted_2$17)), createElementVNode("button", {
|
|
8516
8785
|
ref_key: "closeButtonEl",
|
|
8517
8786
|
ref: closeButtonEl,
|
|
8518
8787
|
type: "button",
|
|
@@ -8530,7 +8799,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
|
|
|
8530
8799
|
"stroke-linejoin": "round",
|
|
8531
8800
|
"aria-hidden": "true",
|
|
8532
8801
|
focusable: "false"
|
|
8533
|
-
}, [createElementVNode("path", { d: "M18 6l-12 12" }), createElementVNode("path", { d: "M6 6l12 12" })], -1)])], 10, _hoisted_3$
|
|
8802
|
+
}, [createElementVNode("path", { d: "M18 6l-12 12" }), createElementVNode("path", { d: "M6 6l12 12" })], -1)])], 10, _hoisted_3$11)]),
|
|
8534
8803
|
createElementVNode("div", { class: normalizeClass(stageClass.value) }, [
|
|
8535
8804
|
!single.value ? (openBlock(), createElementBlock("button", {
|
|
8536
8805
|
key: 0,
|
|
@@ -8552,7 +8821,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
|
|
|
8552
8821
|
"stroke-linejoin": "round",
|
|
8553
8822
|
"aria-hidden": "true",
|
|
8554
8823
|
focusable: "false"
|
|
8555
|
-
}, [createElementVNode("path", { d: "M15 6l-6 6l6 6" })], -1)])], 10, _hoisted_4$
|
|
8824
|
+
}, [createElementVNode("path", { d: "M15 6l-6 6l6 6" })], -1)])], 10, _hoisted_4$7)) : createCommentVNode("", true),
|
|
8556
8825
|
createElementVNode("div", {
|
|
8557
8826
|
ref_key: "trackRef",
|
|
8558
8827
|
ref: trackRef,
|
|
@@ -8612,7 +8881,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
|
|
|
8612
8881
|
"stroke-linejoin": "round",
|
|
8613
8882
|
"aria-hidden": "true",
|
|
8614
8883
|
focusable: "false"
|
|
8615
|
-
}, [createElementVNode("path", { d: "M9 6l6 6l-6 6" })], -1)])], 10, _hoisted_6$
|
|
8884
|
+
}, [createElementVNode("path", { d: "M9 6l6 6l-6 6" })], -1)])], 10, _hoisted_6$3)) : createCommentVNode("", true)
|
|
8616
8885
|
], 2),
|
|
8617
8886
|
showThumbnails.value && unref(model) ? (openBlock(), createElementBlock("div", {
|
|
8618
8887
|
key: 0,
|
|
@@ -8635,15 +8904,16 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
|
|
|
8635
8904
|
decorative: "",
|
|
8636
8905
|
ratio: "1x1",
|
|
8637
8906
|
fit: "cover"
|
|
8638
|
-
}, null, 8, ["media"])], 10, _hoisted_7$
|
|
8907
|
+
}, null, 8, ["media"])], 10, _hoisted_7$3);
|
|
8639
8908
|
}), 128))], 2)) : createCommentVNode("", true)
|
|
8640
|
-
], 2)], 42, _hoisted_1$
|
|
8909
|
+
], 2)], 42, _hoisted_1$22);
|
|
8641
8910
|
};
|
|
8642
8911
|
}
|
|
8643
8912
|
});
|
|
8644
8913
|
// src/components/load-more/LoadMore.vue?vue&type=script&setup=true&lang.ts
|
|
8645
|
-
var _hoisted_1$
|
|
8646
|
-
var _hoisted_2$
|
|
8914
|
+
var _hoisted_1$21 = ["data-eldra-scope"];
|
|
8915
|
+
var _hoisted_2$16 = ["id"];
|
|
8916
|
+
var _hoisted_3$10 = ["aria-describedby", "aria-busy"];
|
|
8647
8917
|
var meterTrackClass = "h-1 w-full max-w-56 overflow-hidden rounded-full bg-surface-strong";
|
|
8648
8918
|
var meterFillClass = "h-full rounded-full bg-text transition-[width] duration-base ease-out motion-reduce:transition-none";
|
|
8649
8919
|
// src/components/load-more/LoadMore.vue
|
|
@@ -8661,6 +8931,7 @@ var LoadMore_default = /* @__PURE__ */ defineComponent({
|
|
|
8661
8931
|
},
|
|
8662
8932
|
emits: ["load"],
|
|
8663
8933
|
setup(__props, { emit: __emit }) {
|
|
8934
|
+
const eldra = useEldraScope();
|
|
8664
8935
|
const props = __props;
|
|
8665
8936
|
const emit = __emit;
|
|
8666
8937
|
const m = useMessages();
|
|
@@ -8688,6 +8959,7 @@ var LoadMore_default = /* @__PURE__ */ defineComponent({
|
|
|
8688
8959
|
return (_ctx, _cache) => {
|
|
8689
8960
|
return openBlock(), createElementBlock("div", {
|
|
8690
8961
|
"data-eldra-ui": "",
|
|
8962
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
8691
8963
|
"data-part": "root",
|
|
8692
8964
|
class: normalizeClass(rootClass.value)
|
|
8693
8965
|
}, [
|
|
@@ -8697,7 +8969,7 @@ var LoadMore_default = /* @__PURE__ */ defineComponent({
|
|
|
8697
8969
|
class: normalizeClass(statusClass.value),
|
|
8698
8970
|
role: "status",
|
|
8699
8971
|
"aria-live": "polite"
|
|
8700
|
-
}, toDisplayString(unref(m).showingOf(__props.shown, __props.total, __props.noun)), 11,
|
|
8972
|
+
}, toDisplayString(unref(m).showingOf(__props.shown, __props.total, __props.noun)), 11, _hoisted_2$16),
|
|
8701
8973
|
createElementVNode("div", {
|
|
8702
8974
|
class: normalizeClass(meterTrackClass),
|
|
8703
8975
|
"aria-hidden": "true"
|
|
@@ -8716,14 +8988,14 @@ var LoadMore_default = /* @__PURE__ */ defineComponent({
|
|
|
8716
8988
|
}, [__props.pending ? (openBlock(), createBlock(Spinner_default, {
|
|
8717
8989
|
key: 0,
|
|
8718
8990
|
class: "size-4.5"
|
|
8719
|
-
})) : createCommentVNode("", true), createElementVNode("span", null, toDisplayString(unref(m).loadMore), 1)], 10,
|
|
8720
|
-
],
|
|
8991
|
+
})) : createCommentVNode("", true), createElementVNode("span", null, toDisplayString(unref(m).loadMore), 1)], 10, _hoisted_3$10)) : createCommentVNode("", true)
|
|
8992
|
+
], 10, _hoisted_1$21);
|
|
8721
8993
|
};
|
|
8722
8994
|
}
|
|
8723
8995
|
});
|
|
8724
8996
|
// src/components/logo-item/LogoItem.vue?vue&type=script&setup=true&lang.ts
|
|
8725
|
-
var _hoisted_1$
|
|
8726
|
-
var _hoisted_2$
|
|
8997
|
+
var _hoisted_1$20 = ["data-eldra-scope", "data-part"];
|
|
8998
|
+
var _hoisted_2$15 = [
|
|
8727
8999
|
"src",
|
|
8728
9000
|
"srcset",
|
|
8729
9001
|
"sizes",
|
|
@@ -8731,7 +9003,7 @@ var _hoisted_2$8 = [
|
|
|
8731
9003
|
"height",
|
|
8732
9004
|
"alt"
|
|
8733
9005
|
];
|
|
8734
|
-
var _hoisted_3$
|
|
9006
|
+
var _hoisted_3$9 = [
|
|
8735
9007
|
"src",
|
|
8736
9008
|
"srcset",
|
|
8737
9009
|
"sizes",
|
|
@@ -8751,6 +9023,7 @@ var LogoItem_default = /* @__PURE__ */ defineComponent({
|
|
|
8751
9023
|
classes: { default: void 0 }
|
|
8752
9024
|
},
|
|
8753
9025
|
setup(__props) {
|
|
9026
|
+
const eldra = useEldraScope();
|
|
8754
9027
|
const props = __props;
|
|
8755
9028
|
const messages = useMessages();
|
|
8756
9029
|
/**
|
|
@@ -8837,6 +9110,7 @@ var LogoItem_default = /* @__PURE__ */ defineComponent({
|
|
|
8837
9110
|
return (_ctx, _cache) => {
|
|
8838
9111
|
return openBlock(), createElementBlock("li", {
|
|
8839
9112
|
"data-eldra-ui": "",
|
|
9113
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
8840
9114
|
"data-part": hasHref.value ? void 0 : "root",
|
|
8841
9115
|
class: normalizeClass(hasHref.value ? void 0 : rootClass.value)
|
|
8842
9116
|
}, [hasHref.value ? (openBlock(), createBlock(resolveDynamicComponent(cellTag.value), mergeProps({
|
|
@@ -8856,7 +9130,7 @@ var LogoItem_default = /* @__PURE__ */ defineComponent({
|
|
|
8856
9130
|
alt: __props.name,
|
|
8857
9131
|
loading: "lazy",
|
|
8858
9132
|
decoding: "async"
|
|
8859
|
-
}, null, 10, _hoisted_2$
|
|
9133
|
+
}, null, 10, _hoisted_2$15)) : (openBlock(), createElementBlock("span", {
|
|
8860
9134
|
key: 1,
|
|
8861
9135
|
"data-part": "wordmark",
|
|
8862
9136
|
class: normalizeClass(wordmarkClass.value)
|
|
@@ -8878,11 +9152,11 @@ var LogoItem_default = /* @__PURE__ */ defineComponent({
|
|
|
8878
9152
|
alt: __props.name,
|
|
8879
9153
|
loading: "lazy",
|
|
8880
9154
|
decoding: "async"
|
|
8881
|
-
}, null, 10, _hoisted_3$
|
|
9155
|
+
}, null, 10, _hoisted_3$9)) : (openBlock(), createElementBlock("span", {
|
|
8882
9156
|
key: 1,
|
|
8883
9157
|
"data-part": "wordmark",
|
|
8884
9158
|
class: normalizeClass(wordmarkClass.value)
|
|
8885
|
-
}, toDisplayString(__props.name), 3))], 64))], 10, _hoisted_1$
|
|
9159
|
+
}, toDisplayString(__props.name), 3))], 64))], 10, _hoisted_1$20);
|
|
8886
9160
|
};
|
|
8887
9161
|
}
|
|
8888
9162
|
});
|
|
@@ -8949,13 +9223,17 @@ function navLinkAttrs(link, linkAs) {
|
|
|
8949
9223
|
return attrs;
|
|
8950
9224
|
}
|
|
8951
9225
|
// src/components/nav-menu/NavMenuPanel.vue?vue&type=script&setup=true&lang.ts
|
|
8952
|
-
var _hoisted_1$
|
|
8953
|
-
var _hoisted_2$
|
|
8954
|
-
var _hoisted_3$
|
|
8955
|
-
|
|
9226
|
+
var _hoisted_1$19 = ["data-eldra-scope", "data-part"];
|
|
9227
|
+
var _hoisted_2$14 = ["data-part"];
|
|
9228
|
+
var _hoisted_3$8 = [
|
|
9229
|
+
"data-eldra-slot",
|
|
9230
|
+
"id",
|
|
9231
|
+
"data-part"
|
|
9232
|
+
];
|
|
9233
|
+
var _hoisted_4$6 = ["data-part", "aria-labelledby"];
|
|
8956
9234
|
var _hoisted_5$4 = ["data-part"];
|
|
8957
|
-
var _hoisted_6 = ["data-part"];
|
|
8958
|
-
var _hoisted_7 = ["data-part"];
|
|
9235
|
+
var _hoisted_6$2 = ["data-part"];
|
|
9236
|
+
var _hoisted_7$2 = ["data-part"];
|
|
8959
9237
|
// src/components/nav-menu/NavMenuPanel.vue
|
|
8960
9238
|
var NavMenuPanel_default = /* @__PURE__ */ defineComponent({
|
|
8961
9239
|
__name: "NavMenuPanel",
|
|
@@ -8971,6 +9249,7 @@ var NavMenuPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
8971
9249
|
omitOverview: { type: Boolean }
|
|
8972
9250
|
},
|
|
8973
9251
|
setup(__props) {
|
|
9252
|
+
const eldra = useEldraScope();
|
|
8974
9253
|
const props = __props;
|
|
8975
9254
|
const links = computed(() => panelLinks(props.item));
|
|
8976
9255
|
const groups = computed(() => groupLinks(links.value));
|
|
@@ -9025,6 +9304,7 @@ var NavMenuPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
9025
9304
|
return openBlock(), createElementBlock(Fragment, null, [unref(hasHref)(__props.item) && !__props.omitOverview ? (openBlock(), createBlock(resolveDynamicComponent(unref(navLinkTag)(__props.item, __props.linkAs)), mergeProps({
|
|
9026
9305
|
key: 0,
|
|
9027
9306
|
"data-eldra-ui": "",
|
|
9307
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
9028
9308
|
"data-part": part("overview"),
|
|
9029
9309
|
class: overviewClass.value
|
|
9030
9310
|
}, unref(navLinkAttrs)(__props.item, __props.linkAs)), {
|
|
@@ -9033,8 +9313,13 @@ var NavMenuPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
9033
9313
|
_: 1
|
|
9034
9314
|
})) : createCommentVNode("", true)]),
|
|
9035
9315
|
_: 1
|
|
9036
|
-
}, 16, [
|
|
9316
|
+
}, 16, [
|
|
9317
|
+
"data-eldra-scope",
|
|
9318
|
+
"data-part",
|
|
9319
|
+
"class"
|
|
9320
|
+
])) : createCommentVNode("", true), createElementVNode("div", {
|
|
9037
9321
|
"data-eldra-ui": "",
|
|
9322
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
9038
9323
|
"data-part": part("columns"),
|
|
9039
9324
|
class: normalizeClass(columnsClass.value)
|
|
9040
9325
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(groups.value, (group, index) => {
|
|
@@ -9044,6 +9329,7 @@ var NavMenuPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
9044
9329
|
class: normalizeClass(groupClass.value)
|
|
9045
9330
|
}, [group.group !== null ? (openBlock(), createElementBlock("span", {
|
|
9046
9331
|
key: 0,
|
|
9332
|
+
"data-eldra-slot": unref(eldra).slotHost("groupHeading"),
|
|
9047
9333
|
id: headingId(index),
|
|
9048
9334
|
"data-part": part("groupHeading"),
|
|
9049
9335
|
class: normalizeClass(groupHeadingClass.value)
|
|
@@ -9062,7 +9348,7 @@ var NavMenuPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
9062
9348
|
_: 1
|
|
9063
9349
|
})) : createCommentVNode("", true)]),
|
|
9064
9350
|
_: 2
|
|
9065
|
-
}, 1040, ["data-part", "class"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(group.group), 1)], 64))])], 10, _hoisted_3$
|
|
9351
|
+
}, 1040, ["data-part", "class"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(group.group), 1)], 64))])], 10, _hoisted_3$8)) : createCommentVNode("", true), createElementVNode("ul", {
|
|
9066
9352
|
"data-part": part("panelList"),
|
|
9067
9353
|
class: normalizeClass(panelListClass.value),
|
|
9068
9354
|
"aria-labelledby": listLabel(group.group, index)
|
|
@@ -9072,6 +9358,7 @@ var NavMenuPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
9072
9358
|
"data-part": part("panelItem"),
|
|
9073
9359
|
class: normalizeClass(panelItemClass.value)
|
|
9074
9360
|
}, [(openBlock(), createBlock(resolveDynamicComponent(unref(navLinkTag)(link, __props.linkAs)), mergeProps({
|
|
9361
|
+
"data-eldra-slot": unref(eldra).slotHost("panelItem"),
|
|
9075
9362
|
"data-part": part("panelLink"),
|
|
9076
9363
|
class: panelLinkClass(link)
|
|
9077
9364
|
}, { ref_for: true }, unref(navLinkAttrs)(link, __props.linkAs)), {
|
|
@@ -9086,18 +9373,22 @@ var NavMenuPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
9086
9373
|
key: 0,
|
|
9087
9374
|
label: link.badge,
|
|
9088
9375
|
classes: badgeClasses.value
|
|
9089
|
-
}, null, 8, ["label", "classes"])) : createCommentVNode("", true)], 10, _hoisted_6), link.description ? (openBlock(), createElementBlock("span", {
|
|
9376
|
+
}, null, 8, ["label", "classes"])) : createCommentVNode("", true)], 10, _hoisted_6$2), link.description ? (openBlock(), createElementBlock("span", {
|
|
9090
9377
|
key: 0,
|
|
9091
9378
|
"data-part": part("description"),
|
|
9092
9379
|
class: normalizeClass(descriptionClass.value)
|
|
9093
|
-
}, toDisplayString(link.description), 11, _hoisted_7)) : createCommentVNode("", true)]), link.newTab && unref(hasHref)(link) ? (openBlock(), createBlock(VisuallyHidden_default, { key: 0 }, {
|
|
9380
|
+
}, toDisplayString(link.description), 11, _hoisted_7$2)) : createCommentVNode("", true)]), link.newTab && unref(hasHref)(link) ? (openBlock(), createBlock(VisuallyHidden_default, { key: 0 }, {
|
|
9094
9381
|
default: withCtx(() => [createTextVNode(toDisplayString(__props.messages.opensInNewTab), 1)]),
|
|
9095
9382
|
_: 1
|
|
9096
9383
|
})) : createCommentVNode("", true)]),
|
|
9097
9384
|
_: 2
|
|
9098
|
-
}, 1040, [
|
|
9099
|
-
|
|
9100
|
-
|
|
9385
|
+
}, 1040, [
|
|
9386
|
+
"data-eldra-slot",
|
|
9387
|
+
"data-part",
|
|
9388
|
+
"class"
|
|
9389
|
+
]))], 10, _hoisted_5$4);
|
|
9390
|
+
}), 128))], 10, _hoisted_4$6)], 10, _hoisted_2$14);
|
|
9391
|
+
}), 128))], 10, _hoisted_1$19)], 64);
|
|
9101
9392
|
};
|
|
9102
9393
|
}
|
|
9103
9394
|
});
|
|
@@ -9214,21 +9505,26 @@ function useNavMenuKeys(options) {
|
|
|
9214
9505
|
};
|
|
9215
9506
|
}
|
|
9216
9507
|
// src/components/nav-menu/NavMenu.vue?vue&type=script&setup=true&lang.ts
|
|
9217
|
-
var _hoisted_1$
|
|
9218
|
-
var _hoisted_2$
|
|
9508
|
+
var _hoisted_1$18 = ["data-eldra-scope"];
|
|
9509
|
+
var _hoisted_2$13 = ["aria-label"];
|
|
9510
|
+
var _hoisted_3$7 = [
|
|
9219
9511
|
"aria-expanded",
|
|
9220
9512
|
"aria-controls",
|
|
9221
9513
|
"data-current",
|
|
9222
9514
|
"onClick",
|
|
9223
9515
|
"onPointerenter"
|
|
9224
9516
|
];
|
|
9225
|
-
var
|
|
9226
|
-
var
|
|
9517
|
+
var _hoisted_4$5 = ["data-eldra-slot"];
|
|
9518
|
+
var _hoisted_5$3 = ["id"];
|
|
9519
|
+
var _hoisted_6$1 = ["data-eldra-slot"];
|
|
9520
|
+
var _hoisted_7$1 = [
|
|
9521
|
+
"data-eldra-slot",
|
|
9227
9522
|
"aria-label",
|
|
9228
9523
|
"aria-expanded",
|
|
9229
9524
|
"aria-controls"
|
|
9230
9525
|
];
|
|
9231
|
-
var
|
|
9526
|
+
var _hoisted_8$1 = ["data-eldra-scope", "aria-label"];
|
|
9527
|
+
var _hoisted_9$1 = ["data-eldra-scope"];
|
|
9232
9528
|
var HOVER_INTENT_MS = 150;
|
|
9233
9529
|
var HOVER_FILL = "hover:bg-[color-mix(in_oklab,var(--eldra-color-text),transparent_94%)]";
|
|
9234
9530
|
/** A top-level entry's colours at rest, hovered, open (`aria-expanded`) and current. */
|
|
@@ -9260,6 +9556,7 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
9260
9556
|
},
|
|
9261
9557
|
emits: ["update:modelValue", "update:drawerOpen"],
|
|
9262
9558
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
9559
|
+
const eldra = useEldraScope();
|
|
9263
9560
|
const props = __props;
|
|
9264
9561
|
const emit = __emit;
|
|
9265
9562
|
const slots = useSlots();
|
|
@@ -9465,6 +9762,7 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
9465
9762
|
return (_ctx, _cache) => {
|
|
9466
9763
|
return openBlock(), createElementBlock("div", {
|
|
9467
9764
|
"data-eldra-ui": "",
|
|
9765
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
9468
9766
|
"data-part": "root",
|
|
9469
9767
|
class: normalizeClass(rootClass.value),
|
|
9470
9768
|
onPointerenter: onRootPointerEnter,
|
|
@@ -9498,6 +9796,7 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
9498
9796
|
onPointerenter: ($event) => onTriggerPointerEnter(index, $event),
|
|
9499
9797
|
onPointerleave: onTriggerPointerLeave
|
|
9500
9798
|
}, [createElementVNode("span", null, toDisplayString(item.label), 1), createElementVNode("span", {
|
|
9799
|
+
"data-eldra-slot": unref(eldra).slotHost("triggerIcon"),
|
|
9501
9800
|
"data-part": "triggerIcon",
|
|
9502
9801
|
class: normalizeClass(triggerIconClass(unref(openIndex) === index)),
|
|
9503
9802
|
"aria-hidden": "true"
|
|
@@ -9513,7 +9812,7 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
9513
9812
|
"stroke-linecap": "round",
|
|
9514
9813
|
"stroke-linejoin": "round",
|
|
9515
9814
|
focusable: "false"
|
|
9516
|
-
}, [createElementVNode("path", { d: "M6 9l6 6l6 -6" })], -1))])],
|
|
9815
|
+
}, [createElementVNode("path", { d: "M6 9l6 6l6 -6" })], -1))])], 10, _hoisted_4$5)], 42, _hoisted_3$7), createVNode(Transition, mergeProps({ ref_for: true }, PANEL_TRANSITION, { persisted: "" }), {
|
|
9517
9816
|
default: withCtx(() => [withDirectives(createElementVNode("div", {
|
|
9518
9817
|
id: panelId(index),
|
|
9519
9818
|
ref_for: true,
|
|
@@ -9549,13 +9848,14 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
9549
9848
|
"classes"
|
|
9550
9849
|
]), unref(slots).panelFooter ? (openBlock(), createElementBlock("div", {
|
|
9551
9850
|
key: 0,
|
|
9851
|
+
"data-eldra-slot": unref(eldra).slotHost("panelFooter"),
|
|
9552
9852
|
"data-part": "footer",
|
|
9553
9853
|
class: normalizeClass(footerClass.value)
|
|
9554
9854
|
}, [renderSlot(_ctx.$slots, "panelFooter", {
|
|
9555
9855
|
item,
|
|
9556
9856
|
index,
|
|
9557
9857
|
close: closePanel
|
|
9558
|
-
})],
|
|
9858
|
+
})], 10, _hoisted_6$1)) : createCommentVNode("", true)], 2)], 10, _hoisted_5$3), [[vShow, unref(openIndex) === index]])]),
|
|
9559
9859
|
_: 2
|
|
9560
9860
|
}, 1040)], 64)) : (openBlock(), createBlock(resolveDynamicComponent(unref(navLinkTag)(item, __props.linkAs)), mergeProps({
|
|
9561
9861
|
key: 1,
|
|
@@ -9568,9 +9868,10 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
9568
9868
|
})) : createCommentVNode("", true)]),
|
|
9569
9869
|
_: 2
|
|
9570
9870
|
}, 1040, ["class"]))], 2);
|
|
9571
|
-
}), 128))], 2)], 42,
|
|
9871
|
+
}), 128))], 2)], 42, _hoisted_2$13)) : createCommentVNode("", true), __props.collapseBelow !== "never" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createElementVNode("button", {
|
|
9572
9872
|
ref_key: "toggleEl",
|
|
9573
9873
|
ref: toggleEl,
|
|
9874
|
+
"data-eldra-slot": unref(eldra).slotHost("toggle"),
|
|
9574
9875
|
type: "button",
|
|
9575
9876
|
"data-part": "toggle",
|
|
9576
9877
|
class: normalizeClass(toggleClass.value),
|
|
@@ -9594,7 +9895,7 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
9594
9895
|
createElementVNode("path", { d: "M4 6l16 0" }, null, -1),
|
|
9595
9896
|
createElementVNode("path", { d: "M4 12l16 0" }, null, -1),
|
|
9596
9897
|
createElementVNode("path", { d: "M4 18l16 0" }, null, -1)
|
|
9597
|
-
])], 2))])], 10,
|
|
9898
|
+
])], 2))])], 10, _hoisted_7$1), createVNode(Drawer_default, {
|
|
9598
9899
|
id: drawerId.value,
|
|
9599
9900
|
modelValue: unref(drawerOpen),
|
|
9600
9901
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(drawerOpen) ? drawerOpen.value = $event : null),
|
|
@@ -9605,6 +9906,7 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
9605
9906
|
}, createSlots({
|
|
9606
9907
|
default: withCtx(() => [drawerEntries.value.length > 0 ? (openBlock(), createElementBlock("nav", {
|
|
9607
9908
|
key: 0,
|
|
9909
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
9608
9910
|
"aria-label": navLabel.value,
|
|
9609
9911
|
onClick: onDrawerClick
|
|
9610
9912
|
}, [createElementVNode("ul", {
|
|
@@ -9661,6 +9963,7 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
9661
9963
|
classes: accordionClasses.value
|
|
9662
9964
|
}, {
|
|
9663
9965
|
default: withCtx(() => [createElementVNode("div", {
|
|
9966
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
9664
9967
|
"data-part": "drawerNest",
|
|
9665
9968
|
class: normalizeClass(drawerNestClass.value)
|
|
9666
9969
|
}, [createVNode(NavMenuPanel_default, {
|
|
@@ -9686,7 +9989,7 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
9686
9989
|
"messages",
|
|
9687
9990
|
"link-as",
|
|
9688
9991
|
"classes"
|
|
9689
|
-
])],
|
|
9992
|
+
])], 10, _hoisted_9$1)]),
|
|
9690
9993
|
_: 2
|
|
9691
9994
|
}, 1032, ["title", "classes"])) : (openBlock(), createBlock(resolveDynamicComponent(unref(navLinkTag)(item, __props.linkAs)), mergeProps({
|
|
9692
9995
|
key: 2,
|
|
@@ -9699,7 +10002,7 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
9699
10002
|
})) : createCommentVNode("", true)]),
|
|
9700
10003
|
_: 2
|
|
9701
10004
|
}, 1040, ["class"]))], 2);
|
|
9702
|
-
}), 128))], 2)], 8,
|
|
10005
|
+
}), 128))], 2)], 8, _hoisted_8$1)) : createCommentVNode("", true)]),
|
|
9703
10006
|
_: 2
|
|
9704
10007
|
}, [unref(slots).drawerHeader ? {
|
|
9705
10008
|
name: "header",
|
|
@@ -9716,13 +10019,14 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
9716
10019
|
"aria-label",
|
|
9717
10020
|
"messages",
|
|
9718
10021
|
"classes"
|
|
9719
|
-
])], 64)) : createCommentVNode("", true)],
|
|
10022
|
+
])], 64)) : createCommentVNode("", true)], 42, _hoisted_1$18);
|
|
9720
10023
|
};
|
|
9721
10024
|
}
|
|
9722
10025
|
});
|
|
9723
10026
|
// src/components/pagination/Pagination.vue?vue&type=script&setup=true&lang.ts
|
|
9724
|
-
var _hoisted_1$
|
|
9725
|
-
var _hoisted_2$
|
|
10027
|
+
var _hoisted_1$17 = ["data-eldra-scope", "aria-label"];
|
|
10028
|
+
var _hoisted_2$12 = ["data-part", "aria-current"];
|
|
10029
|
+
var _hoisted_3$6 = { key: 0 };
|
|
9726
10030
|
/**
|
|
9727
10031
|
* The page window (spec "Pagination" → Properties, `siblings`: "First and last always show; the
|
|
9728
10032
|
* rest collapse to '…'."). Built from the *set* of pages that must show — `1`, `totalPages`, and
|
|
@@ -9756,10 +10060,28 @@ var Pagination_default = /* @__PURE__ */ defineComponent({
|
|
|
9756
10060
|
},
|
|
9757
10061
|
linkAs: { default: void 0 },
|
|
9758
10062
|
ariaLabel: { default: void 0 },
|
|
10063
|
+
fixedLength: {
|
|
10064
|
+
type: Boolean,
|
|
10065
|
+
default: false
|
|
10066
|
+
},
|
|
10067
|
+
disabled: {
|
|
10068
|
+
type: Boolean,
|
|
10069
|
+
default: false
|
|
10070
|
+
},
|
|
10071
|
+
responsive: {
|
|
10072
|
+
type: Boolean,
|
|
10073
|
+
default: true
|
|
10074
|
+
},
|
|
10075
|
+
showSinglePage: {
|
|
10076
|
+
type: Boolean,
|
|
10077
|
+
default: false
|
|
10078
|
+
},
|
|
10079
|
+
messages: { default: void 0 },
|
|
9759
10080
|
classes: { default: void 0 }
|
|
9760
10081
|
},
|
|
9761
10082
|
emits: ["update:page"],
|
|
9762
10083
|
setup(__props, { emit: __emit }) {
|
|
10084
|
+
const eldra = useEldraScope();
|
|
9763
10085
|
const props = __props;
|
|
9764
10086
|
/**
|
|
9765
10087
|
* Controller decision: without `hrefForPage` the controls are `<button type="button">` elements
|
|
@@ -9767,10 +10089,10 @@ var Pagination_default = /* @__PURE__ */ defineComponent({
|
|
|
9767
10089
|
* and the README's Deviations entry.
|
|
9768
10090
|
*/
|
|
9769
10091
|
const emit = __emit;
|
|
9770
|
-
const m = useMessages();
|
|
10092
|
+
const m = useMessages(() => props.messages);
|
|
9771
10093
|
/** Spec "Pagination" → Acceptance criteria: "Nothing renders when there's only one page." Also
|
|
9772
10094
|
* covers the defensive `0`/negative edge the spec does not name. */
|
|
9773
|
-
const visible = computed(() => props.totalPages > 1);
|
|
10095
|
+
const visible = computed(() => props.totalPages > 1 || props.showSinglePage && props.totalPages >= 1);
|
|
9774
10096
|
const navLabel = computed(() => props.ariaLabel ?? m.value.pagination);
|
|
9775
10097
|
/** `linkAs` follows `Link`'s own `as` contract exactly: a string tag still takes `href`; a
|
|
9776
10098
|
* component takes the destination as `to`, matching Vue Router / NuxtLink's own contract. Named
|
|
@@ -9787,14 +10109,15 @@ var Pagination_default = /* @__PURE__ */ defineComponent({
|
|
|
9787
10109
|
return isComponentAs.value ? { to: href } : { href };
|
|
9788
10110
|
}
|
|
9789
10111
|
function onActivate(page) {
|
|
9790
|
-
if (!props.hrefForPage) emit("update:page", page);
|
|
10112
|
+
if (!props.hrefForPage && !props.disabled) emit("update:page", page);
|
|
9791
10113
|
}
|
|
9792
|
-
const prevDisabled = computed(() => props.page <= 1);
|
|
9793
|
-
const nextDisabled = computed(() => props.page >= props.totalPages);
|
|
9794
|
-
function buildWindow(page, totalPages, siblings) {
|
|
10114
|
+
const prevDisabled = computed(() => props.disabled || props.page <= 1);
|
|
10115
|
+
const nextDisabled = computed(() => props.disabled || props.page >= props.totalPages);
|
|
10116
|
+
function buildWindow(page, totalPages, siblings, fixedLength) {
|
|
9795
10117
|
const shown = /* @__PURE__ */ new Set([1, totalPages]);
|
|
9796
10118
|
const span = Math.max(siblings, 0);
|
|
9797
|
-
|
|
10119
|
+
if (fixedLength) addFixedWindow(shown, page, totalPages, span);
|
|
10120
|
+
else for (let candidate = page - span; candidate <= page + span; candidate++) if (candidate >= 1 && candidate <= totalPages) shown.add(candidate);
|
|
9798
10121
|
const sorted = [...shown].sort((a, b) => a - b);
|
|
9799
10122
|
const nodes = [];
|
|
9800
10123
|
for (const [index, current] of sorted.entries()) {
|
|
@@ -9810,10 +10133,30 @@ var Pagination_default = /* @__PURE__ */ defineComponent({
|
|
|
9810
10133
|
}
|
|
9811
10134
|
return nodes;
|
|
9812
10135
|
}
|
|
9813
|
-
|
|
10136
|
+
/**
|
|
10137
|
+
* `fixedLength`'s window: `2 × span + 5` slots (first, its neighbour or "…", the window, the last's
|
|
10138
|
+
* neighbour or "…", last). The window is clamped to pages 3 … `totalPages - 2`, so the neighbour
|
|
10139
|
+
* slots always have a page or a gap of two or more to show.
|
|
10140
|
+
*/
|
|
10141
|
+
function addFixedWindow(shown, page, totalPages, span) {
|
|
10142
|
+
if (totalPages <= 2 * span + 5) {
|
|
10143
|
+
for (let candidate = 1; candidate <= totalPages; candidate++) shown.add(candidate);
|
|
10144
|
+
return;
|
|
10145
|
+
}
|
|
10146
|
+
const start = Math.min(Math.max(page - span, 3), totalPages - 2 - 2 * span);
|
|
10147
|
+
const end = start + 2 * span;
|
|
10148
|
+
for (let candidate = start; candidate <= end; candidate++) shown.add(candidate);
|
|
10149
|
+
if (start === 3) shown.add(2);
|
|
10150
|
+
if (end === totalPages - 2) shown.add(totalPages - 1);
|
|
10151
|
+
}
|
|
10152
|
+
const pageWindow = computed(() => buildWindow(props.page, props.totalPages, props.siblings, props.fixedLength));
|
|
9814
10153
|
const rootClass = computed(() => partClass("@container", props.classes, "root"));
|
|
9815
10154
|
/** Spec "Pagination" → Variants, Numbered: "Centred, wraps." Sizes: "Gap between items 0.25rem." */
|
|
9816
|
-
const numberedListClass = computed(() => partClass("hidden @tablet:flex flex-wrap items-center justify-center gap-1", props.classes, "list"));
|
|
10155
|
+
const numberedListClass = computed(() => partClass(cx(props.responsive ? "hidden @tablet:flex" : "flex", "flex-wrap items-center justify-center gap-1"), props.classes, "list"));
|
|
10156
|
+
/** `responsive: false` keeps the numbered form at every width; `compact` still forces the compact
|
|
10157
|
+
* one. */
|
|
10158
|
+
const showCompact = computed(() => props.compact || props.responsive);
|
|
10159
|
+
const showNumbered = computed(() => !props.compact);
|
|
9817
10160
|
/** Spec → Variants, Compact: "on one line." Below 48rem by default; forced on regardless of width
|
|
9818
10161
|
* when `compact` is set, in which case the numbered list above is never rendered at all. */
|
|
9819
10162
|
const compactListClass = computed(() => partClass(cx("flex items-center justify-center gap-2", !props.compact && "@tablet:hidden"), props.classes, "list"));
|
|
@@ -9828,6 +10171,13 @@ var Pagination_default = /* @__PURE__ */ defineComponent({
|
|
|
9828
10171
|
* colour change (1.4.1): the fill and weight carry the state, `aria-current="page"` carries it to
|
|
9829
10172
|
* assistive tech. */
|
|
9830
10173
|
const currentClass = computed(() => partClass("inline-flex min-w-10 min-h-10 items-center justify-center rounded-md px-2 font-semibold tabular-nums bg-primary text-primary-contrast cursor-pointer eldra-focus", props.classes, "current"));
|
|
10174
|
+
/**
|
|
10175
|
+
* `disabled`: a page takes the spec's own "Disabled previous / next" treatment (`muted` at 60%,
|
|
10176
|
+
* not a link, no pointer events); the current page keeps its weight and takes `Button`'s disabled
|
|
10177
|
+
* fill (`surface-strong`, `muted` text), so it still reads as current without the `primary` call.
|
|
10178
|
+
*/
|
|
10179
|
+
const pageDisabledClass = computed(() => partClass("inline-flex min-w-10 min-h-10 items-center justify-center rounded-md px-2 font-medium tabular-nums text-muted/60 pointer-events-none", props.classes, "page"));
|
|
10180
|
+
const currentDisabledClass = computed(() => partClass("inline-flex min-w-10 min-h-10 items-center justify-center rounded-md px-2 font-semibold tabular-nums bg-surface-strong text-muted pointer-events-none", props.classes, "current"));
|
|
9831
10181
|
/** Spec → Sizes: "Gap ('…'): min-width 2rem, centred." `min-w-8` is the 2rem the spec gives (8 ×
|
|
9832
10182
|
* the shared spacing unit). */
|
|
9833
10183
|
const ellipsisClass = computed(() => partClass("inline-flex min-w-8 items-center justify-center text-muted", props.classes, "ellipsis"));
|
|
@@ -9849,10 +10199,11 @@ var Pagination_default = /* @__PURE__ */ defineComponent({
|
|
|
9849
10199
|
return visible.value ? (openBlock(), createElementBlock("nav", {
|
|
9850
10200
|
key: 0,
|
|
9851
10201
|
"data-eldra-ui": "",
|
|
10202
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
9852
10203
|
"data-part": "root",
|
|
9853
10204
|
class: normalizeClass(rootClass.value),
|
|
9854
10205
|
"aria-label": navLabel.value
|
|
9855
|
-
}, [
|
|
10206
|
+
}, [showNumbered.value ? (openBlock(), createElementBlock("ul", {
|
|
9856
10207
|
key: 0,
|
|
9857
10208
|
"data-part": "list",
|
|
9858
10209
|
class: normalizeClass(numberedListClass.value)
|
|
@@ -9904,9 +10255,15 @@ var Pagination_default = /* @__PURE__ */ defineComponent({
|
|
|
9904
10255
|
"data-part": "ellipsis",
|
|
9905
10256
|
class: normalizeClass(ellipsisClass.value),
|
|
9906
10257
|
"aria-hidden": "true"
|
|
9907
|
-
}, "…", 2)) : (openBlock(),
|
|
10258
|
+
}, "…", 2)) : __props.disabled ? (openBlock(), createElementBlock("span", {
|
|
9908
10259
|
key: 1,
|
|
9909
10260
|
"data-part": node.page === __props.page ? "current" : "page",
|
|
10261
|
+
class: normalizeClass(node.page === __props.page ? currentDisabledClass.value : pageDisabledClass.value),
|
|
10262
|
+
"aria-current": node.page === __props.page ? "page" : void 0,
|
|
10263
|
+
"aria-disabled": "true"
|
|
10264
|
+
}, toDisplayString(node.page), 11, _hoisted_2$12)) : (openBlock(), createBlock(resolveDynamicComponent(itemTag.value), mergeProps({
|
|
10265
|
+
key: 2,
|
|
10266
|
+
"data-part": node.page === __props.page ? "current" : "page",
|
|
9910
10267
|
class: node.page === __props.page ? currentClass.value : pageClass.value,
|
|
9911
10268
|
"aria-current": node.page === __props.page ? "page" : void 0,
|
|
9912
10269
|
"aria-label": node.page === __props.page ? unref(m).pageN(node.page, true) : unref(m).pageN(node.page)
|
|
@@ -9958,7 +10315,8 @@ var Pagination_default = /* @__PURE__ */ defineComponent({
|
|
|
9958
10315
|
}, [createElementVNode("path", { d: "M9 6l6 6l-6 6" })], -1))]),
|
|
9959
10316
|
_: 1
|
|
9960
10317
|
}, 16, ["rel", "class"]))], 2)
|
|
9961
|
-
], 2)) : createCommentVNode("", true),
|
|
10318
|
+
], 2)) : createCommentVNode("", true), showCompact.value ? (openBlock(), createElementBlock("div", {
|
|
10319
|
+
key: 1,
|
|
9962
10320
|
"data-part": "list",
|
|
9963
10321
|
class: normalizeClass(compactListClass.value)
|
|
9964
10322
|
}, [
|
|
@@ -10002,7 +10360,7 @@ var Pagination_default = /* @__PURE__ */ defineComponent({
|
|
|
10002
10360
|
"aria-label"
|
|
10003
10361
|
])),
|
|
10004
10362
|
createElementVNode("span", { class: normalizeClass(compactStatusClass) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(compactStatusParts.value, (part, index) => {
|
|
10005
|
-
return openBlock(), createElementBlock(Fragment, { key: index }, [part.bold ? (openBlock(), createElementBlock("strong",
|
|
10363
|
+
return openBlock(), createElementBlock(Fragment, { key: index }, [part.bold ? (openBlock(), createElementBlock("strong", _hoisted_3$6, toDisplayString(part.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(part.text), 1)], 64))], 64);
|
|
10006
10364
|
}), 128))]),
|
|
10007
10365
|
nextDisabled.value ? (openBlock(), createElementBlock("span", {
|
|
10008
10366
|
key: 2,
|
|
@@ -10043,16 +10401,21 @@ var Pagination_default = /* @__PURE__ */ defineComponent({
|
|
|
10043
10401
|
"class",
|
|
10044
10402
|
"aria-label"
|
|
10045
10403
|
]))
|
|
10046
|
-
], 2)], 10, _hoisted_1$
|
|
10404
|
+
], 2)) : createCommentVNode("", true)], 10, _hoisted_1$17)) : createCommentVNode("", true);
|
|
10047
10405
|
};
|
|
10048
10406
|
}
|
|
10049
10407
|
});
|
|
10050
10408
|
// src/components/popover/Popover.vue?vue&type=script&setup=true&lang.ts
|
|
10051
|
-
var _hoisted_1$
|
|
10409
|
+
var _hoisted_1$16 = ["data-eldra-scope", "data-eldra-slot"];
|
|
10410
|
+
var _hoisted_2$11 = [
|
|
10411
|
+
"data-eldra-slot",
|
|
10052
10412
|
"id",
|
|
10413
|
+
"data-eldra-scope",
|
|
10053
10414
|
"data-eldra-overlay-owner",
|
|
10054
10415
|
"data-placement",
|
|
10055
|
-
"aria-label"
|
|
10416
|
+
"aria-label",
|
|
10417
|
+
"aria-labelledby",
|
|
10418
|
+
"tabindex"
|
|
10056
10419
|
];
|
|
10057
10420
|
// src/components/popover/Popover.vue
|
|
10058
10421
|
var Popover_default = /* @__PURE__ */ defineComponent({
|
|
@@ -10064,6 +10427,50 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
10064
10427
|
default: void 0
|
|
10065
10428
|
},
|
|
10066
10429
|
placement: { default: "auto" },
|
|
10430
|
+
offset: { default: void 0 },
|
|
10431
|
+
viewportPadding: { default: void 0 },
|
|
10432
|
+
reference: { default: void 0 },
|
|
10433
|
+
disabled: {
|
|
10434
|
+
type: Boolean,
|
|
10435
|
+
default: false
|
|
10436
|
+
},
|
|
10437
|
+
haspopup: { default: "true" },
|
|
10438
|
+
labelledByTrigger: {
|
|
10439
|
+
type: Boolean,
|
|
10440
|
+
default: false
|
|
10441
|
+
},
|
|
10442
|
+
openOnArrowDown: {
|
|
10443
|
+
type: Boolean,
|
|
10444
|
+
default: false
|
|
10445
|
+
},
|
|
10446
|
+
focusOnOpen: {
|
|
10447
|
+
type: Boolean,
|
|
10448
|
+
default: false
|
|
10449
|
+
},
|
|
10450
|
+
closeOnOutsideClick: {
|
|
10451
|
+
type: Boolean,
|
|
10452
|
+
default: true
|
|
10453
|
+
},
|
|
10454
|
+
closeOnFocusOutside: {
|
|
10455
|
+
type: Boolean,
|
|
10456
|
+
default: void 0
|
|
10457
|
+
},
|
|
10458
|
+
closeOnEscape: {
|
|
10459
|
+
type: Boolean,
|
|
10460
|
+
default: true
|
|
10461
|
+
},
|
|
10462
|
+
returnFocus: {
|
|
10463
|
+
type: Boolean,
|
|
10464
|
+
default: true
|
|
10465
|
+
},
|
|
10466
|
+
closeWhenTriggerHidden: {
|
|
10467
|
+
type: Boolean,
|
|
10468
|
+
default: false
|
|
10469
|
+
},
|
|
10470
|
+
exclusive: {
|
|
10471
|
+
type: Boolean,
|
|
10472
|
+
default: true
|
|
10473
|
+
},
|
|
10067
10474
|
matchWidth: {
|
|
10068
10475
|
type: [Boolean, String],
|
|
10069
10476
|
default: void 0
|
|
@@ -10080,7 +10487,7 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
10080
10487
|
"open",
|
|
10081
10488
|
"close"
|
|
10082
10489
|
],
|
|
10083
|
-
setup(__props, { emit: __emit }) {
|
|
10490
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
10084
10491
|
/**
|
|
10085
10492
|
* A generic, non-modal trigger + floating panel (operator addition, 2026-09-25 — there is no design
|
|
10086
10493
|
* spec 1 "Popover" section). The private component library's own migration onto this package needs
|
|
@@ -10104,8 +10511,9 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
10104
10511
|
* `attrs` (`id`, `type: 'button'`, `aria-haspopup`, `aria-expanded`, `aria-controls`, `class` built
|
|
10105
10512
|
* from `classes.trigger`, and the click/pointerdown pair below) for `v-bind="attrs"` onto whatever
|
|
10106
10513
|
* element they render, plus `open`/`toggle` for a consumer who wants to build the click handling
|
|
10107
|
-
* themselves instead. **The slot's element is still cloned** (`cloneVNode`, the same
|
|
10108
|
-
* `Tooltip` uses)
|
|
10514
|
+
* themselves instead. **The slot's first element is still cloned** (`cloneVNode`, the same
|
|
10515
|
+
* technique `Tooltip` uses), found through any fragment around it, such as a wrapper forwarding its
|
|
10516
|
+
* own `<slot>` here — not to graft attributes on this time, but to reach its real DOM node: `Esc` and
|
|
10109
10517
|
* `close()` have to put focus back on the *actual* trigger, and a `display: contents` wrapper is
|
|
10110
10518
|
* never focusable, so `root` cannot stand in for it the way it can for everything else. A component
|
|
10111
10519
|
* given as the trigger slot's root is unwrapped through its `$el`, so `<template #trigger="{ open,
|
|
@@ -10139,7 +10547,23 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
10139
10547
|
* always on here, since a menu or a form is exactly the kind of panel with real tab stops) and the
|
|
10140
10548
|
* mouse are how a keyboard or pointer user gets to what is inside. `Esc` and an outside click still
|
|
10141
10549
|
* close it and return focus to the trigger, same as every other popup in this package.
|
|
10550
|
+
* `focusOnOpen` is the opt-in for a panel whose first tab stop is the obvious place to start.
|
|
10551
|
+
*
|
|
10552
|
+
* **A programmatic `trigger.click()` toggles it**, as a pointer click does; only a click a
|
|
10553
|
+
* `<label>` forwards is held to focusing (`usePopover`'s `isProgrammaticClick`).
|
|
10554
|
+
*
|
|
10555
|
+
* **Keyboard activation opens it.** `usePopover`'s label-forwarded-click latch treats a click with
|
|
10556
|
+
* no pointer press and `detail: 0` as forwarded from a `<label>` — but that is also exactly what a
|
|
10557
|
+
* browser fires when `Enter` or `Space` activates a `<button>`. So `attrs` carries an `onKeydown`
|
|
10558
|
+
* that marks the next such click as the keyboard's, and it toggles like a pointer click does.
|
|
10559
|
+
*
|
|
10560
|
+
* **Nested popups keep it open.** A `Select` or another `Popover` opened from inside this panel
|
|
10561
|
+
* teleports its own panel elsewhere; `useOverlay` counts it as inside (its trigger, in this panel,
|
|
10562
|
+
* is `aria-expanded` and `aria-controls` it), and `openRegistry` does not close this popover when
|
|
10563
|
+
* it opens. A consumer's own teleported part claims it with `data-eldra-overlay-owner` set to this
|
|
10564
|
+
* panel's id, or to the id of any element inside it.
|
|
10142
10565
|
*/
|
|
10566
|
+
const eldra = useEldraScope();
|
|
10143
10567
|
const props = __props;
|
|
10144
10568
|
const emit = __emit;
|
|
10145
10569
|
const slots = useSlots();
|
|
@@ -10152,10 +10576,20 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
10152
10576
|
* element rather than `root`. */
|
|
10153
10577
|
const triggerEl = ref(null);
|
|
10154
10578
|
const panelEl = ref(null);
|
|
10155
|
-
const
|
|
10579
|
+
const anchor = computed(() => props.reference ?? null);
|
|
10580
|
+
const { isOpen, panelStyle, placement: resolvedPlacement, teleportTo, teleportDisabled, open, close: closePopup, onTriggerPointerDown, onTriggerClick, focusFirst, update } = usePopover({
|
|
10156
10581
|
trigger: triggerEl,
|
|
10157
10582
|
content: panelEl,
|
|
10158
|
-
|
|
10583
|
+
anchor,
|
|
10584
|
+
canOpen: () => !props.disabled,
|
|
10585
|
+
placement: () => props.placement,
|
|
10586
|
+
offset: () => props.offset,
|
|
10587
|
+
padding: () => props.viewportPadding,
|
|
10588
|
+
exclusive: () => props.exclusive,
|
|
10589
|
+
closeOnOutsideClick: () => props.closeOnOutsideClick,
|
|
10590
|
+
closeOnFocusOutside: () => props.closeOnFocusOutside ?? props.closeOnOutsideClick,
|
|
10591
|
+
closeOnEscape: () => props.closeOnEscape,
|
|
10592
|
+
returnFocus: () => props.returnFocus,
|
|
10159
10593
|
matchWidth: props.matchWidth,
|
|
10160
10594
|
teleport: props.teleport,
|
|
10161
10595
|
tabRedirect: true,
|
|
@@ -10167,7 +10601,22 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
10167
10601
|
model.value = false;
|
|
10168
10602
|
emit("close");
|
|
10169
10603
|
},
|
|
10170
|
-
openFromPointer: () => open()
|
|
10604
|
+
openFromPointer: () => open(),
|
|
10605
|
+
afterOpen: async () => {
|
|
10606
|
+
if (!props.focusOnOpen) return;
|
|
10607
|
+
await nextTick();
|
|
10608
|
+
const panel = panelEl.value;
|
|
10609
|
+
if (panel === null) return;
|
|
10610
|
+
focusFirst();
|
|
10611
|
+
if (!panel.contains(document.activeElement)) panel.focus();
|
|
10612
|
+
}
|
|
10613
|
+
});
|
|
10614
|
+
/** Close, returning focus to the trigger unless `returnFocus` is off. */
|
|
10615
|
+
function close() {
|
|
10616
|
+
closePopup(props.returnFocus);
|
|
10617
|
+
}
|
|
10618
|
+
watch(() => props.disabled, (disabled) => {
|
|
10619
|
+
if (disabled) closePopup(false);
|
|
10171
10620
|
});
|
|
10172
10621
|
/**
|
|
10173
10622
|
* A `v-model` write from outside — a parent's own "Open filters" button elsewhere on the page, or a
|
|
@@ -10178,29 +10627,75 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
10178
10627
|
watch(() => props.modelValue, (value) => {
|
|
10179
10628
|
if (value === void 0) return;
|
|
10180
10629
|
if (value) open();
|
|
10181
|
-
else
|
|
10630
|
+
else closePopup(false);
|
|
10182
10631
|
}, { immediate: true });
|
|
10183
10632
|
function toggle() {
|
|
10184
10633
|
if (isOpen.value) close();
|
|
10185
10634
|
else open();
|
|
10186
10635
|
}
|
|
10636
|
+
/** Set by `Enter`/`Space` on the trigger, so the `detail: 0` click they fire counts as a real one. */
|
|
10637
|
+
let keyboardActivation = false;
|
|
10638
|
+
function onTriggerKeydown(event) {
|
|
10639
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
10640
|
+
keyboardActivation = true;
|
|
10641
|
+
return;
|
|
10642
|
+
}
|
|
10643
|
+
if (event.key === "ArrowDown" && props.openOnArrowDown && !isOpen.value && !props.disabled) {
|
|
10644
|
+
event.preventDefault();
|
|
10645
|
+
open();
|
|
10646
|
+
}
|
|
10647
|
+
}
|
|
10648
|
+
function onClick(event) {
|
|
10649
|
+
const fromKeyboard = keyboardActivation && event.detail === 0;
|
|
10650
|
+
keyboardActivation = false;
|
|
10651
|
+
if (fromKeyboard) {
|
|
10652
|
+
if (!props.disabled) toggle();
|
|
10653
|
+
return;
|
|
10654
|
+
}
|
|
10655
|
+
onTriggerClick(event);
|
|
10656
|
+
}
|
|
10657
|
+
let triggerObserver = null;
|
|
10658
|
+
function unobserveTrigger() {
|
|
10659
|
+
triggerObserver?.disconnect();
|
|
10660
|
+
triggerObserver = null;
|
|
10661
|
+
}
|
|
10662
|
+
watch([
|
|
10663
|
+
isOpen,
|
|
10664
|
+
triggerEl,
|
|
10665
|
+
() => props.closeWhenTriggerHidden
|
|
10666
|
+
], ([opened, trigger, enabled]) => {
|
|
10667
|
+
unobserveTrigger();
|
|
10668
|
+
if (!opened || !enabled || trigger === null || typeof IntersectionObserver === "undefined") return;
|
|
10669
|
+
triggerObserver = new IntersectionObserver(([entry]) => {
|
|
10670
|
+
if (entry !== void 0 && !entry.isIntersecting) closePopup(false);
|
|
10671
|
+
}, { threshold: 0 });
|
|
10672
|
+
triggerObserver.observe(trigger);
|
|
10673
|
+
}, { flush: "post" });
|
|
10674
|
+
onBeforeUnmount(unobserveTrigger);
|
|
10187
10675
|
const triggerClass = computed(() => partClass("", props.classes, "trigger"));
|
|
10188
10676
|
const triggerAttrs = computed(() => ({
|
|
10189
10677
|
id: controlId.value,
|
|
10190
10678
|
type: "button",
|
|
10191
|
-
"aria-haspopup":
|
|
10679
|
+
"aria-haspopup": props.haspopup,
|
|
10192
10680
|
"aria-expanded": isOpen.value ? "true" : "false",
|
|
10193
10681
|
"aria-controls": panelId.value,
|
|
10194
10682
|
"data-part": "trigger",
|
|
10195
10683
|
class: triggerClass.value,
|
|
10684
|
+
...props.disabled ? { disabled: true } : {},
|
|
10196
10685
|
onPointerdown: onTriggerPointerDown,
|
|
10197
|
-
onClick
|
|
10686
|
+
onClick,
|
|
10687
|
+
onKeydown: onTriggerKeydown
|
|
10198
10688
|
}));
|
|
10199
|
-
/**
|
|
10200
|
-
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10689
|
+
/** `aria-labelledby` from `labelledByTrigger`; a fallthrough `aria-labelledby` still wins. */
|
|
10690
|
+
const panelLabelledBy = computed(() => props.labelledByTrigger && props.ariaLabel === void 0 ? controlId.value : void 0);
|
|
10691
|
+
/** Every real vnode of the `trigger` slot's output, in order: a stray whitespace/comment node is
|
|
10692
|
+
* not the trigger, and a fragment (a wrapper component forwarding its own `<slot>` into this one,
|
|
10693
|
+
* or a `v-for`) is looked through rather than skipped. */
|
|
10694
|
+
function elements(nodes) {
|
|
10695
|
+
return nodes.flatMap((node) => {
|
|
10696
|
+
if (node.type === Fragment) return Array.isArray(node.children) ? elements(node.children) : [];
|
|
10697
|
+
return node.type === Comment || node.type === Text ? [] : [node];
|
|
10698
|
+
});
|
|
10204
10699
|
}
|
|
10205
10700
|
/** A plain element ref is already an `HTMLElement`; a component ref is unwrapped through `$el`, so
|
|
10206
10701
|
* a `<Button>` (or any other single-root component) used as the trigger still gives `usePopover`
|
|
@@ -10224,19 +10719,30 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
10224
10719
|
* replacing it because "the component at `is`" looked new.
|
|
10225
10720
|
*/
|
|
10226
10721
|
function Trigger() {
|
|
10227
|
-
const original =
|
|
10722
|
+
const original = elements(slots.trigger?.({
|
|
10228
10723
|
open: isOpen.value,
|
|
10229
10724
|
toggle,
|
|
10230
10725
|
attrs: triggerAttrs.value
|
|
10231
|
-
}) ?? []);
|
|
10726
|
+
}) ?? [])[0];
|
|
10232
10727
|
if (original === void 0) return null;
|
|
10233
10728
|
return cloneVNode(original, { ref: assignTriggerEl }, true);
|
|
10234
10729
|
}
|
|
10730
|
+
__expose({
|
|
10731
|
+
/** Open the panel, as a trigger click would. */
|
|
10732
|
+
open: () => open(),
|
|
10733
|
+
/** Close the panel, as the default slot's `close` would. */
|
|
10734
|
+
close,
|
|
10735
|
+
toggle,
|
|
10736
|
+
/** Reposition now — after a virtual `reference` has moved. */
|
|
10737
|
+
update
|
|
10738
|
+
});
|
|
10235
10739
|
const rootClass = computed(() => partClass("contents", props.classes, "root"));
|
|
10236
|
-
const panelClass = computed(() => partClass(cx("z-popover overflow-hidden rounded-md border border-border bg-background
|
|
10740
|
+
const panelClass = computed(() => partClass(cx("z-popover overflow-hidden rounded-md border shadow-md", "border-[color:var(--eldra-popover-border,var(--color-border))]", "bg-[color:var(--eldra-popover-background,var(--color-background))]", "text-[color:var(--eldra-popover-text)]", "animate-eldra-popover-in"), props.classes, "panel"));
|
|
10237
10741
|
return (_ctx, _cache) => {
|
|
10238
10742
|
return openBlock(), createElementBlock("div", {
|
|
10239
10743
|
"data-eldra-ui": "",
|
|
10744
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
10745
|
+
"data-eldra-slot": unref(eldra).slotHost("trigger"),
|
|
10240
10746
|
"data-part": "root",
|
|
10241
10747
|
class: normalizeClass(rootClass.value)
|
|
10242
10748
|
}, [(openBlock(), createBlock(resolveDynamicComponent(Trigger))), (openBlock(), createBlock(Teleport, {
|
|
@@ -10244,17 +10750,25 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
10244
10750
|
disabled: unref(teleportDisabled)
|
|
10245
10751
|
}, [unref(isOpen) ? (openBlock(), createElementBlock("div", mergeProps({
|
|
10246
10752
|
key: 0,
|
|
10753
|
+
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
10247
10754
|
id: panelId.value,
|
|
10248
10755
|
ref_key: "panelEl",
|
|
10249
10756
|
ref: panelEl,
|
|
10250
10757
|
"data-eldra-ui": "",
|
|
10758
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
10251
10759
|
"data-part": "panel",
|
|
10252
10760
|
"data-eldra-overlay-owner": panelId.value,
|
|
10253
10761
|
class: panelClass.value,
|
|
10254
10762
|
style: unref(panelStyle),
|
|
10255
10763
|
"data-placement": unref(resolvedPlacement),
|
|
10256
|
-
"aria-label": __props.ariaLabel
|
|
10257
|
-
|
|
10764
|
+
"aria-label": __props.ariaLabel,
|
|
10765
|
+
"aria-labelledby": panelLabelledBy.value,
|
|
10766
|
+
tabindex: __props.focusOnOpen ? -1 : void 0
|
|
10767
|
+
}, _ctx.$attrs), [renderSlot(_ctx.$slots, "default", {
|
|
10768
|
+
close: () => close(),
|
|
10769
|
+
open: unref(isOpen),
|
|
10770
|
+
toggle
|
|
10771
|
+
})], 16, _hoisted_2$11)) : createCommentVNode("", true)], 8, ["to", "disabled"]))], 10, _hoisted_1$16);
|
|
10258
10772
|
};
|
|
10259
10773
|
}
|
|
10260
10774
|
});
|
|
@@ -10311,12 +10825,38 @@ function fadeInChangedValue(el) {
|
|
|
10311
10825
|
easing
|
|
10312
10826
|
});
|
|
10313
10827
|
}
|
|
10828
|
+
// src/components/internal/ValueText.vue?vue&type=script&setup=true&lang.ts
|
|
10829
|
+
var _hoisted_1$15 = ["data-eldra-scope"];
|
|
10314
10830
|
// src/components/internal/ValueText.vue
|
|
10315
10831
|
var ValueText_default = /* @__PURE__ */ defineComponent({
|
|
10316
10832
|
name: "EldraValueText",
|
|
10317
10833
|
__name: "ValueText",
|
|
10318
10834
|
props: { text: {} },
|
|
10319
10835
|
setup(__props) {
|
|
10836
|
+
const eldra = useEldraScope();
|
|
10837
|
+
/**
|
|
10838
|
+
* One value's text, with the refresh fade attached to it: `Price`'s amount and compare-at,
|
|
10839
|
+
* `StockBadge`'s status line. **Internal** — not exported from `src/index.ts`, not in
|
|
10840
|
+
* `componentNames.ts`, no story: it exists so those three sites are one line each instead of three
|
|
10841
|
+
* hand-maintained copies of the same markup inside templates where a stray newline between tags
|
|
10842
|
+
* silently deletes a space from the sentence a screen reader reads (`Price.vue`'s own template
|
|
10843
|
+
* comment is there because that happened once already).
|
|
10844
|
+
*
|
|
10845
|
+
* It renders a bare `<span>` and nothing else. The caller's `data-part` and `class` land on it as
|
|
10846
|
+
* fallthrough attributes — this component sets neither, so nothing of the caller's is replaced —
|
|
10847
|
+
* which keeps the part names and the `classes` contract where they belong: with the component a
|
|
10848
|
+
* consumer actually uses.
|
|
10849
|
+
*
|
|
10850
|
+
* **Why a nested span at all.** Its parent — `Price`'s `current`/`compareAt`, `StockBadge`'s
|
|
10851
|
+
* `label` — carries the refresh dim, which is an `opacity`. So is this fade. One element cannot
|
|
10852
|
+
* animate a property another rule is holding at `--eldra-revalidating-opacity`; two composite
|
|
10853
|
+
* cleanly, and this one fades 0 → 1 *inside* the part's dim.
|
|
10854
|
+
*
|
|
10855
|
+
* The text itself is an ordinary interpolation on a stable element, so it changes in the same
|
|
10856
|
+
* render as the props — synchronously, with exactly one copy in the DOM at every instant — and the
|
|
10857
|
+
* fade is played on it afterwards (`flush: 'post'`, so the element already holds the new text when
|
|
10858
|
+
* it starts). See `src/utils/valueFade.ts` for why that, rather than a keyed `<Transition>`.
|
|
10859
|
+
*/
|
|
10320
10860
|
const props = __props;
|
|
10321
10861
|
const spanRef = ref(null);
|
|
10322
10862
|
/**
|
|
@@ -10350,13 +10890,18 @@ var ValueText_default = /* @__PURE__ */ defineComponent({
|
|
|
10350
10890
|
return openBlock(), createElementBlock("span", {
|
|
10351
10891
|
"data-eldra-ui": "",
|
|
10352
10892
|
ref_key: "spanRef",
|
|
10353
|
-
ref: spanRef
|
|
10354
|
-
|
|
10893
|
+
ref: spanRef,
|
|
10894
|
+
"data-eldra-scope": unref(eldra).scope
|
|
10895
|
+
}, toDisplayString(__props.text), 9, _hoisted_1$15);
|
|
10355
10896
|
};
|
|
10356
10897
|
}
|
|
10357
10898
|
});
|
|
10358
10899
|
// src/components/price/Price.vue?vue&type=script&setup=true&lang.ts
|
|
10359
|
-
var _hoisted_1$
|
|
10900
|
+
var _hoisted_1$14 = [
|
|
10901
|
+
"data-eldra-scope",
|
|
10902
|
+
"lang",
|
|
10903
|
+
"aria-busy"
|
|
10904
|
+
];
|
|
10360
10905
|
var ISO_4217_DEFAULT_FRACTION_DIGITS = 2;
|
|
10361
10906
|
var SECTION$1 = "group-data-[section=primary]/section:text-primary-contrast group-data-[section=accent]/section:text-accent-contrast";
|
|
10362
10907
|
// src/components/price/Price.vue
|
|
@@ -10394,6 +10939,7 @@ var Price_default = /* @__PURE__ */ defineComponent({
|
|
|
10394
10939
|
classes: { default: void 0 }
|
|
10395
10940
|
},
|
|
10396
10941
|
setup(__props) {
|
|
10942
|
+
const eldra = useEldraScope();
|
|
10397
10943
|
const props = __props;
|
|
10398
10944
|
/**
|
|
10399
10945
|
* `loading` wins when both are set (`PriceProps.revalidating`): there is no value to keep on
|
|
@@ -10629,6 +11175,7 @@ var Price_default = /* @__PURE__ */ defineComponent({
|
|
|
10629
11175
|
return (_ctx, _cache) => {
|
|
10630
11176
|
return openBlock(), createElementBlock("p", {
|
|
10631
11177
|
"data-eldra-ui": "",
|
|
11178
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
10632
11179
|
"data-part": "root",
|
|
10633
11180
|
class: normalizeClass(rootClass.value),
|
|
10634
11181
|
lang: __props.lang ?? void 0,
|
|
@@ -10686,7 +11233,7 @@ var Price_default = /* @__PURE__ */ defineComponent({
|
|
|
10686
11233
|
"data-part": "srStatus",
|
|
10687
11234
|
class: normalizeClass(srStatusClass.value),
|
|
10688
11235
|
"aria-live": "polite"
|
|
10689
|
-
}, toDisplayString(srStatusText.value), 3)) : createCommentVNode("", true)], 10, _hoisted_1$
|
|
11236
|
+
}, toDisplayString(srStatusText.value), 3)) : createCommentVNode("", true)], 10, _hoisted_1$14);
|
|
10690
11237
|
};
|
|
10691
11238
|
}
|
|
10692
11239
|
});
|
|
@@ -10725,13 +11272,7 @@ function ratingStarStates(value) {
|
|
|
10725
11272
|
});
|
|
10726
11273
|
}
|
|
10727
11274
|
// src/components/rating/RatingStars.vue?vue&type=script&setup=true&lang.ts
|
|
10728
|
-
|
|
10729
|
-
* The five-star row (spec "Rating" → Anatomy, part 1), factored out of `Rating.vue` because the
|
|
10730
|
-
* markup is rendered from three different branches there (static, no-reviews, linked) and the two
|
|
10731
|
-
* SVGs per star make inlining it three times a maintenance hazard rather than a real duplication
|
|
10732
|
-
* saving. Not exported from the package: it is `Rating`'s own implementation detail, the same way
|
|
10733
|
-
* `Select`'s option row is not a component of its own either.
|
|
10734
|
-
*/
|
|
11275
|
+
var _hoisted_1$13 = ["data-eldra-scope"];
|
|
10735
11276
|
var SECTION_FILLED = "group-data-[section=primary]/section:text-primary-contrast group-data-[section=accent]/section:text-accent-contrast";
|
|
10736
11277
|
var OUTLINE_STAR_PATH = "M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873l-6.158 -3.245";
|
|
10737
11278
|
var FILLED_STAR_PATH = "M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z";
|
|
@@ -10747,6 +11288,14 @@ var RatingStars_default = /* @__PURE__ */ defineComponent({
|
|
|
10747
11288
|
classes: {}
|
|
10748
11289
|
},
|
|
10749
11290
|
setup(__props) {
|
|
11291
|
+
const eldra = useEldraScope();
|
|
11292
|
+
/**
|
|
11293
|
+
* The five-star row (spec "Rating" → Anatomy, part 1), factored out of `Rating.vue` because the
|
|
11294
|
+
* markup is rendered from three different branches there (static, no-reviews, linked) and the two
|
|
11295
|
+
* SVGs per star make inlining it three times a maintenance hazard rather than a real duplication
|
|
11296
|
+
* saving. Not exported from the package: it is `Rating`'s own implementation detail, the same way
|
|
11297
|
+
* `Select`'s option row is not a component of its own either.
|
|
11298
|
+
*/
|
|
10750
11299
|
const props = __props;
|
|
10751
11300
|
const starStates = computed(() => ratingStarStates(props.value));
|
|
10752
11301
|
/** Spec "Rating" → Sizes: star 1rem at `md`, 1.25rem at `lg` — both already Tailwind's own
|
|
@@ -10775,6 +11324,7 @@ var RatingStars_default = /* @__PURE__ */ defineComponent({
|
|
|
10775
11324
|
return (_ctx, _cache) => {
|
|
10776
11325
|
return openBlock(), createElementBlock("span", {
|
|
10777
11326
|
"data-eldra-ui": "",
|
|
11327
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
10778
11328
|
"data-part": "stars",
|
|
10779
11329
|
class: normalizeClass(starsClass.value),
|
|
10780
11330
|
"aria-hidden": "true"
|
|
@@ -10798,11 +11348,15 @@ var RatingStars_default = /* @__PURE__ */ defineComponent({
|
|
|
10798
11348
|
viewBox: "0 0 24 24",
|
|
10799
11349
|
fill: "currentColor"
|
|
10800
11350
|
}, [createElementVNode("path", { d: FILLED_STAR_PATH })], 2)) : createCommentVNode("", true)], 2);
|
|
10801
|
-
}), 128))],
|
|
11351
|
+
}), 128))], 10, _hoisted_1$13);
|
|
10802
11352
|
};
|
|
10803
11353
|
}
|
|
10804
11354
|
});
|
|
10805
11355
|
// src/components/rating/Rating.vue?vue&type=script&setup=true&lang.ts
|
|
11356
|
+
var _hoisted_1$12 = ["data-eldra-slot", "data-eldra-scope"];
|
|
11357
|
+
var _hoisted_2$10 = ["data-eldra-scope"];
|
|
11358
|
+
var _hoisted_3$5 = ["data-eldra-scope"];
|
|
11359
|
+
var _hoisted_4$4 = ["data-eldra-scope"];
|
|
10806
11360
|
var SECTION = "group-data-[section=primary]/section:text-primary-contrast group-data-[section=accent]/section:text-accent-contrast";
|
|
10807
11361
|
// src/components/rating/Rating.vue
|
|
10808
11362
|
var Rating_default = /* @__PURE__ */ defineComponent({
|
|
@@ -10824,6 +11378,7 @@ var Rating_default = /* @__PURE__ */ defineComponent({
|
|
|
10824
11378
|
classes: { default: void 0 }
|
|
10825
11379
|
},
|
|
10826
11380
|
setup(__props) {
|
|
11381
|
+
const eldra = useEldraScope();
|
|
10827
11382
|
const props = __props;
|
|
10828
11383
|
const messages = useMessages();
|
|
10829
11384
|
const rounded = computed(() => roundRatingToHalf(props.value));
|
|
@@ -10882,7 +11437,9 @@ var Rating_default = /* @__PURE__ */ defineComponent({
|
|
|
10882
11437
|
const emptyClass = computed(() => partClass("text-body-sm text-muted", props.classes, "empty"));
|
|
10883
11438
|
return (_ctx, _cache) => {
|
|
10884
11439
|
return openBlock(), createElementBlock("span", mergeProps({
|
|
11440
|
+
"data-eldra-slot": unref(eldra).slotHost("emptyAction"),
|
|
10885
11441
|
"data-eldra-ui": "",
|
|
11442
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
10886
11443
|
"data-part": "root",
|
|
10887
11444
|
class: rootClass.value
|
|
10888
11445
|
}, !isLinked.value && !isEmpty.value ? {
|
|
@@ -10890,6 +11447,7 @@ var Rating_default = /* @__PURE__ */ defineComponent({
|
|
|
10890
11447
|
"aria-label": ratingSentence.value
|
|
10891
11448
|
} : {}), [isLinked.value ? (openBlock(), createBlock(resolveDynamicComponent(__props.as ?? "a"), mergeProps({
|
|
10892
11449
|
key: 0,
|
|
11450
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
10893
11451
|
"data-part": "link",
|
|
10894
11452
|
class: linkClass.value,
|
|
10895
11453
|
"aria-label": ratingSentence.value
|
|
@@ -10918,7 +11476,11 @@ var Rating_default = /* @__PURE__ */ defineComponent({
|
|
|
10918
11476
|
}, toDisplayString(linkedCountText.value), 3)) : createCommentVNode("", true)
|
|
10919
11477
|
]),
|
|
10920
11478
|
_: 1
|
|
10921
|
-
}, 16, [
|
|
11479
|
+
}, 16, [
|
|
11480
|
+
"data-eldra-scope",
|
|
11481
|
+
"class",
|
|
11482
|
+
"aria-label"
|
|
11483
|
+
])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createVNode(RatingStars_default, {
|
|
10922
11484
|
value: __props.value,
|
|
10923
11485
|
size: __props.size,
|
|
10924
11486
|
classes: __props.classes
|
|
@@ -10927,25 +11489,28 @@ var Rating_default = /* @__PURE__ */ defineComponent({
|
|
|
10927
11489
|
"size",
|
|
10928
11490
|
"classes"
|
|
10929
11491
|
]), isEmpty.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("span", {
|
|
11492
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
10930
11493
|
"data-part": "empty",
|
|
10931
11494
|
class: normalizeClass(emptyClass.value)
|
|
10932
|
-
}, toDisplayString(unref(messages).noReviews),
|
|
11495
|
+
}, toDisplayString(unref(messages).noReviews), 11, _hoisted_2$10), renderSlot(_ctx.$slots, "emptyAction")], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [__props.showValue ? (openBlock(), createElementBlock("span", {
|
|
10933
11496
|
key: 0,
|
|
11497
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
10934
11498
|
"data-part": "value",
|
|
10935
11499
|
class: normalizeClass(valueClass.value),
|
|
10936
11500
|
"aria-hidden": "true"
|
|
10937
|
-
}, toDisplayString(formattedValue.value),
|
|
11501
|
+
}, toDisplayString(formattedValue.value), 11, _hoisted_3$5)) : createCommentVNode("", true), __props.showCount ? (openBlock(), createElementBlock("span", {
|
|
10938
11502
|
key: 1,
|
|
11503
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
10939
11504
|
"data-part": "count",
|
|
10940
11505
|
class: normalizeClass(countClass.value),
|
|
10941
11506
|
"aria-hidden": "true"
|
|
10942
|
-
}, toDisplayString(cardCountText.value),
|
|
11507
|
+
}, toDisplayString(cardCountText.value), 11, _hoisted_4$4)) : createCommentVNode("", true)], 64))], 64))], 16, _hoisted_1$12);
|
|
10943
11508
|
};
|
|
10944
11509
|
}
|
|
10945
11510
|
});
|
|
10946
11511
|
// src/components/badge/StockBadge.vue?vue&type=script&setup=true&lang.ts
|
|
10947
|
-
var _hoisted_1$
|
|
10948
|
-
var _hoisted_2$
|
|
11512
|
+
var _hoisted_1$11 = ["data-eldra-scope", "aria-busy"];
|
|
11513
|
+
var _hoisted_2$9 = ["d"];
|
|
10949
11514
|
var ICON_STROKE_WIDTH$1 = 2.25;
|
|
10950
11515
|
// src/components/badge/StockBadge.vue
|
|
10951
11516
|
var StockBadge_default = /* @__PURE__ */ defineComponent({
|
|
@@ -10965,6 +11530,7 @@ var StockBadge_default = /* @__PURE__ */ defineComponent({
|
|
|
10965
11530
|
classes: { default: void 0 }
|
|
10966
11531
|
},
|
|
10967
11532
|
setup(__props) {
|
|
11533
|
+
const eldra = useEldraScope();
|
|
10968
11534
|
const props = __props;
|
|
10969
11535
|
const messages = useMessages();
|
|
10970
11536
|
/**
|
|
@@ -11046,6 +11612,7 @@ var StockBadge_default = /* @__PURE__ */ defineComponent({
|
|
|
11046
11612
|
return (_ctx, _cache) => {
|
|
11047
11613
|
return openBlock(), createElementBlock("span", {
|
|
11048
11614
|
"data-eldra-ui": "",
|
|
11615
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
11049
11616
|
"data-part": "root",
|
|
11050
11617
|
class: normalizeClass(rootClass.value),
|
|
11051
11618
|
"aria-busy": __props.revalidating ? "true" : void 0
|
|
@@ -11065,7 +11632,7 @@ var StockBadge_default = /* @__PURE__ */ defineComponent({
|
|
|
11065
11632
|
return openBlock(), createElementBlock("path", {
|
|
11066
11633
|
key: d,
|
|
11067
11634
|
d
|
|
11068
|
-
}, null, 8, _hoisted_2$
|
|
11635
|
+
}, null, 8, _hoisted_2$9);
|
|
11069
11636
|
}), 128))], 2)),
|
|
11070
11637
|
createElementVNode("span", {
|
|
11071
11638
|
"data-part": "label",
|
|
@@ -11087,13 +11654,14 @@ var StockBadge_default = /* @__PURE__ */ defineComponent({
|
|
|
11087
11654
|
class: normalizeClass(srStatusClass.value),
|
|
11088
11655
|
"aria-live": "polite"
|
|
11089
11656
|
}, toDisplayString(srStatusText.value), 3)) : createCommentVNode("", true)
|
|
11090
|
-
], 10, _hoisted_1$
|
|
11657
|
+
], 10, _hoisted_1$11);
|
|
11091
11658
|
};
|
|
11092
11659
|
}
|
|
11093
11660
|
});
|
|
11094
11661
|
// src/components/product-card/ProductCard.vue?vue&type=script&setup=true&lang.ts
|
|
11095
|
-
var _hoisted_1$
|
|
11096
|
-
var _hoisted_2$
|
|
11662
|
+
var _hoisted_1$10 = ["data-eldra-scope", "aria-label"];
|
|
11663
|
+
var _hoisted_2$8 = { class: "mt-3 flex flex-1 flex-col gap-1" };
|
|
11664
|
+
var _hoisted_3$4 = ["data-eldra-scope"];
|
|
11097
11665
|
// src/components/product-card/ProductCard.vue
|
|
11098
11666
|
var ProductCard_default = /* @__PURE__ */ defineComponent({
|
|
11099
11667
|
__name: "ProductCard",
|
|
@@ -11136,6 +11704,7 @@ var ProductCard_default = /* @__PURE__ */ defineComponent({
|
|
|
11136
11704
|
},
|
|
11137
11705
|
emits: ["quickAdd"],
|
|
11138
11706
|
setup(__props, { emit: __emit }) {
|
|
11707
|
+
const eldra = useEldraScope();
|
|
11139
11708
|
const props = __props;
|
|
11140
11709
|
const emit = __emit;
|
|
11141
11710
|
const messages = useMessages();
|
|
@@ -11332,6 +11901,7 @@ var ProductCard_default = /* @__PURE__ */ defineComponent({
|
|
|
11332
11901
|
return __props.loading ? (openBlock(), createElementBlock("div", {
|
|
11333
11902
|
key: 0,
|
|
11334
11903
|
"data-eldra-ui": "",
|
|
11904
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
11335
11905
|
"data-part": "root",
|
|
11336
11906
|
class: normalizeClass(rootClass.value),
|
|
11337
11907
|
role: "group",
|
|
@@ -11345,7 +11915,7 @@ var ProductCard_default = /* @__PURE__ */ defineComponent({
|
|
|
11345
11915
|
variant: "media",
|
|
11346
11916
|
ratio: __props.ratio
|
|
11347
11917
|
}, null, 8, ["ratio"]),
|
|
11348
|
-
createElementVNode("div", _hoisted_2$
|
|
11918
|
+
createElementVNode("div", _hoisted_2$8, [
|
|
11349
11919
|
createVNode(Skeleton_default, {
|
|
11350
11920
|
variant: "text",
|
|
11351
11921
|
classes: { line: "w-[80%]" }
|
|
@@ -11363,9 +11933,10 @@ var ProductCard_default = /* @__PURE__ */ defineComponent({
|
|
|
11363
11933
|
variant: "btn",
|
|
11364
11934
|
class: "mt-5"
|
|
11365
11935
|
})
|
|
11366
|
-
], 2)], 10, _hoisted_1$
|
|
11936
|
+
], 2)], 10, _hoisted_1$10)) : (openBlock(), createElementBlock("article", {
|
|
11367
11937
|
key: 1,
|
|
11368
11938
|
"data-eldra-ui": "",
|
|
11939
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
11369
11940
|
"data-part": "root",
|
|
11370
11941
|
class: normalizeClass(rootClass.value)
|
|
11371
11942
|
}, [
|
|
@@ -11511,13 +12082,124 @@ var ProductCard_default = /* @__PURE__ */ defineComponent({
|
|
|
11511
12082
|
default: withCtx(() => [createTextVNode(toDisplayString(unref(messages).soldOut), 1)]),
|
|
11512
12083
|
_: 1
|
|
11513
12084
|
}, 8, ["class"])) : createCommentVNode("", true)
|
|
11514
|
-
],
|
|
12085
|
+
], 10, _hoisted_3$4));
|
|
12086
|
+
};
|
|
12087
|
+
}
|
|
12088
|
+
});
|
|
12089
|
+
// src/components/radio/Radio.vue?vue&type=script&setup=true&lang.ts
|
|
12090
|
+
var _hoisted_1$9 = ["data-eldra-scope"];
|
|
12091
|
+
var _hoisted_2$7 = [
|
|
12092
|
+
"name",
|
|
12093
|
+
"value",
|
|
12094
|
+
"checked",
|
|
12095
|
+
"disabled",
|
|
12096
|
+
"aria-invalid"
|
|
12097
|
+
];
|
|
12098
|
+
var _hoisted_3$3 = ["data-eldra-slot"];
|
|
12099
|
+
var _hoisted_4$3 = ["data-eldra-slot"];
|
|
12100
|
+
// src/components/radio/Radio.vue
|
|
12101
|
+
var Radio_default = /* @__PURE__ */ defineComponent({
|
|
12102
|
+
inheritAttrs: false,
|
|
12103
|
+
__name: "Radio",
|
|
12104
|
+
props: {
|
|
12105
|
+
modelValue: { default: void 0 },
|
|
12106
|
+
value: {},
|
|
12107
|
+
name: { default: void 0 },
|
|
12108
|
+
label: { default: void 0 },
|
|
12109
|
+
hint: { default: void 0 },
|
|
12110
|
+
size: { default: "md" },
|
|
12111
|
+
disabled: {
|
|
12112
|
+
type: Boolean,
|
|
12113
|
+
default: false
|
|
12114
|
+
},
|
|
12115
|
+
invalid: {
|
|
12116
|
+
type: Boolean,
|
|
12117
|
+
default: false
|
|
12118
|
+
},
|
|
12119
|
+
classes: { default: void 0 }
|
|
12120
|
+
},
|
|
12121
|
+
emits: ["update:modelValue", "change"],
|
|
12122
|
+
setup(__props, { emit: __emit }) {
|
|
12123
|
+
const eldra = useEldraScope();
|
|
12124
|
+
/**
|
|
12125
|
+
* One native radio in `RadioGroup`'s plain-row design, for a radio whose siblings (sharing its
|
|
12126
|
+
* `name`) are rendered somewhere else — a table row, a card of its own. Every attribute reaches the
|
|
12127
|
+
* `<input>`; the root `<label>` is the `option` part.
|
|
12128
|
+
*/
|
|
12129
|
+
const props = __props;
|
|
12130
|
+
const emit = __emit;
|
|
12131
|
+
const slots = useSlots();
|
|
12132
|
+
const isChecked = computed(() => props.modelValue !== void 0 && props.modelValue === props.value);
|
|
12133
|
+
const inputRef = ref(null);
|
|
12134
|
+
/**
|
|
12135
|
+
* Choosing this radio checks it in the DOM before any event, so a controlled parent that refuses
|
|
12136
|
+
* the change would leave it visibly checked. Once the parent has had its say, this radio — and only
|
|
12137
|
+
* this one — is written back from `modelValue`. It never re-asserts on any other render: with no
|
|
12138
|
+
* view of its siblings, a stale write here is what would steal the selection from one of them.
|
|
12139
|
+
*/
|
|
12140
|
+
async function onChange() {
|
|
12141
|
+
emit("update:modelValue", props.value);
|
|
12142
|
+
emit("change", props.value);
|
|
12143
|
+
await nextTick();
|
|
12144
|
+
if (inputRef.value) inputRef.value.checked = isChecked.value;
|
|
12145
|
+
}
|
|
12146
|
+
const hasLabel = computed(() => props.label !== void 0 || slots.default !== void 0);
|
|
12147
|
+
const hasHint = computed(() => props.hint !== void 0 || slots.hint !== void 0);
|
|
12148
|
+
const optionClass = computed(() => partClass(cx(PLAIN_OPTION, !hasLabel.value && !hasHint.value && "grid-cols-[auto] gap-x-0", optionCursor(props.disabled)), props.classes, "option"));
|
|
12149
|
+
const radioClass = computed(() => partClass(radioRecipe(props.size, {
|
|
12150
|
+
selected: isChecked.value,
|
|
12151
|
+
disabled: props.disabled,
|
|
12152
|
+
invalid: props.invalid
|
|
12153
|
+
}), props.classes, "radio"));
|
|
12154
|
+
const dotClass = computed(() => partClass(dotRecipe(isChecked.value), props.classes, "dot"));
|
|
12155
|
+
const inputClass = computed(() => partClass(INPUT, props.classes, "input"));
|
|
12156
|
+
const labelClass = computed(() => partClass(labelRecipe(false, props.disabled), props.classes, "label"));
|
|
12157
|
+
const hintClass = computed(() => partClass(HINT, props.classes, "hint"));
|
|
12158
|
+
return (_ctx, _cache) => {
|
|
12159
|
+
return openBlock(), createElementBlock("label", {
|
|
12160
|
+
"data-eldra-ui": "",
|
|
12161
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
12162
|
+
"data-part": "option",
|
|
12163
|
+
class: normalizeClass(optionClass.value)
|
|
12164
|
+
}, [
|
|
12165
|
+
createElementVNode("span", {
|
|
12166
|
+
"data-part": "radio",
|
|
12167
|
+
class: normalizeClass(radioClass.value)
|
|
12168
|
+
}, [createElementVNode("input", mergeProps({
|
|
12169
|
+
ref_key: "inputRef",
|
|
12170
|
+
ref: inputRef
|
|
12171
|
+
}, _ctx.$attrs, {
|
|
12172
|
+
class: inputClass.value,
|
|
12173
|
+
type: "radio",
|
|
12174
|
+
name: __props.name,
|
|
12175
|
+
value: __props.value,
|
|
12176
|
+
checked: isChecked.value,
|
|
12177
|
+
disabled: __props.disabled || void 0,
|
|
12178
|
+
"aria-invalid": __props.invalid ? "true" : void 0,
|
|
12179
|
+
onChange
|
|
12180
|
+
}), null, 16, _hoisted_2$7), createElementVNode("span", {
|
|
12181
|
+
"aria-hidden": "true",
|
|
12182
|
+
class: normalizeClass(dotClass.value)
|
|
12183
|
+
}, null, 2)], 2),
|
|
12184
|
+
hasLabel.value ? (openBlock(), createElementBlock("span", {
|
|
12185
|
+
key: 0,
|
|
12186
|
+
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
12187
|
+
"data-part": "label",
|
|
12188
|
+
class: normalizeClass(labelClass.value)
|
|
12189
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])], 10, _hoisted_3$3)) : createCommentVNode("", true),
|
|
12190
|
+
hasHint.value ? (openBlock(), createElementBlock("span", {
|
|
12191
|
+
key: 1,
|
|
12192
|
+
"data-eldra-slot": unref(eldra).slotHost("hint"),
|
|
12193
|
+
"data-part": "hint",
|
|
12194
|
+
class: normalizeClass(hintClass.value)
|
|
12195
|
+
}, [renderSlot(_ctx.$slots, "hint", {}, () => [createTextVNode(toDisplayString(__props.hint), 1)])], 10, _hoisted_4$3)) : createCommentVNode("", true)
|
|
12196
|
+
], 10, _hoisted_1$9);
|
|
11515
12197
|
};
|
|
11516
12198
|
}
|
|
11517
12199
|
});
|
|
11518
12200
|
// src/components/search-modal/SearchModal.vue?vue&type=script&setup=true&lang.ts
|
|
11519
|
-
var _hoisted_1$
|
|
11520
|
-
var _hoisted_2$
|
|
12201
|
+
var _hoisted_1$8 = ["data-eldra-scope", "aria-label"];
|
|
12202
|
+
var _hoisted_2$6 = ["action"];
|
|
11521
12203
|
var _hoisted_3$2 = [
|
|
11522
12204
|
"id",
|
|
11523
12205
|
"value",
|
|
@@ -11602,6 +12284,7 @@ var SearchModal_default = /* @__PURE__ */ defineComponent({
|
|
|
11602
12284
|
* `useDialog`'s own listener applies, needed here too because this one runs first and would
|
|
11603
12285
|
* otherwise mutate the active option/query of a modal that is not even the one `Esc` is for.
|
|
11604
12286
|
*/
|
|
12287
|
+
const eldra = useEldraScope();
|
|
11605
12288
|
const props = __props;
|
|
11606
12289
|
const emit = __emit;
|
|
11607
12290
|
const m = useMessages(() => props.messages);
|
|
@@ -12153,6 +12836,7 @@ var SearchModal_default = /* @__PURE__ */ defineComponent({
|
|
|
12153
12836
|
ref_key: "dialogEl",
|
|
12154
12837
|
ref: dialogEl,
|
|
12155
12838
|
"data-eldra-ui": "",
|
|
12839
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
12156
12840
|
"data-part": "root",
|
|
12157
12841
|
class: normalizeClass(rootClass.value),
|
|
12158
12842
|
"aria-label": accessibleName.value,
|
|
@@ -12249,7 +12933,7 @@ var SearchModal_default = /* @__PURE__ */ defineComponent({
|
|
|
12249
12933
|
class: normalizeClass(cancelClass.value),
|
|
12250
12934
|
onClick: onCloseClick
|
|
12251
12935
|
}, toDisplayString(unref(m).cancel), 3)
|
|
12252
|
-
], 42, _hoisted_2$
|
|
12936
|
+
], 42, _hoisted_2$6),
|
|
12253
12937
|
createElementVNode("div", {
|
|
12254
12938
|
"data-part": "results",
|
|
12255
12939
|
class: normalizeClass(resultsClass.value)
|
|
@@ -12316,7 +13000,7 @@ var SearchModal_default = /* @__PURE__ */ defineComponent({
|
|
|
12316
13000
|
default: withCtx(() => [createTextVNode(toDisplayString(announcement.value), 1)]),
|
|
12317
13001
|
_: 1
|
|
12318
13002
|
}, 8, ["classes"])
|
|
12319
|
-
], 42, _hoisted_1$
|
|
13003
|
+
], 42, _hoisted_1$8);
|
|
12320
13004
|
};
|
|
12321
13005
|
}
|
|
12322
13006
|
});
|
|
@@ -12355,6 +13039,7 @@ var Section_default = /* @__PURE__ */ defineComponent({
|
|
|
12355
13039
|
as: { default: void 0 }
|
|
12356
13040
|
},
|
|
12357
13041
|
setup(__props) {
|
|
13042
|
+
const eldra = useEldraScope();
|
|
12358
13043
|
const props = __props;
|
|
12359
13044
|
inject(SECTION_KEY, void 0);
|
|
12360
13045
|
provide(SECTION_KEY, true);
|
|
@@ -12412,7 +13097,9 @@ var Section_default = /* @__PURE__ */ defineComponent({
|
|
|
12412
13097
|
const rootClass = computed(() => partClass(cx("@container", BACKGROUND[props.background], SPACING[props.spacing], inverts.value && "group/section"), props.classes, "root"));
|
|
12413
13098
|
return (_ctx, _cache) => {
|
|
12414
13099
|
return openBlock(), createBlock(resolveDynamicComponent(rootTag.value), {
|
|
13100
|
+
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
12415
13101
|
"data-eldra-ui": "",
|
|
13102
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
12416
13103
|
"data-part": "root",
|
|
12417
13104
|
"data-section-bg": __props.background,
|
|
12418
13105
|
"data-section": inverts.value ? __props.background : void 0,
|
|
@@ -12423,6 +13110,8 @@ var Section_default = /* @__PURE__ */ defineComponent({
|
|
|
12423
13110
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
12424
13111
|
_: 3
|
|
12425
13112
|
}, 8, [
|
|
13113
|
+
"data-eldra-slot",
|
|
13114
|
+
"data-eldra-scope",
|
|
12426
13115
|
"data-section-bg",
|
|
12427
13116
|
"data-section",
|
|
12428
13117
|
"class",
|
|
@@ -12837,19 +13526,18 @@ function useSiteForm(options) {
|
|
|
12837
13526
|
};
|
|
12838
13527
|
}
|
|
12839
13528
|
// src/components/site-form/SiteForm.vue?vue&type=script&setup=true&lang.ts
|
|
12840
|
-
var _hoisted_1$
|
|
12841
|
-
|
|
12842
|
-
|
|
12843
|
-
|
|
12844
|
-
|
|
12845
|
-
|
|
12846
|
-
var
|
|
12847
|
-
var
|
|
12848
|
-
var
|
|
12849
|
-
|
|
12850
|
-
|
|
12851
|
-
|
|
12852
|
-
var _hoisted_5$1 = ["id"];
|
|
13529
|
+
var _hoisted_1$7 = ["data-eldra-slot", "data-eldra-scope"];
|
|
13530
|
+
var _hoisted_2$5 = ["data-eldra-scope"];
|
|
13531
|
+
var _hoisted_3$1 = ["data-eldra-scope"];
|
|
13532
|
+
var _hoisted_4$1 = ["data-eldra-slot", "data-eldra-scope"];
|
|
13533
|
+
var _hoisted_5$1 = ["data-eldra-scope"];
|
|
13534
|
+
var _hoisted_6 = ["data-eldra-scope"];
|
|
13535
|
+
var _hoisted_7 = ["data-eldra-scope"];
|
|
13536
|
+
var _hoisted_8 = ["name"];
|
|
13537
|
+
var _hoisted_9 = ["data-eldra-scope"];
|
|
13538
|
+
var _hoisted_10 = ["data-eldra-scope", "id"];
|
|
13539
|
+
var _hoisted_11 = ["data-eldra-slot", "data-eldra-scope"];
|
|
13540
|
+
var _hoisted_12 = ["data-eldra-scope", "id"];
|
|
12853
13541
|
// src/components/site-form/SiteForm.vue
|
|
12854
13542
|
var SiteForm_default = /* @__PURE__ */ defineComponent({
|
|
12855
13543
|
__name: "SiteForm",
|
|
@@ -12872,6 +13560,7 @@ var SiteForm_default = /* @__PURE__ */ defineComponent({
|
|
|
12872
13560
|
},
|
|
12873
13561
|
emits: ["success", "error"],
|
|
12874
13562
|
setup(__props, { emit: __emit }) {
|
|
13563
|
+
const eldra = useEldraScope();
|
|
12875
13564
|
const props = __props;
|
|
12876
13565
|
const emit = __emit;
|
|
12877
13566
|
const m = useMessages(() => props.messages);
|
|
@@ -13000,21 +13689,27 @@ var SiteForm_default = /* @__PURE__ */ defineComponent({
|
|
|
13000
13689
|
}
|
|
13001
13690
|
return (_ctx, _cache) => {
|
|
13002
13691
|
return openBlock(), createElementBlock("div", {
|
|
13692
|
+
"data-eldra-slot": unref(eldra).slotHost("loading", "failed"),
|
|
13003
13693
|
"data-eldra-ui": "",
|
|
13694
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
13004
13695
|
"data-part": "root",
|
|
13005
13696
|
class: normalizeClass(rootClass.value)
|
|
13006
13697
|
}, [unref(status) === "loading" ? renderSlot(_ctx.$slots, "loading", {}, () => [createElementVNode("p", {
|
|
13698
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
13007
13699
|
"data-part": "notice",
|
|
13008
13700
|
role: "status",
|
|
13009
13701
|
class: normalizeClass(noticeClass.value)
|
|
13010
|
-
}, toDisplayString(unref(m).formLoading),
|
|
13702
|
+
}, toDisplayString(unref(m).formLoading), 11, _hoisted_2$5)], void 0, 0) : unref(status) === "failed" || !unref(form) ? renderSlot(_ctx.$slots, "failed", {}, () => [createElementVNode("p", {
|
|
13703
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
13011
13704
|
"data-part": "notice",
|
|
13012
13705
|
role: "alert",
|
|
13013
13706
|
class: normalizeClass(noticeClass.value)
|
|
13014
|
-
}, toDisplayString(unref(m).formLoadFailed),
|
|
13707
|
+
}, toDisplayString(unref(m).formLoadFailed), 11, _hoisted_3$1)], void 0, 1) : unref(success) ? (openBlock(), createElementBlock("div", {
|
|
13015
13708
|
key: 2,
|
|
13016
13709
|
ref_key: "successRoot",
|
|
13017
13710
|
ref: successRoot,
|
|
13711
|
+
"data-eldra-slot": unref(eldra).slotHost("success"),
|
|
13712
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
13018
13713
|
"data-part": "success",
|
|
13019
13714
|
role: "status",
|
|
13020
13715
|
tabindex: "-1",
|
|
@@ -13031,7 +13726,7 @@ var SiteForm_default = /* @__PURE__ */ defineComponent({
|
|
|
13031
13726
|
key: 0,
|
|
13032
13727
|
"data-part": "successMessage",
|
|
13033
13728
|
class: normalizeClass(successMessageClass.value)
|
|
13034
|
-
}, toDisplayString(successMessage.value), 3)) : createCommentVNode("", true)])],
|
|
13729
|
+
}, toDisplayString(successMessage.value), 3)) : createCommentVNode("", true)])], 10, _hoisted_4$1)) : (openBlock(), createBlock(FormLayout_default, {
|
|
13035
13730
|
key: 3,
|
|
13036
13731
|
layout: layout.value,
|
|
13037
13732
|
heading: __props.heading,
|
|
@@ -13041,7 +13736,12 @@ var SiteForm_default = /* @__PURE__ */ defineComponent({
|
|
|
13041
13736
|
classes: layoutClasses.value,
|
|
13042
13737
|
onSubmit
|
|
13043
13738
|
}, createSlots({
|
|
13044
|
-
actions: withCtx(() => [consentUnderButton.value ? (openBlock(), createElementBlock("div",
|
|
13739
|
+
actions: withCtx(() => [consentUnderButton.value ? (openBlock(), createElementBlock("div", {
|
|
13740
|
+
key: 0,
|
|
13741
|
+
"data-eldra-slot": unref(eldra).slotHost("submit"),
|
|
13742
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
13743
|
+
class: "grid w-full gap-2"
|
|
13744
|
+
}, [renderSlot(_ctx.$slots, "submit", {
|
|
13045
13745
|
label: submitText.value,
|
|
13046
13746
|
submitting: unref(submitting),
|
|
13047
13747
|
describedBy: consentId.value
|
|
@@ -13059,10 +13759,11 @@ var SiteForm_default = /* @__PURE__ */ defineComponent({
|
|
|
13059
13759
|
"aria-describedby",
|
|
13060
13760
|
"classes"
|
|
13061
13761
|
])]), createElementVNode("p", {
|
|
13762
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
13062
13763
|
id: consentId.value,
|
|
13063
13764
|
"data-part": "consentText",
|
|
13064
13765
|
class: normalizeClass(consentClass.value)
|
|
13065
|
-
}, toDisplayString(unref(form).consentText), 11,
|
|
13766
|
+
}, toDisplayString(unref(form).consentText), 11, _hoisted_12)], 8, _hoisted_11)) : renderSlot(_ctx.$slots, "submit", {
|
|
13066
13767
|
label: submitText.value,
|
|
13067
13768
|
submitting: unref(submitting),
|
|
13068
13769
|
describedBy: unref(form).consentText ? consentId.value : void 0
|
|
@@ -13084,6 +13785,7 @@ var SiteForm_default = /* @__PURE__ */ defineComponent({
|
|
|
13084
13785
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(form).fields, (field) => {
|
|
13085
13786
|
return openBlock(), createElementBlock(Fragment, { key: field.id }, [unref(isBooleanField)(field) ? (openBlock(), createElementBlock("div", {
|
|
13086
13787
|
key: 0,
|
|
13788
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
13087
13789
|
"data-part": "field",
|
|
13088
13790
|
class: normalizeClass(booleanFieldClass.value)
|
|
13089
13791
|
}, [createVNode(Checkbox_default, {
|
|
@@ -13114,7 +13816,7 @@ var SiteForm_default = /* @__PURE__ */ defineComponent({
|
|
|
13114
13816
|
}, {
|
|
13115
13817
|
default: withCtx(() => [createTextVNode(toDisplayString(unref(errors)[field.id]), 1)]),
|
|
13116
13818
|
_: 2
|
|
13117
|
-
}, 1032, ["id", "classes"])) : createCommentVNode("", true)],
|
|
13819
|
+
}, 1032, ["id", "classes"])) : createCommentVNode("", true)], 10, _hoisted_6)) : (openBlock(), createBlock(FieldWrapper_default, {
|
|
13118
13820
|
key: 1,
|
|
13119
13821
|
id: fieldId(field.id),
|
|
13120
13822
|
label: field.label,
|
|
@@ -13185,25 +13887,33 @@ var SiteForm_default = /* @__PURE__ */ defineComponent({
|
|
|
13185
13887
|
"classes"
|
|
13186
13888
|
]))], 64);
|
|
13187
13889
|
}), 128)),
|
|
13188
|
-
unref(form).honeypotField ? (openBlock(), createElementBlock("div",
|
|
13890
|
+
unref(form).honeypotField ? (openBlock(), createElementBlock("div", {
|
|
13891
|
+
key: 0,
|
|
13892
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
13893
|
+
class: "sr-only",
|
|
13894
|
+
"aria-hidden": "true",
|
|
13895
|
+
inert: ""
|
|
13896
|
+
}, [withDirectives(createElementVNode("input", {
|
|
13189
13897
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(honeypot) ? honeypot.value = $event : null),
|
|
13190
13898
|
type: "text",
|
|
13191
13899
|
name: unref(form).honeypotField,
|
|
13192
13900
|
tabindex: "-1",
|
|
13193
13901
|
autocomplete: "off"
|
|
13194
|
-
}, null, 8,
|
|
13902
|
+
}, null, 8, _hoisted_8), [[vModelText, unref(honeypot)]])], 8, _hoisted_7)) : createCommentVNode("", true),
|
|
13195
13903
|
unref(form).turnstileSiteKey ? (openBlock(), createElementBlock("div", {
|
|
13196
13904
|
key: 1,
|
|
13905
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
13197
13906
|
ref: setTurnstileRoot,
|
|
13198
13907
|
"data-part": "turnstile",
|
|
13199
13908
|
class: normalizeClass(turnstileClass.value)
|
|
13200
|
-
}, null,
|
|
13909
|
+
}, null, 10, _hoisted_9)) : createCommentVNode("", true),
|
|
13201
13910
|
unref(form).consentText && layout.value === "inline" ? (openBlock(), createElementBlock("p", {
|
|
13202
13911
|
key: 2,
|
|
13912
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
13203
13913
|
id: consentId.value,
|
|
13204
13914
|
"data-part": "consentText",
|
|
13205
13915
|
class: normalizeClass(consentClass.value)
|
|
13206
|
-
}, toDisplayString(unref(form).consentText), 11,
|
|
13916
|
+
}, toDisplayString(unref(form).consentText), 11, _hoisted_10)) : createCommentVNode("", true)
|
|
13207
13917
|
]),
|
|
13208
13918
|
_: 2
|
|
13209
13919
|
}, [unref(formErrors).length > 0 ? {
|
|
@@ -13211,8 +13921,9 @@ var SiteForm_default = /* @__PURE__ */ defineComponent({
|
|
|
13211
13921
|
fn: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(formErrors), (message, index) => {
|
|
13212
13922
|
return openBlock(), createElementBlock("p", {
|
|
13213
13923
|
key: index,
|
|
13924
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
13214
13925
|
class: "m-0"
|
|
13215
|
-
}, toDisplayString(message), 1);
|
|
13926
|
+
}, toDisplayString(message), 9, _hoisted_5$1);
|
|
13216
13927
|
}), 128))]),
|
|
13217
13928
|
key: "0"
|
|
13218
13929
|
} : void 0]), 1032, [
|
|
@@ -13222,7 +13933,7 @@ var SiteForm_default = /* @__PURE__ */ defineComponent({
|
|
|
13222
13933
|
"aria-label",
|
|
13223
13934
|
"submitting",
|
|
13224
13935
|
"classes"
|
|
13225
|
-
]))],
|
|
13936
|
+
]))], 10, _hoisted_1$7);
|
|
13226
13937
|
};
|
|
13227
13938
|
}
|
|
13228
13939
|
});
|
|
@@ -13230,12 +13941,16 @@ var SiteForm_default = /* @__PURE__ */ defineComponent({
|
|
|
13230
13941
|
/** The key `Tabs` provides its `TabsContext` on. */
|
|
13231
13942
|
var TABS_KEY = Symbol("eldra-ui:tabs");
|
|
13232
13943
|
// src/components/tabs/Tab.vue?vue&type=script&setup=true&lang.ts
|
|
13233
|
-
var _hoisted_1$
|
|
13944
|
+
var _hoisted_1$6 = [
|
|
13945
|
+
"data-eldra-slot",
|
|
13234
13946
|
"id",
|
|
13947
|
+
"data-eldra-scope",
|
|
13235
13948
|
"aria-selected",
|
|
13236
13949
|
"aria-controls",
|
|
13950
|
+
"aria-disabled",
|
|
13237
13951
|
"tabindex"
|
|
13238
13952
|
];
|
|
13953
|
+
var _hoisted_2$4 = ["data-eldra-scope"];
|
|
13239
13954
|
var BASE = "relative inline-flex items-center justify-center whitespace-nowrap cursor-pointer target-touch px-4 text-variant-pill";
|
|
13240
13955
|
// src/components/tabs/Tab.vue
|
|
13241
13956
|
var Tab_default = /* @__PURE__ */ defineComponent({
|
|
@@ -13243,9 +13958,14 @@ var Tab_default = /* @__PURE__ */ defineComponent({
|
|
|
13243
13958
|
props: {
|
|
13244
13959
|
value: {},
|
|
13245
13960
|
title: { default: void 0 },
|
|
13961
|
+
disabled: {
|
|
13962
|
+
type: Boolean,
|
|
13963
|
+
default: false
|
|
13964
|
+
},
|
|
13246
13965
|
classes: { default: void 0 }
|
|
13247
13966
|
},
|
|
13248
13967
|
setup(__props) {
|
|
13968
|
+
const eldra = useEldraScope();
|
|
13249
13969
|
const props = __props;
|
|
13250
13970
|
const injected = inject(TABS_KEY);
|
|
13251
13971
|
if (!injected) throw new Error("<Tab> must be used inside <Tabs>");
|
|
@@ -13259,13 +13979,15 @@ var Tab_default = /* @__PURE__ */ defineComponent({
|
|
|
13259
13979
|
onMounted(() => {
|
|
13260
13980
|
unregister = context.register({
|
|
13261
13981
|
value: props.value,
|
|
13262
|
-
focus: () => el.value?.focus()
|
|
13982
|
+
focus: () => el.value?.focus(),
|
|
13983
|
+
disabled: () => props.disabled
|
|
13263
13984
|
});
|
|
13264
13985
|
});
|
|
13265
13986
|
onBeforeUnmount(() => unregister?.());
|
|
13266
13987
|
const isSelected = computed(() => context.isSelected(props.value));
|
|
13267
13988
|
const isUnderline = computed(() => context.variant.value === "underline");
|
|
13268
13989
|
function select() {
|
|
13990
|
+
if (props.disabled) return;
|
|
13269
13991
|
context.select(props.value);
|
|
13270
13992
|
}
|
|
13271
13993
|
/**
|
|
@@ -13309,7 +14031,20 @@ var Tab_default = /* @__PURE__ */ defineComponent({
|
|
|
13309
14031
|
* the same reading `VariantPicker`'s selected pill gives its own border, see that component's own
|
|
13310
14032
|
* comment — so the border only needs a colour when unselected. */
|
|
13311
14033
|
const PILLS = computed(() => cx("rounded-full border eldra-focus", isSelected.value ? "border-primary bg-primary font-semibold text-primary-contrast" : cx("border-border-strong font-medium text-muted hover:text-text", "hover:bg-[color-mix(in_oklab,var(--eldra-color-text),transparent_94%)]")));
|
|
13312
|
-
|
|
14034
|
+
/**
|
|
14035
|
+
* A disabled tab (not in the spec's States table, which has no disabled row). It borrows the
|
|
14036
|
+
* package's own disabled readings rather than inventing one: unselected, `Pagination`'s disabled
|
|
14037
|
+
* page (`muted` at 60%, no hover); selected, the dead "on" every other control draws (`Switch`,
|
|
14038
|
+
* `Checkbox`): the selected weight is kept and the `primary` colour becomes `muted` — a `muted`
|
|
14039
|
+
* underline bar, or `Button`'s disabled fill (`surface-strong`, `muted` text) for a pill.
|
|
14040
|
+
*/
|
|
14041
|
+
const UNDERLINE_DISABLED = computed(() => cx("rounded-t-sm eldra-focus-inset cursor-not-allowed", isSelected.value ? "font-semibold text-muted" : "font-medium text-muted/60"));
|
|
14042
|
+
const PILLS_DISABLED = computed(() => cx("rounded-full border eldra-focus cursor-not-allowed", isSelected.value ? "border-transparent bg-surface-strong font-semibold text-muted" : "border-border font-medium text-muted/60"));
|
|
14043
|
+
const stateClass = computed(() => {
|
|
14044
|
+
if (props.disabled) return isUnderline.value ? UNDERLINE_DISABLED.value : PILLS_DISABLED.value;
|
|
14045
|
+
return isUnderline.value ? UNDERLINE.value : PILLS.value;
|
|
14046
|
+
});
|
|
14047
|
+
const tabClass = computed(() => partClass(cx(BASE, stateClass.value), props.classes, "tab"));
|
|
13313
14048
|
/**
|
|
13314
14049
|
* Spec "Tabs" → Anatomy, point 3 and → Sizes: "an underline bar … 0.1875rem tall, inset 0.5rem
|
|
13315
14050
|
* from each side of the tab, sitting on the list's hairline, rounded top" and → Behaviour & motion:
|
|
@@ -13319,34 +14054,40 @@ var Tab_default = /* @__PURE__ */ defineComponent({
|
|
|
13319
14054
|
* Pills have no separate indicator part — the tab's own fill above is the "filled pill" the spec's
|
|
13320
14055
|
* anatomy names.
|
|
13321
14056
|
*/
|
|
13322
|
-
const indicatorClass = computed(() => partClass(cx("pointer-events-none absolute inset-x-2 bottom-0 h-[0.1875rem] rounded-t-full", "transition-colors duration-fast ease-out", isSelected.value ? "bg-primary" : "bg-transparent"), props.classes, "indicator"));
|
|
14057
|
+
const indicatorClass = computed(() => partClass(cx("pointer-events-none absolute inset-x-2 bottom-0 h-[0.1875rem] rounded-t-full", "transition-colors duration-fast ease-out", isSelected.value ? props.disabled ? "bg-muted" : "bg-primary" : "bg-transparent"), props.classes, "indicator"));
|
|
13323
14058
|
return (_ctx, _cache) => {
|
|
13324
14059
|
return openBlock(), createElementBlock("button", {
|
|
14060
|
+
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
13325
14061
|
id: unref(context).tabId(__props.value),
|
|
13326
14062
|
ref_key: "el",
|
|
13327
14063
|
ref: el,
|
|
13328
14064
|
type: "button",
|
|
13329
14065
|
role: "tab",
|
|
13330
14066
|
"data-eldra-ui": "",
|
|
14067
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
13331
14068
|
"data-part": "tab",
|
|
13332
14069
|
"aria-selected": isSelected.value ? "true" : "false",
|
|
13333
14070
|
"aria-controls": unref(context).panelId(__props.value),
|
|
14071
|
+
"aria-disabled": __props.disabled ? "true" : void 0,
|
|
13334
14072
|
tabindex: isSelected.value ? 0 : -1,
|
|
13335
14073
|
class: normalizeClass(tabClass.value),
|
|
13336
14074
|
onClick: select,
|
|
13337
14075
|
onKeydown
|
|
13338
14076
|
}, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.title), 1)]), isUnderline.value ? (openBlock(), createElementBlock("span", {
|
|
13339
14077
|
key: 0,
|
|
14078
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
13340
14079
|
"aria-hidden": "true",
|
|
13341
14080
|
"data-part": "indicator",
|
|
13342
14081
|
class: normalizeClass(indicatorClass.value)
|
|
13343
|
-
}, null,
|
|
14082
|
+
}, null, 10, _hoisted_2$4)) : createCommentVNode("", true)], 42, _hoisted_1$6);
|
|
13344
14083
|
};
|
|
13345
14084
|
}
|
|
13346
14085
|
});
|
|
13347
14086
|
// src/components/tabs/TabPanel.vue?vue&type=script&setup=true&lang.ts
|
|
13348
|
-
var _hoisted_1$
|
|
14087
|
+
var _hoisted_1$5 = [
|
|
14088
|
+
"data-eldra-slot",
|
|
13349
14089
|
"id",
|
|
14090
|
+
"data-eldra-scope",
|
|
13350
14091
|
"aria-labelledby",
|
|
13351
14092
|
"hidden",
|
|
13352
14093
|
"tabindex"
|
|
@@ -13360,6 +14101,7 @@ var TabPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
13360
14101
|
classes: { default: void 0 }
|
|
13361
14102
|
},
|
|
13362
14103
|
setup(__props) {
|
|
14104
|
+
const eldra = useEldraScope();
|
|
13363
14105
|
const props = __props;
|
|
13364
14106
|
const injected = inject(TABS_KEY);
|
|
13365
14107
|
if (!injected) throw new Error("<TabPanel> must be used inside <Tabs>");
|
|
@@ -13391,17 +14133,19 @@ var TabPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
13391
14133
|
const panelClass = computed(() => partClass(cx("rounded-sm pt-6 eldra-focus"), props.classes, "panel"));
|
|
13392
14134
|
return (_ctx, _cache) => {
|
|
13393
14135
|
return openBlock(), createElementBlock("div", {
|
|
14136
|
+
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
13394
14137
|
id: unref(context).panelId(__props.value),
|
|
13395
14138
|
ref_key: "el",
|
|
13396
14139
|
ref: el,
|
|
13397
14140
|
role: "tabpanel",
|
|
13398
14141
|
"data-eldra-ui": "",
|
|
14142
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
13399
14143
|
"data-part": "panel",
|
|
13400
14144
|
"aria-labelledby": unref(context).tabId(__props.value),
|
|
13401
14145
|
hidden: !isSelected.value,
|
|
13402
14146
|
tabindex: tabindexAttr.value,
|
|
13403
14147
|
class: normalizeClass(panelClass.value)
|
|
13404
|
-
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$
|
|
14148
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$5);
|
|
13405
14149
|
};
|
|
13406
14150
|
}
|
|
13407
14151
|
});
|
|
@@ -13452,6 +14196,8 @@ async function preloadTablerIcons(values) {
|
|
|
13452
14196
|
}
|
|
13453
14197
|
await Promise.all([...names].map(loadTablerIcon));
|
|
13454
14198
|
}
|
|
14199
|
+
// src/components/tabler-icon/TablerIcon.vue?vue&type=script&setup=true&lang.ts
|
|
14200
|
+
var _hoisted_1$4 = ["data-eldra-scope"];
|
|
13455
14201
|
// src/components/tabler-icon/TablerIcon.vue
|
|
13456
14202
|
var TablerIcon_default = /* @__PURE__ */ defineComponent({
|
|
13457
14203
|
__name: "TablerIcon",
|
|
@@ -13463,6 +14209,7 @@ var TablerIcon_default = /* @__PURE__ */ defineComponent({
|
|
|
13463
14209
|
classes: { default: void 0 }
|
|
13464
14210
|
},
|
|
13465
14211
|
setup(__props) {
|
|
14212
|
+
const eldra = useEldraScope();
|
|
13466
14213
|
const props = __props;
|
|
13467
14214
|
const OUTLINE = {
|
|
13468
14215
|
fill: "none",
|
|
@@ -13522,13 +14269,19 @@ var TablerIcon_default = /* @__PURE__ */ defineComponent({
|
|
|
13522
14269
|
ref_key: "root",
|
|
13523
14270
|
ref: root,
|
|
13524
14271
|
"data-eldra-ui": "",
|
|
14272
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
13525
14273
|
"data-part": "root"
|
|
13526
|
-
}, svgAttrs.value), null, 16)) : createCommentVNode("", true);
|
|
14274
|
+
}, svgAttrs.value), null, 16, _hoisted_1$4)) : createCommentVNode("", true);
|
|
13527
14275
|
};
|
|
13528
14276
|
}
|
|
13529
14277
|
});
|
|
13530
14278
|
// src/components/tabs/Tabs.vue?vue&type=script&setup=true&lang.ts
|
|
13531
|
-
var _hoisted_1$3 = ["
|
|
14279
|
+
var _hoisted_1$3 = ["data-eldra-slot", "data-eldra-scope"];
|
|
14280
|
+
var _hoisted_2$3 = [
|
|
14281
|
+
"data-eldra-slot",
|
|
14282
|
+
"data-eldra-scope",
|
|
14283
|
+
"aria-label"
|
|
14284
|
+
];
|
|
13532
14285
|
var PILLS_RING_RESERVE = "py-[calc(var(--eldra-focus-offset)_+_var(--eldra-focus-width))] -my-[calc(var(--eldra-focus-offset)_+_var(--eldra-focus-width))] px-[calc(var(--eldra-focus-offset)_+_var(--eldra-focus-width))] -mx-[calc(var(--eldra-focus-offset)_+_var(--eldra-focus-width))] scroll-px-[calc(var(--eldra-focus-offset)_+_var(--eldra-focus-width))]";
|
|
13533
14286
|
// src/components/tabs/Tabs.vue
|
|
13534
14287
|
var Tabs_default = /* @__PURE__ */ defineComponent({
|
|
@@ -13543,6 +14296,7 @@ var Tabs_default = /* @__PURE__ */ defineComponent({
|
|
|
13543
14296
|
},
|
|
13544
14297
|
emits: ["update:modelValue", "change"],
|
|
13545
14298
|
setup(__props, { emit: __emit }) {
|
|
14299
|
+
const eldra = useEldraScope();
|
|
13546
14300
|
const props = __props;
|
|
13547
14301
|
const emit = __emit;
|
|
13548
14302
|
const id = useUiId("tabs");
|
|
@@ -13561,8 +14315,9 @@ var Tabs_default = /* @__PURE__ */ defineComponent({
|
|
|
13561
14315
|
registry.value = registry.value.filter((registered) => registered !== entry);
|
|
13562
14316
|
};
|
|
13563
14317
|
}
|
|
13564
|
-
/** Spec "Tabs" → Properties, `value` row: "Default first tab."
|
|
13565
|
-
|
|
14318
|
+
/** Spec "Tabs" → Properties, `value` row: "Default first tab." The first one that can be chosen,
|
|
14319
|
+
* so a disabled first tab is never selected for the user; the first of all when every tab is. */
|
|
14320
|
+
const selectedValue = computed(() => model.value === "" ? (registry.value.find((tab) => !tab.disabled?.()) ?? registry.value[0])?.value : model.value);
|
|
13566
14321
|
function isSelected(value) {
|
|
13567
14322
|
return selectedValue.value === value;
|
|
13568
14323
|
}
|
|
@@ -13570,16 +14325,25 @@ var Tabs_default = /* @__PURE__ */ defineComponent({
|
|
|
13570
14325
|
model.value = value;
|
|
13571
14326
|
emit("change", value);
|
|
13572
14327
|
}
|
|
14328
|
+
/** Walks from `current` in `delta`'s direction, wrapping, past every disabled tab. Nothing moves
|
|
14329
|
+
* when no other tab can be chosen. */
|
|
13573
14330
|
function moveFocus(current, delta) {
|
|
13574
14331
|
const tabs = registry.value;
|
|
13575
14332
|
if (tabs.length === 0) return;
|
|
13576
14333
|
const index = tabs.findIndex((tab) => tab.value === current);
|
|
13577
|
-
|
|
14334
|
+
const start = index === -1 ? delta === 1 ? -1 : tabs.length : index;
|
|
14335
|
+
for (let step = 1; step <= tabs.length; step++) {
|
|
14336
|
+
const candidate = tabs[(start + delta * step + tabs.length * 2) % tabs.length];
|
|
14337
|
+
if (!candidate.disabled?.()) {
|
|
14338
|
+
activate(candidate);
|
|
14339
|
+
return;
|
|
14340
|
+
}
|
|
14341
|
+
}
|
|
13578
14342
|
}
|
|
13579
14343
|
function focusEdge(edge) {
|
|
13580
|
-
const
|
|
13581
|
-
|
|
13582
|
-
activate(
|
|
14344
|
+
const enabled = registry.value.filter((tab) => !tab.disabled?.());
|
|
14345
|
+
const target = edge === "first" ? enabled[0] : enabled[enabled.length - 1];
|
|
14346
|
+
if (target) activate(target);
|
|
13583
14347
|
}
|
|
13584
14348
|
/** Moves DOM focus, and — spec "Tabs" → Behaviour & motion: "With automatic activation, moving
|
|
13585
14349
|
* focus selects the tab" — selects too, but only under `auto`. */
|
|
@@ -13629,10 +14393,14 @@ var Tabs_default = /* @__PURE__ */ defineComponent({
|
|
|
13629
14393
|
}));
|
|
13630
14394
|
return (_ctx, _cache) => {
|
|
13631
14395
|
return openBlock(), createElementBlock("div", {
|
|
14396
|
+
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
13632
14397
|
"data-eldra-ui": "",
|
|
14398
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
13633
14399
|
"data-part": "root",
|
|
13634
14400
|
class: normalizeClass(rootClass.value)
|
|
13635
14401
|
}, [createElementVNode("div", {
|
|
14402
|
+
"data-eldra-slot": unref(eldra).slotHost("tabs"),
|
|
14403
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
13636
14404
|
role: "tablist",
|
|
13637
14405
|
"data-part": "list",
|
|
13638
14406
|
"aria-label": __props.ariaLabel,
|
|
@@ -13642,13 +14410,15 @@ var Tabs_default = /* @__PURE__ */ defineComponent({
|
|
|
13642
14410
|
key: item.value,
|
|
13643
14411
|
value: item.value,
|
|
13644
14412
|
title: item.title,
|
|
14413
|
+
disabled: item.disabled,
|
|
13645
14414
|
classes: childClasses.value
|
|
13646
14415
|
}, null, 8, [
|
|
13647
14416
|
"value",
|
|
13648
14417
|
"title",
|
|
14418
|
+
"disabled",
|
|
13649
14419
|
"classes"
|
|
13650
14420
|
]);
|
|
13651
|
-
}), 128)) : renderSlot(_ctx.$slots, "tabs", {}, void 0, void 0, 1)], 10,
|
|
14421
|
+
}), 128)) : renderSlot(_ctx.$slots, "tabs", {}, void 0, void 0, 1)], 10, _hoisted_2$3), __props.items ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(__props.items, (item) => {
|
|
13652
14422
|
return openBlock(), createBlock(TabPanel_default, {
|
|
13653
14423
|
key: item.value,
|
|
13654
14424
|
value: item.value,
|
|
@@ -13657,13 +14427,17 @@ var Tabs_default = /* @__PURE__ */ defineComponent({
|
|
|
13657
14427
|
default: withCtx(() => [createTextVNode(toDisplayString(item.content), 1)]),
|
|
13658
14428
|
_: 2
|
|
13659
14429
|
}, 1032, ["value", "classes"]);
|
|
13660
|
-
}), 128)) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1)],
|
|
14430
|
+
}), 128)) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1)], 10, _hoisted_1$3);
|
|
13661
14431
|
};
|
|
13662
14432
|
}
|
|
13663
14433
|
});
|
|
13664
14434
|
// src/components/toast/Toast.vue?vue&type=script&setup=true&lang.ts
|
|
13665
|
-
var _hoisted_1$2 = [
|
|
13666
|
-
|
|
14435
|
+
var _hoisted_1$2 = [
|
|
14436
|
+
"data-eldra-scope",
|
|
14437
|
+
"data-variant",
|
|
14438
|
+
"role"
|
|
14439
|
+
];
|
|
14440
|
+
var _hoisted_2$2 = ["d"];
|
|
13667
14441
|
var _hoisted_3 = { class: "min-w-0 flex-1" };
|
|
13668
14442
|
var _hoisted_4 = ["href"];
|
|
13669
14443
|
var _hoisted_5 = ["aria-label"];
|
|
@@ -13676,6 +14450,10 @@ var Toast_default = /* @__PURE__ */ defineComponent({
|
|
|
13676
14450
|
title: {},
|
|
13677
14451
|
text: { default: void 0 },
|
|
13678
14452
|
action: { default: void 0 },
|
|
14453
|
+
closable: {
|
|
14454
|
+
type: Boolean,
|
|
14455
|
+
default: true
|
|
14456
|
+
},
|
|
13679
14457
|
messages: { default: void 0 },
|
|
13680
14458
|
classes: { default: void 0 }
|
|
13681
14459
|
},
|
|
@@ -13688,6 +14466,7 @@ var Toast_default = /* @__PURE__ */ defineComponent({
|
|
|
13688
14466
|
* button, or `Esc` while focus is inside it — a timeout is `Toaster`'s own doing, never this
|
|
13689
14467
|
* component's).
|
|
13690
14468
|
*/
|
|
14469
|
+
const eldra = useEldraScope();
|
|
13691
14470
|
const props = __props;
|
|
13692
14471
|
const emit = __emit;
|
|
13693
14472
|
const m = useMessages(() => props.messages);
|
|
@@ -13700,6 +14479,11 @@ var Toast_default = /* @__PURE__ */ defineComponent({
|
|
|
13700
14479
|
*/
|
|
13701
14480
|
const ICON_PATHS = {
|
|
13702
14481
|
success: ["M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0", "M9 12l2 2l4 -4"],
|
|
14482
|
+
info: [
|
|
14483
|
+
"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",
|
|
14484
|
+
"M12 9h.01",
|
|
14485
|
+
"M11 12h1v4h1"
|
|
14486
|
+
],
|
|
13703
14487
|
warning: [
|
|
13704
14488
|
"M12 9v4",
|
|
13705
14489
|
"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0",
|
|
@@ -13715,6 +14499,7 @@ var Toast_default = /* @__PURE__ */ defineComponent({
|
|
|
13715
14499
|
* the same weight as the rest of the package rather than `StockBadge`'s own heavier 2.25. */
|
|
13716
14500
|
const VARIANT_TEXT_CLASS = {
|
|
13717
14501
|
success: "text-success",
|
|
14502
|
+
info: "text-text",
|
|
13718
14503
|
warning: "text-warning",
|
|
13719
14504
|
danger: "text-danger"
|
|
13720
14505
|
};
|
|
@@ -13738,7 +14523,7 @@ var Toast_default = /* @__PURE__ */ defineComponent({
|
|
|
13738
14523
|
* "closes the toast that holds focus" — not the dialog underneath it.
|
|
13739
14524
|
*/
|
|
13740
14525
|
function onKeydown(event) {
|
|
13741
|
-
if (event.key !== "Escape") return;
|
|
14526
|
+
if (event.key !== "Escape" || !props.closable) return;
|
|
13742
14527
|
event.preventDefault();
|
|
13743
14528
|
emit("close", "escape");
|
|
13744
14529
|
}
|
|
@@ -13757,7 +14542,9 @@ var Toast_default = /* @__PURE__ */ defineComponent({
|
|
|
13757
14542
|
return (_ctx, _cache) => {
|
|
13758
14543
|
return openBlock(), createElementBlock("div", {
|
|
13759
14544
|
"data-eldra-ui": "",
|
|
14545
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
13760
14546
|
"data-part": "root",
|
|
14547
|
+
"data-variant": __props.variant,
|
|
13761
14548
|
class: normalizeClass(rootClass.value),
|
|
13762
14549
|
role: __props.variant === "danger" ? "alert" : void 0,
|
|
13763
14550
|
onKeydown
|
|
@@ -13777,7 +14564,7 @@ var Toast_default = /* @__PURE__ */ defineComponent({
|
|
|
13777
14564
|
return openBlock(), createElementBlock("path", {
|
|
13778
14565
|
key: d,
|
|
13779
14566
|
d
|
|
13780
|
-
}, null, 8, _hoisted_2);
|
|
14567
|
+
}, null, 8, _hoisted_2$2);
|
|
13781
14568
|
}), 128))], 2)),
|
|
13782
14569
|
createElementVNode("div", _hoisted_3, [
|
|
13783
14570
|
createElementVNode("p", {
|
|
@@ -13803,7 +14590,8 @@ var Toast_default = /* @__PURE__ */ defineComponent({
|
|
|
13803
14590
|
onClick: onActionClick
|
|
13804
14591
|
}, toDisplayString(__props.action?.label), 3)) : createCommentVNode("", true)
|
|
13805
14592
|
]),
|
|
13806
|
-
|
|
14593
|
+
__props.closable ? (openBlock(), createElementBlock("button", {
|
|
14594
|
+
key: 0,
|
|
13807
14595
|
type: "button",
|
|
13808
14596
|
"data-part": "close",
|
|
13809
14597
|
class: normalizeClass(closeClass.value),
|
|
@@ -13819,7 +14607,7 @@ var Toast_default = /* @__PURE__ */ defineComponent({
|
|
|
13819
14607
|
"stroke-linejoin": "round",
|
|
13820
14608
|
"aria-hidden": "true",
|
|
13821
14609
|
focusable: "false"
|
|
13822
|
-
}, [createElementVNode("path", { d: "M18 6l-12 12" }), createElementVNode("path", { d: "M6 6l12 12" })], -1)])], 10, _hoisted_5)
|
|
14610
|
+
}, [createElementVNode("path", { d: "M18 6l-12 12" }), createElementVNode("path", { d: "M6 6l12 12" })], -1)])], 10, _hoisted_5)) : createCommentVNode("", true)
|
|
13823
14611
|
], 42, _hoisted_1$2);
|
|
13824
14612
|
};
|
|
13825
14613
|
}
|
|
@@ -13832,6 +14620,7 @@ var Toast_default = /* @__PURE__ */ defineComponent({
|
|
|
13832
14620
|
*/
|
|
13833
14621
|
var DEFAULT_DURATION = {
|
|
13834
14622
|
success: 6e3,
|
|
14623
|
+
info: 6e3,
|
|
13835
14624
|
warning: 1e4,
|
|
13836
14625
|
danger: 0
|
|
13837
14626
|
};
|
|
@@ -13874,6 +14663,7 @@ function show(options) {
|
|
|
13874
14663
|
title: options.title,
|
|
13875
14664
|
text: options.text,
|
|
13876
14665
|
action: options.action,
|
|
14666
|
+
closable: options.closable,
|
|
13877
14667
|
duration: resolveDuration(variant, options.duration)
|
|
13878
14668
|
};
|
|
13879
14669
|
const existingIndex = toasts.value.findIndex((toast) => toast.id === id);
|
|
@@ -13913,11 +14703,20 @@ function useToast() {
|
|
|
13913
14703
|
};
|
|
13914
14704
|
}
|
|
13915
14705
|
// src/components/toast/Toaster.vue?vue&type=script&setup=true&lang.ts
|
|
13916
|
-
var _hoisted_1$1 = ["
|
|
14706
|
+
var _hoisted_1$1 = ["data-eldra-scope"];
|
|
14707
|
+
var _hoisted_2$1 = ["aria-label"];
|
|
13917
14708
|
// src/components/toast/Toaster.vue
|
|
13918
14709
|
var Toaster_default = /* @__PURE__ */ defineComponent({
|
|
13919
14710
|
__name: "Toaster",
|
|
13920
14711
|
props: {
|
|
14712
|
+
toasts: { default: void 0 },
|
|
14713
|
+
position: { default: "bottom-right" },
|
|
14714
|
+
maxVisible: { default: void 0 },
|
|
14715
|
+
newestOnTop: {
|
|
14716
|
+
type: Boolean,
|
|
14717
|
+
default: false
|
|
14718
|
+
},
|
|
14719
|
+
teleportTo: { default: "body" },
|
|
13921
14720
|
messages: { default: void 0 },
|
|
13922
14721
|
classes: { default: void 0 }
|
|
13923
14722
|
},
|
|
@@ -13927,7 +14726,8 @@ var Toaster_default = /* @__PURE__ */ defineComponent({
|
|
|
13927
14726
|
* The one toast host an app mounts once (design spec "Toast", shared "Modal dialogs" rules: "While
|
|
13928
14727
|
* a modal dialog or drawer is open, toasts render inside the open dialog"). Owns everything
|
|
13929
14728
|
* `Toast.vue` itself does not: the queue comes from `useToast` (a module-level store, so this is
|
|
13930
|
-
* the only place that ever reads `toasts` to render)
|
|
14729
|
+
* the only place that ever reads `toasts` to render) unless the caller hands it a list of its own
|
|
14730
|
+
* (`toasts`), every toast's auto-dismiss timer (paused
|
|
13931
14731
|
* while the pointer is over the stack or focus is inside it), and where the region actually lives
|
|
13932
14732
|
* in the DOM — a sibling of whatever opens a `Dialog` when one is open (`TOAST_HOST_KEY`, from
|
|
13933
14733
|
* `dialogStack.ts`), `<body>` otherwise.
|
|
@@ -13947,12 +14747,25 @@ var Toaster_default = /* @__PURE__ */ defineComponent({
|
|
|
13947
14747
|
* particular toasts. The spec does not describe cross-variant ordering in enough detail to rule
|
|
13948
14748
|
* this out, and getting it exactly right would mean nesting the two live regions after all.
|
|
13949
14749
|
*/
|
|
14750
|
+
const eldra = useEldraScope();
|
|
13950
14751
|
const props = __props;
|
|
13951
14752
|
const emit = __emit;
|
|
13952
|
-
const
|
|
14753
|
+
const store = useToast();
|
|
13953
14754
|
const m = useMessages(() => props.messages);
|
|
13954
|
-
|
|
13955
|
-
const
|
|
14755
|
+
/** The queue rendered: the caller's own list when `toasts` is given, `useToast`'s otherwise. */
|
|
14756
|
+
const toasts = computed(() => props.toasts ?? store.toasts.value);
|
|
14757
|
+
/** An external list is its owner's to change: closing only emits. */
|
|
14758
|
+
function dismiss(id) {
|
|
14759
|
+
if (props.toasts === void 0) store.dismiss(id);
|
|
14760
|
+
}
|
|
14761
|
+
const variantOf = (toast) => toast.variant ?? "success";
|
|
14762
|
+
/** `maxVisible` keeps the newest (the end of the queue); `newestOnTop` reverses the drawing order. */
|
|
14763
|
+
const visible = computed(() => {
|
|
14764
|
+
const list = props.maxVisible === void 0 ? toasts.value : toasts.value.slice(-props.maxVisible);
|
|
14765
|
+
return props.newestOnTop ? [...list].reverse() : list;
|
|
14766
|
+
});
|
|
14767
|
+
const nonDanger = computed(() => visible.value.filter((toast) => variantOf(toast) !== "danger"));
|
|
14768
|
+
const danger = computed(() => visible.value.filter((toast) => variantOf(toast) === "danger"));
|
|
13956
14769
|
const timers = /* @__PURE__ */ new Map();
|
|
13957
14770
|
/** Spec "Toast" -> Variants: "paused while hovered or focused" — tracked as two independent
|
|
13958
14771
|
* booleans (mouse and focus can each come and go on their own) rather than one flag, so leaving
|
|
@@ -13972,11 +14785,12 @@ var Toaster_default = /* @__PURE__ */ defineComponent({
|
|
|
13972
14785
|
emit("dismiss", id, "timeout");
|
|
13973
14786
|
}
|
|
13974
14787
|
function startTimer(item) {
|
|
13975
|
-
|
|
13976
|
-
|
|
14788
|
+
const duration = variantOf(item) === "danger" ? 0 : item.duration ?? 0;
|
|
14789
|
+
if (duration <= 0) return;
|
|
14790
|
+
const handle = paused.value ? null : setTimeout(() => expire(item.id), duration);
|
|
13977
14791
|
timers.set(item.id, {
|
|
13978
14792
|
item,
|
|
13979
|
-
remaining:
|
|
14793
|
+
remaining: duration,
|
|
13980
14794
|
handle,
|
|
13981
14795
|
startedAt: Date.now()
|
|
13982
14796
|
});
|
|
@@ -14000,7 +14814,7 @@ var Toaster_default = /* @__PURE__ */ defineComponent({
|
|
|
14000
14814
|
/** Starts a timer for every toast newly added to the queue, clears one for every toast that left
|
|
14001
14815
|
* it (by id), and restarts one for a toast that was dedupe-replaced in place (by object identity
|
|
14002
14816
|
* — see `TimerEntry.item`'s own comment). */
|
|
14003
|
-
watch(toasts, (list) => {
|
|
14817
|
+
watch(() => toasts.value.slice(), (list) => {
|
|
14004
14818
|
const currentIds = new Set(list.map((toast) => toast.id));
|
|
14005
14819
|
for (const id of [...timers.keys()]) if (!currentIds.has(id)) clearTimer(id);
|
|
14006
14820
|
for (const item of list) if (timers.get(item.id)?.item !== item) {
|
|
@@ -14030,7 +14844,15 @@ var Toaster_default = /* @__PURE__ */ defineComponent({
|
|
|
14030
14844
|
if (root !== null && related !== null && root.contains(related)) return;
|
|
14031
14845
|
focusedWithin.value = false;
|
|
14032
14846
|
}
|
|
14033
|
-
const
|
|
14847
|
+
const POSITION_CLASS = {
|
|
14848
|
+
"top-left": "left-4 top-4",
|
|
14849
|
+
"top-center": "left-1/2 top-4 -translate-x-1/2",
|
|
14850
|
+
"top-right": "right-4 top-4",
|
|
14851
|
+
"bottom-left": "left-4 bottom-4",
|
|
14852
|
+
"bottom-center": "left-1/2 bottom-4 -translate-x-1/2",
|
|
14853
|
+
"bottom-right": "right-4 bottom-4"
|
|
14854
|
+
};
|
|
14855
|
+
const rootClass = computed(() => partClass(cx(`fixed ${POSITION_CLASS[props.position]} z-toast flex w-full flex-col gap-3 eldra-toast-width`), props.classes, "root"));
|
|
14034
14856
|
/** `list` collapses to `hidden` while empty rather than `flex flex-col gap-3` — not for the aria
|
|
14035
14857
|
* region itself (an empty `aria-live="polite"` region announces nothing regardless of its own
|
|
14036
14858
|
* `display`, and Vue applies the class change in the same patch that inserts a first toast's
|
|
@@ -14039,8 +14861,9 @@ var Toaster_default = /* @__PURE__ */ defineComponent({
|
|
|
14039
14861
|
* would otherwise still count as one empty flex item). */
|
|
14040
14862
|
const listClass = computed(() => partClass(nonDanger.value.length > 0 ? "flex w-full flex-col gap-3" : "hidden", props.classes, "list"));
|
|
14041
14863
|
return (_ctx, _cache) => {
|
|
14042
|
-
return openBlock(), createBlock(Teleport, { to: unref(TOAST_HOST_KEY) ??
|
|
14864
|
+
return openBlock(), createBlock(Teleport, { to: unref(TOAST_HOST_KEY) ?? __props.teleportTo }, [createElementVNode("div", {
|
|
14043
14865
|
"data-eldra-ui": "",
|
|
14866
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
14044
14867
|
"data-part": "root",
|
|
14045
14868
|
class: normalizeClass(rootClass.value),
|
|
14046
14869
|
onMouseenter: _cache[0] || (_cache[0] = ($event) => hovering.value = true),
|
|
@@ -14056,10 +14879,11 @@ var Toaster_default = /* @__PURE__ */ defineComponent({
|
|
|
14056
14879
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(nonDanger.value, (item) => {
|
|
14057
14880
|
return openBlock(), createBlock(Toast_default, {
|
|
14058
14881
|
key: item.id,
|
|
14059
|
-
variant: item
|
|
14882
|
+
variant: variantOf(item),
|
|
14060
14883
|
title: item.title,
|
|
14061
14884
|
text: item.text,
|
|
14062
14885
|
action: item.action,
|
|
14886
|
+
closable: item.closable ?? true,
|
|
14063
14887
|
messages: __props.messages,
|
|
14064
14888
|
onClose: (reason) => onToastClose(item.id, reason),
|
|
14065
14889
|
onAction: ($event) => onToastAction(item.id)
|
|
@@ -14068,17 +14892,19 @@ var Toaster_default = /* @__PURE__ */ defineComponent({
|
|
|
14068
14892
|
"title",
|
|
14069
14893
|
"text",
|
|
14070
14894
|
"action",
|
|
14895
|
+
"closable",
|
|
14071
14896
|
"messages",
|
|
14072
14897
|
"onClose",
|
|
14073
14898
|
"onAction"
|
|
14074
14899
|
]);
|
|
14075
|
-
}), 128))], 10,
|
|
14900
|
+
}), 128))], 10, _hoisted_2$1), (openBlock(true), createElementBlock(Fragment, null, renderList(danger.value, (item) => {
|
|
14076
14901
|
return openBlock(), createBlock(Toast_default, {
|
|
14077
14902
|
key: item.id,
|
|
14078
|
-
variant: item
|
|
14903
|
+
variant: variantOf(item),
|
|
14079
14904
|
title: item.title,
|
|
14080
14905
|
text: item.text,
|
|
14081
14906
|
action: item.action,
|
|
14907
|
+
closable: item.closable ?? true,
|
|
14082
14908
|
messages: __props.messages,
|
|
14083
14909
|
onClose: (reason) => onToastClose(item.id, reason),
|
|
14084
14910
|
onAction: ($event) => onToastAction(item.id)
|
|
@@ -14087,11 +14913,12 @@ var Toaster_default = /* @__PURE__ */ defineComponent({
|
|
|
14087
14913
|
"title",
|
|
14088
14914
|
"text",
|
|
14089
14915
|
"action",
|
|
14916
|
+
"closable",
|
|
14090
14917
|
"messages",
|
|
14091
14918
|
"onClose",
|
|
14092
14919
|
"onAction"
|
|
14093
14920
|
]);
|
|
14094
|
-
}), 128))],
|
|
14921
|
+
}), 128))], 42, _hoisted_1$1)], 8, ["to"]);
|
|
14095
14922
|
};
|
|
14096
14923
|
}
|
|
14097
14924
|
});
|
|
@@ -14116,7 +14943,12 @@ function supportsFocusVisible() {
|
|
|
14116
14943
|
return typeof CSS !== "undefined" && typeof CSS.supports === "function" && CSS.supports("selector(:focus-visible)");
|
|
14117
14944
|
}
|
|
14118
14945
|
// src/components/tooltip/Tooltip.vue?vue&type=script&setup=true&lang.ts
|
|
14119
|
-
var _hoisted_1 = ["
|
|
14946
|
+
var _hoisted_1 = ["data-eldra-scope", "data-eldra-slot"];
|
|
14947
|
+
var _hoisted_2 = [
|
|
14948
|
+
"id",
|
|
14949
|
+
"data-eldra-scope",
|
|
14950
|
+
"data-placement"
|
|
14951
|
+
];
|
|
14120
14952
|
// src/components/tooltip/Tooltip.vue
|
|
14121
14953
|
var Tooltip_default = /* @__PURE__ */ defineComponent({
|
|
14122
14954
|
__name: "Tooltip",
|
|
@@ -14128,6 +14960,62 @@ var Tooltip_default = /* @__PURE__ */ defineComponent({
|
|
|
14128
14960
|
classes: { default: void 0 }
|
|
14129
14961
|
},
|
|
14130
14962
|
setup(__props) {
|
|
14963
|
+
const eldra = useEldraScope();
|
|
14964
|
+
/**
|
|
14965
|
+
* A short text label that names an icon-only trigger on hover and keyboard focus (spec "Tooltip").
|
|
14966
|
+
* Non-modal: built directly on `useFloating` and `useOverlay`, the same pieces `usePopover` wraps
|
|
14967
|
+
* for the Select/MultiSelect/SearchBar family — but a tooltip never joins their "only one open at a
|
|
14968
|
+
* time" registry (`openRegistry`): showing one must never close somebody else's open Select.
|
|
14969
|
+
*
|
|
14970
|
+
* **Anatomy.** `root` is the inline wrapper around the slotted trigger — it carries the hover and
|
|
14971
|
+
* `focusin`/`focusout` listeners the spec asks the *wrapper* for ("Shows on pointer hover over the
|
|
14972
|
+
* wrapper and when focus is within it"), so positioning and hovering both key off one element
|
|
14973
|
+
* regardless of what the trigger itself is. `bubble` is the floating box, teleported like
|
|
14974
|
+
* `usePopover`'s panels (`useTeleportTarget`, shared with it — body, or the open modal `<dialog>`
|
|
14975
|
+
* the trigger sits in). `arrow` is the small triangle.
|
|
14976
|
+
*
|
|
14977
|
+
* **The trigger's ARIA.** "The component generates the tooltip id and wires the trigger to it"
|
|
14978
|
+
* (spec) — `aria-labelledby` for `role="label"`, `aria-describedby` for `role="description"` — and
|
|
14979
|
+
* that has to land on the trigger element itself, not on the neutral wrapper span: a screen reader
|
|
14980
|
+
* computes an element's accessible name from what *that* element points at, and the wrapper is not
|
|
14981
|
+
* the focusable node. The default slot's single element is therefore cloned (`cloneVNode`) with the
|
|
14982
|
+
* attribute merged on, joining rather than replacing anything it already carries. This is the one
|
|
14983
|
+
* place in the package that reaches into a slot's own vnode instead of just rendering it; every
|
|
14984
|
+
* other listener stays on `root` precisely so this graft can stay this small.
|
|
14985
|
+
*
|
|
14986
|
+
* **Always mounted, never re-entrant.** Unlike a `usePopover` panel — mounted fresh on every open,
|
|
14987
|
+
* so its `animate-eldra-popover-in` keyframe replays — the bubble stays in the DOM permanently
|
|
14988
|
+
* (behind `teleportDisabled` until mount, exactly like every other teleport here) and toggles
|
|
14989
|
+
* `opacity`/`pointer-events` through a reactive class. A CSS *transition* only plays on a change to
|
|
14990
|
+
* an element already in the DOM; mounting a fresh element already at its end state plays no fade at
|
|
14991
|
+
* all. The spec's own fade (`duration-fast`, instant under reduced motion — the same token every
|
|
14992
|
+
* other transition in this package reads) needs the former.
|
|
14993
|
+
*
|
|
14994
|
+
* **Hoverable (WCAG 1.4.13).** `hoveringTrigger` and `hoveringBubble` are independent booleans;
|
|
14995
|
+
* `visible` is their disjunction (`keyboardFocusWithin` besides), so the pointer can leave the
|
|
14996
|
+
* trigger and land on the bubble without a gap where neither is true. The `0.5rem` gap itself is
|
|
14997
|
+
* bridged in pure CSS — an invisible `::before` on the bubble, sized to the gap and positioned into
|
|
14998
|
+
* it, extends the bubble's own hit area back to the trigger's edge, so no dead pixels sit between
|
|
14999
|
+
* the two hoverable regions in a real browser (see `bubbleClass` below). Dismissible: `Esc` hides it
|
|
15000
|
+
* without moving focus, and leaving with the pointer or focus clears the dismissal so hovering or
|
|
15001
|
+
* focusing again re-shows it — `useOverlay`'s own Escape handling, with outside-click/focus-out
|
|
15002
|
+
* closing and the focus return both turned off (a tooltip closes on `mouseleave`/`blur`, not on a
|
|
15003
|
+
* click elsewhere, and `Esc` must never move focus off the trigger).
|
|
15004
|
+
*
|
|
15005
|
+
* **Focus only holds it open when the focus is keyboard-visible (operator report / controller
|
|
15006
|
+
* decision).** A mouse click also focuses its target; counting *any* `focusin` toward "focus within
|
|
15007
|
+
* the wrapper" left the bubble stuck open after a click, since `mouseleave` alone could no longer
|
|
15008
|
+
* hide it. `focusWithin` (any focus in the wrapper, for the Dismissed state's "focus leaves the
|
|
15009
|
+
* wrapper" clear below) and `keyboardFocusWithin` (the subset that also keeps `visible` true) are
|
|
15010
|
+
* therefore tracked separately, `keyboardFocusWithin` gated on `isKeyboardFocus` — the browser's own
|
|
15011
|
+
* `element.matches(':focus-visible')`, behind the `supportsFocusVisible` feature test, falling back
|
|
15012
|
+
* to a same-page "was the last input a key or a pointer" flag where it is unsupported (this
|
|
15013
|
+
* package's own test environment, happy-dom, is one such case — see `supportsFocusVisible.ts`).
|
|
15014
|
+
* *Activating* the trigger (`pointerdown`, `click`, or an `Enter`/`Space` `keydown`) additionally
|
|
15015
|
+
* sets `dismissed`, exactly like `Esc` does (spec → States, "Dismissed"): a clicked button should
|
|
15016
|
+
* not keep its label floating just because the click left it focused. The same two watchers below
|
|
15017
|
+
* clear it again once the pointer or focus actually leaves.
|
|
15018
|
+
*/
|
|
14131
15019
|
const props = __props;
|
|
14132
15020
|
const slots = useSlots();
|
|
14133
15021
|
const rootRef = ref(null);
|
|
@@ -14352,6 +15240,8 @@ var Tooltip_default = /* @__PURE__ */ defineComponent({
|
|
|
14352
15240
|
ref_key: "rootRef",
|
|
14353
15241
|
ref: rootRef,
|
|
14354
15242
|
"data-eldra-ui": "",
|
|
15243
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
15244
|
+
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
14355
15245
|
"data-part": "root",
|
|
14356
15246
|
class: normalizeClass(rootClass.value),
|
|
14357
15247
|
onMouseenter: onRootMouseEnter,
|
|
@@ -14370,6 +15260,7 @@ var Tooltip_default = /* @__PURE__ */ defineComponent({
|
|
|
14370
15260
|
ref: bubbleRef,
|
|
14371
15261
|
role: "tooltip",
|
|
14372
15262
|
"data-eldra-ui": "",
|
|
15263
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
14373
15264
|
"data-part": "bubble",
|
|
14374
15265
|
"data-placement": unref(resolvedPlacement),
|
|
14375
15266
|
class: normalizeClass(bubbleClass.value),
|
|
@@ -14381,7 +15272,7 @@ var Tooltip_default = /* @__PURE__ */ defineComponent({
|
|
|
14381
15272
|
"aria-hidden": "true",
|
|
14382
15273
|
class: normalizeClass(arrowClass.value),
|
|
14383
15274
|
style: normalizeStyle(arrowStyle.value)
|
|
14384
|
-
}, null, 6)], 46,
|
|
15275
|
+
}, null, 6)], 46, _hoisted_2)], 8, ["to", "disabled"]))], 42, _hoisted_1);
|
|
14385
15276
|
};
|
|
14386
15277
|
}
|
|
14387
15278
|
});
|
|
@@ -14399,4 +15290,4 @@ var Tooltip_default = /* @__PURE__ */ defineComponent({
|
|
|
14399
15290
|
function mixToward(color, toward, percent) {
|
|
14400
15291
|
return `color-mix(in oklab, ${color}, ${toward} ${percent}%)`;
|
|
14401
15292
|
}
|
|
14402
|
-
export { ACCORDION_KEY, Accordion_default as Accordion, AccordionItem_default as AccordionItem, Avatar_default as Avatar, AvatarGroup_default as AvatarGroup, Badge_default as Badge, Breadcrumb_default as Breadcrumb, Button_default as Button, ButtonGroup_default as ButtonGroup, CHIP_GROUP_KEY, CURRENCY_KEY, Carousel_default as Carousel, Checkbox_default as Checkbox, CheckboxGroup_default as CheckboxGroup, Chip_default as Chip, ChipGroup_default as ChipGroup, Container_default as Container, ContentCard_default as ContentCard, CurrencyInput_default as CurrencyInput, DEFAULT_UI_LOCALE, Dialog_default as Dialog, Drawer_default as Drawer, EditorPlaceholder_default as EditorPlaceholder, EmptyState_default as EmptyState, FIELD_KEY, FILTER_SEARCH_FROM, FILTER_VALUES_SHOWN, FORM_LAYOUT_KEY, FORM_SUBMITTING_KEY, FeatureCard_default as FeatureCard, FieldWrapper_default as FieldWrapper, FilterPanel_default as FilterPanel, FormLayout_default as FormLayout, Icon_default as Icon, Image_default as Image, Input_default as Input, LOCALE_KEY, Lightbox_default as Lightbox, Link_default as Link, LoadMore_default as LoadMore, LogoItem_default as LogoItem, MESSAGES_KEY, MultiSelect_default as MultiSelect, NavMenu_default as NavMenu, Pagination_default as Pagination, Popover_default as Popover, Price_default as Price, ProductCard_default as ProductCard, QuantityStepper_default as QuantityStepper, RadioGroup_default as RadioGroup, RangeSlider_default as RangeSlider, Rating_default as Rating, SECTION_KEY, SWATCH_INK_LUMINANCE_THRESHOLD, SearchBar_default as SearchBar, SearchModal_default as SearchModal, Section_default as Section, Select_default as Select, SiteForm_default as SiteForm, Skeleton_default as Skeleton, StockBadge_default as StockBadge, Switch_default as Switch, TABS_KEY, TOAST_HOST_KEY, Tab_default as Tab, TabPanel_default as TabPanel, TablerIcon_default as TablerIcon, Tabs_default as Tabs, Textarea_default as Textarea, Toast_default as Toast, Toaster_default as Toaster, Tooltip_default as Tooltip, UnitInput_default as UnitInput, VariantPicker_default as VariantPicker, VisuallyHidden_default as VisuallyHidden, appliedFilters, applyMask, carouselPerViewStyle, clampRangeThumb, clearedSelection, closeDialog, createNumberFormat, currencyFractionDigits, currencySymbol, currentDialog, cx, defaultCharacterMeaning, enUS as defaultMessages, enUS, defaultUnitFormat, dropOmittedFacets, facetCanShowAll, facetHasHiddenValues, facetIsRenderable, facetIsSearchable, facetRows, facetSelectedCount, facetStartsOpen, facetSummaryLabels, facetValues, filterNumericBeforeInput, foldForSearch, formatCurrency, formatDate, formatNumber, formatUnit, fractionDigits, frameAspectRatio, hasSelection, histogramBarInRange, initialsFromName, isOpenDialog, isRangeAtLimits, isRangeSelection, isValueDisabled, isValueSelected, joinIds, localeSeparators, matchesSearch, mixToward, nearestRangeThumb, normalizeRangeValue, normalizeText, openDialog, parseLocaleNumber, partClass, prefersReducedMotion, preloadTablerIcons, provideEldraUiCurrency, provideEldraUiLocale, provideEldraUiMessages, rangeKeyTransition, rangeLimits, rangeOf, rangePositionToValue, rangeStepDigits, rangeThumbLimits, rangeValueToPercent, ratingStarStates, removeValue, renderableFacets, resolveCarouselPerView, roundRatingToHalf, selectedValues, setRange, sizeSystemGroups, snapToRangeStep, stripMask, swatchInk, swatchLuminance, tablerIconName, toggleValue, useCarousel, useControllableModel, useDialog, useEldraUiCurrency, useEldraUiLocale, useFloating, useHeadingTag, useListbox, useMessages, useOverlay, usePopover, useSiteForm, useSlotPresence, useToast, useUiId, visibleFacetValues, zoomSizes };
|
|
15293
|
+
export { ACCORDION_KEY, Accordion_default as Accordion, AccordionItem_default as AccordionItem, Avatar_default as Avatar, AvatarGroup_default as AvatarGroup, Badge_default as Badge, Breadcrumb_default as Breadcrumb, Button_default as Button, ButtonGroup_default as ButtonGroup, CHIP_GROUP_KEY, CURRENCY_KEY, Carousel_default as Carousel, Checkbox_default as Checkbox, CheckboxGroup_default as CheckboxGroup, Chip_default as Chip, ChipGroup_default as ChipGroup, Container_default as Container, ContentCard_default as ContentCard, CurrencyInput_default as CurrencyInput, DEFAULT_UI_LOCALE, Dialog_default as Dialog, Drawer_default as Drawer, ELDRA_SCOPE_KEY, EditorPlaceholder_default as EditorPlaceholder, EmptyState_default as EmptyState, FIELD_KEY, FILTER_SEARCH_FROM, FILTER_VALUES_SHOWN, FORM_LAYOUT_KEY, FORM_SUBMITTING_KEY, FeatureCard_default as FeatureCard, FieldWrapper_default as FieldWrapper, FilterPanel_default as FilterPanel, FormLayout_default as FormLayout, Icon_default as Icon, Image_default as Image, Input_default as Input, LOCALE_KEY, Lightbox_default as Lightbox, Link_default as Link, LoadMore_default as LoadMore, LogoItem_default as LogoItem, MESSAGES_KEY, MultiSelect_default as MultiSelect, NavMenu_default as NavMenu, Pagination_default as Pagination, Popover_default as Popover, Price_default as Price, ProductCard_default as ProductCard, QuantityStepper_default as QuantityStepper, Radio_default as Radio, RadioGroup_default as RadioGroup, RangeSlider_default as RangeSlider, Rating_default as Rating, SECTION_KEY, SWATCH_INK_LUMINANCE_THRESHOLD, SearchBar_default as SearchBar, SearchModal_default as SearchModal, Section_default as Section, Select_default as Select, SiteForm_default as SiteForm, Skeleton_default as Skeleton, StockBadge_default as StockBadge, Switch_default as Switch, TABS_KEY, TOAST_HOST_KEY, Tab_default as Tab, TabPanel_default as TabPanel, TablerIcon_default as TablerIcon, Tabs_default as Tabs, Textarea_default as Textarea, Toast_default as Toast, Toaster_default as Toaster, Tooltip_default as Tooltip, UnitInput_default as UnitInput, VariantPicker_default as VariantPicker, VisuallyHidden_default as VisuallyHidden, appliedFilters, applyMask, carouselPerViewStyle, clampRangeThumb, clearedSelection, closeDialog, createNumberFormat, currencyFractionDigits, currencySymbol, currentDialog, cx, defaultCharacterMeaning, enUS as defaultMessages, enUS, defaultUnitFormat, dropOmittedFacets, facetCanShowAll, facetHasHiddenValues, facetIsRenderable, facetIsSearchable, facetRows, facetSelectedCount, facetStartsOpen, facetSummaryLabels, facetValues, filterNumericBeforeInput, foldForSearch, formatCurrency, formatDate, formatNumber, formatUnit, fractionDigits, frameAspectRatio, hasSelection, histogramBarInRange, initialsFromName, isOpenDialog, isRangeAtLimits, isRangeSelection, isValueDisabled, isValueSelected, joinIds, localeSeparators, matchesSearch, mixToward, nearestRangeThumb, normalizeRangeValue, normalizeText, openDialog, parseLocaleNumber, partClass, prefersReducedMotion, preloadTablerIcons, provideEldraScope, provideEldraUiCurrency, provideEldraUiLocale, provideEldraUiMessages, rangeKeyTransition, rangeLimits, rangeOf, rangePositionToValue, rangeStepDigits, rangeThumbLimits, rangeValueToPercent, ratingStarStates, removeValue, renderableFacets, resolveCarouselPerView, roundRatingToHalf, selectedValues, setRange, sizeSystemGroups, snapToRangeStep, stripMask, swatchInk, swatchLuminance, tablerIconName, toggleValue, topLayerDialog, useCarousel, useControllableModel, useDialog, useEldraUiCurrency, useEldraUiLocale, useFloating, useHeadingTag, useListbox, useMessages, useOverlay, usePopover, useSiteForm, useSlotPresence, useToast, useUiId, visibleFacetValues, zoomSizes };
|