@lumx/react 3.10.1-alpha.7 → 3.10.1-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +86 -12
- package/index.js +318 -304
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/alert-dialog/AlertDialog.tsx +6 -3
- package/src/components/autocomplete/Autocomplete.stories.tsx +1 -2
- package/src/components/autocomplete/Autocomplete.tsx +3 -3
- package/src/components/autocomplete/AutocompleteMultiple.stories.tsx +2 -5
- package/src/components/autocomplete/AutocompleteMultiple.tsx +2 -2
- package/src/components/avatar/Avatar.tsx +3 -3
- package/src/components/badge/Badge.tsx +3 -3
- package/src/components/badge/BadgeWrapper.tsx +3 -2
- package/src/components/button/Button.tsx +9 -8
- package/src/components/button/ButtonGroup.tsx +9 -3
- package/src/components/button/ButtonRoot.tsx +6 -2
- package/src/components/button/IconButton.tsx +2 -2
- package/src/components/checkbox/Checkbox.tsx +4 -4
- package/src/components/chip/Chip.tsx +15 -9
- package/src/components/chip/ChipGroup.tsx +3 -2
- package/src/components/comment-block/CommentBlock.stories.tsx +4 -7
- package/src/components/comment-block/CommentBlock.tsx +3 -3
- package/src/components/date-picker/constants.ts +2 -2
- package/src/components/dialog/Dialog.tsx +9 -7
- package/src/components/divider/Divider.tsx +3 -3
- package/src/components/drag-handle/DragHandle.tsx +3 -3
- package/src/components/dropdown/Dropdown.tsx +4 -3
- package/src/components/expansion-panel/ExpansionPanel.tsx +26 -20
- package/src/components/flag/Flag.tsx +3 -3
- package/src/components/flex-box/FlexBox.tsx +4 -4
- package/src/components/generic-block/GenericBlock.tsx +10 -8
- package/src/components/generic-block/constants.ts +4 -9
- package/src/components/grid/Grid.tsx +5 -3
- package/src/components/grid/GridItem.tsx +5 -3
- package/src/components/grid-column/GridColumn.tsx +5 -3
- package/src/components/heading/Heading.tsx +7 -2
- package/src/components/icon/Icon.tsx +3 -3
- package/src/components/image-block/ImageBlock.tsx +3 -3
- package/src/components/image-lightbox/ImageLightbox.tsx +1 -1
- package/src/components/image-lightbox/constants.ts +2 -2
- package/src/components/image-lightbox/internal/ImageSlide.tsx +1 -1
- package/src/components/image-lightbox/internal/ImageSlideshow.tsx +9 -5
- package/src/components/image-lightbox/useImageLightbox.tsx +2 -1
- package/src/components/inline-list/InlineList.tsx +7 -3
- package/src/components/input-helper/InputHelper.tsx +3 -3
- package/src/components/input-label/InputLabel.tsx +3 -3
- package/src/components/lightbox/Lightbox.tsx +6 -4
- package/src/components/link/Link.tsx +11 -7
- package/src/components/link-preview/LinkPreview.tsx +3 -3
- package/src/components/list/List.tsx +4 -4
- package/src/components/list/ListDivider.tsx +3 -2
- package/src/components/list/ListItem.tsx +6 -5
- package/src/components/list/ListSubheader.tsx +3 -2
- package/src/components/list/useInteractiveList.tsx +7 -6
- package/src/components/message/Message.tsx +3 -3
- package/src/components/mosaic/Mosaic.test.tsx +3 -3
- package/src/components/mosaic/Mosaic.tsx +6 -5
- package/src/components/navigation/Navigation.stories.tsx +2 -2
- package/src/components/navigation/Navigation.tsx +3 -3
- package/src/components/navigation/NavigationItem.tsx +3 -9
- package/src/components/navigation/NavigationSection.tsx +3 -3
- package/src/components/notification/Notification.tsx +9 -5
- package/src/components/popover/Popover.stories.tsx +13 -15
- package/src/components/popover/Popover.test.tsx +6 -1
- package/src/components/popover/Popover.tsx +6 -6
- package/src/components/popover/usePopoverStyle.tsx +1 -3
- package/src/components/popover/useRestoreFocusOnClose.tsx +1 -1
- package/src/components/popover-dialog/PopoverDialog.tsx +3 -2
- package/src/components/post-block/PostBlock.tsx +11 -7
- package/src/components/progress/Progress.tsx +3 -3
- package/src/components/progress/ProgressCircular.tsx +3 -3
- package/src/components/progress/ProgressLinear.tsx +3 -3
- package/src/components/progress-tracker/ProgressTracker.stories.tsx +11 -11
- package/src/components/progress-tracker/ProgressTracker.tsx +4 -3
- package/src/components/progress-tracker/ProgressTrackerStep.tsx +3 -3
- package/src/components/progress-tracker/ProgressTrackerStepPanel.tsx +2 -0
- package/src/components/radio-button/RadioButton.tsx +3 -3
- package/src/components/radio-button/RadioGroup.stories.tsx +1 -4
- package/src/components/radio-button/RadioGroup.tsx +3 -2
- package/src/components/select/Select.stories.tsx +19 -38
- package/src/components/select/Select.tsx +5 -5
- package/src/components/select/SelectMultiple.stories.tsx +15 -30
- package/src/components/select/SelectMultiple.tsx +3 -4
- package/src/components/select/WithSelectContext.tsx +3 -4
- package/src/components/select/constants.ts +3 -1
- package/src/components/side-navigation/SideNavigation.stories.tsx +1 -1
- package/src/components/side-navigation/SideNavigation.tsx +4 -3
- package/src/components/side-navigation/SideNavigationItem.tsx +7 -7
- package/src/components/skeleton/SkeletonCircle.tsx +3 -3
- package/src/components/skeleton/SkeletonRectangle.tsx +3 -3
- package/src/components/skeleton/SkeletonTypography.stories.tsx +7 -12
- package/src/components/skeleton/SkeletonTypography.tsx +3 -3
- package/src/components/slider/Slider.tsx +4 -4
- package/src/components/slider/index.ts +1 -1
- package/src/components/slideshow/Slides.tsx +6 -4
- package/src/components/slideshow/Slideshow.stories.tsx +1 -3
- package/src/components/slideshow/Slideshow.tsx +3 -1
- package/src/components/slideshow/SlideshowControls.stories.tsx +1 -4
- package/src/components/slideshow/SlideshowControls.tsx +4 -4
- package/src/components/slideshow/SlideshowItem.tsx +5 -2
- package/src/components/slideshow/SlideshowItemGroup.tsx +5 -3
- package/src/components/switch/Switch.test.tsx +1 -1
- package/src/components/switch/Switch.tsx +7 -4
- package/src/components/table/Table.tsx +5 -3
- package/src/components/table/TableBody.tsx +7 -3
- package/src/components/table/TableCell.tsx +5 -3
- package/src/components/table/TableHeader.tsx +7 -3
- package/src/components/table/TableRow.tsx +5 -3
- package/src/components/tabs/TabList.tsx +1 -1
- package/src/components/tabs/TabPanel.tsx +2 -0
- package/src/components/tabs/Tabs.stories.tsx +12 -11
- package/src/components/text/Text.tsx +14 -5
- package/src/components/text-field/TextField.test.tsx +2 -2
- package/src/components/text-field/TextField.tsx +8 -7
- package/src/components/thumbnail/Thumbnail.tsx +4 -4
- package/src/components/toolbar/Toolbar.tsx +3 -3
- package/src/components/tooltip/Tooltip.tsx +4 -4
- package/src/components/tooltip/context.tsx +1 -1
- package/src/components/tooltip/useInjectTooltipRef.tsx +1 -1
- package/src/components/uploader/Uploader.tsx +3 -3
- package/src/components/user-block/UserBlock.tsx +12 -10
- package/src/hooks/useCallbackOnEscape.ts +1 -1
- package/src/hooks/useClickAway.tsx +2 -1
- package/src/hooks/useFocusTrap.ts +1 -1
- package/src/hooks/useInterval.tsx +4 -1
- package/src/hooks/useKeyboardListNavigation.tsx +4 -2
- package/src/hooks/useSizeOnWindowResize.ts +10 -14
- package/src/hooks/useStopPropagation.ts +2 -1
- package/src/stories/decorators/withCombinations.tsx +1 -1
- package/src/testing/utils/commonTestsSuiteRTL.tsx +2 -2
- package/src/utils/ClickAwayProvider/ClickAwayProvider.tsx +4 -0
- package/src/utils/className/getRootClassName.test.ts +11 -0
- package/src/utils/className/getRootClassName.ts +24 -0
- package/src/utils/className/index.ts +1 -0
- package/src/utils/date/getMonthCalendar.ts +4 -3
- package/src/utils/{makeListenerTowerContext.ts → function/makeListenerTowerContext.ts} +2 -2
- package/src/utils/{collection/partitionMulti.ts → partitionMulti.ts} +12 -13
- package/src/utils/{flattenChildren.ts → react/flattenChildren.ts} +3 -2
- package/src/utils/{renderButtonOrLink.tsx → react/renderButtonOrLink.tsx} +1 -1
- package/src/utils/{skipRender.tsx → react/skipRender.tsx} +1 -1
- package/src/utils/type/index.ts +18 -18
- package/src/utils/type/isComponent.ts +33 -0
- package/utils/index.d.ts +4 -0
- package/utils/index.js +96 -1
- package/utils/index.js.map +1 -1
- package/_internal/index.js +0 -99
- package/_internal/index.js.map +0 -1
- package/src/utils/className.test.js +0 -41
- package/src/utils/collection/castArray.test.ts +0 -15
- package/src/utils/collection/castArray.ts +0 -3
- package/src/utils/collection/chunk.test.ts +0 -15
- package/src/utils/collection/chunk.ts +0 -6
- package/src/utils/collection/isEmpty.test.js +0 -20
- package/src/utils/collection/isEmpty.ts +0 -4
- package/src/utils/collection/last.ts +0 -2
- package/src/utils/collection/partitionMulti.test.ts +0 -35
- package/src/utils/collection/pull.test.ts +0 -17
- package/src/utils/collection/pull.ts +0 -7
- package/src/utils/collection/range.test.js +0 -9
- package/src/utils/collection/range.ts +0 -2
- package/src/utils/function/memoize.test.ts +0 -36
- package/src/utils/function/memoize.ts +0 -13
- package/src/utils/type/ComponentClassName.ts +0 -7
- package/src/utils/type/KebabCase.ts +0 -6
- /package/src/utils/{clamp.ts → number/clamp.ts} +0 -0
- /package/src/utils/{OnBeforeUnmount.tsx → react/OnBeforeUnmount.tsx} +0 -0
- /package/src/utils/{mergeRefs.ts → react/mergeRefs.ts} +0 -0
- /package/src/utils/{renderLink.tsx → react/renderLink.tsx} +0 -0
package/index.js
CHANGED
|
@@ -1,7 +1,29 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { useState, useEffect, useMemo, useRef, Children, isValidElement, cloneElement, useLayoutEffect, useCallback, Fragment, createContext, useContext, useReducer } from 'react';
|
|
3
|
+
import isBoolean from 'lodash/isBoolean';
|
|
4
|
+
import isEmpty from 'lodash/isEmpty';
|
|
5
|
+
import kebabCase from 'lodash/kebabCase';
|
|
6
|
+
import noop from 'lodash/noop';
|
|
3
7
|
import ReactDOM, { createPortal } from 'react-dom';
|
|
4
|
-
import
|
|
8
|
+
import last from 'lodash/last';
|
|
9
|
+
import pull from 'lodash/pull';
|
|
10
|
+
import get from 'lodash/get';
|
|
11
|
+
import concat from 'lodash/concat';
|
|
12
|
+
import dropRight from 'lodash/dropRight';
|
|
13
|
+
import partition from 'lodash/partition';
|
|
14
|
+
import reduce from 'lodash/reduce';
|
|
15
|
+
import { ClickAwayProvider } from './utils/index.js';
|
|
16
|
+
import memoize from 'lodash/memoize';
|
|
17
|
+
import isFunction from 'lodash/isFunction';
|
|
18
|
+
import castArray from 'lodash/castArray';
|
|
19
|
+
import pick from 'lodash/pick';
|
|
20
|
+
import isInteger from 'lodash/isInteger';
|
|
21
|
+
import throttle from 'lodash/throttle';
|
|
22
|
+
import range from 'lodash/range';
|
|
23
|
+
import chunk from 'lodash/chunk';
|
|
24
|
+
import take from 'lodash/take';
|
|
25
|
+
import isObject from 'lodash/isObject';
|
|
26
|
+
import set from 'lodash/set';
|
|
5
27
|
|
|
6
28
|
function ownKeys(e, r) {
|
|
7
29
|
var t = Object.keys(e);
|
|
@@ -314,10 +336,19 @@ var classNames = classnames.exports;
|
|
|
314
336
|
const mdiAlert='M13 14h-2V9h2m0 9h-2v-2h2M1 21h22L12 2z';const mdiAlertCircle='M13 13h-2V7h2m0 10h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2';const mdiArrowDown='M11 4h2v12l5.5-5.5 1.42 1.42L12 19.84l-7.92-7.92L5.5 10.5 11 16z';const mdiArrowUp='M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z';const mdiCheck='M21 7 9 19l-5.5-5.5 1.41-1.41L9 16.17 19.59 5.59z';const mdiCheckCircle='M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z';const mdiChevronDown='M7.41 8.58 12 13.17l4.59-4.59L18 10l-6 6-6-6z';const mdiChevronLeft='M15.41 16.58 10.83 12l4.58-4.59L14 6l-6 6 6 6z';const mdiChevronRight='M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6z';const mdiChevronUp='M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z';const mdiClose='M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z';const mdiCloseCircle='M12 2a10 10 0 1 1 0 20 10 10 0 1 1 0-20m3.59 5L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z';const mdiDragVertical='M9 3h2v2H9zm4 0h2v2h-2zM9 7h2v2H9zm4 0h2v2h-2zm-4 4h2v2H9zm4 0h2v2h-2zm-4 4h2v2H9zm4 0h2v2h-2zm-4 4h2v2H9zm4 0h2v2h-2z';const mdiImageBroken='M19 3a2 2 0 0 1 2 2v6h-2v2h-2v2h-2v2h-2v2h-2v2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zm2 12v4a2 2 0 0 1-2 2h-4v-2h2v-2h2v-2zm-2-6.5a.5.5 0 0 0-.5-.5h-13a.5.5 0 0 0-.5.5v7a.5.5 0 0 0 .5.5H11v-1h2v-2h2v-2h2V9h2z';const mdiInformation='M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2';const mdiMagnifyMinusOutline='M15.5 14h-.79l-.28-.27A6.5 6.5 0 0 0 16 9.5 6.5 6.5 0 0 0 9.5 3 6.5 6.5 0 0 0 3 9.5 6.5 6.5 0 0 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5zm-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7z';const mdiMagnifyPlusOutline='m15.5 14 5 5-1.5 1.5-5-5v-.79l-.27-.28A6.5 6.5 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3 6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27zm-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2z';const mdiMenuDown='m7 10 5 5 5-5z';const mdiMinus='M19 13H5v-2h14z';const mdiPauseCircleOutline='M13 16V8h2v8zm-4 0V8h2v8zm3-14a10 10 0 0 1 10 10 10 10 0 0 1-10 10A10 10 0 0 1 2 12 10 10 0 0 1 12 2m0 2a8 8 0 0 0-8 8 8 8 0 0 0 8 8 8 8 0 0 0 8-8 8 8 0 0 0-8-8';const mdiPlayCircleOutline='M12 20a8.01 8.01 0 0 1 0-16 8.01 8.01 0 0 1 0 16m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m-2 14.5 6-4.5-6-4.5z';const mdiRadioboxBlank='M12 20a8 8 0 0 1-8-8 8 8 0 0 1 8-8 8 8 0 0 1 8 8 8 8 0 0 1-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2';const mdiRadioboxMarked='M12 20a8 8 0 0 1-8-8 8 8 0 0 1 8-8 8 8 0 0 1 8 8 8 8 0 0 1-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 5a5 5 0 0 0-5 5 5 5 0 0 0 5 5 5 5 0 0 0 5-5 5 5 0 0 0-5-5';
|
|
315
337
|
|
|
316
338
|
const _excluded$1t = ["prefix"];
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Enhance isEmpty method to also works with numbers.
|
|
342
|
+
*
|
|
343
|
+
* @param value The value to check.
|
|
344
|
+
* @return Whether the input value is empty or != 0.
|
|
345
|
+
*/
|
|
346
|
+
const _isEmpty = value => {
|
|
347
|
+
if (typeof value === 'number') {
|
|
348
|
+
return value === 0;
|
|
349
|
+
}
|
|
350
|
+
return isEmpty(value);
|
|
351
|
+
};
|
|
321
352
|
|
|
322
353
|
/**
|
|
323
354
|
* Get the basic CSS class for the given type.
|
|
@@ -333,18 +364,18 @@ function getBasicClass(_ref) {
|
|
|
333
364
|
type,
|
|
334
365
|
value
|
|
335
366
|
} = _ref;
|
|
336
|
-
if (
|
|
367
|
+
if (isBoolean(value)) {
|
|
337
368
|
if (!value) {
|
|
338
369
|
// False value should not return a class.
|
|
339
370
|
return '';
|
|
340
371
|
}
|
|
341
372
|
const booleanPrefixes = ['has', 'is'];
|
|
342
373
|
if (booleanPrefixes.some(booleanPrefix => type.toString().startsWith(booleanPrefix))) {
|
|
343
|
-
return `${prefix}--${
|
|
374
|
+
return `${prefix}--${kebabCase(type)}`;
|
|
344
375
|
}
|
|
345
|
-
return `${prefix}--is-${
|
|
376
|
+
return `${prefix}--is-${kebabCase(type)}`;
|
|
346
377
|
}
|
|
347
|
-
return `${prefix}--${
|
|
378
|
+
return `${prefix}--${kebabCase(type)}-${value}`;
|
|
348
379
|
}
|
|
349
380
|
|
|
350
381
|
/**
|
|
@@ -364,18 +395,14 @@ function handleBasicClasses(_ref2) {
|
|
|
364
395
|
} = _ref2,
|
|
365
396
|
props = _objectWithoutProperties(_ref2, _excluded$1t);
|
|
366
397
|
const otherClasses = {};
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
});
|
|
376
|
-
otherClasses[className] = true;
|
|
377
|
-
}
|
|
378
|
-
}
|
|
398
|
+
if (!isEmpty(props)) {
|
|
399
|
+
Object.keys(props).forEach(prop => {
|
|
400
|
+
otherClasses[getBasicClass({
|
|
401
|
+
prefix,
|
|
402
|
+
type: prop,
|
|
403
|
+
value: props[prop]
|
|
404
|
+
})] = isBoolean(props[prop]) ? props[prop] : !_isEmpty(props[prop]);
|
|
405
|
+
});
|
|
379
406
|
}
|
|
380
407
|
return classNames(prefix, otherClasses);
|
|
381
408
|
}
|
|
@@ -392,8 +419,8 @@ function isPassiveEventAvailable() {
|
|
|
392
419
|
supportsPassiveOption = true;
|
|
393
420
|
}
|
|
394
421
|
});
|
|
395
|
-
window.addEventListener('testPassiveEventSupport',
|
|
396
|
-
window.removeEventListener('testPassiveEventSupport',
|
|
422
|
+
window.addEventListener('testPassiveEventSupport', noop, opts);
|
|
423
|
+
window.removeEventListener('testPassiveEventSupport', noop, opts);
|
|
397
424
|
} catch (e) {
|
|
398
425
|
// ignored
|
|
399
426
|
}
|
|
@@ -505,6 +532,58 @@ function onButtonPressed(handler) {
|
|
|
505
532
|
};
|
|
506
533
|
}
|
|
507
534
|
|
|
535
|
+
/**
|
|
536
|
+
* The prefix to use for the CSS classes.
|
|
537
|
+
*/
|
|
538
|
+
const CSS_PREFIX = 'lumx';
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* Animation duration constants. Take into consideration that if you change one of these variables,
|
|
542
|
+
* you need to update their scss counterpart as well
|
|
543
|
+
*/
|
|
544
|
+
const DIALOG_TRANSITION_DURATION = 400;
|
|
545
|
+
const EXPANSION_PANEL_TRANSITION_DURATION = 400;
|
|
546
|
+
const NOTIFICATION_TRANSITION_DURATION = 200;
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Delay on hover after which we open or close the tooltip.
|
|
550
|
+
* Only applies to devices supporting pointer hover.
|
|
551
|
+
*/
|
|
552
|
+
const TOOLTIP_HOVER_DELAY = {
|
|
553
|
+
open: 500,
|
|
554
|
+
close: 500
|
|
555
|
+
};
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* Delay on long press after which we open or close the tooltip.
|
|
559
|
+
* Only applies to devices not supporting pointer hover.
|
|
560
|
+
*/
|
|
561
|
+
const TOOLTIP_LONG_PRESS_DELAY = {
|
|
562
|
+
open: 250,
|
|
563
|
+
close: 3000
|
|
564
|
+
};
|
|
565
|
+
|
|
566
|
+
// See https://regex101.com/r/YjS1uI/3
|
|
567
|
+
const LAST_PART_CLASSNAME = /^(.*)-(.+)$/gi;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Get the name of the root CSS class of a component based on its name.
|
|
571
|
+
*
|
|
572
|
+
* @param componentName The name of the component. This name should contains the component prefix and be
|
|
573
|
+
* written in PascalCase.
|
|
574
|
+
* @param subComponent Whether the current component is a sub component, if true, define the class according
|
|
575
|
+
* to BEM standards.
|
|
576
|
+
* @return The name of the root CSS class. This classname include the CSS classname prefix and is written in
|
|
577
|
+
* lower-snake-case.
|
|
578
|
+
*/
|
|
579
|
+
function getRootClassName(componentName, subComponent) {
|
|
580
|
+
const formattedClassName = `${CSS_PREFIX}-${kebabCase(componentName)}`;
|
|
581
|
+
if (subComponent) {
|
|
582
|
+
return formattedClassName.replace(LAST_PART_CLASSNAME, '$1__$2');
|
|
583
|
+
}
|
|
584
|
+
return formattedClassName;
|
|
585
|
+
}
|
|
586
|
+
|
|
508
587
|
/**
|
|
509
588
|
* Returns the classname associated to the given typography.
|
|
510
589
|
* For example, for `Typography.title` it returns `lumx-typography-title`
|
|
@@ -569,12 +648,12 @@ const CONFIG$1 = {
|
|
|
569
648
|
/**
|
|
570
649
|
* Component display name.
|
|
571
650
|
*/
|
|
572
|
-
const COMPONENT_NAME$
|
|
651
|
+
const COMPONENT_NAME$1n = 'AlertDialog';
|
|
573
652
|
|
|
574
653
|
/**
|
|
575
654
|
* Component default class name and class prefix.
|
|
576
655
|
*/
|
|
577
|
-
const CLASSNAME$1k =
|
|
656
|
+
const CLASSNAME$1k = getRootClassName(COMPONENT_NAME$1n);
|
|
578
657
|
|
|
579
658
|
/**
|
|
580
659
|
* Component default props.
|
|
@@ -674,7 +753,7 @@ const AlertDialog = forwardRef((props, ref) => {
|
|
|
674
753
|
}), confirmLabel))
|
|
675
754
|
})));
|
|
676
755
|
});
|
|
677
|
-
AlertDialog.displayName = COMPONENT_NAME$
|
|
756
|
+
AlertDialog.displayName = COMPONENT_NAME$1n;
|
|
678
757
|
AlertDialog.className = CLASSNAME$1k;
|
|
679
758
|
AlertDialog.defaultProps = DEFAULT_PROPS$14;
|
|
680
759
|
|
|
@@ -748,12 +827,12 @@ const _excluded$1r = ["anchorToInput", "children", "chips", "className", "closeO
|
|
|
748
827
|
/**
|
|
749
828
|
* Component display name.
|
|
750
829
|
*/
|
|
751
|
-
const COMPONENT_NAME$
|
|
830
|
+
const COMPONENT_NAME$1m = 'Autocomplete';
|
|
752
831
|
|
|
753
832
|
/**
|
|
754
833
|
* Component default class name and class prefix.
|
|
755
834
|
*/
|
|
756
|
-
const CLASSNAME$1j =
|
|
835
|
+
const CLASSNAME$1j = getRootClassName(COMPONENT_NAME$1m);
|
|
757
836
|
|
|
758
837
|
/**
|
|
759
838
|
* Component default props.
|
|
@@ -855,7 +934,7 @@ const Autocomplete = forwardRef((props, ref) => {
|
|
|
855
934
|
theme: theme
|
|
856
935
|
}, children));
|
|
857
936
|
});
|
|
858
|
-
Autocomplete.displayName = COMPONENT_NAME$
|
|
937
|
+
Autocomplete.displayName = COMPONENT_NAME$1m;
|
|
859
938
|
Autocomplete.className = CLASSNAME$1j;
|
|
860
939
|
Autocomplete.defaultProps = DEFAULT_PROPS$13;
|
|
861
940
|
|
|
@@ -868,12 +947,12 @@ const _excluded$1q = ["anchorToInput", "children", "chipsAlignment", "className"
|
|
|
868
947
|
/**
|
|
869
948
|
* Component display name.
|
|
870
949
|
*/
|
|
871
|
-
const COMPONENT_NAME$
|
|
950
|
+
const COMPONENT_NAME$1l = 'AutocompleteMultiple';
|
|
872
951
|
|
|
873
952
|
/**
|
|
874
953
|
* Component default class name and class prefix.
|
|
875
954
|
*/
|
|
876
|
-
const CLASSNAME$1i =
|
|
955
|
+
const CLASSNAME$1i = getRootClassName(COMPONENT_NAME$1l);
|
|
877
956
|
|
|
878
957
|
/**
|
|
879
958
|
* Component default props.
|
|
@@ -982,7 +1061,7 @@ const AutocompleteMultiple = forwardRef((props, ref) => {
|
|
|
982
1061
|
onInfiniteScroll: onInfiniteScroll
|
|
983
1062
|
}), children);
|
|
984
1063
|
});
|
|
985
|
-
AutocompleteMultiple.displayName = COMPONENT_NAME$
|
|
1064
|
+
AutocompleteMultiple.displayName = COMPONENT_NAME$1l;
|
|
986
1065
|
AutocompleteMultiple.className = CLASSNAME$1i;
|
|
987
1066
|
AutocompleteMultiple.defaultProps = DEFAULT_PROPS$12;
|
|
988
1067
|
|
|
@@ -999,12 +1078,12 @@ const _excluded$1p = ["actions", "alt", "badge", "className", "image", "linkProp
|
|
|
999
1078
|
/**
|
|
1000
1079
|
* Component display name.
|
|
1001
1080
|
*/
|
|
1002
|
-
const COMPONENT_NAME$
|
|
1081
|
+
const COMPONENT_NAME$1k = 'Avatar';
|
|
1003
1082
|
|
|
1004
1083
|
/**
|
|
1005
1084
|
* Component default class name and class prefix.
|
|
1006
1085
|
*/
|
|
1007
|
-
const CLASSNAME$1h =
|
|
1086
|
+
const CLASSNAME$1h = getRootClassName(COMPONENT_NAME$1k);
|
|
1008
1087
|
|
|
1009
1088
|
/**
|
|
1010
1089
|
* Component default props.
|
|
@@ -1063,7 +1142,7 @@ const Avatar = forwardRef((props, ref) => {
|
|
|
1063
1142
|
className: `${CLASSNAME$1h}__badge`
|
|
1064
1143
|
}, badge));
|
|
1065
1144
|
});
|
|
1066
|
-
Avatar.displayName = COMPONENT_NAME$
|
|
1145
|
+
Avatar.displayName = COMPONENT_NAME$1k;
|
|
1067
1146
|
Avatar.className = CLASSNAME$1h;
|
|
1068
1147
|
Avatar.defaultProps = DEFAULT_PROPS$11;
|
|
1069
1148
|
|
|
@@ -1076,12 +1155,12 @@ const _excluded$1o = ["children", "className", "color"];
|
|
|
1076
1155
|
/**
|
|
1077
1156
|
* Component display name.
|
|
1078
1157
|
*/
|
|
1079
|
-
const COMPONENT_NAME$
|
|
1158
|
+
const COMPONENT_NAME$1j = 'Badge';
|
|
1080
1159
|
|
|
1081
1160
|
/**
|
|
1082
1161
|
* Component default class name and class prefix.
|
|
1083
1162
|
*/
|
|
1084
|
-
const CLASSNAME$1g =
|
|
1163
|
+
const CLASSNAME$1g = getRootClassName(COMPONENT_NAME$1j);
|
|
1085
1164
|
|
|
1086
1165
|
/**
|
|
1087
1166
|
* Component default props.
|
|
@@ -1113,7 +1192,7 @@ const Badge = forwardRef((props, ref) => {
|
|
|
1113
1192
|
}))
|
|
1114
1193
|
}), children);
|
|
1115
1194
|
});
|
|
1116
|
-
Badge.displayName = COMPONENT_NAME$
|
|
1195
|
+
Badge.displayName = COMPONENT_NAME$1j;
|
|
1117
1196
|
Badge.className = CLASSNAME$1g;
|
|
1118
1197
|
Badge.defaultProps = DEFAULT_PROPS$10;
|
|
1119
1198
|
|
|
@@ -1216,8 +1295,7 @@ const useKeyboardListNavigation = function (items, ref, onListItemSelected, onLi
|
|
|
1216
1295
|
onListItemSelected(selectedItem);
|
|
1217
1296
|
resetActiveIndex();
|
|
1218
1297
|
} else if (activeItemIndex === initialIndex && onEnterPressed) {
|
|
1219
|
-
|
|
1220
|
-
const value = (_evt$target = evt.target) === null || _evt$target === void 0 ? void 0 : _evt$target.value;
|
|
1298
|
+
const value = get(evt, 'target.value');
|
|
1221
1299
|
onEnterPressed(value);
|
|
1222
1300
|
resetActiveIndex();
|
|
1223
1301
|
}
|
|
@@ -1228,8 +1306,7 @@ const useKeyboardListNavigation = function (items, ref, onListItemSelected, onLi
|
|
|
1228
1306
|
* @param evt - key pressed event
|
|
1229
1307
|
*/
|
|
1230
1308
|
const onTabKeyPressed = evt => {
|
|
1231
|
-
|
|
1232
|
-
const value = (_evt$target2 = evt.target) === null || _evt$target2 === void 0 ? void 0 : _evt$target2.value;
|
|
1309
|
+
const value = get(evt, 'target.value');
|
|
1233
1310
|
if (preventTabOnEnteredValue && value && value.length > 0) {
|
|
1234
1311
|
preventDefaultAndStopPropagation(evt);
|
|
1235
1312
|
}
|
|
@@ -1316,12 +1393,12 @@ const _excluded$1m = ["after", "before", "children", "className", "isHighlighted
|
|
|
1316
1393
|
/**
|
|
1317
1394
|
* Component display name.
|
|
1318
1395
|
*/
|
|
1319
|
-
const COMPONENT_NAME$
|
|
1396
|
+
const COMPONENT_NAME$1i = 'ListItem';
|
|
1320
1397
|
|
|
1321
1398
|
/**
|
|
1322
1399
|
* Component default class name and class prefix.
|
|
1323
1400
|
*/
|
|
1324
|
-
const CLASSNAME$1f =
|
|
1401
|
+
const CLASSNAME$1f = getRootClassName(COMPONENT_NAME$1i);
|
|
1325
1402
|
|
|
1326
1403
|
/**
|
|
1327
1404
|
* Component default props.
|
|
@@ -1339,7 +1416,7 @@ function isClickable(_ref) {
|
|
|
1339
1416
|
linkProps,
|
|
1340
1417
|
onItemSelected
|
|
1341
1418
|
} = _ref;
|
|
1342
|
-
return
|
|
1419
|
+
return !isEmpty(linkProps === null || linkProps === void 0 ? void 0 : linkProps.href) || !!onItemSelected;
|
|
1343
1420
|
}
|
|
1344
1421
|
|
|
1345
1422
|
/**
|
|
@@ -1412,10 +1489,26 @@ const ListItem = forwardRef((props, ref) => {
|
|
|
1412
1489
|
className: `${CLASSNAME$1f}__wrapper`
|
|
1413
1490
|
}, content));
|
|
1414
1491
|
});
|
|
1415
|
-
ListItem.displayName = COMPONENT_NAME$
|
|
1492
|
+
ListItem.displayName = COMPONENT_NAME$1i;
|
|
1416
1493
|
ListItem.className = CLASSNAME$1f;
|
|
1417
1494
|
ListItem.defaultProps = DEFAULT_PROPS$$;
|
|
1418
1495
|
|
|
1496
|
+
/**
|
|
1497
|
+
* Properties of a component to use to determine it's name.
|
|
1498
|
+
* In the order of preference.
|
|
1499
|
+
*/
|
|
1500
|
+
const NAME_PROPERTIES = ['type', 'type.displayName', 'displayName', 'name', 'type.name', 'props.mdxType', '_reactInternalFiber.elementType.name'];
|
|
1501
|
+
/**
|
|
1502
|
+
* Create a predicate function that checks if a ReactNode is a react element from the given component.
|
|
1503
|
+
*
|
|
1504
|
+
* @param component React function component or the component name
|
|
1505
|
+
* @return predicate returning true if value is instance of the component
|
|
1506
|
+
*/
|
|
1507
|
+
const isComponent = component => instance => {
|
|
1508
|
+
const componentName = typeof component === 'string' ? component : component.displayName;
|
|
1509
|
+
return !!get(instance, '$$typeof') && NAME_PROPERTIES.some(nameProperty => get(instance, nameProperty) === componentName);
|
|
1510
|
+
};
|
|
1511
|
+
|
|
1419
1512
|
/**
|
|
1420
1513
|
* Similar to `isComponent` but more precise as it's not based on the component `displayName` but on the component function reference.
|
|
1421
1514
|
*/
|
|
@@ -1683,8 +1776,8 @@ function flattenChildren(children) {
|
|
|
1683
1776
|
function recur(nodes) {
|
|
1684
1777
|
let keys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
1685
1778
|
return Children.toArray(nodes).reduce((acc, node, index) => {
|
|
1686
|
-
var
|
|
1687
|
-
const nodeKeys = keys.concat((
|
|
1779
|
+
var _get;
|
|
1780
|
+
const nodeKeys = keys.concat((_get = get(node, 'key')) !== null && _get !== void 0 ? _get : index);
|
|
1688
1781
|
if (reactIs.exports.isFragment(node)) {
|
|
1689
1782
|
acc.push(...recur(node.props.children, nodeKeys));
|
|
1690
1783
|
} else if ( /*#__PURE__*/isValidElement(node)) {
|
|
@@ -1724,7 +1817,7 @@ function onKeyboardFocus(props, handler) {
|
|
|
1724
1817
|
};
|
|
1725
1818
|
}
|
|
1726
1819
|
const isNavigableItem = node => {
|
|
1727
|
-
return
|
|
1820
|
+
return isComponent('ListItem')(node) && isClickable(node.props) && !node.props.isDisabled;
|
|
1728
1821
|
};
|
|
1729
1822
|
|
|
1730
1823
|
/**
|
|
@@ -1780,7 +1873,6 @@ const useInteractiveList = options => {
|
|
|
1780
1873
|
* @param evt Key event
|
|
1781
1874
|
*/
|
|
1782
1875
|
const onArrowPressed = evt => {
|
|
1783
|
-
var _items$nextIndex;
|
|
1784
1876
|
const {
|
|
1785
1877
|
key
|
|
1786
1878
|
} = evt;
|
|
@@ -1798,7 +1890,7 @@ const useInteractiveList = options => {
|
|
|
1798
1890
|
setActiveItemIndex(nextIndex);
|
|
1799
1891
|
evt.preventDefault();
|
|
1800
1892
|
evt.stopPropagation();
|
|
1801
|
-
onListItemNavigated === null || onListItemNavigated === void 0 ? void 0 : onListItemNavigated(nextIndex, (
|
|
1893
|
+
onListItemNavigated === null || onListItemNavigated === void 0 ? void 0 : onListItemNavigated(nextIndex, get(items, [nextIndex, 'key']));
|
|
1802
1894
|
};
|
|
1803
1895
|
|
|
1804
1896
|
/**
|
|
@@ -1861,12 +1953,12 @@ const _excluded$1l = ["children", "className", "isClickable", "itemPadding", "on
|
|
|
1861
1953
|
/**
|
|
1862
1954
|
* Component display name.
|
|
1863
1955
|
*/
|
|
1864
|
-
const COMPONENT_NAME$
|
|
1956
|
+
const COMPONENT_NAME$1h = 'List';
|
|
1865
1957
|
|
|
1866
1958
|
/**
|
|
1867
1959
|
* Component default class name and class prefix.
|
|
1868
1960
|
*/
|
|
1869
|
-
const CLASSNAME$1e =
|
|
1961
|
+
const CLASSNAME$1e = getRootClassName(COMPONENT_NAME$1h);
|
|
1870
1962
|
|
|
1871
1963
|
/**
|
|
1872
1964
|
* Component default props.
|
|
@@ -1912,44 +2004,13 @@ const InternalList = forwardRef((props, ref) => {
|
|
|
1912
2004
|
ref: mergeRefs(ref, listElementRef)
|
|
1913
2005
|
}), items);
|
|
1914
2006
|
});
|
|
1915
|
-
InternalList.displayName = COMPONENT_NAME$
|
|
2007
|
+
InternalList.displayName = COMPONENT_NAME$1h;
|
|
1916
2008
|
InternalList.className = CLASSNAME$1e;
|
|
1917
2009
|
InternalList.defaultProps = DEFAULT_PROPS$_;
|
|
1918
2010
|
const List = Object.assign(InternalList, {
|
|
1919
2011
|
useKeyboardListNavigation
|
|
1920
2012
|
});
|
|
1921
2013
|
|
|
1922
|
-
/**
|
|
1923
|
-
* The prefix to use for the CSS classes.
|
|
1924
|
-
*/
|
|
1925
|
-
const CSS_PREFIX = 'lumx';
|
|
1926
|
-
|
|
1927
|
-
/**
|
|
1928
|
-
* Animation duration constants. Take into consideration that if you change one of these variables,
|
|
1929
|
-
* you need to update their scss counterpart as well
|
|
1930
|
-
*/
|
|
1931
|
-
const DIALOG_TRANSITION_DURATION = 400;
|
|
1932
|
-
const EXPANSION_PANEL_TRANSITION_DURATION = 400;
|
|
1933
|
-
const NOTIFICATION_TRANSITION_DURATION = 200;
|
|
1934
|
-
|
|
1935
|
-
/**
|
|
1936
|
-
* Delay on hover after which we open or close the tooltip.
|
|
1937
|
-
* Only applies to devices supporting pointer hover.
|
|
1938
|
-
*/
|
|
1939
|
-
const TOOLTIP_HOVER_DELAY = {
|
|
1940
|
-
open: 500,
|
|
1941
|
-
close: 500
|
|
1942
|
-
};
|
|
1943
|
-
|
|
1944
|
-
/**
|
|
1945
|
-
* Delay on long press after which we open or close the tooltip.
|
|
1946
|
-
* Only applies to devices not supporting pointer hover.
|
|
1947
|
-
*/
|
|
1948
|
-
const TOOLTIP_LONG_PRESS_DELAY = {
|
|
1949
|
-
open: 250,
|
|
1950
|
-
close: 3000
|
|
1951
|
-
};
|
|
1952
|
-
|
|
1953
2014
|
/**
|
|
1954
2015
|
* Optional global `window` instance (not defined when running SSR).
|
|
1955
2016
|
*/
|
|
@@ -1970,17 +2031,6 @@ const IS_BROWSER = typeof navigator !== 'undefined' && !navigator.userAgent.incl
|
|
|
1970
2031
|
*/
|
|
1971
2032
|
const VISUALLY_HIDDEN = 'visually-hidden';
|
|
1972
2033
|
|
|
1973
|
-
/** Pull an element from an array (inverse of array.push) */
|
|
1974
|
-
const pull = (array, element) => {
|
|
1975
|
-
const index = array.indexOf(element);
|
|
1976
|
-
if (index > -1) {
|
|
1977
|
-
array.splice(index, 1);
|
|
1978
|
-
}
|
|
1979
|
-
};
|
|
1980
|
-
|
|
1981
|
-
/** Get last item from array */
|
|
1982
|
-
const last = array => array[array.length - 1];
|
|
1983
|
-
|
|
1984
2034
|
/**
|
|
1985
2035
|
* Keep track of listeners, only the last registered listener gets activated at any point (previously registered
|
|
1986
2036
|
* listener are disabled).
|
|
@@ -4337,21 +4387,6 @@ const useStubPopper = (_a, _p, _ref) => {
|
|
|
4337
4387
|
/** Switch hook implementation between environment */
|
|
4338
4388
|
const usePopper = IS_BROWSER ? usePopper$1 : useStubPopper;
|
|
4339
4389
|
|
|
4340
|
-
/** Memoize a function based on the serialization of its args */
|
|
4341
|
-
function memoize(fn) {
|
|
4342
|
-
const cache = new Map();
|
|
4343
|
-
return function () {
|
|
4344
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4345
|
-
args[_key] = arguments[_key];
|
|
4346
|
-
}
|
|
4347
|
-
const serializedArgs = JSON.stringify(args);
|
|
4348
|
-
if (cache.has(serializedArgs)) return cache.get(serializedArgs);
|
|
4349
|
-
const value = fn(...args);
|
|
4350
|
-
cache.set(serializedArgs, value);
|
|
4351
|
-
return value;
|
|
4352
|
-
};
|
|
4353
|
-
}
|
|
4354
|
-
|
|
4355
4390
|
/**
|
|
4356
4391
|
* Different possible placements for the popover.
|
|
4357
4392
|
*/
|
|
@@ -4577,12 +4612,12 @@ const _excluded$1k = ["anchorRef", "as", "children", "className", "closeOnClickA
|
|
|
4577
4612
|
/**
|
|
4578
4613
|
* Component display name.
|
|
4579
4614
|
*/
|
|
4580
|
-
const COMPONENT_NAME$
|
|
4615
|
+
const COMPONENT_NAME$1g = 'Popover';
|
|
4581
4616
|
|
|
4582
4617
|
/**
|
|
4583
4618
|
* Component default class name and class prefix.
|
|
4584
4619
|
*/
|
|
4585
|
-
const CLASSNAME$1d =
|
|
4620
|
+
const CLASSNAME$1d = getRootClassName(COMPONENT_NAME$1g);
|
|
4586
4621
|
|
|
4587
4622
|
/**
|
|
4588
4623
|
* Component default props.
|
|
@@ -4685,10 +4720,10 @@ const _InnerPopover = forwardRef((props, ref) => {
|
|
|
4685
4720
|
}, /*#__PURE__*/React__default.createElement("path", {
|
|
4686
4721
|
d: "M8 3.49C7.62 2.82 6.66 2.82 6.27 3.48L.04 14 14.04 14 8 3.49Z"
|
|
4687
4722
|
}))), /*#__PURE__*/React__default.createElement(ThemeProvider, {
|
|
4688
|
-
value:
|
|
4723
|
+
value: theme
|
|
4689
4724
|
}, children))), usePortal) : null;
|
|
4690
4725
|
});
|
|
4691
|
-
_InnerPopover.displayName = COMPONENT_NAME$
|
|
4726
|
+
_InnerPopover.displayName = COMPONENT_NAME$1g;
|
|
4692
4727
|
|
|
4693
4728
|
/**
|
|
4694
4729
|
* Popover component.
|
|
@@ -4700,7 +4735,7 @@ _InnerPopover.displayName = COMPONENT_NAME$1e;
|
|
|
4700
4735
|
const Popover = skipRender(
|
|
4701
4736
|
// Skip render in SSR
|
|
4702
4737
|
() => Boolean(DOCUMENT), _InnerPopover);
|
|
4703
|
-
Popover.displayName = COMPONENT_NAME$
|
|
4738
|
+
Popover.displayName = COMPONENT_NAME$1g;
|
|
4704
4739
|
Popover.className = CLASSNAME$1d;
|
|
4705
4740
|
Popover.defaultProps = DEFAULT_PROPS$Z;
|
|
4706
4741
|
|
|
@@ -4756,12 +4791,12 @@ const _excluded$1j = ["anchorRef", "children", "className", "closeOnClick", "clo
|
|
|
4756
4791
|
/**
|
|
4757
4792
|
* Component display name.
|
|
4758
4793
|
*/
|
|
4759
|
-
const COMPONENT_NAME$
|
|
4794
|
+
const COMPONENT_NAME$1f = 'Dropdown';
|
|
4760
4795
|
|
|
4761
4796
|
/**
|
|
4762
4797
|
* Component default class name and class prefix.
|
|
4763
4798
|
*/
|
|
4764
|
-
const CLASSNAME$1c =
|
|
4799
|
+
const CLASSNAME$1c = getRootClassName(COMPONENT_NAME$1f);
|
|
4765
4800
|
|
|
4766
4801
|
/**
|
|
4767
4802
|
* Component default props.
|
|
@@ -4808,7 +4843,7 @@ const Dropdown = forwardRef((props, ref) => {
|
|
|
4808
4843
|
const listElement = useRef(null);
|
|
4809
4844
|
useInfiniteScroll(innerRef, onInfiniteScroll);
|
|
4810
4845
|
const popperElement = useMemo(() => {
|
|
4811
|
-
return !Array.isArray(children) &&
|
|
4846
|
+
return !Array.isArray(children) && isComponent(List)(children) ? /*#__PURE__*/cloneElement(children, _objectSpread2(_objectSpread2({}, children.props), {}, {
|
|
4812
4847
|
ref: listElement,
|
|
4813
4848
|
onClick(evt) {
|
|
4814
4849
|
var _children$props$onCli, _children$props;
|
|
@@ -4842,7 +4877,7 @@ const Dropdown = forwardRef((props, ref) => {
|
|
|
4842
4877
|
ref: innerRef
|
|
4843
4878
|
}, popperElement)) : null;
|
|
4844
4879
|
});
|
|
4845
|
-
Dropdown.displayName = COMPONENT_NAME$
|
|
4880
|
+
Dropdown.displayName = COMPONENT_NAME$1f;
|
|
4846
4881
|
Dropdown.className = CLASSNAME$1c;
|
|
4847
4882
|
Dropdown.defaultProps = DEFAULT_PROPS$Y;
|
|
4848
4883
|
|
|
@@ -4867,12 +4902,12 @@ const _excluded$1i = ["children", "className", "kind", "theme"];
|
|
|
4867
4902
|
/**
|
|
4868
4903
|
* Component display name.
|
|
4869
4904
|
*/
|
|
4870
|
-
const COMPONENT_NAME$
|
|
4905
|
+
const COMPONENT_NAME$1e = 'InputHelper';
|
|
4871
4906
|
|
|
4872
4907
|
/**
|
|
4873
4908
|
* Component default class name and class prefix.
|
|
4874
4909
|
*/
|
|
4875
|
-
const CLASSNAME$1b =
|
|
4910
|
+
const CLASSNAME$1b = getRootClassName(COMPONENT_NAME$1e);
|
|
4876
4911
|
|
|
4877
4912
|
/**
|
|
4878
4913
|
* Component default props.
|
|
@@ -4910,7 +4945,7 @@ const InputHelper = forwardRef((props, ref) => {
|
|
|
4910
4945
|
}))
|
|
4911
4946
|
}), children);
|
|
4912
4947
|
});
|
|
4913
|
-
InputHelper.displayName = COMPONENT_NAME$
|
|
4948
|
+
InputHelper.displayName = COMPONENT_NAME$1e;
|
|
4914
4949
|
InputHelper.className = CLASSNAME$1b;
|
|
4915
4950
|
InputHelper.defaultProps = DEFAULT_PROPS$X;
|
|
4916
4951
|
|
|
@@ -4948,8 +4983,11 @@ const SelectVariant = {
|
|
|
4948
4983
|
|
|
4949
4984
|
const _excluded$1h = ["children", "className", "focusElement", "isMultiple", "closeOnClick", "disabled", "error", "hasError", "helper", "id", "isDisabled", "isEmpty", "isOpen", "isRequired", "isValid", "label", "onClear", "onDropdownClose", "onInfiniteScroll", "onInputClick", "placeholder", "theme", "value", "variant"];
|
|
4950
4985
|
|
|
4986
|
+
/** The display name of the component. */
|
|
4987
|
+
const COMPONENT_NAME$1d = 'Select';
|
|
4988
|
+
|
|
4951
4989
|
/** The default class name and classes prefix for this component. */
|
|
4952
|
-
const CLASSNAME$1a =
|
|
4990
|
+
const CLASSNAME$1a = getRootClassName(COMPONENT_NAME$1d);
|
|
4953
4991
|
|
|
4954
4992
|
/** The default value of props. */
|
|
4955
4993
|
const DEFAULT_PROPS$W = {
|
|
@@ -5059,11 +5097,15 @@ const WithSelectContext = (SelectElement, props, ref) => {
|
|
|
5059
5097
|
};
|
|
5060
5098
|
|
|
5061
5099
|
const _excluded$1g = ["badge", "children", "className"];
|
|
5100
|
+
/**
|
|
5101
|
+
* Component display name.
|
|
5102
|
+
*/
|
|
5103
|
+
const COMPONENT_NAME$1c = 'BadgeWrapper';
|
|
5062
5104
|
|
|
5063
5105
|
/**
|
|
5064
5106
|
* Component default class name and class prefix.
|
|
5065
5107
|
*/
|
|
5066
|
-
const CLASSNAME$19 =
|
|
5108
|
+
const CLASSNAME$19 = getRootClassName(COMPONENT_NAME$1c);
|
|
5067
5109
|
const BadgeWrapper = forwardRef((props, ref) => {
|
|
5068
5110
|
const {
|
|
5069
5111
|
badge,
|
|
@@ -5185,7 +5227,7 @@ const ButtonRoot = forwardRef((props, ref) => {
|
|
|
5185
5227
|
*
|
|
5186
5228
|
* However, in any case, if the component is disabled, we returned a <button> since disabled is not compatible with <a>.
|
|
5187
5229
|
*/
|
|
5188
|
-
if ((linkAs || props.href) && !isDisabled) {
|
|
5230
|
+
if ((linkAs || !isEmpty(props.href)) && !isDisabled) {
|
|
5189
5231
|
return renderLink(_objectSpread2(_objectSpread2({
|
|
5190
5232
|
linkAs
|
|
5191
5233
|
}, forwardedProps), {}, {
|
|
@@ -5231,7 +5273,7 @@ const COMPONENT_NAME$1a = 'Button';
|
|
|
5231
5273
|
/**
|
|
5232
5274
|
* Component default class name and class prefix.
|
|
5233
5275
|
*/
|
|
5234
|
-
const CLASSNAME$18 =
|
|
5276
|
+
const CLASSNAME$18 = getRootClassName(COMPONENT_NAME$1a);
|
|
5235
5277
|
|
|
5236
5278
|
/**
|
|
5237
5279
|
* Component default props.
|
|
@@ -5263,11 +5305,11 @@ const Button = forwardRef((props, ref) => {
|
|
|
5263
5305
|
const buttonClassName = classNames(className, getBasicClass({
|
|
5264
5306
|
prefix: CLASSNAME$18,
|
|
5265
5307
|
type: 'hasLeftIcon',
|
|
5266
|
-
value:
|
|
5308
|
+
value: !isEmpty(leftIcon)
|
|
5267
5309
|
}), getBasicClass({
|
|
5268
5310
|
prefix: CLASSNAME$18,
|
|
5269
5311
|
type: 'hasRightIcon',
|
|
5270
|
-
value:
|
|
5312
|
+
value: !isEmpty(rightIcon)
|
|
5271
5313
|
}));
|
|
5272
5314
|
return /*#__PURE__*/React__default.createElement(ButtonRoot, _extends({
|
|
5273
5315
|
ref: ref
|
|
@@ -5278,9 +5320,9 @@ const Button = forwardRef((props, ref) => {
|
|
|
5278
5320
|
}, forwardedProps), {
|
|
5279
5321
|
className: buttonClassName,
|
|
5280
5322
|
variant: "button"
|
|
5281
|
-
}), leftIcon && /*#__PURE__*/React__default.createElement(Icon, {
|
|
5323
|
+
}), leftIcon && !isEmpty(leftIcon) && /*#__PURE__*/React__default.createElement(Icon, {
|
|
5282
5324
|
icon: leftIcon
|
|
5283
|
-
}), children && (
|
|
5325
|
+
}), children && (isComponent(Text)(children) ? children : /*#__PURE__*/React__default.createElement("span", null, children)), rightIcon && !isEmpty(rightIcon) && /*#__PURE__*/React__default.createElement(Icon, {
|
|
5284
5326
|
icon: rightIcon
|
|
5285
5327
|
}));
|
|
5286
5328
|
});
|
|
@@ -5297,7 +5339,7 @@ const COMPONENT_NAME$19 = 'IconButton';
|
|
|
5297
5339
|
/**
|
|
5298
5340
|
* Component default class name and class prefix.
|
|
5299
5341
|
*/
|
|
5300
|
-
const CLASSNAME$17 =
|
|
5342
|
+
const CLASSNAME$17 = getRootClassName(COMPONENT_NAME$19);
|
|
5301
5343
|
|
|
5302
5344
|
/**
|
|
5303
5345
|
* Component default props.
|
|
@@ -5364,7 +5406,7 @@ const COMPONENT_NAME$18 = 'ButtonGroup';
|
|
|
5364
5406
|
/**
|
|
5365
5407
|
* Component default class name and class prefix.
|
|
5366
5408
|
*/
|
|
5367
|
-
const CLASSNAME$16 =
|
|
5409
|
+
const CLASSNAME$16 = getRootClassName(COMPONENT_NAME$18);
|
|
5368
5410
|
|
|
5369
5411
|
/**
|
|
5370
5412
|
* Component default props.
|
|
@@ -5413,7 +5455,7 @@ const COMPONENT_NAME$17 = 'Checkbox';
|
|
|
5413
5455
|
/**
|
|
5414
5456
|
* Component default class name and class prefix.
|
|
5415
5457
|
*/
|
|
5416
|
-
const CLASSNAME$15 =
|
|
5458
|
+
const CLASSNAME$15 = getRootClassName(COMPONENT_NAME$17);
|
|
5417
5459
|
|
|
5418
5460
|
/**
|
|
5419
5461
|
* Component default props.
|
|
@@ -5517,7 +5559,7 @@ Checkbox.defaultProps = DEFAULT_PROPS$S;
|
|
|
5517
5559
|
*/
|
|
5518
5560
|
function useStopPropagation(handler) {
|
|
5519
5561
|
return useCallback(evt => {
|
|
5520
|
-
if (!evt || !handler) {
|
|
5562
|
+
if (!evt || !isFunction(handler)) {
|
|
5521
5563
|
return;
|
|
5522
5564
|
}
|
|
5523
5565
|
handler(evt);
|
|
@@ -5543,7 +5585,7 @@ const COMPONENT_NAME$16 = 'Chip';
|
|
|
5543
5585
|
/**
|
|
5544
5586
|
* Component default class name and class prefix.
|
|
5545
5587
|
*/
|
|
5546
|
-
const CLASSNAME$14 =
|
|
5588
|
+
const CLASSNAME$14 = getRootClassName(COMPONENT_NAME$16);
|
|
5547
5589
|
|
|
5548
5590
|
/**
|
|
5549
5591
|
* Component default props.
|
|
@@ -5581,8 +5623,11 @@ const Chip = forwardRef((props, ref) => {
|
|
|
5581
5623
|
onKeyDown
|
|
5582
5624
|
} = props,
|
|
5583
5625
|
forwardedProps = _objectWithoutProperties(props, _excluded$1a);
|
|
5584
|
-
const
|
|
5585
|
-
const
|
|
5626
|
+
const hasAfterClick = isFunction(onAfterClick);
|
|
5627
|
+
const hasBeforeClick = isFunction(onBeforeClick);
|
|
5628
|
+
const hasOnClick = isFunction(onClick);
|
|
5629
|
+
const isButton = hasOnClick && !href;
|
|
5630
|
+
const isClickable = Boolean(hasOnClick) || Boolean(href) || propIsClickable;
|
|
5586
5631
|
|
|
5587
5632
|
// Adapt color to the theme.
|
|
5588
5633
|
const chipColor = color || (theme === Theme.light ? ColorPalette.dark : ColorPalette.light);
|
|
@@ -5590,7 +5635,7 @@ const Chip = forwardRef((props, ref) => {
|
|
|
5590
5635
|
const handleOnAfterClick = useStopPropagation(onAfterClick);
|
|
5591
5636
|
const handleKeyDown = evt => {
|
|
5592
5637
|
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(evt);
|
|
5593
|
-
if (
|
|
5638
|
+
if (hasOnClick) {
|
|
5594
5639
|
onEnterPressed(onClick)(evt);
|
|
5595
5640
|
}
|
|
5596
5641
|
};
|
|
@@ -5616,14 +5661,14 @@ const Chip = forwardRef((props, ref) => {
|
|
|
5616
5661
|
unselected: Boolean(!isSelected)
|
|
5617
5662
|
})),
|
|
5618
5663
|
"aria-disabled": isClickable && isDisabled || undefined,
|
|
5619
|
-
onClick: onClick
|
|
5664
|
+
onClick: hasOnClick ? onClick : undefined,
|
|
5620
5665
|
onKeyDown: handleKeyDown
|
|
5621
5666
|
}), before &&
|
|
5622
5667
|
/*#__PURE__*/
|
|
5623
5668
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
|
|
5624
5669
|
React__default.createElement("div", {
|
|
5625
5670
|
className: classNames(`${CLASSNAME$14}__before`, {
|
|
5626
|
-
[`${CLASSNAME$14}__before--is-clickable`]:
|
|
5671
|
+
[`${CLASSNAME$14}__before--is-clickable`]: hasBeforeClick
|
|
5627
5672
|
}),
|
|
5628
5673
|
onClick: handleOnBeforeClick
|
|
5629
5674
|
}, before), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -5633,7 +5678,7 @@ const Chip = forwardRef((props, ref) => {
|
|
|
5633
5678
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
|
|
5634
5679
|
React__default.createElement("div", {
|
|
5635
5680
|
className: classNames(`${CLASSNAME$14}__after`, {
|
|
5636
|
-
[`${CLASSNAME$14}__after--is-clickable`]:
|
|
5681
|
+
[`${CLASSNAME$14}__after--is-clickable`]: hasAfterClick
|
|
5637
5682
|
}),
|
|
5638
5683
|
onClick: handleOnAfterClick
|
|
5639
5684
|
}, after))
|
|
@@ -5714,7 +5759,7 @@ const COMPONENT_NAME$15 = 'ChipGroup';
|
|
|
5714
5759
|
/**
|
|
5715
5760
|
* Component default class name and class prefix.
|
|
5716
5761
|
*/
|
|
5717
|
-
const CLASSNAME$13 =
|
|
5762
|
+
const CLASSNAME$13 = getRootClassName(COMPONENT_NAME$15);
|
|
5718
5763
|
|
|
5719
5764
|
/**
|
|
5720
5765
|
* ChipGroup component.
|
|
@@ -5764,7 +5809,7 @@ const COMPONENT_NAME$14 = 'CommentBlock';
|
|
|
5764
5809
|
/**
|
|
5765
5810
|
* Component default class name and class prefix.
|
|
5766
5811
|
*/
|
|
5767
|
-
const CLASSNAME$12 =
|
|
5812
|
+
const CLASSNAME$12 = getRootClassName(COMPONENT_NAME$14);
|
|
5768
5813
|
|
|
5769
5814
|
/**
|
|
5770
5815
|
* Component default props.
|
|
@@ -5878,7 +5923,7 @@ const COMPONENT_NAME$13 = 'DatePicker';
|
|
|
5878
5923
|
/**
|
|
5879
5924
|
* Component default class name and class prefix.
|
|
5880
5925
|
*/
|
|
5881
|
-
const CLASSNAME$11 =
|
|
5926
|
+
const CLASSNAME$11 = getRootClassName(COMPONENT_NAME$13);
|
|
5882
5927
|
|
|
5883
5928
|
/** Get first day of week for locale from the browser API */
|
|
5884
5929
|
const getFromBrowser = locale => {
|
|
@@ -6010,7 +6055,7 @@ const getMonthCalendar = function (locale) {
|
|
|
6010
6055
|
if (iterDate.getMonth() === month) {
|
|
6011
6056
|
week[weekDayNumber] = day;
|
|
6012
6057
|
}
|
|
6013
|
-
if (weekDayNumber ===
|
|
6058
|
+
if (weekDayNumber === lastDayOfWeek.number) {
|
|
6014
6059
|
weeks.push(week);
|
|
6015
6060
|
rowCount += 1;
|
|
6016
6061
|
week = {};
|
|
@@ -6481,17 +6526,7 @@ function useIntersectionObserver(elements, options) {
|
|
|
6481
6526
|
* @return partitioned elements by the given predicates
|
|
6482
6527
|
*/
|
|
6483
6528
|
function partitionMulti(elements, predicates) {
|
|
6484
|
-
|
|
6485
|
-
const groups = predicates.map(() => []);
|
|
6486
|
-
for (const element of elements) {
|
|
6487
|
-
const index = predicates.findIndex(predicate => predicate(element));
|
|
6488
|
-
if (index !== -1) {
|
|
6489
|
-
groups[index].push(element);
|
|
6490
|
-
} else {
|
|
6491
|
-
others.push(element);
|
|
6492
|
-
}
|
|
6493
|
-
}
|
|
6494
|
-
return [...groups, others];
|
|
6529
|
+
return reduce(predicates, (partitioned, predicate) => concat(dropRight(partitioned), partition(last(partitioned), predicate)), [elements]);
|
|
6495
6530
|
}
|
|
6496
6531
|
|
|
6497
6532
|
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
|
@@ -6761,8 +6796,8 @@ const _excluded$15 = ["children", "className", "header", "focusElement", "forceF
|
|
|
6761
6796
|
* Defines the props of the component.
|
|
6762
6797
|
*/
|
|
6763
6798
|
|
|
6764
|
-
const isHeader$1 =
|
|
6765
|
-
const isFooter$1 =
|
|
6799
|
+
const isHeader$1 = isComponent('header');
|
|
6800
|
+
const isFooter$1 = isComponent('footer');
|
|
6766
6801
|
|
|
6767
6802
|
/**
|
|
6768
6803
|
* Component display name.
|
|
@@ -6772,7 +6807,7 @@ const COMPONENT_NAME$10 = 'Dialog';
|
|
|
6772
6807
|
/**
|
|
6773
6808
|
* Component default class name and class prefix.
|
|
6774
6809
|
*/
|
|
6775
|
-
const CLASSNAME$10 =
|
|
6810
|
+
const CLASSNAME$10 = getRootClassName(COMPONENT_NAME$10);
|
|
6776
6811
|
|
|
6777
6812
|
/**
|
|
6778
6813
|
* Component default props.
|
|
@@ -6945,7 +6980,7 @@ const COMPONENT_NAME$$ = 'Divider';
|
|
|
6945
6980
|
/**
|
|
6946
6981
|
* Component default class name and class prefix.
|
|
6947
6982
|
*/
|
|
6948
|
-
const CLASSNAME$$ =
|
|
6983
|
+
const CLASSNAME$$ = getRootClassName(COMPONENT_NAME$$);
|
|
6949
6984
|
|
|
6950
6985
|
/**
|
|
6951
6986
|
* Component default props.
|
|
@@ -6993,7 +7028,7 @@ const COMPONENT_NAME$_ = 'DragHandle';
|
|
|
6993
7028
|
/**
|
|
6994
7029
|
* Component default class name and class prefix.
|
|
6995
7030
|
*/
|
|
6996
|
-
const CLASSNAME$_ =
|
|
7031
|
+
const CLASSNAME$_ = getRootClassName(COMPONENT_NAME$_);
|
|
6997
7032
|
|
|
6998
7033
|
/**
|
|
6999
7034
|
* DragHandle component.
|
|
@@ -7039,15 +7074,15 @@ const COMPONENT_NAME$Z = 'ExpansionPanel';
|
|
|
7039
7074
|
/**
|
|
7040
7075
|
* Component default class name and class prefix.
|
|
7041
7076
|
*/
|
|
7042
|
-
const CLASSNAME$Z =
|
|
7077
|
+
const CLASSNAME$Z = getRootClassName(COMPONENT_NAME$Z);
|
|
7043
7078
|
|
|
7044
7079
|
/**
|
|
7045
7080
|
* Component default props.
|
|
7046
7081
|
*/
|
|
7047
7082
|
const DEFAULT_PROPS$M = {};
|
|
7048
|
-
const isDragHandle =
|
|
7049
|
-
const isHeader =
|
|
7050
|
-
const isFooter =
|
|
7083
|
+
const isDragHandle = isComponent(DragHandle);
|
|
7084
|
+
const isHeader = isComponent('header');
|
|
7085
|
+
const isFooter = isComponent('footer');
|
|
7051
7086
|
|
|
7052
7087
|
/**
|
|
7053
7088
|
* ExpansionPanel component.
|
|
@@ -7079,18 +7114,20 @@ const ExpansionPanel = forwardRef((props, ref) => {
|
|
|
7079
7114
|
|
|
7080
7115
|
// Either take the header in children or create one with the label.
|
|
7081
7116
|
const headerProps = /*#__PURE__*/React__default.isValidElement(header) ? header.props : {};
|
|
7082
|
-
const headerContent =
|
|
7117
|
+
const headerContent = !isEmpty(headerProps.children) ? headerProps.children : /*#__PURE__*/React__default.createElement("span", {
|
|
7083
7118
|
className: `${CLASSNAME$Z}__label`
|
|
7084
7119
|
}, label);
|
|
7085
7120
|
const toggleOpen = event => {
|
|
7086
7121
|
const shouldOpen = !isOpen;
|
|
7087
|
-
if (shouldOpen) {
|
|
7088
|
-
onOpen
|
|
7122
|
+
if (isFunction(onOpen) && shouldOpen) {
|
|
7123
|
+
onOpen(event);
|
|
7089
7124
|
}
|
|
7090
|
-
if (!shouldOpen) {
|
|
7091
|
-
onClose
|
|
7125
|
+
if (isFunction(onClose) && !shouldOpen) {
|
|
7126
|
+
onClose(event);
|
|
7127
|
+
}
|
|
7128
|
+
if (isFunction(onToggleOpen)) {
|
|
7129
|
+
onToggleOpen(shouldOpen, event);
|
|
7092
7130
|
}
|
|
7093
|
-
onToggleOpen === null || onToggleOpen === void 0 ? void 0 : onToggleOpen(shouldOpen, event);
|
|
7094
7131
|
};
|
|
7095
7132
|
const color = theme === Theme.dark ? ColorPalette.light : ColorPalette.dark;
|
|
7096
7133
|
const rootClassName = classNames(className, handleBasicClasses({
|
|
@@ -7111,8 +7148,7 @@ const ExpansionPanel = forwardRef((props, ref) => {
|
|
|
7111
7148
|
// Switch max height on/off to activate the CSS transition (updates when children changes).
|
|
7112
7149
|
const [maxHeight, setMaxHeight] = useState('0');
|
|
7113
7150
|
useEffect(() => {
|
|
7114
|
-
|
|
7115
|
-
const height = isOpen ? (_wrapperRef$current$o = (_wrapperRef$current = wrapperRef.current) === null || _wrapperRef$current === void 0 ? void 0 : _wrapperRef$current.offsetHeight) !== null && _wrapperRef$current$o !== void 0 ? _wrapperRef$current$o : 0 : 0;
|
|
7151
|
+
const height = isOpen ? get(wrapperRef.current, 'offsetHeight', 0) : 0;
|
|
7116
7152
|
setMaxHeight(`${height}px`);
|
|
7117
7153
|
}, [children, isOpen]);
|
|
7118
7154
|
return /*#__PURE__*/React__default.createElement("section", _extends({
|
|
@@ -7153,7 +7189,7 @@ ExpansionPanel.defaultProps = DEFAULT_PROPS$M;
|
|
|
7153
7189
|
|
|
7154
7190
|
const _excluded$11 = ["label", "icon", "color", "className", "theme", "truncate"];
|
|
7155
7191
|
const COMPONENT_NAME$Y = 'Flag';
|
|
7156
|
-
const CLASSNAME$Y =
|
|
7192
|
+
const CLASSNAME$Y = getRootClassName(COMPONENT_NAME$Y);
|
|
7157
7193
|
const DEFAULT_PROPS$L = {};
|
|
7158
7194
|
|
|
7159
7195
|
/**
|
|
@@ -7198,9 +7234,6 @@ Flag.displayName = COMPONENT_NAME$Y;
|
|
|
7198
7234
|
Flag.className = CLASSNAME$Y;
|
|
7199
7235
|
Flag.defaultProps = DEFAULT_PROPS$L;
|
|
7200
7236
|
|
|
7201
|
-
/** Cast a value into an array if needed */
|
|
7202
|
-
const castArray = arrayOrElement => Array.isArray(arrayOrElement) ? arrayOrElement : [arrayOrElement];
|
|
7203
|
-
|
|
7204
7237
|
const _excluded$10 = ["as", "children", "className", "fillSpace", "gap", "hAlign", "marginAuto", "noShrink", "orientation", "vAlign", "wrap"];
|
|
7205
7238
|
|
|
7206
7239
|
/**
|
|
@@ -7215,7 +7248,7 @@ const COMPONENT_NAME$X = 'FlexBox';
|
|
|
7215
7248
|
/**
|
|
7216
7249
|
* Component default class name and class prefix.
|
|
7217
7250
|
*/
|
|
7218
|
-
const CLASSNAME$X =
|
|
7251
|
+
const CLASSNAME$X = getRootClassName(COMPONENT_NAME$X);
|
|
7219
7252
|
|
|
7220
7253
|
/**
|
|
7221
7254
|
* FlexBox component.
|
|
@@ -7263,7 +7296,7 @@ const COMPONENT_NAME$W = 'GenericBlock';
|
|
|
7263
7296
|
/**
|
|
7264
7297
|
* Component default class name and class prefix.
|
|
7265
7298
|
*/
|
|
7266
|
-
const CLASSNAME$W =
|
|
7299
|
+
const CLASSNAME$W = getRootClassName(COMPONENT_NAME$W);
|
|
7267
7300
|
|
|
7268
7301
|
/**
|
|
7269
7302
|
* Component default props.
|
|
@@ -7272,11 +7305,11 @@ const DEFAULT_PROPS$K = {
|
|
|
7272
7305
|
gap: Size.big,
|
|
7273
7306
|
orientation: Orientation.horizontal
|
|
7274
7307
|
};
|
|
7275
|
-
const Figure = (
|
|
7308
|
+
const Figure = noop.bind({});
|
|
7276
7309
|
const isFigure = isComponentType(Figure);
|
|
7277
|
-
const Content = (
|
|
7310
|
+
const Content = noop.bind({});
|
|
7278
7311
|
const isContent = isComponentType(Content);
|
|
7279
|
-
const Actions = (
|
|
7312
|
+
const Actions = noop.bind({});
|
|
7280
7313
|
const isActions = isComponentType(Actions);
|
|
7281
7314
|
|
|
7282
7315
|
/**
|
|
@@ -7314,8 +7347,7 @@ const BaseGenericBlock = forwardRef((props, ref) => {
|
|
|
7314
7347
|
contentChildProps: contentChild === null || contentChild === void 0 ? void 0 : contentChild.props,
|
|
7315
7348
|
actionsChild,
|
|
7316
7349
|
actionsChildProps: actionsChild === null || actionsChild === void 0 ? void 0 : actionsChild.props,
|
|
7317
|
-
|
|
7318
|
-
otherChildren: otherChildren.filter(child => React__default.Children.count(child) > 0)
|
|
7350
|
+
otherChildren: otherChildren.filter(child => !isEmpty(child))
|
|
7319
7351
|
};
|
|
7320
7352
|
}, [children]);
|
|
7321
7353
|
return /*#__PURE__*/React__default.createElement(FlexBox, _extends({
|
|
@@ -7357,13 +7389,7 @@ const GenericBlock = Object.assign(BaseGenericBlock, {
|
|
|
7357
7389
|
/**
|
|
7358
7390
|
* Accepted gap sizes for the generic block.
|
|
7359
7391
|
*/
|
|
7360
|
-
const GenericBlockGapSize =
|
|
7361
|
-
tiny: Size.tiny,
|
|
7362
|
-
regular: Size.regular,
|
|
7363
|
-
medium: Size.medium,
|
|
7364
|
-
big: Size.big,
|
|
7365
|
-
huge: Size.huge
|
|
7366
|
-
};
|
|
7392
|
+
const GenericBlockGapSize = pick(Size, ['tiny', 'regular', 'medium', 'big', 'huge']);
|
|
7367
7393
|
|
|
7368
7394
|
/** Empty object */
|
|
7369
7395
|
|
|
@@ -7423,7 +7449,7 @@ const COMPONENT_NAME$V = 'Text';
|
|
|
7423
7449
|
/**
|
|
7424
7450
|
* Component default class name and class prefix.
|
|
7425
7451
|
*/
|
|
7426
|
-
const CLASSNAME$V =
|
|
7452
|
+
const CLASSNAME$V = getRootClassName(COMPONENT_NAME$V);
|
|
7427
7453
|
|
|
7428
7454
|
/**
|
|
7429
7455
|
* Component default props.
|
|
@@ -7484,7 +7510,7 @@ const Text = forwardRef((props, ref) => {
|
|
|
7484
7510
|
style: _objectSpread2(_objectSpread2(_objectSpread2({}, truncateLinesStyle), whiteSpaceStyle), style)
|
|
7485
7511
|
}, forwardedProps), children && Children.toArray(children).map((child, index) => {
|
|
7486
7512
|
// Force wrap spaces around icons to make sure they are never stuck against text.
|
|
7487
|
-
if (
|
|
7513
|
+
if (isComponent(Icon)(child)) {
|
|
7488
7514
|
return /*#__PURE__*/React__default.createElement(Fragment, {
|
|
7489
7515
|
key: child.key || index
|
|
7490
7516
|
}, " ", child, " ");
|
|
@@ -7542,7 +7568,7 @@ const COMPONENT_NAME$U = 'Heading';
|
|
|
7542
7568
|
/**
|
|
7543
7569
|
* Component default class name and class prefix.
|
|
7544
7570
|
*/
|
|
7545
|
-
const CLASSNAME$U =
|
|
7571
|
+
const CLASSNAME$U = getRootClassName(COMPONENT_NAME$U);
|
|
7546
7572
|
|
|
7547
7573
|
/**
|
|
7548
7574
|
* Component default props.
|
|
@@ -7613,7 +7639,7 @@ const COMPONENT_NAME$T = 'Grid';
|
|
|
7613
7639
|
/**
|
|
7614
7640
|
* Component default class name and class prefix.
|
|
7615
7641
|
*/
|
|
7616
|
-
const CLASSNAME$T =
|
|
7642
|
+
const CLASSNAME$T = getRootClassName(COMPONENT_NAME$T);
|
|
7617
7643
|
|
|
7618
7644
|
/**
|
|
7619
7645
|
* Component default props.
|
|
@@ -7674,7 +7700,7 @@ const COMPONENT_NAME$S = 'GridItem';
|
|
|
7674
7700
|
/**
|
|
7675
7701
|
* Component default class name and class prefix.
|
|
7676
7702
|
*/
|
|
7677
|
-
const CLASSNAME$S =
|
|
7703
|
+
const CLASSNAME$S = getRootClassName(COMPONENT_NAME$S);
|
|
7678
7704
|
|
|
7679
7705
|
/**
|
|
7680
7706
|
* GridItem component.
|
|
@@ -7720,7 +7746,7 @@ const COMPONENT_NAME$R = 'GridColumn';
|
|
|
7720
7746
|
/**
|
|
7721
7747
|
* Component default class name and class prefix.
|
|
7722
7748
|
*/
|
|
7723
|
-
const CLASSNAME$R =
|
|
7749
|
+
const CLASSNAME$R = getRootClassName(COMPONENT_NAME$R);
|
|
7724
7750
|
|
|
7725
7751
|
/**
|
|
7726
7752
|
* Component default props.
|
|
@@ -7751,7 +7777,7 @@ const GridColumn = forwardRef((props, ref) => {
|
|
|
7751
7777
|
ref: ref,
|
|
7752
7778
|
className: classNames(className, CLASSNAME$R),
|
|
7753
7779
|
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
7754
|
-
['--lumx-grid-column-item-min-width']:
|
|
7780
|
+
['--lumx-grid-column-item-min-width']: isInteger(itemMinWidth) && `${itemMinWidth}px`,
|
|
7755
7781
|
['--lumx-grid-column-columns']: maxColumns,
|
|
7756
7782
|
['--lumx-grid-column-gap']: gap && `var(--lumx-spacing-unit-${gap})`
|
|
7757
7783
|
})
|
|
@@ -7775,7 +7801,7 @@ const COMPONENT_NAME$Q = 'Icon';
|
|
|
7775
7801
|
/**
|
|
7776
7802
|
* Component default class name and class prefix.
|
|
7777
7803
|
*/
|
|
7778
|
-
const CLASSNAME$Q =
|
|
7804
|
+
const CLASSNAME$Q = getRootClassName(COMPONENT_NAME$Q);
|
|
7779
7805
|
|
|
7780
7806
|
/**
|
|
7781
7807
|
* Component default props.
|
|
@@ -7940,7 +7966,7 @@ const COMPONENT_NAME$P = 'ImageBlock';
|
|
|
7940
7966
|
/**
|
|
7941
7967
|
* Component default class name and class prefix.
|
|
7942
7968
|
*/
|
|
7943
|
-
const CLASSNAME$P =
|
|
7969
|
+
const CLASSNAME$P = getRootClassName(COMPONENT_NAME$P);
|
|
7944
7970
|
|
|
7945
7971
|
/**
|
|
7946
7972
|
* Component default props.
|
|
@@ -8024,7 +8050,7 @@ const COMPONENT_NAME$O = 'ImageLightbox';
|
|
|
8024
8050
|
/**
|
|
8025
8051
|
* Component default class name and class prefix.
|
|
8026
8052
|
*/
|
|
8027
|
-
const CLASSNAME$O =
|
|
8053
|
+
const CLASSNAME$O = getRootClassName(COMPONENT_NAME$O);
|
|
8028
8054
|
|
|
8029
8055
|
/**
|
|
8030
8056
|
* Observe element size (only works if it's size depends on the window size).
|
|
@@ -8036,20 +8062,11 @@ const CLASSNAME$O = 'lumx-image-lightbox';
|
|
|
8036
8062
|
*/
|
|
8037
8063
|
function useSizeOnWindowResize(elementRef) {
|
|
8038
8064
|
const [size, setSize] = React__default.useState(null);
|
|
8039
|
-
const updateSize = React__default.useMemo(() => {
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
if (newSize) setSize(newSize);
|
|
8045
|
-
prevTimeout = undefined;
|
|
8046
|
-
}
|
|
8047
|
-
return () => {
|
|
8048
|
-
if (!prevTimeout) {
|
|
8049
|
-
prevTimeout = setTimeout(update, 10);
|
|
8050
|
-
}
|
|
8051
|
-
};
|
|
8052
|
-
}, [elementRef]);
|
|
8065
|
+
const updateSize = React__default.useMemo(() => throttle(() => {
|
|
8066
|
+
var _elementRef$current;
|
|
8067
|
+
const newSize = (_elementRef$current = elementRef.current) === null || _elementRef$current === void 0 ? void 0 : _elementRef$current.getBoundingClientRect();
|
|
8068
|
+
if (newSize) setSize(newSize);
|
|
8069
|
+
}, 10), [elementRef]);
|
|
8053
8070
|
React__default.useEffect(() => {
|
|
8054
8071
|
updateSize();
|
|
8055
8072
|
window.addEventListener('resize', updateSize);
|
|
@@ -8465,6 +8482,13 @@ const ImageSlideshow = _ref => {
|
|
|
8465
8482
|
})));
|
|
8466
8483
|
const getImgRef = React__default.useMemo(() => memoize((index, isActive) => {
|
|
8467
8484
|
return mergeRefs(images === null || images === void 0 ? void 0 : images[index].imgRef, isActive ? activeImageRef : undefined);
|
|
8485
|
+
},
|
|
8486
|
+
// memoize based on both arguments
|
|
8487
|
+
function () {
|
|
8488
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8489
|
+
args[_key] = arguments[_key];
|
|
8490
|
+
}
|
|
8491
|
+
return args.join();
|
|
8468
8492
|
}), [images, activeImageRef]);
|
|
8469
8493
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Slides, {
|
|
8470
8494
|
activeIndex: activeIndex,
|
|
@@ -8774,7 +8798,7 @@ const COMPONENT_NAME$N = 'InlineList';
|
|
|
8774
8798
|
/**
|
|
8775
8799
|
* Component default class name and class prefix.
|
|
8776
8800
|
*/
|
|
8777
|
-
const CLASSNAME$N =
|
|
8801
|
+
const CLASSNAME$N = getRootClassName(COMPONENT_NAME$N);
|
|
8778
8802
|
|
|
8779
8803
|
/**
|
|
8780
8804
|
* Component default props.
|
|
@@ -8845,7 +8869,7 @@ const COMPONENT_NAME$M = 'InputLabel';
|
|
|
8845
8869
|
/**
|
|
8846
8870
|
* Component default class name and class prefix.
|
|
8847
8871
|
*/
|
|
8848
|
-
const CLASSNAME$M =
|
|
8872
|
+
const CLASSNAME$M = getRootClassName(COMPONENT_NAME$M);
|
|
8849
8873
|
|
|
8850
8874
|
/**
|
|
8851
8875
|
* Component default props.
|
|
@@ -8898,7 +8922,7 @@ const COMPONENT_NAME$L = 'Lightbox';
|
|
|
8898
8922
|
/**
|
|
8899
8923
|
* Component default class name and class prefix.
|
|
8900
8924
|
*/
|
|
8901
|
-
const CLASSNAME$L =
|
|
8925
|
+
const CLASSNAME$L = getRootClassName(COMPONENT_NAME$L);
|
|
8902
8926
|
|
|
8903
8927
|
/**
|
|
8904
8928
|
* Lightbox component.
|
|
@@ -9031,7 +9055,7 @@ const COMPONENT_NAME$K = 'Link';
|
|
|
9031
9055
|
/**
|
|
9032
9056
|
* Component default class name and class prefix.
|
|
9033
9057
|
*/
|
|
9034
|
-
const CLASSNAME$K =
|
|
9058
|
+
const CLASSNAME$K = getRootClassName(COMPONENT_NAME$K);
|
|
9035
9059
|
const getIconSize = typography => {
|
|
9036
9060
|
switch (typography) {
|
|
9037
9061
|
case Typography.display1:
|
|
@@ -9081,7 +9105,7 @@ const Link = forwardRef((props, ref) => {
|
|
|
9081
9105
|
typography
|
|
9082
9106
|
} = props,
|
|
9083
9107
|
forwardedProps = _objectWithoutProperties(props, _excluded$O);
|
|
9084
|
-
const renderedChildren = useMemo(() => /*#__PURE__*/React__default.createElement(React__default.Fragment, null, leftIcon && /*#__PURE__*/React__default.createElement(Icon, {
|
|
9108
|
+
const renderedChildren = useMemo(() => /*#__PURE__*/React__default.createElement(React__default.Fragment, null, leftIcon && !isEmpty(leftIcon) && /*#__PURE__*/React__default.createElement(Icon, {
|
|
9085
9109
|
icon: leftIcon,
|
|
9086
9110
|
className: `${CLASSNAME$K}__left-icon`,
|
|
9087
9111
|
size: getIconSize(typography)
|
|
@@ -9089,7 +9113,7 @@ const Link = forwardRef((props, ref) => {
|
|
|
9089
9113
|
className: classNames(`${CLASSNAME$K}__content`, {
|
|
9090
9114
|
[`lumx-typography-${typography}`]: typography
|
|
9091
9115
|
})
|
|
9092
|
-
}, children), rightIcon && /*#__PURE__*/React__default.createElement(Icon, {
|
|
9116
|
+
}, children), rightIcon && !isEmpty(rightIcon) && /*#__PURE__*/React__default.createElement(Icon, {
|
|
9093
9117
|
icon: rightIcon,
|
|
9094
9118
|
className: `${CLASSNAME$K}__right-icon`,
|
|
9095
9119
|
size: getIconSize(typography)
|
|
@@ -9099,7 +9123,7 @@ const Link = forwardRef((props, ref) => {
|
|
|
9099
9123
|
* If there is no linkAs prop and no href, we returned a <button> instead of a <a>.
|
|
9100
9124
|
* If the component is disabled, we also returned a <button> since disabled is not compatible with <a>.
|
|
9101
9125
|
*/
|
|
9102
|
-
if (!linkAs && href || isDisabled) {
|
|
9126
|
+
if (!linkAs && isEmpty(href) || isDisabled) {
|
|
9103
9127
|
return /*#__PURE__*/React__default.createElement("button", _extends({
|
|
9104
9128
|
type: "button"
|
|
9105
9129
|
}, forwardedProps, {
|
|
@@ -9142,7 +9166,7 @@ const COMPONENT_NAME$J = 'LinkPreview';
|
|
|
9142
9166
|
/**
|
|
9143
9167
|
* Component default class name and class prefix.
|
|
9144
9168
|
*/
|
|
9145
|
-
const CLASSNAME$J =
|
|
9169
|
+
const CLASSNAME$J = getRootClassName(COMPONENT_NAME$J);
|
|
9146
9170
|
|
|
9147
9171
|
/**
|
|
9148
9172
|
* Component default props.
|
|
@@ -9242,7 +9266,7 @@ const COMPONENT_NAME$I = 'ListDivider';
|
|
|
9242
9266
|
/**
|
|
9243
9267
|
* Component default class name and class prefix.
|
|
9244
9268
|
*/
|
|
9245
|
-
const CLASSNAME$I =
|
|
9269
|
+
const CLASSNAME$I = getRootClassName(COMPONENT_NAME$I);
|
|
9246
9270
|
|
|
9247
9271
|
/**
|
|
9248
9272
|
* ListDivider component.
|
|
@@ -9279,7 +9303,7 @@ const COMPONENT_NAME$H = 'ListSubheader';
|
|
|
9279
9303
|
/**
|
|
9280
9304
|
* Component default class name and class prefix.
|
|
9281
9305
|
*/
|
|
9282
|
-
const CLASSNAME$H =
|
|
9306
|
+
const CLASSNAME$H = getRootClassName(COMPONENT_NAME$H);
|
|
9283
9307
|
|
|
9284
9308
|
/**
|
|
9285
9309
|
* ListSubheader component.
|
|
@@ -9317,7 +9341,7 @@ const COMPONENT_NAME$G = 'Message';
|
|
|
9317
9341
|
/**
|
|
9318
9342
|
* Component default class name and class prefix.
|
|
9319
9343
|
*/
|
|
9320
|
-
const CLASSNAME$G =
|
|
9344
|
+
const CLASSNAME$G = getRootClassName(COMPONENT_NAME$G);
|
|
9321
9345
|
|
|
9322
9346
|
/**
|
|
9323
9347
|
* Associative map from message kind to color and icon.
|
|
@@ -9407,7 +9431,7 @@ const COMPONENT_NAME$F = 'Mosaic';
|
|
|
9407
9431
|
/**
|
|
9408
9432
|
* Component default class name and class prefix.
|
|
9409
9433
|
*/
|
|
9410
|
-
const CLASSNAME$F =
|
|
9434
|
+
const CLASSNAME$F = getRootClassName(COMPONENT_NAME$F);
|
|
9411
9435
|
|
|
9412
9436
|
/**
|
|
9413
9437
|
* Component default props.
|
|
@@ -9451,7 +9475,7 @@ const Mosaic = forwardRef((props, ref) => {
|
|
|
9451
9475
|
})
|
|
9452
9476
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
9453
9477
|
className: `${CLASSNAME$F}__wrapper`
|
|
9454
|
-
}, thumbnails
|
|
9478
|
+
}, take(thumbnails, 4).map((thumbnail, index) => {
|
|
9455
9479
|
const {
|
|
9456
9480
|
image,
|
|
9457
9481
|
onClick,
|
|
@@ -9496,7 +9520,7 @@ const COMPONENT_NAME$E = 'NavigationItem';
|
|
|
9496
9520
|
/**
|
|
9497
9521
|
* Component default class name and class prefix.
|
|
9498
9522
|
*/
|
|
9499
|
-
const CLASSNAME$E =
|
|
9523
|
+
const CLASSNAME$E = getRootClassName(COMPONENT_NAME$E);
|
|
9500
9524
|
const NavigationItem = Object.assign(forwardRefPolymorphic((props, ref) => {
|
|
9501
9525
|
const {
|
|
9502
9526
|
className,
|
|
@@ -9558,7 +9582,7 @@ const COMPONENT_NAME$D = 'NavigationSection';
|
|
|
9558
9582
|
/**
|
|
9559
9583
|
* Component default class name and class prefix.
|
|
9560
9584
|
*/
|
|
9561
|
-
const CLASSNAME$D =
|
|
9585
|
+
const CLASSNAME$D = getRootClassName(COMPONENT_NAME$D);
|
|
9562
9586
|
const NavigationSection = forwardRef((props, ref) => {
|
|
9563
9587
|
const {
|
|
9564
9588
|
children,
|
|
@@ -9639,7 +9663,7 @@ const COMPONENT_NAME$C = 'Navigation';
|
|
|
9639
9663
|
/**
|
|
9640
9664
|
* Component default class name and class prefix.
|
|
9641
9665
|
*/
|
|
9642
|
-
const CLASSNAME$C =
|
|
9666
|
+
const CLASSNAME$C = getRootClassName(COMPONENT_NAME$C);
|
|
9643
9667
|
|
|
9644
9668
|
/**
|
|
9645
9669
|
* Component default props
|
|
@@ -9717,7 +9741,7 @@ const COMPONENT_NAME$B = 'Notification';
|
|
|
9717
9741
|
/**
|
|
9718
9742
|
* Component default class name and class prefix.
|
|
9719
9743
|
*/
|
|
9720
|
-
const CLASSNAME$B =
|
|
9744
|
+
const CLASSNAME$B = getRootClassName(COMPONENT_NAME$B);
|
|
9721
9745
|
|
|
9722
9746
|
/**
|
|
9723
9747
|
* Component default props.
|
|
@@ -9763,7 +9787,9 @@ const Notification = forwardRef((props, ref) => {
|
|
|
9763
9787
|
const isVisible = useTransitionVisibility(rootRef, !!isOpen, NOTIFICATION_TRANSITION_DURATION);
|
|
9764
9788
|
const hasAction = Boolean(onActionClick) && Boolean(actionLabel);
|
|
9765
9789
|
const handleCallback = evt => {
|
|
9766
|
-
|
|
9790
|
+
if (isFunction(onActionClick)) {
|
|
9791
|
+
onActionClick();
|
|
9792
|
+
}
|
|
9767
9793
|
evt.stopPropagation();
|
|
9768
9794
|
};
|
|
9769
9795
|
if (!type || !isVisible) {
|
|
@@ -9821,7 +9847,7 @@ const COMPONENT_NAME$A = 'PopoverDialog';
|
|
|
9821
9847
|
/**
|
|
9822
9848
|
* Component default class name and class prefix.
|
|
9823
9849
|
*/
|
|
9824
|
-
const CLASSNAME$A =
|
|
9850
|
+
const CLASSNAME$A = getRootClassName(COMPONENT_NAME$A);
|
|
9825
9851
|
|
|
9826
9852
|
/**
|
|
9827
9853
|
* Component default props.
|
|
@@ -9880,7 +9906,7 @@ const COMPONENT_NAME$z = 'PostBlock';
|
|
|
9880
9906
|
/**
|
|
9881
9907
|
* Component default class name and class prefix.
|
|
9882
9908
|
*/
|
|
9883
|
-
const CLASSNAME$z =
|
|
9909
|
+
const CLASSNAME$z = getRootClassName(COMPONENT_NAME$z);
|
|
9884
9910
|
|
|
9885
9911
|
/**
|
|
9886
9912
|
* Component default props.
|
|
@@ -9913,13 +9939,6 @@ const PostBlock = forwardRef((props, ref) => {
|
|
|
9913
9939
|
title
|
|
9914
9940
|
} = props,
|
|
9915
9941
|
forwardedProps = _objectWithoutProperties(props, _excluded$D);
|
|
9916
|
-
|
|
9917
|
-
// Display text as string or HTML
|
|
9918
|
-
const textContent = typeof text === 'string' ? {
|
|
9919
|
-
children: text
|
|
9920
|
-
} : {
|
|
9921
|
-
dangerouslySetInnerHTML: text
|
|
9922
|
-
};
|
|
9923
9942
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
9924
9943
|
ref: ref,
|
|
9925
9944
|
className: classNames(className, handleBasicClasses({
|
|
@@ -9942,9 +9961,15 @@ const PostBlock = forwardRef((props, ref) => {
|
|
|
9942
9961
|
onClick: onClick
|
|
9943
9962
|
}, title), meta && /*#__PURE__*/React__default.createElement("span", {
|
|
9944
9963
|
className: `${CLASSNAME$z}__meta`
|
|
9945
|
-
}, meta),
|
|
9964
|
+
}, meta), isObject(text) && text.__html ?
|
|
9965
|
+
/*#__PURE__*/
|
|
9966
|
+
// eslint-disable-next-line react/no-danger
|
|
9967
|
+
React__default.createElement("p", {
|
|
9968
|
+
dangerouslySetInnerHTML: text,
|
|
9946
9969
|
className: `${CLASSNAME$z}__text`
|
|
9947
|
-
}
|
|
9970
|
+
}) : /*#__PURE__*/React__default.createElement("p", {
|
|
9971
|
+
className: `${CLASSNAME$z}__text`
|
|
9972
|
+
}, text), attachments && /*#__PURE__*/React__default.createElement("div", {
|
|
9948
9973
|
className: `${CLASSNAME$z}__attachments`
|
|
9949
9974
|
}, attachments), (tags || actions) && /*#__PURE__*/React__default.createElement("div", {
|
|
9950
9975
|
className: `${CLASSNAME$z}__toolbar`
|
|
@@ -9967,7 +9992,7 @@ const COMPONENT_NAME$y = 'ProgressLinear';
|
|
|
9967
9992
|
/**
|
|
9968
9993
|
* Component default class name and class prefix.
|
|
9969
9994
|
*/
|
|
9970
|
-
const CLASSNAME$y =
|
|
9995
|
+
const CLASSNAME$y = getRootClassName(COMPONENT_NAME$y);
|
|
9971
9996
|
|
|
9972
9997
|
/**
|
|
9973
9998
|
* Component default props.
|
|
@@ -10023,7 +10048,7 @@ const COMPONENT_NAME$x = 'ProgressCircular';
|
|
|
10023
10048
|
/**
|
|
10024
10049
|
* Component default class name and class prefix.
|
|
10025
10050
|
*/
|
|
10026
|
-
const CLASSNAME$x =
|
|
10051
|
+
const CLASSNAME$x = getRootClassName(COMPONENT_NAME$x);
|
|
10027
10052
|
|
|
10028
10053
|
/**
|
|
10029
10054
|
* Component default props.
|
|
@@ -10097,7 +10122,7 @@ const COMPONENT_NAME$w = 'Progress';
|
|
|
10097
10122
|
/**
|
|
10098
10123
|
* Component default class name and class prefix.
|
|
10099
10124
|
*/
|
|
10100
|
-
const CLASSNAME$w =
|
|
10125
|
+
const CLASSNAME$w = getRootClassName(COMPONENT_NAME$w);
|
|
10101
10126
|
|
|
10102
10127
|
/**
|
|
10103
10128
|
* Component default props.
|
|
@@ -10398,7 +10423,7 @@ const COMPONENT_NAME$v = 'ProgressTracker';
|
|
|
10398
10423
|
/**
|
|
10399
10424
|
* Component default class name and class prefix.
|
|
10400
10425
|
*/
|
|
10401
|
-
const CLASSNAME$v =
|
|
10426
|
+
const CLASSNAME$v = getRootClassName(COMPONENT_NAME$v);
|
|
10402
10427
|
|
|
10403
10428
|
/**
|
|
10404
10429
|
* Component default props.
|
|
@@ -10474,7 +10499,7 @@ const COMPONENT_NAME$u = 'ProgressTrackerStep';
|
|
|
10474
10499
|
/**
|
|
10475
10500
|
* Component default class name and class prefix.
|
|
10476
10501
|
*/
|
|
10477
|
-
const CLASSNAME$u =
|
|
10502
|
+
const CLASSNAME$u = getRootClassName(COMPONENT_NAME$u);
|
|
10478
10503
|
|
|
10479
10504
|
/**
|
|
10480
10505
|
* Component default props.
|
|
@@ -10643,7 +10668,7 @@ const COMPONENT_NAME$s = 'RadioButton';
|
|
|
10643
10668
|
/**
|
|
10644
10669
|
* Component default class name and class prefix.
|
|
10645
10670
|
*/
|
|
10646
|
-
const CLASSNAME$s =
|
|
10671
|
+
const CLASSNAME$s = getRootClassName(COMPONENT_NAME$s);
|
|
10647
10672
|
|
|
10648
10673
|
/**
|
|
10649
10674
|
* Component default props.
|
|
@@ -10743,7 +10768,7 @@ const COMPONENT_NAME$r = 'RadioGroup';
|
|
|
10743
10768
|
/**
|
|
10744
10769
|
* Component default class name and class prefix.
|
|
10745
10770
|
*/
|
|
10746
|
-
const CLASSNAME$r =
|
|
10771
|
+
const CLASSNAME$r = getRootClassName(COMPONENT_NAME$r);
|
|
10747
10772
|
|
|
10748
10773
|
/**
|
|
10749
10774
|
* RadioGroup component.
|
|
@@ -10773,7 +10798,7 @@ const _excluded$t = ["anchorRef", "clearButtonProps", "handleKeyboardNav", "hasE
|
|
|
10773
10798
|
const COMPONENT_NAME$q = 'Select';
|
|
10774
10799
|
|
|
10775
10800
|
/** The default class name and classes prefix for this component. */
|
|
10776
|
-
const CLASSNAME$q =
|
|
10801
|
+
const CLASSNAME$q = getRootClassName(COMPONENT_NAME$q);
|
|
10777
10802
|
|
|
10778
10803
|
/** The default value of props. */
|
|
10779
10804
|
const DEFAULT_PROPS$n = {
|
|
@@ -10871,8 +10896,8 @@ const SelectField = props => {
|
|
|
10871
10896
|
* @return React element.
|
|
10872
10897
|
*/
|
|
10873
10898
|
const Select = forwardRef((props, ref) => {
|
|
10874
|
-
const isEmpty =
|
|
10875
|
-
const hasInputClear = props.onClear && props.clearButtonProps && !isEmpty;
|
|
10899
|
+
const isEmpty$1 = isEmpty(props.value);
|
|
10900
|
+
const hasInputClear = props.onClear && props.clearButtonProps && !isEmpty$1;
|
|
10876
10901
|
return WithSelectContext(SelectField, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
10877
10902
|
className: classNames(props.className, handleBasicClasses({
|
|
10878
10903
|
hasInputClear,
|
|
@@ -10880,7 +10905,7 @@ const Select = forwardRef((props, ref) => {
|
|
|
10880
10905
|
prefix: CLASSNAME$q
|
|
10881
10906
|
})),
|
|
10882
10907
|
hasInputClear,
|
|
10883
|
-
isEmpty
|
|
10908
|
+
isEmpty: isEmpty$1
|
|
10884
10909
|
}), ref);
|
|
10885
10910
|
});
|
|
10886
10911
|
Select.displayName = COMPONENT_NAME$q;
|
|
@@ -10896,7 +10921,7 @@ const _excluded$s = ["anchorRef", "handleKeyboardNav", "hasError", "icon", "id",
|
|
|
10896
10921
|
const COMPONENT_NAME$p = 'Select';
|
|
10897
10922
|
|
|
10898
10923
|
/** The default class name and classes prefix for this component. */
|
|
10899
|
-
const CLASSNAME$p =
|
|
10924
|
+
const CLASSNAME$p = getRootClassName(COMPONENT_NAME$p);
|
|
10900
10925
|
|
|
10901
10926
|
/** The default value of props. */
|
|
10902
10927
|
const DEFAULT_PROPS$m = {
|
|
@@ -11024,7 +11049,7 @@ const COMPONENT_NAME$o = 'SideNavigation';
|
|
|
11024
11049
|
/**
|
|
11025
11050
|
* Component default class name and class prefix.
|
|
11026
11051
|
*/
|
|
11027
|
-
const CLASSNAME$o =
|
|
11052
|
+
const CLASSNAME$o = getRootClassName(COMPONENT_NAME$o);
|
|
11028
11053
|
|
|
11029
11054
|
/**
|
|
11030
11055
|
* SideNavigation component.
|
|
@@ -11041,7 +11066,7 @@ const SideNavigation = forwardRef((props, ref) => {
|
|
|
11041
11066
|
theme = defaultTheme
|
|
11042
11067
|
} = props,
|
|
11043
11068
|
forwardedProps = _objectWithoutProperties(props, _excluded$r);
|
|
11044
|
-
const content = Children.toArray(children).filter(
|
|
11069
|
+
const content = Children.toArray(children).filter(isComponent(SideNavigationItem));
|
|
11045
11070
|
return /*#__PURE__*/React__default.createElement("ul", _extends({
|
|
11046
11071
|
ref: ref
|
|
11047
11072
|
}, forwardedProps, {
|
|
@@ -11084,7 +11109,7 @@ const COMPONENT_NAME$n = 'SideNavigationItem';
|
|
|
11084
11109
|
/**
|
|
11085
11110
|
* Component default class name and class prefix.
|
|
11086
11111
|
*/
|
|
11087
|
-
const CLASSNAME$n =
|
|
11112
|
+
const CLASSNAME$n = getRootClassName(COMPONENT_NAME$n);
|
|
11088
11113
|
|
|
11089
11114
|
/**
|
|
11090
11115
|
* Component default props.
|
|
@@ -11118,7 +11143,7 @@ const SideNavigationItem = forwardRef((props, ref) => {
|
|
|
11118
11143
|
closeMode = 'unmount'
|
|
11119
11144
|
} = props,
|
|
11120
11145
|
forwardedProps = _objectWithoutProperties(props, _excluded$p);
|
|
11121
|
-
const content = children && Children.toArray(children).filter(
|
|
11146
|
+
const content = children && Children.toArray(children).filter(isComponent(SideNavigationItem));
|
|
11122
11147
|
const hasContent = !isEmpty(content);
|
|
11123
11148
|
const shouldSplitActions = Boolean(onActionClick);
|
|
11124
11149
|
const showChildren = hasContent && isOpen;
|
|
@@ -11195,7 +11220,7 @@ const COMPONENT_NAME$m = 'SkeletonCircle';
|
|
|
11195
11220
|
/**
|
|
11196
11221
|
* Component default class name and class prefix.
|
|
11197
11222
|
*/
|
|
11198
|
-
const CLASSNAME$m =
|
|
11223
|
+
const CLASSNAME$m = getRootClassName(COMPONENT_NAME$m);
|
|
11199
11224
|
|
|
11200
11225
|
/**
|
|
11201
11226
|
* SkeletonCircle component.
|
|
@@ -11255,7 +11280,7 @@ const COMPONENT_NAME$l = 'SkeletonRectangle';
|
|
|
11255
11280
|
/**
|
|
11256
11281
|
* Component default class name and class prefix.
|
|
11257
11282
|
*/
|
|
11258
|
-
const CLASSNAME$l =
|
|
11283
|
+
const CLASSNAME$l = getRootClassName(COMPONENT_NAME$l);
|
|
11259
11284
|
|
|
11260
11285
|
/**
|
|
11261
11286
|
* SkeletonRectangle component.
|
|
@@ -11312,7 +11337,7 @@ const COMPONENT_NAME$k = 'SkeletonTypography';
|
|
|
11312
11337
|
/**
|
|
11313
11338
|
* Component default class name and class prefix.
|
|
11314
11339
|
*/
|
|
11315
|
-
const CLASSNAME$k =
|
|
11340
|
+
const CLASSNAME$k = getRootClassName(COMPONENT_NAME$k);
|
|
11316
11341
|
|
|
11317
11342
|
/**
|
|
11318
11343
|
* SkeletonTypography component.
|
|
@@ -11399,7 +11424,7 @@ const COMPONENT_NAME$j = 'Slider';
|
|
|
11399
11424
|
/**
|
|
11400
11425
|
* Component default class name and class prefix.
|
|
11401
11426
|
*/
|
|
11402
|
-
const CLASSNAME$j =
|
|
11427
|
+
const CLASSNAME$j = getRootClassName(COMPONENT_NAME$j);
|
|
11403
11428
|
|
|
11404
11429
|
/**
|
|
11405
11430
|
* Component default props.
|
|
@@ -11664,8 +11689,9 @@ function useInterval(callback, delay) {
|
|
|
11664
11689
|
useEffect(() => {
|
|
11665
11690
|
if (delay === null) return undefined;
|
|
11666
11691
|
function tick() {
|
|
11667
|
-
|
|
11668
|
-
|
|
11692
|
+
if (isFunction(savedCallback.current)) {
|
|
11693
|
+
savedCallback.current();
|
|
11694
|
+
}
|
|
11669
11695
|
}
|
|
11670
11696
|
const id = setInterval(tick, delay);
|
|
11671
11697
|
return () => clearInterval(id);
|
|
@@ -11982,7 +12008,7 @@ const COMPONENT_NAME$i = 'SlideshowItemGroup';
|
|
|
11982
12008
|
/**
|
|
11983
12009
|
* Component default class name and class prefix.
|
|
11984
12010
|
*/
|
|
11985
|
-
const CLASSNAME$i =
|
|
12011
|
+
const CLASSNAME$i = getRootClassName(COMPONENT_NAME$i);
|
|
11986
12012
|
const buildSlideShowGroupId = (slidesId, index) => `${slidesId}-slide-${index}`;
|
|
11987
12013
|
|
|
11988
12014
|
/**
|
|
@@ -12148,7 +12174,7 @@ const COMPONENT_NAME$h = 'SlideshowItem';
|
|
|
12148
12174
|
/**
|
|
12149
12175
|
* Component default class name and class prefix.
|
|
12150
12176
|
*/
|
|
12151
|
-
const CLASSNAME$h =
|
|
12177
|
+
const CLASSNAME$h = getRootClassName(COMPONENT_NAME$h);
|
|
12152
12178
|
|
|
12153
12179
|
/**
|
|
12154
12180
|
* SlideshowItem component.
|
|
@@ -12228,11 +12254,6 @@ function usePaginationVisibleRange(activeIndex, slideCount) {
|
|
|
12228
12254
|
}, [activeIndex, slideCount]);
|
|
12229
12255
|
}
|
|
12230
12256
|
|
|
12231
|
-
/** Generate a range of number starting at 0 and ending before the given number */
|
|
12232
|
-
const range = end => Array.from({
|
|
12233
|
-
length: end
|
|
12234
|
-
}, (_, i) => i);
|
|
12235
|
-
|
|
12236
12257
|
const _excluded$h = ["activeIndex", "className", "nextButtonProps", "onNextClick", "onPaginationClick", "onPreviousClick", "parentRef", "previousButtonProps", "paginationProps", "slidesCount", "theme", "isAutoPlaying", "playButtonProps", "paginationItemLabel", "paginationItemProps"],
|
|
12237
12258
|
_excluded2$1 = ["className", "label"];
|
|
12238
12259
|
|
|
@@ -12248,7 +12269,7 @@ const COMPONENT_NAME$g = 'SlideshowControls';
|
|
|
12248
12269
|
/**
|
|
12249
12270
|
* Component default class name and class prefix.
|
|
12250
12271
|
*/
|
|
12251
|
-
const CLASSNAME$g =
|
|
12272
|
+
const CLASSNAME$g = getRootClassName(COMPONENT_NAME$g);
|
|
12252
12273
|
|
|
12253
12274
|
/**
|
|
12254
12275
|
* Component default props.
|
|
@@ -12385,13 +12406,6 @@ const SlideshowControls = Object.assign(InternalSlideshowControls, {
|
|
|
12385
12406
|
useSlideshowControlsDefaultOptions: DEFAULT_OPTIONS
|
|
12386
12407
|
});
|
|
12387
12408
|
|
|
12388
|
-
/** Chunk array in slices of given size */
|
|
12389
|
-
function chunk(input, size) {
|
|
12390
|
-
return input.reduce((arr, item, idx) => {
|
|
12391
|
-
return idx % size === 0 ? [...arr, [item]] : [...arr.slice(0, -1), [...arr.slice(-1)[0], item]];
|
|
12392
|
-
}, []);
|
|
12393
|
-
}
|
|
12394
|
-
|
|
12395
12409
|
const _excluded$g = ["activeIndex", "id", "className", "theme", "fillHeight", "groupBy", "isAutoPlaying", "toggleAutoPlay", "slidesId", "children", "afterSlides", "hasControls", "slideGroupLabel"];
|
|
12396
12410
|
/**
|
|
12397
12411
|
* Component display name.
|
|
@@ -12401,7 +12415,7 @@ const COMPONENT_NAME$f = 'Slideshow';
|
|
|
12401
12415
|
/**
|
|
12402
12416
|
* Component default class name and class prefix.
|
|
12403
12417
|
*/
|
|
12404
|
-
const CLASSNAME$f =
|
|
12418
|
+
const CLASSNAME$f = getRootClassName(COMPONENT_NAME$f);
|
|
12405
12419
|
|
|
12406
12420
|
/**
|
|
12407
12421
|
* Slides component.
|
|
@@ -12487,7 +12501,7 @@ const COMPONENT_NAME$e = 'Switch';
|
|
|
12487
12501
|
/**
|
|
12488
12502
|
* Component default class name and class prefix.
|
|
12489
12503
|
*/
|
|
12490
|
-
const CLASSNAME$e =
|
|
12504
|
+
const CLASSNAME$e = getRootClassName(COMPONENT_NAME$e);
|
|
12491
12505
|
|
|
12492
12506
|
/**
|
|
12493
12507
|
* Component default props.
|
|
@@ -12567,7 +12581,7 @@ const Switch = forwardRef((props, ref) => {
|
|
|
12567
12581
|
htmlFor: inputId,
|
|
12568
12582
|
theme: theme,
|
|
12569
12583
|
className: `${CLASSNAME$e}__label`
|
|
12570
|
-
}, children), helper && /*#__PURE__*/React__default.createElement(InputHelper, {
|
|
12584
|
+
}, children), !isEmpty(helper) && /*#__PURE__*/React__default.createElement(InputHelper, {
|
|
12571
12585
|
id: `${inputId}-helper`,
|
|
12572
12586
|
theme: theme,
|
|
12573
12587
|
className: `${CLASSNAME$e}__helper`
|
|
@@ -12591,7 +12605,7 @@ const COMPONENT_NAME$d = 'Table';
|
|
|
12591
12605
|
/**
|
|
12592
12606
|
* Component default class name and class prefix.
|
|
12593
12607
|
*/
|
|
12594
|
-
const CLASSNAME$d =
|
|
12608
|
+
const CLASSNAME$d = getRootClassName(COMPONENT_NAME$d);
|
|
12595
12609
|
|
|
12596
12610
|
/**
|
|
12597
12611
|
* Component default props.
|
|
@@ -12644,7 +12658,7 @@ const COMPONENT_NAME$c = 'TableBody';
|
|
|
12644
12658
|
/**
|
|
12645
12659
|
* Component default class name and class prefix.
|
|
12646
12660
|
*/
|
|
12647
|
-
const CLASSNAME$c =
|
|
12661
|
+
const CLASSNAME$c = getRootClassName(COMPONENT_NAME$c, true);
|
|
12648
12662
|
|
|
12649
12663
|
/**
|
|
12650
12664
|
* TableBody component.
|
|
@@ -12697,7 +12711,7 @@ const COMPONENT_NAME$b = 'TableCell';
|
|
|
12697
12711
|
/**
|
|
12698
12712
|
* Component default class name and class prefix.
|
|
12699
12713
|
*/
|
|
12700
|
-
const CLASSNAME$b =
|
|
12714
|
+
const CLASSNAME$b = getRootClassName(COMPONENT_NAME$b, true);
|
|
12701
12715
|
|
|
12702
12716
|
/**
|
|
12703
12717
|
* Component default props.
|
|
@@ -12788,7 +12802,7 @@ const COMPONENT_NAME$a = 'TableHeader';
|
|
|
12788
12802
|
/**
|
|
12789
12803
|
* Component default class name and class prefix.
|
|
12790
12804
|
*/
|
|
12791
|
-
const CLASSNAME$a =
|
|
12805
|
+
const CLASSNAME$a = getRootClassName(COMPONENT_NAME$a, true);
|
|
12792
12806
|
|
|
12793
12807
|
/**
|
|
12794
12808
|
* Component default props.
|
|
@@ -12832,7 +12846,7 @@ const COMPONENT_NAME$9 = 'TableRow';
|
|
|
12832
12846
|
/**
|
|
12833
12847
|
* Component default class name and class prefix.
|
|
12834
12848
|
*/
|
|
12835
|
-
const CLASSNAME$9 =
|
|
12849
|
+
const CLASSNAME$9 = getRootClassName(COMPONENT_NAME$9, true);
|
|
12836
12850
|
|
|
12837
12851
|
/**
|
|
12838
12852
|
* Component default props.
|
|
@@ -13164,7 +13178,7 @@ const COMPONENT_NAME$5 = 'TextField';
|
|
|
13164
13178
|
/**
|
|
13165
13179
|
* Component default class name and class prefix.
|
|
13166
13180
|
*/
|
|
13167
|
-
const CLASSNAME$5 =
|
|
13181
|
+
const CLASSNAME$5 = getRootClassName(COMPONENT_NAME$5);
|
|
13168
13182
|
|
|
13169
13183
|
/**
|
|
13170
13184
|
* Default minimum number of rows in the multiline mode.
|
|
@@ -13253,7 +13267,7 @@ const renderInputNative = props => {
|
|
|
13253
13267
|
setFocus(false);
|
|
13254
13268
|
};
|
|
13255
13269
|
const handleChange = event => {
|
|
13256
|
-
onChange(event
|
|
13270
|
+
onChange(get(event, 'target.value'), name, event);
|
|
13257
13271
|
};
|
|
13258
13272
|
const Component = multiline ? 'textarea' : 'input';
|
|
13259
13273
|
const inputProps = _objectSpread2(_objectSpread2({}, forwardedProps), {}, {
|
|
@@ -13633,7 +13647,7 @@ const COMPONENT_NAME$4 = 'Thumbnail';
|
|
|
13633
13647
|
/**
|
|
13634
13648
|
* Component default class name and class prefix.
|
|
13635
13649
|
*/
|
|
13636
|
-
const CLASSNAME$4 =
|
|
13650
|
+
const CLASSNAME$4 = getRootClassName(COMPONENT_NAME$4);
|
|
13637
13651
|
|
|
13638
13652
|
/**
|
|
13639
13653
|
* Component default props.
|
|
@@ -13821,7 +13835,7 @@ const COMPONENT_NAME$3 = 'Toolbar';
|
|
|
13821
13835
|
/**
|
|
13822
13836
|
* Component default class name and class prefix.
|
|
13823
13837
|
*/
|
|
13824
|
-
const CLASSNAME$3 =
|
|
13838
|
+
const CLASSNAME$3 = getRootClassName(COMPONENT_NAME$3);
|
|
13825
13839
|
|
|
13826
13840
|
/**
|
|
13827
13841
|
* Component default props.
|
|
@@ -14068,7 +14082,7 @@ const COMPONENT_NAME$2 = 'Tooltip';
|
|
|
14068
14082
|
/**
|
|
14069
14083
|
* Component default class name and class prefix.
|
|
14070
14084
|
*/
|
|
14071
|
-
const CLASSNAME$2 =
|
|
14085
|
+
const CLASSNAME$2 = getRootClassName(COMPONENT_NAME$2);
|
|
14072
14086
|
|
|
14073
14087
|
/**
|
|
14074
14088
|
* Component default props.
|
|
@@ -14205,7 +14219,7 @@ const COMPONENT_NAME$1 = 'Uploader';
|
|
|
14205
14219
|
/**
|
|
14206
14220
|
* Component default class name and class prefix.
|
|
14207
14221
|
*/
|
|
14208
|
-
const CLASSNAME$1 =
|
|
14222
|
+
const CLASSNAME$1 = getRootClassName(COMPONENT_NAME$1);
|
|
14209
14223
|
|
|
14210
14224
|
/**
|
|
14211
14225
|
* Component default props.
|
|
@@ -14314,7 +14328,7 @@ const COMPONENT_NAME = 'UserBlock';
|
|
|
14314
14328
|
/**
|
|
14315
14329
|
* Component default class name and class prefix.
|
|
14316
14330
|
*/
|
|
14317
|
-
const CLASSNAME =
|
|
14331
|
+
const CLASSNAME = getRootClassName(COMPONENT_NAME);
|
|
14318
14332
|
|
|
14319
14333
|
/**
|
|
14320
14334
|
* Component default props.
|
|
@@ -14361,7 +14375,7 @@ const UserBlock = forwardRef((props, ref) => {
|
|
|
14361
14375
|
const isLink = Boolean((linkProps === null || linkProps === void 0 ? void 0 : linkProps.href) || linkAs);
|
|
14362
14376
|
const isClickable = !!onClick || isLink;
|
|
14363
14377
|
const nameBlock = React__default.useMemo(() => {
|
|
14364
|
-
if (
|
|
14378
|
+
if (isEmpty(name)) {
|
|
14365
14379
|
return null;
|
|
14366
14380
|
}
|
|
14367
14381
|
let NameComponent = 'span';
|
|
@@ -14376,8 +14390,12 @@ const UserBlock = forwardRef((props, ref) => {
|
|
|
14376
14390
|
color: ColorPalette.dark
|
|
14377
14391
|
}));
|
|
14378
14392
|
}
|
|
14393
|
+
// Disable avatar focus since the name block is the same link / same button.
|
|
14394
|
+
if (avatarProps) {
|
|
14395
|
+
set(avatarProps, ['thumbnailProps', 'tabIndex'], -1);
|
|
14396
|
+
}
|
|
14379
14397
|
return /*#__PURE__*/React__default.createElement(NameComponent, nProps, name);
|
|
14380
|
-
}, [isClickable, linkAs, linkProps, name, nameProps, onClick]);
|
|
14398
|
+
}, [avatarProps, isClickable, linkAs, linkProps, name, nameProps, onClick]);
|
|
14381
14399
|
const fieldsBlock = fields && componentSize !== Size.s && componentSize !== Size.xs && /*#__PURE__*/React__default.createElement("div", {
|
|
14382
14400
|
className: `${CLASSNAME}__fields`
|
|
14383
14401
|
}, fields.map((field, idx) => /*#__PURE__*/React__default.createElement("span", {
|
|
@@ -14404,11 +14422,7 @@ const UserBlock = forwardRef((props, ref) => {
|
|
|
14404
14422
|
className: classNames(`${CLASSNAME}__avatar`, avatarProps.className),
|
|
14405
14423
|
size: componentSize,
|
|
14406
14424
|
onClick: onClick,
|
|
14407
|
-
theme: theme
|
|
14408
|
-
thumbnailProps: _objectSpread2(_objectSpread2({}, avatarProps === null || avatarProps === void 0 ? void 0 : avatarProps.thumbnailProps), {}, {
|
|
14409
|
-
// Disable avatar focus since the name block is the same link / same button.
|
|
14410
|
-
tabIndex: avatarProps ? -1 : undefined
|
|
14411
|
-
})
|
|
14425
|
+
theme: theme
|
|
14412
14426
|
})), (fields || name) && /*#__PURE__*/React__default.createElement("div", {
|
|
14413
14427
|
className: `${CLASSNAME}__wrapper`
|
|
14414
14428
|
}, nameBlock, fieldsBlock), shouldDisplayActions && simpleAction && /*#__PURE__*/React__default.createElement("div", {
|