@lumx/react 3.13.3-alpha.0 → 3.13.3-alpha.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/index.d.ts +27 -24
- package/index.js +53 -56
- 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 +8 -17
- 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;
|
|
@@ -7148,13 +7157,13 @@ const ExpansionPanel = forwardRef((props, ref) => {
|
|
|
7148
7157
|
}, label);
|
|
7149
7158
|
const toggleOpen = event => {
|
|
7150
7159
|
const shouldOpen = !isOpen;
|
|
7151
|
-
if (
|
|
7160
|
+
if (onOpen && shouldOpen) {
|
|
7152
7161
|
onOpen(event);
|
|
7153
7162
|
}
|
|
7154
|
-
if (
|
|
7163
|
+
if (onClose && !shouldOpen) {
|
|
7155
7164
|
onClose(event);
|
|
7156
7165
|
}
|
|
7157
|
-
if (
|
|
7166
|
+
if (onToggleOpen) {
|
|
7158
7167
|
onToggleOpen(shouldOpen, event);
|
|
7159
7168
|
}
|
|
7160
7169
|
};
|
|
@@ -7173,13 +7182,6 @@ const ExpansionPanel = forwardRef((props, ref) => {
|
|
|
7173
7182
|
|
|
7174
7183
|
/** Hide the children at the end of the transition */
|
|
7175
7184
|
const isChildrenVisible = useTransitionVisibility(wrapperRef, !!isOpen, EXPANSION_PANEL_TRANSITION_DURATION);
|
|
7176
|
-
|
|
7177
|
-
// Switch max height on/off to activate the CSS transition (updates when children changes).
|
|
7178
|
-
const [maxHeight, setMaxHeight] = useState('0');
|
|
7179
|
-
useEffect(() => {
|
|
7180
|
-
const height = isOpen ? get(wrapperRef.current, 'offsetHeight', 0) : 0;
|
|
7181
|
-
setMaxHeight(`${height}px`);
|
|
7182
|
-
}, [children, isOpen]);
|
|
7183
7185
|
return /*#__PURE__*/React__default.createElement("section", _extends({
|
|
7184
7186
|
ref: ref
|
|
7185
7187
|
}, forwardedProps, {
|
|
@@ -7198,12 +7200,9 @@ const ExpansionPanel = forwardRef((props, ref) => {
|
|
|
7198
7200
|
emphasis: Emphasis.low,
|
|
7199
7201
|
icon: isOpen ? mdiChevronUp : mdiChevronDown,
|
|
7200
7202
|
"aria-expanded": isOpen || 'false'
|
|
7201
|
-
})))),
|
|
7202
|
-
className: `${CLASSNAME$Z}__wrapper
|
|
7203
|
-
|
|
7204
|
-
maxHeight
|
|
7205
|
-
}
|
|
7206
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7203
|
+
})))), /*#__PURE__*/React__default.createElement("div", {
|
|
7204
|
+
className: `${CLASSNAME$Z}__wrapper`
|
|
7205
|
+
}, (isOpen || isChildrenVisible) && /*#__PURE__*/React__default.createElement("div", {
|
|
7207
7206
|
className: `${CLASSNAME$Z}__container`,
|
|
7208
7207
|
ref: wrapperRef
|
|
7209
7208
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -7520,7 +7519,6 @@ const Text = forwardRef((props, ref) => {
|
|
|
7520
7519
|
style
|
|
7521
7520
|
} = props,
|
|
7522
7521
|
forwardedProps = _objectWithoutProperties(props, _excluded$_);
|
|
7523
|
-
const colorClass = color && getFontColorClassName(color, colorVariant);
|
|
7524
7522
|
const typographyClass = typography && getTypographyClassName(typography);
|
|
7525
7523
|
|
|
7526
7524
|
// Truncate mode
|
|
@@ -7548,7 +7546,7 @@ const Text = forwardRef((props, ref) => {
|
|
|
7548
7546
|
prefix: CLASSNAME$V,
|
|
7549
7547
|
isTruncated: isTruncated && !isTruncatedMultiline,
|
|
7550
7548
|
isTruncatedMultiline
|
|
7551
|
-
}), typographyClass,
|
|
7549
|
+
}), typographyClass, fontColorClass(color, colorVariant), noWrap && `${CLASSNAME$V}--no-wrap`),
|
|
7552
7550
|
title: tooltipLabel,
|
|
7553
7551
|
style: _objectSpread2(_objectSpread2(_objectSpread2({}, truncateLinesStyle), whiteSpaceStyle), style)
|
|
7554
7552
|
}, forwardedProps), wrapChildrenIconWithSpaces(children));
|
|
@@ -7854,8 +7852,8 @@ const Icon = forwardRef((props, ref) => {
|
|
|
7854
7852
|
const defaultTheme = useTheme();
|
|
7855
7853
|
const {
|
|
7856
7854
|
className,
|
|
7857
|
-
color,
|
|
7858
|
-
colorVariant,
|
|
7855
|
+
color: propColor,
|
|
7856
|
+
colorVariant: propColorVariant,
|
|
7859
7857
|
hasShape,
|
|
7860
7858
|
icon,
|
|
7861
7859
|
size,
|
|
@@ -7863,6 +7861,7 @@ const Icon = forwardRef((props, ref) => {
|
|
|
7863
7861
|
alt
|
|
7864
7862
|
} = props,
|
|
7865
7863
|
forwardedProps = _objectWithoutProperties(props, _excluded$V);
|
|
7864
|
+
const [color, colorVariant] = resolveColorWithVariants(propColor, propColorVariant);
|
|
7866
7865
|
|
|
7867
7866
|
// Color
|
|
7868
7867
|
let iconColor = color;
|
|
@@ -7920,9 +7919,10 @@ Icon.defaultProps = DEFAULT_PROPS$F;
|
|
|
7920
7919
|
|
|
7921
7920
|
/** Internal component used to render image captions */
|
|
7922
7921
|
const ImageCaption = props => {
|
|
7922
|
+
const defaultTheme = useTheme();
|
|
7923
7923
|
const {
|
|
7924
7924
|
baseClassName,
|
|
7925
|
-
theme,
|
|
7925
|
+
theme = defaultTheme,
|
|
7926
7926
|
as = 'figcaption',
|
|
7927
7927
|
title,
|
|
7928
7928
|
titleProps,
|
|
@@ -8457,7 +8457,6 @@ const ImageSlideshow = _ref => {
|
|
|
8457
8457
|
const description = (_images$activeIndex2 = images[activeIndex]) === null || _images$activeIndex2 === void 0 ? void 0 : _images$activeIndex2.description;
|
|
8458
8458
|
const tags = (_images$activeIndex3 = images[activeIndex]) === null || _images$activeIndex3 === void 0 ? void 0 : _images$activeIndex3.tags;
|
|
8459
8459
|
const metadata = title || description || tags ? /*#__PURE__*/React__default.createElement(ImageCaption, {
|
|
8460
|
-
theme: "dark",
|
|
8461
8460
|
as: "div",
|
|
8462
8461
|
title: title,
|
|
8463
8462
|
description: description,
|
|
@@ -8467,7 +8466,6 @@ const ImageSlideshow = _ref => {
|
|
|
8467
8466
|
|
|
8468
8467
|
// Slideshow controls
|
|
8469
8468
|
const slideShowControls = slidesCount > 1 && slideshowControlsProps ? /*#__PURE__*/React__default.createElement(SlideshowControls, _extends({
|
|
8470
|
-
theme: "dark",
|
|
8471
8469
|
activeIndex: activeIndex,
|
|
8472
8470
|
slidesCount: slidesCount,
|
|
8473
8471
|
onNextClick: onNextClick,
|
|
@@ -8504,12 +8502,10 @@ const ImageSlideshow = _ref => {
|
|
|
8504
8502
|
if (typeof activeIndex === 'number') setScale(undefined);
|
|
8505
8503
|
}, [activeIndex]);
|
|
8506
8504
|
const zoomControls = zoomEnabled && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(IconButton, _extends({}, zoomInButtonProps, {
|
|
8507
|
-
theme: "dark",
|
|
8508
8505
|
emphasis: "low",
|
|
8509
8506
|
icon: mdiMagnifyPlusOutline,
|
|
8510
8507
|
onClick: zoomIn
|
|
8511
8508
|
})), /*#__PURE__*/React__default.createElement(IconButton, _extends({}, zoomOutButtonProps, {
|
|
8512
|
-
theme: "dark",
|
|
8513
8509
|
emphasis: "low",
|
|
8514
8510
|
isDisabled: !scale || scale <= 1,
|
|
8515
8511
|
icon: mdiMagnifyMinusOutline,
|
|
@@ -8527,7 +8523,6 @@ const ImageSlideshow = _ref => {
|
|
|
8527
8523
|
}), [images, activeImageRef]);
|
|
8528
8524
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Slides, {
|
|
8529
8525
|
activeIndex: activeIndex,
|
|
8530
|
-
theme: "dark",
|
|
8531
8526
|
slideGroupLabel: slideGroupLabel,
|
|
8532
8527
|
fillHeight: true,
|
|
8533
8528
|
id: slideshowId,
|
|
@@ -8793,6 +8788,8 @@ const Inner = forwardRef((props, ref) => {
|
|
|
8793
8788
|
}), /*#__PURE__*/React__default.createElement(ClickAwayProvider, {
|
|
8794
8789
|
childrenRefs: clickAwayChildrenRefs,
|
|
8795
8790
|
callback: onClickAway
|
|
8791
|
+
}, /*#__PURE__*/React__default.createElement(ThemeProvider, {
|
|
8792
|
+
value: "dark"
|
|
8796
8793
|
}, /*#__PURE__*/React__default.createElement(ImageSlideshow, {
|
|
8797
8794
|
activeImageIndex: activeImageIndex,
|
|
8798
8795
|
slideGroupLabel: slideGroupLabel,
|
|
@@ -8803,7 +8800,7 @@ const Inner = forwardRef((props, ref) => {
|
|
|
8803
8800
|
footerRef: footerRef,
|
|
8804
8801
|
activeImageRef: useMergeRefs(propImageRef, imageRef),
|
|
8805
8802
|
currentPaginationItemRef: currentPaginationItemRef
|
|
8806
|
-
})));
|
|
8803
|
+
}))));
|
|
8807
8804
|
});
|
|
8808
8805
|
Inner.displayName = COMPONENT_NAME$O;
|
|
8809
8806
|
Inner.className = CLASSNAME$O;
|
|
@@ -8857,14 +8854,13 @@ const InlineList = forwardRef((props, ref) => {
|
|
|
8857
8854
|
wrap
|
|
8858
8855
|
} = props,
|
|
8859
8856
|
forwardedProps = _objectWithoutProperties(props, _excluded$R);
|
|
8860
|
-
const fontColorClassName = color && getFontColorClassName(color, colorVariant);
|
|
8861
8857
|
const typographyClassName = typography && getTypographyClassName(typography);
|
|
8862
8858
|
return (
|
|
8863
8859
|
/*#__PURE__*/
|
|
8864
8860
|
// eslint-disable-next-line jsx-a11y/no-redundant-roles
|
|
8865
8861
|
React__default.createElement("ul", _extends({}, forwardedProps, {
|
|
8866
8862
|
ref: ref,
|
|
8867
|
-
className: classNames(className, CLASSNAME$N, wrap && `${CLASSNAME$N}--wrap`,
|
|
8863
|
+
className: classNames(className, CLASSNAME$N, wrap && `${CLASSNAME$N}--wrap`, fontColorClass(color, colorVariant), typographyClassName)
|
|
8868
8864
|
// Lists with removed bullet style can lose their a11y list role on some browsers
|
|
8869
8865
|
,
|
|
8870
8866
|
role: "list"
|
|
@@ -9108,8 +9104,8 @@ const Link = forwardRef((props, ref) => {
|
|
|
9108
9104
|
const {
|
|
9109
9105
|
children,
|
|
9110
9106
|
className,
|
|
9111
|
-
color,
|
|
9112
|
-
colorVariant,
|
|
9107
|
+
color: propColor,
|
|
9108
|
+
colorVariant: propColorVariant,
|
|
9113
9109
|
disabled,
|
|
9114
9110
|
isDisabled = disabled,
|
|
9115
9111
|
href,
|
|
@@ -9120,6 +9116,7 @@ const Link = forwardRef((props, ref) => {
|
|
|
9120
9116
|
typography
|
|
9121
9117
|
} = props,
|
|
9122
9118
|
forwardedProps = _objectWithoutProperties(props, _excluded$O);
|
|
9119
|
+
const [color, colorVariant] = resolveColorWithVariants(propColor, propColorVariant);
|
|
9123
9120
|
const isLink = linkAs || href;
|
|
9124
9121
|
const Component = isLink && !isDisabled ? linkAs || 'a' : 'button';
|
|
9125
9122
|
const baseProps = {};
|