@mond-design-system/react 3.0.2 → 4.0.0

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.cjs CHANGED
@@ -81,7 +81,7 @@ function Heading({
81
81
  var Spinner_module_default = { "spinner": "mds-Spinner__spinner"};
82
82
  function Spinner({
83
83
  size = 20,
84
- label = "Loading",
84
+ label,
85
85
  className,
86
86
  style,
87
87
  ...rest
@@ -130,11 +130,13 @@ function Icon({ name, size, label, className, ...rest }) {
130
130
  }
131
131
 
132
132
  // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Button/Button.module.css?mds-scoped
133
- var Button_module_default = { "button": "mds-Button__button", "size-sm": "mds-Button__size-sm", "size-md": "mds-Button__size-md", "size-lg": "mds-Button__size-lg", "slot": "mds-Button__slot", "variant-primary": "mds-Button__variant-primary", "variant-secondary": "mds-Button__variant-secondary", "variant-ghost": "mds-Button__variant-ghost", "variant-highlight": "mds-Button__variant-highlight", "variant-danger": "mds-Button__variant-danger", "variant-warning": "mds-Button__variant-warning", "fullWidth": "mds-Button__fullWidth", "icon-only": "mds-Button__icon-only" };
133
+ var Button_module_default = { "button": "mds-Button__button", "size-sm": "mds-Button__size-sm", "size-md": "mds-Button__size-md", "size-lg": "mds-Button__size-lg", "slot": "mds-Button__slot", "variant-primary": "mds-Button__variant-primary", "variant-secondary": "mds-Button__variant-secondary", "variant-ghost": "mds-Button__variant-ghost", "variant-highlight": "mds-Button__variant-highlight", "variant-danger": "mds-Button__variant-danger", "variant-warning": "mds-Button__variant-warning", "fullWidth": "mds-Button__fullWidth", "icon-only": "mds-Button__icon-only", "on-media": "mds-Button__on-media", "shape-rect": "mds-Button__shape-rect", "shape-pill": "mds-Button__shape-pill" };
134
134
  var ICON_PX = { sm: 16, md: 20, lg: 24 };
135
135
  function Button({
136
136
  variant = "primary",
137
137
  size = "md",
138
+ shape,
139
+ onMedia = false,
138
140
  iconLeft,
139
141
  iconRight,
140
142
  loading = false,
@@ -160,6 +162,8 @@ function Button({
160
162
  Button_module_default[`size-${size}`],
161
163
  fullWidth && Button_module_default.fullWidth,
162
164
  iconOnly && Button_module_default["icon-only"],
165
+ shape !== void 0 && Button_module_default[`shape-${shape}`],
166
+ onMedia && Button_module_default["on-media"],
163
167
  className
164
168
  ),
165
169
  "aria-busy": loading || void 0,
@@ -250,6 +254,7 @@ function AvatarGroup({
250
254
  children,
251
255
  max = 4,
252
256
  size = "md",
257
+ overflowLabel,
253
258
  className,
254
259
  ...rest
255
260
  }) {
@@ -262,7 +267,7 @@ function AvatarGroup({
262
267
  "span",
263
268
  {
264
269
  className: cx(AvatarGroup_module_default.item, AvatarGroup_module_default.overflow, AvatarGroup_module_default[`size-${size}`]),
265
- "aria-label": `${hidden} more`,
270
+ "aria-label": overflowLabel(hidden),
266
271
  children: [
267
272
  "+",
268
273
  hidden
@@ -288,6 +293,7 @@ function Chip({
288
293
  onClick,
289
294
  disabled = false,
290
295
  className,
296
+ ref,
291
297
  ...rest
292
298
  }) {
293
299
  const interactive = typeof onClick === "function";
@@ -313,10 +319,11 @@ function Chip({
313
319
  onClick,
314
320
  disabled,
315
321
  "aria-pressed": selected === void 0 ? void 0 : selected,
322
+ ref,
316
323
  ...shared,
317
324
  children: content
318
325
  }
319
- ) : /* @__PURE__ */ jsxRuntime.jsx("span", { ...shared, children: content });
326
+ ) : /* @__PURE__ */ jsxRuntime.jsx("span", { ref, ...shared, children: content });
320
327
  }
321
328
 
322
329
  // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Chip/ChipGroup.module.css?mds-scoped
@@ -377,6 +384,102 @@ function CountButton({
377
384
  }
378
385
  );
379
386
  }
387
+ function CloseGlyph({ className }) {
388
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) });
389
+ }
390
+ function ChevronLeftGlyph({ className }) {
391
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxRuntime.jsx(
392
+ "path",
393
+ {
394
+ d: "M10 3l-5 5 5 5",
395
+ fill: "none",
396
+ stroke: "currentColor",
397
+ strokeWidth: "1.75",
398
+ strokeLinecap: "round",
399
+ strokeLinejoin: "round"
400
+ }
401
+ ) });
402
+ }
403
+ function ChevronRightGlyph({ className }) {
404
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxRuntime.jsx(
405
+ "path",
406
+ {
407
+ d: "M6 3l5 5-5 5",
408
+ fill: "none",
409
+ stroke: "currentColor",
410
+ strokeWidth: "1.75",
411
+ strokeLinecap: "round",
412
+ strokeLinejoin: "round"
413
+ }
414
+ ) });
415
+ }
416
+ function Magnifier({ className, children }) {
417
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxRuntime.jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", children: [
418
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "7", cy: "7", r: "4.25" }),
419
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10.2 10.2L14 14" }),
420
+ children
421
+ ] }) });
422
+ }
423
+ function ZoomInGlyph({ className }) {
424
+ return /* @__PURE__ */ jsxRuntime.jsx(Magnifier, { className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4.75 7h4.5M7 4.75v4.5" }) });
425
+ }
426
+ function ZoomOutGlyph({ className }) {
427
+ return /* @__PURE__ */ jsxRuntime.jsx(Magnifier, { className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4.75 7h4.5" }) });
428
+ }
429
+ function PlayGlyph({ className }) {
430
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 3.2l7.5 4.8L5 12.8z", fill: "currentColor" }) });
431
+ }
432
+ function PauseGlyph({ className }) {
433
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4.5 3h2.25v10H4.5zM9.25 3h2.25v10H9.25z", fill: "currentColor" }) });
434
+ }
435
+ function Speaker() {
436
+ return /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2.5 6.25h2.25L8 3.4v9.2L4.75 9.75H2.5z", fill: "currentColor", stroke: "none" });
437
+ }
438
+ function VolumeGlyph({ className }) {
439
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxRuntime.jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", children: [
440
+ /* @__PURE__ */ jsxRuntime.jsx(Speaker, {}),
441
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10.5 5.75a3.25 3.25 0 010 4.5" }),
442
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12.5 3.9a5.75 5.75 0 010 8.2" })
443
+ ] }) });
444
+ }
445
+ function VolumeOffGlyph({ className }) {
446
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxRuntime.jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", children: [
447
+ /* @__PURE__ */ jsxRuntime.jsx(Speaker, {}),
448
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10.75 6.25l3.5 3.5M14.25 6.25l-3.5 3.5" })
449
+ ] }) });
450
+ }
451
+ function CaptionsGlyph({ className }) {
452
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxRuntime.jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", children: [
453
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "1.75", y: "3.25", width: "12.5", height: "9.5", rx: "2" }),
454
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6.25 6.75a2 2 0 100 2.5M11.25 6.75a2 2 0 100 2.5" })
455
+ ] }) });
456
+ }
457
+ function FullscreenGlyph({ className }) {
458
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxRuntime.jsx(
459
+ "path",
460
+ {
461
+ d: "M6 2.5H2.5V6M10 2.5h3.5V6M6 13.5H2.5V10M10 13.5h3.5V10",
462
+ fill: "none",
463
+ stroke: "currentColor",
464
+ strokeWidth: "1.5",
465
+ strokeLinecap: "round",
466
+ strokeLinejoin: "round"
467
+ }
468
+ ) });
469
+ }
470
+ function FullscreenExitGlyph({ className }) {
471
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxRuntime.jsx(
472
+ "path",
473
+ {
474
+ d: "M2.5 6H6V2.5M13.5 6H10V2.5M2.5 10H6v3.5M13.5 10H10v3.5",
475
+ fill: "none",
476
+ stroke: "currentColor",
477
+ strokeWidth: "1.5",
478
+ strokeLinecap: "round",
479
+ strokeLinejoin: "round"
480
+ }
481
+ ) });
482
+ }
380
483
 
381
484
  // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Field/Field.module.css?mds-scoped
382
485
  var Field_module_default = { "field": "mds-Field__field", "label": "mds-Field__label", "required": "mds-Field__required", "message": "mds-Field__message", "error": "mds-Field__error" };
@@ -503,8 +606,8 @@ function usePresence(open, durationMs) {
503
606
  return { mounted: open || mounted, visible };
504
607
  }
505
608
 
506
- // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Overlay/Overlay.module.css?mds-scoped
507
- var Overlay_module_default = { "scrim": "mds-Overlay__scrim", "variant-modal": "mds-Overlay__variant-modal", "variant-sheet": "mds-Overlay__variant-sheet" };
609
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/internal/Overlay.module.css?mds-scoped
610
+ var Overlay_module_default = { "scrim": "mds-Overlay__scrim", "variant-modal": "mds-Overlay__variant-modal", "variant-sheet": "mds-Overlay__variant-sheet", "variant-lightbox": "mds-Overlay__variant-lightbox" };
508
611
  var OVERLAY_EXIT_MS = 200;
509
612
  var SHEET_EXIT_MS = 320;
510
613
  function Overlay({ open, onClose, label, variant, role = "dialog", closeOnScrimClick, panelClassName, children }) {
@@ -558,7 +661,7 @@ function Sheet({ open, onClose, label, closeOnScrimClick = true, children }) {
558
661
  function SheetHeader({ children, onClose, closeLabel }) {
559
662
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Sheet_module_default.header, children: [
560
663
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: Sheet_module_default.headerTitle, children }),
561
- onClose !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", "aria-label": closeLabel, className: Sheet_module_default.close, onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: Sheet_module_default.closeGlyph, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) }) })
664
+ onClose !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", "aria-label": closeLabel, className: Sheet_module_default.close, onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsx(CloseGlyph, { className: Sheet_module_default.closeGlyph }) })
562
665
  ] });
563
666
  }
564
667
  function SheetBody({ children }) {
@@ -570,16 +673,6 @@ function SheetFooter({ children }) {
570
673
 
571
674
  // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/DateTimePicker/DateTimePicker.module.css?mds-scoped
572
675
  var DateTimePicker_module_default = { "trigger": "mds-DateTimePicker__trigger", "hasValue": "mds-DateTimePicker__hasValue", "triggerLabel": "mds-DateTimePicker__triggerLabel", "glyph": "mds-DateTimePicker__glyph", "timeRow": "mds-DateTimePicker__timeRow", "grow": "mds-DateTimePicker__grow", "meridiem": "mds-DateTimePicker__meridiem", "colon": "mds-DateTimePicker__colon", "calendarHeader": "mds-DateTimePicker__calendarHeader", "monthLabel": "mds-DateTimePicker__monthLabel", "weekdays": "mds-DateTimePicker__weekdays", "weekday": "mds-DateTimePicker__weekday", "grid": "mds-DateTimePicker__grid", "day": "mds-DateTimePicker__day", "today": "mds-DateTimePicker__today", "selected": "mds-DateTimePicker__selected", "outside": "mds-DateTimePicker__outside" };
573
- var DEFAULT_LABELS = {
574
- dialog: "Pick date and time",
575
- previousMonth: "Previous month",
576
- nextMonth: "Next month",
577
- today: "Today",
578
- done: "Done",
579
- hour: "Hour",
580
- minute: "Minutes",
581
- dayPeriod: "AM/PM"
582
- };
583
676
  function localeData(locale) {
584
677
  const resolved = new Intl.DateTimeFormat(locale).resolvedOptions().locale;
585
678
  const intlLocale = new Intl.Locale(resolved);
@@ -635,8 +728,6 @@ function minuteOptions(step) {
635
728
  function pad2(n) {
636
729
  return String(n).padStart(2, "0");
637
730
  }
638
- var chevronLeft = /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: DateTimePicker_module_default.glyph, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10 3l-5 5 5 5", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" }) });
639
- var chevronRight = /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: DateTimePicker_module_default.glyph, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 3l5 5-5 5", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" }) });
640
731
  var calendarGlyph = /* @__PURE__ */ jsxRuntime.jsxs("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: DateTimePicker_module_default.glyph, children: [
641
732
  /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "2.5", y: "3.5", width: "11", height: "10", rx: "1.5", fill: "none", stroke: "currentColor", strokeWidth: "1.5" }),
642
733
  /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2.5 6.5h11M5.5 2v2.5M10.5 2v2.5", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
@@ -648,16 +739,15 @@ var clockGlyph = /* @__PURE__ */ jsxRuntime.jsxs("svg", { viewBox: "0 0 16 16",
648
739
  function DateTimePicker({
649
740
  value,
650
741
  onChange,
651
- placeholder = "Select date & time",
742
+ placeholder,
652
743
  min,
653
744
  minuteStep = 5,
654
745
  disabled = false,
655
746
  id,
656
747
  "aria-label": ariaLabel,
657
748
  locale,
658
- labels
749
+ labels: text
659
750
  }) {
660
- const text = { ...DEFAULT_LABELS, ...labels };
661
751
  const field = useFieldContext();
662
752
  const intl = react.useMemo(() => localeData(locale), [locale]);
663
753
  const [open, setOpen] = react.useState(false);
@@ -820,6 +910,7 @@ function DateTimePicker({
820
910
  `c-${i}`
821
911
  );
822
912
  });
913
+ const shown = value ? intl.full.format(new Date(value)) : placeholder;
823
914
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
824
915
  /* @__PURE__ */ jsxRuntime.jsxs(
825
916
  "button",
@@ -830,12 +921,12 @@ function DateTimePicker({
830
921
  "aria-describedby": field?.describedBy,
831
922
  "aria-haspopup": "dialog",
832
923
  "aria-expanded": open,
833
- "aria-label": ariaLabel ? `${ariaLabel}: ${value ? intl.full.format(new Date(value)) : placeholder}` : void 0,
924
+ "aria-label": ariaLabel === void 0 ? void 0 : [ariaLabel, shown].filter(Boolean).join(": "),
834
925
  onClick: openPicker,
835
926
  className: cx(DateTimePicker_module_default.trigger, value && DateTimePicker_module_default.hasValue),
836
927
  children: [
837
928
  calendarGlyph,
838
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: DateTimePicker_module_default.triggerLabel, children: value ? intl.full.format(new Date(value)) : placeholder })
929
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: DateTimePicker_module_default.triggerLabel, children: shown })
839
930
  ]
840
931
  }
841
932
  ),
@@ -869,11 +960,11 @@ function DateTimePicker({
869
960
  size: "sm",
870
961
  disabled: prevDisabled,
871
962
  onClick: () => shiftMonth(-1),
872
- children: chevronLeft
963
+ children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeftGlyph, { className: DateTimePicker_module_default.glyph })
873
964
  }
874
965
  ),
875
966
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: DateTimePicker_module_default.monthLabel, children: intl.monthTitle.format(first) }),
876
- /* @__PURE__ */ jsxRuntime.jsx(Button, { iconOnly: true, "aria-label": text.nextMonth, variant: "ghost", size: "sm", onClick: () => shiftMonth(1), children: chevronRight })
967
+ /* @__PURE__ */ jsxRuntime.jsx(Button, { iconOnly: true, "aria-label": text.nextMonth, variant: "ghost", size: "sm", onClick: () => shiftMonth(1), children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRightGlyph, { className: DateTimePicker_module_default.glyph }) })
877
968
  ] }),
878
969
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: DateTimePicker_module_default.weekdays, children: intl.weekdays.map((w, i) => /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", className: DateTimePicker_module_default.weekday, children: w }, `wd-${i}`)) }),
879
970
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: DateTimePicker_module_default.grid, children: dayCells })
@@ -888,19 +979,25 @@ function DateTimePicker({
888
979
  }
889
980
 
890
981
  // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Tag/Tag.module.css?mds-scoped
891
- var Tag_module_default = { "tag": "mds-Tag__tag", "tone-accent": "mds-Tag__tone-accent", "remove": "mds-Tag__remove", "removeGlyph": "mds-Tag__removeGlyph" };
892
- function Tag({ children, tone = "neutral", onRemove, className, ...rest }) {
893
- const text = typeof children === "string" ? children : void 0;
982
+ var Tag_module_default = { "tag": "mds-Tag__tag", "tone-accent": "mds-Tag__tone-accent", "remove": "mds-Tag__remove mds-hit-area__hitArea", "removeGlyph": "mds-Tag__removeGlyph" };
983
+ function Tag({
984
+ children,
985
+ tone = "neutral",
986
+ onRemove,
987
+ removeLabel,
988
+ className,
989
+ ...rest
990
+ }) {
894
991
  return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cx(Tag_module_default.tag, Tag_module_default[`tone-${tone}`], className), ...rest, children: [
895
992
  children,
896
- onRemove && /* @__PURE__ */ jsxRuntime.jsx(
993
+ onRemove !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
897
994
  "button",
898
995
  {
899
996
  type: "button",
900
997
  className: Tag_module_default.remove,
901
- "aria-label": text ? `Remove ${text}` : "Remove",
998
+ "aria-label": removeLabel,
902
999
  onClick: onRemove,
903
- children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: Tag_module_default.removeGlyph, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) })
1000
+ children: /* @__PURE__ */ jsxRuntime.jsx(CloseGlyph, { className: Tag_module_default.removeGlyph })
904
1001
  }
905
1002
  )
906
1003
  ] });
@@ -920,6 +1017,14 @@ function Divider({ orientation = "horizontal", className, ...rest }) {
920
1017
  );
921
1018
  }
922
1019
 
1020
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/VisuallyHidden/VisuallyHidden.module.css?mds-scoped
1021
+ var VisuallyHidden_module_default = { "hidden": "mds-VisuallyHidden__hidden" };
1022
+
1023
+ // src/components/VisuallyHidden/VisuallyHidden.tsx
1024
+ function VisuallyHidden({ as = "span", className, ...rest }) {
1025
+ return react.createElement(as, { className: cx(VisuallyHidden_module_default.hidden, className), ...rest });
1026
+ }
1027
+
923
1028
  // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Skeleton/Skeleton.module.css?mds-scoped
924
1029
  var Skeleton_module_default = { "skeleton": "mds-Skeleton__skeleton", "pulse": "mds-Skeleton__pulse", "variant-text": "mds-Skeleton__variant-text", "variant-rect": "mds-Skeleton__variant-rect", "variant-circle": "mds-Skeleton__variant-circle" };
925
1030
  function Skeleton({
@@ -950,6 +1055,7 @@ var ProgressBar_module_default = { "track": "mds-ProgressBar__track", "fill": "m
950
1055
  function ProgressBar({
951
1056
  value = 0,
952
1057
  label,
1058
+ valueText,
953
1059
  indeterminate = false,
954
1060
  className,
955
1061
  style,
@@ -964,6 +1070,7 @@ function ProgressBar({
964
1070
  "aria-valuemin": 0,
965
1071
  "aria-valuemax": 100,
966
1072
  "aria-valuenow": indeterminate ? void 0 : clamped,
1073
+ "aria-valuetext": valueText,
967
1074
  className: cx(ProgressBar_module_default.track, indeterminate && ProgressBar_module_default.indeterminate, className),
968
1075
  style: { ...{ "--progress": `${clamped}%` }, ...style },
969
1076
  ...rest,
@@ -1009,7 +1116,12 @@ function Input({
1009
1116
 
1010
1117
  // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/PasswordInput/PasswordInput.module.css?mds-scoped
1011
1118
  var PasswordInput_module_default = { "wrap": "mds-PasswordInput__wrap", "input": "mds-PasswordInput__input", "toggle": "mds-PasswordInput__toggle" };
1012
- function PasswordInput({ className, ...rest }) {
1119
+ function PasswordInput({
1120
+ showLabel,
1121
+ hideLabel,
1122
+ className,
1123
+ ...rest
1124
+ }) {
1013
1125
  const [visible, setVisible] = react.useState(false);
1014
1126
  return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: PasswordInput_module_default.wrap, children: [
1015
1127
  /* @__PURE__ */ jsxRuntime.jsx(Input, { ...rest, type: visible ? "text" : "password", className: cx(PasswordInput_module_default.input, className) }),
@@ -1018,7 +1130,7 @@ function PasswordInput({ className, ...rest }) {
1018
1130
  {
1019
1131
  type: "button",
1020
1132
  className: PasswordInput_module_default.toggle,
1021
- "aria-label": visible ? "Hide password" : "Show password",
1133
+ "aria-label": visible ? hideLabel : showLabel,
1022
1134
  "aria-pressed": visible,
1023
1135
  onClick: () => setVisible((v) => !v),
1024
1136
  children: visible ? (
@@ -1071,7 +1183,7 @@ function Textarea({ rows = 3, showCount = false, className, ...rest }) {
1071
1183
  }
1072
1184
 
1073
1185
  // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Checkbox/Checkbox.module.css?mds-scoped
1074
- var Checkbox_module_default = { "root": "mds-Checkbox__root", "box": "mds-Checkbox__box", "label": "mds-Checkbox__label" };
1186
+ var Checkbox_module_default = { "root": "mds-Checkbox__root", "box": "mds-Checkbox__box mds-hit-area__hitArea", "label": "mds-Checkbox__label" };
1075
1187
  function Checkbox({ label, className, ...rest }) {
1076
1188
  return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: cx(Checkbox_module_default.root, className), children: [
1077
1189
  /* @__PURE__ */ jsxRuntime.jsx("input", { type: "checkbox", className: Checkbox_module_default.box, ...rest }),
@@ -1080,7 +1192,7 @@ function Checkbox({ label, className, ...rest }) {
1080
1192
  }
1081
1193
 
1082
1194
  // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Radio/Radio.module.css?mds-scoped
1083
- var Radio_module_default = { "root": "mds-Radio__root", "dot": "mds-Radio__dot", "label": "mds-Radio__label" };
1195
+ var Radio_module_default = { "root": "mds-Radio__root", "dot": "mds-Radio__dot mds-hit-area__hitArea", "label": "mds-Radio__label" };
1084
1196
  function Radio({ label, className, ...rest }) {
1085
1197
  return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: cx(Radio_module_default.root, className), children: [
1086
1198
  /* @__PURE__ */ jsxRuntime.jsx("input", { type: "radio", className: Radio_module_default.dot, ...rest }),
@@ -1089,7 +1201,7 @@ function Radio({ label, className, ...rest }) {
1089
1201
  }
1090
1202
 
1091
1203
  // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Switch/Switch.module.css?mds-scoped
1092
- var Switch_module_default = { "root": "mds-Switch__root", "track": "mds-Switch__track", "trackWrap": "mds-Switch__trackWrap", "spinner": "mds-Switch__spinner", "label": "mds-Switch__label" };
1204
+ var Switch_module_default = { "root": "mds-Switch__root", "track": "mds-Switch__track mds-hit-area__hitArea", "trackWrap": "mds-Switch__trackWrap", "spinner": "mds-Switch__spinner", "label": "mds-Switch__label" };
1093
1205
  function Switch({
1094
1206
  label,
1095
1207
  loading = false,
@@ -1146,8 +1258,15 @@ function SegmentedControl({
1146
1258
  }
1147
1259
 
1148
1260
  // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/SearchField/SearchField.module.css?mds-scoped
1149
- var SearchField_module_default = { "wrap": "mds-SearchField__wrap", "glass": "mds-SearchField__glass", "input": "mds-SearchField__input", "clear": "mds-SearchField__clear", "clearGlyph": "mds-SearchField__clearGlyph" };
1150
- function SearchField({ label, value, onChange, className, ...rest }) {
1261
+ var SearchField_module_default = { "wrap": "mds-SearchField__wrap", "glass": "mds-SearchField__glass", "input": "mds-SearchField__input", "clear": "mds-SearchField__clear mds-hit-area__hitArea", "clearGlyph": "mds-SearchField__clearGlyph" };
1262
+ function SearchField({
1263
+ label,
1264
+ clearLabel,
1265
+ value,
1266
+ onChange,
1267
+ className,
1268
+ ...rest
1269
+ }) {
1151
1270
  return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cx(SearchField_module_default.wrap, className), children: [
1152
1271
  /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: SearchField_module_default.glass, children: /* @__PURE__ */ jsxRuntime.jsx(
1153
1272
  "path",
@@ -1174,10 +1293,10 @@ function SearchField({ label, value, onChange, className, ...rest }) {
1174
1293
  "button",
1175
1294
  {
1176
1295
  type: "button",
1177
- "aria-label": "Clear search",
1296
+ "aria-label": clearLabel,
1178
1297
  className: SearchField_module_default.clear,
1179
1298
  onClick: () => onChange(""),
1180
- children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: SearchField_module_default.clearGlyph, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) })
1299
+ children: /* @__PURE__ */ jsxRuntime.jsx(CloseGlyph, { className: SearchField_module_default.clearGlyph })
1181
1300
  }
1182
1301
  )
1183
1302
  ] });
@@ -1210,12 +1329,15 @@ function ListItem({
1210
1329
  onClick,
1211
1330
  pressed,
1212
1331
  href,
1332
+ as,
1213
1333
  surface,
1214
1334
  className,
1335
+ ref,
1215
1336
  ...rest
1216
1337
  }) {
1217
1338
  const inGroup = react.useContext(ListGroupContext);
1218
1339
  const Root = inGroup ? "li" : "div";
1340
+ const LinkElement = as ?? "a";
1219
1341
  const resolved = surface ?? (inGroup ? void 0 : "card");
1220
1342
  const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1221
1343
  leading != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: List_module_default.leading, children: leading }),
@@ -1229,8 +1351,9 @@ function ListItem({
1229
1351
  Root,
1230
1352
  {
1231
1353
  className: cx(List_module_default.item, resolved && List_module_default[`surface-${resolved}`], className),
1354
+ ref,
1232
1355
  ...rest,
1233
- children: href !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("a", { className: cx(List_module_default.row, List_module_default.interactive), href, children: content }) : onClick !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(
1356
+ children: href !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(LinkElement, { className: cx(List_module_default.row, List_module_default.interactive), href, children: content }) : onClick !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(
1234
1357
  "button",
1235
1358
  {
1236
1359
  type: "button",
@@ -1346,7 +1469,7 @@ function TabPanel({ value, className, children, ...rest }) {
1346
1469
  }
1347
1470
 
1348
1471
  // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Toast/Toast.module.css?mds-scoped
1349
- var Toast_module_default = { "viewport": "mds-Toast__viewport", "toast": "mds-Toast__toast", "tone-success": "mds-Toast__tone-success", "tone-danger": "mds-Toast__tone-danger", "body": "mds-Toast__body", "title": "mds-Toast__title", "description": "mds-Toast__description", "close": "mds-Toast__close", "closeGlyph": "mds-Toast__closeGlyph" };
1472
+ var Toast_module_default = { "viewport": "mds-Toast__viewport", "toast": "mds-Toast__toast", "tone-success": "mds-Toast__tone-success", "tone-danger": "mds-Toast__tone-danger", "body": "mds-Toast__body", "title": "mds-Toast__title", "description": "mds-Toast__description", "close": "mds-Toast__close mds-hit-area__hitArea", "closeGlyph": "mds-Toast__closeGlyph" };
1350
1473
  var ToastContext = react.createContext(null);
1351
1474
  function useToast() {
1352
1475
  const context = react.useContext(ToastContext);
@@ -1355,8 +1478,8 @@ function useToast() {
1355
1478
  }
1356
1479
  function ToastProvider({
1357
1480
  children,
1358
- regionLabel = "Notifications",
1359
- dismissLabel = "Dismiss"
1481
+ regionLabel,
1482
+ dismissLabel
1360
1483
  }) {
1361
1484
  const [toasts, setToasts] = react.useState([]);
1362
1485
  const nextId = react.useRef(1);
@@ -1387,7 +1510,7 @@ function ToastProvider({
1387
1510
  "aria-label": `${dismissLabel}: ${entry.title}`,
1388
1511
  className: Toast_module_default.close,
1389
1512
  onClick: () => dismiss(entry.id),
1390
- children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: Toast_module_default.closeGlyph, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) })
1513
+ children: /* @__PURE__ */ jsxRuntime.jsx(CloseGlyph, { className: Toast_module_default.closeGlyph })
1391
1514
  }
1392
1515
  )
1393
1516
  ] }, entry.id)) })
@@ -1455,15 +1578,26 @@ function Container({
1455
1578
 
1456
1579
  // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Card/Card.module.css?mds-scoped
1457
1580
  var Card_module_default = { "card": "mds-Card__card", "variant-raised": "mds-Card__variant-raised", "variant-sunken": "mds-Card__variant-sunken", "emphasis": "mds-Card__emphasis", "interactive": "mds-Card__interactive", "header": "mds-Card__header", "body": "mds-Card__body", "footer": "mds-Card__footer" };
1458
- function Card({ children, variant = "card", emphasis = false, onClick, href, className, ...rest }) {
1581
+ function Card({ children, variant = "card", emphasis = false, onClick, href, as, className, ref, ...rest }) {
1459
1582
  const cardClass = cx(Card_module_default.card, Card_module_default[`variant-${variant}`], emphasis && Card_module_default.emphasis, className);
1460
1583
  if (href !== void 0) {
1461
- return /* @__PURE__ */ jsxRuntime.jsx("a", { className: cx(cardClass, Card_module_default.interactive), href, ...rest, children });
1584
+ const Element = as ?? "a";
1585
+ return /* @__PURE__ */ jsxRuntime.jsx(Element, { className: cx(cardClass, Card_module_default.interactive), href, ref, ...rest, children });
1462
1586
  }
1463
1587
  if (onClick !== void 0) {
1464
- return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: cx(cardClass, Card_module_default.interactive), onClick, ...rest, children });
1588
+ return /* @__PURE__ */ jsxRuntime.jsx(
1589
+ "button",
1590
+ {
1591
+ type: "button",
1592
+ className: cx(cardClass, Card_module_default.interactive),
1593
+ onClick,
1594
+ ref,
1595
+ ...rest,
1596
+ children
1597
+ }
1598
+ );
1465
1599
  }
1466
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cardClass, ...rest, children });
1600
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cardClass, ref, ...rest, children });
1467
1601
  }
1468
1602
  function CardHeader({ className, ...rest }) {
1469
1603
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx(Card_module_default.header, className), ...rest });
@@ -1517,7 +1651,7 @@ function ConfirmDialog({
1517
1651
  title,
1518
1652
  description,
1519
1653
  confirmLabel,
1520
- cancelLabel = "Cancel",
1654
+ cancelLabel,
1521
1655
  tone = "default",
1522
1656
  errorMessage
1523
1657
  }) {
@@ -1603,7 +1737,7 @@ var TabBar_module_default = { "bar": "mds-TabBar__bar", "item": "mds-TabBar__ite
1603
1737
  function TabBar({ label, children }) {
1604
1738
  return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": label, className: TabBar_module_default.bar, children });
1605
1739
  }
1606
- function TabBarItem({ label, icon, href, onClick, active = false, badge = false }) {
1740
+ function TabBarItem({ label, icon, href, onClick, active = false, badge = false, as }) {
1607
1741
  const className = cx(TabBar_module_default.item, active && TabBar_module_default.active);
1608
1742
  const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1609
1743
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: TabBar_module_default.icon, "aria-hidden": "true", children: [
@@ -1613,13 +1747,660 @@ function TabBarItem({ label, icon, href, onClick, active = false, badge = false
1613
1747
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: TabBar_module_default.label, children: label })
1614
1748
  ] });
1615
1749
  if (href !== void 0) {
1616
- return /* @__PURE__ */ jsxRuntime.jsx("a", { href, className, "aria-current": active ? "page" : void 0, onClick, children: content });
1750
+ const Element = as ?? "a";
1751
+ return /* @__PURE__ */ jsxRuntime.jsx(Element, { href, className, "aria-current": active ? "page" : void 0, onClick, children: content });
1617
1752
  }
1618
1753
  return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className, "aria-current": active ? "page" : void 0, onClick, children: content });
1619
1754
  }
1620
1755
  function TabBarAction({ label, icon, onClick }) {
1621
1756
  return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", "aria-label": label, className: TabBar_module_default.action, onClick, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: TabBar_module_default.icon, "aria-hidden": "true", children: icon }) });
1622
1757
  }
1758
+
1759
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/MediaPlaceholder/MediaPlaceholder.module.css?mds-scoped
1760
+ var MediaPlaceholder_module_default = { "media": "mds-MediaPlaceholder__media", "fill": "mds-MediaPlaceholder__fill", "image": "mds-MediaPlaceholder__image", "caption": "mds-MediaPlaceholder__caption", "cover": "mds-MediaPlaceholder__cover", "blurred": "mds-MediaPlaceholder__blurred" };
1761
+ function MediaPlaceholder({
1762
+ aspect,
1763
+ src,
1764
+ alt = "",
1765
+ glyph,
1766
+ caption,
1767
+ blurred = false,
1768
+ cover,
1769
+ className,
1770
+ style,
1771
+ ...rest
1772
+ }) {
1773
+ const [failed, setFailed] = react.useState();
1774
+ const picture = src !== void 0 && failed !== src;
1775
+ const vars = aspect === void 0 ? {} : { "--media-aspect": aspect };
1776
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1777
+ "div",
1778
+ {
1779
+ className: cx(MediaPlaceholder_module_default.media, blurred && MediaPlaceholder_module_default.blurred, className),
1780
+ style: { ...vars, ...style },
1781
+ ...rest,
1782
+ children: [
1783
+ picture ? /* @__PURE__ */ jsxRuntime.jsx(
1784
+ "img",
1785
+ {
1786
+ className: MediaPlaceholder_module_default.image,
1787
+ src,
1788
+ alt,
1789
+ loading: "lazy",
1790
+ decoding: "async",
1791
+ onError: () => setFailed(src)
1792
+ }
1793
+ ) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: MediaPlaceholder_module_default.fill, "aria-hidden": "true", children: [
1794
+ glyph,
1795
+ caption !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "meta", children: caption })
1796
+ ] }),
1797
+ picture && caption !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "meta", tone: "on-media", className: MediaPlaceholder_module_default.caption, children: caption }),
1798
+ cover !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: MediaPlaceholder_module_default.cover, children: cover })
1799
+ ]
1800
+ }
1801
+ );
1802
+ }
1803
+
1804
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/ImageCarousel/ImageCarousel.module.css?mds-scoped
1805
+ var ImageCarousel_module_default = { "carousel": "mds-ImageCarousel__carousel", "viewport": "mds-ImageCarousel__viewport", "slide": "mds-ImageCarousel__slide", "step": "mds-ImageCarousel__step", "zoom": "mds-ImageCarousel__zoom", "prev": "mds-ImageCarousel__prev", "next": "mds-ImageCarousel__next", "counter": "mds-ImageCarousel__counter", "thumbs": "mds-ImageCarousel__thumbs", "thumb": "mds-ImageCarousel__thumb", "more": "mds-ImageCarousel__more", "dots": "mds-ImageCarousel__dots", "dot": "mds-ImageCarousel__dot" };
1806
+ var SWIPE_THRESHOLD = 40;
1807
+ function ImageCarousel({
1808
+ slides,
1809
+ labels,
1810
+ index,
1811
+ defaultIndex = 0,
1812
+ onIndexChange,
1813
+ pager = "thumbnails",
1814
+ maxThumbnails = 4,
1815
+ onZoom,
1816
+ zoomIcon,
1817
+ zoomLabel,
1818
+ className,
1819
+ ...rest
1820
+ }) {
1821
+ const [ownIndex, setOwnIndex] = react.useState(defaultIndex);
1822
+ const swipeStart = react.useRef(null);
1823
+ const held = index !== void 0;
1824
+ const last = slides.length - 1;
1825
+ const current = Math.min(Math.max(held ? index : ownIndex, 0), last);
1826
+ const many = slides.length > 1;
1827
+ const slide = slides[current];
1828
+ if (slide === void 0) return null;
1829
+ const goTo = (next) => {
1830
+ const clamped = Math.min(Math.max(next, 0), last);
1831
+ if (clamped === current) return;
1832
+ if (!held) setOwnIndex(clamped);
1833
+ onIndexChange?.(clamped);
1834
+ };
1835
+ const onKeyDown = (event) => {
1836
+ if (!many) return;
1837
+ const step = {
1838
+ ArrowLeft: current - 1,
1839
+ ArrowRight: current + 1,
1840
+ Home: 0,
1841
+ End: last
1842
+ };
1843
+ const next = step[event.key];
1844
+ if (next === void 0) return;
1845
+ event.preventDefault();
1846
+ goTo(next);
1847
+ };
1848
+ const onPointerUp = (event) => {
1849
+ const start = swipeStart.current;
1850
+ swipeStart.current = null;
1851
+ if (start === null) return;
1852
+ const travelled = event.clientX - start;
1853
+ if (Math.abs(travelled) < SWIPE_THRESHOLD) {
1854
+ const onControl = event.target.closest("button") !== null;
1855
+ if (onZoom !== void 0 && !onControl && slide.covered !== true) onZoom(current);
1856
+ return;
1857
+ }
1858
+ if (many) goTo(travelled < 0 ? current + 1 : current - 1);
1859
+ };
1860
+ const shown = pager === "thumbnails" ? slides.slice(0, maxThumbnails) : [];
1861
+ const hidden = slides.length - shown.length;
1862
+ const counted = labels.counter(current + 1, slides.length);
1863
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1864
+ "section",
1865
+ {
1866
+ className: cx(ImageCarousel_module_default.carousel, className),
1867
+ "aria-roledescription": labels.carouselRole,
1868
+ "aria-label": labels.region,
1869
+ tabIndex: 0,
1870
+ onKeyDown,
1871
+ ...rest,
1872
+ children: [
1873
+ /* @__PURE__ */ jsxRuntime.jsxs(
1874
+ "div",
1875
+ {
1876
+ className: ImageCarousel_module_default.viewport,
1877
+ onPointerDown: (event) => {
1878
+ swipeStart.current = event.clientX;
1879
+ },
1880
+ onPointerUp,
1881
+ onPointerCancel: () => {
1882
+ swipeStart.current = null;
1883
+ },
1884
+ children: [
1885
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: ImageCarousel_module_default.slide, role: "group", "aria-roledescription": labels.slideRole, "aria-label": counted, children: /* @__PURE__ */ jsxRuntime.jsx(
1886
+ MediaPlaceholder,
1887
+ {
1888
+ aspect: slide.aspect ?? "4 / 3",
1889
+ ...slide.src === void 0 ? {} : { src: slide.src },
1890
+ ...slide.alt === void 0 ? {} : { alt: slide.alt },
1891
+ ...slide.caption === void 0 ? {} : { caption: slide.caption },
1892
+ blurred: slide.covered === true,
1893
+ ...slide.cover === void 0 ? {} : { cover: slide.cover }
1894
+ }
1895
+ ) }),
1896
+ onZoom !== void 0 && slide.covered !== true && /* @__PURE__ */ jsxRuntime.jsx(
1897
+ Button,
1898
+ {
1899
+ className: ImageCarousel_module_default.zoom,
1900
+ variant: "secondary",
1901
+ size: "sm",
1902
+ iconOnly: true,
1903
+ "aria-label": zoomLabel,
1904
+ onClick: () => onZoom(current),
1905
+ children: zoomIcon
1906
+ }
1907
+ ),
1908
+ many && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1909
+ /* @__PURE__ */ jsxRuntime.jsx(
1910
+ Button,
1911
+ {
1912
+ className: cx(ImageCarousel_module_default.step, ImageCarousel_module_default.prev),
1913
+ variant: "secondary",
1914
+ size: "sm",
1915
+ iconOnly: true,
1916
+ "aria-label": labels.previous,
1917
+ disabled: current === 0,
1918
+ onClick: () => goTo(current - 1),
1919
+ children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeftGlyph, {})
1920
+ }
1921
+ ),
1922
+ /* @__PURE__ */ jsxRuntime.jsx(
1923
+ Button,
1924
+ {
1925
+ className: cx(ImageCarousel_module_default.step, ImageCarousel_module_default.next),
1926
+ variant: "secondary",
1927
+ size: "sm",
1928
+ iconOnly: true,
1929
+ "aria-label": labels.next,
1930
+ disabled: current === last,
1931
+ onClick: () => goTo(current + 1),
1932
+ children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRightGlyph, {})
1933
+ }
1934
+ ),
1935
+ /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "meta", className: ImageCarousel_module_default.counter, "aria-live": "polite", children: counted })
1936
+ ] })
1937
+ ]
1938
+ }
1939
+ ),
1940
+ many && pager === "thumbnails" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ImageCarousel_module_default.thumbs, children: [
1941
+ shown.map((frame, position) => /* @__PURE__ */ jsxRuntime.jsx(
1942
+ "button",
1943
+ {
1944
+ type: "button",
1945
+ className: ImageCarousel_module_default.thumb,
1946
+ "aria-label": labels.slide(position + 1),
1947
+ "aria-current": position === current ? "true" : void 0,
1948
+ onClick: () => goTo(position),
1949
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1950
+ MediaPlaceholder,
1951
+ {
1952
+ aspect: "1 / 1",
1953
+ ...frame.src === void 0 ? {} : { src: frame.src },
1954
+ blurred: frame.covered === true
1955
+ }
1956
+ )
1957
+ },
1958
+ frame.id
1959
+ )),
1960
+ hidden > 0 && /* @__PURE__ */ jsxRuntime.jsx(
1961
+ "button",
1962
+ {
1963
+ type: "button",
1964
+ className: cx(ImageCarousel_module_default.thumb, ImageCarousel_module_default.more),
1965
+ "aria-label": labels.more(hidden),
1966
+ onClick: () => goTo(shown.length),
1967
+ children: /* @__PURE__ */ jsxRuntime.jsxs(Text, { variant: "meta", children: [
1968
+ "+",
1969
+ hidden
1970
+ ] })
1971
+ }
1972
+ )
1973
+ ] }),
1974
+ many && pager === "dots" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: ImageCarousel_module_default.dots, children: slides.map((frame, position) => /* @__PURE__ */ jsxRuntime.jsx(
1975
+ "button",
1976
+ {
1977
+ type: "button",
1978
+ className: ImageCarousel_module_default.dot,
1979
+ "aria-label": labels.slide(position + 1),
1980
+ "aria-current": position === current ? "true" : void 0,
1981
+ onClick: () => goTo(position)
1982
+ },
1983
+ frame.id
1984
+ )) })
1985
+ ]
1986
+ }
1987
+ );
1988
+ }
1989
+
1990
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/UploadProgress/UploadProgress.module.css?mds-scoped
1991
+ var UploadProgress_module_default = { "upload": "mds-UploadProgress__upload", "head": "mds-UploadProgress__head", "preview": "mds-UploadProgress__preview", "mark": "mds-UploadProgress__mark", "name": "mds-UploadProgress__name", "foot": "mds-UploadProgress__foot", "status-done": "mds-UploadProgress__status-done", "status-error": "mds-UploadProgress__status-error" };
1992
+ function UploadProgress({
1993
+ name,
1994
+ labels,
1995
+ preview,
1996
+ mark,
1997
+ value,
1998
+ status = "uploading",
1999
+ detail,
2000
+ error,
2001
+ onCancel,
2002
+ onRetry,
2003
+ onRemove,
2004
+ className,
2005
+ ...rest
2006
+ }) {
2007
+ const running = status === "uploading" || status === "processing";
2008
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx(UploadProgress_module_default.upload, UploadProgress_module_default[`status-${status}`], className), ...rest, children: [
2009
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: UploadProgress_module_default.head, children: [
2010
+ preview !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: UploadProgress_module_default.preview, children: preview }),
2011
+ mark !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: UploadProgress_module_default.mark, children: mark }),
2012
+ /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "label", truncate: true, className: UploadProgress_module_default.name, children: name }),
2013
+ running && onCancel !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Button, { iconOnly: true, size: "sm", variant: "ghost", "aria-label": labels.cancel, onClick: onCancel, children: /* @__PURE__ */ jsxRuntime.jsx(CloseGlyph, {}) }),
2014
+ !running && onRemove !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Button, { iconOnly: true, size: "sm", variant: "ghost", "aria-label": labels.remove, onClick: onRemove, children: /* @__PURE__ */ jsxRuntime.jsx(CloseGlyph, {}) }),
2015
+ status === "error" && onRetry !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", variant: "secondary", onClick: onRetry, children: labels.retry })
2016
+ ] }),
2017
+ running && /* @__PURE__ */ jsxRuntime.jsx(
2018
+ ProgressBar,
2019
+ {
2020
+ label: `${labels[status]} ${name}`,
2021
+ value: value ?? 0,
2022
+ indeterminate: status === "processing",
2023
+ ...detail === void 0 ? {} : { valueText: detail }
2024
+ }
2025
+ ),
2026
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: UploadProgress_module_default.foot, children: status === "error" ? /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "meta", tone: "danger", role: "alert", children: error ?? labels.error }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2027
+ status !== "uploading" && /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "meta", children: labels[status] }),
2028
+ detail !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "meta", children: detail })
2029
+ ] }) })
2030
+ ] });
2031
+ }
2032
+
2033
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Lightbox/Lightbox.module.css?mds-scoped
2034
+ var Lightbox_module_default = { "panel": "mds-Lightbox__panel", "bar": "mds-Lightbox__bar", "surface": "mds-Lightbox__surface", "image": "mds-Lightbox__image", "caption": "mds-Lightbox__caption" };
2035
+ var MIN_SCALE = 1;
2036
+ var MAX_SCALE = 4;
2037
+ var STEP = 1;
2038
+ var DOUBLE = 2.5;
2039
+ var WHEEL = 0.01;
2040
+ var ORIGIN = { x: 0, y: 0 };
2041
+ var clamp = (value, low, high) => Math.min(Math.max(value, low), high);
2042
+ var round = (value) => Math.round(value * 1e3) / 1e3;
2043
+ var distance = (a, b) => Math.hypot(a.x - b.x, a.y - b.y);
2044
+ function Lightbox({ open, onClose, src, alt = "", caption, labels }) {
2045
+ const [surface, setSurface] = react.useState(null);
2046
+ const [scale, setScale] = react.useState(MIN_SCALE);
2047
+ const [offset, setOffset] = react.useState(ORIGIN);
2048
+ const points = react.useRef(/* @__PURE__ */ new Map());
2049
+ const from = react.useRef({ spread: 0, scale: MIN_SCALE, x: 0, y: 0, offset: ORIGIN });
2050
+ const [shown, setShown] = react.useState({ src, open });
2051
+ if (shown.src !== src || shown.open !== open) {
2052
+ setShown({ src, open });
2053
+ setScale(MIN_SCALE);
2054
+ setOffset(ORIGIN);
2055
+ }
2056
+ react.useEffect(() => {
2057
+ points.current.clear();
2058
+ }, [src, open]);
2059
+ const hold = react.useCallback(
2060
+ (next, at2) => {
2061
+ const box = surface?.getBoundingClientRect();
2062
+ if (!box) return ORIGIN;
2063
+ const room = { x: box.width * (at2 - 1) / 2, y: box.height * (at2 - 1) / 2 };
2064
+ return { x: clamp(next.x, -room.x, room.x), y: clamp(next.y, -room.y, room.y) };
2065
+ },
2066
+ [surface]
2067
+ );
2068
+ const zoom = react.useCallback(
2069
+ (to) => {
2070
+ const next = clamp(round(to), MIN_SCALE, MAX_SCALE);
2071
+ setScale(next);
2072
+ setOffset((current) => hold(current, next));
2073
+ },
2074
+ [hold]
2075
+ );
2076
+ const at = react.useRef(scale);
2077
+ react.useEffect(() => {
2078
+ at.current = scale;
2079
+ }, [scale]);
2080
+ react.useEffect(() => {
2081
+ if (!surface) return;
2082
+ const onWheel = (event) => {
2083
+ if (!event.ctrlKey) return;
2084
+ event.preventDefault();
2085
+ zoom(at.current * Math.exp(-event.deltaY * WHEEL));
2086
+ };
2087
+ surface.addEventListener("wheel", onWheel, { passive: false });
2088
+ return () => surface.removeEventListener("wheel", onWheel);
2089
+ }, [surface, zoom]);
2090
+ function onPointerDown(event) {
2091
+ points.current.set(event.pointerId, { x: event.clientX, y: event.clientY });
2092
+ const [first, second] = [...points.current.values()];
2093
+ if (first && second) {
2094
+ from.current = { ...from.current, spread: distance(first, second), scale };
2095
+ return;
2096
+ }
2097
+ if (first) from.current = { ...from.current, x: first.x, y: first.y, offset };
2098
+ }
2099
+ function onPointerMove(event) {
2100
+ if (!points.current.has(event.pointerId)) return;
2101
+ points.current.set(event.pointerId, { x: event.clientX, y: event.clientY });
2102
+ const [first, second] = [...points.current.values()];
2103
+ if (!first) return;
2104
+ if (second) {
2105
+ const spread = distance(first, second);
2106
+ if (from.current.spread === 0) return;
2107
+ zoom(from.current.scale * (spread / from.current.spread));
2108
+ return;
2109
+ }
2110
+ if (scale <= MIN_SCALE) return;
2111
+ setOffset(
2112
+ hold(
2113
+ {
2114
+ x: from.current.offset.x + (first.x - from.current.x),
2115
+ y: from.current.offset.y + (first.y - from.current.y)
2116
+ },
2117
+ scale
2118
+ )
2119
+ );
2120
+ }
2121
+ function onPointerUp(event) {
2122
+ points.current.delete(event.pointerId);
2123
+ const [rest] = [...points.current.values()];
2124
+ if (rest) from.current = { ...from.current, x: rest.x, y: rest.y, offset };
2125
+ }
2126
+ const vars = {
2127
+ "--zoom": String(round(scale)),
2128
+ "--pan-x": `${round(offset.x)}px`,
2129
+ "--pan-y": `${round(offset.y)}px`
2130
+ };
2131
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2132
+ Overlay,
2133
+ {
2134
+ open,
2135
+ onClose,
2136
+ label: labels.dialog,
2137
+ variant: "lightbox",
2138
+ closeOnScrimClick: false,
2139
+ panelClassName: Lightbox_module_default.panel,
2140
+ children: [
2141
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Lightbox_module_default.bar, children: [
2142
+ /* @__PURE__ */ jsxRuntime.jsx(
2143
+ Button,
2144
+ {
2145
+ iconOnly: true,
2146
+ "aria-label": labels.zoomOut,
2147
+ variant: "ghost",
2148
+ onMedia: true,
2149
+ disabled: scale <= MIN_SCALE,
2150
+ onClick: () => zoom(scale - STEP),
2151
+ children: /* @__PURE__ */ jsxRuntime.jsx(ZoomOutGlyph, {})
2152
+ }
2153
+ ),
2154
+ /* @__PURE__ */ jsxRuntime.jsx(
2155
+ Button,
2156
+ {
2157
+ iconOnly: true,
2158
+ "aria-label": labels.zoomIn,
2159
+ variant: "ghost",
2160
+ onMedia: true,
2161
+ disabled: scale >= MAX_SCALE,
2162
+ onClick: () => zoom(scale + STEP),
2163
+ children: /* @__PURE__ */ jsxRuntime.jsx(ZoomInGlyph, {})
2164
+ }
2165
+ ),
2166
+ /* @__PURE__ */ jsxRuntime.jsx(Button, { iconOnly: true, "aria-label": labels.close, variant: "ghost", onMedia: true, onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsx(CloseGlyph, {}) })
2167
+ ] }),
2168
+ /* @__PURE__ */ jsxRuntime.jsx(
2169
+ "div",
2170
+ {
2171
+ ref: setSurface,
2172
+ className: Lightbox_module_default.surface,
2173
+ onPointerDown,
2174
+ onPointerMove,
2175
+ onPointerUp,
2176
+ onPointerCancel: onPointerUp,
2177
+ onDoubleClick: () => zoom(scale > MIN_SCALE ? MIN_SCALE : DOUBLE),
2178
+ children: /* @__PURE__ */ jsxRuntime.jsx("img", { className: Lightbox_module_default.image, src, alt, draggable: false, style: vars })
2179
+ }
2180
+ ),
2181
+ caption !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "meta", tone: "on-media", className: Lightbox_module_default.caption, children: caption })
2182
+ ]
2183
+ }
2184
+ );
2185
+ }
2186
+
2187
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/VideoPlayer/VideoPlayer.module.css?mds-scoped
2188
+ var VideoPlayer_module_default = { "player": "mds-VideoPlayer__player", "frame": "mds-VideoPlayer__frame", "media": "mds-VideoPlayer__media", "covered": "mds-VideoPlayer__covered", "start": "mds-VideoPlayer__start", "startGlyph": "mds-VideoPlayer__startGlyph", "cover": "mds-VideoPlayer__cover", "controls": "mds-VideoPlayer__controls", "scrub": "mds-VideoPlayer__scrub", "time": "mds-VideoPlayer__time", "chapters": "mds-VideoPlayer__chapters", "chapter": "mds-VideoPlayer__chapter", "chapterAt": "mds-VideoPlayer__chapterAt" };
2189
+ var FIRST_FRAME_S = 1e-3;
2190
+ var SECONDS_IN_MINUTE = 60;
2191
+ var SECONDS_IN_HOUR = 3600;
2192
+ function clock(seconds) {
2193
+ if (!Number.isFinite(seconds) || seconds < 0) return "0:00";
2194
+ const whole = Math.floor(seconds);
2195
+ const s = whole % SECONDS_IN_MINUTE;
2196
+ const m = Math.floor(whole / SECONDS_IN_MINUTE) % SECONDS_IN_MINUTE;
2197
+ const h = Math.floor(whole / SECONDS_IN_HOUR);
2198
+ const ss = String(s).padStart(2, "0");
2199
+ return h > 0 ? `${h}:${String(m).padStart(2, "0")}:${ss}` : `${m}:${ss}`;
2200
+ }
2201
+ function VideoPlayer({
2202
+ src,
2203
+ poster,
2204
+ labels,
2205
+ chapters,
2206
+ chaptersLabel,
2207
+ onChapterSelect,
2208
+ captions,
2209
+ captionsLabel,
2210
+ autoPlay = false,
2211
+ covered = false,
2212
+ cover,
2213
+ className,
2214
+ ref,
2215
+ ...rest
2216
+ }) {
2217
+ const media = react.useRef(null);
2218
+ const root = react.useRef(null);
2219
+ const [playing, setPlaying] = react.useState(false);
2220
+ const [muted, setMuted] = react.useState(false);
2221
+ const [at, setAt] = react.useState(0);
2222
+ const [length, setLength] = react.useState(0);
2223
+ const [isFullscreen, setFullscreen] = react.useState(false);
2224
+ function toggle() {
2225
+ const el = media.current;
2226
+ if (!el) return;
2227
+ if (playing) el.pause();
2228
+ else void el.play();
2229
+ }
2230
+ function toggleSound() {
2231
+ const el = media.current;
2232
+ if (!el) return;
2233
+ const next = !muted;
2234
+ el.muted = next;
2235
+ setMuted(next);
2236
+ }
2237
+ function onMetadata(event) {
2238
+ const el = event.currentTarget;
2239
+ setLength(el.duration);
2240
+ if (poster === void 0 && el.currentTime === 0) el.currentTime = FIRST_FRAME_S;
2241
+ }
2242
+ function goTo(seconds) {
2243
+ const el = media.current;
2244
+ if (el) el.currentTime = seconds;
2245
+ setAt(seconds);
2246
+ }
2247
+ function toggleCaptions() {
2248
+ const track = media.current?.textTracks?.[0];
2249
+ if (track) track.mode = track.mode === "showing" ? "disabled" : "showing";
2250
+ }
2251
+ function selectChapter(chapter) {
2252
+ goTo(chapter.at);
2253
+ onChapterSelect?.(chapter.at);
2254
+ }
2255
+ react.useEffect(() => {
2256
+ const read = () => setFullscreen(document.fullscreenElement === root.current);
2257
+ document.addEventListener("fullscreenchange", read);
2258
+ return () => document.removeEventListener("fullscreenchange", read);
2259
+ }, []);
2260
+ function toggleFullscreen() {
2261
+ if (isFullscreen) {
2262
+ void document.exitFullscreen?.();
2263
+ return;
2264
+ }
2265
+ const box = root.current;
2266
+ if (box?.requestFullscreen) {
2267
+ void box.requestFullscreen();
2268
+ return;
2269
+ }
2270
+ media.current?.webkitEnterFullscreen?.();
2271
+ }
2272
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2273
+ "section",
2274
+ {
2275
+ className: cx(VideoPlayer_module_default.player, covered && VideoPlayer_module_default.covered, className),
2276
+ "aria-label": labels.region,
2277
+ ref: (node) => {
2278
+ root.current = node;
2279
+ if (typeof ref === "function") ref(node);
2280
+ else if (ref) ref.current = node;
2281
+ },
2282
+ ...rest,
2283
+ children: [
2284
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: VideoPlayer_module_default.frame, children: [
2285
+ /* @__PURE__ */ jsxRuntime.jsx(
2286
+ "video",
2287
+ {
2288
+ ref: media,
2289
+ className: VideoPlayer_module_default.media,
2290
+ src,
2291
+ poster,
2292
+ autoPlay: autoPlay && !covered,
2293
+ playsInline: true,
2294
+ preload: "metadata",
2295
+ onPlay: () => setPlaying(true),
2296
+ onPause: () => setPlaying(false),
2297
+ onTimeUpdate: (event) => setAt(event.currentTarget.currentTime),
2298
+ onLoadedMetadata: onMetadata,
2299
+ children: captions !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
2300
+ "track",
2301
+ {
2302
+ kind: "captions",
2303
+ src: captions.src,
2304
+ srcLang: captions.lang,
2305
+ label: captions.label,
2306
+ default: captions.defaultOn
2307
+ }
2308
+ )
2309
+ }
2310
+ ),
2311
+ !playing && !covered && /* The picture is the target here; the control row below says the same
2312
+ thing in words, so this one is not said twice. */
2313
+ /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: VideoPlayer_module_default.start, onClick: toggle, "aria-hidden": "true", tabIndex: -1, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: VideoPlayer_module_default.startGlyph, children: /* @__PURE__ */ jsxRuntime.jsx(PlayGlyph, {}) }) }),
2314
+ cover !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: VideoPlayer_module_default.cover, children: cover })
2315
+ ] }),
2316
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: VideoPlayer_module_default.controls, children: [
2317
+ /* @__PURE__ */ jsxRuntime.jsx(
2318
+ Button,
2319
+ {
2320
+ iconOnly: true,
2321
+ "aria-label": playing ? labels.pause : labels.play,
2322
+ variant: "ghost",
2323
+ size: "sm",
2324
+ onClick: toggle,
2325
+ children: playing ? /* @__PURE__ */ jsxRuntime.jsx(PauseGlyph, {}) : /* @__PURE__ */ jsxRuntime.jsx(PlayGlyph, {})
2326
+ }
2327
+ ),
2328
+ /* @__PURE__ */ jsxRuntime.jsx(
2329
+ "input",
2330
+ {
2331
+ type: "range",
2332
+ className: VideoPlayer_module_default.scrub,
2333
+ "aria-label": labels.seek,
2334
+ min: 0,
2335
+ max: length || 0,
2336
+ step: 1,
2337
+ value: Math.min(at, length || 0),
2338
+ onChange: (event) => goTo(Number(event.target.value))
2339
+ }
2340
+ ),
2341
+ /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "meta", className: VideoPlayer_module_default.time, children: `${clock(at)} / ${clock(length)}` }),
2342
+ /* @__PURE__ */ jsxRuntime.jsx(
2343
+ Button,
2344
+ {
2345
+ iconOnly: true,
2346
+ "aria-label": muted ? labels.unmute : labels.mute,
2347
+ variant: "ghost",
2348
+ size: "sm",
2349
+ onClick: toggleSound,
2350
+ children: muted ? /* @__PURE__ */ jsxRuntime.jsx(VolumeOffGlyph, {}) : /* @__PURE__ */ jsxRuntime.jsx(VolumeGlyph, {})
2351
+ }
2352
+ ),
2353
+ captions !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
2354
+ Button,
2355
+ {
2356
+ iconOnly: true,
2357
+ "aria-label": captionsLabel,
2358
+ variant: "ghost",
2359
+ size: "sm",
2360
+ "aria-pressed": captions.defaultOn ?? false,
2361
+ onClick: toggleCaptions,
2362
+ children: /* @__PURE__ */ jsxRuntime.jsx(CaptionsGlyph, {})
2363
+ }
2364
+ ),
2365
+ /* @__PURE__ */ jsxRuntime.jsx(
2366
+ Button,
2367
+ {
2368
+ iconOnly: true,
2369
+ "aria-label": isFullscreen ? labels.exitFullscreen : labels.fullscreen,
2370
+ variant: "ghost",
2371
+ size: "sm",
2372
+ onClick: toggleFullscreen,
2373
+ children: isFullscreen ? /* @__PURE__ */ jsxRuntime.jsx(FullscreenExitGlyph, {}) : /* @__PURE__ */ jsxRuntime.jsx(FullscreenGlyph, {})
2374
+ }
2375
+ )
2376
+ ] }),
2377
+ chapters !== void 0 && chapters.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: VideoPlayer_module_default.chapters, "aria-label": chaptersLabel, children: chapters.map((chapter) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "ghost", size: "sm", className: VideoPlayer_module_default.chapter, onClick: () => selectChapter(chapter), children: [
2378
+ /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "meta", className: VideoPlayer_module_default.chapterAt, children: clock(chapter.at) }),
2379
+ /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "body", children: chapter.label })
2380
+ ] }) }, chapter.at)) })
2381
+ ]
2382
+ }
2383
+ );
2384
+ }
2385
+
2386
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Breadcrumb/Breadcrumb.module.css?mds-scoped
2387
+ var Breadcrumb_module_default = { "crumbs": "mds-Breadcrumb__crumbs", "list": "mds-Breadcrumb__list", "item": "mds-Breadcrumb__item", "separator": "mds-Breadcrumb__separator", "link": "mds-Breadcrumb__link" };
2388
+ function Breadcrumb({
2389
+ items,
2390
+ label,
2391
+ linkAs = "a",
2392
+ className,
2393
+ ...rest
2394
+ }) {
2395
+ if (items.length === 0) return null;
2396
+ return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": label, className: cx(Breadcrumb_module_default.crumbs, className), ...rest, children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: Breadcrumb_module_default.list, children: items.map((item, index) => {
2397
+ const last = index === items.length - 1;
2398
+ return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: Breadcrumb_module_default.item, children: [
2399
+ index > 0 && /* @__PURE__ */ jsxRuntime.jsx(ChevronRightGlyph, { className: Breadcrumb_module_default.separator }),
2400
+ last || item.href === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "meta", tone: last ? "primary" : "muted", "aria-current": last ? "page" : void 0, children: item.label }) : /* @__PURE__ */ jsxRuntime.jsx(Link, { variant: "plain", size: "xs", as: linkAs, href: item.href, className: Breadcrumb_module_default.link, children: item.label })
2401
+ ] }, `${item.label}-${index}`);
2402
+ }) }) });
2403
+ }
1623
2404
  function useRovingGroup(ref, { selector, orientation = "horizontal" }) {
1624
2405
  return react.useCallback(
1625
2406
  (event) => {
@@ -1649,6 +2430,7 @@ exports.AppBar = AppBar;
1649
2430
  exports.Avatar = Avatar;
1650
2431
  exports.AvatarGroup = AvatarGroup;
1651
2432
  exports.Badge = Badge;
2433
+ exports.Breadcrumb = Breadcrumb;
1652
2434
  exports.Button = Button;
1653
2435
  exports.Card = Card;
1654
2436
  exports.CardBody = CardBody;
@@ -1668,11 +2450,14 @@ exports.Field = Field;
1668
2450
  exports.Heading = Heading;
1669
2451
  exports.Icon = Icon;
1670
2452
  exports.IconProvider = IconProvider;
2453
+ exports.ImageCarousel = ImageCarousel;
1671
2454
  exports.Inline = Inline;
1672
2455
  exports.Input = Input;
2456
+ exports.Lightbox = Lightbox;
1673
2457
  exports.Link = Link;
1674
2458
  exports.ListGroup = ListGroup;
1675
2459
  exports.ListItem = ListItem;
2460
+ exports.MediaPlaceholder = MediaPlaceholder;
1676
2461
  exports.Modal = Modal;
1677
2462
  exports.ModalBody = ModalBody;
1678
2463
  exports.ModalFooter = ModalFooter;
@@ -1705,6 +2490,9 @@ exports.Tag = Tag;
1705
2490
  exports.Text = Text;
1706
2491
  exports.Textarea = Textarea;
1707
2492
  exports.ToastProvider = ToastProvider;
2493
+ exports.UploadProgress = UploadProgress;
2494
+ exports.VideoPlayer = VideoPlayer;
2495
+ exports.VisuallyHidden = VisuallyHidden;
1708
2496
  exports.cx = cx;
1709
2497
  exports.useFieldContext = useFieldContext;
1710
2498
  exports.useOverlay = useOverlay;