@eldrajs/ui 0.2.1 → 0.2.3
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 +10 -0
- package/README.md +150 -3
- package/dist/{VariantPicker-CKw8hmxt.js → VariantPicker-CqDAtSju.js} +208 -167
- package/dist/componentNames.d.ts +1 -1
- package/dist/components/drawer/Drawer.vue.d.ts +5 -3
- package/dist/components/image/Image.vue.d.ts +8 -6
- package/dist/components/image/types.d.ts +22 -5
- package/dist/components/nav-menu/NavMenu.vue.d.ts +62 -0
- package/dist/components/nav-menu/NavMenuPanel.vue.d.ts +27 -0
- package/dist/components/nav-menu/navLinks.d.ts +27 -0
- package/dist/components/nav-menu/navMenuKeys.d.ts +17 -0
- package/dist/components/nav-menu/types.d.ts +87 -0
- package/dist/components.css +5485 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1227 -263
- package/dist/messages/en-US.d.ts +8 -0
- package/dist/messages/is-IS.js +4 -0
- package/dist/resolver.js +1 -0
- package/dist/style.css +569 -205
- package/dist/tailwind.css +221 -117
- package/dist/utils/ratio.d.ts +3 -2
- package/dist/utils/sizes.d.ts +4 -0
- package/dist/vee-validate.js +1 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as useEldraUiLocale, A as FIELD_BASE, B as formatCurrency, C as filterNumericBeforeInput, D as stripMask, E as defaultCharacterMeaning, F as FIELD_SIZE, G as useSlotPresence, H as formatUnit, I as createNumberFormat, J as DEFAULT_UI_LOCALE, K as useHeadingTag, L as currencyFractionDigits, M as FIELD_DISABLED, N as FIELD_LIVE, O as CurrencyInput_default, P as FIELD_SEARCH_APPEARANCE, Q as useEldraUiCurrency, R as currencySymbol, S as VisuallyHidden_default, T as applyMask, U as localeSeparators, V as formatNumber, W as parseLocaleNumber, X as provideEldraUiCurrency, Y as LOCALE_KEY, Z as provideEldraUiLocale, _ as normalizeText, _t as useControllableModel, a as claimShortcut, at as FieldError_default, bt as cx, c as SearchResultsPanel_default, ct as Button_default, d as MultiSelect_default, dt as FORM_LAYOUT_KEY, et as TAG_FILL, f as usePopover, ft as FORM_SUBMITTING_KEY, g as matchRange, gt as enUS, h as useFloating, ht as useMessages, i as SearchBar_default, it as CheckboxGroup_default, j as FIELD_CLEAR_BUTTON, k as UnitInput_default, l as RadioGroup_default, lt as Spinner_default, m as useTeleportTarget, mt as provideEldraUiMessages, n as Textarea_default, nt as TAG_SHAPE, o as ownsShortcut, ot as Checkbox_default, p as useOverlay, pt as MESSAGES_KEY, q as CURRENCY_KEY, r as Select_default, rt as tagPadding, s as releaseShortcut, st as FIELD_KEY, t as VariantPicker_default, tt as TAG_REMOVE_BUTTON, u as QuantityStepper_default, ut as Icon_default, v as useListbox, vt as joinIds, w as Input_default, x as Switch_default, xt as partClass, y as FormLayout_default, yt as useUiId, z as defaultUnitFormat } from "./VariantPicker-
|
|
2
|
-
import { Comment, Fragment, Teleport, Text, cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, h, inject, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, onUnmounted, onUpdated, openBlock, provide, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toValue, unref, useAttrs, useSlots, vShow, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
1
|
+
import { $ as useEldraUiLocale, A as FIELD_BASE, B as formatCurrency, C as filterNumericBeforeInput, D as stripMask, E as defaultCharacterMeaning, F as FIELD_SIZE, G as useSlotPresence, H as formatUnit, I as createNumberFormat, J as DEFAULT_UI_LOCALE, K as useHeadingTag, L as currencyFractionDigits, M as FIELD_DISABLED, N as FIELD_LIVE, O as CurrencyInput_default, P as FIELD_SEARCH_APPEARANCE, Q as useEldraUiCurrency, R as currencySymbol, S as VisuallyHidden_default, T as applyMask, U as localeSeparators, V as formatNumber, W as parseLocaleNumber, X as provideEldraUiCurrency, Y as LOCALE_KEY, Z as provideEldraUiLocale, _ as normalizeText, _t as useControllableModel, a as claimShortcut, at as FieldError_default, bt as cx, c as SearchResultsPanel_default, ct as Button_default, d as MultiSelect_default, dt as FORM_LAYOUT_KEY, et as TAG_FILL, f as usePopover, ft as FORM_SUBMITTING_KEY, g as matchRange, gt as enUS, h as useFloating, ht as useMessages, i as SearchBar_default, it as CheckboxGroup_default, j as FIELD_CLEAR_BUTTON, k as UnitInput_default, l as RadioGroup_default, lt as Spinner_default, m as useTeleportTarget, mt as provideEldraUiMessages, n as Textarea_default, nt as TAG_SHAPE, o as ownsShortcut, ot as Checkbox_default, p as useOverlay, pt as MESSAGES_KEY, q as CURRENCY_KEY, r as Select_default, rt as tagPadding, s as releaseShortcut, st as FIELD_KEY, t as VariantPicker_default, tt as TAG_REMOVE_BUTTON, u as QuantityStepper_default, ut as Icon_default, v as useListbox, vt as joinIds, w as Input_default, x as Switch_default, xt as partClass, y as FormLayout_default, yt as useUiId, z as defaultUnitFormat } from "./VariantPicker-CqDAtSju.js";
|
|
2
|
+
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, onUnmounted, onUpdated, openBlock, provide, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toRef, toValue, unref, useAttrs, useId, useSlots, vShow, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
3
3
|
import { dateTimeFormat } from "@eldrajs/sdk/format/date";
|
|
4
4
|
//#region src/components/accordion/context.ts
|
|
5
5
|
/** The key an `Accordion` provides its `AccordionContext` on. */
|
|
@@ -37,6 +37,7 @@ var Accordion_default = /* @__PURE__ */ defineComponent({
|
|
|
37
37
|
const rootClass = computed(() => partClass(cx("flex flex-col border-t border-border"), props.classes, "root"));
|
|
38
38
|
return (_ctx, _cache) => {
|
|
39
39
|
return openBlock(), createElementBlock("div", {
|
|
40
|
+
"data-eldra-ui": "",
|
|
40
41
|
"data-part": "root",
|
|
41
42
|
class: normalizeClass(rootClass.value)
|
|
42
43
|
}, [renderSlot(_ctx.$slots, "default")], 2);
|
|
@@ -238,10 +239,10 @@ function createPanelHeightAnimator(panel) {
|
|
|
238
239
|
}
|
|
239
240
|
//#endregion
|
|
240
241
|
//#region src/components/accordion/AccordionItem.vue?vue&type=script&setup=true&lang.ts
|
|
241
|
-
var _hoisted_1$
|
|
242
|
-
var _hoisted_2$
|
|
243
|
-
var _hoisted_3$
|
|
244
|
-
var _hoisted_4$
|
|
242
|
+
var _hoisted_1$39 = ["href"];
|
|
243
|
+
var _hoisted_2$25 = { class: "min-w-0 flex-1" };
|
|
244
|
+
var _hoisted_3$16 = ["name", "open"];
|
|
245
|
+
var _hoisted_4$11 = { class: "min-w-0 flex-1" };
|
|
245
246
|
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";
|
|
246
247
|
//#endregion
|
|
247
248
|
//#region src/components/accordion/AccordionItem.vue
|
|
@@ -444,10 +445,11 @@ var AccordionItem_default = /* @__PURE__ */ defineComponent({
|
|
|
444
445
|
return (_ctx, _cache) => {
|
|
445
446
|
return isLinkRow.value ? (openBlock(), createElementBlock("a", {
|
|
446
447
|
key: 0,
|
|
448
|
+
"data-eldra-ui": "",
|
|
447
449
|
"data-part": "root",
|
|
448
450
|
class: normalizeClass(rootClass.value),
|
|
449
451
|
href: __props.href
|
|
450
|
-
}, [createElementVNode("span", _hoisted_2$
|
|
452
|
+
}, [createElementVNode("span", _hoisted_2$25, [(openBlock(), createBlock(resolveDynamicComponent(titleTag.value), {
|
|
451
453
|
"data-part": "title",
|
|
452
454
|
class: normalizeClass(titleClass.value)
|
|
453
455
|
}, {
|
|
@@ -457,10 +459,11 @@ var AccordionItem_default = /* @__PURE__ */ defineComponent({
|
|
|
457
459
|
key: 0,
|
|
458
460
|
"data-part": "help",
|
|
459
461
|
class: normalizeClass(helpClass.value)
|
|
460
|
-
}, toDisplayString(__props.help), 3)) : createCommentVNode("", true)])], 10, _hoisted_1$
|
|
462
|
+
}, toDisplayString(__props.help), 3)) : createCommentVNode("", true)])], 10, _hoisted_1$39)) : (openBlock(), createElementBlock("details", {
|
|
461
463
|
key: 1,
|
|
462
464
|
ref_key: "detailsRef",
|
|
463
465
|
ref: detailsRef,
|
|
466
|
+
"data-eldra-ui": "",
|
|
464
467
|
"data-part": "root",
|
|
465
468
|
class: normalizeClass(rootClass.value),
|
|
466
469
|
name: detailsName.value,
|
|
@@ -470,7 +473,7 @@ var AccordionItem_default = /* @__PURE__ */ defineComponent({
|
|
|
470
473
|
"data-part": "summary",
|
|
471
474
|
class: normalizeClass(summaryClass.value),
|
|
472
475
|
onClick: onSummaryClick
|
|
473
|
-
}, [createElementVNode("span", _hoisted_4$
|
|
476
|
+
}, [createElementVNode("span", _hoisted_4$11, [(openBlock(), createBlock(resolveDynamicComponent(titleTag.value), {
|
|
474
477
|
"data-part": "title",
|
|
475
478
|
class: normalizeClass(titleClass.value)
|
|
476
479
|
}, {
|
|
@@ -496,7 +499,7 @@ var AccordionItem_default = /* @__PURE__ */ defineComponent({
|
|
|
496
499
|
ref: panelRef,
|
|
497
500
|
"data-part": "panel",
|
|
498
501
|
class: normalizeClass(panelClass.value)
|
|
499
|
-
}, [renderSlot(_ctx.$slots, "default")], 2)], 42, _hoisted_3$
|
|
502
|
+
}, [renderSlot(_ctx.$slots, "default")], 2)], 42, _hoisted_3$16));
|
|
500
503
|
};
|
|
501
504
|
}
|
|
502
505
|
});
|
|
@@ -524,7 +527,7 @@ function initialsFromName(name) {
|
|
|
524
527
|
}
|
|
525
528
|
//#endregion
|
|
526
529
|
//#region src/components/avatar/Avatar.vue?vue&type=script&setup=true&lang.ts
|
|
527
|
-
var _hoisted_1$
|
|
530
|
+
var _hoisted_1$38 = ["src"];
|
|
528
531
|
//#endregion
|
|
529
532
|
//#region src/components/avatar/Avatar.vue
|
|
530
533
|
var Avatar_default = /* @__PURE__ */ defineComponent({
|
|
@@ -613,6 +616,7 @@ var Avatar_default = /* @__PURE__ */ defineComponent({
|
|
|
613
616
|
const iconClass = computed(() => partClass(cx("text-text", ICON_SIZE_CLASS[props.size]), props.classes, "icon"));
|
|
614
617
|
return (_ctx, _cache) => {
|
|
615
618
|
return openBlock(), createElementBlock("span", mergeProps({
|
|
619
|
+
"data-eldra-ui": "",
|
|
616
620
|
"data-part": "root",
|
|
617
621
|
class: rootClass.value
|
|
618
622
|
}, rootAria.value), [showImage.value ? (openBlock(), createElementBlock("img", {
|
|
@@ -623,7 +627,7 @@ var Avatar_default = /* @__PURE__ */ defineComponent({
|
|
|
623
627
|
alt: "",
|
|
624
628
|
"aria-hidden": "true",
|
|
625
629
|
onError: onImageError
|
|
626
|
-
}, null, 42, _hoisted_1$
|
|
630
|
+
}, null, 42, _hoisted_1$38)) : showInitials.value ? (openBlock(), createElementBlock("span", {
|
|
627
631
|
key: 1,
|
|
628
632
|
"data-part": "initials",
|
|
629
633
|
class: normalizeClass(initialsClass.value),
|
|
@@ -650,8 +654,8 @@ var Avatar_default = /* @__PURE__ */ defineComponent({
|
|
|
650
654
|
});
|
|
651
655
|
//#endregion
|
|
652
656
|
//#region src/components/avatar/AvatarGroup.vue?vue&type=script&setup=true&lang.ts
|
|
653
|
-
var _hoisted_1$
|
|
654
|
-
var _hoisted_2$
|
|
657
|
+
var _hoisted_1$37 = ["aria-labelledby"];
|
|
658
|
+
var _hoisted_2$24 = ["id"];
|
|
655
659
|
var ITEM_SIZE = "sm";
|
|
656
660
|
/** `Avatar.vue`'s own `size-8` for `sm` — needed again here so the item wrapper (which draws the
|
|
657
661
|
* overlap and the ring) is exactly the avatar's own box, not a guess at its size. */
|
|
@@ -699,6 +703,7 @@ var AvatarGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
699
703
|
const srTextClass = computed(() => partClass("sr-only", props.classes, "srText"));
|
|
700
704
|
return (_ctx, _cache) => {
|
|
701
705
|
return openBlock(), createElementBlock("div", {
|
|
706
|
+
"data-eldra-ui": "",
|
|
702
707
|
"data-part": "root",
|
|
703
708
|
class: normalizeClass(rootClass.value),
|
|
704
709
|
role: "group",
|
|
@@ -726,8 +731,8 @@ var AvatarGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
726
731
|
id: unref(srTextId),
|
|
727
732
|
"data-part": "srText",
|
|
728
733
|
class: normalizeClass(srTextClass.value)
|
|
729
|
-
}, toDisplayString(groupLabel.value), 11, _hoisted_2$
|
|
730
|
-
], 10, _hoisted_1$
|
|
734
|
+
}, toDisplayString(groupLabel.value), 11, _hoisted_2$24)
|
|
735
|
+
], 10, _hoisted_1$37);
|
|
731
736
|
};
|
|
732
737
|
}
|
|
733
738
|
});
|
|
@@ -798,6 +803,7 @@ var Badge_default = /* @__PURE__ */ defineComponent({
|
|
|
798
803
|
const hiddenSuffixClass = computed(() => partClass("sr-only", props.classes, "hiddenSuffix"));
|
|
799
804
|
return (_ctx, _cache) => {
|
|
800
805
|
return openBlock(), createBlock(resolveDynamicComponent(__props.as ?? "span"), {
|
|
806
|
+
"data-eldra-ui": "",
|
|
801
807
|
"data-part": "root",
|
|
802
808
|
class: normalizeClass(rootClass.value)
|
|
803
809
|
}, {
|
|
@@ -827,8 +833,8 @@ var Badge_default = /* @__PURE__ */ defineComponent({
|
|
|
827
833
|
});
|
|
828
834
|
//#endregion
|
|
829
835
|
//#region src/components/breadcrumb/Breadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
830
|
-
var _hoisted_1$
|
|
831
|
-
var _hoisted_2$
|
|
836
|
+
var _hoisted_1$36 = ["aria-label"];
|
|
837
|
+
var _hoisted_2$23 = ["aria-label"];
|
|
832
838
|
//#endregion
|
|
833
839
|
//#region src/components/breadcrumb/Breadcrumb.vue
|
|
834
840
|
var Breadcrumb_default = /* @__PURE__ */ defineComponent({
|
|
@@ -1101,6 +1107,7 @@ var Breadcrumb_default = /* @__PURE__ */ defineComponent({
|
|
|
1101
1107
|
}));
|
|
1102
1108
|
return (_ctx, _cache) => {
|
|
1103
1109
|
return openBlock(), createElementBlock("nav", {
|
|
1110
|
+
"data-eldra-ui": "",
|
|
1104
1111
|
"data-part": "root",
|
|
1105
1112
|
"aria-label": unref(m).breadcrumbLabel,
|
|
1106
1113
|
class: normalizeClass(rootClass.value)
|
|
@@ -1159,7 +1166,7 @@ var Breadcrumb_default = /* @__PURE__ */ defineComponent({
|
|
|
1159
1166
|
class: normalizeClass(ellipsisClass.value),
|
|
1160
1167
|
"aria-label": unref(m).showMoreLevels(middleItems.value.length),
|
|
1161
1168
|
onClick: expand
|
|
1162
|
-
}, " … ", 10, _hoisted_2$
|
|
1169
|
+
}, " … ", 10, _hoisted_2$23)], 2)) : createCommentVNode("", true),
|
|
1163
1170
|
(openBlock(true), createElementBlock(Fragment, null, renderList(middleItems.value, (item, index) => {
|
|
1164
1171
|
return openBlock(), createElementBlock("li", {
|
|
1165
1172
|
key: `middle-${index}`,
|
|
@@ -1225,13 +1232,13 @@ var Breadcrumb_default = /* @__PURE__ */ defineComponent({
|
|
|
1225
1232
|
key: 0,
|
|
1226
1233
|
type: "application/ld+json",
|
|
1227
1234
|
textContent: toDisplayString(structuredDataJson.value)
|
|
1228
|
-
}, null, 8, ["textContent"])) : createCommentVNode("", true)], 10, _hoisted_1$
|
|
1235
|
+
}, null, 8, ["textContent"])) : createCommentVNode("", true)], 10, _hoisted_1$36);
|
|
1229
1236
|
};
|
|
1230
1237
|
}
|
|
1231
1238
|
});
|
|
1232
1239
|
//#endregion
|
|
1233
1240
|
//#region src/components/button/ButtonGroup.vue?vue&type=script&setup=true&lang.ts
|
|
1234
|
-
var _hoisted_1$
|
|
1241
|
+
var _hoisted_1$35 = ["role"];
|
|
1235
1242
|
var BASE$2 = "@container flex items-center";
|
|
1236
1243
|
var LOOSE = "flex-wrap gap-3";
|
|
1237
1244
|
//#endregion
|
|
@@ -1267,10 +1274,11 @@ var ButtonGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
1267
1274
|
const rootClass = computed(() => partClass(cx(BASE$2, props.attached ? ATTACHED : LOOSE), props.classes, "root"));
|
|
1268
1275
|
return (_ctx, _cache) => {
|
|
1269
1276
|
return openBlock(), createElementBlock("div", {
|
|
1277
|
+
"data-eldra-ui": "",
|
|
1270
1278
|
"data-part": "root",
|
|
1271
1279
|
class: normalizeClass(rootClass.value),
|
|
1272
1280
|
role: __props.attached ? "group" : void 0
|
|
1273
|
-
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$
|
|
1281
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$35);
|
|
1274
1282
|
};
|
|
1275
1283
|
}
|
|
1276
1284
|
});
|
|
@@ -2222,16 +2230,16 @@ function useCarousel(options) {
|
|
|
2222
2230
|
}
|
|
2223
2231
|
//#endregion
|
|
2224
2232
|
//#region src/components/carousel/Carousel.vue?vue&type=script&setup=true&lang.ts
|
|
2225
|
-
var _hoisted_1$
|
|
2226
|
-
var _hoisted_2$
|
|
2227
|
-
var _hoisted_3$
|
|
2233
|
+
var _hoisted_1$34 = ["aria-label", "aria-describedby"];
|
|
2234
|
+
var _hoisted_2$22 = ["id"];
|
|
2235
|
+
var _hoisted_3$15 = {
|
|
2228
2236
|
key: 0,
|
|
2229
2237
|
class: "flex shrink-0 items-center gap-2"
|
|
2230
2238
|
};
|
|
2231
|
-
var _hoisted_4$
|
|
2232
|
-
var _hoisted_5$
|
|
2233
|
-
var _hoisted_6$
|
|
2234
|
-
var _hoisted_7$
|
|
2239
|
+
var _hoisted_4$10 = ["disabled", "aria-label"];
|
|
2240
|
+
var _hoisted_5$7 = ["disabled", "aria-label"];
|
|
2241
|
+
var _hoisted_6$3 = ["tabindex", "aria-label"];
|
|
2242
|
+
var _hoisted_7$2 = {
|
|
2235
2243
|
key: 2,
|
|
2236
2244
|
class: "flex items-center justify-between gap-4"
|
|
2237
2245
|
};
|
|
@@ -2451,6 +2459,7 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2451
2459
|
return openBlock(), createElementBlock("section", {
|
|
2452
2460
|
ref_key: "rootRef",
|
|
2453
2461
|
ref: rootRef,
|
|
2462
|
+
"data-eldra-ui": "",
|
|
2454
2463
|
"data-part": "root",
|
|
2455
2464
|
class: normalizeClass(rootClass.value),
|
|
2456
2465
|
"aria-roledescription": "carousel",
|
|
@@ -2462,12 +2471,12 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2462
2471
|
id: unref(instructionsId),
|
|
2463
2472
|
"data-part": "instructions",
|
|
2464
2473
|
class: normalizeClass(instructionsClass.value)
|
|
2465
|
-
}, toDisplayString(unref(messages).slideInstructions), 11, _hoisted_2$
|
|
2474
|
+
}, toDisplayString(unref(messages).slideInstructions), 11, _hoisted_2$22)) : createCommentVNode("", true),
|
|
2466
2475
|
__props.controls === "header" || _ctx.$slots.header ? (openBlock(), createElementBlock("div", {
|
|
2467
2476
|
key: 1,
|
|
2468
2477
|
"data-part": "header",
|
|
2469
2478
|
class: normalizeClass(headerClass.value)
|
|
2470
|
-
}, [renderSlot(_ctx.$slots, "header"), __props.controls === "header" ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
2479
|
+
}, [renderSlot(_ctx.$slots, "header"), __props.controls === "header" ? (openBlock(), createElementBlock("div", _hoisted_3$15, [
|
|
2471
2480
|
__props.counter ? (openBlock(), createElementBlock("span", {
|
|
2472
2481
|
key: 0,
|
|
2473
2482
|
"data-part": "counter",
|
|
@@ -2493,7 +2502,7 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2493
2502
|
"stroke-linejoin": "round",
|
|
2494
2503
|
"aria-hidden": "true",
|
|
2495
2504
|
focusable: "false"
|
|
2496
|
-
}, [createElementVNode("path", { d: "M15 6l-6 6l6 6" })], -1)])], 10, _hoisted_4$
|
|
2505
|
+
}, [createElementVNode("path", { d: "M15 6l-6 6l6 6" })], -1)])], 10, _hoisted_4$10),
|
|
2497
2506
|
createElementVNode("button", {
|
|
2498
2507
|
ref_key: "nextButtonRef",
|
|
2499
2508
|
ref: nextButtonRef,
|
|
@@ -2513,7 +2522,7 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2513
2522
|
"stroke-linejoin": "round",
|
|
2514
2523
|
"aria-hidden": "true",
|
|
2515
2524
|
focusable: "false"
|
|
2516
|
-
}, [createElementVNode("path", { d: "M9 6l6 6l-6 6" })], -1)])], 10, _hoisted_5$
|
|
2525
|
+
}, [createElementVNode("path", { d: "M9 6l6 6l-6 6" })], -1)])], 10, _hoisted_5$7)
|
|
2517
2526
|
])) : createCommentVNode("", true)], 2)) : createCommentVNode("", true),
|
|
2518
2527
|
createElementVNode("div", {
|
|
2519
2528
|
ref_key: "trackRef",
|
|
@@ -2525,8 +2534,8 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2525
2534
|
class: normalizeClass(trackClass.value),
|
|
2526
2535
|
style: normalizeStyle(trackStyle.value),
|
|
2527
2536
|
onKeydown: _cache[2] || (_cache[2] = (...args) => unref(onTrackKeydown) && unref(onTrackKeydown)(...args))
|
|
2528
|
-
}, [renderSlot(_ctx.$slots, "default")], 46, _hoisted_6$
|
|
2529
|
-
showBelowRow.value ? (openBlock(), createElementBlock("div", _hoisted_7$
|
|
2537
|
+
}, [renderSlot(_ctx.$slots, "default")], 46, _hoisted_6$3),
|
|
2538
|
+
showBelowRow.value ? (openBlock(), createElementBlock("div", _hoisted_7$2, [
|
|
2530
2539
|
showPause.value ? (openBlock(), createElementBlock("button", {
|
|
2531
2540
|
key: 0,
|
|
2532
2541
|
type: "button",
|
|
@@ -2599,7 +2608,7 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2599
2608
|
}, [createElementVNode("path", { d: "M9 6l6 6l-6 6" })], -1)])], 10, _hoisted_14)
|
|
2600
2609
|
])) : (openBlock(), createElementBlock("span", _hoisted_15))
|
|
2601
2610
|
])) : createCommentVNode("", true)
|
|
2602
|
-
], 10, _hoisted_1$
|
|
2611
|
+
], 10, _hoisted_1$34);
|
|
2603
2612
|
};
|
|
2604
2613
|
}
|
|
2605
2614
|
});
|
|
@@ -2609,7 +2618,7 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2609
2618
|
var CHIP_GROUP_KEY = Symbol("eldra-ui:chip-group");
|
|
2610
2619
|
//#endregion
|
|
2611
2620
|
//#region src/components/chip/Chip.vue?vue&type=script&setup=true&lang.ts
|
|
2612
|
-
var _hoisted_1$
|
|
2621
|
+
var _hoisted_1$33 = ["aria-label", "disabled"];
|
|
2613
2622
|
var FILL_SELECTED = "bg-primary text-primary-contrast";
|
|
2614
2623
|
var FILL_DISABLED = "bg-surface-strong text-muted cursor-not-allowed";
|
|
2615
2624
|
/** Button's own `primary` hover mix: 14% toward `background`. */
|
|
@@ -2836,6 +2845,7 @@ var Chip_default = /* @__PURE__ */ defineComponent({
|
|
|
2836
2845
|
const removeButtonClass = computed(() => partClass(cx(TAG_REMOVE_BUTTON, REMOVE_SIZE[props.size], effectiveDisabled.value && "cursor-not-allowed"), props.classes, "removeButton"));
|
|
2837
2846
|
return (_ctx, _cache) => {
|
|
2838
2847
|
return openBlock(), createBlock(resolveDynamicComponent(rootTag.value), {
|
|
2848
|
+
"data-eldra-ui": "",
|
|
2839
2849
|
"data-part": "root",
|
|
2840
2850
|
class: normalizeClass(rootClass.value),
|
|
2841
2851
|
type: isInteractiveRoot.value ? "button" : void 0,
|
|
@@ -2897,7 +2907,7 @@ var Chip_default = /* @__PURE__ */ defineComponent({
|
|
|
2897
2907
|
"stroke-linejoin": "round",
|
|
2898
2908
|
"aria-hidden": "true",
|
|
2899
2909
|
focusable: "false"
|
|
2900
|
-
}, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "M18 6l-12 12" }, null, -1), createElementVNode("path", { d: "M6 6l12 12" }, null, -1)])], 2))], 42, _hoisted_1$
|
|
2910
|
+
}, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "M18 6l-12 12" }, null, -1), createElementVNode("path", { d: "M6 6l12 12" }, null, -1)])], 2))], 42, _hoisted_1$33)) : createCommentVNode("", true)
|
|
2901
2911
|
]),
|
|
2902
2912
|
_: 3
|
|
2903
2913
|
}, 40, [
|
|
@@ -2913,7 +2923,7 @@ var Chip_default = /* @__PURE__ */ defineComponent({
|
|
|
2913
2923
|
});
|
|
2914
2924
|
//#endregion
|
|
2915
2925
|
//#region src/components/chip/ChipGroup.vue?vue&type=script&setup=true&lang.ts
|
|
2916
|
-
var _hoisted_1$
|
|
2926
|
+
var _hoisted_1$32 = ["aria-label", "aria-disabled"];
|
|
2917
2927
|
//#endregion
|
|
2918
2928
|
//#region src/components/chip/ChipGroup.vue
|
|
2919
2929
|
var ChipGroup_default = /* @__PURE__ */ defineComponent({
|
|
@@ -2963,12 +2973,13 @@ var ChipGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
2963
2973
|
const rootClass = computed(() => partClass(cx("flex flex-wrap gap-2"), props.classes, "root"));
|
|
2964
2974
|
return (_ctx, _cache) => {
|
|
2965
2975
|
return openBlock(), createElementBlock("div", {
|
|
2976
|
+
"data-eldra-ui": "",
|
|
2966
2977
|
"data-part": "root",
|
|
2967
2978
|
role: "group",
|
|
2968
2979
|
"aria-label": __props.ariaLabel,
|
|
2969
2980
|
"aria-disabled": __props.disabled ? "true" : void 0,
|
|
2970
2981
|
class: normalizeClass(rootClass.value)
|
|
2971
|
-
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$
|
|
2982
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$32);
|
|
2972
2983
|
};
|
|
2973
2984
|
}
|
|
2974
2985
|
});
|
|
@@ -3020,6 +3031,7 @@ var Container_default = /* @__PURE__ */ defineComponent({
|
|
|
3020
3031
|
const rootClass = computed(() => partClass(cx("mx-auto w-full", WIDTH[props.width], props.width === "full" ? "" : GUTTER), props.classes, "root"));
|
|
3021
3032
|
return (_ctx, _cache) => {
|
|
3022
3033
|
return openBlock(), createBlock(resolveDynamicComponent(__props.as), {
|
|
3034
|
+
"data-eldra-ui": "",
|
|
3023
3035
|
"data-part": "root",
|
|
3024
3036
|
class: normalizeClass(rootClass.value)
|
|
3025
3037
|
}, {
|
|
@@ -3082,7 +3094,8 @@ var RATIO_VALUES = {
|
|
|
3082
3094
|
* The frame's `aspect-ratio` CSS value (spec "Image" → Properties, `ratio` row: "`auto` uses the
|
|
3083
3095
|
* image's own ratio, or 4:3 when empty").
|
|
3084
3096
|
*
|
|
3085
|
-
* - A fixed preset always wins outright — its own literal `w / h` ratio, whatever `media` is
|
|
3097
|
+
* - A fixed preset always wins outright — its own literal `w / h` ratio, whatever `media` is; so
|
|
3098
|
+
* does a number, which is the width ÷ height itself.
|
|
3086
3099
|
* - `auto` with a `media.width`/`height` pair uses the image's own intrinsic ratio, computed here
|
|
3087
3100
|
* rather than left to the browser's native `aspect-ratio: auto` resolution: that keyword only
|
|
3088
3101
|
* sizes a *replaced* element (the `<img>` itself) from its intrinsic size, but the frame that
|
|
@@ -3095,19 +3108,76 @@ var RATIO_VALUES = {
|
|
|
3095
3108
|
* - `auto` with no `media` at all falls back to 4:3 (the spec's own fallback for an empty frame).
|
|
3096
3109
|
*/
|
|
3097
3110
|
function frameAspectRatio(ratio, media) {
|
|
3111
|
+
if (typeof ratio === "number") return `${ratio}`;
|
|
3098
3112
|
if (ratio !== "auto") return RATIO_VALUES[ratio];
|
|
3099
3113
|
if (media?.width && media?.height) return `${media.width} / ${media.height}`;
|
|
3100
3114
|
if (!media) return RATIO_VALUES["4x3"];
|
|
3101
3115
|
return "auto";
|
|
3102
3116
|
}
|
|
3103
3117
|
//#endregion
|
|
3118
|
+
//#region src/utils/sizes.ts
|
|
3119
|
+
/** Multiplies every length in an `<img sizes>` list by `zoom`, keeping its media conditions. */
|
|
3120
|
+
function zoomSizes(sizes, zoom) {
|
|
3121
|
+
if (!Number.isFinite(zoom) || zoom <= 1) return sizes;
|
|
3122
|
+
return topLevelEntries(sizes).map((entry) => zoomEntry(entry.trim(), zoom)).join(", ");
|
|
3123
|
+
}
|
|
3124
|
+
/** Puts every entry of an `<img sizes>` list under `condition` as well as its own condition. */
|
|
3125
|
+
function scopeSizes(sizes, condition) {
|
|
3126
|
+
return topLevelEntries(sizes).map((entry) => {
|
|
3127
|
+
const trimmed = entry.trim();
|
|
3128
|
+
const start = sizeValueStart(trimmed);
|
|
3129
|
+
const own = start > 0 ? trimmed.slice(0, start).trim() : "";
|
|
3130
|
+
const value = start >= 0 ? trimmed.slice(start) : trimmed;
|
|
3131
|
+
return `${own ? `${inParens(condition)} and ${inParens(own)}` : condition} ${value}`;
|
|
3132
|
+
}).join(", ");
|
|
3133
|
+
}
|
|
3134
|
+
/** The condition as one parenthesised group, so `and` can join it to another. */
|
|
3135
|
+
function inParens(condition) {
|
|
3136
|
+
let depth = 0;
|
|
3137
|
+
for (let i = 0; i < condition.length && condition.startsWith("("); i++) if (condition[i] === "(") depth++;
|
|
3138
|
+
else if (condition[i] === ")" && --depth === 0) {
|
|
3139
|
+
if (i === condition.length - 1) return condition;
|
|
3140
|
+
break;
|
|
3141
|
+
}
|
|
3142
|
+
return `(${condition})`;
|
|
3143
|
+
}
|
|
3144
|
+
function topLevelEntries(list) {
|
|
3145
|
+
const entries = [];
|
|
3146
|
+
let depth = 0;
|
|
3147
|
+
let start = 0;
|
|
3148
|
+
for (let i = 0; i < list.length; i++) {
|
|
3149
|
+
const char = list[i];
|
|
3150
|
+
if (char === "(") depth++;
|
|
3151
|
+
else if (char === ")") depth = Math.max(0, depth - 1);
|
|
3152
|
+
else if (char === "," && depth === 0) {
|
|
3153
|
+
entries.push(list.slice(start, i));
|
|
3154
|
+
start = i + 1;
|
|
3155
|
+
}
|
|
3156
|
+
}
|
|
3157
|
+
entries.push(list.slice(start));
|
|
3158
|
+
return entries;
|
|
3159
|
+
}
|
|
3160
|
+
/** Where the entry's size value starts: its last token, or the function call it ends with. */
|
|
3161
|
+
function sizeValueStart(entry) {
|
|
3162
|
+
if (!entry.endsWith(")")) return entry.search(/[^\s()]+$/);
|
|
3163
|
+
let depth = 0;
|
|
3164
|
+
for (let i = entry.length - 1; i >= 0; i--) if (entry[i] === ")") depth++;
|
|
3165
|
+
else if (entry[i] === "(" && --depth === 0) return entry.slice(0, i).search(/[\w-]+$/);
|
|
3166
|
+
return -1;
|
|
3167
|
+
}
|
|
3168
|
+
function zoomEntry(entry, zoom) {
|
|
3169
|
+
const start = sizeValueStart(entry);
|
|
3170
|
+
if (start < 0 || /^(?:auto|0)$/i.test(entry.slice(start))) return entry;
|
|
3171
|
+
return `${entry.slice(0, start)}calc(${entry.slice(start)} * ${zoom})`;
|
|
3172
|
+
}
|
|
3173
|
+
//#endregion
|
|
3104
3174
|
//#region src/components/image/Image.vue?vue&type=script&setup=true&lang.ts
|
|
3105
|
-
var _hoisted_1$
|
|
3175
|
+
var _hoisted_1$31 = [
|
|
3106
3176
|
"src",
|
|
3107
3177
|
"width",
|
|
3108
3178
|
"height"
|
|
3109
3179
|
];
|
|
3110
|
-
var _hoisted_2$
|
|
3180
|
+
var _hoisted_2$21 = [
|
|
3111
3181
|
"src",
|
|
3112
3182
|
"srcset",
|
|
3113
3183
|
"sizes",
|
|
@@ -3117,12 +3187,12 @@ var _hoisted_2$19 = [
|
|
|
3117
3187
|
"loading",
|
|
3118
3188
|
"fetchpriority"
|
|
3119
3189
|
];
|
|
3120
|
-
var _hoisted_3$
|
|
3190
|
+
var _hoisted_3$14 = [
|
|
3121
3191
|
"role",
|
|
3122
3192
|
"aria-hidden",
|
|
3123
3193
|
"aria-label"
|
|
3124
3194
|
];
|
|
3125
|
-
var _hoisted_4$
|
|
3195
|
+
var _hoisted_4$9 = { "aria-hidden": "true" };
|
|
3126
3196
|
//#endregion
|
|
3127
3197
|
//#region src/components/image/Image.vue
|
|
3128
3198
|
var Image_default = /* @__PURE__ */ defineComponent({
|
|
@@ -3142,6 +3212,8 @@ var Image_default = /* @__PURE__ */ defineComponent({
|
|
|
3142
3212
|
y: 50
|
|
3143
3213
|
}) },
|
|
3144
3214
|
zoom: { default: 1 },
|
|
3215
|
+
zoomOrigin: { default: "band" },
|
|
3216
|
+
crops: { default: () => [] },
|
|
3145
3217
|
rounded: { default: "none" },
|
|
3146
3218
|
caption: { default: null },
|
|
3147
3219
|
sizes: { default: void 0 },
|
|
@@ -3179,7 +3251,6 @@ var Image_default = /* @__PURE__ */ defineComponent({
|
|
|
3179
3251
|
if (props.decorative) return "";
|
|
3180
3252
|
return props.alt ?? props.media?.alt ?? "";
|
|
3181
3253
|
});
|
|
3182
|
-
const resolvedSizes = computed(() => props.sizes ?? props.media?.sizes);
|
|
3183
3254
|
/** Spec "Image" → Behaviour & motion: eager + high priority for the first hero image, lazy
|
|
3184
3255
|
* everywhere else. `decoding="async"` never blocks the first paint on the decode. */
|
|
3185
3256
|
const loadingAttr = computed(() => props.priority ? "eager" : "lazy");
|
|
@@ -3193,19 +3264,6 @@ var Image_default = /* @__PURE__ */ defineComponent({
|
|
|
3193
3264
|
const rootStyle = computed(() => attrs.style);
|
|
3194
3265
|
const frameStyle = computed(() => ({ aspectRatio: frameAspectRatio(props.ratio, props.media) }));
|
|
3195
3266
|
const frameClass = computed(() => partClass(cx("relative w-full overflow-hidden bg-surface-strong", ROUNDED_CLASS[props.rounded]), props.classes, "frame"));
|
|
3196
|
-
/**
|
|
3197
|
-
* The focal band a given `zoom` keeps safe (percent, 0–100 on either axis): the range a
|
|
3198
|
-
* `transform-origin` can sit in without pulling the scaled image away from one edge of the frame
|
|
3199
|
-
* and exposing the frame's own background there — which acceptance criterion "images are never
|
|
3200
|
-
* stretched or letterboxed" rules out. `object-fit: cover` alone can never letterbox (it always
|
|
3201
|
-
* fills the box, whatever `object-position` is), but a `scale()` *on top of* a cover fit can, once
|
|
3202
|
-
* its origin sits close enough to an edge that magnifying around it pulls the far side inward. The
|
|
3203
|
-
* higher the zoom, the narrower the safe band — at `zoom: 1` every point is safe (the whole 0–100
|
|
3204
|
-
* range); this is the same formula `@eldrajs/theme-core`'s `imageFraming.ts#focalBand` uses
|
|
3205
|
-
* (independently reimplemented here, in percent rather than a 0–1 fraction, because this package
|
|
3206
|
-
* must not depend on that one — see the repo root `CLAUDE.md`'s "Public packages never import a
|
|
3207
|
-
* private one"/framework-free rules — not shared code with it).
|
|
3208
|
-
*/
|
|
3209
3267
|
function focalBand(zoom) {
|
|
3210
3268
|
const inset = (1 - 1 / zoom) * 50;
|
|
3211
3269
|
return [inset, 100 - inset];
|
|
@@ -3214,21 +3272,66 @@ var Image_default = /* @__PURE__ */ defineComponent({
|
|
|
3214
3272
|
const [low, high] = focalBand(zoom);
|
|
3215
3273
|
return Math.min(high, Math.max(low, value));
|
|
3216
3274
|
}
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3275
|
+
const percent = (value) => `${Number(value.toFixed(4))}%`;
|
|
3276
|
+
function cropStyle(focal, zoom, rule = false) {
|
|
3277
|
+
const style = { objectPosition: `${focal.x}% ${focal.y}%` };
|
|
3278
|
+
if (props.zoomOrigin === "focal") {
|
|
3279
|
+
if (zoom <= 1 && !rule) return style;
|
|
3280
|
+
const scale = Math.max(1, zoom);
|
|
3281
|
+
return Object.assign(style, {
|
|
3282
|
+
position: "relative",
|
|
3283
|
+
left: percent(focal.x * (1 - scale)),
|
|
3284
|
+
top: percent(focal.y * (1 - scale)),
|
|
3285
|
+
width: percent(scale * 100),
|
|
3286
|
+
height: percent(scale * 100),
|
|
3287
|
+
maxWidth: "none"
|
|
3288
|
+
});
|
|
3289
|
+
}
|
|
3290
|
+
if (rule) style.transform = "none";
|
|
3291
|
+
if (zoom > 1) {
|
|
3292
|
+
style.transform = `scale(${zoom})`;
|
|
3293
|
+
style.transformOrigin = `${clampToFocalBand(focal.x, zoom)}% ${clampToFocalBand(focal.y, zoom)}%`;
|
|
3230
3294
|
}
|
|
3231
3295
|
return style;
|
|
3296
|
+
}
|
|
3297
|
+
const mediaStyle = computed(() => cropStyle(props.focal, props.zoom));
|
|
3298
|
+
const MEDIA_CONDITION = /^(?!.*(?:<\/|\/\*))[\w ().:<>=/+*-]+$/;
|
|
3299
|
+
const ASPECT_RATIO = /^(?:auto|[\d.]+(?: \/ [\d.]+)?)$/;
|
|
3300
|
+
const finite = (value) => typeof value === "number" && Number.isFinite(value);
|
|
3301
|
+
function resolveCrop(crop) {
|
|
3302
|
+
const focal = crop.focal ?? props.focal;
|
|
3303
|
+
const zoom = crop.zoom ?? props.zoom;
|
|
3304
|
+
const aspectRatio = frameAspectRatio(crop.ratio ?? props.ratio, props.media);
|
|
3305
|
+
if (!(typeof crop.media === "string" && MEDIA_CONDITION.test(crop.media.trim()) && ASPECT_RATIO.test(aspectRatio) && finite(focal?.x) && finite(focal?.y) && finite(zoom))) return;
|
|
3306
|
+
return {
|
|
3307
|
+
media: crop.media.trim(),
|
|
3308
|
+
aspectRatio,
|
|
3309
|
+
focal,
|
|
3310
|
+
zoom,
|
|
3311
|
+
sizes: crop.sizes
|
|
3312
|
+
};
|
|
3313
|
+
}
|
|
3314
|
+
const crops = computed(() => props.crops.flatMap((crop) => resolveCrop(crop) ?? []));
|
|
3315
|
+
const scaledSizes = (sizes, zoom) => sizes && props.fit === "cover" ? zoomSizes(sizes, zoom) : sizes;
|
|
3316
|
+
const resolvedSizes = computed(() => {
|
|
3317
|
+
const sizes = props.sizes ?? props.media?.sizes;
|
|
3318
|
+
const own = scaledSizes(sizes, props.zoom);
|
|
3319
|
+
if (crops.value.length === 0) return own;
|
|
3320
|
+
return [...crops.value.flatMap((crop) => {
|
|
3321
|
+
const cropSizes = scaledSizes(crop.sizes ?? sizes, crop.zoom);
|
|
3322
|
+
return cropSizes ? [scopeSizes(cropSizes, crop.media)] : [];
|
|
3323
|
+
}), ...own ? [own] : []].join(", ") || void 0;
|
|
3324
|
+
});
|
|
3325
|
+
const cropId = useId();
|
|
3326
|
+
const cropScope = computed(() => crops.value.length > 0 ? cropId : void 0);
|
|
3327
|
+
const hyphenate = (property) => property.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
|
|
3328
|
+
const cssString = (value) => `"${value.replace(/[^\w-]/g, (c) => `\\${c.codePointAt(0).toString(16)} `)}"`;
|
|
3329
|
+
const cropCss = computed(() => {
|
|
3330
|
+
const root = `[data-eldra-image-crops=${cssString(cropId)}]`;
|
|
3331
|
+
return [...crops.value].reverse().map((crop) => {
|
|
3332
|
+
const declarations = Object.entries(cropStyle(crop.focal, crop.zoom, true)).map(([property, value]) => `${hyphenate(property)}:${value}!important`).join(";");
|
|
3333
|
+
return `@media ${crop.media}{${root}>[data-part=frame]{aspect-ratio:${crop.aspectRatio}!important}${root}>[data-part=frame]>[data-part=media]{${declarations}}}`;
|
|
3334
|
+
}).join("");
|
|
3232
3335
|
});
|
|
3233
3336
|
const mediaClass = computed(() => partClass(cx("block h-full w-full", props.fit === "contain" ? "object-contain" : "object-cover"), props.classes, "media"));
|
|
3234
3337
|
const placeholderClass = computed(() => partClass(cx("eldra-image-placeholder-hatch text-muted flex h-full w-full flex-col items-center justify-center gap-2"), props.classes, "placeholder"));
|
|
@@ -3236,84 +3339,97 @@ var Image_default = /* @__PURE__ */ defineComponent({
|
|
|
3236
3339
|
const skeletonClass = computed(() => partClass(cx("eldra-skeleton h-full w-full"), props.classes, "skeleton"));
|
|
3237
3340
|
return (_ctx, _cache) => {
|
|
3238
3341
|
return openBlock(), createBlock(resolveDynamicComponent(hasCaption.value ? "figure" : "div"), {
|
|
3342
|
+
"data-eldra-ui": "",
|
|
3239
3343
|
"data-part": "root",
|
|
3344
|
+
"data-eldra-image-crops": cropScope.value,
|
|
3240
3345
|
class: normalizeClass(rootClass.value),
|
|
3241
3346
|
style: normalizeStyle(rootStyle.value)
|
|
3242
3347
|
}, {
|
|
3243
|
-
default: withCtx(() => [
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3348
|
+
default: withCtx(() => [
|
|
3349
|
+
cropScope.value ? (openBlock(), createBlock(resolveDynamicComponent("style"), {
|
|
3350
|
+
key: 0,
|
|
3351
|
+
innerHTML: cropCss.value
|
|
3352
|
+
}, null, 8, ["innerHTML"])) : createCommentVNode("", true),
|
|
3353
|
+
createElementVNode("div", {
|
|
3354
|
+
"data-part": "frame",
|
|
3355
|
+
class: normalizeClass(frameClass.value),
|
|
3356
|
+
style: normalizeStyle(frameStyle.value)
|
|
3357
|
+
}, [__props.loading ? (openBlock(), createElementBlock("div", {
|
|
3358
|
+
key: 0,
|
|
3359
|
+
"data-part": "skeleton",
|
|
3360
|
+
class: normalizeClass(skeletonClass.value),
|
|
3361
|
+
"aria-hidden": "true"
|
|
3362
|
+
}, null, 2)) : __props.media && isVideo.value ? (openBlock(), createElementBlock("video", mergeProps({
|
|
3363
|
+
key: 1,
|
|
3364
|
+
"data-part": "media",
|
|
3365
|
+
class: mediaClass.value,
|
|
3366
|
+
style: mediaStyle.value
|
|
3367
|
+
}, forwardedAttrs.value, {
|
|
3368
|
+
src: __props.media.src,
|
|
3369
|
+
controls: "",
|
|
3370
|
+
playsinline: "",
|
|
3371
|
+
width: __props.media.width,
|
|
3372
|
+
height: __props.media.height
|
|
3373
|
+
}), toDisplayString(resolvedAlt.value), 17, _hoisted_1$31)) : __props.media ? (openBlock(), createElementBlock("img", mergeProps({
|
|
3374
|
+
key: 2,
|
|
3375
|
+
"data-part": "media",
|
|
3376
|
+
class: mediaClass.value,
|
|
3377
|
+
style: mediaStyle.value
|
|
3378
|
+
}, forwardedAttrs.value, {
|
|
3379
|
+
src: __props.media.src,
|
|
3380
|
+
srcset: __props.media.srcset,
|
|
3381
|
+
sizes: resolvedSizes.value,
|
|
3382
|
+
alt: resolvedAlt.value,
|
|
3383
|
+
width: __props.media.width,
|
|
3384
|
+
height: __props.media.height,
|
|
3385
|
+
loading: loadingAttr.value,
|
|
3386
|
+
decoding: "async",
|
|
3387
|
+
fetchpriority: fetchPriority.value
|
|
3388
|
+
}), null, 16, _hoisted_2$21)) : (openBlock(), createElementBlock("div", {
|
|
3389
|
+
key: 3,
|
|
3390
|
+
"data-part": "placeholder",
|
|
3391
|
+
class: normalizeClass(placeholderClass.value),
|
|
3392
|
+
role: __props.decorative ? void 0 : "img",
|
|
3393
|
+
"aria-hidden": __props.decorative ? "true" : void 0,
|
|
3394
|
+
"aria-label": __props.decorative ? void 0 : unref(messages).noImageAvailable
|
|
3395
|
+
}, [_cache[0] || (_cache[0] = createElementVNode("svg", {
|
|
3396
|
+
class: "size-8",
|
|
3397
|
+
viewBox: "0 0 24 24",
|
|
3398
|
+
fill: "none",
|
|
3399
|
+
stroke: "currentColor",
|
|
3400
|
+
"stroke-width": "1.25",
|
|
3401
|
+
"stroke-linecap": "round",
|
|
3402
|
+
"stroke-linejoin": "round",
|
|
3403
|
+
"aria-hidden": "true",
|
|
3404
|
+
focusable: "false"
|
|
3405
|
+
}, [
|
|
3406
|
+
createElementVNode("rect", {
|
|
3407
|
+
x: "3",
|
|
3408
|
+
y: "4",
|
|
3409
|
+
width: "18",
|
|
3410
|
+
height: "16",
|
|
3411
|
+
rx: "2"
|
|
3412
|
+
}),
|
|
3413
|
+
createElementVNode("circle", {
|
|
3414
|
+
cx: "9",
|
|
3415
|
+
cy: "10",
|
|
3416
|
+
r: "1.75"
|
|
3417
|
+
}),
|
|
3418
|
+
createElementVNode("path", { d: "M3 17l5.5 -5.5c.83 -.83 1.67 -.83 2.5 0l7 7" }),
|
|
3419
|
+
createElementVNode("path", { d: "M14 15l1.5 -1.5c.83 -.83 1.67 -.83 2.5 0l3 3" })
|
|
3420
|
+
], -1)), createElementVNode("span", _hoisted_4$9, toDisplayString(unref(messages).noImage), 1)], 10, _hoisted_3$14))], 6),
|
|
3421
|
+
hasCaption.value ? (openBlock(), createElementBlock("figcaption", {
|
|
3422
|
+
key: 1,
|
|
3423
|
+
"data-part": "caption",
|
|
3424
|
+
class: normalizeClass(captionClass.value)
|
|
3425
|
+
}, toDisplayString(__props.caption), 3)) : createCommentVNode("", true)
|
|
3426
|
+
]),
|
|
3315
3427
|
_: 1
|
|
3316
|
-
}, 8, [
|
|
3428
|
+
}, 8, [
|
|
3429
|
+
"data-eldra-image-crops",
|
|
3430
|
+
"class",
|
|
3431
|
+
"style"
|
|
3432
|
+
]);
|
|
3317
3433
|
};
|
|
3318
3434
|
}
|
|
3319
3435
|
});
|
|
@@ -3421,6 +3537,7 @@ var Skeleton_default = /* @__PURE__ */ defineComponent({
|
|
|
3421
3537
|
})));
|
|
3422
3538
|
return (_ctx, _cache) => {
|
|
3423
3539
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
3540
|
+
"data-eldra-ui": "",
|
|
3424
3541
|
"data-part": "root",
|
|
3425
3542
|
class: rootClass.value,
|
|
3426
3543
|
style: rootStyle.value
|
|
@@ -3501,9 +3618,9 @@ var CUE_ARROW_PATHS = [
|
|
|
3501
3618
|
];
|
|
3502
3619
|
//#endregion
|
|
3503
3620
|
//#region src/components/card/ContentCard.vue?vue&type=script&setup=true&lang.ts
|
|
3504
|
-
var _hoisted_1$
|
|
3505
|
-
var _hoisted_2$
|
|
3506
|
-
var _hoisted_3$
|
|
3621
|
+
var _hoisted_1$30 = ["aria-label"];
|
|
3622
|
+
var _hoisted_2$20 = ["datetime"];
|
|
3623
|
+
var _hoisted_3$13 = ["d"];
|
|
3507
3624
|
//#endregion
|
|
3508
3625
|
//#region src/components/card/ContentCard.vue
|
|
3509
3626
|
var ContentCard_default = /* @__PURE__ */ defineComponent({
|
|
@@ -3654,6 +3771,7 @@ var ContentCard_default = /* @__PURE__ */ defineComponent({
|
|
|
3654
3771
|
return (_ctx, _cache) => {
|
|
3655
3772
|
return __props.loading ? (openBlock(), createElementBlock("div", {
|
|
3656
3773
|
key: 0,
|
|
3774
|
+
"data-eldra-ui": "",
|
|
3657
3775
|
"data-part": "root",
|
|
3658
3776
|
class: normalizeClass(rootClass.value),
|
|
3659
3777
|
role: "group",
|
|
@@ -3672,8 +3790,9 @@ var ContentCard_default = /* @__PURE__ */ defineComponent({
|
|
|
3672
3790
|
}, [createVNode(Skeleton_default, {
|
|
3673
3791
|
variant: "text",
|
|
3674
3792
|
lines: 3
|
|
3675
|
-
})], 2)], 10, _hoisted_1$
|
|
3793
|
+
})], 2)], 10, _hoisted_1$30)) : (openBlock(), createElementBlock("article", {
|
|
3676
3794
|
key: 1,
|
|
3795
|
+
"data-eldra-ui": "",
|
|
3677
3796
|
"data-part": "root",
|
|
3678
3797
|
class: normalizeClass(rootClass.value)
|
|
3679
3798
|
}, [hasImage.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -3719,7 +3838,7 @@ var ContentCard_default = /* @__PURE__ */ defineComponent({
|
|
|
3719
3838
|
formattedDate.value ? (openBlock(), createElementBlock("time", {
|
|
3720
3839
|
key: 0,
|
|
3721
3840
|
datetime: __props.date
|
|
3722
|
-
}, toDisplayString(formattedDate.value), 9, _hoisted_2$
|
|
3841
|
+
}, toDisplayString(formattedDate.value), 9, _hoisted_2$20)) : createCommentVNode("", true),
|
|
3723
3842
|
formattedDate.value && __props.meta ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(" · ")], 64)) : createCommentVNode("", true),
|
|
3724
3843
|
__props.meta ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(__props.meta), 1)], 64)) : createCommentVNode("", true)
|
|
3725
3844
|
])], 2)) : createCommentVNode("", true),
|
|
@@ -3742,7 +3861,7 @@ var ContentCard_default = /* @__PURE__ */ defineComponent({
|
|
|
3742
3861
|
return openBlock(), createElementBlock("path", {
|
|
3743
3862
|
key: d,
|
|
3744
3863
|
d
|
|
3745
|
-
}, null, 8, _hoisted_3$
|
|
3864
|
+
}, null, 8, _hoisted_3$13);
|
|
3746
3865
|
}), 128))], 2))], 2)) : createCommentVNode("", true)
|
|
3747
3866
|
], 2)], 2));
|
|
3748
3867
|
};
|
|
@@ -4004,10 +4123,10 @@ function useDialog(options) {
|
|
|
4004
4123
|
}
|
|
4005
4124
|
//#endregion
|
|
4006
4125
|
//#region src/components/dialog/Dialog.vue?vue&type=script&setup=true&lang.ts
|
|
4007
|
-
var _hoisted_1$
|
|
4008
|
-
var _hoisted_2$
|
|
4009
|
-
var _hoisted_3$
|
|
4010
|
-
var _hoisted_4$
|
|
4126
|
+
var _hoisted_1$29 = ["aria-labelledby", "aria-describedby"];
|
|
4127
|
+
var _hoisted_2$19 = ["id"];
|
|
4128
|
+
var _hoisted_3$12 = ["aria-label"];
|
|
4129
|
+
var _hoisted_4$8 = ["id"];
|
|
4011
4130
|
//#endregion
|
|
4012
4131
|
//#region src/components/dialog/Dialog.vue
|
|
4013
4132
|
var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
@@ -4114,6 +4233,7 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
4114
4233
|
return openBlock(), createElementBlock("dialog", {
|
|
4115
4234
|
ref_key: "dialogEl",
|
|
4116
4235
|
ref: dialogEl,
|
|
4236
|
+
"data-eldra-ui": "",
|
|
4117
4237
|
"data-part": "root",
|
|
4118
4238
|
class: normalizeClass(rootClass.value),
|
|
4119
4239
|
"aria-labelledby": unref(titleId),
|
|
@@ -4130,7 +4250,7 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
4130
4250
|
id: unref(titleId),
|
|
4131
4251
|
"data-part": "title",
|
|
4132
4252
|
class: normalizeClass(titleClass.value)
|
|
4133
|
-
}, toDisplayString(__props.title), 11, _hoisted_2$
|
|
4253
|
+
}, toDisplayString(__props.title), 11, _hoisted_2$19), createElementVNode("button", {
|
|
4134
4254
|
type: "button",
|
|
4135
4255
|
"data-part": "close",
|
|
4136
4256
|
class: normalizeClass(closeClass.value),
|
|
@@ -4146,7 +4266,7 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
4146
4266
|
"stroke-linejoin": "round",
|
|
4147
4267
|
"aria-hidden": "true",
|
|
4148
4268
|
focusable: "false"
|
|
4149
|
-
}, [createElementVNode("path", { d: "M18 6l-12 12" }), createElementVNode("path", { d: "M6 6l12 12" })], -1)])], 10, _hoisted_3$
|
|
4269
|
+
}, [createElementVNode("path", { d: "M18 6l-12 12" }), createElementVNode("path", { d: "M6 6l12 12" })], -1)])], 10, _hoisted_3$12)], 2),
|
|
4150
4270
|
createElementVNode("div", {
|
|
4151
4271
|
"data-part": "body",
|
|
4152
4272
|
class: normalizeClass(bodyClass.value)
|
|
@@ -4155,21 +4275,21 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
4155
4275
|
id: unref(descriptionId),
|
|
4156
4276
|
"data-part": "description",
|
|
4157
4277
|
class: normalizeClass(descriptionClass.value)
|
|
4158
|
-
}, toDisplayString(__props.description), 11, _hoisted_4$
|
|
4278
|
+
}, toDisplayString(__props.description), 11, _hoisted_4$8)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default")], 2),
|
|
4159
4279
|
unref(slots).footer ? (openBlock(), createElementBlock("div", {
|
|
4160
4280
|
key: 0,
|
|
4161
4281
|
"data-part": "footer",
|
|
4162
4282
|
class: normalizeClass(footerClass.value)
|
|
4163
4283
|
}, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("", true)
|
|
4164
|
-
], 2)], 42, _hoisted_1$
|
|
4284
|
+
], 2)], 42, _hoisted_1$29);
|
|
4165
4285
|
};
|
|
4166
4286
|
}
|
|
4167
4287
|
});
|
|
4168
4288
|
//#endregion
|
|
4169
4289
|
//#region src/components/drawer/Drawer.vue?vue&type=script&setup=true&lang.ts
|
|
4170
|
-
var _hoisted_1$
|
|
4171
|
-
var _hoisted_2$
|
|
4172
|
-
var _hoisted_3$
|
|
4290
|
+
var _hoisted_1$28 = ["aria-labelledby", "aria-label"];
|
|
4291
|
+
var _hoisted_2$18 = ["id"];
|
|
4292
|
+
var _hoisted_3$11 = ["aria-label"];
|
|
4173
4293
|
var titleAreaClass = "min-w-0 flex-1";
|
|
4174
4294
|
//#endregion
|
|
4175
4295
|
//#region src/components/drawer/Drawer.vue
|
|
@@ -4313,6 +4433,7 @@ var Drawer_default = /* @__PURE__ */ defineComponent({
|
|
|
4313
4433
|
return openBlock(), createElementBlock("dialog", {
|
|
4314
4434
|
ref_key: "dialogEl",
|
|
4315
4435
|
ref: dialogEl,
|
|
4436
|
+
"data-eldra-ui": "",
|
|
4316
4437
|
"data-part": "root",
|
|
4317
4438
|
class: normalizeClass(rootClass.value),
|
|
4318
4439
|
"aria-labelledby": __props.title ? unref(titleId) : void 0,
|
|
@@ -4335,7 +4456,7 @@ var Drawer_default = /* @__PURE__ */ defineComponent({
|
|
|
4335
4456
|
key: 0,
|
|
4336
4457
|
"data-part": "count",
|
|
4337
4458
|
class: normalizeClass(countClass.value)
|
|
4338
|
-
}, "(" + toDisplayString(__props.count) + ")", 3)) : createCommentVNode("", true)], 10, _hoisted_2$
|
|
4459
|
+
}, "(" + toDisplayString(__props.count) + ")", 3)) : createCommentVNode("", true)], 10, _hoisted_2$18)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "header")]), createElementVNode("button", {
|
|
4339
4460
|
ref_key: "closeButtonEl",
|
|
4340
4461
|
ref: closeButtonEl,
|
|
4341
4462
|
type: "button",
|
|
@@ -4353,7 +4474,7 @@ var Drawer_default = /* @__PURE__ */ defineComponent({
|
|
|
4353
4474
|
"stroke-linejoin": "round",
|
|
4354
4475
|
"aria-hidden": "true",
|
|
4355
4476
|
focusable: "false"
|
|
4356
|
-
}, [createElementVNode("path", { d: "M18 6l-12 12" }), createElementVNode("path", { d: "M6 6l12 12" })], -1)])], 10, _hoisted_3$
|
|
4477
|
+
}, [createElementVNode("path", { d: "M18 6l-12 12" }), createElementVNode("path", { d: "M6 6l12 12" })], -1)])], 10, _hoisted_3$11)], 2),
|
|
4357
4478
|
createElementVNode("div", {
|
|
4358
4479
|
"data-part": "body",
|
|
4359
4480
|
class: normalizeClass(bodyClass.value)
|
|
@@ -4363,7 +4484,7 @@ var Drawer_default = /* @__PURE__ */ defineComponent({
|
|
|
4363
4484
|
"data-part": "footer",
|
|
4364
4485
|
class: normalizeClass(footerClass.value)
|
|
4365
4486
|
}, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("", true)
|
|
4366
|
-
], 6)], 42, _hoisted_1$
|
|
4487
|
+
], 6)], 42, _hoisted_1$28);
|
|
4367
4488
|
};
|
|
4368
4489
|
}
|
|
4369
4490
|
});
|
|
@@ -4400,6 +4521,7 @@ var EditorPlaceholder_default = /* @__PURE__ */ defineComponent({
|
|
|
4400
4521
|
const helpClass = computed(() => partClass("text-body-sm text-muted", props.classes, "help"));
|
|
4401
4522
|
return (_ctx, _cache) => {
|
|
4402
4523
|
return openBlock(), createElementBlock("div", {
|
|
4524
|
+
"data-eldra-ui": "",
|
|
4403
4525
|
"data-part": "root",
|
|
4404
4526
|
class: normalizeClass(rootClass.value)
|
|
4405
4527
|
}, [
|
|
@@ -4442,8 +4564,8 @@ var ALERT_TRIANGLE_PATHS = [
|
|
|
4442
4564
|
];
|
|
4443
4565
|
//#endregion
|
|
4444
4566
|
//#region src/components/empty-state/EmptyState.vue?vue&type=script&setup=true&lang.ts
|
|
4445
|
-
var _hoisted_1$
|
|
4446
|
-
var _hoisted_2$
|
|
4567
|
+
var _hoisted_1$27 = ["role"];
|
|
4568
|
+
var _hoisted_2$17 = ["d"];
|
|
4447
4569
|
var ICON_STROKE_WIDTH$2 = 1.5;
|
|
4448
4570
|
//#endregion
|
|
4449
4571
|
//#region src/components/empty-state/EmptyState.vue
|
|
@@ -4524,6 +4646,7 @@ var EmptyState_default = /* @__PURE__ */ defineComponent({
|
|
|
4524
4646
|
const actionsClass = computed(() => partClass("mt-2 flex flex-wrap items-center justify-center gap-3", props.classes, "actions"));
|
|
4525
4647
|
return (_ctx, _cache) => {
|
|
4526
4648
|
return openBlock(), createElementBlock("div", {
|
|
4649
|
+
"data-eldra-ui": "",
|
|
4527
4650
|
"data-part": "root",
|
|
4528
4651
|
class: normalizeClass(rootClass.value),
|
|
4529
4652
|
role: role.value
|
|
@@ -4553,7 +4676,7 @@ var EmptyState_default = /* @__PURE__ */ defineComponent({
|
|
|
4553
4676
|
return openBlock(), createElementBlock("path", {
|
|
4554
4677
|
key: d,
|
|
4555
4678
|
d
|
|
4556
|
-
}, null, 8, _hoisted_2$
|
|
4679
|
+
}, null, 8, _hoisted_2$17);
|
|
4557
4680
|
}), 128))]))], 2),
|
|
4558
4681
|
(openBlock(), createBlock(resolveDynamicComponent(unref(headingTag)), {
|
|
4559
4682
|
"data-part": "title",
|
|
@@ -4578,13 +4701,13 @@ var EmptyState_default = /* @__PURE__ */ defineComponent({
|
|
|
4578
4701
|
label: unref(messages).tryAgain,
|
|
4579
4702
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("retry"))
|
|
4580
4703
|
}, null, 8, ["loading", "label"])) : createCommentVNode("", true)])], 2)) : createCommentVNode("", true)
|
|
4581
|
-
], 10, _hoisted_1$
|
|
4704
|
+
], 10, _hoisted_1$27);
|
|
4582
4705
|
};
|
|
4583
4706
|
}
|
|
4584
4707
|
});
|
|
4585
4708
|
//#endregion
|
|
4586
4709
|
//#region src/components/card/FeatureCard.vue?vue&type=script&setup=true&lang.ts
|
|
4587
|
-
var _hoisted_1$
|
|
4710
|
+
var _hoisted_1$26 = ["d"];
|
|
4588
4711
|
//#endregion
|
|
4589
4712
|
//#region src/components/card/FeatureCard.vue
|
|
4590
4713
|
var FeatureCard_default = /* @__PURE__ */ defineComponent({
|
|
@@ -4667,6 +4790,7 @@ var FeatureCard_default = /* @__PURE__ */ defineComponent({
|
|
|
4667
4790
|
const arrowClass = CUE_ARROW_CLASS;
|
|
4668
4791
|
return (_ctx, _cache) => {
|
|
4669
4792
|
return openBlock(), createElementBlock("div", {
|
|
4793
|
+
"data-eldra-ui": "",
|
|
4670
4794
|
"data-part": "root",
|
|
4671
4795
|
class: normalizeClass(rootClass.value)
|
|
4672
4796
|
}, [
|
|
@@ -4715,7 +4839,7 @@ var FeatureCard_default = /* @__PURE__ */ defineComponent({
|
|
|
4715
4839
|
return openBlock(), createElementBlock("path", {
|
|
4716
4840
|
key: d,
|
|
4717
4841
|
d
|
|
4718
|
-
}, null, 8, _hoisted_1$
|
|
4842
|
+
}, null, 8, _hoisted_1$26);
|
|
4719
4843
|
}), 128))], 2))], 2)) : createCommentVNode("", true)
|
|
4720
4844
|
], 2);
|
|
4721
4845
|
};
|
|
@@ -4723,8 +4847,8 @@ var FeatureCard_default = /* @__PURE__ */ defineComponent({
|
|
|
4723
4847
|
});
|
|
4724
4848
|
//#endregion
|
|
4725
4849
|
//#region src/components/field-wrapper/FieldWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
4726
|
-
var _hoisted_1$
|
|
4727
|
-
var _hoisted_2$
|
|
4850
|
+
var _hoisted_1$25 = ["id"];
|
|
4851
|
+
var _hoisted_2$16 = ["id"];
|
|
4728
4852
|
var GROUP_INLINE = "grid min-w-0 flex-[1_1_14rem] content-start gap-1";
|
|
4729
4853
|
var INLINE_ROW = "order-1 w-full basis-full";
|
|
4730
4854
|
/**
|
|
@@ -4913,6 +5037,7 @@ var FieldWrapper_default = /* @__PURE__ */ defineComponent({
|
|
|
4913
5037
|
return (_ctx, _cache) => {
|
|
4914
5038
|
return openBlock(), createBlock(resolveDynamicComponent(__props.group ? "fieldset" : "div"), {
|
|
4915
5039
|
id: __props.group ? unref(controlId) : void 0,
|
|
5040
|
+
"data-eldra-ui": "",
|
|
4916
5041
|
"data-part": "root",
|
|
4917
5042
|
class: normalizeClass(rootClass.value),
|
|
4918
5043
|
tabindex: __props.group ? -1 : void 0,
|
|
@@ -4971,12 +5096,12 @@ var FieldWrapper_default = /* @__PURE__ */ defineComponent({
|
|
|
4971
5096
|
id: helpId.value,
|
|
4972
5097
|
"data-part": "help",
|
|
4973
5098
|
class: normalizeClass(helpClass.value)
|
|
4974
|
-
}, [renderSlot(_ctx.$slots, "help", {}, () => [createTextVNode(toDisplayString(__props.help), 1)])], 10, _hoisted_1$
|
|
5099
|
+
}, [renderSlot(_ctx.$slots, "help", {}, () => [createTextVNode(toDisplayString(__props.help), 1)])], 10, _hoisted_1$25)) : createCommentVNode("", true), __props.counter ? (openBlock(), createElementBlock("span", {
|
|
4975
5100
|
key: 1,
|
|
4976
5101
|
id: counterId.value,
|
|
4977
5102
|
"data-part": "counter",
|
|
4978
5103
|
class: normalizeClass(counterClass.value)
|
|
4979
|
-
}, toDisplayString(unref(m).counter(count.value, __props.counter.max)), 11, _hoisted_2$
|
|
5104
|
+
}, toDisplayString(unref(m).counter(count.value, __props.counter.max)), 11, _hoisted_2$16)) : createCommentVNode("", true)], 2)) : createCommentVNode("", true)
|
|
4980
5105
|
]),
|
|
4981
5106
|
_: 3
|
|
4982
5107
|
}, 8, [
|
|
@@ -5549,15 +5674,15 @@ var FACET_ROW_GUTTER = "-mx-2 px-2";
|
|
|
5549
5674
|
var FACET_SWATCH_GUTTER = "-mx-1.5 px-1.5";
|
|
5550
5675
|
//#endregion
|
|
5551
5676
|
//#region src/components/filter-panel/facets/ColourFacet.vue?vue&type=script&setup=true&lang.ts
|
|
5552
|
-
var _hoisted_1$
|
|
5553
|
-
var _hoisted_2$
|
|
5677
|
+
var _hoisted_1$24 = ["data-part", "data-value"];
|
|
5678
|
+
var _hoisted_2$15 = [
|
|
5554
5679
|
"value",
|
|
5555
5680
|
"checked",
|
|
5556
5681
|
"disabled",
|
|
5557
5682
|
"aria-label",
|
|
5558
5683
|
"onChange"
|
|
5559
5684
|
];
|
|
5560
|
-
var _hoisted_3$
|
|
5685
|
+
var _hoisted_3$10 = ["data-part"];
|
|
5561
5686
|
var ROWS_BASE = "grid min-w-0 grid-cols-1 gap-x-6 gap-y-0.5 @min-[26rem]:grid-cols-2";
|
|
5562
5687
|
/**
|
|
5563
5688
|
* Spec → Sizes, Swatch tile row: "Grid of `repeat(auto-fill, minmax(4.25rem, 1fr))`, gaps 0.75rem
|
|
@@ -5580,7 +5705,7 @@ var ROW_DISABLED = "cursor-not-allowed";
|
|
|
5580
5705
|
* is picked. No explicit size — the shape wraps the disc inside it, which is what keeps the two
|
|
5581
5706
|
* layouts' different swatch sizes (1.5rem and 2.25rem) to one declaration each.
|
|
5582
5707
|
*/
|
|
5583
|
-
var RING_BASE = "relative inline-flex shrink-0 rounded-full p-0.5 eldra-filter-swatch-ring";
|
|
5708
|
+
var RING_BASE = "relative inline-flex shrink-0 rounded-full border-solid p-0.5 eldra-filter-swatch-ring";
|
|
5584
5709
|
var RING_REST = "border-transparent";
|
|
5585
5710
|
/** Spec → States, "Swatch, checked": "2px `background` gap + 1.5px `text` ring". */
|
|
5586
5711
|
var RING_SELECTED = "border-text";
|
|
@@ -5693,6 +5818,7 @@ var ColourFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
5693
5818
|
const valuesClass = computed(() => partClass(tiles.value ? TILES_BASE$1 : ROWS_BASE, props.classes, "values"));
|
|
5694
5819
|
return (_ctx, _cache) => {
|
|
5695
5820
|
return openBlock(), createElementBlock("div", {
|
|
5821
|
+
"data-eldra-ui": "",
|
|
5696
5822
|
"data-part": "values",
|
|
5697
5823
|
class: normalizeClass(valuesClass.value)
|
|
5698
5824
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(values.value, (value) => {
|
|
@@ -5710,7 +5836,7 @@ var ColourFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
5710
5836
|
disabled: disabled(value),
|
|
5711
5837
|
"aria-label": nameOf(value),
|
|
5712
5838
|
onChange: ($event) => emit("toggle", value.value, $event.target.checked)
|
|
5713
|
-
}, null, 40, _hoisted_2$
|
|
5839
|
+
}, null, 40, _hoisted_2$15),
|
|
5714
5840
|
createElementVNode("span", { class: normalizeClass(ringClass(value)) }, [
|
|
5715
5841
|
createElementVNode("span", {
|
|
5716
5842
|
"data-part": "swatch",
|
|
@@ -5752,23 +5878,26 @@ var ColourFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
5752
5878
|
createElementVNode("span", {
|
|
5753
5879
|
"data-part": tiles.value ? "tileLabel" : "rowLabel",
|
|
5754
5880
|
class: normalizeClass(nameClass(value))
|
|
5755
|
-
}, toDisplayString(value.label), 11, _hoisted_3$
|
|
5881
|
+
}, toDisplayString(value.label), 11, _hoisted_3$10),
|
|
5756
5882
|
createElementVNode("span", {
|
|
5757
5883
|
"data-part": "count",
|
|
5758
5884
|
class: normalizeClass(countClass.value)
|
|
5759
5885
|
}, toDisplayString(value.count), 3)
|
|
5760
|
-
], 10, _hoisted_1$
|
|
5886
|
+
], 10, _hoisted_1$24);
|
|
5761
5887
|
}), 128))], 2);
|
|
5762
5888
|
};
|
|
5763
5889
|
}
|
|
5764
5890
|
});
|
|
5765
5891
|
//#endregion
|
|
5766
5892
|
//#region src/components/filter-panel/facets/ListFacet.vue?vue&type=script&setup=true&lang.ts
|
|
5767
|
-
var _hoisted_1$
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
var
|
|
5893
|
+
var _hoisted_1$23 = {
|
|
5894
|
+
"data-eldra-ui": "",
|
|
5895
|
+
class: "min-w-0"
|
|
5896
|
+
};
|
|
5897
|
+
var _hoisted_2$14 = ["id"];
|
|
5898
|
+
var _hoisted_3$9 = { class: "min-w-0" };
|
|
5899
|
+
var _hoisted_4$7 = ["aria-label"];
|
|
5900
|
+
var _hoisted_5$6 = { class: "min-w-0" };
|
|
5772
5901
|
var SEARCH_BASE = "mb-2 w-full";
|
|
5773
5902
|
/** Spec → Sizes, Facet search: '"No matches" line: 0.875rem `muted`, 0.5rem vertical padding.' */
|
|
5774
5903
|
var NO_MATCHES_BASE = "text-body-sm text-muted";
|
|
@@ -5879,7 +6008,7 @@ var ListFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
5879
6008
|
const showAllClass = computed(() => partClass(SHOW_ALL_BASE, props.classes, "showAll"));
|
|
5880
6009
|
const checkboxClass = computed(() => partClass("", props.classes, "checkbox"));
|
|
5881
6010
|
return (_ctx, _cache) => {
|
|
5882
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
6011
|
+
return openBlock(), createElementBlock("div", _hoisted_1$23, [
|
|
5883
6012
|
searchable.value ? (openBlock(), createElementBlock("div", {
|
|
5884
6013
|
key: 0,
|
|
5885
6014
|
"data-part": "search",
|
|
@@ -5930,7 +6059,7 @@ var ListFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
5930
6059
|
},
|
|
5931
6060
|
onChange: ($event) => emit("toggle", row.value.value, $event)
|
|
5932
6061
|
}, {
|
|
5933
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_3$
|
|
6062
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_3$9, toDisplayString(row.value.label), 1), createElementVNode("span", {
|
|
5934
6063
|
"data-part": "count",
|
|
5935
6064
|
class: normalizeClass(countClass.value)
|
|
5936
6065
|
}, toDisplayString(row.value.count), 3)]),
|
|
@@ -5961,7 +6090,7 @@ var ListFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
5961
6090
|
},
|
|
5962
6091
|
onChange: ($event) => emit("toggle", child.value, $event)
|
|
5963
6092
|
}, {
|
|
5964
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_5$
|
|
6093
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_5$6, toDisplayString(child.label), 1), createElementVNode("span", {
|
|
5965
6094
|
"data-part": "count",
|
|
5966
6095
|
class: normalizeClass(countClass.value)
|
|
5967
6096
|
}, toDisplayString(child.count), 3)]),
|
|
@@ -5974,8 +6103,8 @@ var ListFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
5974
6103
|
"classes",
|
|
5975
6104
|
"onChange"
|
|
5976
6105
|
]);
|
|
5977
|
-
}), 128))], 8, _hoisted_4$
|
|
5978
|
-
}), 128))], 10, _hoisted_2$
|
|
6106
|
+
}), 128))], 8, _hoisted_4$7)) : createCommentVNode("", true)], 64);
|
|
6107
|
+
}), 128))], 10, _hoisted_2$14),
|
|
5979
6108
|
createElementVNode("span", {
|
|
5980
6109
|
"data-part": "noMatches",
|
|
5981
6110
|
role: "status",
|
|
@@ -6043,7 +6172,7 @@ function fractionDigits(value) {
|
|
|
6043
6172
|
function rangeStepDigits(math) {
|
|
6044
6173
|
return Math.max(fractionDigits(math.step), fractionDigits(math.min));
|
|
6045
6174
|
}
|
|
6046
|
-
function clamp(value, low, high) {
|
|
6175
|
+
function clamp$1(value, low, high) {
|
|
6047
6176
|
return Math.min(high, Math.max(low, value));
|
|
6048
6177
|
}
|
|
6049
6178
|
/**
|
|
@@ -6060,11 +6189,11 @@ function clamp(value, low, high) {
|
|
|
6060
6189
|
function snapToRangeStep(value, math) {
|
|
6061
6190
|
const { min, max, step } = math;
|
|
6062
6191
|
if (!Number.isFinite(value)) return min;
|
|
6063
|
-
const target = clamp(value, min, max);
|
|
6192
|
+
const target = clamp$1(value, min, max);
|
|
6064
6193
|
if (!(step > 0)) return target;
|
|
6065
6194
|
const steps = Math.round((target - min) / step);
|
|
6066
6195
|
const digits = rangeStepDigits(math);
|
|
6067
|
-
let nearest = clamp(Number((min + steps * step).toFixed(digits)), min, max);
|
|
6196
|
+
let nearest = clamp$1(Number((min + steps * step).toFixed(digits)), min, max);
|
|
6068
6197
|
for (const bound of [min, max]) if (Math.abs(bound - target) < Math.abs(nearest - target)) nearest = bound;
|
|
6069
6198
|
return nearest;
|
|
6070
6199
|
}
|
|
@@ -6072,7 +6201,7 @@ function snapToRangeStep(value, math) {
|
|
|
6072
6201
|
function rangeValueToPercent(value, math) {
|
|
6073
6202
|
const span = math.max - math.min;
|
|
6074
6203
|
if (!(span > 0)) return 0;
|
|
6075
|
-
return clamp((value - math.min) / span * 100, 0, 100);
|
|
6204
|
+
return clamp$1((value - math.min) / span * 100, 0, 100);
|
|
6076
6205
|
}
|
|
6077
6206
|
/**
|
|
6078
6207
|
* The value under a pointer, snapped to the grid.
|
|
@@ -6083,7 +6212,7 @@ function rangeValueToPercent(value, math) {
|
|
|
6083
6212
|
*/
|
|
6084
6213
|
function rangePositionToValue(clientX, rect, math) {
|
|
6085
6214
|
if (!(rect.width > 0)) return math.min;
|
|
6086
|
-
const ratio = clamp((clientX - rect.left) / rect.width, 0, 1);
|
|
6215
|
+
const ratio = clamp$1((clientX - rect.left) / rect.width, 0, 1);
|
|
6087
6216
|
return snapToRangeStep(math.min + ratio * (math.max - math.min), math);
|
|
6088
6217
|
}
|
|
6089
6218
|
/**
|
|
@@ -6111,7 +6240,7 @@ function rangeThumbLimits(thumb, value, math) {
|
|
|
6111
6240
|
*/
|
|
6112
6241
|
function clampRangeThumb(next, thumb, value, math) {
|
|
6113
6242
|
const { lo, hi } = rangeThumbLimits(thumb, value, math);
|
|
6114
|
-
return clamp(snapToRangeStep(next, math), lo, hi);
|
|
6243
|
+
return clamp$1(snapToRangeStep(next, math), lo, hi);
|
|
6115
6244
|
}
|
|
6116
6245
|
/**
|
|
6117
6246
|
* A `modelValue` as this control will treat it: both ends snapped into the bounds, lowest first.
|
|
@@ -6171,9 +6300,9 @@ function rangeKeyTransition(key, shiftKey, thumb, value, math) {
|
|
|
6171
6300
|
}
|
|
6172
6301
|
//#endregion
|
|
6173
6302
|
//#region src/components/range-slider/RangeSlider.vue?vue&type=script&setup=true&lang.ts
|
|
6174
|
-
var _hoisted_1$
|
|
6175
|
-
var _hoisted_2$
|
|
6176
|
-
var _hoisted_3$
|
|
6303
|
+
var _hoisted_1$22 = ["id"];
|
|
6304
|
+
var _hoisted_2$13 = ["aria-labelledby"];
|
|
6305
|
+
var _hoisted_3$8 = [
|
|
6177
6306
|
"data-thumb",
|
|
6178
6307
|
"data-dragging",
|
|
6179
6308
|
"aria-label",
|
|
@@ -6184,7 +6313,7 @@ var _hoisted_3$6 = [
|
|
|
6184
6313
|
"aria-disabled",
|
|
6185
6314
|
"onKeydown"
|
|
6186
6315
|
];
|
|
6187
|
-
var _hoisted_4$
|
|
6316
|
+
var _hoisted_4$6 = [
|
|
6188
6317
|
"data-input",
|
|
6189
6318
|
"inputmode",
|
|
6190
6319
|
"value",
|
|
@@ -6666,6 +6795,7 @@ var RangeSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
6666
6795
|
const inputClass = computed(() => partClass(cx(INPUT_BASE, props.disabled ? FIELD_DISABLED : FIELD_LIVE), props.classes, "input"));
|
|
6667
6796
|
return (_ctx, _cache) => {
|
|
6668
6797
|
return openBlock(), createElementBlock("div", {
|
|
6798
|
+
"data-eldra-ui": "",
|
|
6669
6799
|
"data-part": "root",
|
|
6670
6800
|
class: normalizeClass(rootClass.value)
|
|
6671
6801
|
}, [
|
|
@@ -6674,7 +6804,7 @@ var RangeSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
6674
6804
|
id: unref(labelId),
|
|
6675
6805
|
"data-part": "label",
|
|
6676
6806
|
class: normalizeClass(labelClass.value)
|
|
6677
|
-
}, toDisplayString(__props.label), 11, _hoisted_1$
|
|
6807
|
+
}, toDisplayString(__props.label), 11, _hoisted_1$22)) : createCommentVNode("", true),
|
|
6678
6808
|
createElementVNode("div", {
|
|
6679
6809
|
role: "group",
|
|
6680
6810
|
"data-part": "group",
|
|
@@ -6716,8 +6846,8 @@ var RangeSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
6716
6846
|
onKeydown: ($event) => onThumbKeydown($event, thumb.thumb),
|
|
6717
6847
|
onKeyup: onThumbKeyup,
|
|
6718
6848
|
onBlur: onThumbBlur
|
|
6719
|
-
}, null, 46, _hoisted_3$
|
|
6720
|
-
}), 128))], 34)], 64)) : createCommentVNode("", true)], 10, _hoisted_2$
|
|
6849
|
+
}, null, 46, _hoisted_3$8);
|
|
6850
|
+
}), 128))], 34)], 64)) : createCommentVNode("", true)], 10, _hoisted_2$13),
|
|
6721
6851
|
__props.inputs ? (openBlock(), createElementBlock("div", {
|
|
6722
6852
|
key: 1,
|
|
6723
6853
|
"data-part": "inputs",
|
|
@@ -6742,7 +6872,7 @@ var RangeSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
6742
6872
|
onFocus: ($event) => onInputFocus(thumb.thumb),
|
|
6743
6873
|
onBlur: ($event) => onInputBlur(thumb.thumb),
|
|
6744
6874
|
onKeydown: withKeys(withModifiers(($event) => onInputEnter(thumb.thumb), ["prevent"]), ["enter"])
|
|
6745
|
-
}, null, 42, _hoisted_4$
|
|
6875
|
+
}, null, 42, _hoisted_4$6)], 64);
|
|
6746
6876
|
}), 128))])], 2)) : createCommentVNode("", true)
|
|
6747
6877
|
], 2);
|
|
6748
6878
|
};
|
|
@@ -6750,7 +6880,7 @@ var RangeSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
6750
6880
|
});
|
|
6751
6881
|
//#endregion
|
|
6752
6882
|
//#region src/components/filter-panel/Histogram.vue?vue&type=script&setup=true&lang.ts
|
|
6753
|
-
var _hoisted_1$
|
|
6883
|
+
var _hoisted_1$21 = ["data-inside"];
|
|
6754
6884
|
var ROOT_BASE$1 = "mb-1 flex h-10 w-full items-end gap-0.5";
|
|
6755
6885
|
/** Spec → States, Range: "histogram bars between the thumbs `border-strong`, outside
|
|
6756
6886
|
* `surface-strong`." */
|
|
@@ -6806,6 +6936,7 @@ var Histogram_default = /* @__PURE__ */ defineComponent({
|
|
|
6806
6936
|
}
|
|
6807
6937
|
return (_ctx, _cache) => {
|
|
6808
6938
|
return openBlock(), createElementBlock("div", {
|
|
6939
|
+
"data-eldra-ui": "",
|
|
6809
6940
|
"data-part": "histogram",
|
|
6810
6941
|
class: normalizeClass(rootClass.value),
|
|
6811
6942
|
"aria-hidden": "true"
|
|
@@ -6816,7 +6947,7 @@ var Histogram_default = /* @__PURE__ */ defineComponent({
|
|
|
6816
6947
|
"data-inside": bar.inside ? "true" : "false",
|
|
6817
6948
|
class: normalizeClass(barClass(bar)),
|
|
6818
6949
|
style: normalizeStyle({ height: `${bar.height * 100}%` })
|
|
6819
|
-
}, null, 14, _hoisted_1$
|
|
6950
|
+
}, null, 14, _hoisted_1$21);
|
|
6820
6951
|
}), 128))], 2);
|
|
6821
6952
|
};
|
|
6822
6953
|
}
|
|
@@ -6997,6 +7128,7 @@ var RangeFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
6997
7128
|
}
|
|
6998
7129
|
return (_ctx, _cache) => {
|
|
6999
7130
|
return openBlock(), createElementBlock("div", {
|
|
7131
|
+
"data-eldra-ui": "",
|
|
7000
7132
|
"data-part": "range",
|
|
7001
7133
|
class: normalizeClass(rangeClass.value)
|
|
7002
7134
|
}, [createVNode(RangeSlider_default, {
|
|
@@ -7258,6 +7390,7 @@ var Link_default = /* @__PURE__ */ defineComponent({
|
|
|
7258
7390
|
const externalIconClass = computed(() => partClass("inline-block align-[-0.1em] ml-[0.15em] size-3.5", props.classes, "externalIcon"));
|
|
7259
7391
|
return (_ctx, _cache) => {
|
|
7260
7392
|
return openBlock(), createBlock(resolveDynamicComponent(tag.value), mergeProps({
|
|
7393
|
+
"data-eldra-ui": "",
|
|
7261
7394
|
"data-part": "root",
|
|
7262
7395
|
class: rootClass.value
|
|
7263
7396
|
}, rootAttrs.value), {
|
|
@@ -7310,9 +7443,12 @@ var Link_default = /* @__PURE__ */ defineComponent({
|
|
|
7310
7443
|
});
|
|
7311
7444
|
//#endregion
|
|
7312
7445
|
//#region src/components/filter-panel/facets/SizeFacet.vue?vue&type=script&setup=true&lang.ts
|
|
7313
|
-
var _hoisted_1$
|
|
7314
|
-
|
|
7315
|
-
|
|
7446
|
+
var _hoisted_1$20 = {
|
|
7447
|
+
"data-eldra-ui": "",
|
|
7448
|
+
class: "min-w-0"
|
|
7449
|
+
};
|
|
7450
|
+
var _hoisted_2$12 = ["data-value"];
|
|
7451
|
+
var _hoisted_3$7 = [
|
|
7316
7452
|
"value",
|
|
7317
7453
|
"checked",
|
|
7318
7454
|
"disabled",
|
|
@@ -7414,7 +7550,7 @@ var SizeFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
7414
7550
|
const tileLabelClass = computed(() => partClass("", props.classes, "tileLabel"));
|
|
7415
7551
|
const sizeGuideClass = computed(() => partClass(SIZE_GUIDE_BASE, props.classes, "sizeGuide"));
|
|
7416
7552
|
return (_ctx, _cache) => {
|
|
7417
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
7553
|
+
return openBlock(), createElementBlock("div", _hoisted_1$20, [(openBlock(true), createElementBlock(Fragment, null, renderList(groups.value, (group, index) => {
|
|
7418
7554
|
return openBlock(), createElementBlock(Fragment, { key: group.key ?? "" }, [group.key !== void 0 ? (openBlock(), createElementBlock("p", {
|
|
7419
7555
|
key: 0,
|
|
7420
7556
|
"data-part": "subheading",
|
|
@@ -7436,11 +7572,11 @@ var SizeFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
7436
7572
|
disabled: disabled(value),
|
|
7437
7573
|
"aria-label": nameOf(value),
|
|
7438
7574
|
onChange: ($event) => emit("toggle", value.value, $event.target.checked)
|
|
7439
|
-
}, null, 40, _hoisted_3$
|
|
7575
|
+
}, null, 40, _hoisted_3$7), createElementVNode("span", {
|
|
7440
7576
|
"data-part": "tileLabel",
|
|
7441
7577
|
class: normalizeClass(tileLabelClass.value),
|
|
7442
7578
|
"aria-hidden": "true"
|
|
7443
|
-
}, toDisplayString(value.label), 3)], 10, _hoisted_2$
|
|
7579
|
+
}, toDisplayString(value.label), 3)], 10, _hoisted_2$12);
|
|
7444
7580
|
}), 128))], 2)], 64);
|
|
7445
7581
|
}), 128)), __props.facet.sizeGuideHref ? (openBlock(), createBlock(Link_default, {
|
|
7446
7582
|
key: 0,
|
|
@@ -7456,7 +7592,7 @@ var SizeFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
7456
7592
|
});
|
|
7457
7593
|
//#endregion
|
|
7458
7594
|
//#region src/components/filter-panel/facets/ToggleFacet.vue?vue&type=script&setup=true&lang.ts
|
|
7459
|
-
var _hoisted_1$
|
|
7595
|
+
var _hoisted_1$19 = ["data-value"];
|
|
7460
7596
|
var VALUES_BASE = "flex min-w-0 flex-col gap-1";
|
|
7461
7597
|
/**
|
|
7462
7598
|
* Spec → Sizes, Switch row: "Min 2.25rem tall, space-between, 0.75rem gap."
|
|
@@ -7511,6 +7647,7 @@ var ToggleFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
7511
7647
|
const countClass = computed(() => partClass(FACET_COUNT, props.classes, "count"));
|
|
7512
7648
|
return (_ctx, _cache) => {
|
|
7513
7649
|
return openBlock(), createElementBlock("div", {
|
|
7650
|
+
"data-eldra-ui": "",
|
|
7514
7651
|
"data-part": "values",
|
|
7515
7652
|
class: normalizeClass(valuesClass.value)
|
|
7516
7653
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(values.value, (value) => {
|
|
@@ -7536,22 +7673,22 @@ var ToggleFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
7536
7673
|
]), createElementVNode("span", {
|
|
7537
7674
|
"data-part": "count",
|
|
7538
7675
|
class: normalizeClass(countClass.value)
|
|
7539
|
-
}, toDisplayString(value.count), 3)], 10, _hoisted_1$
|
|
7676
|
+
}, toDisplayString(value.count), 3)], 10, _hoisted_1$19);
|
|
7540
7677
|
}), 128))], 2);
|
|
7541
7678
|
};
|
|
7542
7679
|
}
|
|
7543
7680
|
});
|
|
7544
7681
|
//#endregion
|
|
7545
7682
|
//#region src/components/filter-panel/FilterGroup.vue?vue&type=script&setup=true&lang.ts
|
|
7546
|
-
var _hoisted_1$
|
|
7547
|
-
var _hoisted_2$
|
|
7548
|
-
var _hoisted_3$
|
|
7683
|
+
var _hoisted_1$18 = ["data-facet"];
|
|
7684
|
+
var _hoisted_2$11 = { class: "m-0" };
|
|
7685
|
+
var _hoisted_3$6 = [
|
|
7549
7686
|
"id",
|
|
7550
7687
|
"aria-expanded",
|
|
7551
7688
|
"aria-controls"
|
|
7552
7689
|
];
|
|
7553
|
-
var _hoisted_4$
|
|
7554
|
-
var _hoisted_5$
|
|
7690
|
+
var _hoisted_4$5 = { "aria-hidden": "true" };
|
|
7691
|
+
var _hoisted_5$5 = ["id"];
|
|
7555
7692
|
var GROUP_BASE = "border-border border-b";
|
|
7556
7693
|
/**
|
|
7557
7694
|
* Spec → Sizes, Trigger row: "Full width, min 3rem tall, padding 0.75rem 0, gap 0.5rem,
|
|
@@ -7564,11 +7701,6 @@ var GROUP_BASE = "border-border border-b";
|
|
|
7564
7701
|
var TRIGGER_BASE = "flex min-h-12 w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-3 text-start eldra-focus";
|
|
7565
7702
|
/**
|
|
7566
7703
|
* Spec → Sizes, Trigger row: "0.9375rem weight 600"; → States, hover: "name underlined 1px".
|
|
7567
|
-
*
|
|
7568
|
-
* `text-filter-trigger`, not `text-control font-semibold`: `text-control`'s `font` shorthand bakes
|
|
7569
|
-
* in `--eldra-text-body-weight` (400), so a trailing `font-semibold` is order-dependent rather than
|
|
7570
|
-
* reliable (`tailwind.css`'s comment on `text-stepper-value` explains the same bug on a different
|
|
7571
|
-
* component) — it rendered the facet name at weight 400 live and in every committed baseline.
|
|
7572
7704
|
*/
|
|
7573
7705
|
var LABEL_BASE = "min-w-0 shrink-0 text-filter-trigger text-text group-hover/trigger:underline group-hover/trigger:decoration-1 group-hover/trigger:underline-offset-[0.2em]";
|
|
7574
7706
|
/**
|
|
@@ -7660,10 +7792,11 @@ var FilterGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
7660
7792
|
const badgeClass = computed(() => partClass(BADGE_BASE, props.classes, "badge"));
|
|
7661
7793
|
return (_ctx, _cache) => {
|
|
7662
7794
|
return openBlock(), createElementBlock("div", {
|
|
7795
|
+
"data-eldra-ui": "",
|
|
7663
7796
|
"data-part": "group",
|
|
7664
7797
|
"data-facet": __props.facet.id,
|
|
7665
7798
|
class: normalizeClass(groupClass.value)
|
|
7666
|
-
}, [createElementVNode("h3", _hoisted_2$
|
|
7799
|
+
}, [createElementVNode("h3", _hoisted_2$11, [createElementVNode("button", {
|
|
7667
7800
|
ref_key: "triggerEl",
|
|
7668
7801
|
ref: triggerEl,
|
|
7669
7802
|
type: "button",
|
|
@@ -7686,7 +7819,7 @@ var FilterGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
7686
7819
|
classes: { root: badgeClass.value },
|
|
7687
7820
|
"hidden-suffix": unref(m).selectedCount(__props.count)
|
|
7688
7821
|
}, {
|
|
7689
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_4$
|
|
7822
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_4$5, toDisplayString(__props.count), 1)]),
|
|
7690
7823
|
_: 1
|
|
7691
7824
|
}, 8, ["classes", "hidden-suffix"])) : createCommentVNode("", true),
|
|
7692
7825
|
__props.summary.length > 0 ? (openBlock(), createElementBlock("span", {
|
|
@@ -7706,7 +7839,7 @@ var FilterGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
7706
7839
|
"aria-hidden": "true",
|
|
7707
7840
|
focusable: "false"
|
|
7708
7841
|
}, [..._cache[1] || (_cache[1] = [createElementVNode("path", { d: "M6 9l6 6l6 -6" }, null, -1)])], 2))
|
|
7709
|
-
], 10, _hoisted_3$
|
|
7842
|
+
], 10, _hoisted_3$6)]), withDirectives(createElementVNode("fieldset", {
|
|
7710
7843
|
"data-part": "body",
|
|
7711
7844
|
id: __props.panelId,
|
|
7712
7845
|
class: normalizeClass(bodyClass.value),
|
|
@@ -7717,14 +7850,14 @@ var FilterGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
7717
7850
|
}, {
|
|
7718
7851
|
default: withCtx(() => [createTextVNode(toDisplayString(__props.facet.label), 1)]),
|
|
7719
7852
|
_: 1
|
|
7720
|
-
}, 8, ["classes"]), renderSlot(_ctx.$slots, "default")], 42, _hoisted_5$
|
|
7853
|
+
}, 8, ["classes"]), renderSlot(_ctx.$slots, "default")], 42, _hoisted_5$5), [[vShow, __props.open]])], 10, _hoisted_1$18);
|
|
7721
7854
|
};
|
|
7722
7855
|
}
|
|
7723
7856
|
});
|
|
7724
7857
|
//#endregion
|
|
7725
7858
|
//#region src/components/filter-panel/FilterPanel.vue?vue&type=script&setup=true&lang.ts
|
|
7726
|
-
var _hoisted_1$
|
|
7727
|
-
var _hoisted_2$
|
|
7859
|
+
var _hoisted_1$17 = ["aria-label"];
|
|
7860
|
+
var _hoisted_2$10 = ["aria-label"];
|
|
7728
7861
|
var ROOT_BASE = "@container min-w-0 text-control text-text";
|
|
7729
7862
|
/**
|
|
7730
7863
|
* The gutter the rows' own bleed needs, and it is load-bearing. The spec gives every option and
|
|
@@ -7942,6 +8075,7 @@ var FilterPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
7942
8075
|
const groupId = (facet, part) => `${idPrefix.value}-${part}-${facet.id.replaceAll(/[^\w-]/g, "-")}`;
|
|
7943
8076
|
return (_ctx, _cache) => {
|
|
7944
8077
|
return openBlock(), createElementBlock("form", {
|
|
8078
|
+
"data-eldra-ui": "",
|
|
7945
8079
|
"data-part": "root",
|
|
7946
8080
|
class: normalizeClass(rootClass.value),
|
|
7947
8081
|
"aria-label": __props.label ?? unref(m).filterPanelLabel,
|
|
@@ -7995,7 +8129,7 @@ var FilterPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
7995
8129
|
"messages",
|
|
7996
8130
|
"onRemove"
|
|
7997
8131
|
])]);
|
|
7998
|
-
}), 128))], 10, _hoisted_2$
|
|
8132
|
+
}), 128))], 10, _hoisted_2$10)) : createCommentVNode("", true),
|
|
7999
8133
|
(openBlock(true), createElementBlock(Fragment, null, renderList(drawn.value, (facet, index) => {
|
|
8000
8134
|
return openBlock(), createBlock(FilterGroup_default, {
|
|
8001
8135
|
key: facet.id,
|
|
@@ -8148,19 +8282,19 @@ var FilterPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
8148
8282
|
default: withCtx(() => [createTextVNode(toDisplayString(__props.resultCount === null ? unref(m).filterPanelShowProducts : unref(m).filterPanelShowResults(__props.resultCount)), 1)]),
|
|
8149
8283
|
_: 1
|
|
8150
8284
|
})])], 2)) : createCommentVNode("", true)
|
|
8151
|
-
], 42, _hoisted_1$
|
|
8285
|
+
], 42, _hoisted_1$17);
|
|
8152
8286
|
};
|
|
8153
8287
|
}
|
|
8154
8288
|
});
|
|
8155
8289
|
//#endregion
|
|
8156
8290
|
//#region src/components/lightbox/Lightbox.vue?vue&type=script&setup=true&lang.ts
|
|
8157
|
-
var _hoisted_1$
|
|
8158
|
-
var _hoisted_2$
|
|
8159
|
-
var _hoisted_3$
|
|
8160
|
-
var _hoisted_4$
|
|
8161
|
-
var _hoisted_5$
|
|
8162
|
-
var _hoisted_6 = ["disabled", "aria-label"];
|
|
8163
|
-
var _hoisted_7 = [
|
|
8291
|
+
var _hoisted_1$16 = ["aria-label"];
|
|
8292
|
+
var _hoisted_2$9 = { key: 1 };
|
|
8293
|
+
var _hoisted_3$5 = ["aria-label"];
|
|
8294
|
+
var _hoisted_4$4 = ["disabled", "aria-label"];
|
|
8295
|
+
var _hoisted_5$4 = ["aria-label"];
|
|
8296
|
+
var _hoisted_6$2 = ["disabled", "aria-label"];
|
|
8297
|
+
var _hoisted_7$1 = [
|
|
8164
8298
|
"aria-current",
|
|
8165
8299
|
"aria-label",
|
|
8166
8300
|
"onClick"
|
|
@@ -8416,6 +8550,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
|
|
|
8416
8550
|
return openBlock(), createElementBlock("dialog", {
|
|
8417
8551
|
ref_key: "dialogEl",
|
|
8418
8552
|
ref: dialogEl,
|
|
8553
|
+
"data-eldra-ui": "",
|
|
8419
8554
|
"data-part": "root",
|
|
8420
8555
|
class: normalizeClass(rootClass.value),
|
|
8421
8556
|
"aria-label": __props.ariaLabel,
|
|
@@ -8431,7 +8566,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
|
|
|
8431
8566
|
"data-part": "counter",
|
|
8432
8567
|
"aria-hidden": "true",
|
|
8433
8568
|
class: normalizeClass(counterClass.value)
|
|
8434
|
-
}, toDisplayString(unref(m).counter(unref(carouselIndex) + 1, unref(count))), 3)) : (openBlock(), createElementBlock("span", _hoisted_2$
|
|
8569
|
+
}, toDisplayString(unref(m).counter(unref(carouselIndex) + 1, unref(count))), 3)) : (openBlock(), createElementBlock("span", _hoisted_2$9)), createElementVNode("button", {
|
|
8435
8570
|
ref_key: "closeButtonEl",
|
|
8436
8571
|
ref: closeButtonEl,
|
|
8437
8572
|
type: "button",
|
|
@@ -8449,7 +8584,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
|
|
|
8449
8584
|
"stroke-linejoin": "round",
|
|
8450
8585
|
"aria-hidden": "true",
|
|
8451
8586
|
focusable: "false"
|
|
8452
|
-
}, [createElementVNode("path", { d: "M18 6l-12 12" }), createElementVNode("path", { d: "M6 6l12 12" })], -1)])], 10, _hoisted_3$
|
|
8587
|
+
}, [createElementVNode("path", { d: "M18 6l-12 12" }), createElementVNode("path", { d: "M6 6l12 12" })], -1)])], 10, _hoisted_3$5)]),
|
|
8453
8588
|
createElementVNode("div", { class: normalizeClass(stageClass.value) }, [
|
|
8454
8589
|
!single.value ? (openBlock(), createElementBlock("button", {
|
|
8455
8590
|
key: 0,
|
|
@@ -8471,7 +8606,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
|
|
|
8471
8606
|
"stroke-linejoin": "round",
|
|
8472
8607
|
"aria-hidden": "true",
|
|
8473
8608
|
focusable: "false"
|
|
8474
|
-
}, [createElementVNode("path", { d: "M15 6l-6 6l6 6" })], -1)])], 10, _hoisted_4$
|
|
8609
|
+
}, [createElementVNode("path", { d: "M15 6l-6 6l6 6" })], -1)])], 10, _hoisted_4$4)) : createCommentVNode("", true),
|
|
8475
8610
|
createElementVNode("div", {
|
|
8476
8611
|
ref_key: "trackRef",
|
|
8477
8612
|
ref: trackRef,
|
|
@@ -8510,7 +8645,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
|
|
|
8510
8645
|
"alt",
|
|
8511
8646
|
"caption"
|
|
8512
8647
|
])) : createCommentVNode("", true)], 2);
|
|
8513
|
-
}), 128))], 14, _hoisted_5$
|
|
8648
|
+
}), 128))], 14, _hoisted_5$4),
|
|
8514
8649
|
!single.value ? (openBlock(), createElementBlock("button", {
|
|
8515
8650
|
key: 1,
|
|
8516
8651
|
ref_key: "nextButtonRef",
|
|
@@ -8531,7 +8666,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
|
|
|
8531
8666
|
"stroke-linejoin": "round",
|
|
8532
8667
|
"aria-hidden": "true",
|
|
8533
8668
|
focusable: "false"
|
|
8534
|
-
}, [createElementVNode("path", { d: "M9 6l6 6l-6 6" })], -1)])], 10, _hoisted_6)) : createCommentVNode("", true)
|
|
8669
|
+
}, [createElementVNode("path", { d: "M9 6l6 6l-6 6" })], -1)])], 10, _hoisted_6$2)) : createCommentVNode("", true)
|
|
8535
8670
|
], 2),
|
|
8536
8671
|
showThumbnails.value && unref(model) ? (openBlock(), createElementBlock("div", {
|
|
8537
8672
|
key: 0,
|
|
@@ -8554,16 +8689,16 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
|
|
|
8554
8689
|
decorative: "",
|
|
8555
8690
|
ratio: "1x1",
|
|
8556
8691
|
fit: "cover"
|
|
8557
|
-
}, null, 8, ["media"])], 10, _hoisted_7);
|
|
8692
|
+
}, null, 8, ["media"])], 10, _hoisted_7$1);
|
|
8558
8693
|
}), 128))], 2)) : createCommentVNode("", true)
|
|
8559
|
-
], 2)], 42, _hoisted_1$
|
|
8694
|
+
], 2)], 42, _hoisted_1$16);
|
|
8560
8695
|
};
|
|
8561
8696
|
}
|
|
8562
8697
|
});
|
|
8563
8698
|
//#endregion
|
|
8564
8699
|
//#region src/components/load-more/LoadMore.vue?vue&type=script&setup=true&lang.ts
|
|
8565
|
-
var _hoisted_1$
|
|
8566
|
-
var _hoisted_2$
|
|
8700
|
+
var _hoisted_1$15 = ["id"];
|
|
8701
|
+
var _hoisted_2$8 = ["aria-describedby", "aria-busy"];
|
|
8567
8702
|
var meterTrackClass = "h-1 w-full max-w-56 overflow-hidden rounded-full bg-surface-strong";
|
|
8568
8703
|
var meterFillClass = "h-full rounded-full bg-text transition-[width] duration-base ease-out motion-reduce:transition-none";
|
|
8569
8704
|
//#endregion
|
|
@@ -8605,9 +8740,10 @@ var LoadMore_default = /* @__PURE__ */ defineComponent({
|
|
|
8605
8740
|
* the 14rem the spec gives (56 × the shared 0.25rem spacing unit), paired with `w-full` for the
|
|
8606
8741
|
* "100%" half of the `min()` on a narrower container. States: "track `surface-strong` … fill
|
|
8607
8742
|
* `text`." Accessibility: "the meter is `aria-hidden`." */
|
|
8608
|
-
const buttonClass = computed(() => partClass(cx("relative inline-flex items-center justify-center control-h gap-2 rounded-md border px-4.5", "border-border-strong bg-background text-text text-button-md
|
|
8743
|
+
const buttonClass = computed(() => partClass(cx("relative inline-flex items-center justify-center control-h gap-2 rounded-md border px-4.5", "border-border-strong bg-background text-text text-button-md cursor-pointer", "eldra-focus hover:border-text hover:bg-surface", "active:scale-[0.98] motion-reduce:active:scale-100"), props.classes, "button"));
|
|
8609
8744
|
return (_ctx, _cache) => {
|
|
8610
8745
|
return openBlock(), createElementBlock("div", {
|
|
8746
|
+
"data-eldra-ui": "",
|
|
8611
8747
|
"data-part": "root",
|
|
8612
8748
|
class: normalizeClass(rootClass.value)
|
|
8613
8749
|
}, [
|
|
@@ -8617,7 +8753,7 @@ var LoadMore_default = /* @__PURE__ */ defineComponent({
|
|
|
8617
8753
|
class: normalizeClass(statusClass.value),
|
|
8618
8754
|
role: "status",
|
|
8619
8755
|
"aria-live": "polite"
|
|
8620
|
-
}, toDisplayString(unref(m).showingOf(__props.shown, __props.total, __props.noun)), 11, _hoisted_1$
|
|
8756
|
+
}, toDisplayString(unref(m).showingOf(__props.shown, __props.total, __props.noun)), 11, _hoisted_1$15),
|
|
8621
8757
|
createElementVNode("div", {
|
|
8622
8758
|
class: normalizeClass(meterTrackClass),
|
|
8623
8759
|
"aria-hidden": "true"
|
|
@@ -8636,15 +8772,15 @@ var LoadMore_default = /* @__PURE__ */ defineComponent({
|
|
|
8636
8772
|
}, [__props.pending ? (openBlock(), createBlock(Spinner_default, {
|
|
8637
8773
|
key: 0,
|
|
8638
8774
|
class: "size-4.5"
|
|
8639
|
-
})) : createCommentVNode("", true), createElementVNode("span", null, toDisplayString(unref(m).loadMore), 1)], 10, _hoisted_2$
|
|
8775
|
+
})) : createCommentVNode("", true), createElementVNode("span", null, toDisplayString(unref(m).loadMore), 1)], 10, _hoisted_2$8)) : createCommentVNode("", true)
|
|
8640
8776
|
], 2);
|
|
8641
8777
|
};
|
|
8642
8778
|
}
|
|
8643
8779
|
});
|
|
8644
8780
|
//#endregion
|
|
8645
8781
|
//#region src/components/logo-item/LogoItem.vue?vue&type=script&setup=true&lang.ts
|
|
8646
|
-
var _hoisted_1$
|
|
8647
|
-
var _hoisted_2$
|
|
8782
|
+
var _hoisted_1$14 = ["data-part"];
|
|
8783
|
+
var _hoisted_2$7 = [
|
|
8648
8784
|
"src",
|
|
8649
8785
|
"srcset",
|
|
8650
8786
|
"sizes",
|
|
@@ -8652,7 +8788,7 @@ var _hoisted_2$5 = [
|
|
|
8652
8788
|
"height",
|
|
8653
8789
|
"alt"
|
|
8654
8790
|
];
|
|
8655
|
-
var _hoisted_3$
|
|
8791
|
+
var _hoisted_3$4 = [
|
|
8656
8792
|
"src",
|
|
8657
8793
|
"srcset",
|
|
8658
8794
|
"sizes",
|
|
@@ -8758,6 +8894,7 @@ var LogoItem_default = /* @__PURE__ */ defineComponent({
|
|
|
8758
8894
|
const srTextClass = computed(() => partClass("sr-only", props.classes, "srText"));
|
|
8759
8895
|
return (_ctx, _cache) => {
|
|
8760
8896
|
return openBlock(), createElementBlock("li", {
|
|
8897
|
+
"data-eldra-ui": "",
|
|
8761
8898
|
"data-part": hasHref.value ? void 0 : "root",
|
|
8762
8899
|
class: normalizeClass(hasHref.value ? void 0 : rootClass.value)
|
|
8763
8900
|
}, [hasHref.value ? (openBlock(), createBlock(resolveDynamicComponent(cellTag.value), mergeProps({
|
|
@@ -8777,7 +8914,7 @@ var LogoItem_default = /* @__PURE__ */ defineComponent({
|
|
|
8777
8914
|
alt: __props.name,
|
|
8778
8915
|
loading: "lazy",
|
|
8779
8916
|
decoding: "async"
|
|
8780
|
-
}, null, 10, _hoisted_2$
|
|
8917
|
+
}, null, 10, _hoisted_2$7)) : (openBlock(), createElementBlock("span", {
|
|
8781
8918
|
key: 1,
|
|
8782
8919
|
"data-part": "wordmark",
|
|
8783
8920
|
class: normalizeClass(wordmarkClass.value)
|
|
@@ -8799,11 +8936,819 @@ var LogoItem_default = /* @__PURE__ */ defineComponent({
|
|
|
8799
8936
|
alt: __props.name,
|
|
8800
8937
|
loading: "lazy",
|
|
8801
8938
|
decoding: "async"
|
|
8802
|
-
}, null, 10, _hoisted_3$
|
|
8939
|
+
}, null, 10, _hoisted_3$4)) : (openBlock(), createElementBlock("span", {
|
|
8803
8940
|
key: 1,
|
|
8804
8941
|
"data-part": "wordmark",
|
|
8805
8942
|
class: normalizeClass(wordmarkClass.value)
|
|
8806
|
-
}, toDisplayString(__props.name), 3))], 64))], 10, _hoisted_1$
|
|
8943
|
+
}, toDisplayString(__props.name), 3))], 64))], 10, _hoisted_1$14);
|
|
8944
|
+
};
|
|
8945
|
+
}
|
|
8946
|
+
});
|
|
8947
|
+
//#endregion
|
|
8948
|
+
//#region src/components/nav-menu/navLinks.ts
|
|
8949
|
+
/** How the page the visitor is on is marked, on every kind of link the menu draws. */
|
|
8950
|
+
var CURRENT_PAGE = "aria-[current=page]:underline aria-[current=page]:decoration-2 aria-[current=page]:underline-offset-[0.2em]";
|
|
8951
|
+
/** Whether an entry has visible text to render. */
|
|
8952
|
+
function isRenderableLink(link) {
|
|
8953
|
+
return typeof link.label === "string" && link.label.trim() !== "";
|
|
8954
|
+
}
|
|
8955
|
+
/** The entries a panel draws, without the ones that have nothing to show. */
|
|
8956
|
+
function panelLinks(item) {
|
|
8957
|
+
return (item.children ?? []).filter(isRenderableLink);
|
|
8958
|
+
}
|
|
8959
|
+
/** Whether a top-level entry opens a panel rather than being a plain link. */
|
|
8960
|
+
function hasPanel(item) {
|
|
8961
|
+
return panelLinks(item).length > 0;
|
|
8962
|
+
}
|
|
8963
|
+
/** Groups entries by their `group`, keeping the order each group first appears in. */
|
|
8964
|
+
function groupLinks(links) {
|
|
8965
|
+
const groups = [];
|
|
8966
|
+
const byName = /* @__PURE__ */ new Map();
|
|
8967
|
+
for (const link of links) {
|
|
8968
|
+
const name = typeof link.group === "string" && link.group.trim() !== "" ? link.group : null;
|
|
8969
|
+
let group = byName.get(name);
|
|
8970
|
+
if (group === void 0) {
|
|
8971
|
+
group = {
|
|
8972
|
+
group: name,
|
|
8973
|
+
links: []
|
|
8974
|
+
};
|
|
8975
|
+
byName.set(name, group);
|
|
8976
|
+
groups.push(group);
|
|
8977
|
+
}
|
|
8978
|
+
group.links.push(link);
|
|
8979
|
+
}
|
|
8980
|
+
return groups;
|
|
8981
|
+
}
|
|
8982
|
+
/** The panel's layout: the item's own, else `mega` when its entries are grouped into columns. */
|
|
8983
|
+
function panelLayout(item) {
|
|
8984
|
+
if (item.layout !== void 0) return item.layout;
|
|
8985
|
+
return panelLinks(item).some((link) => typeof link.group === "string" && link.group.trim() !== "") ? "mega" : "dropdown";
|
|
8986
|
+
}
|
|
8987
|
+
/** Whether the item, or an entry in its panel, is the page the visitor is on. */
|
|
8988
|
+
function containsCurrent(item) {
|
|
8989
|
+
return item.current === true || panelLinks(item).some((link) => link.current === true);
|
|
8990
|
+
}
|
|
8991
|
+
/** Whether an entry goes somewhere; one without a destination renders as plain text. */
|
|
8992
|
+
function hasHref(link) {
|
|
8993
|
+
return typeof link.href === "string" && link.href !== "";
|
|
8994
|
+
}
|
|
8995
|
+
/** The element an entry renders as: `linkAs` (or `a`) with a destination, else `span`. */
|
|
8996
|
+
function navLinkTag(link, linkAs) {
|
|
8997
|
+
return hasHref(link) ? linkAs ?? "a" : "span";
|
|
8998
|
+
}
|
|
8999
|
+
/** An entry's link attributes; a component `linkAs` takes the destination as `to`. */
|
|
9000
|
+
function navLinkAttrs(link, linkAs) {
|
|
9001
|
+
if (!hasHref(link)) return {};
|
|
9002
|
+
const attrs = linkAs !== void 0 && typeof linkAs !== "string" ? { to: link.href } : { href: link.href };
|
|
9003
|
+
if (link.newTab === true) {
|
|
9004
|
+
attrs.target = "_blank";
|
|
9005
|
+
attrs.rel = "noopener noreferrer";
|
|
9006
|
+
}
|
|
9007
|
+
if (link.current === true) attrs["aria-current"] = "page";
|
|
9008
|
+
return attrs;
|
|
9009
|
+
}
|
|
9010
|
+
//#endregion
|
|
9011
|
+
//#region src/components/nav-menu/NavMenuPanel.vue?vue&type=script&setup=true&lang.ts
|
|
9012
|
+
var _hoisted_1$13 = ["data-part"];
|
|
9013
|
+
var _hoisted_2$6 = ["data-part"];
|
|
9014
|
+
var _hoisted_3$3 = ["id", "data-part"];
|
|
9015
|
+
var _hoisted_4$3 = ["data-part", "aria-labelledby"];
|
|
9016
|
+
var _hoisted_5$3 = ["data-part"];
|
|
9017
|
+
var _hoisted_6$1 = ["data-part"];
|
|
9018
|
+
var _hoisted_7 = ["data-part"];
|
|
9019
|
+
//#endregion
|
|
9020
|
+
//#region src/components/nav-menu/NavMenuPanel.vue
|
|
9021
|
+
var NavMenuPanel_default = /* @__PURE__ */ defineComponent({
|
|
9022
|
+
__name: "NavMenuPanel",
|
|
9023
|
+
props: {
|
|
9024
|
+
item: {},
|
|
9025
|
+
idPrefix: {},
|
|
9026
|
+
placement: {},
|
|
9027
|
+
variant: {},
|
|
9028
|
+
messages: {},
|
|
9029
|
+
linkAs: {},
|
|
9030
|
+
classes: {},
|
|
9031
|
+
labelledBy: {}
|
|
9032
|
+
},
|
|
9033
|
+
setup(__props) {
|
|
9034
|
+
const props = __props;
|
|
9035
|
+
const links = computed(() => panelLinks(props.item));
|
|
9036
|
+
const groups = computed(() => groupLinks(links.value));
|
|
9037
|
+
const grouped = computed(() => groups.value.some((group) => group.group !== null));
|
|
9038
|
+
const mega = computed(() => props.placement === "bar" && panelLayout(props.item) === "mega");
|
|
9039
|
+
const bar = computed(() => props.placement === "bar");
|
|
9040
|
+
/** A part's name where it is drawn, so the bar's panels and the drawer's are styled apart. */
|
|
9041
|
+
function part(name) {
|
|
9042
|
+
return bar.value ? name : `drawer${name.charAt(0).toUpperCase()}${name.slice(1)}`;
|
|
9043
|
+
}
|
|
9044
|
+
function panelPartClass(base, name) {
|
|
9045
|
+
return partClass(base, props.classes, part(name));
|
|
9046
|
+
}
|
|
9047
|
+
/** A bar entry's colour at rest, and what a link adds on hover and as the current page. */
|
|
9048
|
+
const BAR_ENTRY = {
|
|
9049
|
+
ghost: "text-text",
|
|
9050
|
+
muted: "text-muted"
|
|
9051
|
+
};
|
|
9052
|
+
const BAR_LINK = {
|
|
9053
|
+
ghost: "hover:bg-surface",
|
|
9054
|
+
muted: "hover:text-text aria-[current=page]:text-text"
|
|
9055
|
+
};
|
|
9056
|
+
function headingId(index) {
|
|
9057
|
+
return `${props.idPrefix}-group-${index}`;
|
|
9058
|
+
}
|
|
9059
|
+
const overviewClass = computed(() => panelPartClass(cx("flex rounded-md text-body font-semibold eldra-focus", bar.value ? cx("mb-2 px-3 py-2", BAR_ENTRY[props.variant], BAR_LINK[props.variant]) : "py-2.5 text-text", CURRENT_PAGE), "overview"));
|
|
9060
|
+
const columnsClass = computed(() => {
|
|
9061
|
+
if (!grouped.value) return panelPartClass("", "columns");
|
|
9062
|
+
return panelPartClass(bar.value ? "grid eldra-nav-menu-columns gap-6" : "flex flex-col gap-4", "columns");
|
|
9063
|
+
});
|
|
9064
|
+
const groupClass = computed(() => panelPartClass("flex min-w-0 flex-col", "group"));
|
|
9065
|
+
const groupHeadingClass = computed(() => panelPartClass(cx("pb-1 text-overline text-muted", bar.value && "px-3"), "groupHeading"));
|
|
9066
|
+
const panelListClass = computed(() => panelPartClass(mega.value && !grouped.value ? "grid eldra-nav-menu-columns gap-x-6 gap-y-0.5" : "flex flex-col gap-0.5", "panelList"));
|
|
9067
|
+
const panelItemClass = computed(() => panelPartClass("", "panelItem"));
|
|
9068
|
+
function panelLinkClass(link) {
|
|
9069
|
+
return panelPartClass(cx("flex flex-col gap-0.5 rounded-md", bar.value ? cx("px-3 py-2", BAR_ENTRY[props.variant]) : "py-2.5 text-text", hasHref(link) && "eldra-focus", hasHref(link) && bar.value && BAR_LINK[props.variant], CURRENT_PAGE), "panelLink");
|
|
9070
|
+
}
|
|
9071
|
+
const panelLabelClass = computed(() => panelPartClass("flex flex-wrap items-center gap-x-2 gap-y-1 text-body font-medium", "panelLabel"));
|
|
9072
|
+
const descriptionClass = computed(() => panelPartClass("text-body-sm text-muted", "description"));
|
|
9073
|
+
const badgeClasses = computed(() => {
|
|
9074
|
+
const badge = props.classes?.[part("badge")];
|
|
9075
|
+
return badge === void 0 ? void 0 : { root: badge };
|
|
9076
|
+
});
|
|
9077
|
+
function listLabel(group, index) {
|
|
9078
|
+
return group !== null ? headingId(index) : props.labelledBy;
|
|
9079
|
+
}
|
|
9080
|
+
return (_ctx, _cache) => {
|
|
9081
|
+
return openBlock(), createElementBlock(Fragment, null, [unref(hasHref)(__props.item) ? (openBlock(), createBlock(resolveDynamicComponent(unref(navLinkTag)(__props.item, __props.linkAs)), mergeProps({
|
|
9082
|
+
key: 0,
|
|
9083
|
+
"data-eldra-ui": "",
|
|
9084
|
+
"data-part": part("overview"),
|
|
9085
|
+
class: overviewClass.value
|
|
9086
|
+
}, unref(navLinkAttrs)(__props.item, __props.linkAs)), {
|
|
9087
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.messages.navMenuOverview(__props.item.label ?? "")) + " ", 1), __props.item.newTab ? (openBlock(), createBlock(VisuallyHidden_default, { key: 0 }, {
|
|
9088
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.messages.opensInNewTab), 1)]),
|
|
9089
|
+
_: 1
|
|
9090
|
+
})) : createCommentVNode("", true)]),
|
|
9091
|
+
_: 1
|
|
9092
|
+
}, 16, ["data-part", "class"])) : createCommentVNode("", true), createElementVNode("div", {
|
|
9093
|
+
"data-eldra-ui": "",
|
|
9094
|
+
"data-part": part("columns"),
|
|
9095
|
+
class: normalizeClass(columnsClass.value)
|
|
9096
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(groups.value, (group, index) => {
|
|
9097
|
+
return openBlock(), createElementBlock("div", {
|
|
9098
|
+
key: index,
|
|
9099
|
+
"data-part": part("group"),
|
|
9100
|
+
class: normalizeClass(groupClass.value)
|
|
9101
|
+
}, [group.group !== null ? (openBlock(), createElementBlock("span", {
|
|
9102
|
+
key: 0,
|
|
9103
|
+
id: headingId(index),
|
|
9104
|
+
"data-part": part("groupHeading"),
|
|
9105
|
+
class: normalizeClass(groupHeadingClass.value)
|
|
9106
|
+
}, [renderSlot(_ctx.$slots, "groupHeading", {
|
|
9107
|
+
group: group.group,
|
|
9108
|
+
links: group.links,
|
|
9109
|
+
item: __props.item,
|
|
9110
|
+
placement: __props.placement
|
|
9111
|
+
}, () => [createTextVNode(toDisplayString(group.group), 1)])], 10, _hoisted_3$3)) : createCommentVNode("", true), createElementVNode("ul", {
|
|
9112
|
+
"data-part": part("panelList"),
|
|
9113
|
+
class: normalizeClass(panelListClass.value),
|
|
9114
|
+
"aria-labelledby": listLabel(group.group, index)
|
|
9115
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(group.links, (link, at) => {
|
|
9116
|
+
return openBlock(), createElementBlock("li", {
|
|
9117
|
+
key: at,
|
|
9118
|
+
"data-part": part("panelItem"),
|
|
9119
|
+
class: normalizeClass(panelItemClass.value)
|
|
9120
|
+
}, [(openBlock(), createBlock(resolveDynamicComponent(unref(navLinkTag)(link, __props.linkAs)), mergeProps({
|
|
9121
|
+
"data-part": part("panelLink"),
|
|
9122
|
+
class: panelLinkClass(link)
|
|
9123
|
+
}, { ref_for: true }, unref(navLinkAttrs)(link, __props.linkAs)), {
|
|
9124
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "panelItem", {
|
|
9125
|
+
link,
|
|
9126
|
+
item: __props.item,
|
|
9127
|
+
placement: __props.placement
|
|
9128
|
+
}, () => [createElementVNode("span", {
|
|
9129
|
+
"data-part": part("panelLabel"),
|
|
9130
|
+
class: normalizeClass(panelLabelClass.value)
|
|
9131
|
+
}, [createTextVNode(toDisplayString(link.label) + " ", 1), link.badge ? (openBlock(), createBlock(Badge_default, {
|
|
9132
|
+
key: 0,
|
|
9133
|
+
label: link.badge,
|
|
9134
|
+
classes: badgeClasses.value
|
|
9135
|
+
}, null, 8, ["label", "classes"])) : createCommentVNode("", true)], 10, _hoisted_6$1), link.description ? (openBlock(), createElementBlock("span", {
|
|
9136
|
+
key: 0,
|
|
9137
|
+
"data-part": part("description"),
|
|
9138
|
+
class: normalizeClass(descriptionClass.value)
|
|
9139
|
+
}, toDisplayString(link.description), 11, _hoisted_7)) : createCommentVNode("", true)]), link.newTab && unref(hasHref)(link) ? (openBlock(), createBlock(VisuallyHidden_default, { key: 0 }, {
|
|
9140
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.messages.opensInNewTab), 1)]),
|
|
9141
|
+
_: 1
|
|
9142
|
+
})) : createCommentVNode("", true)]),
|
|
9143
|
+
_: 2
|
|
9144
|
+
}, 1040, ["data-part", "class"]))], 10, _hoisted_5$3);
|
|
9145
|
+
}), 128))], 10, _hoisted_4$3)], 10, _hoisted_2$6);
|
|
9146
|
+
}), 128))], 10, _hoisted_1$13)], 64);
|
|
9147
|
+
};
|
|
9148
|
+
}
|
|
9149
|
+
});
|
|
9150
|
+
//#endregion
|
|
9151
|
+
//#region src/components/nav-menu/navMenuKeys.ts
|
|
9152
|
+
var PANEL_FOCUSABLE = "a[href], button:not([disabled])";
|
|
9153
|
+
var TYPING = "input, textarea, select, [contenteditable]:not([contenteditable=\"false\"])";
|
|
9154
|
+
function clamp(position, length) {
|
|
9155
|
+
return Math.min(Math.max(position, 0), length - 1);
|
|
9156
|
+
}
|
|
9157
|
+
/**
|
|
9158
|
+
* The arrow keys of the APG disclosure navigation pattern, over the bar's own DOM: Left/Right and
|
|
9159
|
+
* Home/End along the bar, Down/Up into and through a panel. Clamped, never wrapping.
|
|
9160
|
+
*/
|
|
9161
|
+
function useNavMenuKeys(options) {
|
|
9162
|
+
function rows() {
|
|
9163
|
+
return Array.from(options.list.value?.children ?? []);
|
|
9164
|
+
}
|
|
9165
|
+
function topLevel() {
|
|
9166
|
+
const items = [];
|
|
9167
|
+
rows().forEach((row, position) => {
|
|
9168
|
+
const el = row.firstElementChild;
|
|
9169
|
+
if (el instanceof HTMLElement && el.matches("button, [href]")) items.push({
|
|
9170
|
+
el,
|
|
9171
|
+
index: options.indexAt(position)
|
|
9172
|
+
});
|
|
9173
|
+
});
|
|
9174
|
+
return items;
|
|
9175
|
+
}
|
|
9176
|
+
function panelLinks(index) {
|
|
9177
|
+
const panel = options.panel(index);
|
|
9178
|
+
return panel === null ? [] : Array.from(panel.querySelectorAll(PANEL_FOCUSABLE));
|
|
9179
|
+
}
|
|
9180
|
+
function focusPanelEdge(index, edge) {
|
|
9181
|
+
nextTick(() => {
|
|
9182
|
+
const links = panelLinks(index);
|
|
9183
|
+
(edge === "first" ? links[0] : links[links.length - 1])?.focus();
|
|
9184
|
+
});
|
|
9185
|
+
}
|
|
9186
|
+
function focusTopLevel(target) {
|
|
9187
|
+
if (options.openIndex.value !== null) {
|
|
9188
|
+
if (options.panel(target.index) === null) options.close();
|
|
9189
|
+
else options.open(target.index);
|
|
9190
|
+
}
|
|
9191
|
+
target.el.focus();
|
|
9192
|
+
}
|
|
9193
|
+
function travel(index, event) {
|
|
9194
|
+
const items = topLevel();
|
|
9195
|
+
if (items.length === 0) return;
|
|
9196
|
+
const position = items.findIndex((item) => item.index === index);
|
|
9197
|
+
let next;
|
|
9198
|
+
switch (event.key) {
|
|
9199
|
+
case "ArrowRight":
|
|
9200
|
+
case "ArrowLeft":
|
|
9201
|
+
if (position === -1) return;
|
|
9202
|
+
event.preventDefault();
|
|
9203
|
+
next = clamp(position + (event.key === "ArrowRight" ? 1 : -1), items.length);
|
|
9204
|
+
if (next === position) return;
|
|
9205
|
+
break;
|
|
9206
|
+
case "Home":
|
|
9207
|
+
event.preventDefault();
|
|
9208
|
+
next = 0;
|
|
9209
|
+
break;
|
|
9210
|
+
case "End":
|
|
9211
|
+
event.preventDefault();
|
|
9212
|
+
next = items.length - 1;
|
|
9213
|
+
break;
|
|
9214
|
+
default: return;
|
|
9215
|
+
}
|
|
9216
|
+
focusTopLevel(items[next]);
|
|
9217
|
+
}
|
|
9218
|
+
function onTriggerKey(index, event) {
|
|
9219
|
+
if (event.key !== "ArrowDown" && event.key !== "ArrowUp") {
|
|
9220
|
+
travel(index, event);
|
|
9221
|
+
return;
|
|
9222
|
+
}
|
|
9223
|
+
event.preventDefault();
|
|
9224
|
+
options.open(index);
|
|
9225
|
+
focusPanelEdge(index, event.key === "ArrowDown" ? "first" : "last");
|
|
9226
|
+
}
|
|
9227
|
+
function onPanelKey(index, event) {
|
|
9228
|
+
switch (event.key) {
|
|
9229
|
+
case "ArrowDown":
|
|
9230
|
+
case "ArrowUp": {
|
|
9231
|
+
event.preventDefault();
|
|
9232
|
+
const down = event.key === "ArrowDown";
|
|
9233
|
+
const links = panelLinks(index);
|
|
9234
|
+
const active = document.activeElement;
|
|
9235
|
+
const at = links.findIndex((link) => link === active || link.contains(active));
|
|
9236
|
+
if (at === -1) focusPanelEdge(index, down ? "first" : "last");
|
|
9237
|
+
else links[clamp(at + (down ? 1 : -1), links.length)]?.focus();
|
|
9238
|
+
return;
|
|
9239
|
+
}
|
|
9240
|
+
case "Home":
|
|
9241
|
+
case "End":
|
|
9242
|
+
event.preventDefault();
|
|
9243
|
+
focusPanelEdge(index, event.key === "Home" ? "first" : "last");
|
|
9244
|
+
return;
|
|
9245
|
+
default: travel(index, event);
|
|
9246
|
+
}
|
|
9247
|
+
}
|
|
9248
|
+
return (event) => {
|
|
9249
|
+
if (event.defaultPrevented || event.altKey || event.ctrlKey || event.metaKey) return;
|
|
9250
|
+
const target = event.target;
|
|
9251
|
+
if (!(target instanceof Element) || target.matches(TYPING)) return;
|
|
9252
|
+
const row = target.closest("[data-part=\"item\"]");
|
|
9253
|
+
const list = options.list.value;
|
|
9254
|
+
if (row === null || list === null || row.parentElement !== list) return;
|
|
9255
|
+
const index = options.indexAt(rows().indexOf(row));
|
|
9256
|
+
if (options.panel(index)?.contains(target) === true) onPanelKey(index, event);
|
|
9257
|
+
else if (target === row.firstElementChild) {
|
|
9258
|
+
if (target.matches("button")) onTriggerKey(index, event);
|
|
9259
|
+
else travel(index, event);
|
|
9260
|
+
}
|
|
9261
|
+
};
|
|
9262
|
+
}
|
|
9263
|
+
//#endregion
|
|
9264
|
+
//#region src/components/nav-menu/NavMenu.vue?vue&type=script&setup=true&lang.ts
|
|
9265
|
+
var _hoisted_1$12 = ["aria-label"];
|
|
9266
|
+
var _hoisted_2$5 = [
|
|
9267
|
+
"aria-expanded",
|
|
9268
|
+
"aria-controls",
|
|
9269
|
+
"data-current",
|
|
9270
|
+
"onClick",
|
|
9271
|
+
"onPointerenter"
|
|
9272
|
+
];
|
|
9273
|
+
var _hoisted_3$2 = ["id"];
|
|
9274
|
+
var _hoisted_4$2 = [
|
|
9275
|
+
"aria-label",
|
|
9276
|
+
"aria-expanded",
|
|
9277
|
+
"aria-controls"
|
|
9278
|
+
];
|
|
9279
|
+
var _hoisted_5$2 = ["aria-label"];
|
|
9280
|
+
var _hoisted_6 = ["id"];
|
|
9281
|
+
var HOVER_INTENT_MS = 150;
|
|
9282
|
+
var HOVER_FILL = "hover:bg-[color-mix(in_oklab,var(--eldra-color-text),transparent_94%)]";
|
|
9283
|
+
/** A top-level entry's colours at rest, hovered, open (`aria-expanded`) and current. */
|
|
9284
|
+
var TOP_LEVEL = "inline-flex min-h-10 cursor-pointer items-center gap-1 rounded-md px-3 text-body font-medium eldra-focus";
|
|
9285
|
+
//#endregion
|
|
9286
|
+
//#region src/components/nav-menu/NavMenu.vue
|
|
9287
|
+
var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
9288
|
+
__name: "NavMenu",
|
|
9289
|
+
props: {
|
|
9290
|
+
items: {},
|
|
9291
|
+
variant: { default: "ghost" },
|
|
9292
|
+
modelValue: { default: void 0 },
|
|
9293
|
+
drawerOpen: {
|
|
9294
|
+
type: Boolean,
|
|
9295
|
+
default: void 0
|
|
9296
|
+
},
|
|
9297
|
+
ariaLabel: { default: void 0 },
|
|
9298
|
+
collapseBelow: { default: "lg" },
|
|
9299
|
+
drawerSide: { default: "left" },
|
|
9300
|
+
drawerLayout: { default: "accordion" },
|
|
9301
|
+
drawerItems: { default: void 0 },
|
|
9302
|
+
openOnHover: {
|
|
9303
|
+
type: Boolean,
|
|
9304
|
+
default: false
|
|
9305
|
+
},
|
|
9306
|
+
linkAs: { default: void 0 },
|
|
9307
|
+
messages: { default: void 0 },
|
|
9308
|
+
classes: { default: void 0 }
|
|
9309
|
+
},
|
|
9310
|
+
emits: ["update:modelValue", "update:drawerOpen"],
|
|
9311
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
9312
|
+
const props = __props;
|
|
9313
|
+
const emit = __emit;
|
|
9314
|
+
const slots = useSlots();
|
|
9315
|
+
const m = useMessages(() => props.messages);
|
|
9316
|
+
const openIndex = useControllableModel(props, emit, () => null);
|
|
9317
|
+
const drawerOpen = useControllableModel({ get modelValue() {
|
|
9318
|
+
return props.drawerOpen;
|
|
9319
|
+
} }, (_event, value) => emit("update:drawerOpen", value), () => false);
|
|
9320
|
+
const baseId = useUiId("nav-menu");
|
|
9321
|
+
const navLabel = computed(() => props.ariaLabel ?? m.value.navMenuLabel);
|
|
9322
|
+
function renderableEntries(items) {
|
|
9323
|
+
return items.map((item, index) => ({
|
|
9324
|
+
item,
|
|
9325
|
+
index
|
|
9326
|
+
})).filter((entry) => isRenderableLink(entry.item));
|
|
9327
|
+
}
|
|
9328
|
+
const entries = computed(() => renderableEntries(props.items));
|
|
9329
|
+
const drawerEntries = computed(() => renderableEntries(props.drawerItems ?? props.items));
|
|
9330
|
+
function panelId(index) {
|
|
9331
|
+
return `${baseId.value}-panel-${index}`;
|
|
9332
|
+
}
|
|
9333
|
+
const drawerId = computed(() => `${baseId.value}-drawer`);
|
|
9334
|
+
const triggerEls = [];
|
|
9335
|
+
const panelEls = [];
|
|
9336
|
+
const listEl = ref(null);
|
|
9337
|
+
function elementOf(value) {
|
|
9338
|
+
return value instanceof HTMLElement ? value : null;
|
|
9339
|
+
}
|
|
9340
|
+
/** Set when a resting mouse pointer opened the panel, so leaving the menu closes it again. */
|
|
9341
|
+
let openedByHover = false;
|
|
9342
|
+
/** The last panel opened; still set while it closes, so Escape can return focus to its trigger. */
|
|
9343
|
+
let lastIndex = null;
|
|
9344
|
+
watch(openIndex, (index) => {
|
|
9345
|
+
if (index !== null) lastIndex = index;
|
|
9346
|
+
}, { immediate: true });
|
|
9347
|
+
/** How long a mouse pointer rests before a panel opens, and may stray before one closes. */
|
|
9348
|
+
let hoverOpenTimer;
|
|
9349
|
+
let hoverCloseTimer;
|
|
9350
|
+
function clearHoverTimers() {
|
|
9351
|
+
clearTimeout(hoverOpenTimer);
|
|
9352
|
+
clearTimeout(hoverCloseTimer);
|
|
9353
|
+
hoverOpenTimer = void 0;
|
|
9354
|
+
hoverCloseTimer = void 0;
|
|
9355
|
+
}
|
|
9356
|
+
function openPanel(index, byHover = false) {
|
|
9357
|
+
clearHoverTimers();
|
|
9358
|
+
openedByHover = byHover;
|
|
9359
|
+
lastIndex = index;
|
|
9360
|
+
openIndex.value = index;
|
|
9361
|
+
}
|
|
9362
|
+
function closePanel() {
|
|
9363
|
+
clearHoverTimers();
|
|
9364
|
+
openedByHover = false;
|
|
9365
|
+
if (openIndex.value !== null) openIndex.value = null;
|
|
9366
|
+
}
|
|
9367
|
+
useOverlay({
|
|
9368
|
+
open: computed(() => openIndex.value !== null),
|
|
9369
|
+
trigger: toRef(() => lastIndex === null ? null : triggerEls[lastIndex] ?? null),
|
|
9370
|
+
content: toRef(() => lastIndex === null ? null : panelEls[lastIndex] ?? null),
|
|
9371
|
+
setOpen: (next) => {
|
|
9372
|
+
if (!next) closePanel();
|
|
9373
|
+
}
|
|
9374
|
+
});
|
|
9375
|
+
function onTriggerClick(index) {
|
|
9376
|
+
if (openIndex.value !== index) {
|
|
9377
|
+
openPanel(index);
|
|
9378
|
+
return;
|
|
9379
|
+
}
|
|
9380
|
+
if (openedByHover) openedByHover = false;
|
|
9381
|
+
else closePanel();
|
|
9382
|
+
}
|
|
9383
|
+
function onTriggerPointerEnter(index, event) {
|
|
9384
|
+
if (!props.openOnHover || event.pointerType !== "mouse") return;
|
|
9385
|
+
clearTimeout(hoverOpenTimer);
|
|
9386
|
+
if (openIndex.value === index) return;
|
|
9387
|
+
hoverOpenTimer = setTimeout(() => openPanel(index, true), HOVER_INTENT_MS);
|
|
9388
|
+
}
|
|
9389
|
+
function onTriggerPointerLeave(event) {
|
|
9390
|
+
if (event.pointerType === "mouse") clearTimeout(hoverOpenTimer);
|
|
9391
|
+
}
|
|
9392
|
+
function onRootPointerEnter(event) {
|
|
9393
|
+
if (event.pointerType === "mouse") clearTimeout(hoverCloseTimer);
|
|
9394
|
+
}
|
|
9395
|
+
function onRootPointerLeave(event) {
|
|
9396
|
+
if (!props.openOnHover || event.pointerType !== "mouse") return;
|
|
9397
|
+
clearTimeout(hoverOpenTimer);
|
|
9398
|
+
if (!openedByHover) return;
|
|
9399
|
+
hoverCloseTimer = setTimeout(() => {
|
|
9400
|
+
if ((lastIndex === null ? null : panelEls[lastIndex])?.contains(document.activeElement) === true) return;
|
|
9401
|
+
if (openedByHover) closePanel();
|
|
9402
|
+
}, HOVER_INTENT_MS);
|
|
9403
|
+
}
|
|
9404
|
+
const onBarKeydown = useNavMenuKeys({
|
|
9405
|
+
list: listEl,
|
|
9406
|
+
indexAt: (position) => entries.value[position]?.index ?? -1,
|
|
9407
|
+
panel: (index) => panelEls[index] ?? null,
|
|
9408
|
+
openIndex,
|
|
9409
|
+
open: (index) => openPanel(index),
|
|
9410
|
+
close: closePanel
|
|
9411
|
+
});
|
|
9412
|
+
function onPanelClick(event) {
|
|
9413
|
+
if (event.target?.closest("a") != null) closePanel();
|
|
9414
|
+
}
|
|
9415
|
+
function closeDrawer() {
|
|
9416
|
+
if (drawerOpen.value) drawerOpen.value = false;
|
|
9417
|
+
}
|
|
9418
|
+
const toggleEl = ref(null);
|
|
9419
|
+
function closeDrawerOnWideScreen() {
|
|
9420
|
+
if (toggleEl.value && getComputedStyle(toggleEl.value).display === "none") closeDrawer();
|
|
9421
|
+
}
|
|
9422
|
+
watch(drawerOpen, (open) => {
|
|
9423
|
+
if (typeof window === "undefined") return;
|
|
9424
|
+
if (open) window.addEventListener("resize", closeDrawerOnWideScreen);
|
|
9425
|
+
else window.removeEventListener("resize", closeDrawerOnWideScreen);
|
|
9426
|
+
}, { immediate: true });
|
|
9427
|
+
onBeforeUnmount(() => {
|
|
9428
|
+
clearHoverTimers();
|
|
9429
|
+
window.removeEventListener("resize", closeDrawerOnWideScreen);
|
|
9430
|
+
});
|
|
9431
|
+
function onDrawerClick(event) {
|
|
9432
|
+
if (event.target?.closest("a") != null) closeDrawer();
|
|
9433
|
+
}
|
|
9434
|
+
/** Closes the open panel and the drawer, for a router's navigation hook. */
|
|
9435
|
+
function close() {
|
|
9436
|
+
closePanel();
|
|
9437
|
+
closeDrawer();
|
|
9438
|
+
}
|
|
9439
|
+
__expose({ close });
|
|
9440
|
+
const BAR_DISPLAY = {
|
|
9441
|
+
md: "hidden md:block",
|
|
9442
|
+
lg: "hidden lg:block",
|
|
9443
|
+
xl: "hidden xl:block",
|
|
9444
|
+
"@tablet": "hidden @tablet:block",
|
|
9445
|
+
"@content": "hidden @content:block",
|
|
9446
|
+
"@wide": "hidden @wide:block",
|
|
9447
|
+
never: "block"
|
|
9448
|
+
};
|
|
9449
|
+
const TOGGLE_DISPLAY = {
|
|
9450
|
+
md: "md:hidden",
|
|
9451
|
+
lg: "lg:hidden",
|
|
9452
|
+
xl: "xl:hidden",
|
|
9453
|
+
"@tablet": "@tablet:hidden",
|
|
9454
|
+
"@content": "@content:hidden",
|
|
9455
|
+
"@wide": "@wide:hidden",
|
|
9456
|
+
always: ""
|
|
9457
|
+
};
|
|
9458
|
+
const PANEL_TRANSITION = {
|
|
9459
|
+
enterFromClass: "",
|
|
9460
|
+
enterActiveClass: "",
|
|
9461
|
+
enterToClass: "",
|
|
9462
|
+
leaveFromClass: "",
|
|
9463
|
+
leaveActiveClass: "pointer-events-none transition-opacity duration-fast ease-in",
|
|
9464
|
+
leaveToClass: "opacity-0"
|
|
9465
|
+
};
|
|
9466
|
+
const ENTRY_VARIANT = {
|
|
9467
|
+
ghost: "text-text hover:bg-[color-mix(in_oklab,var(--eldra-color-text),transparent_94%)] aria-expanded:bg-[color-mix(in_oklab,var(--eldra-color-text),transparent_94%)]",
|
|
9468
|
+
muted: "text-muted hover:text-text aria-expanded:text-text aria-[current=page]:text-text data-[current]:text-text"
|
|
9469
|
+
};
|
|
9470
|
+
const rootClass = computed(() => partClass("relative flex items-center", props.classes, "root"));
|
|
9471
|
+
const navClass = computed(() => partClass(props.collapseBelow === "always" ? "" : BAR_DISPLAY[props.collapseBelow], props.classes, "nav"));
|
|
9472
|
+
const listClass = computed(() => partClass("flex flex-wrap items-center gap-1", props.classes, "list"));
|
|
9473
|
+
function itemClass(item) {
|
|
9474
|
+
return partClass(hasPanel(item) && panelLayout(item) === "dropdown" ? "relative" : "", props.classes, "item");
|
|
9475
|
+
}
|
|
9476
|
+
const linkClass = computed(() => partClass(cx(TOP_LEVEL, ENTRY_VARIANT[props.variant], CURRENT_PAGE), props.classes, "link"));
|
|
9477
|
+
const triggerClass = computed(() => partClass(cx(TOP_LEVEL, ENTRY_VARIANT[props.variant], "data-[current]:underline data-[current]:decoration-2 data-[current]:underline-offset-[0.2em]"), props.classes, "trigger"));
|
|
9478
|
+
function triggerIconClass(open) {
|
|
9479
|
+
return partClass(cx("inline-flex size-4 shrink-0 items-center justify-center", "transition-[rotate] duration-fast ease-out motion-reduce:transition-none", open && "rotate-180"), props.classes, "triggerIcon");
|
|
9480
|
+
}
|
|
9481
|
+
function panelClass(item) {
|
|
9482
|
+
return partClass(cx("absolute top-full z-popover eldra-nav-menu-panel", panelLayout(item) === "mega" ? "inset-x-0" : "start-0"), props.classes, "panel");
|
|
9483
|
+
}
|
|
9484
|
+
function contentClass(item) {
|
|
9485
|
+
return partClass(cx("rounded-lg border border-border bg-background text-text shadow-md animate-eldra-popover-in", panelLayout(item) === "mega" ? "p-6" : "eldra-nav-menu-dropdown p-2"), props.classes, "content");
|
|
9486
|
+
}
|
|
9487
|
+
const footerClass = computed(() => partClass("mt-4 flex flex-wrap items-center justify-between gap-x-8 gap-y-3 border-t border-border pt-4 empty:hidden", props.classes, "footer"));
|
|
9488
|
+
const toggleClass = computed(() => partClass(cx("inline-flex size-10 max-md:size-11 shrink-0 cursor-pointer items-center justify-center", "rounded-md text-text eldra-focus", HOVER_FILL, props.collapseBelow === "never" ? "" : TOGGLE_DISPLAY[props.collapseBelow]), props.classes, "toggle"));
|
|
9489
|
+
const toggleIconClass = computed(() => partClass("size-5", props.classes, "toggleIcon"));
|
|
9490
|
+
const drawerClasses = computed(() => ({
|
|
9491
|
+
root: props.classes?.drawerRoot,
|
|
9492
|
+
panel: props.classes?.drawer,
|
|
9493
|
+
header: props.classes?.drawerHeader,
|
|
9494
|
+
close: props.classes?.drawerClose,
|
|
9495
|
+
body: props.classes?.drawerBody,
|
|
9496
|
+
footer: props.classes?.drawerFooter
|
|
9497
|
+
}));
|
|
9498
|
+
const sections = computed(() => props.drawerLayout === "sections");
|
|
9499
|
+
const drawerListClass = computed(() => partClass("flex flex-col border-t border-border", props.classes, "drawerList"));
|
|
9500
|
+
function drawerItemClass(item) {
|
|
9501
|
+
if (!hasPanel(item)) return partClass("border-b border-border", props.classes, "drawerItem");
|
|
9502
|
+
const section = sections.value ? "flex flex-col border-b border-border pt-4 pb-2" : "";
|
|
9503
|
+
return partClass(section, props.classes, "drawerItem");
|
|
9504
|
+
}
|
|
9505
|
+
const drawerSectionHeadingClass = computed(() => partClass("pb-1 text-overline text-muted", props.classes, "drawerSectionHeading"));
|
|
9506
|
+
const drawerLinkClass = computed(() => partClass(cx("flex min-h-14 w-full items-center rounded-sm py-4", "text-accordion-title text-text eldra-focus", CURRENT_PAGE), props.classes, "drawerLink"));
|
|
9507
|
+
const accordionClasses = computed(() => ({
|
|
9508
|
+
summary: props.classes?.drawerTrigger,
|
|
9509
|
+
panel: cx("max-w-none pb-4 text-text", props.classes?.drawerPanel)
|
|
9510
|
+
}));
|
|
9511
|
+
return (_ctx, _cache) => {
|
|
9512
|
+
return openBlock(), createElementBlock("div", {
|
|
9513
|
+
"data-eldra-ui": "",
|
|
9514
|
+
"data-part": "root",
|
|
9515
|
+
class: normalizeClass(rootClass.value),
|
|
9516
|
+
onPointerenter: onRootPointerEnter,
|
|
9517
|
+
onPointerleave: onRootPointerLeave
|
|
9518
|
+
}, [__props.collapseBelow !== "always" && entries.value.length > 0 ? (openBlock(), createElementBlock("nav", {
|
|
9519
|
+
key: 0,
|
|
9520
|
+
"data-part": "nav",
|
|
9521
|
+
class: normalizeClass(navClass.value),
|
|
9522
|
+
"aria-label": navLabel.value,
|
|
9523
|
+
onKeydown: _cache[0] || (_cache[0] = (...args) => unref(onBarKeydown) && unref(onBarKeydown)(...args))
|
|
9524
|
+
}, [createElementVNode("ul", {
|
|
9525
|
+
ref_key: "listEl",
|
|
9526
|
+
ref: listEl,
|
|
9527
|
+
"data-part": "list",
|
|
9528
|
+
class: normalizeClass(listClass.value)
|
|
9529
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(entries.value, ({ item, index }) => {
|
|
9530
|
+
return openBlock(), createElementBlock("li", {
|
|
9531
|
+
key: index,
|
|
9532
|
+
"data-part": "item",
|
|
9533
|
+
class: normalizeClass(itemClass(item))
|
|
9534
|
+
}, [unref(hasPanel)(item) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("button", {
|
|
9535
|
+
ref_for: true,
|
|
9536
|
+
ref: (el) => triggerEls[index] = elementOf(el),
|
|
9537
|
+
type: "button",
|
|
9538
|
+
"data-part": "trigger",
|
|
9539
|
+
class: normalizeClass(triggerClass.value),
|
|
9540
|
+
"aria-expanded": unref(openIndex) === index ? "true" : "false",
|
|
9541
|
+
"aria-controls": panelId(index),
|
|
9542
|
+
"data-current": unref(containsCurrent)(item) ? "" : void 0,
|
|
9543
|
+
onClick: ($event) => onTriggerClick(index),
|
|
9544
|
+
onPointerenter: ($event) => onTriggerPointerEnter(index, $event),
|
|
9545
|
+
onPointerleave: onTriggerPointerLeave
|
|
9546
|
+
}, [createElementVNode("span", null, toDisplayString(item.label), 1), createElementVNode("span", {
|
|
9547
|
+
"data-part": "triggerIcon",
|
|
9548
|
+
class: normalizeClass(triggerIconClass(unref(openIndex) === index)),
|
|
9549
|
+
"aria-hidden": "true"
|
|
9550
|
+
}, [renderSlot(_ctx.$slots, "triggerIcon", {
|
|
9551
|
+
item,
|
|
9552
|
+
open: unref(openIndex) === index
|
|
9553
|
+
}, () => [_cache[3] || (_cache[3] = createElementVNode("svg", {
|
|
9554
|
+
class: "size-full",
|
|
9555
|
+
viewBox: "0 0 24 24",
|
|
9556
|
+
fill: "none",
|
|
9557
|
+
stroke: "currentColor",
|
|
9558
|
+
"stroke-width": "1.75",
|
|
9559
|
+
"stroke-linecap": "round",
|
|
9560
|
+
"stroke-linejoin": "round",
|
|
9561
|
+
focusable: "false"
|
|
9562
|
+
}, [createElementVNode("path", { d: "M6 9l6 6l6 -6" })], -1))])], 2)], 42, _hoisted_2$5), createVNode(Transition, mergeProps({ ref_for: true }, PANEL_TRANSITION), {
|
|
9563
|
+
default: withCtx(() => [withDirectives(createElementVNode("div", {
|
|
9564
|
+
id: panelId(index),
|
|
9565
|
+
ref_for: true,
|
|
9566
|
+
ref: (el) => panelEls[index] = elementOf(el),
|
|
9567
|
+
"data-part": "panel",
|
|
9568
|
+
class: normalizeClass(panelClass(item)),
|
|
9569
|
+
onClick: onPanelClick
|
|
9570
|
+
}, [createElementVNode("div", {
|
|
9571
|
+
"data-part": "content",
|
|
9572
|
+
class: normalizeClass(contentClass(item))
|
|
9573
|
+
}, [createVNode(NavMenuPanel_default, {
|
|
9574
|
+
item,
|
|
9575
|
+
"id-prefix": panelId(index),
|
|
9576
|
+
placement: "bar",
|
|
9577
|
+
variant: __props.variant,
|
|
9578
|
+
messages: unref(m),
|
|
9579
|
+
"link-as": __props.linkAs,
|
|
9580
|
+
classes: __props.classes
|
|
9581
|
+
}, createSlots({ _: 2 }, [unref(slots).panelItem ? {
|
|
9582
|
+
name: "panelItem",
|
|
9583
|
+
fn: withCtx((scope) => [renderSlot(_ctx.$slots, "panelItem", mergeProps({ ref_for: true }, scope))]),
|
|
9584
|
+
key: "0"
|
|
9585
|
+
} : void 0, unref(slots).groupHeading ? {
|
|
9586
|
+
name: "groupHeading",
|
|
9587
|
+
fn: withCtx((scope) => [renderSlot(_ctx.$slots, "groupHeading", mergeProps({ ref_for: true }, scope))]),
|
|
9588
|
+
key: "1"
|
|
9589
|
+
} : void 0]), 1032, [
|
|
9590
|
+
"item",
|
|
9591
|
+
"id-prefix",
|
|
9592
|
+
"variant",
|
|
9593
|
+
"messages",
|
|
9594
|
+
"link-as",
|
|
9595
|
+
"classes"
|
|
9596
|
+
]), unref(slots).panelFooter ? (openBlock(), createElementBlock("div", {
|
|
9597
|
+
key: 0,
|
|
9598
|
+
"data-part": "footer",
|
|
9599
|
+
class: normalizeClass(footerClass.value)
|
|
9600
|
+
}, [renderSlot(_ctx.$slots, "panelFooter", {
|
|
9601
|
+
item,
|
|
9602
|
+
index,
|
|
9603
|
+
close: closePanel
|
|
9604
|
+
})], 2)) : createCommentVNode("", true)], 2)], 10, _hoisted_3$2), [[vShow, unref(openIndex) === index]])]),
|
|
9605
|
+
_: 2
|
|
9606
|
+
}, 1040)], 64)) : (openBlock(), createBlock(resolveDynamicComponent(unref(navLinkTag)(item, __props.linkAs)), mergeProps({
|
|
9607
|
+
key: 1,
|
|
9608
|
+
"data-part": "link",
|
|
9609
|
+
class: linkClass.value
|
|
9610
|
+
}, { ref_for: true }, unref(navLinkAttrs)(item, __props.linkAs)), {
|
|
9611
|
+
default: withCtx(() => [createTextVNode(toDisplayString(item.label) + " ", 1), item.newTab && unref(hasHref)(item) ? (openBlock(), createBlock(VisuallyHidden_default, { key: 0 }, {
|
|
9612
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(m).opensInNewTab), 1)]),
|
|
9613
|
+
_: 1
|
|
9614
|
+
})) : createCommentVNode("", true)]),
|
|
9615
|
+
_: 2
|
|
9616
|
+
}, 1040, ["class"]))], 2);
|
|
9617
|
+
}), 128))], 2)], 42, _hoisted_1$12)) : createCommentVNode("", true), __props.collapseBelow !== "never" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createElementVNode("button", {
|
|
9618
|
+
ref_key: "toggleEl",
|
|
9619
|
+
ref: toggleEl,
|
|
9620
|
+
type: "button",
|
|
9621
|
+
"data-part": "toggle",
|
|
9622
|
+
class: normalizeClass(toggleClass.value),
|
|
9623
|
+
"aria-label": unref(m).navMenuOpen,
|
|
9624
|
+
"aria-haspopup": "dialog",
|
|
9625
|
+
"aria-expanded": unref(drawerOpen) ? "true" : "false",
|
|
9626
|
+
"aria-controls": drawerId.value,
|
|
9627
|
+
onClick: _cache[1] || (_cache[1] = ($event) => drawerOpen.value = true)
|
|
9628
|
+
}, [renderSlot(_ctx.$slots, "toggle", { open: unref(drawerOpen) }, () => [(openBlock(), createElementBlock("svg", {
|
|
9629
|
+
"data-part": "toggleIcon",
|
|
9630
|
+
class: normalizeClass(toggleIconClass.value),
|
|
9631
|
+
viewBox: "0 0 24 24",
|
|
9632
|
+
fill: "none",
|
|
9633
|
+
stroke: "currentColor",
|
|
9634
|
+
"stroke-width": "1.75",
|
|
9635
|
+
"stroke-linecap": "round",
|
|
9636
|
+
"stroke-linejoin": "round",
|
|
9637
|
+
"aria-hidden": "true",
|
|
9638
|
+
focusable: "false"
|
|
9639
|
+
}, [..._cache[4] || (_cache[4] = [
|
|
9640
|
+
createElementVNode("path", { d: "M4 6l16 0" }, null, -1),
|
|
9641
|
+
createElementVNode("path", { d: "M4 12l16 0" }, null, -1),
|
|
9642
|
+
createElementVNode("path", { d: "M4 18l16 0" }, null, -1)
|
|
9643
|
+
])], 2))])], 10, _hoisted_4$2), createVNode(Drawer_default, {
|
|
9644
|
+
id: drawerId.value,
|
|
9645
|
+
modelValue: unref(drawerOpen),
|
|
9646
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(drawerOpen) ? drawerOpen.value = $event : null),
|
|
9647
|
+
side: __props.drawerSide,
|
|
9648
|
+
"aria-label": unref(m).navMenuDrawer,
|
|
9649
|
+
messages: __props.messages,
|
|
9650
|
+
classes: drawerClasses.value
|
|
9651
|
+
}, createSlots({
|
|
9652
|
+
default: withCtx(() => [drawerEntries.value.length > 0 ? (openBlock(), createElementBlock("nav", {
|
|
9653
|
+
key: 0,
|
|
9654
|
+
"aria-label": navLabel.value,
|
|
9655
|
+
onClick: onDrawerClick
|
|
9656
|
+
}, [createElementVNode("ul", {
|
|
9657
|
+
"data-part": "drawerList",
|
|
9658
|
+
class: normalizeClass(drawerListClass.value)
|
|
9659
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(drawerEntries.value, ({ item, index }) => {
|
|
9660
|
+
return openBlock(), createElementBlock("li", {
|
|
9661
|
+
key: index,
|
|
9662
|
+
"data-part": "drawerItem",
|
|
9663
|
+
class: normalizeClass(drawerItemClass(item))
|
|
9664
|
+
}, [unref(hasPanel)(item) && sections.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("span", {
|
|
9665
|
+
id: `${panelId(index)}-drawer-heading`,
|
|
9666
|
+
"data-part": "drawerSectionHeading",
|
|
9667
|
+
class: normalizeClass(drawerSectionHeadingClass.value)
|
|
9668
|
+
}, toDisplayString(item.label), 11, _hoisted_6), createVNode(NavMenuPanel_default, {
|
|
9669
|
+
item,
|
|
9670
|
+
"id-prefix": `${panelId(index)}-drawer`,
|
|
9671
|
+
placement: "drawer",
|
|
9672
|
+
variant: __props.variant,
|
|
9673
|
+
messages: unref(m),
|
|
9674
|
+
"link-as": __props.linkAs,
|
|
9675
|
+
classes: __props.classes,
|
|
9676
|
+
"labelled-by": `${panelId(index)}-drawer-heading`
|
|
9677
|
+
}, createSlots({ _: 2 }, [unref(slots).panelItem ? {
|
|
9678
|
+
name: "panelItem",
|
|
9679
|
+
fn: withCtx((scope) => [renderSlot(_ctx.$slots, "panelItem", mergeProps({ ref_for: true }, scope))]),
|
|
9680
|
+
key: "0"
|
|
9681
|
+
} : void 0, unref(slots).groupHeading ? {
|
|
9682
|
+
name: "groupHeading",
|
|
9683
|
+
fn: withCtx((scope) => [renderSlot(_ctx.$slots, "groupHeading", mergeProps({ ref_for: true }, scope))]),
|
|
9684
|
+
key: "1"
|
|
9685
|
+
} : void 0]), 1032, [
|
|
9686
|
+
"item",
|
|
9687
|
+
"id-prefix",
|
|
9688
|
+
"variant",
|
|
9689
|
+
"messages",
|
|
9690
|
+
"link-as",
|
|
9691
|
+
"classes",
|
|
9692
|
+
"labelled-by"
|
|
9693
|
+
])], 64)) : unref(hasPanel)(item) ? (openBlock(), createBlock(AccordionItem_default, {
|
|
9694
|
+
key: 1,
|
|
9695
|
+
title: item.label ?? "",
|
|
9696
|
+
classes: accordionClasses.value
|
|
9697
|
+
}, {
|
|
9698
|
+
default: withCtx(() => [createVNode(NavMenuPanel_default, {
|
|
9699
|
+
item,
|
|
9700
|
+
"id-prefix": `${panelId(index)}-drawer`,
|
|
9701
|
+
placement: "drawer",
|
|
9702
|
+
variant: __props.variant,
|
|
9703
|
+
messages: unref(m),
|
|
9704
|
+
"link-as": __props.linkAs,
|
|
9705
|
+
classes: __props.classes
|
|
9706
|
+
}, createSlots({ _: 2 }, [unref(slots).panelItem ? {
|
|
9707
|
+
name: "panelItem",
|
|
9708
|
+
fn: withCtx((scope) => [renderSlot(_ctx.$slots, "panelItem", mergeProps({ ref_for: true }, scope))]),
|
|
9709
|
+
key: "0"
|
|
9710
|
+
} : void 0, unref(slots).groupHeading ? {
|
|
9711
|
+
name: "groupHeading",
|
|
9712
|
+
fn: withCtx((scope) => [renderSlot(_ctx.$slots, "groupHeading", mergeProps({ ref_for: true }, scope))]),
|
|
9713
|
+
key: "1"
|
|
9714
|
+
} : void 0]), 1032, [
|
|
9715
|
+
"item",
|
|
9716
|
+
"id-prefix",
|
|
9717
|
+
"variant",
|
|
9718
|
+
"messages",
|
|
9719
|
+
"link-as",
|
|
9720
|
+
"classes"
|
|
9721
|
+
])]),
|
|
9722
|
+
_: 2
|
|
9723
|
+
}, 1032, ["title", "classes"])) : (openBlock(), createBlock(resolveDynamicComponent(unref(navLinkTag)(item, __props.linkAs)), mergeProps({
|
|
9724
|
+
key: 2,
|
|
9725
|
+
"data-part": "drawerLink",
|
|
9726
|
+
class: drawerLinkClass.value
|
|
9727
|
+
}, { ref_for: true }, unref(navLinkAttrs)(item, __props.linkAs)), {
|
|
9728
|
+
default: withCtx(() => [createTextVNode(toDisplayString(item.label) + " ", 1), item.newTab && unref(hasHref)(item) ? (openBlock(), createBlock(VisuallyHidden_default, { key: 0 }, {
|
|
9729
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(m).opensInNewTab), 1)]),
|
|
9730
|
+
_: 1
|
|
9731
|
+
})) : createCommentVNode("", true)]),
|
|
9732
|
+
_: 2
|
|
9733
|
+
}, 1040, ["class"]))], 2);
|
|
9734
|
+
}), 128))], 2)], 8, _hoisted_5$2)) : createCommentVNode("", true)]),
|
|
9735
|
+
_: 2
|
|
9736
|
+
}, [unref(slots).drawerHeader ? {
|
|
9737
|
+
name: "header",
|
|
9738
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "drawerHeader", { close: closeDrawer })]),
|
|
9739
|
+
key: "0"
|
|
9740
|
+
} : void 0, unref(slots).drawerFooter ? {
|
|
9741
|
+
name: "footer",
|
|
9742
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "drawerFooter", { close: closeDrawer })]),
|
|
9743
|
+
key: "1"
|
|
9744
|
+
} : void 0]), 1032, [
|
|
9745
|
+
"id",
|
|
9746
|
+
"modelValue",
|
|
9747
|
+
"side",
|
|
9748
|
+
"aria-label",
|
|
9749
|
+
"messages",
|
|
9750
|
+
"classes"
|
|
9751
|
+
])], 64)) : createCommentVNode("", true)], 34);
|
|
8807
9752
|
};
|
|
8808
9753
|
}
|
|
8809
9754
|
});
|
|
@@ -8937,6 +9882,7 @@ var Pagination_default = /* @__PURE__ */ defineComponent({
|
|
|
8937
9882
|
return (_ctx, _cache) => {
|
|
8938
9883
|
return visible.value ? (openBlock(), createElementBlock("nav", {
|
|
8939
9884
|
key: 0,
|
|
9885
|
+
"data-eldra-ui": "",
|
|
8940
9886
|
"data-part": "root",
|
|
8941
9887
|
class: normalizeClass(rootClass.value),
|
|
8942
9888
|
"aria-label": navLabel.value
|
|
@@ -9326,6 +10272,7 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
9326
10272
|
const panelClass = computed(() => partClass(cx("z-popover overflow-hidden rounded-md border border-border bg-background shadow-md", "animate-eldra-popover-in"), props.classes, "panel"));
|
|
9327
10273
|
return (_ctx, _cache) => {
|
|
9328
10274
|
return openBlock(), createElementBlock("div", {
|
|
10275
|
+
"data-eldra-ui": "",
|
|
9329
10276
|
"data-part": "root",
|
|
9330
10277
|
class: normalizeClass(rootClass.value)
|
|
9331
10278
|
}, [(openBlock(), createBlock(resolveDynamicComponent(Trigger))), (openBlock(), createBlock(Teleport, {
|
|
@@ -9336,6 +10283,7 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
9336
10283
|
id: panelId.value,
|
|
9337
10284
|
ref_key: "panelEl",
|
|
9338
10285
|
ref: panelEl,
|
|
10286
|
+
"data-eldra-ui": "",
|
|
9339
10287
|
"data-part": "panel",
|
|
9340
10288
|
"data-eldra-overlay-owner": panelId.value,
|
|
9341
10289
|
class: panelClass.value,
|
|
@@ -9438,6 +10386,7 @@ var ValueText_default = /* @__PURE__ */ defineComponent({
|
|
|
9438
10386
|
}, { flush: "post" });
|
|
9439
10387
|
return (_ctx, _cache) => {
|
|
9440
10388
|
return openBlock(), createElementBlock("span", {
|
|
10389
|
+
"data-eldra-ui": "",
|
|
9441
10390
|
ref_key: "spanRef",
|
|
9442
10391
|
ref: spanRef
|
|
9443
10392
|
}, toDisplayString(__props.text), 513);
|
|
@@ -9719,6 +10668,7 @@ var Price_default = /* @__PURE__ */ defineComponent({
|
|
|
9719
10668
|
const srStatusText = computed(() => isRevalidating.value ? messages.value.updatingPrice : "");
|
|
9720
10669
|
return (_ctx, _cache) => {
|
|
9721
10670
|
return openBlock(), createElementBlock("p", {
|
|
10671
|
+
"data-eldra-ui": "",
|
|
9722
10672
|
"data-part": "root",
|
|
9723
10673
|
class: normalizeClass(rootClass.value),
|
|
9724
10674
|
lang: __props.lang ?? void 0,
|
|
@@ -9867,6 +10817,7 @@ var RatingStars_default = /* @__PURE__ */ defineComponent({
|
|
|
9867
10817
|
* outline), an exception the design spec carves out for rating stars only. */
|
|
9868
10818
|
return (_ctx, _cache) => {
|
|
9869
10819
|
return openBlock(), createElementBlock("span", {
|
|
10820
|
+
"data-eldra-ui": "",
|
|
9870
10821
|
"data-part": "stars",
|
|
9871
10822
|
class: normalizeClass(starsClass.value),
|
|
9872
10823
|
"aria-hidden": "true"
|
|
@@ -9877,7 +10828,7 @@ var RatingStars_default = /* @__PURE__ */ defineComponent({
|
|
|
9877
10828
|
class: normalizeClass(starClass.value)
|
|
9878
10829
|
}, [state !== "full" ? (openBlock(), createElementBlock("svg", {
|
|
9879
10830
|
key: 0,
|
|
9880
|
-
class: normalizeClass(unref(cx)("text-border-strong size-full", SECTION_EMPTY)),
|
|
10831
|
+
class: normalizeClass(unref(cx)("text-border-strong block size-full", SECTION_EMPTY)),
|
|
9881
10832
|
viewBox: "0 0 24 24",
|
|
9882
10833
|
fill: "none",
|
|
9883
10834
|
stroke: "currentColor",
|
|
@@ -9886,7 +10837,7 @@ var RatingStars_default = /* @__PURE__ */ defineComponent({
|
|
|
9886
10837
|
"stroke-linejoin": "round"
|
|
9887
10838
|
}, [createElementVNode("path", { d: OUTLINE_STAR_PATH })], 2)) : createCommentVNode("", true), state !== "empty" ? (openBlock(), createElementBlock("svg", {
|
|
9888
10839
|
key: 1,
|
|
9889
|
-
class: normalizeClass(unref(cx)("text-text", SECTION_FILLED, state === "half" ? "eldra-rating-half absolute inset-0 size-full" : "size-full")),
|
|
10840
|
+
class: normalizeClass(unref(cx)("text-text block", SECTION_FILLED, state === "half" ? "eldra-rating-half absolute inset-0 size-full" : "size-full")),
|
|
9890
10841
|
viewBox: "0 0 24 24",
|
|
9891
10842
|
fill: "currentColor"
|
|
9892
10843
|
}, [createElementVNode("path", { d: FILLED_STAR_PATH })], 2)) : createCommentVNode("", true)], 2);
|
|
@@ -9976,6 +10927,7 @@ var Rating_default = /* @__PURE__ */ defineComponent({
|
|
|
9976
10927
|
const emptyClass = computed(() => partClass("text-body-sm text-muted", props.classes, "empty"));
|
|
9977
10928
|
return (_ctx, _cache) => {
|
|
9978
10929
|
return openBlock(), createElementBlock("span", mergeProps({
|
|
10930
|
+
"data-eldra-ui": "",
|
|
9979
10931
|
"data-part": "root",
|
|
9980
10932
|
class: rootClass.value
|
|
9981
10933
|
}, !isLinked.value && !isEmpty.value ? {
|
|
@@ -10140,6 +11092,7 @@ var StockBadge_default = /* @__PURE__ */ defineComponent({
|
|
|
10140
11092
|
const srStatusText = computed(() => props.revalidating ? messages.value.updatingStock : "");
|
|
10141
11093
|
return (_ctx, _cache) => {
|
|
10142
11094
|
return openBlock(), createElementBlock("span", {
|
|
11095
|
+
"data-eldra-ui": "",
|
|
10143
11096
|
"data-part": "root",
|
|
10144
11097
|
class: normalizeClass(rootClass.value),
|
|
10145
11098
|
"aria-busy": __props.revalidating ? "true" : void 0
|
|
@@ -10427,6 +11380,7 @@ var ProductCard_default = /* @__PURE__ */ defineComponent({
|
|
|
10427
11380
|
return (_ctx, _cache) => {
|
|
10428
11381
|
return __props.loading ? (openBlock(), createElementBlock("div", {
|
|
10429
11382
|
key: 0,
|
|
11383
|
+
"data-eldra-ui": "",
|
|
10430
11384
|
"data-part": "root",
|
|
10431
11385
|
class: normalizeClass(rootClass.value),
|
|
10432
11386
|
role: "group",
|
|
@@ -10460,6 +11414,7 @@ var ProductCard_default = /* @__PURE__ */ defineComponent({
|
|
|
10460
11414
|
})
|
|
10461
11415
|
], 2)], 10, _hoisted_1$7)) : (openBlock(), createElementBlock("article", {
|
|
10462
11416
|
key: 1,
|
|
11417
|
+
"data-eldra-ui": "",
|
|
10463
11418
|
"data-part": "root",
|
|
10464
11419
|
class: normalizeClass(rootClass.value)
|
|
10465
11420
|
}, [
|
|
@@ -10627,7 +11582,7 @@ var RECENT_KEY = "eldra-ui:recent-searches";
|
|
|
10627
11582
|
var RECENT_MAX = 5;
|
|
10628
11583
|
var LOADING_DELAY_MS = 300;
|
|
10629
11584
|
var ANNOUNCE_DELAY_MS = 400;
|
|
10630
|
-
var hintKeyClass = "inline-flex h-5 min-w-5 items-center justify-center rounded-sm border border-border-strong bg-background px-1 text-search-modal-kbd text-muted";
|
|
11585
|
+
var hintKeyClass = "box-border inline-flex h-5 min-w-5 items-center justify-center rounded-sm border border-border-strong bg-background px-1 text-search-modal-kbd text-muted";
|
|
10631
11586
|
var hintClass = "inline-flex items-center gap-1.5";
|
|
10632
11587
|
//#endregion
|
|
10633
11588
|
//#region src/components/search-modal/SearchModal.vue
|
|
@@ -11248,6 +12203,7 @@ var SearchModal_default = /* @__PURE__ */ defineComponent({
|
|
|
11248
12203
|
return openBlock(), createElementBlock("dialog", {
|
|
11249
12204
|
ref_key: "dialogEl",
|
|
11250
12205
|
ref: dialogEl,
|
|
12206
|
+
"data-eldra-ui": "",
|
|
11251
12207
|
"data-part": "root",
|
|
11252
12208
|
class: normalizeClass(rootClass.value),
|
|
11253
12209
|
"aria-label": accessibleName.value,
|
|
@@ -11509,6 +12465,7 @@ var Section_default = /* @__PURE__ */ defineComponent({
|
|
|
11509
12465
|
const rootClass = computed(() => partClass(cx("@container", BACKGROUND[props.background], SPACING[props.spacing], inverts.value && "group/section"), props.classes, "root"));
|
|
11510
12466
|
return (_ctx, _cache) => {
|
|
11511
12467
|
return openBlock(), createBlock(resolveDynamicComponent(rootTag.value), {
|
|
12468
|
+
"data-eldra-ui": "",
|
|
11512
12469
|
"data-part": "root",
|
|
11513
12470
|
"data-section-bg": __props.background,
|
|
11514
12471
|
"data-section": inverts.value ? __props.background : void 0,
|
|
@@ -11632,6 +12589,7 @@ var Tab_default = /* @__PURE__ */ defineComponent({
|
|
|
11632
12589
|
ref: el,
|
|
11633
12590
|
type: "button",
|
|
11634
12591
|
role: "tab",
|
|
12592
|
+
"data-eldra-ui": "",
|
|
11635
12593
|
"data-part": "tab",
|
|
11636
12594
|
"aria-selected": isSelected.value ? "true" : "false",
|
|
11637
12595
|
"aria-controls": unref(context).panelId(__props.value),
|
|
@@ -11701,6 +12659,7 @@ var TabPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
11701
12659
|
ref_key: "el",
|
|
11702
12660
|
ref: el,
|
|
11703
12661
|
role: "tabpanel",
|
|
12662
|
+
"data-eldra-ui": "",
|
|
11704
12663
|
"data-part": "panel",
|
|
11705
12664
|
"aria-labelledby": unref(context).tabId(__props.value),
|
|
11706
12665
|
hidden: !isSelected.value,
|
|
@@ -11814,6 +12773,7 @@ var Tabs_default = /* @__PURE__ */ defineComponent({
|
|
|
11814
12773
|
}));
|
|
11815
12774
|
return (_ctx, _cache) => {
|
|
11816
12775
|
return openBlock(), createElementBlock("div", {
|
|
12776
|
+
"data-eldra-ui": "",
|
|
11817
12777
|
"data-part": "root",
|
|
11818
12778
|
class: normalizeClass(rootClass.value)
|
|
11819
12779
|
}, [createElementVNode("div", {
|
|
@@ -11942,6 +12902,7 @@ var Toast_default = /* @__PURE__ */ defineComponent({
|
|
|
11942
12902
|
const closeClass = computed(() => partClass(cx("-mt-1.5 -mr-1.5 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"));
|
|
11943
12903
|
return (_ctx, _cache) => {
|
|
11944
12904
|
return openBlock(), createElementBlock("div", {
|
|
12905
|
+
"data-eldra-ui": "",
|
|
11945
12906
|
"data-part": "root",
|
|
11946
12907
|
class: normalizeClass(rootClass.value),
|
|
11947
12908
|
role: __props.variant === "danger" ? "alert" : void 0,
|
|
@@ -12228,6 +13189,7 @@ var Toaster_default = /* @__PURE__ */ defineComponent({
|
|
|
12228
13189
|
const listClass = computed(() => partClass(nonDanger.value.length > 0 ? "flex w-full flex-col gap-3" : "hidden", props.classes, "list"));
|
|
12229
13190
|
return (_ctx, _cache) => {
|
|
12230
13191
|
return openBlock(), createBlock(Teleport, { to: unref(TOAST_HOST_KEY) ?? "body" }, [createElementVNode("div", {
|
|
13192
|
+
"data-eldra-ui": "",
|
|
12231
13193
|
"data-part": "root",
|
|
12232
13194
|
class: normalizeClass(rootClass.value),
|
|
12233
13195
|
onMouseenter: _cache[0] || (_cache[0] = ($event) => hovering.value = true),
|
|
@@ -12541,6 +13503,7 @@ var Tooltip_default = /* @__PURE__ */ defineComponent({
|
|
|
12541
13503
|
return openBlock(), createElementBlock("span", {
|
|
12542
13504
|
ref_key: "rootRef",
|
|
12543
13505
|
ref: rootRef,
|
|
13506
|
+
"data-eldra-ui": "",
|
|
12544
13507
|
"data-part": "root",
|
|
12545
13508
|
class: normalizeClass(rootClass.value),
|
|
12546
13509
|
onMouseenter: onRootMouseEnter,
|
|
@@ -12558,6 +13521,7 @@ var Tooltip_default = /* @__PURE__ */ defineComponent({
|
|
|
12558
13521
|
ref_key: "bubbleRef",
|
|
12559
13522
|
ref: bubbleRef,
|
|
12560
13523
|
role: "tooltip",
|
|
13524
|
+
"data-eldra-ui": "",
|
|
12561
13525
|
"data-part": "bubble",
|
|
12562
13526
|
"data-placement": unref(resolvedPlacement),
|
|
12563
13527
|
class: normalizeClass(bubbleClass.value),
|
|
@@ -12589,4 +13553,4 @@ function mixToward(color, toward, percent) {
|
|
|
12589
13553
|
return `color-mix(in oklab, ${color}, ${toward} ${percent}%)`;
|
|
12590
13554
|
}
|
|
12591
13555
|
//#endregion
|
|
12592
|
-
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, 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, 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, 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, provideEldraUiCurrency, provideEldraUiLocale, provideEldraUiMessages, rangeKeyTransition, rangeLimits, rangeOf, rangePositionToValue, rangeStepDigits, rangeThumbLimits, rangeValueToPercent, ratingStarStates, removeValue, renderableFacets, resolveCarouselPerView, roundRatingToHalf, selectedValues, setRange, sizeSystemGroups, snapToRangeStep, stripMask, swatchInk, swatchLuminance, toggleValue, useCarousel, useControllableModel, useDialog, useEldraUiCurrency, useEldraUiLocale, useFloating, useHeadingTag, useListbox, useMessages, useOverlay, usePopover, useSlotPresence, useToast, useUiId, visibleFacetValues };
|
|
13556
|
+
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, 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, 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, provideEldraUiCurrency, provideEldraUiLocale, provideEldraUiMessages, rangeKeyTransition, rangeLimits, rangeOf, rangePositionToValue, rangeStepDigits, rangeThumbLimits, rangeValueToPercent, ratingStarStates, removeValue, renderableFacets, resolveCarouselPerView, roundRatingToHalf, selectedValues, setRange, sizeSystemGroups, snapToRangeStep, stripMask, swatchInk, swatchLuminance, toggleValue, useCarousel, useControllableModel, useDialog, useEldraUiCurrency, useEldraUiLocale, useFloating, useHeadingTag, useListbox, useMessages, useOverlay, usePopover, useSlotPresence, useToast, useUiId, visibleFacetValues, zoomSizes };
|