@lumx/react 4.8.0-alpha.0 → 4.8.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/index.d.ts +60 -22
  2. package/index.js +260 -135
  3. package/index.js.map +1 -1
  4. package/package.json +3 -3
package/index.js CHANGED
@@ -2,7 +2,7 @@ import { Kind as Kind$1, Size as Size$1, ColorPalette as ColorPalette$1, Emphasi
2
2
  export * from '@lumx/core/js/constants';
3
3
  export * from '@lumx/core/js/types';
4
4
  import * as React from 'react';
5
- import React__default, { useState, useEffect, useMemo, useRef, useCallback, Children, useLayoutEffect, cloneElement, createContext, isValidElement, useContext, useReducer } from 'react';
5
+ import React__default, { useState, useEffect, useMemo, useRef, useCallback, Children, useLayoutEffect, cloneElement, createContext, useContext, useReducer } from 'react';
6
6
  import { mdiAlert } from '@lumx/icons/esm/alert.js';
7
7
  import { mdiAlertCircle } from '@lumx/icons/esm/alert-circle.js';
8
8
  import { mdiCheckCircle } from '@lumx/icons/esm/check-circle.js';
@@ -110,7 +110,7 @@ const {
110
110
  /**
111
111
  * Component default props.
112
112
  */
113
- const DEFAULT_PROPS$1e = {
113
+ const DEFAULT_PROPS$1f = {
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$1e.kind,
135
- size = DEFAULT_PROPS$1e.size,
134
+ kind = DEFAULT_PROPS$1f.kind,
135
+ size = DEFAULT_PROPS$1f.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$1e;
223
+ AlertDialog.defaultProps = DEFAULT_PROPS$1f;
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$1d = {
325
+ const DEFAULT_PROPS$1e = {
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$1d.anchorToInput,
347
+ anchorToInput = DEFAULT_PROPS$1e.anchorToInput,
348
348
  children,
349
349
  chips,
350
350
  className,
351
- closeOnClick = DEFAULT_PROPS$1d.closeOnClick,
352
- closeOnClickAway = DEFAULT_PROPS$1d.closeOnClickAway,
353
- closeOnEscape = DEFAULT_PROPS$1d.closeOnEscape,
351
+ closeOnClick = DEFAULT_PROPS$1e.closeOnClick,
352
+ closeOnClickAway = DEFAULT_PROPS$1e.closeOnClickAway,
353
+ closeOnEscape = DEFAULT_PROPS$1e.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$1d.shouldFocusOnClose,
374
+ shouldFocusOnClose = DEFAULT_PROPS$1e.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$1d;
429
+ Autocomplete.defaultProps = DEFAULT_PROPS$1e;
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$1c = {
444
+ const DEFAULT_PROPS$1d = {
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$1c.closeOnClickAway,
485
- closeOnEscape = DEFAULT_PROPS$1c.closeOnEscape,
484
+ closeOnClickAway = DEFAULT_PROPS$1d.closeOnClickAway,
485
+ closeOnEscape = DEFAULT_PROPS$1d.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$1c.selectedChipRender,
507
+ selectedChipRender = DEFAULT_PROPS$1d.selectedChipRender,
508
508
  shouldFocusOnClose,
509
509
  theme = defaultTheme,
510
510
  type,
511
511
  value,
512
- values = DEFAULT_PROPS$1c.values,
512
+ values = DEFAULT_PROPS$1d.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$1c;
554
+ AutocompleteMultiple.defaultProps = DEFAULT_PROPS$1d;
555
555
 
556
556
  function getDefaultExportFromCjs (x) {
557
557
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -851,11 +851,19 @@ const Size = {
851
851
  xs: 'xs',
852
852
  s: 's',
853
853
  m: 'm',
854
+ l: 'l',
854
855
  xl: 'xl',
855
856
  xxl: 'xxl',
856
- regular: 'regular'};
857
+ tiny: 'tiny',
858
+ regular: 'regular',
859
+ medium: 'medium',
860
+ big: 'big',
861
+ huge: 'huge'
862
+ };
857
863
  const Orientation = {
858
- horizontal: 'horizontal'};
864
+ horizontal: 'horizontal',
865
+ vertical: 'vertical'
866
+ };
859
867
  const Emphasis = {
860
868
  low: 'low',
861
869
  high: 'high'
@@ -910,6 +918,18 @@ const ColorPalette = {
910
918
  red: 'red',
911
919
  light: 'light'};
912
920
 
921
+ /** ColorPalette with all possible color variant combination */
922
+
923
+ ({
924
+ [Size.xxs]: 14,
925
+ [Size.xs]: 20,
926
+ [Size.s]: 24,
927
+ [Size.m]: 36,
928
+ [Size.l]: 64,
929
+ [Size.xl]: 128,
930
+ [Size.xxl]: 256
931
+ });
932
+
913
933
  /**
914
934
  * Check if we are running in a true browser (not SSR and not jsdom test environment).
915
935
  */
@@ -932,7 +952,7 @@ const {
932
952
  /**
933
953
  * Component default props.
934
954
  */
935
- const DEFAULT_PROPS$1b = {
955
+ const DEFAULT_PROPS$1c = {
936
956
  size: Size.m
937
957
  };
938
958
 
@@ -949,7 +969,7 @@ const Avatar$1 = props => {
949
969
  badge,
950
970
  className,
951
971
  image,
952
- size = DEFAULT_PROPS$1b.size,
972
+ size = DEFAULT_PROPS$1c.size,
953
973
  theme,
954
974
  ref,
955
975
  ...forwardedProps
@@ -990,7 +1010,7 @@ const Avatar = forwardRef((props, ref) => {
990
1010
  linkAs,
991
1011
  onClick,
992
1012
  onKeyPress,
993
- size = DEFAULT_PROPS$1b.size,
1013
+ size = DEFAULT_PROPS$1c.size,
994
1014
  theme = defaultTheme,
995
1015
  thumbnailProps,
996
1016
  ...forwardedProps
@@ -1020,7 +1040,7 @@ const Avatar = forwardRef((props, ref) => {
1020
1040
  });
1021
1041
  Avatar.displayName = COMPONENT_NAME$1j;
1022
1042
  Avatar.className = CLASSNAME$1i;
1023
- Avatar.defaultProps = DEFAULT_PROPS$1b;
1043
+ Avatar.defaultProps = DEFAULT_PROPS$1c;
1024
1044
 
1025
1045
  /**
1026
1046
  * Component display name.
@@ -1038,7 +1058,7 @@ const {
1038
1058
  /**
1039
1059
  * Component default props.
1040
1060
  */
1041
- const DEFAULT_PROPS$1a = {
1061
+ const DEFAULT_PROPS$1b = {
1042
1062
  color: ColorPalette.primary
1043
1063
  };
1044
1064
 
@@ -1052,7 +1072,7 @@ const Badge$1 = props => {
1052
1072
  const {
1053
1073
  children,
1054
1074
  className,
1055
- color = DEFAULT_PROPS$1a.color,
1075
+ color = DEFAULT_PROPS$1b.color,
1056
1076
  ref,
1057
1077
  ...forwardedProps
1058
1078
  } = props;
@@ -1067,7 +1087,7 @@ const Badge$1 = props => {
1067
1087
  };
1068
1088
  Badge$1.displayName = COMPONENT_NAME$1i;
1069
1089
  Badge$1.className = CLASSNAME$1h;
1070
- Badge$1.defaultProps = DEFAULT_PROPS$1a;
1090
+ Badge$1.defaultProps = DEFAULT_PROPS$1b;
1071
1091
 
1072
1092
  /**
1073
1093
  * Defines the props of the component.
@@ -1293,7 +1313,7 @@ const {
1293
1313
  /**
1294
1314
  * Component default props.
1295
1315
  */
1296
- const DEFAULT_PROPS$19 = {
1316
+ const DEFAULT_PROPS$1a = {
1297
1317
  emphasis: Emphasis.high,
1298
1318
  size: Size.m
1299
1319
  };
@@ -1307,10 +1327,10 @@ const DEFAULT_PROPS$19 = {
1307
1327
  const Button$1 = props => {
1308
1328
  const {
1309
1329
  className,
1310
- emphasis = DEFAULT_PROPS$19.emphasis,
1330
+ emphasis = DEFAULT_PROPS$1a.emphasis,
1311
1331
  leftIcon,
1312
1332
  rightIcon,
1313
- size = DEFAULT_PROPS$19.size,
1333
+ size = DEFAULT_PROPS$1a.size,
1314
1334
  ...forwardedProps
1315
1335
  } = props;
1316
1336
  const buttonClassName = classnames(className, modifier({
@@ -1327,7 +1347,7 @@ const Button$1 = props => {
1327
1347
  };
1328
1348
  Button$1.displayName = COMPONENT_NAME$1f;
1329
1349
  Button$1.className = CLASSNAME$1f;
1330
- Button$1.defaultProps = DEFAULT_PROPS$19;
1350
+ Button$1.defaultProps = DEFAULT_PROPS$1a;
1331
1351
 
1332
1352
  /**
1333
1353
  * Properties of a component to use to determine it's name.
@@ -1402,7 +1422,7 @@ const Button = forwardRef((props, ref) => {
1402
1422
  });
1403
1423
  Button.displayName = COMPONENT_NAME$1f;
1404
1424
  Button.className = CLASSNAME$1f;
1405
- Button.defaultProps = DEFAULT_PROPS$19;
1425
+ Button.defaultProps = DEFAULT_PROPS$1a;
1406
1426
 
1407
1427
  const COMPONENT_NAME$1e = 'Icon';
1408
1428
  const IconClassName = 'lumx-icon';
@@ -1419,7 +1439,7 @@ const {
1419
1439
  /**
1420
1440
  * Component default props.
1421
1441
  */
1422
- const DEFAULT_PROPS$18 = {};
1442
+ const DEFAULT_PROPS$19 = {};
1423
1443
 
1424
1444
  /**
1425
1445
  * Icon component.
@@ -1499,7 +1519,7 @@ const Icon$1 = props => {
1499
1519
  };
1500
1520
  Icon$1.displayName = COMPONENT_NAME$1e;
1501
1521
  Icon$1.className = CLASSNAME$1e;
1502
- Icon$1.defaultProps = DEFAULT_PROPS$18;
1522
+ Icon$1.defaultProps = DEFAULT_PROPS$19;
1503
1523
 
1504
1524
  /**
1505
1525
  * Component display name.
@@ -1514,7 +1534,7 @@ const CLASSNAME$1d = 'lumx-icon-button';
1514
1534
  /**
1515
1535
  * Component default props.
1516
1536
  */
1517
- const DEFAULT_PROPS$17 = {
1537
+ const DEFAULT_PROPS$18 = {
1518
1538
  emphasis: Emphasis.high,
1519
1539
  size: Size.m
1520
1540
  };
@@ -1527,11 +1547,11 @@ const DEFAULT_PROPS$17 = {
1527
1547
  */
1528
1548
  const IconButton$1 = props => {
1529
1549
  const {
1530
- emphasis = DEFAULT_PROPS$17.emphasis,
1550
+ emphasis = DEFAULT_PROPS$18.emphasis,
1531
1551
  image,
1532
1552
  icon,
1533
1553
  label,
1534
- size = DEFAULT_PROPS$17.size,
1554
+ size = DEFAULT_PROPS$18.size,
1535
1555
  ...forwardedProps
1536
1556
  } = props;
1537
1557
  const defaultChildren = image ? /*#__PURE__*/jsx("img", {
@@ -1552,7 +1572,7 @@ const IconButton$1 = props => {
1552
1572
  };
1553
1573
  IconButton$1.displayName = COMPONENT_NAME$1d;
1554
1574
  IconButton$1.className = CLASSNAME$1d;
1555
- IconButton$1.defaultProps = DEFAULT_PROPS$17;
1575
+ IconButton$1.defaultProps = DEFAULT_PROPS$18;
1556
1576
 
1557
1577
  /**
1558
1578
  * IconButton component.
@@ -1596,7 +1616,7 @@ const IconButton = forwardRef((props, ref) => {
1596
1616
  });
1597
1617
  IconButton.displayName = COMPONENT_NAME$1d;
1598
1618
  IconButton.className = CLASSNAME$1d;
1599
- IconButton.defaultProps = DEFAULT_PROPS$17;
1619
+ IconButton.defaultProps = DEFAULT_PROPS$18;
1600
1620
 
1601
1621
  /**
1602
1622
  * Component display name.
@@ -1611,7 +1631,7 @@ const CLASSNAME$1c = 'lumx-button-group';
1611
1631
  /**
1612
1632
  * Component default props.
1613
1633
  */
1614
- const DEFAULT_PROPS$16 = {};
1634
+ const DEFAULT_PROPS$17 = {};
1615
1635
 
1616
1636
  /**
1617
1637
  * ButtonGroup component.
@@ -1633,7 +1653,7 @@ const ButtonGroup$1 = props => {
1633
1653
  };
1634
1654
  ButtonGroup$1.displayName = COMPONENT_NAME$1c;
1635
1655
  ButtonGroup$1.className = CLASSNAME$1c;
1636
- ButtonGroup$1.defaultProps = DEFAULT_PROPS$16;
1656
+ ButtonGroup$1.defaultProps = DEFAULT_PROPS$17;
1637
1657
 
1638
1658
  /**
1639
1659
  * ButtonGroup component.
@@ -1650,7 +1670,7 @@ const ButtonGroup = forwardRef((props, ref) => {
1650
1670
  });
1651
1671
  ButtonGroup.displayName = COMPONENT_NAME$1c;
1652
1672
  ButtonGroup.className = CLASSNAME$1c;
1653
- ButtonGroup.defaultProps = DEFAULT_PROPS$16;
1673
+ ButtonGroup.defaultProps = DEFAULT_PROPS$17;
1654
1674
 
1655
1675
  const COMPONENT_NAME$1b = 'InputLabel';
1656
1676
  const InputLabelClassName = 'lumx-input-label';
@@ -1658,7 +1678,7 @@ const CLASSNAME$1b = InputLabelClassName;
1658
1678
  const {
1659
1679
  block: block$$
1660
1680
  } = bem(CLASSNAME$1b);
1661
- const DEFAULT_PROPS$15 = {};
1681
+ const DEFAULT_PROPS$16 = {};
1662
1682
 
1663
1683
  /**
1664
1684
  * InputLabel component.
@@ -1688,7 +1708,7 @@ function InputLabel$1(props) {
1688
1708
  }
1689
1709
  InputLabel$1.displayName = COMPONENT_NAME$1b;
1690
1710
  InputLabel$1.className = CLASSNAME$1b;
1691
- InputLabel$1.defaultProps = DEFAULT_PROPS$15;
1711
+ InputLabel$1.defaultProps = DEFAULT_PROPS$16;
1692
1712
 
1693
1713
  const INPUT_HELPER_CONFIGURATION = {
1694
1714
  [Kind.error]: {
@@ -1717,7 +1737,7 @@ const {
1717
1737
  /**
1718
1738
  * Component default props.
1719
1739
  */
1720
- const DEFAULT_PROPS$14 = {
1740
+ const DEFAULT_PROPS$15 = {
1721
1741
  kind: Kind.info
1722
1742
  };
1723
1743
 
@@ -1728,7 +1748,7 @@ function InputHelper$1(props) {
1728
1748
  const {
1729
1749
  children,
1730
1750
  className,
1731
- kind = DEFAULT_PROPS$14.kind,
1751
+ kind = DEFAULT_PROPS$15.kind,
1732
1752
  theme,
1733
1753
  ref,
1734
1754
  ...forwardedProps
@@ -1748,7 +1768,7 @@ function InputHelper$1(props) {
1748
1768
  }
1749
1769
  InputHelper$1.displayName = COMPONENT_NAME$1a;
1750
1770
  InputHelper$1.className = CLASSNAME$1a;
1751
- InputHelper$1.defaultProps = DEFAULT_PROPS$14;
1771
+ InputHelper$1.defaultProps = DEFAULT_PROPS$15;
1752
1772
 
1753
1773
  const INTERMEDIATE_STATE = 'intermediate';
1754
1774
 
@@ -1863,7 +1883,7 @@ const Checkbox$1 = props => {
1863
1883
  /**
1864
1884
  * Component default props.
1865
1885
  */
1866
- const DEFAULT_PROPS$13 = {};
1886
+ const DEFAULT_PROPS$14 = {};
1867
1887
 
1868
1888
  /**
1869
1889
  * Checkbox component.
@@ -1925,7 +1945,7 @@ const Checkbox = forwardRef((props, ref) => {
1925
1945
  });
1926
1946
  Checkbox.displayName = COMPONENT_NAME$19;
1927
1947
  Checkbox.className = CLASSNAME$19;
1928
- Checkbox.defaultProps = DEFAULT_PROPS$13;
1948
+ Checkbox.defaultProps = DEFAULT_PROPS$14;
1929
1949
 
1930
1950
  /**
1931
1951
  * Wrap mouse event handler to stop event propagation.
@@ -1960,7 +1980,7 @@ const {
1960
1980
  /**
1961
1981
  * Component default props.
1962
1982
  */
1963
- const DEFAULT_PROPS$12 = {
1983
+ const DEFAULT_PROPS$13 = {
1964
1984
  size: Size.m
1965
1985
  };
1966
1986
 
@@ -1987,7 +2007,7 @@ const Chip$1 = props => {
1987
2007
  hasAfterClick,
1988
2008
  hasBeforeClick,
1989
2009
  hasOnClick,
1990
- size = DEFAULT_PROPS$12.size,
2010
+ size = DEFAULT_PROPS$13.size,
1991
2011
  theme,
1992
2012
  ref,
1993
2013
  href,
@@ -2109,7 +2129,7 @@ const Chip = forwardRef((props, ref) => {
2109
2129
  });
2110
2130
  Chip.displayName = COMPONENT_NAME$18;
2111
2131
  Chip.className = CLASSNAME$18;
2112
- Chip.defaultProps = DEFAULT_PROPS$12;
2132
+ Chip.defaultProps = DEFAULT_PROPS$13;
2113
2133
 
2114
2134
  /**
2115
2135
  * Component display name.
@@ -2124,7 +2144,7 @@ const CLASSNAME$17 = 'lumx-chip-group';
2124
2144
  /**
2125
2145
  * Component default props.
2126
2146
  */
2127
- const DEFAULT_PROPS$11 = {};
2147
+ const DEFAULT_PROPS$12 = {};
2128
2148
 
2129
2149
  /**
2130
2150
  * ChipGroup component.
@@ -2222,7 +2242,7 @@ const InternalChipGroup = forwardRef((props, ref) => {
2222
2242
  });
2223
2243
  InternalChipGroup.displayName = COMPONENT_NAME$17;
2224
2244
  InternalChipGroup.className = CLASSNAME$17;
2225
- InternalChipGroup.defaultProps = DEFAULT_PROPS$11;
2245
+ InternalChipGroup.defaultProps = DEFAULT_PROPS$12;
2226
2246
  const ChipGroup = Object.assign(InternalChipGroup, {
2227
2247
  useChipGroupNavigation
2228
2248
  });
@@ -2434,7 +2454,7 @@ const {
2434
2454
  /**
2435
2455
  * Component default props.
2436
2456
  */
2437
- const DEFAULT_PROPS$10 = {
2457
+ const DEFAULT_PROPS$11 = {
2438
2458
  variant: CommentBlockVariant.indented
2439
2459
  };
2440
2460
 
@@ -2464,7 +2484,7 @@ const CommentBlock = forwardRef((props, ref) => {
2464
2484
  onMouseLeave,
2465
2485
  text,
2466
2486
  theme = defaultTheme,
2467
- variant = DEFAULT_PROPS$10.variant,
2487
+ variant = DEFAULT_PROPS$11.variant,
2468
2488
  ...forwardedProps
2469
2489
  } = props;
2470
2490
  const hasChildren = Children.count(children) > 0;
@@ -2533,7 +2553,7 @@ const CommentBlock = forwardRef((props, ref) => {
2533
2553
  });
2534
2554
  CommentBlock.displayName = COMPONENT_NAME$16;
2535
2555
  CommentBlock.className = CLASSNAME$15;
2536
- CommentBlock.defaultProps = DEFAULT_PROPS$10;
2556
+ CommentBlock.defaultProps = DEFAULT_PROPS$11;
2537
2557
 
2538
2558
  /**
2539
2559
  * Add a number of months from a date while resetting the day to prevent month length mismatches.
@@ -3623,7 +3643,7 @@ const {
3623
3643
  /**
3624
3644
  * Component default props.
3625
3645
  */
3626
- const DEFAULT_PROPS$$ = {
3646
+ const DEFAULT_PROPS$10 = {
3627
3647
  closeMode: 'unmount',
3628
3648
  size: Size$1.big,
3629
3649
  disableBodyScroll: true
@@ -3644,7 +3664,7 @@ const Dialog = forwardRef((props, ref) => {
3644
3664
  const {
3645
3665
  children,
3646
3666
  className,
3647
- closeMode = DEFAULT_PROPS$$.closeMode,
3667
+ closeMode = DEFAULT_PROPS$10.closeMode,
3648
3668
  header,
3649
3669
  focusElement,
3650
3670
  forceFooterDivider,
@@ -3656,11 +3676,11 @@ const Dialog = forwardRef((props, ref) => {
3656
3676
  parentElement,
3657
3677
  contentRef,
3658
3678
  preventAutoClose,
3659
- size = DEFAULT_PROPS$$.size,
3679
+ size = DEFAULT_PROPS$10.size,
3660
3680
  zIndex,
3661
3681
  dialogProps,
3662
3682
  onVisibilityChange,
3663
- disableBodyScroll = DEFAULT_PROPS$$.disableBodyScroll,
3683
+ disableBodyScroll = DEFAULT_PROPS$10.disableBodyScroll,
3664
3684
  preventCloseOnClick,
3665
3685
  preventCloseOnEscape,
3666
3686
  ...forwardedProps
@@ -3801,7 +3821,7 @@ const Dialog = forwardRef((props, ref) => {
3801
3821
  });
3802
3822
  Dialog.displayName = COMPONENT_NAME$12;
3803
3823
  Dialog.className = CLASSNAME$13;
3804
- Dialog.defaultProps = DEFAULT_PROPS$$;
3824
+ Dialog.defaultProps = DEFAULT_PROPS$10;
3805
3825
 
3806
3826
  /**
3807
3827
  * Component display name.
@@ -3845,7 +3865,7 @@ const Divider$1 = props => {
3845
3865
  /**
3846
3866
  * Component default props.
3847
3867
  */
3848
- const DEFAULT_PROPS$_ = {};
3868
+ const DEFAULT_PROPS$$ = {};
3849
3869
 
3850
3870
  /**
3851
3871
  * Divider component.
@@ -3868,7 +3888,7 @@ const Divider = forwardRef((props, ref) => {
3868
3888
  });
3869
3889
  Divider.displayName = COMPONENT_NAME$11;
3870
3890
  Divider.className = CLASSNAME$12;
3871
- Divider.defaultProps = DEFAULT_PROPS$_;
3891
+ Divider.defaultProps = DEFAULT_PROPS$$;
3872
3892
 
3873
3893
  /**
3874
3894
  * Component display name.
@@ -3881,37 +3901,66 @@ const COMPONENT_NAME$10 = 'DragHandle';
3881
3901
  const CLASSNAME$11 = 'lumx-drag-handle';
3882
3902
  const {
3883
3903
  block: block$T
3884
- } = classNames.bem(CLASSNAME$11);
3904
+ } = bem(CLASSNAME$11);
3885
3905
 
3886
3906
  /**
3887
3907
  * DragHandle component.
3888
3908
  *
3889
3909
  * @param props Component props.
3890
- * @param ref Component ref.
3891
- * @return React element.
3910
+ * @return JSX element.
3892
3911
  */
3893
- const DragHandle = forwardRef((props, ref) => {
3894
- const defaultTheme = useTheme();
3912
+ const DragHandle$1 = props => {
3895
3913
  const {
3896
3914
  className,
3897
- theme = defaultTheme,
3915
+ theme,
3916
+ ref,
3898
3917
  ...forwardedProps
3899
3918
  } = props;
3900
3919
  return /*#__PURE__*/jsx("div", {
3901
3920
  ref: ref,
3902
3921
  ...forwardedProps,
3903
- className: classNames.join(className, block$T({
3922
+ className: classnames(className, block$T({
3904
3923
  [`theme-${theme}`]: Boolean(theme)
3905
3924
  })),
3906
- children: /*#__PURE__*/jsx(Icon, {
3925
+ children: Icon$1({
3907
3926
  icon: mdiDragVertical,
3908
- color: theme === Theme$1.dark ? ColorPalette$1.light : ColorPalette$1.dark,
3909
- size: Size$1.xs
3927
+ color: theme === Theme.dark ? ColorPalette.light : ColorPalette.dark,
3928
+ size: Size.xs
3910
3929
  })
3911
3930
  });
3931
+ };
3932
+
3933
+ /**
3934
+ * Defines the props of the component.
3935
+ */
3936
+
3937
+ /**
3938
+ * Component default props.
3939
+ */
3940
+ const DEFAULT_PROPS$_ = {};
3941
+
3942
+ /**
3943
+ * DragHandle component.
3944
+ *
3945
+ * @param props Component props.
3946
+ * @param ref Component ref.
3947
+ * @return React element.
3948
+ */
3949
+ const DragHandle = forwardRef((props, ref) => {
3950
+ const defaultTheme = useTheme();
3951
+ const {
3952
+ theme = defaultTheme,
3953
+ ...otherProps
3954
+ } = props;
3955
+ return DragHandle$1({
3956
+ ref,
3957
+ theme,
3958
+ ...otherProps
3959
+ });
3912
3960
  });
3913
3961
  DragHandle.displayName = COMPONENT_NAME$10;
3914
3962
  DragHandle.className = CLASSNAME$11;
3963
+ DragHandle.defaultProps = DEFAULT_PROPS$_;
3915
3964
 
3916
3965
  const INITIAL_INDEX = -1;
3917
3966
 
@@ -7213,15 +7262,67 @@ const CLASSNAME$W = 'lumx-generic-block';
7213
7262
  const {
7214
7263
  block: block$M,
7215
7264
  element: element$B
7216
- } = classNames.bem(CLASSNAME$W);
7265
+ } = bem(CLASSNAME$W);
7217
7266
 
7218
7267
  /**
7219
7268
  * Component default props.
7220
7269
  */
7221
7270
  const DEFAULT_PROPS$U = {
7222
- gap: Size$1.big,
7223
- orientation: Orientation$1.horizontal
7271
+ gap: Size.big,
7272
+ orientation: Orientation.horizontal
7224
7273
  };
7274
+
7275
+ /**
7276
+ * The GenericBlock is a layout component made of 3 sections that can be
7277
+ * displayed either horizontally of vertically with the same gap between each section.
7278
+ *
7279
+ * The sections are:
7280
+ * - `Figure` => A visual element to display before the main content.
7281
+ * - `Content` => The main content displayed
7282
+ * - `Actions` => One or more actions to set after the element.
7283
+ *
7284
+ * @see https://www.figma.com/file/lzzrQmsfaXRaOyRfoEogPZ/DS%3A-playground?node-id=1%3A4076
7285
+ */
7286
+ const GenericBlock$1 = props => {
7287
+ const {
7288
+ className,
7289
+ figure,
7290
+ figureProps,
7291
+ children,
7292
+ actions,
7293
+ actionsProps,
7294
+ gap = DEFAULT_PROPS$U.gap,
7295
+ ref,
7296
+ content,
7297
+ orientation = DEFAULT_PROPS$U.orientation,
7298
+ contentProps,
7299
+ FlexBox,
7300
+ ...forwardedProps
7301
+ } = props;
7302
+ return /*#__PURE__*/jsxs(FlexBox, {
7303
+ ref: ref,
7304
+ className: classnames(className, block$M()),
7305
+ gap: gap,
7306
+ orientation: orientation,
7307
+ ...forwardedProps,
7308
+ children: [figure && /*#__PURE__*/jsx(FlexBox, {
7309
+ ...figureProps,
7310
+ className: classnames(figureProps?.className, element$B('figure')),
7311
+ children: figure
7312
+ }), content && /*#__PURE__*/jsx(FlexBox, {
7313
+ orientation: Orientation.vertical,
7314
+ fillSpace: true,
7315
+ ...contentProps,
7316
+ className: classnames(contentProps?.className, element$B('content')),
7317
+ children: content
7318
+ }), actions && /*#__PURE__*/jsx(FlexBox, {
7319
+ ...actionsProps,
7320
+ className: classnames(actionsProps?.className, element$B('actions')),
7321
+ children: actions
7322
+ })]
7323
+ });
7324
+ };
7325
+
7225
7326
  const Figure = noop$1.bind({});
7226
7327
  const isFigure = isComponentType(Figure);
7227
7328
  const Content = noop$1.bind({});
@@ -7242,14 +7343,11 @@ const isActions = isComponentType(Actions);
7242
7343
  */
7243
7344
  const BaseGenericBlock = forwardRef((props, ref) => {
7244
7345
  const {
7245
- className,
7246
7346
  figure,
7247
7347
  figureProps,
7248
7348
  children,
7249
7349
  actions,
7250
7350
  actionsProps,
7251
- gap = DEFAULT_PROPS$U.gap,
7252
- orientation = DEFAULT_PROPS$U.orientation,
7253
7351
  contentProps,
7254
7352
  ...forwardedProps
7255
7353
  } = props;
@@ -7266,39 +7364,44 @@ const BaseGenericBlock = forwardRef((props, ref) => {
7266
7364
  otherChildren: otherChildren.filter(child => !isEmpty(child))
7267
7365
  };
7268
7366
  }, [children]);
7269
- return /*#__PURE__*/jsxs(FlexBox, {
7270
- ref: ref,
7271
- className: classNames.join(className, block$M()),
7272
- gap: gap,
7273
- orientation: orientation,
7367
+ const alignProps = {
7368
+ vAlign: forwardedProps.vAlign,
7369
+ hAlign: forwardedProps.hAlign
7370
+ };
7371
+ return GenericBlock$1({
7274
7372
  ...forwardedProps,
7275
- children: [(figure || sections.figureChildProps?.children) && /*#__PURE__*/jsxs(FlexBox, {
7276
- ref: sections.figureChild?.ref,
7277
- vAlign: forwardedProps.vAlign,
7278
- hAlign: forwardedProps.hAlign,
7279
- ...figureProps,
7280
- ...sections.figureChildProps,
7281
- className: classNames.join(figureProps?.className, sections.figureChildProps?.className, element$B('figure')),
7282
- children: [figure, sections.figureChildProps?.children]
7283
- }), (sections.contentChildProps?.children || sections.otherChildren.length > 0) && /*#__PURE__*/jsxs(FlexBox, {
7284
- ref: sections.contentChild?.ref,
7285
- orientation: Orientation$1.vertical,
7286
- fillSpace: true,
7287
- vAlign: forwardedProps.vAlign,
7288
- hAlign: forwardedProps.hAlign,
7289
- ...contentProps,
7290
- ...sections.contentChildProps,
7291
- className: classNames.join(contentProps?.className, sections.contentChildProps?.className, element$B('content')),
7292
- children: [sections.contentChildProps?.children, sections.otherChildren]
7293
- }), (actions || sections.actionsChildProps?.children) && /*#__PURE__*/jsxs(FlexBox, {
7373
+ ref,
7374
+ FlexBox,
7375
+ actionsProps: {
7294
7376
  ref: sections.actionsChild?.ref,
7295
- vAlign: forwardedProps.vAlign,
7296
- hAlign: forwardedProps.hAlign,
7377
+ ...alignProps,
7297
7378
  ...actionsProps,
7298
7379
  ...sections.actionsChildProps,
7299
- className: classNames.join(actionsProps?.className, sections.actionsChildProps?.className, element$B('actions')),
7380
+ className: classNames.join(actionsProps?.className, sections.actionsChildProps?.className)
7381
+ },
7382
+ actions: actions || sections.actionsChildProps?.children ? /*#__PURE__*/jsxs(Fragment, {
7300
7383
  children: [actions, sections.actionsChildProps?.children]
7301
- })]
7384
+ }) : undefined,
7385
+ contentProps: {
7386
+ ref: sections.contentChild?.ref,
7387
+ ...alignProps,
7388
+ ...contentProps,
7389
+ ...sections.contentChildProps,
7390
+ className: classNames.join(contentProps?.className, sections.contentChildProps?.className)
7391
+ },
7392
+ content: sections.contentChildProps?.children || sections.otherChildren.length > 0 ? /*#__PURE__*/jsxs(Fragment, {
7393
+ children: [sections.contentChildProps?.children, sections.otherChildren]
7394
+ }) : undefined,
7395
+ figureProps: {
7396
+ ref: sections.figureChild?.ref,
7397
+ ...alignProps,
7398
+ ...figureProps,
7399
+ ...sections.figureChildProps,
7400
+ className: classNames.join(figureProps?.className, sections.figureChildProps?.className)
7401
+ },
7402
+ figure: figure || sections.figureChildProps?.children ? /*#__PURE__*/jsxs(Fragment, {
7403
+ children: [figure, sections.figureChildProps?.children]
7404
+ }) : undefined
7302
7405
  });
7303
7406
  });
7304
7407
  BaseGenericBlock.displayName = COMPONENT_NAME$V;
@@ -7313,7 +7416,7 @@ const GenericBlock = Object.assign(BaseGenericBlock, {
7313
7416
  /**
7314
7417
  * Accepted gap sizes for the generic block.
7315
7418
  */
7316
- const GenericBlockGapSize = pick(Size$1, ['tiny', 'regular', 'medium', 'big', 'huge']);
7419
+ const GenericBlockGapSize = pick(Size, ['tiny', 'regular', 'medium', 'big', 'huge']);
7317
7420
 
7318
7421
  /** The maximum authorized heading level. */
7319
7422
  const MAX_HEADING_LEVEL = 6;
@@ -8735,7 +8838,7 @@ const CLASSNAME$O = 'lumx-inline-list';
8735
8838
  const {
8736
8839
  block: block$H,
8737
8840
  element: element$x
8738
- } = classNames.bem(CLASSNAME$O);
8841
+ } = bem(CLASSNAME$O);
8739
8842
 
8740
8843
  /**
8741
8844
  * Component default props.
@@ -8746,17 +8849,17 @@ const DEFAULT_PROPS$N = {};
8746
8849
  * InlineList component.
8747
8850
  *
8748
8851
  * @param props Component props.
8749
- * @param ref Component ref.
8750
- * @return React element.
8852
+ * @return JSX element.
8751
8853
  */
8752
- const InlineList = forwardRef((props, ref) => {
8854
+ const InlineList$1 = props => {
8753
8855
  const {
8754
8856
  className,
8755
8857
  color,
8756
8858
  colorVariant,
8757
- typography,
8758
- children,
8859
+ typography: typography$1,
8860
+ items = [],
8759
8861
  wrap,
8862
+ ref,
8760
8863
  ...forwardedProps
8761
8864
  } = props;
8762
8865
  return (
@@ -8765,31 +8868,53 @@ const InlineList = forwardRef((props, ref) => {
8765
8868
  jsx("ul", {
8766
8869
  ...forwardedProps,
8767
8870
  ref: ref,
8768
- className: classNames.join(className, block$H({
8871
+ className: classnames(className, block$H({
8769
8872
  wrap: Boolean(wrap)
8770
- }), color && classNames.font(color, colorVariant), typography && classNames.typography(typography))
8873
+ }), color && font(color, colorVariant), typography$1 && typography(typography$1))
8771
8874
  // Lists with removed bullet style can lose their a11y list role on some browsers
8772
8875
  ,
8773
8876
  role: "list",
8774
- children: Children.toArray(children).map((child, index) => {
8775
- const key = /*#__PURE__*/isValidElement(child) && child.key || index;
8776
- return (
8777
- /*#__PURE__*/
8778
- // We need to item is set as display: contents which removes the semantic.
8779
- // eslint-disable-next-line jsx-a11y/no-redundant-roles
8780
- jsxs("li", {
8781
- role: "listitem",
8782
- className: element$x('item'),
8783
- children: [index !== 0 && /*#__PURE__*/jsx("span", {
8784
- className: element$x('item-separator'),
8785
- "aria-hidden": "true",
8786
- children: '\u00A0•\u00A0'
8787
- }), child]
8788
- }, key)
8789
- );
8790
- })
8877
+ children: items.map((item, index) =>
8878
+ /*#__PURE__*/
8879
+ // We need to item is set as display: contents which removes the semantic.
8880
+ // eslint-disable-next-line jsx-a11y/no-redundant-roles
8881
+ jsxs("li", {
8882
+ role: "listitem",
8883
+ className: element$x('item'),
8884
+ children: [index !== 0 && /*#__PURE__*/jsx("span", {
8885
+ className: element$x('item-separator'),
8886
+ "aria-hidden": "true",
8887
+ children: '\u00A0•\u00A0'
8888
+ }), item]
8889
+ }, index))
8791
8890
  })
8792
8891
  );
8892
+ };
8893
+ InlineList$1.displayName = COMPONENT_NAME$N;
8894
+ InlineList$1.className = CLASSNAME$O;
8895
+ InlineList$1.defaultProps = DEFAULT_PROPS$N;
8896
+
8897
+ /**
8898
+ * Defines the props of the component.
8899
+ */
8900
+
8901
+ /**
8902
+ * InlineList component.
8903
+ *
8904
+ * @param props Component props.
8905
+ * @param ref Component ref.
8906
+ * @return React element.
8907
+ */
8908
+ const InlineList = forwardRef((props, ref) => {
8909
+ const {
8910
+ children,
8911
+ ...rest
8912
+ } = props;
8913
+ return InlineList$1({
8914
+ ...rest,
8915
+ ref,
8916
+ items: Children.toArray(children)
8917
+ });
8793
8918
  });
8794
8919
  InlineList.displayName = COMPONENT_NAME$N;
8795
8920
  InlineList.className = CLASSNAME$O;
@@ -16068,5 +16193,5 @@ UserBlock.displayName = COMPONENT_NAME;
16068
16193
  UserBlock.className = CLASSNAME;
16069
16194
  UserBlock.defaultProps = DEFAULT_PROPS;
16070
16195
 
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 };
16196
+ 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$1a 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 };
16072
16197
  //# sourceMappingURL=index.js.map