@lumx/react 3.13.2 → 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 +62 -44
- 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/date-picker/DatePickerField.stories.tsx +21 -0
- 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/date/getMonthCalendar.test.ts +2 -2
- package/src/utils/date/getMonthCalendar.ts +11 -2
- 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;
|
|
@@ -6055,8 +6064,14 @@ const getMonthCalendar = function (locale) {
|
|
|
6055
6064
|
let rangeMinDate = arguments.length > 2 ? arguments[2] : undefined;
|
|
6056
6065
|
let rangeMaxDate = arguments.length > 3 ? arguments[3] : undefined;
|
|
6057
6066
|
const month = referenceDate.getMonth();
|
|
6058
|
-
const iterDate = new Date(referenceDate
|
|
6067
|
+
const iterDate = new Date(referenceDate);
|
|
6059
6068
|
iterDate.setDate(1);
|
|
6069
|
+
const minDate = rangeMinDate && new Date(rangeMinDate);
|
|
6070
|
+
const maxDate = rangeMaxDate && new Date(rangeMaxDate);
|
|
6071
|
+
// Reset time to compare dates only.
|
|
6072
|
+
iterDate.setUTCHours(0, 0, 0, 0);
|
|
6073
|
+
minDate === null || minDate === void 0 ? void 0 : minDate.setUTCHours(0, 0, 0, 0);
|
|
6074
|
+
maxDate === null || maxDate === void 0 ? void 0 : maxDate.setUTCHours(0, 0, 0, 0);
|
|
6060
6075
|
const weekDays = getWeekDays(locale);
|
|
6061
6076
|
const lastDayOfWeek = last(weekDays);
|
|
6062
6077
|
const weeks = [];
|
|
@@ -6069,7 +6084,8 @@ const getMonthCalendar = function (locale) {
|
|
|
6069
6084
|
};
|
|
6070
6085
|
|
|
6071
6086
|
// If a range is specified, check if the day is out of range.
|
|
6072
|
-
|
|
6087
|
+
// min and max date are included within the valid range.
|
|
6088
|
+
if (minDate && iterDate < minDate || maxDate && iterDate > maxDate) {
|
|
6073
6089
|
day.isOutOfRange = true;
|
|
6074
6090
|
}
|
|
6075
6091
|
if (iterDate.getMonth() === month) {
|
|
@@ -7172,7 +7188,10 @@ const ExpansionPanel = forwardRef((props, ref) => {
|
|
|
7172
7188
|
useEffect(() => {
|
|
7173
7189
|
const height = isOpen ? get(wrapperRef.current, 'offsetHeight', 0) : 0;
|
|
7174
7190
|
setMaxHeight(`${height}px`);
|
|
7175
|
-
}, [
|
|
7191
|
+
}, [isOpen]);
|
|
7192
|
+
const onTransitionEnd = React__default.useCallback(() => {
|
|
7193
|
+
setMaxHeight(undefined);
|
|
7194
|
+
}, []);
|
|
7176
7195
|
return /*#__PURE__*/React__default.createElement("section", _extends({
|
|
7177
7196
|
ref: ref
|
|
7178
7197
|
}, forwardedProps, {
|
|
@@ -7195,7 +7214,8 @@ const ExpansionPanel = forwardRef((props, ref) => {
|
|
|
7195
7214
|
className: `${CLASSNAME$Z}__wrapper`,
|
|
7196
7215
|
style: {
|
|
7197
7216
|
maxHeight
|
|
7198
|
-
}
|
|
7217
|
+
},
|
|
7218
|
+
onTransitionEnd: onTransitionEnd
|
|
7199
7219
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7200
7220
|
className: `${CLASSNAME$Z}__container`,
|
|
7201
7221
|
ref: wrapperRef
|
|
@@ -7513,7 +7533,6 @@ const Text = forwardRef((props, ref) => {
|
|
|
7513
7533
|
style
|
|
7514
7534
|
} = props,
|
|
7515
7535
|
forwardedProps = _objectWithoutProperties(props, _excluded$_);
|
|
7516
|
-
const colorClass = color && getFontColorClassName(color, colorVariant);
|
|
7517
7536
|
const typographyClass = typography && getTypographyClassName(typography);
|
|
7518
7537
|
|
|
7519
7538
|
// Truncate mode
|
|
@@ -7541,7 +7560,7 @@ const Text = forwardRef((props, ref) => {
|
|
|
7541
7560
|
prefix: CLASSNAME$V,
|
|
7542
7561
|
isTruncated: isTruncated && !isTruncatedMultiline,
|
|
7543
7562
|
isTruncatedMultiline
|
|
7544
|
-
}), typographyClass,
|
|
7563
|
+
}), typographyClass, fontColorClass(color, colorVariant), noWrap && `${CLASSNAME$V}--no-wrap`),
|
|
7545
7564
|
title: tooltipLabel,
|
|
7546
7565
|
style: _objectSpread2(_objectSpread2(_objectSpread2({}, truncateLinesStyle), whiteSpaceStyle), style)
|
|
7547
7566
|
}, forwardedProps), wrapChildrenIconWithSpaces(children));
|
|
@@ -7847,8 +7866,8 @@ const Icon = forwardRef((props, ref) => {
|
|
|
7847
7866
|
const defaultTheme = useTheme();
|
|
7848
7867
|
const {
|
|
7849
7868
|
className,
|
|
7850
|
-
color,
|
|
7851
|
-
colorVariant,
|
|
7869
|
+
color: propColor,
|
|
7870
|
+
colorVariant: propColorVariant,
|
|
7852
7871
|
hasShape,
|
|
7853
7872
|
icon,
|
|
7854
7873
|
size,
|
|
@@ -7856,6 +7875,7 @@ const Icon = forwardRef((props, ref) => {
|
|
|
7856
7875
|
alt
|
|
7857
7876
|
} = props,
|
|
7858
7877
|
forwardedProps = _objectWithoutProperties(props, _excluded$V);
|
|
7878
|
+
const [color, colorVariant] = resolveColorWithVariants(propColor, propColorVariant);
|
|
7859
7879
|
|
|
7860
7880
|
// Color
|
|
7861
7881
|
let iconColor = color;
|
|
@@ -7913,9 +7933,10 @@ Icon.defaultProps = DEFAULT_PROPS$F;
|
|
|
7913
7933
|
|
|
7914
7934
|
/** Internal component used to render image captions */
|
|
7915
7935
|
const ImageCaption = props => {
|
|
7936
|
+
const defaultTheme = useTheme();
|
|
7916
7937
|
const {
|
|
7917
7938
|
baseClassName,
|
|
7918
|
-
theme,
|
|
7939
|
+
theme = defaultTheme,
|
|
7919
7940
|
as = 'figcaption',
|
|
7920
7941
|
title,
|
|
7921
7942
|
titleProps,
|
|
@@ -8450,7 +8471,6 @@ const ImageSlideshow = _ref => {
|
|
|
8450
8471
|
const description = (_images$activeIndex2 = images[activeIndex]) === null || _images$activeIndex2 === void 0 ? void 0 : _images$activeIndex2.description;
|
|
8451
8472
|
const tags = (_images$activeIndex3 = images[activeIndex]) === null || _images$activeIndex3 === void 0 ? void 0 : _images$activeIndex3.tags;
|
|
8452
8473
|
const metadata = title || description || tags ? /*#__PURE__*/React__default.createElement(ImageCaption, {
|
|
8453
|
-
theme: "dark",
|
|
8454
8474
|
as: "div",
|
|
8455
8475
|
title: title,
|
|
8456
8476
|
description: description,
|
|
@@ -8460,7 +8480,6 @@ const ImageSlideshow = _ref => {
|
|
|
8460
8480
|
|
|
8461
8481
|
// Slideshow controls
|
|
8462
8482
|
const slideShowControls = slidesCount > 1 && slideshowControlsProps ? /*#__PURE__*/React__default.createElement(SlideshowControls, _extends({
|
|
8463
|
-
theme: "dark",
|
|
8464
8483
|
activeIndex: activeIndex,
|
|
8465
8484
|
slidesCount: slidesCount,
|
|
8466
8485
|
onNextClick: onNextClick,
|
|
@@ -8497,12 +8516,10 @@ const ImageSlideshow = _ref => {
|
|
|
8497
8516
|
if (typeof activeIndex === 'number') setScale(undefined);
|
|
8498
8517
|
}, [activeIndex]);
|
|
8499
8518
|
const zoomControls = zoomEnabled && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(IconButton, _extends({}, zoomInButtonProps, {
|
|
8500
|
-
theme: "dark",
|
|
8501
8519
|
emphasis: "low",
|
|
8502
8520
|
icon: mdiMagnifyPlusOutline,
|
|
8503
8521
|
onClick: zoomIn
|
|
8504
8522
|
})), /*#__PURE__*/React__default.createElement(IconButton, _extends({}, zoomOutButtonProps, {
|
|
8505
|
-
theme: "dark",
|
|
8506
8523
|
emphasis: "low",
|
|
8507
8524
|
isDisabled: !scale || scale <= 1,
|
|
8508
8525
|
icon: mdiMagnifyMinusOutline,
|
|
@@ -8520,7 +8537,6 @@ const ImageSlideshow = _ref => {
|
|
|
8520
8537
|
}), [images, activeImageRef]);
|
|
8521
8538
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Slides, {
|
|
8522
8539
|
activeIndex: activeIndex,
|
|
8523
|
-
theme: "dark",
|
|
8524
8540
|
slideGroupLabel: slideGroupLabel,
|
|
8525
8541
|
fillHeight: true,
|
|
8526
8542
|
id: slideshowId,
|
|
@@ -8786,6 +8802,8 @@ const Inner = forwardRef((props, ref) => {
|
|
|
8786
8802
|
}), /*#__PURE__*/React__default.createElement(ClickAwayProvider, {
|
|
8787
8803
|
childrenRefs: clickAwayChildrenRefs,
|
|
8788
8804
|
callback: onClickAway
|
|
8805
|
+
}, /*#__PURE__*/React__default.createElement(ThemeProvider, {
|
|
8806
|
+
value: "dark"
|
|
8789
8807
|
}, /*#__PURE__*/React__default.createElement(ImageSlideshow, {
|
|
8790
8808
|
activeImageIndex: activeImageIndex,
|
|
8791
8809
|
slideGroupLabel: slideGroupLabel,
|
|
@@ -8796,7 +8814,7 @@ const Inner = forwardRef((props, ref) => {
|
|
|
8796
8814
|
footerRef: footerRef,
|
|
8797
8815
|
activeImageRef: useMergeRefs(propImageRef, imageRef),
|
|
8798
8816
|
currentPaginationItemRef: currentPaginationItemRef
|
|
8799
|
-
})));
|
|
8817
|
+
}))));
|
|
8800
8818
|
});
|
|
8801
8819
|
Inner.displayName = COMPONENT_NAME$O;
|
|
8802
8820
|
Inner.className = CLASSNAME$O;
|
|
@@ -8850,14 +8868,13 @@ const InlineList = forwardRef((props, ref) => {
|
|
|
8850
8868
|
wrap
|
|
8851
8869
|
} = props,
|
|
8852
8870
|
forwardedProps = _objectWithoutProperties(props, _excluded$R);
|
|
8853
|
-
const fontColorClassName = color && getFontColorClassName(color, colorVariant);
|
|
8854
8871
|
const typographyClassName = typography && getTypographyClassName(typography);
|
|
8855
8872
|
return (
|
|
8856
8873
|
/*#__PURE__*/
|
|
8857
8874
|
// eslint-disable-next-line jsx-a11y/no-redundant-roles
|
|
8858
8875
|
React__default.createElement("ul", _extends({}, forwardedProps, {
|
|
8859
8876
|
ref: ref,
|
|
8860
|
-
className: classNames(className, CLASSNAME$N, wrap && `${CLASSNAME$N}--wrap`,
|
|
8877
|
+
className: classNames(className, CLASSNAME$N, wrap && `${CLASSNAME$N}--wrap`, fontColorClass(color, colorVariant), typographyClassName)
|
|
8861
8878
|
// Lists with removed bullet style can lose their a11y list role on some browsers
|
|
8862
8879
|
,
|
|
8863
8880
|
role: "list"
|
|
@@ -9101,8 +9118,8 @@ const Link = forwardRef((props, ref) => {
|
|
|
9101
9118
|
const {
|
|
9102
9119
|
children,
|
|
9103
9120
|
className,
|
|
9104
|
-
color,
|
|
9105
|
-
colorVariant,
|
|
9121
|
+
color: propColor,
|
|
9122
|
+
colorVariant: propColorVariant,
|
|
9106
9123
|
disabled,
|
|
9107
9124
|
isDisabled = disabled,
|
|
9108
9125
|
href,
|
|
@@ -9113,6 +9130,7 @@ const Link = forwardRef((props, ref) => {
|
|
|
9113
9130
|
typography
|
|
9114
9131
|
} = props,
|
|
9115
9132
|
forwardedProps = _objectWithoutProperties(props, _excluded$O);
|
|
9133
|
+
const [color, colorVariant] = resolveColorWithVariants(propColor, propColorVariant);
|
|
9116
9134
|
const isLink = linkAs || href;
|
|
9117
9135
|
const Component = isLink && !isDisabled ? linkAs || 'a' : 'button';
|
|
9118
9136
|
const baseProps = {};
|