@mond-design-system/react 6.2.2 → 6.3.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 +9 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +7 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +14 -4
- package/dist/index.d.ts +14 -4
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1275,10 +1275,16 @@ type CardSectionProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
1275
1275
|
};
|
|
1276
1276
|
/** Top slot — title row, media, tabs. */
|
|
1277
1277
|
declare function CardHeader({ className, ...rest }: CardSectionProps): ReactElement;
|
|
1278
|
+
/** How a budgeted body ends. */
|
|
1279
|
+
type CardBodyClip = "ellipsis" | "flow";
|
|
1278
1280
|
interface CardBodyProps extends CardSectionProps {
|
|
1279
|
-
/** How many lines of content the card affords. Past it the body clips
|
|
1280
|
-
|
|
1281
|
+
/** How many lines of content the card affords. Past it the body clips.
|
|
1282
|
+
Unset, the body grows to what it holds. */
|
|
1281
1283
|
lines?: number;
|
|
1284
|
+
/** ellipsis marks the cut and is a box of its own, so text beside floated
|
|
1285
|
+
media stands next to it rather than wrapping under it; flow cuts on the
|
|
1286
|
+
line and leaves the wrap alone. Default "ellipsis". */
|
|
1287
|
+
clip?: CardBodyClip;
|
|
1282
1288
|
}
|
|
1283
1289
|
/**
|
|
1284
1290
|
* Main content slot.
|
|
@@ -1291,8 +1297,12 @@ interface CardBodyProps extends CardSectionProps {
|
|
|
1291
1297
|
* is no longer a flex column: `gap` between its children stops applying and a
|
|
1292
1298
|
* margin is what separates them. A body doing layout for a card keeps its own
|
|
1293
1299
|
* budget-free, and holds a budgeted one for the part that has to fit.
|
|
1300
|
+
*
|
|
1301
|
+
* `clip="flow"` buys the budget back for a card that floats its media: the body
|
|
1302
|
+
* stays a block and cuts on the line, so the text wraps around the float. The
|
|
1303
|
+
* cut is unmarked — the ellipsis is drawn by the clamp that blocks the wrap.
|
|
1294
1304
|
*/
|
|
1295
|
-
declare function CardBody({ lines, className, style, ...rest }: CardBodyProps): ReactElement;
|
|
1305
|
+
declare function CardBody({ lines, clip, className, style, ...rest }: CardBodyProps): ReactElement;
|
|
1296
1306
|
/** Bottom slot — actions, meta. */
|
|
1297
1307
|
declare function CardFooter({ className, ...rest }: CardSectionProps): ReactElement;
|
|
1298
1308
|
|
|
@@ -2161,4 +2171,4 @@ interface RovingGroupOptions {
|
|
|
2161
2171
|
*/
|
|
2162
2172
|
declare function useRovingGroup(ref: RefObject<HTMLElement | null>, { selector, orientation }: RovingGroupOptions): (event: KeyboardEvent<HTMLElement>) => void;
|
|
2163
2173
|
|
|
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 };
|
|
2174
|
+
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 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
|
@@ -1275,10 +1275,16 @@ type CardSectionProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
1275
1275
|
};
|
|
1276
1276
|
/** Top slot — title row, media, tabs. */
|
|
1277
1277
|
declare function CardHeader({ className, ...rest }: CardSectionProps): ReactElement;
|
|
1278
|
+
/** How a budgeted body ends. */
|
|
1279
|
+
type CardBodyClip = "ellipsis" | "flow";
|
|
1278
1280
|
interface CardBodyProps extends CardSectionProps {
|
|
1279
|
-
/** How many lines of content the card affords. Past it the body clips
|
|
1280
|
-
|
|
1281
|
+
/** How many lines of content the card affords. Past it the body clips.
|
|
1282
|
+
Unset, the body grows to what it holds. */
|
|
1281
1283
|
lines?: number;
|
|
1284
|
+
/** ellipsis marks the cut and is a box of its own, so text beside floated
|
|
1285
|
+
media stands next to it rather than wrapping under it; flow cuts on the
|
|
1286
|
+
line and leaves the wrap alone. Default "ellipsis". */
|
|
1287
|
+
clip?: CardBodyClip;
|
|
1282
1288
|
}
|
|
1283
1289
|
/**
|
|
1284
1290
|
* Main content slot.
|
|
@@ -1291,8 +1297,12 @@ interface CardBodyProps extends CardSectionProps {
|
|
|
1291
1297
|
* is no longer a flex column: `gap` between its children stops applying and a
|
|
1292
1298
|
* margin is what separates them. A body doing layout for a card keeps its own
|
|
1293
1299
|
* budget-free, and holds a budgeted one for the part that has to fit.
|
|
1300
|
+
*
|
|
1301
|
+
* `clip="flow"` buys the budget back for a card that floats its media: the body
|
|
1302
|
+
* stays a block and cuts on the line, so the text wraps around the float. The
|
|
1303
|
+
* cut is unmarked — the ellipsis is drawn by the clamp that blocks the wrap.
|
|
1294
1304
|
*/
|
|
1295
|
-
declare function CardBody({ lines, className, style, ...rest }: CardBodyProps): ReactElement;
|
|
1305
|
+
declare function CardBody({ lines, clip, className, style, ...rest }: CardBodyProps): ReactElement;
|
|
1296
1306
|
/** Bottom slot — actions, meta. */
|
|
1297
1307
|
declare function CardFooter({ className, ...rest }: CardSectionProps): ReactElement;
|
|
1298
1308
|
|
|
@@ -2161,4 +2171,4 @@ interface RovingGroupOptions {
|
|
|
2161
2171
|
*/
|
|
2162
2172
|
declare function useRovingGroup(ref: RefObject<HTMLElement | null>, { selector, orientation }: RovingGroupOptions): (event: KeyboardEvent<HTMLElement>) => void;
|
|
2163
2173
|
|
|
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 };
|
|
2174
|
+
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 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
|
@@ -1931,7 +1931,7 @@ function Container(props) {
|
|
|
1931
1931
|
}
|
|
1932
1932
|
|
|
1933
1933
|
// 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" };
|
|
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", "flowed": "mds-Card__flowed" };
|
|
1935
1935
|
function Card({ children, variant = "card", emphasis = false, onClick, href, as, className, ref, ...rest }) {
|
|
1936
1936
|
const cardClass = cx(Card_module_default.card, Card_module_default[`variant-${variant}`], emphasis && Card_module_default.emphasis, className);
|
|
1937
1937
|
const own = useRef(null);
|
|
@@ -1971,12 +1971,13 @@ function Card({ children, variant = "card", emphasis = false, onClick, href, as,
|
|
|
1971
1971
|
function CardHeader({ className, ...rest }) {
|
|
1972
1972
|
return /* @__PURE__ */ jsx("div", { className: cx(Card_module_default.header, className), ...rest });
|
|
1973
1973
|
}
|
|
1974
|
-
function CardBody({ lines, className, style, ...rest }) {
|
|
1975
|
-
const
|
|
1974
|
+
function CardBody({ lines, clip = "ellipsis", className, style, ...rest }) {
|
|
1975
|
+
const budgeted = lines !== void 0;
|
|
1976
|
+
const vars = budgeted ? { "--card-lines": lines } : void 0;
|
|
1976
1977
|
return /* @__PURE__ */ jsx(
|
|
1977
1978
|
"div",
|
|
1978
1979
|
{
|
|
1979
|
-
className: cx(Card_module_default.body,
|
|
1980
|
+
className: cx(Card_module_default.body, budgeted && (clip === "flow" ? Card_module_default.flowed : Card_module_default.clipped), className),
|
|
1980
1981
|
style: { ...vars, ...style },
|
|
1981
1982
|
...rest
|
|
1982
1983
|
}
|
|
@@ -2536,7 +2537,7 @@ function SideNavItem({
|
|
|
2536
2537
|
}
|
|
2537
2538
|
|
|
2538
2539
|
// mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/MediaPlaceholder/MediaPlaceholder.module.css?mds-scoped
|
|
2539
|
-
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" };
|
|
2540
|
+
var MediaPlaceholder_module_default = { "media": "mds-MediaPlaceholder__media", "frame": "mds-MediaPlaceholder__frame", "fill": "mds-MediaPlaceholder__fill", "image": "mds-MediaPlaceholder__image", "caption": "mds-MediaPlaceholder__caption", "cover": "mds-MediaPlaceholder__cover", "blurred": "mds-MediaPlaceholder__blurred" };
|
|
2540
2541
|
function MediaPlaceholder({
|
|
2541
2542
|
aspect,
|
|
2542
2543
|
src,
|
|
@@ -2552,13 +2553,13 @@ function MediaPlaceholder({
|
|
|
2552
2553
|
const [failed, setFailed] = useState();
|
|
2553
2554
|
const picture = src !== void 0 && failed !== src;
|
|
2554
2555
|
const vars = aspect === void 0 ? {} : { "--media-aspect": aspect };
|
|
2555
|
-
return /* @__PURE__ */
|
|
2556
|
+
return /* @__PURE__ */ jsx(
|
|
2556
2557
|
"div",
|
|
2557
2558
|
{
|
|
2558
2559
|
className: cx(MediaPlaceholder_module_default.media, blurred && MediaPlaceholder_module_default.blurred, className),
|
|
2559
2560
|
style: { ...vars, ...style },
|
|
2560
2561
|
...rest,
|
|
2561
|
-
children: [
|
|
2562
|
+
children: /* @__PURE__ */ jsxs("div", { className: MediaPlaceholder_module_default.frame, children: [
|
|
2562
2563
|
picture ? /* @__PURE__ */ jsx(
|
|
2563
2564
|
"img",
|
|
2564
2565
|
{
|
|
@@ -2575,7 +2576,7 @@ function MediaPlaceholder({
|
|
|
2575
2576
|
] }),
|
|
2576
2577
|
picture && caption !== void 0 && /* @__PURE__ */ jsx(Text, { variant: "meta", tone: "on-media", className: MediaPlaceholder_module_default.caption, children: caption }),
|
|
2577
2578
|
cover !== void 0 && /* @__PURE__ */ jsx("div", { className: MediaPlaceholder_module_default.cover, children: cover })
|
|
2578
|
-
]
|
|
2579
|
+
] })
|
|
2579
2580
|
}
|
|
2580
2581
|
);
|
|
2581
2582
|
}
|