@lumx/react 4.21.1-alpha.0 → 4.22.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -9,7 +9,7 @@ import ReactDOM__default from 'react-dom';
9
9
  import { classNames, onEscapePressed, onEnterPressed as onEnterPressed$1, detectHorizontalSwipe } from '@lumx/core/js/utils';
10
10
  import last from 'lodash/last.js';
11
11
  import pull from 'lodash/pull.js';
12
- import { u as useDisabledStateContext, P as Portal, C as ClickAwayProvider, I as InfiniteScroll } from './_internal/CusEA38-.js';
12
+ import { u as useDisabledStateContext, P as Portal, C as ClickAwayProvider, I as InfiniteScroll } from './_internal/CcLi-Wuu.js';
13
13
  import isEmpty from 'lodash/isEmpty.js';
14
14
  import get from 'lodash/get.js';
15
15
  import { getDisabledState as getDisabledState$1 } from '@lumx/core/js/utils/disabledState';
@@ -309,7 +309,7 @@ function modifier$1(baseName, modifiers) {
309
309
  * block('button', { active: true, disabled: false }); // 'button button--active'
310
310
  */
311
311
 
312
- function block$1c(baseName, modifiersOrAdditionalClasses, additionalClasses) {
312
+ function block$1d(baseName, modifiersOrAdditionalClasses, additionalClasses) {
313
313
  let modifiers;
314
314
  let classes;
315
315
  if (typeof modifiersOrAdditionalClasses === 'string' || Array.isArray(modifiersOrAdditionalClasses)) {
@@ -344,7 +344,7 @@ const ACTION_ELEMENT = `${PREFIX}__action`;
344
344
  const actionArea = Object.assign(/** Action area container class. Sets `position: relative`. */
345
345
  () => PREFIX, {
346
346
  /** Action element class. Adds a `::before` pseudo-element with `position: absolute; inset: 0` to expand the click area. */
347
- action: modifiers => block$1c(ACTION_ELEMENT, modifiers)
347
+ action: modifiers => block$1d(ACTION_ELEMENT, modifiers)
348
348
  });
349
349
 
350
350
  /** Resolve color & color variant from a `ColorWithVariants` and optionally a `ColorVariant`. */
@@ -467,7 +467,7 @@ const visuallyHidden = () => VISUALLY_HIDDEN;
467
467
  */
468
468
 
469
469
  function element$T(baseClass, elem, modifiersOrAdditionalClasses, additionalClasses) {
470
- return block$1c(`${baseClass}__${elem}`, modifiersOrAdditionalClasses, additionalClasses);
470
+ return block$1d(`${baseClass}__${elem}`, modifiersOrAdditionalClasses, additionalClasses);
471
471
  }
472
472
 
473
473
  /**
@@ -475,7 +475,7 @@ function element$T(baseClass, elem, modifiersOrAdditionalClasses, additionalClas
475
475
  */
476
476
  function bem(baseName) {
477
477
  function blockFn(modifiersOrAdditionalClasses, additionalClasses) {
478
- return block$1c(baseName, modifiersOrAdditionalClasses, additionalClasses);
478
+ return block$1d(baseName, modifiersOrAdditionalClasses, additionalClasses);
479
479
  }
480
480
  function elementFn(elem, modifiersOrAdditionalClasses, additionalClasses) {
481
481
  return element$T(baseName, elem, modifiersOrAdditionalClasses, additionalClasses);
@@ -558,20 +558,20 @@ const CONFIG$1 = {
558
558
  /**
559
559
  * Component display name.
560
560
  */
561
- const COMPONENT_NAME$1G = 'AlertDialog';
561
+ const COMPONENT_NAME$1H = 'AlertDialog';
562
562
 
563
563
  /**
564
564
  * Component default class name and class prefix.
565
565
  */
566
- const CLASSNAME$1C = 'lumx-alert-dialog';
566
+ const CLASSNAME$1D = 'lumx-alert-dialog';
567
567
  const {
568
- block: block$1b
569
- } = bem(CLASSNAME$1C);
568
+ block: block$1c
569
+ } = bem(CLASSNAME$1D);
570
570
 
571
571
  /**
572
572
  * Component default props.
573
573
  */
574
- const DEFAULT_PROPS$1j = {
574
+ const DEFAULT_PROPS$1k = {
575
575
  size: Size.tiny,
576
576
  kind: Kind.info
577
577
  };
@@ -593,8 +593,8 @@ const AlertDialog$1 = props => {
593
593
  cancelProps,
594
594
  confirmProps,
595
595
  ref,
596
- kind = DEFAULT_PROPS$1j.kind,
597
- size = DEFAULT_PROPS$1j.size,
596
+ kind = DEFAULT_PROPS$1k.kind,
597
+ size = DEFAULT_PROPS$1k.size,
598
598
  dialogProps,
599
599
  children,
600
600
  DescriptionElement,
@@ -634,7 +634,7 @@ const AlertDialog$1 = props => {
634
634
  'aria-describedby': descriptionId,
635
635
  ...dialogProps
636
636
  },
637
- className: classnames(className, block$1b({
637
+ className: classnames(className, block$1c({
638
638
  [`kind-${kind}`]: Boolean(kind)
639
639
  })),
640
640
  ...forwardedProps,
@@ -732,9 +732,9 @@ const AlertDialog = forwardRef((props, ref) => {
732
732
  ...forwardedProps
733
733
  });
734
734
  });
735
- AlertDialog.displayName = COMPONENT_NAME$1G;
736
- AlertDialog.className = CLASSNAME$1C;
737
- AlertDialog.defaultProps = DEFAULT_PROPS$1j;
735
+ AlertDialog.displayName = COMPONENT_NAME$1H;
736
+ AlertDialog.className = CLASSNAME$1D;
737
+ AlertDialog.defaultProps = DEFAULT_PROPS$1k;
738
738
 
739
739
  /**
740
740
  * Hook focusing an element when defined and `focus` boolean `true`.
@@ -826,17 +826,17 @@ function useDisableStateProps(props) {
826
826
  /**
827
827
  * Component display name.
828
828
  */
829
- const COMPONENT_NAME$1F = 'Autocomplete';
829
+ const COMPONENT_NAME$1G = 'Autocomplete';
830
830
 
831
831
  /**
832
832
  * Component default class name and class prefix.
833
833
  */
834
- const CLASSNAME$1B = 'lumx-autocomplete';
834
+ const CLASSNAME$1C = 'lumx-autocomplete';
835
835
 
836
836
  /**
837
837
  * Component default props.
838
838
  */
839
- const DEFAULT_PROPS$1i = {
839
+ const DEFAULT_PROPS$1j = {
840
840
  anchorToInput: false,
841
841
  closeOnClick: false,
842
842
  closeOnClickAway: true,
@@ -859,13 +859,13 @@ const Autocomplete = forwardRef((props, ref) => {
859
859
  otherProps
860
860
  } = useDisableStateProps(props);
861
861
  const {
862
- anchorToInput = DEFAULT_PROPS$1i.anchorToInput,
862
+ anchorToInput = DEFAULT_PROPS$1j.anchorToInput,
863
863
  children,
864
864
  chips,
865
865
  className,
866
- closeOnClick = DEFAULT_PROPS$1i.closeOnClick,
867
- closeOnClickAway = DEFAULT_PROPS$1i.closeOnClickAway,
868
- closeOnEscape = DEFAULT_PROPS$1i.closeOnEscape,
866
+ closeOnClick = DEFAULT_PROPS$1j.closeOnClick,
867
+ closeOnClickAway = DEFAULT_PROPS$1j.closeOnClickAway,
868
+ closeOnEscape = DEFAULT_PROPS$1j.closeOnEscape,
869
869
  error,
870
870
  fitToAnchorWidth,
871
871
  hasError,
@@ -886,7 +886,7 @@ const Autocomplete = forwardRef((props, ref) => {
886
886
  onInfiniteScroll,
887
887
  placeholder,
888
888
  placement,
889
- shouldFocusOnClose = DEFAULT_PROPS$1i.shouldFocusOnClose,
889
+ shouldFocusOnClose = DEFAULT_PROPS$1j.shouldFocusOnClose,
890
890
  theme = defaultTheme,
891
891
  value,
892
892
  textFieldProps = {},
@@ -899,7 +899,7 @@ const Autocomplete = forwardRef((props, ref) => {
899
899
  return /*#__PURE__*/jsxs("div", {
900
900
  ref: ref,
901
901
  ...forwardedProps,
902
- className: classNames.join(className, CLASSNAME$1B),
902
+ className: classNames.join(className, CLASSNAME$1C),
903
903
  children: [/*#__PURE__*/jsx(TextField, {
904
904
  ...textFieldProps,
905
905
  chips: chips,
@@ -939,24 +939,24 @@ const Autocomplete = forwardRef((props, ref) => {
939
939
  })]
940
940
  });
941
941
  });
942
- Autocomplete.displayName = COMPONENT_NAME$1F;
943
- Autocomplete.className = CLASSNAME$1B;
944
- Autocomplete.defaultProps = DEFAULT_PROPS$1i;
942
+ Autocomplete.displayName = COMPONENT_NAME$1G;
943
+ Autocomplete.className = CLASSNAME$1C;
944
+ Autocomplete.defaultProps = DEFAULT_PROPS$1j;
945
945
 
946
946
  /**
947
947
  * Component display name.
948
948
  */
949
- const COMPONENT_NAME$1E = 'AutocompleteMultiple';
949
+ const COMPONENT_NAME$1F = 'AutocompleteMultiple';
950
950
 
951
951
  /**
952
952
  * Component default class name and class prefix.
953
953
  */
954
- const CLASSNAME$1A = 'lumx-autocomplete-multiple';
954
+ const CLASSNAME$1B = 'lumx-autocomplete-multiple';
955
955
 
956
956
  /**
957
957
  * Component default props.
958
958
  */
959
- const DEFAULT_PROPS$1h = {
959
+ const DEFAULT_PROPS$1i = {
960
960
  closeOnClickAway: true,
961
961
  closeOnEscape: true,
962
962
  selectedChipRender(choice, index, onClear, isDisabled) {
@@ -997,8 +997,8 @@ const AutocompleteMultiple = forwardRef((props, ref) => {
997
997
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
998
998
  chipsAlignment,
999
999
  className,
1000
- closeOnClickAway = DEFAULT_PROPS$1h.closeOnClickAway,
1001
- closeOnEscape = DEFAULT_PROPS$1h.closeOnEscape,
1000
+ closeOnClickAway = DEFAULT_PROPS$1i.closeOnClickAway,
1001
+ closeOnEscape = DEFAULT_PROPS$1i.closeOnEscape,
1002
1002
  fitToAnchorWidth,
1003
1003
  hasError,
1004
1004
  helper,
@@ -1020,19 +1020,19 @@ const AutocompleteMultiple = forwardRef((props, ref) => {
1020
1020
  onKeyDown,
1021
1021
  placeholder,
1022
1022
  placement,
1023
- selectedChipRender = DEFAULT_PROPS$1h.selectedChipRender,
1023
+ selectedChipRender = DEFAULT_PROPS$1i.selectedChipRender,
1024
1024
  shouldFocusOnClose,
1025
1025
  theme = defaultTheme,
1026
1026
  type,
1027
1027
  value,
1028
- values = DEFAULT_PROPS$1h.values,
1028
+ values = DEFAULT_PROPS$1i.values,
1029
1029
  ...forwardedProps
1030
1030
  } = otherProps;
1031
1031
  return /*#__PURE__*/jsx(Autocomplete, {
1032
1032
  ref: ref,
1033
1033
  ...forwardedProps,
1034
1034
  anchorToInput: anchorToInput,
1035
- className: classNames.join(className, CLASSNAME$1A),
1035
+ className: classNames.join(className, CLASSNAME$1B),
1036
1036
  name: name,
1037
1037
  value: value,
1038
1038
  onChange: onChange,
@@ -1065,28 +1065,28 @@ const AutocompleteMultiple = forwardRef((props, ref) => {
1065
1065
  children: children
1066
1066
  });
1067
1067
  });
1068
- AutocompleteMultiple.displayName = COMPONENT_NAME$1E;
1069
- AutocompleteMultiple.className = CLASSNAME$1A;
1070
- AutocompleteMultiple.defaultProps = DEFAULT_PROPS$1h;
1068
+ AutocompleteMultiple.displayName = COMPONENT_NAME$1F;
1069
+ AutocompleteMultiple.className = CLASSNAME$1B;
1070
+ AutocompleteMultiple.defaultProps = DEFAULT_PROPS$1i;
1071
1071
 
1072
1072
  /**
1073
1073
  * Component display name.
1074
1074
  */
1075
- const COMPONENT_NAME$1D = 'Avatar';
1075
+ const COMPONENT_NAME$1E = 'Avatar';
1076
1076
 
1077
1077
  /**
1078
1078
  * Component default class name and class prefix.
1079
1079
  */
1080
- const CLASSNAME$1z = 'lumx-avatar';
1080
+ const CLASSNAME$1A = 'lumx-avatar';
1081
1081
  const {
1082
- block: block$1a,
1082
+ block: block$1b,
1083
1083
  element: element$S
1084
- } = bem(CLASSNAME$1z);
1084
+ } = bem(CLASSNAME$1A);
1085
1085
 
1086
1086
  /**
1087
1087
  * Component default props.
1088
1088
  */
1089
- const DEFAULT_PROPS$1g = {
1089
+ const DEFAULT_PROPS$1h = {
1090
1090
  size: Size.m
1091
1091
  };
1092
1092
 
@@ -1103,7 +1103,7 @@ const Avatar$1 = props => {
1103
1103
  badge,
1104
1104
  className,
1105
1105
  image,
1106
- size = DEFAULT_PROPS$1g.size,
1106
+ size = DEFAULT_PROPS$1h.size,
1107
1107
  theme,
1108
1108
  ref,
1109
1109
  ...forwardedProps
@@ -1111,7 +1111,7 @@ const Avatar$1 = props => {
1111
1111
  return /*#__PURE__*/jsxs("div", {
1112
1112
  ref: ref,
1113
1113
  ...forwardedProps,
1114
- className: classnames(className, block$1a({
1114
+ className: classnames(className, block$1b({
1115
1115
  [`size-${size}`]: Boolean(size),
1116
1116
  [`theme-${theme}`]: Boolean(theme)
1117
1117
  })),
@@ -1144,7 +1144,7 @@ const Avatar = forwardRef((props, ref) => {
1144
1144
  linkAs,
1145
1145
  onClick,
1146
1146
  onKeyPress,
1147
- size = DEFAULT_PROPS$1g.size,
1147
+ size = DEFAULT_PROPS$1h.size,
1148
1148
  theme = defaultTheme,
1149
1149
  thumbnailProps,
1150
1150
  ...forwardedProps
@@ -1172,27 +1172,27 @@ const Avatar = forwardRef((props, ref) => {
1172
1172
  })
1173
1173
  });
1174
1174
  });
1175
- Avatar.displayName = COMPONENT_NAME$1D;
1176
- Avatar.className = CLASSNAME$1z;
1177
- Avatar.defaultProps = DEFAULT_PROPS$1g;
1175
+ Avatar.displayName = COMPONENT_NAME$1E;
1176
+ Avatar.className = CLASSNAME$1A;
1177
+ Avatar.defaultProps = DEFAULT_PROPS$1h;
1178
1178
 
1179
1179
  /**
1180
1180
  * Component display name.
1181
1181
  */
1182
- const COMPONENT_NAME$1C = 'Badge';
1182
+ const COMPONENT_NAME$1D = 'Badge';
1183
1183
 
1184
1184
  /**
1185
1185
  * Component default class name and class prefix.
1186
1186
  */
1187
- const CLASSNAME$1y = 'lumx-badge';
1187
+ const CLASSNAME$1z = 'lumx-badge';
1188
1188
  const {
1189
- block: block$19
1190
- } = bem(CLASSNAME$1y);
1189
+ block: block$1a
1190
+ } = bem(CLASSNAME$1z);
1191
1191
 
1192
1192
  /**
1193
1193
  * Component default props.
1194
1194
  */
1195
- const DEFAULT_PROPS$1f = {
1195
+ const DEFAULT_PROPS$1g = {
1196
1196
  color: ColorPalette.primary
1197
1197
  };
1198
1198
 
@@ -1206,22 +1206,22 @@ const Badge$1 = props => {
1206
1206
  const {
1207
1207
  children,
1208
1208
  className,
1209
- color = DEFAULT_PROPS$1f.color,
1209
+ color = DEFAULT_PROPS$1g.color,
1210
1210
  ref,
1211
1211
  ...forwardedProps
1212
1212
  } = props;
1213
1213
  return /*#__PURE__*/jsx("div", {
1214
1214
  ref: ref,
1215
1215
  ...forwardedProps,
1216
- className: classnames(className, block$19({
1216
+ className: classnames(className, block$1a({
1217
1217
  [`color-${color}`]: Boolean(color)
1218
1218
  })),
1219
1219
  children: children
1220
1220
  });
1221
1221
  };
1222
- Badge$1.displayName = COMPONENT_NAME$1C;
1223
- Badge$1.className = CLASSNAME$1y;
1224
- Badge$1.defaultProps = DEFAULT_PROPS$1f;
1222
+ Badge$1.displayName = COMPONENT_NAME$1D;
1223
+ Badge$1.className = CLASSNAME$1z;
1224
+ Badge$1.defaultProps = DEFAULT_PROPS$1g;
1225
1225
 
1226
1226
  /**
1227
1227
  * Defines the props of the component.
@@ -1244,12 +1244,12 @@ 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$1B = 'BadgeWrapper';
1248
- const CLASSNAME$1x = 'lumx-badge-wrapper';
1247
+ const COMPONENT_NAME$1C = 'BadgeWrapper';
1248
+ const CLASSNAME$1y = 'lumx-badge-wrapper';
1249
1249
  const {
1250
- block: block$18,
1250
+ block: block$19,
1251
1251
  element: element$R
1252
- } = bem(CLASSNAME$1x);
1252
+ } = bem(CLASSNAME$1y);
1253
1253
  const BadgeWrapper$1 = props => {
1254
1254
  const {
1255
1255
  badge,
@@ -1261,7 +1261,7 @@ const BadgeWrapper$1 = props => {
1261
1261
  return /*#__PURE__*/jsxs("div", {
1262
1262
  ref: ref,
1263
1263
  ...forwardedProps,
1264
- className: classnames(className, block$18()),
1264
+ className: classnames(className, block$19()),
1265
1265
  children: [children, badge && /*#__PURE__*/jsx("div", {
1266
1266
  className: element$R('badge'),
1267
1267
  children: badge
@@ -1275,8 +1275,8 @@ const BadgeWrapper = forwardRef((props, ref) => {
1275
1275
  ref
1276
1276
  });
1277
1277
  });
1278
- BadgeWrapper.displayName = COMPONENT_NAME$1B;
1279
- BadgeWrapper.className = CLASSNAME$1x;
1278
+ BadgeWrapper.displayName = COMPONENT_NAME$1C;
1279
+ BadgeWrapper.className = CLASSNAME$1y;
1280
1280
 
1281
1281
  /**
1282
1282
  * Render clickable element (link, button or custom element)
@@ -1326,7 +1326,7 @@ const RawClickable = props => {
1326
1326
  /**
1327
1327
  * Component display name.
1328
1328
  */
1329
- const COMPONENT_NAME$1A = 'ButtonRoot';
1329
+ const COMPONENT_NAME$1B = '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$1A;
1427
+ ButtonRoot.displayName = COMPONENT_NAME$1B;
1428
1428
  ButtonRoot.defaultProps = {};
1429
1429
 
1430
1430
  /**
@@ -1434,20 +1434,20 @@ ButtonRoot.defaultProps = {};
1434
1434
  /**
1435
1435
  * Component display name.
1436
1436
  */
1437
- const COMPONENT_NAME$1z = 'Button';
1437
+ const COMPONENT_NAME$1A = 'Button';
1438
1438
 
1439
1439
  /**
1440
1440
  * Component default class name and class prefix.
1441
1441
  */
1442
- const CLASSNAME$1w = 'lumx-button';
1442
+ const CLASSNAME$1x = 'lumx-button';
1443
1443
  const {
1444
1444
  modifier
1445
- } = bem(CLASSNAME$1w);
1445
+ } = bem(CLASSNAME$1x);
1446
1446
 
1447
1447
  /**
1448
1448
  * Component default props.
1449
1449
  */
1450
- const DEFAULT_PROPS$1e = {
1450
+ const DEFAULT_PROPS$1f = {
1451
1451
  emphasis: Emphasis.high,
1452
1452
  size: Size.m
1453
1453
  };
@@ -1461,10 +1461,10 @@ const DEFAULT_PROPS$1e = {
1461
1461
  const Button$1 = props => {
1462
1462
  const {
1463
1463
  className,
1464
- emphasis = DEFAULT_PROPS$1e.emphasis,
1464
+ emphasis = DEFAULT_PROPS$1f.emphasis,
1465
1465
  leftIcon,
1466
1466
  rightIcon,
1467
- size = DEFAULT_PROPS$1e.size,
1467
+ size = DEFAULT_PROPS$1f.size,
1468
1468
  ...forwardedProps
1469
1469
  } = props;
1470
1470
  const buttonClassName = classnames(className, modifier({
@@ -1479,9 +1479,9 @@ const Button$1 = props => {
1479
1479
  variant: 'button'
1480
1480
  });
1481
1481
  };
1482
- Button$1.displayName = COMPONENT_NAME$1z;
1483
- Button$1.className = CLASSNAME$1w;
1484
- Button$1.defaultProps = DEFAULT_PROPS$1e;
1482
+ Button$1.displayName = COMPONENT_NAME$1A;
1483
+ Button$1.className = CLASSNAME$1x;
1484
+ Button$1.defaultProps = DEFAULT_PROPS$1f;
1485
1485
 
1486
1486
  /**
1487
1487
  * Properties of a component to use to determine it's name.
@@ -1554,26 +1554,26 @@ const Button = forwardRef((props, ref) => {
1554
1554
  })
1555
1555
  });
1556
1556
  });
1557
- Button.displayName = COMPONENT_NAME$1z;
1558
- Button.className = CLASSNAME$1w;
1559
- Button.defaultProps = DEFAULT_PROPS$1e;
1557
+ Button.displayName = COMPONENT_NAME$1A;
1558
+ Button.className = CLASSNAME$1x;
1559
+ Button.defaultProps = DEFAULT_PROPS$1f;
1560
1560
 
1561
- const COMPONENT_NAME$1y = 'Icon';
1561
+ const COMPONENT_NAME$1z = 'Icon';
1562
1562
  const IconClassName = 'lumx-icon';
1563
1563
 
1564
1564
  /**
1565
1565
  * Defines the props of the component.
1566
1566
  */
1567
1567
 
1568
- const CLASSNAME$1v = IconClassName;
1568
+ const CLASSNAME$1w = IconClassName;
1569
1569
  const {
1570
- block: block$17
1571
- } = bem(CLASSNAME$1v);
1570
+ block: block$18
1571
+ } = bem(CLASSNAME$1w);
1572
1572
 
1573
1573
  /**
1574
1574
  * Component default props.
1575
1575
  */
1576
- const DEFAULT_PROPS$1d = {};
1576
+ const DEFAULT_PROPS$1e = {};
1577
1577
 
1578
1578
  /**
1579
1579
  * Icon component.
@@ -1622,7 +1622,7 @@ const Icon$1 = props => {
1622
1622
  return /*#__PURE__*/jsx("i", {
1623
1623
  ref: ref,
1624
1624
  ...forwardedProps,
1625
- className: classnames(className, block$17({
1625
+ className: classnames(className, block$18({
1626
1626
  [`color-${iconColor}`]: Boolean(iconColor),
1627
1627
  [`color-variant-${iconColorVariant}`]: Boolean(iconColorVariant),
1628
1628
  'has-shape': hasShape,
@@ -1651,24 +1651,24 @@ const Icon$1 = props => {
1651
1651
  })
1652
1652
  });
1653
1653
  };
1654
- Icon$1.displayName = COMPONENT_NAME$1y;
1655
- Icon$1.className = CLASSNAME$1v;
1656
- Icon$1.defaultProps = DEFAULT_PROPS$1d;
1654
+ Icon$1.displayName = COMPONENT_NAME$1z;
1655
+ Icon$1.className = CLASSNAME$1w;
1656
+ Icon$1.defaultProps = DEFAULT_PROPS$1e;
1657
1657
 
1658
1658
  /**
1659
1659
  * Component display name.
1660
1660
  */
1661
- const COMPONENT_NAME$1x = 'IconButton';
1661
+ const COMPONENT_NAME$1y = 'IconButton';
1662
1662
 
1663
1663
  /**
1664
1664
  * Component default class name and class prefix.
1665
1665
  */
1666
- const CLASSNAME$1u = 'lumx-icon-button';
1666
+ const CLASSNAME$1v = 'lumx-icon-button';
1667
1667
 
1668
1668
  /**
1669
1669
  * Component default props.
1670
1670
  */
1671
- const DEFAULT_PROPS$1c = {
1671
+ const DEFAULT_PROPS$1d = {
1672
1672
  emphasis: Emphasis.high,
1673
1673
  size: Size.m
1674
1674
  };
@@ -1681,11 +1681,11 @@ const DEFAULT_PROPS$1c = {
1681
1681
  */
1682
1682
  const IconButton$1 = props => {
1683
1683
  const {
1684
- emphasis = DEFAULT_PROPS$1c.emphasis,
1684
+ emphasis = DEFAULT_PROPS$1d.emphasis,
1685
1685
  image,
1686
1686
  icon,
1687
1687
  label,
1688
- size = DEFAULT_PROPS$1c.size,
1688
+ size = DEFAULT_PROPS$1d.size,
1689
1689
  ...forwardedProps
1690
1690
  } = props;
1691
1691
  const defaultChildren = image ? /*#__PURE__*/jsx("img", {
@@ -1704,9 +1704,9 @@ const IconButton$1 = props => {
1704
1704
  children: defaultChildren
1705
1705
  });
1706
1706
  };
1707
- IconButton$1.displayName = COMPONENT_NAME$1x;
1708
- IconButton$1.className = CLASSNAME$1u;
1709
- IconButton$1.defaultProps = DEFAULT_PROPS$1c;
1707
+ IconButton$1.displayName = COMPONENT_NAME$1y;
1708
+ IconButton$1.className = CLASSNAME$1v;
1709
+ IconButton$1.defaultProps = DEFAULT_PROPS$1d;
1710
1710
 
1711
1711
  /**
1712
1712
  * IconButton component.
@@ -1749,24 +1749,24 @@ const IconButton = forwardRef((props, ref) => {
1749
1749
  })
1750
1750
  });
1751
1751
  });
1752
- IconButton.displayName = COMPONENT_NAME$1x;
1753
- IconButton.className = CLASSNAME$1u;
1754
- IconButton.defaultProps = DEFAULT_PROPS$1c;
1752
+ IconButton.displayName = COMPONENT_NAME$1y;
1753
+ IconButton.className = CLASSNAME$1v;
1754
+ IconButton.defaultProps = DEFAULT_PROPS$1d;
1755
1755
 
1756
1756
  /**
1757
1757
  * Component display name.
1758
1758
  */
1759
- const COMPONENT_NAME$1w = 'ButtonGroup';
1759
+ const COMPONENT_NAME$1x = 'ButtonGroup';
1760
1760
 
1761
1761
  /**
1762
1762
  * Component default class name and class prefix.
1763
1763
  */
1764
- const CLASSNAME$1t = 'lumx-button-group';
1764
+ const CLASSNAME$1u = 'lumx-button-group';
1765
1765
 
1766
1766
  /**
1767
1767
  * Component default props.
1768
1768
  */
1769
- const DEFAULT_PROPS$1b = {};
1769
+ const DEFAULT_PROPS$1c = {};
1770
1770
 
1771
1771
  /**
1772
1772
  * ButtonGroup component.
@@ -1782,13 +1782,13 @@ const ButtonGroup$1 = props => {
1782
1782
  } = props;
1783
1783
  return /*#__PURE__*/jsx("div", {
1784
1784
  ...forwardedProps,
1785
- className: classnames(className, CLASSNAME$1t),
1785
+ className: classnames(className, CLASSNAME$1u),
1786
1786
  children: children
1787
1787
  });
1788
1788
  };
1789
- ButtonGroup$1.displayName = COMPONENT_NAME$1w;
1790
- ButtonGroup$1.className = CLASSNAME$1t;
1791
- ButtonGroup$1.defaultProps = DEFAULT_PROPS$1b;
1789
+ ButtonGroup$1.displayName = COMPONENT_NAME$1x;
1790
+ ButtonGroup$1.className = CLASSNAME$1u;
1791
+ ButtonGroup$1.defaultProps = DEFAULT_PROPS$1c;
1792
1792
 
1793
1793
  /**
1794
1794
  * ButtonGroup component.
@@ -1803,9 +1803,81 @@ const ButtonGroup = forwardRef((props, ref) => {
1803
1803
  ...props
1804
1804
  });
1805
1805
  });
1806
- ButtonGroup.displayName = COMPONENT_NAME$1w;
1807
- ButtonGroup.className = CLASSNAME$1t;
1808
- ButtonGroup.defaultProps = DEFAULT_PROPS$1b;
1806
+ ButtonGroup.displayName = COMPONENT_NAME$1x;
1807
+ ButtonGroup.className = CLASSNAME$1u;
1808
+ ButtonGroup.defaultProps = DEFAULT_PROPS$1c;
1809
+
1810
+ /**
1811
+ * Component display name.
1812
+ */
1813
+ const COMPONENT_NAME$1w = 'Card';
1814
+
1815
+ /**
1816
+ * Component default class name and class prefix.
1817
+ */
1818
+ const CLASSNAME$1t = 'lumx-card';
1819
+ const {
1820
+ block: block$17
1821
+ } = bem(CLASSNAME$1t);
1822
+
1823
+ /**
1824
+ * Component default props.
1825
+ */
1826
+ const DEFAULT_PROPS$1b = {
1827
+ as: 'div'
1828
+ };
1829
+
1830
+ /** Root element rendered when no `as` prop is provided. */
1831
+
1832
+ /**
1833
+ * Card component.
1834
+ *
1835
+ * @param props Component props.
1836
+ * @return JSX element.
1837
+ */
1838
+ const Card$1 = props => {
1839
+ const {
1840
+ className,
1841
+ children,
1842
+ elevation,
1843
+ ref,
1844
+ as: Element = DEFAULT_PROPS$1b.as,
1845
+ ...forwardedProps
1846
+ } = props;
1847
+ return /*#__PURE__*/jsx(Element, {
1848
+ ref: ref,
1849
+ ...forwardedProps,
1850
+ className: classnames(className, block$17({
1851
+ [`elevation-${elevation}`]: Boolean(elevation)
1852
+ })),
1853
+ children: children
1854
+ });
1855
+ };
1856
+
1857
+ /** Same as `React.forwardRef` but inferring Ref type from the `as` prop. */
1858
+ const forwardRefPolymorphic = React__default.forwardRef;
1859
+
1860
+ /**
1861
+ * Defines the props of the component.
1862
+ */
1863
+
1864
+ /**
1865
+ * Card component.
1866
+ *
1867
+ * @param props Component props.
1868
+ * @param ref Component ref.
1869
+ * @return React element.
1870
+ */
1871
+ const Card = Object.assign(forwardRefPolymorphic((props, ref) => {
1872
+ return Card$1({
1873
+ ...props,
1874
+ ref
1875
+ });
1876
+ }), {
1877
+ displayName: COMPONENT_NAME$1w,
1878
+ className: CLASSNAME$1t,
1879
+ defaultProps: DEFAULT_PROPS$1b
1880
+ });
1809
1881
 
1810
1882
  const COMPONENT_NAME$1v = 'InputLabel';
1811
1883
  const InputLabelClassName = 'lumx-input-label';
@@ -7256,9 +7328,6 @@ const ComboboxButton$1 = (props, {
7256
7328
  });
7257
7329
  };
7258
7330
 
7259
- /** Same as `React.forwardRef` but inferring Ref type from the `as` prop. */
7260
- const forwardRefPolymorphic = React__default.forwardRef;
7261
-
7262
7331
  var shim = {exports: {}};
7263
7332
 
7264
7333
  var useSyncExternalStoreShim_production = {};
@@ -15841,6 +15910,7 @@ const MenuPopover$1 = (props, {
15841
15910
  className,
15842
15911
  isOpen,
15843
15912
  placement = 'bottom-start',
15913
+ fitToAnchorWidth = FitAnchorWidth.MIN_WIDTH,
15844
15914
  anchorRef,
15845
15915
  handleClose,
15846
15916
  ...forwardedProps
@@ -15857,7 +15927,7 @@ const MenuPopover$1 = (props, {
15857
15927
  focusAnchorOnClose: true,
15858
15928
  withFocusTrap: false,
15859
15929
  closeMode: "hide",
15860
- fitToAnchorWidth: false,
15930
+ fitToAnchorWidth: fitToAnchorWidth,
15861
15931
  className: block$z([className]),
15862
15932
  children: /*#__PURE__*/jsx(FlexBox, {
15863
15933
  orientation: "vertical",
@@ -19487,6 +19557,27 @@ const computeValueFromPercent = (percent, min, max, precision = 0) => Number((mi
19487
19557
  */
19488
19558
  const computePercentFromValue = (value, min, max) => Number((value - min) / (max - min));
19489
19559
 
19560
+ /**
19561
+ * Type guard checking whether an event is a touch event (native or React synthetic).
19562
+ *
19563
+ * @param event The interaction event.
19564
+ * @return Whether the event is a touch event.
19565
+ */
19566
+ const isTouchEvent = event => 'touches' in event;
19567
+
19568
+ /**
19569
+ * Read the horizontal page position from either a mouse or touch event.
19570
+ *
19571
+ * @param event The interaction event.
19572
+ * @return The page X position.
19573
+ */
19574
+ const getPageX = event => {
19575
+ if (isTouchEvent(event)) {
19576
+ return (event.touches[0] ?? event.changedTouches[0]).pageX;
19577
+ }
19578
+ return event.pageX;
19579
+ };
19580
+
19490
19581
  /**
19491
19582
  * Slider component.
19492
19583
  *
@@ -19571,7 +19662,7 @@ const Slider = forwardRef((props, ref) => {
19571
19662
  width,
19572
19663
  left
19573
19664
  } = slider.getBoundingClientRect();
19574
- let percent = (event.pageX - left - window.pageXOffset) / width;
19665
+ let percent = (getPageX(event) - left - window.pageXOffset) / width;
19575
19666
  percent = clamp(percent, 0, 1);
19576
19667
  if (steps) {
19577
19668
  percent = findClosestStep(percent);
@@ -19580,19 +19671,22 @@ const Slider = forwardRef((props, ref) => {
19580
19671
  };
19581
19672
 
19582
19673
  /**
19583
- * Register a handler for the mouse move event.
19674
+ * Register a handler for the mouse/touch move event.
19584
19675
  */
19585
19676
  const handleMove = useEventCallback(event => {
19586
19677
  const {
19587
19678
  current: slider
19588
19679
  } = sliderRef;
19589
19680
  if (!slider || !onChange) return;
19681
+ if (isTouchEvent(event)) {
19682
+ event.preventDefault();
19683
+ }
19590
19684
  const newValue = getPercentValue(event, slider);
19591
19685
  onChange(computeValueFromPercent(newValue, min, max, precision), name, event);
19592
19686
  });
19593
19687
 
19594
19688
  /**
19595
- * Register a handler for the mouse up event.
19689
+ * Register a handler for the mouse up/touch end/touch cancel event.
19596
19690
  * Clean a all listeners.
19597
19691
  */
19598
19692
  const handleEnd = useEventCallback(() => {
@@ -19600,6 +19694,7 @@ const Slider = forwardRef((props, ref) => {
19600
19694
  document.body.removeEventListener('mouseup', handleEnd);
19601
19695
  document.body.removeEventListener('touchmove', handleMove);
19602
19696
  document.body.removeEventListener('touchend', handleEnd);
19697
+ document.body.removeEventListener('touchcancel', handleEnd);
19603
19698
  });
19604
19699
 
19605
19700
  /**
@@ -19645,6 +19740,25 @@ const Slider = forwardRef((props, ref) => {
19645
19740
  document.body.addEventListener('mousemove', handleMove);
19646
19741
  document.body.addEventListener('mouseup', handleEnd);
19647
19742
  });
19743
+
19744
+ /**
19745
+ * Register a handler for the touchStart event.
19746
+ */
19747
+ const handleTouchStart = useEventCallback(event => {
19748
+ const {
19749
+ current: slider
19750
+ } = sliderRef;
19751
+ if (isAnyDisabled || !slider) return;
19752
+ const newValue = getPercentValue(event, slider);
19753
+ if (onChange) {
19754
+ onChange(computeValueFromPercent(newValue, min, max, precision), name, event);
19755
+ }
19756
+ document.body.addEventListener('touchmove', handleMove, {
19757
+ passive: false
19758
+ });
19759
+ document.body.addEventListener('touchend', handleEnd);
19760
+ document.body.addEventListener('touchcancel', handleEnd);
19761
+ });
19648
19762
  const percentString = `${computePercentFromValue(value, min, max) * 100}%`;
19649
19763
  return /*#__PURE__*/jsxs("div", {
19650
19764
  ref: ref,
@@ -19654,6 +19768,7 @@ const Slider = forwardRef((props, ref) => {
19654
19768
  'has-label': Boolean(label)
19655
19769
  })),
19656
19770
  onMouseDown: handleMouseDown,
19771
+ onTouchStart: handleTouchStart,
19657
19772
  children: [label && /*#__PURE__*/jsx(InputLabel, {
19658
19773
  id: sliderLabelId,
19659
19774
  htmlFor: sliderId,
@@ -23047,5 +23162,5 @@ UserBlock.displayName = COMPONENT_NAME;
23047
23162
  UserBlock.className = CLASSNAME;
23048
23163
  UserBlock.defaultProps = DEFAULT_PROPS;
23049
23164
 
23050
- 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 };
23165
+ export { AlertDialog, Autocomplete, AutocompleteMultiple, Avatar, Badge, BadgeWrapper, Button, ButtonGroup, CLASSNAME$1x as CLASSNAME, COMPONENT_NAME$1A as COMPONENT_NAME, Card, Checkbox, Chip, ChipGroup, Combobox, CommentBlock, CommentBlockVariant, DEFAULT_PROPS$1f 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 };
23051
23166
  //# sourceMappingURL=index.js.map