@eldrajs/ui 0.3.21 → 0.3.22
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 +18 -0
- package/README.md +8 -0
- package/dist/{PhoneInput-f6wxvduD.js → PhoneInput-D_z9MuDw.js} +1 -1
- package/dist/{VariantPicker-CCci26If.js → VariantPicker-DgDBOM-w.js} +4 -4
- package/dist/components/currency-picker/CurrencyPicker.vue.d.ts +27 -1
- package/dist/components/currency-picker/types.d.ts +2 -1
- package/dist/components/nav-menu/NavMenu.vue.d.ts +3 -2
- package/dist/components/nav-menu/NavMenuDrawerList.vue.d.ts +39 -0
- package/dist/components/nav-menu/navLinks.d.ts +9 -0
- package/dist/components/nav-menu/types.d.ts +22 -2
- package/dist/components/product-card/ProductCard.vue.d.ts +6 -0
- package/dist/components/product-card/types.d.ts +25 -2
- package/dist/components.css +45 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +697 -329
- package/dist/phone/vee-validate.js +3 -3
- package/dist/phone.js +1 -1
- package/dist/style.css +45 -0
- package/dist/{useFieldControl-BnO3B37W.js → useFieldControl-D_h1RWyU.js} +1 -1
- package/dist/{useOptionList-UMUMayec.js → useOptionList-DuAKag8J.js} +1 -0
- package/dist/utilities.css +23 -0
- package/dist/vee-validate.js +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as FIELD_KEY, A as ICON_STROKE_WIDTH$6, G as FIELD_SEARCH_APPEARANCE, I as FIELD_CLEAR_BUTTON_BOX, K as FIELD_SIZE, N as FIELD_BASE, R as FIELD_DISABLED, V as FIELD_LIVE, _ as useFloating, a as CURRENCY_KEY, c as provideEldraUiCurrency, d as useEldraUiLocale, et as mergeClass, f as Spinner_default, g as useTeleportTarget, h as topLayerDialog, k as ICON_SIZE_CLASS, l as provideEldraUiLocale, m as useOverlay, n as matchRange, nt as joinIds, o as DEFAULT_UI_LOCALE, p as usePopover, rt as useUiId, s as LOCALE_KEY, tt as useControllableModel, u as useEldraUiCurrency, v as normalizeText, y as useListbox } from "./useOptionList-
|
|
1
|
+
import { $ as FIELD_KEY, A as ICON_STROKE_WIDTH$6, G as FIELD_SEARCH_APPEARANCE, I as FIELD_CLEAR_BUTTON_BOX, K as FIELD_SIZE, N as FIELD_BASE, R as FIELD_DISABLED, V as FIELD_LIVE, _ as useFloating, a as CURRENCY_KEY, c as provideEldraUiCurrency, d as useEldraUiLocale, et as mergeClass, f as Spinner_default, g as useTeleportTarget, h as topLayerDialog, k as ICON_SIZE_CLASS, l as provideEldraUiLocale, m as useOverlay, n as matchRange, nt as joinIds, o as DEFAULT_UI_LOCALE, p as usePopover, rt as useUiId, s as LOCALE_KEY, tt as useControllableModel, u as useEldraUiCurrency, v as normalizeText, y as useListbox } from "./useOptionList-DuAKag8J.js";
|
|
2
2
|
import { n as provideEldraScope, r as useEldraScope, t as ELDRA_SCOPE_KEY } from "./useEldraScope-BDbGzt7R.js";
|
|
3
|
-
import { $ as Autocomplete_default, A as defaultUnitFormat, B as useHeadingTag, C as filterNumericBeforeInput, D as createNumberFormat, E as UnitInput_default, F as parseLocaleNumber, G as Checkbox_default, H as TAG_SHAPE, I as toMinorUnits, J as FieldError_default, K as VisuallyHidden_default, L as createAmountEditor, M as formatNumber, N as formatUnit, O as currencyFractionDigits, P as localeSeparators, Q as FORM_SUBMITTING_KEY, R as parseAmount, S as Switch_default, T as CurrencyInput_default, U as tagPadding, V as TAG_FILL, W as CheckboxGroup_default, X as Icon_default, Y as Button_default, Z as FORM_LAYOUT_KEY, _ as radioRecipe, a as ownsShortcut, b as FormLayout_default, c as RadioGroup_default, d as PLAIN_BOX_ONLY, et as Input_default, f as PLAIN_COLUMNS, g as optionCursor, h as labelRecipe, i as claimShortcut, it as stripMask, j as formatCurrency, k as currencySymbol, l as HINT, m as dotRecipe, n as Textarea_default, nt as applyMask, o as releaseShortcut, p as PLAIN_OPTION, q as RequiredMark_default, r as SearchBar_default, rt as defaultCharacterMeaning, s as SearchResultsPanel_default, t as VariantPicker_default, tt as useSlotPresence, u as INPUT, v as QuantityStepper_default, w as Select_default, x as focusInvalid, y as MultiSelect_default, z as readAmount } from "./VariantPicker-
|
|
3
|
+
import { $ as Autocomplete_default, A as defaultUnitFormat, B as useHeadingTag, C as filterNumericBeforeInput, D as createNumberFormat, E as UnitInput_default, F as parseLocaleNumber, G as Checkbox_default, H as TAG_SHAPE, I as toMinorUnits, J as FieldError_default, K as VisuallyHidden_default, L as createAmountEditor, M as formatNumber, N as formatUnit, O as currencyFractionDigits, P as localeSeparators, Q as FORM_SUBMITTING_KEY, R as parseAmount, S as Switch_default, T as CurrencyInput_default, U as tagPadding, V as TAG_FILL, W as CheckboxGroup_default, X as Icon_default, Y as Button_default, Z as FORM_LAYOUT_KEY, _ as radioRecipe, a as ownsShortcut, b as FormLayout_default, c as RadioGroup_default, d as PLAIN_BOX_ONLY, et as Input_default, f as PLAIN_COLUMNS, g as optionCursor, h as labelRecipe, i as claimShortcut, it as stripMask, j as formatCurrency, k as currencySymbol, l as HINT, m as dotRecipe, n as Textarea_default, nt as applyMask, o as releaseShortcut, p as PLAIN_OPTION, q as RequiredMark_default, r as SearchBar_default, rt as defaultCharacterMeaning, s as SearchResultsPanel_default, t as VariantPicker_default, tt as useSlotPresence, u as INPUT, v as QuantityStepper_default, w as Select_default, x as focusInvalid, y as MultiSelect_default, z as readAmount } from "./VariantPicker-DgDBOM-w.js";
|
|
4
4
|
import { i as enUS, n as provideEldraUiMessages, r as useMessages, t as MESSAGES_KEY } from "./useMessages-D8bTGX7c.js";
|
|
5
5
|
import { Comment, Fragment, Teleport, Text, Transition, cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, h, inject, isRef, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, onServerPrefetch, onUnmounted, onUpdated, openBlock, provide, reactive, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toRef, toValue, unref, useAttrs, useId, useSlots, useTemplateRef, vModelText, vShow, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
6
6
|
import { dateTimeFormat } from "@eldrajs/sdk/format/date";
|
|
@@ -9,7 +9,7 @@ import { formatPrice, numberFormat } from "@eldrajs/sdk/format";
|
|
|
9
9
|
/** The key an `Accordion` provides its `AccordionContext` on. */
|
|
10
10
|
var ACCORDION_KEY = Symbol("eldra-ui:accordion");
|
|
11
11
|
// src/components/accordion/Accordion.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
-
var _hoisted_1$
|
|
12
|
+
var _hoisted_1$54 = ["data-eldra-slot", "data-eldra-scope"];
|
|
13
13
|
var rootClass$7 = "eldra:flex eldra:flex-col eldra:border-t eldra:border-border";
|
|
14
14
|
// src/components/accordion/Accordion.vue
|
|
15
15
|
var Accordion_default = /* @__PURE__ */ defineComponent({
|
|
@@ -47,7 +47,7 @@ var Accordion_default = /* @__PURE__ */ defineComponent({
|
|
|
47
47
|
"data-eldra-scope": unref(eldra).scope,
|
|
48
48
|
"data-part": "root",
|
|
49
49
|
class: normalizeClass(rootClass$7)
|
|
50
|
-
}, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$
|
|
50
|
+
}, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$54);
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
});
|
|
@@ -242,8 +242,8 @@ function createPanelHeightAnimator(panel) {
|
|
|
242
242
|
};
|
|
243
243
|
}
|
|
244
244
|
// src/components/accordion/AccordionItem.vue?vue&type=script&setup=true&lang.ts
|
|
245
|
-
var _hoisted_1$
|
|
246
|
-
var _hoisted_2$
|
|
245
|
+
var _hoisted_1$53 = ["data-eldra-scope", "href"];
|
|
246
|
+
var _hoisted_2$42 = { class: "eldra:min-w-0 eldra:flex-1" };
|
|
247
247
|
var _hoisted_3$31 = [
|
|
248
248
|
"data-eldra-scope",
|
|
249
249
|
"name",
|
|
@@ -303,6 +303,23 @@ var AccordionItem_default = /* @__PURE__ */ defineComponent({
|
|
|
303
303
|
* true`. Plain instance state, not a `ref`: nothing here is rendered.
|
|
304
304
|
*/
|
|
305
305
|
let closing = false;
|
|
306
|
+
/**
|
|
307
|
+
* The open state the panel was last **shown** in: what the `<details>` had at mount, then whatever
|
|
308
|
+
* each `toggle` reported. `onToggle` animates an open only when this says the panel was closed.
|
|
309
|
+
*
|
|
310
|
+
* A browser fires `toggle` for a `<details>` that is *already* open when it is created or parsed —
|
|
311
|
+
* an item rendered with `modelValue: true`, or a prerendered `<details open>` being hydrated — one
|
|
312
|
+
* task after mount, with nothing having changed. Animating that event played the panel from `0` on
|
|
313
|
+
* every page load (a layout shift on a page whose HTML already showed it open), and held it at
|
|
314
|
+
* `height: 0; overflow: hidden` for as long as the document timeline did not advance: in a
|
|
315
|
+
* background tab, a throttled preview iframe or a screenshot taken before the first frame, the
|
|
316
|
+
* product page's open Details row stayed clipped to its padding with the rows below drawn over it.
|
|
317
|
+
* `null` until mount, which no `toggle` before mount can reach (the listener is not attached yet).
|
|
318
|
+
*/
|
|
319
|
+
let shownOpen = null;
|
|
320
|
+
onMounted(() => {
|
|
321
|
+
shownOpen = detailsRef.value?.open ?? null;
|
|
322
|
+
});
|
|
306
323
|
const isLinkRow = computed(() => props.href !== void 0);
|
|
307
324
|
/** No default: plain text unless the page outline needs a heading (spec "Accordion" →
|
|
308
325
|
* Accessibility: "Put a heading inside the summary only if the page outline needs it"). */
|
|
@@ -345,7 +362,9 @@ var AccordionItem_default = /* @__PURE__ */ defineComponent({
|
|
|
345
362
|
* for exactly when this is skipped in favour of an instant reveal (reduced motion, no
|
|
346
363
|
* `Element.prototype.animate`, or no stylesheet to read the duration/easing tokens from).
|
|
347
364
|
*/
|
|
348
|
-
|
|
365
|
+
const wasOpen = shownOpen;
|
|
366
|
+
shownOpen = open;
|
|
367
|
+
if (open && wasOpen !== true) heightAnimatorFor(panelRef.value)?.open();
|
|
349
368
|
if (open && detailsName.value !== void 0 && !supportsExclusiveDetailsGroups()) closeOtherOpenSiblings(detailsName.value, target);
|
|
350
369
|
}
|
|
351
370
|
/**
|
|
@@ -365,9 +384,10 @@ var AccordionItem_default = /* @__PURE__ */ defineComponent({
|
|
|
365
384
|
* 2026-09-26 — "one animation owner per item", see `heightTransition.ts`'s own comment for the bug
|
|
366
385
|
* this replaced):
|
|
367
386
|
*
|
|
368
|
-
* - **Opening** (`details.open` is `false`):
|
|
369
|
-
*
|
|
370
|
-
*
|
|
387
|
+
* - **Opening** (`details.open` is `false`): intercepted too. This handler sets `open` and starts
|
|
388
|
+
* the animation in the same task, so no frame is painted with the panel fully open first (the
|
|
389
|
+
* native `toggle` that `onToggle` would otherwise animate from is a later task). The `toggle`
|
|
390
|
+
* that follows still updates `model` and emits, and skips the animation (`shownOpen`).
|
|
371
391
|
* - **Closing** (`details.open` is `true`, `closing` is `false` — a fully open, idle panel, *or* an
|
|
372
392
|
* opening animation from an earlier click still in flight): intercepted, animates toward `0`.
|
|
373
393
|
* `heightAnimatorFor(...)?.close()` reverses that still-running open animation itself if there is
|
|
@@ -400,7 +420,13 @@ var AccordionItem_default = /* @__PURE__ */ defineComponent({
|
|
|
400
420
|
heightAnimatorFor(panelRef.value)?.open();
|
|
401
421
|
return;
|
|
402
422
|
}
|
|
403
|
-
if (!details.open)
|
|
423
|
+
if (!details.open) {
|
|
424
|
+
event.preventDefault();
|
|
425
|
+
shownOpen = true;
|
|
426
|
+
details.open = true;
|
|
427
|
+
heightAnimatorFor(panelRef.value)?.open();
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
404
430
|
event.preventDefault();
|
|
405
431
|
closing = true;
|
|
406
432
|
heightAnimatorFor(panelRef.value)?.close().then(() => {
|
|
@@ -462,7 +488,7 @@ var AccordionItem_default = /* @__PURE__ */ defineComponent({
|
|
|
462
488
|
"data-part": "root",
|
|
463
489
|
class: normalizeClass(rootClass.value),
|
|
464
490
|
href: __props.href
|
|
465
|
-
}, [createElementVNode("span", _hoisted_2$
|
|
491
|
+
}, [createElementVNode("span", _hoisted_2$42, [(openBlock(), createBlock(resolveDynamicComponent(titleTag.value), {
|
|
466
492
|
"data-part": "title",
|
|
467
493
|
class: normalizeClass(titleClass.value)
|
|
468
494
|
}, {
|
|
@@ -472,7 +498,7 @@ var AccordionItem_default = /* @__PURE__ */ defineComponent({
|
|
|
472
498
|
key: 0,
|
|
473
499
|
"data-part": "help",
|
|
474
500
|
class: normalizeClass(helpClass.value)
|
|
475
|
-
}, toDisplayString(__props.help), 3)) : createCommentVNode("", true)])], 10, _hoisted_1$
|
|
501
|
+
}, toDisplayString(__props.help), 3)) : createCommentVNode("", true)])], 10, _hoisted_1$53)) : (openBlock(), createElementBlock("details", {
|
|
476
502
|
key: 1,
|
|
477
503
|
ref_key: "detailsRef",
|
|
478
504
|
ref: detailsRef,
|
|
@@ -540,8 +566,8 @@ function initialsFromName(name) {
|
|
|
540
566
|
return `${words[0].charAt(0)}${words[words.length - 1].charAt(0)}`.toUpperCase();
|
|
541
567
|
}
|
|
542
568
|
// src/components/avatar/Avatar.vue?vue&type=script&setup=true&lang.ts
|
|
543
|
-
var _hoisted_1$
|
|
544
|
-
var _hoisted_2$
|
|
569
|
+
var _hoisted_1$52 = ["data-eldra-scope"];
|
|
570
|
+
var _hoisted_2$41 = ["src"];
|
|
545
571
|
// src/components/avatar/Avatar.vue
|
|
546
572
|
var Avatar_default = /* @__PURE__ */ defineComponent({
|
|
547
573
|
__name: "Avatar",
|
|
@@ -650,7 +676,7 @@ var Avatar_default = /* @__PURE__ */ defineComponent({
|
|
|
650
676
|
alt: "",
|
|
651
677
|
"aria-hidden": "true",
|
|
652
678
|
onError: onImageError
|
|
653
|
-
}, null, 42, _hoisted_2$
|
|
679
|
+
}, null, 42, _hoisted_2$41)) : showInitials.value ? (openBlock(), createElementBlock("span", {
|
|
654
680
|
key: 1,
|
|
655
681
|
"data-part": "initials",
|
|
656
682
|
class: normalizeClass(initialsClass.value),
|
|
@@ -671,13 +697,13 @@ var Avatar_default = /* @__PURE__ */ defineComponent({
|
|
|
671
697
|
cx: "12",
|
|
672
698
|
cy: "8",
|
|
673
699
|
r: "3.5"
|
|
674
|
-
}, null, -1), createElementVNode("path", { d: "M5 20c0 -4 3 -7 7 -7s7 3 7 7" }, null, -1)])], 2))], 16, _hoisted_1$
|
|
700
|
+
}, null, -1), createElementVNode("path", { d: "M5 20c0 -4 3 -7 7 -7s7 3 7 7" }, null, -1)])], 2))], 16, _hoisted_1$52);
|
|
675
701
|
};
|
|
676
702
|
}
|
|
677
703
|
});
|
|
678
704
|
// src/components/avatar/AvatarGroup.vue?vue&type=script&setup=true&lang.ts
|
|
679
|
-
var _hoisted_1$
|
|
680
|
-
var _hoisted_2$
|
|
705
|
+
var _hoisted_1$51 = ["data-eldra-scope", "aria-labelledby"];
|
|
706
|
+
var _hoisted_2$40 = ["id"];
|
|
681
707
|
var ITEM_SIZE = "sm";
|
|
682
708
|
/** `Avatar.vue`'s own `size-8` for `sm` — needed again here so the item wrapper (which draws the
|
|
683
709
|
* overlap and the ring) is exactly the avatar's own box, not a guess at its size. */
|
|
@@ -772,13 +798,13 @@ var AvatarGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
772
798
|
id: unref(srTextId),
|
|
773
799
|
"data-part": "srText",
|
|
774
800
|
class: normalizeClass(srTextClass.value)
|
|
775
|
-
}, toDisplayString(groupLabel.value), 11, _hoisted_2$
|
|
776
|
-
], 8, _hoisted_1$
|
|
801
|
+
}, toDisplayString(groupLabel.value), 11, _hoisted_2$40)
|
|
802
|
+
], 8, _hoisted_1$51);
|
|
777
803
|
};
|
|
778
804
|
}
|
|
779
805
|
});
|
|
780
806
|
// src/components/badge/Badge.vue?vue&type=script&setup=true&lang.ts
|
|
781
|
-
var _hoisted_1$
|
|
807
|
+
var _hoisted_1$50 = ["data-eldra-slot"];
|
|
782
808
|
var ICON_STROKE_WIDTH$5 = 2.25;
|
|
783
809
|
/**
|
|
784
810
|
* `variant` overrides `tone` (spec "Badge" → Properties): `sale` always reads as `accent`, `new`
|
|
@@ -879,7 +905,7 @@ var Badge_default = /* @__PURE__ */ defineComponent({
|
|
|
879
905
|
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
880
906
|
"data-part": "label",
|
|
881
907
|
class: normalizeClass(labelClass.value)
|
|
882
|
-
}, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])], 10, _hoisted_1$
|
|
908
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])], 10, _hoisted_1$50),
|
|
883
909
|
__props.hiddenSuffix ? (openBlock(), createElementBlock("span", {
|
|
884
910
|
key: 1,
|
|
885
911
|
"data-part": "hiddenSuffix",
|
|
@@ -892,8 +918,8 @@ var Badge_default = /* @__PURE__ */ defineComponent({
|
|
|
892
918
|
}
|
|
893
919
|
});
|
|
894
920
|
// src/components/breadcrumb/Breadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
895
|
-
var _hoisted_1$
|
|
896
|
-
var _hoisted_2$
|
|
921
|
+
var _hoisted_1$49 = ["data-eldra-scope", "aria-label"];
|
|
922
|
+
var _hoisted_2$39 = ["aria-label"];
|
|
897
923
|
var rootClass$5 = "eldra:@container";
|
|
898
924
|
// src/components/breadcrumb/Breadcrumb.vue
|
|
899
925
|
var Breadcrumb_default = /* @__PURE__ */ defineComponent({
|
|
@@ -1248,7 +1274,7 @@ var Breadcrumb_default = /* @__PURE__ */ defineComponent({
|
|
|
1248
1274
|
class: normalizeClass(ellipsisClass.value),
|
|
1249
1275
|
"aria-label": unref(m).showMoreLevels(middleItems.value.length),
|
|
1250
1276
|
onClick: expand
|
|
1251
|
-
}, " … ", 10, _hoisted_2$
|
|
1277
|
+
}, " … ", 10, _hoisted_2$39)], 2)) : createCommentVNode("", true),
|
|
1252
1278
|
(openBlock(true), createElementBlock(Fragment, null, renderList(middleItems.value, (item, index) => {
|
|
1253
1279
|
return openBlock(), createElementBlock("li", {
|
|
1254
1280
|
key: `middle-${index}`,
|
|
@@ -1314,12 +1340,12 @@ var Breadcrumb_default = /* @__PURE__ */ defineComponent({
|
|
|
1314
1340
|
key: 0,
|
|
1315
1341
|
type: "application/ld+json",
|
|
1316
1342
|
textContent: toDisplayString(structuredDataJson.value)
|
|
1317
|
-
}, null, 8, ["textContent"])) : createCommentVNode("", true)], 8, _hoisted_1$
|
|
1343
|
+
}, null, 8, ["textContent"])) : createCommentVNode("", true)], 8, _hoisted_1$49);
|
|
1318
1344
|
};
|
|
1319
1345
|
}
|
|
1320
1346
|
});
|
|
1321
1347
|
// src/components/button/ButtonGroup.vue?vue&type=script&setup=true&lang.ts
|
|
1322
|
-
var _hoisted_1$
|
|
1348
|
+
var _hoisted_1$48 = [
|
|
1323
1349
|
"data-eldra-slot",
|
|
1324
1350
|
"data-eldra-scope",
|
|
1325
1351
|
"role"
|
|
@@ -1362,7 +1388,7 @@ var ButtonGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
1362
1388
|
"data-part": "root",
|
|
1363
1389
|
class: normalizeClass(rootClass.value),
|
|
1364
1390
|
role: __props.attached ? "group" : void 0
|
|
1365
|
-
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$
|
|
1391
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$48);
|
|
1366
1392
|
};
|
|
1367
1393
|
}
|
|
1368
1394
|
});
|
|
@@ -2312,12 +2338,12 @@ function useCarousel(options) {
|
|
|
2312
2338
|
};
|
|
2313
2339
|
}
|
|
2314
2340
|
// src/components/carousel/Carousel.vue?vue&type=script&setup=true&lang.ts
|
|
2315
|
-
var _hoisted_1$
|
|
2341
|
+
var _hoisted_1$47 = [
|
|
2316
2342
|
"data-eldra-scope",
|
|
2317
2343
|
"aria-label",
|
|
2318
2344
|
"aria-describedby"
|
|
2319
2345
|
];
|
|
2320
|
-
var _hoisted_2$
|
|
2346
|
+
var _hoisted_2$38 = ["id"];
|
|
2321
2347
|
var _hoisted_3$30 = ["data-eldra-slot"];
|
|
2322
2348
|
var _hoisted_4$21 = ["data-eldra-scope"];
|
|
2323
2349
|
var _hoisted_5$14 = ["disabled", "aria-label"];
|
|
@@ -2332,7 +2358,7 @@ var _hoisted_8$6 = {
|
|
|
2332
2358
|
class: "eldra:flex eldra:items-center eldra:justify-between eldra:gap-4"
|
|
2333
2359
|
};
|
|
2334
2360
|
var _hoisted_9$6 = ["aria-label"];
|
|
2335
|
-
var _hoisted_10$
|
|
2361
|
+
var _hoisted_10$4 = { key: 1 };
|
|
2336
2362
|
var _hoisted_11$3 = [
|
|
2337
2363
|
"aria-current",
|
|
2338
2364
|
"aria-label",
|
|
@@ -2576,7 +2602,7 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2576
2602
|
id: unref(instructionsId),
|
|
2577
2603
|
"data-part": "instructions",
|
|
2578
2604
|
class: normalizeClass(instructionsClass.value)
|
|
2579
|
-
}, toDisplayString(unref(messages).slideInstructions), 11, _hoisted_2$
|
|
2605
|
+
}, toDisplayString(unref(messages).slideInstructions), 11, _hoisted_2$38)) : createCommentVNode("", true),
|
|
2580
2606
|
__props.controls === "header" || _ctx.$slots.header ? (openBlock(), createElementBlock("div", {
|
|
2581
2607
|
key: 1,
|
|
2582
2608
|
"data-eldra-slot": unref(eldra).slotHost("header"),
|
|
@@ -2654,7 +2680,7 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2654
2680
|
class: normalizeClass(pauseClass.value),
|
|
2655
2681
|
"aria-label": unref(playing) ? unref(messages).pause : unref(messages).play,
|
|
2656
2682
|
onClick: _cache[3] || (_cache[3] = (...args) => unref(toggle) && unref(toggle)(...args))
|
|
2657
|
-
}, toDisplayString(unref(playing) ? unref(messages).pause : unref(messages).play), 11, _hoisted_9$6)) : (openBlock(), createElementBlock("span", _hoisted_10$
|
|
2683
|
+
}, toDisplayString(unref(playing) ? unref(messages).pause : unref(messages).play), 11, _hoisted_9$6)) : (openBlock(), createElementBlock("span", _hoisted_10$4)),
|
|
2658
2684
|
__props.dots ? (openBlock(), createElementBlock("div", {
|
|
2659
2685
|
key: 2,
|
|
2660
2686
|
"data-part": "dots",
|
|
@@ -2719,7 +2745,7 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2719
2745
|
}, [createElementVNode("path", { d: "M9 6l6 6l-6 6" })], -1)])], 10, _hoisted_15)
|
|
2720
2746
|
])) : (openBlock(), createElementBlock("span", _hoisted_16))
|
|
2721
2747
|
])) : createCommentVNode("", true)
|
|
2722
|
-
], 8, _hoisted_1$
|
|
2748
|
+
], 8, _hoisted_1$47);
|
|
2723
2749
|
};
|
|
2724
2750
|
}
|
|
2725
2751
|
});
|
|
@@ -2727,8 +2753,8 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
2727
2753
|
/** The key a `ChipGroup` provides its `ChipGroupContext` on. */
|
|
2728
2754
|
var CHIP_GROUP_KEY = Symbol("eldra-ui:chip-group");
|
|
2729
2755
|
// src/components/chip/Chip.vue?vue&type=script&setup=true&lang.ts
|
|
2730
|
-
var _hoisted_1$
|
|
2731
|
-
var _hoisted_2$
|
|
2756
|
+
var _hoisted_1$46 = ["data-eldra-slot"];
|
|
2757
|
+
var _hoisted_2$37 = ["data-eldra-slot"];
|
|
2732
2758
|
var _hoisted_3$29 = ["data-eldra-slot"];
|
|
2733
2759
|
var _hoisted_4$20 = ["aria-label", "disabled"];
|
|
2734
2760
|
var REMOVE_BUTTON = "eldra:inline-flex eldra:shrink-0 eldra:items-center eldra:justify-center eldra:rounded-full eldra:text-muted eldra:hover:text-text eldra:hover:bg-[color-mix(in_oklab,var(--eldra-color-text),transparent_89%)] eldra:eldra-focus";
|
|
@@ -3013,7 +3039,7 @@ var Chip_default = /* @__PURE__ */ defineComponent({
|
|
|
3013
3039
|
"name",
|
|
3014
3040
|
"class",
|
|
3015
3041
|
"classes"
|
|
3016
|
-
])])], 10, _hoisted_1$
|
|
3042
|
+
])])], 10, _hoisted_1$46)) : hasIcon.value ? (openBlock(), createElementBlock("span", {
|
|
3017
3043
|
key: 1,
|
|
3018
3044
|
"data-eldra-slot": unref(eldra).slotHost("icon"),
|
|
3019
3045
|
"data-part": "icon",
|
|
@@ -3022,7 +3048,7 @@ var Chip_default = /* @__PURE__ */ defineComponent({
|
|
|
3022
3048
|
"stroke-width": ICON_STROKE_WIDTH[__props.size],
|
|
3023
3049
|
"aria-hidden": "true",
|
|
3024
3050
|
focusable: "false"
|
|
3025
|
-
}, null, 8, ["stroke-width"]))])], 10, _hoisted_2$
|
|
3051
|
+
}, null, 8, ["stroke-width"]))])], 10, _hoisted_2$37)) : createCommentVNode("", true),
|
|
3026
3052
|
createElementVNode("span", {
|
|
3027
3053
|
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
3028
3054
|
"data-part": "label",
|
|
@@ -3063,7 +3089,7 @@ var Chip_default = /* @__PURE__ */ defineComponent({
|
|
|
3063
3089
|
}
|
|
3064
3090
|
});
|
|
3065
3091
|
// src/components/chip/ChipGroup.vue?vue&type=script&setup=true&lang.ts
|
|
3066
|
-
var _hoisted_1$
|
|
3092
|
+
var _hoisted_1$45 = [
|
|
3067
3093
|
"data-eldra-slot",
|
|
3068
3094
|
"data-eldra-scope",
|
|
3069
3095
|
"aria-label",
|
|
@@ -3125,7 +3151,7 @@ var ChipGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
3125
3151
|
"aria-label": __props.ariaLabel,
|
|
3126
3152
|
"aria-disabled": __props.disabled ? "true" : void 0,
|
|
3127
3153
|
class: normalizeClass(rootClass$3)
|
|
3128
|
-
}, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$
|
|
3154
|
+
}, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$45);
|
|
3129
3155
|
};
|
|
3130
3156
|
}
|
|
3131
3157
|
});
|
|
@@ -3322,12 +3348,12 @@ function zoomEntry(entry, zoom) {
|
|
|
3322
3348
|
return `${entry.slice(0, start)}calc(${entry.slice(start)} * ${zoom})`;
|
|
3323
3349
|
}
|
|
3324
3350
|
// src/components/image/Image.vue?vue&type=script&setup=true&lang.ts
|
|
3325
|
-
var _hoisted_1$
|
|
3351
|
+
var _hoisted_1$44 = [
|
|
3326
3352
|
"src",
|
|
3327
3353
|
"width",
|
|
3328
3354
|
"height"
|
|
3329
3355
|
];
|
|
3330
|
-
var _hoisted_2$
|
|
3356
|
+
var _hoisted_2$36 = [
|
|
3331
3357
|
"src",
|
|
3332
3358
|
"srcset",
|
|
3333
3359
|
"sizes",
|
|
@@ -3525,7 +3551,7 @@ var Image_default = /* @__PURE__ */ defineComponent({
|
|
|
3525
3551
|
playsinline: "",
|
|
3526
3552
|
width: __props.media.width,
|
|
3527
3553
|
height: __props.media.height
|
|
3528
|
-
}), toDisplayString(resolvedAlt.value), 17, _hoisted_1$
|
|
3554
|
+
}), toDisplayString(resolvedAlt.value), 17, _hoisted_1$44)) : __props.media ? (openBlock(), createElementBlock("img", mergeProps({
|
|
3529
3555
|
key: 2,
|
|
3530
3556
|
"data-part": "media",
|
|
3531
3557
|
class: mediaClass.value,
|
|
@@ -3540,7 +3566,7 @@ var Image_default = /* @__PURE__ */ defineComponent({
|
|
|
3540
3566
|
loading: loadingAttr.value,
|
|
3541
3567
|
decoding: "async",
|
|
3542
3568
|
fetchpriority: fetchPriority.value
|
|
3543
|
-
}), null, 16, _hoisted_2$
|
|
3569
|
+
}), null, 16, _hoisted_2$36)) : (openBlock(), createElementBlock("div", {
|
|
3544
3570
|
key: 3,
|
|
3545
3571
|
"data-part": "placeholder",
|
|
3546
3572
|
class: normalizeClass(placeholderClass.value),
|
|
@@ -3590,7 +3616,7 @@ var Image_default = /* @__PURE__ */ defineComponent({
|
|
|
3590
3616
|
}
|
|
3591
3617
|
});
|
|
3592
3618
|
// src/components/skeleton/Skeleton.vue?vue&type=script&setup=true&lang.ts
|
|
3593
|
-
var _hoisted_1$
|
|
3619
|
+
var _hoisted_1$43 = ["data-eldra-scope"];
|
|
3594
3620
|
var TITLE_WIDTH_CLASS = "eldra:w-[60%]";
|
|
3595
3621
|
// src/components/skeleton/Skeleton.vue
|
|
3596
3622
|
var Skeleton_default = /* @__PURE__ */ defineComponent({
|
|
@@ -3717,7 +3743,7 @@ var Skeleton_default = /* @__PURE__ */ defineComponent({
|
|
|
3717
3743
|
style: normalizeStyle(line.style),
|
|
3718
3744
|
"aria-hidden": "true"
|
|
3719
3745
|
}, null, 6);
|
|
3720
|
-
}), 128))], 16, _hoisted_1$
|
|
3746
|
+
}), 128))], 16, _hoisted_1$43);
|
|
3721
3747
|
};
|
|
3722
3748
|
}
|
|
3723
3749
|
});
|
|
@@ -3783,8 +3809,8 @@ var CUE_ARROW_PATHS = [
|
|
|
3783
3809
|
"M13 6l6 6"
|
|
3784
3810
|
];
|
|
3785
3811
|
// src/components/card/ContentCard.vue?vue&type=script&setup=true&lang.ts
|
|
3786
|
-
var _hoisted_1$
|
|
3787
|
-
var _hoisted_2$
|
|
3812
|
+
var _hoisted_1$42 = ["data-eldra-scope", "aria-label"];
|
|
3813
|
+
var _hoisted_2$35 = ["data-eldra-scope"];
|
|
3788
3814
|
var _hoisted_3$27 = ["data-eldra-slot"];
|
|
3789
3815
|
var _hoisted_4$18 = ["data-eldra-slot"];
|
|
3790
3816
|
var _hoisted_5$13 = ["data-eldra-slot"];
|
|
@@ -3983,7 +4009,7 @@ var ContentCard_default = /* @__PURE__ */ defineComponent({
|
|
|
3983
4009
|
}, [createVNode(Skeleton_default, {
|
|
3984
4010
|
variant: "text",
|
|
3985
4011
|
lines: 3
|
|
3986
|
-
})], 2)], 10, _hoisted_1$
|
|
4012
|
+
})], 2)], 10, _hoisted_1$42)) : (openBlock(), createElementBlock("article", {
|
|
3987
4013
|
key: 1,
|
|
3988
4014
|
"data-eldra-ui": "",
|
|
3989
4015
|
"data-eldra-scope": unref(eldra).scope,
|
|
@@ -4063,13 +4089,13 @@ var ContentCard_default = /* @__PURE__ */ defineComponent({
|
|
|
4063
4089
|
d
|
|
4064
4090
|
}, null, 8, _hoisted_9$5);
|
|
4065
4091
|
}), 128))], 10, _hoisted_8$5))], 10, _hoisted_7$7)) : createCommentVNode("", true)
|
|
4066
|
-
], 2)], 10, _hoisted_2$
|
|
4092
|
+
], 2)], 10, _hoisted_2$35));
|
|
4067
4093
|
};
|
|
4068
4094
|
}
|
|
4069
4095
|
});
|
|
4070
4096
|
// src/components/field-wrapper/FieldWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
4071
|
-
var _hoisted_1$
|
|
4072
|
-
var _hoisted_2$
|
|
4097
|
+
var _hoisted_1$41 = ["data-eldra-scope"];
|
|
4098
|
+
var _hoisted_2$34 = ["data-eldra-slot"];
|
|
4073
4099
|
var _hoisted_3$26 = ["data-eldra-slot", "id"];
|
|
4074
4100
|
var _hoisted_4$17 = ["id"];
|
|
4075
4101
|
var GROUP_INLINE = "eldra:grid eldra:min-w-0 eldra:flex-[1_1_14rem] eldra:content-start eldra:gap-1";
|
|
@@ -4321,7 +4347,7 @@ var FieldWrapper_default = /* @__PURE__ */ defineComponent({
|
|
|
4321
4347
|
"data-eldra-scope": unref(eldra).scope,
|
|
4322
4348
|
"data-part": "optionalText",
|
|
4323
4349
|
class: normalizeClass(optionalTextClass.value)
|
|
4324
|
-
}, "(" + toDisplayString(unref(m).optional) + ")", 11, _hoisted_1$
|
|
4350
|
+
}, "(" + toDisplayString(unref(m).optional) + ")", 11, _hoisted_1$41)) : createCommentVNode("", true),
|
|
4325
4351
|
renderSlot(_ctx.$slots, "labelSuffix")
|
|
4326
4352
|
]),
|
|
4327
4353
|
_: 3
|
|
@@ -4335,7 +4361,7 @@ var FieldWrapper_default = /* @__PURE__ */ defineComponent({
|
|
|
4335
4361
|
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
4336
4362
|
"data-part": "control",
|
|
4337
4363
|
class: normalizeClass(controlClass.value)
|
|
4338
|
-
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_2$
|
|
4364
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_2$34)]),
|
|
4339
4365
|
_: 3
|
|
4340
4366
|
}),
|
|
4341
4367
|
hasError.value ? (openBlock(), createBlock(FieldError_default, {
|
|
@@ -4425,12 +4451,16 @@ var CurrencyPicker_default = /* @__PURE__ */ defineComponent({
|
|
|
4425
4451
|
get: () => props.modelValue ?? "",
|
|
4426
4452
|
set: (code) => emit("update:modelValue", code)
|
|
4427
4453
|
});
|
|
4428
|
-
const { root: rootClass, trigger: triggerClass, ...otherClasses } = props.classes ?? {};
|
|
4454
|
+
const { root: rootClass, label: labelClass, trigger: triggerClass, ...otherClasses } = props.classes ?? {};
|
|
4429
4455
|
const selectClasses = computed(() => ({
|
|
4430
4456
|
...otherClasses,
|
|
4431
4457
|
trigger: [props.busy ? "eldra:opacity-60" : "", triggerClass ?? ""].join(" ").trim() || void 0
|
|
4432
4458
|
}));
|
|
4433
|
-
const labelClasses = computed(() => props.showLabel ?
|
|
4459
|
+
const labelClasses = computed(() => props.showLabel ? { label: labelClass } : { label: "eldra:sr-only" });
|
|
4460
|
+
/** A row's currency name alone, for an `optionContent` slot that prints the code apart from it. */
|
|
4461
|
+
function nameOf(option) {
|
|
4462
|
+
return currencyName(option.value);
|
|
4463
|
+
}
|
|
4434
4464
|
return (_ctx, _cache) => {
|
|
4435
4465
|
return props.currencies.length > 1 ? (openBlock(), createBlock(FieldWrapper_default, {
|
|
4436
4466
|
key: 0,
|
|
@@ -4441,7 +4471,7 @@ var CurrencyPicker_default = /* @__PURE__ */ defineComponent({
|
|
|
4441
4471
|
classes: labelClasses.value,
|
|
4442
4472
|
class: normalizeClass(unref(rootClass)),
|
|
4443
4473
|
"aria-busy": __props.busy ? "true" : void 0
|
|
4444
|
-
}, {
|
|
4474
|
+
}, createSlots({
|
|
4445
4475
|
default: withCtx(() => [createVNode(Select_default, {
|
|
4446
4476
|
modelValue: selected.value,
|
|
4447
4477
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selected.value = $event),
|
|
@@ -4450,18 +4480,38 @@ var CurrencyPicker_default = /* @__PURE__ */ defineComponent({
|
|
|
4450
4480
|
searchable: false,
|
|
4451
4481
|
size: __props.size,
|
|
4452
4482
|
classes: selectClasses.value
|
|
4453
|
-
}, {
|
|
4454
|
-
value: withCtx(({ option }) => [
|
|
4455
|
-
|
|
4456
|
-
|
|
4483
|
+
}, createSlots({
|
|
4484
|
+
value: withCtx(({ option }) => [renderSlot(_ctx.$slots, "value", {
|
|
4485
|
+
code: option.value,
|
|
4486
|
+
label: option.label
|
|
4487
|
+
}, () => [createTextVNode(toDisplayString(option.value), 1)])]),
|
|
4488
|
+
_: 2
|
|
4489
|
+
}, [_ctx.$slots.leading ? {
|
|
4490
|
+
name: "leading",
|
|
4491
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "leading")]),
|
|
4492
|
+
key: "0"
|
|
4493
|
+
} : void 0, _ctx.$slots.optionContent ? {
|
|
4494
|
+
name: "optionContent",
|
|
4495
|
+
fn: withCtx(({ option, selected: chosen }) => [renderSlot(_ctx.$slots, "optionContent", {
|
|
4496
|
+
code: option.value,
|
|
4497
|
+
currencyName: nameOf(option),
|
|
4498
|
+
label: option.label,
|
|
4499
|
+
selected: chosen
|
|
4500
|
+
})]),
|
|
4501
|
+
key: "1"
|
|
4502
|
+
} : void 0]), 1032, [
|
|
4457
4503
|
"modelValue",
|
|
4458
4504
|
"options",
|
|
4459
4505
|
"placement",
|
|
4460
4506
|
"size",
|
|
4461
4507
|
"classes"
|
|
4462
4508
|
])]),
|
|
4463
|
-
_:
|
|
4464
|
-
},
|
|
4509
|
+
_: 2
|
|
4510
|
+
}, [_ctx.$slots.label ? {
|
|
4511
|
+
name: "label",
|
|
4512
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "label")]),
|
|
4513
|
+
key: "0"
|
|
4514
|
+
} : void 0]), 1032, [
|
|
4465
4515
|
"data-eldra-scope",
|
|
4466
4516
|
"label",
|
|
4467
4517
|
"classes",
|
|
@@ -4829,12 +4879,12 @@ function useDialog(options) {
|
|
|
4829
4879
|
};
|
|
4830
4880
|
}
|
|
4831
4881
|
// src/components/dialog/Dialog.vue?vue&type=script&setup=true&lang.ts
|
|
4832
|
-
var _hoisted_1$
|
|
4882
|
+
var _hoisted_1$40 = [
|
|
4833
4883
|
"data-eldra-scope",
|
|
4834
4884
|
"aria-labelledby",
|
|
4835
4885
|
"aria-describedby"
|
|
4836
4886
|
];
|
|
4837
|
-
var _hoisted_2$
|
|
4887
|
+
var _hoisted_2$33 = ["data-eldra-slot", "id"];
|
|
4838
4888
|
var _hoisted_3$25 = ["id"];
|
|
4839
4889
|
var _hoisted_4$16 = ["aria-label"];
|
|
4840
4890
|
var _hoisted_5$12 = ["data-eldra-slot"];
|
|
@@ -5020,7 +5070,7 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
5020
5070
|
id: unref(titleId),
|
|
5021
5071
|
"data-part": "title",
|
|
5022
5072
|
class: normalizeClass(titleClass.value)
|
|
5023
|
-
}, [renderSlot(_ctx.$slots, "title")], 10, _hoisted_2$
|
|
5073
|
+
}, [renderSlot(_ctx.$slots, "title")], 10, _hoisted_2$33)) : __props.title !== void 0 ? (openBlock(), createElementBlock("h2", {
|
|
5024
5074
|
key: 1,
|
|
5025
5075
|
id: unref(titleId),
|
|
5026
5076
|
"data-part": "title",
|
|
@@ -5060,7 +5110,7 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
5060
5110
|
"data-part": "footer",
|
|
5061
5111
|
class: normalizeClass(footerClass.value)
|
|
5062
5112
|
}, [renderSlot(_ctx.$slots, "footer")], 10, _hoisted_7$6)) : createCommentVNode("", true)
|
|
5063
|
-
], 2)], 40, _hoisted_1$
|
|
5113
|
+
], 2)], 40, _hoisted_1$40);
|
|
5064
5114
|
};
|
|
5065
5115
|
}
|
|
5066
5116
|
});
|
|
@@ -5293,13 +5343,13 @@ function useDrawerDrag(options) {
|
|
|
5293
5343
|
};
|
|
5294
5344
|
}
|
|
5295
5345
|
// src/components/drawer/Drawer.vue?vue&type=script&setup=true&lang.ts
|
|
5296
|
-
var _hoisted_1$
|
|
5346
|
+
var _hoisted_1$39 = [
|
|
5297
5347
|
"data-eldra-scope",
|
|
5298
5348
|
"aria-labelledby",
|
|
5299
5349
|
"aria-label",
|
|
5300
5350
|
"data-side"
|
|
5301
5351
|
];
|
|
5302
|
-
var _hoisted_2$
|
|
5352
|
+
var _hoisted_2$32 = ["data-eldra-slot"];
|
|
5303
5353
|
var _hoisted_3$24 = ["data-eldra-scope", "id"];
|
|
5304
5354
|
var _hoisted_4$15 = ["aria-label"];
|
|
5305
5355
|
var _hoisted_5$11 = ["data-eldra-slot"];
|
|
@@ -5544,7 +5594,7 @@ var Drawer_default = /* @__PURE__ */ defineComponent({
|
|
|
5544
5594
|
key: 0,
|
|
5545
5595
|
"data-part": "count",
|
|
5546
5596
|
class: normalizeClass(countClass.value)
|
|
5547
|
-
}, "(" + toDisplayString(__props.count) + ")", 3)) : createCommentVNode("", true)], 10, _hoisted_3$24)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "header")], 8, _hoisted_2$
|
|
5597
|
+
}, "(" + toDisplayString(__props.count) + ")", 3)) : createCommentVNode("", true)], 10, _hoisted_3$24)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "header")], 8, _hoisted_2$32), createElementVNode("button", {
|
|
5548
5598
|
ref_key: "closeButtonEl",
|
|
5549
5599
|
ref: closeButtonEl,
|
|
5550
5600
|
type: "button",
|
|
@@ -5580,12 +5630,12 @@ var Drawer_default = /* @__PURE__ */ defineComponent({
|
|
|
5580
5630
|
"data-part": "footer",
|
|
5581
5631
|
class: normalizeClass(footerClass.value)
|
|
5582
5632
|
}, [renderSlot(_ctx.$slots, "footer")], 10, _hoisted_6$7)) : createCommentVNode("", true)
|
|
5583
|
-
], 38)], 42, _hoisted_1$
|
|
5633
|
+
], 38)], 42, _hoisted_1$39);
|
|
5584
5634
|
};
|
|
5585
5635
|
}
|
|
5586
5636
|
});
|
|
5587
5637
|
// src/components/empty-state/EditorPlaceholder.vue?vue&type=script&setup=true&lang.ts
|
|
5588
|
-
var _hoisted_1$
|
|
5638
|
+
var _hoisted_1$38 = ["data-eldra-scope"];
|
|
5589
5639
|
// src/components/empty-state/EditorPlaceholder.vue
|
|
5590
5640
|
var EditorPlaceholder_default = /* @__PURE__ */ defineComponent({
|
|
5591
5641
|
__name: "EditorPlaceholder",
|
|
@@ -5648,7 +5698,7 @@ var EditorPlaceholder_default = /* @__PURE__ */ defineComponent({
|
|
|
5648
5698
|
"data-part": "help",
|
|
5649
5699
|
class: normalizeClass(helpClass.value)
|
|
5650
5700
|
}, toDisplayString(__props.help), 3)) : createCommentVNode("", true)
|
|
5651
|
-
], 10, _hoisted_1$
|
|
5701
|
+
], 10, _hoisted_1$38);
|
|
5652
5702
|
};
|
|
5653
5703
|
}
|
|
5654
5704
|
});
|
|
@@ -5684,8 +5734,8 @@ var ALERT_CIRCLE_PATHS = [
|
|
|
5684
5734
|
/** `check`: a completed step's mark in `StepIndicator`. */
|
|
5685
5735
|
var CHECK_PATHS = ["M5 12l5 5l10 -10"];
|
|
5686
5736
|
// src/components/empty-state/EmptyState.vue?vue&type=script&setup=true&lang.ts
|
|
5687
|
-
var _hoisted_1$
|
|
5688
|
-
var _hoisted_2$
|
|
5737
|
+
var _hoisted_1$37 = ["data-eldra-scope", "role"];
|
|
5738
|
+
var _hoisted_2$31 = ["d"];
|
|
5689
5739
|
var _hoisted_3$23 = ["data-eldra-slot"];
|
|
5690
5740
|
var ICON_STROKE_WIDTH$4 = 1.5;
|
|
5691
5741
|
// src/components/empty-state/EmptyState.vue
|
|
@@ -5805,7 +5855,7 @@ var EmptyState_default = /* @__PURE__ */ defineComponent({
|
|
|
5805
5855
|
return openBlock(), createElementBlock("path", {
|
|
5806
5856
|
key: d,
|
|
5807
5857
|
d
|
|
5808
|
-
}, null, 8, _hoisted_2$
|
|
5858
|
+
}, null, 8, _hoisted_2$31);
|
|
5809
5859
|
}), 128))]))], 2),
|
|
5810
5860
|
(openBlock(), createBlock(resolveDynamicComponent(unref(headingTag)), {
|
|
5811
5861
|
"data-part": "title",
|
|
@@ -5831,13 +5881,13 @@ var EmptyState_default = /* @__PURE__ */ defineComponent({
|
|
|
5831
5881
|
label: unref(messages).tryAgain,
|
|
5832
5882
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("retry"))
|
|
5833
5883
|
}, null, 8, ["loading", "label"])) : createCommentVNode("", true)])], 10, _hoisted_3$23)) : createCommentVNode("", true)
|
|
5834
|
-
], 10, _hoisted_1$
|
|
5884
|
+
], 10, _hoisted_1$37);
|
|
5835
5885
|
};
|
|
5836
5886
|
}
|
|
5837
5887
|
});
|
|
5838
5888
|
// src/components/card/FeatureCard.vue?vue&type=script&setup=true&lang.ts
|
|
5839
|
-
var _hoisted_1$
|
|
5840
|
-
var _hoisted_2$
|
|
5889
|
+
var _hoisted_1$36 = ["data-eldra-scope"];
|
|
5890
|
+
var _hoisted_2$30 = ["data-eldra-slot"];
|
|
5841
5891
|
var _hoisted_3$22 = ["data-eldra-slot"];
|
|
5842
5892
|
var _hoisted_4$14 = ["data-eldra-scope"];
|
|
5843
5893
|
var _hoisted_5$10 = ["d"];
|
|
@@ -5982,7 +6032,7 @@ var FeatureCard_default = /* @__PURE__ */ defineComponent({
|
|
|
5982
6032
|
"data-eldra-slot": unref(eldra).slotHost("body"),
|
|
5983
6033
|
"data-part": "body",
|
|
5984
6034
|
class: normalizeClass(bodyClass.value)
|
|
5985
|
-
}, [renderSlot(_ctx.$slots, "body", {}, () => [createTextVNode(toDisplayString(__props.body), 1)])], 10, _hoisted_2$
|
|
6035
|
+
}, [renderSlot(_ctx.$slots, "body", {}, () => [createTextVNode(toDisplayString(__props.body), 1)])], 10, _hoisted_2$30),
|
|
5986
6036
|
hasHref.value ? (openBlock(), createElementBlock("span", {
|
|
5987
6037
|
key: 0,
|
|
5988
6038
|
"data-eldra-slot": unref(eldra).slotHost("cue"),
|
|
@@ -6006,7 +6056,7 @@ var FeatureCard_default = /* @__PURE__ */ defineComponent({
|
|
|
6006
6056
|
d
|
|
6007
6057
|
}, null, 8, _hoisted_5$10);
|
|
6008
6058
|
}), 128))], 10, _hoisted_4$14))], 10, _hoisted_3$22)) : createCommentVNode("", true)
|
|
6009
|
-
], 10, _hoisted_1$
|
|
6059
|
+
], 10, _hoisted_1$36);
|
|
6010
6060
|
};
|
|
6011
6061
|
}
|
|
6012
6062
|
});
|
|
@@ -6566,8 +6616,8 @@ var FACET_ROW_GUTTER = "eldra:-mx-2 eldra:px-2";
|
|
|
6566
6616
|
/** The same, at the swatch row's own tighter 0.375rem padding (spec → Sizes, Swatch row). */
|
|
6567
6617
|
var FACET_SWATCH_GUTTER = "eldra:-mx-1.5 eldra:px-1.5";
|
|
6568
6618
|
// src/components/filter-panel/facets/ColourFacet.vue?vue&type=script&setup=true&lang.ts
|
|
6569
|
-
var _hoisted_1$
|
|
6570
|
-
var _hoisted_2$
|
|
6619
|
+
var _hoisted_1$35 = ["data-eldra-scope"];
|
|
6620
|
+
var _hoisted_2$29 = ["data-part", "data-value"];
|
|
6571
6621
|
var _hoisted_3$21 = [
|
|
6572
6622
|
"value",
|
|
6573
6623
|
"checked",
|
|
@@ -6788,14 +6838,14 @@ var ColourFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
6788
6838
|
"data-part": "count",
|
|
6789
6839
|
class: normalizeClass(countClass.value)
|
|
6790
6840
|
}, toDisplayString(value.count), 3)
|
|
6791
|
-
], 10, _hoisted_2$
|
|
6792
|
-
}), 128))], 10, _hoisted_1$
|
|
6841
|
+
], 10, _hoisted_2$29);
|
|
6842
|
+
}), 128))], 10, _hoisted_1$35);
|
|
6793
6843
|
};
|
|
6794
6844
|
}
|
|
6795
6845
|
});
|
|
6796
6846
|
// src/components/filter-panel/facets/ListFacet.vue?vue&type=script&setup=true&lang.ts
|
|
6797
|
-
var _hoisted_1$
|
|
6798
|
-
var _hoisted_2$
|
|
6847
|
+
var _hoisted_1$34 = ["data-eldra-scope"];
|
|
6848
|
+
var _hoisted_2$28 = ["data-eldra-scope"];
|
|
6799
6849
|
var _hoisted_3$20 = ["id"];
|
|
6800
6850
|
var _hoisted_4$12 = ["data-eldra-scope"];
|
|
6801
6851
|
var _hoisted_5$9 = ["data-eldra-scope"];
|
|
@@ -6947,7 +6997,7 @@ var ListFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
6947
6997
|
"stroke-linejoin": "round",
|
|
6948
6998
|
"aria-hidden": "true",
|
|
6949
6999
|
focusable: "false"
|
|
6950
|
-
}, [..._cache[2] || (_cache[2] = [createElementVNode("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }, null, -1), createElementVNode("path", { d: "M21 21l-6 -6" }, null, -1)])], 8, _hoisted_2$
|
|
7000
|
+
}, [..._cache[2] || (_cache[2] = [createElementVNode("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }, null, -1), createElementVNode("path", { d: "M21 21l-6 -6" }, null, -1)])], 8, _hoisted_2$28))]),
|
|
6951
7001
|
_: 1
|
|
6952
7002
|
}, 8, [
|
|
6953
7003
|
"id",
|
|
@@ -7064,7 +7114,7 @@ var ListFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
7064
7114
|
"aria-expanded",
|
|
7065
7115
|
"aria-controls"
|
|
7066
7116
|
])) : createCommentVNode("", true)
|
|
7067
|
-
], 8, _hoisted_1$
|
|
7117
|
+
], 8, _hoisted_1$34);
|
|
7068
7118
|
};
|
|
7069
7119
|
}
|
|
7070
7120
|
});
|
|
@@ -7223,8 +7273,8 @@ function rangeKeyTransition(key, shiftKey, thumb, value, math) {
|
|
|
7223
7273
|
}
|
|
7224
7274
|
}
|
|
7225
7275
|
// src/components/range-slider/RangeSlider.vue?vue&type=script&setup=true&lang.ts
|
|
7226
|
-
var _hoisted_1$
|
|
7227
|
-
var _hoisted_2$
|
|
7276
|
+
var _hoisted_1$33 = ["data-eldra-scope"];
|
|
7277
|
+
var _hoisted_2$27 = ["id"];
|
|
7228
7278
|
var _hoisted_3$19 = ["data-eldra-slot", "aria-labelledby"];
|
|
7229
7279
|
var _hoisted_4$11 = ["data-eldra-scope"];
|
|
7230
7280
|
var _hoisted_5$8 = [
|
|
@@ -7729,7 +7779,7 @@ var RangeSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
7729
7779
|
id: unref(labelId),
|
|
7730
7780
|
"data-part": "label",
|
|
7731
7781
|
class: normalizeClass(labelClass.value)
|
|
7732
|
-
}, toDisplayString(__props.label), 11, _hoisted_2$
|
|
7782
|
+
}, toDisplayString(__props.label), 11, _hoisted_2$27)) : createCommentVNode("", true),
|
|
7733
7783
|
createElementVNode("div", {
|
|
7734
7784
|
"data-eldra-slot": unref(eldra).slotHost("track"),
|
|
7735
7785
|
role: "group",
|
|
@@ -7802,13 +7852,13 @@ var RangeSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
7802
7852
|
onKeydown: withKeys(withModifiers(($event) => onInputEnter(thumb.thumb), ["prevent"]), ["enter"])
|
|
7803
7853
|
}, null, 42, _hoisted_7$4)], 64);
|
|
7804
7854
|
}), 128))])], 10, _hoisted_6$5)) : createCommentVNode("", true)
|
|
7805
|
-
], 8, _hoisted_1$
|
|
7855
|
+
], 8, _hoisted_1$33);
|
|
7806
7856
|
};
|
|
7807
7857
|
}
|
|
7808
7858
|
});
|
|
7809
7859
|
// src/components/filter-panel/Histogram.vue?vue&type=script&setup=true&lang.ts
|
|
7810
|
-
var _hoisted_1$
|
|
7811
|
-
var _hoisted_2$
|
|
7860
|
+
var _hoisted_1$32 = ["data-eldra-scope"];
|
|
7861
|
+
var _hoisted_2$26 = ["data-inside"];
|
|
7812
7862
|
var ROOT_BASE$1 = "eldra:mb-1 eldra:flex eldra:h-10 eldra:w-full eldra:items-end eldra:gap-0.5";
|
|
7813
7863
|
/** Spec → States, Range: "histogram bars between the thumbs `border-strong`, outside
|
|
7814
7864
|
* `surface-strong`." */
|
|
@@ -7876,14 +7926,14 @@ var Histogram_default = /* @__PURE__ */ defineComponent({
|
|
|
7876
7926
|
"data-inside": bar.inside ? "true" : "false",
|
|
7877
7927
|
class: normalizeClass(barClass(bar)),
|
|
7878
7928
|
style: normalizeStyle({ height: `${bar.height * 100}%` })
|
|
7879
|
-
}, null, 14, _hoisted_2$
|
|
7880
|
-
}), 128))], 10, _hoisted_1$
|
|
7929
|
+
}, null, 14, _hoisted_2$26);
|
|
7930
|
+
}), 128))], 10, _hoisted_1$32);
|
|
7881
7931
|
};
|
|
7882
7932
|
}
|
|
7883
7933
|
});
|
|
7884
7934
|
// src/components/filter-panel/facets/RangeFacet.vue?vue&type=script&setup=true&lang.ts
|
|
7885
|
-
var _hoisted_1$
|
|
7886
|
-
var _hoisted_2$
|
|
7935
|
+
var _hoisted_1$31 = ["data-eldra-scope"];
|
|
7936
|
+
var _hoisted_2$25 = ["data-eldra-scope"];
|
|
7887
7937
|
var FIELDS_BASE = "eldra:col-span-full eldra:grid eldra:grid-cols-[1fr_auto_1fr] eldra:items-end eldra:gap-2";
|
|
7888
7938
|
/** Spec → Sizes: 'Label "Min" / "Max" 0.75rem weight 500 `muted`, 0.125rem above its Input sm.' */
|
|
7889
7939
|
var FIELD_LABEL = "eldra:mb-0.5 eldra:block eldra:text-filter-tile-count eldra:font-medium eldra:text-muted";
|
|
@@ -8187,7 +8237,7 @@ var RangeFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
8187
8237
|
])]),
|
|
8188
8238
|
_: 2
|
|
8189
8239
|
}, 1032, ["label", "class"]))
|
|
8190
|
-
], 10, _hoisted_2$
|
|
8240
|
+
], 10, _hoisted_2$25)]),
|
|
8191
8241
|
_: 2
|
|
8192
8242
|
}, [showTrack.value && __props.facet.histogram && __props.facet.histogram.length > 0 ? {
|
|
8193
8243
|
name: "track",
|
|
@@ -8211,12 +8261,12 @@ var RangeFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
8211
8261
|
"min-label",
|
|
8212
8262
|
"max-label",
|
|
8213
8263
|
"track-visible"
|
|
8214
|
-
])], 10, _hoisted_1$
|
|
8264
|
+
])], 10, _hoisted_1$31);
|
|
8215
8265
|
};
|
|
8216
8266
|
}
|
|
8217
8267
|
});
|
|
8218
8268
|
// src/components/link/Link.vue?vue&type=script&setup=true&lang.ts
|
|
8219
|
-
var _hoisted_1$
|
|
8269
|
+
var _hoisted_1$30 = ["data-eldra-slot"];
|
|
8220
8270
|
var BASE$1 = "eldra:group eldra:eldra-focus eldra:eldra-link-radius";
|
|
8221
8271
|
/** Spec "Link" → States: `text` by default, `muted` turning `text` on hover. */
|
|
8222
8272
|
var SECTION$2 = "eldra:section-primary:text-primary-contrast eldra:section-accent:text-accent-contrast";
|
|
@@ -8349,7 +8399,7 @@ var Link_default = /* @__PURE__ */ defineComponent({
|
|
|
8349
8399
|
"data-eldra-slot": unref(eldra).slotHost("default"),
|
|
8350
8400
|
"data-part": "label",
|
|
8351
8401
|
class: normalizeClass(labelClass.value)
|
|
8352
|
-
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$
|
|
8402
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$30),
|
|
8353
8403
|
showArrow.value ? (openBlock(), createElementBlock("svg", {
|
|
8354
8404
|
key: 0,
|
|
8355
8405
|
"data-part": "arrow",
|
|
@@ -8393,8 +8443,8 @@ var Link_default = /* @__PURE__ */ defineComponent({
|
|
|
8393
8443
|
}
|
|
8394
8444
|
});
|
|
8395
8445
|
// src/components/filter-panel/facets/SizeFacet.vue?vue&type=script&setup=true&lang.ts
|
|
8396
|
-
var _hoisted_1$
|
|
8397
|
-
var _hoisted_2$
|
|
8446
|
+
var _hoisted_1$29 = ["data-eldra-scope"];
|
|
8447
|
+
var _hoisted_2$24 = ["data-value"];
|
|
8398
8448
|
var _hoisted_3$18 = [
|
|
8399
8449
|
"value",
|
|
8400
8450
|
"checked",
|
|
@@ -8527,7 +8577,7 @@ var SizeFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
8527
8577
|
"data-part": "tileLabel",
|
|
8528
8578
|
class: normalizeClass(tileLabelClass.value),
|
|
8529
8579
|
"aria-hidden": "true"
|
|
8530
|
-
}, toDisplayString(value.label), 3)], 10, _hoisted_2$
|
|
8580
|
+
}, toDisplayString(value.label), 3)], 10, _hoisted_2$24);
|
|
8531
8581
|
}), 128))], 2)], 64);
|
|
8532
8582
|
}), 128)), __props.facet.sizeGuideHref ? (openBlock(), createBlock(Link_default, {
|
|
8533
8583
|
key: 0,
|
|
@@ -8537,13 +8587,13 @@ var SizeFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
8537
8587
|
}, {
|
|
8538
8588
|
default: withCtx(() => [createTextVNode(toDisplayString(unref(m).filterPanelSizeGuide), 1)]),
|
|
8539
8589
|
_: 1
|
|
8540
|
-
}, 8, ["href", "class"])) : createCommentVNode("", true)], 8, _hoisted_1$
|
|
8590
|
+
}, 8, ["href", "class"])) : createCommentVNode("", true)], 8, _hoisted_1$29);
|
|
8541
8591
|
};
|
|
8542
8592
|
}
|
|
8543
8593
|
});
|
|
8544
8594
|
// src/components/filter-panel/facets/ToggleFacet.vue?vue&type=script&setup=true&lang.ts
|
|
8545
|
-
var _hoisted_1$
|
|
8546
|
-
var _hoisted_2$
|
|
8595
|
+
var _hoisted_1$28 = ["data-eldra-scope"];
|
|
8596
|
+
var _hoisted_2$23 = ["data-value"];
|
|
8547
8597
|
var _hoisted_3$17 = ["data-eldra-scope"];
|
|
8548
8598
|
var VALUES_BASE = "eldra:flex eldra:min-w-0 eldra:flex-col eldra:gap-1";
|
|
8549
8599
|
/**
|
|
@@ -8630,14 +8680,14 @@ var ToggleFacet_default = /* @__PURE__ */ defineComponent({
|
|
|
8630
8680
|
]), createElementVNode("span", {
|
|
8631
8681
|
"data-part": "count",
|
|
8632
8682
|
class: normalizeClass(countClass.value)
|
|
8633
|
-
}, toDisplayString(value.count), 3)], 10, _hoisted_2$
|
|
8634
|
-
}), 128))], 10, _hoisted_1$
|
|
8683
|
+
}, toDisplayString(value.count), 3)], 10, _hoisted_2$23);
|
|
8684
|
+
}), 128))], 10, _hoisted_1$28);
|
|
8635
8685
|
};
|
|
8636
8686
|
}
|
|
8637
8687
|
});
|
|
8638
8688
|
// src/components/filter-panel/FilterGroup.vue?vue&type=script&setup=true&lang.ts
|
|
8639
|
-
var _hoisted_1$
|
|
8640
|
-
var _hoisted_2$
|
|
8689
|
+
var _hoisted_1$27 = ["data-eldra-scope", "data-facet"];
|
|
8690
|
+
var _hoisted_2$22 = { class: "eldra:m-0" };
|
|
8641
8691
|
var _hoisted_3$16 = [
|
|
8642
8692
|
"id",
|
|
8643
8693
|
"aria-expanded",
|
|
@@ -8757,7 +8807,7 @@ var FilterGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
8757
8807
|
"data-part": "group",
|
|
8758
8808
|
"data-facet": __props.facet.id,
|
|
8759
8809
|
class: normalizeClass(groupClass.value)
|
|
8760
|
-
}, [createElementVNode("h3", _hoisted_2$
|
|
8810
|
+
}, [createElementVNode("h3", _hoisted_2$22, [createElementVNode("button", {
|
|
8761
8811
|
ref_key: "triggerEl",
|
|
8762
8812
|
ref: triggerEl,
|
|
8763
8813
|
type: "button",
|
|
@@ -8815,13 +8865,13 @@ var FilterGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
8815
8865
|
}, {
|
|
8816
8866
|
default: withCtx(() => [createTextVNode(toDisplayString(__props.facet.label), 1)]),
|
|
8817
8867
|
_: 1
|
|
8818
|
-
}, 8, ["class"]), renderSlot(_ctx.$slots, "default")], 42, _hoisted_5$7), [[vShow, __props.open]])], 10, _hoisted_1$
|
|
8868
|
+
}, 8, ["class"]), renderSlot(_ctx.$slots, "default")], 42, _hoisted_5$7), [[vShow, __props.open]])], 10, _hoisted_1$27);
|
|
8819
8869
|
};
|
|
8820
8870
|
}
|
|
8821
8871
|
});
|
|
8822
8872
|
// src/components/filter-panel/FilterPanel.vue?vue&type=script&setup=true&lang.ts
|
|
8823
|
-
var _hoisted_1$
|
|
8824
|
-
var _hoisted_2$
|
|
8873
|
+
var _hoisted_1$26 = ["data-eldra-scope", "aria-label"];
|
|
8874
|
+
var _hoisted_2$21 = ["aria-label"];
|
|
8825
8875
|
var _hoisted_3$15 = ["data-eldra-slot"];
|
|
8826
8876
|
var ROOT_BASE = "eldra:@container eldra:min-w-0 eldra:text-control eldra:text-text";
|
|
8827
8877
|
/**
|
|
@@ -9094,7 +9144,7 @@ var FilterPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
9094
9144
|
"messages",
|
|
9095
9145
|
"onRemove"
|
|
9096
9146
|
])]);
|
|
9097
|
-
}), 128))], 10, _hoisted_2$
|
|
9147
|
+
}), 128))], 10, _hoisted_2$21)) : createCommentVNode("", true),
|
|
9098
9148
|
(openBlock(true), createElementBlock(Fragment, null, renderList(drawn.value, (facet, index) => {
|
|
9099
9149
|
return openBlock(), createBlock(FilterGroup_default, {
|
|
9100
9150
|
key: facet.id,
|
|
@@ -9248,7 +9298,7 @@ var FilterPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
9248
9298
|
default: withCtx(() => [createTextVNode(toDisplayString(__props.resultCount === null ? unref(m).filterPanelShowProducts : unref(m).filterPanelShowResults(__props.resultCount)), 1)]),
|
|
9249
9299
|
_: 1
|
|
9250
9300
|
})])], 10, _hoisted_3$15)) : createCommentVNode("", true)
|
|
9251
|
-
], 40, _hoisted_1$
|
|
9301
|
+
], 40, _hoisted_1$26);
|
|
9252
9302
|
};
|
|
9253
9303
|
}
|
|
9254
9304
|
});
|
|
@@ -9290,8 +9340,8 @@ function zoomTransform(painted, stage, scale, focus) {
|
|
|
9290
9340
|
};
|
|
9291
9341
|
}
|
|
9292
9342
|
// src/components/lightbox/Lightbox.vue?vue&type=script&setup=true&lang.ts
|
|
9293
|
-
var _hoisted_1$
|
|
9294
|
-
var _hoisted_2$
|
|
9343
|
+
var _hoisted_1$25 = ["data-eldra-scope", "aria-label"];
|
|
9344
|
+
var _hoisted_2$20 = { key: 1 };
|
|
9295
9345
|
var _hoisted_3$14 = ["aria-label"];
|
|
9296
9346
|
var _hoisted_4$9 = ["disabled", "aria-label"];
|
|
9297
9347
|
var _hoisted_5$6 = ["aria-label", "data-zoomed"];
|
|
@@ -9309,7 +9359,7 @@ var _hoisted_9$3 = {
|
|
|
9309
9359
|
"aria-hidden": "true",
|
|
9310
9360
|
focusable: "false"
|
|
9311
9361
|
};
|
|
9312
|
-
var _hoisted_10$
|
|
9362
|
+
var _hoisted_10$3 = {
|
|
9313
9363
|
key: 0,
|
|
9314
9364
|
d: "M10 7l0 6"
|
|
9315
9365
|
};
|
|
@@ -9868,7 +9918,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
|
|
|
9868
9918
|
"data-part": "counter",
|
|
9869
9919
|
"aria-hidden": "true",
|
|
9870
9920
|
class: normalizeClass(counterClass.value)
|
|
9871
|
-
}, toDisplayString(unref(m).counter(unref(carouselIndex) + 1, unref(count))), 3)) : (openBlock(), createElementBlock("span", _hoisted_2$
|
|
9921
|
+
}, toDisplayString(unref(m).counter(unref(carouselIndex) + 1, unref(count))), 3)) : (openBlock(), createElementBlock("span", _hoisted_2$20)), createElementVNode("button", {
|
|
9872
9922
|
ref_key: "closeButtonEl",
|
|
9873
9923
|
ref: closeButtonEl,
|
|
9874
9924
|
type: "button",
|
|
@@ -9991,7 +10041,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
|
|
|
9991
10041
|
}, [(openBlock(), createElementBlock("svg", _hoisted_9$3, [
|
|
9992
10042
|
_cache[5] || (_cache[5] = createElementVNode("path", { d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }, null, -1)),
|
|
9993
10043
|
_cache[6] || (_cache[6] = createElementVNode("path", { d: "M7 10l6 0" }, null, -1)),
|
|
9994
|
-
!zoomed.value ? (openBlock(), createElementBlock("path", _hoisted_10$
|
|
10044
|
+
!zoomed.value ? (openBlock(), createElementBlock("path", _hoisted_10$3)) : createCommentVNode("", true),
|
|
9995
10045
|
_cache[7] || (_cache[7] = createElementVNode("path", { d: "M21 21l-6 -6" }, null, -1))
|
|
9996
10046
|
]))], 10, _hoisted_8$3)) : createCommentVNode("", true)
|
|
9997
10047
|
], 34),
|
|
@@ -10018,13 +10068,13 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
|
|
|
10018
10068
|
fit: "cover"
|
|
10019
10069
|
}, null, 8, ["media"])], 10, _hoisted_11$2);
|
|
10020
10070
|
}), 128))], 2)) : createCommentVNode("", true)
|
|
10021
|
-
], 2)], 40, _hoisted_1$
|
|
10071
|
+
], 2)], 40, _hoisted_1$25);
|
|
10022
10072
|
};
|
|
10023
10073
|
}
|
|
10024
10074
|
});
|
|
10025
10075
|
// src/components/load-more/LoadMore.vue?vue&type=script&setup=true&lang.ts
|
|
10026
|
-
var _hoisted_1$
|
|
10027
|
-
var _hoisted_2$
|
|
10076
|
+
var _hoisted_1$24 = ["data-eldra-scope"];
|
|
10077
|
+
var _hoisted_2$19 = ["id"];
|
|
10028
10078
|
var _hoisted_3$13 = ["aria-describedby", "aria-busy"];
|
|
10029
10079
|
var rootClass$2 = "eldra:flex eldra:flex-col eldra:items-center eldra:gap-3";
|
|
10030
10080
|
/** Spec → Sizes, "Load-more status": "0.875rem, tabular numbers" — the shared `text-body-sm` type
|
|
@@ -10087,7 +10137,7 @@ var LoadMore_default = /* @__PURE__ */ defineComponent({
|
|
|
10087
10137
|
class: normalizeClass(statusClass.value),
|
|
10088
10138
|
role: "status",
|
|
10089
10139
|
"aria-live": "polite"
|
|
10090
|
-
}, toDisplayString(unref(m).showingOf(__props.shown, __props.total, __props.noun)), 11, _hoisted_2$
|
|
10140
|
+
}, toDisplayString(unref(m).showingOf(__props.shown, __props.total, __props.noun)), 11, _hoisted_2$19),
|
|
10091
10141
|
createElementVNode("div", {
|
|
10092
10142
|
class: normalizeClass(meterTrackClass),
|
|
10093
10143
|
"aria-hidden": "true"
|
|
@@ -10107,13 +10157,13 @@ var LoadMore_default = /* @__PURE__ */ defineComponent({
|
|
|
10107
10157
|
key: 0,
|
|
10108
10158
|
class: "eldra:size-4.5"
|
|
10109
10159
|
})) : createCommentVNode("", true), createElementVNode("span", null, toDisplayString(unref(m).loadMore), 1)], 10, _hoisted_3$13)) : createCommentVNode("", true)
|
|
10110
|
-
], 8, _hoisted_1$
|
|
10160
|
+
], 8, _hoisted_1$24);
|
|
10111
10161
|
};
|
|
10112
10162
|
}
|
|
10113
10163
|
});
|
|
10114
10164
|
// src/components/logo-item/LogoItem.vue?vue&type=script&setup=true&lang.ts
|
|
10115
|
-
var _hoisted_1$
|
|
10116
|
-
var _hoisted_2$
|
|
10165
|
+
var _hoisted_1$23 = ["data-eldra-scope", "data-part"];
|
|
10166
|
+
var _hoisted_2$18 = [
|
|
10117
10167
|
"src",
|
|
10118
10168
|
"srcset",
|
|
10119
10169
|
"sizes",
|
|
@@ -10271,7 +10321,7 @@ var LogoItem_default = /* @__PURE__ */ defineComponent({
|
|
|
10271
10321
|
alt: __props.name,
|
|
10272
10322
|
loading: "lazy",
|
|
10273
10323
|
decoding: "async"
|
|
10274
|
-
}, null, 10, _hoisted_2$
|
|
10324
|
+
}, null, 10, _hoisted_2$18)) : (openBlock(), createElementBlock("span", {
|
|
10275
10325
|
key: 1,
|
|
10276
10326
|
"data-part": "wordmark",
|
|
10277
10327
|
class: normalizeClass(wordmarkClass.value)
|
|
@@ -10297,13 +10347,18 @@ var LogoItem_default = /* @__PURE__ */ defineComponent({
|
|
|
10297
10347
|
key: 1,
|
|
10298
10348
|
"data-part": "wordmark",
|
|
10299
10349
|
class: normalizeClass(wordmarkClass.value)
|
|
10300
|
-
}, toDisplayString(__props.name), 3))], 64))], 10, _hoisted_1$
|
|
10350
|
+
}, toDisplayString(__props.name), 3))], 64))], 10, _hoisted_1$23);
|
|
10301
10351
|
};
|
|
10302
10352
|
}
|
|
10303
10353
|
});
|
|
10304
10354
|
// src/components/nav-menu/navLinks.ts
|
|
10305
10355
|
/** How the page the visitor is on is marked, on every kind of link the menu draws. */
|
|
10306
10356
|
var CURRENT_PAGE = "eldra:aria-[current=page]:underline eldra:aria-[current=page]:decoration-2 eldra:aria-[current=page]:underline-offset-[0.2em]";
|
|
10357
|
+
/** The `aria-current` value an entry's `current` stands for, or `undefined` for no mark. */
|
|
10358
|
+
function currentMark(current) {
|
|
10359
|
+
if (current === "true") return "true";
|
|
10360
|
+
return current === true || current === "page" ? "page" : void 0;
|
|
10361
|
+
}
|
|
10307
10362
|
/** Whether an entry has visible text to render. */
|
|
10308
10363
|
function isRenderableLink(link) {
|
|
10309
10364
|
return typeof link.label === "string" && link.label.trim() !== "";
|
|
@@ -10375,7 +10430,16 @@ function panelLayout(item) {
|
|
|
10375
10430
|
}
|
|
10376
10431
|
/** Whether the item, or an entry in its panel, is the page the visitor is on. */
|
|
10377
10432
|
function containsCurrent(item) {
|
|
10378
|
-
return item.current
|
|
10433
|
+
return currentMark(item.current) !== void 0 || panelLinks(item).some((link) => currentMark(link.current) !== void 0) || itemSections(item).some((section) => currentMark(section.headingLink?.current) !== void 0 || currentMark(section.seeAll?.current) !== void 0) || (item.groups ?? []).some((group) => group.current === true);
|
|
10434
|
+
}
|
|
10435
|
+
/**
|
|
10436
|
+
* The one top-level entry the bar marks as holding the current page, or `null`. A page can sit in
|
|
10437
|
+
* more than one entry — "Ceramics" as its own entry and again inside "Shop" — and marking both
|
|
10438
|
+
* reads as two places at once. The entry whose own link is the page wins; failing that, the first
|
|
10439
|
+
* entry that holds it in its panel (WS-1277).
|
|
10440
|
+
*/
|
|
10441
|
+
function currentEntry(items) {
|
|
10442
|
+
return items.find((item) => currentMark(item.current) === "page") ?? items.find(containsCurrent) ?? null;
|
|
10379
10443
|
}
|
|
10380
10444
|
/** Whether an entry goes somewhere; one without a destination renders as plain text. */
|
|
10381
10445
|
function hasHref(link) {
|
|
@@ -10393,7 +10457,8 @@ function navLinkAttrs(link, linkAs) {
|
|
|
10393
10457
|
attrs.target = "_blank";
|
|
10394
10458
|
attrs.rel = "noopener noreferrer";
|
|
10395
10459
|
}
|
|
10396
|
-
|
|
10460
|
+
const mark = currentMark(link.current);
|
|
10461
|
+
if (mark !== void 0) attrs["aria-current"] = mark;
|
|
10397
10462
|
return attrs;
|
|
10398
10463
|
}
|
|
10399
10464
|
/** Whether an entry is drawn as a card: it asks for one and its picture and title resolved. */
|
|
@@ -10408,12 +10473,12 @@ function cardAspectRatio(aspect) {
|
|
|
10408
10473
|
return `${width} / ${height}`;
|
|
10409
10474
|
}
|
|
10410
10475
|
// src/components/nav-menu/NavMenuPanel.vue?vue&type=script&setup=true&lang.ts
|
|
10411
|
-
var _hoisted_1$
|
|
10476
|
+
var _hoisted_1$22 = [
|
|
10412
10477
|
"data-eldra-scope",
|
|
10413
10478
|
"data-part",
|
|
10414
10479
|
"data-cards"
|
|
10415
10480
|
];
|
|
10416
|
-
var _hoisted_2$
|
|
10481
|
+
var _hoisted_2$17 = ["data-part", "data-cards"];
|
|
10417
10482
|
var _hoisted_3$11 = [
|
|
10418
10483
|
"data-eldra-slot",
|
|
10419
10484
|
"id",
|
|
@@ -10425,9 +10490,9 @@ var _hoisted_6$3 = ["data-part"];
|
|
|
10425
10490
|
var _hoisted_7$2 = ["src", "data-part"];
|
|
10426
10491
|
var _hoisted_8$2 = { class: "eldra:flex eldra:flex-col eldra:gap-0.5" };
|
|
10427
10492
|
var _hoisted_9$2 = ["data-part"];
|
|
10428
|
-
var _hoisted_10$
|
|
10429
|
-
var _hoisted_11$1 = ["data-part"];
|
|
10430
|
-
var _hoisted_12$1 = ["data-part"];
|
|
10493
|
+
var _hoisted_10$2 = ["data-part"];
|
|
10494
|
+
var _hoisted_11$1 = ["id", "data-part"];
|
|
10495
|
+
var _hoisted_12$1 = ["id", "data-part"];
|
|
10431
10496
|
// src/components/nav-menu/NavMenuPanel.vue
|
|
10432
10497
|
var NavMenuPanel_default = /* @__PURE__ */ defineComponent({
|
|
10433
10498
|
__name: "NavMenuPanel",
|
|
@@ -10450,9 +10515,11 @@ var NavMenuPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
10450
10515
|
setup(__props) {
|
|
10451
10516
|
const eldra = useEldraScope();
|
|
10452
10517
|
const props = __props;
|
|
10518
|
+
const slots = useSlots();
|
|
10453
10519
|
const locale = useEldraUiLocale();
|
|
10454
10520
|
const currency = useEldraUiCurrency();
|
|
10455
|
-
|
|
10521
|
+
/** The crop rides on a variable the picture's own class reads, so a theme's class can still replace it. */
|
|
10522
|
+
const aspectStyle = computed(() => ({ "--eldra-nav-menu-card-aspect": cardAspectRatio(props.cardAspect) }));
|
|
10456
10523
|
/** A card's price in the store currency, or a plain number when the store has none the runtime knows. */
|
|
10457
10524
|
function priceText(amount) {
|
|
10458
10525
|
const code = currency.value;
|
|
@@ -10535,12 +10602,31 @@ var NavMenuPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
10535
10602
|
], "panelLink");
|
|
10536
10603
|
}
|
|
10537
10604
|
const cardClass = computed(() => panelPartClass("eldra:flex eldra:min-w-0 eldra:flex-col eldra:gap-2", "card"));
|
|
10538
|
-
const cardImageClass = computed(() => panelPartClass("eldra:block eldra:w-full eldra:rounded-md eldra:bg-surface eldra:object-cover", "cardImage"));
|
|
10605
|
+
const cardImageClass = computed(() => panelPartClass("eldra:block eldra:w-full eldra:rounded-md eldra:bg-surface eldra:object-cover eldra:aspect-(--eldra-nav-menu-card-aspect)", "cardImage"));
|
|
10539
10606
|
const cardTitleClass = computed(() => panelPartClass("eldra:text-body-sm eldra:font-medium eldra:text-text", "cardTitle"));
|
|
10540
10607
|
const cardPriceClass = computed(() => panelPartClass("eldra:text-body-sm eldra:text-muted", "cardPrice"));
|
|
10541
10608
|
const panelLabelClass = computed(() => panelPartClass("eldra:flex eldra:flex-wrap eldra:items-center eldra:gap-x-2 eldra:gap-y-1 eldra:text-body eldra:font-medium", "panelLabel"));
|
|
10542
10609
|
const descriptionClass = computed(() => panelPartClass("eldra:text-body-sm eldra:text-muted", "description"));
|
|
10543
10610
|
const badgeClass = computed(() => props.classes?.[part("badge")]);
|
|
10611
|
+
/**
|
|
10612
|
+
* A linked entry with a description is named by its label alone (and the hidden "opens in a new tab"
|
|
10613
|
+
* text) and described by the description, so a screen reader reads the title as the name. The ids are
|
|
10614
|
+
* only set when the default entry is drawn: the `panelItem` slot replaces the label and description.
|
|
10615
|
+
*/
|
|
10616
|
+
function describes(link) {
|
|
10617
|
+
return !slots.panelItem && !isCard(link) && !!link.description && hasHref(link);
|
|
10618
|
+
}
|
|
10619
|
+
function entryId(kind, index, at) {
|
|
10620
|
+
return `${props.idPrefix}-${kind}-${index}-${at}`;
|
|
10621
|
+
}
|
|
10622
|
+
function entryA11y(link, index, at) {
|
|
10623
|
+
if (!describes(link)) return {};
|
|
10624
|
+
const label = entryId("label", index, at);
|
|
10625
|
+
return {
|
|
10626
|
+
"aria-labelledby": link.newTab ? `${label} ${entryId("new", index, at)}` : label,
|
|
10627
|
+
"aria-describedby": entryId("desc", index, at)
|
|
10628
|
+
};
|
|
10629
|
+
}
|
|
10544
10630
|
function listLabel(group, index) {
|
|
10545
10631
|
return group !== null ? headingId(index) : props.labelledBy;
|
|
10546
10632
|
}
|
|
@@ -10608,7 +10694,10 @@ var NavMenuPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
10608
10694
|
"data-part": part("panelLink"),
|
|
10609
10695
|
"data-see-all": link === group.seeAll ? "" : void 0,
|
|
10610
10696
|
class: panelLinkClass(link, group)
|
|
10611
|
-
}, { ref_for: true },
|
|
10697
|
+
}, { ref_for: true }, {
|
|
10698
|
+
...unref(navLinkAttrs)(link, __props.linkAs),
|
|
10699
|
+
...entryA11y(link, index, at)
|
|
10700
|
+
}), {
|
|
10612
10701
|
default: withCtx(() => [renderSlot(_ctx.$slots, "panelItem", {
|
|
10613
10702
|
link,
|
|
10614
10703
|
item: __props.item,
|
|
@@ -10633,8 +10722,9 @@ var NavMenuPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
10633
10722
|
key: 0,
|
|
10634
10723
|
"data-part": part("cardPrice"),
|
|
10635
10724
|
class: normalizeClass(cardPriceClass.value)
|
|
10636
|
-
}, toDisplayString(priceText(link.card.price)), 11, _hoisted_10$
|
|
10725
|
+
}, toDisplayString(priceText(link.card.price)), 11, _hoisted_10$2)) : createCommentVNode("", true)])], 10, _hoisted_6$3)) : (openBlock(), createElementBlock("span", {
|
|
10637
10726
|
key: 1,
|
|
10727
|
+
id: describes(link) ? entryId("label", index, at) : void 0,
|
|
10638
10728
|
"data-part": part("panelLabel"),
|
|
10639
10729
|
class: normalizeClass(panelLabelClass.value)
|
|
10640
10730
|
}, [createTextVNode(toDisplayString(link.label) + " ", 1), link.badge ? (openBlock(), createBlock(Badge_default, {
|
|
@@ -10643,12 +10733,16 @@ var NavMenuPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
10643
10733
|
class: normalizeClass(badgeClass.value)
|
|
10644
10734
|
}, null, 8, ["label", "class"])) : createCommentVNode("", true)], 10, _hoisted_11$1)), link.description && !unref(isCard)(link) ? (openBlock(), createElementBlock("span", {
|
|
10645
10735
|
key: 2,
|
|
10736
|
+
id: describes(link) ? entryId("desc", index, at) : void 0,
|
|
10646
10737
|
"data-part": part("description"),
|
|
10647
10738
|
class: normalizeClass(descriptionClass.value)
|
|
10648
|
-
}, toDisplayString(link.description), 11, _hoisted_12$1)) : createCommentVNode("", true)]), link.newTab && unref(hasHref)(link) ? (openBlock(), createBlock(VisuallyHidden_default, {
|
|
10739
|
+
}, toDisplayString(link.description), 11, _hoisted_12$1)) : createCommentVNode("", true)]), link.newTab && unref(hasHref)(link) ? (openBlock(), createBlock(VisuallyHidden_default, {
|
|
10740
|
+
key: 0,
|
|
10741
|
+
id: describes(link) ? entryId("new", index, at) : void 0
|
|
10742
|
+
}, {
|
|
10649
10743
|
default: withCtx(() => [createTextVNode(toDisplayString(__props.messages.opensInNewTab), 1)]),
|
|
10650
10744
|
_: 1
|
|
10651
|
-
})) : createCommentVNode("", true)]),
|
|
10745
|
+
}, 8, ["id"])) : createCommentVNode("", true)]),
|
|
10652
10746
|
_: 2
|
|
10653
10747
|
}, 1040, [
|
|
10654
10748
|
"data-eldra-slot",
|
|
@@ -10656,8 +10750,188 @@ var NavMenuPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
10656
10750
|
"data-see-all",
|
|
10657
10751
|
"class"
|
|
10658
10752
|
]))], 10, _hoisted_5$5);
|
|
10659
|
-
}), 128))], 10, _hoisted_4$8)], 10, _hoisted_2$
|
|
10660
|
-
}), 128))], 10, _hoisted_1$
|
|
10753
|
+
}), 128))], 10, _hoisted_4$8)], 10, _hoisted_2$17);
|
|
10754
|
+
}), 128))], 10, _hoisted_1$22)], 64);
|
|
10755
|
+
};
|
|
10756
|
+
}
|
|
10757
|
+
});
|
|
10758
|
+
// src/components/nav-menu/NavMenuDrawerList.vue?vue&type=script&setup=true&lang.ts
|
|
10759
|
+
var _hoisted_1$21 = ["data-eldra-scope", "aria-label"];
|
|
10760
|
+
var _hoisted_2$16 = ["data-eldra-scope"];
|
|
10761
|
+
/**
|
|
10762
|
+
* The drawer's list of entries, the same in the modal sheet and the inline drawer: a plain link, an
|
|
10763
|
+
* accordion row that opens its panel, or (`sections`) a heading row with its panel listed open.
|
|
10764
|
+
*/
|
|
10765
|
+
var DRAWER_ROW = "eldra:eldra-nav-menu-drawer-row";
|
|
10766
|
+
// src/components/nav-menu/NavMenuDrawerList.vue
|
|
10767
|
+
var NavMenuDrawerList_default = /* @__PURE__ */ defineComponent({
|
|
10768
|
+
__name: "NavMenuDrawerList",
|
|
10769
|
+
props: {
|
|
10770
|
+
entries: {},
|
|
10771
|
+
layout: {},
|
|
10772
|
+
panelId: { type: Function },
|
|
10773
|
+
navLabel: {},
|
|
10774
|
+
variant: {},
|
|
10775
|
+
messages: {},
|
|
10776
|
+
linkAs: { type: [
|
|
10777
|
+
String,
|
|
10778
|
+
Object,
|
|
10779
|
+
Function
|
|
10780
|
+
] },
|
|
10781
|
+
cardAspect: {},
|
|
10782
|
+
classes: {}
|
|
10783
|
+
},
|
|
10784
|
+
emits: ["follow"],
|
|
10785
|
+
setup(__props, { emit: __emit }) {
|
|
10786
|
+
const props = __props;
|
|
10787
|
+
const emit = __emit;
|
|
10788
|
+
const slots = useSlots();
|
|
10789
|
+
const eldra = useEldraScope();
|
|
10790
|
+
const sections = computed(() => props.layout === "sections");
|
|
10791
|
+
function onClick(event) {
|
|
10792
|
+
if (event.target?.closest("a") != null) emit("follow");
|
|
10793
|
+
}
|
|
10794
|
+
const listClass = computed(() => ["eldra:flex eldra:flex-col", props.classes?.drawerList]);
|
|
10795
|
+
function toneClass(item) {
|
|
10796
|
+
return item.tone === "accent" ? "eldra:text-accent" : "eldra:text-text";
|
|
10797
|
+
}
|
|
10798
|
+
function itemClass(item) {
|
|
10799
|
+
if (!hasPanel(item)) return ["eldra:border-b eldra:border-border", props.classes?.drawerItem];
|
|
10800
|
+
return [sections.value ? "eldra:flex eldra:flex-col eldra:border-b eldra:border-border eldra:pb-4" : "", props.classes?.drawerItem];
|
|
10801
|
+
}
|
|
10802
|
+
function sectionHeadingClass(item) {
|
|
10803
|
+
return [[
|
|
10804
|
+
DRAWER_ROW,
|
|
10805
|
+
"eldra:flex eldra:w-full eldra:items-center eldra:rounded-sm eldra:py-4 eldra:text-accordion-title",
|
|
10806
|
+
toneClass(item),
|
|
10807
|
+
hasHref(item) && ["eldra:eldra-focus", "eldra:aria-[current=page]:underline eldra:aria-[current=page]:decoration-2 eldra:aria-[current=page]:underline-offset-[0.2em]"]
|
|
10808
|
+
], props.classes?.drawerSectionHeading];
|
|
10809
|
+
}
|
|
10810
|
+
function linkClass(item) {
|
|
10811
|
+
return [[
|
|
10812
|
+
DRAWER_ROW,
|
|
10813
|
+
"eldra:flex eldra:w-full eldra:items-center eldra:rounded-sm eldra:py-4",
|
|
10814
|
+
"eldra:text-accordion-title eldra:eldra-focus",
|
|
10815
|
+
toneClass(item),
|
|
10816
|
+
CURRENT_PAGE
|
|
10817
|
+
], props.classes?.drawerLink];
|
|
10818
|
+
}
|
|
10819
|
+
const nestClass = computed(() => ["eldra:flex eldra:flex-col eldra:ms-1 eldra:border-s eldra:border-border eldra:eldra-nav-menu-drawer-nest", props.classes?.drawerNest]);
|
|
10820
|
+
const accordionClasses = computed(() => ({
|
|
10821
|
+
summary: normalizeClass([DRAWER_ROW, props.classes?.drawerTrigger]),
|
|
10822
|
+
panel: normalizeClass(["eldra:max-w-none eldra:pb-4 eldra:text-text", props.classes?.drawerPanel])
|
|
10823
|
+
}));
|
|
10824
|
+
return (_ctx, _cache) => {
|
|
10825
|
+
return __props.entries.length > 0 ? (openBlock(), createElementBlock("nav", {
|
|
10826
|
+
key: 0,
|
|
10827
|
+
"data-eldra-ui": "",
|
|
10828
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
10829
|
+
"aria-label": __props.navLabel,
|
|
10830
|
+
onClick
|
|
10831
|
+
}, [createElementVNode("ul", {
|
|
10832
|
+
"data-part": "drawerList",
|
|
10833
|
+
class: normalizeClass(listClass.value)
|
|
10834
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.entries, ({ item, index }) => {
|
|
10835
|
+
return openBlock(), createElementBlock("li", {
|
|
10836
|
+
key: index,
|
|
10837
|
+
"data-part": "drawerItem",
|
|
10838
|
+
class: normalizeClass(itemClass(item))
|
|
10839
|
+
}, [unref(hasPanel)(item) && sections.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [(openBlock(), createBlock(resolveDynamicComponent(unref(navLinkTag)(item, __props.linkAs)), mergeProps({
|
|
10840
|
+
id: `${__props.panelId(index)}-drawer-heading`,
|
|
10841
|
+
"data-part": "drawerSectionHeading",
|
|
10842
|
+
"data-tone": item.tone,
|
|
10843
|
+
class: sectionHeadingClass(item)
|
|
10844
|
+
}, { ref_for: true }, unref(navLinkAttrs)(item, __props.linkAs)), {
|
|
10845
|
+
default: withCtx(() => [createTextVNode(toDisplayString(item.label) + " ", 1), item.newTab && unref(hasHref)(item) ? (openBlock(), createBlock(VisuallyHidden_default, { key: 0 }, {
|
|
10846
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.messages.opensInNewTab), 1)]),
|
|
10847
|
+
_: 1
|
|
10848
|
+
})) : createCommentVNode("", true)]),
|
|
10849
|
+
_: 2
|
|
10850
|
+
}, 1040, [
|
|
10851
|
+
"id",
|
|
10852
|
+
"data-tone",
|
|
10853
|
+
"class"
|
|
10854
|
+
])), createElementVNode("div", {
|
|
10855
|
+
"data-part": "drawerNest",
|
|
10856
|
+
class: normalizeClass(nestClass.value)
|
|
10857
|
+
}, [createVNode(NavMenuPanel_default, {
|
|
10858
|
+
item,
|
|
10859
|
+
"id-prefix": `${__props.panelId(index)}-drawer`,
|
|
10860
|
+
placement: "drawer",
|
|
10861
|
+
variant: __props.variant,
|
|
10862
|
+
messages: __props.messages,
|
|
10863
|
+
"link-as": __props.linkAs,
|
|
10864
|
+
"card-aspect": __props.cardAspect,
|
|
10865
|
+
classes: __props.classes,
|
|
10866
|
+
"labelled-by": `${__props.panelId(index)}-drawer-heading`,
|
|
10867
|
+
"omit-overview": unref(hasHref)(item)
|
|
10868
|
+
}, createSlots({ _: 2 }, [unref(slots).panelItem ? {
|
|
10869
|
+
name: "panelItem",
|
|
10870
|
+
fn: withCtx((scope) => [renderSlot(_ctx.$slots, "panelItem", mergeProps({ ref_for: true }, scope))]),
|
|
10871
|
+
key: "0"
|
|
10872
|
+
} : void 0, unref(slots).groupHeading ? {
|
|
10873
|
+
name: "groupHeading",
|
|
10874
|
+
fn: withCtx((scope) => [renderSlot(_ctx.$slots, "groupHeading", mergeProps({ ref_for: true }, scope))]),
|
|
10875
|
+
key: "1"
|
|
10876
|
+
} : void 0]), 1032, [
|
|
10877
|
+
"item",
|
|
10878
|
+
"id-prefix",
|
|
10879
|
+
"variant",
|
|
10880
|
+
"messages",
|
|
10881
|
+
"link-as",
|
|
10882
|
+
"card-aspect",
|
|
10883
|
+
"classes",
|
|
10884
|
+
"labelled-by",
|
|
10885
|
+
"omit-overview"
|
|
10886
|
+
])], 2)], 64)) : unref(hasPanel)(item) ? (openBlock(), createBlock(AccordionItem_default, {
|
|
10887
|
+
key: 1,
|
|
10888
|
+
title: item.label ?? "",
|
|
10889
|
+
classes: accordionClasses.value
|
|
10890
|
+
}, {
|
|
10891
|
+
default: withCtx(() => [createElementVNode("div", {
|
|
10892
|
+
"data-eldra-scope": unref(eldra).scope,
|
|
10893
|
+
"data-part": "drawerNest",
|
|
10894
|
+
class: normalizeClass(nestClass.value)
|
|
10895
|
+
}, [createVNode(NavMenuPanel_default, {
|
|
10896
|
+
item,
|
|
10897
|
+
"id-prefix": `${__props.panelId(index)}-drawer`,
|
|
10898
|
+
placement: "drawer",
|
|
10899
|
+
variant: __props.variant,
|
|
10900
|
+
messages: __props.messages,
|
|
10901
|
+
"link-as": __props.linkAs,
|
|
10902
|
+
"card-aspect": __props.cardAspect,
|
|
10903
|
+
classes: __props.classes
|
|
10904
|
+
}, createSlots({ _: 2 }, [unref(slots).panelItem ? {
|
|
10905
|
+
name: "panelItem",
|
|
10906
|
+
fn: withCtx((scope) => [renderSlot(_ctx.$slots, "panelItem", mergeProps({ ref_for: true }, scope))]),
|
|
10907
|
+
key: "0"
|
|
10908
|
+
} : void 0, unref(slots).groupHeading ? {
|
|
10909
|
+
name: "groupHeading",
|
|
10910
|
+
fn: withCtx((scope) => [renderSlot(_ctx.$slots, "groupHeading", mergeProps({ ref_for: true }, scope))]),
|
|
10911
|
+
key: "1"
|
|
10912
|
+
} : void 0]), 1032, [
|
|
10913
|
+
"item",
|
|
10914
|
+
"id-prefix",
|
|
10915
|
+
"variant",
|
|
10916
|
+
"messages",
|
|
10917
|
+
"link-as",
|
|
10918
|
+
"card-aspect",
|
|
10919
|
+
"classes"
|
|
10920
|
+
])], 10, _hoisted_2$16)]),
|
|
10921
|
+
_: 2
|
|
10922
|
+
}, 1032, ["title", "classes"])) : (openBlock(), createBlock(resolveDynamicComponent(unref(navLinkTag)(item, __props.linkAs)), mergeProps({
|
|
10923
|
+
key: 2,
|
|
10924
|
+
"data-part": "drawerLink",
|
|
10925
|
+
"data-tone": item.tone,
|
|
10926
|
+
class: linkClass(item)
|
|
10927
|
+
}, { ref_for: true }, unref(navLinkAttrs)(item, __props.linkAs)), {
|
|
10928
|
+
default: withCtx(() => [createTextVNode(toDisplayString(item.label) + " ", 1), item.newTab && unref(hasHref)(item) ? (openBlock(), createBlock(VisuallyHidden_default, { key: 0 }, {
|
|
10929
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.messages.opensInNewTab), 1)]),
|
|
10930
|
+
_: 1
|
|
10931
|
+
})) : createCommentVNode("", true)]),
|
|
10932
|
+
_: 2
|
|
10933
|
+
}, 1040, ["data-tone", "class"]))], 2);
|
|
10934
|
+
}), 128))], 2)], 8, _hoisted_1$21)) : createCommentVNode("", true);
|
|
10661
10935
|
};
|
|
10662
10936
|
}
|
|
10663
10937
|
});
|
|
@@ -10777,29 +11051,32 @@ function useNavMenuKeys(options) {
|
|
|
10777
11051
|
var _hoisted_1$20 = ["data-eldra-scope"];
|
|
10778
11052
|
var _hoisted_2$15 = ["aria-label"];
|
|
10779
11053
|
var _hoisted_3$10 = [
|
|
11054
|
+
"data-tone",
|
|
10780
11055
|
"aria-expanded",
|
|
10781
11056
|
"aria-controls",
|
|
10782
11057
|
"data-current",
|
|
11058
|
+
"aria-current",
|
|
10783
11059
|
"onClick",
|
|
10784
11060
|
"onPointerenter"
|
|
10785
11061
|
];
|
|
10786
11062
|
var _hoisted_4$7 = ["data-eldra-slot"];
|
|
10787
|
-
var _hoisted_5$4 = ["id"];
|
|
10788
|
-
var _hoisted_6$2 = ["data-
|
|
10789
|
-
var _hoisted_7$1 = [
|
|
11063
|
+
var _hoisted_5$4 = ["id", "data-layout"];
|
|
11064
|
+
var _hoisted_6$2 = ["data-layout"];
|
|
11065
|
+
var _hoisted_7$1 = ["data-eldra-slot"];
|
|
11066
|
+
var _hoisted_8$1 = [
|
|
10790
11067
|
"data-eldra-slot",
|
|
10791
11068
|
"aria-label",
|
|
11069
|
+
"aria-haspopup",
|
|
10792
11070
|
"aria-expanded",
|
|
10793
11071
|
"aria-controls"
|
|
10794
11072
|
];
|
|
10795
|
-
var
|
|
10796
|
-
var
|
|
11073
|
+
var _hoisted_9$1 = ["id"];
|
|
11074
|
+
var _hoisted_10$1 = ["data-eldra-slot"];
|
|
10797
11075
|
var HOVER_INTENT_MS = 150;
|
|
10798
11076
|
var HOVER_FILL = "eldra:hover:bg-[color-mix(in_oklab,var(--eldra-color-text),transparent_94%)]";
|
|
10799
11077
|
/** A top-level entry's colours at rest, hovered, open (`aria-expanded`) and current. */
|
|
10800
11078
|
var ROOT = "eldra:relative eldra:flex eldra:items-center";
|
|
10801
11079
|
var TOP_LEVEL = "eldra:inline-flex eldra:min-h-10 eldra:cursor-pointer eldra:items-center eldra:gap-1 eldra:rounded-md eldra:px-3 eldra:text-body eldra:font-medium eldra:eldra-focus";
|
|
10802
|
-
var DRAWER_ROW = "eldra:eldra-nav-menu-drawer-row";
|
|
10803
11080
|
// src/components/nav-menu/NavMenu.vue
|
|
10804
11081
|
var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
10805
11082
|
__name: "NavMenu",
|
|
@@ -10815,6 +11092,7 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
10815
11092
|
collapseBelow: { default: "lg" },
|
|
10816
11093
|
drawerSide: { default: "left" },
|
|
10817
11094
|
drawerLayout: { default: "accordion" },
|
|
11095
|
+
drawerMode: { default: "sheet" },
|
|
10818
11096
|
drawerItems: { default: void 0 },
|
|
10819
11097
|
openOnHover: {
|
|
10820
11098
|
type: Boolean,
|
|
@@ -10852,6 +11130,8 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
10852
11130
|
})).filter((entry) => isRenderableLink(entry.item));
|
|
10853
11131
|
}
|
|
10854
11132
|
const entries = computed(() => renderableEntries(props.items));
|
|
11133
|
+
/** The single top-level entry marked as holding the current page (`currentEntry`). */
|
|
11134
|
+
const markedEntry = computed(() => currentEntry(entries.value.map(({ item }) => item)));
|
|
10855
11135
|
const drawerEntries = computed(() => renderableEntries(props.drawerItems ?? props.items));
|
|
10856
11136
|
function panelId(index) {
|
|
10857
11137
|
return `${baseId.value}-panel-${index}`;
|
|
@@ -10941,22 +11221,56 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
10941
11221
|
function closeDrawer() {
|
|
10942
11222
|
if (drawerOpen.value) drawerOpen.value = false;
|
|
10943
11223
|
}
|
|
11224
|
+
const inline = computed(() => props.drawerMode === "inline");
|
|
10944
11225
|
const toggleEl = ref(null);
|
|
10945
|
-
|
|
10946
|
-
|
|
11226
|
+
const inlineEl = ref(null);
|
|
11227
|
+
/**
|
|
11228
|
+
* Where the inline drawer's top edge sits in the window, so it can fill the rest of it and scroll
|
|
11229
|
+
* on its own: measured when it opens and on every resize while it is open.
|
|
11230
|
+
*/
|
|
11231
|
+
const inlineTop = ref(0);
|
|
11232
|
+
function measureInline() {
|
|
11233
|
+
const el = inlineEl.value;
|
|
11234
|
+
if (!el) return;
|
|
11235
|
+
const parent = el.offsetParent;
|
|
11236
|
+
const top = parent instanceof Element === false ? el.getBoundingClientRect().top : parent.getBoundingClientRect().top + parent.clientTop + el.offsetTop;
|
|
11237
|
+
inlineTop.value = Math.max(0, top);
|
|
11238
|
+
}
|
|
11239
|
+
function onResizeWhileOpen() {
|
|
11240
|
+
if (toggleEl.value && getComputedStyle(toggleEl.value).display === "none") {
|
|
11241
|
+
closeDrawer();
|
|
11242
|
+
return;
|
|
11243
|
+
}
|
|
11244
|
+
if (inline.value) measureInline();
|
|
10947
11245
|
}
|
|
10948
11246
|
watch(drawerOpen, (open) => {
|
|
10949
11247
|
if (typeof window === "undefined") return;
|
|
10950
|
-
if (open)
|
|
10951
|
-
|
|
11248
|
+
if (open) {
|
|
11249
|
+
window.addEventListener("resize", onResizeWhileOpen);
|
|
11250
|
+
if (inline.value) nextTick(measureInline);
|
|
11251
|
+
} else window.removeEventListener("resize", onResizeWhileOpen);
|
|
10952
11252
|
}, { immediate: true });
|
|
10953
11253
|
onBeforeUnmount(() => {
|
|
10954
11254
|
clearHoverTimers();
|
|
10955
|
-
window.removeEventListener("resize",
|
|
11255
|
+
window.removeEventListener("resize", onResizeWhileOpen);
|
|
11256
|
+
});
|
|
11257
|
+
/**
|
|
11258
|
+
* The inline drawer is a disclosure, not a dialog: no focus trap and no inert page. It closes the
|
|
11259
|
+
* way the bar's panels do — `Escape` (focus back on the menu button), a press outside it, or focus
|
|
11260
|
+
* leaving it — so focus can never walk on into the page it covers.
|
|
11261
|
+
*/
|
|
11262
|
+
useOverlay({
|
|
11263
|
+
open: computed(() => inline.value && drawerOpen.value),
|
|
11264
|
+
trigger: toggleEl,
|
|
11265
|
+
content: inlineEl,
|
|
11266
|
+
setOpen: (next) => {
|
|
11267
|
+
if (!next) closeDrawer();
|
|
11268
|
+
}
|
|
10956
11269
|
});
|
|
10957
|
-
function
|
|
10958
|
-
|
|
11270
|
+
function onToggleClick() {
|
|
11271
|
+
drawerOpen.value = inline.value ? !drawerOpen.value : true;
|
|
10959
11272
|
}
|
|
11273
|
+
const toggleLabel = computed(() => inline.value && drawerOpen.value ? m.value.close : m.value.navMenuOpen);
|
|
10960
11274
|
/** Closes the open panel and the drawer, for a router's navigation hook. */
|
|
10961
11275
|
function close() {
|
|
10962
11276
|
closePanel();
|
|
@@ -10989,25 +11303,52 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
10989
11303
|
leaveActiveClass: "eldra:pointer-events-none eldra:transition-opacity eldra:duration-fast eldra:ease-in",
|
|
10990
11304
|
leaveToClass: "eldra:opacity-0"
|
|
10991
11305
|
};
|
|
11306
|
+
/**
|
|
11307
|
+
* The inline drawer opens as the bar's panels do: its top third shows at once and the rest unrolls
|
|
11308
|
+
* as it fades in and drops 0.25rem into place; it closes the same way back, a little faster. Its
|
|
11309
|
+
* resting state is fully shown, so only the hidden end carries classes: a class for the shown end as
|
|
11310
|
+
* well would sit beside the hidden one for a frame, and whichever the stylesheet orders last would
|
|
11311
|
+
* win. The durations are tokens, which the reduced-motion rule zeroes.
|
|
11312
|
+
*/
|
|
11313
|
+
const INLINE_TRANSITION = {
|
|
11314
|
+
enterFromClass: "eldra:opacity-0 eldra:-translate-y-1 eldra:[clip-path:inset(0_0_65%_0)]",
|
|
11315
|
+
enterActiveClass: "eldra:transition-[opacity,translate,clip-path] eldra:duration-base eldra:ease-out",
|
|
11316
|
+
enterToClass: "",
|
|
11317
|
+
leaveFromClass: "",
|
|
11318
|
+
leaveActiveClass: "eldra:pointer-events-none eldra:transition-[opacity,translate,clip-path] eldra:duration-fast eldra:ease-in",
|
|
11319
|
+
leaveToClass: "eldra:opacity-0 eldra:-translate-y-1 eldra:[clip-path:inset(0_0_65%_0)]"
|
|
11320
|
+
};
|
|
10992
11321
|
const ENTRY_VARIANT = {
|
|
10993
11322
|
ghost: "eldra:text-text eldra:hover:bg-[color-mix(in_oklab,var(--eldra-color-text),transparent_94%)] eldra:aria-expanded:bg-[color-mix(in_oklab,var(--eldra-color-text),transparent_94%)]",
|
|
10994
11323
|
muted: "eldra:text-muted eldra:hover:text-text eldra:aria-expanded:text-text eldra:aria-[current=page]:text-text eldra:data-[current]:text-text"
|
|
10995
11324
|
};
|
|
11325
|
+
/** An entry marked `tone: 'accent'` (a "Sale" link): the accent colour in every state. */
|
|
11326
|
+
const ENTRY_ACCENT = {
|
|
11327
|
+
ghost: "eldra:text-accent eldra:hover:bg-[color-mix(in_oklab,var(--eldra-color-text),transparent_94%)] eldra:aria-expanded:bg-[color-mix(in_oklab,var(--eldra-color-text),transparent_94%)]",
|
|
11328
|
+
muted: "eldra:text-accent"
|
|
11329
|
+
};
|
|
11330
|
+
function entryColours(item) {
|
|
11331
|
+
return (item.tone === "accent" ? ENTRY_ACCENT : ENTRY_VARIANT)[props.variant];
|
|
11332
|
+
}
|
|
10996
11333
|
const navClass = computed(() => [props.collapseBelow === "always" ? "" : BAR_DISPLAY[props.collapseBelow], props.classes?.nav]);
|
|
10997
11334
|
const listClass = computed(() => ["eldra:flex eldra:flex-wrap eldra:items-center eldra:gap-1", props.classes?.list]);
|
|
10998
11335
|
function itemClass(item) {
|
|
10999
11336
|
return [hasPanel(item) && panelLayout(item) === "dropdown" ? "eldra:relative" : "", props.classes?.item];
|
|
11000
11337
|
}
|
|
11001
|
-
|
|
11002
|
-
|
|
11003
|
-
|
|
11004
|
-
|
|
11005
|
-
|
|
11006
|
-
|
|
11007
|
-
|
|
11008
|
-
|
|
11009
|
-
|
|
11010
|
-
|
|
11338
|
+
function linkClass(item) {
|
|
11339
|
+
return [[
|
|
11340
|
+
TOP_LEVEL,
|
|
11341
|
+
entryColours(item),
|
|
11342
|
+
CURRENT_PAGE
|
|
11343
|
+
], props.classes?.link];
|
|
11344
|
+
}
|
|
11345
|
+
function triggerClass(item) {
|
|
11346
|
+
return [[
|
|
11347
|
+
TOP_LEVEL,
|
|
11348
|
+
entryColours(item),
|
|
11349
|
+
"eldra:data-[current]:underline eldra:data-[current]:decoration-2 eldra:data-[current]:underline-offset-[0.2em]"
|
|
11350
|
+
], props.classes?.trigger];
|
|
11351
|
+
}
|
|
11011
11352
|
function triggerIconClass(open) {
|
|
11012
11353
|
return [[
|
|
11013
11354
|
"eldra:inline-flex eldra:size-4 eldra:shrink-0 eldra:items-center eldra:justify-center",
|
|
@@ -11019,7 +11360,7 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
11019
11360
|
return [["eldra:absolute eldra:top-full eldra:z-popover eldra:eldra-nav-menu-panel", panelLayout(item) === "mega" ? "eldra:inset-x-0" : "eldra:start-0"], props.classes?.panel];
|
|
11020
11361
|
}
|
|
11021
11362
|
function contentClass(item) {
|
|
11022
|
-
return [["eldra:rounded-lg eldra:border eldra:border-border eldra:bg-background eldra:text-text eldra:shadow-md eldra:animate-eldra-
|
|
11363
|
+
return [["eldra:rounded-lg eldra:border eldra:border-border eldra:bg-background eldra:text-text eldra:shadow-md eldra:animate-eldra-menu-in", panelLayout(item) === "mega" ? "eldra:p-6" : "eldra:eldra-nav-menu-dropdown eldra:p-2"], props.classes?.content];
|
|
11023
11364
|
}
|
|
11024
11365
|
const footerClass = computed(() => ["eldra:mt-4 eldra:flex eldra:flex-wrap eldra:items-center eldra:justify-between eldra:gap-x-8 eldra:gap-y-3 eldra:border-t eldra:border-border eldra:pt-4 eldra:empty:hidden", props.classes?.footer]);
|
|
11025
11366
|
const toggleClass = computed(() => [[
|
|
@@ -11029,6 +11370,25 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
11029
11370
|
props.collapseBelow === "never" ? "" : TOGGLE_DISPLAY[props.collapseBelow]
|
|
11030
11371
|
], props.classes?.toggle]);
|
|
11031
11372
|
const toggleIconClass = computed(() => ["eldra:size-5", props.classes?.toggleIcon]);
|
|
11373
|
+
/**
|
|
11374
|
+
* The inline drawer hangs from the menu's positioning box, as a mega panel does (make the root
|
|
11375
|
+
* `static` to hang it from a whole header), and fills the window below its own top edge.
|
|
11376
|
+
*/
|
|
11377
|
+
const inlineClass = computed(() => [[
|
|
11378
|
+
"eldra:absolute eldra:inset-x-0 eldra:top-full eldra:z-popover eldra:flex eldra:flex-col",
|
|
11379
|
+
"eldra:h-[calc(100dvh-var(--eldra-nav-menu-drawer-top,0px))] eldra:overflow-y-auto eldra:overscroll-contain",
|
|
11380
|
+
"eldra:border-t eldra:border-border eldra:bg-background eldra:text-text",
|
|
11381
|
+
"eldra:[clip-path:inset(0)]"
|
|
11382
|
+
], props.classes?.drawer]);
|
|
11383
|
+
const inlineStyle = computed(() => ({ "--eldra-nav-menu-drawer-top": `${inlineTop.value}px` }));
|
|
11384
|
+
const inlineBodyClass = computed(() => ["eldra:shrink-0", props.classes?.drawerBody]);
|
|
11385
|
+
/**
|
|
11386
|
+
* The foot sits at the bottom of the window when the entries are shorter than it (`mt-auto` in the
|
|
11387
|
+
* drawer's column, which is `100dvh` tall, so it rises with a phone's browser toolbars), and after
|
|
11388
|
+
* the last entry once they are longer. Its bottom padding adds the device's safe area, as the sheet's
|
|
11389
|
+
* footer does.
|
|
11390
|
+
*/
|
|
11391
|
+
const inlineFooterClass = computed(() => ["eldra:mt-auto eldra:flex eldra:shrink-0 eldra:flex-col eldra:gap-3 eldra:bg-surface eldra:px-4 eldra:pt-4 eldra:eldra-drawer-footer-bottom", props.classes?.drawerFooter]);
|
|
11032
11392
|
const drawerClasses = computed(() => ({
|
|
11033
11393
|
panel: props.classes?.drawer,
|
|
11034
11394
|
header: props.classes?.drawerHeader,
|
|
@@ -11036,30 +11396,6 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
11036
11396
|
body: props.classes?.drawerBody,
|
|
11037
11397
|
footer: props.classes?.drawerFooter
|
|
11038
11398
|
}));
|
|
11039
|
-
const sections = computed(() => props.drawerLayout === "sections");
|
|
11040
|
-
const drawerListClass = computed(() => ["eldra:flex eldra:flex-col", props.classes?.drawerList]);
|
|
11041
|
-
function drawerItemClass(item) {
|
|
11042
|
-
if (!hasPanel(item)) return ["eldra:border-b eldra:border-border", props.classes?.drawerItem];
|
|
11043
|
-
return [sections.value ? "eldra:flex eldra:flex-col eldra:border-b eldra:border-border eldra:pb-4" : "", props.classes?.drawerItem];
|
|
11044
|
-
}
|
|
11045
|
-
function drawerSectionHeadingClass(item) {
|
|
11046
|
-
return [[
|
|
11047
|
-
DRAWER_ROW,
|
|
11048
|
-
"eldra:flex eldra:w-full eldra:items-center eldra:rounded-sm eldra:py-4 eldra:text-accordion-title eldra:text-text",
|
|
11049
|
-
hasHref(item) && ["eldra:eldra-focus", "eldra:aria-[current=page]:underline eldra:aria-[current=page]:decoration-2 eldra:aria-[current=page]:underline-offset-[0.2em]"]
|
|
11050
|
-
], props.classes?.drawerSectionHeading];
|
|
11051
|
-
}
|
|
11052
|
-
const drawerLinkClass = computed(() => [[
|
|
11053
|
-
DRAWER_ROW,
|
|
11054
|
-
"eldra:flex eldra:w-full eldra:items-center eldra:rounded-sm eldra:py-4",
|
|
11055
|
-
"eldra:text-accordion-title eldra:text-text eldra:eldra-focus",
|
|
11056
|
-
CURRENT_PAGE
|
|
11057
|
-
], props.classes?.drawerLink]);
|
|
11058
|
-
const drawerNestClass = computed(() => ["eldra:flex eldra:flex-col eldra:ms-1 eldra:border-s eldra:border-border eldra:eldra-nav-menu-drawer-nest", props.classes?.drawerNest]);
|
|
11059
|
-
const accordionClasses = computed(() => ({
|
|
11060
|
-
summary: normalizeClass([DRAWER_ROW, props.classes?.drawerTrigger]),
|
|
11061
|
-
panel: normalizeClass(["eldra:max-w-none eldra:pb-4 eldra:text-text", props.classes?.drawerPanel])
|
|
11062
|
-
}));
|
|
11063
11399
|
return (_ctx, _cache) => {
|
|
11064
11400
|
return openBlock(), createElementBlock("div", {
|
|
11065
11401
|
"data-eldra-ui": "",
|
|
@@ -11089,10 +11425,12 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
11089
11425
|
ref: (el) => triggerEls[index] = elementOf(el),
|
|
11090
11426
|
type: "button",
|
|
11091
11427
|
"data-part": "trigger",
|
|
11092
|
-
|
|
11428
|
+
"data-tone": item.tone,
|
|
11429
|
+
class: normalizeClass(triggerClass(item)),
|
|
11093
11430
|
"aria-expanded": unref(openIndex) === index ? "true" : "false",
|
|
11094
11431
|
"aria-controls": panelId(index),
|
|
11095
|
-
"data-current":
|
|
11432
|
+
"data-current": item === markedEntry.value ? "" : void 0,
|
|
11433
|
+
"aria-current": unref(currentMark)(item.current),
|
|
11096
11434
|
onClick: ($event) => onTriggerClick(index),
|
|
11097
11435
|
onPointerenter: ($event) => onTriggerPointerEnter(index, $event),
|
|
11098
11436
|
onPointerleave: onTriggerPointerLeave
|
|
@@ -11104,7 +11442,7 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
11104
11442
|
}, [renderSlot(_ctx.$slots, "triggerIcon", {
|
|
11105
11443
|
item,
|
|
11106
11444
|
open: unref(openIndex) === index
|
|
11107
|
-
}, () => [_cache[
|
|
11445
|
+
}, () => [_cache[2] || (_cache[2] = createElementVNode("svg", {
|
|
11108
11446
|
class: "eldra:size-full",
|
|
11109
11447
|
viewBox: "0 0 24 24",
|
|
11110
11448
|
fill: "none",
|
|
@@ -11119,10 +11457,12 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
11119
11457
|
ref_for: true,
|
|
11120
11458
|
ref: (el) => panelEls[index] = elementOf(el),
|
|
11121
11459
|
"data-part": "panel",
|
|
11460
|
+
"data-layout": unref(panelLayout)(item),
|
|
11122
11461
|
class: normalizeClass(panelClass(item)),
|
|
11123
11462
|
onClick: onPanelClick
|
|
11124
11463
|
}, [createElementVNode("div", {
|
|
11125
11464
|
"data-part": "content",
|
|
11465
|
+
"data-layout": unref(panelLayout)(item),
|
|
11126
11466
|
class: normalizeClass(contentClass(item))
|
|
11127
11467
|
}, [createVNode(NavMenuPanel_default, {
|
|
11128
11468
|
item,
|
|
@@ -11158,19 +11498,20 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
11158
11498
|
item,
|
|
11159
11499
|
index,
|
|
11160
11500
|
close: closePanel
|
|
11161
|
-
})], 10,
|
|
11501
|
+
})], 10, _hoisted_7$1)) : createCommentVNode("", true)], 10, _hoisted_6$2)], 10, _hoisted_5$4), [[vShow, unref(openIndex) === index]])]),
|
|
11162
11502
|
_: 2
|
|
11163
11503
|
}, 1040)], 64)) : (openBlock(), createBlock(resolveDynamicComponent(unref(navLinkTag)(item, __props.linkAs)), mergeProps({
|
|
11164
11504
|
key: 1,
|
|
11165
11505
|
"data-part": "link",
|
|
11166
|
-
|
|
11506
|
+
"data-tone": item.tone,
|
|
11507
|
+
class: linkClass(item)
|
|
11167
11508
|
}, { ref_for: true }, unref(navLinkAttrs)(item, __props.linkAs)), {
|
|
11168
11509
|
default: withCtx(() => [createTextVNode(toDisplayString(item.label) + " ", 1), item.newTab && unref(hasHref)(item) ? (openBlock(), createBlock(VisuallyHidden_default, { key: 0 }, {
|
|
11169
11510
|
default: withCtx(() => [createTextVNode(toDisplayString(unref(m).opensInNewTab), 1)]),
|
|
11170
11511
|
_: 1
|
|
11171
11512
|
})) : createCommentVNode("", true)]),
|
|
11172
11513
|
_: 2
|
|
11173
|
-
}, 1040, ["class"]))], 2);
|
|
11514
|
+
}, 1040, ["data-tone", "class"]))], 2);
|
|
11174
11515
|
}), 128))], 2)], 42, _hoisted_2$15)) : createCommentVNode("", true), __props.collapseBelow !== "never" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createElementVNode("button", {
|
|
11175
11516
|
ref_key: "toggleEl",
|
|
11176
11517
|
ref: toggleEl,
|
|
@@ -11178,12 +11519,25 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
11178
11519
|
type: "button",
|
|
11179
11520
|
"data-part": "toggle",
|
|
11180
11521
|
class: normalizeClass(toggleClass.value),
|
|
11181
|
-
"aria-label":
|
|
11182
|
-
"aria-haspopup": "dialog",
|
|
11522
|
+
"aria-label": toggleLabel.value,
|
|
11523
|
+
"aria-haspopup": inline.value ? void 0 : "dialog",
|
|
11183
11524
|
"aria-expanded": unref(drawerOpen) ? "true" : "false",
|
|
11184
11525
|
"aria-controls": drawerId.value,
|
|
11185
|
-
onClick:
|
|
11186
|
-
}, [renderSlot(_ctx.$slots, "toggle", { open: unref(drawerOpen) }, () => [(openBlock(), createElementBlock("svg", {
|
|
11526
|
+
onClick: onToggleClick
|
|
11527
|
+
}, [renderSlot(_ctx.$slots, "toggle", { open: unref(drawerOpen) }, () => [inline.value && unref(drawerOpen) ? (openBlock(), createElementBlock("svg", {
|
|
11528
|
+
key: 0,
|
|
11529
|
+
"data-part": "toggleIcon",
|
|
11530
|
+
class: normalizeClass(toggleIconClass.value),
|
|
11531
|
+
viewBox: "0 0 24 24",
|
|
11532
|
+
fill: "none",
|
|
11533
|
+
stroke: "currentColor",
|
|
11534
|
+
"stroke-width": "1.75",
|
|
11535
|
+
"stroke-linecap": "round",
|
|
11536
|
+
"stroke-linejoin": "round",
|
|
11537
|
+
"aria-hidden": "true",
|
|
11538
|
+
focusable: "false"
|
|
11539
|
+
}, [..._cache[3] || (_cache[3] = [createElementVNode("path", { d: "M18 6l-12 12" }, null, -1), createElementVNode("path", { d: "M6 6l12 12" }, null, -1)])], 2)) : (openBlock(), createElementBlock("svg", {
|
|
11540
|
+
key: 1,
|
|
11187
11541
|
"data-part": "toggleIcon",
|
|
11188
11542
|
class: normalizeClass(toggleIconClass.value),
|
|
11189
11543
|
viewBox: "0 0 24 24",
|
|
@@ -11198,119 +11552,92 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
11198
11552
|
createElementVNode("path", { d: "M4 6l16 0" }, null, -1),
|
|
11199
11553
|
createElementVNode("path", { d: "M4 12l16 0" }, null, -1),
|
|
11200
11554
|
createElementVNode("path", { d: "M4 18l16 0" }, null, -1)
|
|
11201
|
-
])], 2))])], 10,
|
|
11555
|
+
])], 2))])], 10, _hoisted_8$1), inline.value ? (openBlock(), createBlock(Transition, mergeProps({ key: 0 }, INLINE_TRANSITION, { persisted: "" }), {
|
|
11556
|
+
default: withCtx(() => [withDirectives(createElementVNode("div", {
|
|
11557
|
+
id: drawerId.value,
|
|
11558
|
+
ref_key: "inlineEl",
|
|
11559
|
+
ref: inlineEl,
|
|
11560
|
+
"data-part": "drawer",
|
|
11561
|
+
class: normalizeClass(inlineClass.value),
|
|
11562
|
+
style: normalizeStyle(inlineStyle.value)
|
|
11563
|
+
}, [createElementVNode("div", {
|
|
11564
|
+
"data-part": "drawerBody",
|
|
11565
|
+
class: normalizeClass(inlineBodyClass.value)
|
|
11566
|
+
}, [createVNode(NavMenuDrawerList_default, {
|
|
11567
|
+
entries: drawerEntries.value,
|
|
11568
|
+
layout: __props.drawerLayout,
|
|
11569
|
+
"panel-id": panelId,
|
|
11570
|
+
"nav-label": navLabel.value,
|
|
11571
|
+
variant: __props.variant,
|
|
11572
|
+
messages: unref(m),
|
|
11573
|
+
"link-as": __props.linkAs,
|
|
11574
|
+
"card-aspect": __props.cardAspect,
|
|
11575
|
+
classes: __props.classes,
|
|
11576
|
+
onFollow: closeDrawer
|
|
11577
|
+
}, createSlots({ _: 2 }, [unref(slots).panelItem ? {
|
|
11578
|
+
name: "panelItem",
|
|
11579
|
+
fn: withCtx((scope) => [renderSlot(_ctx.$slots, "panelItem", normalizeProps(guardReactiveProps(scope)))]),
|
|
11580
|
+
key: "0"
|
|
11581
|
+
} : void 0, unref(slots).groupHeading ? {
|
|
11582
|
+
name: "groupHeading",
|
|
11583
|
+
fn: withCtx((scope) => [renderSlot(_ctx.$slots, "groupHeading", normalizeProps(guardReactiveProps(scope)))]),
|
|
11584
|
+
key: "1"
|
|
11585
|
+
} : void 0]), 1032, [
|
|
11586
|
+
"entries",
|
|
11587
|
+
"layout",
|
|
11588
|
+
"nav-label",
|
|
11589
|
+
"variant",
|
|
11590
|
+
"messages",
|
|
11591
|
+
"link-as",
|
|
11592
|
+
"card-aspect",
|
|
11593
|
+
"classes"
|
|
11594
|
+
])], 2), unref(slots).drawerFooter ? (openBlock(), createElementBlock("div", {
|
|
11595
|
+
key: 0,
|
|
11596
|
+
"data-eldra-slot": unref(eldra).slotHost("drawerFooter"),
|
|
11597
|
+
"data-part": "drawerFooter",
|
|
11598
|
+
class: normalizeClass(inlineFooterClass.value)
|
|
11599
|
+
}, [renderSlot(_ctx.$slots, "drawerFooter", { close: closeDrawer })], 10, _hoisted_10$1)) : createCommentVNode("", true)], 14, _hoisted_9$1), [[vShow, unref(drawerOpen)]])]),
|
|
11600
|
+
_: 3
|
|
11601
|
+
}, 16)) : (openBlock(), createBlock(Drawer_default, {
|
|
11602
|
+
key: 1,
|
|
11202
11603
|
id: drawerId.value,
|
|
11203
11604
|
modelValue: unref(drawerOpen),
|
|
11204
|
-
"onUpdate:modelValue": _cache[
|
|
11605
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(drawerOpen) ? drawerOpen.value = $event : null),
|
|
11205
11606
|
side: __props.drawerSide,
|
|
11206
11607
|
"aria-label": unref(m).navMenuDrawer,
|
|
11207
11608
|
messages: __props.messages,
|
|
11208
11609
|
class: normalizeClass(__props.classes?.drawerRoot),
|
|
11209
11610
|
classes: drawerClasses.value
|
|
11210
11611
|
}, createSlots({
|
|
11211
|
-
default: withCtx(() => [
|
|
11212
|
-
|
|
11213
|
-
|
|
11214
|
-
"
|
|
11215
|
-
|
|
11216
|
-
|
|
11217
|
-
|
|
11218
|
-
|
|
11219
|
-
|
|
11220
|
-
|
|
11221
|
-
|
|
11222
|
-
|
|
11223
|
-
|
|
11224
|
-
|
|
11225
|
-
|
|
11226
|
-
|
|
11227
|
-
|
|
11228
|
-
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11232
|
-
|
|
11233
|
-
|
|
11234
|
-
|
|
11235
|
-
|
|
11236
|
-
|
|
11237
|
-
|
|
11238
|
-
|
|
11239
|
-
|
|
11240
|
-
placement: "drawer",
|
|
11241
|
-
variant: __props.variant,
|
|
11242
|
-
messages: unref(m),
|
|
11243
|
-
"link-as": __props.linkAs,
|
|
11244
|
-
"card-aspect": __props.cardAspect,
|
|
11245
|
-
classes: __props.classes,
|
|
11246
|
-
"labelled-by": `${panelId(index)}-drawer-heading`,
|
|
11247
|
-
"omit-overview": unref(hasHref)(item)
|
|
11248
|
-
}, createSlots({ _: 2 }, [unref(slots).panelItem ? {
|
|
11249
|
-
name: "panelItem",
|
|
11250
|
-
fn: withCtx((scope) => [renderSlot(_ctx.$slots, "panelItem", mergeProps({ ref_for: true }, scope))]),
|
|
11251
|
-
key: "0"
|
|
11252
|
-
} : void 0, unref(slots).groupHeading ? {
|
|
11253
|
-
name: "groupHeading",
|
|
11254
|
-
fn: withCtx((scope) => [renderSlot(_ctx.$slots, "groupHeading", mergeProps({ ref_for: true }, scope))]),
|
|
11255
|
-
key: "1"
|
|
11256
|
-
} : void 0]), 1032, [
|
|
11257
|
-
"item",
|
|
11258
|
-
"id-prefix",
|
|
11259
|
-
"variant",
|
|
11260
|
-
"messages",
|
|
11261
|
-
"link-as",
|
|
11262
|
-
"card-aspect",
|
|
11263
|
-
"classes",
|
|
11264
|
-
"labelled-by",
|
|
11265
|
-
"omit-overview"
|
|
11266
|
-
])], 2)], 64)) : unref(hasPanel)(item) ? (openBlock(), createBlock(AccordionItem_default, {
|
|
11267
|
-
key: 1,
|
|
11268
|
-
title: item.label ?? "",
|
|
11269
|
-
classes: accordionClasses.value
|
|
11270
|
-
}, {
|
|
11271
|
-
default: withCtx(() => [createElementVNode("div", {
|
|
11272
|
-
"data-eldra-scope": unref(eldra).scope,
|
|
11273
|
-
"data-part": "drawerNest",
|
|
11274
|
-
class: normalizeClass(drawerNestClass.value)
|
|
11275
|
-
}, [createVNode(NavMenuPanel_default, {
|
|
11276
|
-
item,
|
|
11277
|
-
"id-prefix": `${panelId(index)}-drawer`,
|
|
11278
|
-
placement: "drawer",
|
|
11279
|
-
variant: __props.variant,
|
|
11280
|
-
messages: unref(m),
|
|
11281
|
-
"link-as": __props.linkAs,
|
|
11282
|
-
"card-aspect": __props.cardAspect,
|
|
11283
|
-
classes: __props.classes
|
|
11284
|
-
}, createSlots({ _: 2 }, [unref(slots).panelItem ? {
|
|
11285
|
-
name: "panelItem",
|
|
11286
|
-
fn: withCtx((scope) => [renderSlot(_ctx.$slots, "panelItem", mergeProps({ ref_for: true }, scope))]),
|
|
11287
|
-
key: "0"
|
|
11288
|
-
} : void 0, unref(slots).groupHeading ? {
|
|
11289
|
-
name: "groupHeading",
|
|
11290
|
-
fn: withCtx((scope) => [renderSlot(_ctx.$slots, "groupHeading", mergeProps({ ref_for: true }, scope))]),
|
|
11291
|
-
key: "1"
|
|
11292
|
-
} : void 0]), 1032, [
|
|
11293
|
-
"item",
|
|
11294
|
-
"id-prefix",
|
|
11295
|
-
"variant",
|
|
11296
|
-
"messages",
|
|
11297
|
-
"link-as",
|
|
11298
|
-
"card-aspect",
|
|
11299
|
-
"classes"
|
|
11300
|
-
])], 10, _hoisted_9$1)]),
|
|
11301
|
-
_: 2
|
|
11302
|
-
}, 1032, ["title", "classes"])) : (openBlock(), createBlock(resolveDynamicComponent(unref(navLinkTag)(item, __props.linkAs)), mergeProps({
|
|
11303
|
-
key: 2,
|
|
11304
|
-
"data-part": "drawerLink",
|
|
11305
|
-
class: drawerLinkClass.value
|
|
11306
|
-
}, { ref_for: true }, unref(navLinkAttrs)(item, __props.linkAs)), {
|
|
11307
|
-
default: withCtx(() => [createTextVNode(toDisplayString(item.label) + " ", 1), item.newTab && unref(hasHref)(item) ? (openBlock(), createBlock(VisuallyHidden_default, { key: 0 }, {
|
|
11308
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(m).opensInNewTab), 1)]),
|
|
11309
|
-
_: 1
|
|
11310
|
-
})) : createCommentVNode("", true)]),
|
|
11311
|
-
_: 2
|
|
11312
|
-
}, 1040, ["class"]))], 2);
|
|
11313
|
-
}), 128))], 2)], 8, _hoisted_8$1)) : createCommentVNode("", true)]),
|
|
11612
|
+
default: withCtx(() => [createVNode(NavMenuDrawerList_default, {
|
|
11613
|
+
entries: drawerEntries.value,
|
|
11614
|
+
layout: __props.drawerLayout,
|
|
11615
|
+
"panel-id": panelId,
|
|
11616
|
+
"nav-label": navLabel.value,
|
|
11617
|
+
variant: __props.variant,
|
|
11618
|
+
messages: unref(m),
|
|
11619
|
+
"link-as": __props.linkAs,
|
|
11620
|
+
"card-aspect": __props.cardAspect,
|
|
11621
|
+
classes: __props.classes,
|
|
11622
|
+
onFollow: closeDrawer
|
|
11623
|
+
}, createSlots({ _: 2 }, [unref(slots).panelItem ? {
|
|
11624
|
+
name: "panelItem",
|
|
11625
|
+
fn: withCtx((scope) => [renderSlot(_ctx.$slots, "panelItem", normalizeProps(guardReactiveProps(scope)))]),
|
|
11626
|
+
key: "0"
|
|
11627
|
+
} : void 0, unref(slots).groupHeading ? {
|
|
11628
|
+
name: "groupHeading",
|
|
11629
|
+
fn: withCtx((scope) => [renderSlot(_ctx.$slots, "groupHeading", normalizeProps(guardReactiveProps(scope)))]),
|
|
11630
|
+
key: "1"
|
|
11631
|
+
} : void 0]), 1032, [
|
|
11632
|
+
"entries",
|
|
11633
|
+
"layout",
|
|
11634
|
+
"nav-label",
|
|
11635
|
+
"variant",
|
|
11636
|
+
"messages",
|
|
11637
|
+
"link-as",
|
|
11638
|
+
"card-aspect",
|
|
11639
|
+
"classes"
|
|
11640
|
+
])]),
|
|
11314
11641
|
_: 2
|
|
11315
11642
|
}, [unref(slots).drawerHeader ? {
|
|
11316
11643
|
name: "header",
|
|
@@ -11328,7 +11655,7 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
11328
11655
|
"messages",
|
|
11329
11656
|
"class",
|
|
11330
11657
|
"classes"
|
|
11331
|
-
])], 64)) : createCommentVNode("", true)], 40, _hoisted_1$20);
|
|
11658
|
+
]))], 64)) : createCommentVNode("", true)], 40, _hoisted_1$20);
|
|
11332
11659
|
};
|
|
11333
11660
|
}
|
|
11334
11661
|
});
|
|
@@ -13212,6 +13539,7 @@ var ProductCard_default = /* @__PURE__ */ defineComponent({
|
|
|
13212
13539
|
type: Boolean,
|
|
13213
13540
|
default: false
|
|
13214
13541
|
},
|
|
13542
|
+
vendorPlacement: { default: "above" },
|
|
13215
13543
|
showRating: {
|
|
13216
13544
|
type: Boolean,
|
|
13217
13545
|
default: true
|
|
@@ -13220,6 +13548,14 @@ var ProductCard_default = /* @__PURE__ */ defineComponent({
|
|
|
13220
13548
|
type: Boolean,
|
|
13221
13549
|
default: true
|
|
13222
13550
|
},
|
|
13551
|
+
maxSwatches: { default: 3 },
|
|
13552
|
+
saleBadgeLabel: { default: void 0 },
|
|
13553
|
+
quickAddLabel: { default: void 0 },
|
|
13554
|
+
quickAddName: { default: void 0 },
|
|
13555
|
+
quickAddIcon: {
|
|
13556
|
+
type: [Object, Function],
|
|
13557
|
+
default: void 0
|
|
13558
|
+
},
|
|
13223
13559
|
quickAdd: {
|
|
13224
13560
|
type: Boolean,
|
|
13225
13561
|
default: true
|
|
@@ -13302,9 +13638,11 @@ var ProductCard_default = /* @__PURE__ */ defineComponent({
|
|
|
13302
13638
|
const stockLevel = computed(() => props.product.stock ?? "in");
|
|
13303
13639
|
const swatches = computed(() => props.product.colours ?? []);
|
|
13304
13640
|
const showSwatchesResolved = computed(() => props.showSwatches && swatches.value.length > 0);
|
|
13305
|
-
/** Spec "Product card" → Anatomy, part 7: "up to three dots + '+N'"
|
|
13306
|
-
|
|
13307
|
-
const
|
|
13641
|
+
/** Spec "Product card" → Anatomy, part 7: "up to three dots + '+N'" — three by default;
|
|
13642
|
+
* `maxSwatches` raises (or lowers) the cap for a theme that draws a longer plain row. */
|
|
13643
|
+
const swatchCap = computed(() => Math.max(1, Math.floor(props.maxSwatches)));
|
|
13644
|
+
const visibleSwatches = computed(() => swatches.value.slice(0, swatchCap.value));
|
|
13645
|
+
const overflowCount = computed(() => Math.max(0, swatches.value.length - swatchCap.value));
|
|
13308
13646
|
/** `linkAs` follows `Link`/`Rating`'s own `as` contract: a string tag still takes `href`, a
|
|
13309
13647
|
* component takes the destination as `to`. Named `linkAs`, not `as`: this card's own root is a
|
|
13310
13648
|
* fixed `<article>`/`<div>` (loading), so `as` would be ambiguous with `Badge`/`Container`/
|
|
@@ -13329,7 +13667,12 @@ var ProductCard_default = /* @__PURE__ */ defineComponent({
|
|
|
13329
13667
|
* splicing (visible text + a trailing hidden run) cannot express for every locale, only English's
|
|
13330
13668
|
* own word order.
|
|
13331
13669
|
*/
|
|
13332
|
-
const quickAddName = computed(() => messages.value.quickAdd(props.product.title));
|
|
13670
|
+
const quickAddName = computed(() => props.quickAddName ?? messages.value.quickAdd(props.product.title));
|
|
13671
|
+
/** The visible text: `quickAddLabel` when the caller words it its own way ("Add"). */
|
|
13672
|
+
const quickAddText = computed(() => props.quickAddLabel ?? messages.value.quickAddLabel);
|
|
13673
|
+
/** `Button`'s own `label` part, so a theme can hide the visible word (an icon-only round button on
|
|
13674
|
+
* phones) while the `aria-label` above keeps naming the product. */
|
|
13675
|
+
const quickAddButtonClasses = computed(() => props.classes?.quickAddLabel ? { label: props.classes.quickAddLabel } : void 0);
|
|
13333
13676
|
function onQuickAdd() {
|
|
13334
13677
|
emit("quickAdd", props.product);
|
|
13335
13678
|
}
|
|
@@ -13374,6 +13717,11 @@ var ProductCard_default = /* @__PURE__ */ defineComponent({
|
|
|
13374
13717
|
*/
|
|
13375
13718
|
const bodyClass = computed(() => ["eldra:mt-3 eldra:flex eldra:flex-1 eldra:flex-col eldra:gap-1", props.classes?.body]);
|
|
13376
13719
|
const vendorClass = computed(() => ["eldra:text-caption eldra:text-muted", props.classes?.vendor]);
|
|
13720
|
+
/** Where the vendor line sits: above the title (the spec's anatomy, the default) or after the
|
|
13721
|
+
* price — a maker line under the name. In DOM order either way, so reading order follows what is
|
|
13722
|
+
* seen. */
|
|
13723
|
+
const vendorAbove = computed(() => props.vendorPlacement !== "below");
|
|
13724
|
+
const showVendorLine = computed(() => props.showVendor && Boolean(props.product.vendor));
|
|
13377
13725
|
/** Spec "Product card" → Sizes, "Title" row: "1rem, line-height 1.4, weight 600, clamp 2 lines" —
|
|
13378
13726
|
* exactly `text-card-title` (`tailwind.css`), reused rather than a near-duplicate utility. */
|
|
13379
13727
|
const titleClass = computed(() => ["eldra:text-card-title eldra:text-text eldra:line-clamp-2", props.classes?.title]);
|
|
@@ -13513,25 +13861,33 @@ var ProductCard_default = /* @__PURE__ */ defineComponent({
|
|
|
13513
13861
|
key: 0,
|
|
13514
13862
|
"data-part": "badges",
|
|
13515
13863
|
class: normalizeClass(badgesClass.value)
|
|
13516
|
-
}, [badgeKind.value === "sale" && discountPercent.value > 0 ? (openBlock(), createBlock(Badge_default, {
|
|
13864
|
+
}, [badgeKind.value === "sale" && discountPercent.value > 0 && __props.saleBadgeLabel ? (openBlock(), createBlock(Badge_default, {
|
|
13517
13865
|
key: 0,
|
|
13518
13866
|
variant: "sale",
|
|
13867
|
+
class: normalizeClass(__props.classes?.saleBadge),
|
|
13868
|
+
label: __props.saleBadgeLabel
|
|
13869
|
+
}, null, 8, ["class", "label"])) : badgeKind.value === "sale" && discountPercent.value > 0 ? (openBlock(), createBlock(Badge_default, {
|
|
13870
|
+
key: 1,
|
|
13871
|
+
variant: "sale",
|
|
13872
|
+
class: normalizeClass(__props.classes?.saleBadge),
|
|
13519
13873
|
label: `−${discountPercent.value}%`,
|
|
13520
13874
|
"hidden-suffix": " off"
|
|
13521
|
-
}, null, 8, ["label"])) : badgeKind.value === "new" ? (openBlock(), createBlock(Badge_default, {
|
|
13522
|
-
key:
|
|
13875
|
+
}, null, 8, ["class", "label"])) : badgeKind.value === "new" ? (openBlock(), createBlock(Badge_default, {
|
|
13876
|
+
key: 2,
|
|
13523
13877
|
variant: "new",
|
|
13878
|
+
class: normalizeClass(__props.classes?.newBadge),
|
|
13524
13879
|
label: unref(messages).newBadge
|
|
13525
|
-
}, null, 8, ["label"])) : createCommentVNode("", true), isSoldOut.value ? (openBlock(), createBlock(Badge_default, {
|
|
13526
|
-
key:
|
|
13880
|
+
}, null, 8, ["class", "label"])) : createCommentVNode("", true), isSoldOut.value ? (openBlock(), createBlock(Badge_default, {
|
|
13881
|
+
key: 3,
|
|
13527
13882
|
outline: "",
|
|
13883
|
+
class: normalizeClass(__props.classes?.soldOutBadge),
|
|
13528
13884
|
label: unref(messages).soldOut
|
|
13529
|
-
}, null, 8, ["label"])) : createCommentVNode("", true)], 2)) : createCommentVNode("", true)], 2),
|
|
13885
|
+
}, null, 8, ["class", "label"])) : createCommentVNode("", true)], 2)) : createCommentVNode("", true)], 2),
|
|
13530
13886
|
createElementVNode("div", {
|
|
13531
13887
|
"data-part": "body",
|
|
13532
13888
|
class: normalizeClass(bodyClass.value)
|
|
13533
13889
|
}, [
|
|
13534
|
-
|
|
13890
|
+
showVendorLine.value && vendorAbove.value ? (openBlock(), createElementBlock("p", {
|
|
13535
13891
|
key: 0,
|
|
13536
13892
|
"data-part": "vendor",
|
|
13537
13893
|
class: normalizeClass(vendorClass.value)
|
|
@@ -13575,8 +13931,13 @@ var ProductCard_default = /* @__PURE__ */ defineComponent({
|
|
|
13575
13931
|
"revalidating",
|
|
13576
13932
|
"announce"
|
|
13577
13933
|
]))], 2),
|
|
13578
|
-
|
|
13934
|
+
showVendorLine.value && !vendorAbove.value ? (openBlock(), createElementBlock("p", {
|
|
13579
13935
|
key: 1,
|
|
13936
|
+
"data-part": "vendor",
|
|
13937
|
+
class: normalizeClass(vendorClass.value)
|
|
13938
|
+
}, toDisplayString(__props.product.vendor), 3)) : createCommentVNode("", true),
|
|
13939
|
+
showRatingResolved.value ? (openBlock(), createElementBlock("div", {
|
|
13940
|
+
key: 2,
|
|
13580
13941
|
"data-part": "rating",
|
|
13581
13942
|
class: normalizeClass(ratingClass.value)
|
|
13582
13943
|
}, [createVNode(Rating_default, {
|
|
@@ -13584,7 +13945,7 @@ var ProductCard_default = /* @__PURE__ */ defineComponent({
|
|
|
13584
13945
|
count: ratingCount.value
|
|
13585
13946
|
}, null, 8, ["value", "count"])], 2)) : createCommentVNode("", true),
|
|
13586
13947
|
showStockLine.value ? (openBlock(), createElementBlock("div", {
|
|
13587
|
-
key:
|
|
13948
|
+
key: 3,
|
|
13588
13949
|
"data-part": "stockLine",
|
|
13589
13950
|
class: normalizeClass(stockLineClass.value)
|
|
13590
13951
|
}, [createVNode(StockBadge_default, {
|
|
@@ -13596,7 +13957,7 @@ var ProductCard_default = /* @__PURE__ */ defineComponent({
|
|
|
13596
13957
|
"revalidating",
|
|
13597
13958
|
"announce"
|
|
13598
13959
|
])], 2)) : createCommentVNode("", true),
|
|
13599
|
-
showSwatchesResolved.value ? (openBlock(), createElementBlock(Fragment, { key:
|
|
13960
|
+
showSwatchesResolved.value ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [createElementVNode("div", {
|
|
13600
13961
|
"data-part": "swatches",
|
|
13601
13962
|
class: normalizeClass(swatchesClass.value),
|
|
13602
13963
|
"aria-hidden": "true"
|
|
@@ -13624,12 +13985,19 @@ var ProductCard_default = /* @__PURE__ */ defineComponent({
|
|
|
13624
13985
|
block: "",
|
|
13625
13986
|
type: "button",
|
|
13626
13987
|
class: normalizeClass(quickAddClass.value),
|
|
13988
|
+
classes: quickAddButtonClasses.value,
|
|
13989
|
+
"icon-left": __props.quickAddIcon,
|
|
13627
13990
|
"aria-label": quickAddName.value,
|
|
13628
13991
|
onClick: onQuickAdd
|
|
13629
13992
|
}, {
|
|
13630
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
13993
|
+
default: withCtx(() => [createTextVNode(toDisplayString(quickAddText.value), 1)]),
|
|
13631
13994
|
_: 1
|
|
13632
|
-
}, 8, [
|
|
13995
|
+
}, 8, [
|
|
13996
|
+
"class",
|
|
13997
|
+
"classes",
|
|
13998
|
+
"icon-left",
|
|
13999
|
+
"aria-label"
|
|
14000
|
+
])) : __props.quickAdd ? (openBlock(), createBlock(Button_default, {
|
|
13633
14001
|
key: 1,
|
|
13634
14002
|
"data-part": "quickAdd",
|
|
13635
14003
|
variant: "outline",
|