@mond-design-system/react 4.9.0 → 4.10.2

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.d.cts CHANGED
@@ -840,6 +840,37 @@ interface SearchFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "
840
840
  */
841
841
  declare function SearchField({ label, clearLabel, value, onChange, className, ...rest }: SearchFieldProps): ReactElement;
842
842
 
843
+ interface ScrollerLabels {
844
+ previous: string;
845
+ next: string;
846
+ }
847
+ interface ScrollerProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
848
+ /** Words over the row. They name the scrolling group too. */
849
+ title: string;
850
+ /** The arrows are glyphs, so the words are the app's. */
851
+ labels: ScrollerLabels;
852
+ /** Where the title sits in the document outline. Default 2. */
853
+ level?: HeadingLevel;
854
+ /** Beside the title, before the arrows — a link to the rest. */
855
+ action?: ReactNode;
856
+ children: ReactNode;
857
+ ref?: Ref<HTMLElement>;
858
+ }
859
+ /**
860
+ * A titled row that scrolls sideways — featured posts, a shelf of covers.
861
+ * The row scrolls with the finger; the arrows do the same for a pointer or a
862
+ * key, and shut themselves at each end.
863
+ *
864
+ * ```tsx
865
+ * <Scroller title={t("home.featured")} labels={t.scroller}>
866
+ * {slots.map((slot) => (
867
+ * <PostCard key={slot.id} post={slot.post} variant="grid" />
868
+ * ))}
869
+ * </Scroller>
870
+ * ```
871
+ */
872
+ declare function Scroller({ title, labels, level, action, children, className, ...rest }: ScrollerProps): ReactElement;
873
+
843
874
  interface ListGroupProps extends HTMLAttributes<HTMLUListElement> {
844
875
  children: ReactNode;
845
876
  /** Heading over the group. Also names the list to a screen reader. */
@@ -876,13 +907,15 @@ interface ListItemProps extends Omit<HTMLAttributes<HTMLElement>, "title" | "onC
876
907
  `trailing` and it is a button inside the link. This slot sits outside
877
908
  the hit target, where a second control can be reached. */
878
909
  actions?: ReactNode;
879
- /** Makes the whole row a button. */
910
+ /** Makes the whole row a button — or, with `href`, reports the press on the
911
+ way out: a notification marked read, a tap counted. */
880
912
  onClick?: () => void;
881
913
  /** Marks an onClick row as a toggle — a picker row that selects rather than
882
914
  navigates. Lands as aria-pressed on the row button itself, where the
883
915
  screen reader's focus is. Leave unset for rows that navigate. */
884
916
  pressed?: boolean;
885
- /** Makes the whole row a link. Wins over onClick. */
917
+ /** Makes the whole row a link. The row navigates rather than acts, and any
918
+ onClick rides along with the navigation. */
886
919
  href?: string;
887
920
  /** Element override for that link, e.g. a router's Link. */
888
921
  as?: ElementType;
@@ -1906,4 +1939,4 @@ interface RovingGroupOptions {
1906
1939
  */
1907
1940
  declare function useRovingGroup(ref: RefObject<HTMLElement | null>, { selector, orientation }: RovingGroupOptions): (event: KeyboardEvent<HTMLElement>) => void;
1908
1941
 
1909
- export { AppBar, type AppBarProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeTone, Breadcrumb, type BreadcrumbProps, Button, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonVariant, type CSSVars, Card, CardBody, CardFooter, CardHeader, type CardProps, type CardSectionProps, type CardVariant, type CarouselPager, type CarouselSlide, Checkbox, type CheckboxProps, Chip, ChipBar, type ChipBarGap, type ChipBarProps, ChipGroup, type ChipGroupGap, type ChipGroupProps, type ChipProps, type ChipVariant, ConfirmDialog, type ConfirmDialogProps, type ConfirmDialogTone, Container, type ContainerProps, type ContainerWidth, CountButton, type CountButtonProps, type CountButtonTone, type Crumb, type DataColumn, DataTable, type DataTableProps, type DataTableSelectionLabels, DateTimePicker, type DateTimePickerLabels, type DateTimePickerProps, Divider, type DividerProps, EmptyState, type EmptyStateProps, Field, type FieldContextValue, type FieldProps, FileDrop, type FileDropProps, Heading, type HeadingLevel, type HeadingProps, type HeadingTone, Icon, type IconProps, IconProvider, type IconProviderProps, type IconRender, type IconRenderProps, type IconSize, ImageCarousel, type ImageCarouselLabels, type ImageCarouselProps, Inline, type InlineAlign, type InlineGap, type InlineJustify, type InlineProps, Input, type InputProps, type InputSize, Lightbox, type LightboxLabels, type LightboxProps, Link, type LinkProps, type LinkVariant, ListGroup, type ListGroupProps, ListItem, type ListItemProps, MediaPlaceholder, type MediaPlaceholderProps, Modal, ModalBody, ModalFooter, ModalHeader, type ModalProps, type OverlayHistory, OverlayHistoryContext, PasswordInput, type PasswordInputProps, type Presence, ProgressBar, type ProgressBarProps, Radio, type RadioProps, type RovingGroupOptions, Screen, ScreenContent, type ScreenContentProps, SearchField, type SearchFieldProps, type SegmentOption, SegmentedControl, type SegmentedControlProps, type SegmentedControlSize, Select, type SelectProps, type SelectSize, Sheet, SheetBody, SheetFooter, SheetHeader, type SheetProps, SideNav, SideNavGroup, type SideNavGroupProps, SideNavItem, type SideNavItemProps, type SideNavProps, Skeleton, type SkeletonProps, type SkeletonVariant, Spinner, type SpinnerProps, Stack, type StackAlign, type StackGap, type StackProps, Switch, type SwitchProps, Tab, TabBar, TabBarAction, type TabBarActionProps, TabBarItem, type TabBarItemProps, type TabBarProps, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, Tag, type TagProps, type TagTone, Text, type TextProps, type TextTone, type TextVariant, Textarea, type TextareaProps, type ToastAction, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastTone, UploadProgress, type UploadProgressLabels, type UploadProgressProps, type UploadStatus, type UseOverlayOptions, type VideoCaptions, type VideoChapter, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, VisuallyHidden, type VisuallyHiddenProps, cx, useFieldContext, useOverlay, usePresence, useRovingGroup, useToast };
1942
+ export { AppBar, type AppBarProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeTone, Breadcrumb, type BreadcrumbProps, Button, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonVariant, type CSSVars, Card, CardBody, CardFooter, CardHeader, type CardProps, type CardSectionProps, type CardVariant, type CarouselPager, type CarouselSlide, Checkbox, type CheckboxProps, Chip, ChipBar, type ChipBarGap, type ChipBarProps, ChipGroup, type ChipGroupGap, type ChipGroupProps, type ChipProps, type ChipVariant, ConfirmDialog, type ConfirmDialogProps, type ConfirmDialogTone, Container, type ContainerProps, type ContainerWidth, CountButton, type CountButtonProps, type CountButtonTone, type Crumb, type DataColumn, DataTable, type DataTableProps, type DataTableSelectionLabels, DateTimePicker, type DateTimePickerLabels, type DateTimePickerProps, Divider, type DividerProps, EmptyState, type EmptyStateProps, Field, type FieldContextValue, type FieldProps, FileDrop, type FileDropProps, Heading, type HeadingLevel, type HeadingProps, type HeadingTone, Icon, type IconProps, IconProvider, type IconProviderProps, type IconRender, type IconRenderProps, type IconSize, ImageCarousel, type ImageCarouselLabels, type ImageCarouselProps, Inline, type InlineAlign, type InlineGap, type InlineJustify, type InlineProps, Input, type InputProps, type InputSize, Lightbox, type LightboxLabels, type LightboxProps, Link, type LinkProps, type LinkVariant, ListGroup, type ListGroupProps, ListItem, type ListItemProps, MediaPlaceholder, type MediaPlaceholderProps, Modal, ModalBody, ModalFooter, ModalHeader, type ModalProps, type OverlayHistory, OverlayHistoryContext, PasswordInput, type PasswordInputProps, type Presence, ProgressBar, type ProgressBarProps, Radio, type RadioProps, type RovingGroupOptions, Screen, ScreenContent, type ScreenContentProps, Scroller, type ScrollerLabels, type ScrollerProps, SearchField, type SearchFieldProps, type SegmentOption, SegmentedControl, type SegmentedControlProps, type SegmentedControlSize, Select, type SelectProps, type SelectSize, Sheet, SheetBody, SheetFooter, SheetHeader, type SheetProps, SideNav, SideNavGroup, type SideNavGroupProps, SideNavItem, type SideNavItemProps, type SideNavProps, Skeleton, type SkeletonProps, type SkeletonVariant, Spinner, type SpinnerProps, Stack, type StackAlign, type StackGap, type StackProps, Switch, type SwitchProps, Tab, TabBar, TabBarAction, type TabBarActionProps, TabBarItem, type TabBarItemProps, type TabBarProps, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, Tag, type TagProps, type TagTone, Text, type TextProps, type TextTone, type TextVariant, Textarea, type TextareaProps, type ToastAction, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastTone, UploadProgress, type UploadProgressLabels, type UploadProgressProps, type UploadStatus, type UseOverlayOptions, type VideoCaptions, type VideoChapter, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, VisuallyHidden, type VisuallyHiddenProps, cx, useFieldContext, useOverlay, usePresence, useRovingGroup, useToast };
package/dist/index.d.ts CHANGED
@@ -840,6 +840,37 @@ interface SearchFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "
840
840
  */
841
841
  declare function SearchField({ label, clearLabel, value, onChange, className, ...rest }: SearchFieldProps): ReactElement;
842
842
 
843
+ interface ScrollerLabels {
844
+ previous: string;
845
+ next: string;
846
+ }
847
+ interface ScrollerProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
848
+ /** Words over the row. They name the scrolling group too. */
849
+ title: string;
850
+ /** The arrows are glyphs, so the words are the app's. */
851
+ labels: ScrollerLabels;
852
+ /** Where the title sits in the document outline. Default 2. */
853
+ level?: HeadingLevel;
854
+ /** Beside the title, before the arrows — a link to the rest. */
855
+ action?: ReactNode;
856
+ children: ReactNode;
857
+ ref?: Ref<HTMLElement>;
858
+ }
859
+ /**
860
+ * A titled row that scrolls sideways — featured posts, a shelf of covers.
861
+ * The row scrolls with the finger; the arrows do the same for a pointer or a
862
+ * key, and shut themselves at each end.
863
+ *
864
+ * ```tsx
865
+ * <Scroller title={t("home.featured")} labels={t.scroller}>
866
+ * {slots.map((slot) => (
867
+ * <PostCard key={slot.id} post={slot.post} variant="grid" />
868
+ * ))}
869
+ * </Scroller>
870
+ * ```
871
+ */
872
+ declare function Scroller({ title, labels, level, action, children, className, ...rest }: ScrollerProps): ReactElement;
873
+
843
874
  interface ListGroupProps extends HTMLAttributes<HTMLUListElement> {
844
875
  children: ReactNode;
845
876
  /** Heading over the group. Also names the list to a screen reader. */
@@ -876,13 +907,15 @@ interface ListItemProps extends Omit<HTMLAttributes<HTMLElement>, "title" | "onC
876
907
  `trailing` and it is a button inside the link. This slot sits outside
877
908
  the hit target, where a second control can be reached. */
878
909
  actions?: ReactNode;
879
- /** Makes the whole row a button. */
910
+ /** Makes the whole row a button — or, with `href`, reports the press on the
911
+ way out: a notification marked read, a tap counted. */
880
912
  onClick?: () => void;
881
913
  /** Marks an onClick row as a toggle — a picker row that selects rather than
882
914
  navigates. Lands as aria-pressed on the row button itself, where the
883
915
  screen reader's focus is. Leave unset for rows that navigate. */
884
916
  pressed?: boolean;
885
- /** Makes the whole row a link. Wins over onClick. */
917
+ /** Makes the whole row a link. The row navigates rather than acts, and any
918
+ onClick rides along with the navigation. */
886
919
  href?: string;
887
920
  /** Element override for that link, e.g. a router's Link. */
888
921
  as?: ElementType;
@@ -1906,4 +1939,4 @@ interface RovingGroupOptions {
1906
1939
  */
1907
1940
  declare function useRovingGroup(ref: RefObject<HTMLElement | null>, { selector, orientation }: RovingGroupOptions): (event: KeyboardEvent<HTMLElement>) => void;
1908
1941
 
1909
- export { AppBar, type AppBarProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeTone, Breadcrumb, type BreadcrumbProps, Button, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonVariant, type CSSVars, Card, CardBody, CardFooter, CardHeader, type CardProps, type CardSectionProps, type CardVariant, type CarouselPager, type CarouselSlide, Checkbox, type CheckboxProps, Chip, ChipBar, type ChipBarGap, type ChipBarProps, ChipGroup, type ChipGroupGap, type ChipGroupProps, type ChipProps, type ChipVariant, ConfirmDialog, type ConfirmDialogProps, type ConfirmDialogTone, Container, type ContainerProps, type ContainerWidth, CountButton, type CountButtonProps, type CountButtonTone, type Crumb, type DataColumn, DataTable, type DataTableProps, type DataTableSelectionLabels, DateTimePicker, type DateTimePickerLabels, type DateTimePickerProps, Divider, type DividerProps, EmptyState, type EmptyStateProps, Field, type FieldContextValue, type FieldProps, FileDrop, type FileDropProps, Heading, type HeadingLevel, type HeadingProps, type HeadingTone, Icon, type IconProps, IconProvider, type IconProviderProps, type IconRender, type IconRenderProps, type IconSize, ImageCarousel, type ImageCarouselLabels, type ImageCarouselProps, Inline, type InlineAlign, type InlineGap, type InlineJustify, type InlineProps, Input, type InputProps, type InputSize, Lightbox, type LightboxLabels, type LightboxProps, Link, type LinkProps, type LinkVariant, ListGroup, type ListGroupProps, ListItem, type ListItemProps, MediaPlaceholder, type MediaPlaceholderProps, Modal, ModalBody, ModalFooter, ModalHeader, type ModalProps, type OverlayHistory, OverlayHistoryContext, PasswordInput, type PasswordInputProps, type Presence, ProgressBar, type ProgressBarProps, Radio, type RadioProps, type RovingGroupOptions, Screen, ScreenContent, type ScreenContentProps, SearchField, type SearchFieldProps, type SegmentOption, SegmentedControl, type SegmentedControlProps, type SegmentedControlSize, Select, type SelectProps, type SelectSize, Sheet, SheetBody, SheetFooter, SheetHeader, type SheetProps, SideNav, SideNavGroup, type SideNavGroupProps, SideNavItem, type SideNavItemProps, type SideNavProps, Skeleton, type SkeletonProps, type SkeletonVariant, Spinner, type SpinnerProps, Stack, type StackAlign, type StackGap, type StackProps, Switch, type SwitchProps, Tab, TabBar, TabBarAction, type TabBarActionProps, TabBarItem, type TabBarItemProps, type TabBarProps, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, Tag, type TagProps, type TagTone, Text, type TextProps, type TextTone, type TextVariant, Textarea, type TextareaProps, type ToastAction, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastTone, UploadProgress, type UploadProgressLabels, type UploadProgressProps, type UploadStatus, type UseOverlayOptions, type VideoCaptions, type VideoChapter, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, VisuallyHidden, type VisuallyHiddenProps, cx, useFieldContext, useOverlay, usePresence, useRovingGroup, useToast };
1942
+ export { AppBar, type AppBarProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeTone, Breadcrumb, type BreadcrumbProps, Button, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonVariant, type CSSVars, Card, CardBody, CardFooter, CardHeader, type CardProps, type CardSectionProps, type CardVariant, type CarouselPager, type CarouselSlide, Checkbox, type CheckboxProps, Chip, ChipBar, type ChipBarGap, type ChipBarProps, ChipGroup, type ChipGroupGap, type ChipGroupProps, type ChipProps, type ChipVariant, ConfirmDialog, type ConfirmDialogProps, type ConfirmDialogTone, Container, type ContainerProps, type ContainerWidth, CountButton, type CountButtonProps, type CountButtonTone, type Crumb, type DataColumn, DataTable, type DataTableProps, type DataTableSelectionLabels, DateTimePicker, type DateTimePickerLabels, type DateTimePickerProps, Divider, type DividerProps, EmptyState, type EmptyStateProps, Field, type FieldContextValue, type FieldProps, FileDrop, type FileDropProps, Heading, type HeadingLevel, type HeadingProps, type HeadingTone, Icon, type IconProps, IconProvider, type IconProviderProps, type IconRender, type IconRenderProps, type IconSize, ImageCarousel, type ImageCarouselLabels, type ImageCarouselProps, Inline, type InlineAlign, type InlineGap, type InlineJustify, type InlineProps, Input, type InputProps, type InputSize, Lightbox, type LightboxLabels, type LightboxProps, Link, type LinkProps, type LinkVariant, ListGroup, type ListGroupProps, ListItem, type ListItemProps, MediaPlaceholder, type MediaPlaceholderProps, Modal, ModalBody, ModalFooter, ModalHeader, type ModalProps, type OverlayHistory, OverlayHistoryContext, PasswordInput, type PasswordInputProps, type Presence, ProgressBar, type ProgressBarProps, Radio, type RadioProps, type RovingGroupOptions, Screen, ScreenContent, type ScreenContentProps, Scroller, type ScrollerLabels, type ScrollerProps, SearchField, type SearchFieldProps, type SegmentOption, SegmentedControl, type SegmentedControlProps, type SegmentedControlSize, Select, type SelectProps, type SelectSize, Sheet, SheetBody, SheetFooter, SheetHeader, type SheetProps, SideNav, SideNavGroup, type SideNavGroupProps, SideNavItem, type SideNavItemProps, type SideNavProps, Skeleton, type SkeletonProps, type SkeletonVariant, Spinner, type SpinnerProps, Stack, type StackAlign, type StackGap, type StackProps, Switch, type SwitchProps, Tab, TabBar, TabBarAction, type TabBarActionProps, TabBarItem, type TabBarItemProps, type TabBarProps, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, Tag, type TagProps, type TagTone, Text, type TextProps, type TextTone, type TextVariant, Textarea, type TextareaProps, type ToastAction, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastTone, UploadProgress, type UploadProgressLabels, type UploadProgressProps, type UploadStatus, type UseOverlayOptions, type VideoCaptions, type VideoChapter, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, VisuallyHidden, type VisuallyHiddenProps, cx, useFieldContext, useOverlay, usePresence, useRovingGroup, useToast };
package/dist/index.js CHANGED
@@ -148,6 +148,8 @@ function Button({
148
148
  children,
149
149
  ...rest
150
150
  }) {
151
+ const glyph = iconOnly && children != null ? /* @__PURE__ */ jsx("span", { className: Button_module_default.slot, children }) : children;
152
+ const body = loading && iconOnly ? null : glyph;
151
153
  const Element = as ?? (href !== void 0 ? "a" : "button");
152
154
  const isButton = Element === "button";
153
155
  const own = isButton ? { type, disabled: disabled || loading } : { href };
@@ -169,7 +171,7 @@ function Button({
169
171
  ...rest,
170
172
  children: [
171
173
  loading ? /* @__PURE__ */ jsx("span", { className: Button_module_default.slot, children: /* @__PURE__ */ jsx(Spinner, { size: ICON_PX[size], label: "", "aria-hidden": "true" }) }) : iconLeft ? /* @__PURE__ */ jsx("span", { className: Button_module_default.slot, children: iconLeft }) : null,
172
- children,
174
+ body,
173
175
  !loading && iconRight ? /* @__PURE__ */ jsx("span", { className: Button_module_default.slot, children: iconRight }) : null
174
176
  ]
175
177
  }
@@ -383,10 +385,10 @@ function CountButton({
383
385
  );
384
386
  }
385
387
  function CloseGlyph({ className }) {
386
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) });
388
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) });
387
389
  }
388
390
  function ChevronLeftGlyph({ className }) {
389
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx(
391
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx(
390
392
  "path",
391
393
  {
392
394
  d: "M10 3l-5 5 5 5",
@@ -399,7 +401,7 @@ function ChevronLeftGlyph({ className }) {
399
401
  ) });
400
402
  }
401
403
  function ChevronRightGlyph({ className }) {
402
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx(
404
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx(
403
405
  "path",
404
406
  {
405
407
  d: "M6 3l5 5-5 5",
@@ -412,7 +414,7 @@ function ChevronRightGlyph({ className }) {
412
414
  ) });
413
415
  }
414
416
  function Magnifier({ className, children }) {
415
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", children: [
417
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", children: [
416
418
  /* @__PURE__ */ jsx("circle", { cx: "7", cy: "7", r: "4.25" }),
417
419
  /* @__PURE__ */ jsx("path", { d: "M10.2 10.2L14 14" }),
418
420
  children
@@ -425,35 +427,35 @@ function ZoomOutGlyph({ className }) {
425
427
  return /* @__PURE__ */ jsx(Magnifier, { className, children: /* @__PURE__ */ jsx("path", { d: "M4.75 7h4.5" }) });
426
428
  }
427
429
  function PlayGlyph({ className }) {
428
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx("path", { d: "M5 3.2l7.5 4.8L5 12.8z", fill: "currentColor" }) });
430
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx("path", { d: "M5 3.2l7.5 4.8L5 12.8z", fill: "currentColor" }) });
429
431
  }
430
432
  function PauseGlyph({ className }) {
431
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx("path", { d: "M4.5 3h2.25v10H4.5zM9.25 3h2.25v10H9.25z", fill: "currentColor" }) });
433
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx("path", { d: "M4.5 3h2.25v10H4.5zM9.25 3h2.25v10H9.25z", fill: "currentColor" }) });
432
434
  }
433
435
  function Speaker() {
434
436
  return /* @__PURE__ */ jsx("path", { d: "M2.5 6.25h2.25L8 3.4v9.2L4.75 9.75H2.5z", fill: "currentColor", stroke: "none" });
435
437
  }
436
438
  function VolumeGlyph({ className }) {
437
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", children: [
439
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", children: [
438
440
  /* @__PURE__ */ jsx(Speaker, {}),
439
441
  /* @__PURE__ */ jsx("path", { d: "M10.5 5.75a3.25 3.25 0 010 4.5" }),
440
442
  /* @__PURE__ */ jsx("path", { d: "M12.5 3.9a5.75 5.75 0 010 8.2" })
441
443
  ] }) });
442
444
  }
443
445
  function VolumeOffGlyph({ className }) {
444
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", children: [
446
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", children: [
445
447
  /* @__PURE__ */ jsx(Speaker, {}),
446
448
  /* @__PURE__ */ jsx("path", { d: "M10.75 6.25l3.5 3.5M14.25 6.25l-3.5 3.5" })
447
449
  ] }) });
448
450
  }
449
451
  function CaptionsGlyph({ className }) {
450
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", children: [
452
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", children: [
451
453
  /* @__PURE__ */ jsx("rect", { x: "1.75", y: "3.25", width: "12.5", height: "9.5", rx: "2" }),
452
454
  /* @__PURE__ */ jsx("path", { d: "M6.25 6.75a2 2 0 100 2.5M11.25 6.75a2 2 0 100 2.5" })
453
455
  ] }) });
454
456
  }
455
457
  function FullscreenGlyph({ className }) {
456
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx(
458
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx(
457
459
  "path",
458
460
  {
459
461
  d: "M6 2.5H2.5V6M10 2.5h3.5V6M6 13.5H2.5V10M10 13.5h3.5V10",
@@ -466,7 +468,7 @@ function FullscreenGlyph({ className }) {
466
468
  ) });
467
469
  }
468
470
  function FullscreenExitGlyph({ className }) {
469
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx(
471
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx(
470
472
  "path",
471
473
  {
472
474
  d: "M2.5 6H6V2.5M13.5 6H10V2.5M2.5 10H6v3.5M13.5 10H10v3.5",
@@ -501,7 +503,15 @@ function Field({ label, children, hint, error, required = false, className }) {
501
503
  children
502
504
  }
503
505
  ),
504
- message && /* @__PURE__ */ jsx("span", { id: messageId, className: cx(Field_module_default.message, error !== void 0 && Field_module_default.error), children: message })
506
+ message && /* @__PURE__ */ jsx(
507
+ "span",
508
+ {
509
+ id: messageId,
510
+ role: error !== void 0 ? "alert" : void 0,
511
+ className: cx(Field_module_default.message, error !== void 0 && Field_module_default.error),
512
+ children: message
513
+ }
514
+ )
505
515
  ] });
506
516
  }
507
517
 
@@ -1351,6 +1361,85 @@ function SearchField({
1351
1361
  ] });
1352
1362
  }
1353
1363
 
1364
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Scroller/Scroller.module.css?mds-scoped
1365
+ var Scroller_module_default = { "scroller": "mds-Scroller__scroller", "header": "mds-Scroller__header", "trailing": "mds-Scroller__trailing", "track": "mds-Scroller__track", "arrows": "mds-Scroller__arrows" };
1366
+ var STEP = 0.8;
1367
+ function Scroller({
1368
+ title,
1369
+ labels,
1370
+ level = 2,
1371
+ action,
1372
+ children,
1373
+ className,
1374
+ ...rest
1375
+ }) {
1376
+ const track = useRef(null);
1377
+ const titleId = useId();
1378
+ const [atStart, setAtStart] = useState(true);
1379
+ const [atEnd, setAtEnd] = useState(true);
1380
+ const measure = useCallback(() => {
1381
+ const row = track.current;
1382
+ if (row === null) return;
1383
+ setAtStart(row.scrollLeft <= 0);
1384
+ setAtEnd(row.scrollLeft + row.clientWidth >= row.scrollWidth - 1);
1385
+ }, []);
1386
+ useEffect(measure);
1387
+ useEffect(() => {
1388
+ window.addEventListener("resize", measure);
1389
+ return () => window.removeEventListener("resize", measure);
1390
+ }, [measure]);
1391
+ const step = (direction) => {
1392
+ const row = track.current;
1393
+ if (row === null) return;
1394
+ row.scrollBy({ left: direction * Math.round(row.clientWidth * STEP) });
1395
+ };
1396
+ return /* @__PURE__ */ jsxs("section", { className: cx(Scroller_module_default.scroller, className), ...rest, children: [
1397
+ /* @__PURE__ */ jsxs("div", { className: Scroller_module_default.header, children: [
1398
+ /* @__PURE__ */ jsx(Heading, { level, variant: "label", id: titleId, children: title }),
1399
+ /* @__PURE__ */ jsxs("div", { className: Scroller_module_default.trailing, children: [
1400
+ action,
1401
+ /* @__PURE__ */ jsxs("div", { className: Scroller_module_default.arrows, children: [
1402
+ /* @__PURE__ */ jsx(
1403
+ Button,
1404
+ {
1405
+ variant: "ghost",
1406
+ size: "sm",
1407
+ iconOnly: true,
1408
+ "aria-label": labels.previous,
1409
+ disabled: atStart,
1410
+ onClick: () => step(-1),
1411
+ children: /* @__PURE__ */ jsx(ChevronLeftGlyph, {})
1412
+ }
1413
+ ),
1414
+ /* @__PURE__ */ jsx(
1415
+ Button,
1416
+ {
1417
+ variant: "ghost",
1418
+ size: "sm",
1419
+ iconOnly: true,
1420
+ "aria-label": labels.next,
1421
+ disabled: atEnd,
1422
+ onClick: () => step(1),
1423
+ children: /* @__PURE__ */ jsx(ChevronRightGlyph, {})
1424
+ }
1425
+ )
1426
+ ] })
1427
+ ] })
1428
+ ] }),
1429
+ /* @__PURE__ */ jsx(
1430
+ "div",
1431
+ {
1432
+ className: Scroller_module_default.track,
1433
+ ref: track,
1434
+ role: "group",
1435
+ "aria-labelledby": titleId,
1436
+ onScroll: measure,
1437
+ children
1438
+ }
1439
+ )
1440
+ ] });
1441
+ }
1442
+
1354
1443
  // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/List/List.module.css?mds-scoped
1355
1444
  var List_module_default = { "group": "mds-List__group", "labelledGroup": "mds-List__labelledGroup", "label": "mds-List__label", "item": "mds-List__item", "surface-card": "mds-List__surface-card", "surface-sunken": "mds-List__surface-sunken", "surface-accent": "mds-List__surface-accent", "surface-plain": "mds-List__surface-plain", "row": "mds-List__row", "interactive": "mds-List__interactive", "withActions": "mds-List__withActions", "actions": "mds-List__actions", "leading": "mds-List__leading", "trailing": "mds-List__trailing", "text": "mds-List__text", "title": "mds-List__title", "description": "mds-List__description" };
1356
1445
  var ListGroupContext = createContext(false);
@@ -1409,7 +1498,7 @@ function ListItem({
1409
1498
  ref,
1410
1499
  ...rest,
1411
1500
  children: [
1412
- href !== void 0 ? /* @__PURE__ */ jsx(LinkElement, { className: cx(List_module_default.row, List_module_default.interactive), href, children: content }) : onClick !== void 0 ? /* @__PURE__ */ jsx(
1501
+ href !== void 0 ? /* @__PURE__ */ jsx(LinkElement, { className: cx(List_module_default.row, List_module_default.interactive), href, onClick, children: content }) : onClick !== void 0 ? /* @__PURE__ */ jsx(
1413
1502
  "button",
1414
1503
  {
1415
1504
  type: "button",
@@ -2347,7 +2436,7 @@ function FileDrop({
2347
2436
  var Lightbox_module_default = { "panel": "mds-Lightbox__panel", "bar": "mds-Lightbox__bar", "surface": "mds-Lightbox__surface", "image": "mds-Lightbox__image", "caption": "mds-Lightbox__caption" };
2348
2437
  var MIN_SCALE = 1;
2349
2438
  var MAX_SCALE = 4;
2350
- var STEP = 1;
2439
+ var STEP2 = 1;
2351
2440
  var DOUBLE = 2.5;
2352
2441
  var WHEEL = 0.01;
2353
2442
  var ORIGIN = { x: 0, y: 0 };
@@ -2460,7 +2549,7 @@ function Lightbox({ open, onClose, src, alt = "", caption, labels }) {
2460
2549
  variant: "ghost",
2461
2550
  onMedia: true,
2462
2551
  disabled: scale <= MIN_SCALE,
2463
- onClick: () => zoom(scale - STEP),
2552
+ onClick: () => zoom(scale - STEP2),
2464
2553
  children: /* @__PURE__ */ jsx(ZoomOutGlyph, {})
2465
2554
  }
2466
2555
  ),
@@ -2472,7 +2561,7 @@ function Lightbox({ open, onClose, src, alt = "", caption, labels }) {
2472
2561
  variant: "ghost",
2473
2562
  onMedia: true,
2474
2563
  disabled: scale >= MAX_SCALE,
2475
- onClick: () => zoom(scale + STEP),
2564
+ onClick: () => zoom(scale + STEP2),
2476
2565
  children: /* @__PURE__ */ jsx(ZoomInGlyph, {})
2477
2566
  }
2478
2567
  ),
@@ -2735,6 +2824,6 @@ function useRovingGroup(ref, { selector, orientation = "horizontal" }) {
2735
2824
  );
2736
2825
  }
2737
2826
 
2738
- export { AppBar, Avatar, AvatarGroup, Badge, Breadcrumb, Button, Card, CardBody, CardFooter, CardHeader, Checkbox, Chip, ChipBar, ChipGroup, ConfirmDialog, Container, CountButton, DataTable, DateTimePicker, Divider, EmptyState, Field, FileDrop, Heading, Icon, IconProvider, ImageCarousel, Inline, Input, Lightbox, Link, ListGroup, ListItem, MediaPlaceholder, Modal, ModalBody, ModalFooter, ModalHeader, OverlayHistoryContext, PasswordInput, ProgressBar, Radio, Screen, ScreenContent, SearchField, SegmentedControl, Select, Sheet, SheetBody, SheetFooter, SheetHeader, SideNav, SideNavGroup, SideNavItem, Skeleton, Spinner, Stack, Switch, Tab, TabBar, TabBarAction, TabBarItem, TabList, TabPanel, Tabs, Tag, Text, Textarea, ToastProvider, UploadProgress, VideoPlayer, VisuallyHidden, cx, useFieldContext, useOverlay, usePresence, useRovingGroup, useToast };
2827
+ export { AppBar, Avatar, AvatarGroup, Badge, Breadcrumb, Button, Card, CardBody, CardFooter, CardHeader, Checkbox, Chip, ChipBar, ChipGroup, ConfirmDialog, Container, CountButton, DataTable, DateTimePicker, Divider, EmptyState, Field, FileDrop, Heading, Icon, IconProvider, ImageCarousel, Inline, Input, Lightbox, Link, ListGroup, ListItem, MediaPlaceholder, Modal, ModalBody, ModalFooter, ModalHeader, OverlayHistoryContext, PasswordInput, ProgressBar, Radio, Screen, ScreenContent, Scroller, SearchField, SegmentedControl, Select, Sheet, SheetBody, SheetFooter, SheetHeader, SideNav, SideNavGroup, SideNavItem, Skeleton, Spinner, Stack, Switch, Tab, TabBar, TabBarAction, TabBarItem, TabList, TabPanel, Tabs, Tag, Text, Textarea, ToastProvider, UploadProgress, VideoPlayer, VisuallyHidden, cx, useFieldContext, useOverlay, usePresence, useRovingGroup, useToast };
2739
2828
  //# sourceMappingURL=index.js.map
2740
2829
  //# sourceMappingURL=index.js.map