@lumx/react 3.20.1-alpha.39 → 3.20.1-alpha.40

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 (3) hide show
  1. package/index.js +343 -804
  2. package/index.js.map +1 -1
  3. package/package.json +3 -5
package/index.js CHANGED
@@ -2,7 +2,7 @@ import { Kind, Size, ColorPalette, Emphasis, Theme, AspectRatio, CSS_PREFIX, DIA
2
2
  export * from '@lumx/core/js/constants';
3
3
  export * from '@lumx/core/js/types';
4
4
  import * as React from 'react';
5
- import React__default, { useState, useEffect, useMemo, useRef, useCallback, Children, isValidElement, cloneElement, useLayoutEffect, createContext, useContext, useReducer } from 'react';
5
+ import React__default, { useState, useEffect, useMemo, useRef, useCallback, Children, useLayoutEffect, cloneElement, createContext, isValidElement, useContext, useReducer } from 'react';
6
6
  import classNames from 'classnames';
7
7
  import { handleBasicClasses, getRootClassName, getBasicClass, getTypographyClassName, fontColorClass, resolveColorWithVariants } from '@lumx/core/js/utils/className';
8
8
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -2914,7 +2914,7 @@ const DragHandle = forwardRef((props, ref) => {
2914
2914
  DragHandle.displayName = COMPONENT_NAME$14;
2915
2915
  DragHandle.className = CLASSNAME$14;
2916
2916
 
2917
- const INITIAL_INDEX$1 = -1;
2917
+ const INITIAL_INDEX = -1;
2918
2918
 
2919
2919
  /**
2920
2920
  * This custom hook provides the necessary set of functions and values to properly navigate
@@ -2931,7 +2931,7 @@ const INITIAL_INDEX$1 = -1;
2931
2931
  * @param preventTabOnEnteredValue determines whether upon TAB, if there is a value entered, the event is prevented or not.
2932
2932
  * @return useKeyboardListNavigation helpers.
2933
2933
  */
2934
- const useKeyboardListNavigation = (items, ref, onListItemSelected, onListItemNavigated, onEnterPressed, onBackspacePressed, keepFocusAfterSelection = false, initialIndex = INITIAL_INDEX$1, preventTabOnEnteredValue = true) => {
2934
+ const useKeyboardListNavigation = (items, ref, onListItemSelected, onListItemNavigated, onEnterPressed, onBackspacePressed, keepFocusAfterSelection = false, initialIndex = INITIAL_INDEX, preventTabOnEnteredValue = true) => {
2935
2935
  const [activeItemIndex, setActiveItemIndex] = useState(initialIndex);
2936
2936
 
2937
2937
  /**
@@ -3078,24 +3078,10 @@ const useKeyboardListNavigation = (items, ref, onListItemSelected, onListItemNav
3078
3078
  };
3079
3079
  };
3080
3080
 
3081
- /**
3082
- * Render link with default <a> HTML component or a custom one provided by `linkAs`.
3083
- *
3084
- * Can be used to inject the `Link` component from `react-router` and provide better a11y on LumX components.
3085
- *
3086
- * @param linkAs Custom link component.
3087
- * @param children Link children.
3088
- * @return A link.
3089
- */
3090
- const renderLink = ({
3091
- linkAs,
3092
- ...forwardedProps
3093
- }, ...children) => /*#__PURE__*/React__default.createElement(linkAs || 'a', forwardedProps, ...children);
3094
-
3095
3081
  /**
3096
3082
  * Component display name.
3097
3083
  */
3098
- const COMPONENT_NAME$13 = 'ListItem';
3084
+ const COMPONENT_NAME$13 = 'List';
3099
3085
 
3100
3086
  /**
3101
3087
  * Component default class name and class prefix.
@@ -3106,574 +3092,6 @@ const CLASSNAME$13 = getRootClassName(COMPONENT_NAME$13);
3106
3092
  * Component default props.
3107
3093
  */
3108
3094
  const DEFAULT_PROPS$R = {
3109
- size: Size.regular
3110
- };
3111
-
3112
- /**
3113
- * Check if the list item is clickable.
3114
- * @return `true` if the list item is clickable; `false` otherwise.
3115
- */
3116
- function isClickable({
3117
- linkProps,
3118
- onItemSelected
3119
- }) {
3120
- return !isEmpty(linkProps?.href) || !!onItemSelected;
3121
- }
3122
-
3123
- /**
3124
- * ListItem component.
3125
- *
3126
- * @param props Component props.
3127
- * @param ref Component ref.
3128
- * @return React element.
3129
- */
3130
- const ListItem = forwardRef((props, ref) => {
3131
- const {
3132
- isAnyDisabled,
3133
- disabledStateProps,
3134
- otherProps
3135
- } = useDisableStateProps(props);
3136
- const {
3137
- after,
3138
- before,
3139
- children,
3140
- className,
3141
- isHighlighted,
3142
- isSelected,
3143
- linkAs,
3144
- linkProps = {},
3145
- linkRef,
3146
- onItemSelected,
3147
- size = DEFAULT_PROPS$R.size,
3148
- ...forwardedProps
3149
- } = otherProps;
3150
- const role = linkAs || linkProps.href ? 'link' : 'button';
3151
- const onKeyDown = useMemo(() => {
3152
- if (onItemSelected && role === 'link') return onEnterPressed(onItemSelected);
3153
- if (onItemSelected && role === 'button') return onButtonPressed(onItemSelected);
3154
- return undefined;
3155
- }, [role, onItemSelected]);
3156
- const content = /*#__PURE__*/jsxs(Fragment, {
3157
- children: [before && /*#__PURE__*/jsx("div", {
3158
- className: `${CLASSNAME$13}__before`,
3159
- children: before
3160
- }), /*#__PURE__*/jsx("div", {
3161
- className: `${CLASSNAME$13}__content`,
3162
- children: children
3163
- }), after && /*#__PURE__*/jsx("div", {
3164
- className: `${CLASSNAME$13}__after`,
3165
- children: after
3166
- })]
3167
- });
3168
- return /*#__PURE__*/jsx("li", {
3169
- ref: ref,
3170
- ...forwardedProps,
3171
- className: classNames(className, handleBasicClasses({
3172
- prefix: CLASSNAME$13,
3173
- size
3174
- })),
3175
- children: isClickable({
3176
- linkProps,
3177
- onItemSelected
3178
- }) ? (/* Clickable list item */
3179
- renderLink({
3180
- linkAs,
3181
- tabIndex: !disabledStateProps.disabled ? 0 : undefined,
3182
- role,
3183
- 'aria-disabled': isAnyDisabled,
3184
- ...linkProps,
3185
- href: isAnyDisabled ? undefined : linkProps.href,
3186
- className: classNames(handleBasicClasses({
3187
- prefix: `${CLASSNAME$13}__link`,
3188
- isHighlighted,
3189
- isSelected,
3190
- isDisabled: isAnyDisabled
3191
- })),
3192
- onClick: isAnyDisabled ? undefined : onItemSelected,
3193
- onKeyDown: isAnyDisabled ? undefined : onKeyDown,
3194
- ref: linkRef
3195
- }, content)) :
3196
- /*#__PURE__*/
3197
- /* Non clickable list item */
3198
- jsx("div", {
3199
- className: `${CLASSNAME$13}__wrapper`,
3200
- children: content
3201
- })
3202
- });
3203
- });
3204
- ListItem.displayName = COMPONENT_NAME$13;
3205
- ListItem.className = CLASSNAME$13;
3206
- ListItem.defaultProps = DEFAULT_PROPS$R;
3207
-
3208
- function getDefaultExportFromCjs (x) {
3209
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
3210
- }
3211
-
3212
- var reactIs = {exports: {}};
3213
-
3214
- var reactIs_production_min = {};
3215
-
3216
- /**
3217
- * @license React
3218
- * react-is.production.min.js
3219
- *
3220
- * Copyright (c) Facebook, Inc. and its affiliates.
3221
- *
3222
- * This source code is licensed under the MIT license found in the
3223
- * LICENSE file in the root directory of this source tree.
3224
- */
3225
-
3226
- var hasRequiredReactIs_production_min;
3227
-
3228
- function requireReactIs_production_min () {
3229
- if (hasRequiredReactIs_production_min) return reactIs_production_min;
3230
- hasRequiredReactIs_production_min = 1;
3231
- var b=Symbol.for("react.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),h=Symbol.for("react.context"),k=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),n=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),t=Symbol.for("react.offscreen"),u;u=Symbol.for("react.module.reference");
3232
- function v(a){if("object"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}reactIs_production_min.ContextConsumer=h;reactIs_production_min.ContextProvider=g;reactIs_production_min.Element=b;reactIs_production_min.ForwardRef=l;reactIs_production_min.Fragment=d;reactIs_production_min.Lazy=q;reactIs_production_min.Memo=p;reactIs_production_min.Portal=c;reactIs_production_min.Profiler=f;reactIs_production_min.StrictMode=e;reactIs_production_min.Suspense=m;
3233
- reactIs_production_min.SuspenseList=n;reactIs_production_min.isAsyncMode=function(){return false};reactIs_production_min.isConcurrentMode=function(){return false};reactIs_production_min.isContextConsumer=function(a){return v(a)===h};reactIs_production_min.isContextProvider=function(a){return v(a)===g};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};reactIs_production_min.isForwardRef=function(a){return v(a)===l};reactIs_production_min.isFragment=function(a){return v(a)===d};reactIs_production_min.isLazy=function(a){return v(a)===q};reactIs_production_min.isMemo=function(a){return v(a)===p};
3234
- reactIs_production_min.isPortal=function(a){return v(a)===c};reactIs_production_min.isProfiler=function(a){return v(a)===f};reactIs_production_min.isStrictMode=function(a){return v(a)===e};reactIs_production_min.isSuspense=function(a){return v(a)===m};reactIs_production_min.isSuspenseList=function(a){return v(a)===n};
3235
- reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||"object"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?true:false};reactIs_production_min.typeOf=v;
3236
- return reactIs_production_min;
3237
- }
3238
-
3239
- var reactIs_development = {};
3240
-
3241
- /**
3242
- * @license React
3243
- * react-is.development.js
3244
- *
3245
- * Copyright (c) Facebook, Inc. and its affiliates.
3246
- *
3247
- * This source code is licensed under the MIT license found in the
3248
- * LICENSE file in the root directory of this source tree.
3249
- */
3250
-
3251
- var hasRequiredReactIs_development;
3252
-
3253
- function requireReactIs_development () {
3254
- if (hasRequiredReactIs_development) return reactIs_development;
3255
- hasRequiredReactIs_development = 1;
3256
-
3257
- if (process.env.NODE_ENV !== "production") {
3258
- (function() {
3259
-
3260
- // ATTENTION
3261
- // When adding new symbols to this file,
3262
- // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
3263
- // The Symbol used to tag the ReactElement-like types.
3264
- var REACT_ELEMENT_TYPE = Symbol.for('react.element');
3265
- var REACT_PORTAL_TYPE = Symbol.for('react.portal');
3266
- var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
3267
- var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
3268
- var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
3269
- var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
3270
- var REACT_CONTEXT_TYPE = Symbol.for('react.context');
3271
- var REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');
3272
- var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
3273
- var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
3274
- var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
3275
- var REACT_MEMO_TYPE = Symbol.for('react.memo');
3276
- var REACT_LAZY_TYPE = Symbol.for('react.lazy');
3277
- var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
3278
-
3279
- // -----------------------------------------------------------------------------
3280
-
3281
- var enableScopeAPI = false; // Experimental Create Event Handle API.
3282
- var enableCacheElement = false;
3283
- var enableTransitionTracing = false; // No known bugs, but needs performance testing
3284
-
3285
- var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
3286
- // stuff. Intended to enable React core members to more easily debug scheduling
3287
- // issues in DEV builds.
3288
-
3289
- var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
3290
-
3291
- var REACT_MODULE_REFERENCE;
3292
-
3293
- {
3294
- REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
3295
- }
3296
-
3297
- function isValidElementType(type) {
3298
- if (typeof type === 'string' || typeof type === 'function') {
3299
- return true;
3300
- } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
3301
-
3302
-
3303
- if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
3304
- return true;
3305
- }
3306
-
3307
- if (typeof type === 'object' && type !== null) {
3308
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
3309
- // types supported by any Flight configuration anywhere since
3310
- // we don't know which Flight build this will end up being used
3311
- // with.
3312
- type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
3313
- return true;
3314
- }
3315
- }
3316
-
3317
- return false;
3318
- }
3319
-
3320
- function typeOf(object) {
3321
- if (typeof object === 'object' && object !== null) {
3322
- var $$typeof = object.$$typeof;
3323
-
3324
- switch ($$typeof) {
3325
- case REACT_ELEMENT_TYPE:
3326
- var type = object.type;
3327
-
3328
- switch (type) {
3329
- case REACT_FRAGMENT_TYPE:
3330
- case REACT_PROFILER_TYPE:
3331
- case REACT_STRICT_MODE_TYPE:
3332
- case REACT_SUSPENSE_TYPE:
3333
- case REACT_SUSPENSE_LIST_TYPE:
3334
- return type;
3335
-
3336
- default:
3337
- var $$typeofType = type && type.$$typeof;
3338
-
3339
- switch ($$typeofType) {
3340
- case REACT_SERVER_CONTEXT_TYPE:
3341
- case REACT_CONTEXT_TYPE:
3342
- case REACT_FORWARD_REF_TYPE:
3343
- case REACT_LAZY_TYPE:
3344
- case REACT_MEMO_TYPE:
3345
- case REACT_PROVIDER_TYPE:
3346
- return $$typeofType;
3347
-
3348
- default:
3349
- return $$typeof;
3350
- }
3351
-
3352
- }
3353
-
3354
- case REACT_PORTAL_TYPE:
3355
- return $$typeof;
3356
- }
3357
- }
3358
-
3359
- return undefined;
3360
- }
3361
- var ContextConsumer = REACT_CONTEXT_TYPE;
3362
- var ContextProvider = REACT_PROVIDER_TYPE;
3363
- var Element = REACT_ELEMENT_TYPE;
3364
- var ForwardRef = REACT_FORWARD_REF_TYPE;
3365
- var Fragment = REACT_FRAGMENT_TYPE;
3366
- var Lazy = REACT_LAZY_TYPE;
3367
- var Memo = REACT_MEMO_TYPE;
3368
- var Portal = REACT_PORTAL_TYPE;
3369
- var Profiler = REACT_PROFILER_TYPE;
3370
- var StrictMode = REACT_STRICT_MODE_TYPE;
3371
- var Suspense = REACT_SUSPENSE_TYPE;
3372
- var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
3373
- var hasWarnedAboutDeprecatedIsAsyncMode = false;
3374
- var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
3375
-
3376
- function isAsyncMode(object) {
3377
- {
3378
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
3379
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
3380
-
3381
- console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
3382
- }
3383
- }
3384
-
3385
- return false;
3386
- }
3387
- function isConcurrentMode(object) {
3388
- {
3389
- if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
3390
- hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
3391
-
3392
- console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
3393
- }
3394
- }
3395
-
3396
- return false;
3397
- }
3398
- function isContextConsumer(object) {
3399
- return typeOf(object) === REACT_CONTEXT_TYPE;
3400
- }
3401
- function isContextProvider(object) {
3402
- return typeOf(object) === REACT_PROVIDER_TYPE;
3403
- }
3404
- function isElement(object) {
3405
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
3406
- }
3407
- function isForwardRef(object) {
3408
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
3409
- }
3410
- function isFragment(object) {
3411
- return typeOf(object) === REACT_FRAGMENT_TYPE;
3412
- }
3413
- function isLazy(object) {
3414
- return typeOf(object) === REACT_LAZY_TYPE;
3415
- }
3416
- function isMemo(object) {
3417
- return typeOf(object) === REACT_MEMO_TYPE;
3418
- }
3419
- function isPortal(object) {
3420
- return typeOf(object) === REACT_PORTAL_TYPE;
3421
- }
3422
- function isProfiler(object) {
3423
- return typeOf(object) === REACT_PROFILER_TYPE;
3424
- }
3425
- function isStrictMode(object) {
3426
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
3427
- }
3428
- function isSuspense(object) {
3429
- return typeOf(object) === REACT_SUSPENSE_TYPE;
3430
- }
3431
- function isSuspenseList(object) {
3432
- return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
3433
- }
3434
-
3435
- reactIs_development.ContextConsumer = ContextConsumer;
3436
- reactIs_development.ContextProvider = ContextProvider;
3437
- reactIs_development.Element = Element;
3438
- reactIs_development.ForwardRef = ForwardRef;
3439
- reactIs_development.Fragment = Fragment;
3440
- reactIs_development.Lazy = Lazy;
3441
- reactIs_development.Memo = Memo;
3442
- reactIs_development.Portal = Portal;
3443
- reactIs_development.Profiler = Profiler;
3444
- reactIs_development.StrictMode = StrictMode;
3445
- reactIs_development.Suspense = Suspense;
3446
- reactIs_development.SuspenseList = SuspenseList;
3447
- reactIs_development.isAsyncMode = isAsyncMode;
3448
- reactIs_development.isConcurrentMode = isConcurrentMode;
3449
- reactIs_development.isContextConsumer = isContextConsumer;
3450
- reactIs_development.isContextProvider = isContextProvider;
3451
- reactIs_development.isElement = isElement;
3452
- reactIs_development.isForwardRef = isForwardRef;
3453
- reactIs_development.isFragment = isFragment;
3454
- reactIs_development.isLazy = isLazy;
3455
- reactIs_development.isMemo = isMemo;
3456
- reactIs_development.isPortal = isPortal;
3457
- reactIs_development.isProfiler = isProfiler;
3458
- reactIs_development.isStrictMode = isStrictMode;
3459
- reactIs_development.isSuspense = isSuspense;
3460
- reactIs_development.isSuspenseList = isSuspenseList;
3461
- reactIs_development.isValidElementType = isValidElementType;
3462
- reactIs_development.typeOf = typeOf;
3463
- })();
3464
- }
3465
- return reactIs_development;
3466
- }
3467
-
3468
- var hasRequiredReactIs;
3469
-
3470
- function requireReactIs () {
3471
- if (hasRequiredReactIs) return reactIs.exports;
3472
- hasRequiredReactIs = 1;
3473
-
3474
- if (process.env.NODE_ENV === 'production') {
3475
- reactIs.exports = requireReactIs_production_min();
3476
- } else {
3477
- reactIs.exports = requireReactIs_development();
3478
- }
3479
- return reactIs.exports;
3480
- }
3481
-
3482
- var reactIsExports = requireReactIs();
3483
-
3484
- /**
3485
- * Flatten list of react nodes removing fragments and adding keys.
3486
- * based on: https://github.com/grrowl/react-keyed-flatten-children/blob/5d421644a449765ddd62b659946196b4b5d7b135/index.ts
3487
- *
3488
- * @param children React nodes to flatten.
3489
- * @return Flattened react nodes.
3490
- * @deprecated This function was used to develop keyboard navigation in the List component,
3491
- * but we will replace this with a better method that does not require to hack the children inspection
3492
- *
3493
- * TODO: remove List keyboard navigation once we have provided alternative component (Menu, Combobox, etc.),
3494
- * remove this function and then remove react-is from the dependencies
3495
- */
3496
- function flattenChildren(children) {
3497
- function recur(nodes, keys = []) {
3498
- return Children.toArray(nodes).reduce((acc, node, index) => {
3499
- const nodeKeys = keys.concat(get(node, 'key') ?? index);
3500
- if (reactIsExports.isFragment(node)) {
3501
- acc.push(...recur(node.props.children, nodeKeys));
3502
- } else if (/*#__PURE__*/isValidElement(node)) {
3503
- acc.push(/*#__PURE__*/cloneElement(node, {
3504
- key: nodeKeys.join('.')
3505
- }));
3506
- } else if (typeof node === 'string' || typeof node === 'number') {
3507
- acc.push(node);
3508
- }
3509
- return acc;
3510
- }, []);
3511
- }
3512
- return recur(children);
3513
- }
3514
-
3515
- const INITIAL_INDEX = -1;
3516
- function onKeyboardFocus(props, handler) {
3517
- let isMouseDown = false;
3518
- return {
3519
- onFocus(evt) {
3520
- props.onFocus?.(evt);
3521
- if (!isMouseDown) {
3522
- handler(evt);
3523
- }
3524
- },
3525
- onMouseDown(evt) {
3526
- props.onMouseDown?.(evt);
3527
- isMouseDown = true;
3528
- },
3529
- onMouseUp(evt) {
3530
- props.onMouseUp?.(evt);
3531
- isMouseDown = false;
3532
- }
3533
- };
3534
- }
3535
- const isNavigableItem = node => {
3536
- return isComponent('ListItem')(node) && isClickable(node.props) && !node.props.isDisabled;
3537
- };
3538
-
3539
- /**
3540
- * This custom hook detects clickable list item in a list and make them navigable with the keyboard.
3541
- *
3542
- * @param options See {@link Options}
3543
- * @return See {@link Output}
3544
- */
3545
- const useInteractiveList = options => {
3546
- const {
3547
- ref,
3548
- onListItemSelected,
3549
- onListItemNavigated
3550
- } = options;
3551
- const items = useMemo(() => flattenChildren(options.items), [options.items]);
3552
- const [activeItemIndex, setActiveItemIndex] = useState(INITIAL_INDEX);
3553
-
3554
- // Attach listeners to the list.
3555
- useEffect(() => {
3556
- const {
3557
- current: listElement
3558
- } = ref;
3559
- if (!listElement) {
3560
- return undefined;
3561
- }
3562
-
3563
- /**
3564
- * This function calculates the next index in the list to be active
3565
- * @param index current index
3566
- * @param code key code pressed
3567
- * @return next index
3568
- */
3569
- const getNextIndex = (index, key) => {
3570
- switch (key) {
3571
- case 'ArrowDown':
3572
- return index + 1 < items.length ? index + 1 : 0;
3573
- case 'ArrowUp':
3574
- return index - 1 >= 0 ? index - 1 : items.length - 1;
3575
- default:
3576
- return INITIAL_INDEX;
3577
- }
3578
- };
3579
-
3580
- /**
3581
- * Resets the active index to the initial state
3582
- */
3583
- const resetActiveIndex = () => {
3584
- setActiveItemIndex(INITIAL_INDEX);
3585
- };
3586
-
3587
- /**
3588
- * Handles navigation with the arrows using the keyboard
3589
- * @param evt Key event
3590
- */
3591
- const onArrowPressed = evt => {
3592
- const {
3593
- key
3594
- } = evt;
3595
- if (key !== 'ArrowUp' && key !== 'ArrowDown') {
3596
- return;
3597
- }
3598
- let nextIndex = activeItemIndex;
3599
- let iterations = 0;
3600
-
3601
- // Move to next navigable item.
3602
- do {
3603
- nextIndex = getNextIndex(nextIndex, key);
3604
- iterations += 1;
3605
- } while (nextIndex !== INITIAL_INDEX && nextIndex !== activeItemIndex && !isNavigableItem(items[nextIndex]) && iterations < items.length);
3606
- setActiveItemIndex(nextIndex);
3607
- evt.preventDefault();
3608
- evt.stopPropagation();
3609
- onListItemNavigated?.(nextIndex, get(items, [nextIndex, 'key']));
3610
- };
3611
-
3612
- /**
3613
- * Reset active list item index when focusing outside the list.
3614
- * @param evt Focus out event
3615
- */
3616
- const onFocusOut = evt => {
3617
- if (!evt.relatedTarget || !listElement.contains(evt.relatedTarget)) {
3618
- resetActiveIndex();
3619
- }
3620
- };
3621
- listElement.addEventListener('focusout', onFocusOut);
3622
- listElement.addEventListener('keydown', onArrowPressed);
3623
- return () => {
3624
- listElement.removeEventListener('focusout', onFocusOut);
3625
- listElement.removeEventListener('keydown', onArrowPressed);
3626
- };
3627
- }, [ref, activeItemIndex, items, onListItemNavigated]);
3628
- return useMemo(() => {
3629
- let hasClickableItem = false;
3630
- const transformedItems = items.map((item, index) => {
3631
- // Ignore if list not clickable or item is not a simple list item.
3632
- if (!isNavigableItem(item)) {
3633
- return item;
3634
- }
3635
- hasClickableItem = true;
3636
- const isHighlighted = index === activeItemIndex;
3637
-
3638
- // Clone list item: inject ref, add tab index and active state.
3639
- return /*#__PURE__*/cloneElement(item, {
3640
- ...item.props,
3641
- isHighlighted: item.props.isHighlighted ?? isHighlighted,
3642
- linkRef: mergeRefs(item.props.linkRef, element => {
3643
- if (isHighlighted) {
3644
- element?.focus();
3645
- }
3646
- }),
3647
- onItemSelected(evt) {
3648
- item.props.onItemSelected?.();
3649
- onListItemSelected?.(index, item.key, evt);
3650
- },
3651
- ...onKeyboardFocus(item.props, () => {
3652
- setActiveItemIndex(index);
3653
- })
3654
- });
3655
- });
3656
- return {
3657
- items: transformedItems,
3658
- hasClickableItem
3659
- };
3660
- }, [items, activeItemIndex, onListItemSelected]);
3661
- };
3662
-
3663
- /**
3664
- * Component display name.
3665
- */
3666
- const COMPONENT_NAME$12 = 'List';
3667
-
3668
- /**
3669
- * Component default class name and class prefix.
3670
- */
3671
- const CLASSNAME$12 = getRootClassName(COMPONENT_NAME$12);
3672
-
3673
- /**
3674
- * Component default props.
3675
- */
3676
- const DEFAULT_PROPS$Q = {
3677
3095
  tabIndex: -1
3678
3096
  };
3679
3097
 
@@ -3692,33 +3110,23 @@ const InternalList = forwardRef((props, ref) => {
3692
3110
  isClickable,
3693
3111
  itemPadding,
3694
3112
  onListItemSelected,
3695
- tabIndex = DEFAULT_PROPS$Q.tabIndex,
3113
+ tabIndex = DEFAULT_PROPS$R.tabIndex,
3696
3114
  ...forwardedProps
3697
3115
  } = props;
3698
- const listElementRef = useRef(null);
3699
- const {
3700
- items,
3701
- hasClickableItem
3702
- } = useInteractiveList({
3703
- items: children,
3704
- ref: listElementRef,
3705
- onListItemSelected
3706
- });
3707
- const clickable = hasClickableItem || isClickable;
3708
3116
  return /*#__PURE__*/jsx("ul", {
3709
3117
  ...forwardedProps,
3710
3118
  className: classNames(className, handleBasicClasses({
3711
- prefix: CLASSNAME$12,
3712
- itemPadding: itemPadding ?? (clickable ? Size.big : undefined)
3119
+ prefix: CLASSNAME$13,
3120
+ itemPadding: itemPadding ?? (isClickable ? Size.big : undefined)
3713
3121
  })),
3714
3122
  tabIndex: tabIndex,
3715
- ref: mergeRefs(ref, listElementRef),
3716
- children: items
3123
+ ref: ref,
3124
+ children: children
3717
3125
  });
3718
3126
  });
3719
- InternalList.displayName = COMPONENT_NAME$12;
3720
- InternalList.className = CLASSNAME$12;
3721
- InternalList.defaultProps = DEFAULT_PROPS$Q;
3127
+ InternalList.displayName = COMPONENT_NAME$13;
3128
+ InternalList.className = CLASSNAME$13;
3129
+ InternalList.defaultProps = DEFAULT_PROPS$R;
3722
3130
  const List = Object.assign(InternalList, {
3723
3131
  useKeyboardListNavigation
3724
3132
  });
@@ -5655,6 +5063,10 @@ var fromEntries = function fromEntries(entries) {
5655
5063
 
5656
5064
  var useIsomorphicLayoutEffect = typeof window !== 'undefined' && window.document && window.document.createElement ? React.useLayoutEffect : React.useEffect;
5657
5065
 
5066
+ function getDefaultExportFromCjs (x) {
5067
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
5068
+ }
5069
+
5658
5070
  /* global Map:readonly, Set:readonly, ArrayBuffer:readonly */
5659
5071
 
5660
5072
  var reactFastCompare;
@@ -6149,17 +5561,17 @@ function usePopoverStyle({
6149
5561
  /**
6150
5562
  * Component display name.
6151
5563
  */
6152
- const COMPONENT_NAME$11 = 'Popover';
5564
+ const COMPONENT_NAME$12 = 'Popover';
6153
5565
 
6154
5566
  /**
6155
5567
  * Component default class name and class prefix.
6156
5568
  */
6157
- const CLASSNAME$11 = getRootClassName(COMPONENT_NAME$11);
5569
+ const CLASSNAME$12 = getRootClassName(COMPONENT_NAME$12);
6158
5570
 
6159
5571
  /**
6160
5572
  * Component default props.
6161
5573
  */
6162
- const DEFAULT_PROPS$P = {
5574
+ const DEFAULT_PROPS$Q = {
6163
5575
  elevation: 3,
6164
5576
  placement: Placement.AUTO,
6165
5577
  focusAnchorOnClose: true,
@@ -6176,24 +5588,24 @@ const _InnerPopover = forwardRef((props, ref) => {
6176
5588
  className,
6177
5589
  closeOnClickAway,
6178
5590
  closeOnEscape,
6179
- elevation = DEFAULT_PROPS$P.elevation,
5591
+ elevation = DEFAULT_PROPS$Q.elevation,
6180
5592
  focusElement,
6181
5593
  hasArrow,
6182
5594
  isOpen,
6183
5595
  onClose,
6184
5596
  parentElement,
6185
- usePortal = DEFAULT_PROPS$P.usePortal,
6186
- focusAnchorOnClose = DEFAULT_PROPS$P.focusAnchorOnClose,
5597
+ usePortal = DEFAULT_PROPS$Q.usePortal,
5598
+ focusAnchorOnClose = DEFAULT_PROPS$Q.focusAnchorOnClose,
6187
5599
  withFocusTrap,
6188
5600
  boundaryRef,
6189
5601
  fitToAnchorWidth,
6190
5602
  fitWithinViewportHeight,
6191
5603
  focusTrapZoneElement,
6192
5604
  offset,
6193
- placement = DEFAULT_PROPS$P.placement,
5605
+ placement = DEFAULT_PROPS$Q.placement,
6194
5606
  style,
6195
5607
  theme,
6196
- zIndex = DEFAULT_PROPS$P.zIndex,
5608
+ zIndex = DEFAULT_PROPS$Q.zIndex,
6197
5609
  ...forwardedProps
6198
5610
  } = props;
6199
5611
  const popoverRef = useRef(null);
@@ -6235,7 +5647,7 @@ const _InnerPopover = forwardRef((props, ref) => {
6235
5647
  ...forwardedProps,
6236
5648
  ref: mergedRefs,
6237
5649
  className: classNames(className, handleBasicClasses({
6238
- prefix: CLASSNAME$11,
5650
+ prefix: CLASSNAME$12,
6239
5651
  theme,
6240
5652
  elevation: Math.min(elevation || 0, 5),
6241
5653
  position,
@@ -6248,7 +5660,7 @@ const _InnerPopover = forwardRef((props, ref) => {
6248
5660
  childrenRefs: clickAwayRefs,
6249
5661
  children: [hasArrow && /*#__PURE__*/jsx("div", {
6250
5662
  ref: setArrowElement,
6251
- className: `${CLASSNAME$11}__arrow`,
5663
+ className: `${CLASSNAME$12}__arrow`,
6252
5664
  style: styles.arrow,
6253
5665
  children: /*#__PURE__*/jsx("svg", {
6254
5666
  viewBox: "0 0 14 14",
@@ -6265,7 +5677,7 @@ const _InnerPopover = forwardRef((props, ref) => {
6265
5677
  })
6266
5678
  }) : null;
6267
5679
  });
6268
- _InnerPopover.displayName = COMPONENT_NAME$11;
5680
+ _InnerPopover.displayName = COMPONENT_NAME$12;
6269
5681
 
6270
5682
  /**
6271
5683
  * Popover component.
@@ -6277,9 +5689,9 @@ _InnerPopover.displayName = COMPONENT_NAME$11;
6277
5689
  const Popover = skipRender(
6278
5690
  // Skip render in SSR
6279
5691
  () => Boolean(DOCUMENT), _InnerPopover);
6280
- Popover.displayName = COMPONENT_NAME$11;
6281
- Popover.className = CLASSNAME$11;
6282
- Popover.defaultProps = DEFAULT_PROPS$P;
5692
+ Popover.displayName = COMPONENT_NAME$12;
5693
+ Popover.className = CLASSNAME$12;
5694
+ Popover.defaultProps = DEFAULT_PROPS$Q;
6283
5695
 
6284
5696
  // The error margin in px we want to have for triggering infinite scroll
6285
5697
  const SCROLL_TRIGGER_MARGIN = 5;
@@ -6325,17 +5737,17 @@ const useInfiniteScroll = (ref, callback, callbackOnMount = false, scrollTrigger
6325
5737
  /**
6326
5738
  * Component display name.
6327
5739
  */
6328
- const COMPONENT_NAME$10 = 'Dropdown';
5740
+ const COMPONENT_NAME$11 = 'Dropdown';
6329
5741
 
6330
5742
  /**
6331
5743
  * Component default class name and class prefix.
6332
5744
  */
6333
- const CLASSNAME$10 = getRootClassName(COMPONENT_NAME$10);
5745
+ const CLASSNAME$11 = getRootClassName(COMPONENT_NAME$11);
6334
5746
 
6335
5747
  /**
6336
5748
  * Component default props.
6337
5749
  */
6338
- const DEFAULT_PROPS$O = {
5750
+ const DEFAULT_PROPS$P = {
6339
5751
  closeOnClick: true,
6340
5752
  closeOnClickAway: true,
6341
5753
  closeOnEscape: true,
@@ -6358,18 +5770,18 @@ const Dropdown = forwardRef((props, ref) => {
6358
5770
  anchorRef,
6359
5771
  children,
6360
5772
  className,
6361
- closeOnClick = DEFAULT_PROPS$O.closeOnClick,
6362
- closeOnClickAway = DEFAULT_PROPS$O.closeOnClickAway,
6363
- closeOnEscape = DEFAULT_PROPS$O.closeOnEscape,
6364
- fitToAnchorWidth = DEFAULT_PROPS$O.fitToAnchorWidth,
6365
- fitWithinViewportHeight = DEFAULT_PROPS$O.fitWithinViewportHeight,
5773
+ closeOnClick = DEFAULT_PROPS$P.closeOnClick,
5774
+ closeOnClickAway = DEFAULT_PROPS$P.closeOnClickAway,
5775
+ closeOnEscape = DEFAULT_PROPS$P.closeOnEscape,
5776
+ fitToAnchorWidth = DEFAULT_PROPS$P.fitToAnchorWidth,
5777
+ fitWithinViewportHeight = DEFAULT_PROPS$P.fitWithinViewportHeight,
6366
5778
  isOpen,
6367
5779
  offset,
6368
- focusAnchorOnClose = DEFAULT_PROPS$O.focusAnchorOnClose,
5780
+ focusAnchorOnClose = DEFAULT_PROPS$P.focusAnchorOnClose,
6369
5781
  onClose,
6370
5782
  onInfiniteScroll,
6371
- placement = DEFAULT_PROPS$O.placement,
6372
- shouldFocusOnOpen = DEFAULT_PROPS$O.shouldFocusOnOpen,
5783
+ placement = DEFAULT_PROPS$P.placement,
5784
+ shouldFocusOnOpen = DEFAULT_PROPS$P.shouldFocusOnOpen,
6373
5785
  zIndex,
6374
5786
  ...forwardedProps
6375
5787
  } = props;
@@ -6394,7 +5806,7 @@ const Dropdown = forwardRef((props, ref) => {
6394
5806
  ...forwardedProps,
6395
5807
  focusAnchorOnClose: focusAnchorOnClose,
6396
5808
  anchorRef: anchorRef,
6397
- className: classNames(className, CLASSNAME$10),
5809
+ className: classNames(className, CLASSNAME$11),
6398
5810
  elevation: 0,
6399
5811
  closeOnClickAway: closeOnClickAway,
6400
5812
  closeOnEscape: closeOnEscape,
@@ -6407,30 +5819,30 @@ const Dropdown = forwardRef((props, ref) => {
6407
5819
  placement: placement,
6408
5820
  zIndex: zIndex,
6409
5821
  children: /*#__PURE__*/jsx("div", {
6410
- className: `${CLASSNAME$10}__menu`,
5822
+ className: `${CLASSNAME$11}__menu`,
6411
5823
  ref: innerRef,
6412
5824
  children: popperElement
6413
5825
  })
6414
5826
  }) : null;
6415
5827
  });
6416
- Dropdown.displayName = COMPONENT_NAME$10;
6417
- Dropdown.className = CLASSNAME$10;
6418
- Dropdown.defaultProps = DEFAULT_PROPS$O;
5828
+ Dropdown.displayName = COMPONENT_NAME$11;
5829
+ Dropdown.className = CLASSNAME$11;
5830
+ Dropdown.defaultProps = DEFAULT_PROPS$P;
6419
5831
 
6420
5832
  /**
6421
5833
  * Component display name.
6422
5834
  */
6423
- const COMPONENT_NAME$$ = 'ExpansionPanel';
5835
+ const COMPONENT_NAME$10 = 'ExpansionPanel';
6424
5836
 
6425
5837
  /**
6426
5838
  * Component default class name and class prefix.
6427
5839
  */
6428
- const CLASSNAME$$ = getRootClassName(COMPONENT_NAME$$);
5840
+ const CLASSNAME$10 = getRootClassName(COMPONENT_NAME$10);
6429
5841
 
6430
5842
  /**
6431
5843
  * Component default props.
6432
5844
  */
6433
- const DEFAULT_PROPS$N = {
5845
+ const DEFAULT_PROPS$O = {
6434
5846
  closeMode: 'unmount'
6435
5847
  };
6436
5848
  const isDragHandle = isComponent(DragHandle);
@@ -6448,7 +5860,7 @@ const ExpansionPanel = forwardRef((props, ref) => {
6448
5860
  const defaultTheme = useTheme() || Theme.light;
6449
5861
  const {
6450
5862
  className,
6451
- closeMode = DEFAULT_PROPS$N.closeMode,
5863
+ closeMode = DEFAULT_PROPS$O.closeMode,
6452
5864
  children: anyChildren,
6453
5865
  hasBackground,
6454
5866
  hasHeaderDivider,
@@ -6469,7 +5881,7 @@ const ExpansionPanel = forwardRef((props, ref) => {
6469
5881
  // Either take the header in children or create one with the label.
6470
5882
  const headerProps = /*#__PURE__*/React__default.isValidElement(header) ? header.props : {};
6471
5883
  const headerContent = !isEmpty(headerProps.children) ? headerProps.children : /*#__PURE__*/jsx("span", {
6472
- className: `${CLASSNAME$$}__label`,
5884
+ className: `${CLASSNAME$10}__label`,
6473
5885
  children: label
6474
5886
  });
6475
5887
  const toggleOpen = event => {
@@ -6492,7 +5904,7 @@ const ExpansionPanel = forwardRef((props, ref) => {
6492
5904
  isClose: !isOpen,
6493
5905
  isDraggable: Boolean(dragHandle),
6494
5906
  isOpen,
6495
- prefix: CLASSNAME$$,
5907
+ prefix: CLASSNAME$10,
6496
5908
  theme
6497
5909
  }));
6498
5910
  const wrapperRef = useRef(null);
@@ -6529,17 +5941,17 @@ const ExpansionPanel = forwardRef((props, ref) => {
6529
5941
  ...forwardedProps,
6530
5942
  className: rootClassName,
6531
5943
  children: [/*#__PURE__*/jsxs("header", {
6532
- className: `${CLASSNAME$$}__header`,
5944
+ className: `${CLASSNAME$10}__header`,
6533
5945
  onClick: toggleOpen,
6534
5946
  children: [dragHandle && /*#__PURE__*/jsx("div", {
6535
- className: `${CLASSNAME$$}__header-drag`,
5947
+ className: `${CLASSNAME$10}__header-drag`,
6536
5948
  children: dragHandle
6537
5949
  }), /*#__PURE__*/jsx("div", {
6538
5950
  ...headerProps,
6539
- className: `${CLASSNAME$$}__header-content`,
5951
+ className: `${CLASSNAME$10}__header-content`,
6540
5952
  children: headerContent
6541
5953
  }), /*#__PURE__*/jsx("div", {
6542
- className: `${CLASSNAME$$}__header-toggle`,
5954
+ className: `${CLASSNAME$10}__header-toggle`,
6543
5955
  children: /*#__PURE__*/jsx(IconButton, {
6544
5956
  ...toggleButtonProps,
6545
5957
  color: color,
@@ -6549,28 +5961,28 @@ const ExpansionPanel = forwardRef((props, ref) => {
6549
5961
  })
6550
5962
  })]
6551
5963
  }), /*#__PURE__*/jsx("div", {
6552
- className: `${CLASSNAME$$}__wrapper`,
5964
+ className: `${CLASSNAME$10}__wrapper`,
6553
5965
  ref: wrapperRef,
6554
5966
  children: (isOpen || isChildrenVisible) && /*#__PURE__*/jsxs("div", {
6555
- className: `${CLASSNAME$$}__container`,
5967
+ className: `${CLASSNAME$10}__container`,
6556
5968
  children: [/*#__PURE__*/jsx("div", {
6557
- className: `${CLASSNAME$$}__content`,
5969
+ className: `${CLASSNAME$10}__content`,
6558
5970
  children: content
6559
5971
  }), footer && /*#__PURE__*/jsx("div", {
6560
- className: `${CLASSNAME$$}__footer`,
5972
+ className: `${CLASSNAME$10}__footer`,
6561
5973
  children: footer
6562
5974
  })]
6563
5975
  })
6564
5976
  })]
6565
5977
  });
6566
5978
  });
6567
- ExpansionPanel.displayName = COMPONENT_NAME$$;
6568
- ExpansionPanel.className = CLASSNAME$$;
6569
- ExpansionPanel.defaultProps = DEFAULT_PROPS$N;
5979
+ ExpansionPanel.displayName = COMPONENT_NAME$10;
5980
+ ExpansionPanel.className = CLASSNAME$10;
5981
+ ExpansionPanel.defaultProps = DEFAULT_PROPS$O;
6570
5982
 
6571
- const COMPONENT_NAME$_ = 'Flag';
6572
- const CLASSNAME$_ = getRootClassName(COMPONENT_NAME$_);
6573
- const DEFAULT_PROPS$M = {};
5983
+ const COMPONENT_NAME$$ = 'Flag';
5984
+ const CLASSNAME$$ = getRootClassName(COMPONENT_NAME$$);
5985
+ const DEFAULT_PROPS$N = {};
6574
5986
 
6575
5987
  /**
6576
5988
  * Flag component.
@@ -6595,7 +6007,7 @@ const Flag = forwardRef((props, ref) => {
6595
6007
  return /*#__PURE__*/jsxs("div", {
6596
6008
  ...forwardedProps,
6597
6009
  className: classNames(className, handleBasicClasses({
6598
- prefix: CLASSNAME$_,
6010
+ prefix: CLASSNAME$$,
6599
6011
  color: flagColor,
6600
6012
  isTruncated
6601
6013
  })),
@@ -6603,29 +6015,29 @@ const Flag = forwardRef((props, ref) => {
6603
6015
  children: [icon && /*#__PURE__*/jsx(Icon, {
6604
6016
  icon: icon,
6605
6017
  size: Size.xxs,
6606
- className: `${CLASSNAME$_}__icon`
6018
+ className: `${CLASSNAME$$}__icon`
6607
6019
  }), /*#__PURE__*/jsx(Text, {
6608
6020
  as: "span",
6609
6021
  truncate: isTruncated,
6610
6022
  typography: "overline",
6611
- className: `${CLASSNAME$_}__label`,
6023
+ className: `${CLASSNAME$$}__label`,
6612
6024
  children: label
6613
6025
  })]
6614
6026
  });
6615
6027
  });
6616
- Flag.displayName = COMPONENT_NAME$_;
6617
- Flag.className = CLASSNAME$_;
6618
- Flag.defaultProps = DEFAULT_PROPS$M;
6028
+ Flag.displayName = COMPONENT_NAME$$;
6029
+ Flag.className = CLASSNAME$$;
6030
+ Flag.defaultProps = DEFAULT_PROPS$N;
6619
6031
 
6620
6032
  /**
6621
6033
  * Component display name.
6622
6034
  */
6623
- const COMPONENT_NAME$Z = 'FlexBox';
6035
+ const COMPONENT_NAME$_ = 'FlexBox';
6624
6036
 
6625
6037
  /**
6626
6038
  * Component default class name and class prefix.
6627
6039
  */
6628
- const CLASSNAME$Z = getRootClassName(COMPONENT_NAME$Z);
6040
+ const CLASSNAME$_ = getRootClassName(COMPONENT_NAME$_);
6629
6041
 
6630
6042
  /**
6631
6043
  * FlexBox component.
@@ -6653,32 +6065,32 @@ const FlexBox = forwardRef((props, ref) => {
6653
6065
  ref: ref,
6654
6066
  ...forwardedProps,
6655
6067
  className: classNames(className, handleBasicClasses({
6656
- prefix: CLASSNAME$Z,
6068
+ prefix: CLASSNAME$_,
6657
6069
  orientation: orientation ?? (wrap || hAlign || vAlign ? Orientation.horizontal : null),
6658
6070
  vAlign,
6659
6071
  hAlign,
6660
6072
  gap
6661
- }), wrap && `${CLASSNAME$Z}--wrap`, fillSpace && `${CLASSNAME$Z}--fill-space`, noShrink && `${CLASSNAME$Z}--no-shrink`, marginAuto && castArray(marginAuto).map(align => `${CLASSNAME$Z}--margin-auto-${align}`)),
6073
+ }), wrap && `${CLASSNAME$_}--wrap`, fillSpace && `${CLASSNAME$_}--fill-space`, noShrink && `${CLASSNAME$_}--no-shrink`, marginAuto && castArray(marginAuto).map(align => `${CLASSNAME$_}--margin-auto-${align}`)),
6662
6074
  children: children
6663
6075
  });
6664
6076
  });
6665
- FlexBox.displayName = COMPONENT_NAME$Z;
6666
- FlexBox.className = CLASSNAME$Z;
6077
+ FlexBox.displayName = COMPONENT_NAME$_;
6078
+ FlexBox.className = CLASSNAME$_;
6667
6079
 
6668
6080
  /**
6669
6081
  * Component display name.
6670
6082
  */
6671
- const COMPONENT_NAME$Y = 'GenericBlock';
6083
+ const COMPONENT_NAME$Z = 'GenericBlock';
6672
6084
 
6673
6085
  /**
6674
6086
  * Component default class name and class prefix.
6675
6087
  */
6676
- const CLASSNAME$Y = getRootClassName(COMPONENT_NAME$Y);
6088
+ const CLASSNAME$Z = getRootClassName(COMPONENT_NAME$Z);
6677
6089
 
6678
6090
  /**
6679
6091
  * Component default props.
6680
6092
  */
6681
- const DEFAULT_PROPS$L = {
6093
+ const DEFAULT_PROPS$M = {
6682
6094
  gap: Size.big,
6683
6095
  orientation: Orientation.horizontal
6684
6096
  };
@@ -6708,8 +6120,8 @@ const BaseGenericBlock = forwardRef((props, ref) => {
6708
6120
  children,
6709
6121
  actions,
6710
6122
  actionsProps,
6711
- gap = DEFAULT_PROPS$L.gap,
6712
- orientation = DEFAULT_PROPS$L.orientation,
6123
+ gap = DEFAULT_PROPS$M.gap,
6124
+ orientation = DEFAULT_PROPS$M.orientation,
6713
6125
  contentProps,
6714
6126
  ...forwardedProps
6715
6127
  } = props;
@@ -6728,7 +6140,7 @@ const BaseGenericBlock = forwardRef((props, ref) => {
6728
6140
  }, [children]);
6729
6141
  return /*#__PURE__*/jsxs(FlexBox, {
6730
6142
  ref: ref,
6731
- className: classNames(className, CLASSNAME$Y),
6143
+ className: classNames(className, CLASSNAME$Z),
6732
6144
  gap: gap,
6733
6145
  orientation: orientation,
6734
6146
  ...forwardedProps,
@@ -6738,7 +6150,7 @@ const BaseGenericBlock = forwardRef((props, ref) => {
6738
6150
  hAlign: forwardedProps.hAlign,
6739
6151
  ...figureProps,
6740
6152
  ...sections.figureChildProps,
6741
- className: classNames(figureProps?.className, sections.figureChildProps?.className, `${CLASSNAME$Y}__figure`),
6153
+ className: classNames(figureProps?.className, sections.figureChildProps?.className, `${CLASSNAME$Z}__figure`),
6742
6154
  children: [figure, sections.figureChildProps?.children]
6743
6155
  }), (sections.contentChildProps?.children || sections.otherChildren.length > 0) && /*#__PURE__*/jsxs(FlexBox, {
6744
6156
  ref: sections.contentChild?.ref,
@@ -6748,7 +6160,7 @@ const BaseGenericBlock = forwardRef((props, ref) => {
6748
6160
  hAlign: forwardedProps.hAlign,
6749
6161
  ...contentProps,
6750
6162
  ...sections.contentChildProps,
6751
- className: classNames(contentProps?.className, sections.contentChildProps?.className, `${CLASSNAME$Y}__content`),
6163
+ className: classNames(contentProps?.className, sections.contentChildProps?.className, `${CLASSNAME$Z}__content`),
6752
6164
  children: [sections.contentChildProps?.children, sections.otherChildren]
6753
6165
  }), (actions || sections.actionsChildProps?.children) && /*#__PURE__*/jsxs(FlexBox, {
6754
6166
  ref: sections.actionsChild?.ref,
@@ -6756,14 +6168,14 @@ const BaseGenericBlock = forwardRef((props, ref) => {
6756
6168
  hAlign: forwardedProps.hAlign,
6757
6169
  ...actionsProps,
6758
6170
  ...sections.actionsChildProps,
6759
- className: classNames(actionsProps?.className, sections.actionsChildProps?.className, `${CLASSNAME$Y}__actions`),
6171
+ className: classNames(actionsProps?.className, sections.actionsChildProps?.className, `${CLASSNAME$Z}__actions`),
6760
6172
  children: [actions, sections.actionsChildProps?.children]
6761
6173
  })]
6762
6174
  });
6763
6175
  });
6764
- BaseGenericBlock.displayName = COMPONENT_NAME$Y;
6765
- BaseGenericBlock.className = CLASSNAME$Y;
6766
- BaseGenericBlock.defaultProps = DEFAULT_PROPS$L;
6176
+ BaseGenericBlock.displayName = COMPONENT_NAME$Z;
6177
+ BaseGenericBlock.className = CLASSNAME$Z;
6178
+ BaseGenericBlock.defaultProps = DEFAULT_PROPS$M;
6767
6179
  const GenericBlock = Object.assign(BaseGenericBlock, {
6768
6180
  Figure,
6769
6181
  Content,
@@ -6834,17 +6246,17 @@ function wrapChildrenIconWithSpaces(children) {
6834
6246
  /**
6835
6247
  * Component display name.
6836
6248
  */
6837
- const COMPONENT_NAME$X = 'Text';
6249
+ const COMPONENT_NAME$Y = 'Text';
6838
6250
 
6839
6251
  /**
6840
6252
  * Component default class name and class prefix.
6841
6253
  */
6842
- const CLASSNAME$X = getRootClassName(COMPONENT_NAME$X);
6254
+ const CLASSNAME$Y = getRootClassName(COMPONENT_NAME$Y);
6843
6255
 
6844
6256
  /**
6845
6257
  * Component default props.
6846
6258
  */
6847
- const DEFAULT_PROPS$K = {};
6259
+ const DEFAULT_PROPS$L = {};
6848
6260
 
6849
6261
  /**
6850
6262
  * Text component.
@@ -6891,10 +6303,10 @@ const Text = forwardRef((props, ref) => {
6891
6303
  return /*#__PURE__*/jsx(Component, {
6892
6304
  ref: useMergeRefs(ref, labelRef),
6893
6305
  className: classNames(className, handleBasicClasses({
6894
- prefix: CLASSNAME$X,
6306
+ prefix: CLASSNAME$Y,
6895
6307
  isTruncated: isTruncated && !isTruncatedMultiline,
6896
6308
  isTruncatedMultiline
6897
- }), typographyClass, fontColorClass(color, colorVariant), noWrap && `${CLASSNAME$X}--no-wrap`),
6309
+ }), typographyClass, fontColorClass(color, colorVariant), noWrap && `${CLASSNAME$Y}--no-wrap`),
6898
6310
  title: tooltipLabel,
6899
6311
  style: {
6900
6312
  ...truncateLinesStyle,
@@ -6905,9 +6317,9 @@ const Text = forwardRef((props, ref) => {
6905
6317
  children: wrapChildrenIconWithSpaces(children)
6906
6318
  });
6907
6319
  });
6908
- Text.displayName = COMPONENT_NAME$X;
6909
- Text.className = CLASSNAME$X;
6910
- Text.defaultProps = DEFAULT_PROPS$K;
6320
+ Text.displayName = COMPONENT_NAME$Y;
6321
+ Text.className = CLASSNAME$Y;
6322
+ Text.defaultProps = DEFAULT_PROPS$L;
6911
6323
 
6912
6324
  /** The maximum authorized heading level. */
6913
6325
  const MAX_HEADING_LEVEL = 6;
@@ -6944,17 +6356,17 @@ const useHeadingLevel = () => {
6944
6356
  /**
6945
6357
  * Component display name.
6946
6358
  */
6947
- const COMPONENT_NAME$W = 'Heading';
6359
+ const COMPONENT_NAME$X = 'Heading';
6948
6360
 
6949
6361
  /**
6950
6362
  * Component default class name and class prefix.
6951
6363
  */
6952
- const CLASSNAME$W = getRootClassName(COMPONENT_NAME$W);
6364
+ const CLASSNAME$X = getRootClassName(COMPONENT_NAME$X);
6953
6365
 
6954
6366
  /**
6955
6367
  * Component default props.
6956
6368
  */
6957
- const DEFAULT_PROPS$J = {};
6369
+ const DEFAULT_PROPS$K = {};
6958
6370
 
6959
6371
  /**
6960
6372
  * Renders a heading component.
@@ -6974,16 +6386,16 @@ const Heading = forwardRef((props, ref) => {
6974
6386
  const computedHeadingElement = as || headingElement;
6975
6387
  return /*#__PURE__*/jsx(Text, {
6976
6388
  ref: ref,
6977
- className: classNames(className, CLASSNAME$W),
6389
+ className: classNames(className, CLASSNAME$X),
6978
6390
  as: computedHeadingElement,
6979
6391
  typography: DEFAULT_TYPOGRAPHY_BY_LEVEL[computedHeadingElement],
6980
6392
  ...forwardedProps,
6981
6393
  children: children
6982
6394
  });
6983
6395
  });
6984
- Heading.displayName = COMPONENT_NAME$W;
6985
- Heading.className = CLASSNAME$W;
6986
- Heading.defaultProps = DEFAULT_PROPS$J;
6396
+ Heading.displayName = COMPONENT_NAME$X;
6397
+ Heading.className = CLASSNAME$X;
6398
+ Heading.defaultProps = DEFAULT_PROPS$K;
6987
6399
 
6988
6400
  /**
6989
6401
  * Provide a new heading level context.
@@ -7011,17 +6423,17 @@ const HeadingLevelProvider = ({
7011
6423
  /**
7012
6424
  * Component display name.
7013
6425
  */
7014
- const COMPONENT_NAME$V = 'Grid';
6426
+ const COMPONENT_NAME$W = 'Grid';
7015
6427
 
7016
6428
  /**
7017
6429
  * Component default class name and class prefix.
7018
6430
  */
7019
- const CLASSNAME$V = getRootClassName(COMPONENT_NAME$V);
6431
+ const CLASSNAME$W = getRootClassName(COMPONENT_NAME$W);
7020
6432
 
7021
6433
  /**
7022
6434
  * Component default props.
7023
6435
  */
7024
- const DEFAULT_PROPS$I = {
6436
+ const DEFAULT_PROPS$J = {
7025
6437
  orientation: Orientation.horizontal,
7026
6438
  wrap: 'nowrap'
7027
6439
  };
@@ -7039,20 +6451,20 @@ const Grid = forwardRef((props, ref) => {
7039
6451
  className,
7040
6452
  gutter,
7041
6453
  hAlign,
7042
- orientation = DEFAULT_PROPS$I.orientation,
6454
+ orientation = DEFAULT_PROPS$J.orientation,
7043
6455
  vAlign,
7044
- wrap = DEFAULT_PROPS$I.wrap,
6456
+ wrap = DEFAULT_PROPS$J.wrap,
7045
6457
  ...forwardedProps
7046
6458
  } = props;
7047
6459
  return /*#__PURE__*/jsx("div", {
7048
6460
  ref: ref,
7049
6461
  ...forwardedProps,
7050
- className: classNames(className, `${CLASSNAME$V}-container`, {
7051
- [`${CLASSNAME$V}--h-align-${hAlign}`]: hAlign
6462
+ className: classNames(className, `${CLASSNAME$W}-container`, {
6463
+ [`${CLASSNAME$W}--h-align-${hAlign}`]: hAlign
7052
6464
  }, {
7053
- [`${CLASSNAME$V}--v-align-${vAlign}`]: vAlign
6465
+ [`${CLASSNAME$W}--v-align-${vAlign}`]: vAlign
7054
6466
  }, handleBasicClasses({
7055
- prefix: CLASSNAME$V,
6467
+ prefix: CLASSNAME$W,
7056
6468
  orientation,
7057
6469
  wrap,
7058
6470
  gutter
@@ -7060,19 +6472,19 @@ const Grid = forwardRef((props, ref) => {
7060
6472
  children: children
7061
6473
  });
7062
6474
  });
7063
- Grid.displayName = COMPONENT_NAME$V;
7064
- Grid.className = CLASSNAME$V;
7065
- Grid.defaultProps = DEFAULT_PROPS$I;
6475
+ Grid.displayName = COMPONENT_NAME$W;
6476
+ Grid.className = CLASSNAME$W;
6477
+ Grid.defaultProps = DEFAULT_PROPS$J;
7066
6478
 
7067
6479
  /**
7068
6480
  * Component display name.
7069
6481
  */
7070
- const COMPONENT_NAME$U = 'GridItem';
6482
+ const COMPONENT_NAME$V = 'GridItem';
7071
6483
 
7072
6484
  /**
7073
6485
  * Component default class name and class prefix.
7074
6486
  */
7075
- const CLASSNAME$U = getRootClassName(COMPONENT_NAME$U);
6487
+ const CLASSNAME$V = getRootClassName(COMPONENT_NAME$V);
7076
6488
 
7077
6489
  /**
7078
6490
  * GridItem component.
@@ -7094,7 +6506,7 @@ const GridItem = forwardRef((props, ref) => {
7094
6506
  ref: ref,
7095
6507
  ...forwardedProps,
7096
6508
  className: classNames(className, handleBasicClasses({
7097
- prefix: CLASSNAME$U,
6509
+ prefix: CLASSNAME$V,
7098
6510
  width,
7099
6511
  order,
7100
6512
  align
@@ -7102,23 +6514,23 @@ const GridItem = forwardRef((props, ref) => {
7102
6514
  children: children
7103
6515
  });
7104
6516
  });
7105
- GridItem.displayName = COMPONENT_NAME$U;
7106
- GridItem.className = CLASSNAME$U;
6517
+ GridItem.displayName = COMPONENT_NAME$V;
6518
+ GridItem.className = CLASSNAME$V;
7107
6519
 
7108
6520
  /**
7109
6521
  * Component display name.
7110
6522
  */
7111
- const COMPONENT_NAME$T = 'GridColumn';
6523
+ const COMPONENT_NAME$U = 'GridColumn';
7112
6524
 
7113
6525
  /**
7114
6526
  * Component default class name and class prefix.
7115
6527
  */
7116
- const CLASSNAME$T = getRootClassName(COMPONENT_NAME$T);
6528
+ const CLASSNAME$U = getRootClassName(COMPONENT_NAME$U);
7117
6529
 
7118
6530
  /**
7119
6531
  * Component default props.
7120
6532
  */
7121
- const DEFAULT_PROPS$H = {};
6533
+ const DEFAULT_PROPS$I = {};
7122
6534
 
7123
6535
  /**
7124
6536
  * The GridColumn is a layout component that can display children in a grid
@@ -7143,7 +6555,7 @@ const GridColumn = forwardRef((props, ref) => {
7143
6555
  return /*#__PURE__*/jsx(Component, {
7144
6556
  ...forwardedProps,
7145
6557
  ref: ref,
7146
- className: classNames(className, CLASSNAME$T),
6558
+ className: classNames(className, CLASSNAME$U),
7147
6559
  style: {
7148
6560
  ...style,
7149
6561
  ['--lumx-grid-column-item-min-width']: isInteger(itemMinWidth) && `${itemMinWidth}px`,
@@ -7153,24 +6565,24 @@ const GridColumn = forwardRef((props, ref) => {
7153
6565
  children: children
7154
6566
  });
7155
6567
  });
7156
- GridColumn.displayName = COMPONENT_NAME$T;
7157
- GridColumn.className = CLASSNAME$T;
7158
- GridColumn.defaultProps = DEFAULT_PROPS$H;
6568
+ GridColumn.displayName = COMPONENT_NAME$U;
6569
+ GridColumn.className = CLASSNAME$U;
6570
+ GridColumn.defaultProps = DEFAULT_PROPS$I;
7159
6571
 
7160
6572
  /**
7161
6573
  * Component display name.
7162
6574
  */
7163
- const COMPONENT_NAME$S = 'Icon';
6575
+ const COMPONENT_NAME$T = 'Icon';
7164
6576
 
7165
6577
  /**
7166
6578
  * Component default class name and class prefix.
7167
6579
  */
7168
- const CLASSNAME$S = getRootClassName(COMPONENT_NAME$S);
6580
+ const CLASSNAME$T = getRootClassName(COMPONENT_NAME$T);
7169
6581
 
7170
6582
  /**
7171
6583
  * Component default props.
7172
6584
  */
7173
- const DEFAULT_PROPS$G = {};
6585
+ const DEFAULT_PROPS$H = {};
7174
6586
 
7175
6587
  /**
7176
6588
  * Icon component.
@@ -7224,10 +6636,10 @@ const Icon = forwardRef((props, ref) => {
7224
6636
  color: iconColor,
7225
6637
  colorVariant: iconColorVariant,
7226
6638
  hasShape,
7227
- prefix: CLASSNAME$S,
6639
+ prefix: CLASSNAME$T,
7228
6640
  theme,
7229
6641
  size: iconSize
7230
- }), !hasShape && `${CLASSNAME$S}--no-shape`, !hasShape && iconColor === ColorPalette.yellow && icon === mdiAlertCircle && `${CLASSNAME$S}--has-dark-layer`, `${CLASSNAME$S}--path`),
6642
+ }), !hasShape && `${CLASSNAME$T}--no-shape`, !hasShape && iconColor === ColorPalette.yellow && icon === mdiAlertCircle && `${CLASSNAME$T}--has-dark-layer`, `${CLASSNAME$T}--path`),
7231
6643
  children: /*#__PURE__*/jsx("svg", {
7232
6644
  "aria-hidden": alt ? undefined : 'true',
7233
6645
  role: alt ? 'img' : undefined,
@@ -7246,9 +6658,9 @@ const Icon = forwardRef((props, ref) => {
7246
6658
  })
7247
6659
  });
7248
6660
  });
7249
- Icon.displayName = COMPONENT_NAME$S;
7250
- Icon.className = CLASSNAME$S;
7251
- Icon.defaultProps = DEFAULT_PROPS$G;
6661
+ Icon.displayName = COMPONENT_NAME$T;
6662
+ Icon.className = CLASSNAME$T;
6663
+ Icon.defaultProps = DEFAULT_PROPS$H;
7252
6664
 
7253
6665
  /** Internal component used to render image captions */
7254
6666
  const ImageCaption = props => {
@@ -7333,17 +6745,17 @@ const ImageBlockCaptionPosition = {
7333
6745
  /**
7334
6746
  * Component display name.
7335
6747
  */
7336
- const COMPONENT_NAME$R = 'ImageBlock';
6748
+ const COMPONENT_NAME$S = 'ImageBlock';
7337
6749
 
7338
6750
  /**
7339
6751
  * Component default class name and class prefix.
7340
6752
  */
7341
- const CLASSNAME$R = getRootClassName(COMPONENT_NAME$R);
6753
+ const CLASSNAME$S = getRootClassName(COMPONENT_NAME$S);
7342
6754
 
7343
6755
  /**
7344
6756
  * Component default props.
7345
6757
  */
7346
- const DEFAULT_PROPS$F = {
6758
+ const DEFAULT_PROPS$G = {
7347
6759
  captionPosition: ImageBlockCaptionPosition.below,
7348
6760
  align: Alignment.left
7349
6761
  };
@@ -7359,9 +6771,9 @@ const ImageBlock = forwardRef((props, ref) => {
7359
6771
  const defaultTheme = useTheme() || Theme.light;
7360
6772
  const {
7361
6773
  actions,
7362
- align = DEFAULT_PROPS$F.align,
6774
+ align = DEFAULT_PROPS$G.align,
7363
6775
  alt,
7364
- captionPosition = DEFAULT_PROPS$F.captionPosition,
6776
+ captionPosition = DEFAULT_PROPS$G.captionPosition,
7365
6777
  captionStyle,
7366
6778
  className,
7367
6779
  description,
@@ -7380,15 +6792,15 @@ const ImageBlock = forwardRef((props, ref) => {
7380
6792
  ref: ref,
7381
6793
  ...forwardedProps,
7382
6794
  className: classNames(className, handleBasicClasses({
7383
- prefix: CLASSNAME$R,
6795
+ prefix: CLASSNAME$S,
7384
6796
  captionPosition,
7385
6797
  align,
7386
6798
  size,
7387
6799
  theme
7388
- }), fillHeight && `${CLASSNAME$R}--fill-height`),
6800
+ }), fillHeight && `${CLASSNAME$S}--fill-height`),
7389
6801
  children: [/*#__PURE__*/jsx(Thumbnail, {
7390
6802
  ...thumbnailProps,
7391
- className: classNames(`${CLASSNAME$R}__image`, thumbnailProps?.className),
6803
+ className: classNames(`${CLASSNAME$S}__image`, thumbnailProps?.className),
7392
6804
  fillHeight: fillHeight,
7393
6805
  align: align,
7394
6806
  image: image,
@@ -7397,7 +6809,7 @@ const ImageBlock = forwardRef((props, ref) => {
7397
6809
  alt: alt || title
7398
6810
  }), /*#__PURE__*/jsx(ImageCaption, {
7399
6811
  as: "figcaption",
7400
- baseClassName: CLASSNAME$R,
6812
+ baseClassName: CLASSNAME$S,
7401
6813
  theme: theme,
7402
6814
  title: title,
7403
6815
  titleProps: titleProps,
@@ -7408,24 +6820,24 @@ const ImageBlock = forwardRef((props, ref) => {
7408
6820
  align: align,
7409
6821
  truncate: captionPosition === 'over'
7410
6822
  }), actions && /*#__PURE__*/jsx("div", {
7411
- className: `${CLASSNAME$R}__actions`,
6823
+ className: `${CLASSNAME$S}__actions`,
7412
6824
  children: actions
7413
6825
  })]
7414
6826
  });
7415
6827
  });
7416
- ImageBlock.displayName = COMPONENT_NAME$R;
7417
- ImageBlock.className = CLASSNAME$R;
7418
- ImageBlock.defaultProps = DEFAULT_PROPS$F;
6828
+ ImageBlock.displayName = COMPONENT_NAME$S;
6829
+ ImageBlock.className = CLASSNAME$S;
6830
+ ImageBlock.defaultProps = DEFAULT_PROPS$G;
7419
6831
 
7420
6832
  /**
7421
6833
  * Component display name.
7422
6834
  */
7423
- const COMPONENT_NAME$Q = 'ImageLightbox';
6835
+ const COMPONENT_NAME$R = 'ImageLightbox';
7424
6836
 
7425
6837
  /**
7426
6838
  * Component default class name and class prefix.
7427
6839
  */
7428
- const CLASSNAME$Q = getRootClassName(COMPONENT_NAME$Q);
6840
+ const CLASSNAME$R = getRootClassName(COMPONENT_NAME$R);
7429
6841
 
7430
6842
  /**
7431
6843
  * Observe element size (only works if it's size depends on the window size).
@@ -7735,12 +7147,12 @@ const ImageSlide = /*#__PURE__*/React__default.memo(props => {
7735
7147
  // Make it accessible to keyboard nav when the zone is scrollable
7736
7148
  ,
7737
7149
  tabIndex: isScrollable ? 0 : undefined,
7738
- className: `${CLASSNAME$Q}__image-slide`,
7150
+ className: `${CLASSNAME$R}__image-slide`,
7739
7151
  children: /*#__PURE__*/jsx(Thumbnail, {
7740
7152
  imgRef: useMergeRefs(imgRef, propImgRef),
7741
7153
  image: image,
7742
7154
  alt: alt,
7743
- className: `${CLASSNAME$Q}__thumbnail`,
7155
+ className: `${CLASSNAME$R}__thumbnail`,
7744
7156
  imgProps: {
7745
7157
  ...imgProps,
7746
7158
  style: {
@@ -7878,12 +7290,12 @@ const ImageSlideshow = ({
7878
7290
  })
7879
7291
  }), (metadata || slideShowControls || zoomControls) && /*#__PURE__*/jsxs(FlexBox, {
7880
7292
  ref: footerRef,
7881
- className: `${CLASSNAME$Q}__footer`,
7293
+ className: `${CLASSNAME$R}__footer`,
7882
7294
  orientation: "vertical",
7883
7295
  vAlign: "center",
7884
7296
  gap: "big",
7885
7297
  children: [metadata, /*#__PURE__*/jsxs(FlexBox, {
7886
- className: `${CLASSNAME$Q}__footer-actions`,
7298
+ className: `${CLASSNAME$R}__footer-actions`,
7887
7299
  orientation: "horizontal",
7888
7300
  gap: "regular",
7889
7301
  children: [slideShowControls, zoomControls]
@@ -8003,7 +7415,7 @@ function useImageLightbox(props) {
8003
7415
  viewTransitionName: {
8004
7416
  source: currentImageRef,
8005
7417
  target: triggerImageRefs[currentIndex],
8006
- name: CLASSNAME$Q
7418
+ name: CLASSNAME$R
8007
7419
  }
8008
7420
  });
8009
7421
  }
@@ -8055,7 +7467,7 @@ function useImageLightbox(props) {
8055
7467
  viewTransitionName: {
8056
7468
  source: triggerImage,
8057
7469
  target: currentImageRef,
8058
- name: CLASSNAME$Q
7470
+ name: CLASSNAME$R
8059
7471
  }
8060
7472
  });
8061
7473
  }
@@ -8109,7 +7521,7 @@ const Inner = forwardRef((props, ref) => {
8109
7521
  }, [onClose]);
8110
7522
  return /*#__PURE__*/jsx(Lightbox, {
8111
7523
  ref: ref,
8112
- className: classNames(className, CLASSNAME$Q),
7524
+ className: classNames(className, CLASSNAME$R),
8113
7525
  parentElement: parentElement,
8114
7526
  isOpen: isOpen,
8115
7527
  onClose: onClose,
@@ -8138,8 +7550,8 @@ const Inner = forwardRef((props, ref) => {
8138
7550
  })
8139
7551
  });
8140
7552
  });
8141
- Inner.displayName = COMPONENT_NAME$Q;
8142
- Inner.className = CLASSNAME$Q;
7553
+ Inner.displayName = COMPONENT_NAME$R;
7554
+ Inner.className = CLASSNAME$R;
8143
7555
 
8144
7556
  /**
8145
7557
  * ImageLightbox component.
@@ -8155,17 +7567,17 @@ const ImageLightbox = Object.assign(Inner, {
8155
7567
  /**
8156
7568
  * Component display name.
8157
7569
  */
8158
- const COMPONENT_NAME$P = 'InlineList';
7570
+ const COMPONENT_NAME$Q = 'InlineList';
8159
7571
 
8160
7572
  /**
8161
7573
  * Component default class name and class prefix.
8162
7574
  */
8163
- const CLASSNAME$P = getRootClassName(COMPONENT_NAME$P);
7575
+ const CLASSNAME$Q = getRootClassName(COMPONENT_NAME$Q);
8164
7576
 
8165
7577
  /**
8166
7578
  * Component default props.
8167
7579
  */
8168
- const DEFAULT_PROPS$E = {};
7580
+ const DEFAULT_PROPS$F = {};
8169
7581
 
8170
7582
  /**
8171
7583
  * InlineList component.
@@ -8191,7 +7603,7 @@ const InlineList = forwardRef((props, ref) => {
8191
7603
  jsx("ul", {
8192
7604
  ...forwardedProps,
8193
7605
  ref: ref,
8194
- className: classNames(className, CLASSNAME$P, wrap && `${CLASSNAME$P}--wrap`, fontColorClass(color, colorVariant), typographyClassName)
7606
+ className: classNames(className, CLASSNAME$Q, wrap && `${CLASSNAME$Q}--wrap`, fontColorClass(color, colorVariant), typographyClassName)
8195
7607
  // Lists with removed bullet style can lose their a11y list role on some browsers
8196
7608
  ,
8197
7609
  role: "list",
@@ -8203,9 +7615,9 @@ const InlineList = forwardRef((props, ref) => {
8203
7615
  // eslint-disable-next-line jsx-a11y/no-redundant-roles
8204
7616
  jsxs("li", {
8205
7617
  role: "listitem",
8206
- className: `${CLASSNAME$P}__item`,
7618
+ className: `${CLASSNAME$Q}__item`,
8207
7619
  children: [index !== 0 && /*#__PURE__*/jsx("span", {
8208
- className: `${CLASSNAME$P}__item-separator`,
7620
+ className: `${CLASSNAME$Q}__item-separator`,
8209
7621
  "aria-hidden": "true",
8210
7622
  children: '\u00A0•\u00A0'
8211
7623
  }), child]
@@ -8215,9 +7627,9 @@ const InlineList = forwardRef((props, ref) => {
8215
7627
  })
8216
7628
  );
8217
7629
  });
8218
- InlineList.displayName = COMPONENT_NAME$P;
8219
- InlineList.className = CLASSNAME$P;
8220
- InlineList.defaultProps = DEFAULT_PROPS$E;
7630
+ InlineList.displayName = COMPONENT_NAME$Q;
7631
+ InlineList.className = CLASSNAME$Q;
7632
+ InlineList.defaultProps = DEFAULT_PROPS$F;
8221
7633
 
8222
7634
  const INPUT_HELPER_CONFIGURATION = {
8223
7635
  error: {
@@ -8234,17 +7646,17 @@ const INPUT_HELPER_CONFIGURATION = {
8234
7646
  /**
8235
7647
  * Component display name.
8236
7648
  */
8237
- const COMPONENT_NAME$O = 'InputHelper';
7649
+ const COMPONENT_NAME$P = 'InputHelper';
8238
7650
 
8239
7651
  /**
8240
7652
  * Component default class name and class prefix.
8241
7653
  */
8242
- const CLASSNAME$O = getRootClassName(COMPONENT_NAME$O);
7654
+ const CLASSNAME$P = getRootClassName(COMPONENT_NAME$P);
8243
7655
 
8244
7656
  /**
8245
7657
  * Component default props.
8246
7658
  */
8247
- const DEFAULT_PROPS$D = {
7659
+ const DEFAULT_PROPS$E = {
8248
7660
  kind: Kind.info
8249
7661
  };
8250
7662
 
@@ -8260,7 +7672,7 @@ const InputHelper = forwardRef((props, ref) => {
8260
7672
  const {
8261
7673
  children,
8262
7674
  className,
8263
- kind = DEFAULT_PROPS$D.kind,
7675
+ kind = DEFAULT_PROPS$E.kind,
8264
7676
  theme = defaultTheme,
8265
7677
  ...forwardedProps
8266
7678
  } = props;
@@ -8271,31 +7683,31 @@ const InputHelper = forwardRef((props, ref) => {
8271
7683
  ref: ref,
8272
7684
  ...forwardedProps,
8273
7685
  className: classNames(className, handleBasicClasses({
8274
- prefix: CLASSNAME$O,
7686
+ prefix: CLASSNAME$P,
8275
7687
  color,
8276
7688
  theme
8277
7689
  })),
8278
7690
  children: children
8279
7691
  });
8280
7692
  });
8281
- InputHelper.displayName = COMPONENT_NAME$O;
8282
- InputHelper.className = CLASSNAME$O;
8283
- InputHelper.defaultProps = DEFAULT_PROPS$D;
7693
+ InputHelper.displayName = COMPONENT_NAME$P;
7694
+ InputHelper.className = CLASSNAME$P;
7695
+ InputHelper.defaultProps = DEFAULT_PROPS$E;
8284
7696
 
8285
7697
  /**
8286
7698
  * Component display name.
8287
7699
  */
8288
- const COMPONENT_NAME$N = 'InputLabel';
7700
+ const COMPONENT_NAME$O = 'InputLabel';
8289
7701
 
8290
7702
  /**
8291
7703
  * Component default class name and class prefix.
8292
7704
  */
8293
- const CLASSNAME$N = getRootClassName(COMPONENT_NAME$N);
7705
+ const CLASSNAME$O = getRootClassName(COMPONENT_NAME$O);
8294
7706
 
8295
7707
  /**
8296
7708
  * Component default props.
8297
7709
  */
8298
- const DEFAULT_PROPS$C = {};
7710
+ const DEFAULT_PROPS$D = {};
8299
7711
 
8300
7712
  /**
8301
7713
  * InputLabel component.
@@ -8321,7 +7733,7 @@ const InputLabel = forwardRef((props, ref) => {
8321
7733
  ...forwardedProps,
8322
7734
  htmlFor: htmlFor,
8323
7735
  className: classNames(className, handleBasicClasses({
8324
- prefix: CLASSNAME$N,
7736
+ prefix: CLASSNAME$O,
8325
7737
  isRequired,
8326
7738
  theme,
8327
7739
  hasCustomTypography: Boolean(typography)
@@ -8329,19 +7741,19 @@ const InputLabel = forwardRef((props, ref) => {
8329
7741
  children: children
8330
7742
  });
8331
7743
  });
8332
- InputLabel.displayName = COMPONENT_NAME$N;
8333
- InputLabel.className = CLASSNAME$N;
8334
- InputLabel.defaultProps = DEFAULT_PROPS$C;
7744
+ InputLabel.displayName = COMPONENT_NAME$O;
7745
+ InputLabel.className = CLASSNAME$O;
7746
+ InputLabel.defaultProps = DEFAULT_PROPS$D;
8335
7747
 
8336
7748
  /**
8337
7749
  * Component display name.
8338
7750
  */
8339
- const COMPONENT_NAME$M = 'Lightbox';
7751
+ const COMPONENT_NAME$N = 'Lightbox';
8340
7752
 
8341
7753
  /**
8342
7754
  * Component default class name and class prefix.
8343
7755
  */
8344
- const CLASSNAME$M = getRootClassName(COMPONENT_NAME$M);
7756
+ const CLASSNAME$N = getRootClassName(COMPONENT_NAME$N);
8345
7757
 
8346
7758
  /**
8347
7759
  * Lightbox component.
@@ -8426,7 +7838,7 @@ const Lightbox = forwardRef((props, ref) => {
8426
7838
  role: "dialog",
8427
7839
  tabIndex: -1,
8428
7840
  className: classNames(className, handleBasicClasses({
8429
- prefix: CLASSNAME$M,
7841
+ prefix: CLASSNAME$N,
8430
7842
  isHidden: !isOpen,
8431
7843
  isShown: isOpen || isVisible,
8432
7844
  theme
@@ -8435,7 +7847,7 @@ const Lightbox = forwardRef((props, ref) => {
8435
7847
  zIndex
8436
7848
  },
8437
7849
  children: [closeButtonProps && /*#__PURE__*/jsx("div", {
8438
- className: `${CLASSNAME$M}__close`,
7850
+ className: `${CLASSNAME$N}__close`,
8439
7851
  children: /*#__PURE__*/jsx(IconButton, {
8440
7852
  ...closeButtonProps,
8441
7853
  ref: closeButtonRef,
@@ -8455,7 +7867,7 @@ const Lightbox = forwardRef((props, ref) => {
8455
7867
  childrenRefs: clickAwayRefs,
8456
7868
  children: /*#__PURE__*/jsx("div", {
8457
7869
  ref: childrenRef,
8458
- className: `${CLASSNAME$M}__wrapper`,
7870
+ className: `${CLASSNAME$N}__wrapper`,
8459
7871
  role: "presentation",
8460
7872
  children: children
8461
7873
  })
@@ -8465,18 +7877,18 @@ const Lightbox = forwardRef((props, ref) => {
8465
7877
  })
8466
7878
  });
8467
7879
  });
8468
- Lightbox.displayName = COMPONENT_NAME$M;
8469
- Lightbox.className = CLASSNAME$M;
7880
+ Lightbox.displayName = COMPONENT_NAME$N;
7881
+ Lightbox.className = CLASSNAME$N;
8470
7882
 
8471
7883
  /**
8472
7884
  * Component display name.
8473
7885
  */
8474
- const COMPONENT_NAME$L = 'Link';
7886
+ const COMPONENT_NAME$M = 'Link';
8475
7887
 
8476
7888
  /**
8477
7889
  * Component default class name and class prefix.
8478
7890
  */
8479
- const CLASSNAME$L = getRootClassName(COMPONENT_NAME$L);
7891
+ const CLASSNAME$M = getRootClassName(COMPONENT_NAME$M);
8480
7892
 
8481
7893
  /**
8482
7894
  * Link component.
@@ -8508,7 +7920,7 @@ const Link = forwardRef((props, ref) => {
8508
7920
  ...forwardedProps,
8509
7921
  ...disabledStateProps,
8510
7922
  className: classNames(className, handleBasicClasses({
8511
- prefix: CLASSNAME$L,
7923
+ prefix: CLASSNAME$M,
8512
7924
  color,
8513
7925
  colorVariant,
8514
7926
  hasTypography: !!typography
@@ -8516,34 +7928,34 @@ const Link = forwardRef((props, ref) => {
8516
7928
  children: wrapChildrenIconWithSpaces(/*#__PURE__*/jsxs(Fragment, {
8517
7929
  children: [leftIcon && /*#__PURE__*/jsx(Icon, {
8518
7930
  icon: leftIcon,
8519
- className: `${CLASSNAME$L}__left-icon`
7931
+ className: `${CLASSNAME$M}__left-icon`
8520
7932
  }), children && /*#__PURE__*/jsx("span", {
8521
- className: `${CLASSNAME$L}__content`,
7933
+ className: `${CLASSNAME$M}__content`,
8522
7934
  children: children
8523
7935
  }), rightIcon && /*#__PURE__*/jsx(Icon, {
8524
7936
  icon: rightIcon,
8525
- className: `${CLASSNAME$L}__right-icon`
7937
+ className: `${CLASSNAME$M}__right-icon`
8526
7938
  })]
8527
7939
  }))
8528
7940
  });
8529
7941
  });
8530
- Link.displayName = COMPONENT_NAME$L;
8531
- Link.className = CLASSNAME$L;
7942
+ Link.displayName = COMPONENT_NAME$M;
7943
+ Link.className = CLASSNAME$M;
8532
7944
 
8533
7945
  /**
8534
7946
  * Component display name.
8535
7947
  */
8536
- const COMPONENT_NAME$K = 'LinkPreview';
7948
+ const COMPONENT_NAME$L = 'LinkPreview';
8537
7949
 
8538
7950
  /**
8539
7951
  * Component default class name and class prefix.
8540
7952
  */
8541
- const CLASSNAME$K = getRootClassName(COMPONENT_NAME$K);
7953
+ const CLASSNAME$L = getRootClassName(COMPONENT_NAME$L);
8542
7954
 
8543
7955
  /**
8544
7956
  * Component default props.
8545
7957
  */
8546
- const DEFAULT_PROPS$B = {
7958
+ const DEFAULT_PROPS$C = {
8547
7959
  size: Size.regular,
8548
7960
  titleHeading: 'h2'
8549
7961
  };
@@ -8563,11 +7975,11 @@ const LinkPreview = forwardRef((props, ref) => {
8563
7975
  link,
8564
7976
  linkAs,
8565
7977
  linkProps,
8566
- size = DEFAULT_PROPS$B.size,
7978
+ size = DEFAULT_PROPS$C.size,
8567
7979
  theme = defaultTheme,
8568
7980
  thumbnailProps,
8569
7981
  title,
8570
- titleHeading = DEFAULT_PROPS$B.titleHeading,
7982
+ titleHeading = DEFAULT_PROPS$C.titleHeading,
8571
7983
  ...forwardedProps
8572
7984
  } = props;
8573
7985
  // Use title heading as title wrapper (see DEFAULT_PROPS for the default value).
@@ -8576,14 +7988,14 @@ const LinkPreview = forwardRef((props, ref) => {
8576
7988
  ref: ref,
8577
7989
  ...forwardedProps,
8578
7990
  className: classNames(className, handleBasicClasses({
8579
- prefix: CLASSNAME$K,
7991
+ prefix: CLASSNAME$L,
8580
7992
  size: size === Size.big && thumbnailProps ? Size.big : Size.regular,
8581
7993
  theme
8582
7994
  })),
8583
7995
  children: /*#__PURE__*/jsxs("div", {
8584
- className: `${CLASSNAME$K}__wrapper`,
7996
+ className: `${CLASSNAME$L}__wrapper`,
8585
7997
  children: [thumbnailProps && /*#__PURE__*/jsx("div", {
8586
- className: `${CLASSNAME$K}__thumbnail`,
7998
+ className: `${CLASSNAME$L}__thumbnail`,
8587
7999
  children: /*#__PURE__*/jsx(Thumbnail, {
8588
8000
  ...thumbnailProps,
8589
8001
  linkAs: linkAs,
@@ -8598,9 +8010,9 @@ const LinkPreview = forwardRef((props, ref) => {
8598
8010
  fillHeight: true
8599
8011
  })
8600
8012
  }), /*#__PURE__*/jsxs("div", {
8601
- className: `${CLASSNAME$K}__container`,
8013
+ className: `${CLASSNAME$L}__container`,
8602
8014
  children: [title && /*#__PURE__*/jsx(TitleHeading, {
8603
- className: `${CLASSNAME$K}__title`,
8015
+ className: `${CLASSNAME$L}__title`,
8604
8016
  children: /*#__PURE__*/jsx(Link, {
8605
8017
  ...linkProps,
8606
8018
  linkAs: linkAs,
@@ -8611,14 +8023,14 @@ const LinkPreview = forwardRef((props, ref) => {
8611
8023
  children: title
8612
8024
  })
8613
8025
  }), description && /*#__PURE__*/jsx("p", {
8614
- className: `${CLASSNAME$K}__description`,
8026
+ className: `${CLASSNAME$L}__description`,
8615
8027
  children: description
8616
8028
  }), /*#__PURE__*/jsx("div", {
8617
- className: `${CLASSNAME$K}__link`,
8029
+ className: `${CLASSNAME$L}__link`,
8618
8030
  children: /*#__PURE__*/jsx(Link, {
8619
8031
  ...linkProps,
8620
8032
  linkAs: linkAs,
8621
- className: classNames(`${CLASSNAME$K}__link`, linkProps?.className),
8033
+ className: classNames(`${CLASSNAME$L}__link`, linkProps?.className),
8622
8034
  target: "_blank",
8623
8035
  href: link,
8624
8036
  color: theme === Theme.light ? ColorPalette.primary : ColorPalette.light,
@@ -8633,9 +8045,136 @@ const LinkPreview = forwardRef((props, ref) => {
8633
8045
  })
8634
8046
  });
8635
8047
  });
8636
- LinkPreview.displayName = COMPONENT_NAME$K;
8637
- LinkPreview.className = CLASSNAME$K;
8638
- LinkPreview.defaultProps = DEFAULT_PROPS$B;
8048
+ LinkPreview.displayName = COMPONENT_NAME$L;
8049
+ LinkPreview.className = CLASSNAME$L;
8050
+ LinkPreview.defaultProps = DEFAULT_PROPS$C;
8051
+
8052
+ /**
8053
+ * Render link with default <a> HTML component or a custom one provided by `linkAs`.
8054
+ *
8055
+ * Can be used to inject the `Link` component from `react-router` and provide better a11y on LumX components.
8056
+ *
8057
+ * @param linkAs Custom link component.
8058
+ * @param children Link children.
8059
+ * @return A link.
8060
+ */
8061
+ const renderLink = ({
8062
+ linkAs,
8063
+ ...forwardedProps
8064
+ }, ...children) => /*#__PURE__*/React__default.createElement(linkAs || 'a', forwardedProps, ...children);
8065
+
8066
+ /**
8067
+ * Component display name.
8068
+ */
8069
+ const COMPONENT_NAME$K = 'ListItem';
8070
+
8071
+ /**
8072
+ * Component default class name and class prefix.
8073
+ */
8074
+ const CLASSNAME$K = getRootClassName(COMPONENT_NAME$K);
8075
+
8076
+ /**
8077
+ * Component default props.
8078
+ */
8079
+ const DEFAULT_PROPS$B = {
8080
+ size: Size.regular
8081
+ };
8082
+
8083
+ /**
8084
+ * Check if the list item is clickable.
8085
+ * @return `true` if the list item is clickable; `false` otherwise.
8086
+ */
8087
+ function isClickable({
8088
+ linkProps,
8089
+ onItemSelected
8090
+ }) {
8091
+ return !isEmpty(linkProps?.href) || !!onItemSelected;
8092
+ }
8093
+
8094
+ /**
8095
+ * ListItem component.
8096
+ *
8097
+ * @param props Component props.
8098
+ * @param ref Component ref.
8099
+ * @return React element.
8100
+ */
8101
+ const ListItem = forwardRef((props, ref) => {
8102
+ const {
8103
+ isAnyDisabled,
8104
+ disabledStateProps,
8105
+ otherProps
8106
+ } = useDisableStateProps(props);
8107
+ const {
8108
+ after,
8109
+ before,
8110
+ children,
8111
+ className,
8112
+ isHighlighted,
8113
+ isSelected,
8114
+ linkAs,
8115
+ linkProps = {},
8116
+ linkRef,
8117
+ onItemSelected,
8118
+ size = DEFAULT_PROPS$B.size,
8119
+ ...forwardedProps
8120
+ } = otherProps;
8121
+ const role = linkAs || linkProps.href ? 'link' : 'button';
8122
+ const onKeyDown = useMemo(() => {
8123
+ if (onItemSelected && role === 'link') return onEnterPressed(onItemSelected);
8124
+ if (onItemSelected && role === 'button') return onButtonPressed(onItemSelected);
8125
+ return undefined;
8126
+ }, [role, onItemSelected]);
8127
+ const content = /*#__PURE__*/jsxs(Fragment, {
8128
+ children: [before && /*#__PURE__*/jsx("div", {
8129
+ className: `${CLASSNAME$K}__before`,
8130
+ children: before
8131
+ }), /*#__PURE__*/jsx("div", {
8132
+ className: `${CLASSNAME$K}__content`,
8133
+ children: children
8134
+ }), after && /*#__PURE__*/jsx("div", {
8135
+ className: `${CLASSNAME$K}__after`,
8136
+ children: after
8137
+ })]
8138
+ });
8139
+ return /*#__PURE__*/jsx("li", {
8140
+ ref: ref,
8141
+ ...forwardedProps,
8142
+ className: classNames(className, handleBasicClasses({
8143
+ prefix: CLASSNAME$K,
8144
+ size
8145
+ })),
8146
+ children: isClickable({
8147
+ linkProps,
8148
+ onItemSelected
8149
+ }) ? (/* Clickable list item */
8150
+ renderLink({
8151
+ linkAs,
8152
+ tabIndex: !disabledStateProps.disabled ? 0 : undefined,
8153
+ role,
8154
+ 'aria-disabled': isAnyDisabled,
8155
+ ...linkProps,
8156
+ href: isAnyDisabled ? undefined : linkProps.href,
8157
+ className: classNames(handleBasicClasses({
8158
+ prefix: `${CLASSNAME$K}__link`,
8159
+ isHighlighted,
8160
+ isSelected,
8161
+ isDisabled: isAnyDisabled
8162
+ })),
8163
+ onClick: isAnyDisabled ? undefined : onItemSelected,
8164
+ onKeyDown: isAnyDisabled ? undefined : onKeyDown,
8165
+ ref: linkRef
8166
+ }, content)) :
8167
+ /*#__PURE__*/
8168
+ /* Non clickable list item */
8169
+ jsx("div", {
8170
+ className: `${CLASSNAME$K}__wrapper`,
8171
+ children: content
8172
+ })
8173
+ });
8174
+ });
8175
+ ListItem.displayName = COMPONENT_NAME$K;
8176
+ ListItem.className = CLASSNAME$K;
8177
+ ListItem.defaultProps = DEFAULT_PROPS$B;
8639
8178
 
8640
8179
  /**
8641
8180
  * Component display name.