@lumx/react 4.19.1-alpha.5 → 4.19.1-alpha.7
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 +151 -77
- package/index.js +1179 -621
- package/index.js.map +1 -1
- package/package.json +5 -3
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColorVariant as ColorVariant$1, Size as Size$1, VISUALLY_HIDDEN, Theme as Theme$1, AspectRatio as AspectRatio$1, DOCUMENT, IS_BROWSER as IS_BROWSER$1, Emphasis as Emphasis$1, WINDOW, DIALOG_TRANSITION_DURATION, Orientation as Orientation$1, NOTIFICATION_TRANSITION_DURATION, Kind as Kind$1, Alignment as Alignment$1, ColorPalette as ColorPalette$1 } from '@lumx/core/js/constants';
|
|
1
|
+
import { ColorVariant as ColorVariant$1, Size as Size$1, VISUALLY_HIDDEN, Theme as Theme$1, AspectRatio as AspectRatio$1, DOCUMENT, IS_BROWSER as IS_BROWSER$1, Emphasis as Emphasis$1, WINDOW, DIALOG_TRANSITION_DURATION, Typography as Typography$1, Orientation as Orientation$1, NOTIFICATION_TRANSITION_DURATION, Kind as Kind$1, Alignment as Alignment$1, ColorPalette as ColorPalette$1 } from '@lumx/core/js/constants';
|
|
2
2
|
export * from '@lumx/core/js/constants';
|
|
3
3
|
export * from '@lumx/core/js/types';
|
|
4
4
|
import * as React from 'react';
|
|
@@ -558,7 +558,7 @@ const CONFIG$1 = {
|
|
|
558
558
|
/**
|
|
559
559
|
* Component display name.
|
|
560
560
|
*/
|
|
561
|
-
const COMPONENT_NAME$
|
|
561
|
+
const COMPONENT_NAME$1G = 'AlertDialog';
|
|
562
562
|
|
|
563
563
|
/**
|
|
564
564
|
* Component default class name and class prefix.
|
|
@@ -732,7 +732,7 @@ const AlertDialog = forwardRef((props, ref) => {
|
|
|
732
732
|
...forwardedProps
|
|
733
733
|
});
|
|
734
734
|
});
|
|
735
|
-
AlertDialog.displayName = COMPONENT_NAME$
|
|
735
|
+
AlertDialog.displayName = COMPONENT_NAME$1G;
|
|
736
736
|
AlertDialog.className = CLASSNAME$1C;
|
|
737
737
|
AlertDialog.defaultProps = DEFAULT_PROPS$1j;
|
|
738
738
|
|
|
@@ -826,7 +826,7 @@ function useDisableStateProps(props) {
|
|
|
826
826
|
/**
|
|
827
827
|
* Component display name.
|
|
828
828
|
*/
|
|
829
|
-
const COMPONENT_NAME$
|
|
829
|
+
const COMPONENT_NAME$1F = 'Autocomplete';
|
|
830
830
|
|
|
831
831
|
/**
|
|
832
832
|
* Component default class name and class prefix.
|
|
@@ -939,14 +939,14 @@ const Autocomplete = forwardRef((props, ref) => {
|
|
|
939
939
|
})]
|
|
940
940
|
});
|
|
941
941
|
});
|
|
942
|
-
Autocomplete.displayName = COMPONENT_NAME$
|
|
942
|
+
Autocomplete.displayName = COMPONENT_NAME$1F;
|
|
943
943
|
Autocomplete.className = CLASSNAME$1B;
|
|
944
944
|
Autocomplete.defaultProps = DEFAULT_PROPS$1i;
|
|
945
945
|
|
|
946
946
|
/**
|
|
947
947
|
* Component display name.
|
|
948
948
|
*/
|
|
949
|
-
const COMPONENT_NAME$
|
|
949
|
+
const COMPONENT_NAME$1E = 'AutocompleteMultiple';
|
|
950
950
|
|
|
951
951
|
/**
|
|
952
952
|
* Component default class name and class prefix.
|
|
@@ -1065,14 +1065,14 @@ const AutocompleteMultiple = forwardRef((props, ref) => {
|
|
|
1065
1065
|
children: children
|
|
1066
1066
|
});
|
|
1067
1067
|
});
|
|
1068
|
-
AutocompleteMultiple.displayName = COMPONENT_NAME$
|
|
1068
|
+
AutocompleteMultiple.displayName = COMPONENT_NAME$1E;
|
|
1069
1069
|
AutocompleteMultiple.className = CLASSNAME$1A;
|
|
1070
1070
|
AutocompleteMultiple.defaultProps = DEFAULT_PROPS$1h;
|
|
1071
1071
|
|
|
1072
1072
|
/**
|
|
1073
1073
|
* Component display name.
|
|
1074
1074
|
*/
|
|
1075
|
-
const COMPONENT_NAME$
|
|
1075
|
+
const COMPONENT_NAME$1D = 'Avatar';
|
|
1076
1076
|
|
|
1077
1077
|
/**
|
|
1078
1078
|
* Component default class name and class prefix.
|
|
@@ -1172,14 +1172,14 @@ const Avatar = forwardRef((props, ref) => {
|
|
|
1172
1172
|
})
|
|
1173
1173
|
});
|
|
1174
1174
|
});
|
|
1175
|
-
Avatar.displayName = COMPONENT_NAME$
|
|
1175
|
+
Avatar.displayName = COMPONENT_NAME$1D;
|
|
1176
1176
|
Avatar.className = CLASSNAME$1z;
|
|
1177
1177
|
Avatar.defaultProps = DEFAULT_PROPS$1g;
|
|
1178
1178
|
|
|
1179
1179
|
/**
|
|
1180
1180
|
* Component display name.
|
|
1181
1181
|
*/
|
|
1182
|
-
const COMPONENT_NAME$
|
|
1182
|
+
const COMPONENT_NAME$1C = 'Badge';
|
|
1183
1183
|
|
|
1184
1184
|
/**
|
|
1185
1185
|
* Component default class name and class prefix.
|
|
@@ -1219,7 +1219,7 @@ const Badge$1 = props => {
|
|
|
1219
1219
|
children: children
|
|
1220
1220
|
});
|
|
1221
1221
|
};
|
|
1222
|
-
Badge$1.displayName = COMPONENT_NAME$
|
|
1222
|
+
Badge$1.displayName = COMPONENT_NAME$1C;
|
|
1223
1223
|
Badge$1.className = CLASSNAME$1y;
|
|
1224
1224
|
Badge$1.defaultProps = DEFAULT_PROPS$1f;
|
|
1225
1225
|
|
|
@@ -1244,7 +1244,7 @@ Badge.displayName = Badge$1.displayName;
|
|
|
1244
1244
|
Badge.className = Badge$1.className;
|
|
1245
1245
|
Badge.defaultProps = Badge$1.defaultProps;
|
|
1246
1246
|
|
|
1247
|
-
const COMPONENT_NAME$
|
|
1247
|
+
const COMPONENT_NAME$1B = 'BadgeWrapper';
|
|
1248
1248
|
const CLASSNAME$1x = 'lumx-badge-wrapper';
|
|
1249
1249
|
const {
|
|
1250
1250
|
block: block$18,
|
|
@@ -1275,7 +1275,7 @@ const BadgeWrapper = forwardRef((props, ref) => {
|
|
|
1275
1275
|
ref
|
|
1276
1276
|
});
|
|
1277
1277
|
});
|
|
1278
|
-
BadgeWrapper.displayName = COMPONENT_NAME$
|
|
1278
|
+
BadgeWrapper.displayName = COMPONENT_NAME$1B;
|
|
1279
1279
|
BadgeWrapper.className = CLASSNAME$1x;
|
|
1280
1280
|
|
|
1281
1281
|
/**
|
|
@@ -1326,7 +1326,7 @@ const RawClickable = props => {
|
|
|
1326
1326
|
/**
|
|
1327
1327
|
* Component display name.
|
|
1328
1328
|
*/
|
|
1329
|
-
const COMPONENT_NAME$
|
|
1329
|
+
const COMPONENT_NAME$1A = 'ButtonRoot';
|
|
1330
1330
|
const BUTTON_WRAPPER_CLASSNAME = `lumx-button-wrapper`;
|
|
1331
1331
|
const {
|
|
1332
1332
|
block: buttonWrapperBlock
|
|
@@ -1424,7 +1424,7 @@ const ButtonRoot = props => {
|
|
|
1424
1424
|
children
|
|
1425
1425
|
});
|
|
1426
1426
|
};
|
|
1427
|
-
ButtonRoot.displayName = COMPONENT_NAME$
|
|
1427
|
+
ButtonRoot.displayName = COMPONENT_NAME$1A;
|
|
1428
1428
|
ButtonRoot.defaultProps = {};
|
|
1429
1429
|
|
|
1430
1430
|
/**
|
|
@@ -1434,7 +1434,7 @@ ButtonRoot.defaultProps = {};
|
|
|
1434
1434
|
/**
|
|
1435
1435
|
* Component display name.
|
|
1436
1436
|
*/
|
|
1437
|
-
const COMPONENT_NAME$
|
|
1437
|
+
const COMPONENT_NAME$1z = 'Button';
|
|
1438
1438
|
|
|
1439
1439
|
/**
|
|
1440
1440
|
* Component default class name and class prefix.
|
|
@@ -1479,7 +1479,7 @@ const Button$1 = props => {
|
|
|
1479
1479
|
variant: 'button'
|
|
1480
1480
|
});
|
|
1481
1481
|
};
|
|
1482
|
-
Button$1.displayName = COMPONENT_NAME$
|
|
1482
|
+
Button$1.displayName = COMPONENT_NAME$1z;
|
|
1483
1483
|
Button$1.className = CLASSNAME$1w;
|
|
1484
1484
|
Button$1.defaultProps = DEFAULT_PROPS$1e;
|
|
1485
1485
|
|
|
@@ -1554,11 +1554,11 @@ const Button = forwardRef((props, ref) => {
|
|
|
1554
1554
|
})
|
|
1555
1555
|
});
|
|
1556
1556
|
});
|
|
1557
|
-
Button.displayName = COMPONENT_NAME$
|
|
1557
|
+
Button.displayName = COMPONENT_NAME$1z;
|
|
1558
1558
|
Button.className = CLASSNAME$1w;
|
|
1559
1559
|
Button.defaultProps = DEFAULT_PROPS$1e;
|
|
1560
1560
|
|
|
1561
|
-
const COMPONENT_NAME$
|
|
1561
|
+
const COMPONENT_NAME$1y = 'Icon';
|
|
1562
1562
|
const IconClassName = 'lumx-icon';
|
|
1563
1563
|
|
|
1564
1564
|
/**
|
|
@@ -1651,14 +1651,14 @@ const Icon$1 = props => {
|
|
|
1651
1651
|
})
|
|
1652
1652
|
});
|
|
1653
1653
|
};
|
|
1654
|
-
Icon$1.displayName = COMPONENT_NAME$
|
|
1654
|
+
Icon$1.displayName = COMPONENT_NAME$1y;
|
|
1655
1655
|
Icon$1.className = CLASSNAME$1v;
|
|
1656
1656
|
Icon$1.defaultProps = DEFAULT_PROPS$1d;
|
|
1657
1657
|
|
|
1658
1658
|
/**
|
|
1659
1659
|
* Component display name.
|
|
1660
1660
|
*/
|
|
1661
|
-
const COMPONENT_NAME$
|
|
1661
|
+
const COMPONENT_NAME$1x = 'IconButton';
|
|
1662
1662
|
|
|
1663
1663
|
/**
|
|
1664
1664
|
* Component default class name and class prefix.
|
|
@@ -1704,7 +1704,7 @@ const IconButton$1 = props => {
|
|
|
1704
1704
|
children: defaultChildren
|
|
1705
1705
|
});
|
|
1706
1706
|
};
|
|
1707
|
-
IconButton$1.displayName = COMPONENT_NAME$
|
|
1707
|
+
IconButton$1.displayName = COMPONENT_NAME$1x;
|
|
1708
1708
|
IconButton$1.className = CLASSNAME$1u;
|
|
1709
1709
|
IconButton$1.defaultProps = DEFAULT_PROPS$1c;
|
|
1710
1710
|
|
|
@@ -1749,14 +1749,14 @@ const IconButton = forwardRef((props, ref) => {
|
|
|
1749
1749
|
})
|
|
1750
1750
|
});
|
|
1751
1751
|
});
|
|
1752
|
-
IconButton.displayName = COMPONENT_NAME$
|
|
1752
|
+
IconButton.displayName = COMPONENT_NAME$1x;
|
|
1753
1753
|
IconButton.className = CLASSNAME$1u;
|
|
1754
1754
|
IconButton.defaultProps = DEFAULT_PROPS$1c;
|
|
1755
1755
|
|
|
1756
1756
|
/**
|
|
1757
1757
|
* Component display name.
|
|
1758
1758
|
*/
|
|
1759
|
-
const COMPONENT_NAME$
|
|
1759
|
+
const COMPONENT_NAME$1w = 'ButtonGroup';
|
|
1760
1760
|
|
|
1761
1761
|
/**
|
|
1762
1762
|
* Component default class name and class prefix.
|
|
@@ -1786,7 +1786,7 @@ const ButtonGroup$1 = props => {
|
|
|
1786
1786
|
children: children
|
|
1787
1787
|
});
|
|
1788
1788
|
};
|
|
1789
|
-
ButtonGroup$1.displayName = COMPONENT_NAME$
|
|
1789
|
+
ButtonGroup$1.displayName = COMPONENT_NAME$1w;
|
|
1790
1790
|
ButtonGroup$1.className = CLASSNAME$1t;
|
|
1791
1791
|
ButtonGroup$1.defaultProps = DEFAULT_PROPS$1b;
|
|
1792
1792
|
|
|
@@ -1803,11 +1803,11 @@ const ButtonGroup = forwardRef((props, ref) => {
|
|
|
1803
1803
|
...props
|
|
1804
1804
|
});
|
|
1805
1805
|
});
|
|
1806
|
-
ButtonGroup.displayName = COMPONENT_NAME$
|
|
1806
|
+
ButtonGroup.displayName = COMPONENT_NAME$1w;
|
|
1807
1807
|
ButtonGroup.className = CLASSNAME$1t;
|
|
1808
1808
|
ButtonGroup.defaultProps = DEFAULT_PROPS$1b;
|
|
1809
1809
|
|
|
1810
|
-
const COMPONENT_NAME$
|
|
1810
|
+
const COMPONENT_NAME$1v = 'InputLabel';
|
|
1811
1811
|
const InputLabelClassName = 'lumx-input-label';
|
|
1812
1812
|
const CLASSNAME$1s = InputLabelClassName;
|
|
1813
1813
|
const {
|
|
@@ -1843,7 +1843,7 @@ function InputLabel$1(props) {
|
|
|
1843
1843
|
children: children
|
|
1844
1844
|
});
|
|
1845
1845
|
}
|
|
1846
|
-
InputLabel$1.displayName = COMPONENT_NAME$
|
|
1846
|
+
InputLabel$1.displayName = COMPONENT_NAME$1v;
|
|
1847
1847
|
InputLabel$1.className = CLASSNAME$1s;
|
|
1848
1848
|
InputLabel$1.defaultProps = DEFAULT_PROPS$1a;
|
|
1849
1849
|
|
|
@@ -1859,7 +1859,7 @@ const INPUT_HELPER_CONFIGURATION = {
|
|
|
1859
1859
|
}
|
|
1860
1860
|
};
|
|
1861
1861
|
|
|
1862
|
-
const COMPONENT_NAME$
|
|
1862
|
+
const COMPONENT_NAME$1u = 'InputHelper';
|
|
1863
1863
|
const InputHelperClassName = 'lumx-input-helper';
|
|
1864
1864
|
|
|
1865
1865
|
/**
|
|
@@ -1903,7 +1903,7 @@ function InputHelper$1(props) {
|
|
|
1903
1903
|
children: children
|
|
1904
1904
|
});
|
|
1905
1905
|
}
|
|
1906
|
-
InputHelper$1.displayName = COMPONENT_NAME$
|
|
1906
|
+
InputHelper$1.displayName = COMPONENT_NAME$1u;
|
|
1907
1907
|
InputHelper$1.className = CLASSNAME$1r;
|
|
1908
1908
|
InputHelper$1.defaultProps = DEFAULT_PROPS$19;
|
|
1909
1909
|
|
|
@@ -1916,7 +1916,7 @@ const INTERMEDIATE_STATE = 'intermediate';
|
|
|
1916
1916
|
/**
|
|
1917
1917
|
* Component display name.
|
|
1918
1918
|
*/
|
|
1919
|
-
const COMPONENT_NAME$
|
|
1919
|
+
const COMPONENT_NAME$1t = 'Checkbox';
|
|
1920
1920
|
|
|
1921
1921
|
/**
|
|
1922
1922
|
* Component default class name and class prefix.
|
|
@@ -2080,7 +2080,7 @@ const Checkbox = forwardRef((props, ref) => {
|
|
|
2080
2080
|
inputId
|
|
2081
2081
|
});
|
|
2082
2082
|
});
|
|
2083
|
-
Checkbox.displayName = COMPONENT_NAME$
|
|
2083
|
+
Checkbox.displayName = COMPONENT_NAME$1t;
|
|
2084
2084
|
Checkbox.className = CLASSNAME$1q;
|
|
2085
2085
|
Checkbox.defaultProps = DEFAULT_PROPS$18;
|
|
2086
2086
|
|
|
@@ -2103,7 +2103,7 @@ function useStopPropagation(handler) {
|
|
|
2103
2103
|
/**
|
|
2104
2104
|
* Component display name.
|
|
2105
2105
|
*/
|
|
2106
|
-
const COMPONENT_NAME$
|
|
2106
|
+
const COMPONENT_NAME$1s = 'Chip';
|
|
2107
2107
|
|
|
2108
2108
|
/**
|
|
2109
2109
|
* Component default class name and class prefix.
|
|
@@ -2264,14 +2264,14 @@ const Chip = forwardRef((props, ref) => {
|
|
|
2264
2264
|
...forwardedProps
|
|
2265
2265
|
});
|
|
2266
2266
|
});
|
|
2267
|
-
Chip.displayName = COMPONENT_NAME$
|
|
2267
|
+
Chip.displayName = COMPONENT_NAME$1s;
|
|
2268
2268
|
Chip.className = CLASSNAME$1p;
|
|
2269
2269
|
Chip.defaultProps = DEFAULT_PROPS$17;
|
|
2270
2270
|
|
|
2271
2271
|
/**
|
|
2272
2272
|
* Component display name.
|
|
2273
2273
|
*/
|
|
2274
|
-
const COMPONENT_NAME$
|
|
2274
|
+
const COMPONENT_NAME$1r = 'ChipGroup';
|
|
2275
2275
|
|
|
2276
2276
|
/**
|
|
2277
2277
|
* Component default class name and class prefix.
|
|
@@ -2377,7 +2377,7 @@ const InternalChipGroup = forwardRef((props, ref) => {
|
|
|
2377
2377
|
...forwardedProps
|
|
2378
2378
|
});
|
|
2379
2379
|
});
|
|
2380
|
-
InternalChipGroup.displayName = COMPONENT_NAME$
|
|
2380
|
+
InternalChipGroup.displayName = COMPONENT_NAME$1r;
|
|
2381
2381
|
InternalChipGroup.className = CLASSNAME$1o;
|
|
2382
2382
|
InternalChipGroup.defaultProps = DEFAULT_PROPS$16;
|
|
2383
2383
|
const ChipGroup = Object.assign(InternalChipGroup, {
|
|
@@ -2387,7 +2387,7 @@ const ChipGroup = Object.assign(InternalChipGroup, {
|
|
|
2387
2387
|
/**
|
|
2388
2388
|
* Component display name.
|
|
2389
2389
|
*/
|
|
2390
|
-
const COMPONENT_NAME$
|
|
2390
|
+
const COMPONENT_NAME$1q = 'SelectionChipGroup';
|
|
2391
2391
|
|
|
2392
2392
|
/**
|
|
2393
2393
|
* Component default class name and class prefix.
|
|
@@ -2709,7 +2709,7 @@ function wrapChildrenIconWithSpaces(children) {
|
|
|
2709
2709
|
/**
|
|
2710
2710
|
* Component display name.
|
|
2711
2711
|
*/
|
|
2712
|
-
const COMPONENT_NAME$
|
|
2712
|
+
const COMPONENT_NAME$1p = 'Text';
|
|
2713
2713
|
|
|
2714
2714
|
/**
|
|
2715
2715
|
* Component default class name and class prefix.
|
|
@@ -2807,7 +2807,7 @@ const Text = forwardRef((props, ref) => {
|
|
|
2807
2807
|
children: wrapChildrenIconWithSpaces(children)
|
|
2808
2808
|
});
|
|
2809
2809
|
});
|
|
2810
|
-
Text.displayName = COMPONENT_NAME$
|
|
2810
|
+
Text.displayName = COMPONENT_NAME$1p;
|
|
2811
2811
|
Text.className = CLASSNAME$1m;
|
|
2812
2812
|
Text.defaultProps = DEFAULT_PROPS$15;
|
|
2813
2813
|
|
|
@@ -4901,7 +4901,7 @@ const DEFAULT_PROPS$14 = {
|
|
|
4901
4901
|
/**
|
|
4902
4902
|
* Component display name.
|
|
4903
4903
|
*/
|
|
4904
|
-
const COMPONENT_NAME$
|
|
4904
|
+
const COMPONENT_NAME$1o = 'Tooltip';
|
|
4905
4905
|
|
|
4906
4906
|
/**
|
|
4907
4907
|
* Component default class name and class prefix.
|
|
@@ -4959,7 +4959,7 @@ const TooltipPopup = props => {
|
|
|
4959
4959
|
})]
|
|
4960
4960
|
});
|
|
4961
4961
|
};
|
|
4962
|
-
TooltipPopup.displayName = COMPONENT_NAME$
|
|
4962
|
+
TooltipPopup.displayName = COMPONENT_NAME$1o;
|
|
4963
4963
|
TooltipPopup.className = CLASSNAME$1l;
|
|
4964
4964
|
|
|
4965
4965
|
/**
|
|
@@ -5322,7 +5322,7 @@ const Tooltip = forwardRef((props, ref) => {
|
|
|
5322
5322
|
})]
|
|
5323
5323
|
});
|
|
5324
5324
|
});
|
|
5325
|
-
Tooltip.displayName = COMPONENT_NAME$
|
|
5325
|
+
Tooltip.displayName = COMPONENT_NAME$1o;
|
|
5326
5326
|
Tooltip.className = CLASSNAME$1l;
|
|
5327
5327
|
Tooltip.defaultProps = DEFAULT_PROPS$14;
|
|
5328
5328
|
|
|
@@ -6234,7 +6234,7 @@ const SelectionChipGroup = ({
|
|
|
6234
6234
|
Tooltip
|
|
6235
6235
|
});
|
|
6236
6236
|
};
|
|
6237
|
-
SelectionChipGroup.displayName = COMPONENT_NAME$
|
|
6237
|
+
SelectionChipGroup.displayName = COMPONENT_NAME$1q;
|
|
6238
6238
|
SelectionChipGroup.className = CLASSNAME$1n;
|
|
6239
6239
|
|
|
6240
6240
|
/**
|
|
@@ -6498,8 +6498,22 @@ function setupCombobox(callbacks, options, onTriggerAttach) {
|
|
|
6498
6498
|
loadingAnnouncement: new Set()
|
|
6499
6499
|
};
|
|
6500
6500
|
|
|
6501
|
+
/**
|
|
6502
|
+
* Last value seen for each event, kept in sync so pull-based subscribers (React's
|
|
6503
|
+
* `useSyncExternalStore` via `handle.getSnapshot`) can read the current value during their
|
|
6504
|
+
* own render — without relying on a push landing inside a specific async boundary.
|
|
6505
|
+
*
|
|
6506
|
+
* `optionsChange` is special: its push is coalesced into a microtask (see
|
|
6507
|
+
* `notifyVisibilityChange`), but its snapshot here is refreshed synchronously so React can
|
|
6508
|
+
* pick up the change during the same commit that mounted the options, instead of via the
|
|
6509
|
+
* later microtask (which would fire outside `act` in tests). All other events push
|
|
6510
|
+
* synchronously, so caching in `notify` keeps their snapshot current.
|
|
6511
|
+
*/
|
|
6512
|
+
const latestValues = {};
|
|
6513
|
+
|
|
6501
6514
|
/** Notify all subscribers for a given event. */
|
|
6502
6515
|
function notify(event, value) {
|
|
6516
|
+
latestValues[event] = value;
|
|
6503
6517
|
subscribers[event].forEach(cb => cb(value));
|
|
6504
6518
|
}
|
|
6505
6519
|
|
|
@@ -6518,26 +6532,48 @@ function setupCombobox(callbacks, options, onTriggerAttach) {
|
|
|
6518
6532
|
}
|
|
6519
6533
|
|
|
6520
6534
|
/**
|
|
6521
|
-
*
|
|
6522
|
-
*
|
|
6523
|
-
*
|
|
6524
|
-
*
|
|
6525
|
-
* (debounced in a microtask)
|
|
6535
|
+
* The current `optionsChange` snapshot. Refreshed synchronously by `refreshOptionsSnapshot`
|
|
6536
|
+
* (so React can read it via `handle.getSnapshot` during the commit that mounts the options)
|
|
6537
|
+
* and pushed to subscribers on a coalesced microtask by `flushVisibilityChange`
|
|
6538
|
+
* (so Vue reacts once to the final state instead of hitting its recursive-update guard).
|
|
6526
6539
|
*/
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
|
|
6540
|
+
let optionsSnapshot;
|
|
6541
|
+
/** The last snapshot actually pushed to subscribers, to avoid redundant notifications. */
|
|
6542
|
+
let pushedOptionsSnapshot;
|
|
6543
|
+
|
|
6544
|
+
/**
|
|
6545
|
+
* Recompute the `optionsChange` snapshot when the visible option count changed, or when the
|
|
6546
|
+
* input value changed while the list is empty (so `emptyMessage` callbacks get the updated
|
|
6547
|
+
* query string). Runs synchronously; a new object is created only when the value actually
|
|
6548
|
+
* changes, keeping the reference stable for pull-based subscribers.
|
|
6549
|
+
*/
|
|
6550
|
+
function refreshOptionsSnapshot() {
|
|
6531
6551
|
const visibleCount = getVisibleOptionCount();
|
|
6532
6552
|
const inputValue = trigger?.value ?? '';
|
|
6533
6553
|
const isEmpty = visibleCount === 0;
|
|
6534
6554
|
if (visibleCount !== lastOptionsLength || isEmpty && inputValue !== lastInputValue) {
|
|
6535
6555
|
lastOptionsLength = visibleCount;
|
|
6536
6556
|
lastInputValue = inputValue;
|
|
6537
|
-
|
|
6557
|
+
optionsSnapshot = {
|
|
6538
6558
|
optionsLength: visibleCount,
|
|
6539
6559
|
inputValue
|
|
6540
|
-
}
|
|
6560
|
+
};
|
|
6561
|
+
latestValues.optionsChange = optionsSnapshot;
|
|
6562
|
+
}
|
|
6563
|
+
}
|
|
6564
|
+
|
|
6565
|
+
/**
|
|
6566
|
+
* Notify all registered sections, push `optionsChange` when the snapshot changed since the last
|
|
6567
|
+
* push, and re-evaluate `aria-expanded`. Coalesced into a microtask so many option
|
|
6568
|
+
* registrations in one tick collapse into a single subscriber notification.
|
|
6569
|
+
*/
|
|
6570
|
+
const flushVisibilityChange = debounceMicrotask(() => {
|
|
6571
|
+
for (const [sectionElement] of sectionRegistrations) {
|
|
6572
|
+
notifySection(sectionElement, sectionRegistrations, optionRegistrations);
|
|
6573
|
+
}
|
|
6574
|
+
if (optionsSnapshot !== pushedOptionsSnapshot) {
|
|
6575
|
+
pushedOptionsSnapshot = optionsSnapshot;
|
|
6576
|
+
notify('optionsChange', optionsSnapshot);
|
|
6541
6577
|
}
|
|
6542
6578
|
|
|
6543
6579
|
// Re-evaluate aria-expanded when the combobox is open — visible content may have
|
|
@@ -6547,6 +6583,16 @@ function setupCombobox(callbacks, options, onTriggerAttach) {
|
|
|
6547
6583
|
}
|
|
6548
6584
|
});
|
|
6549
6585
|
|
|
6586
|
+
/**
|
|
6587
|
+
* Called whenever the set of visible options may have changed (option register/unregister,
|
|
6588
|
+
* filter change). Refreshes the snapshot synchronously (for pull-based/React subscribers) then
|
|
6589
|
+
* schedules the coalesced push (for push-based/Vue subscribers).
|
|
6590
|
+
*/
|
|
6591
|
+
function notifyVisibilityChange() {
|
|
6592
|
+
refreshOptionsSnapshot();
|
|
6593
|
+
flushVisibilityChange();
|
|
6594
|
+
}
|
|
6595
|
+
|
|
6550
6596
|
// ── Skeleton loading tracking ──────────────────────────────
|
|
6551
6597
|
|
|
6552
6598
|
/** Delay before announcing loading in the live region (ms). */
|
|
@@ -6931,6 +6977,9 @@ function setupCombobox(callbacks, options, onTriggerAttach) {
|
|
|
6931
6977
|
subscribers[event].delete(callback);
|
|
6932
6978
|
};
|
|
6933
6979
|
},
|
|
6980
|
+
getSnapshot(event) {
|
|
6981
|
+
return latestValues[event];
|
|
6982
|
+
},
|
|
6934
6983
|
destroy() {
|
|
6935
6984
|
detach();
|
|
6936
6985
|
trigger = null;
|
|
@@ -6939,10 +6988,16 @@ function setupCombobox(callbacks, options, onTriggerAttach) {
|
|
|
6939
6988
|
lastOptionsLength = 0;
|
|
6940
6989
|
lastInputValue = '';
|
|
6941
6990
|
lastLoadingState = false;
|
|
6991
|
+
optionsSnapshot = undefined;
|
|
6992
|
+
pushedOptionsSnapshot = undefined;
|
|
6993
|
+
// Drop cached snapshots so `getSnapshot` doesn't return stale values after destroy.
|
|
6994
|
+
for (const key of Object.keys(latestValues)) {
|
|
6995
|
+
delete latestValues[key];
|
|
6996
|
+
}
|
|
6942
6997
|
optionRegistrations.clear();
|
|
6943
6998
|
sectionRegistrations.clear();
|
|
6944
6999
|
skeletonCount = 0;
|
|
6945
|
-
|
|
7000
|
+
flushVisibilityChange.cancel();
|
|
6946
7001
|
clearTimeout(loadingTimer);
|
|
6947
7002
|
announcementSent = false;
|
|
6948
7003
|
// Clear all subscribers
|
|
@@ -7199,7 +7254,7 @@ function setupComboboxButton(button, callbacks) {
|
|
|
7199
7254
|
/**
|
|
7200
7255
|
* Component display name.
|
|
7201
7256
|
*/
|
|
7202
|
-
const COMPONENT_NAME$
|
|
7257
|
+
const COMPONENT_NAME$1n = 'ComboboxButton';
|
|
7203
7258
|
|
|
7204
7259
|
/**
|
|
7205
7260
|
* Component default class name and class prefix.
|
|
@@ -7267,6 +7322,203 @@ const ComboboxButton$1 = (props, {
|
|
|
7267
7322
|
/** Same as `React.forwardRef` but inferring Ref type from the `as` prop. */
|
|
7268
7323
|
const forwardRefPolymorphic = React__default.forwardRef;
|
|
7269
7324
|
|
|
7325
|
+
var shim = {exports: {}};
|
|
7326
|
+
|
|
7327
|
+
var useSyncExternalStoreShim_production = {};
|
|
7328
|
+
|
|
7329
|
+
/**
|
|
7330
|
+
* @license React
|
|
7331
|
+
* use-sync-external-store-shim.production.js
|
|
7332
|
+
*
|
|
7333
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7334
|
+
*
|
|
7335
|
+
* This source code is licensed under the MIT license found in the
|
|
7336
|
+
* LICENSE file in the root directory of this source tree.
|
|
7337
|
+
*/
|
|
7338
|
+
|
|
7339
|
+
var hasRequiredUseSyncExternalStoreShim_production;
|
|
7340
|
+
|
|
7341
|
+
function requireUseSyncExternalStoreShim_production () {
|
|
7342
|
+
if (hasRequiredUseSyncExternalStoreShim_production) return useSyncExternalStoreShim_production;
|
|
7343
|
+
hasRequiredUseSyncExternalStoreShim_production = 1;
|
|
7344
|
+
var React = React__default;
|
|
7345
|
+
function is(x, y) {
|
|
7346
|
+
return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
|
|
7347
|
+
}
|
|
7348
|
+
var objectIs = "function" === typeof Object.is ? Object.is : is,
|
|
7349
|
+
useState = React.useState,
|
|
7350
|
+
useEffect = React.useEffect,
|
|
7351
|
+
useLayoutEffect = React.useLayoutEffect,
|
|
7352
|
+
useDebugValue = React.useDebugValue;
|
|
7353
|
+
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
7354
|
+
var value = getSnapshot(),
|
|
7355
|
+
_useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),
|
|
7356
|
+
inst = _useState[0].inst,
|
|
7357
|
+
forceUpdate = _useState[1];
|
|
7358
|
+
useLayoutEffect(
|
|
7359
|
+
function () {
|
|
7360
|
+
inst.value = value;
|
|
7361
|
+
inst.getSnapshot = getSnapshot;
|
|
7362
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
|
|
7363
|
+
},
|
|
7364
|
+
[subscribe, value, getSnapshot]
|
|
7365
|
+
);
|
|
7366
|
+
useEffect(
|
|
7367
|
+
function () {
|
|
7368
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
|
|
7369
|
+
return subscribe(function () {
|
|
7370
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
|
|
7371
|
+
});
|
|
7372
|
+
},
|
|
7373
|
+
[subscribe]
|
|
7374
|
+
);
|
|
7375
|
+
useDebugValue(value);
|
|
7376
|
+
return value;
|
|
7377
|
+
}
|
|
7378
|
+
function checkIfSnapshotChanged(inst) {
|
|
7379
|
+
var latestGetSnapshot = inst.getSnapshot;
|
|
7380
|
+
inst = inst.value;
|
|
7381
|
+
try {
|
|
7382
|
+
var nextValue = latestGetSnapshot();
|
|
7383
|
+
return !objectIs(inst, nextValue);
|
|
7384
|
+
} catch (error) {
|
|
7385
|
+
return true;
|
|
7386
|
+
}
|
|
7387
|
+
}
|
|
7388
|
+
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
7389
|
+
return getSnapshot();
|
|
7390
|
+
}
|
|
7391
|
+
var shim =
|
|
7392
|
+
"undefined" === typeof window ||
|
|
7393
|
+
"undefined" === typeof window.document ||
|
|
7394
|
+
"undefined" === typeof window.document.createElement
|
|
7395
|
+
? useSyncExternalStore$1
|
|
7396
|
+
: useSyncExternalStore$2;
|
|
7397
|
+
useSyncExternalStoreShim_production.useSyncExternalStore =
|
|
7398
|
+
void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
|
7399
|
+
return useSyncExternalStoreShim_production;
|
|
7400
|
+
}
|
|
7401
|
+
|
|
7402
|
+
var useSyncExternalStoreShim_development = {};
|
|
7403
|
+
|
|
7404
|
+
/**
|
|
7405
|
+
* @license React
|
|
7406
|
+
* use-sync-external-store-shim.development.js
|
|
7407
|
+
*
|
|
7408
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7409
|
+
*
|
|
7410
|
+
* This source code is licensed under the MIT license found in the
|
|
7411
|
+
* LICENSE file in the root directory of this source tree.
|
|
7412
|
+
*/
|
|
7413
|
+
|
|
7414
|
+
var hasRequiredUseSyncExternalStoreShim_development;
|
|
7415
|
+
|
|
7416
|
+
function requireUseSyncExternalStoreShim_development () {
|
|
7417
|
+
if (hasRequiredUseSyncExternalStoreShim_development) return useSyncExternalStoreShim_development;
|
|
7418
|
+
hasRequiredUseSyncExternalStoreShim_development = 1;
|
|
7419
|
+
"production" !== process.env.NODE_ENV &&
|
|
7420
|
+
(function () {
|
|
7421
|
+
function is(x, y) {
|
|
7422
|
+
return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
|
|
7423
|
+
}
|
|
7424
|
+
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
7425
|
+
didWarnOld18Alpha ||
|
|
7426
|
+
void 0 === React.startTransition ||
|
|
7427
|
+
((didWarnOld18Alpha = true),
|
|
7428
|
+
console.error(
|
|
7429
|
+
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
7430
|
+
));
|
|
7431
|
+
var value = getSnapshot();
|
|
7432
|
+
if (!didWarnUncachedGetSnapshot) {
|
|
7433
|
+
var cachedValue = getSnapshot();
|
|
7434
|
+
objectIs(value, cachedValue) ||
|
|
7435
|
+
(console.error(
|
|
7436
|
+
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
7437
|
+
),
|
|
7438
|
+
(didWarnUncachedGetSnapshot = true));
|
|
7439
|
+
}
|
|
7440
|
+
cachedValue = useState({
|
|
7441
|
+
inst: { value: value, getSnapshot: getSnapshot }
|
|
7442
|
+
});
|
|
7443
|
+
var inst = cachedValue[0].inst,
|
|
7444
|
+
forceUpdate = cachedValue[1];
|
|
7445
|
+
useLayoutEffect(
|
|
7446
|
+
function () {
|
|
7447
|
+
inst.value = value;
|
|
7448
|
+
inst.getSnapshot = getSnapshot;
|
|
7449
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
|
|
7450
|
+
},
|
|
7451
|
+
[subscribe, value, getSnapshot]
|
|
7452
|
+
);
|
|
7453
|
+
useEffect(
|
|
7454
|
+
function () {
|
|
7455
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
|
|
7456
|
+
return subscribe(function () {
|
|
7457
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
|
|
7458
|
+
});
|
|
7459
|
+
},
|
|
7460
|
+
[subscribe]
|
|
7461
|
+
);
|
|
7462
|
+
useDebugValue(value);
|
|
7463
|
+
return value;
|
|
7464
|
+
}
|
|
7465
|
+
function checkIfSnapshotChanged(inst) {
|
|
7466
|
+
var latestGetSnapshot = inst.getSnapshot;
|
|
7467
|
+
inst = inst.value;
|
|
7468
|
+
try {
|
|
7469
|
+
var nextValue = latestGetSnapshot();
|
|
7470
|
+
return !objectIs(inst, nextValue);
|
|
7471
|
+
} catch (error) {
|
|
7472
|
+
return true;
|
|
7473
|
+
}
|
|
7474
|
+
}
|
|
7475
|
+
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
7476
|
+
return getSnapshot();
|
|
7477
|
+
}
|
|
7478
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
|
7479
|
+
"function" ===
|
|
7480
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
|
|
7481
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
7482
|
+
var React = React__default,
|
|
7483
|
+
objectIs = "function" === typeof Object.is ? Object.is : is,
|
|
7484
|
+
useState = React.useState,
|
|
7485
|
+
useEffect = React.useEffect,
|
|
7486
|
+
useLayoutEffect = React.useLayoutEffect,
|
|
7487
|
+
useDebugValue = React.useDebugValue,
|
|
7488
|
+
didWarnOld18Alpha = false,
|
|
7489
|
+
didWarnUncachedGetSnapshot = false,
|
|
7490
|
+
shim =
|
|
7491
|
+
"undefined" === typeof window ||
|
|
7492
|
+
"undefined" === typeof window.document ||
|
|
7493
|
+
"undefined" === typeof window.document.createElement
|
|
7494
|
+
? useSyncExternalStore$1
|
|
7495
|
+
: useSyncExternalStore$2;
|
|
7496
|
+
useSyncExternalStoreShim_development.useSyncExternalStore =
|
|
7497
|
+
void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
|
7498
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
|
7499
|
+
"function" ===
|
|
7500
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
|
7501
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
7502
|
+
})();
|
|
7503
|
+
return useSyncExternalStoreShim_development;
|
|
7504
|
+
}
|
|
7505
|
+
|
|
7506
|
+
var hasRequiredShim;
|
|
7507
|
+
|
|
7508
|
+
function requireShim () {
|
|
7509
|
+
if (hasRequiredShim) return shim.exports;
|
|
7510
|
+
hasRequiredShim = 1;
|
|
7511
|
+
|
|
7512
|
+
if (process.env.NODE_ENV === 'production') {
|
|
7513
|
+
shim.exports = requireUseSyncExternalStoreShim_production();
|
|
7514
|
+
} else {
|
|
7515
|
+
shim.exports = requireUseSyncExternalStoreShim_development();
|
|
7516
|
+
}
|
|
7517
|
+
return shim.exports;
|
|
7518
|
+
}
|
|
7519
|
+
|
|
7520
|
+
var shimExports = requireShim();
|
|
7521
|
+
|
|
7270
7522
|
/** Context value shared between Combobox sub-components. */
|
|
7271
7523
|
|
|
7272
7524
|
const ComboboxContext = /*#__PURE__*/createContext(undefined);
|
|
@@ -7286,17 +7538,28 @@ function useComboboxContext() {
|
|
|
7286
7538
|
|
|
7287
7539
|
/**
|
|
7288
7540
|
* Hook to subscribe to a combobox event via the handle's subscriber system.
|
|
7541
|
+
*
|
|
7542
|
+
* Uses `useSyncExternalStore` (shim, for React 17 support) reading the handle's synchronous
|
|
7543
|
+
* `getSnapshot`. This lets React pick up changes during its own commit — notably the
|
|
7544
|
+
* `optionsChange` snapshot, which the handle refreshes synchronously while coalescing the actual
|
|
7545
|
+
* subscriber push into a microtask. Reading the snapshot during commit avoids a state update
|
|
7546
|
+
* landing in the microtask outside `act` (which unit tests report as an un-acted update).
|
|
7547
|
+
*
|
|
7289
7548
|
* Re-subscribes when the handle changes (e.g. trigger mount/unmount).
|
|
7290
7549
|
*/
|
|
7291
7550
|
function useComboboxEvent(event, initialValue) {
|
|
7292
7551
|
const {
|
|
7293
7552
|
handle
|
|
7294
7553
|
} = useComboboxContext();
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
|
|
7554
|
+
|
|
7555
|
+
// Stable fallback used until the event has fired at least once (or while there is no handle).
|
|
7556
|
+
const initialValueRef = useRef(initialValue);
|
|
7557
|
+
const subscribe = useCallback(onStoreChange => handle?.subscribe(event, onStoreChange) ?? (() => undefined), [handle, event]);
|
|
7558
|
+
const getSnapshot = useCallback(() => {
|
|
7559
|
+
const value = handle?.getSnapshot(event);
|
|
7560
|
+
return value === undefined ? initialValueRef.current : value;
|
|
7298
7561
|
}, [handle, event]);
|
|
7299
|
-
return
|
|
7562
|
+
return shimExports.useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
7300
7563
|
}
|
|
7301
7564
|
|
|
7302
7565
|
/**
|
|
@@ -7388,7 +7651,7 @@ const ComboboxButton = Object.assign(forwardRefPolymorphic((props, ref) => {
|
|
|
7388
7651
|
Tooltip
|
|
7389
7652
|
});
|
|
7390
7653
|
}), {
|
|
7391
|
-
displayName: COMPONENT_NAME$
|
|
7654
|
+
displayName: COMPONENT_NAME$1n,
|
|
7392
7655
|
className: CLASSNAME$1k
|
|
7393
7656
|
});
|
|
7394
7657
|
|
|
@@ -7553,7 +7816,7 @@ function getDisabledState(context, props) {
|
|
|
7553
7816
|
/**
|
|
7554
7817
|
* Component display name.
|
|
7555
7818
|
*/
|
|
7556
|
-
const COMPONENT_NAME$
|
|
7819
|
+
const COMPONENT_NAME$1m = 'ComboboxInput';
|
|
7557
7820
|
|
|
7558
7821
|
/**
|
|
7559
7822
|
* Component default class name and class prefix.
|
|
@@ -7621,7 +7884,7 @@ const ComboboxInput$1 = (props, {
|
|
|
7621
7884
|
/**
|
|
7622
7885
|
* Component display name.
|
|
7623
7886
|
*/
|
|
7624
|
-
const COMPONENT_NAME$
|
|
7887
|
+
const COMPONENT_NAME$1l = 'TextField';
|
|
7625
7888
|
|
|
7626
7889
|
/**
|
|
7627
7890
|
* Component default class name and class prefix.
|
|
@@ -8161,7 +8424,7 @@ const TextField = forwardRef((props, ref) => {
|
|
|
8161
8424
|
} : undefined
|
|
8162
8425
|
});
|
|
8163
8426
|
});
|
|
8164
|
-
TextField.displayName = COMPONENT_NAME$
|
|
8427
|
+
TextField.displayName = COMPONENT_NAME$1l;
|
|
8165
8428
|
TextField.className = CLASSNAME$1i;
|
|
8166
8429
|
TextField.defaultProps = DEFAULT_PROPS$10;
|
|
8167
8430
|
|
|
@@ -8250,13 +8513,13 @@ const ComboboxInput = forwardRef((props, ref) => {
|
|
|
8250
8513
|
IconButton
|
|
8251
8514
|
});
|
|
8252
8515
|
});
|
|
8253
|
-
ComboboxInput.displayName = COMPONENT_NAME$
|
|
8516
|
+
ComboboxInput.displayName = COMPONENT_NAME$1m;
|
|
8254
8517
|
ComboboxInput.className = CLASSNAME$1j;
|
|
8255
8518
|
|
|
8256
8519
|
/**
|
|
8257
8520
|
* Component display name.
|
|
8258
8521
|
*/
|
|
8259
|
-
const COMPONENT_NAME$
|
|
8522
|
+
const COMPONENT_NAME$1k = 'List';
|
|
8260
8523
|
|
|
8261
8524
|
/**
|
|
8262
8525
|
* Component default class name and class prefix.
|
|
@@ -8294,7 +8557,7 @@ const List$1 = props => {
|
|
|
8294
8557
|
children: children
|
|
8295
8558
|
});
|
|
8296
8559
|
};
|
|
8297
|
-
List$1.displayName = COMPONENT_NAME$
|
|
8560
|
+
List$1.displayName = COMPONENT_NAME$1k;
|
|
8298
8561
|
List$1.className = CLASSNAME$1h;
|
|
8299
8562
|
List$1.defaultProps = DEFAULT_PROPS$$;
|
|
8300
8563
|
|
|
@@ -8311,7 +8574,7 @@ List$1.defaultProps = DEFAULT_PROPS$$;
|
|
|
8311
8574
|
/**
|
|
8312
8575
|
* Component display name.
|
|
8313
8576
|
*/
|
|
8314
|
-
const COMPONENT_NAME$
|
|
8577
|
+
const COMPONENT_NAME$1j = 'ComboboxList';
|
|
8315
8578
|
|
|
8316
8579
|
/**
|
|
8317
8580
|
* Component default class name and class prefix.
|
|
@@ -8428,13 +8691,13 @@ const ComboboxList = forwardRef((props, ref) => {
|
|
|
8428
8691
|
})
|
|
8429
8692
|
});
|
|
8430
8693
|
});
|
|
8431
|
-
ComboboxList.displayName = COMPONENT_NAME$
|
|
8694
|
+
ComboboxList.displayName = COMPONENT_NAME$1j;
|
|
8432
8695
|
ComboboxList.className = CLASSNAME$1g;
|
|
8433
8696
|
|
|
8434
8697
|
/**
|
|
8435
8698
|
* Component display name.
|
|
8436
8699
|
*/
|
|
8437
|
-
const COMPONENT_NAME$
|
|
8700
|
+
const COMPONENT_NAME$1i = 'ListItem';
|
|
8438
8701
|
|
|
8439
8702
|
/**
|
|
8440
8703
|
* Component default class name and class prefix.
|
|
@@ -8510,7 +8773,7 @@ const ListItem$1 = props => {
|
|
|
8510
8773
|
})
|
|
8511
8774
|
});
|
|
8512
8775
|
};
|
|
8513
|
-
ListItem$1.displayName = COMPONENT_NAME$
|
|
8776
|
+
ListItem$1.displayName = COMPONENT_NAME$1i;
|
|
8514
8777
|
ListItem$1.className = CLASSNAME$1f;
|
|
8515
8778
|
ListItem$1.defaultProps = DEFAULT_PROPS$_;
|
|
8516
8779
|
|
|
@@ -8521,7 +8784,7 @@ ListItem$1.defaultProps = DEFAULT_PROPS$_;
|
|
|
8521
8784
|
/**
|
|
8522
8785
|
* Component display name.
|
|
8523
8786
|
*/
|
|
8524
|
-
const COMPONENT_NAME$
|
|
8787
|
+
const COMPONENT_NAME$1h = 'ListItemAction';
|
|
8525
8788
|
|
|
8526
8789
|
/**
|
|
8527
8790
|
* Component classname (used by action area CSS pattern).
|
|
@@ -8560,7 +8823,7 @@ const ListItemAction$1 = props => {
|
|
|
8560
8823
|
/**
|
|
8561
8824
|
* Component display name.
|
|
8562
8825
|
*/
|
|
8563
|
-
const COMPONENT_NAME$
|
|
8826
|
+
const COMPONENT_NAME$1g = 'ComboboxOption';
|
|
8564
8827
|
|
|
8565
8828
|
/**
|
|
8566
8829
|
* Component default class name and class prefix.
|
|
@@ -8753,7 +9016,7 @@ const ComboboxOption = forwardRef((props, ref) => {
|
|
|
8753
9016
|
Tooltip
|
|
8754
9017
|
});
|
|
8755
9018
|
});
|
|
8756
|
-
ComboboxOption.displayName = COMPONENT_NAME$
|
|
9019
|
+
ComboboxOption.displayName = COMPONENT_NAME$1g;
|
|
8757
9020
|
ComboboxOption.className = CLASSNAME$1d;
|
|
8758
9021
|
|
|
8759
9022
|
/**
|
|
@@ -8763,7 +9026,7 @@ ComboboxOption.className = CLASSNAME$1d;
|
|
|
8763
9026
|
/**
|
|
8764
9027
|
* Component display name.
|
|
8765
9028
|
*/
|
|
8766
|
-
const COMPONENT_NAME$
|
|
9029
|
+
const COMPONENT_NAME$1f = 'ComboboxOptionAction';
|
|
8767
9030
|
|
|
8768
9031
|
/**
|
|
8769
9032
|
* Component default class name and class prefix.
|
|
@@ -8841,14 +9104,14 @@ const ComboboxOptionAction = Object.assign(forwardRefPolymorphic((props, ref) =>
|
|
|
8841
9104
|
children
|
|
8842
9105
|
});
|
|
8843
9106
|
}), {
|
|
8844
|
-
displayName: COMPONENT_NAME$
|
|
9107
|
+
displayName: COMPONENT_NAME$1f,
|
|
8845
9108
|
className: CLASSNAME$1c
|
|
8846
9109
|
});
|
|
8847
9110
|
|
|
8848
9111
|
/**
|
|
8849
9112
|
* Component display name.
|
|
8850
9113
|
*/
|
|
8851
|
-
const COMPONENT_NAME$
|
|
9114
|
+
const COMPONENT_NAME$1e = 'ComboboxOptionMoreInfo';
|
|
8852
9115
|
|
|
8853
9116
|
/**
|
|
8854
9117
|
* Component default class name and class prefix.
|
|
@@ -9170,7 +9433,7 @@ const POPOVER_ZINDEX = 9999;
|
|
|
9170
9433
|
/**
|
|
9171
9434
|
* Component display name.
|
|
9172
9435
|
*/
|
|
9173
|
-
const COMPONENT_NAME$
|
|
9436
|
+
const COMPONENT_NAME$1d = 'Popover';
|
|
9174
9437
|
|
|
9175
9438
|
/**
|
|
9176
9439
|
* Component default class name and class prefix.
|
|
@@ -9705,7 +9968,7 @@ const _InnerPopover = forwardRef((props, ref) => {
|
|
|
9705
9968
|
ThemeProvider
|
|
9706
9969
|
});
|
|
9707
9970
|
});
|
|
9708
|
-
_InnerPopover.displayName = COMPONENT_NAME$
|
|
9971
|
+
_InnerPopover.displayName = COMPONENT_NAME$1d;
|
|
9709
9972
|
|
|
9710
9973
|
/**
|
|
9711
9974
|
* Popover component.
|
|
@@ -9717,7 +9980,7 @@ _InnerPopover.displayName = COMPONENT_NAME$1c;
|
|
|
9717
9980
|
const Popover = skipRender(
|
|
9718
9981
|
// Skip render in SSR
|
|
9719
9982
|
() => Boolean(DOCUMENT), _InnerPopover);
|
|
9720
|
-
Popover.displayName = COMPONENT_NAME$
|
|
9983
|
+
Popover.displayName = COMPONENT_NAME$1d;
|
|
9721
9984
|
Popover.className = CLASSNAME$1a;
|
|
9722
9985
|
Popover.defaultProps = DEFAULT_PROPS$Y;
|
|
9723
9986
|
|
|
@@ -9781,13 +10044,13 @@ const ComboboxOptionMoreInfo = props => {
|
|
|
9781
10044
|
Popover
|
|
9782
10045
|
});
|
|
9783
10046
|
};
|
|
9784
|
-
ComboboxOptionMoreInfo.displayName = COMPONENT_NAME$
|
|
10047
|
+
ComboboxOptionMoreInfo.displayName = COMPONENT_NAME$1e;
|
|
9785
10048
|
ComboboxOptionMoreInfo.className = CLASSNAME$1b;
|
|
9786
10049
|
|
|
9787
10050
|
/**
|
|
9788
10051
|
* Component display name.
|
|
9789
10052
|
*/
|
|
9790
|
-
const COMPONENT_NAME$
|
|
10053
|
+
const COMPONENT_NAME$1c = 'SkeletonTypography';
|
|
9791
10054
|
|
|
9792
10055
|
/**
|
|
9793
10056
|
* Component default class name and class prefix.
|
|
@@ -9835,7 +10098,7 @@ const SkeletonTypography$1 = props => {
|
|
|
9835
10098
|
/**
|
|
9836
10099
|
* Component display name.
|
|
9837
10100
|
*/
|
|
9838
|
-
const COMPONENT_NAME$
|
|
10101
|
+
const COMPONENT_NAME$1b = 'ComboboxOptionSkeleton';
|
|
9839
10102
|
|
|
9840
10103
|
/**
|
|
9841
10104
|
* Component default class name and class prefix.
|
|
@@ -9920,12 +10183,12 @@ const ComboboxOptionSkeleton = props => {
|
|
|
9920
10183
|
...props
|
|
9921
10184
|
});
|
|
9922
10185
|
};
|
|
9923
|
-
ComboboxOptionSkeleton.displayName = COMPONENT_NAME$
|
|
10186
|
+
ComboboxOptionSkeleton.displayName = COMPONENT_NAME$1b;
|
|
9924
10187
|
ComboboxOptionSkeleton.className = CLASSNAME$18;
|
|
9925
10188
|
|
|
9926
10189
|
const DEFAULT_COMBOBOX_POPOVER_MAX_HEIGHT = '80vh';
|
|
9927
10190
|
|
|
9928
|
-
const COMPONENT_NAME$
|
|
10191
|
+
const COMPONENT_NAME$1a = 'ComboboxPopover';
|
|
9929
10192
|
|
|
9930
10193
|
/**
|
|
9931
10194
|
* Component default class name.
|
|
@@ -9999,7 +10262,7 @@ const ComboboxPopover$1 = (props, {
|
|
|
9999
10262
|
/**
|
|
10000
10263
|
* Component display name.
|
|
10001
10264
|
*/
|
|
10002
|
-
const COMPONENT_NAME$
|
|
10265
|
+
const COMPONENT_NAME$19 = 'FlexBox';
|
|
10003
10266
|
|
|
10004
10267
|
/**
|
|
10005
10268
|
* Component default class name and class prefix.
|
|
@@ -10063,7 +10326,7 @@ const FlexBox = forwardRef((props, ref) => {
|
|
|
10063
10326
|
children: children
|
|
10064
10327
|
});
|
|
10065
10328
|
});
|
|
10066
|
-
FlexBox.displayName = COMPONENT_NAME$
|
|
10329
|
+
FlexBox.displayName = COMPONENT_NAME$19;
|
|
10067
10330
|
FlexBox.className = CLASSNAME$16;
|
|
10068
10331
|
|
|
10069
10332
|
/**
|
|
@@ -10102,7 +10365,7 @@ const ComboboxPopover = props => {
|
|
|
10102
10365
|
FlexBox
|
|
10103
10366
|
});
|
|
10104
10367
|
};
|
|
10105
|
-
ComboboxPopover.displayName = COMPONENT_NAME$
|
|
10368
|
+
ComboboxPopover.displayName = COMPONENT_NAME$1a;
|
|
10106
10369
|
ComboboxPopover.className = CLASSNAME$17;
|
|
10107
10370
|
|
|
10108
10371
|
/**
|
|
@@ -10148,7 +10411,7 @@ ComboboxProvider.displayName = 'Combobox.Provider';
|
|
|
10148
10411
|
/**
|
|
10149
10412
|
* Component display name.
|
|
10150
10413
|
*/
|
|
10151
|
-
const COMPONENT_NAME$
|
|
10414
|
+
const COMPONENT_NAME$18 = 'ComboboxSection';
|
|
10152
10415
|
|
|
10153
10416
|
/**
|
|
10154
10417
|
* Component default class name and class prefix.
|
|
@@ -10192,7 +10455,7 @@ const ComboboxSection$1 = (props, {
|
|
|
10192
10455
|
/**
|
|
10193
10456
|
* Component display name.
|
|
10194
10457
|
*/
|
|
10195
|
-
const COMPONENT_NAME$
|
|
10458
|
+
const COMPONENT_NAME$17 = 'ListSection';
|
|
10196
10459
|
|
|
10197
10460
|
/**
|
|
10198
10461
|
* Component default class name and class prefix.
|
|
@@ -10248,7 +10511,7 @@ const ListSection$1 = props => {
|
|
|
10248
10511
|
})]
|
|
10249
10512
|
});
|
|
10250
10513
|
};
|
|
10251
|
-
ListSection$1.displayName = COMPONENT_NAME$
|
|
10514
|
+
ListSection$1.displayName = COMPONENT_NAME$17;
|
|
10252
10515
|
ListSection$1.className = CLASSNAME$14;
|
|
10253
10516
|
ListSection$1.defaultProps = DEFAULT_PROPS$X;
|
|
10254
10517
|
|
|
@@ -10272,7 +10535,7 @@ const ListSection = forwardRef((props, ref) => {
|
|
|
10272
10535
|
Text
|
|
10273
10536
|
});
|
|
10274
10537
|
});
|
|
10275
|
-
ListSection.displayName = COMPONENT_NAME$
|
|
10538
|
+
ListSection.displayName = COMPONENT_NAME$17;
|
|
10276
10539
|
ListSection.className = CLASSNAME$14;
|
|
10277
10540
|
ListSection.defaultProps = DEFAULT_PROPS$X;
|
|
10278
10541
|
|
|
@@ -10322,13 +10585,13 @@ const ComboboxSection = forwardRef((props, ref) => {
|
|
|
10322
10585
|
ListSection
|
|
10323
10586
|
});
|
|
10324
10587
|
});
|
|
10325
|
-
ComboboxSection.displayName = COMPONENT_NAME$
|
|
10588
|
+
ComboboxSection.displayName = COMPONENT_NAME$18;
|
|
10326
10589
|
ComboboxSection.className = CLASSNAME$15;
|
|
10327
10590
|
|
|
10328
10591
|
/**
|
|
10329
10592
|
* Component display name.
|
|
10330
10593
|
*/
|
|
10331
|
-
const COMPONENT_NAME$
|
|
10594
|
+
const COMPONENT_NAME$16 = 'ComboboxState';
|
|
10332
10595
|
|
|
10333
10596
|
/**
|
|
10334
10597
|
* Component default class name and class prefix.
|
|
@@ -10509,7 +10772,7 @@ function partitionMulti(elements, predicates) {
|
|
|
10509
10772
|
/**
|
|
10510
10773
|
* Component display name.
|
|
10511
10774
|
*/
|
|
10512
|
-
const COMPONENT_NAME$
|
|
10775
|
+
const COMPONENT_NAME$15 = 'GenericBlock';
|
|
10513
10776
|
|
|
10514
10777
|
/**
|
|
10515
10778
|
* Component default class name and class prefix.
|
|
@@ -10660,7 +10923,7 @@ const BaseGenericBlock = forwardRef((props, ref) => {
|
|
|
10660
10923
|
}) : undefined
|
|
10661
10924
|
});
|
|
10662
10925
|
});
|
|
10663
|
-
BaseGenericBlock.displayName = COMPONENT_NAME$
|
|
10926
|
+
BaseGenericBlock.displayName = COMPONENT_NAME$15;
|
|
10664
10927
|
BaseGenericBlock.className = CLASSNAME$12;
|
|
10665
10928
|
BaseGenericBlock.defaultProps = DEFAULT_PROPS$W;
|
|
10666
10929
|
const GenericBlock = Object.assign(BaseGenericBlock, {
|
|
@@ -10740,13 +11003,13 @@ const ComboboxState = props => {
|
|
|
10740
11003
|
Text
|
|
10741
11004
|
});
|
|
10742
11005
|
};
|
|
10743
|
-
ComboboxState.displayName = COMPONENT_NAME$
|
|
11006
|
+
ComboboxState.displayName = COMPONENT_NAME$16;
|
|
10744
11007
|
ComboboxState.className = CLASSNAME$13;
|
|
10745
11008
|
|
|
10746
11009
|
/**
|
|
10747
11010
|
* Component display name.
|
|
10748
11011
|
*/
|
|
10749
|
-
const COMPONENT_NAME$
|
|
11012
|
+
const COMPONENT_NAME$14 = 'ListDivider';
|
|
10750
11013
|
|
|
10751
11014
|
/**
|
|
10752
11015
|
* Component default class name and class prefix.
|
|
@@ -10778,7 +11041,7 @@ const ListDivider$1 = props => {
|
|
|
10778
11041
|
className: classnames(className, CLASSNAME$11)
|
|
10779
11042
|
});
|
|
10780
11043
|
};
|
|
10781
|
-
ListDivider$1.displayName = COMPONENT_NAME$
|
|
11044
|
+
ListDivider$1.displayName = COMPONENT_NAME$14;
|
|
10782
11045
|
ListDivider$1.className = CLASSNAME$11;
|
|
10783
11046
|
ListDivider$1.defaultProps = DEFAULT_PROPS$V;
|
|
10784
11047
|
|
|
@@ -10800,7 +11063,7 @@ const ListDivider = forwardRef((props, ref) => {
|
|
|
10800
11063
|
ref
|
|
10801
11064
|
});
|
|
10802
11065
|
});
|
|
10803
|
-
ListDivider.displayName = COMPONENT_NAME$
|
|
11066
|
+
ListDivider.displayName = COMPONENT_NAME$14;
|
|
10804
11067
|
ListDivider.className = CLASSNAME$11;
|
|
10805
11068
|
ListDivider.defaultProps = DEFAULT_PROPS$V;
|
|
10806
11069
|
|
|
@@ -10851,7 +11114,7 @@ const CommentBlockVariant = {
|
|
|
10851
11114
|
/**
|
|
10852
11115
|
* Component display name.
|
|
10853
11116
|
*/
|
|
10854
|
-
const COMPONENT_NAME$
|
|
11117
|
+
const COMPONENT_NAME$13 = 'CommentBlock';
|
|
10855
11118
|
|
|
10856
11119
|
/**
|
|
10857
11120
|
* Component default class name and class prefix.
|
|
@@ -10962,7 +11225,7 @@ const CommentBlock = forwardRef((props, ref) => {
|
|
|
10962
11225
|
})]
|
|
10963
11226
|
});
|
|
10964
11227
|
});
|
|
10965
|
-
CommentBlock.displayName = COMPONENT_NAME$
|
|
11228
|
+
CommentBlock.displayName = COMPONENT_NAME$13;
|
|
10966
11229
|
CommentBlock.className = CLASSNAME$10;
|
|
10967
11230
|
CommentBlock.defaultProps = DEFAULT_PROPS$U;
|
|
10968
11231
|
|
|
@@ -10984,7 +11247,7 @@ const isDateValid = date => date instanceof Date && !Number.isNaN(date.getTime()
|
|
|
10984
11247
|
/**
|
|
10985
11248
|
* Component display name.
|
|
10986
11249
|
*/
|
|
10987
|
-
const COMPONENT_NAME$
|
|
11250
|
+
const COMPONENT_NAME$12 = 'DatePicker';
|
|
10988
11251
|
|
|
10989
11252
|
/**
|
|
10990
11253
|
* Component default class name and class prefix.
|
|
@@ -11221,7 +11484,7 @@ const {
|
|
|
11221
11484
|
/**
|
|
11222
11485
|
* Component display name.
|
|
11223
11486
|
*/
|
|
11224
|
-
const COMPONENT_NAME$
|
|
11487
|
+
const COMPONENT_NAME$11 = 'DatePickerControlled';
|
|
11225
11488
|
|
|
11226
11489
|
/**
|
|
11227
11490
|
* DatePickerControlled component.
|
|
@@ -11411,7 +11674,7 @@ const DatePickerControlled = forwardRef((props, ref) => {
|
|
|
11411
11674
|
})]
|
|
11412
11675
|
});
|
|
11413
11676
|
});
|
|
11414
|
-
DatePickerControlled.displayName = COMPONENT_NAME$
|
|
11677
|
+
DatePickerControlled.displayName = COMPONENT_NAME$11;
|
|
11415
11678
|
DatePickerControlled.className = CLASSNAME$$;
|
|
11416
11679
|
|
|
11417
11680
|
/**
|
|
@@ -11454,7 +11717,7 @@ const DatePicker = forwardRef((props, ref) => {
|
|
|
11454
11717
|
onMonthChange: setSelectedMonth
|
|
11455
11718
|
});
|
|
11456
11719
|
});
|
|
11457
|
-
DatePicker.displayName = COMPONENT_NAME$
|
|
11720
|
+
DatePicker.displayName = COMPONENT_NAME$12;
|
|
11458
11721
|
DatePicker.className = CLASSNAME$$;
|
|
11459
11722
|
|
|
11460
11723
|
const useBooleanState = defaultValue => {
|
|
@@ -11468,7 +11731,7 @@ const useBooleanState = defaultValue => {
|
|
|
11468
11731
|
/**
|
|
11469
11732
|
* Component display name.
|
|
11470
11733
|
*/
|
|
11471
|
-
const COMPONENT_NAME
|
|
11734
|
+
const COMPONENT_NAME$10 = 'DatePickerField';
|
|
11472
11735
|
|
|
11473
11736
|
/**
|
|
11474
11737
|
* DatePickerField component.
|
|
@@ -11557,7 +11820,7 @@ const DatePickerField = forwardRef((props, ref) => {
|
|
|
11557
11820
|
}) : null]
|
|
11558
11821
|
});
|
|
11559
11822
|
});
|
|
11560
|
-
DatePickerField.displayName = COMPONENT_NAME
|
|
11823
|
+
DatePickerField.displayName = COMPONENT_NAME$10;
|
|
11561
11824
|
|
|
11562
11825
|
/**
|
|
11563
11826
|
* Convenient hook to create interaction observers.
|
|
@@ -11850,13 +12113,23 @@ const useTransitionVisibility = (ref, isComponentVisible, timeout, onVisibilityC
|
|
|
11850
12113
|
return isVisible || isComponentVisible;
|
|
11851
12114
|
};
|
|
11852
12115
|
|
|
12116
|
+
/**
|
|
12117
|
+
* Dialog label id key in IdsRegistry
|
|
12118
|
+
*/
|
|
12119
|
+
const DIALOG_LABEL_KEY = 'dialog-label';
|
|
12120
|
+
|
|
11853
12121
|
/**
|
|
11854
12122
|
* Component display name.
|
|
11855
12123
|
*/
|
|
11856
|
-
const COMPONENT_NAME
|
|
12124
|
+
const COMPONENT_NAME$$ = 'Dialog';
|
|
11857
12125
|
|
|
11858
12126
|
/**
|
|
11859
|
-
*
|
|
12127
|
+
* `DialogHeading` component display name.
|
|
12128
|
+
*/
|
|
12129
|
+
const DIALOG_HEADING_COMPONENT_NAME = 'DialogHeading';
|
|
12130
|
+
|
|
12131
|
+
/**
|
|
12132
|
+
* Component default class name and class prefix. Shared by the shell and the container modules.
|
|
11860
12133
|
*/
|
|
11861
12134
|
const CLASSNAME$_ = 'lumx-dialog';
|
|
11862
12135
|
const {
|
|
@@ -11872,46 +12145,25 @@ const DEFAULT_PROPS$T = {
|
|
|
11872
12145
|
};
|
|
11873
12146
|
|
|
11874
12147
|
/**
|
|
11875
|
-
* Dialog
|
|
12148
|
+
* Dialog shell: overlay + context providers (theme, heading level, ids registry).
|
|
11876
12149
|
*
|
|
11877
12150
|
* @param props Component props.
|
|
11878
|
-
* @param ref Component ref.
|
|
11879
12151
|
* @return React element.
|
|
11880
12152
|
*/
|
|
11881
|
-
const
|
|
12153
|
+
const DialogShell = props => {
|
|
11882
12154
|
const {
|
|
11883
12155
|
className,
|
|
11884
12156
|
ref,
|
|
11885
|
-
header,
|
|
11886
|
-
forceFooterDivider,
|
|
11887
|
-
forceHeaderDivider,
|
|
11888
|
-
footer,
|
|
11889
|
-
isLoading,
|
|
11890
12157
|
isOpen,
|
|
11891
|
-
|
|
11892
|
-
|
|
12158
|
+
isLoading,
|
|
12159
|
+
isVisible,
|
|
11893
12160
|
size = DEFAULT_PROPS$T.size,
|
|
11894
12161
|
zIndex,
|
|
11895
|
-
|
|
11896
|
-
headerChildContent,
|
|
11897
|
-
isVisible,
|
|
12162
|
+
children,
|
|
11898
12163
|
Portal,
|
|
11899
12164
|
HeadingLevelProvider,
|
|
11900
12165
|
ThemeProvider,
|
|
11901
|
-
|
|
11902
|
-
shouldPreventCloseOnClickAway,
|
|
11903
|
-
clickAwayRefs,
|
|
11904
|
-
rootRef,
|
|
11905
|
-
wrapperRef,
|
|
11906
|
-
hasTopIntersection,
|
|
11907
|
-
headerChildProps,
|
|
11908
|
-
setSentinelTop,
|
|
11909
|
-
content,
|
|
11910
|
-
setSentinelBottom,
|
|
11911
|
-
footerChildContent,
|
|
11912
|
-
footerChildProps,
|
|
11913
|
-
ProgressCircular,
|
|
11914
|
-
hasBottomIntersection,
|
|
12166
|
+
IdsRegistryProvider,
|
|
11915
12167
|
...forwardedProps
|
|
11916
12168
|
} = props;
|
|
11917
12169
|
return /*#__PURE__*/jsx(Portal, {
|
|
@@ -11933,50 +12185,8 @@ const Dialog$1 = props => {
|
|
|
11933
12185
|
level: 2,
|
|
11934
12186
|
children: /*#__PURE__*/jsx(ThemeProvider, {
|
|
11935
12187
|
value: undefined,
|
|
11936
|
-
children: /*#__PURE__*/jsx(
|
|
11937
|
-
|
|
11938
|
-
role: "dialog",
|
|
11939
|
-
"aria-modal": "true",
|
|
11940
|
-
...dialogProps,
|
|
11941
|
-
children: /*#__PURE__*/jsx(ClickAwayProvider, {
|
|
11942
|
-
callback: !shouldPreventCloseOnClickAway && handleClose,
|
|
11943
|
-
childrenRefs: clickAwayRefs,
|
|
11944
|
-
parentRef: rootRef,
|
|
11945
|
-
children: /*#__PURE__*/jsxs("section", {
|
|
11946
|
-
className: element$B('wrapper'),
|
|
11947
|
-
ref: wrapperRef,
|
|
11948
|
-
children: [(header || headerChildContent) && /*#__PURE__*/jsxs("header", {
|
|
11949
|
-
...headerChildProps,
|
|
11950
|
-
className: classnames(element$B('header', {
|
|
11951
|
-
'has-divider': Boolean(forceHeaderDivider || hasTopIntersection)
|
|
11952
|
-
}), headerChildProps?.className),
|
|
11953
|
-
children: [header, headerChildContent]
|
|
11954
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
11955
|
-
ref: contentRef,
|
|
11956
|
-
className: element$B('content'),
|
|
11957
|
-
children: [/*#__PURE__*/jsx("div", {
|
|
11958
|
-
className: element$B('sentinel', {
|
|
11959
|
-
top: true
|
|
11960
|
-
}),
|
|
11961
|
-
ref: setSentinelTop
|
|
11962
|
-
}), content, /*#__PURE__*/jsx("div", {
|
|
11963
|
-
className: element$B('sentinel', {
|
|
11964
|
-
bottom: true
|
|
11965
|
-
}),
|
|
11966
|
-
ref: setSentinelBottom
|
|
11967
|
-
})]
|
|
11968
|
-
}), (footer || footerChildContent) && /*#__PURE__*/jsxs("footer", {
|
|
11969
|
-
...footerChildProps,
|
|
11970
|
-
className: classnames(element$B('footer', {
|
|
11971
|
-
'has-divider': Boolean(forceFooterDivider || hasBottomIntersection)
|
|
11972
|
-
}), footerChildProps?.className),
|
|
11973
|
-
children: [footer, footerChildContent]
|
|
11974
|
-
}), isLoading && /*#__PURE__*/jsx("div", {
|
|
11975
|
-
className: element$B('progress-overlay'),
|
|
11976
|
-
children: /*#__PURE__*/jsx(ProgressCircular, {})
|
|
11977
|
-
})]
|
|
11978
|
-
})
|
|
11979
|
-
})
|
|
12188
|
+
children: /*#__PURE__*/jsx(IdsRegistryProvider, {
|
|
12189
|
+
children: children
|
|
11980
12190
|
})
|
|
11981
12191
|
})
|
|
11982
12192
|
})]
|
|
@@ -11985,9 +12195,256 @@ const Dialog$1 = props => {
|
|
|
11985
12195
|
};
|
|
11986
12196
|
|
|
11987
12197
|
/**
|
|
11988
|
-
*
|
|
12198
|
+
* Picks the accessible-name prop (`aria-label` or `aria-labelledby`).
|
|
12199
|
+
*/
|
|
12200
|
+
function resolveAccessibleNameProps(ariaLabel, ariaLabelledBy) {
|
|
12201
|
+
if (ariaLabel) {
|
|
12202
|
+
return {
|
|
12203
|
+
'aria-label': ariaLabel
|
|
12204
|
+
};
|
|
12205
|
+
}
|
|
12206
|
+
if (ariaLabelledBy) {
|
|
12207
|
+
return {
|
|
12208
|
+
'aria-labelledby': ariaLabelledBy
|
|
12209
|
+
};
|
|
12210
|
+
}
|
|
12211
|
+
return undefined;
|
|
12212
|
+
}
|
|
12213
|
+
|
|
12214
|
+
/**
|
|
12215
|
+
* Props of the dialog content: the `role="dialog"` element (which carries `aria-labelledby`) and
|
|
12216
|
+
* everything inside it (header, body, footer). It is meant to be rendered by a framework component
|
|
12217
|
+
* that has resolved `labelId` from the ids registry.
|
|
11989
12218
|
*/
|
|
11990
12219
|
|
|
12220
|
+
/**
|
|
12221
|
+
* Dialog content: the `role="dialog"` element + header/body/footer.
|
|
12222
|
+
*
|
|
12223
|
+
* @param props Component props.
|
|
12224
|
+
* @return React element.
|
|
12225
|
+
*/
|
|
12226
|
+
const DialogContent$1 = props => {
|
|
12227
|
+
const {
|
|
12228
|
+
labelId,
|
|
12229
|
+
dialogProps,
|
|
12230
|
+
handleClose,
|
|
12231
|
+
shouldPreventCloseOnClickAway,
|
|
12232
|
+
clickAwayRefs,
|
|
12233
|
+
rootRef,
|
|
12234
|
+
wrapperRef,
|
|
12235
|
+
contentRef,
|
|
12236
|
+
header,
|
|
12237
|
+
headerChildProps,
|
|
12238
|
+
headerChildContent,
|
|
12239
|
+
forceHeaderDivider,
|
|
12240
|
+
hasTopIntersection,
|
|
12241
|
+
content,
|
|
12242
|
+
setSentinelTop,
|
|
12243
|
+
setSentinelBottom,
|
|
12244
|
+
footer,
|
|
12245
|
+
footerChildProps,
|
|
12246
|
+
footerChildContent,
|
|
12247
|
+
forceFooterDivider,
|
|
12248
|
+
hasBottomIntersection,
|
|
12249
|
+
isLoading,
|
|
12250
|
+
ProgressCircular,
|
|
12251
|
+
ClickAwayProvider
|
|
12252
|
+
} = props;
|
|
12253
|
+
|
|
12254
|
+
// Strip both out of `dialogProps` before spreading it: `resolveAccessibleNameProps` picks at most one, and
|
|
12255
|
+
// leaving the other in place would let it survive underneath the spread below.
|
|
12256
|
+
const {
|
|
12257
|
+
'aria-label': dialogAriaLabel,
|
|
12258
|
+
'aria-labelledby': dialogAriaLabelledBy,
|
|
12259
|
+
...restDialogProps
|
|
12260
|
+
} = dialogProps ?? {};
|
|
12261
|
+
return /*#__PURE__*/jsx("div", {
|
|
12262
|
+
className: element$B('container'),
|
|
12263
|
+
role: "dialog",
|
|
12264
|
+
"aria-modal": "true",
|
|
12265
|
+
...restDialogProps,
|
|
12266
|
+
...resolveAccessibleNameProps(dialogAriaLabel, dialogAriaLabelledBy || labelId),
|
|
12267
|
+
children: /*#__PURE__*/jsx(ClickAwayProvider, {
|
|
12268
|
+
callback: !shouldPreventCloseOnClickAway && handleClose,
|
|
12269
|
+
childrenRefs: clickAwayRefs,
|
|
12270
|
+
parentRef: rootRef,
|
|
12271
|
+
children: /*#__PURE__*/jsxs("section", {
|
|
12272
|
+
className: element$B('wrapper'),
|
|
12273
|
+
ref: wrapperRef,
|
|
12274
|
+
children: [(header || headerChildContent) && /*#__PURE__*/jsxs("header", {
|
|
12275
|
+
...headerChildProps,
|
|
12276
|
+
className: classnames(element$B('header', {
|
|
12277
|
+
'has-divider': Boolean(forceHeaderDivider || hasTopIntersection)
|
|
12278
|
+
}), headerChildProps?.className),
|
|
12279
|
+
children: [header, headerChildContent]
|
|
12280
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
12281
|
+
ref: contentRef,
|
|
12282
|
+
className: element$B('content'),
|
|
12283
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
12284
|
+
className: element$B('sentinel', {
|
|
12285
|
+
top: true
|
|
12286
|
+
}),
|
|
12287
|
+
ref: setSentinelTop
|
|
12288
|
+
}), content, /*#__PURE__*/jsx("div", {
|
|
12289
|
+
className: element$B('sentinel', {
|
|
12290
|
+
bottom: true
|
|
12291
|
+
}),
|
|
12292
|
+
ref: setSentinelBottom
|
|
12293
|
+
})]
|
|
12294
|
+
}), (footer || footerChildContent) && /*#__PURE__*/jsxs("footer", {
|
|
12295
|
+
...footerChildProps,
|
|
12296
|
+
className: classnames(element$B('footer', {
|
|
12297
|
+
'has-divider': Boolean(forceFooterDivider || hasBottomIntersection)
|
|
12298
|
+
}), footerChildProps?.className),
|
|
12299
|
+
children: [footer, footerChildContent]
|
|
12300
|
+
}), isLoading && /*#__PURE__*/jsx("div", {
|
|
12301
|
+
className: element$B('progress-overlay'),
|
|
12302
|
+
children: /*#__PURE__*/jsx(ProgressCircular, {})
|
|
12303
|
+
})]
|
|
12304
|
+
})
|
|
12305
|
+
})
|
|
12306
|
+
});
|
|
12307
|
+
};
|
|
12308
|
+
|
|
12309
|
+
/**
|
|
12310
|
+
* Internal "ids registry" contract shared between framework wrappers (`@lumx/react`, `@lumx/vue`).
|
|
12311
|
+
*/
|
|
12312
|
+
|
|
12313
|
+
/**
|
|
12314
|
+
* Create a standalone ids registry.
|
|
12315
|
+
*
|
|
12316
|
+
* Can be used to store ids for 'aria-labelledby' or 'aria-describedby'. Registrations under the same key are
|
|
12317
|
+
* kept as a stack (most recently registered wins); a registrant clearing itself only affects the top of the
|
|
12318
|
+
* stack if it put itself there, so an older still-registered registrant is restored instead of the key going
|
|
12319
|
+
* empty.
|
|
12320
|
+
*/
|
|
12321
|
+
function createIdsRegistry() {
|
|
12322
|
+
const stacks = new Map();
|
|
12323
|
+
const listeners = new Map();
|
|
12324
|
+
const topId = key => {
|
|
12325
|
+
const stack = stacks.get(key);
|
|
12326
|
+
return stack?.[stack.length - 1]?.id;
|
|
12327
|
+
};
|
|
12328
|
+
return {
|
|
12329
|
+
getId: topId,
|
|
12330
|
+
setId(key, token, id) {
|
|
12331
|
+
const previousTopId = topId(key);
|
|
12332
|
+
const stack = stacks.get(key) ?? [];
|
|
12333
|
+
const index = stack.findIndex(entry => entry.token === token);
|
|
12334
|
+
if (index !== -1) stack.splice(index, 1);
|
|
12335
|
+
if (id !== undefined) stack.push({
|
|
12336
|
+
token,
|
|
12337
|
+
id
|
|
12338
|
+
});
|
|
12339
|
+
if (stack.length) {
|
|
12340
|
+
stacks.set(key, stack);
|
|
12341
|
+
} else {
|
|
12342
|
+
stacks.delete(key);
|
|
12343
|
+
}
|
|
12344
|
+
if (topId(key) === previousTopId) return;
|
|
12345
|
+
const set = listeners.get(key);
|
|
12346
|
+
if (set) {
|
|
12347
|
+
// Copy: a listener may unsubscribe (e.g. on unmount) during this loop.
|
|
12348
|
+
const frozenListeners = [...set];
|
|
12349
|
+
for (const listener of frozenListeners) {
|
|
12350
|
+
listener(key);
|
|
12351
|
+
}
|
|
12352
|
+
}
|
|
12353
|
+
},
|
|
12354
|
+
subscribe(key, listener) {
|
|
12355
|
+
let set = listeners.get(key);
|
|
12356
|
+
if (!set) {
|
|
12357
|
+
set = new Set();
|
|
12358
|
+
listeners.set(key, set);
|
|
12359
|
+
}
|
|
12360
|
+
set.add(listener);
|
|
12361
|
+
return () => {
|
|
12362
|
+
set.delete(listener);
|
|
12363
|
+
if (set.size === 0) listeners.delete(key);
|
|
12364
|
+
};
|
|
12365
|
+
}
|
|
12366
|
+
};
|
|
12367
|
+
}
|
|
12368
|
+
|
|
12369
|
+
/**
|
|
12370
|
+
* Internal "ids registry" context.
|
|
12371
|
+
*
|
|
12372
|
+
* Not exported from the package barrel - lets a container expose ids registered by its descendants
|
|
12373
|
+
* under well-known names, without either side knowing about the other upfront (e.g. to wire up
|
|
12374
|
+
* `aria-labelledby`/`aria-describedby` between components that don't know about each other).
|
|
12375
|
+
*
|
|
12376
|
+
* `undefined` outside of any provider - `useRegisterId`/`useRegisteredId` are no-ops in that case.
|
|
12377
|
+
*
|
|
12378
|
+
* See `IdsRegistry` in `@lumx/core` for the shared contract.
|
|
12379
|
+
*/
|
|
12380
|
+
const IdsRegistryContext = /*#__PURE__*/createContext(undefined);
|
|
12381
|
+
|
|
12382
|
+
/**
|
|
12383
|
+
* Provides a fresh ids registry to its subtree. The registry instance is stable for the lifetime of
|
|
12384
|
+
* the provider, so registering/reading an id never re-renders the whole subtree - only the
|
|
12385
|
+
* components subscribed (via `useRegisteredId`) to the name that changed.
|
|
12386
|
+
*/
|
|
12387
|
+
const IdsRegistryProvider = ({
|
|
12388
|
+
children
|
|
12389
|
+
}) => {
|
|
12390
|
+
const [registry] = useState(createIdsRegistry);
|
|
12391
|
+
return /*#__PURE__*/jsx(IdsRegistryContext.Provider, {
|
|
12392
|
+
value: registry,
|
|
12393
|
+
children: children
|
|
12394
|
+
});
|
|
12395
|
+
};
|
|
12396
|
+
|
|
12397
|
+
/**
|
|
12398
|
+
* Register `id` under `key` in the enclosing ids registry on mount, and clear it on unmount.
|
|
12399
|
+
* Last registered wins; if another registrant is still mounted under the same key, clearing this
|
|
12400
|
+
* one falls back to it instead of leaving the key empty.
|
|
12401
|
+
*
|
|
12402
|
+
* @param key Registry key to store the id under.
|
|
12403
|
+
* @param id Id of the element to register.
|
|
12404
|
+
*/
|
|
12405
|
+
function useRegisterId(key, id) {
|
|
12406
|
+
const registry = useContext(IdsRegistryContext);
|
|
12407
|
+
const token = useRef({}).current;
|
|
12408
|
+
useEffect(() => {
|
|
12409
|
+
registry?.setId(key, token, id);
|
|
12410
|
+
return () => registry?.setId(key, token, undefined);
|
|
12411
|
+
}, [registry, key, id, token]);
|
|
12412
|
+
}
|
|
12413
|
+
|
|
12414
|
+
/**
|
|
12415
|
+
* Subscribe to the id currently registered under `key` in the enclosing ids registry. Re-renders
|
|
12416
|
+
* the calling component only when that key's id changes.
|
|
12417
|
+
*
|
|
12418
|
+
* Uses `useSyncExternalStore` (shim, for React 17 support) reading the registry's synchronous
|
|
12419
|
+
* `getId` snapshot: React re-reads it right after subscribing, so an id registered between render
|
|
12420
|
+
* and commit is never missed - no manual re-sync needed.
|
|
12421
|
+
*
|
|
12422
|
+
* @param key Registry key to read.
|
|
12423
|
+
* @return The registered id, or `undefined` when none is registered / outside any provider.
|
|
12424
|
+
*/
|
|
12425
|
+
function useRegisteredId(key) {
|
|
12426
|
+
const registry = useContext(IdsRegistryContext);
|
|
12427
|
+
const subscribe = useCallback(onStoreChange => registry?.subscribe(key, onStoreChange) ?? (() => undefined), [registry, key]);
|
|
12428
|
+
const getSnapshot = useCallback(() => registry?.getId(key), [registry, key]);
|
|
12429
|
+
return shimExports.useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
12430
|
+
}
|
|
12431
|
+
|
|
12432
|
+
/**
|
|
12433
|
+
* Renders the core `DialogContent`, resolving its `aria-labelledby` from the ids registry.
|
|
12434
|
+
*
|
|
12435
|
+
* Must render as a descendant of the `IdsRegistryProvider` set up by the core `DialogShell` (which is
|
|
12436
|
+
* why it is its own component: the subscription hook needs to run below the provider). Internal to the
|
|
12437
|
+
* dialog family - not exported from the package barrel.
|
|
12438
|
+
*/
|
|
12439
|
+
const DialogContent = props => {
|
|
12440
|
+
const labelId = useRegisteredId(DIALOG_LABEL_KEY);
|
|
12441
|
+
return DialogContent$1({
|
|
12442
|
+
...props,
|
|
12443
|
+
labelId
|
|
12444
|
+
});
|
|
12445
|
+
};
|
|
12446
|
+
DialogContent.displayName = 'DialogContent';
|
|
12447
|
+
|
|
11991
12448
|
const isHeader$1 = isComponent('header');
|
|
11992
12449
|
const isFooter$1 = isComponent('footer');
|
|
11993
12450
|
|
|
@@ -12007,11 +12464,7 @@ const DEFAULT_PROPS$S = {
|
|
|
12007
12464
|
* @param ref Component ref.
|
|
12008
12465
|
* @return React element.
|
|
12009
12466
|
*/
|
|
12010
|
-
const
|
|
12011
|
-
if (!DOCUMENT) {
|
|
12012
|
-
// Can't render in SSR.
|
|
12013
|
-
return null;
|
|
12014
|
-
}
|
|
12467
|
+
const DialogBody = forwardRef((props, ref) => {
|
|
12015
12468
|
const {
|
|
12016
12469
|
children,
|
|
12017
12470
|
className,
|
|
@@ -12036,10 +12489,7 @@ const Dialog = forwardRef((props, ref) => {
|
|
|
12036
12489
|
preventCloseOnEscape,
|
|
12037
12490
|
...forwardedProps
|
|
12038
12491
|
} = props;
|
|
12039
|
-
|
|
12040
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
12041
12492
|
const previousOpen = React__default.useRef(isOpen);
|
|
12042
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
12043
12493
|
React__default.useEffect(() => {
|
|
12044
12494
|
if (isOpen !== previousOpen.current) {
|
|
12045
12495
|
previousOpen.current = isOpen;
|
|
@@ -12051,30 +12501,18 @@ const Dialog = forwardRef((props, ref) => {
|
|
|
12051
12501
|
}
|
|
12052
12502
|
}, [isOpen, parentElement]);
|
|
12053
12503
|
const shouldPreventCloseOnEscape = preventAutoClose || preventCloseOnEscape;
|
|
12054
|
-
|
|
12055
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
12056
12504
|
useCallbackOnEscape(onClose, isOpen && !shouldPreventCloseOnEscape);
|
|
12057
|
-
|
|
12058
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
12059
12505
|
const wrapperRef = useRef(null);
|
|
12060
12506
|
/**
|
|
12061
12507
|
* Since the `contentRef` comes from the parent and is optional,
|
|
12062
12508
|
* we need to create a stable contentRef that will always be available.
|
|
12063
12509
|
*/
|
|
12064
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
12065
12510
|
const localContentRef = useRef(null);
|
|
12066
12511
|
// Handle focus trap.
|
|
12067
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
12068
12512
|
useFocusTrap(isOpen && wrapperRef.current, focusElement?.current);
|
|
12069
|
-
|
|
12070
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
12071
12513
|
useDisableBodyScroll(disableBodyScroll && isOpen && localContentRef.current);
|
|
12072
|
-
|
|
12073
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
12074
12514
|
const [sentinelTop, setSentinelTop] = useState(null);
|
|
12075
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
12076
12515
|
const [sentinelBottom, setSentinelBottom] = useState(null);
|
|
12077
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
12078
12516
|
const intersections = useIntersectionObserver([sentinelTop, sentinelBottom], {
|
|
12079
12517
|
threshold: [0, 1]
|
|
12080
12518
|
});
|
|
@@ -12082,63 +12520,240 @@ const Dialog = forwardRef((props, ref) => {
|
|
|
12082
12520
|
const hasBottomIntersection = sentinelBottom && !(intersections.get(sentinelBottom)?.isIntersecting ?? true);
|
|
12083
12521
|
|
|
12084
12522
|
// Separate header, footer and dialog content from children.
|
|
12085
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
12086
12523
|
const [[headerChild], [footerChild], content] = useMemo(() => partitionMulti(Children.toArray(children), [isHeader$1, isFooter$1]), [children]);
|
|
12087
12524
|
const headerChildProps = headerChild?.props;
|
|
12088
12525
|
const headerChildContent = headerChildProps?.children;
|
|
12089
12526
|
const footerChildProps = footerChild?.props;
|
|
12090
12527
|
const footerChildContent = footerChildProps?.children;
|
|
12091
|
-
|
|
12092
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
12093
12528
|
const clickAwayRefs = useRef([wrapperRef]);
|
|
12094
|
-
|
|
12095
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
12096
12529
|
const rootRef = useRef(null);
|
|
12097
|
-
|
|
12098
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
12099
12530
|
const isVisible = useTransitionVisibility(rootRef, Boolean(isOpen), DIALOG_TRANSITION_DURATION, onVisibilityChange);
|
|
12100
12531
|
const shouldPreventCloseOnClickAway = preventAutoClose || preventCloseOnClick;
|
|
12101
12532
|
const isMounted = isOpen || isVisible || closeMode === 'hide';
|
|
12102
|
-
|
|
12103
|
-
|
|
12104
|
-
HeadingLevelProvider,
|
|
12533
|
+
if (!isMounted) return null;
|
|
12534
|
+
return DialogShell({
|
|
12105
12535
|
Portal,
|
|
12536
|
+
HeadingLevelProvider,
|
|
12106
12537
|
ThemeProvider,
|
|
12538
|
+
IdsRegistryProvider,
|
|
12107
12539
|
className,
|
|
12108
|
-
clickAwayRefs,
|
|
12109
|
-
content,
|
|
12110
|
-
contentRef: mergeRefs(localContentRef, contentRef),
|
|
12111
|
-
dialogProps,
|
|
12112
|
-
footer,
|
|
12113
|
-
footerChildContent,
|
|
12114
|
-
footerChildProps,
|
|
12115
|
-
forceFooterDivider,
|
|
12116
|
-
forceHeaderDivider,
|
|
12117
|
-
handleClose: onClose,
|
|
12118
|
-
hasBottomIntersection,
|
|
12119
|
-
hasTopIntersection,
|
|
12120
|
-
header,
|
|
12121
|
-
headerChildContent,
|
|
12122
|
-
ProgressCircular,
|
|
12123
|
-
headerChildProps,
|
|
12124
12540
|
isLoading,
|
|
12125
12541
|
isOpen,
|
|
12126
12542
|
isVisible,
|
|
12127
|
-
ref: mergeRefs(rootRef, ref),
|
|
12128
|
-
rootRef,
|
|
12129
|
-
setSentinelBottom,
|
|
12130
|
-
setSentinelTop,
|
|
12131
|
-
shouldPreventCloseOnClickAway,
|
|
12132
12543
|
size,
|
|
12133
|
-
wrapperRef,
|
|
12134
12544
|
zIndex,
|
|
12135
|
-
|
|
12136
|
-
|
|
12545
|
+
ref: mergeRefs(rootRef, ref),
|
|
12546
|
+
...forwardedProps,
|
|
12547
|
+
children: /*#__PURE__*/jsx(DialogContent, {
|
|
12548
|
+
ClickAwayProvider: ClickAwayProvider,
|
|
12549
|
+
ProgressCircular: ProgressCircular,
|
|
12550
|
+
clickAwayRefs: clickAwayRefs,
|
|
12551
|
+
content: content,
|
|
12552
|
+
contentRef: mergeRefs(localContentRef, contentRef),
|
|
12553
|
+
dialogProps: dialogProps,
|
|
12554
|
+
footer: footer,
|
|
12555
|
+
footerChildContent: footerChildContent,
|
|
12556
|
+
footerChildProps: footerChildProps,
|
|
12557
|
+
forceFooterDivider: forceFooterDivider,
|
|
12558
|
+
forceHeaderDivider: forceHeaderDivider,
|
|
12559
|
+
handleClose: onClose,
|
|
12560
|
+
hasBottomIntersection: hasBottomIntersection,
|
|
12561
|
+
hasTopIntersection: hasTopIntersection,
|
|
12562
|
+
header: header,
|
|
12563
|
+
headerChildContent: headerChildContent,
|
|
12564
|
+
headerChildProps: headerChildProps,
|
|
12565
|
+
isLoading: isLoading,
|
|
12566
|
+
rootRef: rootRef,
|
|
12567
|
+
setSentinelBottom: setSentinelBottom,
|
|
12568
|
+
setSentinelTop: setSentinelTop,
|
|
12569
|
+
shouldPreventCloseOnClickAway: shouldPreventCloseOnClickAway,
|
|
12570
|
+
wrapperRef: wrapperRef
|
|
12571
|
+
})
|
|
12572
|
+
});
|
|
12137
12573
|
});
|
|
12138
|
-
|
|
12574
|
+
DialogBody.displayName = 'DialogBody';
|
|
12575
|
+
const Dialog = forwardRef((props, ref) => {
|
|
12576
|
+
if (!DOCUMENT) {
|
|
12577
|
+
// Can't render in SSR.
|
|
12578
|
+
return null;
|
|
12579
|
+
}
|
|
12580
|
+
return /*#__PURE__*/jsx(DialogBody, {
|
|
12581
|
+
...props,
|
|
12582
|
+
ref: ref
|
|
12583
|
+
});
|
|
12584
|
+
});
|
|
12585
|
+
Dialog.displayName = COMPONENT_NAME$$;
|
|
12139
12586
|
Dialog.className = CLASSNAME$_;
|
|
12140
12587
|
Dialog.defaultProps = DEFAULT_PROPS$S;
|
|
12141
12588
|
|
|
12589
|
+
/** The maximum authorized heading level. */
|
|
12590
|
+
const MAX_HEADING_LEVEL = 6;
|
|
12591
|
+
|
|
12592
|
+
/**
|
|
12593
|
+
* Typography to use by default depending on the heading level.
|
|
12594
|
+
*/
|
|
12595
|
+
const DEFAULT_TYPOGRAPHY_BY_LEVEL = {
|
|
12596
|
+
h1: Typography.display1,
|
|
12597
|
+
h2: Typography.headline,
|
|
12598
|
+
h3: Typography.title,
|
|
12599
|
+
h4: Typography.subtitle2,
|
|
12600
|
+
h5: Typography.subtitle1,
|
|
12601
|
+
h6: Typography.body2
|
|
12602
|
+
};
|
|
12603
|
+
const defaultContext = {
|
|
12604
|
+
level: 1,
|
|
12605
|
+
headingElement: 'h1'
|
|
12606
|
+
};
|
|
12607
|
+
|
|
12608
|
+
/**
|
|
12609
|
+
* Defines the props of the component.
|
|
12610
|
+
*/
|
|
12611
|
+
|
|
12612
|
+
/**
|
|
12613
|
+
* Component display name.
|
|
12614
|
+
*/
|
|
12615
|
+
const COMPONENT_NAME$_ = 'Heading';
|
|
12616
|
+
|
|
12617
|
+
/**
|
|
12618
|
+
* Component default class name and class prefix.
|
|
12619
|
+
*/
|
|
12620
|
+
const CLASSNAME$Z = 'lumx-heading';
|
|
12621
|
+
|
|
12622
|
+
/**
|
|
12623
|
+
* Component default props.
|
|
12624
|
+
*/
|
|
12625
|
+
const DEFAULT_PROPS$R = {};
|
|
12626
|
+
|
|
12627
|
+
/**
|
|
12628
|
+
* Get Heading component common props
|
|
12629
|
+
*
|
|
12630
|
+
* @param props Component props.
|
|
12631
|
+
* @param contextHeadingElement Heading element from context.
|
|
12632
|
+
* @return Common Props
|
|
12633
|
+
*/
|
|
12634
|
+
const getHeadingProps = (props, contextHeadingElement) => {
|
|
12635
|
+
const {
|
|
12636
|
+
as,
|
|
12637
|
+
className,
|
|
12638
|
+
typography,
|
|
12639
|
+
...otherProps
|
|
12640
|
+
} = props;
|
|
12641
|
+
const computedHeadingElement = as || contextHeadingElement || 'h1';
|
|
12642
|
+
return {
|
|
12643
|
+
...otherProps,
|
|
12644
|
+
as: computedHeadingElement,
|
|
12645
|
+
className: classnames(className, CLASSNAME$Z),
|
|
12646
|
+
typography: typography || DEFAULT_TYPOGRAPHY_BY_LEVEL[computedHeadingElement]
|
|
12647
|
+
};
|
|
12648
|
+
};
|
|
12649
|
+
|
|
12650
|
+
const HeadingLevelContext = /*#__PURE__*/createContext(defaultContext);
|
|
12651
|
+
|
|
12652
|
+
const useHeadingLevel = () => {
|
|
12653
|
+
const {
|
|
12654
|
+
level = 1,
|
|
12655
|
+
headingElement = 'h1'
|
|
12656
|
+
} = React__default.useContext(HeadingLevelContext);
|
|
12657
|
+
return {
|
|
12658
|
+
level,
|
|
12659
|
+
headingElement
|
|
12660
|
+
};
|
|
12661
|
+
};
|
|
12662
|
+
|
|
12663
|
+
/**
|
|
12664
|
+
* Renders a heading component.
|
|
12665
|
+
* Extends the `Text` Component with the heading level automatically computed based on
|
|
12666
|
+
* the current level provided by the context.
|
|
12667
|
+
*/
|
|
12668
|
+
const Heading = forwardRef((props, ref) => {
|
|
12669
|
+
const {
|
|
12670
|
+
children,
|
|
12671
|
+
...otherProps
|
|
12672
|
+
} = props;
|
|
12673
|
+
const {
|
|
12674
|
+
headingElement
|
|
12675
|
+
} = useHeadingLevel();
|
|
12676
|
+
const headingProps = getHeadingProps(otherProps, headingElement);
|
|
12677
|
+
return /*#__PURE__*/jsx(Text, {
|
|
12678
|
+
ref: ref,
|
|
12679
|
+
...headingProps,
|
|
12680
|
+
children: children
|
|
12681
|
+
});
|
|
12682
|
+
});
|
|
12683
|
+
Heading.displayName = COMPONENT_NAME$_;
|
|
12684
|
+
Heading.className = CLASSNAME$Z;
|
|
12685
|
+
Heading.defaultProps = DEFAULT_PROPS$R;
|
|
12686
|
+
|
|
12687
|
+
/**
|
|
12688
|
+
* Computes the next heading level based on the optional prop level or the parent context level.
|
|
12689
|
+
*
|
|
12690
|
+
* @param levelProp - The explicit level provided via props (optional).
|
|
12691
|
+
* @param parentLevel - The level from the parent context.
|
|
12692
|
+
* @returns The calculated heading level, clamped to the maximum allowed level.
|
|
12693
|
+
*/
|
|
12694
|
+
const computeHeadingLevel = (levelProp, parentLevel) => {
|
|
12695
|
+
const nextLevel = levelProp || parentLevel + 1;
|
|
12696
|
+
return nextLevel > MAX_HEADING_LEVEL ? MAX_HEADING_LEVEL : nextLevel;
|
|
12697
|
+
};
|
|
12698
|
+
|
|
12699
|
+
/**
|
|
12700
|
+
* Provide a new heading level context.
|
|
12701
|
+
*/
|
|
12702
|
+
const HeadingLevelProvider = ({
|
|
12703
|
+
children,
|
|
12704
|
+
level
|
|
12705
|
+
}) => {
|
|
12706
|
+
const {
|
|
12707
|
+
level: contextLevel
|
|
12708
|
+
} = useHeadingLevel();
|
|
12709
|
+
const nextLevel = computeHeadingLevel(level, contextLevel);
|
|
12710
|
+
const headingElement = `h${nextLevel}`;
|
|
12711
|
+
return /*#__PURE__*/jsx(HeadingLevelContext.Provider, {
|
|
12712
|
+
value: {
|
|
12713
|
+
level: nextLevel,
|
|
12714
|
+
headingElement
|
|
12715
|
+
},
|
|
12716
|
+
children: children
|
|
12717
|
+
});
|
|
12718
|
+
};
|
|
12719
|
+
|
|
12720
|
+
/**
|
|
12721
|
+
* Names the enclosing dialog-like container (`Dialog`, `Lightbox`, `PopoverDialog`, ...).
|
|
12722
|
+
*
|
|
12723
|
+
* Thin wrapper over `Heading` that generates its own id (or uses the consumer-supplied `id`),
|
|
12724
|
+
* and registers it with the nearest ids registry on mount so the container can link itself to
|
|
12725
|
+
* this heading via `aria-labelledby`. Deregisters on unmount.
|
|
12726
|
+
*
|
|
12727
|
+
* Defaults its typography to `Typography.title` (overridable via the `typography` prop).
|
|
12728
|
+
*
|
|
12729
|
+
* If two `DialogHeading`s are rendered within the same container, the last one registered wins.
|
|
12730
|
+
*
|
|
12731
|
+
* @example
|
|
12732
|
+
* <Dialog isOpen={isOpen}>
|
|
12733
|
+
* <header>
|
|
12734
|
+
* <Toolbar label={<DialogHeading>My dialog</DialogHeading>} />
|
|
12735
|
+
* </header>
|
|
12736
|
+
* ...
|
|
12737
|
+
* </Dialog>
|
|
12738
|
+
*/
|
|
12739
|
+
const DialogHeading = forwardRef((props, ref) => {
|
|
12740
|
+
const {
|
|
12741
|
+
id,
|
|
12742
|
+
typography = Typography$1.title,
|
|
12743
|
+
...forwardedProps
|
|
12744
|
+
} = props;
|
|
12745
|
+
const generatedId = useId();
|
|
12746
|
+
const headingId = id || generatedId;
|
|
12747
|
+
useRegisterId(DIALOG_LABEL_KEY, headingId);
|
|
12748
|
+
return /*#__PURE__*/jsx(Heading, {
|
|
12749
|
+
ref: ref,
|
|
12750
|
+
id: headingId,
|
|
12751
|
+
typography: typography,
|
|
12752
|
+
...forwardedProps
|
|
12753
|
+
});
|
|
12754
|
+
});
|
|
12755
|
+
DialogHeading.displayName = DIALOG_HEADING_COMPONENT_NAME;
|
|
12756
|
+
|
|
12142
12757
|
/**
|
|
12143
12758
|
* Component display name.
|
|
12144
12759
|
*/
|
|
@@ -12147,10 +12762,10 @@ const COMPONENT_NAME$Z = 'Divider';
|
|
|
12147
12762
|
/**
|
|
12148
12763
|
* Component default class name and class prefix.
|
|
12149
12764
|
*/
|
|
12150
|
-
const CLASSNAME$
|
|
12765
|
+
const CLASSNAME$Y = 'lumx-divider';
|
|
12151
12766
|
const {
|
|
12152
12767
|
block: block$L
|
|
12153
|
-
} = bem(CLASSNAME$
|
|
12768
|
+
} = bem(CLASSNAME$Y);
|
|
12154
12769
|
|
|
12155
12770
|
/**
|
|
12156
12771
|
* Divider component.
|
|
@@ -12181,7 +12796,7 @@ const Divider$1 = props => {
|
|
|
12181
12796
|
/**
|
|
12182
12797
|
* Component default props.
|
|
12183
12798
|
*/
|
|
12184
|
-
const DEFAULT_PROPS$
|
|
12799
|
+
const DEFAULT_PROPS$Q = {};
|
|
12185
12800
|
|
|
12186
12801
|
/**
|
|
12187
12802
|
* Divider component.
|
|
@@ -12203,8 +12818,8 @@ const Divider = forwardRef((props, ref) => {
|
|
|
12203
12818
|
});
|
|
12204
12819
|
});
|
|
12205
12820
|
Divider.displayName = COMPONENT_NAME$Z;
|
|
12206
|
-
Divider.className = CLASSNAME$
|
|
12207
|
-
Divider.defaultProps = DEFAULT_PROPS$
|
|
12821
|
+
Divider.className = CLASSNAME$Y;
|
|
12822
|
+
Divider.defaultProps = DEFAULT_PROPS$Q;
|
|
12208
12823
|
|
|
12209
12824
|
/**
|
|
12210
12825
|
* Component display name.
|
|
@@ -12214,10 +12829,10 @@ const COMPONENT_NAME$Y = 'DragHandle';
|
|
|
12214
12829
|
/**
|
|
12215
12830
|
* Component default class name and class prefix.
|
|
12216
12831
|
*/
|
|
12217
|
-
const CLASSNAME$
|
|
12832
|
+
const CLASSNAME$X = 'lumx-drag-handle';
|
|
12218
12833
|
const {
|
|
12219
12834
|
block: block$K
|
|
12220
|
-
} = bem(CLASSNAME$
|
|
12835
|
+
} = bem(CLASSNAME$X);
|
|
12221
12836
|
|
|
12222
12837
|
/**
|
|
12223
12838
|
* DragHandle component.
|
|
@@ -12253,7 +12868,7 @@ const DragHandle$1 = props => {
|
|
|
12253
12868
|
/**
|
|
12254
12869
|
* Component default props.
|
|
12255
12870
|
*/
|
|
12256
|
-
const DEFAULT_PROPS$
|
|
12871
|
+
const DEFAULT_PROPS$P = {};
|
|
12257
12872
|
|
|
12258
12873
|
/**
|
|
12259
12874
|
* DragHandle component.
|
|
@@ -12275,8 +12890,8 @@ const DragHandle = forwardRef((props, ref) => {
|
|
|
12275
12890
|
});
|
|
12276
12891
|
});
|
|
12277
12892
|
DragHandle.displayName = COMPONENT_NAME$Y;
|
|
12278
|
-
DragHandle.className = CLASSNAME$
|
|
12279
|
-
DragHandle.defaultProps = DEFAULT_PROPS$
|
|
12893
|
+
DragHandle.className = CLASSNAME$X;
|
|
12894
|
+
DragHandle.defaultProps = DEFAULT_PROPS$P;
|
|
12280
12895
|
|
|
12281
12896
|
const INITIAL_INDEX = -1;
|
|
12282
12897
|
|
|
@@ -12470,7 +13085,7 @@ const InternalList = forwardRef((props, ref) => {
|
|
|
12470
13085
|
itemPadding: adjustedItemPadding
|
|
12471
13086
|
});
|
|
12472
13087
|
});
|
|
12473
|
-
InternalList.displayName = COMPONENT_NAME$
|
|
13088
|
+
InternalList.displayName = COMPONENT_NAME$1k;
|
|
12474
13089
|
InternalList.className = CLASSNAME$1h;
|
|
12475
13090
|
InternalList.defaultProps = DEFAULT_PROPS$$;
|
|
12476
13091
|
const List = Object.assign(InternalList, {
|
|
@@ -12526,16 +13141,16 @@ const COMPONENT_NAME$X = 'Dropdown';
|
|
|
12526
13141
|
/**
|
|
12527
13142
|
* Component default class name and class prefix.
|
|
12528
13143
|
*/
|
|
12529
|
-
const CLASSNAME$
|
|
13144
|
+
const CLASSNAME$W = 'lumx-dropdown';
|
|
12530
13145
|
const {
|
|
12531
13146
|
block: block$J,
|
|
12532
13147
|
element: element$A
|
|
12533
|
-
} = classNames.bem(CLASSNAME$
|
|
13148
|
+
} = classNames.bem(CLASSNAME$W);
|
|
12534
13149
|
|
|
12535
13150
|
/**
|
|
12536
13151
|
* Component default props.
|
|
12537
13152
|
*/
|
|
12538
|
-
const DEFAULT_PROPS$
|
|
13153
|
+
const DEFAULT_PROPS$O = {
|
|
12539
13154
|
closeOnClick: true,
|
|
12540
13155
|
closeOnClickAway: true,
|
|
12541
13156
|
closeOnEscape: true,
|
|
@@ -12559,18 +13174,18 @@ const Dropdown = forwardRef((props, ref) => {
|
|
|
12559
13174
|
anchorRef,
|
|
12560
13175
|
children,
|
|
12561
13176
|
className,
|
|
12562
|
-
closeOnClick = DEFAULT_PROPS$
|
|
12563
|
-
closeOnClickAway = DEFAULT_PROPS$
|
|
12564
|
-
closeOnEscape = DEFAULT_PROPS$
|
|
12565
|
-
fitToAnchorWidth = DEFAULT_PROPS$
|
|
12566
|
-
fitWithinViewportHeight = DEFAULT_PROPS$
|
|
13177
|
+
closeOnClick = DEFAULT_PROPS$O.closeOnClick,
|
|
13178
|
+
closeOnClickAway = DEFAULT_PROPS$O.closeOnClickAway,
|
|
13179
|
+
closeOnEscape = DEFAULT_PROPS$O.closeOnEscape,
|
|
13180
|
+
fitToAnchorWidth = DEFAULT_PROPS$O.fitToAnchorWidth,
|
|
13181
|
+
fitWithinViewportHeight = DEFAULT_PROPS$O.fitWithinViewportHeight,
|
|
12567
13182
|
isOpen,
|
|
12568
13183
|
offset,
|
|
12569
|
-
focusAnchorOnClose = DEFAULT_PROPS$
|
|
13184
|
+
focusAnchorOnClose = DEFAULT_PROPS$O.focusAnchorOnClose,
|
|
12570
13185
|
onClose,
|
|
12571
13186
|
onInfiniteScroll,
|
|
12572
|
-
placement = DEFAULT_PROPS$
|
|
12573
|
-
shouldFocusOnOpen = DEFAULT_PROPS$
|
|
13187
|
+
placement = DEFAULT_PROPS$O.placement,
|
|
13188
|
+
shouldFocusOnOpen = DEFAULT_PROPS$O.shouldFocusOnOpen,
|
|
12574
13189
|
zIndex,
|
|
12575
13190
|
...forwardedProps
|
|
12576
13191
|
} = props;
|
|
@@ -12615,8 +13230,8 @@ const Dropdown = forwardRef((props, ref) => {
|
|
|
12615
13230
|
}) : null;
|
|
12616
13231
|
});
|
|
12617
13232
|
Dropdown.displayName = COMPONENT_NAME$X;
|
|
12618
|
-
Dropdown.className = CLASSNAME$
|
|
12619
|
-
Dropdown.defaultProps = DEFAULT_PROPS$
|
|
13233
|
+
Dropdown.className = CLASSNAME$W;
|
|
13234
|
+
Dropdown.defaultProps = DEFAULT_PROPS$O;
|
|
12620
13235
|
|
|
12621
13236
|
/**
|
|
12622
13237
|
* Component display name.
|
|
@@ -12626,16 +13241,16 @@ const COMPONENT_NAME$W = 'ExpansionPanel';
|
|
|
12626
13241
|
/**
|
|
12627
13242
|
* Component default class name and class prefix.
|
|
12628
13243
|
*/
|
|
12629
|
-
const CLASSNAME$
|
|
13244
|
+
const CLASSNAME$V = 'lumx-expansion-panel';
|
|
12630
13245
|
const {
|
|
12631
13246
|
block: block$I,
|
|
12632
13247
|
element: element$z
|
|
12633
|
-
} = bem(CLASSNAME$
|
|
13248
|
+
} = bem(CLASSNAME$V);
|
|
12634
13249
|
|
|
12635
13250
|
/**
|
|
12636
13251
|
* Component default props.
|
|
12637
13252
|
*/
|
|
12638
|
-
const DEFAULT_PROPS$
|
|
13253
|
+
const DEFAULT_PROPS$N = {
|
|
12639
13254
|
closeMode: 'unmount'
|
|
12640
13255
|
};
|
|
12641
13256
|
|
|
@@ -12748,7 +13363,7 @@ const isFooter = isComponent('footer');
|
|
|
12748
13363
|
const ExpansionPanel = forwardRef((props, ref) => {
|
|
12749
13364
|
const defaultTheme = useTheme() || Theme$1.light;
|
|
12750
13365
|
const {
|
|
12751
|
-
closeMode = DEFAULT_PROPS$
|
|
13366
|
+
closeMode = DEFAULT_PROPS$N.closeMode,
|
|
12752
13367
|
children: anyChildren,
|
|
12753
13368
|
isOpen,
|
|
12754
13369
|
label,
|
|
@@ -12820,16 +13435,16 @@ const ExpansionPanel = forwardRef((props, ref) => {
|
|
|
12820
13435
|
});
|
|
12821
13436
|
});
|
|
12822
13437
|
ExpansionPanel.displayName = COMPONENT_NAME$W;
|
|
12823
|
-
ExpansionPanel.className = CLASSNAME$
|
|
12824
|
-
ExpansionPanel.defaultProps = DEFAULT_PROPS$
|
|
13438
|
+
ExpansionPanel.className = CLASSNAME$V;
|
|
13439
|
+
ExpansionPanel.defaultProps = DEFAULT_PROPS$N;
|
|
12825
13440
|
|
|
12826
13441
|
const COMPONENT_NAME$V = 'Flag';
|
|
12827
|
-
const CLASSNAME$
|
|
12828
|
-
const DEFAULT_PROPS$
|
|
13442
|
+
const CLASSNAME$U = 'lumx-flag';
|
|
13443
|
+
const DEFAULT_PROPS$M = {};
|
|
12829
13444
|
const {
|
|
12830
13445
|
block: block$H,
|
|
12831
13446
|
element: element$y
|
|
12832
|
-
} = bem(CLASSNAME$
|
|
13447
|
+
} = bem(CLASSNAME$U);
|
|
12833
13448
|
|
|
12834
13449
|
/**
|
|
12835
13450
|
* Flag component.
|
|
@@ -12888,144 +13503,13 @@ const Flag = forwardRef((props, ref) => {
|
|
|
12888
13503
|
});
|
|
12889
13504
|
});
|
|
12890
13505
|
Flag.displayName = COMPONENT_NAME$V;
|
|
12891
|
-
Flag.className = CLASSNAME$
|
|
12892
|
-
Flag.defaultProps = DEFAULT_PROPS$
|
|
12893
|
-
|
|
12894
|
-
/** The maximum authorized heading level. */
|
|
12895
|
-
const MAX_HEADING_LEVEL = 6;
|
|
12896
|
-
|
|
12897
|
-
/**
|
|
12898
|
-
* Typography to use by default depending on the heading level.
|
|
12899
|
-
*/
|
|
12900
|
-
const DEFAULT_TYPOGRAPHY_BY_LEVEL = {
|
|
12901
|
-
h1: Typography.display1,
|
|
12902
|
-
h2: Typography.headline,
|
|
12903
|
-
h3: Typography.title,
|
|
12904
|
-
h4: Typography.subtitle2,
|
|
12905
|
-
h5: Typography.subtitle1,
|
|
12906
|
-
h6: Typography.body2
|
|
12907
|
-
};
|
|
12908
|
-
const defaultContext = {
|
|
12909
|
-
level: 1,
|
|
12910
|
-
headingElement: 'h1'
|
|
12911
|
-
};
|
|
12912
|
-
|
|
12913
|
-
/**
|
|
12914
|
-
* Defines the props of the component.
|
|
12915
|
-
*/
|
|
12916
|
-
|
|
12917
|
-
/**
|
|
12918
|
-
* Component display name.
|
|
12919
|
-
*/
|
|
12920
|
-
const COMPONENT_NAME$U = 'Heading';
|
|
12921
|
-
|
|
12922
|
-
/**
|
|
12923
|
-
* Component default class name and class prefix.
|
|
12924
|
-
*/
|
|
12925
|
-
const CLASSNAME$U = 'lumx-heading';
|
|
12926
|
-
|
|
12927
|
-
/**
|
|
12928
|
-
* Component default props.
|
|
12929
|
-
*/
|
|
12930
|
-
const DEFAULT_PROPS$M = {};
|
|
12931
|
-
|
|
12932
|
-
/**
|
|
12933
|
-
* Get Heading component common props
|
|
12934
|
-
*
|
|
12935
|
-
* @param props Component props.
|
|
12936
|
-
* @param contextHeadingElement Heading element from context.
|
|
12937
|
-
* @return Common Props
|
|
12938
|
-
*/
|
|
12939
|
-
const getHeadingProps = (props, contextHeadingElement) => {
|
|
12940
|
-
const {
|
|
12941
|
-
as,
|
|
12942
|
-
className,
|
|
12943
|
-
typography,
|
|
12944
|
-
...otherProps
|
|
12945
|
-
} = props;
|
|
12946
|
-
const computedHeadingElement = as || contextHeadingElement || 'h1';
|
|
12947
|
-
return {
|
|
12948
|
-
...otherProps,
|
|
12949
|
-
as: computedHeadingElement,
|
|
12950
|
-
className: classnames(className, CLASSNAME$U),
|
|
12951
|
-
typography: typography || DEFAULT_TYPOGRAPHY_BY_LEVEL[computedHeadingElement]
|
|
12952
|
-
};
|
|
12953
|
-
};
|
|
12954
|
-
|
|
12955
|
-
const HeadingLevelContext = /*#__PURE__*/createContext(defaultContext);
|
|
12956
|
-
|
|
12957
|
-
const useHeadingLevel = () => {
|
|
12958
|
-
const {
|
|
12959
|
-
level = 1,
|
|
12960
|
-
headingElement = 'h1'
|
|
12961
|
-
} = React__default.useContext(HeadingLevelContext);
|
|
12962
|
-
return {
|
|
12963
|
-
level,
|
|
12964
|
-
headingElement
|
|
12965
|
-
};
|
|
12966
|
-
};
|
|
12967
|
-
|
|
12968
|
-
/**
|
|
12969
|
-
* Renders a heading component.
|
|
12970
|
-
* Extends the `Text` Component with the heading level automatically computed based on
|
|
12971
|
-
* the current level provided by the context.
|
|
12972
|
-
*/
|
|
12973
|
-
const Heading = forwardRef((props, ref) => {
|
|
12974
|
-
const {
|
|
12975
|
-
children,
|
|
12976
|
-
...otherProps
|
|
12977
|
-
} = props;
|
|
12978
|
-
const {
|
|
12979
|
-
headingElement
|
|
12980
|
-
} = useHeadingLevel();
|
|
12981
|
-
const headingProps = getHeadingProps(otherProps, headingElement);
|
|
12982
|
-
return /*#__PURE__*/jsx(Text, {
|
|
12983
|
-
ref: ref,
|
|
12984
|
-
...headingProps,
|
|
12985
|
-
children: children
|
|
12986
|
-
});
|
|
12987
|
-
});
|
|
12988
|
-
Heading.displayName = COMPONENT_NAME$U;
|
|
12989
|
-
Heading.className = CLASSNAME$U;
|
|
12990
|
-
Heading.defaultProps = DEFAULT_PROPS$M;
|
|
12991
|
-
|
|
12992
|
-
/**
|
|
12993
|
-
* Computes the next heading level based on the optional prop level or the parent context level.
|
|
12994
|
-
*
|
|
12995
|
-
* @param levelProp - The explicit level provided via props (optional).
|
|
12996
|
-
* @param parentLevel - The level from the parent context.
|
|
12997
|
-
* @returns The calculated heading level, clamped to the maximum allowed level.
|
|
12998
|
-
*/
|
|
12999
|
-
const computeHeadingLevel = (levelProp, parentLevel) => {
|
|
13000
|
-
const nextLevel = levelProp || parentLevel + 1;
|
|
13001
|
-
return nextLevel > MAX_HEADING_LEVEL ? MAX_HEADING_LEVEL : nextLevel;
|
|
13002
|
-
};
|
|
13003
|
-
|
|
13004
|
-
/**
|
|
13005
|
-
* Provide a new heading level context.
|
|
13006
|
-
*/
|
|
13007
|
-
const HeadingLevelProvider = ({
|
|
13008
|
-
children,
|
|
13009
|
-
level
|
|
13010
|
-
}) => {
|
|
13011
|
-
const {
|
|
13012
|
-
level: contextLevel
|
|
13013
|
-
} = useHeadingLevel();
|
|
13014
|
-
const nextLevel = computeHeadingLevel(level, contextLevel);
|
|
13015
|
-
const headingElement = `h${nextLevel}`;
|
|
13016
|
-
return /*#__PURE__*/jsx(HeadingLevelContext.Provider, {
|
|
13017
|
-
value: {
|
|
13018
|
-
level: nextLevel,
|
|
13019
|
-
headingElement
|
|
13020
|
-
},
|
|
13021
|
-
children: children
|
|
13022
|
-
});
|
|
13023
|
-
};
|
|
13506
|
+
Flag.className = CLASSNAME$U;
|
|
13507
|
+
Flag.defaultProps = DEFAULT_PROPS$M;
|
|
13024
13508
|
|
|
13025
13509
|
/**
|
|
13026
13510
|
* Component display name.
|
|
13027
13511
|
*/
|
|
13028
|
-
const COMPONENT_NAME$
|
|
13512
|
+
const COMPONENT_NAME$U = 'Grid';
|
|
13029
13513
|
|
|
13030
13514
|
/**
|
|
13031
13515
|
* Component default class name and class prefix.
|
|
@@ -13074,14 +13558,14 @@ const Grid = forwardRef((props, ref) => {
|
|
|
13074
13558
|
children: children
|
|
13075
13559
|
});
|
|
13076
13560
|
});
|
|
13077
|
-
Grid.displayName = COMPONENT_NAME$
|
|
13561
|
+
Grid.displayName = COMPONENT_NAME$U;
|
|
13078
13562
|
Grid.className = CLASSNAME$T;
|
|
13079
13563
|
Grid.defaultProps = DEFAULT_PROPS$L;
|
|
13080
13564
|
|
|
13081
13565
|
/**
|
|
13082
13566
|
* Component display name.
|
|
13083
13567
|
*/
|
|
13084
|
-
const COMPONENT_NAME$
|
|
13568
|
+
const COMPONENT_NAME$T = 'GridItem';
|
|
13085
13569
|
|
|
13086
13570
|
/**
|
|
13087
13571
|
* Component default class name and class prefix.
|
|
@@ -13118,13 +13602,13 @@ const GridItem = forwardRef((props, ref) => {
|
|
|
13118
13602
|
children: children
|
|
13119
13603
|
});
|
|
13120
13604
|
});
|
|
13121
|
-
GridItem.displayName = COMPONENT_NAME$
|
|
13605
|
+
GridItem.displayName = COMPONENT_NAME$T;
|
|
13122
13606
|
GridItem.className = CLASSNAME$S;
|
|
13123
13607
|
|
|
13124
13608
|
/**
|
|
13125
13609
|
* Component display name.
|
|
13126
13610
|
*/
|
|
13127
|
-
const COMPONENT_NAME$
|
|
13611
|
+
const COMPONENT_NAME$S = 'GridColumn';
|
|
13128
13612
|
|
|
13129
13613
|
/**
|
|
13130
13614
|
* Component default class name and class prefix.
|
|
@@ -13169,7 +13653,7 @@ const GridColumn$1 = props => {
|
|
|
13169
13653
|
children: children
|
|
13170
13654
|
});
|
|
13171
13655
|
};
|
|
13172
|
-
GridColumn$1.displayName = COMPONENT_NAME$
|
|
13656
|
+
GridColumn$1.displayName = COMPONENT_NAME$S;
|
|
13173
13657
|
GridColumn$1.className = CLASSNAME$R;
|
|
13174
13658
|
GridColumn$1.defaultProps = DEFAULT_PROPS$K;
|
|
13175
13659
|
|
|
@@ -13199,7 +13683,7 @@ const GridColumn = forwardRef((props, ref) => {
|
|
|
13199
13683
|
...props
|
|
13200
13684
|
});
|
|
13201
13685
|
});
|
|
13202
|
-
GridColumn.displayName = COMPONENT_NAME$
|
|
13686
|
+
GridColumn.displayName = COMPONENT_NAME$S;
|
|
13203
13687
|
GridColumn.className = CLASSNAME$R;
|
|
13204
13688
|
GridColumn.defaultProps = DEFAULT_PROPS$J;
|
|
13205
13689
|
|
|
@@ -13222,7 +13706,7 @@ const ImageBlockCaptionPosition = {
|
|
|
13222
13706
|
/**
|
|
13223
13707
|
* Component display name.
|
|
13224
13708
|
*/
|
|
13225
|
-
const COMPONENT_NAME$
|
|
13709
|
+
const COMPONENT_NAME$R = 'ImageBlock';
|
|
13226
13710
|
|
|
13227
13711
|
/**
|
|
13228
13712
|
* Component default class name and class prefix.
|
|
@@ -13423,14 +13907,14 @@ const ImageBlock = forwardRef((props, ref) => {
|
|
|
13423
13907
|
ImageCaption
|
|
13424
13908
|
});
|
|
13425
13909
|
});
|
|
13426
|
-
ImageBlock.displayName = COMPONENT_NAME$
|
|
13910
|
+
ImageBlock.displayName = COMPONENT_NAME$R;
|
|
13427
13911
|
ImageBlock.className = CLASSNAME$Q;
|
|
13428
13912
|
ImageBlock.defaultProps = DEFAULT_PROPS$I;
|
|
13429
13913
|
|
|
13430
13914
|
/**
|
|
13431
13915
|
* Component display name.
|
|
13432
13916
|
*/
|
|
13433
|
-
const COMPONENT_NAME$
|
|
13917
|
+
const COMPONENT_NAME$Q = 'ImageLightbox';
|
|
13434
13918
|
|
|
13435
13919
|
/**
|
|
13436
13920
|
* Component default class name and class prefix.
|
|
@@ -14127,7 +14611,7 @@ const Inner = forwardRef((props, ref) => {
|
|
|
14127
14611
|
focusElement: currentPaginationItemRef,
|
|
14128
14612
|
...forwardedProps,
|
|
14129
14613
|
// Disable the close on click away as we want a custom one here
|
|
14130
|
-
|
|
14614
|
+
preventCloseOnClick: true,
|
|
14131
14615
|
children: /*#__PURE__*/jsx(ClickAwayProvider, {
|
|
14132
14616
|
childrenRefs: clickAwayChildrenRefs,
|
|
14133
14617
|
callback: onClickAway,
|
|
@@ -14148,7 +14632,7 @@ const Inner = forwardRef((props, ref) => {
|
|
|
14148
14632
|
})
|
|
14149
14633
|
});
|
|
14150
14634
|
});
|
|
14151
|
-
Inner.displayName = COMPONENT_NAME$
|
|
14635
|
+
Inner.displayName = COMPONENT_NAME$Q;
|
|
14152
14636
|
Inner.className = CLASSNAME$P;
|
|
14153
14637
|
|
|
14154
14638
|
/**
|
|
@@ -14165,7 +14649,7 @@ const ImageLightbox = Object.assign(Inner, {
|
|
|
14165
14649
|
/**
|
|
14166
14650
|
* Component display name.
|
|
14167
14651
|
*/
|
|
14168
|
-
const COMPONENT_NAME$
|
|
14652
|
+
const COMPONENT_NAME$P = 'InlineList';
|
|
14169
14653
|
|
|
14170
14654
|
/**
|
|
14171
14655
|
* Component default class name and class prefix.
|
|
@@ -14226,7 +14710,7 @@ const InlineList$1 = props => {
|
|
|
14226
14710
|
})
|
|
14227
14711
|
);
|
|
14228
14712
|
};
|
|
14229
|
-
InlineList$1.displayName = COMPONENT_NAME$
|
|
14713
|
+
InlineList$1.displayName = COMPONENT_NAME$P;
|
|
14230
14714
|
InlineList$1.className = CLASSNAME$O;
|
|
14231
14715
|
InlineList$1.defaultProps = DEFAULT_PROPS$H;
|
|
14232
14716
|
|
|
@@ -14252,7 +14736,7 @@ const InlineList = forwardRef((props, ref) => {
|
|
|
14252
14736
|
items: Children.toArray(children)
|
|
14253
14737
|
});
|
|
14254
14738
|
});
|
|
14255
|
-
InlineList.displayName = COMPONENT_NAME$
|
|
14739
|
+
InlineList.displayName = COMPONENT_NAME$P;
|
|
14256
14740
|
InlineList.className = CLASSNAME$O;
|
|
14257
14741
|
InlineList.defaultProps = DEFAULT_PROPS$H;
|
|
14258
14742
|
|
|
@@ -14297,7 +14781,7 @@ InputLabel.defaultProps = InputLabel$1.defaultProps;
|
|
|
14297
14781
|
/**
|
|
14298
14782
|
* Component display name.
|
|
14299
14783
|
*/
|
|
14300
|
-
const COMPONENT_NAME$
|
|
14784
|
+
const COMPONENT_NAME$O = 'Lightbox';
|
|
14301
14785
|
|
|
14302
14786
|
/**
|
|
14303
14787
|
* Component default class name and class prefix.
|
|
@@ -14328,7 +14812,9 @@ const Lightbox$1 = props => {
|
|
|
14328
14812
|
handleClose,
|
|
14329
14813
|
parentElement,
|
|
14330
14814
|
focusElement,
|
|
14815
|
+
labelId,
|
|
14331
14816
|
preventAutoClose,
|
|
14817
|
+
preventCloseOnClick,
|
|
14332
14818
|
theme,
|
|
14333
14819
|
zIndex,
|
|
14334
14820
|
isVisible,
|
|
@@ -14348,8 +14834,7 @@ const Lightbox$1 = props => {
|
|
|
14348
14834
|
children: /*#__PURE__*/jsxs("div", {
|
|
14349
14835
|
ref: ref,
|
|
14350
14836
|
...forwardedProps,
|
|
14351
|
-
|
|
14352
|
-
"aria-labelledby": ariaLabelledBy,
|
|
14837
|
+
...resolveAccessibleNameProps(ariaLabel, ariaLabelledBy || labelId),
|
|
14353
14838
|
"aria-modal": "true",
|
|
14354
14839
|
role: "dialog",
|
|
14355
14840
|
tabIndex: -1,
|
|
@@ -14378,7 +14863,7 @@ const Lightbox$1 = props => {
|
|
|
14378
14863
|
children: /*#__PURE__*/jsx(ThemeProvider, {
|
|
14379
14864
|
value: undefined,
|
|
14380
14865
|
children: /*#__PURE__*/jsx(ClickAwayProvider, {
|
|
14381
|
-
callback: !preventAutoClose && handleClose,
|
|
14866
|
+
callback: !preventAutoClose && !preventCloseOnClick && handleClose,
|
|
14382
14867
|
childrenRefs: clickAwayRefs,
|
|
14383
14868
|
children: /*#__PURE__*/jsx("div", {
|
|
14384
14869
|
ref: childrenRef,
|
|
@@ -14398,13 +14883,13 @@ const Lightbox$1 = props => {
|
|
|
14398
14883
|
*/
|
|
14399
14884
|
|
|
14400
14885
|
/**
|
|
14401
|
-
* Lightbox
|
|
14886
|
+
* Renders the core Lightbox UI, resolving its `aria-labelledby` from the ids registry.
|
|
14402
14887
|
*
|
|
14403
|
-
*
|
|
14404
|
-
*
|
|
14405
|
-
*
|
|
14888
|
+
* Must render as a descendant of the `IdsRegistryProvider` set up by `Lightbox` (which is why it is
|
|
14889
|
+
* its own component: the subscription hook needs to run below the provider). Internal to the
|
|
14890
|
+
* lightbox family - not exported from the package barrel.
|
|
14406
14891
|
*/
|
|
14407
|
-
const
|
|
14892
|
+
const LightboxContent = forwardRef((props, ref) => {
|
|
14408
14893
|
const {
|
|
14409
14894
|
children,
|
|
14410
14895
|
className,
|
|
@@ -14418,36 +14903,19 @@ const Lightbox = forwardRef((props, ref) => {
|
|
|
14418
14903
|
zIndex,
|
|
14419
14904
|
...forwardedProps
|
|
14420
14905
|
} = props;
|
|
14421
|
-
if (!DOCUMENT) {
|
|
14422
|
-
// Can't render in SSR.
|
|
14423
|
-
return null;
|
|
14424
|
-
}
|
|
14425
|
-
|
|
14426
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
14427
14906
|
const childrenRef = useRef(null);
|
|
14428
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
14429
14907
|
const wrapperRef = useRef(null);
|
|
14430
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
14431
14908
|
const closeButtonRef = useRef(null);
|
|
14432
|
-
|
|
14433
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
14434
14909
|
useDisableBodyScroll(isOpen && wrapperRef.current);
|
|
14435
|
-
|
|
14436
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
14437
14910
|
const isVisible = useTransitionVisibility(wrapperRef, !!isOpen, DIALOG_TRANSITION_DURATION);
|
|
14438
14911
|
|
|
14439
14912
|
// Handle focus trap.
|
|
14440
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
14441
14913
|
useFocusTrap(
|
|
14442
14914
|
// Focus trap zone
|
|
14443
14915
|
isOpen && wrapperRef.current,
|
|
14444
14916
|
// Focus element (fallback on close button and then on the dialog)
|
|
14445
14917
|
focusElement?.current || closeButtonRef.current || wrapperRef.current);
|
|
14446
|
-
|
|
14447
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
14448
14918
|
const previousOpen = useRef(isOpen);
|
|
14449
|
-
|
|
14450
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
14451
14919
|
useEffect(() => {
|
|
14452
14920
|
if (isOpen !== previousOpen.current) {
|
|
14453
14921
|
previousOpen.current = isOpen;
|
|
@@ -14460,11 +14928,9 @@ const Lightbox = forwardRef((props, ref) => {
|
|
|
14460
14928
|
}, [isOpen, parentElement]);
|
|
14461
14929
|
|
|
14462
14930
|
// Close lightbox on escape key pressed.
|
|
14463
|
-
|
|
14464
|
-
useCallbackOnEscape(onClose);
|
|
14465
|
-
|
|
14466
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
14931
|
+
useCallbackOnEscape(onClose, isOpen && !preventAutoClose);
|
|
14467
14932
|
const clickAwayRefs = useRef([wrapperRef]);
|
|
14933
|
+
const labelId = useRegisteredId(DIALOG_LABEL_KEY);
|
|
14468
14934
|
if (!isOpen && !isVisible) return null;
|
|
14469
14935
|
return Lightbox$1({
|
|
14470
14936
|
ClickAwayProvider,
|
|
@@ -14482,6 +14948,7 @@ const Lightbox = forwardRef((props, ref) => {
|
|
|
14482
14948
|
focusElement,
|
|
14483
14949
|
isOpen,
|
|
14484
14950
|
isVisible,
|
|
14951
|
+
labelId,
|
|
14485
14952
|
ref: mergeRefs(ref, wrapperRef),
|
|
14486
14953
|
theme,
|
|
14487
14954
|
zIndex,
|
|
@@ -14490,7 +14957,27 @@ const Lightbox = forwardRef((props, ref) => {
|
|
|
14490
14957
|
...forwardedProps
|
|
14491
14958
|
});
|
|
14492
14959
|
});
|
|
14493
|
-
|
|
14960
|
+
|
|
14961
|
+
/**
|
|
14962
|
+
* Lightbox component.
|
|
14963
|
+
*
|
|
14964
|
+
* @param props Component props.
|
|
14965
|
+
* @param ref Component ref.
|
|
14966
|
+
* @return React element.
|
|
14967
|
+
*/
|
|
14968
|
+
const Lightbox = forwardRef((props, ref) => {
|
|
14969
|
+
if (!DOCUMENT) {
|
|
14970
|
+
// Can't render in SSR.
|
|
14971
|
+
return null;
|
|
14972
|
+
}
|
|
14973
|
+
return /*#__PURE__*/jsx(IdsRegistryProvider, {
|
|
14974
|
+
children: /*#__PURE__*/jsx(LightboxContent, {
|
|
14975
|
+
...props,
|
|
14976
|
+
ref: ref
|
|
14977
|
+
})
|
|
14978
|
+
});
|
|
14979
|
+
});
|
|
14980
|
+
Lightbox.displayName = COMPONENT_NAME$O;
|
|
14494
14981
|
Lightbox.className = CLASSNAME$N;
|
|
14495
14982
|
|
|
14496
14983
|
/**
|
|
@@ -14500,7 +14987,7 @@ Lightbox.className = CLASSNAME$N;
|
|
|
14500
14987
|
/**
|
|
14501
14988
|
* Component display name.
|
|
14502
14989
|
*/
|
|
14503
|
-
const COMPONENT_NAME$
|
|
14990
|
+
const COMPONENT_NAME$N = 'Link';
|
|
14504
14991
|
|
|
14505
14992
|
/**
|
|
14506
14993
|
* Component default class name and class prefix.
|
|
@@ -14593,13 +15080,13 @@ const Link = forwardRef((props, ref) => {
|
|
|
14593
15080
|
}))
|
|
14594
15081
|
});
|
|
14595
15082
|
});
|
|
14596
|
-
Link.displayName = COMPONENT_NAME$
|
|
15083
|
+
Link.displayName = COMPONENT_NAME$N;
|
|
14597
15084
|
Link.className = CLASSNAME$M;
|
|
14598
15085
|
|
|
14599
15086
|
/**
|
|
14600
15087
|
* Component display name.
|
|
14601
15088
|
*/
|
|
14602
|
-
const COMPONENT_NAME$
|
|
15089
|
+
const COMPONENT_NAME$M = 'LinkPreview';
|
|
14603
15090
|
|
|
14604
15091
|
/**
|
|
14605
15092
|
* Component default class name and class prefix.
|
|
@@ -14734,7 +15221,7 @@ const LinkPreview = forwardRef((props, ref) => {
|
|
|
14734
15221
|
...forwardedProps
|
|
14735
15222
|
});
|
|
14736
15223
|
});
|
|
14737
|
-
LinkPreview.displayName = COMPONENT_NAME$
|
|
15224
|
+
LinkPreview.displayName = COMPONENT_NAME$M;
|
|
14738
15225
|
LinkPreview.className = CLASSNAME$L;
|
|
14739
15226
|
LinkPreview.defaultProps = DEFAULT_PROPS$G;
|
|
14740
15227
|
|
|
@@ -14767,7 +15254,7 @@ const ListItemAction = Object.assign(forwardRefPolymorphic((props, ref) => {
|
|
|
14767
15254
|
children
|
|
14768
15255
|
});
|
|
14769
15256
|
}), {
|
|
14770
|
-
displayName: COMPONENT_NAME$
|
|
15257
|
+
displayName: COMPONENT_NAME$1h,
|
|
14771
15258
|
className: CLASSNAME$1e,
|
|
14772
15259
|
defaultProps: DEFAULT_PROPS$Z
|
|
14773
15260
|
});
|
|
@@ -14807,7 +15294,7 @@ const _ListItem = forwardRef((props, ref) => {
|
|
|
14807
15294
|
handleClick: onItemSelected || props.onClick ? handleClick : undefined
|
|
14808
15295
|
});
|
|
14809
15296
|
});
|
|
14810
|
-
_ListItem.displayName = COMPONENT_NAME$
|
|
15297
|
+
_ListItem.displayName = COMPONENT_NAME$1i;
|
|
14811
15298
|
_ListItem.className = CLASSNAME$1f;
|
|
14812
15299
|
_ListItem.defaultProps = DEFAULT_PROPS$_;
|
|
14813
15300
|
|
|
@@ -14822,7 +15309,7 @@ const ListItem = Object.assign(_ListItem, {
|
|
|
14822
15309
|
/**
|
|
14823
15310
|
* Component display name.
|
|
14824
15311
|
*/
|
|
14825
|
-
const COMPONENT_NAME$
|
|
15312
|
+
const COMPONENT_NAME$L = 'ListSubheader';
|
|
14826
15313
|
|
|
14827
15314
|
/**
|
|
14828
15315
|
* Component default class name and class prefix.
|
|
@@ -14850,7 +15337,7 @@ const ListSubheader = forwardRef((props, ref) => {
|
|
|
14850
15337
|
children: children
|
|
14851
15338
|
});
|
|
14852
15339
|
});
|
|
14853
|
-
ListSubheader.displayName = COMPONENT_NAME$
|
|
15340
|
+
ListSubheader.displayName = COMPONENT_NAME$L;
|
|
14854
15341
|
ListSubheader.className = CLASSNAME$K;
|
|
14855
15342
|
|
|
14856
15343
|
const DEFAULT_PROPS$F = {
|
|
@@ -14863,7 +15350,7 @@ const DEFAULT_PROPS$F = {
|
|
|
14863
15350
|
|
|
14864
15351
|
/** Discriminated union of MenuButton props across all trigger variants. */
|
|
14865
15352
|
|
|
14866
|
-
const COMPONENT_NAME$
|
|
15353
|
+
const COMPONENT_NAME$K = 'MenuButton';
|
|
14867
15354
|
|
|
14868
15355
|
/** Menu button core template (composition of menu provider, trigger, popover and list) */
|
|
14869
15356
|
const MenuButton$1 = (props, {
|
|
@@ -15291,7 +15778,7 @@ function MenuProvider(props) {
|
|
|
15291
15778
|
}
|
|
15292
15779
|
MenuProvider.displayName = 'Menu.Provider';
|
|
15293
15780
|
|
|
15294
|
-
const COMPONENT_NAME$
|
|
15781
|
+
const COMPONENT_NAME$J = 'MenuTrigger';
|
|
15295
15782
|
const CLASSNAME$J = 'lumx-menu-trigger';
|
|
15296
15783
|
|
|
15297
15784
|
/** MenuTrigger core template. Renders `Trigger` with disclosure ARIA attributes. */
|
|
@@ -15392,11 +15879,11 @@ const MenuTrigger = Object.assign(forwardRefPolymorphic((props, ref) => {
|
|
|
15392
15879
|
Trigger: TriggerComp
|
|
15393
15880
|
});
|
|
15394
15881
|
}), {
|
|
15395
|
-
displayName: COMPONENT_NAME$
|
|
15882
|
+
displayName: COMPONENT_NAME$J,
|
|
15396
15883
|
className: CLASSNAME$J
|
|
15397
15884
|
});
|
|
15398
15885
|
|
|
15399
|
-
const COMPONENT_NAME$
|
|
15886
|
+
const COMPONENT_NAME$I = 'MenuPopover';
|
|
15400
15887
|
const CLASSNAME$I = 'lumx-menu-popover';
|
|
15401
15888
|
const {
|
|
15402
15889
|
block: block$z,
|
|
@@ -15469,12 +15956,12 @@ const MenuPopover = props => {
|
|
|
15469
15956
|
FlexBox
|
|
15470
15957
|
});
|
|
15471
15958
|
};
|
|
15472
|
-
MenuPopover.displayName = COMPONENT_NAME$
|
|
15959
|
+
MenuPopover.displayName = COMPONENT_NAME$I;
|
|
15473
15960
|
MenuPopover.className = CLASSNAME$I;
|
|
15474
15961
|
|
|
15475
15962
|
/** Menu list props. */
|
|
15476
15963
|
|
|
15477
|
-
const COMPONENT_NAME$
|
|
15964
|
+
const COMPONENT_NAME$H = 'Menu';
|
|
15478
15965
|
const CLASSNAME$H = 'lumx-menu';
|
|
15479
15966
|
|
|
15480
15967
|
/** MenuList core template. Wraps `List` with menu-specific class and ARIA labelling. */
|
|
@@ -15537,7 +16024,7 @@ const MenuList = forwardRef((props, ref) => {
|
|
|
15537
16024
|
children: isOpen ? children : null
|
|
15538
16025
|
});
|
|
15539
16026
|
});
|
|
15540
|
-
MenuList.displayName = COMPONENT_NAME$
|
|
16027
|
+
MenuList.displayName = COMPONENT_NAME$H;
|
|
15541
16028
|
MenuList.className = CLASSNAME$H;
|
|
15542
16029
|
|
|
15543
16030
|
/** Props that MenuButton explicitly declares. */
|
|
@@ -15585,14 +16072,14 @@ const MenuButton = forwardRef((props, ref) => {
|
|
|
15585
16072
|
MenuList
|
|
15586
16073
|
});
|
|
15587
16074
|
});
|
|
15588
|
-
MenuButton.displayName = COMPONENT_NAME$
|
|
16075
|
+
MenuButton.displayName = COMPONENT_NAME$K;
|
|
15589
16076
|
MenuButton.defaultProps = DEFAULT_PROPS$F;
|
|
15590
16077
|
|
|
15591
16078
|
/** MenuItem props. */
|
|
15592
16079
|
|
|
15593
16080
|
/** Props overridden by framework wrappers. */
|
|
15594
16081
|
|
|
15595
|
-
const COMPONENT_NAME$
|
|
16082
|
+
const COMPONENT_NAME$G = 'MenuItem';
|
|
15596
16083
|
const CLASSNAME$G = 'lumx-menu-item';
|
|
15597
16084
|
const {
|
|
15598
16085
|
block: block$y,
|
|
@@ -15708,13 +16195,13 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
15708
16195
|
handleClick
|
|
15709
16196
|
});
|
|
15710
16197
|
});
|
|
15711
|
-
MenuItem.displayName = COMPONENT_NAME$
|
|
16198
|
+
MenuItem.displayName = COMPONENT_NAME$G;
|
|
15712
16199
|
MenuItem.className = CLASSNAME$G;
|
|
15713
16200
|
|
|
15714
16201
|
/**
|
|
15715
16202
|
* Component display name.
|
|
15716
16203
|
*/
|
|
15717
|
-
const COMPONENT_NAME$
|
|
16204
|
+
const COMPONENT_NAME$F = 'Message';
|
|
15718
16205
|
|
|
15719
16206
|
/**
|
|
15720
16207
|
* Component default class name and class prefix.
|
|
@@ -15797,7 +16284,7 @@ const Message$1 = props => {
|
|
|
15797
16284
|
})]
|
|
15798
16285
|
});
|
|
15799
16286
|
};
|
|
15800
|
-
Message$1.displayName = COMPONENT_NAME$
|
|
16287
|
+
Message$1.displayName = COMPONENT_NAME$F;
|
|
15801
16288
|
Message$1.className = CLASSNAME$F;
|
|
15802
16289
|
|
|
15803
16290
|
/**
|
|
@@ -15813,13 +16300,13 @@ const Message = forwardRef((props, ref) => {
|
|
|
15813
16300
|
ref
|
|
15814
16301
|
});
|
|
15815
16302
|
});
|
|
15816
|
-
Message.displayName = COMPONENT_NAME$
|
|
16303
|
+
Message.displayName = COMPONENT_NAME$F;
|
|
15817
16304
|
Message.className = CLASSNAME$F;
|
|
15818
16305
|
|
|
15819
16306
|
/**
|
|
15820
16307
|
* Component display name.
|
|
15821
16308
|
*/
|
|
15822
|
-
const COMPONENT_NAME$
|
|
16309
|
+
const COMPONENT_NAME$E = 'Mosaic';
|
|
15823
16310
|
|
|
15824
16311
|
/**
|
|
15825
16312
|
* Component default class name and class prefix.
|
|
@@ -15926,7 +16413,7 @@ const Mosaic = forwardRef((props, ref) => {
|
|
|
15926
16413
|
...forwardedProps
|
|
15927
16414
|
});
|
|
15928
16415
|
});
|
|
15929
|
-
Mosaic.displayName = COMPONENT_NAME$
|
|
16416
|
+
Mosaic.displayName = COMPONENT_NAME$E;
|
|
15930
16417
|
Mosaic.className = CLASSNAME$E;
|
|
15931
16418
|
Mosaic.defaultProps = DEFAULT_PROPS$E;
|
|
15932
16419
|
|
|
@@ -15947,7 +16434,7 @@ const ITEM_CLASSNAME = 'lumx-navigation-item';
|
|
|
15947
16434
|
/**
|
|
15948
16435
|
* Component display name.
|
|
15949
16436
|
*/
|
|
15950
|
-
const COMPONENT_NAME$
|
|
16437
|
+
const COMPONENT_NAME$D = 'NavigationSection';
|
|
15951
16438
|
|
|
15952
16439
|
/**
|
|
15953
16440
|
* Component default class name and class prefix.
|
|
@@ -16042,7 +16529,7 @@ const NavigationSection = forwardRef((props, ref) => {
|
|
|
16042
16529
|
}))]
|
|
16043
16530
|
});
|
|
16044
16531
|
});
|
|
16045
|
-
NavigationSection.displayName = COMPONENT_NAME$
|
|
16532
|
+
NavigationSection.displayName = COMPONENT_NAME$D;
|
|
16046
16533
|
NavigationSection.className = CLASSNAME$D;
|
|
16047
16534
|
|
|
16048
16535
|
const {
|
|
@@ -16112,7 +16599,7 @@ const NavigationItem = Object.assign(forwardRefPolymorphic((props, ref) => {
|
|
|
16112
16599
|
/**
|
|
16113
16600
|
* Component display name.
|
|
16114
16601
|
*/
|
|
16115
|
-
const COMPONENT_NAME$
|
|
16602
|
+
const COMPONENT_NAME$C = 'Navigation';
|
|
16116
16603
|
|
|
16117
16604
|
/**
|
|
16118
16605
|
* Component default class name and class prefix.
|
|
@@ -16159,7 +16646,7 @@ const Navigation = forwardRef((props, ref) => {
|
|
|
16159
16646
|
})
|
|
16160
16647
|
});
|
|
16161
16648
|
});
|
|
16162
|
-
Navigation.displayName = COMPONENT_NAME$
|
|
16649
|
+
Navigation.displayName = COMPONENT_NAME$C;
|
|
16163
16650
|
Navigation.className = CLASSNAME$C;
|
|
16164
16651
|
Navigation.defaultProps = DEFAULT_PROPS$D;
|
|
16165
16652
|
|
|
@@ -16192,7 +16679,7 @@ const NOTIFICATION_CONFIGURATION = {
|
|
|
16192
16679
|
/**
|
|
16193
16680
|
* Component display name.
|
|
16194
16681
|
*/
|
|
16195
|
-
const COMPONENT_NAME$
|
|
16682
|
+
const COMPONENT_NAME$B = 'Notification';
|
|
16196
16683
|
|
|
16197
16684
|
/**
|
|
16198
16685
|
* Component default class name and class prefix.
|
|
@@ -16294,19 +16781,22 @@ const Notification = forwardRef((props, ref) => {
|
|
|
16294
16781
|
})
|
|
16295
16782
|
});
|
|
16296
16783
|
});
|
|
16297
|
-
Notification.displayName = COMPONENT_NAME$
|
|
16784
|
+
Notification.displayName = COMPONENT_NAME$B;
|
|
16298
16785
|
Notification.className = CLASSNAME$B;
|
|
16299
16786
|
Notification.defaultProps = DEFAULT_PROPS$C;
|
|
16300
16787
|
|
|
16301
16788
|
/**
|
|
16302
16789
|
* PopoverDialog props.
|
|
16303
|
-
* The PopoverDialog has the same props as the Popover
|
|
16790
|
+
* The PopoverDialog has the same props as the Popover, plus optional accessible-name props.
|
|
16791
|
+
* An accessible name can be provided via `label`, `aria-label`, `aria-labelledby`, or by
|
|
16792
|
+
* rendering a `DialogHeading` inside the dialog (which names it via the internal label
|
|
16793
|
+
* registry) - at least one of these should be used.
|
|
16304
16794
|
*/
|
|
16305
16795
|
|
|
16306
16796
|
/**
|
|
16307
16797
|
* Component display name.
|
|
16308
16798
|
*/
|
|
16309
|
-
const COMPONENT_NAME$
|
|
16799
|
+
const COMPONENT_NAME$A = 'PopoverDialog';
|
|
16310
16800
|
|
|
16311
16801
|
/**
|
|
16312
16802
|
* Component default class name and class prefix.
|
|
@@ -16319,21 +16809,22 @@ const CLASSNAME$A = 'lumx-popover-dialog';
|
|
|
16319
16809
|
const DEFAULT_PROPS$B = {};
|
|
16320
16810
|
|
|
16321
16811
|
/**
|
|
16322
|
-
*
|
|
16323
|
-
*
|
|
16324
|
-
*
|
|
16325
|
-
*
|
|
16326
|
-
* -
|
|
16327
|
-
* - Resets heading level context to 2
|
|
16812
|
+
* Renders the core Popover as a dialog, resolving its `aria-labelledby` from the ids registry.
|
|
16813
|
+
*
|
|
16814
|
+
* Must render as a descendant of the `IdsRegistryProvider` set up by `PopoverDialog` (which is why it
|
|
16815
|
+
* is its own component: the subscription hook needs to run below the provider). Internal to the
|
|
16816
|
+
* popover-dialog family - not exported from the package barrel.
|
|
16328
16817
|
*/
|
|
16329
|
-
const
|
|
16818
|
+
const PopoverDialogContent = forwardRef((props, ref) => {
|
|
16330
16819
|
const {
|
|
16331
16820
|
children,
|
|
16332
|
-
'aria-label':
|
|
16333
|
-
|
|
16821
|
+
'aria-label': ariaLabelAttr,
|
|
16822
|
+
'aria-labelledby': ariaLabelledByAttr,
|
|
16823
|
+
label = ariaLabelAttr,
|
|
16334
16824
|
className,
|
|
16335
16825
|
...forwardedProps
|
|
16336
16826
|
} = props;
|
|
16827
|
+
const labelId = useRegisteredId(DIALOG_LABEL_KEY);
|
|
16337
16828
|
return /*#__PURE__*/jsx(Popover, {
|
|
16338
16829
|
...forwardedProps,
|
|
16339
16830
|
ref: ref,
|
|
@@ -16342,9 +16833,10 @@ const PopoverDialog = forwardRef((props, ref) => {
|
|
|
16342
16833
|
"aria-modal": "true"
|
|
16343
16834
|
/**
|
|
16344
16835
|
* If a label is set, set as aria-label.
|
|
16345
|
-
* If it is undefined, the label can be set using the `aria-label` and `aria-labelledby` props
|
|
16836
|
+
* If it is undefined, the label can be set using the `aria-label` and `aria-labelledby` props,
|
|
16837
|
+
* or by rendering a `DialogHeading` inside the dialog (linked via the internal ids registry).
|
|
16346
16838
|
*/,
|
|
16347
|
-
|
|
16839
|
+
...resolveAccessibleNameProps(label, ariaLabelledByAttr || labelId),
|
|
16348
16840
|
closeOnClickAway: true,
|
|
16349
16841
|
closeOnEscape: true,
|
|
16350
16842
|
withFocusTrap: true,
|
|
@@ -16354,14 +16846,29 @@ const PopoverDialog = forwardRef((props, ref) => {
|
|
|
16354
16846
|
})
|
|
16355
16847
|
});
|
|
16356
16848
|
});
|
|
16357
|
-
|
|
16849
|
+
|
|
16850
|
+
/**
|
|
16851
|
+
* PopoverDialog component.
|
|
16852
|
+
* Defines a popover that acts like a dialog:
|
|
16853
|
+
* - Has a dialog aria role
|
|
16854
|
+
* - Sets a focus trap within the popover
|
|
16855
|
+
* - Closes on click away and escape
|
|
16856
|
+
* - Resets heading level context to 2
|
|
16857
|
+
*/
|
|
16858
|
+
const PopoverDialog = forwardRef((props, ref) => /*#__PURE__*/jsx(IdsRegistryProvider, {
|
|
16859
|
+
children: /*#__PURE__*/jsx(PopoverDialogContent, {
|
|
16860
|
+
...props,
|
|
16861
|
+
ref: ref
|
|
16862
|
+
})
|
|
16863
|
+
}));
|
|
16864
|
+
PopoverDialog.displayName = COMPONENT_NAME$A;
|
|
16358
16865
|
PopoverDialog.className = CLASSNAME$A;
|
|
16359
16866
|
PopoverDialog.defaultProps = DEFAULT_PROPS$B;
|
|
16360
16867
|
|
|
16361
16868
|
/**
|
|
16362
16869
|
* Component display name.
|
|
16363
16870
|
*/
|
|
16364
|
-
const COMPONENT_NAME$
|
|
16871
|
+
const COMPONENT_NAME$z = 'PostBlock';
|
|
16365
16872
|
|
|
16366
16873
|
/**
|
|
16367
16874
|
* Component default class name and class prefix.
|
|
@@ -16455,14 +16962,14 @@ const PostBlock = forwardRef((props, ref) => {
|
|
|
16455
16962
|
})]
|
|
16456
16963
|
});
|
|
16457
16964
|
});
|
|
16458
|
-
PostBlock.displayName = COMPONENT_NAME$
|
|
16965
|
+
PostBlock.displayName = COMPONENT_NAME$z;
|
|
16459
16966
|
PostBlock.className = CLASSNAME$z;
|
|
16460
16967
|
PostBlock.defaultProps = DEFAULT_PROPS$A;
|
|
16461
16968
|
|
|
16462
16969
|
/**
|
|
16463
16970
|
* Component display name.
|
|
16464
16971
|
*/
|
|
16465
|
-
const COMPONENT_NAME$
|
|
16972
|
+
const COMPONENT_NAME$y = 'ProgressLinear';
|
|
16466
16973
|
|
|
16467
16974
|
/**
|
|
16468
16975
|
* Component default class name and class prefix.
|
|
@@ -16528,7 +17035,7 @@ const ProgressLinear = forwardRef((props, ref) => {
|
|
|
16528
17035
|
...otherProps
|
|
16529
17036
|
});
|
|
16530
17037
|
});
|
|
16531
|
-
ProgressLinear.displayName = COMPONENT_NAME$
|
|
17038
|
+
ProgressLinear.displayName = COMPONENT_NAME$y;
|
|
16532
17039
|
ProgressLinear.className = CLASSNAME$y;
|
|
16533
17040
|
ProgressLinear.defaultProps = DEFAULT_PROPS$z;
|
|
16534
17041
|
|
|
@@ -16537,7 +17044,7 @@ ProgressLinear.defaultProps = DEFAULT_PROPS$z;
|
|
|
16537
17044
|
/**
|
|
16538
17045
|
* Component display name.
|
|
16539
17046
|
*/
|
|
16540
|
-
const COMPONENT_NAME$
|
|
17047
|
+
const COMPONENT_NAME$x = 'ProgressCircular';
|
|
16541
17048
|
|
|
16542
17049
|
/**
|
|
16543
17050
|
* Component default class name and class prefix.
|
|
@@ -16630,7 +17137,7 @@ const ProgressCircular = forwardRef((props, ref) => {
|
|
|
16630
17137
|
}
|
|
16631
17138
|
});
|
|
16632
17139
|
});
|
|
16633
|
-
ProgressCircular.displayName = COMPONENT_NAME$
|
|
17140
|
+
ProgressCircular.displayName = COMPONENT_NAME$x;
|
|
16634
17141
|
ProgressCircular.className = CLASSNAME$x;
|
|
16635
17142
|
ProgressCircular.defaultProps = DEFAULT_PROPS$y;
|
|
16636
17143
|
|
|
@@ -16646,7 +17153,7 @@ const ProgressVariant = {
|
|
|
16646
17153
|
/**
|
|
16647
17154
|
* Component display name.
|
|
16648
17155
|
*/
|
|
16649
|
-
const COMPONENT_NAME$
|
|
17156
|
+
const COMPONENT_NAME$w = 'Progress';
|
|
16650
17157
|
|
|
16651
17158
|
/**
|
|
16652
17159
|
* Component default class name and class prefix.
|
|
@@ -16693,7 +17200,7 @@ const Progress = forwardRef((props, ref) => {
|
|
|
16693
17200
|
})]
|
|
16694
17201
|
});
|
|
16695
17202
|
});
|
|
16696
|
-
Progress.displayName = COMPONENT_NAME$
|
|
17203
|
+
Progress.displayName = COMPONENT_NAME$w;
|
|
16697
17204
|
Progress.className = CLASSNAME$w;
|
|
16698
17205
|
Progress.defaultProps = DEFAULT_PROPS$x;
|
|
16699
17206
|
|
|
@@ -16878,7 +17385,7 @@ ProgressTrackerProvider.defaultProps = DEFAULT_PROPS$w;
|
|
|
16878
17385
|
/**
|
|
16879
17386
|
* Component display name.
|
|
16880
17387
|
*/
|
|
16881
|
-
const COMPONENT_NAME$
|
|
17388
|
+
const COMPONENT_NAME$v = 'ProgressTracker';
|
|
16882
17389
|
|
|
16883
17390
|
/**
|
|
16884
17391
|
* Component default class name and class prefix.
|
|
@@ -16944,14 +17451,14 @@ const ProgressTracker = forwardRef((props, ref) => {
|
|
|
16944
17451
|
})]
|
|
16945
17452
|
});
|
|
16946
17453
|
});
|
|
16947
|
-
ProgressTracker.displayName = COMPONENT_NAME$
|
|
17454
|
+
ProgressTracker.displayName = COMPONENT_NAME$v;
|
|
16948
17455
|
ProgressTracker.className = CLASSNAME$v;
|
|
16949
17456
|
ProgressTracker.defaultProps = DEFAULT_PROPS$v;
|
|
16950
17457
|
|
|
16951
17458
|
/**
|
|
16952
17459
|
* Component display name.
|
|
16953
17460
|
*/
|
|
16954
|
-
const COMPONENT_NAME$
|
|
17461
|
+
const COMPONENT_NAME$u = 'ProgressTrackerStep';
|
|
16955
17462
|
|
|
16956
17463
|
/**
|
|
16957
17464
|
* Component default class name and class prefix.
|
|
@@ -17058,14 +17565,14 @@ const ProgressTrackerStep = forwardRef((props, ref) => {
|
|
|
17058
17565
|
})]
|
|
17059
17566
|
});
|
|
17060
17567
|
});
|
|
17061
|
-
ProgressTrackerStep.displayName = COMPONENT_NAME$
|
|
17568
|
+
ProgressTrackerStep.displayName = COMPONENT_NAME$u;
|
|
17062
17569
|
ProgressTrackerStep.className = CLASSNAME$u;
|
|
17063
17570
|
ProgressTrackerStep.defaultProps = DEFAULT_PROPS$u;
|
|
17064
17571
|
|
|
17065
17572
|
/**
|
|
17066
17573
|
* Component display name.
|
|
17067
17574
|
*/
|
|
17068
|
-
const COMPONENT_NAME$
|
|
17575
|
+
const COMPONENT_NAME$t = 'ProgressTrackerStepPanel';
|
|
17069
17576
|
|
|
17070
17577
|
/**
|
|
17071
17578
|
* Component default class name and class prefix.
|
|
@@ -17112,14 +17619,14 @@ const ProgressTrackerStepPanel = forwardRef((props, ref) => {
|
|
|
17112
17619
|
children: (!state?.isLazy || isActive) && children
|
|
17113
17620
|
});
|
|
17114
17621
|
});
|
|
17115
|
-
ProgressTrackerStepPanel.displayName = COMPONENT_NAME$
|
|
17622
|
+
ProgressTrackerStepPanel.displayName = COMPONENT_NAME$t;
|
|
17116
17623
|
ProgressTrackerStepPanel.className = CLASSNAME$t;
|
|
17117
17624
|
ProgressTrackerStepPanel.defaultProps = DEFAULT_PROPS$t;
|
|
17118
17625
|
|
|
17119
17626
|
/**
|
|
17120
17627
|
* Component display name.
|
|
17121
17628
|
*/
|
|
17122
|
-
const COMPONENT_NAME$
|
|
17629
|
+
const COMPONENT_NAME$s = 'RadioButton';
|
|
17123
17630
|
|
|
17124
17631
|
/**
|
|
17125
17632
|
* Component default class name and class prefix.
|
|
@@ -17271,14 +17778,14 @@ const RadioButton = forwardRef((props, ref) => {
|
|
|
17271
17778
|
inputId
|
|
17272
17779
|
});
|
|
17273
17780
|
});
|
|
17274
|
-
RadioButton.displayName = COMPONENT_NAME$
|
|
17781
|
+
RadioButton.displayName = COMPONENT_NAME$s;
|
|
17275
17782
|
RadioButton.className = CLASSNAME$s;
|
|
17276
17783
|
RadioButton.defaultProps = DEFAULT_PROPS$s;
|
|
17277
17784
|
|
|
17278
17785
|
/**
|
|
17279
17786
|
* Component display name.
|
|
17280
17787
|
*/
|
|
17281
|
-
const COMPONENT_NAME$
|
|
17788
|
+
const COMPONENT_NAME$r = 'RadioGroup';
|
|
17282
17789
|
|
|
17283
17790
|
/**
|
|
17284
17791
|
* Component default class name and class prefix.
|
|
@@ -17310,7 +17817,7 @@ const RadioGroup$1 = props => {
|
|
|
17310
17817
|
children: children
|
|
17311
17818
|
});
|
|
17312
17819
|
};
|
|
17313
|
-
RadioGroup$1.displayName = COMPONENT_NAME$
|
|
17820
|
+
RadioGroup$1.displayName = COMPONENT_NAME$r;
|
|
17314
17821
|
RadioGroup$1.className = CLASSNAME$r;
|
|
17315
17822
|
RadioGroup$1.defaultProps = DEFAULT_PROPS$r;
|
|
17316
17823
|
|
|
@@ -17338,7 +17845,7 @@ const RadioGroup = forwardRef((props, ref) => {
|
|
|
17338
17845
|
...forwardedProps
|
|
17339
17846
|
});
|
|
17340
17847
|
});
|
|
17341
|
-
RadioGroup.displayName = COMPONENT_NAME$
|
|
17848
|
+
RadioGroup.displayName = COMPONENT_NAME$r;
|
|
17342
17849
|
RadioGroup.className = CLASSNAME$r;
|
|
17343
17850
|
|
|
17344
17851
|
/**
|
|
@@ -17486,7 +17993,7 @@ const SelectVariant = {
|
|
|
17486
17993
|
};
|
|
17487
17994
|
|
|
17488
17995
|
/** The display name of the component. */
|
|
17489
|
-
const COMPONENT_NAME$
|
|
17996
|
+
const COMPONENT_NAME$q = 'Select';
|
|
17490
17997
|
|
|
17491
17998
|
/** The default class name and classes prefix for this component. */
|
|
17492
17999
|
const CLASSNAME$p = 'lumx-select';
|
|
@@ -17630,13 +18137,13 @@ const Select = forwardRef((props, ref) => {
|
|
|
17630
18137
|
isEmpty: isEmpty$1
|
|
17631
18138
|
}, ref);
|
|
17632
18139
|
});
|
|
17633
|
-
Select.displayName = COMPONENT_NAME$
|
|
18140
|
+
Select.displayName = COMPONENT_NAME$q;
|
|
17634
18141
|
Select.className = CLASSNAME$p;
|
|
17635
18142
|
Select.defaultProps = DEFAULT_PROPS$q;
|
|
17636
18143
|
Select.className = CLASSNAME$p;
|
|
17637
18144
|
|
|
17638
18145
|
/** The display name of the component. */
|
|
17639
|
-
const COMPONENT_NAME$
|
|
18146
|
+
const COMPONENT_NAME$p = 'Select';
|
|
17640
18147
|
|
|
17641
18148
|
/** The default class name and classes prefix for this component. */
|
|
17642
18149
|
const CLASSNAME$o = 'lumx-select';
|
|
@@ -17784,7 +18291,7 @@ const SelectMultiple = forwardRef((props, ref) => {
|
|
|
17784
18291
|
isMultiple: true
|
|
17785
18292
|
}, ref);
|
|
17786
18293
|
});
|
|
17787
|
-
SelectMultiple.displayName = COMPONENT_NAME$
|
|
18294
|
+
SelectMultiple.displayName = COMPONENT_NAME$p;
|
|
17788
18295
|
SelectMultiple.className = CLASSNAME$o;
|
|
17789
18296
|
SelectMultiple.defaultProps = DEFAULT_PROPS$p;
|
|
17790
18297
|
|
|
@@ -17937,7 +18444,7 @@ function renderSelectOptions(props, components) {
|
|
|
17937
18444
|
/**
|
|
17938
18445
|
* Component display name.
|
|
17939
18446
|
*/
|
|
17940
|
-
const COMPONENT_NAME$
|
|
18447
|
+
const COMPONENT_NAME$o = 'SelectButton';
|
|
17941
18448
|
|
|
17942
18449
|
/**
|
|
17943
18450
|
* Component default class name.
|
|
@@ -18046,7 +18553,7 @@ const SelectButton$2 = (props, {
|
|
|
18046
18553
|
})]
|
|
18047
18554
|
});
|
|
18048
18555
|
};
|
|
18049
|
-
SelectButton$2.displayName = COMPONENT_NAME$
|
|
18556
|
+
SelectButton$2.displayName = COMPONENT_NAME$o;
|
|
18050
18557
|
SelectButton$2.className = CLASSNAME$n;
|
|
18051
18558
|
|
|
18052
18559
|
/**
|
|
@@ -18243,7 +18750,7 @@ const SelectButton = Object.assign(SelectButton$1, {
|
|
|
18243
18750
|
/**
|
|
18244
18751
|
* Component display name.
|
|
18245
18752
|
*/
|
|
18246
|
-
const COMPONENT_NAME$
|
|
18753
|
+
const COMPONENT_NAME$n = 'SelectTextField';
|
|
18247
18754
|
|
|
18248
18755
|
/**
|
|
18249
18756
|
* Component default class name.
|
|
@@ -18342,7 +18849,7 @@ const SelectTextField$2 = (props, {
|
|
|
18342
18849
|
})]
|
|
18343
18850
|
});
|
|
18344
18851
|
};
|
|
18345
|
-
SelectTextField$2.displayName = COMPONENT_NAME$
|
|
18852
|
+
SelectTextField$2.displayName = COMPONENT_NAME$n;
|
|
18346
18853
|
SelectTextField$2.className = CLASSNAME$m;
|
|
18347
18854
|
|
|
18348
18855
|
/**
|
|
@@ -18601,7 +19108,7 @@ const SelectTextField = Object.assign(SelectTextField$1, {
|
|
|
18601
19108
|
/**
|
|
18602
19109
|
* Component display name.
|
|
18603
19110
|
*/
|
|
18604
|
-
const COMPONENT_NAME$
|
|
19111
|
+
const COMPONENT_NAME$m = 'SideNavigation';
|
|
18605
19112
|
|
|
18606
19113
|
/**
|
|
18607
19114
|
* Component default class name and class prefix.
|
|
@@ -18631,13 +19138,13 @@ const SideNavigation = forwardRef((props, ref) => {
|
|
|
18631
19138
|
children: content
|
|
18632
19139
|
});
|
|
18633
19140
|
});
|
|
18634
|
-
SideNavigation.displayName = COMPONENT_NAME$
|
|
19141
|
+
SideNavigation.displayName = COMPONENT_NAME$m;
|
|
18635
19142
|
SideNavigation.className = CLASSNAME$l;
|
|
18636
19143
|
|
|
18637
19144
|
/**
|
|
18638
19145
|
* Component display name.
|
|
18639
19146
|
*/
|
|
18640
|
-
const COMPONENT_NAME$
|
|
19147
|
+
const COMPONENT_NAME$l = 'SideNavigationItem';
|
|
18641
19148
|
|
|
18642
19149
|
/**
|
|
18643
19150
|
* Component default class name and class prefix.
|
|
@@ -18752,14 +19259,14 @@ const SideNavigationItem = forwardRef((props, ref) => {
|
|
|
18752
19259
|
})]
|
|
18753
19260
|
});
|
|
18754
19261
|
});
|
|
18755
|
-
SideNavigationItem.displayName = COMPONENT_NAME$
|
|
19262
|
+
SideNavigationItem.displayName = COMPONENT_NAME$l;
|
|
18756
19263
|
SideNavigationItem.className = CLASSNAME$k;
|
|
18757
19264
|
SideNavigationItem.defaultProps = DEFAULT_PROPS$n;
|
|
18758
19265
|
|
|
18759
19266
|
/**
|
|
18760
19267
|
* Component display name.
|
|
18761
19268
|
*/
|
|
18762
|
-
const COMPONENT_NAME$
|
|
19269
|
+
const COMPONENT_NAME$k = 'SkeletonCircle';
|
|
18763
19270
|
|
|
18764
19271
|
/**
|
|
18765
19272
|
* Component default class name and class prefix.
|
|
@@ -18811,7 +19318,7 @@ const SkeletonRectangleVariant = {
|
|
|
18811
19318
|
/**
|
|
18812
19319
|
* Component display name.
|
|
18813
19320
|
*/
|
|
18814
|
-
const COMPONENT_NAME$
|
|
19321
|
+
const COMPONENT_NAME$j = 'SkeletonRectangle';
|
|
18815
19322
|
|
|
18816
19323
|
/**
|
|
18817
19324
|
* Component default class name and class prefix.
|
|
@@ -18895,7 +19402,7 @@ const SkeletonCircle = forwardRef((props, ref) => {
|
|
|
18895
19402
|
...forwardedProps
|
|
18896
19403
|
});
|
|
18897
19404
|
});
|
|
18898
|
-
SkeletonCircle.displayName = COMPONENT_NAME$
|
|
19405
|
+
SkeletonCircle.displayName = COMPONENT_NAME$k;
|
|
18899
19406
|
SkeletonCircle.defaultProps = DEFAULT_PROPS$l;
|
|
18900
19407
|
SkeletonCircle.className = CLASSNAME$j;
|
|
18901
19408
|
|
|
@@ -18936,7 +19443,7 @@ const SkeletonRectangle = forwardRef((props, ref) => {
|
|
|
18936
19443
|
...forwardedProps
|
|
18937
19444
|
});
|
|
18938
19445
|
});
|
|
18939
|
-
SkeletonRectangle.displayName = COMPONENT_NAME$
|
|
19446
|
+
SkeletonRectangle.displayName = COMPONENT_NAME$j;
|
|
18940
19447
|
SkeletonRectangle.className = CLASSNAME$i;
|
|
18941
19448
|
SkeletonRectangle.defaultProps = DEFAULT_PROPS$k;
|
|
18942
19449
|
|
|
@@ -18973,7 +19480,7 @@ const SkeletonTypography = forwardRef((props, ref) => {
|
|
|
18973
19480
|
...forwardedProps
|
|
18974
19481
|
});
|
|
18975
19482
|
});
|
|
18976
|
-
SkeletonTypography.displayName = COMPONENT_NAME$
|
|
19483
|
+
SkeletonTypography.displayName = COMPONENT_NAME$1c;
|
|
18977
19484
|
SkeletonTypography.defaultProps = DEFAULT_PROPS$j;
|
|
18978
19485
|
SkeletonTypography.className = CLASSNAME$19;
|
|
18979
19486
|
|
|
@@ -18999,7 +19506,7 @@ const clamp = (value, min, max) => {
|
|
|
18999
19506
|
/**
|
|
19000
19507
|
* Component display name.
|
|
19001
19508
|
*/
|
|
19002
|
-
const COMPONENT_NAME$
|
|
19509
|
+
const COMPONENT_NAME$i = 'Slider';
|
|
19003
19510
|
|
|
19004
19511
|
/**
|
|
19005
19512
|
* Component default class name and class prefix.
|
|
@@ -19266,7 +19773,7 @@ const Slider = forwardRef((props, ref) => {
|
|
|
19266
19773
|
})]
|
|
19267
19774
|
});
|
|
19268
19775
|
});
|
|
19269
|
-
Slider.displayName = COMPONENT_NAME$
|
|
19776
|
+
Slider.displayName = COMPONENT_NAME$i;
|
|
19270
19777
|
Slider.className = CLASSNAME$h;
|
|
19271
19778
|
Slider.defaultProps = DEFAULT_PROPS$i;
|
|
19272
19779
|
|
|
@@ -19601,7 +20108,7 @@ const useSlideFocusManagement = ({
|
|
|
19601
20108
|
/**
|
|
19602
20109
|
* Component display name.
|
|
19603
20110
|
*/
|
|
19604
|
-
const COMPONENT_NAME$
|
|
20111
|
+
const COMPONENT_NAME$h = 'SlideshowItemGroup';
|
|
19605
20112
|
|
|
19606
20113
|
/**
|
|
19607
20114
|
* Component default class name and class prefix.
|
|
@@ -19640,7 +20147,7 @@ const SlideshowItemGroup = forwardRef((props, ref) => {
|
|
|
19640
20147
|
children: children
|
|
19641
20148
|
});
|
|
19642
20149
|
});
|
|
19643
|
-
SlideshowItemGroup.displayName = COMPONENT_NAME$
|
|
20150
|
+
SlideshowItemGroup.displayName = COMPONENT_NAME$h;
|
|
19644
20151
|
SlideshowItemGroup.className = CLASSNAME$g;
|
|
19645
20152
|
|
|
19646
20153
|
/**
|
|
@@ -19771,7 +20278,7 @@ Slideshow.defaultProps = DEFAULT_PROPS$h;
|
|
|
19771
20278
|
/**
|
|
19772
20279
|
* Component display name.
|
|
19773
20280
|
*/
|
|
19774
|
-
const COMPONENT_NAME$
|
|
20281
|
+
const COMPONENT_NAME$g = 'SlideshowItem';
|
|
19775
20282
|
|
|
19776
20283
|
/**
|
|
19777
20284
|
* Component default class name and class prefix.
|
|
@@ -19798,7 +20305,7 @@ const SlideshowItem = forwardRef((props, ref) => {
|
|
|
19798
20305
|
children: children
|
|
19799
20306
|
});
|
|
19800
20307
|
});
|
|
19801
|
-
SlideshowItem.displayName = COMPONENT_NAME$
|
|
20308
|
+
SlideshowItem.displayName = COMPONENT_NAME$g;
|
|
19802
20309
|
SlideshowItem.className = CLASSNAME$f;
|
|
19803
20310
|
|
|
19804
20311
|
const isTouchDevice = () => 'ontouchstart' in window;
|
|
@@ -19861,7 +20368,7 @@ function usePaginationVisibleRange(activeIndex, slideCount) {
|
|
|
19861
20368
|
/**
|
|
19862
20369
|
* Component display name.
|
|
19863
20370
|
*/
|
|
19864
|
-
const COMPONENT_NAME$
|
|
20371
|
+
const COMPONENT_NAME$f = 'SlideshowControls';
|
|
19865
20372
|
|
|
19866
20373
|
/**
|
|
19867
20374
|
* Component default class name and class prefix.
|
|
@@ -20001,7 +20508,7 @@ const InternalSlideshowControls = forwardRef((props, ref) => {
|
|
|
20001
20508
|
})]
|
|
20002
20509
|
});
|
|
20003
20510
|
});
|
|
20004
|
-
InternalSlideshowControls.displayName = COMPONENT_NAME$
|
|
20511
|
+
InternalSlideshowControls.displayName = COMPONENT_NAME$f;
|
|
20005
20512
|
InternalSlideshowControls.className = CLASSNAME$e;
|
|
20006
20513
|
InternalSlideshowControls.defaultProps = DEFAULT_PROPS$g;
|
|
20007
20514
|
const SlideshowControls = Object.assign(InternalSlideshowControls, {
|
|
@@ -20121,7 +20628,7 @@ const useSlideScroll = ({
|
|
|
20121
20628
|
/**
|
|
20122
20629
|
* Component display name.
|
|
20123
20630
|
*/
|
|
20124
|
-
const COMPONENT_NAME$
|
|
20631
|
+
const COMPONENT_NAME$e = 'Slideshow';
|
|
20125
20632
|
|
|
20126
20633
|
/**
|
|
20127
20634
|
* Component default class name and class prefix.
|
|
@@ -20229,13 +20736,13 @@ const Slides = forwardRef((props, ref) => {
|
|
|
20229
20736
|
}), afterSlides]
|
|
20230
20737
|
});
|
|
20231
20738
|
});
|
|
20232
|
-
Slides.displayName = COMPONENT_NAME$
|
|
20739
|
+
Slides.displayName = COMPONENT_NAME$e;
|
|
20233
20740
|
Slides.className = CLASSNAME$d;
|
|
20234
20741
|
|
|
20235
20742
|
/**
|
|
20236
20743
|
* Component display name.
|
|
20237
20744
|
*/
|
|
20238
|
-
const COMPONENT_NAME$
|
|
20745
|
+
const COMPONENT_NAME$d = 'Switch';
|
|
20239
20746
|
|
|
20240
20747
|
/**
|
|
20241
20748
|
* Component default class name and class prefix.
|
|
@@ -20403,14 +20910,14 @@ const Switch = forwardRef((props, ref) => {
|
|
|
20403
20910
|
inputId
|
|
20404
20911
|
});
|
|
20405
20912
|
});
|
|
20406
|
-
Switch.displayName = COMPONENT_NAME$
|
|
20913
|
+
Switch.displayName = COMPONENT_NAME$d;
|
|
20407
20914
|
Switch.className = CLASSNAME$c;
|
|
20408
20915
|
Switch.defaultProps = DEFAULT_PROPS$d;
|
|
20409
20916
|
|
|
20410
20917
|
/**
|
|
20411
20918
|
* Component display name.
|
|
20412
20919
|
*/
|
|
20413
|
-
const COMPONENT_NAME$
|
|
20920
|
+
const COMPONENT_NAME$c = 'Table';
|
|
20414
20921
|
|
|
20415
20922
|
/**
|
|
20416
20923
|
* Component default class name and class prefix.
|
|
@@ -20483,14 +20990,14 @@ const Table = forwardRef((props, ref) => {
|
|
|
20483
20990
|
...otherProps
|
|
20484
20991
|
});
|
|
20485
20992
|
});
|
|
20486
|
-
Table.displayName = COMPONENT_NAME$
|
|
20993
|
+
Table.displayName = COMPONENT_NAME$c;
|
|
20487
20994
|
Table.className = CLASSNAME$b;
|
|
20488
20995
|
Table.defaultProps = DEFAULT_PROPS$c;
|
|
20489
20996
|
|
|
20490
20997
|
/**
|
|
20491
20998
|
* Component display name.
|
|
20492
20999
|
*/
|
|
20493
|
-
const COMPONENT_NAME$
|
|
21000
|
+
const COMPONENT_NAME$b = 'TableBody';
|
|
20494
21001
|
|
|
20495
21002
|
/**
|
|
20496
21003
|
* Component default class name and class prefix.
|
|
@@ -20540,7 +21047,7 @@ const TableBody = forwardRef((props, ref) => {
|
|
|
20540
21047
|
...otherProps
|
|
20541
21048
|
});
|
|
20542
21049
|
});
|
|
20543
|
-
TableBody.displayName = COMPONENT_NAME$
|
|
21050
|
+
TableBody.displayName = COMPONENT_NAME$b;
|
|
20544
21051
|
TableBody.className = CLASSNAME$a;
|
|
20545
21052
|
|
|
20546
21053
|
const ThOrder = {
|
|
@@ -20562,7 +21069,7 @@ const TableCellVariant = {
|
|
|
20562
21069
|
/**
|
|
20563
21070
|
* Component display name.
|
|
20564
21071
|
*/
|
|
20565
|
-
const COMPONENT_NAME$
|
|
21072
|
+
const COMPONENT_NAME$a = 'TableCell';
|
|
20566
21073
|
|
|
20567
21074
|
/**
|
|
20568
21075
|
* Component default class name and class prefix.
|
|
@@ -20678,14 +21185,14 @@ const TableCell = forwardRef((props, ref) => {
|
|
|
20678
21185
|
handleClick: onHeaderClick
|
|
20679
21186
|
});
|
|
20680
21187
|
});
|
|
20681
|
-
TableCell.displayName = COMPONENT_NAME$
|
|
21188
|
+
TableCell.displayName = COMPONENT_NAME$a;
|
|
20682
21189
|
TableCell.className = CLASSNAME$9;
|
|
20683
21190
|
TableCell.defaultProps = DEFAULT_PROPS$b;
|
|
20684
21191
|
|
|
20685
21192
|
/**
|
|
20686
21193
|
* Component display name.
|
|
20687
21194
|
*/
|
|
20688
|
-
const COMPONENT_NAME$
|
|
21195
|
+
const COMPONENT_NAME$9 = 'TableHeader';
|
|
20689
21196
|
|
|
20690
21197
|
/**
|
|
20691
21198
|
* Component default class name and class prefix.
|
|
@@ -20740,14 +21247,14 @@ const TableHeader = forwardRef((props, ref) => {
|
|
|
20740
21247
|
...otherProps
|
|
20741
21248
|
});
|
|
20742
21249
|
});
|
|
20743
|
-
TableHeader.displayName = COMPONENT_NAME$
|
|
21250
|
+
TableHeader.displayName = COMPONENT_NAME$9;
|
|
20744
21251
|
TableHeader.className = CLASSNAME$8;
|
|
20745
21252
|
TableHeader.defaultProps = DEFAULT_PROPS$a;
|
|
20746
21253
|
|
|
20747
21254
|
/**
|
|
20748
21255
|
* Component display name.
|
|
20749
21256
|
*/
|
|
20750
|
-
const COMPONENT_NAME$
|
|
21257
|
+
const COMPONENT_NAME$8 = 'TableRow';
|
|
20751
21258
|
|
|
20752
21259
|
/**
|
|
20753
21260
|
* Component default class name and class prefix.
|
|
@@ -20830,7 +21337,7 @@ const TableRow = forwardRef((props, ref) => {
|
|
|
20830
21337
|
...forwardedProps
|
|
20831
21338
|
});
|
|
20832
21339
|
});
|
|
20833
|
-
TableRow.displayName = COMPONENT_NAME$
|
|
21340
|
+
TableRow.displayName = COMPONENT_NAME$8;
|
|
20834
21341
|
TableRow.className = CLASSNAME$7;
|
|
20835
21342
|
TableRow.defaultProps = DEFAULT_PROPS$9;
|
|
20836
21343
|
|
|
@@ -20918,7 +21425,7 @@ let TabListLayout = /*#__PURE__*/function (TabListLayout) {
|
|
|
20918
21425
|
/**
|
|
20919
21426
|
* Component display name.
|
|
20920
21427
|
*/
|
|
20921
|
-
const COMPONENT_NAME$
|
|
21428
|
+
const COMPONENT_NAME$7 = 'TabList';
|
|
20922
21429
|
|
|
20923
21430
|
/**
|
|
20924
21431
|
* Component default props.
|
|
@@ -20944,10 +21451,12 @@ const TabList$1 = props => {
|
|
|
20944
21451
|
className,
|
|
20945
21452
|
layout = DEFAULT_PROPS$7.layout,
|
|
20946
21453
|
position = DEFAULT_PROPS$7.position,
|
|
21454
|
+
role = 'tablist',
|
|
20947
21455
|
theme,
|
|
20948
21456
|
ref,
|
|
20949
21457
|
...forwardedProps
|
|
20950
21458
|
} = props;
|
|
21459
|
+
const LinkWrapper = role === 'navigation' ? 'nav' : 'div';
|
|
20951
21460
|
return /*#__PURE__*/jsx("div", {
|
|
20952
21461
|
ref: ref,
|
|
20953
21462
|
...forwardedProps,
|
|
@@ -20956,9 +21465,9 @@ const TabList$1 = props => {
|
|
|
20956
21465
|
[`position-${position}`]: Boolean(position),
|
|
20957
21466
|
[`theme-${theme}`]: Boolean(theme)
|
|
20958
21467
|
})),
|
|
20959
|
-
children: /*#__PURE__*/jsx(
|
|
21468
|
+
children: /*#__PURE__*/jsx(LinkWrapper, {
|
|
20960
21469
|
className: element$4('links'),
|
|
20961
|
-
role:
|
|
21470
|
+
role: role,
|
|
20962
21471
|
"aria-label": ariaLabel,
|
|
20963
21472
|
children: children
|
|
20964
21473
|
})
|
|
@@ -20970,6 +21479,8 @@ const TabList$1 = props => {
|
|
|
20970
21479
|
*
|
|
20971
21480
|
* Implements WAI-ARIA `tablist` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}
|
|
20972
21481
|
*
|
|
21482
|
+
* Renders a `role="navigation"` landmark instead when used outside a `TabProvider` (nav-link mode).
|
|
21483
|
+
*
|
|
20973
21484
|
* @param props Component props.
|
|
20974
21485
|
* @param ref Component ref.
|
|
20975
21486
|
* @return React element.
|
|
@@ -20981,24 +21492,29 @@ const TabList = forwardRef((props, ref) => {
|
|
|
20981
21492
|
...forwardedProps
|
|
20982
21493
|
} = props;
|
|
20983
21494
|
const tabListRef = React__default.useRef(null);
|
|
21495
|
+
const role = useTabProviderContextState() === undefined ? 'navigation' : 'tablist';
|
|
21496
|
+
|
|
21497
|
+
// Classic roving tabindex (role="tab"). Disabled in nav-link mode: nav links keep their
|
|
21498
|
+
// native per-link Tab stops, so this path is never engaged there.
|
|
20984
21499
|
useRovingTabIndexContainer({
|
|
20985
|
-
containerRef: tabListRef,
|
|
21500
|
+
containerRef: role === 'navigation' ? null : tabListRef,
|
|
20986
21501
|
itemSelector: '[role="tab"]'
|
|
20987
21502
|
});
|
|
20988
21503
|
return TabList$1({
|
|
21504
|
+
...forwardedProps,
|
|
20989
21505
|
theme,
|
|
20990
|
-
|
|
20991
|
-
|
|
21506
|
+
role,
|
|
21507
|
+
ref: mergeRefs(ref, tabListRef)
|
|
20992
21508
|
});
|
|
20993
21509
|
});
|
|
20994
|
-
TabList.displayName = COMPONENT_NAME$
|
|
21510
|
+
TabList.displayName = COMPONENT_NAME$7;
|
|
20995
21511
|
TabList.className = TABS_CLASSNAME;
|
|
20996
21512
|
TabList.defaultProps = DEFAULT_PROPS$7;
|
|
20997
21513
|
|
|
20998
21514
|
/**
|
|
20999
21515
|
* Component display name.
|
|
21000
21516
|
*/
|
|
21001
|
-
const COMPONENT_NAME$
|
|
21517
|
+
const COMPONENT_NAME$6 = 'Tab';
|
|
21002
21518
|
|
|
21003
21519
|
/**
|
|
21004
21520
|
* Component default props.
|
|
@@ -21014,9 +21530,11 @@ const {
|
|
|
21014
21530
|
} = bem(CLASSNAME$6);
|
|
21015
21531
|
|
|
21016
21532
|
/**
|
|
21017
|
-
* Tab component.
|
|
21018
|
-
*
|
|
21019
|
-
*
|
|
21533
|
+
* Tab component. Two modes keyed on `TabProvider` presence (via the wrapper-resolved `role`):
|
|
21534
|
+
* tab mode (`role === 'tab'`, inside a provider) implements the WAI-ARIA `tab` role
|
|
21535
|
+
* {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label};
|
|
21536
|
+
* nav-link mode (no provider) renders plain link semantics (`aria-current`, no tab role/aria).
|
|
21537
|
+
* `as` only selects the rendered element and applies in both modes.
|
|
21020
21538
|
*
|
|
21021
21539
|
* @param props Component props.
|
|
21022
21540
|
* @param ref Component ref.
|
|
@@ -21024,6 +21542,7 @@ const {
|
|
|
21024
21542
|
*/
|
|
21025
21543
|
const Tab$1 = props => {
|
|
21026
21544
|
const {
|
|
21545
|
+
as = 'button',
|
|
21027
21546
|
className,
|
|
21028
21547
|
icon,
|
|
21029
21548
|
iconProps = {},
|
|
@@ -21031,6 +21550,7 @@ const Tab$1 = props => {
|
|
|
21031
21550
|
isDisabled,
|
|
21032
21551
|
id,
|
|
21033
21552
|
isActive,
|
|
21553
|
+
role,
|
|
21034
21554
|
label,
|
|
21035
21555
|
handleFocus,
|
|
21036
21556
|
handleKeyPress,
|
|
@@ -21040,112 +21560,150 @@ const Tab$1 = props => {
|
|
|
21040
21560
|
changeToTab,
|
|
21041
21561
|
tabPanelId,
|
|
21042
21562
|
shouldActivateOnFocus,
|
|
21043
|
-
tabId,
|
|
21044
21563
|
Icon,
|
|
21045
21564
|
Text,
|
|
21046
21565
|
ref,
|
|
21047
21566
|
...forwardedProps
|
|
21048
21567
|
} = props;
|
|
21049
|
-
|
|
21050
|
-
|
|
21051
|
-
|
|
21052
|
-
|
|
21053
|
-
|
|
21054
|
-
|
|
21055
|
-
|
|
21056
|
-
|
|
21057
|
-
|
|
21568
|
+
let rawClickableProps;
|
|
21569
|
+
if (role === 'tab') {
|
|
21570
|
+
// Mode: WAI-ARIA `tab` role (inside a TabProvider)
|
|
21571
|
+
const changeToCurrentTab = () => {
|
|
21572
|
+
if (isAnyDisabled) {
|
|
21573
|
+
return;
|
|
21574
|
+
}
|
|
21575
|
+
changeToTab?.();
|
|
21576
|
+
};
|
|
21577
|
+
const onFocus = event => {
|
|
21578
|
+
handleFocus?.(event);
|
|
21579
|
+
if (shouldActivateOnFocus) {
|
|
21580
|
+
changeToCurrentTab();
|
|
21581
|
+
}
|
|
21582
|
+
};
|
|
21583
|
+
const onKeyPress = event => {
|
|
21584
|
+
handleKeyPress?.(event);
|
|
21585
|
+
if (event.key !== 'Enter' || isAnyDisabled) {
|
|
21586
|
+
return;
|
|
21587
|
+
}
|
|
21058
21588
|
changeToCurrentTab();
|
|
21059
|
-
}
|
|
21060
|
-
|
|
21061
|
-
|
|
21062
|
-
|
|
21063
|
-
|
|
21064
|
-
|
|
21065
|
-
|
|
21066
|
-
|
|
21067
|
-
|
|
21068
|
-
|
|
21069
|
-
|
|
21070
|
-
|
|
21071
|
-
|
|
21072
|
-
|
|
21589
|
+
};
|
|
21590
|
+
rawClickableProps = {
|
|
21591
|
+
...forwardedProps,
|
|
21592
|
+
'aria-disabled': isAnyDisabled ? 'true' : 'false',
|
|
21593
|
+
handleClick: changeToCurrentTab,
|
|
21594
|
+
onFocus,
|
|
21595
|
+
role: 'tab',
|
|
21596
|
+
'aria-selected': isActive,
|
|
21597
|
+
'aria-controls': tabPanelId,
|
|
21598
|
+
[keyPressProp]: onKeyPress,
|
|
21599
|
+
[tabIndexProp]: isActive ? 0 : tabIndex
|
|
21600
|
+
};
|
|
21601
|
+
} else {
|
|
21602
|
+
// Mode: nav link
|
|
21603
|
+
const {
|
|
21604
|
+
onClick,
|
|
21605
|
+
...rest
|
|
21606
|
+
} = forwardedProps;
|
|
21607
|
+
rawClickableProps = {
|
|
21608
|
+
...rest,
|
|
21609
|
+
isDisabled,
|
|
21610
|
+
handleClick: onClick,
|
|
21611
|
+
'aria-current': isActive ? 'page' : undefined
|
|
21612
|
+
};
|
|
21613
|
+
}
|
|
21614
|
+
return RawClickable({
|
|
21615
|
+
...rawClickableProps,
|
|
21616
|
+
as,
|
|
21617
|
+
id,
|
|
21073
21618
|
className: classnames(className, block$6({
|
|
21074
21619
|
'is-active': isActive,
|
|
21075
21620
|
'is-disabled': isAnyDisabled
|
|
21076
21621
|
})),
|
|
21077
|
-
|
|
21078
|
-
|
|
21079
|
-
|
|
21080
|
-
|
|
21081
|
-
|
|
21082
|
-
|
|
21083
|
-
|
|
21084
|
-
|
|
21085
|
-
|
|
21086
|
-
|
|
21087
|
-
|
|
21088
|
-
|
|
21089
|
-
}), label && /*#__PURE__*/jsx(Text, {
|
|
21090
|
-
as: "span",
|
|
21091
|
-
truncate: true,
|
|
21092
|
-
children: label
|
|
21093
|
-
})]
|
|
21622
|
+
ref: ref,
|
|
21623
|
+
children: /*#__PURE__*/jsxs(Fragment, {
|
|
21624
|
+
children: [icon && /*#__PURE__*/jsx(Icon, {
|
|
21625
|
+
icon: icon,
|
|
21626
|
+
size: Size.xs,
|
|
21627
|
+
...iconProps
|
|
21628
|
+
}), label && /*#__PURE__*/jsx(Text, {
|
|
21629
|
+
as: "span",
|
|
21630
|
+
truncate: true,
|
|
21631
|
+
children: label
|
|
21632
|
+
})]
|
|
21633
|
+
})
|
|
21094
21634
|
});
|
|
21095
21635
|
};
|
|
21096
21636
|
|
|
21097
21637
|
/**
|
|
21098
|
-
* Defines the props of the component.
|
|
21638
|
+
* Defines the props of the component. Polymorphic on `as` (element selection only): `as` picks the
|
|
21639
|
+
* rendered element (`as="a"` with required `href`, or `as={RouterLink}`), while the mode
|
|
21640
|
+
* (`role="tab"` vs nav-link) is driven by `TabProvider` presence. The forwarded ref type follows `as`.
|
|
21099
21641
|
*/
|
|
21100
21642
|
|
|
21101
21643
|
/**
|
|
21102
21644
|
* Tab component.
|
|
21103
21645
|
*
|
|
21104
21646
|
* Implements WAI-ARIA `tab` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}
|
|
21647
|
+
* when rendered inside a `TabProvider`.
|
|
21648
|
+
*
|
|
21649
|
+
* Outside a `TabProvider` (nav-link mode): plain link, no `role="tab"`/roving tabindex/`changeToTab`
|
|
21650
|
+
* dispatch — only `aria-current` marks the active item.
|
|
21105
21651
|
*
|
|
21106
21652
|
* @param props Component props.
|
|
21107
|
-
* @param ref Component ref.
|
|
21653
|
+
* @param ref Component ref (type follows `as`).
|
|
21108
21654
|
* @return React element.
|
|
21109
21655
|
*/
|
|
21110
|
-
const Tab =
|
|
21656
|
+
const Tab = Object.assign(forwardRefPolymorphic((props, ref) => {
|
|
21111
21657
|
const {
|
|
21112
21658
|
isAnyDisabled,
|
|
21113
21659
|
otherProps
|
|
21114
21660
|
} = useDisableStateProps(props);
|
|
21115
21661
|
const {
|
|
21662
|
+
as = 'button',
|
|
21116
21663
|
isActive: propIsActive,
|
|
21117
21664
|
id,
|
|
21118
21665
|
onFocus,
|
|
21119
21666
|
onKeyPress,
|
|
21120
21667
|
...forwardedProps
|
|
21121
21668
|
} = otherProps;
|
|
21669
|
+
|
|
21670
|
+
// Register into the provider (if any) so it can track this tab's index / active state.
|
|
21122
21671
|
const tabState = useTabProviderContext('tab', id);
|
|
21672
|
+
// In a provider => tab mode (role="tab"); outside => nav-link mode. Mirrors TabList's role.
|
|
21673
|
+
const inProvider = tabState !== undefined;
|
|
21123
21674
|
const {
|
|
21124
21675
|
isLazy: _isLazy,
|
|
21676
|
+
tabId,
|
|
21125
21677
|
...state
|
|
21126
21678
|
} = tabState ?? {};
|
|
21679
|
+
// Without a provider there's no active index, so this collapses to the caller-provided value.
|
|
21127
21680
|
const isActive = propIsActive || state?.isActive;
|
|
21128
21681
|
return Tab$1({
|
|
21129
|
-
|
|
21682
|
+
...forwardedProps,
|
|
21130
21683
|
...state,
|
|
21684
|
+
as,
|
|
21685
|
+
role: inProvider ? 'tab' : undefined,
|
|
21131
21686
|
Icon,
|
|
21132
21687
|
Text,
|
|
21133
21688
|
ref,
|
|
21689
|
+
// Falls back to the caller-provided `id` when there's no TabProvider to generate one.
|
|
21690
|
+
id: tabId || id,
|
|
21134
21691
|
isActive,
|
|
21135
21692
|
isAnyDisabled,
|
|
21693
|
+
isDisabled: isAnyDisabled,
|
|
21136
21694
|
handleFocus: onFocus,
|
|
21137
|
-
handleKeyPress: onKeyPress
|
|
21138
|
-
...forwardedProps
|
|
21695
|
+
handleKeyPress: onKeyPress
|
|
21139
21696
|
});
|
|
21697
|
+
}), {
|
|
21698
|
+
displayName: COMPONENT_NAME$6,
|
|
21699
|
+
className: CLASSNAME$6,
|
|
21700
|
+
defaultProps: DEFAULT_PROPS$6
|
|
21140
21701
|
});
|
|
21141
|
-
Tab.displayName = COMPONENT_NAME$5;
|
|
21142
|
-
Tab.className = CLASSNAME$6;
|
|
21143
|
-
Tab.defaultProps = DEFAULT_PROPS$6;
|
|
21144
21702
|
|
|
21145
21703
|
/**
|
|
21146
21704
|
* Component display name.
|
|
21147
21705
|
*/
|
|
21148
|
-
const COMPONENT_NAME$
|
|
21706
|
+
const COMPONENT_NAME$5 = 'TabPanel';
|
|
21149
21707
|
|
|
21150
21708
|
/**
|
|
21151
21709
|
* Component default class name and class prefix.
|
|
@@ -21225,7 +21783,7 @@ const TabPanel = forwardRef((props, ref) => {
|
|
|
21225
21783
|
...forwardedProps
|
|
21226
21784
|
});
|
|
21227
21785
|
});
|
|
21228
|
-
TabPanel.displayName = COMPONENT_NAME$
|
|
21786
|
+
TabPanel.displayName = COMPONENT_NAME$5;
|
|
21229
21787
|
TabPanel.className = CLASSNAME$5;
|
|
21230
21788
|
TabPanel.defaultProps = DEFAULT_PROPS$5;
|
|
21231
21789
|
|
|
@@ -21376,7 +21934,7 @@ function calculateFocusPointStyle({
|
|
|
21376
21934
|
/**
|
|
21377
21935
|
* Component display name.
|
|
21378
21936
|
*/
|
|
21379
|
-
const COMPONENT_NAME$
|
|
21937
|
+
const COMPONENT_NAME$4 = 'Thumbnail';
|
|
21380
21938
|
|
|
21381
21939
|
/**
|
|
21382
21940
|
* Component default class name and class prefix.
|
|
@@ -21666,7 +22224,7 @@ const Thumbnail = forwardRef((props, ref) => {
|
|
|
21666
22224
|
})
|
|
21667
22225
|
});
|
|
21668
22226
|
});
|
|
21669
|
-
Thumbnail.displayName = COMPONENT_NAME$
|
|
22227
|
+
Thumbnail.displayName = COMPONENT_NAME$4;
|
|
21670
22228
|
Thumbnail.className = CLASSNAME$4;
|
|
21671
22229
|
Thumbnail.defaultProps = DEFAULT_PROPS$4;
|
|
21672
22230
|
|
|
@@ -21710,7 +22268,7 @@ const ThumbnailObjectFit = {
|
|
|
21710
22268
|
/**
|
|
21711
22269
|
* Component display name.
|
|
21712
22270
|
*/
|
|
21713
|
-
const COMPONENT_NAME$
|
|
22271
|
+
const COMPONENT_NAME$3 = 'TimePickerField';
|
|
21714
22272
|
|
|
21715
22273
|
/**
|
|
21716
22274
|
* Component default class name (BEM root).
|
|
@@ -21811,7 +22369,7 @@ const TimePickerField$1 = (props, {
|
|
|
21811
22369
|
translations: translations
|
|
21812
22370
|
});
|
|
21813
22371
|
};
|
|
21814
|
-
TimePickerField$1.displayName = COMPONENT_NAME$
|
|
22372
|
+
TimePickerField$1.displayName = COMPONENT_NAME$3;
|
|
21815
22373
|
TimePickerField$1.className = CLASSNAME$3;
|
|
21816
22374
|
|
|
21817
22375
|
/**
|
|
@@ -22075,12 +22633,12 @@ const TimePickerField = props => {
|
|
|
22075
22633
|
Option: SelectTextField.Option
|
|
22076
22634
|
});
|
|
22077
22635
|
};
|
|
22078
|
-
TimePickerField.displayName = COMPONENT_NAME$
|
|
22636
|
+
TimePickerField.displayName = COMPONENT_NAME$3;
|
|
22079
22637
|
|
|
22080
22638
|
/**
|
|
22081
22639
|
* Component display name.
|
|
22082
22640
|
*/
|
|
22083
|
-
const
|
|
22641
|
+
const COMPONENT_NAME$2 = 'Toolbar';
|
|
22084
22642
|
|
|
22085
22643
|
/**
|
|
22086
22644
|
* Component default class name and class prefix.
|
|
@@ -22149,7 +22707,7 @@ const Toolbar = forwardRef((props, ref) => {
|
|
|
22149
22707
|
...props
|
|
22150
22708
|
});
|
|
22151
22709
|
});
|
|
22152
|
-
Toolbar.displayName =
|
|
22710
|
+
Toolbar.displayName = COMPONENT_NAME$2;
|
|
22153
22711
|
Toolbar.className = CLASSNAME$2;
|
|
22154
22712
|
Toolbar.defaultProps = DEFAULT_PROPS$2;
|
|
22155
22713
|
|
|
@@ -22548,5 +23106,5 @@ UserBlock.displayName = COMPONENT_NAME;
|
|
|
22548
23106
|
UserBlock.className = CLASSNAME;
|
|
22549
23107
|
UserBlock.defaultProps = DEFAULT_PROPS;
|
|
22550
23108
|
|
|
22551
|
-
export { AlertDialog, Autocomplete, AutocompleteMultiple, Avatar, Badge, BadgeWrapper, Button, ButtonGroup, CLASSNAME$1w as CLASSNAME, COMPONENT_NAME$
|
|
23109
|
+
export { AlertDialog, Autocomplete, AutocompleteMultiple, Avatar, Badge, BadgeWrapper, Button, ButtonGroup, CLASSNAME$1w as CLASSNAME, COMPONENT_NAME$1z as COMPONENT_NAME, Checkbox, Chip, ChipGroup, Combobox, CommentBlock, CommentBlockVariant, DEFAULT_PROPS$1e as DEFAULT_PROPS, DatePicker, DatePickerControlled, DatePickerField, Dialog, DialogHeading, Divider, DragHandle, Dropdown, ExpansionPanel, Flag, FlexBox, GenericBlock, GenericBlockGapSize, Grid, GridColumn, GridItem, Heading, HeadingLevelProvider, Icon, IconButton, ImageBlock, ImageBlockCaptionPosition, ImageLightbox, InlineList, InputHelper, InputLabel, Lightbox, Link, LinkPreview, List, ListDivider, ListItem, ListSection, ListSubheader, MenuButton, ListDivider as MenuDivider, MenuItem, Message, Mosaic, Navigation, Notification, Placement, Popover, PopoverDialog, PostBlock, Progress, ProgressCircular, ProgressLinear, ProgressTracker, ProgressTrackerProvider, ProgressTrackerStep, ProgressTrackerStepPanel, ProgressVariant, RadioButton, RadioGroup, RawInputText, RawInputTextarea, Select, SelectButton, SelectMultiple, SelectMultipleField, SelectTextField, SelectVariant, SelectionChipGroup, SideNavigation, SideNavigationItem, SkeletonCircle, SkeletonRectangle, SkeletonRectangleVariant, SkeletonTypography, Slider, Slides, Slideshow, SlideshowControls, SlideshowItem, Switch, CLASSNAME$3 as TIME_PICKER_FIELD_CLASSNAME, COMPONENT_NAME$3 as TIME_PICKER_FIELD_COMPONENT_NAME, Tab, TabList, TabListLayout, TabPanel, TabProvider, Table, TableBody, TableCell, TableCellVariant, TableHeader, TableRow, Text, TextField, ThOrder, ThemeProvider, Thumbnail, ThumbnailAspectRatio, ThumbnailObjectFit, ThumbnailVariant, TimePickerField, Toolbar, Tooltip, Uploader, UploaderVariant, UserBlock, clamp, useFocusPointStyle, useHeadingLevel, useTheme };
|
|
22552
23110
|
//# sourceMappingURL=index.js.map
|