@lumx/react 4.9.0-next.9 → 4.9.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.
Files changed (4) hide show
  1. package/index.d.ts +135 -52
  2. package/index.js +1067 -871
  3. package/index.js.map +1 -1
  4. package/package.json +3 -4
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Kind as Kind$1, Size as Size$1, ColorPalette as ColorPalette$1, Emphasis as Emphasis$1, ColorVariant, VISUALLY_HIDDEN, Theme as Theme$1, AspectRatio as AspectRatio$1, DOCUMENT, IS_BROWSER as IS_BROWSER$1, WINDOW, DIALOG_TRANSITION_DURATION, Orientation as Orientation$1, Alignment as Alignment$1, NOTIFICATION_TRANSITION_DURATION } from '@lumx/core/js/constants';
1
+ import { Kind as Kind$1, Size as Size$1, ColorPalette as ColorPalette$1, Emphasis as Emphasis$1, ColorVariant, VISUALLY_HIDDEN, Theme as Theme$1, AspectRatio as AspectRatio$1, DOCUMENT, IS_BROWSER as IS_BROWSER$1, WINDOW, DIALOG_TRANSITION_DURATION, Orientation as Orientation$1, NOTIFICATION_TRANSITION_DURATION, Alignment as Alignment$1 } from '@lumx/core/js/constants';
2
2
  export * from '@lumx/core/js/constants';
3
3
  export * from '@lumx/core/js/types';
4
4
  import * as React from 'react';
@@ -12,19 +12,19 @@ import pull from 'lodash/pull.js';
12
12
  import { u as useDisabledStateContext, P as Portal, C as ClickAwayProvider } from './_internal/Dpulze-1.js';
13
13
  import isEmpty from 'lodash/isEmpty.js';
14
14
  import get from 'lodash/get.js';
15
- import { getDisabledState } from '@lumx/core/js/utils/disabledState';
15
+ import { getDisabledState as getDisabledState$1 } from '@lumx/core/js/utils/disabledState';
16
16
  import { mdiAlertCircle } from '@lumx/icons/esm/alert-circle.js';
17
17
  import { mdiChevronUp } from '@lumx/icons/esm/chevron-up.js';
18
18
  import { mdiChevronDown } from '@lumx/icons/esm/chevron-down.js';
19
19
  import { mdiCheckCircle } from '@lumx/icons/esm/check-circle.js';
20
20
  import { mdiCloseCircle } from '@lumx/icons/esm/close-circle.js';
21
21
  import { mdiInformationOutline } from '@lumx/icons/esm/information-outline.js';
22
+ import castArray from 'lodash/castArray.js';
22
23
  import noop$1 from 'lodash/noop.js';
23
24
  import concat from 'lodash/concat.js';
24
25
  import dropRight from 'lodash/dropRight.js';
25
26
  import partition from 'lodash/partition.js';
26
27
  import reduce from 'lodash/reduce.js';
27
- import castArray from 'lodash/castArray.js';
28
28
  import { mdiAlert } from '@lumx/icons/esm/alert.js';
29
29
  import { mdiInformation } from '@lumx/icons/esm/information.js';
30
30
  import { mdiClose } from '@lumx/icons/esm/close.js';
@@ -105,7 +105,7 @@ const COMPONENT_NAME$1w = 'AlertDialog';
105
105
  */
106
106
  const CLASSNAME$1v = 'lumx-alert-dialog';
107
107
  const {
108
- block: block$18
108
+ block: block$19
109
109
  } = classNames.bem(CLASSNAME$1v);
110
110
 
111
111
  /**
@@ -174,7 +174,7 @@ const AlertDialog = forwardRef((props, ref) => {
174
174
  'aria-describedby': descriptionId,
175
175
  ...dialogProps
176
176
  },
177
- className: classNames.join(className, block$18({
177
+ className: classNames.join(className, block$19({
178
178
  [`kind-${kind}`]: Boolean(kind)
179
179
  })),
180
180
  ...forwardedProps,
@@ -293,7 +293,7 @@ function useDisableStateProps(props) {
293
293
  ...otherProps
294
294
  } = props;
295
295
  const disabledStateContext = useDisabledStateContext();
296
- const disabledStateProps = getDisabledState(disabledStateContext, {
296
+ const disabledStateProps = getDisabledState$1(disabledStateContext, {
297
297
  disabled,
298
298
  isDisabled,
299
299
  'aria-disabled': ariaDisabled
@@ -664,7 +664,7 @@ function modifier$1(baseName, modifiers) {
664
664
  * block('button', { active: true, disabled: false }); // 'button button--active'
665
665
  */
666
666
 
667
- function block$17(baseName, modifiersOrAdditionalClasses, additionalClasses) {
667
+ function block$18(baseName, modifiersOrAdditionalClasses, additionalClasses) {
668
668
  let modifiers;
669
669
  let classes;
670
670
  if (Array.isArray(modifiersOrAdditionalClasses)) {
@@ -699,7 +699,7 @@ const ACTION_ELEMENT = `${PREFIX}__action`;
699
699
  const actionArea = Object.assign(/** Action area container class. Sets `position: relative`. */
700
700
  () => PREFIX, {
701
701
  /** Action element class. Adds a `::before` pseudo-element with `position: absolute; inset: 0` to expand the click area. */
702
- action: modifiers => block$17(ACTION_ELEMENT, modifiers)
702
+ action: modifiers => block$18(ACTION_ELEMENT, modifiers)
703
703
  });
704
704
 
705
705
  /** Resolve color & color variant from a `ColorWithVariants` and optionally a `ColorVariant`. */
@@ -821,11 +821,11 @@ const visuallyHidden = () => VISUALLY_HIDDEN;
821
821
  * element('my-button', 'icon', { active: true }); // 'my-button__icon my-button__icon--active'
822
822
  */
823
823
 
824
- function element$Q(baseClass, elem, modifiersOrAdditionalClasses, additionalClasses) {
824
+ function element$R(baseClass, elem, modifiersOrAdditionalClasses, additionalClasses) {
825
825
  if (Array.isArray(modifiersOrAdditionalClasses)) {
826
- return block$17(`${baseClass}__${elem}`, modifiersOrAdditionalClasses);
826
+ return block$18(`${baseClass}__${elem}`, modifiersOrAdditionalClasses);
827
827
  }
828
- return block$17(`${baseClass}__${elem}`, modifiersOrAdditionalClasses, additionalClasses);
828
+ return block$18(`${baseClass}__${elem}`, modifiersOrAdditionalClasses, additionalClasses);
829
829
  }
830
830
 
831
831
  /**
@@ -834,15 +834,15 @@ function element$Q(baseClass, elem, modifiersOrAdditionalClasses, additionalClas
834
834
  function bem(baseName) {
835
835
  function blockFn(modifiersOrAdditionalClasses, additionalClasses) {
836
836
  if (Array.isArray(modifiersOrAdditionalClasses)) {
837
- return block$17(baseName, modifiersOrAdditionalClasses);
837
+ return block$18(baseName, modifiersOrAdditionalClasses);
838
838
  }
839
- return block$17(baseName, modifiersOrAdditionalClasses, additionalClasses);
839
+ return block$18(baseName, modifiersOrAdditionalClasses, additionalClasses);
840
840
  }
841
841
  function elementFn(elem, modifiersOrAdditionalClasses, additionalClasses) {
842
842
  if (Array.isArray(modifiersOrAdditionalClasses)) {
843
- return element$Q(baseName, elem, modifiersOrAdditionalClasses);
843
+ return element$R(baseName, elem, modifiersOrAdditionalClasses);
844
844
  }
845
- return element$Q(baseName, elem, modifiersOrAdditionalClasses, additionalClasses);
845
+ return element$R(baseName, elem, modifiersOrAdditionalClasses, additionalClasses);
846
846
  }
847
847
  return {
848
848
  block: blockFn,
@@ -948,7 +948,10 @@ const AspectRatio = {
948
948
  /** Ratio 3:2 */
949
949
  horizontal: 'horizontal',
950
950
  /** Ratio 1:1 */
951
- square: 'square'};
951
+ square: 'square',
952
+ /** Ratio constrained by the parent. */
953
+ free: 'free'
954
+ };
952
955
  /**
953
956
  * Semantic info about the purpose of the component
954
957
  */
@@ -997,8 +1000,8 @@ const COMPONENT_NAME$1t = 'Avatar';
997
1000
  */
998
1001
  const CLASSNAME$1s = 'lumx-avatar';
999
1002
  const {
1000
- block: block$16,
1001
- element: element$P
1003
+ block: block$17,
1004
+ element: element$Q
1002
1005
  } = bem(CLASSNAME$1s);
1003
1006
 
1004
1007
  /**
@@ -1029,15 +1032,15 @@ const Avatar$1 = props => {
1029
1032
  return /*#__PURE__*/jsxs("div", {
1030
1033
  ref: ref,
1031
1034
  ...forwardedProps,
1032
- className: classnames(className, block$16({
1035
+ className: classnames(className, block$17({
1033
1036
  [`size-${size}`]: Boolean(size),
1034
1037
  [`theme-${theme}`]: Boolean(theme)
1035
1038
  })),
1036
1039
  children: [image, actions && /*#__PURE__*/jsx("div", {
1037
- className: element$P('actions'),
1040
+ className: element$Q('actions'),
1038
1041
  children: actions
1039
1042
  }), badge && /*#__PURE__*/jsx("div", {
1040
- className: element$P('badge'),
1043
+ className: element$Q('badge'),
1041
1044
  children: badge
1042
1045
  })]
1043
1046
  });
@@ -1078,7 +1081,7 @@ const Avatar = forwardRef((props, ref) => {
1078
1081
  image: /*#__PURE__*/jsx(Thumbnail, {
1079
1082
  linkProps: linkProps,
1080
1083
  linkAs: linkAs,
1081
- className: element$P('thumbnail'),
1084
+ className: element$Q('thumbnail'),
1082
1085
  onClick: onClick,
1083
1086
  onKeyPress: onKeyPress,
1084
1087
  ...thumbnailProps,
@@ -1104,7 +1107,7 @@ const COMPONENT_NAME$1s = 'Badge';
1104
1107
  */
1105
1108
  const CLASSNAME$1r = 'lumx-badge';
1106
1109
  const {
1107
- block: block$15
1110
+ block: block$16
1108
1111
  } = bem(CLASSNAME$1r);
1109
1112
 
1110
1113
  /**
@@ -1131,7 +1134,7 @@ const Badge$1 = props => {
1131
1134
  return /*#__PURE__*/jsx("div", {
1132
1135
  ref: ref,
1133
1136
  ...forwardedProps,
1134
- className: classnames(className, block$15({
1137
+ className: classnames(className, block$16({
1135
1138
  [`color-${color}`]: Boolean(color)
1136
1139
  })),
1137
1140
  children: children
@@ -1165,8 +1168,8 @@ Badge.defaultProps = Badge$1.defaultProps;
1165
1168
  const COMPONENT_NAME$1r = 'BadgeWrapper';
1166
1169
  const CLASSNAME$1q = 'lumx-badge-wrapper';
1167
1170
  const {
1168
- block: block$14,
1169
- element: element$O
1171
+ block: block$15,
1172
+ element: element$P
1170
1173
  } = bem(CLASSNAME$1q);
1171
1174
  const BadgeWrapper$1 = props => {
1172
1175
  const {
@@ -1179,9 +1182,9 @@ const BadgeWrapper$1 = props => {
1179
1182
  return /*#__PURE__*/jsxs("div", {
1180
1183
  ref: ref,
1181
1184
  ...forwardedProps,
1182
- className: classnames(className, block$14()),
1185
+ className: classnames(className, block$15()),
1183
1186
  children: [children, badge && /*#__PURE__*/jsx("div", {
1184
- className: element$O('badge'),
1187
+ className: element$P('badge'),
1185
1188
  children: badge
1186
1189
  })]
1187
1190
  });
@@ -1485,7 +1488,7 @@ const IconClassName = 'lumx-icon';
1485
1488
 
1486
1489
  const CLASSNAME$1o = IconClassName;
1487
1490
  const {
1488
- block: block$13
1491
+ block: block$14
1489
1492
  } = bem(CLASSNAME$1o);
1490
1493
 
1491
1494
  /**
@@ -1540,7 +1543,7 @@ const Icon$1 = props => {
1540
1543
  return /*#__PURE__*/jsx("i", {
1541
1544
  ref: ref,
1542
1545
  ...forwardedProps,
1543
- className: classnames(className, block$13({
1546
+ className: classnames(className, block$14({
1544
1547
  [`color-${iconColor}`]: Boolean(iconColor),
1545
1548
  [`color-variant-${iconColorVariant}`]: Boolean(iconColorVariant),
1546
1549
  'has-shape': hasShape,
@@ -1729,7 +1732,7 @@ const COMPONENT_NAME$1l = 'InputLabel';
1729
1732
  const InputLabelClassName = 'lumx-input-label';
1730
1733
  const CLASSNAME$1l = InputLabelClassName;
1731
1734
  const {
1732
- block: block$12
1735
+ block: block$13
1733
1736
  } = bem(CLASSNAME$1l);
1734
1737
  const DEFAULT_PROPS$16 = {};
1735
1738
 
@@ -1751,7 +1754,7 @@ function InputLabel$1(props) {
1751
1754
  ref: ref,
1752
1755
  ...forwardedProps,
1753
1756
  htmlFor: htmlFor,
1754
- className: classnames(className, block$12({
1757
+ className: classnames(className, block$13({
1755
1758
  'is-required': isRequired,
1756
1759
  [`theme-${theme}`]: Boolean(theme),
1757
1760
  'has-custom-typography': Boolean(typography$1)
@@ -1784,7 +1787,7 @@ const InputHelperClassName = 'lumx-input-helper';
1784
1787
 
1785
1788
  const CLASSNAME$1k = InputHelperClassName;
1786
1789
  const {
1787
- block: block$11
1790
+ block: block$12
1788
1791
  } = bem(CLASSNAME$1k);
1789
1792
 
1790
1793
  /**
@@ -1812,7 +1815,7 @@ function InputHelper$1(props) {
1812
1815
  return /*#__PURE__*/jsx("p", {
1813
1816
  ref: ref,
1814
1817
  ...forwardedProps,
1815
- className: classnames(className, block$11({
1818
+ className: classnames(className, block$12({
1816
1819
  [`color-${color}`]: Boolean(color),
1817
1820
  [`theme-${theme}`]: Boolean(theme)
1818
1821
  })),
@@ -1839,8 +1842,8 @@ const COMPONENT_NAME$1j = 'Checkbox';
1839
1842
  */
1840
1843
  const CLASSNAME$1j = 'lumx-checkbox';
1841
1844
  const {
1842
- block: block$10,
1843
- element: element$N
1845
+ block: block$11,
1846
+ element: element$O
1844
1847
  } = bem(CLASSNAME$1j);
1845
1848
 
1846
1849
  /**
@@ -1877,7 +1880,7 @@ const Checkbox$1 = props => {
1877
1880
  return /*#__PURE__*/jsxs("div", {
1878
1881
  ref: ref,
1879
1882
  ...forwardedProps,
1880
- className: classnames(className, block$10({
1883
+ className: classnames(className, block$11({
1881
1884
  // Whether state is intermediate class name will "-checked"
1882
1885
  'is-checked': intermediateState ? true : isChecked,
1883
1886
  'is-disabled': isDisabled,
@@ -1885,12 +1888,12 @@ const Checkbox$1 = props => {
1885
1888
  [`theme-${theme}`]: Boolean(theme)
1886
1889
  })),
1887
1890
  children: [/*#__PURE__*/jsxs("div", {
1888
- className: element$N('input-wrapper'),
1891
+ className: element$O('input-wrapper'),
1889
1892
  children: [/*#__PURE__*/jsx("input", {
1890
1893
  ref: inputRef,
1891
1894
  type: "checkbox",
1892
1895
  id: inputId,
1893
- className: element$N('input-native'),
1896
+ className: element$O('input-native'),
1894
1897
  name: name,
1895
1898
  value: value,
1896
1899
  checked: isChecked,
@@ -1902,26 +1905,26 @@ const Checkbox$1 = props => {
1902
1905
  } : {}),
1903
1906
  ...inputProps
1904
1907
  }), /*#__PURE__*/jsxs("div", {
1905
- className: element$N('input-placeholder'),
1908
+ className: element$O('input-placeholder'),
1906
1909
  children: [/*#__PURE__*/jsx("div", {
1907
- className: element$N('input-background')
1910
+ className: element$O('input-background')
1908
1911
  }), /*#__PURE__*/jsx("div", {
1909
- className: element$N('input-indicator'),
1912
+ className: element$O('input-indicator'),
1910
1913
  children: Icon$1({
1911
1914
  icon: intermediateState ? mdiMinus : mdiCheck
1912
1915
  })
1913
1916
  })]
1914
1917
  })]
1915
1918
  }), /*#__PURE__*/jsxs("div", {
1916
- className: element$N('content'),
1919
+ className: element$O('content'),
1917
1920
  children: [label && InputLabel$1({
1918
1921
  htmlFor: inputId,
1919
- className: element$N('label'),
1922
+ className: element$O('label'),
1920
1923
  theme,
1921
1924
  children: label
1922
1925
  }), helper && InputHelper$1({
1923
1926
  id: `${inputId}-helper`,
1924
- className: element$N('helper'),
1927
+ className: element$O('helper'),
1925
1928
  theme,
1926
1929
  children: helper
1927
1930
  })]
@@ -2026,8 +2029,8 @@ const COMPONENT_NAME$1i = 'Chip';
2026
2029
  */
2027
2030
  const CLASSNAME$1i = 'lumx-chip';
2028
2031
  const {
2029
- block: block$$,
2030
- element: element$M
2032
+ block: block$10,
2033
+ element: element$N
2031
2034
  } = bem(CLASSNAME$1i);
2032
2035
 
2033
2036
  /**
@@ -2095,7 +2098,7 @@ const Chip$1 = props => {
2095
2098
  ...forwardedProps,
2096
2099
  href: !disabledStateProps.disabled ? href : undefined,
2097
2100
  ref: ref,
2098
- className: classnames(className, block$$({
2101
+ className: classnames(className, block$10({
2099
2102
  'is-clickable': isClickable,
2100
2103
  [`color-${chipColor}`]: Boolean(chipColor),
2101
2104
  'is-disabled': isAnyDisabled,
@@ -2112,19 +2115,19 @@ const Chip$1 = props => {
2112
2115
  /*#__PURE__*/
2113
2116
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
2114
2117
  jsx("div", {
2115
- className: element$M('before', {
2118
+ className: element$N('before', {
2116
2119
  'is-clickable': hasBeforeClick
2117
2120
  }),
2118
2121
  onClick: handleBeforeClick,
2119
2122
  children: before
2120
2123
  }), /*#__PURE__*/jsx("div", {
2121
- className: element$M('label'),
2124
+ className: element$N('label'),
2122
2125
  children: children
2123
2126
  }), after &&
2124
2127
  /*#__PURE__*/
2125
2128
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
2126
2129
  jsx("div", {
2127
- className: element$M('after', {
2130
+ className: element$N('after', {
2128
2131
  'is-clickable': hasAfterClick
2129
2132
  }),
2130
2133
  onClick: handleAfterClick,
@@ -2387,8 +2390,8 @@ function useFocusLastChipOnBackspace(chipRefs, inputRef) {
2387
2390
  */
2388
2391
  const CLASSNAME$1g = 'lumx-selection-chip-group';
2389
2392
  const {
2390
- block: block$_,
2391
- element: element$L
2393
+ block: block$$,
2394
+ element: element$M
2392
2395
  } = classNames.bem(CLASSNAME$1g);
2393
2396
 
2394
2397
  /**
@@ -2419,7 +2422,7 @@ const SelectionChipGroup = ({
2419
2422
  return /*#__PURE__*/jsx(ChipGroup, {
2420
2423
  role: "group",
2421
2424
  "aria-label": label,
2422
- className: block$_(),
2425
+ className: block$$(),
2423
2426
  ...forwardedProps,
2424
2427
  children: value?.map((v, index) => {
2425
2428
  const name = getWithSelector(getOptionName, v);
@@ -2463,7 +2466,7 @@ const SelectionChipGroup = ({
2463
2466
  after: /*#__PURE__*/jsx(Icon, {
2464
2467
  icon: mdiClose
2465
2468
  }),
2466
- className: element$L('chip', [props?.className]),
2469
+ className: element$M('chip', [props?.className]),
2467
2470
  size: "s",
2468
2471
  ref: ref,
2469
2472
  onClick: onClick,
@@ -2495,7 +2498,8 @@ function isOptionDisabled(option) {
2495
2498
  /** Returns true when the cell is NOT the first gridcell in its row (i.e., it's an action cell). */
2496
2499
  function isActionCell(cell) {
2497
2500
  const row = cell.closest('[role="row"]');
2498
- return row?.querySelector('[role="gridcell"]') !== cell;
2501
+ if (!row) return false;
2502
+ return row.querySelector('[role="gridcell"]') !== cell;
2499
2503
  }
2500
2504
 
2501
2505
  /** Predicate matching an option element that carries `aria-selected="true"`. */
@@ -3130,7 +3134,9 @@ function setupListbox(handle, signal, notify) {
3130
3134
  onActivate: item => {
3131
3135
  item.setAttribute('data-focus-visible-added', 'true');
3132
3136
  trigger.setAttribute('aria-activedescendant', item.id);
3133
- item.scrollIntoView({
3137
+ // Scroll to the element in listbox or else the item
3138
+ const toScrollTo = item.closest('[role=listbox] > *') || item;
3139
+ toScrollTo.scrollIntoView({
3134
3140
  behavior: 'smooth',
3135
3141
  block: 'nearest'
3136
3142
  });
@@ -3344,7 +3350,7 @@ function setupCombobox(callbacks, options, onTriggerAttach) {
3344
3350
  /**
3345
3351
  * Attach the shared keydown listener to the trigger.
3346
3352
  *
3347
- * Handles: Enter, ArrowDown, ArrowUp, Escape (2-tier), Tab, PageUp, PageDown.
3353
+ * Handles: Enter, ArrowDown, ArrowUp, Escape (2-tier), PageUp, PageDown.
3348
3354
  * Mode-specific keys (Space, Home, End, ArrowLeft/Right, printable chars, etc.)
3349
3355
  * are delegated to the `onKeydown` hook provided by the mode controller.
3350
3356
  */
@@ -3366,16 +3372,17 @@ function setupCombobox(callbacks, options, onTriggerAttach) {
3366
3372
  switch (event.key) {
3367
3373
  case 'Enter':
3368
3374
  if (handle.isOpen && nav?.hasActiveItem && nav.activeItem) {
3369
- if (!isOptionDisabled(nav.activeItem)) {
3370
- // Click the active item. For option cells, the delegated click handler
3371
- // on the listbox will call handle.select() and handle closing.
3372
- // For action cells and link options, the native click fires too.
3373
- nav.activeItem.click();
3375
+ // Capture activeItem before click — the click handler may close
3376
+ // the popover and clear the focus navigation state.
3377
+ const {
3378
+ activeItem
3379
+ } = nav;
3380
+ // "Click" on active option
3381
+ if (!isOptionDisabled(activeItem)) {
3382
+ activeItem.click();
3374
3383
  }
3375
- // Close for single-select. For option cells the delegated handler
3376
- // already closed, but setIsOpen(false) is idempotent. For action cells
3377
- // and disabled options, the delegated handler did NOT close, so this is needed.
3378
- if (!handle.isMultiSelect) {
3384
+ // Only close when not in multi select and not in action cell
3385
+ if (!handle.isMultiSelect && !isActionCell(activeItem)) {
3379
3386
  handle.setIsOpen(false);
3380
3387
  }
3381
3388
  } else if (!handle.isMultiSelect) {
@@ -3431,15 +3438,6 @@ function setupCombobox(callbacks, options, onTriggerAttach) {
3431
3438
  }
3432
3439
  flag = true;
3433
3440
  break;
3434
- case 'Tab':
3435
- // Click the active option (if any) and close. Let Tab propagate.
3436
- if (nav?.hasActiveItem && nav.activeItem && !isOptionDisabled(nav.activeItem)) {
3437
- nav.activeItem.click();
3438
- }
3439
- // The delegated click handler closes for single-select, but for multi-select
3440
- // or when no item is active, we still need to explicitly close.
3441
- handle.setIsOpen(false);
3442
- break;
3443
3441
  case 'PageUp':
3444
3442
  if (handle.isOpen && nav?.hasActiveItem) {
3445
3443
  nav.goToOffset(-10);
@@ -3479,10 +3477,17 @@ function setupCombobox(callbacks, options, onTriggerAttach) {
3479
3477
  }
3480
3478
  trigger.setAttribute('aria-expanded', String(isOpenState));
3481
3479
 
3482
- // On first attach, wire up the mode-specific controller and shared keydown handler.
3480
+ // On first attach, wire up the mode-specific controller, shared keydown, and focusout handlers.
3483
3481
  if (isNewController) {
3484
3482
  const onKeydown = onTriggerAttach?.(handle, abortController.signal) || undefined;
3485
3483
  attachTriggerKeydown(trigger, abortController.signal, onKeydown);
3484
+
3485
+ // Close the popup when the trigger loses focus
3486
+ trigger.addEventListener('focusout', () => {
3487
+ handle.setIsOpen(false);
3488
+ }, {
3489
+ signal: abortController.signal
3490
+ });
3486
3491
  }
3487
3492
  if (listbox && !focusNav) {
3488
3493
  focusNav = setupListbox(handle, abortController.signal, notify);
@@ -3548,7 +3553,7 @@ function setupCombobox(callbacks, options, onTriggerAttach) {
3548
3553
  registerOption(element, callback) {
3549
3554
  const filterLower = filterValue.toLowerCase();
3550
3555
  const text = getOptionValue(element).toLowerCase();
3551
- const isFiltered = filterLower.length > 0 && !text.startsWith(filterLower);
3556
+ const isFiltered = filterLower.length > 0 && !text.includes(filterLower);
3552
3557
  optionRegistrations.set(element, {
3553
3558
  callback,
3554
3559
  lastFiltered: isFiltered
@@ -3566,7 +3571,7 @@ function setupCombobox(callbacks, options, onTriggerAttach) {
3566
3571
  const filterLower = newFilter.toLowerCase();
3567
3572
  for (const [element, reg] of optionRegistrations) {
3568
3573
  const text = getOptionValue(element).toLowerCase();
3569
- const isFiltered = filterLower.length > 0 && !text.startsWith(filterLower);
3574
+ const isFiltered = filterLower.length > 0 && !text.includes(filterLower);
3570
3575
  // Only notify when state actually changes to avoid unnecessary re-renders.
3571
3576
  if (isFiltered !== reg.lastFiltered) {
3572
3577
  reg.lastFiltered = isFiltered;
@@ -3824,6 +3829,13 @@ function setupComboboxButton(button, callbacks) {
3824
3829
  return event => {
3825
3830
  const nav = combobox.focusNav;
3826
3831
  switch (event.key) {
3832
+ case 'Tab':
3833
+ // Selects the focused option
3834
+ if (combobox.isOpen && nav?.hasActiveItem && nav.activeItem) {
3835
+ combobox.select(nav.activeItem);
3836
+ }
3837
+ // Return false to continue normal 'Tab' behavior (focus next).
3838
+ return false;
3827
3839
  case ' ':
3828
3840
  // Space acts like Enter in button mode.
3829
3841
  if (combobox.isOpen && nav?.hasActiveItem && nav.activeItem) {
@@ -6059,8 +6071,8 @@ const COMPONENT_NAME$1f = 'Tooltip';
6059
6071
  */
6060
6072
  const CLASSNAME$1e = 'lumx-tooltip';
6061
6073
  const {
6062
- block: block$Z,
6063
- element: element$K
6074
+ block: block$_,
6075
+ element: element$L
6064
6076
  } = bem(CLASSNAME$1e);
6065
6077
 
6066
6078
  /**
@@ -6092,7 +6104,7 @@ const TooltipPopup = props => {
6092
6104
  ...forwardedProps,
6093
6105
  id: id,
6094
6106
  role: "tooltip",
6095
- className: classnames(className, block$Z({
6107
+ className: classnames(className, block$_({
6096
6108
  [`position-${position}`]: Boolean(position)
6097
6109
  }), isHidden && visuallyHidden()),
6098
6110
  style: {
@@ -6101,9 +6113,9 @@ const TooltipPopup = props => {
6101
6113
  },
6102
6114
  "data-popper-placement": position,
6103
6115
  children: [/*#__PURE__*/jsx("div", {
6104
- className: element$K('arrow')
6116
+ className: element$L('arrow')
6105
6117
  }), /*#__PURE__*/jsx("div", {
6106
- className: element$K('inner'),
6118
+ className: element$L('inner'),
6107
6119
  children: labelLines.map((line, index) => /*#__PURE__*/jsx("p", {
6108
6120
  children: line
6109
6121
  }, index))
@@ -6620,6 +6632,9 @@ function setupComboboxInput(input, options) {
6620
6632
  onSelect: optionOnSelect
6621
6633
  } = options;
6622
6634
 
6635
+ /** Check if the input is disabled (native `disabled` attribute or `aria-disabled="true"`). */
6636
+ const isDisabled = () => input.disabled || input.getAttribute('aria-disabled') === 'true';
6637
+
6623
6638
  /**
6624
6639
  * True when the current input value came from user typing (real InputEvent).
6625
6640
  * False when the value was set programmatically (select, clear, etc.).
@@ -6657,6 +6672,7 @@ function setupComboboxInput(input, options) {
6657
6672
  // Filter on real user typing (InputEvent with `inputType`).
6658
6673
  input.addEventListener('input', event => {
6659
6674
  if (!(event instanceof InputEvent)) return;
6675
+ if (isDisabled()) return;
6660
6676
  combobox.focusNav?.clear();
6661
6677
  userHasTyped = true;
6662
6678
  combobox.setIsOpen(true);
@@ -6669,6 +6685,7 @@ function setupComboboxInput(input, options) {
6669
6685
 
6670
6686
  // Open on focus.
6671
6687
  input.addEventListener('focus', () => {
6688
+ if (isDisabled()) return;
6672
6689
  combobox.focusNav?.clear();
6673
6690
  combobox.setIsOpen(true);
6674
6691
  }, {
@@ -6676,7 +6693,10 @@ function setupComboboxInput(input, options) {
6676
6693
  });
6677
6694
 
6678
6695
  // Open on click (handles the case where the input is already focused, so focus doesn't re-fire).
6679
- input.addEventListener('click', () => combobox.setIsOpen(true), {
6696
+ input.addEventListener('click', () => {
6697
+ if (isDisabled()) return;
6698
+ combobox.setIsOpen(true);
6699
+ }, {
6680
6700
  signal
6681
6701
  });
6682
6702
 
@@ -6722,6 +6742,23 @@ function setupComboboxInput(input, options) {
6722
6742
  return handle;
6723
6743
  }
6724
6744
 
6745
+ /** Disable state */
6746
+
6747
+ /**
6748
+ * Calculate the disabled state based on context and props.
6749
+ */
6750
+ function getDisabledState(context, props) {
6751
+ const {
6752
+ disabled,
6753
+ isDisabled = disabled,
6754
+ 'aria-disabled': ariaDisabled
6755
+ } = props;
6756
+ return {
6757
+ disabled: !!isDisabled,
6758
+ 'aria-disabled': ariaDisabled === true || ariaDisabled === 'true'
6759
+ };
6760
+ }
6761
+
6725
6762
  /**
6726
6763
  * Component display name.
6727
6764
  */
@@ -6758,7 +6795,12 @@ const ComboboxInput$1 = (props, {
6758
6795
  theme,
6759
6796
  ...forwardedProps
6760
6797
  } = props;
6798
+
6799
+ // Compute whether the combobox is disabled (native or aria-disabled).
6800
+ const disabledState = getDisabledState(undefined, props);
6801
+ const isAnyDisabled = disabledState.disabled || disabledState['aria-disabled'] || undefined;
6761
6802
  return /*#__PURE__*/jsx(TextField, {
6803
+ autoComplete: "off",
6762
6804
  ...forwardedProps,
6763
6805
  ref: ref,
6764
6806
  role: "combobox",
@@ -6767,11 +6809,11 @@ const ComboboxInput$1 = (props, {
6767
6809
  "aria-expanded": isOpen,
6768
6810
  inputRef: inputRef,
6769
6811
  textFieldRef: textFieldRef,
6770
- autoComplete: "off",
6771
6812
  theme: theme,
6772
6813
  afterElement: toggleButtonProps ? /*#__PURE__*/jsx(IconButton, {
6773
6814
  ...toggleButtonProps,
6774
6815
  theme: theme,
6816
+ isDisabled: isAnyDisabled,
6775
6817
  emphasis: "low",
6776
6818
  size: "s",
6777
6819
  icon: isOpen ? mdiChevronUp : mdiChevronDown,
@@ -6799,8 +6841,8 @@ const CLASSNAME$1c = 'lumx-text-field';
6799
6841
  const INPUT_NATIVE_CLASSNAME = `${CLASSNAME$1c}__input-native`;
6800
6842
 
6801
6843
  const {
6802
- block: block$Y,
6803
- element: element$J
6844
+ block: block$Z,
6845
+ element: element$K
6804
6846
  } = bem(CLASSNAME$1c);
6805
6847
 
6806
6848
  /**
@@ -6870,7 +6912,7 @@ const TextField$1 = props => {
6870
6912
  const isNotEmpty = valueLength > 0;
6871
6913
  return /*#__PURE__*/jsxs("div", {
6872
6914
  ref: ref,
6873
- className: classnames(className, block$Y({
6915
+ className: classnames(className, block$Z({
6874
6916
  'has-chips': Boolean(chips),
6875
6917
  'has-error': !isValid && hasError,
6876
6918
  'has-icon': Boolean(icon),
@@ -6886,16 +6928,16 @@ const TextField$1 = props => {
6886
6928
  [`theme-${theme}`]: Boolean(theme)
6887
6929
  })),
6888
6930
  children: [(label || maxLength) && /*#__PURE__*/jsxs("div", {
6889
- className: element$J('header'),
6931
+ className: element$K('header'),
6890
6932
  children: [label && InputLabel$1({
6891
6933
  ...labelProps,
6892
6934
  htmlFor: textFieldId,
6893
- className: element$J('label'),
6935
+ className: element$K('label'),
6894
6936
  isRequired,
6895
6937
  theme,
6896
6938
  children: label
6897
6939
  }), maxLength && /*#__PURE__*/jsxs("div", {
6898
- className: element$J('char-counter'),
6940
+ className: element$K('char-counter'),
6899
6941
  children: [/*#__PURE__*/jsx("span", {
6900
6942
  children: maxLength - valueLength
6901
6943
  }), maxLength - valueLength === 0 && Icon$1({
@@ -6904,44 +6946,44 @@ const TextField$1 = props => {
6904
6946
  })]
6905
6947
  })]
6906
6948
  }), /*#__PURE__*/jsxs("div", {
6907
- className: element$J('wrapper'),
6949
+ className: element$K('wrapper'),
6908
6950
  ref: textFieldRef,
6909
6951
  children: [icon && Icon$1({
6910
- className: element$J('input-icon'),
6952
+ className: element$K('input-icon'),
6911
6953
  color: theme === Theme.dark ? 'light' : undefined,
6912
6954
  icon,
6913
6955
  size: Size.xs
6914
6956
  }), chips ? /*#__PURE__*/jsxs("div", {
6915
- className: element$J('chips'),
6957
+ className: element$K('chips'),
6916
6958
  children: [chips, input]
6917
6959
  }) : /*#__PURE__*/jsx("div", {
6918
- className: element$J('input-wrapper'),
6960
+ className: element$K('input-wrapper'),
6919
6961
  children: input
6920
6962
  }), (isValid || hasError) && Icon$1({
6921
- className: element$J('input-validity'),
6963
+ className: element$K('input-validity'),
6922
6964
  color: theme === Theme.dark ? 'light' : undefined,
6923
6965
  icon: isValid ? mdiCheckCircle : mdiAlertCircle,
6924
6966
  size: Size.xxs
6925
6967
  }), clearButtonProps && isNotEmpty && !isAnyDisabled && /*#__PURE__*/jsx(IconButton, {
6926
6968
  ...clearButtonProps,
6927
- className: element$J('input-clear'),
6969
+ className: element$K('input-clear'),
6928
6970
  icon: mdiCloseCircle,
6929
6971
  emphasis: Emphasis.low,
6930
6972
  size: Size.s,
6931
6973
  theme: theme,
6932
6974
  type: "button"
6933
6975
  }), afterElement && /*#__PURE__*/jsx("div", {
6934
- className: element$J('after-element'),
6976
+ className: element$K('after-element'),
6935
6977
  children: afterElement
6936
6978
  })]
6937
6979
  }), hasError && error && InputHelper$1({
6938
6980
  children: error,
6939
- className: element$J('helper'),
6981
+ className: element$K('helper'),
6940
6982
  kind: Kind.error,
6941
6983
  theme,
6942
6984
  id: errorId
6943
6985
  }), helper && InputHelper$1({
6944
- className: element$J('helper'),
6986
+ className: element$K('helper'),
6945
6987
  theme,
6946
6988
  id: helperId,
6947
6989
  children: helper
@@ -6950,7 +6992,7 @@ const TextField$1 = props => {
6950
6992
  };
6951
6993
 
6952
6994
  const {
6953
- block: block$X
6995
+ block: block$Y
6954
6996
  } = bem(INPUT_NATIVE_CLASSNAME);
6955
6997
 
6956
6998
  /**
@@ -6974,6 +7016,7 @@ const RawInputText$1 = props => {
6974
7016
  theme,
6975
7017
  value,
6976
7018
  handleChange,
7019
+ handleInput,
6977
7020
  type = DEFAULT_PROPS$10.type,
6978
7021
  name,
6979
7022
  ref,
@@ -6982,16 +7025,20 @@ const RawInputText$1 = props => {
6982
7025
  const handleOnChange = evt => {
6983
7026
  handleChange?.(evt.target.value, name, evt);
6984
7027
  };
7028
+ const handleOnInput = evt => {
7029
+ handleInput?.(evt.target.value, name, evt);
7030
+ };
6985
7031
  return /*#__PURE__*/jsx("input", {
6986
7032
  ...forwardedProps,
6987
7033
  name: name,
6988
7034
  type: type,
6989
7035
  ref: ref,
6990
- className: classnames(className, block$X({
7036
+ className: classnames(className, block$Y({
6991
7037
  [`theme-${theme}`]: Boolean(theme),
6992
7038
  text: true
6993
7039
  })),
6994
7040
  onChange: handleOnChange,
7041
+ onInput: handleOnInput,
6995
7042
  value: value
6996
7043
  });
6997
7044
  };
@@ -7016,7 +7063,7 @@ const RawInputText = forwardRef((props, ref) => {
7016
7063
  });
7017
7064
 
7018
7065
  const {
7019
- block: block$W
7066
+ block: block$X
7020
7067
  } = bem(INPUT_NATIVE_CLASSNAME);
7021
7068
 
7022
7069
  /**
@@ -7040,6 +7087,7 @@ const RawInputTextarea$1 = props => {
7040
7087
  theme,
7041
7088
  value,
7042
7089
  handleChange,
7090
+ handleInput,
7043
7091
  rows = DEFAULT_PROPS$$.rows,
7044
7092
  name,
7045
7093
  ref,
@@ -7048,15 +7096,19 @@ const RawInputTextarea$1 = props => {
7048
7096
  const handleOnChange = evt => {
7049
7097
  handleChange?.(evt.target.value, name, evt);
7050
7098
  };
7099
+ const handleOnInput = evt => {
7100
+ handleInput?.(evt.target.value, name, evt);
7101
+ };
7051
7102
  return /*#__PURE__*/jsx("textarea", {
7052
7103
  ...forwardedProps,
7053
7104
  name: name,
7054
7105
  ref: ref,
7055
- className: classnames(className, block$W({
7106
+ className: classnames(className, block$X({
7056
7107
  [`theme-${theme}`]: Boolean(theme),
7057
7108
  textarea: true
7058
7109
  })),
7059
7110
  onChange: handleOnChange,
7111
+ onInput: handleOnInput,
7060
7112
  value: value,
7061
7113
  rows: rows
7062
7114
  });
@@ -7378,7 +7430,7 @@ const COMPONENT_NAME$1c = 'List';
7378
7430
  */
7379
7431
  const CLASSNAME$1b = 'lumx-list';
7380
7432
  const {
7381
- block: block$V
7433
+ block: block$W
7382
7434
  } = bem(CLASSNAME$1b);
7383
7435
 
7384
7436
  /**
@@ -7402,7 +7454,7 @@ const List$1 = props => {
7402
7454
  } = props;
7403
7455
  return /*#__PURE__*/jsx("ul", {
7404
7456
  ...forwardedProps,
7405
- className: classnames(className, block$V({
7457
+ className: classnames(className, block$W({
7406
7458
  [`item-padding-${itemPadding}`]: Boolean(itemPadding)
7407
7459
  })),
7408
7460
  ref: ref,
@@ -7551,8 +7603,8 @@ const COMPONENT_NAME$1a = 'ListItem';
7551
7603
  */
7552
7604
  const CLASSNAME$19 = 'lumx-list-item';
7553
7605
  const {
7554
- block: block$U,
7555
- element: element$I
7606
+ block: block$V,
7607
+ element: element$J
7556
7608
  } = bem(CLASSNAME$19);
7557
7609
 
7558
7610
  /**
@@ -7590,7 +7642,7 @@ const ListItem$1 = props => {
7590
7642
  return /*#__PURE__*/jsx("li", {
7591
7643
  ref: ref,
7592
7644
  ...forwardedProps,
7593
- className: classnames(className, block$U({
7645
+ className: classnames(className, block$V({
7594
7646
  [`size-${size}`]: Boolean(size)
7595
7647
  })),
7596
7648
  children: RawClickable({
@@ -7598,7 +7650,7 @@ const ListItem$1 = props => {
7598
7650
  isDisabled,
7599
7651
  'aria-disabled': ariaDisabled,
7600
7652
  ...linkProps,
7601
- className: element$I(clickable ? 'link' : 'wrapper', {
7653
+ className: element$J(clickable ? 'link' : 'wrapper', {
7602
7654
  'is-highlighted': isHighlighted,
7603
7655
  'is-selected': isSelected,
7604
7656
  'is-disabled': isDisabled || ariaDisabled === 'true'
@@ -7607,13 +7659,13 @@ const ListItem$1 = props => {
7607
7659
  ref: linkRef,
7608
7660
  children: /*#__PURE__*/jsxs(Fragment, {
7609
7661
  children: [before && /*#__PURE__*/jsx("div", {
7610
- className: element$I('before'),
7662
+ className: element$J('before'),
7611
7663
  children: before
7612
7664
  }), /*#__PURE__*/jsx("div", {
7613
- className: element$I('content'),
7665
+ className: element$J('content'),
7614
7666
  children: children
7615
7667
  }), after && /*#__PURE__*/jsx("div", {
7616
- className: element$I('after'),
7668
+ className: element$J('after'),
7617
7669
  children: after
7618
7670
  })]
7619
7671
  })
@@ -7681,7 +7733,7 @@ const COMPONENT_NAME$18 = 'Text';
7681
7733
  */
7682
7734
  const CLASSNAME$17 = 'lumx-text';
7683
7735
  const {
7684
- block: block$T
7736
+ block: block$U
7685
7737
  } = bem(CLASSNAME$17);
7686
7738
 
7687
7739
  /**
@@ -7723,7 +7775,7 @@ const getTextProps = props => {
7723
7775
  '--lumx-text-white-space': whiteSpace
7724
7776
  };
7725
7777
  return {
7726
- className: classnames(className, block$T({
7778
+ className: classnames(className, block$U({
7727
7779
  'is-truncated': isTruncated && !isTruncatedMultiline,
7728
7780
  'is-truncated-multiline': isTruncatedMultiline,
7729
7781
  'no-wrap': noWrap
@@ -7746,8 +7798,8 @@ const COMPONENT_NAME$17 = 'ComboboxOption';
7746
7798
  */
7747
7799
  const CLASSNAME$16 = 'lumx-combobox-option';
7748
7800
  const {
7749
- block: block$S,
7750
- element: element$H
7801
+ block: block$T,
7802
+ element: element$I
7751
7803
  } = bem(CLASSNAME$16);
7752
7804
 
7753
7805
  /**
@@ -7792,7 +7844,7 @@ const ComboboxOption$1 = (props, {
7792
7844
  as: 'button',
7793
7845
  ...actionProps,
7794
7846
  id,
7795
- className: element$H('trigger'),
7847
+ className: element$I('action'),
7796
7848
  handleClick,
7797
7849
  'aria-selected': isSelected ? 'true' : 'false',
7798
7850
  'data-value': value,
@@ -7810,7 +7862,7 @@ const ComboboxOption$1 = (props, {
7810
7862
  size: 'tiny',
7811
7863
  ...forwardedProps,
7812
7864
  hidden,
7813
- className: !hidden ? classnames(className, block$S()) : undefined,
7865
+ className: !hidden ? classnames(className, block$T()) : undefined,
7814
7866
  before,
7815
7867
  after,
7816
7868
  role: itemRole,
@@ -7818,7 +7870,7 @@ const ComboboxOption$1 = (props, {
7818
7870
  children: [wrappedAction, description && /*#__PURE__*/jsx("p", {
7819
7871
  id: descriptionId,
7820
7872
  ...getTextProps({
7821
- className: element$H('description'),
7873
+ className: element$I('description'),
7822
7874
  typography: 'caption',
7823
7875
  color: 'dark-L2'
7824
7876
  }),
@@ -8027,8 +8079,8 @@ const COMPONENT_NAME$15 = 'ComboboxOptionMoreInfo';
8027
8079
  */
8028
8080
  const CLASSNAME$14 = 'lumx-combobox-option-more-info';
8029
8081
  const {
8030
- block: block$R,
8031
- element: element$G
8082
+ block: block$S,
8083
+ element: element$H
8032
8084
  } = bem(CLASSNAME$14);
8033
8085
 
8034
8086
  /**
@@ -8063,7 +8115,7 @@ const ComboboxOptionMoreInfo$1 = (props, {
8063
8115
  icon: mdiInformationOutline,
8064
8116
  size: "s",
8065
8117
  ...buttonProps,
8066
- className: block$R([className, buttonProps?.className]),
8118
+ className: block$S([className, buttonProps?.className]),
8067
8119
  emphasis: "low",
8068
8120
  onMouseEnter: onMouseEnter,
8069
8121
  onMouseLeave: onMouseLeave
@@ -8074,7 +8126,7 @@ const ComboboxOptionMoreInfo$1 = (props, {
8074
8126
  label: ""
8075
8127
  }), /*#__PURE__*/jsx(Popover, {
8076
8128
  id: popoverId,
8077
- className: element$G('popover'),
8129
+ className: element$H('popover'),
8078
8130
  anchorRef: ref,
8079
8131
  isOpen: isOpen,
8080
8132
  closeMode: "unmount",
@@ -8275,8 +8327,8 @@ const COMPONENT_NAME$14 = 'Popover';
8275
8327
  */
8276
8328
  const CLASSNAME$13 = 'lumx-popover';
8277
8329
  const {
8278
- block: block$Q,
8279
- element: element$F
8330
+ block: block$R,
8331
+ element: element$G
8280
8332
  } = bem(CLASSNAME$13);
8281
8333
 
8282
8334
  /**
@@ -8339,7 +8391,7 @@ const Popover$1 = (props, {
8339
8391
  children: /*#__PURE__*/jsxs(Component, {
8340
8392
  ...forwardedProps,
8341
8393
  ref: ref,
8342
- className: classnames(className, block$Q({
8394
+ className: classnames(className, block$R({
8343
8395
  [`theme-${theme}`]: Boolean(theme),
8344
8396
  [`elevation-${adjustedElevation}`]: Boolean(adjustedElevation),
8345
8397
  [`position-${position}`]: Boolean(position),
@@ -8352,7 +8404,7 @@ const Popover$1 = (props, {
8352
8404
  childrenRefs: clickAwayRefs,
8353
8405
  children: [hasArrow && /*#__PURE__*/jsx("div", {
8354
8406
  ref: arrowRef,
8355
- className: element$F('arrow'),
8407
+ className: element$G('arrow'),
8356
8408
  style: isHidden ? undefined : arrowStyle,
8357
8409
  children: /*#__PURE__*/jsx("svg", {
8358
8410
  viewBox: "0 0 14 14",
@@ -8818,8 +8870,8 @@ const COMPONENT_NAME$13 = 'SkeletonTypography';
8818
8870
  */
8819
8871
  const CLASSNAME$12 = 'lumx-skeleton-typography';
8820
8872
  const {
8821
- block: block$P,
8822
- element: element$E
8873
+ block: block$Q,
8874
+ element: element$F
8823
8875
  } = bem(CLASSNAME$12);
8824
8876
 
8825
8877
  /**
@@ -8841,7 +8893,7 @@ const SkeletonTypography$1 = props => {
8841
8893
  return /*#__PURE__*/jsx("div", {
8842
8894
  ref: ref,
8843
8895
  ...forwardedProps,
8844
- className: classnames(className, block$P({
8896
+ className: classnames(className, block$Q({
8845
8897
  [`theme-${theme}`]: Boolean(theme),
8846
8898
  [`typography-${typography}`]: Boolean(typography),
8847
8899
  [`color-${color}`]: Boolean(color)
@@ -8851,7 +8903,7 @@ const SkeletonTypography$1 = props => {
8851
8903
  width
8852
8904
  },
8853
8905
  children: /*#__PURE__*/jsx("div", {
8854
- className: element$E('inner')
8906
+ className: element$F('inner')
8855
8907
  })
8856
8908
  });
8857
8909
  };
@@ -8883,9 +8935,10 @@ const ComboboxOptionSkeleton$1 = props => {
8883
8935
  children,
8884
8936
  className,
8885
8937
  ref,
8938
+ count = 1,
8886
8939
  ...forwardedProps
8887
8940
  } = props;
8888
- return ListItem$1({
8941
+ const itemProps = {
8889
8942
  ref,
8890
8943
  size: 'tiny',
8891
8944
  role: 'none',
@@ -8900,6 +8953,13 @@ const ComboboxOptionSkeleton$1 = props => {
8900
8953
  theme: "light"
8901
8954
  })]
8902
8955
  })
8956
+ };
8957
+ return /*#__PURE__*/jsx(Fragment, {
8958
+ children: Array.from({
8959
+ length: count
8960
+ }, (_, i) => /*#__PURE__*/jsx(ListItem$1, {
8961
+ ...itemProps
8962
+ }, i))
8903
8963
  });
8904
8964
  };
8905
8965
 
@@ -8928,19 +8988,13 @@ const ComboboxOptionSkeleton$1 = props => {
8928
8988
  * @return React element(s).
8929
8989
  */
8930
8990
  const ComboboxOptionSkeleton = props => {
8931
- const {
8932
- count = 1,
8933
- ...itemProps
8934
- } = props;
8935
8991
  const {
8936
8992
  handle
8937
8993
  } = useComboboxContext();
8938
8994
  useEffect(() => handle?.registerSkeleton(), [handle]);
8939
- return Array.from({
8940
- length: count
8941
- }, (_, i) => /*#__PURE__*/jsx(ComboboxOptionSkeleton$1, {
8942
- ...itemProps
8943
- }, i));
8995
+ return /*#__PURE__*/jsx(ComboboxOptionSkeleton$1, {
8996
+ ...props
8997
+ });
8944
8998
  };
8945
8999
  ComboboxOptionSkeleton.displayName = COMPONENT_NAME$12;
8946
9000
  ComboboxOptionSkeleton.className = CLASSNAME$11;
@@ -8951,6 +9005,10 @@ const COMPONENT_NAME$11 = 'ComboboxPopover';
8951
9005
  * Component default class name.
8952
9006
  */
8953
9007
  const CLASSNAME$10 = 'lumx-combobox-popover';
9008
+ const {
9009
+ block: block$P,
9010
+ element: element$E
9011
+ } = bem(CLASSNAME$10);
8954
9012
 
8955
9013
  /**
8956
9014
  * Defines the props for the core ComboboxPopover template.
@@ -8972,7 +9030,8 @@ const CLASSNAME$10 = 'lumx-combobox-popover';
8972
9030
  * @return JSX element.
8973
9031
  */
8974
9032
  const ComboboxPopover$1 = (props, {
8975
- Popover
9033
+ Popover,
9034
+ FlexBox
8976
9035
  }) => {
8977
9036
  const {
8978
9037
  children,
@@ -8990,17 +9049,95 @@ const ComboboxPopover$1 = (props, {
8990
9049
  ...forwardedProps,
8991
9050
  placement: placement,
8992
9051
  fitToAnchorWidth: fitToAnchorWidth,
8993
- className: classnames(className, CLASSNAME$10),
9052
+ className: block$P([className]),
8994
9053
  anchorRef: anchorRef,
8995
9054
  isOpen: isOpen,
8996
9055
  onClose: handleClose,
8997
9056
  closeOnClickAway: closeOnClickAway,
8998
9057
  closeOnEscape: closeOnEscape,
8999
9058
  closeMode: "hide",
9000
- children: children
9059
+ children: /*#__PURE__*/jsx(FlexBox, {
9060
+ orientation: "vertical",
9061
+ className: element$E('scroll'),
9062
+ children: children
9063
+ })
9001
9064
  });
9002
9065
  };
9003
9066
 
9067
+ /**
9068
+ * Defines the props of the component.
9069
+ */
9070
+
9071
+ /**
9072
+ * Component display name.
9073
+ */
9074
+ const COMPONENT_NAME$10 = 'FlexBox';
9075
+
9076
+ /**
9077
+ * Component default class name and class prefix.
9078
+ */
9079
+ const CLASSNAME$$ = 'lumx-flex-box';
9080
+ const {
9081
+ block: block$O
9082
+ } = bem(CLASSNAME$$);
9083
+
9084
+ /**
9085
+ * Get FlexBox component props (className computation).
9086
+ *
9087
+ * @param props Component props.
9088
+ * @return Computed props with className.
9089
+ */
9090
+ function getFlexBoxProps(props) {
9091
+ const {
9092
+ className,
9093
+ fillSpace,
9094
+ gap,
9095
+ hAlign,
9096
+ marginAuto,
9097
+ noShrink,
9098
+ vAlign,
9099
+ wrap,
9100
+ orientation,
9101
+ ...forwardedProps
9102
+ } = props;
9103
+ const adjustedOrientation = orientation ?? (wrap || hAlign || vAlign ? Orientation.horizontal : null);
9104
+ return {
9105
+ ...forwardedProps,
9106
+ className: classnames(className, block$O({
9107
+ [`orientation-${adjustedOrientation}`]: Boolean(adjustedOrientation),
9108
+ [`v-align-${vAlign}`]: Boolean(vAlign),
9109
+ [`h-align-${hAlign}`]: Boolean(hAlign),
9110
+ [`gap-${gap}`]: Boolean(gap),
9111
+ wrap: Boolean(wrap),
9112
+ 'fill-space': fillSpace,
9113
+ 'no-shrink': noShrink,
9114
+ ...Object.fromEntries(castArray(marginAuto).filter(Boolean).map(align => [`margin-auto-${align}`, true]))
9115
+ }))
9116
+ };
9117
+ }
9118
+
9119
+ /**
9120
+ * FlexBox component.
9121
+ *
9122
+ * @param props Component props.
9123
+ * @param ref Component ref.
9124
+ * @return React element.
9125
+ */
9126
+ const FlexBox = forwardRef((props, ref) => {
9127
+ const {
9128
+ as: Component = 'div',
9129
+ children,
9130
+ ...forwardedProps
9131
+ } = props;
9132
+ return /*#__PURE__*/jsx(Component, {
9133
+ ref: ref,
9134
+ ...getFlexBoxProps(forwardedProps),
9135
+ children: children
9136
+ });
9137
+ });
9138
+ FlexBox.displayName = COMPONENT_NAME$10;
9139
+ FlexBox.className = CLASSNAME$$;
9140
+
9004
9141
  /**
9005
9142
  * Props for Popover that can be passed to Combobox.Popover.
9006
9143
  * Excludes isOpen, anchorRef, children, and onClose which are managed internally.
@@ -9033,7 +9170,8 @@ const ComboboxPopover = props => {
9033
9170
  anchorRef: anchorRef,
9034
9171
  handleClose: () => setIsOpen(false)
9035
9172
  }, {
9036
- Popover
9173
+ Popover,
9174
+ FlexBox
9037
9175
  });
9038
9176
  };
9039
9177
  ComboboxPopover.displayName = COMPONENT_NAME$11;
@@ -9071,12 +9209,12 @@ ComboboxProvider.displayName = 'Combobox.Provider';
9071
9209
  /**
9072
9210
  * Component display name.
9073
9211
  */
9074
- const COMPONENT_NAME$10 = 'ComboboxSection';
9212
+ const COMPONENT_NAME$$ = 'ComboboxSection';
9075
9213
 
9076
9214
  /**
9077
9215
  * Component default class name and class prefix.
9078
9216
  */
9079
- const CLASSNAME$$ = 'lumx-combobox-section';
9217
+ const CLASSNAME$_ = 'lumx-combobox-section';
9080
9218
 
9081
9219
  /**
9082
9220
  * ComboboxSection core template.
@@ -9103,7 +9241,7 @@ const ComboboxSection$1 = (props, {
9103
9241
  ...forwardedProps,
9104
9242
  hidden: hidden,
9105
9243
  "aria-hidden": ariaHidden || undefined,
9106
- className: !hidden ? classnames(className, CLASSNAME$$) : undefined,
9244
+ className: !hidden ? classnames(className, CLASSNAME$_) : undefined,
9107
9245
  role: !ariaHidden ? 'none' : undefined,
9108
9246
  itemsWrapperProps: {
9109
9247
  role: 'group'
@@ -9112,365 +9250,24 @@ const ComboboxSection$1 = (props, {
9112
9250
  });
9113
9251
  };
9114
9252
 
9115
- const INITIAL_INDEX = -1;
9116
-
9117
9253
  /**
9118
- * This custom hook provides the necessary set of functions and values to properly navigate
9119
- * a list using the keyboard.
9120
- *
9121
- * @param items the list of items that will be navigated using the keyboard.
9122
- * @param ref A reference to the element that is controlling the navigation.
9123
- * @param onListItemSelected callback to be executed when the ENTER key is pressed on an item.
9124
- * @param onListItemNavigated callback to be executed when the Arrow keys are pressed.
9125
- * @param onEnterPressed callback to be executed when the ENTER key is pressed.
9126
- * @param onBackspacePressed callback to be executed when the BACKSPACE key is pressed.
9127
- * @param keepFocusAfterSelection determines whether after selecting an item, the focus should be maintained on the current target or not.
9128
- * @param initialIndex where should the navigation start from. it defaults to `-1`, so the first item navigated is the item on position `0`.
9129
- * @param preventTabOnEnteredValue determines whether upon TAB, if there is a value entered, the event is prevented or not.
9130
- * @return useKeyboardListNavigation helpers.
9254
+ * Component display name.
9131
9255
  */
9132
- const useKeyboardListNavigation = (items, ref, onListItemSelected, onListItemNavigated, onEnterPressed, onBackspacePressed, keepFocusAfterSelection = false, initialIndex = INITIAL_INDEX, preventTabOnEnteredValue = true) => {
9133
- const [activeItemIndex, setActiveItemIndex] = useState(initialIndex);
9134
-
9135
- /**
9136
- * This function calculates the next index in the list to be highlighted
9137
- * @param key - key code pressed
9138
- * @return next active index
9139
- */
9140
- const calculateActiveIndex = key => {
9141
- switch (key) {
9142
- case 'ArrowDown':
9143
- return activeItemIndex + 1 < items.length ? activeItemIndex + 1 : 0;
9144
- case 'ArrowUp':
9145
- return activeItemIndex - 1 >= 0 ? activeItemIndex - 1 : items.length - 1;
9146
- default:
9147
- return initialIndex;
9148
- }
9149
- };
9256
+ const COMPONENT_NAME$_ = 'ListSection';
9150
9257
 
9151
- /**
9152
- * Resets the active index to the initial state
9153
- */
9154
- const resetActiveIndex = () => {
9155
- setActiveItemIndex(initialIndex);
9156
- };
9258
+ /**
9259
+ * Component default class name and class prefix.
9260
+ */
9261
+ const CLASSNAME$Z = 'lumx-list-section';
9262
+ const {
9263
+ block: block$N,
9264
+ element: element$D
9265
+ } = bem(CLASSNAME$Z);
9157
9266
 
9158
- /**
9159
- * Prevents the default event and stops the propagation of said event
9160
- * @param evt - key pressed event
9161
- */
9162
- const preventDefaultAndStopPropagation = evt => {
9163
- evt.preventDefault();
9164
- evt.stopPropagation();
9165
- };
9166
-
9167
- /**
9168
- * Handles navigation with the arrows using the keyboard
9169
- * @param evt - key pressed event
9170
- */
9171
- const onArrowPressed = evt => {
9172
- const {
9173
- key
9174
- } = evt;
9175
- const nextActiveIndex = calculateActiveIndex(key);
9176
- setActiveItemIndex(nextActiveIndex);
9177
- preventDefaultAndStopPropagation(evt);
9178
- if (onListItemNavigated) {
9179
- const selectedItem = items[nextActiveIndex];
9180
- onListItemNavigated(selectedItem);
9181
- }
9182
- };
9183
-
9184
- /**
9185
- * Handles the event when the backspace key is pressed
9186
- * @param evt - key pressed event
9187
- */
9188
- const onBackspaceKeyPressed = evt => {
9189
- if (onBackspacePressed) {
9190
- onBackspacePressed(evt);
9191
- }
9192
- };
9193
-
9194
- /**
9195
- * Handles when the ENTER key is pressed
9196
- * @param evt - key pressed event
9197
- */
9198
- const onEnterKeyPressed = evt => {
9199
- if (!onListItemSelected) {
9200
- return;
9201
- }
9202
- preventDefaultAndStopPropagation(evt);
9203
- if (!keepFocusAfterSelection) {
9204
- evt.currentTarget.blur();
9205
- }
9206
- const selectedItem = items[activeItemIndex];
9207
- if (selectedItem) {
9208
- onListItemSelected(selectedItem);
9209
- resetActiveIndex();
9210
- } else if (activeItemIndex === initialIndex && onEnterPressed) {
9211
- const value = get(evt, 'target.value');
9212
- onEnterPressed(value);
9213
- resetActiveIndex();
9214
- }
9215
- };
9216
-
9217
- /**
9218
- * Handles when the TAB key is pressed
9219
- * @param evt - key pressed event
9220
- */
9221
- const onTabKeyPressed = evt => {
9222
- const value = get(evt, 'target.value');
9223
- if (preventTabOnEnteredValue && value && value.length > 0) {
9224
- preventDefaultAndStopPropagation(evt);
9225
- }
9226
- };
9227
-
9228
- /**
9229
- * In order to make it easier in the future to add new events depending on the key
9230
- * a map was created to add these handlers. In the future, if there is another event
9231
- * that we need to manage depending on a specific key, we just need to add the key code
9232
- * here, and as a value, the handler for said key.
9233
- */
9234
- const eventsForKeyPressed = {
9235
- ArrowDown: onArrowPressed,
9236
- Tab: onTabKeyPressed,
9237
- ArrowUp: onArrowPressed,
9238
- Enter: onEnterKeyPressed,
9239
- Backspace: onBackspaceKeyPressed
9240
- };
9241
-
9242
- /**
9243
- * Calculates the next active item index depending on the key pressed.
9244
- * If the key pressed was ENTER, the function executes the callback `onListItemSelected`
9245
- * and resets the active index, since an item was selected.
9246
- * @param evt - key pressed or key down event
9247
- */
9248
- const onKeyboardNavigation = evt => {
9249
- const {
9250
- key
9251
- } = evt;
9252
- const handler = eventsForKeyPressed[key];
9253
- if (handler) {
9254
- handler(evt);
9255
- }
9256
- };
9257
- useEffect(() => {
9258
- const {
9259
- current: currentElement
9260
- } = ref;
9261
- if (!currentElement) {
9262
- return undefined;
9263
- }
9264
- currentElement.addEventListener('focus', resetActiveIndex);
9265
- currentElement.addEventListener('keydown', onKeyboardNavigation);
9266
- return () => {
9267
- currentElement.removeEventListener('focus', resetActiveIndex);
9268
- currentElement.removeEventListener('keydown', onKeyboardNavigation);
9269
- };
9270
- });
9271
- return {
9272
- activeItemIndex,
9273
- onKeyboardNavigation,
9274
- resetActiveIndex,
9275
- setActiveItemIndex
9276
- };
9277
- };
9278
-
9279
- /**
9280
- * Defines the props of the component.
9281
- */
9282
-
9283
- /* eslint-disable jsx-a11y/no-noninteractive-tabindex */
9284
- /**
9285
- * List component.
9286
- *
9287
- * @param props Component props.
9288
- * @param ref Component ref.
9289
- * @return React element.
9290
- */
9291
- const InternalList = forwardRef((props, ref) => {
9292
- const {
9293
- children,
9294
- isClickable,
9295
- onListItemSelected,
9296
- itemPadding,
9297
- ...forwardedProps
9298
- } = props;
9299
- const adjustedItemPadding = itemPadding ?? (isClickable ? Size$1.big : undefined);
9300
- return List$1({
9301
- ...forwardedProps,
9302
- ref,
9303
- children,
9304
- itemPadding: adjustedItemPadding
9305
- });
9306
- });
9307
- InternalList.displayName = COMPONENT_NAME$1c;
9308
- InternalList.className = CLASSNAME$1b;
9309
- InternalList.defaultProps = DEFAULT_PROPS$Y;
9310
- const List = Object.assign(InternalList, {
9311
- useKeyboardListNavigation
9312
- });
9313
-
9314
- /**
9315
- * ListItem.Action props.
9316
- */
9317
-
9318
- /**
9319
- * ListItem.Action sub-component.
9320
- *
9321
- * Renders a button or link with action area classes.
9322
- * When placed as a child of ListItem, it activates the action area pattern:
9323
- * the entire list item becomes visually clickable, while other interactive
9324
- * elements (in `before`/`after` slots) remain independently clickable.
9325
- *
9326
- * @param props Component props.
9327
- * @param ref Component ref.
9328
- * @return React element.
9329
- */
9330
- const ListItemAction = Object.assign(forwardRefPolymorphic((props, ref) => {
9331
- const {
9332
- children,
9333
- onClick,
9334
- ...forwardedProps
9335
- } = props;
9336
- return ListItemAction$1({
9337
- ...forwardedProps,
9338
- handleClick: onClick,
9339
- ref,
9340
- children
9341
- });
9342
- }), {
9343
- displayName: COMPONENT_NAME$19,
9344
- className: CLASSNAME$18,
9345
- defaultProps: DEFAULT_PROPS$W
9346
- });
9347
-
9348
- /**
9349
- * Defines the props of the component.
9350
- */
9351
-
9352
- /**
9353
- * ListItem component.
9354
- *
9355
- * @param props Component props.
9356
- * @param ref Component ref.
9357
- * @return React element.
9358
- */
9359
- const _ListItem = forwardRef((props, ref) => {
9360
- const {
9361
- disabledStateProps,
9362
- otherProps
9363
- } = useDisableStateProps(props);
9364
- const {
9365
- onItemSelected,
9366
- onClick,
9367
- linkRef,
9368
- ...forwardedProps
9369
- } = otherProps;
9370
- const handleClick = event => {
9371
- onItemSelected?.(event);
9372
- onClick?.(event);
9373
- };
9374
- return ListItem$1({
9375
- ...forwardedProps,
9376
- isDisabled: disabledStateProps.disabled,
9377
- 'aria-disabled': disabledStateProps['aria-disabled'],
9378
- ref,
9379
- linkRef,
9380
- handleClick: onItemSelected || props.onClick ? handleClick : undefined
9381
- });
9382
- });
9383
- _ListItem.displayName = COMPONENT_NAME$1a;
9384
- _ListItem.className = CLASSNAME$19;
9385
- _ListItem.defaultProps = DEFAULT_PROPS$X;
9386
-
9387
- /**
9388
- * ListItem component with Action sub-component.
9389
- */
9390
- const ListItem = Object.assign(_ListItem, {
9391
- /** Sub-component that renders the default action (button or link) for the action area pattern. */
9392
- Action: ListItemAction
9393
- });
9394
-
9395
- /**
9396
- * Component display name.
9397
- */
9398
- const COMPONENT_NAME$$ = 'ListDivider';
9399
-
9400
- /**
9401
- * Component default class name and class prefix.
9402
- */
9403
- const CLASSNAME$_ = 'lumx-list-divider';
9404
-
9405
- /**
9406
- * Component default props.
9407
- */
9408
- const DEFAULT_PROPS$T = {};
9409
-
9410
- /**
9411
- * ListDivider component.
9412
- * Purely decorative, consider a `ListSection` with label for a better list structure.
9413
- *
9414
- * @param props Component props.
9415
- * @return JSX element.
9416
- */
9417
- const ListDivider$1 = props => {
9418
- const {
9419
- className,
9420
- ref,
9421
- ...forwardedProps
9422
- } = props;
9423
- return /*#__PURE__*/jsx("li", {
9424
- ref: ref,
9425
- role: "none",
9426
- ...forwardedProps,
9427
- className: classnames(className, CLASSNAME$_)
9428
- });
9429
- };
9430
- ListDivider$1.displayName = COMPONENT_NAME$$;
9431
- ListDivider$1.className = CLASSNAME$_;
9432
- ListDivider$1.defaultProps = DEFAULT_PROPS$T;
9433
-
9434
- /**
9435
- * Defines the props of the component.
9436
- */
9437
-
9438
- /**
9439
- * ListDivider component.
9440
- * Purely decorative, consider a `ListSection` with label for a better list structure.
9441
- *
9442
- * @param props Component props.
9443
- * @param ref Component ref.
9444
- * @return React element.
9445
- */
9446
- const ListDivider = forwardRef((props, ref) => {
9447
- return ListDivider$1({
9448
- ...props,
9449
- ref
9450
- });
9451
- });
9452
- ListDivider.displayName = COMPONENT_NAME$$;
9453
- ListDivider.className = CLASSNAME$_;
9454
- ListDivider.defaultProps = DEFAULT_PROPS$T;
9455
-
9456
- /**
9457
- * Component display name.
9458
- */
9459
- const COMPONENT_NAME$_ = 'ListSection';
9460
-
9461
- /**
9462
- * Component default class name and class prefix.
9463
- */
9464
- const CLASSNAME$Z = 'lumx-list-section';
9465
- const {
9466
- block: block$O,
9467
- element: element$D
9468
- } = bem(CLASSNAME$Z);
9469
-
9470
- /**
9471
- * Component default props.
9472
- */
9473
- const DEFAULT_PROPS$S = {};
9267
+ /**
9268
+ * Component default props.
9269
+ */
9270
+ const DEFAULT_PROPS$T = {};
9474
9271
 
9475
9272
  /**
9476
9273
  * ListSection component.
@@ -9495,7 +9292,7 @@ const ListSection$1 = props => {
9495
9292
  return /*#__PURE__*/jsxs("li", {
9496
9293
  ref: ref,
9497
9294
  ...forwardedProps,
9498
- className: classnames(className, block$O()),
9295
+ className: classnames(className, block$N()),
9499
9296
  children: [hasHeader && /*#__PURE__*/jsxs(Text, {
9500
9297
  as: "p",
9501
9298
  typography: "overline",
@@ -9514,7 +9311,7 @@ const ListSection$1 = props => {
9514
9311
  };
9515
9312
  ListSection$1.displayName = COMPONENT_NAME$_;
9516
9313
  ListSection$1.className = CLASSNAME$Z;
9517
- ListSection$1.defaultProps = DEFAULT_PROPS$S;
9314
+ ListSection$1.defaultProps = DEFAULT_PROPS$T;
9518
9315
 
9519
9316
  /**
9520
9317
  * Defines the props of the component.
@@ -9538,41 +9335,7 @@ const ListSection = forwardRef((props, ref) => {
9538
9335
  });
9539
9336
  ListSection.displayName = COMPONENT_NAME$_;
9540
9337
  ListSection.className = CLASSNAME$Z;
9541
- ListSection.defaultProps = DEFAULT_PROPS$S;
9542
-
9543
- /**
9544
- * Component display name.
9545
- */
9546
- const COMPONENT_NAME$Z = 'ListSubheader';
9547
-
9548
- /**
9549
- * Component default class name and class prefix.
9550
- */
9551
- const CLASSNAME$Y = 'lumx-list-subheader';
9552
-
9553
- /**
9554
- * ListSubheader component.
9555
- * @deprecated ListSubheader produces improper list structure. use ListSection instead.
9556
- *
9557
- * @param props Component props.
9558
- * @param ref Component ref.
9559
- * @return React element.
9560
- */
9561
- const ListSubheader = forwardRef((props, ref) => {
9562
- const {
9563
- children,
9564
- className,
9565
- ...forwardedProps
9566
- } = props;
9567
- return /*#__PURE__*/jsx("li", {
9568
- ref: ref,
9569
- ...forwardedProps,
9570
- className: classNames.join(className, CLASSNAME$Y),
9571
- children: children
9572
- });
9573
- });
9574
- ListSubheader.displayName = COMPONENT_NAME$Z;
9575
- ListSubheader.className = CLASSNAME$Y;
9338
+ ListSection.defaultProps = DEFAULT_PROPS$T;
9576
9339
 
9577
9340
  /**
9578
9341
  * Props for Combobox.Section component.
@@ -9620,21 +9383,21 @@ const ComboboxSection = forwardRef((props, ref) => {
9620
9383
  ListSection
9621
9384
  });
9622
9385
  });
9623
- ComboboxSection.displayName = COMPONENT_NAME$10;
9624
- ComboboxSection.className = CLASSNAME$$;
9386
+ ComboboxSection.displayName = COMPONENT_NAME$$;
9387
+ ComboboxSection.className = CLASSNAME$_;
9625
9388
 
9626
9389
  /**
9627
9390
  * Component display name.
9628
9391
  */
9629
- const COMPONENT_NAME$Y = 'ComboboxState';
9392
+ const COMPONENT_NAME$Z = 'ComboboxState';
9630
9393
 
9631
9394
  /**
9632
9395
  * Component default class name and class prefix.
9633
9396
  */
9634
- const CLASSNAME$X = 'lumx-combobox-state';
9397
+ const CLASSNAME$Y = 'lumx-combobox-state';
9635
9398
  const {
9636
- block: block$N
9637
- } = bem(CLASSNAME$X);
9399
+ block: block$M
9400
+ } = bem(CLASSNAME$Y);
9638
9401
 
9639
9402
  /**
9640
9403
  * Defines the props for the core ComboboxState template.
@@ -9689,7 +9452,7 @@ const ComboboxState$1 = (props, {
9689
9452
  // the popover's closeMode="hide") and revealing it doesn't trigger announcements.
9690
9453
  const renderContent = isOpen;
9691
9454
  return /*#__PURE__*/jsxs(GenericBlock, {
9692
- className: classnames(!show && visuallyHidden(), block$N(), padding('regular')),
9455
+ className: classnames(!show && visuallyHidden(), block$M(), padding('regular')),
9693
9456
  orientation: "vertical",
9694
9457
  ...alignProps,
9695
9458
  role: "status",
@@ -9796,21 +9559,21 @@ function partitionMulti(elements, predicates) {
9796
9559
  /**
9797
9560
  * Component display name.
9798
9561
  */
9799
- const COMPONENT_NAME$X = 'GenericBlock';
9562
+ const COMPONENT_NAME$Y = 'GenericBlock';
9800
9563
 
9801
9564
  /**
9802
9565
  * Component default class name and class prefix.
9803
9566
  */
9804
- const CLASSNAME$W = 'lumx-generic-block';
9567
+ const CLASSNAME$X = 'lumx-generic-block';
9805
9568
  const {
9806
- block: block$M,
9569
+ block: block$L,
9807
9570
  element: element$C
9808
- } = bem(CLASSNAME$W);
9571
+ } = bem(CLASSNAME$X);
9809
9572
 
9810
9573
  /**
9811
9574
  * Component default props.
9812
9575
  */
9813
- const DEFAULT_PROPS$R = {
9576
+ const DEFAULT_PROPS$S = {
9814
9577
  gap: Size.big,
9815
9578
  orientation: Orientation.horizontal
9816
9579
  };
@@ -9834,17 +9597,17 @@ const GenericBlock$1 = props => {
9834
9597
  children,
9835
9598
  actions,
9836
9599
  actionsProps,
9837
- gap = DEFAULT_PROPS$R.gap,
9600
+ gap = DEFAULT_PROPS$S.gap,
9838
9601
  ref,
9839
9602
  content,
9840
- orientation = DEFAULT_PROPS$R.orientation,
9603
+ orientation = DEFAULT_PROPS$S.orientation,
9841
9604
  contentProps,
9842
9605
  FlexBox,
9843
9606
  ...forwardedProps
9844
9607
  } = props;
9845
9608
  return /*#__PURE__*/jsxs(FlexBox, {
9846
9609
  ref: ref,
9847
- className: classnames(className, block$M()),
9610
+ className: classnames(className, block$L()),
9848
9611
  gap: gap,
9849
9612
  orientation: orientation,
9850
9613
  ...forwardedProps,
@@ -9947,9 +9710,9 @@ const BaseGenericBlock = forwardRef((props, ref) => {
9947
9710
  }) : undefined
9948
9711
  });
9949
9712
  });
9950
- BaseGenericBlock.displayName = COMPONENT_NAME$X;
9951
- BaseGenericBlock.className = CLASSNAME$W;
9952
- BaseGenericBlock.defaultProps = DEFAULT_PROPS$R;
9713
+ BaseGenericBlock.displayName = COMPONENT_NAME$Y;
9714
+ BaseGenericBlock.className = CLASSNAME$X;
9715
+ BaseGenericBlock.defaultProps = DEFAULT_PROPS$S;
9953
9716
  const GenericBlock = Object.assign(BaseGenericBlock, {
9954
9717
  Figure,
9955
9718
  Content,
@@ -10096,19 +9859,80 @@ const ComboboxState = props => {
10096
9859
  isOpen
10097
9860
  };
10098
9861
 
10099
- // Only pass loadingMessage to core after the 500ms debounce threshold
10100
- const loadingMessage = shouldAnnounce ? props.loadingMessage : undefined;
10101
- return ComboboxState$1({
9862
+ // Only pass loadingMessage to core after the 500ms debounce threshold
9863
+ const loadingMessage = shouldAnnounce ? props.loadingMessage : undefined;
9864
+ return ComboboxState$1({
9865
+ ...props,
9866
+ loadingMessage,
9867
+ state
9868
+ }, {
9869
+ GenericBlock,
9870
+ Text
9871
+ });
9872
+ };
9873
+ ComboboxState.displayName = COMPONENT_NAME$Z;
9874
+ ComboboxState.className = CLASSNAME$Y;
9875
+
9876
+ /**
9877
+ * Component display name.
9878
+ */
9879
+ const COMPONENT_NAME$X = 'ListDivider';
9880
+
9881
+ /**
9882
+ * Component default class name and class prefix.
9883
+ */
9884
+ const CLASSNAME$W = 'lumx-list-divider';
9885
+
9886
+ /**
9887
+ * Component default props.
9888
+ */
9889
+ const DEFAULT_PROPS$R = {};
9890
+
9891
+ /**
9892
+ * ListDivider component.
9893
+ * Purely decorative, consider a `ListSection` with label for a better list structure.
9894
+ *
9895
+ * @param props Component props.
9896
+ * @return JSX element.
9897
+ */
9898
+ const ListDivider$1 = props => {
9899
+ const {
9900
+ className,
9901
+ ref,
9902
+ ...forwardedProps
9903
+ } = props;
9904
+ return /*#__PURE__*/jsx("li", {
9905
+ ref: ref,
9906
+ role: "none",
9907
+ ...forwardedProps,
9908
+ className: classnames(className, CLASSNAME$W)
9909
+ });
9910
+ };
9911
+ ListDivider$1.displayName = COMPONENT_NAME$X;
9912
+ ListDivider$1.className = CLASSNAME$W;
9913
+ ListDivider$1.defaultProps = DEFAULT_PROPS$R;
9914
+
9915
+ /**
9916
+ * Defines the props of the component.
9917
+ */
9918
+
9919
+ /**
9920
+ * ListDivider component.
9921
+ * Purely decorative, consider a `ListSection` with label for a better list structure.
9922
+ *
9923
+ * @param props Component props.
9924
+ * @param ref Component ref.
9925
+ * @return React element.
9926
+ */
9927
+ const ListDivider = forwardRef((props, ref) => {
9928
+ return ListDivider$1({
10102
9929
  ...props,
10103
- loadingMessage,
10104
- state
10105
- }, {
10106
- GenericBlock,
10107
- Text
9930
+ ref
10108
9931
  });
10109
- };
10110
- ComboboxState.displayName = COMPONENT_NAME$Y;
10111
- ComboboxState.className = CLASSNAME$X;
9932
+ });
9933
+ ListDivider.displayName = COMPONENT_NAME$X;
9934
+ ListDivider.className = CLASSNAME$W;
9935
+ ListDivider.defaultProps = DEFAULT_PROPS$R;
10112
9936
 
10113
9937
  /**
10114
9938
  * Combobox compound component namespace.
@@ -10164,7 +9988,7 @@ const COMPONENT_NAME$W = 'CommentBlock';
10164
9988
  */
10165
9989
  const CLASSNAME$V = 'lumx-comment-block';
10166
9990
  const {
10167
- block: block$L,
9991
+ block: block$K,
10168
9992
  element: element$B
10169
9993
  } = classNames.bem(CLASSNAME$V);
10170
9994
 
@@ -10207,7 +10031,7 @@ const CommentBlock = forwardRef((props, ref) => {
10207
10031
  const hasChildren = Children.count(children) > 0;
10208
10032
  return /*#__PURE__*/jsxs("div", {
10209
10033
  ref: ref,
10210
- className: classNames.join(className, block$L({
10034
+ className: classNames.join(className, block$K({
10211
10035
  'has-children': hasChildren && isOpen,
10212
10036
  'has-indented-children': hasChildren && variant === CommentBlockVariant.indented,
10213
10037
  'has-linear-children': hasChildren && variant === CommentBlockVariant.linear,
@@ -11166,7 +10990,7 @@ const COMPONENT_NAME$S = 'Dialog';
11166
10990
  */
11167
10991
  const CLASSNAME$T = 'lumx-dialog';
11168
10992
  const {
11169
- block: block$K,
10993
+ block: block$J,
11170
10994
  element: element$z
11171
10995
  } = classNames.bem(CLASSNAME$T);
11172
10996
 
@@ -11282,7 +11106,7 @@ const Dialog = forwardRef((props, ref) => {
11282
11106
  children: /*#__PURE__*/jsxs("div", {
11283
11107
  ref: mergeRefs(rootRef, ref),
11284
11108
  ...forwardedProps,
11285
- className: classNames.join(className, block$K({
11109
+ className: classNames.join(className, block$J({
11286
11110
  'is-hidden': !isOpen,
11287
11111
  'is-loading': isLoading,
11288
11112
  'is-shown': isOpen || isVisible,
@@ -11363,7 +11187,7 @@ const COMPONENT_NAME$R = 'Divider';
11363
11187
  */
11364
11188
  const CLASSNAME$S = 'lumx-divider';
11365
11189
  const {
11366
- block: block$J
11190
+ block: block$I
11367
11191
  } = bem(CLASSNAME$S);
11368
11192
 
11369
11193
  /**
@@ -11382,7 +11206,7 @@ const Divider$1 = props => {
11382
11206
  return /*#__PURE__*/jsx("hr", {
11383
11207
  ref: ref,
11384
11208
  ...forwardedProps,
11385
- className: classnames(className, block$J({
11209
+ className: classnames(className, block$I({
11386
11210
  [`theme-${theme}`]: Boolean(theme)
11387
11211
  }))
11388
11212
  });
@@ -11430,7 +11254,7 @@ const COMPONENT_NAME$Q = 'DragHandle';
11430
11254
  */
11431
11255
  const CLASSNAME$R = 'lumx-drag-handle';
11432
11256
  const {
11433
- block: block$I
11257
+ block: block$H
11434
11258
  } = bem(CLASSNAME$R);
11435
11259
 
11436
11260
  /**
@@ -11449,7 +11273,7 @@ const DragHandle$1 = props => {
11449
11273
  return /*#__PURE__*/jsx("div", {
11450
11274
  ref: ref,
11451
11275
  ...forwardedProps,
11452
- className: classnames(className, block$I({
11276
+ className: classnames(className, block$H({
11453
11277
  [`theme-${theme}`]: Boolean(theme)
11454
11278
  })),
11455
11279
  children: Icon$1({
@@ -11492,6 +11316,205 @@ DragHandle.displayName = COMPONENT_NAME$Q;
11492
11316
  DragHandle.className = CLASSNAME$R;
11493
11317
  DragHandle.defaultProps = DEFAULT_PROPS$N;
11494
11318
 
11319
+ const INITIAL_INDEX = -1;
11320
+
11321
+ /**
11322
+ * This custom hook provides the necessary set of functions and values to properly navigate
11323
+ * a list using the keyboard.
11324
+ *
11325
+ * @param items the list of items that will be navigated using the keyboard.
11326
+ * @param ref A reference to the element that is controlling the navigation.
11327
+ * @param onListItemSelected callback to be executed when the ENTER key is pressed on an item.
11328
+ * @param onListItemNavigated callback to be executed when the Arrow keys are pressed.
11329
+ * @param onEnterPressed callback to be executed when the ENTER key is pressed.
11330
+ * @param onBackspacePressed callback to be executed when the BACKSPACE key is pressed.
11331
+ * @param keepFocusAfterSelection determines whether after selecting an item, the focus should be maintained on the current target or not.
11332
+ * @param initialIndex where should the navigation start from. it defaults to `-1`, so the first item navigated is the item on position `0`.
11333
+ * @param preventTabOnEnteredValue determines whether upon TAB, if there is a value entered, the event is prevented or not.
11334
+ * @return useKeyboardListNavigation helpers.
11335
+ */
11336
+ const useKeyboardListNavigation = (items, ref, onListItemSelected, onListItemNavigated, onEnterPressed, onBackspacePressed, keepFocusAfterSelection = false, initialIndex = INITIAL_INDEX, preventTabOnEnteredValue = true) => {
11337
+ const [activeItemIndex, setActiveItemIndex] = useState(initialIndex);
11338
+
11339
+ /**
11340
+ * This function calculates the next index in the list to be highlighted
11341
+ * @param key - key code pressed
11342
+ * @return next active index
11343
+ */
11344
+ const calculateActiveIndex = key => {
11345
+ switch (key) {
11346
+ case 'ArrowDown':
11347
+ return activeItemIndex + 1 < items.length ? activeItemIndex + 1 : 0;
11348
+ case 'ArrowUp':
11349
+ return activeItemIndex - 1 >= 0 ? activeItemIndex - 1 : items.length - 1;
11350
+ default:
11351
+ return initialIndex;
11352
+ }
11353
+ };
11354
+
11355
+ /**
11356
+ * Resets the active index to the initial state
11357
+ */
11358
+ const resetActiveIndex = () => {
11359
+ setActiveItemIndex(initialIndex);
11360
+ };
11361
+
11362
+ /**
11363
+ * Prevents the default event and stops the propagation of said event
11364
+ * @param evt - key pressed event
11365
+ */
11366
+ const preventDefaultAndStopPropagation = evt => {
11367
+ evt.preventDefault();
11368
+ evt.stopPropagation();
11369
+ };
11370
+
11371
+ /**
11372
+ * Handles navigation with the arrows using the keyboard
11373
+ * @param evt - key pressed event
11374
+ */
11375
+ const onArrowPressed = evt => {
11376
+ const {
11377
+ key
11378
+ } = evt;
11379
+ const nextActiveIndex = calculateActiveIndex(key);
11380
+ setActiveItemIndex(nextActiveIndex);
11381
+ preventDefaultAndStopPropagation(evt);
11382
+ if (onListItemNavigated) {
11383
+ const selectedItem = items[nextActiveIndex];
11384
+ onListItemNavigated(selectedItem);
11385
+ }
11386
+ };
11387
+
11388
+ /**
11389
+ * Handles the event when the backspace key is pressed
11390
+ * @param evt - key pressed event
11391
+ */
11392
+ const onBackspaceKeyPressed = evt => {
11393
+ if (onBackspacePressed) {
11394
+ onBackspacePressed(evt);
11395
+ }
11396
+ };
11397
+
11398
+ /**
11399
+ * Handles when the ENTER key is pressed
11400
+ * @param evt - key pressed event
11401
+ */
11402
+ const onEnterKeyPressed = evt => {
11403
+ if (!onListItemSelected) {
11404
+ return;
11405
+ }
11406
+ preventDefaultAndStopPropagation(evt);
11407
+ if (!keepFocusAfterSelection) {
11408
+ evt.currentTarget.blur();
11409
+ }
11410
+ const selectedItem = items[activeItemIndex];
11411
+ if (selectedItem) {
11412
+ onListItemSelected(selectedItem);
11413
+ resetActiveIndex();
11414
+ } else if (activeItemIndex === initialIndex && onEnterPressed) {
11415
+ const value = get(evt, 'target.value');
11416
+ onEnterPressed(value);
11417
+ resetActiveIndex();
11418
+ }
11419
+ };
11420
+
11421
+ /**
11422
+ * Handles when the TAB key is pressed
11423
+ * @param evt - key pressed event
11424
+ */
11425
+ const onTabKeyPressed = evt => {
11426
+ const value = get(evt, 'target.value');
11427
+ if (preventTabOnEnteredValue && value && value.length > 0) {
11428
+ preventDefaultAndStopPropagation(evt);
11429
+ }
11430
+ };
11431
+
11432
+ /**
11433
+ * In order to make it easier in the future to add new events depending on the key
11434
+ * a map was created to add these handlers. In the future, if there is another event
11435
+ * that we need to manage depending on a specific key, we just need to add the key code
11436
+ * here, and as a value, the handler for said key.
11437
+ */
11438
+ const eventsForKeyPressed = {
11439
+ ArrowDown: onArrowPressed,
11440
+ Tab: onTabKeyPressed,
11441
+ ArrowUp: onArrowPressed,
11442
+ Enter: onEnterKeyPressed,
11443
+ Backspace: onBackspaceKeyPressed
11444
+ };
11445
+
11446
+ /**
11447
+ * Calculates the next active item index depending on the key pressed.
11448
+ * If the key pressed was ENTER, the function executes the callback `onListItemSelected`
11449
+ * and resets the active index, since an item was selected.
11450
+ * @param evt - key pressed or key down event
11451
+ */
11452
+ const onKeyboardNavigation = evt => {
11453
+ const {
11454
+ key
11455
+ } = evt;
11456
+ const handler = eventsForKeyPressed[key];
11457
+ if (handler) {
11458
+ handler(evt);
11459
+ }
11460
+ };
11461
+ useEffect(() => {
11462
+ const {
11463
+ current: currentElement
11464
+ } = ref;
11465
+ if (!currentElement) {
11466
+ return undefined;
11467
+ }
11468
+ currentElement.addEventListener('focus', resetActiveIndex);
11469
+ currentElement.addEventListener('keydown', onKeyboardNavigation);
11470
+ return () => {
11471
+ currentElement.removeEventListener('focus', resetActiveIndex);
11472
+ currentElement.removeEventListener('keydown', onKeyboardNavigation);
11473
+ };
11474
+ });
11475
+ return {
11476
+ activeItemIndex,
11477
+ onKeyboardNavigation,
11478
+ resetActiveIndex,
11479
+ setActiveItemIndex
11480
+ };
11481
+ };
11482
+
11483
+ /**
11484
+ * Defines the props of the component.
11485
+ */
11486
+
11487
+ /* eslint-disable jsx-a11y/no-noninteractive-tabindex */
11488
+ /**
11489
+ * List component.
11490
+ *
11491
+ * @param props Component props.
11492
+ * @param ref Component ref.
11493
+ * @return React element.
11494
+ */
11495
+ const InternalList = forwardRef((props, ref) => {
11496
+ const {
11497
+ children,
11498
+ isClickable,
11499
+ onListItemSelected,
11500
+ itemPadding,
11501
+ ...forwardedProps
11502
+ } = props;
11503
+ const adjustedItemPadding = itemPadding ?? (isClickable ? Size$1.big : undefined);
11504
+ return List$1({
11505
+ ...forwardedProps,
11506
+ ref,
11507
+ children,
11508
+ itemPadding: adjustedItemPadding
11509
+ });
11510
+ });
11511
+ InternalList.displayName = COMPONENT_NAME$1c;
11512
+ InternalList.className = CLASSNAME$1b;
11513
+ InternalList.defaultProps = DEFAULT_PROPS$Y;
11514
+ const List = Object.assign(InternalList, {
11515
+ useKeyboardListNavigation
11516
+ });
11517
+
11495
11518
  // The error margin in px we want to have for triggering infinite scroll
11496
11519
  const SCROLL_TRIGGER_MARGIN = 5;
11497
11520
 
@@ -11543,7 +11566,7 @@ const COMPONENT_NAME$P = 'Dropdown';
11543
11566
  */
11544
11567
  const CLASSNAME$Q = 'lumx-dropdown';
11545
11568
  const {
11546
- block: block$H,
11569
+ block: block$G,
11547
11570
  element: element$y
11548
11571
  } = classNames.bem(CLASSNAME$Q);
11549
11572
 
@@ -11609,7 +11632,7 @@ const Dropdown = forwardRef((props, ref) => {
11609
11632
  ...forwardedProps,
11610
11633
  focusAnchorOnClose: focusAnchorOnClose,
11611
11634
  anchorRef: anchorRef,
11612
- className: classNames.join(className, block$H()),
11635
+ className: classNames.join(className, block$G()),
11613
11636
  elevation: 0,
11614
11637
  closeOnClickAway: closeOnClickAway,
11615
11638
  closeOnEscape: closeOnEscape,
@@ -11642,9 +11665,9 @@ const COMPONENT_NAME$O = 'ExpansionPanel';
11642
11665
  */
11643
11666
  const CLASSNAME$P = 'lumx-expansion-panel';
11644
11667
  const {
11645
- block: block$G,
11668
+ block: block$F,
11646
11669
  element: element$x
11647
- } = classNames.bem(CLASSNAME$P);
11670
+ } = bem(CLASSNAME$P);
11648
11671
 
11649
11672
  /**
11650
11673
  * Component default props.
@@ -11652,6 +11675,102 @@ const {
11652
11675
  const DEFAULT_PROPS$L = {
11653
11676
  closeMode: 'unmount'
11654
11677
  };
11678
+
11679
+ /**
11680
+ * ExpansionPanel component.
11681
+ *
11682
+ * @param props Component props.
11683
+ * @param ref Component ref.
11684
+ * @return React element.
11685
+ */
11686
+ const ExpansionPanel$1 = props => {
11687
+ const {
11688
+ className,
11689
+ children: anyChildren,
11690
+ hasBackground,
11691
+ ref,
11692
+ hasHeaderDivider,
11693
+ isOpen,
11694
+ label,
11695
+ handleClose,
11696
+ handleOpen,
11697
+ handleToggleOpen,
11698
+ theme,
11699
+ toggleButtonProps,
11700
+ headerProps,
11701
+ headerContent,
11702
+ dragHandle,
11703
+ wrapperRef,
11704
+ content,
11705
+ isChildrenVisible,
11706
+ IconButton,
11707
+ footer,
11708
+ closeMode,
11709
+ ...forwardedProps
11710
+ } = props;
11711
+ const toggleOpen = event => {
11712
+ const shouldOpen = !isOpen;
11713
+ if (handleOpen && shouldOpen) {
11714
+ handleOpen(event);
11715
+ }
11716
+ if (handleClose && !shouldOpen) {
11717
+ handleClose(event);
11718
+ }
11719
+ if (handleToggleOpen) {
11720
+ handleToggleOpen(shouldOpen, event);
11721
+ }
11722
+ };
11723
+ const color = theme === Theme.dark ? ColorPalette.light : ColorPalette.dark;
11724
+ const rootClassName = classnames(className, block$F({
11725
+ 'has-background': hasBackground,
11726
+ 'has-header': Boolean(!isEmpty(headerProps.children)),
11727
+ 'has-header-divider': hasHeaderDivider,
11728
+ 'is-close': !isOpen,
11729
+ 'is-draggable': Boolean(dragHandle),
11730
+ 'is-open': isOpen,
11731
+ [`theme-${theme}`]: Boolean(theme)
11732
+ }));
11733
+ return /*#__PURE__*/jsxs("section", {
11734
+ ref: ref,
11735
+ ...forwardedProps,
11736
+ className: rootClassName,
11737
+ children: [/*#__PURE__*/jsxs("header", {
11738
+ className: element$x('header'),
11739
+ onClick: toggleOpen,
11740
+ children: [dragHandle && /*#__PURE__*/jsx("div", {
11741
+ className: element$x('header-drag'),
11742
+ children: dragHandle
11743
+ }), /*#__PURE__*/jsx("div", {
11744
+ ...headerProps,
11745
+ className: element$x('header-content'),
11746
+ children: headerContent
11747
+ }), /*#__PURE__*/jsx("div", {
11748
+ className: element$x('header-toggle'),
11749
+ children: /*#__PURE__*/jsx(IconButton, {
11750
+ ...toggleButtonProps,
11751
+ color: color,
11752
+ emphasis: Emphasis.low,
11753
+ icon: isOpen ? mdiChevronUp : mdiChevronDown,
11754
+ "aria-expanded": isOpen || 'false'
11755
+ })
11756
+ })]
11757
+ }), /*#__PURE__*/jsx("div", {
11758
+ className: element$x('wrapper'),
11759
+ ref: wrapperRef,
11760
+ children: (isOpen || isChildrenVisible) && /*#__PURE__*/jsxs("div", {
11761
+ className: element$x('container'),
11762
+ children: [/*#__PURE__*/jsx("div", {
11763
+ className: element$x('content'),
11764
+ children: content
11765
+ }), footer && /*#__PURE__*/jsx("div", {
11766
+ className: element$x('footer'),
11767
+ children: footer
11768
+ })]
11769
+ })
11770
+ })]
11771
+ });
11772
+ };
11773
+
11655
11774
  const isDragHandle = isComponent(DragHandle);
11656
11775
  const isHeader = isComponent('header');
11657
11776
  const isFooter = isComponent('footer');
@@ -11666,18 +11785,14 @@ const isFooter = isComponent('footer');
11666
11785
  const ExpansionPanel = forwardRef((props, ref) => {
11667
11786
  const defaultTheme = useTheme() || Theme$1.light;
11668
11787
  const {
11669
- className,
11670
11788
  closeMode = DEFAULT_PROPS$L.closeMode,
11671
11789
  children: anyChildren,
11672
- hasBackground,
11673
- hasHeaderDivider,
11674
11790
  isOpen,
11675
11791
  label,
11676
11792
  onClose,
11677
11793
  onOpen,
11678
11794
  onToggleOpen,
11679
11795
  theme = defaultTheme,
11680
- toggleButtonProps,
11681
11796
  ...forwardedProps
11682
11797
  } = props;
11683
11798
  const children = Children.toArray(anyChildren);
@@ -11691,28 +11806,6 @@ const ExpansionPanel = forwardRef((props, ref) => {
11691
11806
  className: element$x('label'),
11692
11807
  children: label
11693
11808
  });
11694
- const toggleOpen = event => {
11695
- const shouldOpen = !isOpen;
11696
- if (onOpen && shouldOpen) {
11697
- onOpen(event);
11698
- }
11699
- if (onClose && !shouldOpen) {
11700
- onClose(event);
11701
- }
11702
- if (onToggleOpen) {
11703
- onToggleOpen(shouldOpen, event);
11704
- }
11705
- };
11706
- const color = theme === Theme$1.dark ? ColorPalette$1.light : ColorPalette$1.dark;
11707
- const rootClassName = classNames.join(className, block$G({
11708
- 'has-background': hasBackground,
11709
- 'has-header': Boolean(!isEmpty(headerProps.children)),
11710
- 'has-header-divider': hasHeaderDivider,
11711
- 'is-close': !isOpen,
11712
- 'is-draggable': Boolean(dragHandle),
11713
- 'is-open': isOpen,
11714
- [`theme-${theme}`]: Boolean(theme)
11715
- }));
11716
11809
  const wrapperRef = useRef(null);
11717
11810
 
11718
11811
  // Children stay visible while the open/close transition is running
@@ -11742,44 +11835,25 @@ const ExpansionPanel = forwardRef((props, ref) => {
11742
11835
  wrapper.addEventListener('transitionend', onTransitionEnd);
11743
11836
  return () => wrapper.removeEventListener('transitionend', onTransitionEnd);
11744
11837
  }, [closeMode]);
11745
- return /*#__PURE__*/jsxs("section", {
11746
- ref: ref,
11747
- ...forwardedProps,
11748
- className: rootClassName,
11749
- children: [/*#__PURE__*/jsxs("header", {
11750
- className: element$x('header'),
11751
- onClick: toggleOpen,
11752
- children: [dragHandle && /*#__PURE__*/jsx("div", {
11753
- className: element$x('header-drag'),
11754
- children: dragHandle
11755
- }), /*#__PURE__*/jsx("div", {
11756
- ...headerProps,
11757
- className: element$x('header-content'),
11758
- children: headerContent
11759
- }), /*#__PURE__*/jsx("div", {
11760
- className: element$x('header-toggle'),
11761
- children: /*#__PURE__*/jsx(IconButton, {
11762
- ...toggleButtonProps,
11763
- color: color,
11764
- emphasis: Emphasis$1.low,
11765
- icon: isOpen ? mdiChevronUp : mdiChevronDown,
11766
- "aria-expanded": isOpen || 'false'
11767
- })
11768
- })]
11769
- }), /*#__PURE__*/jsx("div", {
11770
- className: element$x('wrapper'),
11771
- ref: wrapperRef,
11772
- children: (isOpen || isChildrenVisible) && /*#__PURE__*/jsxs("div", {
11773
- className: element$x('container'),
11774
- children: [/*#__PURE__*/jsx("div", {
11775
- className: element$x('content'),
11776
- children: content
11777
- }), footer && /*#__PURE__*/jsx("div", {
11778
- className: element$x('footer'),
11779
- children: footer
11780
- })]
11781
- })
11782
- })]
11838
+ return ExpansionPanel$1({
11839
+ content,
11840
+ dragHandle,
11841
+ footer,
11842
+ headerContent,
11843
+ ref,
11844
+ headerProps,
11845
+ wrapperRef,
11846
+ IconButton,
11847
+ isOpen,
11848
+ handleClose: onClose,
11849
+ handleToggleOpen: onToggleOpen,
11850
+ handleOpen: onOpen,
11851
+ theme,
11852
+ isChildrenVisible,
11853
+ children,
11854
+ closeMode,
11855
+ label,
11856
+ ...forwardedProps
11783
11857
  });
11784
11858
  });
11785
11859
  ExpansionPanel.displayName = COMPONENT_NAME$O;
@@ -11790,7 +11864,7 @@ const COMPONENT_NAME$N = 'Flag';
11790
11864
  const CLASSNAME$O = 'lumx-flag';
11791
11865
  const DEFAULT_PROPS$K = {};
11792
11866
  const {
11793
- block: block$F,
11867
+ block: block$E,
11794
11868
  element: element$w
11795
11869
  } = bem(CLASSNAME$O);
11796
11870
 
@@ -11815,7 +11889,7 @@ const Flag$1 = props => {
11815
11889
  const isTruncated = !!truncate;
11816
11890
  return /*#__PURE__*/jsxs("div", {
11817
11891
  ...forwardedProps,
11818
- className: classnames(className, block$F({
11892
+ className: classnames(className, block$E({
11819
11893
  [`color-${flagColor}`]: Boolean(flagColor),
11820
11894
  'is-truncated': isTruncated
11821
11895
  })),
@@ -11854,80 +11928,6 @@ Flag.displayName = COMPONENT_NAME$N;
11854
11928
  Flag.className = CLASSNAME$O;
11855
11929
  Flag.defaultProps = DEFAULT_PROPS$K;
11856
11930
 
11857
- /**
11858
- * Defines the props of the component.
11859
- */
11860
-
11861
- /**
11862
- * Component display name.
11863
- */
11864
- const COMPONENT_NAME$M = 'FlexBox';
11865
-
11866
- /**
11867
- * Component default class name and class prefix.
11868
- */
11869
- const CLASSNAME$N = 'lumx-flex-box';
11870
- const {
11871
- block: block$E
11872
- } = bem(CLASSNAME$N);
11873
-
11874
- /**
11875
- * Get FlexBox component props (className computation).
11876
- *
11877
- * @param props Component props.
11878
- * @return Computed props with className.
11879
- */
11880
- function getFlexBoxProps(props) {
11881
- const {
11882
- className,
11883
- fillSpace,
11884
- gap,
11885
- hAlign,
11886
- marginAuto,
11887
- noShrink,
11888
- vAlign,
11889
- wrap,
11890
- orientation,
11891
- ...forwardedProps
11892
- } = props;
11893
- const adjustedOrientation = orientation ?? (wrap || hAlign || vAlign ? Orientation.horizontal : null);
11894
- return {
11895
- ...forwardedProps,
11896
- className: classnames(className, block$E({
11897
- [`orientation-${adjustedOrientation}`]: Boolean(adjustedOrientation),
11898
- [`v-align-${vAlign}`]: Boolean(vAlign),
11899
- [`h-align-${hAlign}`]: Boolean(hAlign),
11900
- [`gap-${gap}`]: Boolean(gap),
11901
- wrap: Boolean(wrap),
11902
- 'fill-space': fillSpace,
11903
- 'no-shrink': noShrink,
11904
- ...Object.fromEntries(castArray(marginAuto).filter(Boolean).map(align => [`margin-auto-${align}`, true]))
11905
- }))
11906
- };
11907
- }
11908
-
11909
- /**
11910
- * FlexBox component.
11911
- *
11912
- * @param props Component props.
11913
- * @param ref Component ref.
11914
- * @return React element.
11915
- */
11916
- const FlexBox = forwardRef((props, ref) => {
11917
- const {
11918
- as: Component = 'div',
11919
- children,
11920
- ...forwardedProps
11921
- } = props;
11922
- return /*#__PURE__*/jsx(Component, {
11923
- ref: ref,
11924
- ...getFlexBoxProps(forwardedProps),
11925
- children: children
11926
- });
11927
- });
11928
- FlexBox.displayName = COMPONENT_NAME$M;
11929
- FlexBox.className = CLASSNAME$N;
11930
-
11931
11931
  /** The maximum authorized heading level. */
11932
11932
  const MAX_HEADING_LEVEL = 6;
11933
11933
 
@@ -11954,12 +11954,12 @@ const defaultContext = {
11954
11954
  /**
11955
11955
  * Component display name.
11956
11956
  */
11957
- const COMPONENT_NAME$L = 'Heading';
11957
+ const COMPONENT_NAME$M = 'Heading';
11958
11958
 
11959
11959
  /**
11960
11960
  * Component default class name and class prefix.
11961
11961
  */
11962
- const CLASSNAME$M = 'lumx-heading';
11962
+ const CLASSNAME$N = 'lumx-heading';
11963
11963
 
11964
11964
  /**
11965
11965
  * Component default props.
@@ -11984,7 +11984,7 @@ const getHeadingProps = (props, contextHeadingElement) => {
11984
11984
  return {
11985
11985
  ...otherProps,
11986
11986
  as: computedHeadingElement,
11987
- className: classnames(className, CLASSNAME$M),
11987
+ className: classnames(className, CLASSNAME$N),
11988
11988
  typography: typography || DEFAULT_TYPOGRAPHY_BY_LEVEL[computedHeadingElement]
11989
11989
  };
11990
11990
  };
@@ -12022,8 +12022,8 @@ const Heading = forwardRef((props, ref) => {
12022
12022
  children: children
12023
12023
  });
12024
12024
  });
12025
- Heading.displayName = COMPONENT_NAME$L;
12026
- Heading.className = CLASSNAME$M;
12025
+ Heading.displayName = COMPONENT_NAME$M;
12026
+ Heading.className = CLASSNAME$N;
12027
12027
  Heading.defaultProps = DEFAULT_PROPS$J;
12028
12028
 
12029
12029
  /**
@@ -12062,15 +12062,15 @@ const HeadingLevelProvider = ({
12062
12062
  /**
12063
12063
  * Component display name.
12064
12064
  */
12065
- const COMPONENT_NAME$K = 'Grid';
12065
+ const COMPONENT_NAME$L = 'Grid';
12066
12066
 
12067
12067
  /**
12068
12068
  * Component default class name and class prefix.
12069
12069
  */
12070
- const CLASSNAME$L = 'lumx-grid';
12070
+ const CLASSNAME$M = 'lumx-grid';
12071
12071
  const {
12072
12072
  block: block$D
12073
- } = classNames.bem(CLASSNAME$L);
12073
+ } = classNames.bem(CLASSNAME$M);
12074
12074
 
12075
12075
  /**
12076
12076
  * Component default props.
@@ -12101,7 +12101,7 @@ const Grid = forwardRef((props, ref) => {
12101
12101
  return /*#__PURE__*/jsx("div", {
12102
12102
  ref: ref,
12103
12103
  ...forwardedProps,
12104
- className: classNames.join(className, classNames.bem(`${CLASSNAME$L}-container`).block(), block$D({
12104
+ className: classNames.join(className, classNames.bem(`${CLASSNAME$M}-container`).block(), block$D({
12105
12105
  [`h-align-${hAlign}`]: Boolean(hAlign),
12106
12106
  [`v-align-${vAlign}`]: Boolean(vAlign),
12107
12107
  [`orientation-${orientation}`]: Boolean(orientation),
@@ -12111,22 +12111,22 @@ const Grid = forwardRef((props, ref) => {
12111
12111
  children: children
12112
12112
  });
12113
12113
  });
12114
- Grid.displayName = COMPONENT_NAME$K;
12115
- Grid.className = CLASSNAME$L;
12114
+ Grid.displayName = COMPONENT_NAME$L;
12115
+ Grid.className = CLASSNAME$M;
12116
12116
  Grid.defaultProps = DEFAULT_PROPS$I;
12117
12117
 
12118
12118
  /**
12119
12119
  * Component display name.
12120
12120
  */
12121
- const COMPONENT_NAME$J = 'GridItem';
12121
+ const COMPONENT_NAME$K = 'GridItem';
12122
12122
 
12123
12123
  /**
12124
12124
  * Component default class name and class prefix.
12125
12125
  */
12126
- const CLASSNAME$K = 'lumx-grid-item';
12126
+ const CLASSNAME$L = 'lumx-grid-item';
12127
12127
  const {
12128
12128
  block: block$C
12129
- } = classNames.bem(CLASSNAME$K);
12129
+ } = classNames.bem(CLASSNAME$L);
12130
12130
 
12131
12131
  /**
12132
12132
  * GridItem component.
@@ -12155,18 +12155,18 @@ const GridItem = forwardRef((props, ref) => {
12155
12155
  children: children
12156
12156
  });
12157
12157
  });
12158
- GridItem.displayName = COMPONENT_NAME$J;
12159
- GridItem.className = CLASSNAME$K;
12158
+ GridItem.displayName = COMPONENT_NAME$K;
12159
+ GridItem.className = CLASSNAME$L;
12160
12160
 
12161
12161
  /**
12162
12162
  * Component display name.
12163
12163
  */
12164
- const COMPONENT_NAME$I = 'GridColumn';
12164
+ const COMPONENT_NAME$J = 'GridColumn';
12165
12165
 
12166
12166
  /**
12167
12167
  * Component default class name and class prefix.
12168
12168
  */
12169
- const CLASSNAME$J = 'lumx-grid-column';
12169
+ const CLASSNAME$K = 'lumx-grid-column';
12170
12170
 
12171
12171
  /**
12172
12172
  * Component default props.
@@ -12196,7 +12196,7 @@ const GridColumn$1 = props => {
12196
12196
  return /*#__PURE__*/jsx(Component, {
12197
12197
  ...forwardedProps,
12198
12198
  ref: ref,
12199
- className: classnames(className, CLASSNAME$J),
12199
+ className: classnames(className, CLASSNAME$K),
12200
12200
  style: {
12201
12201
  ...style,
12202
12202
  ['--lumx-grid-column-item-min-width']: isInteger(itemMinWidth) && `${itemMinWidth}px`,
@@ -12206,8 +12206,8 @@ const GridColumn$1 = props => {
12206
12206
  children: children
12207
12207
  });
12208
12208
  };
12209
- GridColumn$1.displayName = COMPONENT_NAME$I;
12210
- GridColumn$1.className = CLASSNAME$J;
12209
+ GridColumn$1.displayName = COMPONENT_NAME$J;
12210
+ GridColumn$1.className = CLASSNAME$K;
12211
12211
  GridColumn$1.defaultProps = DEFAULT_PROPS$H;
12212
12212
 
12213
12213
  /**
@@ -12236,8 +12236,8 @@ const GridColumn = forwardRef((props, ref) => {
12236
12236
  ...props
12237
12237
  });
12238
12238
  });
12239
- GridColumn.displayName = COMPONENT_NAME$I;
12240
- GridColumn.className = CLASSNAME$J;
12239
+ GridColumn.displayName = COMPONENT_NAME$J;
12240
+ GridColumn.className = CLASSNAME$K;
12241
12241
  GridColumn.defaultProps = DEFAULT_PROPS$G;
12242
12242
 
12243
12243
  /**
@@ -12257,75 +12257,11 @@ const Icon = forwardRef((props, ref) => {
12257
12257
  });
12258
12258
  Icon.displayName = Icon$1.displayName;
12259
12259
  Icon.className = Icon$1.className;
12260
- Icon.defaultProps = Icon$1.defaultProps;
12261
-
12262
- /** Internal component used to render image captions */
12263
- const ImageCaption = props => {
12264
- const defaultTheme = useTheme();
12265
- const {
12266
- baseClassName,
12267
- theme = defaultTheme,
12268
- as = 'figcaption',
12269
- title,
12270
- titleProps,
12271
- description,
12272
- descriptionProps,
12273
- tags,
12274
- captionStyle,
12275
- align,
12276
- truncate
12277
- } = props;
12278
- if (!title && !description && !tags) return null;
12279
- const titleColor = {
12280
- color: theme === 'dark' ? 'light' : 'dark'
12281
- };
12282
- const baseColor = {
12283
- color: theme === 'dark' ? 'light' : 'dark',
12284
- colorVariant: 'L2'
12285
- };
12286
-
12287
- // Display description as string or HTML
12288
- const descriptionContent = typeof description === 'string' ? {
12289
- children: description
12290
- } : {
12291
- dangerouslySetInnerHTML: description
12292
- };
12293
- return /*#__PURE__*/jsxs(FlexBox, {
12294
- as: as,
12295
- className: classNames.join(baseClassName && `${baseClassName}__wrapper`),
12296
- style: captionStyle,
12297
- orientation: "vertical",
12298
- vAlign: align,
12299
- hAlign: align === 'center' ? align : undefined,
12300
- gap: "regular",
12301
- children: [(title || description) && /*#__PURE__*/jsxs(Text, {
12302
- as: "p",
12303
- className: classNames.join(baseClassName && `${baseClassName}__caption`),
12304
- truncate: truncate,
12305
- ...baseColor,
12306
- children: [title && /*#__PURE__*/jsx(Text, {
12307
- ...titleProps,
12308
- as: "span",
12309
- className: classNames.join(titleProps?.className, baseClassName && `${baseClassName}__title`),
12310
- typography: "subtitle1",
12311
- ...titleColor,
12312
- children: title
12313
- }), ' ', description && /*#__PURE__*/jsx(Text, {
12314
- ...descriptionProps,
12315
- as: "span",
12316
- className: classNames.join(descriptionProps?.className, baseClassName && `${baseClassName}__description`),
12317
- typography: "body1",
12318
- ...descriptionContent
12319
- })]
12320
- }), tags && /*#__PURE__*/jsx(FlexBox, {
12321
- className: classNames.join(baseClassName && `${baseClassName}__tags`),
12322
- orientation: "horizontal",
12323
- vAlign: align,
12324
- children: tags
12325
- })]
12326
- });
12327
- };
12260
+ Icon.defaultProps = Icon$1.defaultProps;
12328
12261
 
12262
+ /**
12263
+ * Image block variants.
12264
+ */
12329
12265
  const ImageBlockCaptionPosition = {
12330
12266
  below: 'below',
12331
12267
  over: 'over'
@@ -12342,23 +12278,23 @@ const ImageBlockCaptionPosition = {
12342
12278
  /**
12343
12279
  * Component display name.
12344
12280
  */
12345
- const COMPONENT_NAME$H = 'ImageBlock';
12281
+ const COMPONENT_NAME$I = 'ImageBlock';
12346
12282
 
12347
12283
  /**
12348
12284
  * Component default class name and class prefix.
12349
12285
  */
12350
- const CLASSNAME$I = 'lumx-image-block';
12286
+ const CLASSNAME$J = 'lumx-image-block';
12351
12287
  const {
12352
12288
  block: block$B,
12353
12289
  element: element$v
12354
- } = classNames.bem(CLASSNAME$I);
12290
+ } = bem(CLASSNAME$J);
12355
12291
 
12356
12292
  /**
12357
12293
  * Component default props.
12358
12294
  */
12359
12295
  const DEFAULT_PROPS$F = {
12360
12296
  captionPosition: ImageBlockCaptionPosition.below,
12361
- align: Alignment$1.left
12297
+ align: Alignment.left
12362
12298
  };
12363
12299
 
12364
12300
  /**
@@ -12368,8 +12304,7 @@ const DEFAULT_PROPS$F = {
12368
12304
  * @param ref Component ref.
12369
12305
  * @return React element.
12370
12306
  */
12371
- const ImageBlock = forwardRef((props, ref) => {
12372
- const defaultTheme = useTheme() || Theme$1.light;
12307
+ const ImageBlock$1 = props => {
12373
12308
  const {
12374
12309
  actions,
12375
12310
  align = DEFAULT_PROPS$F.align,
@@ -12383,16 +12318,19 @@ const ImageBlock = forwardRef((props, ref) => {
12383
12318
  image,
12384
12319
  size,
12385
12320
  tags,
12386
- theme = defaultTheme,
12321
+ ref,
12322
+ theme,
12387
12323
  thumbnailProps,
12388
12324
  title,
12389
12325
  titleProps,
12326
+ Thumbnail,
12327
+ ImageCaption,
12390
12328
  ...forwardedProps
12391
12329
  } = props;
12392
12330
  return /*#__PURE__*/jsxs("figure", {
12393
12331
  ref: ref,
12394
12332
  ...forwardedProps,
12395
- className: classNames.join(className, block$B({
12333
+ className: classnames(className, block$B({
12396
12334
  [`caption-position-${captionPosition}`]: Boolean(captionPosition),
12397
12335
  [`align-${align}`]: Boolean(align),
12398
12336
  [`size-${size}`]: Boolean(size),
@@ -12401,7 +12339,7 @@ const ImageBlock = forwardRef((props, ref) => {
12401
12339
  })),
12402
12340
  children: [/*#__PURE__*/jsx(Thumbnail, {
12403
12341
  ...thumbnailProps,
12404
- className: classNames.join(element$v('image'), thumbnailProps?.className),
12342
+ className: classnames(element$v('image'), thumbnailProps?.className),
12405
12343
  fillHeight: fillHeight,
12406
12344
  align: align,
12407
12345
  image: image,
@@ -12410,7 +12348,7 @@ const ImageBlock = forwardRef((props, ref) => {
12410
12348
  alt: alt || title
12411
12349
  }), /*#__PURE__*/jsx(ImageCaption, {
12412
12350
  as: "figcaption",
12413
- baseClassName: CLASSNAME$I,
12351
+ baseClassName: CLASSNAME$J,
12414
12352
  theme: theme,
12415
12353
  title: title,
12416
12354
  titleProps: titleProps,
@@ -12425,20 +12363,135 @@ const ImageBlock = forwardRef((props, ref) => {
12425
12363
  children: actions
12426
12364
  })]
12427
12365
  });
12366
+ };
12367
+
12368
+ /** Internal component used to render image captions */
12369
+ const ImageCaption$1 = props => {
12370
+ const {
12371
+ baseClassName,
12372
+ theme,
12373
+ as = 'figcaption',
12374
+ title,
12375
+ titleProps,
12376
+ description,
12377
+ descriptionProps,
12378
+ tags,
12379
+ captionStyle,
12380
+ align,
12381
+ truncate,
12382
+ FlexBox,
12383
+ Text,
12384
+ wrapperProps = {
12385
+ vAlign: align,
12386
+ hAlign: align === 'center' ? align : undefined
12387
+ }
12388
+ } = props;
12389
+ if (!title && !description && !tags) return null;
12390
+ const titleColor = {
12391
+ color: theme === 'dark' ? 'light' : 'dark'
12392
+ };
12393
+ const baseColor = {
12394
+ color: theme === 'dark' ? 'light' : 'dark',
12395
+ colorVariant: 'L2'
12396
+ };
12397
+ return /*#__PURE__*/jsxs(FlexBox, {
12398
+ as: as,
12399
+ className: classnames(baseClassName && `${baseClassName}__wrapper`),
12400
+ style: captionStyle,
12401
+ orientation: "vertical",
12402
+ gap: "regular",
12403
+ ...wrapperProps,
12404
+ children: [(title || description) && /*#__PURE__*/jsxs(Text, {
12405
+ as: "p",
12406
+ className: classnames(baseClassName && `${baseClassName}__caption`),
12407
+ truncate: truncate,
12408
+ ...baseColor,
12409
+ children: [title && /*#__PURE__*/jsx(Text, {
12410
+ ...titleProps,
12411
+ as: "span",
12412
+ className: classnames(titleProps?.className, baseClassName && `${baseClassName}__title`),
12413
+ typography: "subtitle1",
12414
+ ...titleColor,
12415
+ children: title
12416
+ }), ' ', description && (typeof description === 'object' && '__html' in description ? /*#__PURE__*/jsx(Text, {
12417
+ ...descriptionProps,
12418
+ as: "span",
12419
+ className: classnames(descriptionProps?.className, baseClassName && `${baseClassName}__description`),
12420
+ typography: "body1",
12421
+ dangerouslySetInnerHTML: description
12422
+ }) : /*#__PURE__*/jsx(Text, {
12423
+ ...descriptionProps,
12424
+ as: "span",
12425
+ className: classnames(descriptionProps?.className, baseClassName && `${baseClassName}__description`),
12426
+ typography: "body1",
12427
+ children: description
12428
+ }))]
12429
+ }), tags && /*#__PURE__*/jsx(FlexBox, {
12430
+ className: classnames(baseClassName && `${baseClassName}__tags`),
12431
+ orientation: "horizontal",
12432
+ vAlign: align,
12433
+ children: tags
12434
+ })]
12435
+ });
12436
+ };
12437
+
12438
+ /** Internal component used to render image captions */
12439
+ const ImageCaption = props => {
12440
+ const defaultTheme = useTheme();
12441
+ const {
12442
+ theme = defaultTheme,
12443
+ ...forwardedProps
12444
+ } = props;
12445
+ return ImageCaption$1({
12446
+ FlexBox,
12447
+ Text,
12448
+ theme,
12449
+ ...forwardedProps
12450
+ });
12451
+ };
12452
+
12453
+ /**
12454
+ * Image block sizes.
12455
+ */
12456
+
12457
+ /**
12458
+ * Defines the props of the component.
12459
+ */
12460
+
12461
+ /**
12462
+ * ImageBlock component.
12463
+ *
12464
+ * @param props Component props.
12465
+ * @param ref Component ref.
12466
+ * @return React element.
12467
+ */
12468
+ const ImageBlock = forwardRef((props, ref) => {
12469
+ const defaultTheme = useTheme() || Theme$1.light;
12470
+ const {
12471
+ theme = defaultTheme,
12472
+ ...forwardedProps
12473
+ } = props;
12474
+ return ImageBlock$1({
12475
+ ref,
12476
+ theme,
12477
+ ...forwardedProps,
12478
+ Thumbnail,
12479
+ ImageCaption
12480
+ });
12428
12481
  });
12429
- ImageBlock.displayName = COMPONENT_NAME$H;
12430
- ImageBlock.className = CLASSNAME$I;
12482
+ ImageBlock.displayName = COMPONENT_NAME$I;
12483
+ ImageBlock.className = CLASSNAME$J;
12431
12484
  ImageBlock.defaultProps = DEFAULT_PROPS$F;
12432
12485
 
12433
12486
  /**
12434
12487
  * Component display name.
12435
12488
  */
12436
- const COMPONENT_NAME$G = 'ImageLightbox';
12489
+ const COMPONENT_NAME$H = 'ImageLightbox';
12437
12490
 
12438
12491
  /**
12439
12492
  * Component default class name and class prefix.
12440
12493
  */
12441
- const CLASSNAME$H = 'lumx-image-lightbox';
12494
+ const CLASSNAME$I = 'lumx-image-lightbox';
12442
12495
 
12443
12496
  /**
12444
12497
  * Observe element size (only works if it's size depends on the window size).
@@ -12684,7 +12737,7 @@ function useAnimateScroll(scrollAreaRef) {
12684
12737
 
12685
12738
  const {
12686
12739
  element: element$u
12687
- } = classNames.bem(CLASSNAME$H);
12740
+ } = classNames.bem(CLASSNAME$I);
12688
12741
  /** Internal image slide component for ImageLightbox */
12689
12742
  const ImageSlide = /*#__PURE__*/React__default.memo(props => {
12690
12743
  const {
@@ -12776,7 +12829,7 @@ const ImageSlide = /*#__PURE__*/React__default.memo(props => {
12776
12829
 
12777
12830
  const {
12778
12831
  element: element$t
12779
- } = classNames.bem(CLASSNAME$H);
12832
+ } = classNames.bem(CLASSNAME$I);
12780
12833
  /** Internal image slideshow component for ImageLightbox */
12781
12834
  const ImageSlideshow = ({
12782
12835
  activeImageIndex,
@@ -13022,7 +13075,7 @@ function useImageLightbox(props) {
13022
13075
  viewTransitionName: {
13023
13076
  source: currentImageRef,
13024
13077
  target: triggerImageRefs[currentIndex],
13025
- name: CLASSNAME$H
13078
+ name: CLASSNAME$I
13026
13079
  }
13027
13080
  });
13028
13081
  }
@@ -13074,7 +13127,7 @@ function useImageLightbox(props) {
13074
13127
  viewTransitionName: {
13075
13128
  source: triggerImage,
13076
13129
  target: currentImageRef,
13077
- name: CLASSNAME$H
13130
+ name: CLASSNAME$I
13078
13131
  }
13079
13132
  });
13080
13133
  }
@@ -13128,7 +13181,7 @@ const Inner = forwardRef((props, ref) => {
13128
13181
  }, [onClose]);
13129
13182
  return /*#__PURE__*/jsx(Lightbox, {
13130
13183
  ref: ref,
13131
- className: classNames.join(className, CLASSNAME$H),
13184
+ className: classNames.join(className, CLASSNAME$I),
13132
13185
  parentElement: parentElement,
13133
13186
  isOpen: isOpen,
13134
13187
  onClose: onClose,
@@ -13157,8 +13210,8 @@ const Inner = forwardRef((props, ref) => {
13157
13210
  })
13158
13211
  });
13159
13212
  });
13160
- Inner.displayName = COMPONENT_NAME$G;
13161
- Inner.className = CLASSNAME$H;
13213
+ Inner.displayName = COMPONENT_NAME$H;
13214
+ Inner.className = CLASSNAME$I;
13162
13215
 
13163
13216
  /**
13164
13217
  * ImageLightbox component.
@@ -13174,16 +13227,16 @@ const ImageLightbox = Object.assign(Inner, {
13174
13227
  /**
13175
13228
  * Component display name.
13176
13229
  */
13177
- const COMPONENT_NAME$F = 'InlineList';
13230
+ const COMPONENT_NAME$G = 'InlineList';
13178
13231
 
13179
13232
  /**
13180
13233
  * Component default class name and class prefix.
13181
13234
  */
13182
- const CLASSNAME$G = 'lumx-inline-list';
13235
+ const CLASSNAME$H = 'lumx-inline-list';
13183
13236
  const {
13184
13237
  block: block$A,
13185
13238
  element: element$s
13186
- } = bem(CLASSNAME$G);
13239
+ } = bem(CLASSNAME$H);
13187
13240
 
13188
13241
  /**
13189
13242
  * Component default props.
@@ -13235,8 +13288,8 @@ const InlineList$1 = props => {
13235
13288
  })
13236
13289
  );
13237
13290
  };
13238
- InlineList$1.displayName = COMPONENT_NAME$F;
13239
- InlineList$1.className = CLASSNAME$G;
13291
+ InlineList$1.displayName = COMPONENT_NAME$G;
13292
+ InlineList$1.className = CLASSNAME$H;
13240
13293
  InlineList$1.defaultProps = DEFAULT_PROPS$E;
13241
13294
 
13242
13295
  /**
@@ -13261,8 +13314,8 @@ const InlineList = forwardRef((props, ref) => {
13261
13314
  items: Children.toArray(children)
13262
13315
  });
13263
13316
  });
13264
- InlineList.displayName = COMPONENT_NAME$F;
13265
- InlineList.className = CLASSNAME$G;
13317
+ InlineList.displayName = COMPONENT_NAME$G;
13318
+ InlineList.className = CLASSNAME$H;
13266
13319
  InlineList.defaultProps = DEFAULT_PROPS$E;
13267
13320
 
13268
13321
  /**
@@ -13306,16 +13359,16 @@ InputLabel.defaultProps = InputLabel$1.defaultProps;
13306
13359
  /**
13307
13360
  * Component display name.
13308
13361
  */
13309
- const COMPONENT_NAME$E = 'Lightbox';
13362
+ const COMPONENT_NAME$F = 'Lightbox';
13310
13363
 
13311
13364
  /**
13312
13365
  * Component default class name and class prefix.
13313
13366
  */
13314
- const CLASSNAME$F = 'lumx-lightbox';
13367
+ const CLASSNAME$G = 'lumx-lightbox';
13315
13368
  const {
13316
13369
  block: block$z,
13317
13370
  element: element$r
13318
- } = classNames.bem(CLASSNAME$F);
13371
+ } = classNames.bem(CLASSNAME$G);
13319
13372
 
13320
13373
  /**
13321
13374
  * Lightbox component.
@@ -13438,8 +13491,8 @@ const Lightbox = forwardRef((props, ref) => {
13438
13491
  })
13439
13492
  });
13440
13493
  });
13441
- Lightbox.displayName = COMPONENT_NAME$E;
13442
- Lightbox.className = CLASSNAME$F;
13494
+ Lightbox.displayName = COMPONENT_NAME$F;
13495
+ Lightbox.className = CLASSNAME$G;
13443
13496
 
13444
13497
  /**
13445
13498
  * Defines the props of the component.
@@ -13448,15 +13501,15 @@ Lightbox.className = CLASSNAME$F;
13448
13501
  /**
13449
13502
  * Component display name.
13450
13503
  */
13451
- const COMPONENT_NAME$D = 'Link';
13504
+ const COMPONENT_NAME$E = 'Link';
13452
13505
 
13453
13506
  /**
13454
13507
  * Component default class name and class prefix.
13455
13508
  */
13456
- const CLASSNAME$E = 'lumx-link';
13509
+ const CLASSNAME$F = 'lumx-link';
13457
13510
  const {
13458
13511
  block: block$y
13459
- } = bem(CLASSNAME$E);
13512
+ } = bem(CLASSNAME$F);
13460
13513
 
13461
13514
  /**
13462
13515
  * Link component.
@@ -13495,7 +13548,7 @@ const Link$1 = props => {
13495
13548
 
13496
13549
  const {
13497
13550
  element: element$q
13498
- } = classNames.bem(CLASSNAME$E);
13551
+ } = classNames.bem(CLASSNAME$F);
13499
13552
 
13500
13553
  /**
13501
13554
  * Defines the props of the component.
@@ -13541,22 +13594,22 @@ const Link = forwardRef((props, ref) => {
13541
13594
  }))
13542
13595
  });
13543
13596
  });
13544
- Link.displayName = COMPONENT_NAME$D;
13545
- Link.className = CLASSNAME$E;
13597
+ Link.displayName = COMPONENT_NAME$E;
13598
+ Link.className = CLASSNAME$F;
13546
13599
 
13547
13600
  /**
13548
13601
  * Component display name.
13549
13602
  */
13550
- const COMPONENT_NAME$C = 'LinkPreview';
13603
+ const COMPONENT_NAME$D = 'LinkPreview';
13551
13604
 
13552
13605
  /**
13553
13606
  * Component default class name and class prefix.
13554
13607
  */
13555
- const CLASSNAME$D = 'lumx-link-preview';
13608
+ const CLASSNAME$E = 'lumx-link-preview';
13556
13609
  const {
13557
13610
  block: block$x,
13558
13611
  element: element$p
13559
- } = classNames.bem(CLASSNAME$D);
13612
+ } = classNames.bem(CLASSNAME$E);
13560
13613
 
13561
13614
  /**
13562
13615
  * Component default props.
@@ -13651,10 +13704,125 @@ const LinkPreview = forwardRef((props, ref) => {
13651
13704
  })
13652
13705
  });
13653
13706
  });
13654
- LinkPreview.displayName = COMPONENT_NAME$C;
13655
- LinkPreview.className = CLASSNAME$D;
13707
+ LinkPreview.displayName = COMPONENT_NAME$D;
13708
+ LinkPreview.className = CLASSNAME$E;
13656
13709
  LinkPreview.defaultProps = DEFAULT_PROPS$D;
13657
13710
 
13711
+ /**
13712
+ * ListItem.Action props.
13713
+ */
13714
+
13715
+ /**
13716
+ * ListItem.Action sub-component.
13717
+ *
13718
+ * Renders a button or link with action area classes.
13719
+ * When placed as a child of ListItem, it activates the action area pattern:
13720
+ * the entire list item becomes visually clickable, while other interactive
13721
+ * elements (in `before`/`after` slots) remain independently clickable.
13722
+ *
13723
+ * @param props Component props.
13724
+ * @param ref Component ref.
13725
+ * @return React element.
13726
+ */
13727
+ const ListItemAction = Object.assign(forwardRefPolymorphic((props, ref) => {
13728
+ const {
13729
+ children,
13730
+ onClick,
13731
+ ...forwardedProps
13732
+ } = props;
13733
+ return ListItemAction$1({
13734
+ ...forwardedProps,
13735
+ handleClick: onClick,
13736
+ ref,
13737
+ children
13738
+ });
13739
+ }), {
13740
+ displayName: COMPONENT_NAME$19,
13741
+ className: CLASSNAME$18,
13742
+ defaultProps: DEFAULT_PROPS$W
13743
+ });
13744
+
13745
+ /**
13746
+ * Defines the props of the component.
13747
+ */
13748
+
13749
+ /**
13750
+ * ListItem component.
13751
+ *
13752
+ * @param props Component props.
13753
+ * @param ref Component ref.
13754
+ * @return React element.
13755
+ */
13756
+ const _ListItem = forwardRef((props, ref) => {
13757
+ const {
13758
+ disabledStateProps,
13759
+ otherProps
13760
+ } = useDisableStateProps(props);
13761
+ const {
13762
+ onItemSelected,
13763
+ onClick,
13764
+ linkRef,
13765
+ ...forwardedProps
13766
+ } = otherProps;
13767
+ const handleClick = event => {
13768
+ onItemSelected?.(event);
13769
+ onClick?.(event);
13770
+ };
13771
+ return ListItem$1({
13772
+ ...forwardedProps,
13773
+ isDisabled: disabledStateProps.disabled,
13774
+ 'aria-disabled': disabledStateProps['aria-disabled'],
13775
+ ref,
13776
+ linkRef,
13777
+ handleClick: onItemSelected || props.onClick ? handleClick : undefined
13778
+ });
13779
+ });
13780
+ _ListItem.displayName = COMPONENT_NAME$1a;
13781
+ _ListItem.className = CLASSNAME$19;
13782
+ _ListItem.defaultProps = DEFAULT_PROPS$X;
13783
+
13784
+ /**
13785
+ * ListItem component with Action sub-component.
13786
+ */
13787
+ const ListItem = Object.assign(_ListItem, {
13788
+ /** Sub-component that renders the default action (button or link) for the action area pattern. */
13789
+ Action: ListItemAction
13790
+ });
13791
+
13792
+ /**
13793
+ * Component display name.
13794
+ */
13795
+ const COMPONENT_NAME$C = 'ListSubheader';
13796
+
13797
+ /**
13798
+ * Component default class name and class prefix.
13799
+ */
13800
+ const CLASSNAME$D = 'lumx-list-subheader';
13801
+
13802
+ /**
13803
+ * ListSubheader component.
13804
+ * @deprecated ListSubheader produces improper list structure. use ListSection instead.
13805
+ *
13806
+ * @param props Component props.
13807
+ * @param ref Component ref.
13808
+ * @return React element.
13809
+ */
13810
+ const ListSubheader = forwardRef((props, ref) => {
13811
+ const {
13812
+ children,
13813
+ className,
13814
+ ...forwardedProps
13815
+ } = props;
13816
+ return /*#__PURE__*/jsx("li", {
13817
+ ref: ref,
13818
+ ...forwardedProps,
13819
+ className: classNames.join(className, CLASSNAME$D),
13820
+ children: children
13821
+ });
13822
+ });
13823
+ ListSubheader.displayName = COMPONENT_NAME$C;
13824
+ ListSubheader.className = CLASSNAME$D;
13825
+
13658
13826
  /**
13659
13827
  * Component display name.
13660
13828
  */
@@ -13772,7 +13940,7 @@ const CLASSNAME$B = 'lumx-mosaic';
13772
13940
  const {
13773
13941
  block: block$v,
13774
13942
  element: element$n
13775
- } = classNames.bem(CLASSNAME$B);
13943
+ } = bem(CLASSNAME$B);
13776
13944
 
13777
13945
  /**
13778
13946
  * Component default props.
@@ -13786,26 +13954,27 @@ const DEFAULT_PROPS$C = {};
13786
13954
  * @param ref Component ref.
13787
13955
  * @return React element.
13788
13956
  */
13789
- const Mosaic = forwardRef((props, ref) => {
13790
- const defaultTheme = useTheme() || Theme$1.light;
13957
+ const Mosaic$1 = props => {
13791
13958
  const {
13792
13959
  className,
13793
- theme = defaultTheme,
13960
+ theme,
13794
13961
  thumbnails,
13795
- onImageClick,
13962
+ handleClick,
13963
+ Thumbnail,
13964
+ ref,
13796
13965
  ...forwardedProps
13797
13966
  } = props;
13798
- const handleImageClick = useMemo(() => {
13799
- if (!onImageClick) return undefined;
13967
+ const onImageClick = () => {
13968
+ if (!handleClick) return undefined;
13800
13969
  return (index, onClick) => event => {
13801
13970
  onClick?.(event);
13802
- onImageClick?.(index);
13971
+ handleClick?.(index);
13803
13972
  };
13804
- }, [onImageClick]);
13973
+ };
13805
13974
  return /*#__PURE__*/jsx("div", {
13806
13975
  ref: ref,
13807
13976
  ...forwardedProps,
13808
- className: classNames.join(className, block$v({
13977
+ className: classnames(className, block$v({
13809
13978
  [`theme-${theme}`]: Boolean(theme),
13810
13979
  'has-1-thumbnail': thumbnails?.length === 1,
13811
13980
  'has-2-thumbnails': thumbnails?.length === 2,
@@ -13825,12 +13994,12 @@ const Mosaic = forwardRef((props, ref) => {
13825
13994
  className: element$n('thumbnail'),
13826
13995
  children: [/*#__PURE__*/jsx(Thumbnail, {
13827
13996
  ...thumbnailProps,
13828
- align: align || Alignment$1.left,
13997
+ align: align || Alignment.left,
13829
13998
  image: image,
13830
13999
  theme: theme,
13831
- aspectRatio: AspectRatio$1.free,
14000
+ aspectRatio: AspectRatio.free,
13832
14001
  fillHeight: true,
13833
- onClick: handleImageClick?.(index, onClick) || onClick
14002
+ onClick: onImageClick()?.(index, onClick) || onClick
13834
14003
  }), thumbnails.length > 4 && index === 3 && /*#__PURE__*/jsx("div", {
13835
14004
  className: element$n('overlay'),
13836
14005
  children: /*#__PURE__*/jsxs("span", {
@@ -13841,6 +14010,33 @@ const Mosaic = forwardRef((props, ref) => {
13841
14010
  })
13842
14011
  })
13843
14012
  });
14013
+ };
14014
+
14015
+ /**
14016
+ * Defines the props of the component.
14017
+ */
14018
+
14019
+ /**
14020
+ * Mosaic component.
14021
+ *
14022
+ * @param props Component props.
14023
+ * @param ref Component ref.
14024
+ * @return React element.
14025
+ */
14026
+ const Mosaic = forwardRef((props, ref) => {
14027
+ const defaultTheme = useTheme() || Theme$1.light;
14028
+ const {
14029
+ theme = defaultTheme,
14030
+ onImageClick,
14031
+ ...forwardedProps
14032
+ } = props;
14033
+ return Mosaic$1({
14034
+ ref,
14035
+ theme,
14036
+ Thumbnail,
14037
+ handleClick: onImageClick,
14038
+ ...forwardedProps
14039
+ });
13844
14040
  });
13845
14041
  Mosaic.displayName = COMPONENT_NAME$A;
13846
14042
  Mosaic.className = CLASSNAME$B;