@lumx/react 3.9.2 → 3.9.4-alpha.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/index.d.ts +11 -9
- package/index.js +464 -436
- package/index.js.map +1 -1
- package/package.json +4 -3
- package/src/components/date-picker/DatePickerControlled.test.tsx +3 -2
- package/src/components/date-picker/DatePickerControlled.tsx +3 -2
- package/src/components/image-lightbox/ImageLightbox.tsx +2 -0
- package/src/components/image-lightbox/internal/ImageSlideshow.tsx +2 -0
- package/src/components/image-lightbox/useImageLightbox.tsx +1 -1
- package/src/components/slideshow/Slides.tsx +7 -5
- package/src/components/slideshow/Slideshow.stories.tsx +12 -1
- package/src/components/slideshow/Slideshow.tsx +2 -16
- package/src/components/slideshow/SlideshowControls.stories.tsx +2 -3
- package/src/components/slideshow/SlideshowControls.tsx +63 -73
- package/src/components/slideshow/SlideshowItem.tsx +1 -10
- package/src/components/slideshow/SlideshowItemGroup.tsx +16 -33
- package/src/components/slideshow/useSlideFocusManagement.tsx +51 -36
- package/src/{hooks → components/slideshow}/useSlideshowControls.ts +57 -60
- package/src/components/tooltip/Tooltip.test.tsx +4 -3
- package/src/components/tooltip/Tooltip.tsx +3 -2
- package/src/constants.ts +5 -0
- package/src/utils/DOM/startViewTransition.ts +23 -11
package/index.js
CHANGED
|
@@ -389,7 +389,12 @@ const DOCUMENT = typeof document !== 'undefined' ? document : undefined;
|
|
|
389
389
|
*/
|
|
390
390
|
const IS_BROWSER = typeof navigator !== 'undefined' && !navigator.userAgent.includes('jsdom');
|
|
391
391
|
|
|
392
|
-
|
|
392
|
+
/**
|
|
393
|
+
* Visually hidden a11y utility class name
|
|
394
|
+
*/
|
|
395
|
+
const VISUALLY_HIDDEN = 'visually-hidden';
|
|
396
|
+
|
|
397
|
+
const _excluded$1r = ["prefix"];
|
|
393
398
|
|
|
394
399
|
/**
|
|
395
400
|
* Enhance isEmpty method to also works with numbers.
|
|
@@ -447,7 +452,7 @@ function handleBasicClasses(_ref2) {
|
|
|
447
452
|
let {
|
|
448
453
|
prefix
|
|
449
454
|
} = _ref2,
|
|
450
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
455
|
+
props = _objectWithoutProperties(_ref2, _excluded$1r);
|
|
451
456
|
const otherClasses = {};
|
|
452
457
|
if (!isEmpty(props)) {
|
|
453
458
|
Object.keys(props).forEach(prop => {
|
|
@@ -638,7 +643,7 @@ function useId() {
|
|
|
638
643
|
}, []);
|
|
639
644
|
}
|
|
640
645
|
|
|
641
|
-
const _excluded$
|
|
646
|
+
const _excluded$1q = ["id", "title", "className", "cancelProps", "confirmProps", "kind", "size", "dialogProps", "children"],
|
|
642
647
|
_excluded2$3 = ["label", "onClick"],
|
|
643
648
|
_excluded3 = ["label", "onClick"];
|
|
644
649
|
/**
|
|
@@ -702,7 +707,7 @@ const AlertDialog = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
702
707
|
dialogProps,
|
|
703
708
|
children
|
|
704
709
|
} = props,
|
|
705
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
710
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1q);
|
|
706
711
|
const cancelButtonRef = React__default.useRef(null);
|
|
707
712
|
const confirmationButtonRef = React__default.useRef(null);
|
|
708
713
|
const {
|
|
@@ -826,7 +831,7 @@ const useMergeRefs = function () {
|
|
|
826
831
|
refs);
|
|
827
832
|
};
|
|
828
833
|
|
|
829
|
-
const _excluded$
|
|
834
|
+
const _excluded$1p = ["anchorToInput", "children", "chips", "className", "closeOnClick", "closeOnClickAway", "closeOnEscape", "disabled", "error", "fitToAnchorWidth", "hasError", "helper", "icon", "inputRef", "clearButtonProps", "isDisabled", "isRequired", "isOpen", "isValid", "label", "name", "offset", "onBlur", "onChange", "onClose", "onFocus", "onInfiniteScroll", "placeholder", "placement", "shouldFocusOnClose", "theme", "value", "textFieldProps", "focusAnchorOnClose"];
|
|
830
835
|
|
|
831
836
|
/**
|
|
832
837
|
* Defines the props of the component.
|
|
@@ -897,7 +902,7 @@ const Autocomplete = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
897
902
|
textFieldProps = {},
|
|
898
903
|
focusAnchorOnClose
|
|
899
904
|
} = props,
|
|
900
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
905
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1p);
|
|
901
906
|
const inputAnchorRef = useRef(null);
|
|
902
907
|
const textFieldRef = useRef(null);
|
|
903
908
|
useFocus(inputAnchorRef.current, !isOpen && shouldFocusOnClose);
|
|
@@ -947,7 +952,7 @@ Autocomplete.displayName = COMPONENT_NAME$1l;
|
|
|
947
952
|
Autocomplete.className = CLASSNAME$1i;
|
|
948
953
|
Autocomplete.defaultProps = DEFAULT_PROPS$12;
|
|
949
954
|
|
|
950
|
-
const _excluded$
|
|
955
|
+
const _excluded$1o = ["anchorToInput", "children", "chipsAlignment", "className", "closeOnClickAway", "closeOnEscape", "fitToAnchorWidth", "hasError", "helper", "icon", "inputRef", "clearButtonProps", "isDisabled", "isRequired", "isOpen", "isValid", "label", "name", "offset", "onBlur", "onChange", "onClear", "onClose", "onFocus", "onInfiniteScroll", "onKeyDown", "placeholder", "placement", "selectedChipRender", "shouldFocusOnClose", "theme", "type", "value", "values"];
|
|
951
956
|
|
|
952
957
|
/**
|
|
953
958
|
* Defines the props of the component.
|
|
@@ -1032,7 +1037,7 @@ const AutocompleteMultiple = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1032
1037
|
value,
|
|
1033
1038
|
values
|
|
1034
1039
|
} = props,
|
|
1035
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
1040
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1o);
|
|
1036
1041
|
return /*#__PURE__*/React__default.createElement(Autocomplete, _extends({
|
|
1037
1042
|
ref: ref
|
|
1038
1043
|
}, forwardedProps, {
|
|
@@ -1075,7 +1080,7 @@ AutocompleteMultiple.displayName = COMPONENT_NAME$1k;
|
|
|
1075
1080
|
AutocompleteMultiple.className = CLASSNAME$1h;
|
|
1076
1081
|
AutocompleteMultiple.defaultProps = DEFAULT_PROPS$11;
|
|
1077
1082
|
|
|
1078
|
-
const _excluded$
|
|
1083
|
+
const _excluded$1n = ["actions", "alt", "badge", "className", "image", "linkProps", "linkAs", "onClick", "onKeyPress", "size", "theme", "thumbnailProps"];
|
|
1079
1084
|
|
|
1080
1085
|
/**
|
|
1081
1086
|
* Avatar sizes.
|
|
@@ -1125,7 +1130,7 @@ const Avatar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1125
1130
|
theme,
|
|
1126
1131
|
thumbnailProps
|
|
1127
1132
|
} = props,
|
|
1128
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
1133
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1n);
|
|
1129
1134
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
1130
1135
|
ref: ref
|
|
1131
1136
|
}, forwardedProps, {
|
|
@@ -1156,7 +1161,7 @@ Avatar.displayName = COMPONENT_NAME$1j;
|
|
|
1156
1161
|
Avatar.className = CLASSNAME$1g;
|
|
1157
1162
|
Avatar.defaultProps = DEFAULT_PROPS$10;
|
|
1158
1163
|
|
|
1159
|
-
const _excluded$
|
|
1164
|
+
const _excluded$1m = ["children", "className", "color"];
|
|
1160
1165
|
|
|
1161
1166
|
/**
|
|
1162
1167
|
* Defines the props of the component.
|
|
@@ -1192,7 +1197,7 @@ const Badge = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1192
1197
|
className,
|
|
1193
1198
|
color
|
|
1194
1199
|
} = props,
|
|
1195
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
1200
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1m);
|
|
1196
1201
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
1197
1202
|
ref: ref
|
|
1198
1203
|
}, forwardedProps, {
|
|
@@ -1274,7 +1279,7 @@ const isComponentType = type => node => /*#__PURE__*/React__default.isValidEleme
|
|
|
1274
1279
|
* A point coordinate in 2D space
|
|
1275
1280
|
*/
|
|
1276
1281
|
|
|
1277
|
-
const _excluded$
|
|
1282
|
+
const _excluded$1l = ["linkAs"];
|
|
1278
1283
|
/**
|
|
1279
1284
|
* Render link with default <a> HTML component or a custom one provided by `linkAs`.
|
|
1280
1285
|
*
|
|
@@ -1288,14 +1293,14 @@ const renderLink = function (_ref) {
|
|
|
1288
1293
|
let {
|
|
1289
1294
|
linkAs
|
|
1290
1295
|
} = _ref,
|
|
1291
|
-
forwardedProps = _objectWithoutProperties(_ref, _excluded$
|
|
1296
|
+
forwardedProps = _objectWithoutProperties(_ref, _excluded$1l);
|
|
1292
1297
|
for (var _len = arguments.length, children = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1293
1298
|
children[_key - 1] = arguments[_key];
|
|
1294
1299
|
}
|
|
1295
1300
|
return /*#__PURE__*/React__default.createElement(linkAs || 'a', forwardedProps, ...children);
|
|
1296
1301
|
};
|
|
1297
1302
|
|
|
1298
|
-
const _excluded$
|
|
1303
|
+
const _excluded$1k = ["aria-label", "children", "className", "color", "disabled", "emphasis", "hasBackground", "href", "isDisabled", "isSelected", "isActive", "isFocused", "isHovered", "linkAs", "name", "size", "target", "theme", "variant", "type", "fullWidth"];
|
|
1299
1304
|
|
|
1300
1305
|
/**
|
|
1301
1306
|
* Button size definition.
|
|
@@ -1367,7 +1372,7 @@ const ButtonRoot = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1367
1372
|
type = 'button',
|
|
1368
1373
|
fullWidth
|
|
1369
1374
|
} = props,
|
|
1370
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
1375
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1k);
|
|
1371
1376
|
const adaptedColor = color || emphasis !== Emphasis.high && theme === Theme.dark && ColorPalette.light || emphasis === Emphasis.high && ColorPalette.primary || ColorPalette.dark;
|
|
1372
1377
|
if (hasBackground) {
|
|
1373
1378
|
return renderButtonWrapper(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -1423,7 +1428,7 @@ const ButtonRoot = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1423
1428
|
ButtonRoot.displayName = COMPONENT_NAME$1h;
|
|
1424
1429
|
ButtonRoot.defaultProps = {};
|
|
1425
1430
|
|
|
1426
|
-
const _excluded$
|
|
1431
|
+
const _excluded$1j = ["children", "className", "emphasis", "leftIcon", "rightIcon", "size", "theme"];
|
|
1427
1432
|
|
|
1428
1433
|
/**
|
|
1429
1434
|
* Button emphasis definition.
|
|
@@ -1471,7 +1476,7 @@ const Button = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1471
1476
|
size,
|
|
1472
1477
|
theme
|
|
1473
1478
|
} = props,
|
|
1474
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
1479
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1j);
|
|
1475
1480
|
const buttonClassName = classnames(className, getBasicClass({
|
|
1476
1481
|
prefix: CLASSNAME$1e,
|
|
1477
1482
|
type: 'hasLeftIcon',
|
|
@@ -1500,7 +1505,7 @@ Button.displayName = COMPONENT_NAME$1g;
|
|
|
1500
1505
|
Button.className = CLASSNAME$1e;
|
|
1501
1506
|
Button.defaultProps = DEFAULT_PROPS$_;
|
|
1502
1507
|
|
|
1503
|
-
const _excluded$
|
|
1508
|
+
const _excluded$1i = ["emphasis", "image", "icon", "label", "size", "theme", "tooltipProps", "hideTooltip"];
|
|
1504
1509
|
/**
|
|
1505
1510
|
* Component display name.
|
|
1506
1511
|
*/
|
|
@@ -1538,7 +1543,7 @@ const IconButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1538
1543
|
tooltipProps,
|
|
1539
1544
|
hideTooltip
|
|
1540
1545
|
} = props,
|
|
1541
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
1546
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1i);
|
|
1542
1547
|
return /*#__PURE__*/React__default.createElement(Tooltip, _extends({
|
|
1543
1548
|
label: hideTooltip ? '' : label
|
|
1544
1549
|
}, tooltipProps), /*#__PURE__*/React__default.createElement(ButtonRoot, _extends({
|
|
@@ -1562,7 +1567,7 @@ IconButton.displayName = COMPONENT_NAME$1f;
|
|
|
1562
1567
|
IconButton.className = CLASSNAME$1d;
|
|
1563
1568
|
IconButton.defaultProps = DEFAULT_PROPS$Z;
|
|
1564
1569
|
|
|
1565
|
-
const _excluded$
|
|
1570
|
+
const _excluded$1h = ["children", "className"];
|
|
1566
1571
|
|
|
1567
1572
|
/**
|
|
1568
1573
|
* Defines the props of the component
|
|
@@ -1595,7 +1600,7 @@ const ButtonGroup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1595
1600
|
children,
|
|
1596
1601
|
className
|
|
1597
1602
|
} = props,
|
|
1598
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
1603
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1h);
|
|
1599
1604
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
1600
1605
|
ref: ref
|
|
1601
1606
|
}, forwardedProps, {
|
|
@@ -1606,7 +1611,7 @@ ButtonGroup.displayName = COMPONENT_NAME$1e;
|
|
|
1606
1611
|
ButtonGroup.className = CLASSNAME$1c;
|
|
1607
1612
|
ButtonGroup.defaultProps = DEFAULT_PROPS$Y;
|
|
1608
1613
|
|
|
1609
|
-
const _excluded$
|
|
1614
|
+
const _excluded$1g = ["checked", "className", "disabled", "helper", "id", "inputRef", "isChecked", "isDisabled", "label", "name", "onChange", "theme", "value", "inputProps"];
|
|
1610
1615
|
|
|
1611
1616
|
/**
|
|
1612
1617
|
* Intermediate state of checkbox.
|
|
@@ -1658,7 +1663,7 @@ const Checkbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1658
1663
|
value,
|
|
1659
1664
|
inputProps = {}
|
|
1660
1665
|
} = props,
|
|
1661
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
1666
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1g);
|
|
1662
1667
|
const localInputRef = React__default.useRef(null);
|
|
1663
1668
|
const generatedInputId = useId();
|
|
1664
1669
|
const inputId = id || generatedInputId;
|
|
@@ -1738,7 +1743,7 @@ function useStopPropagation(handler) {
|
|
|
1738
1743
|
}, [handler]);
|
|
1739
1744
|
}
|
|
1740
1745
|
|
|
1741
|
-
const _excluded$
|
|
1746
|
+
const _excluded$1f = ["after", "before", "children", "className", "color", "disabled", "isClickable", "isDisabled", "isHighlighted", "isSelected", "onAfterClick", "onBeforeClick", "onClick", "size", "theme", "href", "onKeyDown"];
|
|
1742
1747
|
|
|
1743
1748
|
/**
|
|
1744
1749
|
* Chip sizes.
|
|
@@ -1793,7 +1798,7 @@ const Chip = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1793
1798
|
href,
|
|
1794
1799
|
onKeyDown
|
|
1795
1800
|
} = props,
|
|
1796
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
1801
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1f);
|
|
1797
1802
|
const hasAfterClick = isFunction(onAfterClick);
|
|
1798
1803
|
const hasBeforeClick = isFunction(onBeforeClick);
|
|
1799
1804
|
const hasOnClick = isFunction(onClick);
|
|
@@ -1908,7 +1913,7 @@ const useChipGroupNavigation = function (chips, onChipDeleted) {
|
|
|
1908
1913
|
};
|
|
1909
1914
|
};
|
|
1910
1915
|
|
|
1911
|
-
const _excluded$
|
|
1916
|
+
const _excluded$1e = ["align", "children", "className"];
|
|
1912
1917
|
|
|
1913
1918
|
/**
|
|
1914
1919
|
* Defines the props of the component.
|
|
@@ -1942,7 +1947,7 @@ const InternalChipGroup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1942
1947
|
children,
|
|
1943
1948
|
className
|
|
1944
1949
|
} = props,
|
|
1945
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
1950
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1e);
|
|
1946
1951
|
const chipGroupClassName = handleBasicClasses({
|
|
1947
1952
|
prefix: CLASSNAME$19
|
|
1948
1953
|
});
|
|
@@ -1959,7 +1964,7 @@ const ChipGroup = Object.assign(InternalChipGroup, {
|
|
|
1959
1964
|
useChipGroupNavigation
|
|
1960
1965
|
});
|
|
1961
1966
|
|
|
1962
|
-
const _excluded$
|
|
1967
|
+
const _excluded$1d = ["actions", "avatarProps", "children", "className", "date", "fullDate", "hasActions", "headerActions", "isOpen", "isRelevant", "name", "onClick", "onMouseEnter", "onMouseLeave", "text", "theme", "variant"];
|
|
1963
1968
|
/**
|
|
1964
1969
|
* Comment block variants.
|
|
1965
1970
|
*/
|
|
@@ -2017,7 +2022,7 @@ const CommentBlock = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2017
2022
|
theme,
|
|
2018
2023
|
variant
|
|
2019
2024
|
} = props,
|
|
2020
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
2025
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1d);
|
|
2021
2026
|
const hasChildren = Children.count(children) > 0;
|
|
2022
2027
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
2023
2028
|
ref: ref,
|
|
@@ -2422,7 +2427,7 @@ const DatePickerControlled = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2422
2427
|
})),
|
|
2423
2428
|
label: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
|
|
2424
2429
|
"aria-live": labelAriaLive,
|
|
2425
|
-
className: onMonthChange ?
|
|
2430
|
+
className: onMonthChange ? VISUALLY_HIDDEN : '',
|
|
2426
2431
|
dir: "auto"
|
|
2427
2432
|
}, monthYear), onMonthChange && /*#__PURE__*/React__default.createElement(FlexBox, {
|
|
2428
2433
|
className: `${CLASSNAME$17}__month`,
|
|
@@ -2491,7 +2496,7 @@ const DatePickerControlled = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2491
2496
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
2492
2497
|
"aria-hidden": true
|
|
2493
2498
|
}, formatDayNumber(locale, date)), /*#__PURE__*/React__default.createElement("span", {
|
|
2494
|
-
className:
|
|
2499
|
+
className: VISUALLY_HIDDEN
|
|
2495
2500
|
}, date.toLocaleDateString(locale, {
|
|
2496
2501
|
day: 'numeric',
|
|
2497
2502
|
month: 'long',
|
|
@@ -2503,7 +2508,7 @@ const DatePickerControlled = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2503
2508
|
DatePickerControlled.displayName = COMPONENT_NAME$18;
|
|
2504
2509
|
DatePickerControlled.className = CLASSNAME$17;
|
|
2505
2510
|
|
|
2506
|
-
const _excluded$
|
|
2511
|
+
const _excluded$1c = ["defaultMonth", "locale", "value", "onChange"];
|
|
2507
2512
|
/**
|
|
2508
2513
|
* DatePicker component.
|
|
2509
2514
|
*
|
|
@@ -2518,7 +2523,7 @@ const DatePicker = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2518
2523
|
value,
|
|
2519
2524
|
onChange
|
|
2520
2525
|
} = props,
|
|
2521
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
2526
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1c);
|
|
2522
2527
|
let referenceDate = value || defaultMonth || new Date();
|
|
2523
2528
|
if (!isDateValid(referenceDate)) {
|
|
2524
2529
|
// eslint-disable-next-line no-console
|
|
@@ -2555,7 +2560,7 @@ const useBooleanState = defaultValue => {
|
|
|
2555
2560
|
return [booleanValue, setToFalse, setToTrue, toggleBoolean];
|
|
2556
2561
|
};
|
|
2557
2562
|
|
|
2558
|
-
const _excluded$
|
|
2563
|
+
const _excluded$1b = ["defaultMonth", "disabled", "isDisabled", "locale", "maxDate", "minDate", "name", "nextButtonProps", "onChange", "previousButtonProps", "value"];
|
|
2559
2564
|
|
|
2560
2565
|
/**
|
|
2561
2566
|
* Defines the props of the component.
|
|
@@ -2587,7 +2592,7 @@ const DatePickerField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2587
2592
|
previousButtonProps,
|
|
2588
2593
|
value
|
|
2589
2594
|
} = props,
|
|
2590
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
2595
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1b);
|
|
2591
2596
|
const anchorRef = useRef(null);
|
|
2592
2597
|
const [isOpen, close,, toggleOpen] = useBooleanState(false);
|
|
2593
2598
|
const handleKeyboardNav = useCallback(evt => {
|
|
@@ -3135,7 +3140,7 @@ const useTransitionVisibility = (ref, isComponentVisible, timeout, onVisibilityC
|
|
|
3135
3140
|
return isVisible || isComponentVisible;
|
|
3136
3141
|
};
|
|
3137
3142
|
|
|
3138
|
-
const _excluded$
|
|
3143
|
+
const _excluded$1a = ["children", "className", "header", "focusElement", "forceFooterDivider", "forceHeaderDivider", "footer", "isLoading", "isOpen", "onClose", "parentElement", "contentRef", "preventAutoClose", "size", "zIndex", "dialogProps", "onVisibilityChange", "disableBodyScroll", "preventCloseOnClick", "preventCloseOnEscape"];
|
|
3139
3144
|
|
|
3140
3145
|
/**
|
|
3141
3146
|
* Defines the props of the component.
|
|
@@ -3197,7 +3202,7 @@ const Dialog = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
3197
3202
|
preventCloseOnClick,
|
|
3198
3203
|
preventCloseOnEscape
|
|
3199
3204
|
} = props,
|
|
3200
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
3205
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1a);
|
|
3201
3206
|
|
|
3202
3207
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
3203
3208
|
const previousOpen = React__default.useRef(isOpen);
|
|
@@ -3309,7 +3314,7 @@ Dialog.displayName = COMPONENT_NAME$16;
|
|
|
3309
3314
|
Dialog.className = CLASSNAME$16;
|
|
3310
3315
|
Dialog.defaultProps = DEFAULT_PROPS$T;
|
|
3311
3316
|
|
|
3312
|
-
const _excluded$
|
|
3317
|
+
const _excluded$19 = ["className", "theme"];
|
|
3313
3318
|
|
|
3314
3319
|
/**
|
|
3315
3320
|
* Defines the props of the component.
|
|
@@ -3344,7 +3349,7 @@ const Divider = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
3344
3349
|
className,
|
|
3345
3350
|
theme
|
|
3346
3351
|
} = props,
|
|
3347
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
3352
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$19);
|
|
3348
3353
|
return /*#__PURE__*/React__default.createElement("hr", _extends({
|
|
3349
3354
|
ref: ref
|
|
3350
3355
|
}, forwardedProps, {
|
|
@@ -3358,7 +3363,7 @@ Divider.displayName = COMPONENT_NAME$15;
|
|
|
3358
3363
|
Divider.className = CLASSNAME$15;
|
|
3359
3364
|
Divider.defaultProps = DEFAULT_PROPS$S;
|
|
3360
3365
|
|
|
3361
|
-
const _excluded$
|
|
3366
|
+
const _excluded$18 = ["className", "theme"];
|
|
3362
3367
|
|
|
3363
3368
|
/**
|
|
3364
3369
|
* Defines the props of the component.
|
|
@@ -3386,7 +3391,7 @@ const DragHandle = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
3386
3391
|
className,
|
|
3387
3392
|
theme
|
|
3388
3393
|
} = props,
|
|
3389
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
3394
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$18);
|
|
3390
3395
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
3391
3396
|
ref: ref
|
|
3392
3397
|
}, forwardedProps, {
|
|
@@ -3570,7 +3575,7 @@ const useKeyboardListNavigation = function (items, ref, onListItemSelected, onLi
|
|
|
3570
3575
|
};
|
|
3571
3576
|
};
|
|
3572
3577
|
|
|
3573
|
-
const _excluded$
|
|
3578
|
+
const _excluded$17 = ["after", "before", "children", "className", "isHighlighted", "isSelected", "isDisabled", "linkAs", "linkProps", "linkRef", "onItemSelected", "size"];
|
|
3574
3579
|
|
|
3575
3580
|
/**
|
|
3576
3581
|
* Defines the props of the component.
|
|
@@ -3627,7 +3632,7 @@ const ListItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
3627
3632
|
onItemSelected,
|
|
3628
3633
|
size
|
|
3629
3634
|
} = props,
|
|
3630
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
3635
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$17);
|
|
3631
3636
|
const role = linkAs || linkProps.href ? 'link' : 'button';
|
|
3632
3637
|
const onKeyDown = useMemo(() => {
|
|
3633
3638
|
if (onItemSelected && role === 'link') return onEnterPressed(onItemSelected);
|
|
@@ -4130,7 +4135,7 @@ const useInteractiveList = options => {
|
|
|
4130
4135
|
}, [items, activeItemIndex, onListItemSelected]);
|
|
4131
4136
|
};
|
|
4132
4137
|
|
|
4133
|
-
const _excluded$
|
|
4138
|
+
const _excluded$16 = ["children", "className", "isClickable", "itemPadding", "onListItemSelected", "tabIndex"];
|
|
4134
4139
|
|
|
4135
4140
|
/**
|
|
4136
4141
|
* Defines the props of the component.
|
|
@@ -4170,7 +4175,7 @@ const InternalList = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
4170
4175
|
onListItemSelected,
|
|
4171
4176
|
tabIndex
|
|
4172
4177
|
} = props,
|
|
4173
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
4178
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$16);
|
|
4174
4179
|
const listElementRef = useRef(null);
|
|
4175
4180
|
const {
|
|
4176
4181
|
items,
|
|
@@ -6595,7 +6600,7 @@ function usePopoverStyle(_ref5) {
|
|
|
6595
6600
|
};
|
|
6596
6601
|
}
|
|
6597
6602
|
|
|
6598
|
-
const _excluded$
|
|
6603
|
+
const _excluded$15 = ["anchorRef", "as", "children", "className", "closeOnClickAway", "closeOnEscape", "elevation", "focusElement", "hasArrow", "isOpen", "onClose", "parentElement", "usePortal", "focusAnchorOnClose", "withFocusTrap", "boundaryRef", "fitToAnchorWidth", "fitWithinViewportHeight", "focusTrapZoneElement", "offset", "placement", "style", "theme", "zIndex"];
|
|
6599
6604
|
|
|
6600
6605
|
/**
|
|
6601
6606
|
* Defines the props of the component.
|
|
@@ -6655,7 +6660,7 @@ const _InnerPopover = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
6655
6660
|
theme,
|
|
6656
6661
|
zIndex
|
|
6657
6662
|
} = props,
|
|
6658
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
6663
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$15);
|
|
6659
6664
|
const popoverRef = useRef(null);
|
|
6660
6665
|
const {
|
|
6661
6666
|
styles,
|
|
@@ -6772,7 +6777,7 @@ const useInfiniteScroll = function (ref, callback) {
|
|
|
6772
6777
|
}, [callback, callbackOnMount]);
|
|
6773
6778
|
};
|
|
6774
6779
|
|
|
6775
|
-
const _excluded$
|
|
6780
|
+
const _excluded$14 = ["anchorRef", "children", "className", "closeOnClick", "closeOnClickAway", "closeOnEscape", "fitToAnchorWidth", "fitWithinViewportHeight", "isOpen", "offset", "focusAnchorOnClose", "onClose", "onInfiniteScroll", "placement", "shouldFocusOnOpen", "zIndex"];
|
|
6776
6781
|
|
|
6777
6782
|
/**
|
|
6778
6783
|
* Defines the props of the component.
|
|
@@ -6828,7 +6833,7 @@ const Dropdown = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
6828
6833
|
shouldFocusOnOpen,
|
|
6829
6834
|
zIndex
|
|
6830
6835
|
} = props,
|
|
6831
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
6836
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$14);
|
|
6832
6837
|
const innerRef = useRef(null);
|
|
6833
6838
|
const listElement = useRef(null);
|
|
6834
6839
|
useInfiniteScroll(innerRef, onInfiniteScroll);
|
|
@@ -6873,7 +6878,7 @@ Dropdown.displayName = COMPONENT_NAME$10;
|
|
|
6873
6878
|
Dropdown.className = CLASSNAME$10;
|
|
6874
6879
|
Dropdown.defaultProps = DEFAULT_PROPS$O;
|
|
6875
6880
|
|
|
6876
|
-
const _excluded$
|
|
6881
|
+
const _excluded$13 = ["className", "children", "hasBackground", "hasHeaderDivider", "isOpen", "label", "onClose", "onOpen", "onToggleOpen", "theme", "toggleButtonProps"];
|
|
6877
6882
|
|
|
6878
6883
|
/**
|
|
6879
6884
|
* Defines the props of the component.
|
|
@@ -6920,7 +6925,7 @@ const ExpansionPanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
6920
6925
|
theme,
|
|
6921
6926
|
toggleButtonProps
|
|
6922
6927
|
} = props,
|
|
6923
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
6928
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$13);
|
|
6924
6929
|
const children = Children.toArray(anyChildren);
|
|
6925
6930
|
|
|
6926
6931
|
// Partition children by types.
|
|
@@ -6999,7 +7004,7 @@ ExpansionPanel.displayName = COMPONENT_NAME$$;
|
|
|
6999
7004
|
ExpansionPanel.className = CLASSNAME$$;
|
|
7000
7005
|
ExpansionPanel.defaultProps = DEFAULT_PROPS$N;
|
|
7001
7006
|
|
|
7002
|
-
const _excluded$
|
|
7007
|
+
const _excluded$12 = ["label", "icon", "color", "className", "theme", "truncate"];
|
|
7003
7008
|
const COMPONENT_NAME$_ = 'Flag';
|
|
7004
7009
|
const CLASSNAME$_ = getRootClassName(COMPONENT_NAME$_);
|
|
7005
7010
|
const DEFAULT_PROPS$M = {
|
|
@@ -7022,7 +7027,7 @@ const Flag = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7022
7027
|
theme,
|
|
7023
7028
|
truncate
|
|
7024
7029
|
} = props,
|
|
7025
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
7030
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$12);
|
|
7026
7031
|
const flagColor = color || (theme === Theme.light ? ColorPalette.dark : ColorPalette.light);
|
|
7027
7032
|
const isTruncated = !!truncate;
|
|
7028
7033
|
return /*#__PURE__*/React__default.createElement("div", _extends({}, forwardedProps, {
|
|
@@ -7047,7 +7052,7 @@ Flag.displayName = COMPONENT_NAME$_;
|
|
|
7047
7052
|
Flag.className = CLASSNAME$_;
|
|
7048
7053
|
Flag.defaultProps = DEFAULT_PROPS$M;
|
|
7049
7054
|
|
|
7050
|
-
const _excluded$
|
|
7055
|
+
const _excluded$11 = ["as", "children", "className", "fillSpace", "gap", "hAlign", "marginAuto", "noShrink", "orientation", "vAlign", "wrap"];
|
|
7051
7056
|
|
|
7052
7057
|
/**
|
|
7053
7058
|
* Defines the props of the component.
|
|
@@ -7084,7 +7089,7 @@ const FlexBox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7084
7089
|
vAlign,
|
|
7085
7090
|
wrap
|
|
7086
7091
|
} = props,
|
|
7087
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
7092
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$11);
|
|
7088
7093
|
return /*#__PURE__*/React__default.createElement(Component, _extends({
|
|
7089
7094
|
ref: ref
|
|
7090
7095
|
}, forwardedProps, {
|
|
@@ -7100,7 +7105,7 @@ const FlexBox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7100
7105
|
FlexBox.displayName = COMPONENT_NAME$Z;
|
|
7101
7106
|
FlexBox.className = CLASSNAME$Z;
|
|
7102
7107
|
|
|
7103
|
-
const _excluded$
|
|
7108
|
+
const _excluded$10 = ["className", "figure", "figureProps", "children", "actions", "actionsProps", "gap", "orientation", "contentProps"];
|
|
7104
7109
|
/**
|
|
7105
7110
|
* Component display name.
|
|
7106
7111
|
*/
|
|
@@ -7149,7 +7154,7 @@ const BaseGenericBlock = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7149
7154
|
orientation,
|
|
7150
7155
|
contentProps
|
|
7151
7156
|
} = props,
|
|
7152
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
7157
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$10);
|
|
7153
7158
|
const sections = React__default.useMemo(() => {
|
|
7154
7159
|
// Split children by section type
|
|
7155
7160
|
const [[figureChild], [contentChild], [actionsChild], ...otherChildren] = partitionMulti(Children.toArray(children), [isFigure, isContent, isActions]);
|
|
@@ -7248,7 +7253,7 @@ const useOverflowTooltipLabel = () => {
|
|
|
7248
7253
|
};
|
|
7249
7254
|
};
|
|
7250
7255
|
|
|
7251
|
-
const _excluded
|
|
7256
|
+
const _excluded$$ = ["as", "children", "className", "color", "colorVariant", "noWrap", "typography", "truncate", "whiteSpace", "style"];
|
|
7252
7257
|
|
|
7253
7258
|
/**
|
|
7254
7259
|
* Defines the props of the component.
|
|
@@ -7289,7 +7294,7 @@ const Text = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7289
7294
|
whiteSpace,
|
|
7290
7295
|
style
|
|
7291
7296
|
} = props,
|
|
7292
|
-
forwardedProps = _objectWithoutProperties(props, _excluded
|
|
7297
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$$);
|
|
7293
7298
|
const colorClass = color && getFontColorClassName(color, colorVariant);
|
|
7294
7299
|
const typographyClass = typography && getTypographyClassName(typography);
|
|
7295
7300
|
|
|
@@ -7367,7 +7372,7 @@ const useHeadingLevel = () => {
|
|
|
7367
7372
|
};
|
|
7368
7373
|
};
|
|
7369
7374
|
|
|
7370
|
-
const _excluded
|
|
7375
|
+
const _excluded$_ = ["children", "as", "className"];
|
|
7371
7376
|
|
|
7372
7377
|
/**
|
|
7373
7378
|
* Defines the props of the component.
|
|
@@ -7399,7 +7404,7 @@ const Heading = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7399
7404
|
as,
|
|
7400
7405
|
className
|
|
7401
7406
|
} = props,
|
|
7402
|
-
forwardedProps = _objectWithoutProperties(props, _excluded
|
|
7407
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$_);
|
|
7403
7408
|
const {
|
|
7404
7409
|
headingElement
|
|
7405
7410
|
} = useHeadingLevel();
|
|
@@ -7440,7 +7445,7 @@ const HeadingLevelProvider = _ref => {
|
|
|
7440
7445
|
}, children);
|
|
7441
7446
|
};
|
|
7442
7447
|
|
|
7443
|
-
const _excluded$
|
|
7448
|
+
const _excluded$Z = ["children", "className", "gutter", "hAlign", "orientation", "vAlign", "wrap"];
|
|
7444
7449
|
|
|
7445
7450
|
/**
|
|
7446
7451
|
* Defines the props of the component.
|
|
@@ -7481,7 +7486,7 @@ const Grid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7481
7486
|
vAlign,
|
|
7482
7487
|
wrap
|
|
7483
7488
|
} = props,
|
|
7484
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
7489
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$Z);
|
|
7485
7490
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
7486
7491
|
ref: ref
|
|
7487
7492
|
}, forwardedProps, {
|
|
@@ -7501,7 +7506,7 @@ Grid.displayName = COMPONENT_NAME$V;
|
|
|
7501
7506
|
Grid.className = CLASSNAME$V;
|
|
7502
7507
|
Grid.defaultProps = DEFAULT_PROPS$I;
|
|
7503
7508
|
|
|
7504
|
-
const _excluded$
|
|
7509
|
+
const _excluded$Y = ["children", "className", "width", "align", "order"];
|
|
7505
7510
|
|
|
7506
7511
|
/**
|
|
7507
7512
|
* Defines the props of the component.
|
|
@@ -7532,7 +7537,7 @@ const GridItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7532
7537
|
align,
|
|
7533
7538
|
order
|
|
7534
7539
|
} = props,
|
|
7535
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
7540
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$Y);
|
|
7536
7541
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
7537
7542
|
ref: ref
|
|
7538
7543
|
}, forwardedProps, {
|
|
@@ -7547,7 +7552,7 @@ const GridItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7547
7552
|
GridItem.displayName = COMPONENT_NAME$U;
|
|
7548
7553
|
GridItem.className = CLASSNAME$U;
|
|
7549
7554
|
|
|
7550
|
-
const _excluded$
|
|
7555
|
+
const _excluded$X = ["as", "gap", "maxColumns", "itemMinWidth", "children", "className", "style"];
|
|
7551
7556
|
|
|
7552
7557
|
/**
|
|
7553
7558
|
* Defines the props of the component.
|
|
@@ -7587,7 +7592,7 @@ const GridColumn = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7587
7592
|
className,
|
|
7588
7593
|
style = {}
|
|
7589
7594
|
} = props,
|
|
7590
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
7595
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$X);
|
|
7591
7596
|
return /*#__PURE__*/React__default.createElement(Component, _extends({}, forwardedProps, {
|
|
7592
7597
|
ref: ref,
|
|
7593
7598
|
className: classnames(className, handleBasicClasses({
|
|
@@ -7604,7 +7609,7 @@ GridColumn.displayName = COMPONENT_NAME$T;
|
|
|
7604
7609
|
GridColumn.className = CLASSNAME$T;
|
|
7605
7610
|
GridColumn.defaultProps = DEFAULT_PROPS$H;
|
|
7606
7611
|
|
|
7607
|
-
const _excluded$
|
|
7612
|
+
const _excluded$W = ["className", "color", "colorVariant", "hasShape", "icon", "size", "theme", "alt"];
|
|
7608
7613
|
|
|
7609
7614
|
/**
|
|
7610
7615
|
* Defines the props of the component.
|
|
@@ -7643,7 +7648,7 @@ const Icon = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7643
7648
|
theme,
|
|
7644
7649
|
alt
|
|
7645
7650
|
} = props,
|
|
7646
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
7651
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$W);
|
|
7647
7652
|
|
|
7648
7653
|
// Color
|
|
7649
7654
|
let iconColor = color;
|
|
@@ -7756,7 +7761,7 @@ const ImageCaption = props => {
|
|
|
7756
7761
|
}, tags));
|
|
7757
7762
|
};
|
|
7758
7763
|
|
|
7759
|
-
const _excluded$
|
|
7764
|
+
const _excluded$V = ["actions", "align", "alt", "captionPosition", "captionStyle", "className", "description", "descriptionProps", "fillHeight", "image", "size", "tags", "theme", "thumbnailProps", "title", "titleProps"];
|
|
7760
7765
|
|
|
7761
7766
|
/**
|
|
7762
7767
|
* Image block variants.
|
|
@@ -7819,7 +7824,7 @@ const ImageBlock = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7819
7824
|
title,
|
|
7820
7825
|
titleProps
|
|
7821
7826
|
} = props,
|
|
7822
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
7827
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$V);
|
|
7823
7828
|
return /*#__PURE__*/React__default.createElement("figure", _extends({
|
|
7824
7829
|
ref: ref
|
|
7825
7830
|
}, forwardedProps, {
|
|
@@ -8208,7 +8213,7 @@ const ImageSlide = /*#__PURE__*/React__default.memo(props => {
|
|
|
8208
8213
|
}));
|
|
8209
8214
|
}, isEqual);
|
|
8210
8215
|
|
|
8211
|
-
const _excluded$
|
|
8216
|
+
const _excluded$U = ["image", "imgRef"];
|
|
8212
8217
|
/** Internal image slideshow component for ImageLightbox */
|
|
8213
8218
|
const ImageSlideshow = _ref => {
|
|
8214
8219
|
var _images$activeIndex, _images$activeIndex2, _images$activeIndex3;
|
|
@@ -8227,6 +8232,7 @@ const ImageSlideshow = _ref => {
|
|
|
8227
8232
|
activeIndex,
|
|
8228
8233
|
slideshowId,
|
|
8229
8234
|
setSlideshow,
|
|
8235
|
+
slideshow,
|
|
8230
8236
|
slideshowSlidesId,
|
|
8231
8237
|
slidesCount,
|
|
8232
8238
|
onNextClick,
|
|
@@ -8258,7 +8264,8 @@ const ImageSlideshow = _ref => {
|
|
|
8258
8264
|
slidesCount: slidesCount,
|
|
8259
8265
|
onNextClick: onNextClick,
|
|
8260
8266
|
onPreviousClick: onPreviousClick,
|
|
8261
|
-
onPaginationClick: onPaginationClick
|
|
8267
|
+
onPaginationClick: onPaginationClick,
|
|
8268
|
+
parentRef: slideshow
|
|
8262
8269
|
}, slideshowControlsProps, {
|
|
8263
8270
|
paginationItemProps: index => {
|
|
8264
8271
|
var _slideshowControlsPro;
|
|
@@ -8325,7 +8332,7 @@ const ImageSlideshow = _ref => {
|
|
|
8325
8332
|
image,
|
|
8326
8333
|
imgRef
|
|
8327
8334
|
} = _ref2,
|
|
8328
|
-
imageProps = _objectWithoutProperties(_ref2, _excluded$
|
|
8335
|
+
imageProps = _objectWithoutProperties(_ref2, _excluded$U);
|
|
8329
8336
|
const isActive = index === activeIndex;
|
|
8330
8337
|
return /*#__PURE__*/React__default.createElement(ImageSlide, {
|
|
8331
8338
|
isActive: isActive,
|
|
@@ -8356,9 +8363,21 @@ function unref(maybeElement) {
|
|
|
8356
8363
|
return maybeElement === null || maybeElement === void 0 ? void 0 : maybeElement.current;
|
|
8357
8364
|
}
|
|
8358
8365
|
|
|
8359
|
-
function
|
|
8360
|
-
|
|
8361
|
-
|
|
8366
|
+
function setupViewTransitionName(elementRef, name) {
|
|
8367
|
+
let originalName = null;
|
|
8368
|
+
return {
|
|
8369
|
+
set() {
|
|
8370
|
+
const element = unref(elementRef);
|
|
8371
|
+
if (!element) return;
|
|
8372
|
+
originalName = element.style.viewTransitionName;
|
|
8373
|
+
element.style.viewTransitionName = name;
|
|
8374
|
+
},
|
|
8375
|
+
unset() {
|
|
8376
|
+
const element = unref(elementRef);
|
|
8377
|
+
if (!element || originalName === null) return;
|
|
8378
|
+
element.style.viewTransitionName = originalName;
|
|
8379
|
+
}
|
|
8380
|
+
};
|
|
8362
8381
|
}
|
|
8363
8382
|
|
|
8364
8383
|
/**
|
|
@@ -8385,21 +8404,18 @@ async function startViewTransition(_ref) {
|
|
|
8385
8404
|
return;
|
|
8386
8405
|
}
|
|
8387
8406
|
|
|
8388
|
-
//
|
|
8389
|
-
|
|
8407
|
+
// Setup set/unset transition name on source & target
|
|
8408
|
+
const sourceTransitionName = setupViewTransitionName(viewTransitionName.source, viewTransitionName.name);
|
|
8409
|
+
const targetTransitionName = setupViewTransitionName(viewTransitionName.target, viewTransitionName.name);
|
|
8410
|
+
sourceTransitionName.set();
|
|
8390
8411
|
|
|
8391
8412
|
// Start view transition, apply changes & flush to DOM
|
|
8392
8413
|
await start(() => {
|
|
8393
|
-
|
|
8394
|
-
setTransitionViewName(viewTransitionName.source, null);
|
|
8414
|
+
sourceTransitionName.unset();
|
|
8395
8415
|
flushSync(changes);
|
|
8396
|
-
|
|
8397
|
-
// Set transition name on target element
|
|
8398
|
-
setTransitionViewName(viewTransitionName.target, viewTransitionName.name);
|
|
8416
|
+
targetTransitionName.set();
|
|
8399
8417
|
}).updateCallbackDone;
|
|
8400
|
-
|
|
8401
|
-
// Un-set transition name on target element
|
|
8402
|
-
setTransitionViewName(viewTransitionName.target, null);
|
|
8418
|
+
targetTransitionName.unset();
|
|
8403
8419
|
}
|
|
8404
8420
|
|
|
8405
8421
|
/** Find image in element including the element */
|
|
@@ -8491,9 +8507,9 @@ function useImageLightbox(props) {
|
|
|
8491
8507
|
},
|
|
8492
8508
|
isOpen: true,
|
|
8493
8509
|
onClose: () => {
|
|
8494
|
-
var
|
|
8510
|
+
var _propsRef$current2, _propsRef$current2$on;
|
|
8495
8511
|
close();
|
|
8496
|
-
|
|
8512
|
+
(_propsRef$current2 = propsRef.current) === null || _propsRef$current2 === void 0 ? void 0 : (_propsRef$current2$on = _propsRef$current2.onClose) === null || _propsRef$current2$on === void 0 ? void 0 : _propsRef$current2$on.call(_propsRef$current2);
|
|
8497
8513
|
},
|
|
8498
8514
|
images,
|
|
8499
8515
|
activeImageIndex: activeImageIndex || 0
|
|
@@ -8527,7 +8543,7 @@ function useImageLightbox(props) {
|
|
|
8527
8543
|
};
|
|
8528
8544
|
}
|
|
8529
8545
|
|
|
8530
|
-
const _excluded$
|
|
8546
|
+
const _excluded$T = ["className", "isOpen", "closeButtonProps", "onClose", "parentElement", "activeImageIndex", "slideshowControlsProps", "slideGroupLabel", "images", "zoomOutButtonProps", "zoomInButtonProps", "activeImageRef"];
|
|
8531
8547
|
const Inner = /*#__PURE__*/forwardRef((props, ref) => {
|
|
8532
8548
|
const {
|
|
8533
8549
|
className,
|
|
@@ -8543,7 +8559,7 @@ const Inner = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8543
8559
|
zoomInButtonProps,
|
|
8544
8560
|
activeImageRef: propImageRef
|
|
8545
8561
|
} = props,
|
|
8546
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
8562
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$T);
|
|
8547
8563
|
const currentPaginationItemRef = React__default.useRef(null);
|
|
8548
8564
|
const footerRef = React__default.useRef(null);
|
|
8549
8565
|
const imageRef = React__default.useRef(null);
|
|
@@ -8564,7 +8580,10 @@ const Inner = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8564
8580
|
onClose: onClose,
|
|
8565
8581
|
closeButtonProps: closeButtonProps,
|
|
8566
8582
|
focusElement: currentPaginationItemRef
|
|
8567
|
-
}, forwardedProps
|
|
8583
|
+
}, forwardedProps, {
|
|
8584
|
+
// Disable the close on click away as we want a custom one here
|
|
8585
|
+
preventAutoClose: true
|
|
8586
|
+
}), /*#__PURE__*/React__default.createElement(ClickAwayProvider, {
|
|
8568
8587
|
childrenRefs: clickAwayChildrenRefs,
|
|
8569
8588
|
callback: onClickAway
|
|
8570
8589
|
}, /*#__PURE__*/React__default.createElement(ImageSlideshow, {
|
|
@@ -8593,7 +8612,7 @@ const ImageLightbox = Object.assign(Inner, {
|
|
|
8593
8612
|
useImageLightbox
|
|
8594
8613
|
});
|
|
8595
8614
|
|
|
8596
|
-
const _excluded$
|
|
8615
|
+
const _excluded$S = ["className", "color", "colorVariant", "typography", "children", "wrap"];
|
|
8597
8616
|
|
|
8598
8617
|
/**
|
|
8599
8618
|
* Defines the props of the component.
|
|
@@ -8630,7 +8649,7 @@ const InlineList = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8630
8649
|
children,
|
|
8631
8650
|
wrap
|
|
8632
8651
|
} = props,
|
|
8633
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
8652
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$S);
|
|
8634
8653
|
const fontColorClassName = color && getFontColorClassName(color, colorVariant);
|
|
8635
8654
|
const typographyClassName = typography && getTypographyClassName(typography);
|
|
8636
8655
|
return (
|
|
@@ -8676,7 +8695,7 @@ const INPUT_HELPER_CONFIGURATION = {
|
|
|
8676
8695
|
}
|
|
8677
8696
|
};
|
|
8678
8697
|
|
|
8679
|
-
const _excluded$
|
|
8698
|
+
const _excluded$R = ["children", "className", "kind", "theme"];
|
|
8680
8699
|
|
|
8681
8700
|
/**
|
|
8682
8701
|
* Defines the props of the component.
|
|
@@ -8714,7 +8733,7 @@ const InputHelper = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8714
8733
|
kind,
|
|
8715
8734
|
theme
|
|
8716
8735
|
} = props,
|
|
8717
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
8736
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$R);
|
|
8718
8737
|
const {
|
|
8719
8738
|
color
|
|
8720
8739
|
} = INPUT_HELPER_CONFIGURATION[kind] || {};
|
|
@@ -8732,7 +8751,7 @@ InputHelper.displayName = COMPONENT_NAME$O;
|
|
|
8732
8751
|
InputHelper.className = CLASSNAME$O;
|
|
8733
8752
|
InputHelper.defaultProps = DEFAULT_PROPS$D;
|
|
8734
8753
|
|
|
8735
|
-
const _excluded$
|
|
8754
|
+
const _excluded$Q = ["children", "className", "htmlFor", "isRequired", "theme"];
|
|
8736
8755
|
|
|
8737
8756
|
/**
|
|
8738
8757
|
* Defines the props of the component.
|
|
@@ -8770,7 +8789,7 @@ const InputLabel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8770
8789
|
isRequired,
|
|
8771
8790
|
theme
|
|
8772
8791
|
} = props,
|
|
8773
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
8792
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$Q);
|
|
8774
8793
|
return /*#__PURE__*/React__default.createElement("label", _extends({
|
|
8775
8794
|
ref: ref
|
|
8776
8795
|
}, forwardedProps, {
|
|
@@ -8786,7 +8805,7 @@ InputLabel.displayName = COMPONENT_NAME$N;
|
|
|
8786
8805
|
InputLabel.className = CLASSNAME$N;
|
|
8787
8806
|
InputLabel.defaultProps = DEFAULT_PROPS$C;
|
|
8788
8807
|
|
|
8789
|
-
const _excluded$
|
|
8808
|
+
const _excluded$P = ["aria-labelledby", "ariaLabelledBy", "aria-label", "ariaLabel", "children", "className", "closeButtonProps", "isOpen", "onClose", "parentElement", "focusElement", "preventAutoClose", "theme", "zIndex"];
|
|
8790
8809
|
|
|
8791
8810
|
/**
|
|
8792
8811
|
* Defines the props of the component.
|
|
@@ -8826,7 +8845,7 @@ const Lightbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8826
8845
|
theme,
|
|
8827
8846
|
zIndex
|
|
8828
8847
|
} = props,
|
|
8829
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
8848
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$P);
|
|
8830
8849
|
if (!DOCUMENT) {
|
|
8831
8850
|
// Can't render in SSR.
|
|
8832
8851
|
return null;
|
|
@@ -8917,7 +8936,7 @@ const Lightbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8917
8936
|
Lightbox.displayName = COMPONENT_NAME$M;
|
|
8918
8937
|
Lightbox.className = CLASSNAME$M;
|
|
8919
8938
|
|
|
8920
|
-
const _excluded$
|
|
8939
|
+
const _excluded$O = ["children", "className", "color", "colorVariant", "disabled", "isDisabled", "href", "leftIcon", "linkAs", "rightIcon", "target", "typography"];
|
|
8921
8940
|
|
|
8922
8941
|
/**
|
|
8923
8942
|
* Defines the props of the component.
|
|
@@ -8980,7 +8999,7 @@ const Link = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8980
8999
|
target,
|
|
8981
9000
|
typography
|
|
8982
9001
|
} = props,
|
|
8983
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9002
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$O);
|
|
8984
9003
|
const renderedChildren = useMemo(() => /*#__PURE__*/React__default.createElement(React__default.Fragment, null, leftIcon && !isEmpty(leftIcon) && /*#__PURE__*/React__default.createElement(Icon, {
|
|
8985
9004
|
icon: leftIcon,
|
|
8986
9005
|
className: `${CLASSNAME$L}__left-icon`,
|
|
@@ -9028,7 +9047,7 @@ const Link = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9028
9047
|
Link.displayName = COMPONENT_NAME$L;
|
|
9029
9048
|
Link.className = CLASSNAME$L;
|
|
9030
9049
|
|
|
9031
|
-
const _excluded$
|
|
9050
|
+
const _excluded$N = ["className", "description", "link", "linkAs", "linkProps", "size", "theme", "thumbnailProps", "title", "titleHeading"];
|
|
9032
9051
|
|
|
9033
9052
|
/**
|
|
9034
9053
|
* Defines the props of the component.
|
|
@@ -9073,7 +9092,7 @@ const LinkPreview = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9073
9092
|
title,
|
|
9074
9093
|
titleHeading
|
|
9075
9094
|
} = props,
|
|
9076
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9095
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$N);
|
|
9077
9096
|
// Use title heading as title wrapper (see DEFAULT_PROPS for the default value).
|
|
9078
9097
|
const TitleHeading = titleHeading;
|
|
9079
9098
|
return /*#__PURE__*/React__default.createElement("article", _extends({
|
|
@@ -9128,7 +9147,7 @@ LinkPreview.displayName = COMPONENT_NAME$K;
|
|
|
9128
9147
|
LinkPreview.className = CLASSNAME$K;
|
|
9129
9148
|
LinkPreview.defaultProps = DEFAULT_PROPS$B;
|
|
9130
9149
|
|
|
9131
|
-
const _excluded$
|
|
9150
|
+
const _excluded$M = ["className"];
|
|
9132
9151
|
|
|
9133
9152
|
/**
|
|
9134
9153
|
* Defines the props of the component.
|
|
@@ -9155,7 +9174,7 @@ const ListDivider = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9155
9174
|
const {
|
|
9156
9175
|
className
|
|
9157
9176
|
} = props,
|
|
9158
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9177
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$M);
|
|
9159
9178
|
return /*#__PURE__*/React__default.createElement("li", _extends({
|
|
9160
9179
|
ref: ref
|
|
9161
9180
|
}, forwardedProps, {
|
|
@@ -9167,7 +9186,7 @@ const ListDivider = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9167
9186
|
ListDivider.displayName = COMPONENT_NAME$J;
|
|
9168
9187
|
ListDivider.className = CLASSNAME$J;
|
|
9169
9188
|
|
|
9170
|
-
const _excluded$
|
|
9189
|
+
const _excluded$L = ["children", "className"];
|
|
9171
9190
|
|
|
9172
9191
|
/**
|
|
9173
9192
|
* Defines the props of the component.
|
|
@@ -9195,7 +9214,7 @@ const ListSubheader = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9195
9214
|
children,
|
|
9196
9215
|
className
|
|
9197
9216
|
} = props,
|
|
9198
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9217
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$L);
|
|
9199
9218
|
return /*#__PURE__*/React__default.createElement("li", _extends({
|
|
9200
9219
|
ref: ref
|
|
9201
9220
|
}, forwardedProps, {
|
|
@@ -9207,7 +9226,7 @@ const ListSubheader = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9207
9226
|
ListSubheader.displayName = COMPONENT_NAME$I;
|
|
9208
9227
|
ListSubheader.className = CLASSNAME$I;
|
|
9209
9228
|
|
|
9210
|
-
const _excluded$
|
|
9229
|
+
const _excluded$K = ["children", "className", "hasBackground", "kind", "icon", "closeButtonProps"];
|
|
9211
9230
|
|
|
9212
9231
|
/**
|
|
9213
9232
|
* Defines the props of the component.
|
|
@@ -9261,7 +9280,7 @@ const Message = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9261
9280
|
icon: customIcon,
|
|
9262
9281
|
closeButtonProps
|
|
9263
9282
|
} = props,
|
|
9264
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9283
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$K);
|
|
9265
9284
|
const {
|
|
9266
9285
|
color,
|
|
9267
9286
|
icon
|
|
@@ -9296,7 +9315,7 @@ const Message = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9296
9315
|
Message.displayName = COMPONENT_NAME$H;
|
|
9297
9316
|
Message.className = CLASSNAME$H;
|
|
9298
9317
|
|
|
9299
|
-
const _excluded$
|
|
9318
|
+
const _excluded$J = ["className", "theme", "thumbnails", "onImageClick"],
|
|
9300
9319
|
_excluded2$2 = ["image", "onClick", "align"];
|
|
9301
9320
|
|
|
9302
9321
|
/**
|
|
@@ -9334,7 +9353,7 @@ const Mosaic = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9334
9353
|
thumbnails,
|
|
9335
9354
|
onImageClick
|
|
9336
9355
|
} = props,
|
|
9337
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9356
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$J);
|
|
9338
9357
|
const handleImageClick = useMemo(() => {
|
|
9339
9358
|
if (!onImageClick) return undefined;
|
|
9340
9359
|
return (index, onClick) => event => {
|
|
@@ -9389,7 +9408,7 @@ function forwardRefPolymorphic(render) {
|
|
|
9389
9408
|
return /*#__PURE__*/React__default.forwardRef(render);
|
|
9390
9409
|
}
|
|
9391
9410
|
|
|
9392
|
-
const _excluded$
|
|
9411
|
+
const _excluded$I = ["className", "icon", "label", "isCurrentPage", "as"];
|
|
9393
9412
|
|
|
9394
9413
|
/** Make `href` required when `as` is `a` */
|
|
9395
9414
|
|
|
@@ -9414,7 +9433,7 @@ const NavigationItem = Object.assign(forwardRefPolymorphic((props, ref) => {
|
|
|
9414
9433
|
isCurrentPage,
|
|
9415
9434
|
as: Element = 'a'
|
|
9416
9435
|
} = props,
|
|
9417
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9436
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$I);
|
|
9418
9437
|
const theme = useContext(ThemeContext);
|
|
9419
9438
|
const {
|
|
9420
9439
|
tooltipLabel,
|
|
@@ -9458,7 +9477,7 @@ const NavigationContext = /*#__PURE__*/createContext({
|
|
|
9458
9477
|
orientation: Orientation.vertical
|
|
9459
9478
|
});
|
|
9460
9479
|
|
|
9461
|
-
const _excluded$
|
|
9480
|
+
const _excluded$H = ["children", "className", "label", "icon"];
|
|
9462
9481
|
/**
|
|
9463
9482
|
* Component display name.
|
|
9464
9483
|
*/
|
|
@@ -9475,7 +9494,7 @@ const NavigationSection = Object.assign( /*#__PURE__*/forwardRef((props, ref) =>
|
|
|
9475
9494
|
label,
|
|
9476
9495
|
icon
|
|
9477
9496
|
} = props,
|
|
9478
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9497
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$H);
|
|
9479
9498
|
const [isOpen, setIsOpen] = useState(false);
|
|
9480
9499
|
const buttonRef = useRef(null);
|
|
9481
9500
|
const sectionId = useId();
|
|
@@ -9540,7 +9559,7 @@ const NavigationSection = Object.assign( /*#__PURE__*/forwardRef((props, ref) =>
|
|
|
9540
9559
|
className: CLASSNAME$E
|
|
9541
9560
|
});
|
|
9542
9561
|
|
|
9543
|
-
const _excluded$
|
|
9562
|
+
const _excluded$G = ["children", "className", "theme", "orientation"];
|
|
9544
9563
|
/**
|
|
9545
9564
|
* Component display name.
|
|
9546
9565
|
*/
|
|
@@ -9560,7 +9579,7 @@ forwardRef((props, ref) => {
|
|
|
9560
9579
|
theme,
|
|
9561
9580
|
orientation
|
|
9562
9581
|
} = props,
|
|
9563
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9582
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$G);
|
|
9564
9583
|
return /*#__PURE__*/React__default.createElement(ThemeContext.Provider, {
|
|
9565
9584
|
value: theme
|
|
9566
9585
|
}, /*#__PURE__*/React__default.createElement("nav", _extends({
|
|
@@ -9611,7 +9630,7 @@ const NOTIFICATION_CONFIGURATION = {
|
|
|
9611
9630
|
}
|
|
9612
9631
|
};
|
|
9613
9632
|
|
|
9614
|
-
const _excluded$
|
|
9633
|
+
const _excluded$F = ["actionLabel", "className", "content", "isOpen", "onActionClick", "onClick", "theme", "type", "zIndex", "usePortal", "style"];
|
|
9615
9634
|
|
|
9616
9635
|
/**
|
|
9617
9636
|
* Defines the props of the component.
|
|
@@ -9658,7 +9677,7 @@ const Notification = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9658
9677
|
usePortal,
|
|
9659
9678
|
style
|
|
9660
9679
|
} = props,
|
|
9661
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9680
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$F);
|
|
9662
9681
|
if (!DOCUMENT) {
|
|
9663
9682
|
// Can't render in SSR.
|
|
9664
9683
|
return null;
|
|
@@ -9716,7 +9735,7 @@ Notification.displayName = COMPONENT_NAME$C;
|
|
|
9716
9735
|
Notification.className = CLASSNAME$C;
|
|
9717
9736
|
Notification.defaultProps = DEFAULT_PROPS$z;
|
|
9718
9737
|
|
|
9719
|
-
const _excluded$
|
|
9738
|
+
const _excluded$E = ["children", "isOpen", "focusElement", "aria-label", "label", "className"];
|
|
9720
9739
|
|
|
9721
9740
|
/**
|
|
9722
9741
|
* PopoverDialog props.
|
|
@@ -9754,7 +9773,7 @@ const PopoverDialog = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9754
9773
|
label = ariaLabel,
|
|
9755
9774
|
className
|
|
9756
9775
|
} = props,
|
|
9757
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9776
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$E);
|
|
9758
9777
|
return /*#__PURE__*/React__default.createElement(Popover, _extends({}, forwardedProps, {
|
|
9759
9778
|
ref: ref,
|
|
9760
9779
|
className: classnames(className, handleBasicClasses({
|
|
@@ -9778,7 +9797,7 @@ PopoverDialog.displayName = COMPONENT_NAME$B;
|
|
|
9778
9797
|
PopoverDialog.className = CLASSNAME$B;
|
|
9779
9798
|
PopoverDialog.defaultProps = DEFAULT_PROPS$y;
|
|
9780
9799
|
|
|
9781
|
-
const _excluded$
|
|
9800
|
+
const _excluded$D = ["actions", "attachments", "author", "className", "meta", "onClick", "orientation", "tags", "text", "theme", "thumbnailProps", "title"];
|
|
9782
9801
|
|
|
9783
9802
|
/**
|
|
9784
9803
|
* Defines the props of the component.
|
|
@@ -9824,7 +9843,7 @@ const PostBlock = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9824
9843
|
thumbnailProps,
|
|
9825
9844
|
title
|
|
9826
9845
|
} = props,
|
|
9827
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9846
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$D);
|
|
9828
9847
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
9829
9848
|
ref: ref,
|
|
9830
9849
|
className: classnames(className, handleBasicClasses({
|
|
@@ -9869,7 +9888,7 @@ PostBlock.displayName = COMPONENT_NAME$A;
|
|
|
9869
9888
|
PostBlock.className = CLASSNAME$A;
|
|
9870
9889
|
PostBlock.defaultProps = DEFAULT_PROPS$x;
|
|
9871
9890
|
|
|
9872
|
-
const _excluded$
|
|
9891
|
+
const _excluded$C = ["className", "theme"];
|
|
9873
9892
|
/**
|
|
9874
9893
|
* Component display name.
|
|
9875
9894
|
*/
|
|
@@ -9899,7 +9918,7 @@ const ProgressLinear = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9899
9918
|
className,
|
|
9900
9919
|
theme
|
|
9901
9920
|
} = props,
|
|
9902
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9921
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$C);
|
|
9903
9922
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
9904
9923
|
ref: ref
|
|
9905
9924
|
}, forwardedProps, {
|
|
@@ -9917,7 +9936,7 @@ ProgressLinear.displayName = COMPONENT_NAME$z;
|
|
|
9917
9936
|
ProgressLinear.className = CLASSNAME$z;
|
|
9918
9937
|
ProgressLinear.defaultProps = DEFAULT_PROPS$w;
|
|
9919
9938
|
|
|
9920
|
-
const _excluded$
|
|
9939
|
+
const _excluded$B = ["className", "theme", "size"];
|
|
9921
9940
|
|
|
9922
9941
|
/**
|
|
9923
9942
|
* Progress sizes.
|
|
@@ -9958,7 +9977,7 @@ const ProgressCircular = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9958
9977
|
theme,
|
|
9959
9978
|
size
|
|
9960
9979
|
} = props,
|
|
9961
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9980
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$B);
|
|
9962
9981
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
9963
9982
|
ref: ref
|
|
9964
9983
|
}, forwardedProps, {
|
|
@@ -9987,7 +10006,7 @@ ProgressCircular.displayName = COMPONENT_NAME$y;
|
|
|
9987
10006
|
ProgressCircular.className = CLASSNAME$y;
|
|
9988
10007
|
ProgressCircular.defaultProps = DEFAULT_PROPS$v;
|
|
9989
10008
|
|
|
9990
|
-
const _excluded$
|
|
10009
|
+
const _excluded$A = ["className", "theme", "variant"];
|
|
9991
10010
|
|
|
9992
10011
|
/**
|
|
9993
10012
|
* Progress variants.
|
|
@@ -10033,7 +10052,7 @@ const Progress = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10033
10052
|
theme,
|
|
10034
10053
|
variant
|
|
10035
10054
|
} = props,
|
|
10036
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
10055
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$A);
|
|
10037
10056
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
10038
10057
|
ref: ref
|
|
10039
10058
|
}, forwardedProps, {
|
|
@@ -10170,7 +10189,7 @@ const useTabProviderContextState = () => {
|
|
|
10170
10189
|
return context === null || context === void 0 ? void 0 : context[0];
|
|
10171
10190
|
};
|
|
10172
10191
|
|
|
10173
|
-
const _excluded$
|
|
10192
|
+
const _excluded$z = ["children", "onChange"];
|
|
10174
10193
|
const DEFAULT_PROPS$t = {
|
|
10175
10194
|
isLazy: INIT_STATE.isLazy,
|
|
10176
10195
|
shouldActivateOnFocus: INIT_STATE.shouldActivateOnFocus
|
|
@@ -10192,7 +10211,7 @@ const ProgressTrackerProvider = props => {
|
|
|
10192
10211
|
children,
|
|
10193
10212
|
onChange
|
|
10194
10213
|
} = props,
|
|
10195
|
-
propState = _objectWithoutProperties(props, _excluded$
|
|
10214
|
+
propState = _objectWithoutProperties(props, _excluded$z);
|
|
10196
10215
|
const [state, dispatch] = useReducer(reducer, INIT_STATE);
|
|
10197
10216
|
|
|
10198
10217
|
// On prop state change => dispatch update.
|
|
@@ -10296,7 +10315,7 @@ const useRovingTabIndex = _ref => {
|
|
|
10296
10315
|
[parentRef, ...extraDependencies]);
|
|
10297
10316
|
};
|
|
10298
10317
|
|
|
10299
|
-
const _excluded$
|
|
10318
|
+
const _excluded$y = ["aria-label", "children", "className"];
|
|
10300
10319
|
|
|
10301
10320
|
/**
|
|
10302
10321
|
* Defines the props of the component.
|
|
@@ -10333,7 +10352,7 @@ const ProgressTracker = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10333
10352
|
children,
|
|
10334
10353
|
className
|
|
10335
10354
|
} = props,
|
|
10336
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
10355
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$y);
|
|
10337
10356
|
const stepListRef = React__default.useRef(null);
|
|
10338
10357
|
useRovingTabIndex({
|
|
10339
10358
|
parentRef: stepListRef,
|
|
@@ -10374,7 +10393,7 @@ ProgressTracker.displayName = COMPONENT_NAME$w;
|
|
|
10374
10393
|
ProgressTracker.className = CLASSNAME$w;
|
|
10375
10394
|
ProgressTracker.defaultProps = DEFAULT_PROPS$s;
|
|
10376
10395
|
|
|
10377
|
-
const _excluded$
|
|
10396
|
+
const _excluded$x = ["className", "disabled", "hasError", "helper", "id", "isActive", "isComplete", "isDisabled", "label", "onFocus", "onKeyPress", "tabIndex"];
|
|
10378
10397
|
|
|
10379
10398
|
/**
|
|
10380
10399
|
* Defines the props of the component.
|
|
@@ -10419,7 +10438,7 @@ const ProgressTrackerStep = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10419
10438
|
onKeyPress,
|
|
10420
10439
|
tabIndex = -1
|
|
10421
10440
|
} = props,
|
|
10422
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
10441
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$x);
|
|
10423
10442
|
const state = useTabProviderContext('tab', id);
|
|
10424
10443
|
const isActive = propIsActive || (state === null || state === void 0 ? void 0 : state.isActive);
|
|
10425
10444
|
const changeToCurrentTab = useCallback(() => {
|
|
@@ -10486,7 +10505,7 @@ ProgressTrackerStep.displayName = COMPONENT_NAME$v;
|
|
|
10486
10505
|
ProgressTrackerStep.className = CLASSNAME$v;
|
|
10487
10506
|
ProgressTrackerStep.defaultProps = DEFAULT_PROPS$r;
|
|
10488
10507
|
|
|
10489
|
-
const _excluded$
|
|
10508
|
+
const _excluded$w = ["children", "id", "className", "isActive"];
|
|
10490
10509
|
|
|
10491
10510
|
/**
|
|
10492
10511
|
* Defines the props of the component.
|
|
@@ -10523,7 +10542,7 @@ const ProgressTrackerStepPanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10523
10542
|
className,
|
|
10524
10543
|
isActive: propIsActive
|
|
10525
10544
|
} = props,
|
|
10526
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
10545
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$w);
|
|
10527
10546
|
const state = useTabProviderContext('tabPanel', id);
|
|
10528
10547
|
const isActive = propIsActive || (state === null || state === void 0 ? void 0 : state.isActive);
|
|
10529
10548
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
@@ -10543,7 +10562,7 @@ ProgressTrackerStepPanel.displayName = COMPONENT_NAME$u;
|
|
|
10543
10562
|
ProgressTrackerStepPanel.className = CLASSNAME$u;
|
|
10544
10563
|
ProgressTrackerStepPanel.defaultProps = DEFAULT_PROPS$q;
|
|
10545
10564
|
|
|
10546
|
-
const _excluded$
|
|
10565
|
+
const _excluded$v = ["checked", "className", "disabled", "helper", "id", "inputRef", "isChecked", "isDisabled", "label", "name", "onChange", "theme", "value", "inputProps"];
|
|
10547
10566
|
|
|
10548
10567
|
/**
|
|
10549
10568
|
* Defines the props of the component.
|
|
@@ -10590,7 +10609,7 @@ const RadioButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10590
10609
|
value,
|
|
10591
10610
|
inputProps
|
|
10592
10611
|
} = props,
|
|
10593
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
10612
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$v);
|
|
10594
10613
|
const generatedInputId = useId();
|
|
10595
10614
|
const inputId = id || generatedInputId;
|
|
10596
10615
|
const handleChange = event => {
|
|
@@ -10644,7 +10663,7 @@ RadioButton.displayName = COMPONENT_NAME$t;
|
|
|
10644
10663
|
RadioButton.className = CLASSNAME$t;
|
|
10645
10664
|
RadioButton.defaultProps = DEFAULT_PROPS$p;
|
|
10646
10665
|
|
|
10647
|
-
const _excluded$
|
|
10666
|
+
const _excluded$u = ["children", "className"];
|
|
10648
10667
|
|
|
10649
10668
|
/**
|
|
10650
10669
|
* Defines the props of the component.
|
|
@@ -10672,7 +10691,7 @@ const RadioGroup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10672
10691
|
children,
|
|
10673
10692
|
className
|
|
10674
10693
|
} = props,
|
|
10675
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
10694
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$u);
|
|
10676
10695
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
10677
10696
|
ref: ref
|
|
10678
10697
|
}, forwardedProps, {
|
|
@@ -10716,7 +10735,7 @@ const SelectVariant = {
|
|
|
10716
10735
|
chip: 'chip'
|
|
10717
10736
|
};
|
|
10718
10737
|
|
|
10719
|
-
const _excluded$
|
|
10738
|
+
const _excluded$t = ["children", "className", "focusElement", "isMultiple", "closeOnClick", "disabled", "error", "hasError", "helper", "id", "isDisabled", "isEmpty", "isOpen", "isRequired", "isValid", "label", "onClear", "onDropdownClose", "onInfiniteScroll", "onInputClick", "placeholder", "theme", "value", "variant"];
|
|
10720
10739
|
|
|
10721
10740
|
/** The display name of the component. */
|
|
10722
10741
|
const COMPONENT_NAME$r = 'Select';
|
|
@@ -10756,7 +10775,7 @@ const WithSelectContext = (SelectElement, _ref, ref) => {
|
|
|
10756
10775
|
value,
|
|
10757
10776
|
variant = DEFAULT_PROPS$o.variant
|
|
10758
10777
|
} = _ref,
|
|
10759
|
-
forwardedProps = _objectWithoutProperties(_ref, _excluded$
|
|
10778
|
+
forwardedProps = _objectWithoutProperties(_ref, _excluded$t);
|
|
10760
10779
|
const generatedSelectId = useId();
|
|
10761
10780
|
const selectId = id || generatedSelectId;
|
|
10762
10781
|
const anchorRef = useRef(null);
|
|
@@ -10831,7 +10850,7 @@ const WithSelectContext = (SelectElement, _ref, ref) => {
|
|
|
10831
10850
|
}, helper));
|
|
10832
10851
|
};
|
|
10833
10852
|
|
|
10834
|
-
const _excluded$
|
|
10853
|
+
const _excluded$s = ["anchorRef", "clearButtonProps", "handleKeyboardNav", "hasError", "hasInputClear", "icon", "id", "isDisabled", "isEmpty", "isRequired", "isValid", "label", "onClear", "onInputClick", "placeholder", "selectedValueRender", "theme", "value", "variant", "selectElementRef"];
|
|
10835
10854
|
|
|
10836
10855
|
/** The display name of the component. */
|
|
10837
10856
|
const COMPONENT_NAME$q = 'Select';
|
|
@@ -10871,7 +10890,7 @@ const SelectField = _ref => {
|
|
|
10871
10890
|
variant,
|
|
10872
10891
|
selectElementRef
|
|
10873
10892
|
} = _ref,
|
|
10874
|
-
forwardedProps = _objectWithoutProperties(_ref, _excluded$
|
|
10893
|
+
forwardedProps = _objectWithoutProperties(_ref, _excluded$s);
|
|
10875
10894
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, variant === SelectVariant.input && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, label && /*#__PURE__*/React__default.createElement("div", {
|
|
10876
10895
|
className: `${CLASSNAME$q}__header`
|
|
10877
10896
|
}, /*#__PURE__*/React__default.createElement(InputLabel, {
|
|
@@ -10951,7 +10970,7 @@ Select.className = CLASSNAME$q;
|
|
|
10951
10970
|
Select.defaultProps = DEFAULT_PROPS$n;
|
|
10952
10971
|
Select.className = CLASSNAME$q;
|
|
10953
10972
|
|
|
10954
|
-
const _excluded$
|
|
10973
|
+
const _excluded$r = ["anchorRef", "handleKeyboardNav", "hasError", "icon", "id", "isDisabled", "isEmpty", "isRequired", "isValid", "label", "onClear", "onInputClick", "placeholder", "selectedChipRender", "selectedValueRender", "theme", "value", "variant", "selectElementRef"];
|
|
10955
10974
|
|
|
10956
10975
|
/** Defines the props of the component. */
|
|
10957
10976
|
|
|
@@ -11002,7 +11021,7 @@ const SelectMultipleField = _ref => {
|
|
|
11002
11021
|
variant,
|
|
11003
11022
|
selectElementRef
|
|
11004
11023
|
} = _ref,
|
|
11005
|
-
forwardedProps = _objectWithoutProperties(_ref, _excluded$
|
|
11024
|
+
forwardedProps = _objectWithoutProperties(_ref, _excluded$r);
|
|
11006
11025
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, variant === SelectVariant.input && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, label && /*#__PURE__*/React__default.createElement("div", {
|
|
11007
11026
|
className: `${CLASSNAME$p}__header`
|
|
11008
11027
|
}, /*#__PURE__*/React__default.createElement(InputLabel, {
|
|
@@ -11072,7 +11091,7 @@ SelectMultiple.displayName = COMPONENT_NAME$p;
|
|
|
11072
11091
|
SelectMultiple.className = CLASSNAME$p;
|
|
11073
11092
|
SelectMultiple.defaultProps = DEFAULT_PROPS$m;
|
|
11074
11093
|
|
|
11075
|
-
const _excluded$
|
|
11094
|
+
const _excluded$q = ["children", "className", "theme"];
|
|
11076
11095
|
|
|
11077
11096
|
/**
|
|
11078
11097
|
* Defines the props of the component.
|
|
@@ -11101,7 +11120,7 @@ const SideNavigation = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11101
11120
|
className,
|
|
11102
11121
|
theme
|
|
11103
11122
|
} = props,
|
|
11104
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
11123
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$q);
|
|
11105
11124
|
const content = Children.toArray(children).filter(isComponent(SideNavigationItem));
|
|
11106
11125
|
return /*#__PURE__*/React__default.createElement("ul", _extends({
|
|
11107
11126
|
ref: ref
|
|
@@ -11114,7 +11133,7 @@ const SideNavigation = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11114
11133
|
SideNavigation.displayName = COMPONENT_NAME$o;
|
|
11115
11134
|
SideNavigation.className = CLASSNAME$o;
|
|
11116
11135
|
|
|
11117
|
-
const _excluded$
|
|
11136
|
+
const _excluded$p = ["linkAs", "href"];
|
|
11118
11137
|
/**
|
|
11119
11138
|
* Render <button> HTML component, fallbacks to `<a>` when a `href` is provided or a custom component with `linkAs`.
|
|
11120
11139
|
*/
|
|
@@ -11123,7 +11142,7 @@ const renderButtonOrLink = function (props) {
|
|
|
11123
11142
|
linkAs,
|
|
11124
11143
|
href
|
|
11125
11144
|
} = props,
|
|
11126
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
11145
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$p);
|
|
11127
11146
|
for (var _len = arguments.length, children = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
11128
11147
|
children[_key - 1] = arguments[_key];
|
|
11129
11148
|
}
|
|
@@ -11133,7 +11152,7 @@ const renderButtonOrLink = function (props) {
|
|
|
11133
11152
|
}, forwardedProps), ...children);
|
|
11134
11153
|
};
|
|
11135
11154
|
|
|
11136
|
-
const _excluded$
|
|
11155
|
+
const _excluded$o = ["children", "className", "emphasis", "icon", "isOpen", "isSelected", "label", "linkAs", "linkProps", "onActionClick", "onClick", "toggleButtonProps", "closeMode"];
|
|
11137
11156
|
|
|
11138
11157
|
/**
|
|
11139
11158
|
* Defines the props of the component.
|
|
@@ -11180,7 +11199,7 @@ const SideNavigationItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11180
11199
|
toggleButtonProps,
|
|
11181
11200
|
closeMode = 'unmount'
|
|
11182
11201
|
} = props,
|
|
11183
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
11202
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$o);
|
|
11184
11203
|
const content = children && Children.toArray(children).filter(isComponent(SideNavigationItem));
|
|
11185
11204
|
const hasContent = !isEmpty(content);
|
|
11186
11205
|
const shouldSplitActions = Boolean(onActionClick);
|
|
@@ -11242,7 +11261,7 @@ SideNavigationItem.displayName = COMPONENT_NAME$n;
|
|
|
11242
11261
|
SideNavigationItem.className = CLASSNAME$n;
|
|
11243
11262
|
SideNavigationItem.defaultProps = DEFAULT_PROPS$l;
|
|
11244
11263
|
|
|
11245
|
-
const _excluded$
|
|
11264
|
+
const _excluded$n = ["className", "size", "color", "theme"];
|
|
11246
11265
|
|
|
11247
11266
|
/**
|
|
11248
11267
|
* Defines the props of the component.
|
|
@@ -11276,7 +11295,7 @@ const SkeletonCircle = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11276
11295
|
color,
|
|
11277
11296
|
theme
|
|
11278
11297
|
} = props,
|
|
11279
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
11298
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$n);
|
|
11280
11299
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
11281
11300
|
ref: ref
|
|
11282
11301
|
}, forwardedProps, {
|
|
@@ -11292,7 +11311,7 @@ SkeletonCircle.displayName = COMPONENT_NAME$m;
|
|
|
11292
11311
|
SkeletonCircle.defaultProps = DEFAULT_PROPS$k;
|
|
11293
11312
|
SkeletonCircle.className = CLASSNAME$m;
|
|
11294
11313
|
|
|
11295
|
-
const _excluded$
|
|
11314
|
+
const _excluded$m = ["aspectRatio", "className", "height", "theme", "variant", "width", "color"];
|
|
11296
11315
|
|
|
11297
11316
|
/**
|
|
11298
11317
|
* Skeleton variants.
|
|
@@ -11339,7 +11358,7 @@ const SkeletonRectangle = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11339
11358
|
width,
|
|
11340
11359
|
color
|
|
11341
11360
|
} = props,
|
|
11342
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
11361
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$m);
|
|
11343
11362
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
11344
11363
|
ref: ref
|
|
11345
11364
|
}, forwardedProps, {
|
|
@@ -11360,7 +11379,7 @@ SkeletonRectangle.displayName = COMPONENT_NAME$l;
|
|
|
11360
11379
|
SkeletonRectangle.className = CLASSNAME$l;
|
|
11361
11380
|
SkeletonRectangle.defaultProps = DEFAULT_PROPS$j;
|
|
11362
11381
|
|
|
11363
|
-
const _excluded$
|
|
11382
|
+
const _excluded$l = ["className", "theme", "typography", "width", "color"];
|
|
11364
11383
|
|
|
11365
11384
|
/**
|
|
11366
11385
|
* Defines the props of the component.
|
|
@@ -11395,7 +11414,7 @@ const SkeletonTypography = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11395
11414
|
width,
|
|
11396
11415
|
color
|
|
11397
11416
|
} = props,
|
|
11398
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
11417
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$l);
|
|
11399
11418
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
11400
11419
|
ref: ref
|
|
11401
11420
|
}, forwardedProps, {
|
|
@@ -11450,7 +11469,7 @@ const clamp = (value, min, max) => {
|
|
|
11450
11469
|
return value;
|
|
11451
11470
|
};
|
|
11452
11471
|
|
|
11453
|
-
const _excluded$
|
|
11472
|
+
const _excluded$k = ["className", "disabled", "helper", "hideMinMaxLabel", "id", "isDisabled", "label", "max", "min", "name", "onChange", "onMouseDown", "precision", "steps", "theme", "value"];
|
|
11454
11473
|
|
|
11455
11474
|
/**
|
|
11456
11475
|
* Defines the props of the component.
|
|
@@ -11525,7 +11544,7 @@ const Slider = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11525
11544
|
theme,
|
|
11526
11545
|
value
|
|
11527
11546
|
} = props,
|
|
11528
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
11547
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$k);
|
|
11529
11548
|
const generatedId = useId();
|
|
11530
11549
|
const sliderId = id || generatedId;
|
|
11531
11550
|
const sliderLabelId = useMemo(() => `label-${sliderId}`, [sliderId]);
|
|
@@ -11714,6 +11733,31 @@ Slider.displayName = COMPONENT_NAME$j;
|
|
|
11714
11733
|
Slider.className = CLASSNAME$j;
|
|
11715
11734
|
Slider.defaultProps = DEFAULT_PROPS$h;
|
|
11716
11735
|
|
|
11736
|
+
/**
|
|
11737
|
+
* Hook that allows to control when there is a focus event within a given element, meaning
|
|
11738
|
+
* that any element within the given target will trigger the focus in and focus out events.
|
|
11739
|
+
* @param options - UseFocusWithinOptions
|
|
11740
|
+
*/
|
|
11741
|
+
const useFocusWithin = _ref => {
|
|
11742
|
+
let {
|
|
11743
|
+
element,
|
|
11744
|
+
onFocusIn,
|
|
11745
|
+
onFocusOut
|
|
11746
|
+
} = _ref;
|
|
11747
|
+
useEffect(() => {
|
|
11748
|
+
if (element) {
|
|
11749
|
+
element.addEventListener('focusin', onFocusIn);
|
|
11750
|
+
element.addEventListener('focusout', onFocusOut);
|
|
11751
|
+
}
|
|
11752
|
+
return () => {
|
|
11753
|
+
if (element) {
|
|
11754
|
+
element.removeEventListener('focusin', onFocusIn);
|
|
11755
|
+
element.removeEventListener('focusout', onFocusOut);
|
|
11756
|
+
}
|
|
11757
|
+
};
|
|
11758
|
+
}, [onFocusIn, element, onFocusOut]);
|
|
11759
|
+
};
|
|
11760
|
+
|
|
11717
11761
|
/**
|
|
11718
11762
|
* Making setInterval Declarative with React Hooks.
|
|
11719
11763
|
* Credits: https://overreacted.io/making-setinterval-declarative-with-react-hooks/
|
|
@@ -11787,87 +11831,80 @@ const useSlideshowControls = _ref => {
|
|
|
11787
11831
|
// Number of slides when using groupBy prop.
|
|
11788
11832
|
const slidesCount = Math.ceil(itemsCount / Math.min(groupBy, itemsCount));
|
|
11789
11833
|
|
|
11790
|
-
//
|
|
11791
|
-
const
|
|
11792
|
-
|
|
11793
|
-
|
|
11794
|
-
|
|
11795
|
-
|
|
11796
|
-
|
|
11797
|
-
|
|
11798
|
-
|
|
11799
|
-
|
|
11800
|
-
|
|
11834
|
+
// Set current active index (& if is user activated)
|
|
11835
|
+
const setActiveIndex = useCallback((setStateAction, isUser) => {
|
|
11836
|
+
// Store on element a boolean value when the slide change was not from a user action.
|
|
11837
|
+
const elementDataset = element === null || element === void 0 ? void 0 : element.dataset;
|
|
11838
|
+
if (elementDataset) {
|
|
11839
|
+
if (isUser) elementDataset.lumxUserActivated = true;else delete elementDataset.lumxUserActivated;
|
|
11840
|
+
}
|
|
11841
|
+
setCurrentIndex(setStateAction);
|
|
11842
|
+
}, [element]);
|
|
11843
|
+
|
|
11844
|
+
// Change slide given delta (-1/+1) with or without loop back.
|
|
11845
|
+
const goTo = useCallback(function () {
|
|
11846
|
+
let delta = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
11847
|
+
let loopBack = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
11848
|
+
let isUser = arguments.length > 2 ? arguments[2] : undefined;
|
|
11849
|
+
setActiveIndex(index => {
|
|
11850
|
+
if (loopBack) {
|
|
11851
|
+
const newIndex = (index + delta) % slidesCount;
|
|
11852
|
+
if (newIndex < 0) return slidesCount + newIndex;
|
|
11853
|
+
return newIndex;
|
|
11801
11854
|
}
|
|
11802
|
-
return index;
|
|
11803
|
-
});
|
|
11804
|
-
}, [slidesCount,
|
|
11805
|
-
|
|
11806
|
-
// Change current index to display previous slide.
|
|
11807
|
-
const goToPreviousSlide = useCallback(function () {
|
|
11808
|
-
let loopback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
11809
|
-
setCurrentIndex(index => {
|
|
11810
|
-
if (loopback && index === 0) {
|
|
11811
|
-
// Loopback to the end.
|
|
11812
|
-
return slidesCount - 1;
|
|
11813
|
-
}
|
|
11814
|
-
if (index > 0) {
|
|
11815
|
-
// Previous slide.
|
|
11816
|
-
return index - 1;
|
|
11817
|
-
}
|
|
11818
|
-
return index;
|
|
11819
|
-
});
|
|
11820
|
-
}, [slidesCount, setCurrentIndex]);
|
|
11855
|
+
return clamp(index + delta, 0, slidesCount - 1);
|
|
11856
|
+
}, isUser);
|
|
11857
|
+
}, [slidesCount, setActiveIndex]);
|
|
11821
11858
|
|
|
11822
11859
|
// Auto play
|
|
11823
11860
|
const [isAutoPlaying, setIsAutoPlaying] = useState(Boolean(autoPlay));
|
|
11824
11861
|
const [isForcePaused, setIsForcePaused] = useState(false);
|
|
11825
11862
|
const isSlideshowAutoPlaying = isForcePaused ? false : isAutoPlaying;
|
|
11826
11863
|
// Start
|
|
11827
|
-
useInterval(
|
|
11864
|
+
useInterval(goTo, isSlideshowAutoPlaying && slidesCount > 1 ? interval : null);
|
|
11828
11865
|
|
|
11829
|
-
// Reset current index if it
|
|
11866
|
+
// Reset current index if it becomes invalid.
|
|
11830
11867
|
useEffect(() => {
|
|
11831
11868
|
if (currentIndex > slidesCount - 1) {
|
|
11832
|
-
|
|
11869
|
+
setActiveIndex(defaultActiveIndex);
|
|
11833
11870
|
}
|
|
11834
|
-
}, [currentIndex, slidesCount, defaultActiveIndex]);
|
|
11835
|
-
const startAutoPlay = () => {
|
|
11871
|
+
}, [currentIndex, slidesCount, defaultActiveIndex, setActiveIndex]);
|
|
11872
|
+
const startAutoPlay = useCallback(() => {
|
|
11836
11873
|
setIsAutoPlaying(Boolean(autoPlay));
|
|
11837
|
-
};
|
|
11838
|
-
const stopAutoPlay = () => {
|
|
11874
|
+
}, [autoPlay]);
|
|
11875
|
+
const stopAutoPlay = useCallback(() => {
|
|
11839
11876
|
setIsAutoPlaying(false);
|
|
11840
|
-
};
|
|
11877
|
+
}, []);
|
|
11841
11878
|
|
|
11842
11879
|
// Handle click on a bullet to go to a specific slide.
|
|
11843
11880
|
const onPaginationClick = useCallback(index => {
|
|
11844
11881
|
stopAutoPlay();
|
|
11845
11882
|
setIsForcePaused(true);
|
|
11846
11883
|
if (index >= 0 && index < slidesCount) {
|
|
11847
|
-
|
|
11884
|
+
setActiveIndex(index, true);
|
|
11848
11885
|
}
|
|
11849
|
-
}, [slidesCount,
|
|
11886
|
+
}, [stopAutoPlay, slidesCount, setActiveIndex]);
|
|
11850
11887
|
|
|
11851
11888
|
// Handle click or keyboard event to go to next slide.
|
|
11852
11889
|
const onNextClick = useCallback(function () {
|
|
11853
|
-
let
|
|
11890
|
+
let loopBack = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
11854
11891
|
stopAutoPlay();
|
|
11855
11892
|
setIsForcePaused(true);
|
|
11856
|
-
|
|
11857
|
-
}, [
|
|
11893
|
+
goTo(1, loopBack, true);
|
|
11894
|
+
}, [goTo, stopAutoPlay]);
|
|
11858
11895
|
|
|
11859
11896
|
// Handle click or keyboard event to go to previous slide.
|
|
11860
11897
|
const onPreviousClick = useCallback(function () {
|
|
11861
|
-
let
|
|
11898
|
+
let loopBack = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
11862
11899
|
stopAutoPlay();
|
|
11863
11900
|
setIsForcePaused(true);
|
|
11864
|
-
|
|
11865
|
-
}, [
|
|
11901
|
+
goTo(-1, loopBack, true);
|
|
11902
|
+
}, [goTo, stopAutoPlay]);
|
|
11866
11903
|
|
|
11867
11904
|
// If the activeIndex props changes, update the current slide
|
|
11868
11905
|
useEffect(() => {
|
|
11869
|
-
|
|
11870
|
-
}, [activeIndex]);
|
|
11906
|
+
setActiveIndex(activeIndex);
|
|
11907
|
+
}, [activeIndex, setActiveIndex]);
|
|
11871
11908
|
|
|
11872
11909
|
// If the slide changes, with autoplay for example, trigger "onChange"
|
|
11873
11910
|
useEffect(() => {
|
|
@@ -11878,14 +11915,14 @@ const useSlideshowControls = _ref => {
|
|
|
11878
11915
|
const slideshowId = id || generatedSlideshowId;
|
|
11879
11916
|
const generatedSlidesId = useId();
|
|
11880
11917
|
const slideshowSlidesId = slidesId || generatedSlidesId;
|
|
11881
|
-
const toggleAutoPlay = () => {
|
|
11918
|
+
const toggleAutoPlay = useCallback(() => {
|
|
11882
11919
|
if (isSlideshowAutoPlaying) {
|
|
11883
11920
|
stopAutoPlay();
|
|
11884
11921
|
} else {
|
|
11885
11922
|
startAutoPlay();
|
|
11886
11923
|
}
|
|
11887
|
-
};
|
|
11888
|
-
const toggleForcePause = () => {
|
|
11924
|
+
}, [isSlideshowAutoPlaying, startAutoPlay, stopAutoPlay]);
|
|
11925
|
+
const toggleForcePause = useCallback(() => {
|
|
11889
11926
|
const shouldBePaused = !isForcePaused;
|
|
11890
11927
|
setIsForcePaused(shouldBePaused);
|
|
11891
11928
|
if (!shouldBePaused) {
|
|
@@ -11893,7 +11930,7 @@ const useSlideshowControls = _ref => {
|
|
|
11893
11930
|
} else {
|
|
11894
11931
|
stopAutoPlay();
|
|
11895
11932
|
}
|
|
11896
|
-
};
|
|
11933
|
+
}, [isForcePaused, startAutoPlay, stopAutoPlay]);
|
|
11897
11934
|
|
|
11898
11935
|
// Start index and end index of visible slides.
|
|
11899
11936
|
const startIndexVisible = currentIndex * groupBy;
|
|
@@ -11912,7 +11949,7 @@ const useSlideshowControls = _ref => {
|
|
|
11912
11949
|
toggleAutoPlay,
|
|
11913
11950
|
activeIndex: currentIndex,
|
|
11914
11951
|
slidesCount,
|
|
11915
|
-
setActiveIndex
|
|
11952
|
+
setActiveIndex,
|
|
11916
11953
|
startAutoPlay,
|
|
11917
11954
|
stopAutoPlay,
|
|
11918
11955
|
isForcePaused,
|
|
@@ -11920,171 +11957,6 @@ const useSlideshowControls = _ref => {
|
|
|
11920
11957
|
};
|
|
11921
11958
|
};
|
|
11922
11959
|
|
|
11923
|
-
/**
|
|
11924
|
-
* Hook that allows to control when there is a focus event within a given element, meaning
|
|
11925
|
-
* that any element within the given target will trigger the focus in and focus out events.
|
|
11926
|
-
* @param options - UseFocusWithinOptions
|
|
11927
|
-
*/
|
|
11928
|
-
const useFocusWithin = _ref => {
|
|
11929
|
-
let {
|
|
11930
|
-
element,
|
|
11931
|
-
onFocusIn,
|
|
11932
|
-
onFocusOut
|
|
11933
|
-
} = _ref;
|
|
11934
|
-
useEffect(() => {
|
|
11935
|
-
if (element) {
|
|
11936
|
-
element.addEventListener('focusin', onFocusIn);
|
|
11937
|
-
element.addEventListener('focusout', onFocusOut);
|
|
11938
|
-
}
|
|
11939
|
-
return () => {
|
|
11940
|
-
if (element) {
|
|
11941
|
-
element.removeEventListener('focusin', onFocusIn);
|
|
11942
|
-
element.removeEventListener('focusout', onFocusOut);
|
|
11943
|
-
}
|
|
11944
|
-
};
|
|
11945
|
-
}, [onFocusIn, element, onFocusOut]);
|
|
11946
|
-
};
|
|
11947
|
-
|
|
11948
|
-
/**
|
|
11949
|
-
* Classname set on elements whose focus was blocked.
|
|
11950
|
-
* This is to easily find elements that have been tempered with,
|
|
11951
|
-
* and not elements whose focus was already initially blocked.
|
|
11952
|
-
* */
|
|
11953
|
-
const BLOCKED_FOCUS_CLASSNAME = 'focus-blocked';
|
|
11954
|
-
|
|
11955
|
-
/**
|
|
11956
|
-
* Manage how slides must behave when visible or not.
|
|
11957
|
-
* When not visible, they should be hidden from screen readers and not focusable.
|
|
11958
|
-
*/
|
|
11959
|
-
const useSlideFocusManagement = _ref => {
|
|
11960
|
-
let {
|
|
11961
|
-
isSlideDisplayed,
|
|
11962
|
-
slideRef
|
|
11963
|
-
} = _ref;
|
|
11964
|
-
useEffect(() => {
|
|
11965
|
-
const element = slideRef === null || slideRef === void 0 ? void 0 : slideRef.current;
|
|
11966
|
-
if (!element) {
|
|
11967
|
-
return undefined;
|
|
11968
|
-
}
|
|
11969
|
-
|
|
11970
|
-
/**
|
|
11971
|
-
* Display given slide to screen readers and, if focus was blocked, restore focus on elements.
|
|
11972
|
-
*/
|
|
11973
|
-
const enableSlide = () => {
|
|
11974
|
-
// Hide from screen readers
|
|
11975
|
-
element.setAttribute('aria-hidden', 'false');
|
|
11976
|
-
// Find elements we have blocked focus on
|
|
11977
|
-
element.querySelectorAll(`.${BLOCKED_FOCUS_CLASSNAME}`).forEach(focusableElement => {
|
|
11978
|
-
focusableElement.removeAttribute('tabindex');
|
|
11979
|
-
focusableElement.classList.remove(BLOCKED_FOCUS_CLASSNAME);
|
|
11980
|
-
});
|
|
11981
|
-
};
|
|
11982
|
-
|
|
11983
|
-
/**
|
|
11984
|
-
* Hide given slide from screen readers and block focus on all focusable elements within.
|
|
11985
|
-
*/
|
|
11986
|
-
const blockSlide = () => {
|
|
11987
|
-
element.setAttribute('aria-hidden', 'true');
|
|
11988
|
-
getFocusableElements(element).forEach(focusableElement => {
|
|
11989
|
-
focusableElement.setAttribute('tabindex', '-1');
|
|
11990
|
-
focusableElement.classList.add(BLOCKED_FOCUS_CLASSNAME);
|
|
11991
|
-
});
|
|
11992
|
-
};
|
|
11993
|
-
const handleDisplay = () => {
|
|
11994
|
-
if (!element) {
|
|
11995
|
-
return;
|
|
11996
|
-
}
|
|
11997
|
-
if (isSlideDisplayed) {
|
|
11998
|
-
enableSlide();
|
|
11999
|
-
} else {
|
|
12000
|
-
blockSlide();
|
|
12001
|
-
}
|
|
12002
|
-
};
|
|
12003
|
-
|
|
12004
|
-
// Callback function to execute when mutations are observed
|
|
12005
|
-
const callback = mutationsList => {
|
|
12006
|
-
if (element) {
|
|
12007
|
-
for (const mutation of mutationsList) {
|
|
12008
|
-
if (mutation.type === 'childList') {
|
|
12009
|
-
handleDisplay();
|
|
12010
|
-
}
|
|
12011
|
-
}
|
|
12012
|
-
}
|
|
12013
|
-
};
|
|
12014
|
-
|
|
12015
|
-
// Create an observer instance linked to the callback function
|
|
12016
|
-
const observer = new MutationObserver(callback);
|
|
12017
|
-
if (element) {
|
|
12018
|
-
handleDisplay();
|
|
12019
|
-
|
|
12020
|
-
/** If slide is hidden, start observing for elements to block focus */
|
|
12021
|
-
if (!isSlideDisplayed) {
|
|
12022
|
-
observer.observe(element, {
|
|
12023
|
-
attributes: true,
|
|
12024
|
-
childList: true,
|
|
12025
|
-
subtree: true
|
|
12026
|
-
});
|
|
12027
|
-
}
|
|
12028
|
-
}
|
|
12029
|
-
return () => {
|
|
12030
|
-
if (!isSlideDisplayed) {
|
|
12031
|
-
observer.disconnect();
|
|
12032
|
-
}
|
|
12033
|
-
};
|
|
12034
|
-
}, [isSlideDisplayed, slideRef]);
|
|
12035
|
-
};
|
|
12036
|
-
|
|
12037
|
-
const _excluded$k = ["className", "children", "role", "label", "isDisplayed"];
|
|
12038
|
-
|
|
12039
|
-
/**
|
|
12040
|
-
* Defines the props of the component.
|
|
12041
|
-
*/
|
|
12042
|
-
|
|
12043
|
-
/**
|
|
12044
|
-
* Component display name.
|
|
12045
|
-
*/
|
|
12046
|
-
const COMPONENT_NAME$i = 'SlideshowItemGroup';
|
|
12047
|
-
|
|
12048
|
-
/**
|
|
12049
|
-
* Component default class name and class prefix.
|
|
12050
|
-
*/
|
|
12051
|
-
const CLASSNAME$i = getRootClassName(COMPONENT_NAME$i);
|
|
12052
|
-
const buildSlideShowGroupId = (slidesId, index) => `${slidesId}-slide-${index}`;
|
|
12053
|
-
|
|
12054
|
-
/**
|
|
12055
|
-
* SlideshowItemGroup component.
|
|
12056
|
-
*
|
|
12057
|
-
* @param props Component props.
|
|
12058
|
-
* @param ref Component ref.
|
|
12059
|
-
* @return React element.
|
|
12060
|
-
*/
|
|
12061
|
-
const SlideshowItemGroup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
12062
|
-
const {
|
|
12063
|
-
className,
|
|
12064
|
-
children,
|
|
12065
|
-
role = 'group',
|
|
12066
|
-
label,
|
|
12067
|
-
isDisplayed
|
|
12068
|
-
} = props,
|
|
12069
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$k);
|
|
12070
|
-
const groupRef = React__default.useRef(null);
|
|
12071
|
-
useSlideFocusManagement({
|
|
12072
|
-
isSlideDisplayed: isDisplayed,
|
|
12073
|
-
slideRef: groupRef
|
|
12074
|
-
});
|
|
12075
|
-
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
12076
|
-
ref: mergeRefs(groupRef, ref),
|
|
12077
|
-
role: role,
|
|
12078
|
-
className: classnames(className, handleBasicClasses({
|
|
12079
|
-
prefix: CLASSNAME$i
|
|
12080
|
-
})),
|
|
12081
|
-
"aria-roledescription": "slide",
|
|
12082
|
-
"aria-label": label
|
|
12083
|
-
}, forwardedProps), children);
|
|
12084
|
-
});
|
|
12085
|
-
SlideshowItemGroup.displayName = COMPONENT_NAME$i;
|
|
12086
|
-
SlideshowItemGroup.className = CLASSNAME$i;
|
|
12087
|
-
|
|
12088
11960
|
const _excluded$j = ["activeIndex", "autoPlay", "children", "className", "fillHeight", "groupBy", "interval", "onChange", "slideshowControlsProps", "theme", "id", "slidesId", "slideGroupLabel"];
|
|
12089
11961
|
|
|
12090
11962
|
/**
|
|
@@ -12181,22 +12053,9 @@ const Slideshow = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12181
12053
|
parentRef: slideshow,
|
|
12182
12054
|
theme: theme,
|
|
12183
12055
|
isAutoPlaying: isAutoPlaying,
|
|
12184
|
-
nextButtonProps: _objectSpread2({
|
|
12185
|
-
'aria-controls': slideshowSlidesId
|
|
12186
|
-
}, slideshowControlsProps.nextButtonProps),
|
|
12187
|
-
previousButtonProps: _objectSpread2({
|
|
12188
|
-
'aria-controls': slideshowSlidesId
|
|
12189
|
-
}, slideshowControlsProps.previousButtonProps),
|
|
12190
12056
|
playButtonProps: autoPlay ? _objectSpread2({
|
|
12191
|
-
'aria-controls': slideshowSlidesId,
|
|
12192
12057
|
onClick: toggleForcePause
|
|
12193
|
-
}, slideshowControlsProps.playButtonProps) : undefined
|
|
12194
|
-
paginationItemProps: index => {
|
|
12195
|
-
var _slideshowControlsPro;
|
|
12196
|
-
return _objectSpread2({
|
|
12197
|
-
'aria-controls': buildSlideShowGroupId(slideshowSlidesId, index)
|
|
12198
|
-
}, (_slideshowControlsPro = slideshowControlsProps.paginationItemProps) === null || _slideshowControlsPro === void 0 ? void 0 : _slideshowControlsPro.call(slideshowControlsProps, index));
|
|
12199
|
-
}
|
|
12058
|
+
}, slideshowControlsProps.playButtonProps) : undefined
|
|
12200
12059
|
}))) : undefined
|
|
12201
12060
|
}, forwardedProps), children);
|
|
12202
12061
|
});
|
|
@@ -12212,12 +12071,12 @@ const _excluded$i = ["className", "children"];
|
|
|
12212
12071
|
/**
|
|
12213
12072
|
* Component display name.
|
|
12214
12073
|
*/
|
|
12215
|
-
const COMPONENT_NAME$
|
|
12074
|
+
const COMPONENT_NAME$i = 'SlideshowItem';
|
|
12216
12075
|
|
|
12217
12076
|
/**
|
|
12218
12077
|
* Component default class name and class prefix.
|
|
12219
12078
|
*/
|
|
12220
|
-
const CLASSNAME$
|
|
12079
|
+
const CLASSNAME$i = getRootClassName(COMPONENT_NAME$i);
|
|
12221
12080
|
|
|
12222
12081
|
/**
|
|
12223
12082
|
* SlideshowItem component.
|
|
@@ -12234,13 +12093,182 @@ const SlideshowItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12234
12093
|
forwardedProps = _objectWithoutProperties(props, _excluded$i);
|
|
12235
12094
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
12236
12095
|
ref: ref,
|
|
12237
|
-
className: classnames(className,
|
|
12238
|
-
prefix: CLASSNAME$h
|
|
12239
|
-
}))
|
|
12096
|
+
className: classnames(className, CLASSNAME$i)
|
|
12240
12097
|
}, forwardedProps), children);
|
|
12241
12098
|
});
|
|
12242
|
-
SlideshowItem.displayName = COMPONENT_NAME$
|
|
12243
|
-
SlideshowItem.className = CLASSNAME$
|
|
12099
|
+
SlideshowItem.displayName = COMPONENT_NAME$i;
|
|
12100
|
+
SlideshowItem.className = CLASSNAME$i;
|
|
12101
|
+
|
|
12102
|
+
/**
|
|
12103
|
+
* Listen keyboard to navigate left and right.
|
|
12104
|
+
*/
|
|
12105
|
+
function useKeyNavigate(element, onNext, onPrevious) {
|
|
12106
|
+
useEffect(() => {
|
|
12107
|
+
if (!element) return undefined;
|
|
12108
|
+
const onKeyNavigate = evt => {
|
|
12109
|
+
let callback;
|
|
12110
|
+
if ((evt === null || evt === void 0 ? void 0 : evt.key) === 'ArrowRight') {
|
|
12111
|
+
callback = onNext;
|
|
12112
|
+
} else if ((evt === null || evt === void 0 ? void 0 : evt.key) === 'ArrowLeft') {
|
|
12113
|
+
callback = onPrevious;
|
|
12114
|
+
}
|
|
12115
|
+
if (!callback) return;
|
|
12116
|
+
callback();
|
|
12117
|
+
evt.preventDefault();
|
|
12118
|
+
evt.stopPropagation();
|
|
12119
|
+
};
|
|
12120
|
+
element.addEventListener('keydown', onKeyNavigate);
|
|
12121
|
+
return () => {
|
|
12122
|
+
element.removeEventListener('keydown', onKeyNavigate);
|
|
12123
|
+
};
|
|
12124
|
+
}, [onPrevious, onNext, element]);
|
|
12125
|
+
}
|
|
12126
|
+
|
|
12127
|
+
/**
|
|
12128
|
+
* Classname set on elements whose focus was blocked.
|
|
12129
|
+
* This is to easily find elements that have been tempered with,
|
|
12130
|
+
* and not elements whose focus was already initially blocked.
|
|
12131
|
+
* */
|
|
12132
|
+
const BLOCKED_FOCUS_CLASSNAME = 'focus-blocked';
|
|
12133
|
+
|
|
12134
|
+
/**
|
|
12135
|
+
* Manage how slides must behave when visible or not.
|
|
12136
|
+
* When not visible, they should be hidden from screen readers and not focusable.
|
|
12137
|
+
*/
|
|
12138
|
+
const useSlideFocusManagement = _ref => {
|
|
12139
|
+
let {
|
|
12140
|
+
isSlideDisplayed,
|
|
12141
|
+
slidesRef
|
|
12142
|
+
} = _ref;
|
|
12143
|
+
const [slide, setSlide] = React__default.useState(null);
|
|
12144
|
+
useEffect(() => {
|
|
12145
|
+
var _slidesRef$current;
|
|
12146
|
+
if (!slide) {
|
|
12147
|
+
return undefined;
|
|
12148
|
+
}
|
|
12149
|
+
const isUserActivated = (slidesRef === null || slidesRef === void 0 ? void 0 : (_slidesRef$current = slidesRef.current) === null || _slidesRef$current === void 0 ? void 0 : _slidesRef$current.dataset.lumxUserActivated) === 'true';
|
|
12150
|
+
let focusableElements = [];
|
|
12151
|
+
|
|
12152
|
+
/**
|
|
12153
|
+
* Display given slide to screen readers and, if focus was blocked, restore focus on elements.
|
|
12154
|
+
*/
|
|
12155
|
+
const enableSlide = () => {
|
|
12156
|
+
slide.removeAttribute('inert');
|
|
12157
|
+
slide.setAttribute('aria-hidden', 'false');
|
|
12158
|
+
// Find elements we have blocked focus on
|
|
12159
|
+
// (won't be necessary once "inert" gets sufficient browser support)
|
|
12160
|
+
focusableElements = Array.from(slide.querySelectorAll(`.${BLOCKED_FOCUS_CLASSNAME}`));
|
|
12161
|
+
for (const focusableElement of focusableElements) {
|
|
12162
|
+
focusableElement.removeAttribute('tabindex');
|
|
12163
|
+
focusableElement.classList.remove(BLOCKED_FOCUS_CLASSNAME);
|
|
12164
|
+
}
|
|
12165
|
+
};
|
|
12166
|
+
|
|
12167
|
+
/**
|
|
12168
|
+
* Hide given slide from screen readers and block focus on all focusable elements within.
|
|
12169
|
+
*/
|
|
12170
|
+
const blockSlide = () => {
|
|
12171
|
+
slide.setAttribute('inert', '');
|
|
12172
|
+
slide.setAttribute('aria-hidden', 'true');
|
|
12173
|
+
focusableElements = getFocusableElements(slide);
|
|
12174
|
+
for (const focusableElement of focusableElements) {
|
|
12175
|
+
focusableElement.setAttribute('tabindex', '-1');
|
|
12176
|
+
focusableElement.classList.add(BLOCKED_FOCUS_CLASSNAME);
|
|
12177
|
+
}
|
|
12178
|
+
};
|
|
12179
|
+
const handleDisplay = () => {
|
|
12180
|
+
if (isSlideDisplayed) {
|
|
12181
|
+
enableSlide();
|
|
12182
|
+
} else {
|
|
12183
|
+
blockSlide();
|
|
12184
|
+
}
|
|
12185
|
+
};
|
|
12186
|
+
|
|
12187
|
+
// Create an observer instance linked to the callback function
|
|
12188
|
+
// (won't be necessary once "inert" gets sufficient browser support)
|
|
12189
|
+
const observer = new MutationObserver(mutationsList => {
|
|
12190
|
+
for (const mutation of mutationsList) {
|
|
12191
|
+
if (mutation.type === 'childList') {
|
|
12192
|
+
handleDisplay();
|
|
12193
|
+
}
|
|
12194
|
+
}
|
|
12195
|
+
});
|
|
12196
|
+
handleDisplay();
|
|
12197
|
+
|
|
12198
|
+
// Change focus on slide displayed
|
|
12199
|
+
if (isSlideDisplayed && isUserActivated) {
|
|
12200
|
+
var _elementToFocus;
|
|
12201
|
+
let elementToFocus = slide;
|
|
12202
|
+
|
|
12203
|
+
// We have exactly one focusable element => focus it
|
|
12204
|
+
if (focusableElements.length === 1) {
|
|
12205
|
+
// eslint-disable-next-line prefer-destructuring
|
|
12206
|
+
elementToFocus = focusableElements[0];
|
|
12207
|
+
}
|
|
12208
|
+
|
|
12209
|
+
// We have not focusable element => focus the pagination item
|
|
12210
|
+
if (focusableElements.length === 0) {
|
|
12211
|
+
elementToFocus = document.querySelector(`[aria-controls="${slide === null || slide === void 0 ? void 0 : slide.id}"]`);
|
|
12212
|
+
}
|
|
12213
|
+
(_elementToFocus = elementToFocus) === null || _elementToFocus === void 0 ? void 0 : _elementToFocus.focus({
|
|
12214
|
+
preventScroll: true
|
|
12215
|
+
});
|
|
12216
|
+
}
|
|
12217
|
+
|
|
12218
|
+
/** If slide is hidden, start observing for elements to block focus */
|
|
12219
|
+
if (!isSlideDisplayed) {
|
|
12220
|
+
observer.observe(slide, {
|
|
12221
|
+
attributes: true,
|
|
12222
|
+
childList: true,
|
|
12223
|
+
subtree: true
|
|
12224
|
+
});
|
|
12225
|
+
return () => observer.disconnect();
|
|
12226
|
+
}
|
|
12227
|
+
return undefined;
|
|
12228
|
+
}, [isSlideDisplayed, slide, slidesRef]);
|
|
12229
|
+
return setSlide;
|
|
12230
|
+
};
|
|
12231
|
+
|
|
12232
|
+
/**
|
|
12233
|
+
* Defines the props of the component.
|
|
12234
|
+
*/
|
|
12235
|
+
|
|
12236
|
+
/**
|
|
12237
|
+
* Component display name.
|
|
12238
|
+
*/
|
|
12239
|
+
const COMPONENT_NAME$h = 'SlideshowItemGroup';
|
|
12240
|
+
|
|
12241
|
+
/**
|
|
12242
|
+
* Component default class name and class prefix.
|
|
12243
|
+
*/
|
|
12244
|
+
const CLASSNAME$h = getRootClassName(COMPONENT_NAME$h);
|
|
12245
|
+
const buildSlideShowGroupId = (slidesId, index) => slidesId && `${slidesId}-slide-${index}`;
|
|
12246
|
+
|
|
12247
|
+
/**
|
|
12248
|
+
* Internal slideshow item group component.
|
|
12249
|
+
*/
|
|
12250
|
+
const SlideshowItemGroup = props => {
|
|
12251
|
+
const {
|
|
12252
|
+
id,
|
|
12253
|
+
children,
|
|
12254
|
+
label,
|
|
12255
|
+
isDisplayed,
|
|
12256
|
+
slidesRef
|
|
12257
|
+
} = props;
|
|
12258
|
+
const groupRef = useSlideFocusManagement({
|
|
12259
|
+
isSlideDisplayed: isDisplayed,
|
|
12260
|
+
slidesRef
|
|
12261
|
+
});
|
|
12262
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
12263
|
+
id: id,
|
|
12264
|
+
ref: groupRef,
|
|
12265
|
+
role: "group",
|
|
12266
|
+
className: CLASSNAME$h,
|
|
12267
|
+
"aria-label": label,
|
|
12268
|
+
tabIndex: -1
|
|
12269
|
+
}, children);
|
|
12270
|
+
};
|
|
12271
|
+
SlideshowItemGroup.displayName = COMPONENT_NAME$h;
|
|
12244
12272
|
|
|
12245
12273
|
const isTouchDevice = () => 'ontouchstart' in window;
|
|
12246
12274
|
|
|
@@ -12358,32 +12386,29 @@ const InternalSlideshowControls = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12358
12386
|
const paginationRef = React__default.useRef(null);
|
|
12359
12387
|
// Listen to touch swipe navigate left & right.
|
|
12360
12388
|
useSwipeNavigate(parent,
|
|
12361
|
-
// Go next without
|
|
12389
|
+
// Go next without loop back.
|
|
12362
12390
|
useCallback(() => onNextClick === null || onNextClick === void 0 ? void 0 : onNextClick(false), [onNextClick]),
|
|
12363
|
-
// Go previous without
|
|
12391
|
+
// Go previous without loop back.
|
|
12364
12392
|
useCallback(() => onPreviousClick === null || onPreviousClick === void 0 ? void 0 : onPreviousClick(false), [onPreviousClick]));
|
|
12365
|
-
|
|
12366
|
-
|
|
12367
|
-
|
|
12368
|
-
*/
|
|
12369
|
-
useRovingTabIndex({
|
|
12370
|
-
parentRef: paginationRef,
|
|
12371
|
-
elementSelector: 'button',
|
|
12372
|
-
keepTabIndex: true,
|
|
12373
|
-
onElementFocus: element => {
|
|
12374
|
-
element.click();
|
|
12375
|
-
}
|
|
12376
|
-
});
|
|
12393
|
+
const [focusedIndex, setFocusedIndex] = useState(null);
|
|
12394
|
+
const onButtonFocus = useCallback(index => () => setFocusedIndex(index), [setFocusedIndex]);
|
|
12395
|
+
const onFocusOut = useCallback(() => setFocusedIndex(null), [setFocusedIndex]);
|
|
12377
12396
|
|
|
12378
12397
|
// Pagination "bullet" range.
|
|
12379
|
-
const visibleRange = usePaginationVisibleRange(activeIndex, slidesCount);
|
|
12398
|
+
const visibleRange = usePaginationVisibleRange(focusedIndex !== null && focusedIndex !== void 0 ? focusedIndex : activeIndex, slidesCount);
|
|
12380
12399
|
|
|
12381
12400
|
// Inline style of wrapper element.
|
|
12382
12401
|
const wrapperStyle = {
|
|
12383
12402
|
transform: `translateX(-${PAGINATION_ITEM_SIZE * visibleRange.min}px)`
|
|
12384
12403
|
};
|
|
12404
|
+
const controlsRef = React__default.useRef(null);
|
|
12405
|
+
useKeyNavigate(controlsRef.current, onNextClick, onPreviousClick);
|
|
12406
|
+
const slideshowSlidesId = React__default.useMemo(() => {
|
|
12407
|
+
var _parent, _parent$querySelector;
|
|
12408
|
+
return (_parent = parent) === null || _parent === void 0 ? void 0 : (_parent$querySelector = _parent.querySelector(`.${Slides.className}__slides`)) === null || _parent$querySelector === void 0 ? void 0 : _parent$querySelector.id;
|
|
12409
|
+
}, [parent]);
|
|
12385
12410
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
12386
|
-
ref: ref
|
|
12411
|
+
ref: useMergeRefs(ref, controlsRef)
|
|
12387
12412
|
}, forwardedProps, {
|
|
12388
12413
|
className: classnames(className, handleBasicClasses({
|
|
12389
12414
|
prefix: CLASSNAME$g,
|
|
@@ -12396,15 +12421,17 @@ const InternalSlideshowControls = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12396
12421
|
className: `${CLASSNAME$g}__navigation`,
|
|
12397
12422
|
color: theme === Theme.dark ? 'light' : 'dark',
|
|
12398
12423
|
emphasis: Emphasis.low,
|
|
12399
|
-
onClick: onPreviousClick
|
|
12424
|
+
onClick: onPreviousClick,
|
|
12425
|
+
"aria-controls": slideshowSlidesId
|
|
12400
12426
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
12401
12427
|
ref: paginationRef,
|
|
12402
12428
|
className: `${CLASSNAME$g}__pagination`
|
|
12403
12429
|
}, /*#__PURE__*/React__default.createElement("div", _extends({
|
|
12404
12430
|
className: `${CLASSNAME$g}__pagination-items`,
|
|
12405
|
-
style: wrapperStyle
|
|
12406
|
-
|
|
12407
|
-
|
|
12431
|
+
style: wrapperStyle
|
|
12432
|
+
}, paginationProps, {
|
|
12433
|
+
onBlur: onFocusOut
|
|
12434
|
+
}), range(slidesCount).map(index => {
|
|
12408
12435
|
const isOnEdge = index !== 0 && index !== slidesCount - 1 && (index === visibleRange.min || index === visibleRange.max);
|
|
12409
12436
|
const isActive = activeIndex === index;
|
|
12410
12437
|
const isOutRange = index < visibleRange.min || index > visibleRange.max;
|
|
@@ -12424,23 +12451,25 @@ const InternalSlideshowControls = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12424
12451
|
}), itemClassName),
|
|
12425
12452
|
key: index,
|
|
12426
12453
|
type: "button",
|
|
12427
|
-
|
|
12428
|
-
|
|
12429
|
-
"aria-selected": isActive,
|
|
12454
|
+
"aria-current": isActive || undefined,
|
|
12455
|
+
"aria-controls": buildSlideShowGroupId(slideshowSlidesId, index),
|
|
12430
12456
|
onClick: () => onPaginationClick === null || onPaginationClick === void 0 ? void 0 : onPaginationClick(index),
|
|
12457
|
+
onFocus: onButtonFocus(index),
|
|
12431
12458
|
"aria-label": ariaLabel
|
|
12432
12459
|
}, itemProps));
|
|
12433
|
-
})
|
|
12460
|
+
}))), playButtonProps ? /*#__PURE__*/React__default.createElement(IconButton, _extends({}, playButtonProps, {
|
|
12434
12461
|
icon: isAutoPlaying ? mdiPauseCircleOutline : mdiPlayCircleOutline,
|
|
12435
12462
|
className: `${CLASSNAME$g}__play`,
|
|
12436
12463
|
color: theme === Theme.dark ? 'light' : 'dark',
|
|
12437
|
-
emphasis: Emphasis.low
|
|
12464
|
+
emphasis: Emphasis.low,
|
|
12465
|
+
"aria-controls": slideshowSlidesId
|
|
12438
12466
|
})) : null, /*#__PURE__*/React__default.createElement(IconButton, _extends({}, nextButtonProps, {
|
|
12439
12467
|
icon: mdiChevronRight,
|
|
12440
12468
|
className: `${CLASSNAME$g}__navigation`,
|
|
12441
12469
|
color: theme === Theme.dark ? 'light' : 'dark',
|
|
12442
12470
|
emphasis: Emphasis.low,
|
|
12443
|
-
onClick: onNextClick
|
|
12471
|
+
onClick: onNextClick,
|
|
12472
|
+
"aria-controls": slideshowSlidesId
|
|
12444
12473
|
})));
|
|
12445
12474
|
});
|
|
12446
12475
|
InternalSlideshowControls.displayName = COMPONENT_NAME$g;
|
|
@@ -12486,7 +12515,6 @@ const Slides = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12486
12515
|
slideGroupLabel
|
|
12487
12516
|
} = props,
|
|
12488
12517
|
forwardedProps = _objectWithoutProperties(props, _excluded$g);
|
|
12489
|
-
const wrapperRef = React__default.useRef(null);
|
|
12490
12518
|
const startIndexVisible = activeIndex;
|
|
12491
12519
|
const endIndexVisible = startIndexVisible + 1;
|
|
12492
12520
|
|
|
@@ -12498,9 +12526,10 @@ const Slides = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12498
12526
|
const childrenArray = Children.toArray(children);
|
|
12499
12527
|
return groupBy && groupBy > 1 ? chunk(childrenArray, groupBy) : childrenArray;
|
|
12500
12528
|
}, [children, groupBy]);
|
|
12529
|
+
const slidesRef = React__default.useRef(null);
|
|
12501
12530
|
return /*#__PURE__*/React__default.createElement("section", _extends({
|
|
12502
12531
|
id: id,
|
|
12503
|
-
ref: ref
|
|
12532
|
+
ref: useMergeRefs(slidesRef, ref)
|
|
12504
12533
|
}, forwardedProps, {
|
|
12505
12534
|
className: classnames(className, handleBasicClasses({
|
|
12506
12535
|
prefix: CLASSNAME$f,
|
|
@@ -12517,15 +12546,14 @@ const Slides = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12517
12546
|
onMouseLeave: toggleAutoPlay,
|
|
12518
12547
|
"aria-live": isAutoPlaying ? 'off' : 'polite'
|
|
12519
12548
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12520
|
-
ref: wrapperRef,
|
|
12521
12549
|
className: `${CLASSNAME$f}__wrapper`,
|
|
12522
12550
|
style: wrapperStyle
|
|
12523
12551
|
}, groups.map((group, index) => /*#__PURE__*/React__default.createElement(SlideshowItemGroup, {
|
|
12524
12552
|
key: index,
|
|
12525
12553
|
id: slidesId && buildSlideShowGroupId(slidesId, index),
|
|
12526
|
-
role: hasControls ? 'tabpanel' : 'group',
|
|
12527
12554
|
label: slideGroupLabel ? slideGroupLabel(index + 1, groups.length) : undefined,
|
|
12528
|
-
isDisplayed: index >= startIndexVisible && index < endIndexVisible
|
|
12555
|
+
isDisplayed: index >= startIndexVisible && index < endIndexVisible,
|
|
12556
|
+
slidesRef: slidesRef
|
|
12529
12557
|
}, group)))), afterSlides);
|
|
12530
12558
|
});
|
|
12531
12559
|
Slides.displayName = COMPONENT_NAME$f;
|
|
@@ -14195,6 +14223,7 @@ const Tooltip = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
14195
14223
|
} = useTooltipOpen(delay, anchorElement);
|
|
14196
14224
|
const isOpen = (isActivated || forceOpen) && !!label;
|
|
14197
14225
|
const isMounted = !!label && (isOpen || closeMode === 'hide');
|
|
14226
|
+
const isHidden = !isOpen && closeMode === 'hide';
|
|
14198
14227
|
const wrappedChildren = useInjectTooltipRef({
|
|
14199
14228
|
children,
|
|
14200
14229
|
setAnchorElement,
|
|
@@ -14218,9 +14247,8 @@ const Tooltip = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
14218
14247
|
"aria-label": label || '',
|
|
14219
14248
|
className: classnames(className, handleBasicClasses({
|
|
14220
14249
|
prefix: CLASSNAME$2,
|
|
14221
|
-
position
|
|
14222
|
-
|
|
14223
|
-
})),
|
|
14250
|
+
position
|
|
14251
|
+
}), isHidden && VISUALLY_HIDDEN),
|
|
14224
14252
|
style: _objectSpread2(_objectSpread2({}, styles.popper), {}, {
|
|
14225
14253
|
zIndex
|
|
14226
14254
|
})
|