@lumx/react 4.7.1-alpha.4 → 4.8.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -4
- package/index.d.ts +97 -42
- package/index.js +379 -261
- package/index.js.map +1 -1
- package/package.json +4 -4
- package/CONTRIBUTING.md +0 -157
package/index.js
CHANGED
|
@@ -110,7 +110,7 @@ const {
|
|
|
110
110
|
/**
|
|
111
111
|
* Component default props.
|
|
112
112
|
*/
|
|
113
|
-
const DEFAULT_PROPS$
|
|
113
|
+
const DEFAULT_PROPS$1e = {
|
|
114
114
|
size: Size$1.tiny,
|
|
115
115
|
kind: Kind$1.info
|
|
116
116
|
};
|
|
@@ -131,8 +131,8 @@ const AlertDialog = forwardRef((props, ref) => {
|
|
|
131
131
|
className,
|
|
132
132
|
cancelProps,
|
|
133
133
|
confirmProps,
|
|
134
|
-
kind = DEFAULT_PROPS$
|
|
135
|
-
size = DEFAULT_PROPS$
|
|
134
|
+
kind = DEFAULT_PROPS$1e.kind,
|
|
135
|
+
size = DEFAULT_PROPS$1e.size,
|
|
136
136
|
dialogProps,
|
|
137
137
|
children,
|
|
138
138
|
...forwardedProps
|
|
@@ -220,7 +220,7 @@ const AlertDialog = forwardRef((props, ref) => {
|
|
|
220
220
|
});
|
|
221
221
|
AlertDialog.displayName = COMPONENT_NAME$1m;
|
|
222
222
|
AlertDialog.className = CLASSNAME$1l;
|
|
223
|
-
AlertDialog.defaultProps = DEFAULT_PROPS$
|
|
223
|
+
AlertDialog.defaultProps = DEFAULT_PROPS$1e;
|
|
224
224
|
|
|
225
225
|
/**
|
|
226
226
|
* Hook focusing an element when defined and `focus` boolean `true`.
|
|
@@ -322,7 +322,7 @@ const CLASSNAME$1k = 'lumx-autocomplete';
|
|
|
322
322
|
/**
|
|
323
323
|
* Component default props.
|
|
324
324
|
*/
|
|
325
|
-
const DEFAULT_PROPS$
|
|
325
|
+
const DEFAULT_PROPS$1d = {
|
|
326
326
|
anchorToInput: false,
|
|
327
327
|
closeOnClick: false,
|
|
328
328
|
closeOnClickAway: true,
|
|
@@ -344,13 +344,13 @@ const Autocomplete = forwardRef((props, ref) => {
|
|
|
344
344
|
otherProps
|
|
345
345
|
} = useDisableStateProps(props);
|
|
346
346
|
const {
|
|
347
|
-
anchorToInput = DEFAULT_PROPS$
|
|
347
|
+
anchorToInput = DEFAULT_PROPS$1d.anchorToInput,
|
|
348
348
|
children,
|
|
349
349
|
chips,
|
|
350
350
|
className,
|
|
351
|
-
closeOnClick = DEFAULT_PROPS$
|
|
352
|
-
closeOnClickAway = DEFAULT_PROPS$
|
|
353
|
-
closeOnEscape = DEFAULT_PROPS$
|
|
351
|
+
closeOnClick = DEFAULT_PROPS$1d.closeOnClick,
|
|
352
|
+
closeOnClickAway = DEFAULT_PROPS$1d.closeOnClickAway,
|
|
353
|
+
closeOnEscape = DEFAULT_PROPS$1d.closeOnEscape,
|
|
354
354
|
error,
|
|
355
355
|
fitToAnchorWidth,
|
|
356
356
|
hasError,
|
|
@@ -371,7 +371,7 @@ const Autocomplete = forwardRef((props, ref) => {
|
|
|
371
371
|
onInfiniteScroll,
|
|
372
372
|
placeholder,
|
|
373
373
|
placement,
|
|
374
|
-
shouldFocusOnClose = DEFAULT_PROPS$
|
|
374
|
+
shouldFocusOnClose = DEFAULT_PROPS$1d.shouldFocusOnClose,
|
|
375
375
|
theme = defaultTheme,
|
|
376
376
|
value,
|
|
377
377
|
textFieldProps = {},
|
|
@@ -426,7 +426,7 @@ const Autocomplete = forwardRef((props, ref) => {
|
|
|
426
426
|
});
|
|
427
427
|
Autocomplete.displayName = COMPONENT_NAME$1l;
|
|
428
428
|
Autocomplete.className = CLASSNAME$1k;
|
|
429
|
-
Autocomplete.defaultProps = DEFAULT_PROPS$
|
|
429
|
+
Autocomplete.defaultProps = DEFAULT_PROPS$1d;
|
|
430
430
|
|
|
431
431
|
/**
|
|
432
432
|
* Component display name.
|
|
@@ -441,7 +441,7 @@ const CLASSNAME$1j = 'lumx-autocomplete-multiple';
|
|
|
441
441
|
/**
|
|
442
442
|
* Component default props.
|
|
443
443
|
*/
|
|
444
|
-
const DEFAULT_PROPS$
|
|
444
|
+
const DEFAULT_PROPS$1c = {
|
|
445
445
|
closeOnClickAway: true,
|
|
446
446
|
closeOnEscape: true,
|
|
447
447
|
selectedChipRender(choice, index, onClear, isDisabled) {
|
|
@@ -481,8 +481,8 @@ const AutocompleteMultiple = forwardRef((props, ref) => {
|
|
|
481
481
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
482
482
|
chipsAlignment,
|
|
483
483
|
className,
|
|
484
|
-
closeOnClickAway = DEFAULT_PROPS$
|
|
485
|
-
closeOnEscape = DEFAULT_PROPS$
|
|
484
|
+
closeOnClickAway = DEFAULT_PROPS$1c.closeOnClickAway,
|
|
485
|
+
closeOnEscape = DEFAULT_PROPS$1c.closeOnEscape,
|
|
486
486
|
fitToAnchorWidth,
|
|
487
487
|
hasError,
|
|
488
488
|
helper,
|
|
@@ -504,12 +504,12 @@ const AutocompleteMultiple = forwardRef((props, ref) => {
|
|
|
504
504
|
onKeyDown,
|
|
505
505
|
placeholder,
|
|
506
506
|
placement,
|
|
507
|
-
selectedChipRender = DEFAULT_PROPS$
|
|
507
|
+
selectedChipRender = DEFAULT_PROPS$1c.selectedChipRender,
|
|
508
508
|
shouldFocusOnClose,
|
|
509
509
|
theme = defaultTheme,
|
|
510
510
|
type,
|
|
511
511
|
value,
|
|
512
|
-
values = DEFAULT_PROPS$
|
|
512
|
+
values = DEFAULT_PROPS$1c.values,
|
|
513
513
|
...forwardedProps
|
|
514
514
|
} = otherProps;
|
|
515
515
|
return /*#__PURE__*/jsx(Autocomplete, {
|
|
@@ -551,7 +551,7 @@ const AutocompleteMultiple = forwardRef((props, ref) => {
|
|
|
551
551
|
});
|
|
552
552
|
AutocompleteMultiple.displayName = COMPONENT_NAME$1k;
|
|
553
553
|
AutocompleteMultiple.className = CLASSNAME$1j;
|
|
554
|
-
AutocompleteMultiple.defaultProps = DEFAULT_PROPS$
|
|
554
|
+
AutocompleteMultiple.defaultProps = DEFAULT_PROPS$1c;
|
|
555
555
|
|
|
556
556
|
function getDefaultExportFromCjs (x) {
|
|
557
557
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -852,7 +852,8 @@ const Size = {
|
|
|
852
852
|
s: 's',
|
|
853
853
|
m: 'm',
|
|
854
854
|
xl: 'xl',
|
|
855
|
-
xxl: 'xxl'
|
|
855
|
+
xxl: 'xxl',
|
|
856
|
+
regular: 'regular'};
|
|
856
857
|
const Orientation = {
|
|
857
858
|
horizontal: 'horizontal'};
|
|
858
859
|
const Emphasis = {
|
|
@@ -883,7 +884,11 @@ const Typography = {
|
|
|
883
884
|
*/
|
|
884
885
|
const AspectRatio = {
|
|
885
886
|
/** Intrinsic content ratio. */
|
|
886
|
-
original: 'original'
|
|
887
|
+
original: 'original',
|
|
888
|
+
/** Ratio 3:2 */
|
|
889
|
+
horizontal: 'horizontal',
|
|
890
|
+
/** Ratio 1:1 */
|
|
891
|
+
square: 'square'};
|
|
887
892
|
/**
|
|
888
893
|
* Semantic info about the purpose of the component
|
|
889
894
|
*/
|
|
@@ -927,7 +932,7 @@ const {
|
|
|
927
932
|
/**
|
|
928
933
|
* Component default props.
|
|
929
934
|
*/
|
|
930
|
-
const DEFAULT_PROPS$
|
|
935
|
+
const DEFAULT_PROPS$1b = {
|
|
931
936
|
size: Size.m
|
|
932
937
|
};
|
|
933
938
|
|
|
@@ -944,7 +949,7 @@ const Avatar$1 = props => {
|
|
|
944
949
|
badge,
|
|
945
950
|
className,
|
|
946
951
|
image,
|
|
947
|
-
size = DEFAULT_PROPS$
|
|
952
|
+
size = DEFAULT_PROPS$1b.size,
|
|
948
953
|
theme,
|
|
949
954
|
ref,
|
|
950
955
|
...forwardedProps
|
|
@@ -985,7 +990,7 @@ const Avatar = forwardRef((props, ref) => {
|
|
|
985
990
|
linkAs,
|
|
986
991
|
onClick,
|
|
987
992
|
onKeyPress,
|
|
988
|
-
size = DEFAULT_PROPS$
|
|
993
|
+
size = DEFAULT_PROPS$1b.size,
|
|
989
994
|
theme = defaultTheme,
|
|
990
995
|
thumbnailProps,
|
|
991
996
|
...forwardedProps
|
|
@@ -1015,7 +1020,7 @@ const Avatar = forwardRef((props, ref) => {
|
|
|
1015
1020
|
});
|
|
1016
1021
|
Avatar.displayName = COMPONENT_NAME$1j;
|
|
1017
1022
|
Avatar.className = CLASSNAME$1i;
|
|
1018
|
-
Avatar.defaultProps = DEFAULT_PROPS$
|
|
1023
|
+
Avatar.defaultProps = DEFAULT_PROPS$1b;
|
|
1019
1024
|
|
|
1020
1025
|
/**
|
|
1021
1026
|
* Component display name.
|
|
@@ -1033,7 +1038,7 @@ const {
|
|
|
1033
1038
|
/**
|
|
1034
1039
|
* Component default props.
|
|
1035
1040
|
*/
|
|
1036
|
-
const DEFAULT_PROPS$
|
|
1041
|
+
const DEFAULT_PROPS$1a = {
|
|
1037
1042
|
color: ColorPalette.primary
|
|
1038
1043
|
};
|
|
1039
1044
|
|
|
@@ -1047,7 +1052,7 @@ const Badge$1 = props => {
|
|
|
1047
1052
|
const {
|
|
1048
1053
|
children,
|
|
1049
1054
|
className,
|
|
1050
|
-
color = DEFAULT_PROPS$
|
|
1055
|
+
color = DEFAULT_PROPS$1a.color,
|
|
1051
1056
|
ref,
|
|
1052
1057
|
...forwardedProps
|
|
1053
1058
|
} = props;
|
|
@@ -1062,7 +1067,7 @@ const Badge$1 = props => {
|
|
|
1062
1067
|
};
|
|
1063
1068
|
Badge$1.displayName = COMPONENT_NAME$1i;
|
|
1064
1069
|
Badge$1.className = CLASSNAME$1h;
|
|
1065
|
-
Badge$1.defaultProps = DEFAULT_PROPS$
|
|
1070
|
+
Badge$1.defaultProps = DEFAULT_PROPS$1a;
|
|
1066
1071
|
|
|
1067
1072
|
/**
|
|
1068
1073
|
* Defines the props of the component.
|
|
@@ -1288,7 +1293,7 @@ const {
|
|
|
1288
1293
|
/**
|
|
1289
1294
|
* Component default props.
|
|
1290
1295
|
*/
|
|
1291
|
-
const DEFAULT_PROPS$
|
|
1296
|
+
const DEFAULT_PROPS$19 = {
|
|
1292
1297
|
emphasis: Emphasis.high,
|
|
1293
1298
|
size: Size.m
|
|
1294
1299
|
};
|
|
@@ -1302,10 +1307,10 @@ const DEFAULT_PROPS$18 = {
|
|
|
1302
1307
|
const Button$1 = props => {
|
|
1303
1308
|
const {
|
|
1304
1309
|
className,
|
|
1305
|
-
emphasis = DEFAULT_PROPS$
|
|
1310
|
+
emphasis = DEFAULT_PROPS$19.emphasis,
|
|
1306
1311
|
leftIcon,
|
|
1307
1312
|
rightIcon,
|
|
1308
|
-
size = DEFAULT_PROPS$
|
|
1313
|
+
size = DEFAULT_PROPS$19.size,
|
|
1309
1314
|
...forwardedProps
|
|
1310
1315
|
} = props;
|
|
1311
1316
|
const buttonClassName = classnames(className, modifier({
|
|
@@ -1322,7 +1327,7 @@ const Button$1 = props => {
|
|
|
1322
1327
|
};
|
|
1323
1328
|
Button$1.displayName = COMPONENT_NAME$1f;
|
|
1324
1329
|
Button$1.className = CLASSNAME$1f;
|
|
1325
|
-
Button$1.defaultProps = DEFAULT_PROPS$
|
|
1330
|
+
Button$1.defaultProps = DEFAULT_PROPS$19;
|
|
1326
1331
|
|
|
1327
1332
|
/**
|
|
1328
1333
|
* Properties of a component to use to determine it's name.
|
|
@@ -1397,7 +1402,7 @@ const Button = forwardRef((props, ref) => {
|
|
|
1397
1402
|
});
|
|
1398
1403
|
Button.displayName = COMPONENT_NAME$1f;
|
|
1399
1404
|
Button.className = CLASSNAME$1f;
|
|
1400
|
-
Button.defaultProps = DEFAULT_PROPS$
|
|
1405
|
+
Button.defaultProps = DEFAULT_PROPS$19;
|
|
1401
1406
|
|
|
1402
1407
|
const COMPONENT_NAME$1e = 'Icon';
|
|
1403
1408
|
const IconClassName = 'lumx-icon';
|
|
@@ -1414,7 +1419,7 @@ const {
|
|
|
1414
1419
|
/**
|
|
1415
1420
|
* Component default props.
|
|
1416
1421
|
*/
|
|
1417
|
-
const DEFAULT_PROPS$
|
|
1422
|
+
const DEFAULT_PROPS$18 = {};
|
|
1418
1423
|
|
|
1419
1424
|
/**
|
|
1420
1425
|
* Icon component.
|
|
@@ -1494,7 +1499,7 @@ const Icon$1 = props => {
|
|
|
1494
1499
|
};
|
|
1495
1500
|
Icon$1.displayName = COMPONENT_NAME$1e;
|
|
1496
1501
|
Icon$1.className = CLASSNAME$1e;
|
|
1497
|
-
Icon$1.defaultProps = DEFAULT_PROPS$
|
|
1502
|
+
Icon$1.defaultProps = DEFAULT_PROPS$18;
|
|
1498
1503
|
|
|
1499
1504
|
/**
|
|
1500
1505
|
* Component display name.
|
|
@@ -1509,7 +1514,7 @@ const CLASSNAME$1d = 'lumx-icon-button';
|
|
|
1509
1514
|
/**
|
|
1510
1515
|
* Component default props.
|
|
1511
1516
|
*/
|
|
1512
|
-
const DEFAULT_PROPS$
|
|
1517
|
+
const DEFAULT_PROPS$17 = {
|
|
1513
1518
|
emphasis: Emphasis.high,
|
|
1514
1519
|
size: Size.m
|
|
1515
1520
|
};
|
|
@@ -1522,11 +1527,11 @@ const DEFAULT_PROPS$16 = {
|
|
|
1522
1527
|
*/
|
|
1523
1528
|
const IconButton$1 = props => {
|
|
1524
1529
|
const {
|
|
1525
|
-
emphasis = DEFAULT_PROPS$
|
|
1530
|
+
emphasis = DEFAULT_PROPS$17.emphasis,
|
|
1526
1531
|
image,
|
|
1527
1532
|
icon,
|
|
1528
1533
|
label,
|
|
1529
|
-
size = DEFAULT_PROPS$
|
|
1534
|
+
size = DEFAULT_PROPS$17.size,
|
|
1530
1535
|
...forwardedProps
|
|
1531
1536
|
} = props;
|
|
1532
1537
|
const defaultChildren = image ? /*#__PURE__*/jsx("img", {
|
|
@@ -1547,7 +1552,7 @@ const IconButton$1 = props => {
|
|
|
1547
1552
|
};
|
|
1548
1553
|
IconButton$1.displayName = COMPONENT_NAME$1d;
|
|
1549
1554
|
IconButton$1.className = CLASSNAME$1d;
|
|
1550
|
-
IconButton$1.defaultProps = DEFAULT_PROPS$
|
|
1555
|
+
IconButton$1.defaultProps = DEFAULT_PROPS$17;
|
|
1551
1556
|
|
|
1552
1557
|
/**
|
|
1553
1558
|
* IconButton component.
|
|
@@ -1591,7 +1596,7 @@ const IconButton = forwardRef((props, ref) => {
|
|
|
1591
1596
|
});
|
|
1592
1597
|
IconButton.displayName = COMPONENT_NAME$1d;
|
|
1593
1598
|
IconButton.className = CLASSNAME$1d;
|
|
1594
|
-
IconButton.defaultProps = DEFAULT_PROPS$
|
|
1599
|
+
IconButton.defaultProps = DEFAULT_PROPS$17;
|
|
1595
1600
|
|
|
1596
1601
|
/**
|
|
1597
1602
|
* Component display name.
|
|
@@ -1606,7 +1611,7 @@ const CLASSNAME$1c = 'lumx-button-group';
|
|
|
1606
1611
|
/**
|
|
1607
1612
|
* Component default props.
|
|
1608
1613
|
*/
|
|
1609
|
-
const DEFAULT_PROPS$
|
|
1614
|
+
const DEFAULT_PROPS$16 = {};
|
|
1610
1615
|
|
|
1611
1616
|
/**
|
|
1612
1617
|
* ButtonGroup component.
|
|
@@ -1628,7 +1633,7 @@ const ButtonGroup$1 = props => {
|
|
|
1628
1633
|
};
|
|
1629
1634
|
ButtonGroup$1.displayName = COMPONENT_NAME$1c;
|
|
1630
1635
|
ButtonGroup$1.className = CLASSNAME$1c;
|
|
1631
|
-
ButtonGroup$1.defaultProps = DEFAULT_PROPS$
|
|
1636
|
+
ButtonGroup$1.defaultProps = DEFAULT_PROPS$16;
|
|
1632
1637
|
|
|
1633
1638
|
/**
|
|
1634
1639
|
* ButtonGroup component.
|
|
@@ -1645,7 +1650,7 @@ const ButtonGroup = forwardRef((props, ref) => {
|
|
|
1645
1650
|
});
|
|
1646
1651
|
ButtonGroup.displayName = COMPONENT_NAME$1c;
|
|
1647
1652
|
ButtonGroup.className = CLASSNAME$1c;
|
|
1648
|
-
ButtonGroup.defaultProps = DEFAULT_PROPS$
|
|
1653
|
+
ButtonGroup.defaultProps = DEFAULT_PROPS$16;
|
|
1649
1654
|
|
|
1650
1655
|
const COMPONENT_NAME$1b = 'InputLabel';
|
|
1651
1656
|
const InputLabelClassName = 'lumx-input-label';
|
|
@@ -1653,7 +1658,7 @@ const CLASSNAME$1b = InputLabelClassName;
|
|
|
1653
1658
|
const {
|
|
1654
1659
|
block: block$$
|
|
1655
1660
|
} = bem(CLASSNAME$1b);
|
|
1656
|
-
const DEFAULT_PROPS$
|
|
1661
|
+
const DEFAULT_PROPS$15 = {};
|
|
1657
1662
|
|
|
1658
1663
|
/**
|
|
1659
1664
|
* InputLabel component.
|
|
@@ -1683,7 +1688,7 @@ function InputLabel$1(props) {
|
|
|
1683
1688
|
}
|
|
1684
1689
|
InputLabel$1.displayName = COMPONENT_NAME$1b;
|
|
1685
1690
|
InputLabel$1.className = CLASSNAME$1b;
|
|
1686
|
-
InputLabel$1.defaultProps = DEFAULT_PROPS$
|
|
1691
|
+
InputLabel$1.defaultProps = DEFAULT_PROPS$15;
|
|
1687
1692
|
|
|
1688
1693
|
const INPUT_HELPER_CONFIGURATION = {
|
|
1689
1694
|
[Kind.error]: {
|
|
@@ -1712,7 +1717,7 @@ const {
|
|
|
1712
1717
|
/**
|
|
1713
1718
|
* Component default props.
|
|
1714
1719
|
*/
|
|
1715
|
-
const DEFAULT_PROPS$
|
|
1720
|
+
const DEFAULT_PROPS$14 = {
|
|
1716
1721
|
kind: Kind.info
|
|
1717
1722
|
};
|
|
1718
1723
|
|
|
@@ -1723,7 +1728,7 @@ function InputHelper$1(props) {
|
|
|
1723
1728
|
const {
|
|
1724
1729
|
children,
|
|
1725
1730
|
className,
|
|
1726
|
-
kind = DEFAULT_PROPS$
|
|
1731
|
+
kind = DEFAULT_PROPS$14.kind,
|
|
1727
1732
|
theme,
|
|
1728
1733
|
ref,
|
|
1729
1734
|
...forwardedProps
|
|
@@ -1743,7 +1748,7 @@ function InputHelper$1(props) {
|
|
|
1743
1748
|
}
|
|
1744
1749
|
InputHelper$1.displayName = COMPONENT_NAME$1a;
|
|
1745
1750
|
InputHelper$1.className = CLASSNAME$1a;
|
|
1746
|
-
InputHelper$1.defaultProps = DEFAULT_PROPS$
|
|
1751
|
+
InputHelper$1.defaultProps = DEFAULT_PROPS$14;
|
|
1747
1752
|
|
|
1748
1753
|
const INTERMEDIATE_STATE = 'intermediate';
|
|
1749
1754
|
|
|
@@ -1858,7 +1863,7 @@ const Checkbox$1 = props => {
|
|
|
1858
1863
|
/**
|
|
1859
1864
|
* Component default props.
|
|
1860
1865
|
*/
|
|
1861
|
-
const DEFAULT_PROPS$
|
|
1866
|
+
const DEFAULT_PROPS$13 = {};
|
|
1862
1867
|
|
|
1863
1868
|
/**
|
|
1864
1869
|
* Checkbox component.
|
|
@@ -1920,7 +1925,7 @@ const Checkbox = forwardRef((props, ref) => {
|
|
|
1920
1925
|
});
|
|
1921
1926
|
Checkbox.displayName = COMPONENT_NAME$19;
|
|
1922
1927
|
Checkbox.className = CLASSNAME$19;
|
|
1923
|
-
Checkbox.defaultProps = DEFAULT_PROPS$
|
|
1928
|
+
Checkbox.defaultProps = DEFAULT_PROPS$13;
|
|
1924
1929
|
|
|
1925
1930
|
/**
|
|
1926
1931
|
* Wrap mouse event handler to stop event propagation.
|
|
@@ -1955,7 +1960,7 @@ const {
|
|
|
1955
1960
|
/**
|
|
1956
1961
|
* Component default props.
|
|
1957
1962
|
*/
|
|
1958
|
-
const DEFAULT_PROPS$
|
|
1963
|
+
const DEFAULT_PROPS$12 = {
|
|
1959
1964
|
size: Size.m
|
|
1960
1965
|
};
|
|
1961
1966
|
|
|
@@ -1982,7 +1987,7 @@ const Chip$1 = props => {
|
|
|
1982
1987
|
hasAfterClick,
|
|
1983
1988
|
hasBeforeClick,
|
|
1984
1989
|
hasOnClick,
|
|
1985
|
-
size = DEFAULT_PROPS$
|
|
1990
|
+
size = DEFAULT_PROPS$12.size,
|
|
1986
1991
|
theme,
|
|
1987
1992
|
ref,
|
|
1988
1993
|
href,
|
|
@@ -2104,7 +2109,7 @@ const Chip = forwardRef((props, ref) => {
|
|
|
2104
2109
|
});
|
|
2105
2110
|
Chip.displayName = COMPONENT_NAME$18;
|
|
2106
2111
|
Chip.className = CLASSNAME$18;
|
|
2107
|
-
Chip.defaultProps = DEFAULT_PROPS$
|
|
2112
|
+
Chip.defaultProps = DEFAULT_PROPS$12;
|
|
2108
2113
|
|
|
2109
2114
|
/**
|
|
2110
2115
|
* Component display name.
|
|
@@ -2119,7 +2124,7 @@ const CLASSNAME$17 = 'lumx-chip-group';
|
|
|
2119
2124
|
/**
|
|
2120
2125
|
* Component default props.
|
|
2121
2126
|
*/
|
|
2122
|
-
const DEFAULT_PROPS$
|
|
2127
|
+
const DEFAULT_PROPS$11 = {};
|
|
2123
2128
|
|
|
2124
2129
|
/**
|
|
2125
2130
|
* ChipGroup component.
|
|
@@ -2217,7 +2222,7 @@ const InternalChipGroup = forwardRef((props, ref) => {
|
|
|
2217
2222
|
});
|
|
2218
2223
|
InternalChipGroup.displayName = COMPONENT_NAME$17;
|
|
2219
2224
|
InternalChipGroup.className = CLASSNAME$17;
|
|
2220
|
-
InternalChipGroup.defaultProps = DEFAULT_PROPS$
|
|
2225
|
+
InternalChipGroup.defaultProps = DEFAULT_PROPS$11;
|
|
2221
2226
|
const ChipGroup = Object.assign(InternalChipGroup, {
|
|
2222
2227
|
useChipGroupNavigation
|
|
2223
2228
|
});
|
|
@@ -2429,7 +2434,7 @@ const {
|
|
|
2429
2434
|
/**
|
|
2430
2435
|
* Component default props.
|
|
2431
2436
|
*/
|
|
2432
|
-
const DEFAULT_PROPS
|
|
2437
|
+
const DEFAULT_PROPS$10 = {
|
|
2433
2438
|
variant: CommentBlockVariant.indented
|
|
2434
2439
|
};
|
|
2435
2440
|
|
|
@@ -2459,7 +2464,7 @@ const CommentBlock = forwardRef((props, ref) => {
|
|
|
2459
2464
|
onMouseLeave,
|
|
2460
2465
|
text,
|
|
2461
2466
|
theme = defaultTheme,
|
|
2462
|
-
variant = DEFAULT_PROPS
|
|
2467
|
+
variant = DEFAULT_PROPS$10.variant,
|
|
2463
2468
|
...forwardedProps
|
|
2464
2469
|
} = props;
|
|
2465
2470
|
const hasChildren = Children.count(children) > 0;
|
|
@@ -2528,7 +2533,7 @@ const CommentBlock = forwardRef((props, ref) => {
|
|
|
2528
2533
|
});
|
|
2529
2534
|
CommentBlock.displayName = COMPONENT_NAME$16;
|
|
2530
2535
|
CommentBlock.className = CLASSNAME$15;
|
|
2531
|
-
CommentBlock.defaultProps = DEFAULT_PROPS
|
|
2536
|
+
CommentBlock.defaultProps = DEFAULT_PROPS$10;
|
|
2532
2537
|
|
|
2533
2538
|
/**
|
|
2534
2539
|
* Add a number of months from a date while resetting the day to prevent month length mismatches.
|
|
@@ -3618,7 +3623,7 @@ const {
|
|
|
3618
3623
|
/**
|
|
3619
3624
|
* Component default props.
|
|
3620
3625
|
*/
|
|
3621
|
-
const DEFAULT_PROPS
|
|
3626
|
+
const DEFAULT_PROPS$$ = {
|
|
3622
3627
|
closeMode: 'unmount',
|
|
3623
3628
|
size: Size$1.big,
|
|
3624
3629
|
disableBodyScroll: true
|
|
@@ -3639,7 +3644,7 @@ const Dialog = forwardRef((props, ref) => {
|
|
|
3639
3644
|
const {
|
|
3640
3645
|
children,
|
|
3641
3646
|
className,
|
|
3642
|
-
closeMode = DEFAULT_PROPS
|
|
3647
|
+
closeMode = DEFAULT_PROPS$$.closeMode,
|
|
3643
3648
|
header,
|
|
3644
3649
|
focusElement,
|
|
3645
3650
|
forceFooterDivider,
|
|
@@ -3651,11 +3656,11 @@ const Dialog = forwardRef((props, ref) => {
|
|
|
3651
3656
|
parentElement,
|
|
3652
3657
|
contentRef,
|
|
3653
3658
|
preventAutoClose,
|
|
3654
|
-
size = DEFAULT_PROPS
|
|
3659
|
+
size = DEFAULT_PROPS$$.size,
|
|
3655
3660
|
zIndex,
|
|
3656
3661
|
dialogProps,
|
|
3657
3662
|
onVisibilityChange,
|
|
3658
|
-
disableBodyScroll = DEFAULT_PROPS
|
|
3663
|
+
disableBodyScroll = DEFAULT_PROPS$$.disableBodyScroll,
|
|
3659
3664
|
preventCloseOnClick,
|
|
3660
3665
|
preventCloseOnEscape,
|
|
3661
3666
|
...forwardedProps
|
|
@@ -3796,7 +3801,7 @@ const Dialog = forwardRef((props, ref) => {
|
|
|
3796
3801
|
});
|
|
3797
3802
|
Dialog.displayName = COMPONENT_NAME$12;
|
|
3798
3803
|
Dialog.className = CLASSNAME$13;
|
|
3799
|
-
Dialog.defaultProps = DEFAULT_PROPS
|
|
3804
|
+
Dialog.defaultProps = DEFAULT_PROPS$$;
|
|
3800
3805
|
|
|
3801
3806
|
/**
|
|
3802
3807
|
* Component display name.
|
|
@@ -3840,7 +3845,7 @@ const Divider$1 = props => {
|
|
|
3840
3845
|
/**
|
|
3841
3846
|
* Component default props.
|
|
3842
3847
|
*/
|
|
3843
|
-
const DEFAULT_PROPS$
|
|
3848
|
+
const DEFAULT_PROPS$_ = {};
|
|
3844
3849
|
|
|
3845
3850
|
/**
|
|
3846
3851
|
* Divider component.
|
|
@@ -3863,7 +3868,7 @@ const Divider = forwardRef((props, ref) => {
|
|
|
3863
3868
|
});
|
|
3864
3869
|
Divider.displayName = COMPONENT_NAME$11;
|
|
3865
3870
|
Divider.className = CLASSNAME$12;
|
|
3866
|
-
Divider.defaultProps = DEFAULT_PROPS$
|
|
3871
|
+
Divider.defaultProps = DEFAULT_PROPS$_;
|
|
3867
3872
|
|
|
3868
3873
|
/**
|
|
3869
3874
|
* Component display name.
|
|
@@ -4083,12 +4088,43 @@ const COMPONENT_NAME$$ = 'List';
|
|
|
4083
4088
|
const CLASSNAME$10 = 'lumx-list';
|
|
4084
4089
|
const {
|
|
4085
4090
|
block: block$S
|
|
4086
|
-
} =
|
|
4091
|
+
} = bem(CLASSNAME$10);
|
|
4087
4092
|
|
|
4088
4093
|
/**
|
|
4089
4094
|
* Component default props.
|
|
4090
4095
|
*/
|
|
4091
|
-
const DEFAULT_PROPS$
|
|
4096
|
+
const DEFAULT_PROPS$Z = {};
|
|
4097
|
+
|
|
4098
|
+
/**
|
|
4099
|
+
* List component.
|
|
4100
|
+
*
|
|
4101
|
+
* @param props Component props.
|
|
4102
|
+
* @return JSX element.
|
|
4103
|
+
*/
|
|
4104
|
+
const List$1 = props => {
|
|
4105
|
+
const {
|
|
4106
|
+
children,
|
|
4107
|
+
className,
|
|
4108
|
+
itemPadding,
|
|
4109
|
+
ref,
|
|
4110
|
+
...forwardedProps
|
|
4111
|
+
} = props;
|
|
4112
|
+
return /*#__PURE__*/jsx("ul", {
|
|
4113
|
+
...forwardedProps,
|
|
4114
|
+
className: classnames(className, block$S({
|
|
4115
|
+
[`item-padding-${itemPadding}`]: Boolean(itemPadding)
|
|
4116
|
+
})),
|
|
4117
|
+
ref: ref,
|
|
4118
|
+
children: children
|
|
4119
|
+
});
|
|
4120
|
+
};
|
|
4121
|
+
List$1.displayName = COMPONENT_NAME$$;
|
|
4122
|
+
List$1.className = CLASSNAME$10;
|
|
4123
|
+
List$1.defaultProps = DEFAULT_PROPS$Z;
|
|
4124
|
+
|
|
4125
|
+
/**
|
|
4126
|
+
* Defines the props of the component.
|
|
4127
|
+
*/
|
|
4092
4128
|
|
|
4093
4129
|
/* eslint-disable jsx-a11y/no-noninteractive-tabindex */
|
|
4094
4130
|
/**
|
|
@@ -4101,25 +4137,22 @@ const DEFAULT_PROPS$Y = {};
|
|
|
4101
4137
|
const InternalList = forwardRef((props, ref) => {
|
|
4102
4138
|
const {
|
|
4103
4139
|
children,
|
|
4104
|
-
className,
|
|
4105
4140
|
isClickable,
|
|
4106
|
-
itemPadding,
|
|
4107
4141
|
onListItemSelected,
|
|
4142
|
+
itemPadding,
|
|
4108
4143
|
...forwardedProps
|
|
4109
4144
|
} = props;
|
|
4110
4145
|
const adjustedItemPadding = itemPadding ?? (isClickable ? Size$1.big : undefined);
|
|
4111
|
-
return
|
|
4146
|
+
return List$1({
|
|
4112
4147
|
...forwardedProps,
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
ref: ref,
|
|
4117
|
-
children: children
|
|
4148
|
+
ref,
|
|
4149
|
+
children,
|
|
4150
|
+
itemPadding: adjustedItemPadding
|
|
4118
4151
|
});
|
|
4119
4152
|
});
|
|
4120
4153
|
InternalList.displayName = COMPONENT_NAME$$;
|
|
4121
4154
|
InternalList.className = CLASSNAME$10;
|
|
4122
|
-
InternalList.defaultProps = DEFAULT_PROPS$
|
|
4155
|
+
InternalList.defaultProps = DEFAULT_PROPS$Z;
|
|
4123
4156
|
const List = Object.assign(InternalList, {
|
|
4124
4157
|
useKeyboardListNavigation
|
|
4125
4158
|
});
|
|
@@ -4203,7 +4236,7 @@ const {
|
|
|
4203
4236
|
/**
|
|
4204
4237
|
* Component default props (used by framework wrappers).
|
|
4205
4238
|
*/
|
|
4206
|
-
const DEFAULT_PROPS$
|
|
4239
|
+
const DEFAULT_PROPS$Y = {
|
|
4207
4240
|
closeMode: 'unmount',
|
|
4208
4241
|
elevation: 3,
|
|
4209
4242
|
placement: Placement.AUTO,
|
|
@@ -4227,8 +4260,8 @@ const Popover$1 = (props, {
|
|
|
4227
4260
|
as: asTag = 'div',
|
|
4228
4261
|
children,
|
|
4229
4262
|
className,
|
|
4230
|
-
closeMode = DEFAULT_PROPS$
|
|
4231
|
-
elevation = DEFAULT_PROPS$
|
|
4263
|
+
closeMode = DEFAULT_PROPS$Y.closeMode,
|
|
4264
|
+
elevation = DEFAULT_PROPS$Y.elevation,
|
|
4232
4265
|
hasArrow,
|
|
4233
4266
|
isOpen,
|
|
4234
4267
|
position,
|
|
@@ -4238,7 +4271,7 @@ const Popover$1 = (props, {
|
|
|
4238
4271
|
// Framework-specific
|
|
4239
4272
|
ref,
|
|
4240
4273
|
arrowRef,
|
|
4241
|
-
usePortal = DEFAULT_PROPS$
|
|
4274
|
+
usePortal = DEFAULT_PROPS$Y.usePortal,
|
|
4242
4275
|
clickAwayCallback,
|
|
4243
4276
|
clickAwayRefs,
|
|
4244
4277
|
unmountSentinel,
|
|
@@ -6636,27 +6669,27 @@ const _InnerPopover = forwardRef((props, ref) => {
|
|
|
6636
6669
|
as,
|
|
6637
6670
|
children,
|
|
6638
6671
|
className,
|
|
6639
|
-
closeMode = DEFAULT_PROPS$
|
|
6672
|
+
closeMode = DEFAULT_PROPS$Y.closeMode,
|
|
6640
6673
|
closeOnClickAway,
|
|
6641
6674
|
closeOnEscape,
|
|
6642
|
-
elevation = DEFAULT_PROPS$
|
|
6675
|
+
elevation = DEFAULT_PROPS$Y.elevation,
|
|
6643
6676
|
focusElement,
|
|
6644
6677
|
hasArrow,
|
|
6645
6678
|
isOpen,
|
|
6646
6679
|
onClose,
|
|
6647
6680
|
parentElement,
|
|
6648
|
-
usePortal = DEFAULT_PROPS$
|
|
6649
|
-
focusAnchorOnClose = DEFAULT_PROPS$
|
|
6681
|
+
usePortal = DEFAULT_PROPS$Y.usePortal,
|
|
6682
|
+
focusAnchorOnClose = DEFAULT_PROPS$Y.focusAnchorOnClose,
|
|
6650
6683
|
withFocusTrap,
|
|
6651
6684
|
boundaryRef,
|
|
6652
6685
|
fitToAnchorWidth,
|
|
6653
6686
|
fitWithinViewportHeight,
|
|
6654
6687
|
focusTrapZoneElement,
|
|
6655
6688
|
offset,
|
|
6656
|
-
placement = DEFAULT_PROPS$
|
|
6689
|
+
placement = DEFAULT_PROPS$Y.placement,
|
|
6657
6690
|
style,
|
|
6658
6691
|
theme,
|
|
6659
|
-
zIndex = DEFAULT_PROPS$
|
|
6692
|
+
zIndex = DEFAULT_PROPS$Y.zIndex,
|
|
6660
6693
|
...forwardedProps
|
|
6661
6694
|
} = props;
|
|
6662
6695
|
const popoverRef = useRef(null);
|
|
@@ -6730,7 +6763,7 @@ const Popover = skipRender(
|
|
|
6730
6763
|
() => Boolean(DOCUMENT), _InnerPopover);
|
|
6731
6764
|
Popover.displayName = COMPONENT_NAME$_;
|
|
6732
6765
|
Popover.className = CLASSNAME$$;
|
|
6733
|
-
Popover.defaultProps = DEFAULT_PROPS$
|
|
6766
|
+
Popover.defaultProps = DEFAULT_PROPS$Y;
|
|
6734
6767
|
|
|
6735
6768
|
// The error margin in px we want to have for triggering infinite scroll
|
|
6736
6769
|
const SCROLL_TRIGGER_MARGIN = 5;
|
|
@@ -6790,7 +6823,7 @@ const {
|
|
|
6790
6823
|
/**
|
|
6791
6824
|
* Component default props.
|
|
6792
6825
|
*/
|
|
6793
|
-
const DEFAULT_PROPS$
|
|
6826
|
+
const DEFAULT_PROPS$X = {
|
|
6794
6827
|
closeOnClick: true,
|
|
6795
6828
|
closeOnClickAway: true,
|
|
6796
6829
|
closeOnEscape: true,
|
|
@@ -6813,18 +6846,18 @@ const Dropdown = forwardRef((props, ref) => {
|
|
|
6813
6846
|
anchorRef,
|
|
6814
6847
|
children,
|
|
6815
6848
|
className,
|
|
6816
|
-
closeOnClick = DEFAULT_PROPS$
|
|
6817
|
-
closeOnClickAway = DEFAULT_PROPS$
|
|
6818
|
-
closeOnEscape = DEFAULT_PROPS$
|
|
6819
|
-
fitToAnchorWidth = DEFAULT_PROPS$
|
|
6820
|
-
fitWithinViewportHeight = DEFAULT_PROPS$
|
|
6849
|
+
closeOnClick = DEFAULT_PROPS$X.closeOnClick,
|
|
6850
|
+
closeOnClickAway = DEFAULT_PROPS$X.closeOnClickAway,
|
|
6851
|
+
closeOnEscape = DEFAULT_PROPS$X.closeOnEscape,
|
|
6852
|
+
fitToAnchorWidth = DEFAULT_PROPS$X.fitToAnchorWidth,
|
|
6853
|
+
fitWithinViewportHeight = DEFAULT_PROPS$X.fitWithinViewportHeight,
|
|
6821
6854
|
isOpen,
|
|
6822
6855
|
offset,
|
|
6823
|
-
focusAnchorOnClose = DEFAULT_PROPS$
|
|
6856
|
+
focusAnchorOnClose = DEFAULT_PROPS$X.focusAnchorOnClose,
|
|
6824
6857
|
onClose,
|
|
6825
6858
|
onInfiniteScroll,
|
|
6826
|
-
placement = DEFAULT_PROPS$
|
|
6827
|
-
shouldFocusOnOpen = DEFAULT_PROPS$
|
|
6859
|
+
placement = DEFAULT_PROPS$X.placement,
|
|
6860
|
+
shouldFocusOnOpen = DEFAULT_PROPS$X.shouldFocusOnOpen,
|
|
6828
6861
|
zIndex,
|
|
6829
6862
|
...forwardedProps
|
|
6830
6863
|
} = props;
|
|
@@ -6870,7 +6903,7 @@ const Dropdown = forwardRef((props, ref) => {
|
|
|
6870
6903
|
});
|
|
6871
6904
|
Dropdown.displayName = COMPONENT_NAME$Z;
|
|
6872
6905
|
Dropdown.className = CLASSNAME$_;
|
|
6873
|
-
Dropdown.defaultProps = DEFAULT_PROPS$
|
|
6906
|
+
Dropdown.defaultProps = DEFAULT_PROPS$X;
|
|
6874
6907
|
|
|
6875
6908
|
/**
|
|
6876
6909
|
* Component display name.
|
|
@@ -6889,7 +6922,7 @@ const {
|
|
|
6889
6922
|
/**
|
|
6890
6923
|
* Component default props.
|
|
6891
6924
|
*/
|
|
6892
|
-
const DEFAULT_PROPS$
|
|
6925
|
+
const DEFAULT_PROPS$W = {
|
|
6893
6926
|
closeMode: 'unmount'
|
|
6894
6927
|
};
|
|
6895
6928
|
const isDragHandle = isComponent(DragHandle);
|
|
@@ -6907,7 +6940,7 @@ const ExpansionPanel = forwardRef((props, ref) => {
|
|
|
6907
6940
|
const defaultTheme = useTheme() || Theme$1.light;
|
|
6908
6941
|
const {
|
|
6909
6942
|
className,
|
|
6910
|
-
closeMode = DEFAULT_PROPS$
|
|
6943
|
+
closeMode = DEFAULT_PROPS$W.closeMode,
|
|
6911
6944
|
children: anyChildren,
|
|
6912
6945
|
hasBackground,
|
|
6913
6946
|
hasHeaderDivider,
|
|
@@ -7024,11 +7057,11 @@ const ExpansionPanel = forwardRef((props, ref) => {
|
|
|
7024
7057
|
});
|
|
7025
7058
|
ExpansionPanel.displayName = COMPONENT_NAME$Y;
|
|
7026
7059
|
ExpansionPanel.className = CLASSNAME$Z;
|
|
7027
|
-
ExpansionPanel.defaultProps = DEFAULT_PROPS$
|
|
7060
|
+
ExpansionPanel.defaultProps = DEFAULT_PROPS$W;
|
|
7028
7061
|
|
|
7029
7062
|
const COMPONENT_NAME$X = 'Flag';
|
|
7030
7063
|
const CLASSNAME$Y = 'lumx-flag';
|
|
7031
|
-
const DEFAULT_PROPS$
|
|
7064
|
+
const DEFAULT_PROPS$V = {};
|
|
7032
7065
|
const {
|
|
7033
7066
|
block: block$O,
|
|
7034
7067
|
element: element$C
|
|
@@ -7092,7 +7125,7 @@ const Flag = forwardRef((props, ref) => {
|
|
|
7092
7125
|
});
|
|
7093
7126
|
Flag.displayName = COMPONENT_NAME$X;
|
|
7094
7127
|
Flag.className = CLASSNAME$Y;
|
|
7095
|
-
Flag.defaultProps = DEFAULT_PROPS$
|
|
7128
|
+
Flag.defaultProps = DEFAULT_PROPS$V;
|
|
7096
7129
|
|
|
7097
7130
|
/**
|
|
7098
7131
|
* Defines the props of the component.
|
|
@@ -7185,7 +7218,7 @@ const {
|
|
|
7185
7218
|
/**
|
|
7186
7219
|
* Component default props.
|
|
7187
7220
|
*/
|
|
7188
|
-
const DEFAULT_PROPS$
|
|
7221
|
+
const DEFAULT_PROPS$U = {
|
|
7189
7222
|
gap: Size$1.big,
|
|
7190
7223
|
orientation: Orientation$1.horizontal
|
|
7191
7224
|
};
|
|
@@ -7215,8 +7248,8 @@ const BaseGenericBlock = forwardRef((props, ref) => {
|
|
|
7215
7248
|
children,
|
|
7216
7249
|
actions,
|
|
7217
7250
|
actionsProps,
|
|
7218
|
-
gap = DEFAULT_PROPS$
|
|
7219
|
-
orientation = DEFAULT_PROPS$
|
|
7251
|
+
gap = DEFAULT_PROPS$U.gap,
|
|
7252
|
+
orientation = DEFAULT_PROPS$U.orientation,
|
|
7220
7253
|
contentProps,
|
|
7221
7254
|
...forwardedProps
|
|
7222
7255
|
} = props;
|
|
@@ -7270,7 +7303,7 @@ const BaseGenericBlock = forwardRef((props, ref) => {
|
|
|
7270
7303
|
});
|
|
7271
7304
|
BaseGenericBlock.displayName = COMPONENT_NAME$V;
|
|
7272
7305
|
BaseGenericBlock.className = CLASSNAME$W;
|
|
7273
|
-
BaseGenericBlock.defaultProps = DEFAULT_PROPS$
|
|
7306
|
+
BaseGenericBlock.defaultProps = DEFAULT_PROPS$U;
|
|
7274
7307
|
const GenericBlock = Object.assign(BaseGenericBlock, {
|
|
7275
7308
|
Figure,
|
|
7276
7309
|
Content,
|
|
@@ -7318,7 +7351,7 @@ const CLASSNAME$V = 'lumx-heading';
|
|
|
7318
7351
|
/**
|
|
7319
7352
|
* Component default props.
|
|
7320
7353
|
*/
|
|
7321
|
-
const DEFAULT_PROPS$
|
|
7354
|
+
const DEFAULT_PROPS$T = {};
|
|
7322
7355
|
|
|
7323
7356
|
/**
|
|
7324
7357
|
* Get Heading component common props
|
|
@@ -7419,7 +7452,7 @@ const {
|
|
|
7419
7452
|
/**
|
|
7420
7453
|
* Component default props.
|
|
7421
7454
|
*/
|
|
7422
|
-
const DEFAULT_PROPS$
|
|
7455
|
+
const DEFAULT_PROPS$S = {};
|
|
7423
7456
|
|
|
7424
7457
|
/**
|
|
7425
7458
|
* Text component common props
|
|
@@ -7506,7 +7539,7 @@ const Text = forwardRef((props, ref) => {
|
|
|
7506
7539
|
});
|
|
7507
7540
|
Text.displayName = COMPONENT_NAME$T;
|
|
7508
7541
|
Text.className = CLASSNAME$U;
|
|
7509
|
-
Text.defaultProps = DEFAULT_PROPS$
|
|
7542
|
+
Text.defaultProps = DEFAULT_PROPS$S;
|
|
7510
7543
|
|
|
7511
7544
|
const HeadingLevelContext = /*#__PURE__*/createContext(defaultContext);
|
|
7512
7545
|
|
|
@@ -7543,7 +7576,7 @@ const Heading = forwardRef((props, ref) => {
|
|
|
7543
7576
|
});
|
|
7544
7577
|
Heading.displayName = COMPONENT_NAME$U;
|
|
7545
7578
|
Heading.className = CLASSNAME$V;
|
|
7546
|
-
Heading.defaultProps = DEFAULT_PROPS$
|
|
7579
|
+
Heading.defaultProps = DEFAULT_PROPS$T;
|
|
7547
7580
|
|
|
7548
7581
|
/**
|
|
7549
7582
|
* Computes the next heading level based on the optional prop level or the parent context level.
|
|
@@ -7594,7 +7627,7 @@ const {
|
|
|
7594
7627
|
/**
|
|
7595
7628
|
* Component default props.
|
|
7596
7629
|
*/
|
|
7597
|
-
const DEFAULT_PROPS$
|
|
7630
|
+
const DEFAULT_PROPS$R = {
|
|
7598
7631
|
orientation: Orientation$1.horizontal,
|
|
7599
7632
|
wrap: 'nowrap'
|
|
7600
7633
|
};
|
|
@@ -7612,9 +7645,9 @@ const Grid = forwardRef((props, ref) => {
|
|
|
7612
7645
|
className,
|
|
7613
7646
|
gutter,
|
|
7614
7647
|
hAlign,
|
|
7615
|
-
orientation = DEFAULT_PROPS$
|
|
7648
|
+
orientation = DEFAULT_PROPS$R.orientation,
|
|
7616
7649
|
vAlign,
|
|
7617
|
-
wrap = DEFAULT_PROPS$
|
|
7650
|
+
wrap = DEFAULT_PROPS$R.wrap,
|
|
7618
7651
|
...forwardedProps
|
|
7619
7652
|
} = props;
|
|
7620
7653
|
return /*#__PURE__*/jsx("div", {
|
|
@@ -7632,7 +7665,7 @@ const Grid = forwardRef((props, ref) => {
|
|
|
7632
7665
|
});
|
|
7633
7666
|
Grid.displayName = COMPONENT_NAME$S;
|
|
7634
7667
|
Grid.className = CLASSNAME$T;
|
|
7635
|
-
Grid.defaultProps = DEFAULT_PROPS$
|
|
7668
|
+
Grid.defaultProps = DEFAULT_PROPS$R;
|
|
7636
7669
|
|
|
7637
7670
|
/**
|
|
7638
7671
|
* Component display name.
|
|
@@ -7690,7 +7723,7 @@ const CLASSNAME$R = 'lumx-grid-column';
|
|
|
7690
7723
|
/**
|
|
7691
7724
|
* Component default props.
|
|
7692
7725
|
*/
|
|
7693
|
-
const DEFAULT_PROPS$
|
|
7726
|
+
const DEFAULT_PROPS$Q = {};
|
|
7694
7727
|
|
|
7695
7728
|
/**
|
|
7696
7729
|
* The GridColumn is a layout component that can display children in a grid
|
|
@@ -7727,7 +7760,7 @@ const GridColumn$1 = props => {
|
|
|
7727
7760
|
};
|
|
7728
7761
|
GridColumn$1.displayName = COMPONENT_NAME$Q;
|
|
7729
7762
|
GridColumn$1.className = CLASSNAME$R;
|
|
7730
|
-
GridColumn$1.defaultProps = DEFAULT_PROPS$
|
|
7763
|
+
GridColumn$1.defaultProps = DEFAULT_PROPS$Q;
|
|
7731
7764
|
|
|
7732
7765
|
/**
|
|
7733
7766
|
* Defines the props of the component.
|
|
@@ -7738,7 +7771,7 @@ GridColumn$1.defaultProps = DEFAULT_PROPS$P;
|
|
|
7738
7771
|
/**
|
|
7739
7772
|
* Component default props.
|
|
7740
7773
|
*/
|
|
7741
|
-
const DEFAULT_PROPS$
|
|
7774
|
+
const DEFAULT_PROPS$P = {};
|
|
7742
7775
|
|
|
7743
7776
|
/**
|
|
7744
7777
|
* The GridColumn is a layout component that can display children in a grid
|
|
@@ -7757,7 +7790,7 @@ const GridColumn = forwardRef((props, ref) => {
|
|
|
7757
7790
|
});
|
|
7758
7791
|
GridColumn.displayName = COMPONENT_NAME$Q;
|
|
7759
7792
|
GridColumn.className = CLASSNAME$R;
|
|
7760
|
-
GridColumn.defaultProps = DEFAULT_PROPS$
|
|
7793
|
+
GridColumn.defaultProps = DEFAULT_PROPS$P;
|
|
7761
7794
|
|
|
7762
7795
|
/**
|
|
7763
7796
|
* Icon component.
|
|
@@ -7875,7 +7908,7 @@ const {
|
|
|
7875
7908
|
/**
|
|
7876
7909
|
* Component default props.
|
|
7877
7910
|
*/
|
|
7878
|
-
const DEFAULT_PROPS$
|
|
7911
|
+
const DEFAULT_PROPS$O = {
|
|
7879
7912
|
captionPosition: ImageBlockCaptionPosition.below,
|
|
7880
7913
|
align: Alignment.left
|
|
7881
7914
|
};
|
|
@@ -7891,9 +7924,9 @@ const ImageBlock = forwardRef((props, ref) => {
|
|
|
7891
7924
|
const defaultTheme = useTheme() || Theme$1.light;
|
|
7892
7925
|
const {
|
|
7893
7926
|
actions,
|
|
7894
|
-
align = DEFAULT_PROPS$
|
|
7927
|
+
align = DEFAULT_PROPS$O.align,
|
|
7895
7928
|
alt,
|
|
7896
|
-
captionPosition = DEFAULT_PROPS$
|
|
7929
|
+
captionPosition = DEFAULT_PROPS$O.captionPosition,
|
|
7897
7930
|
captionStyle,
|
|
7898
7931
|
className,
|
|
7899
7932
|
description,
|
|
@@ -7947,7 +7980,7 @@ const ImageBlock = forwardRef((props, ref) => {
|
|
|
7947
7980
|
});
|
|
7948
7981
|
ImageBlock.displayName = COMPONENT_NAME$P;
|
|
7949
7982
|
ImageBlock.className = CLASSNAME$Q;
|
|
7950
|
-
ImageBlock.defaultProps = DEFAULT_PROPS$
|
|
7983
|
+
ImageBlock.defaultProps = DEFAULT_PROPS$O;
|
|
7951
7984
|
|
|
7952
7985
|
/**
|
|
7953
7986
|
* Component display name.
|
|
@@ -8707,7 +8740,7 @@ const {
|
|
|
8707
8740
|
/**
|
|
8708
8741
|
* Component default props.
|
|
8709
8742
|
*/
|
|
8710
|
-
const DEFAULT_PROPS$
|
|
8743
|
+
const DEFAULT_PROPS$N = {};
|
|
8711
8744
|
|
|
8712
8745
|
/**
|
|
8713
8746
|
* InlineList component.
|
|
@@ -8760,7 +8793,7 @@ const InlineList = forwardRef((props, ref) => {
|
|
|
8760
8793
|
});
|
|
8761
8794
|
InlineList.displayName = COMPONENT_NAME$N;
|
|
8762
8795
|
InlineList.className = CLASSNAME$O;
|
|
8763
|
-
InlineList.defaultProps = DEFAULT_PROPS$
|
|
8796
|
+
InlineList.defaultProps = DEFAULT_PROPS$N;
|
|
8764
8797
|
|
|
8765
8798
|
/**
|
|
8766
8799
|
* InputHelper component.
|
|
@@ -9058,7 +9091,7 @@ const {
|
|
|
9058
9091
|
/**
|
|
9059
9092
|
* Component default props.
|
|
9060
9093
|
*/
|
|
9061
|
-
const DEFAULT_PROPS$
|
|
9094
|
+
const DEFAULT_PROPS$M = {
|
|
9062
9095
|
size: Size$1.regular,
|
|
9063
9096
|
titleHeading: 'h2'
|
|
9064
9097
|
};
|
|
@@ -9078,11 +9111,11 @@ const LinkPreview = forwardRef((props, ref) => {
|
|
|
9078
9111
|
link,
|
|
9079
9112
|
linkAs,
|
|
9080
9113
|
linkProps,
|
|
9081
|
-
size = DEFAULT_PROPS$
|
|
9114
|
+
size = DEFAULT_PROPS$M.size,
|
|
9082
9115
|
theme = defaultTheme,
|
|
9083
9116
|
thumbnailProps,
|
|
9084
9117
|
title,
|
|
9085
|
-
titleHeading = DEFAULT_PROPS$
|
|
9118
|
+
titleHeading = DEFAULT_PROPS$M.titleHeading,
|
|
9086
9119
|
...forwardedProps
|
|
9087
9120
|
} = props;
|
|
9088
9121
|
// Use title heading as title wrapper (see DEFAULT_PROPS for the default value).
|
|
@@ -9150,7 +9183,90 @@ const LinkPreview = forwardRef((props, ref) => {
|
|
|
9150
9183
|
});
|
|
9151
9184
|
LinkPreview.displayName = COMPONENT_NAME$K;
|
|
9152
9185
|
LinkPreview.className = CLASSNAME$L;
|
|
9153
|
-
LinkPreview.defaultProps = DEFAULT_PROPS$
|
|
9186
|
+
LinkPreview.defaultProps = DEFAULT_PROPS$M;
|
|
9187
|
+
|
|
9188
|
+
/**
|
|
9189
|
+
* Component display name.
|
|
9190
|
+
*/
|
|
9191
|
+
const COMPONENT_NAME$J = 'ListItem';
|
|
9192
|
+
|
|
9193
|
+
/**
|
|
9194
|
+
* Component default class name and class prefix.
|
|
9195
|
+
*/
|
|
9196
|
+
const CLASSNAME$K = 'lumx-list-item';
|
|
9197
|
+
const {
|
|
9198
|
+
block: block$D,
|
|
9199
|
+
element: element$t
|
|
9200
|
+
} = bem(CLASSNAME$K);
|
|
9201
|
+
|
|
9202
|
+
/**
|
|
9203
|
+
* Component default props.
|
|
9204
|
+
*/
|
|
9205
|
+
const DEFAULT_PROPS$L = {
|
|
9206
|
+
size: Size.regular
|
|
9207
|
+
};
|
|
9208
|
+
|
|
9209
|
+
/**
|
|
9210
|
+
* ListItem component.
|
|
9211
|
+
*
|
|
9212
|
+
* @param props Component props.
|
|
9213
|
+
* @return JSX element.
|
|
9214
|
+
*/
|
|
9215
|
+
const ListItem$1 = props => {
|
|
9216
|
+
const {
|
|
9217
|
+
after,
|
|
9218
|
+
before,
|
|
9219
|
+
children,
|
|
9220
|
+
className,
|
|
9221
|
+
isHighlighted,
|
|
9222
|
+
isSelected,
|
|
9223
|
+
isDisabled,
|
|
9224
|
+
'aria-disabled': ariaDisabled,
|
|
9225
|
+
linkAs,
|
|
9226
|
+
linkProps = {},
|
|
9227
|
+
linkRef,
|
|
9228
|
+
handleClick,
|
|
9229
|
+
size = DEFAULT_PROPS$L.size,
|
|
9230
|
+
ref,
|
|
9231
|
+
...forwardedProps
|
|
9232
|
+
} = props;
|
|
9233
|
+
const clickable = !!linkAs || linkProps?.href || handleClick;
|
|
9234
|
+
return /*#__PURE__*/jsx("li", {
|
|
9235
|
+
ref: ref,
|
|
9236
|
+
...forwardedProps,
|
|
9237
|
+
className: classnames(className, block$D({
|
|
9238
|
+
[`size-${size}`]: Boolean(size)
|
|
9239
|
+
})),
|
|
9240
|
+
children: RawClickable({
|
|
9241
|
+
as: clickable ? linkAs || (linkProps.href ? 'a' : 'button') : 'div',
|
|
9242
|
+
isDisabled,
|
|
9243
|
+
'aria-disabled': ariaDisabled,
|
|
9244
|
+
...linkProps,
|
|
9245
|
+
className: element$t(clickable ? 'link' : 'wrapper', {
|
|
9246
|
+
'is-highlighted': isHighlighted,
|
|
9247
|
+
'is-selected': isSelected,
|
|
9248
|
+
'is-disabled': isDisabled || ariaDisabled === 'true'
|
|
9249
|
+
}),
|
|
9250
|
+
handleClick,
|
|
9251
|
+
ref: linkRef,
|
|
9252
|
+
children: /*#__PURE__*/jsxs(Fragment, {
|
|
9253
|
+
children: [before && /*#__PURE__*/jsx("div", {
|
|
9254
|
+
className: element$t('before'),
|
|
9255
|
+
children: before
|
|
9256
|
+
}), /*#__PURE__*/jsx("div", {
|
|
9257
|
+
className: element$t('content'),
|
|
9258
|
+
children: children
|
|
9259
|
+
}), after && /*#__PURE__*/jsx("div", {
|
|
9260
|
+
className: element$t('after'),
|
|
9261
|
+
children: after
|
|
9262
|
+
})]
|
|
9263
|
+
})
|
|
9264
|
+
})
|
|
9265
|
+
});
|
|
9266
|
+
};
|
|
9267
|
+
ListItem$1.displayName = COMPONENT_NAME$J;
|
|
9268
|
+
ListItem$1.className = CLASSNAME$K;
|
|
9269
|
+
ListItem$1.defaultProps = DEFAULT_PROPS$L;
|
|
9154
9270
|
|
|
9155
9271
|
/**
|
|
9156
9272
|
* ListItemAction props.
|
|
@@ -9159,12 +9275,12 @@ LinkPreview.defaultProps = DEFAULT_PROPS$L;
|
|
|
9159
9275
|
/**
|
|
9160
9276
|
* Component display name.
|
|
9161
9277
|
*/
|
|
9162
|
-
const COMPONENT_NAME$
|
|
9278
|
+
const COMPONENT_NAME$I = 'ListItemAction';
|
|
9163
9279
|
|
|
9164
9280
|
/**
|
|
9165
9281
|
* Component classname (used by action area CSS pattern).
|
|
9166
9282
|
*/
|
|
9167
|
-
const CLASSNAME$
|
|
9283
|
+
const CLASSNAME$J = 'lumx-action-area__action';
|
|
9168
9284
|
const DEFAULT_PROPS$K = {};
|
|
9169
9285
|
|
|
9170
9286
|
/**
|
|
@@ -9227,43 +9343,14 @@ const ListItemAction = Object.assign(forwardRefPolymorphic((props, ref) => {
|
|
|
9227
9343
|
children
|
|
9228
9344
|
});
|
|
9229
9345
|
}), {
|
|
9230
|
-
displayName: COMPONENT_NAME$
|
|
9231
|
-
className: CLASSNAME$
|
|
9346
|
+
displayName: COMPONENT_NAME$I,
|
|
9347
|
+
className: CLASSNAME$J,
|
|
9232
9348
|
defaultProps: DEFAULT_PROPS$K
|
|
9233
9349
|
});
|
|
9234
9350
|
|
|
9235
9351
|
/**
|
|
9236
|
-
*
|
|
9237
|
-
*/
|
|
9238
|
-
const COMPONENT_NAME$I = 'ListItem';
|
|
9239
|
-
|
|
9240
|
-
/**
|
|
9241
|
-
* Component default class name and class prefix.
|
|
9242
|
-
*/
|
|
9243
|
-
const CLASSNAME$J = 'lumx-list-item';
|
|
9244
|
-
const {
|
|
9245
|
-
block: block$D,
|
|
9246
|
-
element: element$t
|
|
9247
|
-
} = classNames.bem(CLASSNAME$J);
|
|
9248
|
-
|
|
9249
|
-
/**
|
|
9250
|
-
* Component default props.
|
|
9251
|
-
*/
|
|
9252
|
-
const DEFAULT_PROPS$J = {
|
|
9253
|
-
size: Size$1.regular
|
|
9254
|
-
};
|
|
9255
|
-
|
|
9256
|
-
/**
|
|
9257
|
-
* Check if the list item is clickable.
|
|
9258
|
-
* @return `true` if the list item is clickable; `false` otherwise.
|
|
9352
|
+
* Defines the props of the component.
|
|
9259
9353
|
*/
|
|
9260
|
-
function isClickable({
|
|
9261
|
-
linkAs,
|
|
9262
|
-
linkProps,
|
|
9263
|
-
onItemSelected
|
|
9264
|
-
}) {
|
|
9265
|
-
return !!linkAs || !isEmpty(linkProps?.href) || !!onItemSelected;
|
|
9266
|
-
}
|
|
9267
9354
|
|
|
9268
9355
|
/**
|
|
9269
9356
|
* ListItem component.
|
|
@@ -9274,68 +9361,31 @@ function isClickable({
|
|
|
9274
9361
|
*/
|
|
9275
9362
|
const _ListItem = forwardRef((props, ref) => {
|
|
9276
9363
|
const {
|
|
9277
|
-
isAnyDisabled,
|
|
9278
9364
|
disabledStateProps,
|
|
9279
9365
|
otherProps
|
|
9280
9366
|
} = useDisableStateProps(props);
|
|
9281
9367
|
const {
|
|
9282
|
-
after,
|
|
9283
|
-
before,
|
|
9284
|
-
children,
|
|
9285
|
-
className,
|
|
9286
|
-
isHighlighted,
|
|
9287
|
-
isSelected,
|
|
9288
|
-
linkAs,
|
|
9289
|
-
linkProps = {},
|
|
9290
|
-
linkRef,
|
|
9291
9368
|
onItemSelected,
|
|
9292
9369
|
onClick,
|
|
9293
|
-
|
|
9370
|
+
linkRef,
|
|
9294
9371
|
...forwardedProps
|
|
9295
9372
|
} = otherProps;
|
|
9296
|
-
const
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
return /*#__PURE__*/jsx("li", {
|
|
9302
|
-
ref: ref,
|
|
9373
|
+
const handleClick = event => {
|
|
9374
|
+
onItemSelected?.(event);
|
|
9375
|
+
onClick?.(event);
|
|
9376
|
+
};
|
|
9377
|
+
return ListItem$1({
|
|
9303
9378
|
...forwardedProps,
|
|
9304
|
-
|
|
9305
|
-
|
|
9306
|
-
|
|
9307
|
-
|
|
9308
|
-
|
|
9309
|
-
...disabledStateProps,
|
|
9310
|
-
...linkProps,
|
|
9311
|
-
className: classNames.join(element$t(clickable ? 'link' : 'wrapper', {
|
|
9312
|
-
'is-highlighted': isHighlighted,
|
|
9313
|
-
'is-selected': isSelected,
|
|
9314
|
-
'is-disabled': isAnyDisabled
|
|
9315
|
-
})),
|
|
9316
|
-
handleClick(event) {
|
|
9317
|
-
onItemSelected?.(event);
|
|
9318
|
-
onClick?.(event);
|
|
9319
|
-
},
|
|
9320
|
-
ref: linkRef,
|
|
9321
|
-
children: /*#__PURE__*/jsxs(Fragment, {
|
|
9322
|
-
children: [before && /*#__PURE__*/jsx("div", {
|
|
9323
|
-
className: element$t('before'),
|
|
9324
|
-
children: before
|
|
9325
|
-
}), /*#__PURE__*/jsx("div", {
|
|
9326
|
-
className: element$t('content'),
|
|
9327
|
-
children: children
|
|
9328
|
-
}), after && /*#__PURE__*/jsx("div", {
|
|
9329
|
-
className: element$t('after'),
|
|
9330
|
-
children: after
|
|
9331
|
-
})]
|
|
9332
|
-
})
|
|
9333
|
-
})
|
|
9379
|
+
isDisabled: disabledStateProps.disabled,
|
|
9380
|
+
'aria-disabled': disabledStateProps['aria-disabled'],
|
|
9381
|
+
ref,
|
|
9382
|
+
linkRef,
|
|
9383
|
+
handleClick: onItemSelected || props.onClick ? handleClick : undefined
|
|
9334
9384
|
});
|
|
9335
9385
|
});
|
|
9336
|
-
_ListItem.displayName = COMPONENT_NAME$
|
|
9337
|
-
_ListItem.className = CLASSNAME$
|
|
9338
|
-
_ListItem.defaultProps = DEFAULT_PROPS$
|
|
9386
|
+
_ListItem.displayName = COMPONENT_NAME$J;
|
|
9387
|
+
_ListItem.className = CLASSNAME$K;
|
|
9388
|
+
_ListItem.defaultProps = DEFAULT_PROPS$L;
|
|
9339
9389
|
|
|
9340
9390
|
/**
|
|
9341
9391
|
* ListItem component with Action sub-component.
|
|
@@ -9355,28 +9405,56 @@ const COMPONENT_NAME$H = 'ListDivider';
|
|
|
9355
9405
|
*/
|
|
9356
9406
|
const CLASSNAME$I = 'lumx-list-divider';
|
|
9357
9407
|
|
|
9408
|
+
/**
|
|
9409
|
+
* Component default props.
|
|
9410
|
+
*/
|
|
9411
|
+
const DEFAULT_PROPS$J = {};
|
|
9412
|
+
|
|
9358
9413
|
/**
|
|
9359
9414
|
* ListDivider component.
|
|
9360
9415
|
* Purely decorative, consider a `ListSection` with label for a better list structure.
|
|
9361
9416
|
*
|
|
9362
9417
|
* @param props Component props.
|
|
9363
|
-
* @
|
|
9364
|
-
* @return React element.
|
|
9418
|
+
* @return JSX element.
|
|
9365
9419
|
*/
|
|
9366
|
-
const ListDivider =
|
|
9420
|
+
const ListDivider$1 = props => {
|
|
9367
9421
|
const {
|
|
9368
9422
|
className,
|
|
9423
|
+
ref,
|
|
9369
9424
|
...forwardedProps
|
|
9370
9425
|
} = props;
|
|
9371
9426
|
return /*#__PURE__*/jsx("li", {
|
|
9372
9427
|
ref: ref,
|
|
9373
9428
|
role: "none",
|
|
9374
9429
|
...forwardedProps,
|
|
9375
|
-
className:
|
|
9430
|
+
className: classnames(className, CLASSNAME$I)
|
|
9431
|
+
});
|
|
9432
|
+
};
|
|
9433
|
+
ListDivider$1.displayName = COMPONENT_NAME$H;
|
|
9434
|
+
ListDivider$1.className = CLASSNAME$I;
|
|
9435
|
+
ListDivider$1.defaultProps = DEFAULT_PROPS$J;
|
|
9436
|
+
|
|
9437
|
+
/**
|
|
9438
|
+
* Defines the props of the component.
|
|
9439
|
+
*/
|
|
9440
|
+
|
|
9441
|
+
/**
|
|
9442
|
+
* ListDivider component.
|
|
9443
|
+
* Purely decorative, consider a `ListSection` with label for a better list structure.
|
|
9444
|
+
*
|
|
9445
|
+
* @param props Component props.
|
|
9446
|
+
* @param ref Component ref.
|
|
9447
|
+
* @return React element.
|
|
9448
|
+
*/
|
|
9449
|
+
const ListDivider = forwardRef((props, ref) => {
|
|
9450
|
+
return ListDivider$1({
|
|
9451
|
+
...props,
|
|
9452
|
+
ref
|
|
9376
9453
|
});
|
|
9377
9454
|
});
|
|
9378
9455
|
ListDivider.displayName = COMPONENT_NAME$H;
|
|
9379
9456
|
ListDivider.className = CLASSNAME$I;
|
|
9457
|
+
ListDivider.defaultProps = DEFAULT_PROPS$J;
|
|
9380
9458
|
|
|
9381
9459
|
/**
|
|
9382
9460
|
* Component display name.
|
|
@@ -15680,7 +15758,7 @@ const UploaderVariant = {
|
|
|
15680
15758
|
*/
|
|
15681
15759
|
|
|
15682
15760
|
/**
|
|
15683
|
-
*
|
|
15761
|
+
* Native input file props (framework-agnostic subset).
|
|
15684
15762
|
*/
|
|
15685
15763
|
|
|
15686
15764
|
/**
|
|
@@ -15699,17 +15777,83 @@ const CLASSNAME$1 = 'lumx-uploader';
|
|
|
15699
15777
|
const {
|
|
15700
15778
|
block: block$1,
|
|
15701
15779
|
element: element$1
|
|
15702
|
-
} =
|
|
15780
|
+
} = bem(CLASSNAME$1);
|
|
15703
15781
|
|
|
15704
15782
|
/**
|
|
15705
15783
|
* Component default props.
|
|
15706
15784
|
*/
|
|
15707
15785
|
const DEFAULT_PROPS$1 = {
|
|
15708
|
-
aspectRatio: AspectRatio
|
|
15709
|
-
size: Size
|
|
15786
|
+
aspectRatio: AspectRatio.horizontal,
|
|
15787
|
+
size: Size.xl,
|
|
15710
15788
|
variant: UploaderVariant.square
|
|
15711
15789
|
};
|
|
15712
15790
|
|
|
15791
|
+
/**
|
|
15792
|
+
* Uploader component.
|
|
15793
|
+
*
|
|
15794
|
+
* @param props Component props.
|
|
15795
|
+
* @param ref Component ref.
|
|
15796
|
+
* @return React element.
|
|
15797
|
+
*/
|
|
15798
|
+
const Uploader$1 = props => {
|
|
15799
|
+
const {
|
|
15800
|
+
aspectRatio = DEFAULT_PROPS$1.aspectRatio,
|
|
15801
|
+
className,
|
|
15802
|
+
label,
|
|
15803
|
+
icon,
|
|
15804
|
+
size = DEFAULT_PROPS$1.size,
|
|
15805
|
+
theme,
|
|
15806
|
+
variant = DEFAULT_PROPS$1.variant,
|
|
15807
|
+
isAnyDisabled,
|
|
15808
|
+
fileInputProps,
|
|
15809
|
+
inputId,
|
|
15810
|
+
isDragHovering,
|
|
15811
|
+
handleClick,
|
|
15812
|
+
handleChange,
|
|
15813
|
+
Component = 'label',
|
|
15814
|
+
ref,
|
|
15815
|
+
...forwardedProps
|
|
15816
|
+
} = props;
|
|
15817
|
+
// Adjust to square aspect ratio when using circle variants.
|
|
15818
|
+
const adjustedAspectRatio = variant === UploaderVariant.circle ? AspectRatio.square : aspectRatio;
|
|
15819
|
+
return /*#__PURE__*/jsxs(Component, {
|
|
15820
|
+
ref: ref,
|
|
15821
|
+
...forwardedProps,
|
|
15822
|
+
onClick: handleClick,
|
|
15823
|
+
className: classnames(className, block$1({
|
|
15824
|
+
[`aspect-ratio-${adjustedAspectRatio}`]: Boolean(adjustedAspectRatio),
|
|
15825
|
+
[`size-${size}`]: Boolean(size),
|
|
15826
|
+
[`theme-${theme}`]: Boolean(theme),
|
|
15827
|
+
[`variant-${variant}`]: Boolean(variant),
|
|
15828
|
+
'is-drag-hovering': isDragHovering,
|
|
15829
|
+
'is-disabled': isAnyDisabled
|
|
15830
|
+
})),
|
|
15831
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
15832
|
+
className: element$1('background')
|
|
15833
|
+
}), /*#__PURE__*/jsxs("span", {
|
|
15834
|
+
className: element$1('wrapper'),
|
|
15835
|
+
children: [icon && Icon$1({
|
|
15836
|
+
className: element$1('icon'),
|
|
15837
|
+
icon,
|
|
15838
|
+
size: Size.s
|
|
15839
|
+
}), label && /*#__PURE__*/jsx("span", {
|
|
15840
|
+
className: element$1('label'),
|
|
15841
|
+
children: label
|
|
15842
|
+
})]
|
|
15843
|
+
}), fileInputProps && /*#__PURE__*/jsx("input", {
|
|
15844
|
+
type: "file",
|
|
15845
|
+
id: inputId,
|
|
15846
|
+
className: classnames(element$1('input'), visuallyHidden()),
|
|
15847
|
+
...fileInputProps,
|
|
15848
|
+
onChange: handleChange
|
|
15849
|
+
})]
|
|
15850
|
+
});
|
|
15851
|
+
};
|
|
15852
|
+
|
|
15853
|
+
/**
|
|
15854
|
+
* Defines the props of the component.
|
|
15855
|
+
*/
|
|
15856
|
+
|
|
15713
15857
|
/**
|
|
15714
15858
|
* Uploader component.
|
|
15715
15859
|
*
|
|
@@ -15725,19 +15869,11 @@ const Uploader = forwardRef((props, ref) => {
|
|
|
15725
15869
|
} = useDisableStateProps(props);
|
|
15726
15870
|
const defaultTheme = useTheme() || Theme$1.light;
|
|
15727
15871
|
const {
|
|
15728
|
-
aspectRatio = DEFAULT_PROPS$1.aspectRatio,
|
|
15729
|
-
className,
|
|
15730
|
-
label,
|
|
15731
|
-
icon,
|
|
15732
|
-
size = DEFAULT_PROPS$1.size,
|
|
15733
15872
|
theme = defaultTheme,
|
|
15734
|
-
variant = DEFAULT_PROPS$1.variant,
|
|
15735
15873
|
fileInputProps,
|
|
15736
15874
|
onClick,
|
|
15737
15875
|
...forwardedProps
|
|
15738
15876
|
} = otherProps;
|
|
15739
|
-
// Adjust to square aspect ratio when using circle variants.
|
|
15740
|
-
const adjustedAspectRatio = variant === UploaderVariant.circle ? AspectRatio$1.square : aspectRatio;
|
|
15741
15877
|
const handleClick = React__default.useCallback(evt => {
|
|
15742
15878
|
if (isAnyDisabled) {
|
|
15743
15879
|
evt.preventDefault();
|
|
@@ -15765,46 +15901,28 @@ const Uploader = forwardRef((props, ref) => {
|
|
|
15765
15901
|
return evt => {
|
|
15766
15902
|
const fileList = evt.target.files;
|
|
15767
15903
|
const files = fileList ? Array.from(fileList) : [];
|
|
15768
|
-
fileInputProps.onChange(files, evt);
|
|
15904
|
+
fileInputProps.onChange?.(files, evt);
|
|
15769
15905
|
};
|
|
15770
15906
|
}, [isAnyDisabled, fileInputProps]);
|
|
15771
|
-
return
|
|
15772
|
-
|
|
15773
|
-
|
|
15774
|
-
|
|
15775
|
-
|
|
15776
|
-
|
|
15777
|
-
|
|
15778
|
-
|
|
15779
|
-
|
|
15780
|
-
|
|
15781
|
-
'is-drag-hovering': isDragHovering,
|
|
15782
|
-
'is-disabled': isAnyDisabled
|
|
15783
|
-
})),
|
|
15784
|
-
children: [/*#__PURE__*/jsx("span", {
|
|
15785
|
-
className: element$1('background')
|
|
15786
|
-
}), /*#__PURE__*/jsxs("span", {
|
|
15787
|
-
className: element$1('wrapper'),
|
|
15788
|
-
children: [icon && /*#__PURE__*/jsx(Icon, {
|
|
15789
|
-
className: element$1('icon'),
|
|
15790
|
-
icon: icon,
|
|
15791
|
-
size: Size$1.s
|
|
15792
|
-
}), label && /*#__PURE__*/jsx("span", {
|
|
15793
|
-
className: element$1('label'),
|
|
15794
|
-
children: label
|
|
15795
|
-
})]
|
|
15796
|
-
}), fileInputProps && /*#__PURE__*/jsx("input", {
|
|
15797
|
-
type: "file",
|
|
15798
|
-
id: inputId,
|
|
15799
|
-
className: classNames.join(element$1('input'), classNames.visuallyHidden()),
|
|
15800
|
-
...disabledStateProps,
|
|
15907
|
+
return Uploader$1({
|
|
15908
|
+
Component: wrapper.Component,
|
|
15909
|
+
ref,
|
|
15910
|
+
inputId,
|
|
15911
|
+
handleClick,
|
|
15912
|
+
handleChange: onChange,
|
|
15913
|
+
isAnyDisabled,
|
|
15914
|
+
isDragHovering,
|
|
15915
|
+
theme,
|
|
15916
|
+
fileInputProps: {
|
|
15801
15917
|
...fileInputProps,
|
|
15918
|
+
...disabledStateProps,
|
|
15802
15919
|
readOnly: isAnyDisabled,
|
|
15803
|
-
onChange: onChange,
|
|
15804
15920
|
onDragEnter: setDragHovering,
|
|
15805
15921
|
onDragLeave: unsetDragHovering,
|
|
15806
15922
|
onDrop: unsetDragHovering
|
|
15807
|
-
}
|
|
15923
|
+
},
|
|
15924
|
+
...wrapper.props,
|
|
15925
|
+
...forwardedProps
|
|
15808
15926
|
});
|
|
15809
15927
|
});
|
|
15810
15928
|
Uploader.displayName = COMPONENT_NAME$1;
|
|
@@ -15950,5 +16068,5 @@ UserBlock.displayName = COMPONENT_NAME;
|
|
|
15950
16068
|
UserBlock.className = CLASSNAME;
|
|
15951
16069
|
UserBlock.defaultProps = DEFAULT_PROPS;
|
|
15952
16070
|
|
|
15953
|
-
export { AlertDialog, Autocomplete, AutocompleteMultiple, Avatar, Badge, BadgeWrapper, Button, ButtonGroup, CLASSNAME$1f as CLASSNAME, COMPONENT_NAME$1f as COMPONENT_NAME, Checkbox, Chip, ChipGroup, CommentBlock, CommentBlockVariant, DEFAULT_PROPS$
|
|
16071
|
+
export { AlertDialog, Autocomplete, AutocompleteMultiple, Avatar, Badge, BadgeWrapper, Button, ButtonGroup, CLASSNAME$1f as CLASSNAME, COMPONENT_NAME$1f as COMPONENT_NAME, Checkbox, Chip, ChipGroup, CommentBlock, CommentBlockVariant, DEFAULT_PROPS$19 as DEFAULT_PROPS, DatePicker, DatePickerControlled, DatePickerField, Dialog, 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, Message, Mosaic, Navigation, Notification, Placement, Popover, PopoverDialog, PostBlock, Progress, ProgressCircular, ProgressLinear, ProgressTracker, ProgressTrackerProvider, ProgressTrackerStep, ProgressTrackerStepPanel, ProgressVariant, RadioButton, RadioGroup, RawInputText, RawInputTextarea, Select, SelectMultiple, SelectMultipleField, SelectVariant, SelectionChipGroup, SideNavigation, SideNavigationItem, SkeletonCircle, SkeletonRectangle, SkeletonRectangleVariant, SkeletonTypography, Slider, Slides, Slideshow, SlideshowControls, SlideshowItem, Switch, Tab, TabList, TabListLayout, TabPanel, TabProvider, Table, TableBody, TableCell, TableCellVariant, TableHeader, TableRow, Text, TextField, ThOrder, ThemeProvider, Thumbnail, ThumbnailAspectRatio, ThumbnailObjectFit, ThumbnailVariant, Toolbar, Tooltip, Uploader, UploaderVariant, UserBlock, clamp, useFocusPointStyle, useHeadingLevel, useTheme };
|
|
15954
16072
|
//# sourceMappingURL=index.js.map
|