@eldrajs/ui 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as useEldraUiLocale, A as FIELD_BASE, B as formatCurrency, C as filterNumericBeforeInput, D as stripMask, E as defaultCharacterMeaning, F as FIELD_SIZE, G as useSlotPresence, H as formatUnit, I as createNumberFormat, J as DEFAULT_UI_LOCALE, K as useHeadingTag, L as currencyFractionDigits, M as FIELD_DISABLED, N as FIELD_LIVE, O as CurrencyInput_default, P as FIELD_SEARCH_APPEARANCE, Q as useEldraUiCurrency, R as currencySymbol, S as VisuallyHidden_default, T as applyMask, U as localeSeparators, V as formatNumber, W as parseLocaleNumber, X as provideEldraUiCurrency, Y as LOCALE_KEY, Z as provideEldraUiLocale, _ as normalizeText, _t as useControllableModel, a as claimShortcut, at as FieldError_default, bt as cx, c as SearchResultsPanel_default, ct as Button_default, d as MultiSelect_default, dt as FORM_LAYOUT_KEY, et as TAG_FILL, f as usePopover, ft as FORM_SUBMITTING_KEY, g as matchRange, gt as enUS, h as useFloating, ht as useMessages, i as SearchBar_default, it as CheckboxGroup_default, j as FIELD_CLEAR_BUTTON, k as UnitInput_default, l as RadioGroup_default, lt as Spinner_default, m as useTeleportTarget, mt as provideEldraUiMessages, n as Textarea_default, nt as TAG_SHAPE, o as ownsShortcut, ot as Checkbox_default, p as useOverlay, pt as MESSAGES_KEY, q as CURRENCY_KEY, r as Select_default, rt as tagPadding, s as releaseShortcut, st as FIELD_KEY, t as VariantPicker_default, tt as TAG_REMOVE_BUTTON, u as QuantityStepper_default, ut as Icon_default, v as useListbox, vt as joinIds, w as Input_default, x as Switch_default, xt as partClass, y as FormLayout_default, yt as useUiId, z as defaultUnitFormat } from "./VariantPicker-CqDAtSju.js";
2
- import { Comment, Fragment, Teleport, Text, Transition, cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, h, inject, isRef, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, onUnmounted, onUpdated, openBlock, provide, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toRef, toValue, unref, useAttrs, useSlots, vShow, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
1
+ import { $ as useEldraUiLocale, A as FIELD_BASE, B as formatCurrency, C as filterNumericBeforeInput, D as stripMask, E as defaultCharacterMeaning, F as FIELD_SIZE, G as useSlotPresence, H as formatUnit, I as createNumberFormat, J as DEFAULT_UI_LOCALE, K as useHeadingTag, L as currencyFractionDigits, M as FIELD_DISABLED, N as FIELD_LIVE, O as CurrencyInput_default, P as FIELD_SEARCH_APPEARANCE, Q as useEldraUiCurrency, R as currencySymbol, S as VisuallyHidden_default, T as applyMask, U as localeSeparators, V as formatNumber, W as parseLocaleNumber, X as provideEldraUiCurrency, Y as LOCALE_KEY, Z as provideEldraUiLocale, _ as normalizeText, _t as useControllableModel, a as claimShortcut, at as FieldError_default, bt as cx, c as SearchResultsPanel_default, ct as Button_default, d as MultiSelect_default, dt as FORM_LAYOUT_KEY, et as TAG_FILL, f as usePopover, ft as FORM_SUBMITTING_KEY, g as matchRange, gt as enUS, h as useFloating, ht as useMessages, i as SearchBar_default, it as CheckboxGroup_default, j as FIELD_CLEAR_BUTTON, k as UnitInput_default, l as RadioGroup_default, lt as Spinner_default, m as useTeleportTarget, mt as provideEldraUiMessages, n as Textarea_default, nt as TAG_SHAPE, o as ownsShortcut, ot as Checkbox_default, p as useOverlay, pt as MESSAGES_KEY, q as CURRENCY_KEY, r as Select_default, rt as tagPadding, s as releaseShortcut, st as FIELD_KEY, t as VariantPicker_default, tt as TAG_REMOVE_BUTTON, u as QuantityStepper_default, ut as Icon_default, v as useListbox, vt as joinIds, w as Input_default, x as Switch_default, xt as partClass, y as FormLayout_default, yt as useUiId, z as defaultUnitFormat } from "./VariantPicker-CWnrUgIt.js";
2
+ import { Comment, Fragment, Teleport, Text, Transition, cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, h, inject, isRef, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, onUnmounted, onUpdated, openBlock, provide, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toRef, toValue, unref, useAttrs, useId, useSlots, vShow, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
3
3
  import { dateTimeFormat } from "@eldrajs/sdk/format/date";
4
4
  //#region src/components/accordion/context.ts
5
5
  /** The key an `Accordion` provides its `AccordionContext` on. */
@@ -241,8 +241,8 @@ function createPanelHeightAnimator(panel) {
241
241
  //#region src/components/accordion/AccordionItem.vue?vue&type=script&setup=true&lang.ts
242
242
  var _hoisted_1$39 = ["href"];
243
243
  var _hoisted_2$25 = { class: "min-w-0 flex-1" };
244
- var _hoisted_3$15 = ["name", "open"];
245
- var _hoisted_4$10 = { class: "min-w-0 flex-1" };
244
+ var _hoisted_3$16 = ["name", "open"];
245
+ var _hoisted_4$11 = { class: "min-w-0 flex-1" };
246
246
  var TRIGGER_BASE$1 = "group flex w-full items-center justify-between gap-4 min-h-14 py-4 rounded-sm text-start cursor-pointer eldra-focus";
247
247
  //#endregion
248
248
  //#region src/components/accordion/AccordionItem.vue
@@ -473,7 +473,7 @@ var AccordionItem_default = /* @__PURE__ */ defineComponent({
473
473
  "data-part": "summary",
474
474
  class: normalizeClass(summaryClass.value),
475
475
  onClick: onSummaryClick
476
- }, [createElementVNode("span", _hoisted_4$10, [(openBlock(), createBlock(resolveDynamicComponent(titleTag.value), {
476
+ }, [createElementVNode("span", _hoisted_4$11, [(openBlock(), createBlock(resolveDynamicComponent(titleTag.value), {
477
477
  "data-part": "title",
478
478
  class: normalizeClass(titleClass.value)
479
479
  }, {
@@ -499,7 +499,7 @@ var AccordionItem_default = /* @__PURE__ */ defineComponent({
499
499
  ref: panelRef,
500
500
  "data-part": "panel",
501
501
  class: normalizeClass(panelClass.value)
502
- }, [renderSlot(_ctx.$slots, "default")], 2)], 42, _hoisted_3$15));
502
+ }, [renderSlot(_ctx.$slots, "default")], 2)], 42, _hoisted_3$16));
503
503
  };
504
504
  }
505
505
  });
@@ -2232,14 +2232,14 @@ function useCarousel(options) {
2232
2232
  //#region src/components/carousel/Carousel.vue?vue&type=script&setup=true&lang.ts
2233
2233
  var _hoisted_1$34 = ["aria-label", "aria-describedby"];
2234
2234
  var _hoisted_2$22 = ["id"];
2235
- var _hoisted_3$14 = {
2235
+ var _hoisted_3$15 = {
2236
2236
  key: 0,
2237
2237
  class: "flex shrink-0 items-center gap-2"
2238
2238
  };
2239
- var _hoisted_4$9 = ["disabled", "aria-label"];
2240
- var _hoisted_5$6 = ["disabled", "aria-label"];
2241
- var _hoisted_6$1 = ["tabindex", "aria-label"];
2242
- var _hoisted_7$1 = {
2239
+ var _hoisted_4$10 = ["disabled", "aria-label"];
2240
+ var _hoisted_5$7 = ["disabled", "aria-label"];
2241
+ var _hoisted_6$3 = ["tabindex", "aria-label"];
2242
+ var _hoisted_7$2 = {
2243
2243
  key: 2,
2244
2244
  class: "flex items-center justify-between gap-4"
2245
2245
  };
@@ -2476,7 +2476,7 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
2476
2476
  key: 1,
2477
2477
  "data-part": "header",
2478
2478
  class: normalizeClass(headerClass.value)
2479
- }, [renderSlot(_ctx.$slots, "header"), __props.controls === "header" ? (openBlock(), createElementBlock("div", _hoisted_3$14, [
2479
+ }, [renderSlot(_ctx.$slots, "header"), __props.controls === "header" ? (openBlock(), createElementBlock("div", _hoisted_3$15, [
2480
2480
  __props.counter ? (openBlock(), createElementBlock("span", {
2481
2481
  key: 0,
2482
2482
  "data-part": "counter",
@@ -2502,7 +2502,7 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
2502
2502
  "stroke-linejoin": "round",
2503
2503
  "aria-hidden": "true",
2504
2504
  focusable: "false"
2505
- }, [createElementVNode("path", { d: "M15 6l-6 6l6 6" })], -1)])], 10, _hoisted_4$9),
2505
+ }, [createElementVNode("path", { d: "M15 6l-6 6l6 6" })], -1)])], 10, _hoisted_4$10),
2506
2506
  createElementVNode("button", {
2507
2507
  ref_key: "nextButtonRef",
2508
2508
  ref: nextButtonRef,
@@ -2522,7 +2522,7 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
2522
2522
  "stroke-linejoin": "round",
2523
2523
  "aria-hidden": "true",
2524
2524
  focusable: "false"
2525
- }, [createElementVNode("path", { d: "M9 6l6 6l-6 6" })], -1)])], 10, _hoisted_5$6)
2525
+ }, [createElementVNode("path", { d: "M9 6l6 6l-6 6" })], -1)])], 10, _hoisted_5$7)
2526
2526
  ])) : createCommentVNode("", true)], 2)) : createCommentVNode("", true),
2527
2527
  createElementVNode("div", {
2528
2528
  ref_key: "trackRef",
@@ -2534,8 +2534,8 @@ var Carousel_default = /* @__PURE__ */ defineComponent({
2534
2534
  class: normalizeClass(trackClass.value),
2535
2535
  style: normalizeStyle(trackStyle.value),
2536
2536
  onKeydown: _cache[2] || (_cache[2] = (...args) => unref(onTrackKeydown) && unref(onTrackKeydown)(...args))
2537
- }, [renderSlot(_ctx.$slots, "default")], 46, _hoisted_6$1),
2538
- showBelowRow.value ? (openBlock(), createElementBlock("div", _hoisted_7$1, [
2537
+ }, [renderSlot(_ctx.$slots, "default")], 46, _hoisted_6$3),
2538
+ showBelowRow.value ? (openBlock(), createElementBlock("div", _hoisted_7$2, [
2539
2539
  showPause.value ? (openBlock(), createElementBlock("button", {
2540
2540
  key: 0,
2541
2541
  type: "button",
@@ -3094,7 +3094,8 @@ var RATIO_VALUES = {
3094
3094
  * The frame's `aspect-ratio` CSS value (spec "Image" → Properties, `ratio` row: "`auto` uses the
3095
3095
  * image's own ratio, or 4:3 when empty").
3096
3096
  *
3097
- * - A fixed preset always wins outright — its own literal `w / h` ratio, whatever `media` is.
3097
+ * - A fixed preset always wins outright — its own literal `w / h` ratio, whatever `media` is; so
3098
+ * does a number, which is the width ÷ height itself.
3098
3099
  * - `auto` with a `media.width`/`height` pair uses the image's own intrinsic ratio, computed here
3099
3100
  * rather than left to the browser's native `aspect-ratio: auto` resolution: that keyword only
3100
3101
  * sizes a *replaced* element (the `<img>` itself) from its intrinsic size, but the frame that
@@ -3107,6 +3108,7 @@ var RATIO_VALUES = {
3107
3108
  * - `auto` with no `media` at all falls back to 4:3 (the spec's own fallback for an empty frame).
3108
3109
  */
3109
3110
  function frameAspectRatio(ratio, media) {
3111
+ if (typeof ratio === "number") return `${ratio}`;
3110
3112
  if (ratio !== "auto") return RATIO_VALUES[ratio];
3111
3113
  if (media?.width && media?.height) return `${media.width} / ${media.height}`;
3112
3114
  if (!media) return RATIO_VALUES["4x3"];
@@ -3119,6 +3121,26 @@ function zoomSizes(sizes, zoom) {
3119
3121
  if (!Number.isFinite(zoom) || zoom <= 1) return sizes;
3120
3122
  return topLevelEntries(sizes).map((entry) => zoomEntry(entry.trim(), zoom)).join(", ");
3121
3123
  }
3124
+ /** Puts every entry of an `<img sizes>` list under `condition` as well as its own condition. */
3125
+ function scopeSizes(sizes, condition) {
3126
+ return topLevelEntries(sizes).map((entry) => {
3127
+ const trimmed = entry.trim();
3128
+ const start = sizeValueStart(trimmed);
3129
+ const own = start > 0 ? trimmed.slice(0, start).trim() : "";
3130
+ const value = start >= 0 ? trimmed.slice(start) : trimmed;
3131
+ return `${own ? `${inParens(condition)} and ${inParens(own)}` : condition} ${value}`;
3132
+ }).join(", ");
3133
+ }
3134
+ /** The condition as one parenthesised group, so `and` can join it to another. */
3135
+ function inParens(condition) {
3136
+ let depth = 0;
3137
+ for (let i = 0; i < condition.length && condition.startsWith("("); i++) if (condition[i] === "(") depth++;
3138
+ else if (condition[i] === ")" && --depth === 0) {
3139
+ if (i === condition.length - 1) return condition;
3140
+ break;
3141
+ }
3142
+ return `(${condition})`;
3143
+ }
3122
3144
  function topLevelEntries(list) {
3123
3145
  const entries = [];
3124
3146
  let depth = 0;
@@ -3165,12 +3187,12 @@ var _hoisted_2$21 = [
3165
3187
  "loading",
3166
3188
  "fetchpriority"
3167
3189
  ];
3168
- var _hoisted_3$13 = [
3190
+ var _hoisted_3$14 = [
3169
3191
  "role",
3170
3192
  "aria-hidden",
3171
3193
  "aria-label"
3172
3194
  ];
3173
- var _hoisted_4$8 = { "aria-hidden": "true" };
3195
+ var _hoisted_4$9 = { "aria-hidden": "true" };
3174
3196
  //#endregion
3175
3197
  //#region src/components/image/Image.vue
3176
3198
  var Image_default = /* @__PURE__ */ defineComponent({
@@ -3190,6 +3212,8 @@ var Image_default = /* @__PURE__ */ defineComponent({
3190
3212
  y: 50
3191
3213
  }) },
3192
3214
  zoom: { default: 1 },
3215
+ zoomOrigin: { default: "band" },
3216
+ crops: { default: () => [] },
3193
3217
  rounded: { default: "none" },
3194
3218
  caption: { default: null },
3195
3219
  sizes: { default: void 0 },
@@ -3227,10 +3251,6 @@ var Image_default = /* @__PURE__ */ defineComponent({
3227
3251
  if (props.decorative) return "";
3228
3252
  return props.alt ?? props.media?.alt ?? "";
3229
3253
  });
3230
- const resolvedSizes = computed(() => {
3231
- const sizes = props.sizes ?? props.media?.sizes;
3232
- return sizes && props.fit === "cover" ? zoomSizes(sizes, props.zoom) : sizes;
3233
- });
3234
3254
  /** Spec "Image" → Behaviour & motion: eager + high priority for the first hero image, lazy
3235
3255
  * everywhere else. `decoding="async"` never blocks the first paint on the decode. */
3236
3256
  const loadingAttr = computed(() => props.priority ? "eager" : "lazy");
@@ -3244,19 +3264,6 @@ var Image_default = /* @__PURE__ */ defineComponent({
3244
3264
  const rootStyle = computed(() => attrs.style);
3245
3265
  const frameStyle = computed(() => ({ aspectRatio: frameAspectRatio(props.ratio, props.media) }));
3246
3266
  const frameClass = computed(() => partClass(cx("relative w-full overflow-hidden bg-surface-strong", ROUNDED_CLASS[props.rounded]), props.classes, "frame"));
3247
- /**
3248
- * The focal band a given `zoom` keeps safe (percent, 0–100 on either axis): the range a
3249
- * `transform-origin` can sit in without pulling the scaled image away from one edge of the frame
3250
- * and exposing the frame's own background there — which acceptance criterion "images are never
3251
- * stretched or letterboxed" rules out. `object-fit: cover` alone can never letterbox (it always
3252
- * fills the box, whatever `object-position` is), but a `scale()` *on top of* a cover fit can, once
3253
- * its origin sits close enough to an edge that magnifying around it pulls the far side inward. The
3254
- * higher the zoom, the narrower the safe band — at `zoom: 1` every point is safe (the whole 0–100
3255
- * range); this is the same formula `@eldrajs/theme-core`'s `imageFraming.ts#focalBand` uses
3256
- * (independently reimplemented here, in percent rather than a 0–1 fraction, because this package
3257
- * must not depend on that one — see the repo root `CLAUDE.md`'s "Public packages never import a
3258
- * private one"/framework-free rules — not shared code with it).
3259
- */
3260
3267
  function focalBand(zoom) {
3261
3268
  const inset = (1 - 1 / zoom) * 50;
3262
3269
  return [inset, 100 - inset];
@@ -3265,21 +3272,66 @@ var Image_default = /* @__PURE__ */ defineComponent({
3265
3272
  const [low, high] = focalBand(zoom);
3266
3273
  return Math.min(high, Math.max(low, value));
3267
3274
  }
3268
- /**
3269
- * Spec "Image" → Behaviour & motion: "The image covers the frame and is cropped, positioned at
3270
- * the focal point and scaled by the zoom around the focal point." `object-position` always
3271
- * follows `focal` exactly — cropping alone can never letterbox, so it needs no clamping.
3272
- * `transform`/`transform-origin` are only added once `zoom` is actually above 1, so an untouched
3273
- * image never carries an inert `scale(1)`; when it is, the origin is `focal` clamped into
3274
- * `focalBand(zoom)` above, so scaling around it never uncovers the frame's own edge.
3275
- */
3276
- const mediaStyle = computed(() => {
3277
- const style = { objectPosition: `${props.focal.x}% ${props.focal.y}%` };
3278
- if (props.zoom > 1) {
3279
- style.transform = `scale(${props.zoom})`;
3280
- style.transformOrigin = `${clampToFocalBand(props.focal.x, props.zoom)}% ${clampToFocalBand(props.focal.y, props.zoom)}%`;
3275
+ const percent = (value) => `${Number(value.toFixed(4))}%`;
3276
+ function cropStyle(focal, zoom, rule = false) {
3277
+ const style = { objectPosition: `${focal.x}% ${focal.y}%` };
3278
+ if (props.zoomOrigin === "focal") {
3279
+ if (zoom <= 1 && !rule) return style;
3280
+ const scale = Math.max(1, zoom);
3281
+ return Object.assign(style, {
3282
+ position: "relative",
3283
+ left: percent(focal.x * (1 - scale)),
3284
+ top: percent(focal.y * (1 - scale)),
3285
+ width: percent(scale * 100),
3286
+ height: percent(scale * 100),
3287
+ maxWidth: "none"
3288
+ });
3289
+ }
3290
+ if (rule) style.transform = "none";
3291
+ if (zoom > 1) {
3292
+ style.transform = `scale(${zoom})`;
3293
+ style.transformOrigin = `${clampToFocalBand(focal.x, zoom)}% ${clampToFocalBand(focal.y, zoom)}%`;
3281
3294
  }
3282
3295
  return style;
3296
+ }
3297
+ const mediaStyle = computed(() => cropStyle(props.focal, props.zoom));
3298
+ const MEDIA_CONDITION = /^(?!.*(?:<\/|\/\*))[\w ().:<>=/+*-]+$/;
3299
+ const ASPECT_RATIO = /^(?:auto|[\d.]+(?: \/ [\d.]+)?)$/;
3300
+ const finite = (value) => typeof value === "number" && Number.isFinite(value);
3301
+ function resolveCrop(crop) {
3302
+ const focal = crop.focal ?? props.focal;
3303
+ const zoom = crop.zoom ?? props.zoom;
3304
+ const aspectRatio = frameAspectRatio(crop.ratio ?? props.ratio, props.media);
3305
+ if (!(typeof crop.media === "string" && MEDIA_CONDITION.test(crop.media.trim()) && ASPECT_RATIO.test(aspectRatio) && finite(focal?.x) && finite(focal?.y) && finite(zoom))) return;
3306
+ return {
3307
+ media: crop.media.trim(),
3308
+ aspectRatio,
3309
+ focal,
3310
+ zoom,
3311
+ sizes: crop.sizes
3312
+ };
3313
+ }
3314
+ const crops = computed(() => props.crops.flatMap((crop) => resolveCrop(crop) ?? []));
3315
+ const scaledSizes = (sizes, zoom) => sizes && props.fit === "cover" ? zoomSizes(sizes, zoom) : sizes;
3316
+ const resolvedSizes = computed(() => {
3317
+ const sizes = props.sizes ?? props.media?.sizes;
3318
+ const own = scaledSizes(sizes, props.zoom);
3319
+ if (crops.value.length === 0) return own;
3320
+ return [...crops.value.flatMap((crop) => {
3321
+ const cropSizes = scaledSizes(crop.sizes ?? sizes, crop.zoom);
3322
+ return cropSizes ? [scopeSizes(cropSizes, crop.media)] : [];
3323
+ }), ...own ? [own] : []].join(", ") || void 0;
3324
+ });
3325
+ const cropId = useId();
3326
+ const cropScope = computed(() => crops.value.length > 0 ? cropId : void 0);
3327
+ const hyphenate = (property) => property.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
3328
+ const cssString = (value) => `"${value.replace(/[^\w-]/g, (c) => `\\${c.codePointAt(0).toString(16)} `)}"`;
3329
+ const cropCss = computed(() => {
3330
+ const root = `[data-eldra-image-crops=${cssString(cropId)}]`;
3331
+ return [...crops.value].reverse().map((crop) => {
3332
+ const declarations = Object.entries(cropStyle(crop.focal, crop.zoom, true)).map(([property, value]) => `${hyphenate(property)}:${value}!important`).join(";");
3333
+ return `@media ${crop.media}{${root}>[data-part=frame]{aspect-ratio:${crop.aspectRatio}!important}${root}>[data-part=frame]>[data-part=media]{${declarations}}}`;
3334
+ }).join("");
3283
3335
  });
3284
3336
  const mediaClass = computed(() => partClass(cx("block h-full w-full", props.fit === "contain" ? "object-contain" : "object-cover"), props.classes, "media"));
3285
3337
  const placeholderClass = computed(() => partClass(cx("eldra-image-placeholder-hatch text-muted flex h-full w-full flex-col items-center justify-center gap-2"), props.classes, "placeholder"));
@@ -3289,83 +3341,95 @@ var Image_default = /* @__PURE__ */ defineComponent({
3289
3341
  return openBlock(), createBlock(resolveDynamicComponent(hasCaption.value ? "figure" : "div"), {
3290
3342
  "data-eldra-ui": "",
3291
3343
  "data-part": "root",
3344
+ "data-eldra-image-crops": cropScope.value,
3292
3345
  class: normalizeClass(rootClass.value),
3293
3346
  style: normalizeStyle(rootStyle.value)
3294
3347
  }, {
3295
- default: withCtx(() => [createElementVNode("div", {
3296
- "data-part": "frame",
3297
- class: normalizeClass(frameClass.value),
3298
- style: normalizeStyle(frameStyle.value)
3299
- }, [__props.loading ? (openBlock(), createElementBlock("div", {
3300
- key: 0,
3301
- "data-part": "skeleton",
3302
- class: normalizeClass(skeletonClass.value),
3303
- "aria-hidden": "true"
3304
- }, null, 2)) : __props.media && isVideo.value ? (openBlock(), createElementBlock("video", mergeProps({
3305
- key: 1,
3306
- "data-part": "media",
3307
- class: mediaClass.value,
3308
- style: mediaStyle.value
3309
- }, forwardedAttrs.value, {
3310
- src: __props.media.src,
3311
- controls: "",
3312
- playsinline: "",
3313
- width: __props.media.width,
3314
- height: __props.media.height
3315
- }), toDisplayString(resolvedAlt.value), 17, _hoisted_1$31)) : __props.media ? (openBlock(), createElementBlock("img", mergeProps({
3316
- key: 2,
3317
- "data-part": "media",
3318
- class: mediaClass.value,
3319
- style: mediaStyle.value
3320
- }, forwardedAttrs.value, {
3321
- src: __props.media.src,
3322
- srcset: __props.media.srcset,
3323
- sizes: resolvedSizes.value,
3324
- alt: resolvedAlt.value,
3325
- width: __props.media.width,
3326
- height: __props.media.height,
3327
- loading: loadingAttr.value,
3328
- decoding: "async",
3329
- fetchpriority: fetchPriority.value
3330
- }), null, 16, _hoisted_2$21)) : (openBlock(), createElementBlock("div", {
3331
- key: 3,
3332
- "data-part": "placeholder",
3333
- class: normalizeClass(placeholderClass.value),
3334
- role: __props.decorative ? void 0 : "img",
3335
- "aria-hidden": __props.decorative ? "true" : void 0,
3336
- "aria-label": __props.decorative ? void 0 : unref(messages).noImageAvailable
3337
- }, [_cache[0] || (_cache[0] = createElementVNode("svg", {
3338
- class: "size-8",
3339
- viewBox: "0 0 24 24",
3340
- fill: "none",
3341
- stroke: "currentColor",
3342
- "stroke-width": "1.25",
3343
- "stroke-linecap": "round",
3344
- "stroke-linejoin": "round",
3345
- "aria-hidden": "true",
3346
- focusable: "false"
3347
- }, [
3348
- createElementVNode("rect", {
3349
- x: "3",
3350
- y: "4",
3351
- width: "18",
3352
- height: "16",
3353
- rx: "2"
3354
- }),
3355
- createElementVNode("circle", {
3356
- cx: "9",
3357
- cy: "10",
3358
- r: "1.75"
3359
- }),
3360
- createElementVNode("path", { d: "M3 17l5.5 -5.5c.83 -.83 1.67 -.83 2.5 0l7 7" }),
3361
- createElementVNode("path", { d: "M14 15l1.5 -1.5c.83 -.83 1.67 -.83 2.5 0l3 3" })
3362
- ], -1)), createElementVNode("span", _hoisted_4$8, toDisplayString(unref(messages).noImage), 1)], 10, _hoisted_3$13))], 6), hasCaption.value ? (openBlock(), createElementBlock("figcaption", {
3363
- key: 0,
3364
- "data-part": "caption",
3365
- class: normalizeClass(captionClass.value)
3366
- }, toDisplayString(__props.caption), 3)) : createCommentVNode("", true)]),
3348
+ default: withCtx(() => [
3349
+ cropScope.value ? (openBlock(), createBlock(resolveDynamicComponent("style"), {
3350
+ key: 0,
3351
+ innerHTML: cropCss.value
3352
+ }, null, 8, ["innerHTML"])) : createCommentVNode("", true),
3353
+ createElementVNode("div", {
3354
+ "data-part": "frame",
3355
+ class: normalizeClass(frameClass.value),
3356
+ style: normalizeStyle(frameStyle.value)
3357
+ }, [__props.loading ? (openBlock(), createElementBlock("div", {
3358
+ key: 0,
3359
+ "data-part": "skeleton",
3360
+ class: normalizeClass(skeletonClass.value),
3361
+ "aria-hidden": "true"
3362
+ }, null, 2)) : __props.media && isVideo.value ? (openBlock(), createElementBlock("video", mergeProps({
3363
+ key: 1,
3364
+ "data-part": "media",
3365
+ class: mediaClass.value,
3366
+ style: mediaStyle.value
3367
+ }, forwardedAttrs.value, {
3368
+ src: __props.media.src,
3369
+ controls: "",
3370
+ playsinline: "",
3371
+ width: __props.media.width,
3372
+ height: __props.media.height
3373
+ }), toDisplayString(resolvedAlt.value), 17, _hoisted_1$31)) : __props.media ? (openBlock(), createElementBlock("img", mergeProps({
3374
+ key: 2,
3375
+ "data-part": "media",
3376
+ class: mediaClass.value,
3377
+ style: mediaStyle.value
3378
+ }, forwardedAttrs.value, {
3379
+ src: __props.media.src,
3380
+ srcset: __props.media.srcset,
3381
+ sizes: resolvedSizes.value,
3382
+ alt: resolvedAlt.value,
3383
+ width: __props.media.width,
3384
+ height: __props.media.height,
3385
+ loading: loadingAttr.value,
3386
+ decoding: "async",
3387
+ fetchpriority: fetchPriority.value
3388
+ }), null, 16, _hoisted_2$21)) : (openBlock(), createElementBlock("div", {
3389
+ key: 3,
3390
+ "data-part": "placeholder",
3391
+ class: normalizeClass(placeholderClass.value),
3392
+ role: __props.decorative ? void 0 : "img",
3393
+ "aria-hidden": __props.decorative ? "true" : void 0,
3394
+ "aria-label": __props.decorative ? void 0 : unref(messages).noImageAvailable
3395
+ }, [_cache[0] || (_cache[0] = createElementVNode("svg", {
3396
+ class: "size-8",
3397
+ viewBox: "0 0 24 24",
3398
+ fill: "none",
3399
+ stroke: "currentColor",
3400
+ "stroke-width": "1.25",
3401
+ "stroke-linecap": "round",
3402
+ "stroke-linejoin": "round",
3403
+ "aria-hidden": "true",
3404
+ focusable: "false"
3405
+ }, [
3406
+ createElementVNode("rect", {
3407
+ x: "3",
3408
+ y: "4",
3409
+ width: "18",
3410
+ height: "16",
3411
+ rx: "2"
3412
+ }),
3413
+ createElementVNode("circle", {
3414
+ cx: "9",
3415
+ cy: "10",
3416
+ r: "1.75"
3417
+ }),
3418
+ createElementVNode("path", { d: "M3 17l5.5 -5.5c.83 -.83 1.67 -.83 2.5 0l7 7" }),
3419
+ createElementVNode("path", { d: "M14 15l1.5 -1.5c.83 -.83 1.67 -.83 2.5 0l3 3" })
3420
+ ], -1)), createElementVNode("span", _hoisted_4$9, toDisplayString(unref(messages).noImage), 1)], 10, _hoisted_3$14))], 6),
3421
+ hasCaption.value ? (openBlock(), createElementBlock("figcaption", {
3422
+ key: 1,
3423
+ "data-part": "caption",
3424
+ class: normalizeClass(captionClass.value)
3425
+ }, toDisplayString(__props.caption), 3)) : createCommentVNode("", true)
3426
+ ]),
3367
3427
  _: 1
3368
- }, 8, ["class", "style"]);
3428
+ }, 8, [
3429
+ "data-eldra-image-crops",
3430
+ "class",
3431
+ "style"
3432
+ ]);
3369
3433
  };
3370
3434
  }
3371
3435
  });
@@ -3556,7 +3620,7 @@ var CUE_ARROW_PATHS = [
3556
3620
  //#region src/components/card/ContentCard.vue?vue&type=script&setup=true&lang.ts
3557
3621
  var _hoisted_1$30 = ["aria-label"];
3558
3622
  var _hoisted_2$20 = ["datetime"];
3559
- var _hoisted_3$12 = ["d"];
3623
+ var _hoisted_3$13 = ["d"];
3560
3624
  //#endregion
3561
3625
  //#region src/components/card/ContentCard.vue
3562
3626
  var ContentCard_default = /* @__PURE__ */ defineComponent({
@@ -3797,7 +3861,7 @@ var ContentCard_default = /* @__PURE__ */ defineComponent({
3797
3861
  return openBlock(), createElementBlock("path", {
3798
3862
  key: d,
3799
3863
  d
3800
- }, null, 8, _hoisted_3$12);
3864
+ }, null, 8, _hoisted_3$13);
3801
3865
  }), 128))], 2))], 2)) : createCommentVNode("", true)
3802
3866
  ], 2)], 2));
3803
3867
  };
@@ -4061,8 +4125,8 @@ function useDialog(options) {
4061
4125
  //#region src/components/dialog/Dialog.vue?vue&type=script&setup=true&lang.ts
4062
4126
  var _hoisted_1$29 = ["aria-labelledby", "aria-describedby"];
4063
4127
  var _hoisted_2$19 = ["id"];
4064
- var _hoisted_3$11 = ["aria-label"];
4065
- var _hoisted_4$7 = ["id"];
4128
+ var _hoisted_3$12 = ["aria-label"];
4129
+ var _hoisted_4$8 = ["id"];
4066
4130
  //#endregion
4067
4131
  //#region src/components/dialog/Dialog.vue
4068
4132
  var Dialog_default = /* @__PURE__ */ defineComponent({
@@ -4202,7 +4266,7 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
4202
4266
  "stroke-linejoin": "round",
4203
4267
  "aria-hidden": "true",
4204
4268
  focusable: "false"
4205
- }, [createElementVNode("path", { d: "M18 6l-12 12" }), createElementVNode("path", { d: "M6 6l12 12" })], -1)])], 10, _hoisted_3$11)], 2),
4269
+ }, [createElementVNode("path", { d: "M18 6l-12 12" }), createElementVNode("path", { d: "M6 6l12 12" })], -1)])], 10, _hoisted_3$12)], 2),
4206
4270
  createElementVNode("div", {
4207
4271
  "data-part": "body",
4208
4272
  class: normalizeClass(bodyClass.value)
@@ -4211,7 +4275,7 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
4211
4275
  id: unref(descriptionId),
4212
4276
  "data-part": "description",
4213
4277
  class: normalizeClass(descriptionClass.value)
4214
- }, toDisplayString(__props.description), 11, _hoisted_4$7)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default")], 2),
4278
+ }, toDisplayString(__props.description), 11, _hoisted_4$8)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default")], 2),
4215
4279
  unref(slots).footer ? (openBlock(), createElementBlock("div", {
4216
4280
  key: 0,
4217
4281
  "data-part": "footer",
@@ -4225,7 +4289,7 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
4225
4289
  //#region src/components/drawer/Drawer.vue?vue&type=script&setup=true&lang.ts
4226
4290
  var _hoisted_1$28 = ["aria-labelledby", "aria-label"];
4227
4291
  var _hoisted_2$18 = ["id"];
4228
- var _hoisted_3$10 = ["aria-label"];
4292
+ var _hoisted_3$11 = ["aria-label"];
4229
4293
  var titleAreaClass = "min-w-0 flex-1";
4230
4294
  //#endregion
4231
4295
  //#region src/components/drawer/Drawer.vue
@@ -4392,7 +4456,7 @@ var Drawer_default = /* @__PURE__ */ defineComponent({
4392
4456
  key: 0,
4393
4457
  "data-part": "count",
4394
4458
  class: normalizeClass(countClass.value)
4395
- }, "(" + toDisplayString(__props.count) + ")", 3)) : createCommentVNode("", true)], 10, _hoisted_2$18)) : createCommentVNode("", true)]), createElementVNode("button", {
4459
+ }, "(" + toDisplayString(__props.count) + ")", 3)) : createCommentVNode("", true)], 10, _hoisted_2$18)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "header")]), createElementVNode("button", {
4396
4460
  ref_key: "closeButtonEl",
4397
4461
  ref: closeButtonEl,
4398
4462
  type: "button",
@@ -4410,7 +4474,7 @@ var Drawer_default = /* @__PURE__ */ defineComponent({
4410
4474
  "stroke-linejoin": "round",
4411
4475
  "aria-hidden": "true",
4412
4476
  focusable: "false"
4413
- }, [createElementVNode("path", { d: "M18 6l-12 12" }), createElementVNode("path", { d: "M6 6l12 12" })], -1)])], 10, _hoisted_3$10)], 2),
4477
+ }, [createElementVNode("path", { d: "M18 6l-12 12" }), createElementVNode("path", { d: "M6 6l12 12" })], -1)])], 10, _hoisted_3$11)], 2),
4414
4478
  createElementVNode("div", {
4415
4479
  "data-part": "body",
4416
4480
  class: normalizeClass(bodyClass.value)
@@ -5618,7 +5682,7 @@ var _hoisted_2$15 = [
5618
5682
  "aria-label",
5619
5683
  "onChange"
5620
5684
  ];
5621
- var _hoisted_3$9 = ["data-part"];
5685
+ var _hoisted_3$10 = ["data-part"];
5622
5686
  var ROWS_BASE = "grid min-w-0 grid-cols-1 gap-x-6 gap-y-0.5 @min-[26rem]:grid-cols-2";
5623
5687
  /**
5624
5688
  * Spec → Sizes, Swatch tile row: "Grid of `repeat(auto-fill, minmax(4.25rem, 1fr))`, gaps 0.75rem
@@ -5814,7 +5878,7 @@ var ColourFacet_default = /* @__PURE__ */ defineComponent({
5814
5878
  createElementVNode("span", {
5815
5879
  "data-part": tiles.value ? "tileLabel" : "rowLabel",
5816
5880
  class: normalizeClass(nameClass(value))
5817
- }, toDisplayString(value.label), 11, _hoisted_3$9),
5881
+ }, toDisplayString(value.label), 11, _hoisted_3$10),
5818
5882
  createElementVNode("span", {
5819
5883
  "data-part": "count",
5820
5884
  class: normalizeClass(countClass.value)
@@ -5831,9 +5895,9 @@ var _hoisted_1$23 = {
5831
5895
  class: "min-w-0"
5832
5896
  };
5833
5897
  var _hoisted_2$14 = ["id"];
5834
- var _hoisted_3$8 = { class: "min-w-0" };
5835
- var _hoisted_4$6 = ["aria-label"];
5836
- var _hoisted_5$5 = { class: "min-w-0" };
5898
+ var _hoisted_3$9 = { class: "min-w-0" };
5899
+ var _hoisted_4$7 = ["aria-label"];
5900
+ var _hoisted_5$6 = { class: "min-w-0" };
5837
5901
  var SEARCH_BASE = "mb-2 w-full";
5838
5902
  /** Spec → Sizes, Facet search: '"No matches" line: 0.875rem `muted`, 0.5rem vertical padding.' */
5839
5903
  var NO_MATCHES_BASE = "text-body-sm text-muted";
@@ -5995,7 +6059,7 @@ var ListFacet_default = /* @__PURE__ */ defineComponent({
5995
6059
  },
5996
6060
  onChange: ($event) => emit("toggle", row.value.value, $event)
5997
6061
  }, {
5998
- default: withCtx(() => [createElementVNode("span", _hoisted_3$8, toDisplayString(row.value.label), 1), createElementVNode("span", {
6062
+ default: withCtx(() => [createElementVNode("span", _hoisted_3$9, toDisplayString(row.value.label), 1), createElementVNode("span", {
5999
6063
  "data-part": "count",
6000
6064
  class: normalizeClass(countClass.value)
6001
6065
  }, toDisplayString(row.value.count), 3)]),
@@ -6026,7 +6090,7 @@ var ListFacet_default = /* @__PURE__ */ defineComponent({
6026
6090
  },
6027
6091
  onChange: ($event) => emit("toggle", child.value, $event)
6028
6092
  }, {
6029
- default: withCtx(() => [createElementVNode("span", _hoisted_5$5, toDisplayString(child.label), 1), createElementVNode("span", {
6093
+ default: withCtx(() => [createElementVNode("span", _hoisted_5$6, toDisplayString(child.label), 1), createElementVNode("span", {
6030
6094
  "data-part": "count",
6031
6095
  class: normalizeClass(countClass.value)
6032
6096
  }, toDisplayString(child.count), 3)]),
@@ -6039,7 +6103,7 @@ var ListFacet_default = /* @__PURE__ */ defineComponent({
6039
6103
  "classes",
6040
6104
  "onChange"
6041
6105
  ]);
6042
- }), 128))], 8, _hoisted_4$6)) : createCommentVNode("", true)], 64);
6106
+ }), 128))], 8, _hoisted_4$7)) : createCommentVNode("", true)], 64);
6043
6107
  }), 128))], 10, _hoisted_2$14),
6044
6108
  createElementVNode("span", {
6045
6109
  "data-part": "noMatches",
@@ -6238,7 +6302,7 @@ function rangeKeyTransition(key, shiftKey, thumb, value, math) {
6238
6302
  //#region src/components/range-slider/RangeSlider.vue?vue&type=script&setup=true&lang.ts
6239
6303
  var _hoisted_1$22 = ["id"];
6240
6304
  var _hoisted_2$13 = ["aria-labelledby"];
6241
- var _hoisted_3$7 = [
6305
+ var _hoisted_3$8 = [
6242
6306
  "data-thumb",
6243
6307
  "data-dragging",
6244
6308
  "aria-label",
@@ -6249,7 +6313,7 @@ var _hoisted_3$7 = [
6249
6313
  "aria-disabled",
6250
6314
  "onKeydown"
6251
6315
  ];
6252
- var _hoisted_4$5 = [
6316
+ var _hoisted_4$6 = [
6253
6317
  "data-input",
6254
6318
  "inputmode",
6255
6319
  "value",
@@ -6782,7 +6846,7 @@ var RangeSlider_default = /* @__PURE__ */ defineComponent({
6782
6846
  onKeydown: ($event) => onThumbKeydown($event, thumb.thumb),
6783
6847
  onKeyup: onThumbKeyup,
6784
6848
  onBlur: onThumbBlur
6785
- }, null, 46, _hoisted_3$7);
6849
+ }, null, 46, _hoisted_3$8);
6786
6850
  }), 128))], 34)], 64)) : createCommentVNode("", true)], 10, _hoisted_2$13),
6787
6851
  __props.inputs ? (openBlock(), createElementBlock("div", {
6788
6852
  key: 1,
@@ -6808,7 +6872,7 @@ var RangeSlider_default = /* @__PURE__ */ defineComponent({
6808
6872
  onFocus: ($event) => onInputFocus(thumb.thumb),
6809
6873
  onBlur: ($event) => onInputBlur(thumb.thumb),
6810
6874
  onKeydown: withKeys(withModifiers(($event) => onInputEnter(thumb.thumb), ["prevent"]), ["enter"])
6811
- }, null, 42, _hoisted_4$5)], 64);
6875
+ }, null, 42, _hoisted_4$6)], 64);
6812
6876
  }), 128))])], 2)) : createCommentVNode("", true)
6813
6877
  ], 2);
6814
6878
  };
@@ -7384,7 +7448,7 @@ var _hoisted_1$20 = {
7384
7448
  class: "min-w-0"
7385
7449
  };
7386
7450
  var _hoisted_2$12 = ["data-value"];
7387
- var _hoisted_3$6 = [
7451
+ var _hoisted_3$7 = [
7388
7452
  "value",
7389
7453
  "checked",
7390
7454
  "disabled",
@@ -7508,7 +7572,7 @@ var SizeFacet_default = /* @__PURE__ */ defineComponent({
7508
7572
  disabled: disabled(value),
7509
7573
  "aria-label": nameOf(value),
7510
7574
  onChange: ($event) => emit("toggle", value.value, $event.target.checked)
7511
- }, null, 40, _hoisted_3$6), createElementVNode("span", {
7575
+ }, null, 40, _hoisted_3$7), createElementVNode("span", {
7512
7576
  "data-part": "tileLabel",
7513
7577
  class: normalizeClass(tileLabelClass.value),
7514
7578
  "aria-hidden": "true"
@@ -7618,13 +7682,13 @@ var ToggleFacet_default = /* @__PURE__ */ defineComponent({
7618
7682
  //#region src/components/filter-panel/FilterGroup.vue?vue&type=script&setup=true&lang.ts
7619
7683
  var _hoisted_1$18 = ["data-facet"];
7620
7684
  var _hoisted_2$11 = { class: "m-0" };
7621
- var _hoisted_3$5 = [
7685
+ var _hoisted_3$6 = [
7622
7686
  "id",
7623
7687
  "aria-expanded",
7624
7688
  "aria-controls"
7625
7689
  ];
7626
- var _hoisted_4$4 = { "aria-hidden": "true" };
7627
- var _hoisted_5$4 = ["id"];
7690
+ var _hoisted_4$5 = { "aria-hidden": "true" };
7691
+ var _hoisted_5$5 = ["id"];
7628
7692
  var GROUP_BASE = "border-border border-b";
7629
7693
  /**
7630
7694
  * Spec → Sizes, Trigger row: "Full width, min 3rem tall, padding 0.75rem 0, gap 0.5rem,
@@ -7755,7 +7819,7 @@ var FilterGroup_default = /* @__PURE__ */ defineComponent({
7755
7819
  classes: { root: badgeClass.value },
7756
7820
  "hidden-suffix": unref(m).selectedCount(__props.count)
7757
7821
  }, {
7758
- default: withCtx(() => [createElementVNode("span", _hoisted_4$4, toDisplayString(__props.count), 1)]),
7822
+ default: withCtx(() => [createElementVNode("span", _hoisted_4$5, toDisplayString(__props.count), 1)]),
7759
7823
  _: 1
7760
7824
  }, 8, ["classes", "hidden-suffix"])) : createCommentVNode("", true),
7761
7825
  __props.summary.length > 0 ? (openBlock(), createElementBlock("span", {
@@ -7775,7 +7839,7 @@ var FilterGroup_default = /* @__PURE__ */ defineComponent({
7775
7839
  "aria-hidden": "true",
7776
7840
  focusable: "false"
7777
7841
  }, [..._cache[1] || (_cache[1] = [createElementVNode("path", { d: "M6 9l6 6l6 -6" }, null, -1)])], 2))
7778
- ], 10, _hoisted_3$5)]), withDirectives(createElementVNode("fieldset", {
7842
+ ], 10, _hoisted_3$6)]), withDirectives(createElementVNode("fieldset", {
7779
7843
  "data-part": "body",
7780
7844
  id: __props.panelId,
7781
7845
  class: normalizeClass(bodyClass.value),
@@ -7786,7 +7850,7 @@ var FilterGroup_default = /* @__PURE__ */ defineComponent({
7786
7850
  }, {
7787
7851
  default: withCtx(() => [createTextVNode(toDisplayString(__props.facet.label), 1)]),
7788
7852
  _: 1
7789
- }, 8, ["classes"]), renderSlot(_ctx.$slots, "default")], 42, _hoisted_5$4), [[vShow, __props.open]])], 10, _hoisted_1$18);
7853
+ }, 8, ["classes"]), renderSlot(_ctx.$slots, "default")], 42, _hoisted_5$5), [[vShow, __props.open]])], 10, _hoisted_1$18);
7790
7854
  };
7791
7855
  }
7792
7856
  });
@@ -8226,11 +8290,11 @@ var FilterPanel_default = /* @__PURE__ */ defineComponent({
8226
8290
  //#region src/components/lightbox/Lightbox.vue?vue&type=script&setup=true&lang.ts
8227
8291
  var _hoisted_1$16 = ["aria-label"];
8228
8292
  var _hoisted_2$9 = { key: 1 };
8229
- var _hoisted_3$4 = ["aria-label"];
8230
- var _hoisted_4$3 = ["disabled", "aria-label"];
8231
- var _hoisted_5$3 = ["aria-label"];
8232
- var _hoisted_6 = ["disabled", "aria-label"];
8233
- var _hoisted_7 = [
8293
+ var _hoisted_3$5 = ["aria-label"];
8294
+ var _hoisted_4$4 = ["disabled", "aria-label"];
8295
+ var _hoisted_5$4 = ["aria-label"];
8296
+ var _hoisted_6$2 = ["disabled", "aria-label"];
8297
+ var _hoisted_7$1 = [
8234
8298
  "aria-current",
8235
8299
  "aria-label",
8236
8300
  "onClick"
@@ -8520,7 +8584,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
8520
8584
  "stroke-linejoin": "round",
8521
8585
  "aria-hidden": "true",
8522
8586
  focusable: "false"
8523
- }, [createElementVNode("path", { d: "M18 6l-12 12" }), createElementVNode("path", { d: "M6 6l12 12" })], -1)])], 10, _hoisted_3$4)]),
8587
+ }, [createElementVNode("path", { d: "M18 6l-12 12" }), createElementVNode("path", { d: "M6 6l12 12" })], -1)])], 10, _hoisted_3$5)]),
8524
8588
  createElementVNode("div", { class: normalizeClass(stageClass.value) }, [
8525
8589
  !single.value ? (openBlock(), createElementBlock("button", {
8526
8590
  key: 0,
@@ -8542,7 +8606,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
8542
8606
  "stroke-linejoin": "round",
8543
8607
  "aria-hidden": "true",
8544
8608
  focusable: "false"
8545
- }, [createElementVNode("path", { d: "M15 6l-6 6l6 6" })], -1)])], 10, _hoisted_4$3)) : createCommentVNode("", true),
8609
+ }, [createElementVNode("path", { d: "M15 6l-6 6l6 6" })], -1)])], 10, _hoisted_4$4)) : createCommentVNode("", true),
8546
8610
  createElementVNode("div", {
8547
8611
  ref_key: "trackRef",
8548
8612
  ref: trackRef,
@@ -8581,7 +8645,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
8581
8645
  "alt",
8582
8646
  "caption"
8583
8647
  ])) : createCommentVNode("", true)], 2);
8584
- }), 128))], 14, _hoisted_5$3),
8648
+ }), 128))], 14, _hoisted_5$4),
8585
8649
  !single.value ? (openBlock(), createElementBlock("button", {
8586
8650
  key: 1,
8587
8651
  ref_key: "nextButtonRef",
@@ -8602,7 +8666,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
8602
8666
  "stroke-linejoin": "round",
8603
8667
  "aria-hidden": "true",
8604
8668
  focusable: "false"
8605
- }, [createElementVNode("path", { d: "M9 6l6 6l-6 6" })], -1)])], 10, _hoisted_6)) : createCommentVNode("", true)
8669
+ }, [createElementVNode("path", { d: "M9 6l6 6l-6 6" })], -1)])], 10, _hoisted_6$2)) : createCommentVNode("", true)
8606
8670
  ], 2),
8607
8671
  showThumbnails.value && unref(model) ? (openBlock(), createElementBlock("div", {
8608
8672
  key: 0,
@@ -8625,7 +8689,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
8625
8689
  decorative: "",
8626
8690
  ratio: "1x1",
8627
8691
  fit: "cover"
8628
- }, null, 8, ["media"])], 10, _hoisted_7);
8692
+ }, null, 8, ["media"])], 10, _hoisted_7$1);
8629
8693
  }), 128))], 2)) : createCommentVNode("", true)
8630
8694
  ], 2)], 42, _hoisted_1$16);
8631
8695
  };
@@ -8724,7 +8788,7 @@ var _hoisted_2$7 = [
8724
8788
  "height",
8725
8789
  "alt"
8726
8790
  ];
8727
- var _hoisted_3$3 = [
8791
+ var _hoisted_3$4 = [
8728
8792
  "src",
8729
8793
  "srcset",
8730
8794
  "sizes",
@@ -8872,7 +8936,7 @@ var LogoItem_default = /* @__PURE__ */ defineComponent({
8872
8936
  alt: __props.name,
8873
8937
  loading: "lazy",
8874
8938
  decoding: "async"
8875
- }, null, 10, _hoisted_3$3)) : (openBlock(), createElementBlock("span", {
8939
+ }, null, 10, _hoisted_3$4)) : (openBlock(), createElementBlock("span", {
8876
8940
  key: 1,
8877
8941
  "data-part": "wordmark",
8878
8942
  class: normalizeClass(wordmarkClass.value)
@@ -8945,8 +9009,13 @@ function navLinkAttrs(link, linkAs) {
8945
9009
  }
8946
9010
  //#endregion
8947
9011
  //#region src/components/nav-menu/NavMenuPanel.vue?vue&type=script&setup=true&lang.ts
8948
- var _hoisted_1$13 = ["id"];
8949
- var _hoisted_2$6 = ["aria-labelledby"];
9012
+ var _hoisted_1$13 = ["data-part"];
9013
+ var _hoisted_2$6 = ["data-part"];
9014
+ var _hoisted_3$3 = ["id", "data-part"];
9015
+ var _hoisted_4$3 = ["data-part", "aria-labelledby"];
9016
+ var _hoisted_5$3 = ["data-part"];
9017
+ var _hoisted_6$1 = ["data-part"];
9018
+ var _hoisted_7 = ["data-part"];
8950
9019
  //#endregion
8951
9020
  //#region src/components/nav-menu/NavMenuPanel.vue
8952
9021
  var NavMenuPanel_default = /* @__PURE__ */ defineComponent({
@@ -8958,7 +9027,8 @@ var NavMenuPanel_default = /* @__PURE__ */ defineComponent({
8958
9027
  variant: {},
8959
9028
  messages: {},
8960
9029
  linkAs: {},
8961
- classes: {}
9030
+ classes: {},
9031
+ labelledBy: {}
8962
9032
  },
8963
9033
  setup(__props) {
8964
9034
  const props = __props;
@@ -8967,6 +9037,13 @@ var NavMenuPanel_default = /* @__PURE__ */ defineComponent({
8967
9037
  const grouped = computed(() => groups.value.some((group) => group.group !== null));
8968
9038
  const mega = computed(() => props.placement === "bar" && panelLayout(props.item) === "mega");
8969
9039
  const bar = computed(() => props.placement === "bar");
9040
+ /** A part's name where it is drawn, so the bar's panels and the drawer's are styled apart. */
9041
+ function part(name) {
9042
+ return bar.value ? name : `drawer${name.charAt(0).toUpperCase()}${name.slice(1)}`;
9043
+ }
9044
+ function panelPartClass(base, name) {
9045
+ return partClass(base, props.classes, part(name));
9046
+ }
8970
9047
  /** A bar entry's colour at rest, and what a link adds on hover and as the current page. */
8971
9048
  const BAR_ENTRY = {
8972
9049
  ghost: "text-text",
@@ -8979,26 +9056,32 @@ var NavMenuPanel_default = /* @__PURE__ */ defineComponent({
8979
9056
  function headingId(index) {
8980
9057
  return `${props.idPrefix}-group-${index}`;
8981
9058
  }
8982
- const overviewClass = computed(() => partClass(cx("flex rounded-md text-body font-semibold eldra-focus", bar.value ? cx("mb-2 px-3 py-2", BAR_ENTRY[props.variant], BAR_LINK[props.variant]) : "py-2.5 text-text", CURRENT_PAGE), props.classes, "overview"));
9059
+ const overviewClass = computed(() => panelPartClass(cx("flex rounded-md text-body font-semibold eldra-focus", bar.value ? cx("mb-2 px-3 py-2", BAR_ENTRY[props.variant], BAR_LINK[props.variant]) : "py-2.5 text-text", CURRENT_PAGE), "overview"));
8983
9060
  const columnsClass = computed(() => {
8984
- if (!grouped.value) return partClass("", props.classes, "columns");
8985
- return partClass(bar.value ? "grid eldra-nav-menu-columns gap-6" : "flex flex-col gap-4", props.classes, "columns");
9061
+ if (!grouped.value) return panelPartClass("", "columns");
9062
+ return panelPartClass(bar.value ? "grid eldra-nav-menu-columns gap-6" : "flex flex-col gap-4", "columns");
8986
9063
  });
8987
- const groupClass = computed(() => partClass("flex min-w-0 flex-col", props.classes, "group"));
8988
- const groupHeadingClass = computed(() => partClass(cx("pb-1 text-overline text-muted", bar.value && "px-3"), props.classes, "groupHeading"));
8989
- const panelListClass = computed(() => partClass(mega.value && !grouped.value ? "grid eldra-nav-menu-columns gap-x-6 gap-y-0.5" : "flex flex-col gap-0.5", props.classes, "panelList"));
8990
- const panelItemClass = computed(() => partClass("", props.classes, "panelItem"));
9064
+ const groupClass = computed(() => panelPartClass("flex min-w-0 flex-col", "group"));
9065
+ const groupHeadingClass = computed(() => panelPartClass(cx("pb-1 text-overline text-muted", bar.value && "px-3"), "groupHeading"));
9066
+ const panelListClass = computed(() => panelPartClass(mega.value && !grouped.value ? "grid eldra-nav-menu-columns gap-x-6 gap-y-0.5" : "flex flex-col gap-0.5", "panelList"));
9067
+ const panelItemClass = computed(() => panelPartClass("", "panelItem"));
8991
9068
  function panelLinkClass(link) {
8992
- return partClass(cx("flex flex-col gap-0.5 rounded-md", bar.value ? cx("px-3 py-2", BAR_ENTRY[props.variant]) : "py-2.5 text-text", hasHref(link) && "eldra-focus", hasHref(link) && bar.value && BAR_LINK[props.variant], CURRENT_PAGE), props.classes, "panelLink");
9069
+ return panelPartClass(cx("flex flex-col gap-0.5 rounded-md", bar.value ? cx("px-3 py-2", BAR_ENTRY[props.variant]) : "py-2.5 text-text", hasHref(link) && "eldra-focus", hasHref(link) && bar.value && BAR_LINK[props.variant], CURRENT_PAGE), "panelLink");
9070
+ }
9071
+ const panelLabelClass = computed(() => panelPartClass("flex flex-wrap items-center gap-x-2 gap-y-1 text-body font-medium", "panelLabel"));
9072
+ const descriptionClass = computed(() => panelPartClass("text-body-sm text-muted", "description"));
9073
+ const badgeClasses = computed(() => {
9074
+ const badge = props.classes?.[part("badge")];
9075
+ return badge === void 0 ? void 0 : { root: badge };
9076
+ });
9077
+ function listLabel(group, index) {
9078
+ return group !== null ? headingId(index) : props.labelledBy;
8993
9079
  }
8994
- const panelLabelClass = computed(() => partClass("flex flex-wrap items-center gap-x-2 gap-y-1 text-body font-medium", props.classes, "panelLabel"));
8995
- const descriptionClass = computed(() => partClass("text-body-sm text-muted", props.classes, "description"));
8996
- const badgeClasses = computed(() => props.classes?.badge === void 0 ? void 0 : { root: props.classes.badge });
8997
9080
  return (_ctx, _cache) => {
8998
9081
  return openBlock(), createElementBlock(Fragment, null, [unref(hasHref)(__props.item) ? (openBlock(), createBlock(resolveDynamicComponent(unref(navLinkTag)(__props.item, __props.linkAs)), mergeProps({
8999
9082
  key: 0,
9000
9083
  "data-eldra-ui": "",
9001
- "data-part": "overview",
9084
+ "data-part": part("overview"),
9002
9085
  class: overviewClass.value
9003
9086
  }, unref(navLinkAttrs)(__props.item, __props.linkAs)), {
9004
9087
  default: withCtx(() => [createTextVNode(toDisplayString(__props.messages.navMenuOverview(__props.item.label ?? "")) + " ", 1), __props.item.newTab ? (openBlock(), createBlock(VisuallyHidden_default, { key: 0 }, {
@@ -9006,59 +9089,61 @@ var NavMenuPanel_default = /* @__PURE__ */ defineComponent({
9006
9089
  _: 1
9007
9090
  })) : createCommentVNode("", true)]),
9008
9091
  _: 1
9009
- }, 16, ["class"])) : createCommentVNode("", true), createElementVNode("div", {
9092
+ }, 16, ["data-part", "class"])) : createCommentVNode("", true), createElementVNode("div", {
9010
9093
  "data-eldra-ui": "",
9011
- "data-part": "columns",
9094
+ "data-part": part("columns"),
9012
9095
  class: normalizeClass(columnsClass.value)
9013
9096
  }, [(openBlock(true), createElementBlock(Fragment, null, renderList(groups.value, (group, index) => {
9014
9097
  return openBlock(), createElementBlock("div", {
9015
9098
  key: index,
9016
- "data-part": "group",
9099
+ "data-part": part("group"),
9017
9100
  class: normalizeClass(groupClass.value)
9018
9101
  }, [group.group !== null ? (openBlock(), createElementBlock("span", {
9019
9102
  key: 0,
9020
9103
  id: headingId(index),
9021
- "data-part": "groupHeading",
9104
+ "data-part": part("groupHeading"),
9022
9105
  class: normalizeClass(groupHeadingClass.value)
9023
9106
  }, [renderSlot(_ctx.$slots, "groupHeading", {
9024
9107
  group: group.group,
9025
9108
  links: group.links,
9026
- item: __props.item
9027
- }, () => [createTextVNode(toDisplayString(group.group), 1)])], 10, _hoisted_1$13)) : createCommentVNode("", true), createElementVNode("ul", {
9028
- "data-part": "panelList",
9109
+ item: __props.item,
9110
+ placement: __props.placement
9111
+ }, () => [createTextVNode(toDisplayString(group.group), 1)])], 10, _hoisted_3$3)) : createCommentVNode("", true), createElementVNode("ul", {
9112
+ "data-part": part("panelList"),
9029
9113
  class: normalizeClass(panelListClass.value),
9030
- "aria-labelledby": group.group !== null ? headingId(index) : void 0
9114
+ "aria-labelledby": listLabel(group.group, index)
9031
9115
  }, [(openBlock(true), createElementBlock(Fragment, null, renderList(group.links, (link, at) => {
9032
9116
  return openBlock(), createElementBlock("li", {
9033
9117
  key: at,
9034
- "data-part": "panelItem",
9118
+ "data-part": part("panelItem"),
9035
9119
  class: normalizeClass(panelItemClass.value)
9036
9120
  }, [(openBlock(), createBlock(resolveDynamicComponent(unref(navLinkTag)(link, __props.linkAs)), mergeProps({
9037
- "data-part": "panelLink",
9121
+ "data-part": part("panelLink"),
9038
9122
  class: panelLinkClass(link)
9039
9123
  }, { ref_for: true }, unref(navLinkAttrs)(link, __props.linkAs)), {
9040
9124
  default: withCtx(() => [renderSlot(_ctx.$slots, "panelItem", {
9041
9125
  link,
9042
- item: __props.item
9126
+ item: __props.item,
9127
+ placement: __props.placement
9043
9128
  }, () => [createElementVNode("span", {
9044
- "data-part": "panelLabel",
9129
+ "data-part": part("panelLabel"),
9045
9130
  class: normalizeClass(panelLabelClass.value)
9046
9131
  }, [createTextVNode(toDisplayString(link.label) + " ", 1), link.badge ? (openBlock(), createBlock(Badge_default, {
9047
9132
  key: 0,
9048
9133
  label: link.badge,
9049
9134
  classes: badgeClasses.value
9050
- }, null, 8, ["label", "classes"])) : createCommentVNode("", true)], 2), link.description ? (openBlock(), createElementBlock("span", {
9135
+ }, null, 8, ["label", "classes"])) : createCommentVNode("", true)], 10, _hoisted_6$1), link.description ? (openBlock(), createElementBlock("span", {
9051
9136
  key: 0,
9052
- "data-part": "description",
9137
+ "data-part": part("description"),
9053
9138
  class: normalizeClass(descriptionClass.value)
9054
- }, toDisplayString(link.description), 3)) : createCommentVNode("", true)]), link.newTab && unref(hasHref)(link) ? (openBlock(), createBlock(VisuallyHidden_default, { key: 0 }, {
9139
+ }, toDisplayString(link.description), 11, _hoisted_7)) : createCommentVNode("", true)]), link.newTab && unref(hasHref)(link) ? (openBlock(), createBlock(VisuallyHidden_default, { key: 0 }, {
9055
9140
  default: withCtx(() => [createTextVNode(toDisplayString(__props.messages.opensInNewTab), 1)]),
9056
9141
  _: 1
9057
9142
  })) : createCommentVNode("", true)]),
9058
9143
  _: 2
9059
- }, 1040, ["class"]))], 2);
9060
- }), 128))], 10, _hoisted_2$6)], 2);
9061
- }), 128))], 2)], 64);
9144
+ }, 1040, ["data-part", "class"]))], 10, _hoisted_5$3);
9145
+ }), 128))], 10, _hoisted_4$3)], 10, _hoisted_2$6);
9146
+ }), 128))], 10, _hoisted_1$13)], 64);
9062
9147
  };
9063
9148
  }
9064
9149
  });
@@ -9192,6 +9277,7 @@ var _hoisted_4$2 = [
9192
9277
  "aria-controls"
9193
9278
  ];
9194
9279
  var _hoisted_5$2 = ["aria-label"];
9280
+ var _hoisted_6 = ["id"];
9195
9281
  var HOVER_INTENT_MS = 150;
9196
9282
  var HOVER_FILL = "hover:bg-[color-mix(in_oklab,var(--eldra-color-text),transparent_94%)]";
9197
9283
  /** A top-level entry's colours at rest, hovered, open (`aria-expanded`) and current. */
@@ -9211,6 +9297,8 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
9211
9297
  ariaLabel: { default: void 0 },
9212
9298
  collapseBelow: { default: "lg" },
9213
9299
  drawerSide: { default: "left" },
9300
+ drawerLayout: { default: "accordion" },
9301
+ drawerItems: { default: void 0 },
9214
9302
  openOnHover: {
9215
9303
  type: Boolean,
9216
9304
  default: false
@@ -9231,10 +9319,14 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
9231
9319
  } }, (_event, value) => emit("update:drawerOpen", value), () => false);
9232
9320
  const baseId = useUiId("nav-menu");
9233
9321
  const navLabel = computed(() => props.ariaLabel ?? m.value.navMenuLabel);
9234
- const entries = computed(() => props.items.map((item, index) => ({
9235
- item,
9236
- index
9237
- })).filter((entry) => isRenderableLink(entry.item)));
9322
+ function renderableEntries(items) {
9323
+ return items.map((item, index) => ({
9324
+ item,
9325
+ index
9326
+ })).filter((entry) => isRenderableLink(entry.item));
9327
+ }
9328
+ const entries = computed(() => renderableEntries(props.items));
9329
+ const drawerEntries = computed(() => renderableEntries(props.drawerItems ?? props.items));
9238
9330
  function panelId(index) {
9239
9331
  return `${baseId.value}-panel-${index}`;
9240
9332
  }
@@ -9384,7 +9476,7 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
9384
9476
  const linkClass = computed(() => partClass(cx(TOP_LEVEL, ENTRY_VARIANT[props.variant], CURRENT_PAGE), props.classes, "link"));
9385
9477
  const triggerClass = computed(() => partClass(cx(TOP_LEVEL, ENTRY_VARIANT[props.variant], "data-[current]:underline data-[current]:decoration-2 data-[current]:underline-offset-[0.2em]"), props.classes, "trigger"));
9386
9478
  function triggerIconClass(open) {
9387
- return partClass(cx("size-4 shrink-0 transition-[rotate] duration-fast ease-out motion-reduce:transition-none", open && "rotate-180"), props.classes, "triggerIcon");
9479
+ return partClass(cx("inline-flex size-4 shrink-0 items-center justify-center", "transition-[rotate] duration-fast ease-out motion-reduce:transition-none", open && "rotate-180"), props.classes, "triggerIcon");
9388
9480
  }
9389
9481
  function panelClass(item) {
9390
9482
  return partClass(cx("absolute top-full z-popover eldra-nav-menu-panel", panelLayout(item) === "mega" ? "inset-x-0" : "start-0"), props.classes, "panel");
@@ -9396,13 +9488,21 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
9396
9488
  const toggleClass = computed(() => partClass(cx("inline-flex size-10 max-md:size-11 shrink-0 cursor-pointer items-center justify-center", "rounded-md text-text eldra-focus", HOVER_FILL, props.collapseBelow === "never" ? "" : TOGGLE_DISPLAY[props.collapseBelow]), props.classes, "toggle"));
9397
9489
  const toggleIconClass = computed(() => partClass("size-5", props.classes, "toggleIcon"));
9398
9490
  const drawerClasses = computed(() => ({
9491
+ root: props.classes?.drawerRoot,
9399
9492
  panel: props.classes?.drawer,
9493
+ header: props.classes?.drawerHeader,
9494
+ close: props.classes?.drawerClose,
9495
+ body: props.classes?.drawerBody,
9400
9496
  footer: props.classes?.drawerFooter
9401
9497
  }));
9498
+ const sections = computed(() => props.drawerLayout === "sections");
9402
9499
  const drawerListClass = computed(() => partClass("flex flex-col border-t border-border", props.classes, "drawerList"));
9403
9500
  function drawerItemClass(item) {
9404
- return partClass(hasPanel(item) ? "" : "border-b border-border", props.classes, "drawerItem");
9501
+ if (!hasPanel(item)) return partClass("border-b border-border", props.classes, "drawerItem");
9502
+ const section = sections.value ? "flex flex-col border-b border-border pt-4 pb-2" : "";
9503
+ return partClass(section, props.classes, "drawerItem");
9405
9504
  }
9505
+ const drawerSectionHeadingClass = computed(() => partClass("pb-1 text-overline text-muted", props.classes, "drawerSectionHeading"));
9406
9506
  const drawerLinkClass = computed(() => partClass(cx("flex min-h-14 w-full items-center rounded-sm py-4", "text-accordion-title text-text eldra-focus", CURRENT_PAGE), props.classes, "drawerLink"));
9407
9507
  const accordionClasses = computed(() => ({
9408
9508
  summary: props.classes?.drawerTrigger,
@@ -9443,18 +9543,23 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
9443
9543
  onClick: ($event) => onTriggerClick(index),
9444
9544
  onPointerenter: ($event) => onTriggerPointerEnter(index, $event),
9445
9545
  onPointerleave: onTriggerPointerLeave
9446
- }, [createElementVNode("span", null, toDisplayString(item.label), 1), (openBlock(), createElementBlock("svg", {
9546
+ }, [createElementVNode("span", null, toDisplayString(item.label), 1), createElementVNode("span", {
9447
9547
  "data-part": "triggerIcon",
9448
9548
  class: normalizeClass(triggerIconClass(unref(openIndex) === index)),
9549
+ "aria-hidden": "true"
9550
+ }, [renderSlot(_ctx.$slots, "triggerIcon", {
9551
+ item,
9552
+ open: unref(openIndex) === index
9553
+ }, () => [_cache[3] || (_cache[3] = createElementVNode("svg", {
9554
+ class: "size-full",
9449
9555
  viewBox: "0 0 24 24",
9450
9556
  fill: "none",
9451
9557
  stroke: "currentColor",
9452
9558
  "stroke-width": "1.75",
9453
9559
  "stroke-linecap": "round",
9454
9560
  "stroke-linejoin": "round",
9455
- "aria-hidden": "true",
9456
9561
  focusable: "false"
9457
- }, [..._cache[3] || (_cache[3] = [createElementVNode("path", { d: "M6 9l6 6l6 -6" }, null, -1)])], 2))], 42, _hoisted_2$5), createVNode(Transition, mergeProps({ ref_for: true }, PANEL_TRANSITION), {
9562
+ }, [createElementVNode("path", { d: "M6 9l6 6l6 -6" })], -1))])], 2)], 42, _hoisted_2$5), createVNode(Transition, mergeProps({ ref_for: true }, PANEL_TRANSITION), {
9458
9563
  default: withCtx(() => [withDirectives(createElementVNode("div", {
9459
9564
  id: panelId(index),
9460
9565
  ref_for: true,
@@ -9544,20 +9649,49 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
9544
9649
  messages: __props.messages,
9545
9650
  classes: drawerClasses.value
9546
9651
  }, createSlots({
9547
- default: withCtx(() => [entries.value.length > 0 ? (openBlock(), createElementBlock("nav", {
9652
+ default: withCtx(() => [drawerEntries.value.length > 0 ? (openBlock(), createElementBlock("nav", {
9548
9653
  key: 0,
9549
9654
  "aria-label": navLabel.value,
9550
9655
  onClick: onDrawerClick
9551
9656
  }, [createElementVNode("ul", {
9552
9657
  "data-part": "drawerList",
9553
9658
  class: normalizeClass(drawerListClass.value)
9554
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(entries.value, ({ item, index }) => {
9659
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(drawerEntries.value, ({ item, index }) => {
9555
9660
  return openBlock(), createElementBlock("li", {
9556
9661
  key: index,
9557
9662
  "data-part": "drawerItem",
9558
9663
  class: normalizeClass(drawerItemClass(item))
9559
- }, [unref(hasPanel)(item) ? (openBlock(), createBlock(AccordionItem_default, {
9560
- key: 0,
9664
+ }, [unref(hasPanel)(item) && sections.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("span", {
9665
+ id: `${panelId(index)}-drawer-heading`,
9666
+ "data-part": "drawerSectionHeading",
9667
+ class: normalizeClass(drawerSectionHeadingClass.value)
9668
+ }, toDisplayString(item.label), 11, _hoisted_6), createVNode(NavMenuPanel_default, {
9669
+ item,
9670
+ "id-prefix": `${panelId(index)}-drawer`,
9671
+ placement: "drawer",
9672
+ variant: __props.variant,
9673
+ messages: unref(m),
9674
+ "link-as": __props.linkAs,
9675
+ classes: __props.classes,
9676
+ "labelled-by": `${panelId(index)}-drawer-heading`
9677
+ }, createSlots({ _: 2 }, [unref(slots).panelItem ? {
9678
+ name: "panelItem",
9679
+ fn: withCtx((scope) => [renderSlot(_ctx.$slots, "panelItem", mergeProps({ ref_for: true }, scope))]),
9680
+ key: "0"
9681
+ } : void 0, unref(slots).groupHeading ? {
9682
+ name: "groupHeading",
9683
+ fn: withCtx((scope) => [renderSlot(_ctx.$slots, "groupHeading", mergeProps({ ref_for: true }, scope))]),
9684
+ key: "1"
9685
+ } : void 0]), 1032, [
9686
+ "item",
9687
+ "id-prefix",
9688
+ "variant",
9689
+ "messages",
9690
+ "link-as",
9691
+ "classes",
9692
+ "labelled-by"
9693
+ ])], 64)) : unref(hasPanel)(item) ? (openBlock(), createBlock(AccordionItem_default, {
9694
+ key: 1,
9561
9695
  title: item.label ?? "",
9562
9696
  classes: accordionClasses.value
9563
9697
  }, {
@@ -9587,7 +9721,7 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
9587
9721
  ])]),
9588
9722
  _: 2
9589
9723
  }, 1032, ["title", "classes"])) : (openBlock(), createBlock(resolveDynamicComponent(unref(navLinkTag)(item, __props.linkAs)), mergeProps({
9590
- key: 1,
9724
+ key: 2,
9591
9725
  "data-part": "drawerLink",
9592
9726
  class: drawerLinkClass.value
9593
9727
  }, { ref_for: true }, unref(navLinkAttrs)(item, __props.linkAs)), {
@@ -9599,10 +9733,14 @@ var NavMenu_default = /* @__PURE__ */ defineComponent({
9599
9733
  }, 1040, ["class"]))], 2);
9600
9734
  }), 128))], 2)], 8, _hoisted_5$2)) : createCommentVNode("", true)]),
9601
9735
  _: 2
9602
- }, [unref(slots).drawerFooter ? {
9736
+ }, [unref(slots).drawerHeader ? {
9737
+ name: "header",
9738
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "drawerHeader", { close: closeDrawer })]),
9739
+ key: "0"
9740
+ } : void 0, unref(slots).drawerFooter ? {
9603
9741
  name: "footer",
9604
9742
  fn: withCtx(() => [renderSlot(_ctx.$slots, "drawerFooter", { close: closeDrawer })]),
9605
- key: "0"
9743
+ key: "1"
9606
9744
  } : void 0]), 1032, [
9607
9745
  "id",
9608
9746
  "modelValue",