@mond-design-system/react 3.0.3 → 4.1.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 +906 -74
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +535 -21
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +449 -41
- package/dist/index.d.ts +449 -41
- package/dist/index.js +900 -75
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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
|
|
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":
|
|
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/
|
|
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(
|
|
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
|
|
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
|
|
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:
|
|
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:
|
|
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:
|
|
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({
|
|
893
|
-
|
|
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":
|
|
998
|
+
"aria-label": removeLabel,
|
|
902
999
|
onClick: onRemove,
|
|
903
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
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({
|
|
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 ?
|
|
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,
|
|
@@ -1117,7 +1229,7 @@ function Switch({
|
|
|
1117
1229
|
}
|
|
1118
1230
|
|
|
1119
1231
|
// mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/SegmentedControl/SegmentedControl.module.css?mds-scoped
|
|
1120
|
-
var SegmentedControl_module_default = { "group": "mds-SegmentedControl__group", "
|
|
1232
|
+
var SegmentedControl_module_default = { "group": "mds-SegmentedControl__group", "size-md": "mds-SegmentedControl__size-md", "face": "mds-SegmentedControl__face", "size-sm": "mds-SegmentedControl__size-sm", "bare": "mds-SegmentedControl__bare", "segment": "mds-SegmentedControl__segment", "fullWidth": "mds-SegmentedControl__fullWidth", "input": "mds-SegmentedControl__input" };
|
|
1121
1233
|
function SegmentedControl({
|
|
1122
1234
|
label,
|
|
1123
1235
|
options,
|
|
@@ -1125,29 +1237,52 @@ function SegmentedControl({
|
|
|
1125
1237
|
onChange,
|
|
1126
1238
|
disabled = false,
|
|
1127
1239
|
fullWidth = false,
|
|
1240
|
+
size = "md",
|
|
1241
|
+
bare = false,
|
|
1128
1242
|
className
|
|
1129
1243
|
}) {
|
|
1130
1244
|
const name = react.useId();
|
|
1131
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
className
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1245
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1246
|
+
"div",
|
|
1247
|
+
{
|
|
1248
|
+
role: "radiogroup",
|
|
1249
|
+
"aria-label": label,
|
|
1250
|
+
className: cx(
|
|
1251
|
+
SegmentedControl_module_default.group,
|
|
1252
|
+
SegmentedControl_module_default[`size-${size}`],
|
|
1253
|
+
fullWidth && SegmentedControl_module_default.fullWidth,
|
|
1254
|
+
bare && SegmentedControl_module_default.bare,
|
|
1255
|
+
className
|
|
1256
|
+
),
|
|
1257
|
+
children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsxs("label", { className: SegmentedControl_module_default.segment, children: [
|
|
1258
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1259
|
+
"input",
|
|
1260
|
+
{
|
|
1261
|
+
type: "radio",
|
|
1262
|
+
name,
|
|
1263
|
+
value: option.value,
|
|
1264
|
+
checked: option.value === value,
|
|
1265
|
+
onChange: () => onChange(option.value),
|
|
1266
|
+
disabled,
|
|
1267
|
+
className: SegmentedControl_module_default.input
|
|
1268
|
+
}
|
|
1269
|
+
),
|
|
1270
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: SegmentedControl_module_default.face, children: option.label })
|
|
1271
|
+
] }, option.value))
|
|
1272
|
+
}
|
|
1273
|
+
);
|
|
1146
1274
|
}
|
|
1147
1275
|
|
|
1148
1276
|
// 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({
|
|
1277
|
+
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" };
|
|
1278
|
+
function SearchField({
|
|
1279
|
+
label,
|
|
1280
|
+
clearLabel,
|
|
1281
|
+
value,
|
|
1282
|
+
onChange,
|
|
1283
|
+
className,
|
|
1284
|
+
...rest
|
|
1285
|
+
}) {
|
|
1151
1286
|
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cx(SearchField_module_default.wrap, className), children: [
|
|
1152
1287
|
/* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: SearchField_module_default.glass, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1153
1288
|
"path",
|
|
@@ -1174,10 +1309,10 @@ function SearchField({ label, value, onChange, className, ...rest }) {
|
|
|
1174
1309
|
"button",
|
|
1175
1310
|
{
|
|
1176
1311
|
type: "button",
|
|
1177
|
-
"aria-label":
|
|
1312
|
+
"aria-label": clearLabel,
|
|
1178
1313
|
className: SearchField_module_default.clear,
|
|
1179
1314
|
onClick: () => onChange(""),
|
|
1180
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1315
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(CloseGlyph, { className: SearchField_module_default.clearGlyph })
|
|
1181
1316
|
}
|
|
1182
1317
|
)
|
|
1183
1318
|
] });
|
|
@@ -1210,12 +1345,15 @@ function ListItem({
|
|
|
1210
1345
|
onClick,
|
|
1211
1346
|
pressed,
|
|
1212
1347
|
href,
|
|
1348
|
+
as,
|
|
1213
1349
|
surface,
|
|
1214
1350
|
className,
|
|
1351
|
+
ref,
|
|
1215
1352
|
...rest
|
|
1216
1353
|
}) {
|
|
1217
1354
|
const inGroup = react.useContext(ListGroupContext);
|
|
1218
1355
|
const Root = inGroup ? "li" : "div";
|
|
1356
|
+
const LinkElement = as ?? "a";
|
|
1219
1357
|
const resolved = surface ?? (inGroup ? void 0 : "card");
|
|
1220
1358
|
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1221
1359
|
leading != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: List_module_default.leading, children: leading }),
|
|
@@ -1229,8 +1367,9 @@ function ListItem({
|
|
|
1229
1367
|
Root,
|
|
1230
1368
|
{
|
|
1231
1369
|
className: cx(List_module_default.item, resolved && List_module_default[`surface-${resolved}`], className),
|
|
1370
|
+
ref,
|
|
1232
1371
|
...rest,
|
|
1233
|
-
children: href !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1372
|
+
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
1373
|
"button",
|
|
1235
1374
|
{
|
|
1236
1375
|
type: "button",
|
|
@@ -1346,7 +1485,7 @@ function TabPanel({ value, className, children, ...rest }) {
|
|
|
1346
1485
|
}
|
|
1347
1486
|
|
|
1348
1487
|
// 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" };
|
|
1488
|
+
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", "action": "mds-Toast__action mds-hit-area__hitArea" };
|
|
1350
1489
|
var ToastContext = react.createContext(null);
|
|
1351
1490
|
function useToast() {
|
|
1352
1491
|
const context = react.useContext(ToastContext);
|
|
@@ -1355,18 +1494,25 @@ function useToast() {
|
|
|
1355
1494
|
}
|
|
1356
1495
|
function ToastProvider({
|
|
1357
1496
|
children,
|
|
1358
|
-
regionLabel
|
|
1359
|
-
dismissLabel
|
|
1497
|
+
regionLabel,
|
|
1498
|
+
dismissLabel
|
|
1360
1499
|
}) {
|
|
1361
1500
|
const [toasts, setToasts] = react.useState([]);
|
|
1362
1501
|
const nextId = react.useRef(1);
|
|
1502
|
+
const leaving = react.useRef(/* @__PURE__ */ new Map());
|
|
1363
1503
|
const dismiss = react.useCallback((id) => {
|
|
1364
1504
|
setToasts((current) => current.filter((entry) => entry.id !== id));
|
|
1505
|
+
const said = leaving.current.get(id);
|
|
1506
|
+
if (said !== void 0) {
|
|
1507
|
+
leaving.current.delete(id);
|
|
1508
|
+
said();
|
|
1509
|
+
}
|
|
1365
1510
|
}, []);
|
|
1366
1511
|
const toast = react.useCallback(
|
|
1367
|
-
({ title, description, tone = "neutral", duration = 5e3 }) => {
|
|
1512
|
+
({ title, description, tone = "neutral", duration = 5e3, action, onDismiss }) => {
|
|
1368
1513
|
const id = nextId.current++;
|
|
1369
|
-
|
|
1514
|
+
if (onDismiss !== void 0) leaving.current.set(id, onDismiss);
|
|
1515
|
+
setToasts((current) => [...current, { id, title, description, tone, action }]);
|
|
1370
1516
|
if (duration > 0) setTimeout(() => dismiss(id), duration);
|
|
1371
1517
|
return id;
|
|
1372
1518
|
},
|
|
@@ -1380,6 +1526,18 @@ function ToastProvider({
|
|
|
1380
1526
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: Toast_module_default.title, children: entry.title }),
|
|
1381
1527
|
entry.description !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: Toast_module_default.description, children: entry.description })
|
|
1382
1528
|
] }),
|
|
1529
|
+
entry.action !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1530
|
+
"button",
|
|
1531
|
+
{
|
|
1532
|
+
type: "button",
|
|
1533
|
+
className: Toast_module_default.action,
|
|
1534
|
+
onClick: () => {
|
|
1535
|
+
entry.action?.onClick();
|
|
1536
|
+
dismiss(entry.id);
|
|
1537
|
+
},
|
|
1538
|
+
children: entry.action.label
|
|
1539
|
+
}
|
|
1540
|
+
),
|
|
1383
1541
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1384
1542
|
"button",
|
|
1385
1543
|
{
|
|
@@ -1387,7 +1545,7 @@ function ToastProvider({
|
|
|
1387
1545
|
"aria-label": `${dismissLabel}: ${entry.title}`,
|
|
1388
1546
|
className: Toast_module_default.close,
|
|
1389
1547
|
onClick: () => dismiss(entry.id),
|
|
1390
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1548
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(CloseGlyph, { className: Toast_module_default.closeGlyph })
|
|
1391
1549
|
}
|
|
1392
1550
|
)
|
|
1393
1551
|
] }, entry.id)) })
|
|
@@ -1455,15 +1613,26 @@ function Container({
|
|
|
1455
1613
|
|
|
1456
1614
|
// mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Card/Card.module.css?mds-scoped
|
|
1457
1615
|
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 }) {
|
|
1616
|
+
function Card({ children, variant = "card", emphasis = false, onClick, href, as, className, ref, ...rest }) {
|
|
1459
1617
|
const cardClass = cx(Card_module_default.card, Card_module_default[`variant-${variant}`], emphasis && Card_module_default.emphasis, className);
|
|
1460
1618
|
if (href !== void 0) {
|
|
1461
|
-
|
|
1619
|
+
const Element = as ?? "a";
|
|
1620
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Element, { className: cx(cardClass, Card_module_default.interactive), href, ref, ...rest, children });
|
|
1462
1621
|
}
|
|
1463
1622
|
if (onClick !== void 0) {
|
|
1464
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1623
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1624
|
+
"button",
|
|
1625
|
+
{
|
|
1626
|
+
type: "button",
|
|
1627
|
+
className: cx(cardClass, Card_module_default.interactive),
|
|
1628
|
+
onClick,
|
|
1629
|
+
ref,
|
|
1630
|
+
...rest,
|
|
1631
|
+
children
|
|
1632
|
+
}
|
|
1633
|
+
);
|
|
1465
1634
|
}
|
|
1466
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cardClass, ...rest, children });
|
|
1635
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cardClass, ref, ...rest, children });
|
|
1467
1636
|
}
|
|
1468
1637
|
function CardHeader({ className, ...rest }) {
|
|
1469
1638
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx(Card_module_default.header, className), ...rest });
|
|
@@ -1517,7 +1686,7 @@ function ConfirmDialog({
|
|
|
1517
1686
|
title,
|
|
1518
1687
|
description,
|
|
1519
1688
|
confirmLabel,
|
|
1520
|
-
cancelLabel
|
|
1689
|
+
cancelLabel,
|
|
1521
1690
|
tone = "default",
|
|
1522
1691
|
errorMessage
|
|
1523
1692
|
}) {
|
|
@@ -1586,9 +1755,9 @@ function ScreenContent({ children, flush = false, className, ref, ...rest }) {
|
|
|
1586
1755
|
|
|
1587
1756
|
// mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/AppBar/AppBar.module.css?mds-scoped
|
|
1588
1757
|
var AppBar_module_default = { "bar": "mds-AppBar__bar", "title": "mds-AppBar__title", "text": "mds-AppBar__text", "subtitle": "mds-AppBar__subtitle", "slot": "mds-AppBar__slot", "trailing": "mds-AppBar__trailing" };
|
|
1589
|
-
function AppBar({ title, subtitle, leading, trailing }) {
|
|
1758
|
+
function AppBar({ title, subtitle, leading, trailing, className, ref, ...rest }) {
|
|
1590
1759
|
const heading = title ? /* @__PURE__ */ jsxRuntime.jsx("h1", { className: AppBar_module_default.title, children: title }) : null;
|
|
1591
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("header", { className: AppBar_module_default.bar, children: [
|
|
1760
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("header", { ref, className: cx(AppBar_module_default.bar, className), ...rest, children: [
|
|
1592
1761
|
leading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: AppBar_module_default.slot, children: leading }) : null,
|
|
1593
1762
|
subtitle != null ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: AppBar_module_default.text, children: [
|
|
1594
1763
|
heading,
|
|
@@ -1603,23 +1772,679 @@ var TabBar_module_default = { "bar": "mds-TabBar__bar", "item": "mds-TabBar__ite
|
|
|
1603
1772
|
function TabBar({ label, children }) {
|
|
1604
1773
|
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": label, className: TabBar_module_default.bar, children });
|
|
1605
1774
|
}
|
|
1606
|
-
function TabBarItem({
|
|
1775
|
+
function TabBarItem({
|
|
1776
|
+
label,
|
|
1777
|
+
icon,
|
|
1778
|
+
href,
|
|
1779
|
+
onClick,
|
|
1780
|
+
active = false,
|
|
1781
|
+
badge = false,
|
|
1782
|
+
as,
|
|
1783
|
+
hideLabel = false
|
|
1784
|
+
}) {
|
|
1607
1785
|
const className = cx(TabBar_module_default.item, active && TabBar_module_default.active);
|
|
1608
1786
|
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1609
1787
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: TabBar_module_default.icon, "aria-hidden": "true", children: [
|
|
1610
1788
|
icon,
|
|
1611
1789
|
badge ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: TabBar_module_default.badge, "data-testid": "mds-tabbar-badge" }) : null
|
|
1612
1790
|
] }),
|
|
1613
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: TabBar_module_default.label, children: label })
|
|
1791
|
+
hideLabel ? /* @__PURE__ */ jsxRuntime.jsx(VisuallyHidden, { children: label }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: TabBar_module_default.label, children: label })
|
|
1614
1792
|
] });
|
|
1615
1793
|
if (href !== void 0) {
|
|
1616
|
-
|
|
1794
|
+
const Element = as ?? "a";
|
|
1795
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Element, { href, className, "aria-current": active ? "page" : void 0, onClick, children: content });
|
|
1617
1796
|
}
|
|
1618
1797
|
return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className, "aria-current": active ? "page" : void 0, onClick, children: content });
|
|
1619
1798
|
}
|
|
1620
1799
|
function TabBarAction({ label, icon, onClick }) {
|
|
1621
1800
|
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
1801
|
}
|
|
1802
|
+
|
|
1803
|
+
// mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/MediaPlaceholder/MediaPlaceholder.module.css?mds-scoped
|
|
1804
|
+
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" };
|
|
1805
|
+
function MediaPlaceholder({
|
|
1806
|
+
aspect,
|
|
1807
|
+
src,
|
|
1808
|
+
alt = "",
|
|
1809
|
+
glyph,
|
|
1810
|
+
caption,
|
|
1811
|
+
blurred = false,
|
|
1812
|
+
cover,
|
|
1813
|
+
className,
|
|
1814
|
+
style,
|
|
1815
|
+
...rest
|
|
1816
|
+
}) {
|
|
1817
|
+
const [failed, setFailed] = react.useState();
|
|
1818
|
+
const picture = src !== void 0 && failed !== src;
|
|
1819
|
+
const vars = aspect === void 0 ? {} : { "--media-aspect": aspect };
|
|
1820
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1821
|
+
"div",
|
|
1822
|
+
{
|
|
1823
|
+
className: cx(MediaPlaceholder_module_default.media, blurred && MediaPlaceholder_module_default.blurred, className),
|
|
1824
|
+
style: { ...vars, ...style },
|
|
1825
|
+
...rest,
|
|
1826
|
+
children: [
|
|
1827
|
+
picture ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1828
|
+
"img",
|
|
1829
|
+
{
|
|
1830
|
+
className: MediaPlaceholder_module_default.image,
|
|
1831
|
+
src,
|
|
1832
|
+
alt,
|
|
1833
|
+
loading: "lazy",
|
|
1834
|
+
decoding: "async",
|
|
1835
|
+
onError: () => setFailed(src)
|
|
1836
|
+
}
|
|
1837
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: MediaPlaceholder_module_default.fill, "aria-hidden": "true", children: [
|
|
1838
|
+
glyph,
|
|
1839
|
+
caption !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "meta", children: caption })
|
|
1840
|
+
] }),
|
|
1841
|
+
picture && caption !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "meta", tone: "on-media", className: MediaPlaceholder_module_default.caption, children: caption }),
|
|
1842
|
+
cover !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: MediaPlaceholder_module_default.cover, children: cover })
|
|
1843
|
+
]
|
|
1844
|
+
}
|
|
1845
|
+
);
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
// mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/ImageCarousel/ImageCarousel.module.css?mds-scoped
|
|
1849
|
+
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" };
|
|
1850
|
+
var SWIPE_THRESHOLD = 40;
|
|
1851
|
+
function ImageCarousel({
|
|
1852
|
+
slides,
|
|
1853
|
+
labels,
|
|
1854
|
+
index,
|
|
1855
|
+
defaultIndex = 0,
|
|
1856
|
+
onIndexChange,
|
|
1857
|
+
pager = "thumbnails",
|
|
1858
|
+
maxThumbnails = 4,
|
|
1859
|
+
onZoom,
|
|
1860
|
+
zoomIcon,
|
|
1861
|
+
zoomLabel,
|
|
1862
|
+
className,
|
|
1863
|
+
...rest
|
|
1864
|
+
}) {
|
|
1865
|
+
const [ownIndex, setOwnIndex] = react.useState(defaultIndex);
|
|
1866
|
+
const swipeStart = react.useRef(null);
|
|
1867
|
+
const held = index !== void 0;
|
|
1868
|
+
const last = slides.length - 1;
|
|
1869
|
+
const current = Math.min(Math.max(held ? index : ownIndex, 0), last);
|
|
1870
|
+
const many = slides.length > 1;
|
|
1871
|
+
const slide = slides[current];
|
|
1872
|
+
if (slide === void 0) return null;
|
|
1873
|
+
const goTo = (next) => {
|
|
1874
|
+
const clamped = Math.min(Math.max(next, 0), last);
|
|
1875
|
+
if (clamped === current) return;
|
|
1876
|
+
if (!held) setOwnIndex(clamped);
|
|
1877
|
+
onIndexChange?.(clamped);
|
|
1878
|
+
};
|
|
1879
|
+
const onKeyDown = (event) => {
|
|
1880
|
+
if (!many) return;
|
|
1881
|
+
const step = {
|
|
1882
|
+
ArrowLeft: current - 1,
|
|
1883
|
+
ArrowRight: current + 1,
|
|
1884
|
+
Home: 0,
|
|
1885
|
+
End: last
|
|
1886
|
+
};
|
|
1887
|
+
const next = step[event.key];
|
|
1888
|
+
if (next === void 0) return;
|
|
1889
|
+
event.preventDefault();
|
|
1890
|
+
goTo(next);
|
|
1891
|
+
};
|
|
1892
|
+
const onPointerUp = (event) => {
|
|
1893
|
+
const start = swipeStart.current;
|
|
1894
|
+
swipeStart.current = null;
|
|
1895
|
+
if (start === null) return;
|
|
1896
|
+
const travelled = event.clientX - start;
|
|
1897
|
+
if (Math.abs(travelled) < SWIPE_THRESHOLD) {
|
|
1898
|
+
const onControl = event.target.closest("button") !== null;
|
|
1899
|
+
if (onZoom !== void 0 && !onControl && slide.covered !== true) onZoom(current);
|
|
1900
|
+
return;
|
|
1901
|
+
}
|
|
1902
|
+
if (many) goTo(travelled < 0 ? current + 1 : current - 1);
|
|
1903
|
+
};
|
|
1904
|
+
const shown = pager === "thumbnails" ? slides.slice(0, maxThumbnails) : [];
|
|
1905
|
+
const hidden = slides.length - shown.length;
|
|
1906
|
+
const counted = labels.counter(current + 1, slides.length);
|
|
1907
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1908
|
+
"section",
|
|
1909
|
+
{
|
|
1910
|
+
className: cx(ImageCarousel_module_default.carousel, className),
|
|
1911
|
+
"aria-roledescription": labels.carouselRole,
|
|
1912
|
+
"aria-label": labels.region,
|
|
1913
|
+
tabIndex: 0,
|
|
1914
|
+
onKeyDown,
|
|
1915
|
+
...rest,
|
|
1916
|
+
children: [
|
|
1917
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1918
|
+
"div",
|
|
1919
|
+
{
|
|
1920
|
+
className: ImageCarousel_module_default.viewport,
|
|
1921
|
+
onPointerDown: (event) => {
|
|
1922
|
+
swipeStart.current = event.clientX;
|
|
1923
|
+
},
|
|
1924
|
+
onPointerUp,
|
|
1925
|
+
onPointerCancel: () => {
|
|
1926
|
+
swipeStart.current = null;
|
|
1927
|
+
},
|
|
1928
|
+
children: [
|
|
1929
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: ImageCarousel_module_default.slide, role: "group", "aria-roledescription": labels.slideRole, "aria-label": counted, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1930
|
+
MediaPlaceholder,
|
|
1931
|
+
{
|
|
1932
|
+
aspect: slide.aspect ?? "4 / 3",
|
|
1933
|
+
...slide.src === void 0 ? {} : { src: slide.src },
|
|
1934
|
+
...slide.alt === void 0 ? {} : { alt: slide.alt },
|
|
1935
|
+
...slide.caption === void 0 ? {} : { caption: slide.caption },
|
|
1936
|
+
blurred: slide.covered === true,
|
|
1937
|
+
...slide.cover === void 0 ? {} : { cover: slide.cover }
|
|
1938
|
+
}
|
|
1939
|
+
) }),
|
|
1940
|
+
onZoom !== void 0 && slide.covered !== true && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1941
|
+
Button,
|
|
1942
|
+
{
|
|
1943
|
+
className: ImageCarousel_module_default.zoom,
|
|
1944
|
+
variant: "secondary",
|
|
1945
|
+
size: "sm",
|
|
1946
|
+
iconOnly: true,
|
|
1947
|
+
"aria-label": zoomLabel,
|
|
1948
|
+
onClick: () => onZoom(current),
|
|
1949
|
+
children: zoomIcon
|
|
1950
|
+
}
|
|
1951
|
+
),
|
|
1952
|
+
many && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1953
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1954
|
+
Button,
|
|
1955
|
+
{
|
|
1956
|
+
className: cx(ImageCarousel_module_default.step, ImageCarousel_module_default.prev),
|
|
1957
|
+
variant: "secondary",
|
|
1958
|
+
size: "sm",
|
|
1959
|
+
iconOnly: true,
|
|
1960
|
+
"aria-label": labels.previous,
|
|
1961
|
+
disabled: current === 0,
|
|
1962
|
+
onClick: () => goTo(current - 1),
|
|
1963
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeftGlyph, {})
|
|
1964
|
+
}
|
|
1965
|
+
),
|
|
1966
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1967
|
+
Button,
|
|
1968
|
+
{
|
|
1969
|
+
className: cx(ImageCarousel_module_default.step, ImageCarousel_module_default.next),
|
|
1970
|
+
variant: "secondary",
|
|
1971
|
+
size: "sm",
|
|
1972
|
+
iconOnly: true,
|
|
1973
|
+
"aria-label": labels.next,
|
|
1974
|
+
disabled: current === last,
|
|
1975
|
+
onClick: () => goTo(current + 1),
|
|
1976
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRightGlyph, {})
|
|
1977
|
+
}
|
|
1978
|
+
),
|
|
1979
|
+
/* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "meta", className: ImageCarousel_module_default.counter, "aria-live": "polite", children: counted })
|
|
1980
|
+
] })
|
|
1981
|
+
]
|
|
1982
|
+
}
|
|
1983
|
+
),
|
|
1984
|
+
many && pager === "thumbnails" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ImageCarousel_module_default.thumbs, children: [
|
|
1985
|
+
shown.map((frame, position) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1986
|
+
"button",
|
|
1987
|
+
{
|
|
1988
|
+
type: "button",
|
|
1989
|
+
className: ImageCarousel_module_default.thumb,
|
|
1990
|
+
"aria-label": labels.slide(position + 1),
|
|
1991
|
+
"aria-current": position === current ? "true" : void 0,
|
|
1992
|
+
onClick: () => goTo(position),
|
|
1993
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1994
|
+
MediaPlaceholder,
|
|
1995
|
+
{
|
|
1996
|
+
aspect: "1 / 1",
|
|
1997
|
+
...frame.src === void 0 ? {} : { src: frame.src },
|
|
1998
|
+
blurred: frame.covered === true
|
|
1999
|
+
}
|
|
2000
|
+
)
|
|
2001
|
+
},
|
|
2002
|
+
frame.id
|
|
2003
|
+
)),
|
|
2004
|
+
hidden > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2005
|
+
"button",
|
|
2006
|
+
{
|
|
2007
|
+
type: "button",
|
|
2008
|
+
className: cx(ImageCarousel_module_default.thumb, ImageCarousel_module_default.more),
|
|
2009
|
+
"aria-label": labels.more(hidden),
|
|
2010
|
+
onClick: () => goTo(shown.length),
|
|
2011
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(Text, { variant: "meta", children: [
|
|
2012
|
+
"+",
|
|
2013
|
+
hidden
|
|
2014
|
+
] })
|
|
2015
|
+
}
|
|
2016
|
+
)
|
|
2017
|
+
] }),
|
|
2018
|
+
many && pager === "dots" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: ImageCarousel_module_default.dots, children: slides.map((frame, position) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2019
|
+
"button",
|
|
2020
|
+
{
|
|
2021
|
+
type: "button",
|
|
2022
|
+
className: ImageCarousel_module_default.dot,
|
|
2023
|
+
"aria-label": labels.slide(position + 1),
|
|
2024
|
+
"aria-current": position === current ? "true" : void 0,
|
|
2025
|
+
onClick: () => goTo(position)
|
|
2026
|
+
},
|
|
2027
|
+
frame.id
|
|
2028
|
+
)) })
|
|
2029
|
+
]
|
|
2030
|
+
}
|
|
2031
|
+
);
|
|
2032
|
+
}
|
|
2033
|
+
|
|
2034
|
+
// mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/UploadProgress/UploadProgress.module.css?mds-scoped
|
|
2035
|
+
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" };
|
|
2036
|
+
function UploadProgress({
|
|
2037
|
+
name,
|
|
2038
|
+
labels,
|
|
2039
|
+
preview,
|
|
2040
|
+
mark,
|
|
2041
|
+
value,
|
|
2042
|
+
status = "uploading",
|
|
2043
|
+
detail,
|
|
2044
|
+
error,
|
|
2045
|
+
onCancel,
|
|
2046
|
+
onRetry,
|
|
2047
|
+
onRemove,
|
|
2048
|
+
className,
|
|
2049
|
+
...rest
|
|
2050
|
+
}) {
|
|
2051
|
+
const running = status === "uploading" || status === "processing";
|
|
2052
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx(UploadProgress_module_default.upload, UploadProgress_module_default[`status-${status}`], className), ...rest, children: [
|
|
2053
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: UploadProgress_module_default.head, children: [
|
|
2054
|
+
preview !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: UploadProgress_module_default.preview, children: preview }),
|
|
2055
|
+
mark !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: UploadProgress_module_default.mark, children: mark }),
|
|
2056
|
+
/* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "label", truncate: true, className: UploadProgress_module_default.name, children: name }),
|
|
2057
|
+
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, {}) }),
|
|
2058
|
+
!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, {}) }),
|
|
2059
|
+
status === "error" && onRetry !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", variant: "secondary", onClick: onRetry, children: labels.retry })
|
|
2060
|
+
] }),
|
|
2061
|
+
running && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2062
|
+
ProgressBar,
|
|
2063
|
+
{
|
|
2064
|
+
label: `${labels[status]} ${name}`,
|
|
2065
|
+
value: value ?? 0,
|
|
2066
|
+
indeterminate: status === "processing",
|
|
2067
|
+
...detail === void 0 ? {} : { valueText: detail }
|
|
2068
|
+
}
|
|
2069
|
+
),
|
|
2070
|
+
/* @__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: [
|
|
2071
|
+
status !== "uploading" && /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "meta", children: labels[status] }),
|
|
2072
|
+
detail !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "meta", children: detail })
|
|
2073
|
+
] }) })
|
|
2074
|
+
] });
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2077
|
+
// mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Lightbox/Lightbox.module.css?mds-scoped
|
|
2078
|
+
var Lightbox_module_default = { "panel": "mds-Lightbox__panel", "bar": "mds-Lightbox__bar", "surface": "mds-Lightbox__surface", "image": "mds-Lightbox__image", "caption": "mds-Lightbox__caption" };
|
|
2079
|
+
var MIN_SCALE = 1;
|
|
2080
|
+
var MAX_SCALE = 4;
|
|
2081
|
+
var STEP = 1;
|
|
2082
|
+
var DOUBLE = 2.5;
|
|
2083
|
+
var WHEEL = 0.01;
|
|
2084
|
+
var ORIGIN = { x: 0, y: 0 };
|
|
2085
|
+
var clamp = (value, low, high) => Math.min(Math.max(value, low), high);
|
|
2086
|
+
var round = (value) => Math.round(value * 1e3) / 1e3;
|
|
2087
|
+
var distance = (a, b) => Math.hypot(a.x - b.x, a.y - b.y);
|
|
2088
|
+
function Lightbox({ open, onClose, src, alt = "", caption, labels }) {
|
|
2089
|
+
const [surface, setSurface] = react.useState(null);
|
|
2090
|
+
const [scale, setScale] = react.useState(MIN_SCALE);
|
|
2091
|
+
const [offset, setOffset] = react.useState(ORIGIN);
|
|
2092
|
+
const points = react.useRef(/* @__PURE__ */ new Map());
|
|
2093
|
+
const from = react.useRef({ spread: 0, scale: MIN_SCALE, x: 0, y: 0, offset: ORIGIN });
|
|
2094
|
+
const [shown, setShown] = react.useState({ src, open });
|
|
2095
|
+
if (shown.src !== src || shown.open !== open) {
|
|
2096
|
+
setShown({ src, open });
|
|
2097
|
+
setScale(MIN_SCALE);
|
|
2098
|
+
setOffset(ORIGIN);
|
|
2099
|
+
}
|
|
2100
|
+
react.useEffect(() => {
|
|
2101
|
+
points.current.clear();
|
|
2102
|
+
}, [src, open]);
|
|
2103
|
+
const hold = react.useCallback(
|
|
2104
|
+
(next, at2) => {
|
|
2105
|
+
const box = surface?.getBoundingClientRect();
|
|
2106
|
+
if (!box) return ORIGIN;
|
|
2107
|
+
const room = { x: box.width * (at2 - 1) / 2, y: box.height * (at2 - 1) / 2 };
|
|
2108
|
+
return { x: clamp(next.x, -room.x, room.x), y: clamp(next.y, -room.y, room.y) };
|
|
2109
|
+
},
|
|
2110
|
+
[surface]
|
|
2111
|
+
);
|
|
2112
|
+
const zoom = react.useCallback(
|
|
2113
|
+
(to) => {
|
|
2114
|
+
const next = clamp(round(to), MIN_SCALE, MAX_SCALE);
|
|
2115
|
+
setScale(next);
|
|
2116
|
+
setOffset((current) => hold(current, next));
|
|
2117
|
+
},
|
|
2118
|
+
[hold]
|
|
2119
|
+
);
|
|
2120
|
+
const at = react.useRef(scale);
|
|
2121
|
+
react.useEffect(() => {
|
|
2122
|
+
at.current = scale;
|
|
2123
|
+
}, [scale]);
|
|
2124
|
+
react.useEffect(() => {
|
|
2125
|
+
if (!surface) return;
|
|
2126
|
+
const onWheel = (event) => {
|
|
2127
|
+
if (!event.ctrlKey) return;
|
|
2128
|
+
event.preventDefault();
|
|
2129
|
+
zoom(at.current * Math.exp(-event.deltaY * WHEEL));
|
|
2130
|
+
};
|
|
2131
|
+
surface.addEventListener("wheel", onWheel, { passive: false });
|
|
2132
|
+
return () => surface.removeEventListener("wheel", onWheel);
|
|
2133
|
+
}, [surface, zoom]);
|
|
2134
|
+
function onPointerDown(event) {
|
|
2135
|
+
points.current.set(event.pointerId, { x: event.clientX, y: event.clientY });
|
|
2136
|
+
const [first, second] = [...points.current.values()];
|
|
2137
|
+
if (first && second) {
|
|
2138
|
+
from.current = { ...from.current, spread: distance(first, second), scale };
|
|
2139
|
+
return;
|
|
2140
|
+
}
|
|
2141
|
+
if (first) from.current = { ...from.current, x: first.x, y: first.y, offset };
|
|
2142
|
+
}
|
|
2143
|
+
function onPointerMove(event) {
|
|
2144
|
+
if (!points.current.has(event.pointerId)) return;
|
|
2145
|
+
points.current.set(event.pointerId, { x: event.clientX, y: event.clientY });
|
|
2146
|
+
const [first, second] = [...points.current.values()];
|
|
2147
|
+
if (!first) return;
|
|
2148
|
+
if (second) {
|
|
2149
|
+
const spread = distance(first, second);
|
|
2150
|
+
if (from.current.spread === 0) return;
|
|
2151
|
+
zoom(from.current.scale * (spread / from.current.spread));
|
|
2152
|
+
return;
|
|
2153
|
+
}
|
|
2154
|
+
if (scale <= MIN_SCALE) return;
|
|
2155
|
+
setOffset(
|
|
2156
|
+
hold(
|
|
2157
|
+
{
|
|
2158
|
+
x: from.current.offset.x + (first.x - from.current.x),
|
|
2159
|
+
y: from.current.offset.y + (first.y - from.current.y)
|
|
2160
|
+
},
|
|
2161
|
+
scale
|
|
2162
|
+
)
|
|
2163
|
+
);
|
|
2164
|
+
}
|
|
2165
|
+
function onPointerUp(event) {
|
|
2166
|
+
points.current.delete(event.pointerId);
|
|
2167
|
+
const [rest] = [...points.current.values()];
|
|
2168
|
+
if (rest) from.current = { ...from.current, x: rest.x, y: rest.y, offset };
|
|
2169
|
+
}
|
|
2170
|
+
const vars = {
|
|
2171
|
+
"--zoom": String(round(scale)),
|
|
2172
|
+
"--pan-x": `${round(offset.x)}px`,
|
|
2173
|
+
"--pan-y": `${round(offset.y)}px`
|
|
2174
|
+
};
|
|
2175
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2176
|
+
Overlay,
|
|
2177
|
+
{
|
|
2178
|
+
open,
|
|
2179
|
+
onClose,
|
|
2180
|
+
label: labels.dialog,
|
|
2181
|
+
variant: "lightbox",
|
|
2182
|
+
closeOnScrimClick: false,
|
|
2183
|
+
panelClassName: Lightbox_module_default.panel,
|
|
2184
|
+
children: [
|
|
2185
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: Lightbox_module_default.bar, children: [
|
|
2186
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2187
|
+
Button,
|
|
2188
|
+
{
|
|
2189
|
+
iconOnly: true,
|
|
2190
|
+
"aria-label": labels.zoomOut,
|
|
2191
|
+
variant: "ghost",
|
|
2192
|
+
onMedia: true,
|
|
2193
|
+
disabled: scale <= MIN_SCALE,
|
|
2194
|
+
onClick: () => zoom(scale - STEP),
|
|
2195
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ZoomOutGlyph, {})
|
|
2196
|
+
}
|
|
2197
|
+
),
|
|
2198
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2199
|
+
Button,
|
|
2200
|
+
{
|
|
2201
|
+
iconOnly: true,
|
|
2202
|
+
"aria-label": labels.zoomIn,
|
|
2203
|
+
variant: "ghost",
|
|
2204
|
+
onMedia: true,
|
|
2205
|
+
disabled: scale >= MAX_SCALE,
|
|
2206
|
+
onClick: () => zoom(scale + STEP),
|
|
2207
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ZoomInGlyph, {})
|
|
2208
|
+
}
|
|
2209
|
+
),
|
|
2210
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { iconOnly: true, "aria-label": labels.close, variant: "ghost", onMedia: true, onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsx(CloseGlyph, {}) })
|
|
2211
|
+
] }),
|
|
2212
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2213
|
+
"div",
|
|
2214
|
+
{
|
|
2215
|
+
ref: setSurface,
|
|
2216
|
+
className: Lightbox_module_default.surface,
|
|
2217
|
+
onPointerDown,
|
|
2218
|
+
onPointerMove,
|
|
2219
|
+
onPointerUp,
|
|
2220
|
+
onPointerCancel: onPointerUp,
|
|
2221
|
+
onDoubleClick: () => zoom(scale > MIN_SCALE ? MIN_SCALE : DOUBLE),
|
|
2222
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("img", { className: Lightbox_module_default.image, src, alt, draggable: false, style: vars })
|
|
2223
|
+
}
|
|
2224
|
+
),
|
|
2225
|
+
caption !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "meta", tone: "on-media", className: Lightbox_module_default.caption, children: caption })
|
|
2226
|
+
]
|
|
2227
|
+
}
|
|
2228
|
+
);
|
|
2229
|
+
}
|
|
2230
|
+
|
|
2231
|
+
// mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/VideoPlayer/VideoPlayer.module.css?mds-scoped
|
|
2232
|
+
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" };
|
|
2233
|
+
var FIRST_FRAME_S = 1e-3;
|
|
2234
|
+
var SECONDS_IN_MINUTE = 60;
|
|
2235
|
+
var SECONDS_IN_HOUR = 3600;
|
|
2236
|
+
function clock(seconds) {
|
|
2237
|
+
if (!Number.isFinite(seconds) || seconds < 0) return "0:00";
|
|
2238
|
+
const whole = Math.floor(seconds);
|
|
2239
|
+
const s = whole % SECONDS_IN_MINUTE;
|
|
2240
|
+
const m = Math.floor(whole / SECONDS_IN_MINUTE) % SECONDS_IN_MINUTE;
|
|
2241
|
+
const h = Math.floor(whole / SECONDS_IN_HOUR);
|
|
2242
|
+
const ss = String(s).padStart(2, "0");
|
|
2243
|
+
return h > 0 ? `${h}:${String(m).padStart(2, "0")}:${ss}` : `${m}:${ss}`;
|
|
2244
|
+
}
|
|
2245
|
+
function VideoPlayer({
|
|
2246
|
+
src,
|
|
2247
|
+
poster,
|
|
2248
|
+
labels,
|
|
2249
|
+
chapters,
|
|
2250
|
+
chaptersLabel,
|
|
2251
|
+
onChapterSelect,
|
|
2252
|
+
captions,
|
|
2253
|
+
captionsLabel,
|
|
2254
|
+
autoPlay = false,
|
|
2255
|
+
covered = false,
|
|
2256
|
+
cover,
|
|
2257
|
+
className,
|
|
2258
|
+
ref,
|
|
2259
|
+
...rest
|
|
2260
|
+
}) {
|
|
2261
|
+
const media = react.useRef(null);
|
|
2262
|
+
const root = react.useRef(null);
|
|
2263
|
+
const [playing, setPlaying] = react.useState(false);
|
|
2264
|
+
const [muted, setMuted] = react.useState(false);
|
|
2265
|
+
const [at, setAt] = react.useState(0);
|
|
2266
|
+
const [length, setLength] = react.useState(0);
|
|
2267
|
+
const [isFullscreen, setFullscreen] = react.useState(false);
|
|
2268
|
+
function toggle() {
|
|
2269
|
+
const el = media.current;
|
|
2270
|
+
if (!el) return;
|
|
2271
|
+
if (playing) el.pause();
|
|
2272
|
+
else void el.play();
|
|
2273
|
+
}
|
|
2274
|
+
function toggleSound() {
|
|
2275
|
+
const el = media.current;
|
|
2276
|
+
if (!el) return;
|
|
2277
|
+
const next = !muted;
|
|
2278
|
+
el.muted = next;
|
|
2279
|
+
setMuted(next);
|
|
2280
|
+
}
|
|
2281
|
+
function onMetadata(event) {
|
|
2282
|
+
const el = event.currentTarget;
|
|
2283
|
+
setLength(el.duration);
|
|
2284
|
+
if (poster === void 0 && el.currentTime === 0) el.currentTime = FIRST_FRAME_S;
|
|
2285
|
+
}
|
|
2286
|
+
function goTo(seconds) {
|
|
2287
|
+
const el = media.current;
|
|
2288
|
+
if (el) el.currentTime = seconds;
|
|
2289
|
+
setAt(seconds);
|
|
2290
|
+
}
|
|
2291
|
+
function toggleCaptions() {
|
|
2292
|
+
const track = media.current?.textTracks?.[0];
|
|
2293
|
+
if (track) track.mode = track.mode === "showing" ? "disabled" : "showing";
|
|
2294
|
+
}
|
|
2295
|
+
function selectChapter(chapter) {
|
|
2296
|
+
goTo(chapter.at);
|
|
2297
|
+
onChapterSelect?.(chapter.at);
|
|
2298
|
+
}
|
|
2299
|
+
react.useEffect(() => {
|
|
2300
|
+
const read = () => setFullscreen(document.fullscreenElement === root.current);
|
|
2301
|
+
document.addEventListener("fullscreenchange", read);
|
|
2302
|
+
return () => document.removeEventListener("fullscreenchange", read);
|
|
2303
|
+
}, []);
|
|
2304
|
+
function toggleFullscreen() {
|
|
2305
|
+
if (isFullscreen) {
|
|
2306
|
+
void document.exitFullscreen?.();
|
|
2307
|
+
return;
|
|
2308
|
+
}
|
|
2309
|
+
const box = root.current;
|
|
2310
|
+
if (box?.requestFullscreen) {
|
|
2311
|
+
void box.requestFullscreen();
|
|
2312
|
+
return;
|
|
2313
|
+
}
|
|
2314
|
+
media.current?.webkitEnterFullscreen?.();
|
|
2315
|
+
}
|
|
2316
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2317
|
+
"section",
|
|
2318
|
+
{
|
|
2319
|
+
className: cx(VideoPlayer_module_default.player, covered && VideoPlayer_module_default.covered, className),
|
|
2320
|
+
"aria-label": labels.region,
|
|
2321
|
+
ref: (node) => {
|
|
2322
|
+
root.current = node;
|
|
2323
|
+
if (typeof ref === "function") ref(node);
|
|
2324
|
+
else if (ref) ref.current = node;
|
|
2325
|
+
},
|
|
2326
|
+
...rest,
|
|
2327
|
+
children: [
|
|
2328
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: VideoPlayer_module_default.frame, children: [
|
|
2329
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2330
|
+
"video",
|
|
2331
|
+
{
|
|
2332
|
+
ref: media,
|
|
2333
|
+
className: VideoPlayer_module_default.media,
|
|
2334
|
+
src,
|
|
2335
|
+
poster,
|
|
2336
|
+
autoPlay: autoPlay && !covered,
|
|
2337
|
+
playsInline: true,
|
|
2338
|
+
preload: "metadata",
|
|
2339
|
+
onPlay: () => setPlaying(true),
|
|
2340
|
+
onPause: () => setPlaying(false),
|
|
2341
|
+
onTimeUpdate: (event) => setAt(event.currentTarget.currentTime),
|
|
2342
|
+
onLoadedMetadata: onMetadata,
|
|
2343
|
+
children: captions !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2344
|
+
"track",
|
|
2345
|
+
{
|
|
2346
|
+
kind: "captions",
|
|
2347
|
+
src: captions.src,
|
|
2348
|
+
srcLang: captions.lang,
|
|
2349
|
+
label: captions.label,
|
|
2350
|
+
default: captions.defaultOn
|
|
2351
|
+
}
|
|
2352
|
+
)
|
|
2353
|
+
}
|
|
2354
|
+
),
|
|
2355
|
+
!playing && !covered && /* The picture is the target here; the control row below says the same
|
|
2356
|
+
thing in words, so this one is not said twice. */
|
|
2357
|
+
/* @__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, {}) }) }),
|
|
2358
|
+
cover !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: VideoPlayer_module_default.cover, children: cover })
|
|
2359
|
+
] }),
|
|
2360
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: VideoPlayer_module_default.controls, children: [
|
|
2361
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2362
|
+
Button,
|
|
2363
|
+
{
|
|
2364
|
+
iconOnly: true,
|
|
2365
|
+
"aria-label": playing ? labels.pause : labels.play,
|
|
2366
|
+
variant: "ghost",
|
|
2367
|
+
size: "sm",
|
|
2368
|
+
onClick: toggle,
|
|
2369
|
+
children: playing ? /* @__PURE__ */ jsxRuntime.jsx(PauseGlyph, {}) : /* @__PURE__ */ jsxRuntime.jsx(PlayGlyph, {})
|
|
2370
|
+
}
|
|
2371
|
+
),
|
|
2372
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2373
|
+
"input",
|
|
2374
|
+
{
|
|
2375
|
+
type: "range",
|
|
2376
|
+
className: VideoPlayer_module_default.scrub,
|
|
2377
|
+
"aria-label": labels.seek,
|
|
2378
|
+
min: 0,
|
|
2379
|
+
max: length || 0,
|
|
2380
|
+
step: 1,
|
|
2381
|
+
value: Math.min(at, length || 0),
|
|
2382
|
+
onChange: (event) => goTo(Number(event.target.value))
|
|
2383
|
+
}
|
|
2384
|
+
),
|
|
2385
|
+
/* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "meta", className: VideoPlayer_module_default.time, children: `${clock(at)} / ${clock(length)}` }),
|
|
2386
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2387
|
+
Button,
|
|
2388
|
+
{
|
|
2389
|
+
iconOnly: true,
|
|
2390
|
+
"aria-label": muted ? labels.unmute : labels.mute,
|
|
2391
|
+
variant: "ghost",
|
|
2392
|
+
size: "sm",
|
|
2393
|
+
onClick: toggleSound,
|
|
2394
|
+
children: muted ? /* @__PURE__ */ jsxRuntime.jsx(VolumeOffGlyph, {}) : /* @__PURE__ */ jsxRuntime.jsx(VolumeGlyph, {})
|
|
2395
|
+
}
|
|
2396
|
+
),
|
|
2397
|
+
captions !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2398
|
+
Button,
|
|
2399
|
+
{
|
|
2400
|
+
iconOnly: true,
|
|
2401
|
+
"aria-label": captionsLabel,
|
|
2402
|
+
variant: "ghost",
|
|
2403
|
+
size: "sm",
|
|
2404
|
+
"aria-pressed": captions.defaultOn ?? false,
|
|
2405
|
+
onClick: toggleCaptions,
|
|
2406
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(CaptionsGlyph, {})
|
|
2407
|
+
}
|
|
2408
|
+
),
|
|
2409
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2410
|
+
Button,
|
|
2411
|
+
{
|
|
2412
|
+
iconOnly: true,
|
|
2413
|
+
"aria-label": isFullscreen ? labels.exitFullscreen : labels.fullscreen,
|
|
2414
|
+
variant: "ghost",
|
|
2415
|
+
size: "sm",
|
|
2416
|
+
onClick: toggleFullscreen,
|
|
2417
|
+
children: isFullscreen ? /* @__PURE__ */ jsxRuntime.jsx(FullscreenExitGlyph, {}) : /* @__PURE__ */ jsxRuntime.jsx(FullscreenGlyph, {})
|
|
2418
|
+
}
|
|
2419
|
+
)
|
|
2420
|
+
] }),
|
|
2421
|
+
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: [
|
|
2422
|
+
/* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "meta", className: VideoPlayer_module_default.chapterAt, children: clock(chapter.at) }),
|
|
2423
|
+
/* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "body", children: chapter.label })
|
|
2424
|
+
] }) }, chapter.at)) })
|
|
2425
|
+
]
|
|
2426
|
+
}
|
|
2427
|
+
);
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
// mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Breadcrumb/Breadcrumb.module.css?mds-scoped
|
|
2431
|
+
var Breadcrumb_module_default = { "crumbs": "mds-Breadcrumb__crumbs", "list": "mds-Breadcrumb__list", "item": "mds-Breadcrumb__item", "separator": "mds-Breadcrumb__separator", "link": "mds-Breadcrumb__link" };
|
|
2432
|
+
function Breadcrumb({
|
|
2433
|
+
items,
|
|
2434
|
+
label,
|
|
2435
|
+
linkAs = "a",
|
|
2436
|
+
className,
|
|
2437
|
+
...rest
|
|
2438
|
+
}) {
|
|
2439
|
+
if (items.length === 0) return null;
|
|
2440
|
+
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) => {
|
|
2441
|
+
const last = index === items.length - 1;
|
|
2442
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: Breadcrumb_module_default.item, children: [
|
|
2443
|
+
index > 0 && /* @__PURE__ */ jsxRuntime.jsx(ChevronRightGlyph, { className: Breadcrumb_module_default.separator }),
|
|
2444
|
+
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 })
|
|
2445
|
+
] }, `${item.label}-${index}`);
|
|
2446
|
+
}) }) });
|
|
2447
|
+
}
|
|
1623
2448
|
function useRovingGroup(ref, { selector, orientation = "horizontal" }) {
|
|
1624
2449
|
return react.useCallback(
|
|
1625
2450
|
(event) => {
|
|
@@ -1649,6 +2474,7 @@ exports.AppBar = AppBar;
|
|
|
1649
2474
|
exports.Avatar = Avatar;
|
|
1650
2475
|
exports.AvatarGroup = AvatarGroup;
|
|
1651
2476
|
exports.Badge = Badge;
|
|
2477
|
+
exports.Breadcrumb = Breadcrumb;
|
|
1652
2478
|
exports.Button = Button;
|
|
1653
2479
|
exports.Card = Card;
|
|
1654
2480
|
exports.CardBody = CardBody;
|
|
@@ -1668,11 +2494,14 @@ exports.Field = Field;
|
|
|
1668
2494
|
exports.Heading = Heading;
|
|
1669
2495
|
exports.Icon = Icon;
|
|
1670
2496
|
exports.IconProvider = IconProvider;
|
|
2497
|
+
exports.ImageCarousel = ImageCarousel;
|
|
1671
2498
|
exports.Inline = Inline;
|
|
1672
2499
|
exports.Input = Input;
|
|
2500
|
+
exports.Lightbox = Lightbox;
|
|
1673
2501
|
exports.Link = Link;
|
|
1674
2502
|
exports.ListGroup = ListGroup;
|
|
1675
2503
|
exports.ListItem = ListItem;
|
|
2504
|
+
exports.MediaPlaceholder = MediaPlaceholder;
|
|
1676
2505
|
exports.Modal = Modal;
|
|
1677
2506
|
exports.ModalBody = ModalBody;
|
|
1678
2507
|
exports.ModalFooter = ModalFooter;
|
|
@@ -1705,6 +2534,9 @@ exports.Tag = Tag;
|
|
|
1705
2534
|
exports.Text = Text;
|
|
1706
2535
|
exports.Textarea = Textarea;
|
|
1707
2536
|
exports.ToastProvider = ToastProvider;
|
|
2537
|
+
exports.UploadProgress = UploadProgress;
|
|
2538
|
+
exports.VideoPlayer = VideoPlayer;
|
|
2539
|
+
exports.VisuallyHidden = VisuallyHidden;
|
|
1708
2540
|
exports.cx = cx;
|
|
1709
2541
|
exports.useFieldContext = useFieldContext;
|
|
1710
2542
|
exports.useOverlay = useOverlay;
|