@lumx/react 3.13.3-alpha.0 → 3.13.3-alpha.1
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/index.d.ts +27 -24
- package/index.js +53 -42
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/avatar/Avatar.stories.tsx +1 -1
- package/src/components/avatar/Avatar.tsx +1 -1
- package/src/components/button/IconButton.tsx +4 -2
- package/src/components/expansion-panel/ExpansionPanel.stories.tsx +58 -0
- package/src/components/expansion-panel/ExpansionPanel.tsx +7 -3
- package/src/components/icon/Icon.tsx +6 -5
- package/src/components/image-block/ImageCaption.tsx +3 -2
- package/src/components/image-lightbox/ImageLightbox.stories.tsx +2 -6
- package/src/components/image-lightbox/ImageLightbox.tsx +14 -12
- package/src/components/image-lightbox/internal/ImageSlideshow.tsx +2 -11
- package/src/components/index.ts +2 -33
- package/src/components/inline-list/InlineList.tsx +4 -5
- package/src/components/link/Link.tsx +11 -5
- package/src/components/text/Text.tsx +4 -5
- package/src/utils/className/fontColorClass.test.ts +15 -0
- package/src/utils/className/fontColorClass.ts +12 -0
- package/src/utils/className/index.ts +2 -1
- package/src/utils/className/resolveColorWithVariants.test.ts +33 -0
- package/src/utils/className/resolveColorWithVariants.ts +11 -0
- package/src/utils/type/color/index.ts +43 -0
- package/src/utils/className/getFontColorClassName.test.ts +0 -11
- package/src/utils/className/getFontColorClassName.ts +0 -9
package/index.d.ts
CHANGED
|
@@ -90,24 +90,6 @@ type TextElement = 'span' | 'p' | HeadingElement;
|
|
|
90
90
|
/** Get types of the values of a record. */
|
|
91
91
|
type ValueOf<T extends Record<any, any>> = T[keyof T];
|
|
92
92
|
|
|
93
|
-
/**
|
|
94
|
-
* Alignments.
|
|
95
|
-
*/
|
|
96
|
-
declare const Alignment: {
|
|
97
|
-
readonly bottom: "bottom";
|
|
98
|
-
readonly center: "center";
|
|
99
|
-
readonly end: "end";
|
|
100
|
-
readonly left: "left";
|
|
101
|
-
readonly right: "right";
|
|
102
|
-
readonly spaceAround: "space-around";
|
|
103
|
-
readonly spaceBetween: "space-between";
|
|
104
|
-
readonly spaceEvenly: "space-evenly";
|
|
105
|
-
readonly start: "start";
|
|
106
|
-
readonly top: "top";
|
|
107
|
-
};
|
|
108
|
-
type Alignment = ValueOf<typeof Alignment>;
|
|
109
|
-
type VerticalAlignment = Extract<Alignment, 'top' | 'center' | 'bottom'>;
|
|
110
|
-
type HorizontalAlignment = Extract<Alignment, 'right' | 'center' | 'left'>;
|
|
111
93
|
/**
|
|
112
94
|
* See SCSS variable $lumx-color-palette
|
|
113
95
|
*/
|
|
@@ -139,6 +121,27 @@ declare const ColorVariant: {
|
|
|
139
121
|
readonly N: "N";
|
|
140
122
|
};
|
|
141
123
|
type ColorVariant = ValueOf<typeof ColorVariant>;
|
|
124
|
+
/** ColorPalette with all possible color variant combination */
|
|
125
|
+
type ColorWithVariants = ColorPalette | Exclude<`${ColorPalette}-${ColorVariant}`, `light-D${number}` | `dark-D${number}`>;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Alignments.
|
|
129
|
+
*/
|
|
130
|
+
declare const Alignment: {
|
|
131
|
+
readonly bottom: "bottom";
|
|
132
|
+
readonly center: "center";
|
|
133
|
+
readonly end: "end";
|
|
134
|
+
readonly left: "left";
|
|
135
|
+
readonly right: "right";
|
|
136
|
+
readonly spaceAround: "space-around";
|
|
137
|
+
readonly spaceBetween: "space-between";
|
|
138
|
+
readonly spaceEvenly: "space-evenly";
|
|
139
|
+
readonly start: "start";
|
|
140
|
+
readonly top: "top";
|
|
141
|
+
};
|
|
142
|
+
type Alignment = ValueOf<typeof Alignment>;
|
|
143
|
+
type VerticalAlignment = Extract<Alignment, 'top' | 'center' | 'bottom'>;
|
|
144
|
+
type HorizontalAlignment = Extract<Alignment, 'right' | 'center' | 'left'>;
|
|
142
145
|
declare const Theme: {
|
|
143
146
|
readonly light: "light";
|
|
144
147
|
readonly dark: "dark";
|
|
@@ -514,7 +517,7 @@ declare const AutocompleteMultiple: Comp<AutocompleteMultipleProps, HTMLDivEleme
|
|
|
514
517
|
/**
|
|
515
518
|
* Avatar sizes.
|
|
516
519
|
*/
|
|
517
|
-
type AvatarSize = Extract<Size, 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;
|
|
520
|
+
type AvatarSize = Extract<Size, 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;
|
|
518
521
|
/**
|
|
519
522
|
* Defines the props of the component.
|
|
520
523
|
*/
|
|
@@ -1398,7 +1401,7 @@ interface TextProps extends GenericProps {
|
|
|
1398
1401
|
/**
|
|
1399
1402
|
* Color variant.
|
|
1400
1403
|
*/
|
|
1401
|
-
color?:
|
|
1404
|
+
color?: ColorWithVariants;
|
|
1402
1405
|
/**
|
|
1403
1406
|
* Lightened or darkened variant of the selected color.
|
|
1404
1407
|
*/
|
|
@@ -1563,7 +1566,7 @@ type IconSizes = Extract<Size, 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;
|
|
|
1563
1566
|
*/
|
|
1564
1567
|
interface IconProps extends GenericProps, HasTheme {
|
|
1565
1568
|
/** Color variant. */
|
|
1566
|
-
color?:
|
|
1569
|
+
color?: ColorWithVariants;
|
|
1567
1570
|
/** Lightened or darkened variant of the selected icon color. */
|
|
1568
1571
|
colorVariant?: ColorVariant;
|
|
1569
1572
|
/** Whether the icon has a shape. */
|
|
@@ -1816,7 +1819,7 @@ interface InlineListProps extends GenericProps {
|
|
|
1816
1819
|
/**
|
|
1817
1820
|
* Text color.
|
|
1818
1821
|
*/
|
|
1819
|
-
color?:
|
|
1822
|
+
color?: ColorWithVariants;
|
|
1820
1823
|
/**
|
|
1821
1824
|
* Lightened or darkened variant of the selected color.
|
|
1822
1825
|
*/
|
|
@@ -1919,7 +1922,7 @@ type HTMLAnchorProps = React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAn
|
|
|
1919
1922
|
*/
|
|
1920
1923
|
interface LinkProps extends GenericProps {
|
|
1921
1924
|
/** Color variant. */
|
|
1922
|
-
color?:
|
|
1925
|
+
color?: ColorWithVariants;
|
|
1923
1926
|
/** Lightened or darkened variant of the selected icon color. */
|
|
1924
1927
|
colorVariant?: ColorVariant;
|
|
1925
1928
|
/** Link href. */
|
|
@@ -3391,4 +3394,4 @@ declare const ThemeProvider: React.FC<{
|
|
|
3391
3394
|
/** Get the theme in the current context. */
|
|
3392
3395
|
declare function useTheme(): ThemeContextValue;
|
|
3393
3396
|
|
|
3394
|
-
export { AlertDialog, type AlertDialogProps, Alignment, AspectRatio, Autocomplete, AutocompleteMultiple, type AutocompleteMultipleProps, type AutocompleteProps, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, BadgeWrapper, type BadgeWrapperProps, type BaseButtonProps, Button, ButtonEmphasis, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, type Callback, Checkbox, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipProps, type Color, ColorPalette, ColorVariant, CommentBlock, type CommentBlockProps, CommentBlockVariant, DatePicker, DatePickerControlled, type DatePickerControlledProps, DatePickerField, type DatePickerFieldProps, type DatePickerProps, Dialog, type DialogProps, type DialogSizes, Divider, type DividerProps, DragHandle, type DragHandleProps, Dropdown, type DropdownProps, type Elevation, Emphasis, ExpansionPanel, type ExpansionPanelProps, Flag, type FlagProps, FlexBox, type FlexBoxProps, type FlexHorizontalAlignment, type FlexVerticalAlignment, type FocusPoint, type GapSize, GenericBlock, GenericBlockGapSize, type GenericBlockProps, type GenericProps, type GlobalSize, Grid, GridColumn, type GridColumnGapSize, type GridColumnProps, GridItem, type GridItemProps, type GridProps, Heading, type HeadingElement, HeadingLevelProvider, type HeadingLevelProviderProps, type HeadingProps, type HorizontalAlignment, Icon, IconButton, type IconButtonProps, type IconProps, type IconSizes, ImageBlock, ImageBlockCaptionPosition, type ImageBlockProps, type ImageBlockSize, ImageLightbox, type ImageLightboxProps, InlineList, type InlineListProps, InputHelper, type InputHelperProps, InputLabel, type InputLabelProps, Kind, Lightbox, type LightboxProps, Link, LinkPreview, type LinkPreviewProps, type LinkProps, List, ListDivider, type ListDividerProps, ListItem, type ListItemProps, type ListItemSize, type ListProps, ListSubheader, type ListSubheaderProps, type MarginAutoAlignment, Message, type MessageProps, Mosaic, type MosaicProps, Navigation, type NavigationProps, Notification, type NotificationProps, type Offset, Orientation, Placement, Popover, PopoverDialog, type PopoverDialogProps, type PopoverProps, PostBlock, type PostBlockProps, Progress, ProgressCircular, type ProgressCircularProps, type ProgressCircularSize, ProgressLinear, type ProgressLinearProps, type ProgressProps, ProgressTracker, type ProgressTrackerProps, ProgressTrackerProvider, type ProgressTrackerProviderProps, ProgressTrackerStep, ProgressTrackerStepPanel, type ProgressTrackerStepPanelProps, type ProgressTrackerStepProps, ProgressVariant, RadioButton, type RadioButtonProps, RadioGroup, type RadioGroupProps, Select, SelectMultiple, SelectMultipleField, type SelectMultipleProps, type SelectProps, SelectVariant, SideNavigation, SideNavigationItem, type SideNavigationItemProps, type SideNavigationProps, Size, SkeletonCircle, type SkeletonCircleProps, SkeletonRectangle, type SkeletonRectangleProps, SkeletonRectangleVariant, SkeletonTypography, type SkeletonTypographyProps, Slider, type SliderProps, Slides, type SlidesProps, Slideshow, SlideshowControls, type SlideshowControlsProps, SlideshowItem, type SlideshowItemProps, type SlideshowProps, Switch, type SwitchProps, Tab, TabList, TabListLayout, type TabListProps, TabPanel, type TabPanelProps, type TabProps, TabProvider, type TabProviderProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableCellVariant, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Text, type TextElement, TextField, type TextFieldProps, type TextProps, ThOrder, Theme, ThemeProvider, Thumbnail, ThumbnailAspectRatio, ThumbnailObjectFit, type ThumbnailProps, type ThumbnailSize, ThumbnailVariant, Toolbar, type ToolbarProps, Tooltip, type TooltipPlacement, type TooltipProps, Typography, TypographyCustom, TypographyInterface, TypographyTitleCustom, Uploader, type UploaderProps, type UploaderSize, UploaderVariant, UserBlock, type UserBlockProps, type UserBlockSize, type VerticalAlignment, WhiteSpace, clamp, isClickable, useFocusPointStyle, useHeadingLevel, useTheme };
|
|
3397
|
+
export { AlertDialog, type AlertDialogProps, Alignment, AspectRatio, Autocomplete, AutocompleteMultiple, type AutocompleteMultipleProps, type AutocompleteProps, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, BadgeWrapper, type BadgeWrapperProps, type BaseButtonProps, Button, ButtonEmphasis, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, type Callback, Checkbox, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipProps, type Color, ColorPalette, ColorVariant, type ColorWithVariants, CommentBlock, type CommentBlockProps, CommentBlockVariant, DatePicker, DatePickerControlled, type DatePickerControlledProps, DatePickerField, type DatePickerFieldProps, type DatePickerProps, Dialog, type DialogProps, type DialogSizes, Divider, type DividerProps, DragHandle, type DragHandleProps, Dropdown, type DropdownProps, type Elevation, Emphasis, ExpansionPanel, type ExpansionPanelProps, Flag, type FlagProps, FlexBox, type FlexBoxProps, type FlexHorizontalAlignment, type FlexVerticalAlignment, type FocusPoint, type GapSize, GenericBlock, GenericBlockGapSize, type GenericBlockProps, type GenericProps, type GlobalSize, Grid, GridColumn, type GridColumnGapSize, type GridColumnProps, GridItem, type GridItemProps, type GridProps, Heading, type HeadingElement, HeadingLevelProvider, type HeadingLevelProviderProps, type HeadingProps, type HorizontalAlignment, Icon, IconButton, type IconButtonProps, type IconProps, type IconSizes, ImageBlock, ImageBlockCaptionPosition, type ImageBlockProps, type ImageBlockSize, ImageLightbox, type ImageLightboxProps, InlineList, type InlineListProps, InputHelper, type InputHelperProps, InputLabel, type InputLabelProps, Kind, Lightbox, type LightboxProps, Link, LinkPreview, type LinkPreviewProps, type LinkProps, List, ListDivider, type ListDividerProps, ListItem, type ListItemProps, type ListItemSize, type ListProps, ListSubheader, type ListSubheaderProps, type MarginAutoAlignment, Message, type MessageProps, Mosaic, type MosaicProps, Navigation, type NavigationProps, Notification, type NotificationProps, type Offset, Orientation, Placement, Popover, PopoverDialog, type PopoverDialogProps, type PopoverProps, PostBlock, type PostBlockProps, Progress, ProgressCircular, type ProgressCircularProps, type ProgressCircularSize, ProgressLinear, type ProgressLinearProps, type ProgressProps, ProgressTracker, type ProgressTrackerProps, ProgressTrackerProvider, type ProgressTrackerProviderProps, ProgressTrackerStep, ProgressTrackerStepPanel, type ProgressTrackerStepPanelProps, type ProgressTrackerStepProps, ProgressVariant, RadioButton, type RadioButtonProps, RadioGroup, type RadioGroupProps, Select, SelectMultiple, SelectMultipleField, type SelectMultipleProps, type SelectProps, SelectVariant, SideNavigation, SideNavigationItem, type SideNavigationItemProps, type SideNavigationProps, Size, SkeletonCircle, type SkeletonCircleProps, SkeletonRectangle, type SkeletonRectangleProps, SkeletonRectangleVariant, SkeletonTypography, type SkeletonTypographyProps, Slider, type SliderProps, Slides, type SlidesProps, Slideshow, SlideshowControls, type SlideshowControlsProps, SlideshowItem, type SlideshowItemProps, type SlideshowProps, Switch, type SwitchProps, Tab, TabList, TabListLayout, type TabListProps, TabPanel, type TabPanelProps, type TabProps, TabProvider, type TabProviderProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableCellVariant, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Text, type TextElement, TextField, type TextFieldProps, type TextProps, ThOrder, Theme, ThemeProvider, Thumbnail, ThumbnailAspectRatio, ThumbnailObjectFit, type ThumbnailProps, type ThumbnailSize, ThumbnailVariant, Toolbar, type ToolbarProps, Tooltip, type TooltipPlacement, type TooltipProps, Typography, TypographyCustom, TypographyInterface, TypographyTitleCustom, Uploader, type UploaderProps, type UploaderSize, UploaderVariant, UserBlock, type UserBlockProps, type UserBlockSize, type VerticalAlignment, WhiteSpace, clamp, isClickable, useFocusPointStyle, useHeadingLevel, useTheme };
|
package/index.js
CHANGED
|
@@ -98,21 +98,6 @@ function _toPropertyKey(t) {
|
|
|
98
98
|
return "symbol" == typeof i ? i : i + "";
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
/**
|
|
102
|
-
* Alignments.
|
|
103
|
-
*/
|
|
104
|
-
const Alignment = {
|
|
105
|
-
bottom: 'bottom',
|
|
106
|
-
center: 'center',
|
|
107
|
-
end: 'end',
|
|
108
|
-
left: 'left',
|
|
109
|
-
right: 'right',
|
|
110
|
-
spaceAround: 'space-around',
|
|
111
|
-
spaceBetween: 'space-between',
|
|
112
|
-
spaceEvenly: 'space-evenly',
|
|
113
|
-
start: 'start',
|
|
114
|
-
top: 'top'
|
|
115
|
-
};
|
|
116
101
|
/**
|
|
117
102
|
* See SCSS variable $lumx-color-palette
|
|
118
103
|
*/
|
|
@@ -141,6 +126,24 @@ const ColorVariant = {
|
|
|
141
126
|
L6: 'L6',
|
|
142
127
|
N: 'N'
|
|
143
128
|
};
|
|
129
|
+
|
|
130
|
+
/** ColorPalette with all possible color variant combination */
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Alignments.
|
|
134
|
+
*/
|
|
135
|
+
const Alignment = {
|
|
136
|
+
bottom: 'bottom',
|
|
137
|
+
center: 'center',
|
|
138
|
+
end: 'end',
|
|
139
|
+
left: 'left',
|
|
140
|
+
right: 'right',
|
|
141
|
+
spaceAround: 'space-around',
|
|
142
|
+
spaceBetween: 'space-between',
|
|
143
|
+
spaceEvenly: 'space-evenly',
|
|
144
|
+
start: 'start',
|
|
145
|
+
top: 'top'
|
|
146
|
+
};
|
|
144
147
|
const Theme = {
|
|
145
148
|
light: 'light',
|
|
146
149
|
dark: 'dark'
|
|
@@ -250,10 +253,6 @@ const WhiteSpace = {
|
|
|
250
253
|
'break-spaces': 'break-spaces'
|
|
251
254
|
};
|
|
252
255
|
|
|
253
|
-
/**
|
|
254
|
-
* Re-exporting some utils types.
|
|
255
|
-
*/
|
|
256
|
-
|
|
257
256
|
var classnames = {exports: {}};
|
|
258
257
|
|
|
259
258
|
/*!
|
|
@@ -576,12 +575,20 @@ const getTypographyClassName = typography => {
|
|
|
576
575
|
|
|
577
576
|
/**
|
|
578
577
|
* Returns the classname associated to the given color and variant.
|
|
579
|
-
* For example, for 'dark' and 'L2' it returns `lumx-color-font-dark-
|
|
578
|
+
* For example, for 'dark' and 'L2' it returns `lumx-color-font-dark-L2`
|
|
580
579
|
*/
|
|
581
|
-
|
|
582
|
-
|
|
580
|
+
function fontColorClass(propColor, propColorVariant) {
|
|
581
|
+
if (!propColor) return undefined;
|
|
582
|
+
const [color, colorVariant = ColorVariant.N] = resolveColorWithVariants(propColor, propColorVariant);
|
|
583
583
|
return `lumx-color-font-${color}-${colorVariant}`;
|
|
584
|
-
}
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
/** Resolve color & color variant from a `ColorWithVariants` and optionally a `ColorVariant`. */
|
|
587
|
+
function resolveColorWithVariants(colorWithVariants, colorVariant) {
|
|
588
|
+
if (!colorWithVariants) return [undefined, colorVariant];
|
|
589
|
+
const [color, baseColorVariant] = colorWithVariants.split('-');
|
|
590
|
+
return [color, colorVariant || baseColorVariant];
|
|
591
|
+
}
|
|
585
592
|
|
|
586
593
|
let i = 0;
|
|
587
594
|
|
|
@@ -5404,9 +5411,11 @@ const IconButton = forwardRef((props, ref) => {
|
|
|
5404
5411
|
// no need to set alt as an aria-label is already set on the button
|
|
5405
5412
|
alt: "",
|
|
5406
5413
|
src: image
|
|
5407
|
-
}) : /*#__PURE__*/React__default.createElement(
|
|
5414
|
+
}) : /*#__PURE__*/React__default.createElement(ThemeProvider, {
|
|
5415
|
+
value: undefined
|
|
5416
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
5408
5417
|
icon: icon
|
|
5409
|
-
})));
|
|
5418
|
+
}))));
|
|
5410
5419
|
});
|
|
5411
5420
|
IconButton.displayName = COMPONENT_NAME$19;
|
|
5412
5421
|
IconButton.className = CLASSNAME$17;
|
|
@@ -7179,7 +7188,10 @@ const ExpansionPanel = forwardRef((props, ref) => {
|
|
|
7179
7188
|
useEffect(() => {
|
|
7180
7189
|
const height = isOpen ? get(wrapperRef.current, 'offsetHeight', 0) : 0;
|
|
7181
7190
|
setMaxHeight(`${height}px`);
|
|
7182
|
-
}, [
|
|
7191
|
+
}, [isOpen]);
|
|
7192
|
+
const onTransitionEnd = React__default.useCallback(() => {
|
|
7193
|
+
setMaxHeight(undefined);
|
|
7194
|
+
}, []);
|
|
7183
7195
|
return /*#__PURE__*/React__default.createElement("section", _extends({
|
|
7184
7196
|
ref: ref
|
|
7185
7197
|
}, forwardedProps, {
|
|
@@ -7202,7 +7214,8 @@ const ExpansionPanel = forwardRef((props, ref) => {
|
|
|
7202
7214
|
className: `${CLASSNAME$Z}__wrapper`,
|
|
7203
7215
|
style: {
|
|
7204
7216
|
maxHeight
|
|
7205
|
-
}
|
|
7217
|
+
},
|
|
7218
|
+
onTransitionEnd: onTransitionEnd
|
|
7206
7219
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7207
7220
|
className: `${CLASSNAME$Z}__container`,
|
|
7208
7221
|
ref: wrapperRef
|
|
@@ -7520,7 +7533,6 @@ const Text = forwardRef((props, ref) => {
|
|
|
7520
7533
|
style
|
|
7521
7534
|
} = props,
|
|
7522
7535
|
forwardedProps = _objectWithoutProperties(props, _excluded$_);
|
|
7523
|
-
const colorClass = color && getFontColorClassName(color, colorVariant);
|
|
7524
7536
|
const typographyClass = typography && getTypographyClassName(typography);
|
|
7525
7537
|
|
|
7526
7538
|
// Truncate mode
|
|
@@ -7548,7 +7560,7 @@ const Text = forwardRef((props, ref) => {
|
|
|
7548
7560
|
prefix: CLASSNAME$V,
|
|
7549
7561
|
isTruncated: isTruncated && !isTruncatedMultiline,
|
|
7550
7562
|
isTruncatedMultiline
|
|
7551
|
-
}), typographyClass,
|
|
7563
|
+
}), typographyClass, fontColorClass(color, colorVariant), noWrap && `${CLASSNAME$V}--no-wrap`),
|
|
7552
7564
|
title: tooltipLabel,
|
|
7553
7565
|
style: _objectSpread2(_objectSpread2(_objectSpread2({}, truncateLinesStyle), whiteSpaceStyle), style)
|
|
7554
7566
|
}, forwardedProps), wrapChildrenIconWithSpaces(children));
|
|
@@ -7854,8 +7866,8 @@ const Icon = forwardRef((props, ref) => {
|
|
|
7854
7866
|
const defaultTheme = useTheme();
|
|
7855
7867
|
const {
|
|
7856
7868
|
className,
|
|
7857
|
-
color,
|
|
7858
|
-
colorVariant,
|
|
7869
|
+
color: propColor,
|
|
7870
|
+
colorVariant: propColorVariant,
|
|
7859
7871
|
hasShape,
|
|
7860
7872
|
icon,
|
|
7861
7873
|
size,
|
|
@@ -7863,6 +7875,7 @@ const Icon = forwardRef((props, ref) => {
|
|
|
7863
7875
|
alt
|
|
7864
7876
|
} = props,
|
|
7865
7877
|
forwardedProps = _objectWithoutProperties(props, _excluded$V);
|
|
7878
|
+
const [color, colorVariant] = resolveColorWithVariants(propColor, propColorVariant);
|
|
7866
7879
|
|
|
7867
7880
|
// Color
|
|
7868
7881
|
let iconColor = color;
|
|
@@ -7920,9 +7933,10 @@ Icon.defaultProps = DEFAULT_PROPS$F;
|
|
|
7920
7933
|
|
|
7921
7934
|
/** Internal component used to render image captions */
|
|
7922
7935
|
const ImageCaption = props => {
|
|
7936
|
+
const defaultTheme = useTheme();
|
|
7923
7937
|
const {
|
|
7924
7938
|
baseClassName,
|
|
7925
|
-
theme,
|
|
7939
|
+
theme = defaultTheme,
|
|
7926
7940
|
as = 'figcaption',
|
|
7927
7941
|
title,
|
|
7928
7942
|
titleProps,
|
|
@@ -8457,7 +8471,6 @@ const ImageSlideshow = _ref => {
|
|
|
8457
8471
|
const description = (_images$activeIndex2 = images[activeIndex]) === null || _images$activeIndex2 === void 0 ? void 0 : _images$activeIndex2.description;
|
|
8458
8472
|
const tags = (_images$activeIndex3 = images[activeIndex]) === null || _images$activeIndex3 === void 0 ? void 0 : _images$activeIndex3.tags;
|
|
8459
8473
|
const metadata = title || description || tags ? /*#__PURE__*/React__default.createElement(ImageCaption, {
|
|
8460
|
-
theme: "dark",
|
|
8461
8474
|
as: "div",
|
|
8462
8475
|
title: title,
|
|
8463
8476
|
description: description,
|
|
@@ -8467,7 +8480,6 @@ const ImageSlideshow = _ref => {
|
|
|
8467
8480
|
|
|
8468
8481
|
// Slideshow controls
|
|
8469
8482
|
const slideShowControls = slidesCount > 1 && slideshowControlsProps ? /*#__PURE__*/React__default.createElement(SlideshowControls, _extends({
|
|
8470
|
-
theme: "dark",
|
|
8471
8483
|
activeIndex: activeIndex,
|
|
8472
8484
|
slidesCount: slidesCount,
|
|
8473
8485
|
onNextClick: onNextClick,
|
|
@@ -8504,12 +8516,10 @@ const ImageSlideshow = _ref => {
|
|
|
8504
8516
|
if (typeof activeIndex === 'number') setScale(undefined);
|
|
8505
8517
|
}, [activeIndex]);
|
|
8506
8518
|
const zoomControls = zoomEnabled && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(IconButton, _extends({}, zoomInButtonProps, {
|
|
8507
|
-
theme: "dark",
|
|
8508
8519
|
emphasis: "low",
|
|
8509
8520
|
icon: mdiMagnifyPlusOutline,
|
|
8510
8521
|
onClick: zoomIn
|
|
8511
8522
|
})), /*#__PURE__*/React__default.createElement(IconButton, _extends({}, zoomOutButtonProps, {
|
|
8512
|
-
theme: "dark",
|
|
8513
8523
|
emphasis: "low",
|
|
8514
8524
|
isDisabled: !scale || scale <= 1,
|
|
8515
8525
|
icon: mdiMagnifyMinusOutline,
|
|
@@ -8527,7 +8537,6 @@ const ImageSlideshow = _ref => {
|
|
|
8527
8537
|
}), [images, activeImageRef]);
|
|
8528
8538
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Slides, {
|
|
8529
8539
|
activeIndex: activeIndex,
|
|
8530
|
-
theme: "dark",
|
|
8531
8540
|
slideGroupLabel: slideGroupLabel,
|
|
8532
8541
|
fillHeight: true,
|
|
8533
8542
|
id: slideshowId,
|
|
@@ -8793,6 +8802,8 @@ const Inner = forwardRef((props, ref) => {
|
|
|
8793
8802
|
}), /*#__PURE__*/React__default.createElement(ClickAwayProvider, {
|
|
8794
8803
|
childrenRefs: clickAwayChildrenRefs,
|
|
8795
8804
|
callback: onClickAway
|
|
8805
|
+
}, /*#__PURE__*/React__default.createElement(ThemeProvider, {
|
|
8806
|
+
value: "dark"
|
|
8796
8807
|
}, /*#__PURE__*/React__default.createElement(ImageSlideshow, {
|
|
8797
8808
|
activeImageIndex: activeImageIndex,
|
|
8798
8809
|
slideGroupLabel: slideGroupLabel,
|
|
@@ -8803,7 +8814,7 @@ const Inner = forwardRef((props, ref) => {
|
|
|
8803
8814
|
footerRef: footerRef,
|
|
8804
8815
|
activeImageRef: useMergeRefs(propImageRef, imageRef),
|
|
8805
8816
|
currentPaginationItemRef: currentPaginationItemRef
|
|
8806
|
-
})));
|
|
8817
|
+
}))));
|
|
8807
8818
|
});
|
|
8808
8819
|
Inner.displayName = COMPONENT_NAME$O;
|
|
8809
8820
|
Inner.className = CLASSNAME$O;
|
|
@@ -8857,14 +8868,13 @@ const InlineList = forwardRef((props, ref) => {
|
|
|
8857
8868
|
wrap
|
|
8858
8869
|
} = props,
|
|
8859
8870
|
forwardedProps = _objectWithoutProperties(props, _excluded$R);
|
|
8860
|
-
const fontColorClassName = color && getFontColorClassName(color, colorVariant);
|
|
8861
8871
|
const typographyClassName = typography && getTypographyClassName(typography);
|
|
8862
8872
|
return (
|
|
8863
8873
|
/*#__PURE__*/
|
|
8864
8874
|
// eslint-disable-next-line jsx-a11y/no-redundant-roles
|
|
8865
8875
|
React__default.createElement("ul", _extends({}, forwardedProps, {
|
|
8866
8876
|
ref: ref,
|
|
8867
|
-
className: classNames(className, CLASSNAME$N, wrap && `${CLASSNAME$N}--wrap`,
|
|
8877
|
+
className: classNames(className, CLASSNAME$N, wrap && `${CLASSNAME$N}--wrap`, fontColorClass(color, colorVariant), typographyClassName)
|
|
8868
8878
|
// Lists with removed bullet style can lose their a11y list role on some browsers
|
|
8869
8879
|
,
|
|
8870
8880
|
role: "list"
|
|
@@ -9108,8 +9118,8 @@ const Link = forwardRef((props, ref) => {
|
|
|
9108
9118
|
const {
|
|
9109
9119
|
children,
|
|
9110
9120
|
className,
|
|
9111
|
-
color,
|
|
9112
|
-
colorVariant,
|
|
9121
|
+
color: propColor,
|
|
9122
|
+
colorVariant: propColorVariant,
|
|
9113
9123
|
disabled,
|
|
9114
9124
|
isDisabled = disabled,
|
|
9115
9125
|
href,
|
|
@@ -9120,6 +9130,7 @@ const Link = forwardRef((props, ref) => {
|
|
|
9120
9130
|
typography
|
|
9121
9131
|
} = props,
|
|
9122
9132
|
forwardedProps = _objectWithoutProperties(props, _excluded$O);
|
|
9133
|
+
const [color, colorVariant] = resolveColorWithVariants(propColor, propColorVariant);
|
|
9123
9134
|
const isLink = linkAs || href;
|
|
9124
9135
|
const Component = isLink && !isDisabled ? linkAs || 'a' : 'button';
|
|
9125
9136
|
const baseProps = {};
|