@mond-design-system/react 6.2.3 → 6.4.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 +10 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +13 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +20 -5
- package/dist/index.d.ts +20 -5
- package/dist/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -976,6 +976,8 @@ interface DataColumn<Row> {
|
|
|
976
976
|
width?: string;
|
|
977
977
|
cell: (row: Row) => ReactNode;
|
|
978
978
|
}
|
|
979
|
+
/** A row's standing, read across the whole row. */
|
|
980
|
+
type DataTableRowTone = "danger" | "warning" | "success";
|
|
979
981
|
interface DataTableSelectionLabels {
|
|
980
982
|
/** Names one row's box — "Select Ada Lovelace". The row's own label is
|
|
981
983
|
handed in, so the sentence is the app's to build. */
|
|
@@ -1016,6 +1018,9 @@ type DataTableProps<Row> = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
|
1016
1018
|
actionsHeader?: ReactNode;
|
|
1017
1019
|
/** A row the table still lists but no longer counts — suspended, hidden. */
|
|
1018
1020
|
rowMuted?: (row: Row) => boolean;
|
|
1021
|
+
/** A row that needs a hand on it — tinted across every cell. The tint is
|
|
1022
|
+
colour only, so say why in a cell as well. */
|
|
1023
|
+
rowTone?: (row: Row) => DataTableRowTone | undefined;
|
|
1019
1024
|
/** Shown in place of the rows when there are none. */
|
|
1020
1025
|
empty?: ReactNode;
|
|
1021
1026
|
ref?: Ref<HTMLDivElement>;
|
|
@@ -1042,7 +1047,7 @@ type DataTableProps<Row> = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
|
1042
1047
|
* />
|
|
1043
1048
|
* ```
|
|
1044
1049
|
*/
|
|
1045
|
-
declare function DataTable<Row>({ label, columns, rows, rowKey, rowLabel, rowActions, actionsHeader, rowMuted, empty, ref, selected, onSelectedChange, selectionLabels, bulkActions, className, ...rest }: DataTableProps<Row>): ReactElement;
|
|
1050
|
+
declare function DataTable<Row>({ label, columns, rows, rowKey, rowLabel, rowActions, actionsHeader, rowMuted, rowTone, empty, ref, selected, onSelectedChange, selectionLabels, bulkActions, className, ...rest }: DataTableProps<Row>): ReactElement;
|
|
1046
1051
|
|
|
1047
1052
|
interface EmptyStateProps {
|
|
1048
1053
|
title: string;
|
|
@@ -1275,10 +1280,16 @@ type CardSectionProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
1275
1280
|
};
|
|
1276
1281
|
/** Top slot — title row, media, tabs. */
|
|
1277
1282
|
declare function CardHeader({ className, ...rest }: CardSectionProps): ReactElement;
|
|
1283
|
+
/** How a budgeted body ends. */
|
|
1284
|
+
type CardBodyClip = "ellipsis" | "flow";
|
|
1278
1285
|
interface CardBodyProps extends CardSectionProps {
|
|
1279
|
-
/** How many lines of content the card affords. Past it the body clips
|
|
1280
|
-
|
|
1286
|
+
/** How many lines of content the card affords. Past it the body clips.
|
|
1287
|
+
Unset, the body grows to what it holds. */
|
|
1281
1288
|
lines?: number;
|
|
1289
|
+
/** ellipsis marks the cut and is a box of its own, so text beside floated
|
|
1290
|
+
media stands next to it rather than wrapping under it; flow cuts on the
|
|
1291
|
+
line and leaves the wrap alone. Default "ellipsis". */
|
|
1292
|
+
clip?: CardBodyClip;
|
|
1282
1293
|
}
|
|
1283
1294
|
/**
|
|
1284
1295
|
* Main content slot.
|
|
@@ -1291,8 +1302,12 @@ interface CardBodyProps extends CardSectionProps {
|
|
|
1291
1302
|
* is no longer a flex column: `gap` between its children stops applying and a
|
|
1292
1303
|
* margin is what separates them. A body doing layout for a card keeps its own
|
|
1293
1304
|
* budget-free, and holds a budgeted one for the part that has to fit.
|
|
1305
|
+
*
|
|
1306
|
+
* `clip="flow"` buys the budget back for a card that floats its media: the body
|
|
1307
|
+
* stays a block and cuts on the line, so the text wraps around the float. The
|
|
1308
|
+
* cut is unmarked — the ellipsis is drawn by the clamp that blocks the wrap.
|
|
1294
1309
|
*/
|
|
1295
|
-
declare function CardBody({ lines, className, style, ...rest }: CardBodyProps): ReactElement;
|
|
1310
|
+
declare function CardBody({ lines, clip, className, style, ...rest }: CardBodyProps): ReactElement;
|
|
1296
1311
|
/** Bottom slot — actions, meta. */
|
|
1297
1312
|
declare function CardFooter({ className, ...rest }: CardSectionProps): ReactElement;
|
|
1298
1313
|
|
|
@@ -2161,4 +2176,4 @@ interface RovingGroupOptions {
|
|
|
2161
2176
|
*/
|
|
2162
2177
|
declare function useRovingGroup(ref: RefObject<HTMLElement | null>, { selector, orientation }: RovingGroupOptions): (event: KeyboardEvent<HTMLElement>) => void;
|
|
2163
2178
|
|
|
2164
|
-
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, type CardBodyProps, 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, Menu, MenuItem, type MenuItemProps, type MenuPlacement, type MenuProps, Modal, ModalBody, ModalFooter, ModalHeader, type ModalProps, type OverlayHistory, OverlayHistoryContext, PasswordInput, type PasswordInputProps, Popover, PopoverBody, PopoverFooter, PopoverHeader, type PopoverHeaderProps, type PopoverPlacement, type PopoverProps, type Presence, ProgressBar, type ProgressBarProps, Radio, type RadioProps, type RovingGroupOptions, Screen, ScreenContent, type ScreenContentProps, Scroller, type ScrollerLabels, type ScrollerProps, 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, Tooltip, type TooltipPlacement, type TooltipProps, 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 };
|
|
2179
|
+
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, type CardBodyClip, type CardBodyProps, 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 DataTableRowTone, 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, Menu, MenuItem, type MenuItemProps, type MenuPlacement, type MenuProps, Modal, ModalBody, ModalFooter, ModalHeader, type ModalProps, type OverlayHistory, OverlayHistoryContext, PasswordInput, type PasswordInputProps, Popover, PopoverBody, PopoverFooter, PopoverHeader, type PopoverHeaderProps, type PopoverPlacement, type PopoverProps, type Presence, ProgressBar, type ProgressBarProps, Radio, type RadioProps, type RovingGroupOptions, Screen, ScreenContent, type ScreenContentProps, Scroller, type ScrollerLabels, type ScrollerProps, 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, Tooltip, type TooltipPlacement, type TooltipProps, 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
|
@@ -976,6 +976,8 @@ interface DataColumn<Row> {
|
|
|
976
976
|
width?: string;
|
|
977
977
|
cell: (row: Row) => ReactNode;
|
|
978
978
|
}
|
|
979
|
+
/** A row's standing, read across the whole row. */
|
|
980
|
+
type DataTableRowTone = "danger" | "warning" | "success";
|
|
979
981
|
interface DataTableSelectionLabels {
|
|
980
982
|
/** Names one row's box — "Select Ada Lovelace". The row's own label is
|
|
981
983
|
handed in, so the sentence is the app's to build. */
|
|
@@ -1016,6 +1018,9 @@ type DataTableProps<Row> = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
|
1016
1018
|
actionsHeader?: ReactNode;
|
|
1017
1019
|
/** A row the table still lists but no longer counts — suspended, hidden. */
|
|
1018
1020
|
rowMuted?: (row: Row) => boolean;
|
|
1021
|
+
/** A row that needs a hand on it — tinted across every cell. The tint is
|
|
1022
|
+
colour only, so say why in a cell as well. */
|
|
1023
|
+
rowTone?: (row: Row) => DataTableRowTone | undefined;
|
|
1019
1024
|
/** Shown in place of the rows when there are none. */
|
|
1020
1025
|
empty?: ReactNode;
|
|
1021
1026
|
ref?: Ref<HTMLDivElement>;
|
|
@@ -1042,7 +1047,7 @@ type DataTableProps<Row> = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
|
1042
1047
|
* />
|
|
1043
1048
|
* ```
|
|
1044
1049
|
*/
|
|
1045
|
-
declare function DataTable<Row>({ label, columns, rows, rowKey, rowLabel, rowActions, actionsHeader, rowMuted, empty, ref, selected, onSelectedChange, selectionLabels, bulkActions, className, ...rest }: DataTableProps<Row>): ReactElement;
|
|
1050
|
+
declare function DataTable<Row>({ label, columns, rows, rowKey, rowLabel, rowActions, actionsHeader, rowMuted, rowTone, empty, ref, selected, onSelectedChange, selectionLabels, bulkActions, className, ...rest }: DataTableProps<Row>): ReactElement;
|
|
1046
1051
|
|
|
1047
1052
|
interface EmptyStateProps {
|
|
1048
1053
|
title: string;
|
|
@@ -1275,10 +1280,16 @@ type CardSectionProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
1275
1280
|
};
|
|
1276
1281
|
/** Top slot — title row, media, tabs. */
|
|
1277
1282
|
declare function CardHeader({ className, ...rest }: CardSectionProps): ReactElement;
|
|
1283
|
+
/** How a budgeted body ends. */
|
|
1284
|
+
type CardBodyClip = "ellipsis" | "flow";
|
|
1278
1285
|
interface CardBodyProps extends CardSectionProps {
|
|
1279
|
-
/** How many lines of content the card affords. Past it the body clips
|
|
1280
|
-
|
|
1286
|
+
/** How many lines of content the card affords. Past it the body clips.
|
|
1287
|
+
Unset, the body grows to what it holds. */
|
|
1281
1288
|
lines?: number;
|
|
1289
|
+
/** ellipsis marks the cut and is a box of its own, so text beside floated
|
|
1290
|
+
media stands next to it rather than wrapping under it; flow cuts on the
|
|
1291
|
+
line and leaves the wrap alone. Default "ellipsis". */
|
|
1292
|
+
clip?: CardBodyClip;
|
|
1282
1293
|
}
|
|
1283
1294
|
/**
|
|
1284
1295
|
* Main content slot.
|
|
@@ -1291,8 +1302,12 @@ interface CardBodyProps extends CardSectionProps {
|
|
|
1291
1302
|
* is no longer a flex column: `gap` between its children stops applying and a
|
|
1292
1303
|
* margin is what separates them. A body doing layout for a card keeps its own
|
|
1293
1304
|
* budget-free, and holds a budgeted one for the part that has to fit.
|
|
1305
|
+
*
|
|
1306
|
+
* `clip="flow"` buys the budget back for a card that floats its media: the body
|
|
1307
|
+
* stays a block and cuts on the line, so the text wraps around the float. The
|
|
1308
|
+
* cut is unmarked — the ellipsis is drawn by the clamp that blocks the wrap.
|
|
1294
1309
|
*/
|
|
1295
|
-
declare function CardBody({ lines, className, style, ...rest }: CardBodyProps): ReactElement;
|
|
1310
|
+
declare function CardBody({ lines, clip, className, style, ...rest }: CardBodyProps): ReactElement;
|
|
1296
1311
|
/** Bottom slot — actions, meta. */
|
|
1297
1312
|
declare function CardFooter({ className, ...rest }: CardSectionProps): ReactElement;
|
|
1298
1313
|
|
|
@@ -2161,4 +2176,4 @@ interface RovingGroupOptions {
|
|
|
2161
2176
|
*/
|
|
2162
2177
|
declare function useRovingGroup(ref: RefObject<HTMLElement | null>, { selector, orientation }: RovingGroupOptions): (event: KeyboardEvent<HTMLElement>) => void;
|
|
2163
2178
|
|
|
2164
|
-
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, type CardBodyProps, 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, Menu, MenuItem, type MenuItemProps, type MenuPlacement, type MenuProps, Modal, ModalBody, ModalFooter, ModalHeader, type ModalProps, type OverlayHistory, OverlayHistoryContext, PasswordInput, type PasswordInputProps, Popover, PopoverBody, PopoverFooter, PopoverHeader, type PopoverHeaderProps, type PopoverPlacement, type PopoverProps, type Presence, ProgressBar, type ProgressBarProps, Radio, type RadioProps, type RovingGroupOptions, Screen, ScreenContent, type ScreenContentProps, Scroller, type ScrollerLabels, type ScrollerProps, 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, Tooltip, type TooltipPlacement, type TooltipProps, 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 };
|
|
2179
|
+
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, type CardBodyClip, type CardBodyProps, 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 DataTableRowTone, 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, Menu, MenuItem, type MenuItemProps, type MenuPlacement, type MenuProps, Modal, ModalBody, ModalFooter, ModalHeader, type ModalProps, type OverlayHistory, OverlayHistoryContext, PasswordInput, type PasswordInputProps, Popover, PopoverBody, PopoverFooter, PopoverHeader, type PopoverHeaderProps, type PopoverPlacement, type PopoverProps, type Presence, ProgressBar, type ProgressBarProps, Radio, type RadioProps, type RovingGroupOptions, Screen, ScreenContent, type ScreenContentProps, Scroller, type ScrollerLabels, type ScrollerProps, 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, Tooltip, type TooltipPlacement, type TooltipProps, 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
|
@@ -1540,7 +1540,7 @@ function ListItem({
|
|
|
1540
1540
|
}
|
|
1541
1541
|
|
|
1542
1542
|
// mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/DataTable/DataTable.module.css?mds-scoped
|
|
1543
|
-
var DataTable_module_default = { "root": "mds-DataTable__root", "scroll": "mds-DataTable__scroll", "table": "mds-DataTable__table", "row": "mds-DataTable__row", "body": "mds-DataTable__body", "selected": "mds-DataTable__selected", "cell": "mds-DataTable__cell", "select": "mds-DataTable__select", "actions": "mds-DataTable__actions", "muted": "mds-DataTable__muted", "empty": "mds-DataTable__empty", "bulk": "mds-DataTable__bulk", "bulkActions": "mds-DataTable__bulkActions" };
|
|
1543
|
+
var DataTable_module_default = { "root": "mds-DataTable__root", "scroll": "mds-DataTable__scroll", "table": "mds-DataTable__table", "row": "mds-DataTable__row", "body": "mds-DataTable__body", "selected": "mds-DataTable__selected", "danger": "mds-DataTable__danger", "warning": "mds-DataTable__warning", "success": "mds-DataTable__success", "cell": "mds-DataTable__cell", "select": "mds-DataTable__select", "actions": "mds-DataTable__actions", "muted": "mds-DataTable__muted", "empty": "mds-DataTable__empty", "bulk": "mds-DataTable__bulk", "bulkActions": "mds-DataTable__bulkActions" };
|
|
1544
1544
|
function DataTable({
|
|
1545
1545
|
label,
|
|
1546
1546
|
columns,
|
|
@@ -1550,6 +1550,7 @@ function DataTable({
|
|
|
1550
1550
|
rowActions,
|
|
1551
1551
|
actionsHeader,
|
|
1552
1552
|
rowMuted,
|
|
1553
|
+
rowTone,
|
|
1553
1554
|
empty,
|
|
1554
1555
|
ref,
|
|
1555
1556
|
selected,
|
|
@@ -1604,13 +1605,15 @@ function DataTable({
|
|
|
1604
1605
|
/* @__PURE__ */ jsx("tbody", { className: DataTable_module_default.body, children: rows.length > 0 ? rows.map((row) => {
|
|
1605
1606
|
const key = rowKey(row);
|
|
1606
1607
|
const taken = selected?.includes(key) ?? false;
|
|
1608
|
+
const tone = rowTone?.(row);
|
|
1607
1609
|
return /* @__PURE__ */ jsxs(
|
|
1608
1610
|
"tr",
|
|
1609
1611
|
{
|
|
1610
1612
|
className: cx(
|
|
1611
1613
|
DataTable_module_default.row,
|
|
1612
1614
|
taken && DataTable_module_default.selected,
|
|
1613
|
-
rowMuted?.(row) === true && DataTable_module_default.muted
|
|
1615
|
+
rowMuted?.(row) === true && DataTable_module_default.muted,
|
|
1616
|
+
tone !== void 0 && DataTable_module_default[tone]
|
|
1614
1617
|
),
|
|
1615
1618
|
children: [
|
|
1616
1619
|
selectable && /* @__PURE__ */ jsx("td", { className: DataTable_module_default.select, children: /* @__PURE__ */ jsx(
|
|
@@ -1931,7 +1934,7 @@ function Container(props) {
|
|
|
1931
1934
|
}
|
|
1932
1935
|
|
|
1933
1936
|
// mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Card/Card.module.css?mds-scoped
|
|
1934
|
-
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", "clipped": "mds-Card__clipped" };
|
|
1937
|
+
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", "clipped": "mds-Card__clipped", "flowed": "mds-Card__flowed" };
|
|
1935
1938
|
function Card({ children, variant = "card", emphasis = false, onClick, href, as, className, ref, ...rest }) {
|
|
1936
1939
|
const cardClass = cx(Card_module_default.card, Card_module_default[`variant-${variant}`], emphasis && Card_module_default.emphasis, className);
|
|
1937
1940
|
const own = useRef(null);
|
|
@@ -1971,12 +1974,13 @@ function Card({ children, variant = "card", emphasis = false, onClick, href, as,
|
|
|
1971
1974
|
function CardHeader({ className, ...rest }) {
|
|
1972
1975
|
return /* @__PURE__ */ jsx("div", { className: cx(Card_module_default.header, className), ...rest });
|
|
1973
1976
|
}
|
|
1974
|
-
function CardBody({ lines, className, style, ...rest }) {
|
|
1975
|
-
const
|
|
1977
|
+
function CardBody({ lines, clip = "ellipsis", className, style, ...rest }) {
|
|
1978
|
+
const budgeted = lines !== void 0;
|
|
1979
|
+
const vars = budgeted ? { "--card-lines": lines } : void 0;
|
|
1976
1980
|
return /* @__PURE__ */ jsx(
|
|
1977
1981
|
"div",
|
|
1978
1982
|
{
|
|
1979
|
-
className: cx(Card_module_default.body,
|
|
1983
|
+
className: cx(Card_module_default.body, budgeted && (clip === "flow" ? Card_module_default.flowed : Card_module_default.clipped), className),
|
|
1980
1984
|
style: { ...vars, ...style },
|
|
1981
1985
|
...rest
|
|
1982
1986
|
}
|