@lumx/react 3.8.1 → 3.8.2-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +63 -1
- package/index.js +1293 -542
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/image-lightbox/ImageLightbox.stories.tsx +165 -0
- package/src/components/image-lightbox/ImageLightbox.test.tsx +253 -0
- package/src/components/image-lightbox/ImageLightbox.tsx +85 -0
- package/src/components/image-lightbox/constants.ts +11 -0
- package/src/components/image-lightbox/index.ts +2 -0
- package/src/components/image-lightbox/internal/ImageSlide.tsx +107 -0
- package/src/components/image-lightbox/internal/ImageSlideshow.tsx +173 -0
- package/src/components/image-lightbox/internal/useAnimateScroll.ts +55 -0
- package/src/components/image-lightbox/internal/usePointerZoom.ts +148 -0
- package/src/components/image-lightbox/types.ts +50 -0
- package/src/components/image-lightbox/useImageLightbox.tsx +130 -0
- package/src/components/thumbnail/useFocusPointStyle.tsx +3 -4
- package/src/hooks/useElementSizeDependentOfWindowSize.ts +32 -0
- package/src/hooks/useImageSize.ts +17 -0
- package/src/index.ts +1 -0
- package/src/stories/generated/ImageLightbox/Demos.stories.tsx +6 -0
- package/src/utils/DOM/findImage.tsx +3 -0
- package/src/utils/DOM/startViewTransition.ts +56 -0
- package/src/utils/browser/getPrefersReducedMotion.ts +6 -0
- package/src/utils/object/isEqual.test.ts +25 -0
- package/src/utils/object/isEqual.ts +11 -0
- package/src/utils/react/unref.ts +7 -0
- package/src/utils/type.ts +15 -0
- package/src/utils/unref.ts +0 -0
package/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import noop from 'lodash/noop';
|
|
|
6
6
|
import get from 'lodash/get';
|
|
7
7
|
import isFunction from 'lodash/isFunction';
|
|
8
8
|
import last from 'lodash/last';
|
|
9
|
-
import { createPortal } from 'react-dom';
|
|
9
|
+
import ReactDOM, { createPortal } from 'react-dom';
|
|
10
10
|
import pull from 'lodash/pull';
|
|
11
11
|
import concat from 'lodash/concat';
|
|
12
12
|
import dropRight from 'lodash/dropRight';
|
|
@@ -17,6 +17,7 @@ import memoize from 'lodash/memoize';
|
|
|
17
17
|
import castArray from 'lodash/castArray';
|
|
18
18
|
import pick from 'lodash/pick';
|
|
19
19
|
import isInteger from 'lodash/isInteger';
|
|
20
|
+
import throttle from 'lodash/throttle';
|
|
20
21
|
import take from 'lodash/take';
|
|
21
22
|
import uniqueId from 'lodash/uniqueId';
|
|
22
23
|
import isObject from 'lodash/isObject';
|
|
@@ -341,7 +342,7 @@ var classnames = createCommonjsModule(function (module) {
|
|
|
341
342
|
}());
|
|
342
343
|
});
|
|
343
344
|
|
|
344
|
-
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 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';
|
|
345
|
+
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';
|
|
345
346
|
|
|
346
347
|
var IDX=256, HEX=[], SIZE=256, BUFFER;
|
|
347
348
|
while (IDX--) HEX[IDX] = (IDX + 256).toString(16).substring(1);
|
|
@@ -1255,6 +1256,18 @@ const isComponentType = type => node => /*#__PURE__*/React.isValidElement(node)
|
|
|
1255
1256
|
* @example ComponentRef<Button> => React.Ref<HTMLButtonElement
|
|
1256
1257
|
*/
|
|
1257
1258
|
|
|
1259
|
+
/**
|
|
1260
|
+
* Rectangle size
|
|
1261
|
+
*/
|
|
1262
|
+
|
|
1263
|
+
/**
|
|
1264
|
+
* Maybe a HTMLElement or a React ref of a HTMLElement
|
|
1265
|
+
*/
|
|
1266
|
+
|
|
1267
|
+
/**
|
|
1268
|
+
* A point coordinate in 2D space
|
|
1269
|
+
*/
|
|
1270
|
+
|
|
1258
1271
|
const _excluded$6 = ["linkAs"];
|
|
1259
1272
|
/**
|
|
1260
1273
|
* Render link with default <a> HTML component or a custom one provided by `linkAs`.
|
|
@@ -7814,7 +7827,744 @@ ImageBlock.displayName = COMPONENT_NAME$x;
|
|
|
7814
7827
|
ImageBlock.className = CLASSNAME$u;
|
|
7815
7828
|
ImageBlock.defaultProps = DEFAULT_PROPS$q;
|
|
7816
7829
|
|
|
7817
|
-
|
|
7830
|
+
/**
|
|
7831
|
+
* Component display name.
|
|
7832
|
+
*/
|
|
7833
|
+
const COMPONENT_NAME$y = 'ImageLightbox';
|
|
7834
|
+
|
|
7835
|
+
/**
|
|
7836
|
+
* Component default class name and class prefix.
|
|
7837
|
+
*/
|
|
7838
|
+
const CLASSNAME$v = getRootClassName(COMPONENT_NAME$y);
|
|
7839
|
+
|
|
7840
|
+
/**
|
|
7841
|
+
* Observe element size (only works if it's size depends on the window size).
|
|
7842
|
+
*
|
|
7843
|
+
* (Not using ResizeObserver for better browser backward compat)
|
|
7844
|
+
*
|
|
7845
|
+
* @param elementRef Element to observe
|
|
7846
|
+
* @return the size and a manual update callback
|
|
7847
|
+
*/
|
|
7848
|
+
function useElementSizeDependentOfWindowSize(elementRef) {
|
|
7849
|
+
const [size, setSize] = React.useState(null);
|
|
7850
|
+
const updateSize = React.useMemo(() => throttle(() => {
|
|
7851
|
+
var _elementRef$current;
|
|
7852
|
+
const newSize = (_elementRef$current = elementRef.current) === null || _elementRef$current === void 0 ? void 0 : _elementRef$current.getBoundingClientRect();
|
|
7853
|
+
if (newSize) setSize(newSize);
|
|
7854
|
+
}, 10), [elementRef]);
|
|
7855
|
+
React.useEffect(() => {
|
|
7856
|
+
updateSize();
|
|
7857
|
+
window.addEventListener('resize', updateSize);
|
|
7858
|
+
return () => window.removeEventListener('resize', updateSize);
|
|
7859
|
+
}, [updateSize]);
|
|
7860
|
+
return [size, updateSize];
|
|
7861
|
+
}
|
|
7862
|
+
|
|
7863
|
+
/** Get natural image size after load. */
|
|
7864
|
+
function useImageSize(imgRef, getInitialSize) {
|
|
7865
|
+
const [imageSize, setImageSize] = React.useState(getInitialSize || null);
|
|
7866
|
+
React.useEffect(() => {
|
|
7867
|
+
const {
|
|
7868
|
+
current: img
|
|
7869
|
+
} = imgRef;
|
|
7870
|
+
if (!img) {
|
|
7871
|
+
return undefined;
|
|
7872
|
+
}
|
|
7873
|
+
const onLoad = () => setImageSize({
|
|
7874
|
+
width: img.naturalWidth,
|
|
7875
|
+
height: img.naturalHeight
|
|
7876
|
+
});
|
|
7877
|
+
img.addEventListener('load', onLoad);
|
|
7878
|
+
return () => img.removeEventListener('load', onLoad);
|
|
7879
|
+
}, [imgRef]);
|
|
7880
|
+
return imageSize;
|
|
7881
|
+
}
|
|
7882
|
+
|
|
7883
|
+
/** Check if user prefers reduced motion */
|
|
7884
|
+
function getPrefersReducedMotion() {
|
|
7885
|
+
var _WINDOW$matchMedia;
|
|
7886
|
+
return WINDOW === null || WINDOW === void 0 ? void 0 : (_WINDOW$matchMedia = WINDOW.matchMedia) === null || _WINDOW$matchMedia === void 0 ? void 0 : _WINDOW$matchMedia.call(WINDOW, '(prefers-reduced-motion: reduce)').matches;
|
|
7887
|
+
}
|
|
7888
|
+
|
|
7889
|
+
/** Minimal recursive deep equal of JS values */
|
|
7890
|
+
function isEqual(obj1, obj2) {
|
|
7891
|
+
if (obj1 === obj2) return true;
|
|
7892
|
+
if (typeof obj1 === 'object' && typeof obj2 === 'object') {
|
|
7893
|
+
const keys1 = Object.keys(obj1);
|
|
7894
|
+
const keys2 = Object.keys(obj2);
|
|
7895
|
+
if (keys1.length !== keys2.length) return false;
|
|
7896
|
+
return keys1.every(key1 => isEqual(obj1[key1], obj2[key1]));
|
|
7897
|
+
}
|
|
7898
|
+
return false;
|
|
7899
|
+
}
|
|
7900
|
+
|
|
7901
|
+
/**
|
|
7902
|
+
* Listen to mouse wheel + ctrl and multi-pointer pinch to zoom
|
|
7903
|
+
*/
|
|
7904
|
+
function usePointerZoom(scrollAreaRef, onScaleChange, animateScroll) {
|
|
7905
|
+
const [isPointerZooming, setPointerZooming] = React.useState(false);
|
|
7906
|
+
React.useEffect(() => {
|
|
7907
|
+
const scrollArea = scrollAreaRef.current;
|
|
7908
|
+
if (!scrollArea || !onScaleChange) {
|
|
7909
|
+
return undefined;
|
|
7910
|
+
}
|
|
7911
|
+
let animationFrame;
|
|
7912
|
+
let zoomStateTimeoutId;
|
|
7913
|
+
function updateScaleOnNextFrame(newScale, mousePosition) {
|
|
7914
|
+
// Cancel previously scheduled frame
|
|
7915
|
+
if (animationFrame) cancelAnimationFrame(animationFrame);
|
|
7916
|
+
|
|
7917
|
+
// Cancel previously scheduled zoom state change
|
|
7918
|
+
if (zoomStateTimeoutId) clearTimeout(zoomStateTimeoutId);
|
|
7919
|
+
function nextFrame() {
|
|
7920
|
+
setPointerZooming(true);
|
|
7921
|
+
onScaleChange === null || onScaleChange === void 0 ? void 0 : onScaleChange(newScale);
|
|
7922
|
+
animationFrame = null;
|
|
7923
|
+
// Wait a bit before indicating the pointer zooming is finished
|
|
7924
|
+
zoomStateTimeoutId = setTimeout(() => setPointerZooming(false), 100);
|
|
7925
|
+
}
|
|
7926
|
+
animationFrame = requestAnimationFrame(nextFrame);
|
|
7927
|
+
|
|
7928
|
+
// Animate scroll in parallel (centering on the current mouse position)
|
|
7929
|
+
animateScroll(mousePosition, {
|
|
7930
|
+
width: scrollArea.scrollWidth,
|
|
7931
|
+
height: scrollArea.scrollHeight
|
|
7932
|
+
});
|
|
7933
|
+
}
|
|
7934
|
+
function onWheel(event) {
|
|
7935
|
+
if (!event.ctrlKey) {
|
|
7936
|
+
return;
|
|
7937
|
+
}
|
|
7938
|
+
event.preventDefault();
|
|
7939
|
+
const newScale = Math.exp(-event.deltaY / 50);
|
|
7940
|
+
|
|
7941
|
+
// Update scale on next frame (focused on the mouse position)
|
|
7942
|
+
updateScaleOnNextFrame(newScale, {
|
|
7943
|
+
x: event.pageX,
|
|
7944
|
+
y: event.pageY
|
|
7945
|
+
});
|
|
7946
|
+
}
|
|
7947
|
+
const activePointers = {};
|
|
7948
|
+
let prevDistance = null;
|
|
7949
|
+
let previousCenterPoint = null;
|
|
7950
|
+
function onPointerDown(event) {
|
|
7951
|
+
activePointers[event.pointerId] = event;
|
|
7952
|
+
}
|
|
7953
|
+
function onPointerMove(event) {
|
|
7954
|
+
// Update pointer in cache
|
|
7955
|
+
if (activePointers[event.pointerId]) {
|
|
7956
|
+
activePointers[event.pointerId] = event;
|
|
7957
|
+
}
|
|
7958
|
+
const pointers = Object.values(activePointers);
|
|
7959
|
+
|
|
7960
|
+
// Make sure we run computation on one of the pointer in the group
|
|
7961
|
+
if (pointers[0].pointerId !== event.pointerId) {
|
|
7962
|
+
return;
|
|
7963
|
+
}
|
|
7964
|
+
|
|
7965
|
+
// Centered point between all pointers
|
|
7966
|
+
const centerPoint = {
|
|
7967
|
+
x: pointers.reduce((x, _ref) => {
|
|
7968
|
+
let {
|
|
7969
|
+
clientX
|
|
7970
|
+
} = _ref;
|
|
7971
|
+
return x + clientX;
|
|
7972
|
+
}, 0) / pointers.length,
|
|
7973
|
+
y: pointers.reduce((y, _ref2) => {
|
|
7974
|
+
let {
|
|
7975
|
+
clientY
|
|
7976
|
+
} = _ref2;
|
|
7977
|
+
return y + clientY;
|
|
7978
|
+
}, 0) / pointers.length
|
|
7979
|
+
};
|
|
7980
|
+
|
|
7981
|
+
// Movement of the center point
|
|
7982
|
+
const deltaCenterPoint = previousCenterPoint && {
|
|
7983
|
+
left: previousCenterPoint.x - centerPoint.x,
|
|
7984
|
+
top: previousCenterPoint.y - centerPoint.y
|
|
7985
|
+
};
|
|
7986
|
+
|
|
7987
|
+
// Pan X & Y
|
|
7988
|
+
if (deltaCenterPoint) {
|
|
7989
|
+
// Apply movement of the center point to the scroll
|
|
7990
|
+
scrollArea.scrollBy({
|
|
7991
|
+
top: deltaCenterPoint.top / 2,
|
|
7992
|
+
left: deltaCenterPoint.left / 2
|
|
7993
|
+
});
|
|
7994
|
+
}
|
|
7995
|
+
|
|
7996
|
+
// Pinch to zoom
|
|
7997
|
+
if (pointers.length === 2) {
|
|
7998
|
+
const [pointer1, pointer2] = pointers;
|
|
7999
|
+
const distance = Math.hypot(pointer2.clientX - pointer1.clientX, pointer2.clientY - pointer1.clientY);
|
|
8000
|
+
if (prevDistance && deltaCenterPoint) {
|
|
8001
|
+
const delta = prevDistance - distance;
|
|
8002
|
+
const absDelta = Math.abs(delta);
|
|
8003
|
+
|
|
8004
|
+
// Zoom only if we are "pinching" more than we are moving the pointers
|
|
8005
|
+
if (absDelta > Math.abs(deltaCenterPoint.left) && absDelta > Math.abs(deltaCenterPoint.top)) {
|
|
8006
|
+
// Update scale on next frame (focused on the center point between the two pointers)
|
|
8007
|
+
const newScale = Math.exp(-delta / 100);
|
|
8008
|
+
updateScaleOnNextFrame(newScale, centerPoint);
|
|
8009
|
+
}
|
|
8010
|
+
}
|
|
8011
|
+
prevDistance = distance;
|
|
8012
|
+
}
|
|
8013
|
+
previousCenterPoint = centerPoint;
|
|
8014
|
+
}
|
|
8015
|
+
function onPointerUp(event) {
|
|
8016
|
+
prevDistance = null;
|
|
8017
|
+
previousCenterPoint = null;
|
|
8018
|
+
delete activePointers[event.pointerId];
|
|
8019
|
+
}
|
|
8020
|
+
scrollArea.addEventListener('wheel', onWheel, {
|
|
8021
|
+
passive: false
|
|
8022
|
+
});
|
|
8023
|
+
const isMultiTouch = navigator.maxTouchPoints >= 2;
|
|
8024
|
+
if (isMultiTouch) {
|
|
8025
|
+
scrollArea.addEventListener('pointerdown', onPointerDown);
|
|
8026
|
+
scrollArea.addEventListener('pointermove', onPointerMove);
|
|
8027
|
+
scrollArea.addEventListener('pointerup', onPointerUp);
|
|
8028
|
+
}
|
|
8029
|
+
return () => {
|
|
8030
|
+
scrollArea.removeEventListener('wheel', onWheel);
|
|
8031
|
+
if (isMultiTouch) {
|
|
8032
|
+
scrollArea.removeEventListener('pointerdown', onPointerDown);
|
|
8033
|
+
scrollArea.removeEventListener('pointermove', onPointerMove);
|
|
8034
|
+
scrollArea.removeEventListener('pointerup', onPointerUp);
|
|
8035
|
+
}
|
|
8036
|
+
};
|
|
8037
|
+
}, [animateScroll, onScaleChange, scrollAreaRef]);
|
|
8038
|
+
return isPointerZooming;
|
|
8039
|
+
}
|
|
8040
|
+
|
|
8041
|
+
/** Maintains the scroll position centered relative to the original scroll area's dimensions when the content scales. */
|
|
8042
|
+
function useAnimateScroll(scrollAreaRef) {
|
|
8043
|
+
return React.useMemo(() => {
|
|
8044
|
+
let animationFrame = null;
|
|
8045
|
+
return function animate(centerPoint, initialScrollAreaSize) {
|
|
8046
|
+
const scrollArea = scrollAreaRef.current;
|
|
8047
|
+
if (!scrollArea) {
|
|
8048
|
+
return;
|
|
8049
|
+
}
|
|
8050
|
+
|
|
8051
|
+
// Cancel previously running animation
|
|
8052
|
+
if (animationFrame) cancelAnimationFrame(animationFrame);
|
|
8053
|
+
|
|
8054
|
+
// Center on the given point or else on the scroll area visual center
|
|
8055
|
+
const clientHeightRatio = centerPoint !== null && centerPoint !== void 0 && centerPoint.y ? centerPoint.y / scrollArea.clientHeight : 0.5;
|
|
8056
|
+
const clientWidthRatio = centerPoint !== null && centerPoint !== void 0 && centerPoint.x ? centerPoint.x / scrollArea.clientWidth : 0.5;
|
|
8057
|
+
const initialScrollHeight = (initialScrollAreaSize === null || initialScrollAreaSize === void 0 ? void 0 : initialScrollAreaSize.height) || scrollArea.scrollHeight;
|
|
8058
|
+
const initialScrollWidth = (initialScrollAreaSize === null || initialScrollAreaSize === void 0 ? void 0 : initialScrollAreaSize.width) || scrollArea.scrollWidth;
|
|
8059
|
+
const heightCenter = scrollArea.scrollTop + scrollArea.clientHeight * clientHeightRatio;
|
|
8060
|
+
const heightRatio = heightCenter / initialScrollHeight;
|
|
8061
|
+
const widthCenter = scrollArea.scrollLeft + scrollArea.clientWidth * clientWidthRatio;
|
|
8062
|
+
const widthRatio = widthCenter / initialScrollWidth;
|
|
8063
|
+
let prevScrollHeight = 0;
|
|
8064
|
+
let prevScrollWidth = 0;
|
|
8065
|
+
function nextFrame() {
|
|
8066
|
+
const {
|
|
8067
|
+
scrollHeight,
|
|
8068
|
+
scrollWidth,
|
|
8069
|
+
clientHeight,
|
|
8070
|
+
clientWidth
|
|
8071
|
+
} = scrollArea;
|
|
8072
|
+
|
|
8073
|
+
// Scroll area stopped expanding => stop animation
|
|
8074
|
+
if (scrollHeight === prevScrollHeight && scrollWidth === prevScrollWidth) {
|
|
8075
|
+
animationFrame = null;
|
|
8076
|
+
return;
|
|
8077
|
+
}
|
|
8078
|
+
|
|
8079
|
+
// Compute next scroll position
|
|
8080
|
+
const top = heightRatio * scrollHeight - clientHeight * clientHeightRatio;
|
|
8081
|
+
const left = widthRatio * scrollWidth - clientWidth * clientWidthRatio;
|
|
8082
|
+
scrollArea.scrollTo({
|
|
8083
|
+
top,
|
|
8084
|
+
left
|
|
8085
|
+
});
|
|
8086
|
+
prevScrollHeight = scrollHeight;
|
|
8087
|
+
prevScrollWidth = scrollWidth;
|
|
8088
|
+
animationFrame = requestAnimationFrame(nextFrame);
|
|
8089
|
+
}
|
|
8090
|
+
animationFrame = requestAnimationFrame(nextFrame);
|
|
8091
|
+
};
|
|
8092
|
+
}, [scrollAreaRef]);
|
|
8093
|
+
}
|
|
8094
|
+
|
|
8095
|
+
/** Internal image slide component for ImageLightbox */
|
|
8096
|
+
const ImageSlide = /*#__PURE__*/React.memo(props => {
|
|
8097
|
+
const {
|
|
8098
|
+
isActive,
|
|
8099
|
+
scale,
|
|
8100
|
+
onScaleChange,
|
|
8101
|
+
image: {
|
|
8102
|
+
image,
|
|
8103
|
+
imgRef: propImgRef,
|
|
8104
|
+
imgProps,
|
|
8105
|
+
alt,
|
|
8106
|
+
loadingPlaceholderImageRef
|
|
8107
|
+
}
|
|
8108
|
+
} = props;
|
|
8109
|
+
|
|
8110
|
+
// Get scroll area size
|
|
8111
|
+
const scrollAreaRef = React.useRef(null);
|
|
8112
|
+
const [scrollAreaSize, updateSize] = useElementSizeDependentOfWindowSize(scrollAreaRef);
|
|
8113
|
+
React.useEffect(() => {
|
|
8114
|
+
// Update size when active
|
|
8115
|
+
if (isActive) updateSize();
|
|
8116
|
+
}, [isActive, updateSize]);
|
|
8117
|
+
|
|
8118
|
+
// Get image size
|
|
8119
|
+
const imgRef = React.useRef(null);
|
|
8120
|
+
const imageSize = useImageSize(imgRef, () => {
|
|
8121
|
+
const width = Number.parseInt(imgProps === null || imgProps === void 0 ? void 0 : imgProps.width, 10);
|
|
8122
|
+
const height = Number.parseInt(imgProps === null || imgProps === void 0 ? void 0 : imgProps.height, 10);
|
|
8123
|
+
return width && height ? {
|
|
8124
|
+
width,
|
|
8125
|
+
height
|
|
8126
|
+
} : null;
|
|
8127
|
+
});
|
|
8128
|
+
|
|
8129
|
+
// Calculate new image size with scale
|
|
8130
|
+
const scaledImageSize = React.useMemo(() => {
|
|
8131
|
+
if (!scrollAreaSize || !imageSize) {
|
|
8132
|
+
return null;
|
|
8133
|
+
}
|
|
8134
|
+
const horizontalScale = scrollAreaSize.width / imageSize.width;
|
|
8135
|
+
const verticalScale = scrollAreaSize.height / imageSize.height;
|
|
8136
|
+
const baseScale = Math.min(1, Math.min(horizontalScale, verticalScale));
|
|
8137
|
+
return {
|
|
8138
|
+
width: imageSize.width * baseScale * (scale !== null && scale !== void 0 ? scale : 1),
|
|
8139
|
+
height: imageSize.height * baseScale * (scale !== null && scale !== void 0 ? scale : 1)
|
|
8140
|
+
};
|
|
8141
|
+
}, [scrollAreaSize, imageSize, scale]);
|
|
8142
|
+
|
|
8143
|
+
// Animate scroll to preserve the center of the current visible window in the scroll area
|
|
8144
|
+
const animateScroll = useAnimateScroll(scrollAreaRef);
|
|
8145
|
+
|
|
8146
|
+
// Zoom via mouse wheel or multi-touch pinch zoom
|
|
8147
|
+
const isPointerZooming = usePointerZoom(scrollAreaRef, onScaleChange, animateScroll);
|
|
8148
|
+
|
|
8149
|
+
// Animate scroll on scale change
|
|
8150
|
+
React.useLayoutEffect(() => {
|
|
8151
|
+
if (scale && !isPointerZooming) {
|
|
8152
|
+
animateScroll();
|
|
8153
|
+
}
|
|
8154
|
+
}, [isPointerZooming, scale, animateScroll]);
|
|
8155
|
+
const isScrollable = scaledImageSize && scrollAreaSize && (scaledImageSize.width > scrollAreaSize.width || scaledImageSize.height > scrollAreaSize.height);
|
|
8156
|
+
return /*#__PURE__*/React.createElement(SlideshowItem, {
|
|
8157
|
+
ref: scrollAreaRef
|
|
8158
|
+
// Make it accessible to keyboard nav when the zone is scrollable
|
|
8159
|
+
,
|
|
8160
|
+
tabIndex: isScrollable ? 0 : undefined,
|
|
8161
|
+
className: `${CLASSNAME$v}__image-slide`
|
|
8162
|
+
}, /*#__PURE__*/React.createElement(Thumbnail, {
|
|
8163
|
+
imgRef: useMergeRefs(imgRef, propImgRef),
|
|
8164
|
+
image: image,
|
|
8165
|
+
alt: alt,
|
|
8166
|
+
className: `${CLASSNAME$v}__thumbnail`,
|
|
8167
|
+
imgProps: _objectSpread2(_objectSpread2({}, imgProps), {}, {
|
|
8168
|
+
style: _objectSpread2(_objectSpread2(_objectSpread2({}, imgProps === null || imgProps === void 0 ? void 0 : imgProps.style), scaledImageSize || {
|
|
8169
|
+
maxHeight: scrollAreaSize === null || scrollAreaSize === void 0 ? void 0 : scrollAreaSize.height,
|
|
8170
|
+
maxWidth: scrollAreaSize === null || scrollAreaSize === void 0 ? void 0 : scrollAreaSize.width
|
|
8171
|
+
}), {}, {
|
|
8172
|
+
// Only animate when scale is set, and we are not pointer zooming and the user does not prefer reduced motion
|
|
8173
|
+
transition: scale && !isPointerZooming && !getPrefersReducedMotion() ? 'all 250ms' : undefined
|
|
8174
|
+
})
|
|
8175
|
+
}),
|
|
8176
|
+
loadingPlaceholderImageRef: loadingPlaceholderImageRef
|
|
8177
|
+
}));
|
|
8178
|
+
}, isEqual);
|
|
8179
|
+
|
|
8180
|
+
const _excluded$z = ["image", "imgRef"];
|
|
8181
|
+
/** Internal image slideshow component for ImageLightbox */
|
|
8182
|
+
const ImageSlideshow = _ref => {
|
|
8183
|
+
var _images$activeIndex, _images$activeIndex2, _images$activeIndex3;
|
|
8184
|
+
let {
|
|
8185
|
+
activeImageIndex,
|
|
8186
|
+
images,
|
|
8187
|
+
slideGroupLabel,
|
|
8188
|
+
zoomInButtonProps,
|
|
8189
|
+
zoomOutButtonProps,
|
|
8190
|
+
slideshowControlsProps,
|
|
8191
|
+
currentPaginationItemRef,
|
|
8192
|
+
footerRef,
|
|
8193
|
+
activeImageRef
|
|
8194
|
+
} = _ref;
|
|
8195
|
+
const {
|
|
8196
|
+
activeIndex,
|
|
8197
|
+
slideshowId,
|
|
8198
|
+
setSlideshow,
|
|
8199
|
+
slideshowSlidesId,
|
|
8200
|
+
slidesCount,
|
|
8201
|
+
onNextClick,
|
|
8202
|
+
onPaginationClick,
|
|
8203
|
+
onPreviousClick,
|
|
8204
|
+
toggleAutoPlay
|
|
8205
|
+
} = SlideshowControls.useSlideshowControls({
|
|
8206
|
+
itemsCount: images.length,
|
|
8207
|
+
activeIndex: activeImageIndex
|
|
8208
|
+
});
|
|
8209
|
+
|
|
8210
|
+
// Image metadata (caption)
|
|
8211
|
+
const title = (_images$activeIndex = images[activeIndex]) === null || _images$activeIndex === void 0 ? void 0 : _images$activeIndex.title;
|
|
8212
|
+
const description = (_images$activeIndex2 = images[activeIndex]) === null || _images$activeIndex2 === void 0 ? void 0 : _images$activeIndex2.description;
|
|
8213
|
+
const tags = (_images$activeIndex3 = images[activeIndex]) === null || _images$activeIndex3 === void 0 ? void 0 : _images$activeIndex3.tags;
|
|
8214
|
+
const metadata = title || description || tags ? /*#__PURE__*/React.createElement(ImageCaption, {
|
|
8215
|
+
theme: "dark",
|
|
8216
|
+
as: "div",
|
|
8217
|
+
title: title,
|
|
8218
|
+
description: description,
|
|
8219
|
+
tags: tags,
|
|
8220
|
+
align: "center"
|
|
8221
|
+
}) : null;
|
|
8222
|
+
|
|
8223
|
+
// Slideshow controls
|
|
8224
|
+
const slideShowControls = slidesCount > 1 && slideshowControlsProps ? /*#__PURE__*/React.createElement(SlideshowControls, _extends({
|
|
8225
|
+
theme: "dark",
|
|
8226
|
+
activeIndex: activeIndex,
|
|
8227
|
+
slidesCount: slidesCount,
|
|
8228
|
+
onNextClick: onNextClick,
|
|
8229
|
+
onPreviousClick: onPreviousClick,
|
|
8230
|
+
onPaginationClick: onPaginationClick
|
|
8231
|
+
}, slideshowControlsProps, {
|
|
8232
|
+
paginationItemProps: index => {
|
|
8233
|
+
var _slideshowControlsPro;
|
|
8234
|
+
const props = (slideshowControlsProps === null || slideshowControlsProps === void 0 ? void 0 : (_slideshowControlsPro = slideshowControlsProps.paginationItemProps) === null || _slideshowControlsPro === void 0 ? void 0 : _slideshowControlsPro.call(slideshowControlsProps, index)) || {};
|
|
8235
|
+
return _objectSpread2(_objectSpread2({}, props), {}, {
|
|
8236
|
+
ref: mergeRefs(props === null || props === void 0 ? void 0 : props.ref,
|
|
8237
|
+
// Focus the active pagination item once on mount
|
|
8238
|
+
activeIndex === index ? currentPaginationItemRef : undefined)
|
|
8239
|
+
});
|
|
8240
|
+
}
|
|
8241
|
+
})) : null;
|
|
8242
|
+
|
|
8243
|
+
// Zoom controls
|
|
8244
|
+
const [scale, setScale] = React.useState(undefined);
|
|
8245
|
+
const zoomEnabled = zoomInButtonProps && zoomOutButtonProps;
|
|
8246
|
+
const onScaleChange = React.useMemo(() => {
|
|
8247
|
+
if (!zoomEnabled) return undefined;
|
|
8248
|
+
return newScale => {
|
|
8249
|
+
setScale(function () {
|
|
8250
|
+
let prevScale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
8251
|
+
return Math.max(1, newScale * prevScale);
|
|
8252
|
+
});
|
|
8253
|
+
};
|
|
8254
|
+
}, [zoomEnabled]);
|
|
8255
|
+
const zoomIn = React.useCallback(() => onScaleChange === null || onScaleChange === void 0 ? void 0 : onScaleChange(1.5), [onScaleChange]);
|
|
8256
|
+
const zoomOut = React.useCallback(() => onScaleChange === null || onScaleChange === void 0 ? void 0 : onScaleChange(0.5), [onScaleChange]);
|
|
8257
|
+
React.useEffect(() => {
|
|
8258
|
+
// Reset scale on slide change
|
|
8259
|
+
if (activeIndex) setScale(undefined);
|
|
8260
|
+
}, [activeIndex]);
|
|
8261
|
+
const zoomControls = zoomEnabled && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconButton, _extends({}, zoomInButtonProps, {
|
|
8262
|
+
theme: "dark",
|
|
8263
|
+
emphasis: "low",
|
|
8264
|
+
icon: mdiMagnifyPlusOutline,
|
|
8265
|
+
onClick: zoomIn
|
|
8266
|
+
})), /*#__PURE__*/React.createElement(IconButton, _extends({}, zoomOutButtonProps, {
|
|
8267
|
+
theme: "dark",
|
|
8268
|
+
emphasis: "low",
|
|
8269
|
+
isDisabled: !scale || scale <= 1,
|
|
8270
|
+
icon: mdiMagnifyMinusOutline,
|
|
8271
|
+
onClick: zoomOut
|
|
8272
|
+
})));
|
|
8273
|
+
const getImgRef = React.useMemo(() => memoize((index, isActive) => {
|
|
8274
|
+
return mergeRefs(images === null || images === void 0 ? void 0 : images[index].imgRef, isActive ? activeImageRef : undefined);
|
|
8275
|
+
},
|
|
8276
|
+
// memoize based on both arguments
|
|
8277
|
+
function () {
|
|
8278
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8279
|
+
args[_key] = arguments[_key];
|
|
8280
|
+
}
|
|
8281
|
+
return args.join();
|
|
8282
|
+
}), [images, activeImageRef]);
|
|
8283
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Slides, {
|
|
8284
|
+
activeIndex: activeIndex,
|
|
8285
|
+
theme: "dark",
|
|
8286
|
+
slideGroupLabel: slideGroupLabel,
|
|
8287
|
+
fillHeight: true,
|
|
8288
|
+
id: slideshowId,
|
|
8289
|
+
ref: setSlideshow,
|
|
8290
|
+
slidesId: slideshowSlidesId,
|
|
8291
|
+
toggleAutoPlay: toggleAutoPlay
|
|
8292
|
+
}, images.map((_ref2, index) => {
|
|
8293
|
+
let {
|
|
8294
|
+
image,
|
|
8295
|
+
imgRef
|
|
8296
|
+
} = _ref2,
|
|
8297
|
+
imageProps = _objectWithoutProperties(_ref2, _excluded$z);
|
|
8298
|
+
const isActive = index === activeIndex;
|
|
8299
|
+
return /*#__PURE__*/React.createElement(ImageSlide, {
|
|
8300
|
+
isActive: isActive,
|
|
8301
|
+
key: image,
|
|
8302
|
+
image: _objectSpread2(_objectSpread2({}, imageProps), {}, {
|
|
8303
|
+
image,
|
|
8304
|
+
imgRef: getImgRef(index, isActive)
|
|
8305
|
+
}),
|
|
8306
|
+
scale: isActive ? scale : undefined,
|
|
8307
|
+
onScaleChange: onScaleChange
|
|
8308
|
+
});
|
|
8309
|
+
})), (metadata || slideShowControls || zoomControls) && /*#__PURE__*/React.createElement(FlexBox, {
|
|
8310
|
+
ref: footerRef,
|
|
8311
|
+
className: `${CLASSNAME$v}__footer`,
|
|
8312
|
+
orientation: "vertical",
|
|
8313
|
+
vAlign: "center",
|
|
8314
|
+
gap: "big"
|
|
8315
|
+
}, metadata, /*#__PURE__*/React.createElement(FlexBox, {
|
|
8316
|
+
className: `${CLASSNAME$v}__footer-actions`,
|
|
8317
|
+
orientation: "horizontal",
|
|
8318
|
+
gap: "regular"
|
|
8319
|
+
}, slideShowControls, zoomControls)));
|
|
8320
|
+
};
|
|
8321
|
+
|
|
8322
|
+
/** Unref a react ref or element */
|
|
8323
|
+
function unref(maybeElement) {
|
|
8324
|
+
if (maybeElement instanceof HTMLElement) return maybeElement;
|
|
8325
|
+
return maybeElement === null || maybeElement === void 0 ? void 0 : maybeElement.current;
|
|
8326
|
+
}
|
|
8327
|
+
|
|
8328
|
+
function setTransitionViewName(elementRef, name) {
|
|
8329
|
+
const element = unref(elementRef);
|
|
8330
|
+
if (element) element.style.viewTransitionName = name;
|
|
8331
|
+
}
|
|
8332
|
+
|
|
8333
|
+
/**
|
|
8334
|
+
* Wrapper around the `document.startViewTransition` handling browser incompatibilities, react DOM flush and
|
|
8335
|
+
* user preference.
|
|
8336
|
+
*
|
|
8337
|
+
* @param changes callback containing the changes to apply within the view transition.
|
|
8338
|
+
* @param setViewTransitionName set the `viewTransitionName` style on a `source` & `target` to morph these elements.
|
|
8339
|
+
*/
|
|
8340
|
+
async function startViewTransition(_ref) {
|
|
8341
|
+
var _document, _document$startViewTr;
|
|
8342
|
+
let {
|
|
8343
|
+
changes,
|
|
8344
|
+
viewTransitionName
|
|
8345
|
+
} = _ref;
|
|
8346
|
+
const start = (_document = document) === null || _document === void 0 ? void 0 : (_document$startViewTr = _document.startViewTransition) === null || _document$startViewTr === void 0 ? void 0 : _document$startViewTr.bind(document);
|
|
8347
|
+
const prefersReducedMotion = getPrefersReducedMotion();
|
|
8348
|
+
const {
|
|
8349
|
+
flushSync
|
|
8350
|
+
} = ReactDOM;
|
|
8351
|
+
if (prefersReducedMotion || !start || !flushSync || !(viewTransitionName !== null && viewTransitionName !== void 0 && viewTransitionName.source) || !(viewTransitionName !== null && viewTransitionName !== void 0 && viewTransitionName.target)) {
|
|
8352
|
+
// Skip, apply changes without a transition
|
|
8353
|
+
changes();
|
|
8354
|
+
return;
|
|
8355
|
+
}
|
|
8356
|
+
|
|
8357
|
+
// Set transition name on source element
|
|
8358
|
+
setTransitionViewName(viewTransitionName.source, viewTransitionName.name);
|
|
8359
|
+
|
|
8360
|
+
// Start view transition, apply changes & flush to DOM
|
|
8361
|
+
await start(() => {
|
|
8362
|
+
// Un-set transition name on source element
|
|
8363
|
+
setTransitionViewName(viewTransitionName.source, null);
|
|
8364
|
+
flushSync(changes);
|
|
8365
|
+
|
|
8366
|
+
// Set transition name on target element
|
|
8367
|
+
setTransitionViewName(viewTransitionName.target, viewTransitionName.name);
|
|
8368
|
+
}).updateCallbackDone;
|
|
8369
|
+
|
|
8370
|
+
// Un-set transition name on target element
|
|
8371
|
+
setTransitionViewName(viewTransitionName.target, null);
|
|
8372
|
+
}
|
|
8373
|
+
|
|
8374
|
+
/** Find image in element including the element */
|
|
8375
|
+
const findImage = element => element !== null && element !== void 0 && element.matches('img') ? element : (element === null || element === void 0 ? void 0 : element.querySelector('img')) || null;
|
|
8376
|
+
|
|
8377
|
+
const _excluded$A = ["images"];
|
|
8378
|
+
|
|
8379
|
+
/** Subset of the ImageLightboxProps managed by the useImageLightbox hook */
|
|
8380
|
+
|
|
8381
|
+
const EMPTY_PROPS = {
|
|
8382
|
+
isOpen: false,
|
|
8383
|
+
images: [],
|
|
8384
|
+
parentElement: /*#__PURE__*/React.createRef()
|
|
8385
|
+
};
|
|
8386
|
+
/**
|
|
8387
|
+
* Set up an ImageLightbox with images and triggers.
|
|
8388
|
+
*
|
|
8389
|
+
* - Associate a trigger with the lightbox to properly focus the trigger on close
|
|
8390
|
+
* - Associate a trigger with an image to display on open
|
|
8391
|
+
* - Automatically provide a view transition between an image trigger and the displayed image on open & close
|
|
8392
|
+
*
|
|
8393
|
+
* @param initialProps Images to display in the image lightbox
|
|
8394
|
+
*/
|
|
8395
|
+
function useImageLightbox(initialProps) {
|
|
8396
|
+
const {
|
|
8397
|
+
images = []
|
|
8398
|
+
} = initialProps,
|
|
8399
|
+
otherProps = _objectWithoutProperties(initialProps, _excluded$A);
|
|
8400
|
+
const imagesPropsRef = React.useRef(images);
|
|
8401
|
+
React.useEffect(() => {
|
|
8402
|
+
imagesPropsRef.current = images.map(props => _objectSpread2({
|
|
8403
|
+
imgRef: /*#__PURE__*/React.createRef()
|
|
8404
|
+
}, props));
|
|
8405
|
+
}, [images]);
|
|
8406
|
+
const currentImageRef = React.useRef(null);
|
|
8407
|
+
const [imageLightboxProps, setImageLightboxProps] = React.useState(() => _objectSpread2(_objectSpread2({}, EMPTY_PROPS), otherProps));
|
|
8408
|
+
const getTriggerProps = React.useMemo(() => {
|
|
8409
|
+
const triggerImageRefs = {};
|
|
8410
|
+
async function close() {
|
|
8411
|
+
const currentImage = currentImageRef.current;
|
|
8412
|
+
if (!currentImage) {
|
|
8413
|
+
return;
|
|
8414
|
+
}
|
|
8415
|
+
const currentIndex = imagesPropsRef.current.findIndex(_ref => {
|
|
8416
|
+
let {
|
|
8417
|
+
imgRef
|
|
8418
|
+
} = _ref;
|
|
8419
|
+
return (imgRef === null || imgRef === void 0 ? void 0 : imgRef.current) === currentImage;
|
|
8420
|
+
});
|
|
8421
|
+
await startViewTransition({
|
|
8422
|
+
changes() {
|
|
8423
|
+
// Close lightbox
|
|
8424
|
+
setImageLightboxProps(prevProps => _objectSpread2(_objectSpread2({}, prevProps), {}, {
|
|
8425
|
+
isOpen: false
|
|
8426
|
+
}));
|
|
8427
|
+
},
|
|
8428
|
+
// Morph from the image in lightbox to the image in trigger
|
|
8429
|
+
viewTransitionName: {
|
|
8430
|
+
source: currentImageRef,
|
|
8431
|
+
target: triggerImageRefs[currentIndex],
|
|
8432
|
+
name: CLASSNAME$v
|
|
8433
|
+
}
|
|
8434
|
+
});
|
|
8435
|
+
}
|
|
8436
|
+
async function open(triggerElement) {
|
|
8437
|
+
var _triggerImageRefs;
|
|
8438
|
+
let {
|
|
8439
|
+
activeImageIndex
|
|
8440
|
+
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
8441
|
+
// If we find an image inside the trigger, animate it in transition with the opening image
|
|
8442
|
+
const triggerImage = ((_triggerImageRefs = triggerImageRefs[activeImageIndex]) === null || _triggerImageRefs === void 0 ? void 0 : _triggerImageRefs.current) || findImage(triggerElement);
|
|
8443
|
+
|
|
8444
|
+
// Inject the trigger image as loading placeholder for better loading state
|
|
8445
|
+
const imagesWithFallbackSize = imagesPropsRef.current.map((image, idx) => {
|
|
8446
|
+
if (triggerImage && idx === activeImageIndex && !image.loadingPlaceholderImageRef) {
|
|
8447
|
+
return _objectSpread2(_objectSpread2({}, image), {}, {
|
|
8448
|
+
loadingPlaceholderImageRef: {
|
|
8449
|
+
current: triggerImage
|
|
8450
|
+
}
|
|
8451
|
+
});
|
|
8452
|
+
}
|
|
8453
|
+
return image;
|
|
8454
|
+
});
|
|
8455
|
+
await startViewTransition({
|
|
8456
|
+
changes: () => {
|
|
8457
|
+
// Open lightbox with setup props
|
|
8458
|
+
setImageLightboxProps(prevProps => _objectSpread2(_objectSpread2({}, prevProps), {}, {
|
|
8459
|
+
activeImageRef: currentImageRef,
|
|
8460
|
+
parentElement: {
|
|
8461
|
+
current: triggerElement
|
|
8462
|
+
},
|
|
8463
|
+
isOpen: true,
|
|
8464
|
+
onClose: () => {
|
|
8465
|
+
var _prevProps$onClose;
|
|
8466
|
+
close();
|
|
8467
|
+
prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$onClose = prevProps.onClose) === null || _prevProps$onClose === void 0 ? void 0 : _prevProps$onClose.call(prevProps);
|
|
8468
|
+
},
|
|
8469
|
+
images: imagesWithFallbackSize,
|
|
8470
|
+
activeImageIndex: activeImageIndex || 0
|
|
8471
|
+
}));
|
|
8472
|
+
},
|
|
8473
|
+
// Morph from the image in trigger to the image in lightbox
|
|
8474
|
+
viewTransitionName: {
|
|
8475
|
+
source: triggerImage,
|
|
8476
|
+
target: currentImageRef,
|
|
8477
|
+
name: CLASSNAME$v
|
|
8478
|
+
}
|
|
8479
|
+
});
|
|
8480
|
+
}
|
|
8481
|
+
return memoize(options => ({
|
|
8482
|
+
ref(element) {
|
|
8483
|
+
// Track trigger image ref if any
|
|
8484
|
+
if ((options === null || options === void 0 ? void 0 : options.activeImageIndex) !== undefined && element) {
|
|
8485
|
+
triggerImageRefs[options.activeImageIndex] = {
|
|
8486
|
+
current: findImage(element)
|
|
8487
|
+
};
|
|
8488
|
+
}
|
|
8489
|
+
},
|
|
8490
|
+
onClick(e) {
|
|
8491
|
+
open(e.target, options);
|
|
8492
|
+
}
|
|
8493
|
+
}));
|
|
8494
|
+
}, []);
|
|
8495
|
+
return {
|
|
8496
|
+
getTriggerProps,
|
|
8497
|
+
imageLightboxProps
|
|
8498
|
+
};
|
|
8499
|
+
}
|
|
8500
|
+
|
|
8501
|
+
const _excluded$B = ["className", "isOpen", "closeButtonProps", "onClose", "parentElement", "activeImageIndex", "slideshowControlsProps", "slideGroupLabel", "images", "zoomOutButtonProps", "zoomInButtonProps", "activeImageRef"];
|
|
8502
|
+
const Inner = /*#__PURE__*/forwardRef((props, ref) => {
|
|
8503
|
+
const {
|
|
8504
|
+
className,
|
|
8505
|
+
isOpen,
|
|
8506
|
+
closeButtonProps,
|
|
8507
|
+
onClose,
|
|
8508
|
+
parentElement,
|
|
8509
|
+
activeImageIndex,
|
|
8510
|
+
slideshowControlsProps,
|
|
8511
|
+
slideGroupLabel,
|
|
8512
|
+
images,
|
|
8513
|
+
zoomOutButtonProps,
|
|
8514
|
+
zoomInButtonProps,
|
|
8515
|
+
activeImageRef: propImageRef
|
|
8516
|
+
} = props,
|
|
8517
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$B);
|
|
8518
|
+
const currentPaginationItemRef = React.useRef(null);
|
|
8519
|
+
const footerRef = React.useRef(null);
|
|
8520
|
+
const imageRef = React.useRef(null);
|
|
8521
|
+
const clickAwayChildrenRefs = React.useRef([imageRef, footerRef]);
|
|
8522
|
+
const onClickAway = React.useCallback(evt => {
|
|
8523
|
+
const targetElement = evt.target;
|
|
8524
|
+
if (!(targetElement instanceof HTMLElement) || !(evt instanceof MouseEvent)) return;
|
|
8525
|
+
|
|
8526
|
+
// Skip click away if clicking on the scrollbar
|
|
8527
|
+
if (targetElement.clientWidth < evt.clientX || targetElement.clientHeight < evt.clientY) return;
|
|
8528
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
8529
|
+
}, [onClose]);
|
|
8530
|
+
return /*#__PURE__*/React.createElement(Lightbox, _extends({
|
|
8531
|
+
ref: ref,
|
|
8532
|
+
className: classnames(className, CLASSNAME$v),
|
|
8533
|
+
parentElement: parentElement,
|
|
8534
|
+
isOpen: isOpen,
|
|
8535
|
+
onClose: onClose,
|
|
8536
|
+
closeButtonProps: closeButtonProps,
|
|
8537
|
+
focusElement: currentPaginationItemRef
|
|
8538
|
+
}, forwardedProps), /*#__PURE__*/React.createElement(ClickAwayProvider, {
|
|
8539
|
+
childrenRefs: clickAwayChildrenRefs,
|
|
8540
|
+
callback: onClickAway
|
|
8541
|
+
}, /*#__PURE__*/React.createElement(ImageSlideshow, {
|
|
8542
|
+
activeImageIndex: activeImageIndex,
|
|
8543
|
+
slideGroupLabel: slideGroupLabel,
|
|
8544
|
+
slideshowControlsProps: slideshowControlsProps,
|
|
8545
|
+
images: images,
|
|
8546
|
+
zoomInButtonProps: zoomInButtonProps,
|
|
8547
|
+
zoomOutButtonProps: zoomOutButtonProps,
|
|
8548
|
+
footerRef: footerRef,
|
|
8549
|
+
activeImageRef: useMergeRefs(propImageRef, imageRef),
|
|
8550
|
+
currentPaginationItemRef: currentPaginationItemRef
|
|
8551
|
+
})));
|
|
8552
|
+
});
|
|
8553
|
+
Inner.displayName = COMPONENT_NAME$y;
|
|
8554
|
+
Inner.className = CLASSNAME$v;
|
|
8555
|
+
|
|
8556
|
+
/**
|
|
8557
|
+
* ImageLightbox component.
|
|
8558
|
+
*
|
|
8559
|
+
* @param props Component props.
|
|
8560
|
+
* @param ref Component ref.
|
|
8561
|
+
* @return React element.
|
|
8562
|
+
*/
|
|
8563
|
+
const ImageLightbox = Object.assign(Inner, {
|
|
8564
|
+
useImageLightbox
|
|
8565
|
+
});
|
|
8566
|
+
|
|
8567
|
+
const _excluded$C = ["className", "color", "colorVariant", "typography", "children", "wrap"];
|
|
7818
8568
|
|
|
7819
8569
|
/**
|
|
7820
8570
|
* Defines the props of the component.
|
|
@@ -7823,12 +8573,12 @@ const _excluded$z = ["className", "color", "colorVariant", "typography", "childr
|
|
|
7823
8573
|
/**
|
|
7824
8574
|
* Component display name.
|
|
7825
8575
|
*/
|
|
7826
|
-
const COMPONENT_NAME$
|
|
8576
|
+
const COMPONENT_NAME$z = 'InlineList';
|
|
7827
8577
|
|
|
7828
8578
|
/**
|
|
7829
8579
|
* Component default class name and class prefix.
|
|
7830
8580
|
*/
|
|
7831
|
-
const CLASSNAME$
|
|
8581
|
+
const CLASSNAME$w = getRootClassName(COMPONENT_NAME$z);
|
|
7832
8582
|
|
|
7833
8583
|
/**
|
|
7834
8584
|
* Component default props.
|
|
@@ -7851,7 +8601,7 @@ const InlineList = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7851
8601
|
children,
|
|
7852
8602
|
wrap
|
|
7853
8603
|
} = props,
|
|
7854
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
8604
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$C);
|
|
7855
8605
|
const fontColorClassName = color && getFontColorClassName(color, colorVariant);
|
|
7856
8606
|
const typographyClassName = typography && getTypographyClassName(typography);
|
|
7857
8607
|
return (
|
|
@@ -7859,7 +8609,7 @@ const InlineList = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7859
8609
|
// eslint-disable-next-line jsx-a11y/no-redundant-roles
|
|
7860
8610
|
React.createElement("ul", _extends({}, forwardedProps, {
|
|
7861
8611
|
ref: ref,
|
|
7862
|
-
className: classnames(className, CLASSNAME$
|
|
8612
|
+
className: classnames(className, CLASSNAME$w, wrap && `${CLASSNAME$w}--wrap`, fontColorClassName, typographyClassName)
|
|
7863
8613
|
// Lists with removed bullet style can lose their a11y list role on some browsers
|
|
7864
8614
|
,
|
|
7865
8615
|
role: "list"
|
|
@@ -7872,17 +8622,17 @@ const InlineList = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7872
8622
|
React.createElement("li", {
|
|
7873
8623
|
key: key,
|
|
7874
8624
|
role: "listitem",
|
|
7875
|
-
className: `${CLASSNAME$
|
|
8625
|
+
className: `${CLASSNAME$w}__item`
|
|
7876
8626
|
}, index !== 0 && /*#__PURE__*/React.createElement("span", {
|
|
7877
|
-
className: `${CLASSNAME$
|
|
8627
|
+
className: `${CLASSNAME$w}__item-separator`,
|
|
7878
8628
|
"aria-hidden": "true"
|
|
7879
8629
|
}, '\u00A0•\u00A0'), child)
|
|
7880
8630
|
);
|
|
7881
8631
|
}))
|
|
7882
8632
|
);
|
|
7883
8633
|
});
|
|
7884
|
-
InlineList.displayName = COMPONENT_NAME$
|
|
7885
|
-
InlineList.className = CLASSNAME$
|
|
8634
|
+
InlineList.displayName = COMPONENT_NAME$z;
|
|
8635
|
+
InlineList.className = CLASSNAME$w;
|
|
7886
8636
|
InlineList.defaultProps = DEFAULT_PROPS$r;
|
|
7887
8637
|
|
|
7888
8638
|
const INPUT_HELPER_CONFIGURATION = {
|
|
@@ -7897,7 +8647,7 @@ const INPUT_HELPER_CONFIGURATION = {
|
|
|
7897
8647
|
}
|
|
7898
8648
|
};
|
|
7899
8649
|
|
|
7900
|
-
const _excluded$
|
|
8650
|
+
const _excluded$D = ["children", "className", "kind", "theme"];
|
|
7901
8651
|
|
|
7902
8652
|
/**
|
|
7903
8653
|
* Defines the props of the component.
|
|
@@ -7906,12 +8656,12 @@ const _excluded$A = ["children", "className", "kind", "theme"];
|
|
|
7906
8656
|
/**
|
|
7907
8657
|
* Component display name.
|
|
7908
8658
|
*/
|
|
7909
|
-
const COMPONENT_NAME$
|
|
8659
|
+
const COMPONENT_NAME$A = 'InputHelper';
|
|
7910
8660
|
|
|
7911
8661
|
/**
|
|
7912
8662
|
* Component default class name and class prefix.
|
|
7913
8663
|
*/
|
|
7914
|
-
const CLASSNAME$
|
|
8664
|
+
const CLASSNAME$x = getRootClassName(COMPONENT_NAME$A);
|
|
7915
8665
|
|
|
7916
8666
|
/**
|
|
7917
8667
|
* Component default props.
|
|
@@ -7935,7 +8685,7 @@ const InputHelper = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7935
8685
|
kind,
|
|
7936
8686
|
theme
|
|
7937
8687
|
} = props,
|
|
7938
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
8688
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$D);
|
|
7939
8689
|
const {
|
|
7940
8690
|
color
|
|
7941
8691
|
} = INPUT_HELPER_CONFIGURATION[kind] || {};
|
|
@@ -7943,17 +8693,17 @@ const InputHelper = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7943
8693
|
ref: ref
|
|
7944
8694
|
}, forwardedProps, {
|
|
7945
8695
|
className: classnames(className, handleBasicClasses({
|
|
7946
|
-
prefix: CLASSNAME$
|
|
8696
|
+
prefix: CLASSNAME$x,
|
|
7947
8697
|
color,
|
|
7948
8698
|
theme
|
|
7949
8699
|
}))
|
|
7950
8700
|
}), children);
|
|
7951
8701
|
});
|
|
7952
|
-
InputHelper.displayName = COMPONENT_NAME$
|
|
7953
|
-
InputHelper.className = CLASSNAME$
|
|
8702
|
+
InputHelper.displayName = COMPONENT_NAME$A;
|
|
8703
|
+
InputHelper.className = CLASSNAME$x;
|
|
7954
8704
|
InputHelper.defaultProps = DEFAULT_PROPS$s;
|
|
7955
8705
|
|
|
7956
|
-
const _excluded$
|
|
8706
|
+
const _excluded$E = ["children", "className", "htmlFor", "isRequired", "theme"];
|
|
7957
8707
|
|
|
7958
8708
|
/**
|
|
7959
8709
|
* Defines the props of the component.
|
|
@@ -7962,12 +8712,12 @@ const _excluded$B = ["children", "className", "htmlFor", "isRequired", "theme"];
|
|
|
7962
8712
|
/**
|
|
7963
8713
|
* Component display name.
|
|
7964
8714
|
*/
|
|
7965
|
-
const COMPONENT_NAME$
|
|
8715
|
+
const COMPONENT_NAME$B = 'InputLabel';
|
|
7966
8716
|
|
|
7967
8717
|
/**
|
|
7968
8718
|
* Component default class name and class prefix.
|
|
7969
8719
|
*/
|
|
7970
|
-
const CLASSNAME$
|
|
8720
|
+
const CLASSNAME$y = getRootClassName(COMPONENT_NAME$B);
|
|
7971
8721
|
|
|
7972
8722
|
/**
|
|
7973
8723
|
* Component default props.
|
|
@@ -7991,23 +8741,23 @@ const InputLabel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7991
8741
|
isRequired,
|
|
7992
8742
|
theme
|
|
7993
8743
|
} = props,
|
|
7994
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
8744
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$E);
|
|
7995
8745
|
return /*#__PURE__*/React.createElement("label", _extends({
|
|
7996
8746
|
ref: ref
|
|
7997
8747
|
}, forwardedProps, {
|
|
7998
8748
|
htmlFor: htmlFor,
|
|
7999
8749
|
className: classnames(className, handleBasicClasses({
|
|
8000
|
-
prefix: CLASSNAME$
|
|
8750
|
+
prefix: CLASSNAME$y,
|
|
8001
8751
|
isRequired,
|
|
8002
8752
|
theme
|
|
8003
8753
|
}))
|
|
8004
8754
|
}), children);
|
|
8005
8755
|
});
|
|
8006
|
-
InputLabel.displayName = COMPONENT_NAME$
|
|
8007
|
-
InputLabel.className = CLASSNAME$
|
|
8756
|
+
InputLabel.displayName = COMPONENT_NAME$B;
|
|
8757
|
+
InputLabel.className = CLASSNAME$y;
|
|
8008
8758
|
InputLabel.defaultProps = DEFAULT_PROPS$t;
|
|
8009
8759
|
|
|
8010
|
-
const _excluded$
|
|
8760
|
+
const _excluded$F = ["aria-labelledby", "ariaLabelledBy", "aria-label", "ariaLabel", "children", "className", "closeButtonProps", "isOpen", "onClose", "parentElement", "focusElement", "preventAutoClose", "theme", "zIndex"];
|
|
8011
8761
|
|
|
8012
8762
|
/**
|
|
8013
8763
|
* Defines the props of the component.
|
|
@@ -8016,12 +8766,12 @@ const _excluded$C = ["aria-labelledby", "ariaLabelledBy", "aria-label", "ariaLab
|
|
|
8016
8766
|
/**
|
|
8017
8767
|
* Component display name.
|
|
8018
8768
|
*/
|
|
8019
|
-
const COMPONENT_NAME$
|
|
8769
|
+
const COMPONENT_NAME$C = 'Lightbox';
|
|
8020
8770
|
|
|
8021
8771
|
/**
|
|
8022
8772
|
* Component default class name and class prefix.
|
|
8023
8773
|
*/
|
|
8024
|
-
const CLASSNAME$
|
|
8774
|
+
const CLASSNAME$z = getRootClassName(COMPONENT_NAME$C);
|
|
8025
8775
|
|
|
8026
8776
|
/**
|
|
8027
8777
|
* Lightbox component.
|
|
@@ -8047,7 +8797,7 @@ const Lightbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8047
8797
|
theme,
|
|
8048
8798
|
zIndex
|
|
8049
8799
|
} = props,
|
|
8050
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
8800
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$F);
|
|
8051
8801
|
if (!DOCUMENT) {
|
|
8052
8802
|
// Can't render in SSR.
|
|
8053
8803
|
return null;
|
|
@@ -8108,7 +8858,7 @@ const Lightbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8108
8858
|
role: "dialog",
|
|
8109
8859
|
tabIndex: -1,
|
|
8110
8860
|
className: classnames(className, handleBasicClasses({
|
|
8111
|
-
prefix: CLASSNAME$
|
|
8861
|
+
prefix: CLASSNAME$z,
|
|
8112
8862
|
isHidden: !isOpen,
|
|
8113
8863
|
isShown: isOpen || isVisible,
|
|
8114
8864
|
theme
|
|
@@ -8117,7 +8867,7 @@ const Lightbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8117
8867
|
zIndex
|
|
8118
8868
|
}
|
|
8119
8869
|
}), closeButtonProps && /*#__PURE__*/React.createElement("div", {
|
|
8120
|
-
className: `${CLASSNAME$
|
|
8870
|
+
className: `${CLASSNAME$z}__close`
|
|
8121
8871
|
}, /*#__PURE__*/React.createElement(IconButton, _extends({}, closeButtonProps, {
|
|
8122
8872
|
ref: closeButtonRef,
|
|
8123
8873
|
emphasis: "low",
|
|
@@ -8131,14 +8881,14 @@ const Lightbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8131
8881
|
childrenRefs: clickAwayRefs
|
|
8132
8882
|
}, /*#__PURE__*/React.createElement("div", {
|
|
8133
8883
|
ref: childrenRef,
|
|
8134
|
-
className: `${CLASSNAME$
|
|
8884
|
+
className: `${CLASSNAME$z}__wrapper`,
|
|
8135
8885
|
role: "presentation"
|
|
8136
8886
|
}, children))), document.body);
|
|
8137
8887
|
});
|
|
8138
|
-
Lightbox.displayName = COMPONENT_NAME$
|
|
8139
|
-
Lightbox.className = CLASSNAME$
|
|
8888
|
+
Lightbox.displayName = COMPONENT_NAME$C;
|
|
8889
|
+
Lightbox.className = CLASSNAME$z;
|
|
8140
8890
|
|
|
8141
|
-
const _excluded$
|
|
8891
|
+
const _excluded$G = ["children", "className", "color", "colorVariant", "disabled", "isDisabled", "href", "leftIcon", "linkAs", "rightIcon", "target", "typography"];
|
|
8142
8892
|
|
|
8143
8893
|
/**
|
|
8144
8894
|
* Defines the props of the component.
|
|
@@ -8147,12 +8897,12 @@ const _excluded$D = ["children", "className", "color", "colorVariant", "disabled
|
|
|
8147
8897
|
/**
|
|
8148
8898
|
* Component display name.
|
|
8149
8899
|
*/
|
|
8150
|
-
const COMPONENT_NAME$
|
|
8900
|
+
const COMPONENT_NAME$D = 'Link';
|
|
8151
8901
|
|
|
8152
8902
|
/**
|
|
8153
8903
|
* Component default class name and class prefix.
|
|
8154
8904
|
*/
|
|
8155
|
-
const CLASSNAME$
|
|
8905
|
+
const CLASSNAME$A = getRootClassName(COMPONENT_NAME$D);
|
|
8156
8906
|
const getIconSize = typography => {
|
|
8157
8907
|
switch (typography) {
|
|
8158
8908
|
case Typography.display1:
|
|
@@ -8201,18 +8951,18 @@ const Link = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8201
8951
|
target,
|
|
8202
8952
|
typography
|
|
8203
8953
|
} = props,
|
|
8204
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
8954
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$G);
|
|
8205
8955
|
const renderedChildren = useMemo(() => /*#__PURE__*/React.createElement(React.Fragment, null, leftIcon && !isEmpty(leftIcon) && /*#__PURE__*/React.createElement(Icon, {
|
|
8206
8956
|
icon: leftIcon,
|
|
8207
|
-
className: `${CLASSNAME$
|
|
8957
|
+
className: `${CLASSNAME$A}__left-icon`,
|
|
8208
8958
|
size: getIconSize(typography)
|
|
8209
8959
|
}), children && /*#__PURE__*/React.createElement("span", {
|
|
8210
|
-
className: classnames(`${CLASSNAME$
|
|
8960
|
+
className: classnames(`${CLASSNAME$A}__content`, {
|
|
8211
8961
|
[`lumx-typography-${typography}`]: typography
|
|
8212
8962
|
})
|
|
8213
8963
|
}, children), rightIcon && !isEmpty(rightIcon) && /*#__PURE__*/React.createElement(Icon, {
|
|
8214
8964
|
icon: rightIcon,
|
|
8215
|
-
className: `${CLASSNAME$
|
|
8965
|
+
className: `${CLASSNAME$A}__right-icon`,
|
|
8216
8966
|
size: getIconSize(typography)
|
|
8217
8967
|
})), [leftIcon, typography, children, rightIcon]);
|
|
8218
8968
|
|
|
@@ -8227,7 +8977,7 @@ const Link = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8227
8977
|
ref: ref,
|
|
8228
8978
|
disabled: isDisabled,
|
|
8229
8979
|
className: classnames(className, handleBasicClasses({
|
|
8230
|
-
prefix: CLASSNAME$
|
|
8980
|
+
prefix: CLASSNAME$A,
|
|
8231
8981
|
color,
|
|
8232
8982
|
colorVariant
|
|
8233
8983
|
}))
|
|
@@ -8239,17 +8989,17 @@ const Link = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8239
8989
|
href,
|
|
8240
8990
|
target,
|
|
8241
8991
|
className: classnames(className, handleBasicClasses({
|
|
8242
|
-
prefix: CLASSNAME$
|
|
8992
|
+
prefix: CLASSNAME$A,
|
|
8243
8993
|
color,
|
|
8244
8994
|
colorVariant
|
|
8245
8995
|
})),
|
|
8246
8996
|
ref: ref
|
|
8247
8997
|
}), renderedChildren);
|
|
8248
8998
|
});
|
|
8249
|
-
Link.displayName = COMPONENT_NAME$
|
|
8250
|
-
Link.className = CLASSNAME$
|
|
8999
|
+
Link.displayName = COMPONENT_NAME$D;
|
|
9000
|
+
Link.className = CLASSNAME$A;
|
|
8251
9001
|
|
|
8252
|
-
const _excluded$
|
|
9002
|
+
const _excluded$H = ["className", "description", "link", "linkAs", "linkProps", "size", "theme", "thumbnailProps", "title", "titleHeading"];
|
|
8253
9003
|
|
|
8254
9004
|
/**
|
|
8255
9005
|
* Defines the props of the component.
|
|
@@ -8258,12 +9008,12 @@ const _excluded$E = ["className", "description", "link", "linkAs", "linkProps",
|
|
|
8258
9008
|
/**
|
|
8259
9009
|
* Component display name.
|
|
8260
9010
|
*/
|
|
8261
|
-
const COMPONENT_NAME$
|
|
9011
|
+
const COMPONENT_NAME$E = 'LinkPreview';
|
|
8262
9012
|
|
|
8263
9013
|
/**
|
|
8264
9014
|
* Component default class name and class prefix.
|
|
8265
9015
|
*/
|
|
8266
|
-
const CLASSNAME$
|
|
9016
|
+
const CLASSNAME$B = getRootClassName(COMPONENT_NAME$E);
|
|
8267
9017
|
|
|
8268
9018
|
/**
|
|
8269
9019
|
* Component default props.
|
|
@@ -8294,21 +9044,21 @@ const LinkPreview = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8294
9044
|
title,
|
|
8295
9045
|
titleHeading
|
|
8296
9046
|
} = props,
|
|
8297
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9047
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$H);
|
|
8298
9048
|
// Use title heading as title wrapper (see DEFAULT_PROPS for the default value).
|
|
8299
9049
|
const TitleHeading = titleHeading;
|
|
8300
9050
|
return /*#__PURE__*/React.createElement("article", _extends({
|
|
8301
9051
|
ref: ref
|
|
8302
9052
|
}, forwardedProps, {
|
|
8303
9053
|
className: classnames(className, handleBasicClasses({
|
|
8304
|
-
prefix: CLASSNAME$
|
|
9054
|
+
prefix: CLASSNAME$B,
|
|
8305
9055
|
size: size === Size.big && thumbnailProps ? Size.big : Size.regular,
|
|
8306
9056
|
theme
|
|
8307
9057
|
}))
|
|
8308
9058
|
}), /*#__PURE__*/React.createElement("div", {
|
|
8309
|
-
className: `${CLASSNAME$
|
|
9059
|
+
className: `${CLASSNAME$B}__wrapper`
|
|
8310
9060
|
}, thumbnailProps && /*#__PURE__*/React.createElement("div", {
|
|
8311
|
-
className: `${CLASSNAME$
|
|
9061
|
+
className: `${CLASSNAME$B}__thumbnail`
|
|
8312
9062
|
}, /*#__PURE__*/React.createElement(Thumbnail, _extends({}, thumbnailProps, {
|
|
8313
9063
|
linkAs: linkAs,
|
|
8314
9064
|
linkProps: _objectSpread2(_objectSpread2({}, linkProps), {}, {
|
|
@@ -8320,9 +9070,9 @@ const LinkPreview = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8320
9070
|
aspectRatio: AspectRatio.free,
|
|
8321
9071
|
fillHeight: true
|
|
8322
9072
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
8323
|
-
className: `${CLASSNAME$
|
|
9073
|
+
className: `${CLASSNAME$B}__container`
|
|
8324
9074
|
}, title && /*#__PURE__*/React.createElement(TitleHeading, {
|
|
8325
|
-
className: `${CLASSNAME$
|
|
9075
|
+
className: `${CLASSNAME$B}__title`
|
|
8326
9076
|
}, /*#__PURE__*/React.createElement(Link, _extends({}, linkProps, {
|
|
8327
9077
|
linkAs: linkAs,
|
|
8328
9078
|
target: "_blank",
|
|
@@ -8330,12 +9080,12 @@ const LinkPreview = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8330
9080
|
color: theme === Theme.light ? ColorPalette.dark : ColorPalette.light,
|
|
8331
9081
|
colorVariant: ColorVariant.N
|
|
8332
9082
|
}), title)), description && /*#__PURE__*/React.createElement("p", {
|
|
8333
|
-
className: `${CLASSNAME$
|
|
9083
|
+
className: `${CLASSNAME$B}__description`
|
|
8334
9084
|
}, description), /*#__PURE__*/React.createElement("div", {
|
|
8335
|
-
className: `${CLASSNAME$
|
|
9085
|
+
className: `${CLASSNAME$B}__link`
|
|
8336
9086
|
}, /*#__PURE__*/React.createElement(Link, _extends({}, linkProps, {
|
|
8337
9087
|
linkAs: linkAs,
|
|
8338
|
-
className: classnames(`${CLASSNAME$
|
|
9088
|
+
className: classnames(`${CLASSNAME$B}__link`, linkProps === null || linkProps === void 0 ? void 0 : linkProps.className),
|
|
8339
9089
|
target: "_blank",
|
|
8340
9090
|
href: link,
|
|
8341
9091
|
color: theme === Theme.light ? ColorPalette.primary : ColorPalette.light,
|
|
@@ -8345,11 +9095,11 @@ const LinkPreview = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8345
9095
|
tabIndex: title ? '-1' : undefined
|
|
8346
9096
|
}), link)))));
|
|
8347
9097
|
});
|
|
8348
|
-
LinkPreview.displayName = COMPONENT_NAME$
|
|
8349
|
-
LinkPreview.className = CLASSNAME$
|
|
9098
|
+
LinkPreview.displayName = COMPONENT_NAME$E;
|
|
9099
|
+
LinkPreview.className = CLASSNAME$B;
|
|
8350
9100
|
LinkPreview.defaultProps = DEFAULT_PROPS$u;
|
|
8351
9101
|
|
|
8352
|
-
const _excluded$
|
|
9102
|
+
const _excluded$I = ["className"];
|
|
8353
9103
|
|
|
8354
9104
|
/**
|
|
8355
9105
|
* Defines the props of the component.
|
|
@@ -8358,12 +9108,12 @@ const _excluded$F = ["className"];
|
|
|
8358
9108
|
/**
|
|
8359
9109
|
* Component display name.
|
|
8360
9110
|
*/
|
|
8361
|
-
const COMPONENT_NAME$
|
|
9111
|
+
const COMPONENT_NAME$F = 'ListDivider';
|
|
8362
9112
|
|
|
8363
9113
|
/**
|
|
8364
9114
|
* Component default class name and class prefix.
|
|
8365
9115
|
*/
|
|
8366
|
-
const CLASSNAME$
|
|
9116
|
+
const CLASSNAME$C = getRootClassName(COMPONENT_NAME$F);
|
|
8367
9117
|
|
|
8368
9118
|
/**
|
|
8369
9119
|
* ListDivider component.
|
|
@@ -8376,19 +9126,19 @@ const ListDivider = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8376
9126
|
const {
|
|
8377
9127
|
className
|
|
8378
9128
|
} = props,
|
|
8379
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9129
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$I);
|
|
8380
9130
|
return /*#__PURE__*/React.createElement("li", _extends({
|
|
8381
9131
|
ref: ref
|
|
8382
9132
|
}, forwardedProps, {
|
|
8383
9133
|
className: classnames(className, handleBasicClasses({
|
|
8384
|
-
prefix: CLASSNAME$
|
|
9134
|
+
prefix: CLASSNAME$C
|
|
8385
9135
|
}))
|
|
8386
9136
|
}));
|
|
8387
9137
|
});
|
|
8388
|
-
ListDivider.displayName = COMPONENT_NAME$
|
|
8389
|
-
ListDivider.className = CLASSNAME$
|
|
9138
|
+
ListDivider.displayName = COMPONENT_NAME$F;
|
|
9139
|
+
ListDivider.className = CLASSNAME$C;
|
|
8390
9140
|
|
|
8391
|
-
const _excluded$
|
|
9141
|
+
const _excluded$J = ["children", "className"];
|
|
8392
9142
|
|
|
8393
9143
|
/**
|
|
8394
9144
|
* Defines the props of the component.
|
|
@@ -8397,12 +9147,12 @@ const _excluded$G = ["children", "className"];
|
|
|
8397
9147
|
/**
|
|
8398
9148
|
* Component display name.
|
|
8399
9149
|
*/
|
|
8400
|
-
const COMPONENT_NAME$
|
|
9150
|
+
const COMPONENT_NAME$G = 'ListSubheader';
|
|
8401
9151
|
|
|
8402
9152
|
/**
|
|
8403
9153
|
* Component default class name and class prefix.
|
|
8404
9154
|
*/
|
|
8405
|
-
const CLASSNAME$
|
|
9155
|
+
const CLASSNAME$D = getRootClassName(COMPONENT_NAME$G);
|
|
8406
9156
|
|
|
8407
9157
|
/**
|
|
8408
9158
|
* ListSubheader component.
|
|
@@ -8416,19 +9166,19 @@ const ListSubheader = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8416
9166
|
children,
|
|
8417
9167
|
className
|
|
8418
9168
|
} = props,
|
|
8419
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9169
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$J);
|
|
8420
9170
|
return /*#__PURE__*/React.createElement("li", _extends({
|
|
8421
9171
|
ref: ref
|
|
8422
9172
|
}, forwardedProps, {
|
|
8423
9173
|
className: classnames(className, handleBasicClasses({
|
|
8424
|
-
prefix: CLASSNAME$
|
|
9174
|
+
prefix: CLASSNAME$D
|
|
8425
9175
|
}))
|
|
8426
9176
|
}), children);
|
|
8427
9177
|
});
|
|
8428
|
-
ListSubheader.displayName = COMPONENT_NAME$
|
|
8429
|
-
ListSubheader.className = CLASSNAME$
|
|
9178
|
+
ListSubheader.displayName = COMPONENT_NAME$G;
|
|
9179
|
+
ListSubheader.className = CLASSNAME$D;
|
|
8430
9180
|
|
|
8431
|
-
const _excluded$
|
|
9181
|
+
const _excluded$K = ["children", "className", "hasBackground", "kind", "icon", "closeButtonProps"];
|
|
8432
9182
|
|
|
8433
9183
|
/**
|
|
8434
9184
|
* Defines the props of the component.
|
|
@@ -8437,12 +9187,12 @@ const _excluded$H = ["children", "className", "hasBackground", "kind", "icon", "
|
|
|
8437
9187
|
/**
|
|
8438
9188
|
* Component display name.
|
|
8439
9189
|
*/
|
|
8440
|
-
const COMPONENT_NAME$
|
|
9190
|
+
const COMPONENT_NAME$H = 'Message';
|
|
8441
9191
|
|
|
8442
9192
|
/**
|
|
8443
9193
|
* Component default class name and class prefix.
|
|
8444
9194
|
*/
|
|
8445
|
-
const CLASSNAME$
|
|
9195
|
+
const CLASSNAME$E = getRootClassName(COMPONENT_NAME$H);
|
|
8446
9196
|
|
|
8447
9197
|
/**
|
|
8448
9198
|
* Associative map from message kind to color and icon.
|
|
@@ -8482,7 +9232,7 @@ const Message = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8482
9232
|
icon: customIcon,
|
|
8483
9233
|
closeButtonProps
|
|
8484
9234
|
} = props,
|
|
8485
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9235
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$K);
|
|
8486
9236
|
const {
|
|
8487
9237
|
color,
|
|
8488
9238
|
icon
|
|
@@ -8497,27 +9247,27 @@ const Message = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8497
9247
|
className: classnames(className, handleBasicClasses({
|
|
8498
9248
|
color,
|
|
8499
9249
|
hasBackground,
|
|
8500
|
-
prefix: CLASSNAME$
|
|
9250
|
+
prefix: CLASSNAME$E
|
|
8501
9251
|
}))
|
|
8502
9252
|
}, forwardedProps), (customIcon || icon) && /*#__PURE__*/React.createElement(Icon, {
|
|
8503
|
-
className: `${CLASSNAME$
|
|
9253
|
+
className: `${CLASSNAME$E}__icon`,
|
|
8504
9254
|
icon: customIcon || icon,
|
|
8505
9255
|
size: Size.xs,
|
|
8506
9256
|
color: color
|
|
8507
9257
|
}), /*#__PURE__*/React.createElement("div", {
|
|
8508
|
-
className: `${CLASSNAME$
|
|
9258
|
+
className: `${CLASSNAME$E}__text`
|
|
8509
9259
|
}, children), isCloseButtonDisplayed && /*#__PURE__*/React.createElement(IconButton, {
|
|
8510
|
-
className: `${CLASSNAME$
|
|
9260
|
+
className: `${CLASSNAME$E}__close-button`,
|
|
8511
9261
|
icon: mdiClose,
|
|
8512
9262
|
onClick: onClick,
|
|
8513
9263
|
label: closeButtonLabel,
|
|
8514
9264
|
emphasis: Emphasis.low
|
|
8515
9265
|
}));
|
|
8516
9266
|
});
|
|
8517
|
-
Message.displayName = COMPONENT_NAME$
|
|
8518
|
-
Message.className = CLASSNAME$
|
|
9267
|
+
Message.displayName = COMPONENT_NAME$H;
|
|
9268
|
+
Message.className = CLASSNAME$E;
|
|
8519
9269
|
|
|
8520
|
-
const _excluded$
|
|
9270
|
+
const _excluded$L = ["className", "theme", "thumbnails", "onImageClick"],
|
|
8521
9271
|
_excluded2$1 = ["image", "onClick", "align"];
|
|
8522
9272
|
|
|
8523
9273
|
/**
|
|
@@ -8527,12 +9277,12 @@ const _excluded$I = ["className", "theme", "thumbnails", "onImageClick"],
|
|
|
8527
9277
|
/**
|
|
8528
9278
|
* Component display name.
|
|
8529
9279
|
*/
|
|
8530
|
-
const COMPONENT_NAME$
|
|
9280
|
+
const COMPONENT_NAME$I = 'Mosaic';
|
|
8531
9281
|
|
|
8532
9282
|
/**
|
|
8533
9283
|
* Component default class name and class prefix.
|
|
8534
9284
|
*/
|
|
8535
|
-
const CLASSNAME$
|
|
9285
|
+
const CLASSNAME$F = getRootClassName(COMPONENT_NAME$I);
|
|
8536
9286
|
|
|
8537
9287
|
/**
|
|
8538
9288
|
* Component default props.
|
|
@@ -8555,7 +9305,7 @@ const Mosaic = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8555
9305
|
thumbnails,
|
|
8556
9306
|
onImageClick
|
|
8557
9307
|
} = props,
|
|
8558
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9308
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$L);
|
|
8559
9309
|
const handleImageClick = useMemo(() => {
|
|
8560
9310
|
if (!onImageClick) return undefined;
|
|
8561
9311
|
return (index, onClick) => event => {
|
|
@@ -8567,16 +9317,16 @@ const Mosaic = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8567
9317
|
ref: ref
|
|
8568
9318
|
}, forwardedProps, {
|
|
8569
9319
|
className: classnames(className, handleBasicClasses({
|
|
8570
|
-
prefix: CLASSNAME$
|
|
9320
|
+
prefix: CLASSNAME$F,
|
|
8571
9321
|
theme
|
|
8572
9322
|
}), {
|
|
8573
|
-
[`${CLASSNAME$
|
|
8574
|
-
[`${CLASSNAME$
|
|
8575
|
-
[`${CLASSNAME$
|
|
8576
|
-
[`${CLASSNAME$
|
|
9323
|
+
[`${CLASSNAME$F}--has-1-thumbnail`]: (thumbnails === null || thumbnails === void 0 ? void 0 : thumbnails.length) === 1,
|
|
9324
|
+
[`${CLASSNAME$F}--has-2-thumbnails`]: (thumbnails === null || thumbnails === void 0 ? void 0 : thumbnails.length) === 2,
|
|
9325
|
+
[`${CLASSNAME$F}--has-3-thumbnails`]: (thumbnails === null || thumbnails === void 0 ? void 0 : thumbnails.length) === 3,
|
|
9326
|
+
[`${CLASSNAME$F}--has-4-thumbnails`]: (thumbnails === null || thumbnails === void 0 ? void 0 : thumbnails.length) >= 4
|
|
8577
9327
|
})
|
|
8578
9328
|
}), /*#__PURE__*/React.createElement("div", {
|
|
8579
|
-
className: `${CLASSNAME$
|
|
9329
|
+
className: `${CLASSNAME$F}__wrapper`
|
|
8580
9330
|
}, take(thumbnails, 4).map((thumbnail, index) => {
|
|
8581
9331
|
const {
|
|
8582
9332
|
image,
|
|
@@ -8586,7 +9336,7 @@ const Mosaic = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8586
9336
|
thumbnailProps = _objectWithoutProperties(thumbnail, _excluded2$1);
|
|
8587
9337
|
return /*#__PURE__*/React.createElement("div", {
|
|
8588
9338
|
key: index,
|
|
8589
|
-
className: `${CLASSNAME$
|
|
9339
|
+
className: `${CLASSNAME$F}__thumbnail`
|
|
8590
9340
|
}, /*#__PURE__*/React.createElement(Thumbnail, _extends({}, thumbnailProps, {
|
|
8591
9341
|
align: align || Alignment.left,
|
|
8592
9342
|
image: image,
|
|
@@ -8595,12 +9345,12 @@ const Mosaic = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8595
9345
|
fillHeight: true,
|
|
8596
9346
|
onClick: (handleImageClick === null || handleImageClick === void 0 ? void 0 : handleImageClick(index, onClick)) || onClick
|
|
8597
9347
|
})), thumbnails.length > 4 && index === 3 && /*#__PURE__*/React.createElement("div", {
|
|
8598
|
-
className: `${CLASSNAME$
|
|
9348
|
+
className: `${CLASSNAME$F}__overlay`
|
|
8599
9349
|
}, /*#__PURE__*/React.createElement("span", null, "+", thumbnails.length - 4)));
|
|
8600
9350
|
})));
|
|
8601
9351
|
});
|
|
8602
|
-
Mosaic.displayName = COMPONENT_NAME$
|
|
8603
|
-
Mosaic.className = CLASSNAME$
|
|
9352
|
+
Mosaic.displayName = COMPONENT_NAME$I;
|
|
9353
|
+
Mosaic.className = CLASSNAME$F;
|
|
8604
9354
|
Mosaic.defaultProps = DEFAULT_PROPS$v;
|
|
8605
9355
|
|
|
8606
9356
|
const ThemeContext = /*#__PURE__*/createContext(undefined);
|
|
@@ -8610,7 +9360,7 @@ function forwardRefPolymorphic(render) {
|
|
|
8610
9360
|
return /*#__PURE__*/React.forwardRef(render);
|
|
8611
9361
|
}
|
|
8612
9362
|
|
|
8613
|
-
const _excluded$
|
|
9363
|
+
const _excluded$M = ["className", "icon", "label", "isCurrentPage", "as"];
|
|
8614
9364
|
|
|
8615
9365
|
/** Make `href` required when `as` is `a` */
|
|
8616
9366
|
|
|
@@ -8621,12 +9371,12 @@ const _excluded$J = ["className", "icon", "label", "isCurrentPage", "as"];
|
|
|
8621
9371
|
/**
|
|
8622
9372
|
* Component display name.
|
|
8623
9373
|
*/
|
|
8624
|
-
const COMPONENT_NAME$
|
|
9374
|
+
const COMPONENT_NAME$J = 'NavigationItem';
|
|
8625
9375
|
|
|
8626
9376
|
/**
|
|
8627
9377
|
* Component default class name and class prefix.
|
|
8628
9378
|
*/
|
|
8629
|
-
const CLASSNAME$
|
|
9379
|
+
const CLASSNAME$G = getRootClassName(COMPONENT_NAME$J);
|
|
8630
9380
|
const NavigationItem = Object.assign(forwardRefPolymorphic((props, ref) => {
|
|
8631
9381
|
const {
|
|
8632
9382
|
className,
|
|
@@ -8635,7 +9385,7 @@ const NavigationItem = Object.assign(forwardRefPolymorphic((props, ref) => {
|
|
|
8635
9385
|
isCurrentPage,
|
|
8636
9386
|
as: Element = 'a'
|
|
8637
9387
|
} = props,
|
|
8638
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9388
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$M);
|
|
8639
9389
|
const theme = useContext(ThemeContext);
|
|
8640
9390
|
const {
|
|
8641
9391
|
tooltipLabel,
|
|
@@ -8646,7 +9396,7 @@ const NavigationItem = Object.assign(forwardRefPolymorphic((props, ref) => {
|
|
|
8646
9396
|
} : {};
|
|
8647
9397
|
return /*#__PURE__*/React.createElement("li", {
|
|
8648
9398
|
className: classnames(className, handleBasicClasses({
|
|
8649
|
-
prefix: CLASSNAME$
|
|
9399
|
+
prefix: CLASSNAME$G,
|
|
8650
9400
|
theme
|
|
8651
9401
|
}))
|
|
8652
9402
|
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
@@ -8654,41 +9404,41 @@ const NavigationItem = Object.assign(forwardRefPolymorphic((props, ref) => {
|
|
|
8654
9404
|
placement: Placement.TOP
|
|
8655
9405
|
}, /*#__PURE__*/React.createElement(Element, _extends({
|
|
8656
9406
|
className: handleBasicClasses({
|
|
8657
|
-
prefix: `${CLASSNAME$
|
|
9407
|
+
prefix: `${CLASSNAME$G}__link`,
|
|
8658
9408
|
isSelected: isCurrentPage
|
|
8659
9409
|
}),
|
|
8660
9410
|
ref: ref,
|
|
8661
9411
|
"aria-current": isCurrentPage ? 'page' : undefined
|
|
8662
9412
|
}, buttonProps, forwardedProps), icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
8663
|
-
className: `${CLASSNAME$
|
|
9413
|
+
className: `${CLASSNAME$G}__icon`,
|
|
8664
9414
|
icon: icon,
|
|
8665
9415
|
size: Size.xs,
|
|
8666
9416
|
theme: theme
|
|
8667
9417
|
}) : null, /*#__PURE__*/React.createElement(Text, {
|
|
8668
9418
|
as: "span",
|
|
8669
9419
|
truncate: true,
|
|
8670
|
-
className: `${CLASSNAME$
|
|
9420
|
+
className: `${CLASSNAME$G}__label`,
|
|
8671
9421
|
ref: labelRef
|
|
8672
9422
|
}, label))));
|
|
8673
9423
|
}), {
|
|
8674
|
-
displayName: COMPONENT_NAME$
|
|
8675
|
-
className: CLASSNAME$
|
|
9424
|
+
displayName: COMPONENT_NAME$J,
|
|
9425
|
+
className: CLASSNAME$G
|
|
8676
9426
|
});
|
|
8677
9427
|
|
|
8678
9428
|
const NavigationContext = /*#__PURE__*/createContext({
|
|
8679
9429
|
orientation: Orientation.vertical
|
|
8680
9430
|
});
|
|
8681
9431
|
|
|
8682
|
-
const _excluded$
|
|
9432
|
+
const _excluded$N = ["children", "className", "label", "icon"];
|
|
8683
9433
|
/**
|
|
8684
9434
|
* Component display name.
|
|
8685
9435
|
*/
|
|
8686
|
-
const COMPONENT_NAME$
|
|
9436
|
+
const COMPONENT_NAME$K = 'NavigationSection';
|
|
8687
9437
|
|
|
8688
9438
|
/**
|
|
8689
9439
|
* Component default class name and class prefix.
|
|
8690
9440
|
*/
|
|
8691
|
-
const CLASSNAME$
|
|
9441
|
+
const CLASSNAME$H = getRootClassName(COMPONENT_NAME$K);
|
|
8692
9442
|
const NavigationSection = Object.assign( /*#__PURE__*/forwardRef((props, ref) => {
|
|
8693
9443
|
const {
|
|
8694
9444
|
children,
|
|
@@ -8696,7 +9446,7 @@ const NavigationSection = Object.assign( /*#__PURE__*/forwardRef((props, ref) =>
|
|
|
8696
9446
|
label,
|
|
8697
9447
|
icon
|
|
8698
9448
|
} = props,
|
|
8699
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9449
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$N);
|
|
8700
9450
|
const [isOpen, setIsOpen] = useState(false);
|
|
8701
9451
|
const buttonRef = useRef(null);
|
|
8702
9452
|
const sectionId = useMemo(() => uniqueId('section'), []);
|
|
@@ -8706,15 +9456,15 @@ const NavigationSection = Object.assign( /*#__PURE__*/forwardRef((props, ref) =>
|
|
|
8706
9456
|
const theme = useContext(ThemeContext);
|
|
8707
9457
|
const isDropdown = orientation === Orientation.horizontal;
|
|
8708
9458
|
return /*#__PURE__*/React.createElement("li", _extends({
|
|
8709
|
-
className: classnames(className, CLASSNAME$
|
|
8710
|
-
prefix: CLASSNAME$
|
|
9459
|
+
className: classnames(className, CLASSNAME$H, CLASSNAME$G, handleBasicClasses({
|
|
9460
|
+
prefix: CLASSNAME$G,
|
|
8711
9461
|
theme
|
|
8712
9462
|
})),
|
|
8713
9463
|
ref: ref
|
|
8714
9464
|
}, forwardedProps), /*#__PURE__*/React.createElement("button", {
|
|
8715
9465
|
"aria-controls": sectionId,
|
|
8716
9466
|
"aria-expanded": isOpen,
|
|
8717
|
-
className: classnames(`${CLASSNAME$
|
|
9467
|
+
className: classnames(`${CLASSNAME$G}__link`),
|
|
8718
9468
|
ref: buttonRef,
|
|
8719
9469
|
onClick: event => {
|
|
8720
9470
|
setIsOpen(!isOpen);
|
|
@@ -8722,16 +9472,16 @@ const NavigationSection = Object.assign( /*#__PURE__*/forwardRef((props, ref) =>
|
|
|
8722
9472
|
},
|
|
8723
9473
|
type: "button"
|
|
8724
9474
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
8725
|
-
className: `${CLASSNAME$
|
|
9475
|
+
className: `${CLASSNAME$G}__icon`,
|
|
8726
9476
|
icon: icon,
|
|
8727
9477
|
size: Size.xs
|
|
8728
9478
|
}) : null, /*#__PURE__*/React.createElement(Text, {
|
|
8729
9479
|
as: "span",
|
|
8730
9480
|
truncate: true,
|
|
8731
|
-
className: `${CLASSNAME$
|
|
9481
|
+
className: `${CLASSNAME$G}__label`,
|
|
8732
9482
|
ref: ref
|
|
8733
9483
|
}, label), /*#__PURE__*/React.createElement(Icon, {
|
|
8734
|
-
className: classnames(`${CLASSNAME$
|
|
9484
|
+
className: classnames(`${CLASSNAME$G}__icon`, `${CLASSNAME$H}__chevron`),
|
|
8735
9485
|
icon: isOpen ? mdiChevronUp : mdiChevronDown
|
|
8736
9486
|
})), isOpen && (isDropdown ? /*#__PURE__*/React.createElement(Popover, {
|
|
8737
9487
|
anchorRef: buttonRef,
|
|
@@ -8746,31 +9496,31 @@ const NavigationSection = Object.assign( /*#__PURE__*/forwardRef((props, ref) =>
|
|
|
8746
9496
|
}, /*#__PURE__*/React.createElement(ThemeContext.Provider, {
|
|
8747
9497
|
value: Theme.light
|
|
8748
9498
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
8749
|
-
className: `${CLASSNAME$
|
|
9499
|
+
className: `${CLASSNAME$H}__drawer--popover`,
|
|
8750
9500
|
id: sectionId
|
|
8751
9501
|
}, /*#__PURE__*/React.createElement(NavigationContext.Provider, {
|
|
8752
9502
|
value: {
|
|
8753
9503
|
orientation: Orientation.vertical
|
|
8754
9504
|
}
|
|
8755
9505
|
}, children)))) : /*#__PURE__*/React.createElement("ul", {
|
|
8756
|
-
className: `${CLASSNAME$
|
|
9506
|
+
className: `${CLASSNAME$H}__drawer`,
|
|
8757
9507
|
id: sectionId
|
|
8758
9508
|
}, children)));
|
|
8759
9509
|
}), {
|
|
8760
|
-
displayName: COMPONENT_NAME$
|
|
8761
|
-
className: CLASSNAME$
|
|
9510
|
+
displayName: COMPONENT_NAME$K,
|
|
9511
|
+
className: CLASSNAME$H
|
|
8762
9512
|
});
|
|
8763
9513
|
|
|
8764
|
-
const _excluded$
|
|
9514
|
+
const _excluded$O = ["children", "className", "theme", "orientation"];
|
|
8765
9515
|
/**
|
|
8766
9516
|
* Component display name.
|
|
8767
9517
|
*/
|
|
8768
|
-
const COMPONENT_NAME$
|
|
9518
|
+
const COMPONENT_NAME$L = 'Navigation';
|
|
8769
9519
|
|
|
8770
9520
|
/**
|
|
8771
9521
|
* Component default class name and class prefix.
|
|
8772
9522
|
*/
|
|
8773
|
-
const CLASSNAME$
|
|
9523
|
+
const CLASSNAME$I = getRootClassName(COMPONENT_NAME$L);
|
|
8774
9524
|
const Navigation = Object.assign(
|
|
8775
9525
|
/*#__PURE__*/
|
|
8776
9526
|
// eslint-disable-next-line react/display-name
|
|
@@ -8781,12 +9531,12 @@ forwardRef((props, ref) => {
|
|
|
8781
9531
|
theme,
|
|
8782
9532
|
orientation
|
|
8783
9533
|
} = props,
|
|
8784
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9534
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$O);
|
|
8785
9535
|
return /*#__PURE__*/React.createElement(ThemeContext.Provider, {
|
|
8786
9536
|
value: theme
|
|
8787
9537
|
}, /*#__PURE__*/React.createElement("nav", _extends({
|
|
8788
9538
|
className: classnames(className, handleBasicClasses({
|
|
8789
|
-
prefix: CLASSNAME$
|
|
9539
|
+
prefix: CLASSNAME$I,
|
|
8790
9540
|
theme,
|
|
8791
9541
|
orientation
|
|
8792
9542
|
})),
|
|
@@ -8796,11 +9546,11 @@ forwardRef((props, ref) => {
|
|
|
8796
9546
|
orientation
|
|
8797
9547
|
}
|
|
8798
9548
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
8799
|
-
className: `${CLASSNAME$
|
|
9549
|
+
className: `${CLASSNAME$I}__list`
|
|
8800
9550
|
}, children))));
|
|
8801
9551
|
}), {
|
|
8802
|
-
displayName: COMPONENT_NAME$
|
|
8803
|
-
className: CLASSNAME$
|
|
9552
|
+
displayName: COMPONENT_NAME$L,
|
|
9553
|
+
className: CLASSNAME$I,
|
|
8804
9554
|
defaultProps: {
|
|
8805
9555
|
theme: Theme.light,
|
|
8806
9556
|
orientation: Orientation.vertical
|
|
@@ -8832,7 +9582,7 @@ const NOTIFICATION_CONFIGURATION = {
|
|
|
8832
9582
|
}
|
|
8833
9583
|
};
|
|
8834
9584
|
|
|
8835
|
-
const _excluded$
|
|
9585
|
+
const _excluded$P = ["actionLabel", "className", "content", "isOpen", "onActionClick", "onClick", "theme", "type", "zIndex", "usePortal", "style"];
|
|
8836
9586
|
|
|
8837
9587
|
/**
|
|
8838
9588
|
* Defines the props of the component.
|
|
@@ -8841,12 +9591,12 @@ const _excluded$M = ["actionLabel", "className", "content", "isOpen", "onActionC
|
|
|
8841
9591
|
/**
|
|
8842
9592
|
* Component display name.
|
|
8843
9593
|
*/
|
|
8844
|
-
const COMPONENT_NAME$
|
|
9594
|
+
const COMPONENT_NAME$M = 'Notification';
|
|
8845
9595
|
|
|
8846
9596
|
/**
|
|
8847
9597
|
* Component default class name and class prefix.
|
|
8848
9598
|
*/
|
|
8849
|
-
const CLASSNAME$
|
|
9599
|
+
const CLASSNAME$J = getRootClassName(COMPONENT_NAME$M);
|
|
8850
9600
|
|
|
8851
9601
|
/**
|
|
8852
9602
|
* Component default props.
|
|
@@ -8879,7 +9629,7 @@ const Notification = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8879
9629
|
usePortal,
|
|
8880
9630
|
style
|
|
8881
9631
|
} = props,
|
|
8882
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9632
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$P);
|
|
8883
9633
|
if (!DOCUMENT) {
|
|
8884
9634
|
// Can't render in SSR.
|
|
8885
9635
|
return null;
|
|
@@ -8911,21 +9661,21 @@ const Notification = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8911
9661
|
color,
|
|
8912
9662
|
hasAction,
|
|
8913
9663
|
isHidden: !isOpen,
|
|
8914
|
-
prefix: CLASSNAME$
|
|
9664
|
+
prefix: CLASSNAME$J
|
|
8915
9665
|
})),
|
|
8916
9666
|
onClick: onClick,
|
|
8917
9667
|
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
8918
9668
|
zIndex
|
|
8919
9669
|
})
|
|
8920
9670
|
}), /*#__PURE__*/React.createElement("div", {
|
|
8921
|
-
className: `${CLASSNAME$
|
|
9671
|
+
className: `${CLASSNAME$J}__icon`
|
|
8922
9672
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
8923
9673
|
icon: icon,
|
|
8924
9674
|
size: Size.s
|
|
8925
9675
|
})), /*#__PURE__*/React.createElement("div", {
|
|
8926
|
-
className: `${CLASSNAME$
|
|
9676
|
+
className: `${CLASSNAME$J}__content`
|
|
8927
9677
|
}, content), hasAction && /*#__PURE__*/React.createElement("div", {
|
|
8928
|
-
className: `${CLASSNAME$
|
|
9678
|
+
className: `${CLASSNAME$J}__action`
|
|
8929
9679
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
8930
9680
|
emphasis: Emphasis.medium,
|
|
8931
9681
|
theme: theme,
|
|
@@ -8933,11 +9683,11 @@ const Notification = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8933
9683
|
}, /*#__PURE__*/React.createElement("span", null, actionLabel))));
|
|
8934
9684
|
return usePortal ? /*#__PURE__*/createPortal(notification, document.body) : notification;
|
|
8935
9685
|
});
|
|
8936
|
-
Notification.displayName = COMPONENT_NAME$
|
|
8937
|
-
Notification.className = CLASSNAME$
|
|
9686
|
+
Notification.displayName = COMPONENT_NAME$M;
|
|
9687
|
+
Notification.className = CLASSNAME$J;
|
|
8938
9688
|
Notification.defaultProps = DEFAULT_PROPS$w;
|
|
8939
9689
|
|
|
8940
|
-
const _excluded$
|
|
9690
|
+
const _excluded$Q = ["children", "isOpen", "focusElement", "aria-label", "label", "className"];
|
|
8941
9691
|
|
|
8942
9692
|
/**
|
|
8943
9693
|
* PopoverDialog props.
|
|
@@ -8947,12 +9697,12 @@ const _excluded$N = ["children", "isOpen", "focusElement", "aria-label", "label"
|
|
|
8947
9697
|
/**
|
|
8948
9698
|
* Component display name.
|
|
8949
9699
|
*/
|
|
8950
|
-
const COMPONENT_NAME$
|
|
9700
|
+
const COMPONENT_NAME$N = 'PopoverDialog';
|
|
8951
9701
|
|
|
8952
9702
|
/**
|
|
8953
9703
|
* Component default class name and class prefix.
|
|
8954
9704
|
*/
|
|
8955
|
-
const CLASSNAME$
|
|
9705
|
+
const CLASSNAME$K = getRootClassName(COMPONENT_NAME$N);
|
|
8956
9706
|
|
|
8957
9707
|
/**
|
|
8958
9708
|
* Component default props.
|
|
@@ -8975,11 +9725,11 @@ const PopoverDialog = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8975
9725
|
label = ariaLabel,
|
|
8976
9726
|
className
|
|
8977
9727
|
} = props,
|
|
8978
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9728
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$Q);
|
|
8979
9729
|
return /*#__PURE__*/React.createElement(Popover, _extends({}, forwardedProps, {
|
|
8980
9730
|
ref: ref,
|
|
8981
9731
|
className: classnames(className, handleBasicClasses({
|
|
8982
|
-
prefix: CLASSNAME$
|
|
9732
|
+
prefix: CLASSNAME$K
|
|
8983
9733
|
})),
|
|
8984
9734
|
role: "dialog",
|
|
8985
9735
|
"aria-modal": "true"
|
|
@@ -8995,11 +9745,11 @@ const PopoverDialog = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8995
9745
|
withFocusTrap: true
|
|
8996
9746
|
}), children);
|
|
8997
9747
|
});
|
|
8998
|
-
PopoverDialog.displayName = COMPONENT_NAME$
|
|
8999
|
-
PopoverDialog.className = CLASSNAME$
|
|
9748
|
+
PopoverDialog.displayName = COMPONENT_NAME$N;
|
|
9749
|
+
PopoverDialog.className = CLASSNAME$K;
|
|
9000
9750
|
PopoverDialog.defaultProps = DEFAULT_PROPS$x;
|
|
9001
9751
|
|
|
9002
|
-
const _excluded$
|
|
9752
|
+
const _excluded$R = ["actions", "attachments", "author", "className", "meta", "onClick", "orientation", "tags", "text", "theme", "thumbnailProps", "title"];
|
|
9003
9753
|
|
|
9004
9754
|
/**
|
|
9005
9755
|
* Defines the props of the component.
|
|
@@ -9008,12 +9758,12 @@ const _excluded$O = ["actions", "attachments", "author", "className", "meta", "o
|
|
|
9008
9758
|
/**
|
|
9009
9759
|
* Component display name.
|
|
9010
9760
|
*/
|
|
9011
|
-
const COMPONENT_NAME$
|
|
9761
|
+
const COMPONENT_NAME$O = 'PostBlock';
|
|
9012
9762
|
|
|
9013
9763
|
/**
|
|
9014
9764
|
* Component default class name and class prefix.
|
|
9015
9765
|
*/
|
|
9016
|
-
const CLASSNAME$
|
|
9766
|
+
const CLASSNAME$L = getRootClassName(COMPONENT_NAME$O);
|
|
9017
9767
|
|
|
9018
9768
|
/**
|
|
9019
9769
|
* Component default props.
|
|
@@ -9045,61 +9795,61 @@ const PostBlock = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9045
9795
|
thumbnailProps,
|
|
9046
9796
|
title
|
|
9047
9797
|
} = props,
|
|
9048
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9798
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$R);
|
|
9049
9799
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
9050
9800
|
ref: ref,
|
|
9051
9801
|
className: classnames(className, handleBasicClasses({
|
|
9052
|
-
prefix: CLASSNAME$
|
|
9802
|
+
prefix: CLASSNAME$L,
|
|
9053
9803
|
orientation,
|
|
9054
9804
|
theme
|
|
9055
9805
|
}))
|
|
9056
9806
|
}, forwardedProps), thumbnailProps && /*#__PURE__*/React.createElement("div", {
|
|
9057
|
-
className: `${CLASSNAME$
|
|
9807
|
+
className: `${CLASSNAME$L}__thumbnail`
|
|
9058
9808
|
}, /*#__PURE__*/React.createElement(Thumbnail, _extends({}, thumbnailProps, {
|
|
9059
9809
|
theme: theme,
|
|
9060
9810
|
variant: ThumbnailVariant.rounded
|
|
9061
9811
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
9062
|
-
className: `${CLASSNAME$
|
|
9812
|
+
className: `${CLASSNAME$L}__wrapper`
|
|
9063
9813
|
}, author && /*#__PURE__*/React.createElement("div", {
|
|
9064
|
-
className: `${CLASSNAME$
|
|
9814
|
+
className: `${CLASSNAME$L}__author`
|
|
9065
9815
|
}, author), title && /*#__PURE__*/React.createElement("button", {
|
|
9066
9816
|
type: "button",
|
|
9067
|
-
className: `${CLASSNAME$
|
|
9817
|
+
className: `${CLASSNAME$L}__title`,
|
|
9068
9818
|
onClick: onClick
|
|
9069
9819
|
}, title), meta && /*#__PURE__*/React.createElement("span", {
|
|
9070
|
-
className: `${CLASSNAME$
|
|
9820
|
+
className: `${CLASSNAME$L}__meta`
|
|
9071
9821
|
}, meta), isObject(text) && text.__html ?
|
|
9072
9822
|
/*#__PURE__*/
|
|
9073
9823
|
// eslint-disable-next-line react/no-danger
|
|
9074
9824
|
React.createElement("p", {
|
|
9075
9825
|
dangerouslySetInnerHTML: text,
|
|
9076
|
-
className: `${CLASSNAME$
|
|
9826
|
+
className: `${CLASSNAME$L}__text`
|
|
9077
9827
|
}) : /*#__PURE__*/React.createElement("p", {
|
|
9078
|
-
className: `${CLASSNAME$
|
|
9828
|
+
className: `${CLASSNAME$L}__text`
|
|
9079
9829
|
}, text), attachments && /*#__PURE__*/React.createElement("div", {
|
|
9080
|
-
className: `${CLASSNAME$
|
|
9830
|
+
className: `${CLASSNAME$L}__attachments`
|
|
9081
9831
|
}, attachments), (tags || actions) && /*#__PURE__*/React.createElement("div", {
|
|
9082
|
-
className: `${CLASSNAME$
|
|
9832
|
+
className: `${CLASSNAME$L}__toolbar`
|
|
9083
9833
|
}, tags && /*#__PURE__*/React.createElement("div", {
|
|
9084
|
-
className: `${CLASSNAME$
|
|
9834
|
+
className: `${CLASSNAME$L}__tags`
|
|
9085
9835
|
}, tags), actions && /*#__PURE__*/React.createElement("div", {
|
|
9086
|
-
className: `${CLASSNAME$
|
|
9836
|
+
className: `${CLASSNAME$L}__actions`
|
|
9087
9837
|
}, actions))));
|
|
9088
9838
|
});
|
|
9089
|
-
PostBlock.displayName = COMPONENT_NAME$
|
|
9090
|
-
PostBlock.className = CLASSNAME$
|
|
9839
|
+
PostBlock.displayName = COMPONENT_NAME$O;
|
|
9840
|
+
PostBlock.className = CLASSNAME$L;
|
|
9091
9841
|
PostBlock.defaultProps = DEFAULT_PROPS$y;
|
|
9092
9842
|
|
|
9093
|
-
const _excluded$
|
|
9843
|
+
const _excluded$S = ["className", "theme"];
|
|
9094
9844
|
/**
|
|
9095
9845
|
* Component display name.
|
|
9096
9846
|
*/
|
|
9097
|
-
const COMPONENT_NAME$
|
|
9847
|
+
const COMPONENT_NAME$P = 'ProgressLinear';
|
|
9098
9848
|
|
|
9099
9849
|
/**
|
|
9100
9850
|
* Component default class name and class prefix.
|
|
9101
9851
|
*/
|
|
9102
|
-
const CLASSNAME$
|
|
9852
|
+
const CLASSNAME$M = getRootClassName(COMPONENT_NAME$P);
|
|
9103
9853
|
|
|
9104
9854
|
/**
|
|
9105
9855
|
* Component default props.
|
|
@@ -9120,12 +9870,12 @@ const ProgressLinear = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9120
9870
|
className,
|
|
9121
9871
|
theme
|
|
9122
9872
|
} = props,
|
|
9123
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9873
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$S);
|
|
9124
9874
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
9125
9875
|
ref: ref
|
|
9126
9876
|
}, forwardedProps, {
|
|
9127
9877
|
className: classnames(className, handleBasicClasses({
|
|
9128
|
-
prefix: CLASSNAME$
|
|
9878
|
+
prefix: CLASSNAME$M,
|
|
9129
9879
|
theme
|
|
9130
9880
|
}))
|
|
9131
9881
|
}), /*#__PURE__*/React.createElement("div", {
|
|
@@ -9134,11 +9884,11 @@ const ProgressLinear = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9134
9884
|
className: "lumx-progress-linear__line2"
|
|
9135
9885
|
}));
|
|
9136
9886
|
});
|
|
9137
|
-
ProgressLinear.displayName = COMPONENT_NAME$
|
|
9138
|
-
ProgressLinear.className = CLASSNAME$
|
|
9887
|
+
ProgressLinear.displayName = COMPONENT_NAME$P;
|
|
9888
|
+
ProgressLinear.className = CLASSNAME$M;
|
|
9139
9889
|
ProgressLinear.defaultProps = DEFAULT_PROPS$z;
|
|
9140
9890
|
|
|
9141
|
-
const _excluded$
|
|
9891
|
+
const _excluded$T = ["className", "theme", "size"];
|
|
9142
9892
|
|
|
9143
9893
|
/**
|
|
9144
9894
|
* Progress sizes.
|
|
@@ -9151,12 +9901,12 @@ const _excluded$Q = ["className", "theme", "size"];
|
|
|
9151
9901
|
/**
|
|
9152
9902
|
* Component display name.
|
|
9153
9903
|
*/
|
|
9154
|
-
const COMPONENT_NAME$
|
|
9904
|
+
const COMPONENT_NAME$Q = 'ProgressCircular';
|
|
9155
9905
|
|
|
9156
9906
|
/**
|
|
9157
9907
|
* Component default class name and class prefix.
|
|
9158
9908
|
*/
|
|
9159
|
-
const CLASSNAME$
|
|
9909
|
+
const CLASSNAME$N = getRootClassName(COMPONENT_NAME$Q);
|
|
9160
9910
|
|
|
9161
9911
|
/**
|
|
9162
9912
|
* Component default props.
|
|
@@ -9179,12 +9929,12 @@ const ProgressCircular = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9179
9929
|
theme,
|
|
9180
9930
|
size
|
|
9181
9931
|
} = props,
|
|
9182
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9932
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$T);
|
|
9183
9933
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
9184
9934
|
ref: ref
|
|
9185
9935
|
}, forwardedProps, {
|
|
9186
9936
|
className: classnames(className, handleBasicClasses({
|
|
9187
|
-
prefix: CLASSNAME$
|
|
9937
|
+
prefix: CLASSNAME$N,
|
|
9188
9938
|
theme,
|
|
9189
9939
|
size
|
|
9190
9940
|
}))
|
|
@@ -9204,11 +9954,11 @@ const ProgressCircular = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9204
9954
|
strokeWidth: "5"
|
|
9205
9955
|
})));
|
|
9206
9956
|
});
|
|
9207
|
-
ProgressCircular.displayName = COMPONENT_NAME$
|
|
9208
|
-
ProgressCircular.className = CLASSNAME$
|
|
9957
|
+
ProgressCircular.displayName = COMPONENT_NAME$Q;
|
|
9958
|
+
ProgressCircular.className = CLASSNAME$N;
|
|
9209
9959
|
ProgressCircular.defaultProps = DEFAULT_PROPS$A;
|
|
9210
9960
|
|
|
9211
|
-
const _excluded$
|
|
9961
|
+
const _excluded$U = ["className", "theme", "variant"];
|
|
9212
9962
|
|
|
9213
9963
|
/**
|
|
9214
9964
|
* Progress variants.
|
|
@@ -9225,12 +9975,12 @@ const ProgressVariant = {
|
|
|
9225
9975
|
/**
|
|
9226
9976
|
* Component display name.
|
|
9227
9977
|
*/
|
|
9228
|
-
const COMPONENT_NAME$
|
|
9978
|
+
const COMPONENT_NAME$R = 'Progress';
|
|
9229
9979
|
|
|
9230
9980
|
/**
|
|
9231
9981
|
* Component default class name and class prefix.
|
|
9232
9982
|
*/
|
|
9233
|
-
const CLASSNAME$
|
|
9983
|
+
const CLASSNAME$O = getRootClassName(COMPONENT_NAME$R);
|
|
9234
9984
|
|
|
9235
9985
|
/**
|
|
9236
9986
|
* Component default props.
|
|
@@ -9254,12 +10004,12 @@ const Progress = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9254
10004
|
theme,
|
|
9255
10005
|
variant
|
|
9256
10006
|
} = props,
|
|
9257
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
10007
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$U);
|
|
9258
10008
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
9259
10009
|
ref: ref
|
|
9260
10010
|
}, forwardedProps, {
|
|
9261
10011
|
className: classnames(className, handleBasicClasses({
|
|
9262
|
-
prefix: CLASSNAME$
|
|
10012
|
+
prefix: CLASSNAME$O,
|
|
9263
10013
|
theme,
|
|
9264
10014
|
variant
|
|
9265
10015
|
}))
|
|
@@ -9269,8 +10019,8 @@ const Progress = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9269
10019
|
theme: theme
|
|
9270
10020
|
}));
|
|
9271
10021
|
});
|
|
9272
|
-
Progress.displayName = COMPONENT_NAME$
|
|
9273
|
-
Progress.className = CLASSNAME$
|
|
10022
|
+
Progress.displayName = COMPONENT_NAME$R;
|
|
10023
|
+
Progress.className = CLASSNAME$O;
|
|
9274
10024
|
Progress.defaultProps = DEFAULT_PROPS$B;
|
|
9275
10025
|
|
|
9276
10026
|
const INIT_STATE = {
|
|
@@ -9392,7 +10142,7 @@ const useTabProviderContextState = () => {
|
|
|
9392
10142
|
return context === null || context === void 0 ? void 0 : context[0];
|
|
9393
10143
|
};
|
|
9394
10144
|
|
|
9395
|
-
const _excluded$
|
|
10145
|
+
const _excluded$V = ["children", "onChange"];
|
|
9396
10146
|
const DEFAULT_PROPS$C = {
|
|
9397
10147
|
isLazy: INIT_STATE.isLazy,
|
|
9398
10148
|
shouldActivateOnFocus: INIT_STATE.shouldActivateOnFocus
|
|
@@ -9414,7 +10164,7 @@ const ProgressTrackerProvider = props => {
|
|
|
9414
10164
|
children,
|
|
9415
10165
|
onChange
|
|
9416
10166
|
} = props,
|
|
9417
|
-
propState = _objectWithoutProperties(props, _excluded$
|
|
10167
|
+
propState = _objectWithoutProperties(props, _excluded$V);
|
|
9418
10168
|
const [state, dispatch] = useReducer(reducer, INIT_STATE);
|
|
9419
10169
|
|
|
9420
10170
|
// On prop state change => dispatch update.
|
|
@@ -9518,7 +10268,7 @@ const useRovingTabIndex = _ref => {
|
|
|
9518
10268
|
[parentRef, ...extraDependencies]);
|
|
9519
10269
|
};
|
|
9520
10270
|
|
|
9521
|
-
const _excluded$
|
|
10271
|
+
const _excluded$W = ["aria-label", "children", "className"];
|
|
9522
10272
|
|
|
9523
10273
|
/**
|
|
9524
10274
|
* Defines the props of the component.
|
|
@@ -9527,12 +10277,12 @@ const _excluded$T = ["aria-label", "children", "className"];
|
|
|
9527
10277
|
/**
|
|
9528
10278
|
* Component display name.
|
|
9529
10279
|
*/
|
|
9530
|
-
const COMPONENT_NAME$
|
|
10280
|
+
const COMPONENT_NAME$S = 'ProgressTracker';
|
|
9531
10281
|
|
|
9532
10282
|
/**
|
|
9533
10283
|
* Component default class name and class prefix.
|
|
9534
10284
|
*/
|
|
9535
|
-
const CLASSNAME$
|
|
10285
|
+
const CLASSNAME$P = getRootClassName(COMPONENT_NAME$S);
|
|
9536
10286
|
|
|
9537
10287
|
/**
|
|
9538
10288
|
* Component default props.
|
|
@@ -9555,7 +10305,7 @@ const ProgressTracker = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9555
10305
|
children,
|
|
9556
10306
|
className
|
|
9557
10307
|
} = props,
|
|
9558
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
10308
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$W);
|
|
9559
10309
|
const stepListRef = React.useRef(null);
|
|
9560
10310
|
useRovingTabIndex({
|
|
9561
10311
|
parentRef: stepListRef,
|
|
@@ -9571,20 +10321,20 @@ const ProgressTracker = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9571
10321
|
ref: mergeRefs(ref, stepListRef)
|
|
9572
10322
|
}, forwardedProps, {
|
|
9573
10323
|
className: classnames(className, handleBasicClasses({
|
|
9574
|
-
prefix: CLASSNAME$
|
|
10324
|
+
prefix: CLASSNAME$P
|
|
9575
10325
|
}))
|
|
9576
10326
|
}), /*#__PURE__*/React.createElement("div", {
|
|
9577
|
-
className: `${CLASSNAME$
|
|
10327
|
+
className: `${CLASSNAME$P}__steps`,
|
|
9578
10328
|
role: "tablist",
|
|
9579
10329
|
"aria-label": ariaLabel
|
|
9580
10330
|
}, children), /*#__PURE__*/React.createElement("div", {
|
|
9581
|
-
className: `${CLASSNAME$
|
|
10331
|
+
className: `${CLASSNAME$P}__background-bar`,
|
|
9582
10332
|
style: {
|
|
9583
10333
|
left: `${backgroundPosition}%`,
|
|
9584
10334
|
right: `${backgroundPosition}%`
|
|
9585
10335
|
}
|
|
9586
10336
|
}), /*#__PURE__*/React.createElement("div", {
|
|
9587
|
-
className: `${CLASSNAME$
|
|
10337
|
+
className: `${CLASSNAME$P}__foreground-bar`,
|
|
9588
10338
|
style: {
|
|
9589
10339
|
left: `${backgroundPosition}%`,
|
|
9590
10340
|
right: `${backgroundPosition}%`,
|
|
@@ -9592,11 +10342,11 @@ const ProgressTracker = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9592
10342
|
}
|
|
9593
10343
|
}));
|
|
9594
10344
|
});
|
|
9595
|
-
ProgressTracker.displayName = COMPONENT_NAME$
|
|
9596
|
-
ProgressTracker.className = CLASSNAME$
|
|
10345
|
+
ProgressTracker.displayName = COMPONENT_NAME$S;
|
|
10346
|
+
ProgressTracker.className = CLASSNAME$P;
|
|
9597
10347
|
ProgressTracker.defaultProps = DEFAULT_PROPS$D;
|
|
9598
10348
|
|
|
9599
|
-
const _excluded$
|
|
10349
|
+
const _excluded$X = ["className", "disabled", "hasError", "helper", "id", "isActive", "isComplete", "isDisabled", "label", "onFocus", "onKeyPress", "tabIndex"];
|
|
9600
10350
|
|
|
9601
10351
|
/**
|
|
9602
10352
|
* Defines the props of the component.
|
|
@@ -9605,12 +10355,12 @@ const _excluded$U = ["className", "disabled", "hasError", "helper", "id", "isAct
|
|
|
9605
10355
|
/**
|
|
9606
10356
|
* Component display name.
|
|
9607
10357
|
*/
|
|
9608
|
-
const COMPONENT_NAME$
|
|
10358
|
+
const COMPONENT_NAME$T = 'ProgressTrackerStep';
|
|
9609
10359
|
|
|
9610
10360
|
/**
|
|
9611
10361
|
* Component default class name and class prefix.
|
|
9612
10362
|
*/
|
|
9613
|
-
const CLASSNAME$
|
|
10363
|
+
const CLASSNAME$Q = getRootClassName(COMPONENT_NAME$T);
|
|
9614
10364
|
|
|
9615
10365
|
/**
|
|
9616
10366
|
* Component default props.
|
|
@@ -9641,7 +10391,7 @@ const ProgressTrackerStep = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9641
10391
|
onKeyPress,
|
|
9642
10392
|
tabIndex = -1
|
|
9643
10393
|
} = props,
|
|
9644
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
10394
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$X);
|
|
9645
10395
|
const state = useTabProviderContext('tab', id);
|
|
9646
10396
|
const isActive = propIsActive || (state === null || state === void 0 ? void 0 : state.isActive);
|
|
9647
10397
|
const changeToCurrentTab = useCallback(() => {
|
|
@@ -9678,7 +10428,7 @@ const ProgressTrackerStep = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9678
10428
|
type: "button",
|
|
9679
10429
|
id: state === null || state === void 0 ? void 0 : state.tabId,
|
|
9680
10430
|
className: classnames(className, handleBasicClasses({
|
|
9681
|
-
prefix: CLASSNAME$
|
|
10431
|
+
prefix: CLASSNAME$Q,
|
|
9682
10432
|
hasError,
|
|
9683
10433
|
isActive,
|
|
9684
10434
|
isClickable: state && !isDisabled,
|
|
@@ -9693,22 +10443,22 @@ const ProgressTrackerStep = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9693
10443
|
"aria-selected": isActive,
|
|
9694
10444
|
"aria-controls": state === null || state === void 0 ? void 0 : state.tabPanelId
|
|
9695
10445
|
}), /*#__PURE__*/React.createElement(Icon, {
|
|
9696
|
-
className: `${CLASSNAME$
|
|
10446
|
+
className: `${CLASSNAME$Q}__state`,
|
|
9697
10447
|
icon: getIcon(),
|
|
9698
10448
|
size: Size.s
|
|
9699
10449
|
}), /*#__PURE__*/React.createElement(InputLabel, {
|
|
9700
10450
|
htmlFor: (state === null || state === void 0 ? void 0 : state.tabId) || '',
|
|
9701
|
-
className: `${CLASSNAME$
|
|
10451
|
+
className: `${CLASSNAME$Q}__label`
|
|
9702
10452
|
}, label), helper && /*#__PURE__*/React.createElement(InputHelper, {
|
|
9703
10453
|
kind: hasError ? Kind.error : Kind.info,
|
|
9704
|
-
className: `${CLASSNAME$
|
|
10454
|
+
className: `${CLASSNAME$Q}__helper`
|
|
9705
10455
|
}, helper));
|
|
9706
10456
|
});
|
|
9707
|
-
ProgressTrackerStep.displayName = COMPONENT_NAME$
|
|
9708
|
-
ProgressTrackerStep.className = CLASSNAME$
|
|
10457
|
+
ProgressTrackerStep.displayName = COMPONENT_NAME$T;
|
|
10458
|
+
ProgressTrackerStep.className = CLASSNAME$Q;
|
|
9709
10459
|
ProgressTrackerStep.defaultProps = DEFAULT_PROPS$E;
|
|
9710
10460
|
|
|
9711
|
-
const _excluded$
|
|
10461
|
+
const _excluded$Y = ["children", "id", "className", "isActive"];
|
|
9712
10462
|
|
|
9713
10463
|
/**
|
|
9714
10464
|
* Defines the props of the component.
|
|
@@ -9717,12 +10467,12 @@ const _excluded$V = ["children", "id", "className", "isActive"];
|
|
|
9717
10467
|
/**
|
|
9718
10468
|
* Component display name.
|
|
9719
10469
|
*/
|
|
9720
|
-
const COMPONENT_NAME$
|
|
10470
|
+
const COMPONENT_NAME$U = 'ProgressTrackerStepPanel';
|
|
9721
10471
|
|
|
9722
10472
|
/**
|
|
9723
10473
|
* Component default class name and class prefix.
|
|
9724
10474
|
*/
|
|
9725
|
-
const CLASSNAME$
|
|
10475
|
+
const CLASSNAME$R = `${CSS_PREFIX}-step-panel`;
|
|
9726
10476
|
|
|
9727
10477
|
/**
|
|
9728
10478
|
* Component default props.
|
|
@@ -9745,7 +10495,7 @@ const ProgressTrackerStepPanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9745
10495
|
className,
|
|
9746
10496
|
isActive: propIsActive
|
|
9747
10497
|
} = props,
|
|
9748
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
10498
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$Y);
|
|
9749
10499
|
const state = useTabProviderContext('tabPanel', id);
|
|
9750
10500
|
const isActive = propIsActive || (state === null || state === void 0 ? void 0 : state.isActive);
|
|
9751
10501
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
@@ -9753,7 +10503,7 @@ const ProgressTrackerStepPanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9753
10503
|
}, forwardedProps, {
|
|
9754
10504
|
id: state === null || state === void 0 ? void 0 : state.tabPanelId,
|
|
9755
10505
|
className: classnames(className, handleBasicClasses({
|
|
9756
|
-
prefix: CLASSNAME$
|
|
10506
|
+
prefix: CLASSNAME$R,
|
|
9757
10507
|
isActive
|
|
9758
10508
|
})),
|
|
9759
10509
|
role: "tabpanel",
|
|
@@ -9761,11 +10511,11 @@ const ProgressTrackerStepPanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9761
10511
|
"aria-labelledby": state === null || state === void 0 ? void 0 : state.tabId
|
|
9762
10512
|
}), (!(state !== null && state !== void 0 && state.isLazy) || isActive) && children);
|
|
9763
10513
|
});
|
|
9764
|
-
ProgressTrackerStepPanel.displayName = COMPONENT_NAME$
|
|
9765
|
-
ProgressTrackerStepPanel.className = CLASSNAME$
|
|
10514
|
+
ProgressTrackerStepPanel.displayName = COMPONENT_NAME$U;
|
|
10515
|
+
ProgressTrackerStepPanel.className = CLASSNAME$R;
|
|
9766
10516
|
ProgressTrackerStepPanel.defaultProps = DEFAULT_PROPS$F;
|
|
9767
10517
|
|
|
9768
|
-
const _excluded$
|
|
10518
|
+
const _excluded$Z = ["checked", "className", "disabled", "helper", "id", "inputRef", "isChecked", "isDisabled", "label", "name", "onChange", "theme", "value", "inputProps"];
|
|
9769
10519
|
|
|
9770
10520
|
/**
|
|
9771
10521
|
* Defines the props of the component.
|
|
@@ -9774,12 +10524,12 @@ const _excluded$W = ["checked", "className", "disabled", "helper", "id", "inputR
|
|
|
9774
10524
|
/**
|
|
9775
10525
|
* Component display name.
|
|
9776
10526
|
*/
|
|
9777
|
-
const COMPONENT_NAME$
|
|
10527
|
+
const COMPONENT_NAME$V = 'RadioButton';
|
|
9778
10528
|
|
|
9779
10529
|
/**
|
|
9780
10530
|
* Component default class name and class prefix.
|
|
9781
10531
|
*/
|
|
9782
|
-
const CLASSNAME$
|
|
10532
|
+
const CLASSNAME$S = getRootClassName(COMPONENT_NAME$V);
|
|
9783
10533
|
|
|
9784
10534
|
/**
|
|
9785
10535
|
* Component default props.
|
|
@@ -9812,8 +10562,8 @@ const RadioButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9812
10562
|
value,
|
|
9813
10563
|
inputProps
|
|
9814
10564
|
} = props,
|
|
9815
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9816
|
-
const inputId = useMemo(() => id || `${CLASSNAME$
|
|
10565
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$Z);
|
|
10566
|
+
const inputId = useMemo(() => id || `${CLASSNAME$S.toLowerCase()}-${uid()}`, [id]);
|
|
9817
10567
|
const handleChange = event => {
|
|
9818
10568
|
if (onChange) {
|
|
9819
10569
|
onChange(value, name, event);
|
|
@@ -9826,14 +10576,14 @@ const RadioButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9826
10576
|
isChecked,
|
|
9827
10577
|
isDisabled,
|
|
9828
10578
|
isUnchecked: !isChecked,
|
|
9829
|
-
prefix: CLASSNAME$
|
|
10579
|
+
prefix: CLASSNAME$S,
|
|
9830
10580
|
theme
|
|
9831
10581
|
}))
|
|
9832
10582
|
}), /*#__PURE__*/React.createElement("div", {
|
|
9833
|
-
className: `${CLASSNAME$
|
|
10583
|
+
className: `${CLASSNAME$S}__input-wrapper`
|
|
9834
10584
|
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
9835
10585
|
ref: inputRef,
|
|
9836
|
-
className: `${CLASSNAME$
|
|
10586
|
+
className: `${CLASSNAME$S}__input-native`,
|
|
9837
10587
|
disabled: isDisabled,
|
|
9838
10588
|
id: inputId,
|
|
9839
10589
|
tabIndex: isDisabled ? -1 : 0,
|
|
@@ -9844,28 +10594,28 @@ const RadioButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9844
10594
|
onChange: handleChange,
|
|
9845
10595
|
"aria-describedby": helper ? `${inputId}-helper` : undefined
|
|
9846
10596
|
}, inputProps)), /*#__PURE__*/React.createElement("div", {
|
|
9847
|
-
className: `${CLASSNAME$
|
|
10597
|
+
className: `${CLASSNAME$S}__input-placeholder`
|
|
9848
10598
|
}, /*#__PURE__*/React.createElement("div", {
|
|
9849
|
-
className: `${CLASSNAME$
|
|
10599
|
+
className: `${CLASSNAME$S}__input-background`
|
|
9850
10600
|
}), /*#__PURE__*/React.createElement("div", {
|
|
9851
|
-
className: `${CLASSNAME$
|
|
10601
|
+
className: `${CLASSNAME$S}__input-indicator`
|
|
9852
10602
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
9853
|
-
className: `${CLASSNAME$
|
|
10603
|
+
className: `${CLASSNAME$S}__content`
|
|
9854
10604
|
}, label && /*#__PURE__*/React.createElement(InputLabel, {
|
|
9855
10605
|
htmlFor: inputId,
|
|
9856
10606
|
theme: theme,
|
|
9857
|
-
className: `${CLASSNAME$
|
|
10607
|
+
className: `${CLASSNAME$S}__label`
|
|
9858
10608
|
}, label), helper && /*#__PURE__*/React.createElement(InputHelper, {
|
|
9859
10609
|
id: `${inputId}-helper`,
|
|
9860
10610
|
theme: theme,
|
|
9861
|
-
className: `${CLASSNAME$
|
|
10611
|
+
className: `${CLASSNAME$S}__helper`
|
|
9862
10612
|
}, helper)));
|
|
9863
10613
|
});
|
|
9864
|
-
RadioButton.displayName = COMPONENT_NAME$
|
|
9865
|
-
RadioButton.className = CLASSNAME$
|
|
10614
|
+
RadioButton.displayName = COMPONENT_NAME$V;
|
|
10615
|
+
RadioButton.className = CLASSNAME$S;
|
|
9866
10616
|
RadioButton.defaultProps = DEFAULT_PROPS$G;
|
|
9867
10617
|
|
|
9868
|
-
const _excluded$
|
|
10618
|
+
const _excluded$_ = ["children", "className"];
|
|
9869
10619
|
|
|
9870
10620
|
/**
|
|
9871
10621
|
* Defines the props of the component.
|
|
@@ -9874,12 +10624,12 @@ const _excluded$X = ["children", "className"];
|
|
|
9874
10624
|
/**
|
|
9875
10625
|
* Component display name.
|
|
9876
10626
|
*/
|
|
9877
|
-
const COMPONENT_NAME$
|
|
10627
|
+
const COMPONENT_NAME$W = 'RadioGroup';
|
|
9878
10628
|
|
|
9879
10629
|
/**
|
|
9880
10630
|
* Component default class name and class prefix.
|
|
9881
10631
|
*/
|
|
9882
|
-
const CLASSNAME$
|
|
10632
|
+
const CLASSNAME$T = getRootClassName(COMPONENT_NAME$W);
|
|
9883
10633
|
|
|
9884
10634
|
/**
|
|
9885
10635
|
* RadioGroup component.
|
|
@@ -9893,17 +10643,17 @@ const RadioGroup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9893
10643
|
children,
|
|
9894
10644
|
className
|
|
9895
10645
|
} = props,
|
|
9896
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
10646
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$_);
|
|
9897
10647
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
9898
10648
|
ref: ref
|
|
9899
10649
|
}, forwardedProps, {
|
|
9900
10650
|
className: classnames(className, handleBasicClasses({
|
|
9901
|
-
prefix: CLASSNAME$
|
|
10651
|
+
prefix: CLASSNAME$T
|
|
9902
10652
|
}))
|
|
9903
10653
|
}), children);
|
|
9904
10654
|
});
|
|
9905
|
-
RadioGroup.displayName = COMPONENT_NAME$
|
|
9906
|
-
RadioGroup.className = CLASSNAME$
|
|
10655
|
+
RadioGroup.displayName = COMPONENT_NAME$W;
|
|
10656
|
+
RadioGroup.className = CLASSNAME$T;
|
|
9907
10657
|
|
|
9908
10658
|
/**
|
|
9909
10659
|
* Listen on element focus to store the focus status.
|
|
@@ -9937,13 +10687,13 @@ const SelectVariant = {
|
|
|
9937
10687
|
chip: 'chip'
|
|
9938
10688
|
};
|
|
9939
10689
|
|
|
9940
|
-
const _excluded
|
|
10690
|
+
const _excluded$$ = ["children", "className", "focusElement", "isMultiple", "closeOnClick", "disabled", "error", "hasError", "helper", "id", "isDisabled", "isEmpty", "isOpen", "isRequired", "isValid", "label", "onClear", "onDropdownClose", "onInfiniteScroll", "onInputClick", "placeholder", "theme", "value", "variant"];
|
|
9941
10691
|
|
|
9942
10692
|
/** The display name of the component. */
|
|
9943
|
-
const COMPONENT_NAME$
|
|
10693
|
+
const COMPONENT_NAME$X = 'Select';
|
|
9944
10694
|
|
|
9945
10695
|
/** The default class name and classes prefix for this component. */
|
|
9946
|
-
const CLASSNAME$
|
|
10696
|
+
const CLASSNAME$U = getRootClassName(COMPONENT_NAME$X);
|
|
9947
10697
|
|
|
9948
10698
|
/** The default value of props. */
|
|
9949
10699
|
const DEFAULT_PROPS$H = {
|
|
@@ -9977,7 +10727,7 @@ const WithSelectContext = (SelectElement, _ref, ref) => {
|
|
|
9977
10727
|
value,
|
|
9978
10728
|
variant = DEFAULT_PROPS$H.variant
|
|
9979
10729
|
} = _ref,
|
|
9980
|
-
forwardedProps = _objectWithoutProperties(_ref, _excluded
|
|
10730
|
+
forwardedProps = _objectWithoutProperties(_ref, _excluded$$);
|
|
9981
10731
|
const selectId = useMemo(() => id || `select-${uid()}`, [id]);
|
|
9982
10732
|
const anchorRef = useRef(null);
|
|
9983
10733
|
const selectRef = useRef(null);
|
|
@@ -10011,7 +10761,7 @@ const WithSelectContext = (SelectElement, _ref, ref) => {
|
|
|
10011
10761
|
isFocus,
|
|
10012
10762
|
isOpen,
|
|
10013
10763
|
isValid,
|
|
10014
|
-
prefix: CLASSNAME$
|
|
10764
|
+
prefix: CLASSNAME$U,
|
|
10015
10765
|
theme: theme === Theme.light ? Theme.light : Theme.dark
|
|
10016
10766
|
}))
|
|
10017
10767
|
}, /*#__PURE__*/React.createElement(SelectElement, _extends({}, forwardedProps, {
|
|
@@ -10042,22 +10792,22 @@ const WithSelectContext = (SelectElement, _ref, ref) => {
|
|
|
10042
10792
|
onInfiniteScroll: onInfiniteScroll,
|
|
10043
10793
|
ref: dropdownRef
|
|
10044
10794
|
}, children), hasError && error && /*#__PURE__*/React.createElement(InputHelper, {
|
|
10045
|
-
className: `${CLASSNAME$
|
|
10795
|
+
className: `${CLASSNAME$U}__helper`,
|
|
10046
10796
|
kind: Kind.error,
|
|
10047
10797
|
theme: theme
|
|
10048
10798
|
}, error), helper && /*#__PURE__*/React.createElement(InputHelper, {
|
|
10049
|
-
className: `${CLASSNAME$
|
|
10799
|
+
className: `${CLASSNAME$U}__helper`,
|
|
10050
10800
|
theme: theme
|
|
10051
10801
|
}, helper));
|
|
10052
10802
|
};
|
|
10053
10803
|
|
|
10054
|
-
const _excluded$
|
|
10804
|
+
const _excluded$10 = ["anchorRef", "clearButtonProps", "handleKeyboardNav", "hasError", "hasInputClear", "icon", "id", "isDisabled", "isEmpty", "isRequired", "isValid", "label", "onClear", "onInputClick", "placeholder", "selectedValueRender", "theme", "value", "variant", "selectElementRef"];
|
|
10055
10805
|
|
|
10056
10806
|
/** The display name of the component. */
|
|
10057
|
-
const COMPONENT_NAME$
|
|
10807
|
+
const COMPONENT_NAME$Y = 'Select';
|
|
10058
10808
|
|
|
10059
10809
|
/** The default class name and classes prefix for this component. */
|
|
10060
|
-
const CLASSNAME$
|
|
10810
|
+
const CLASSNAME$V = getRootClassName(COMPONENT_NAME$Y);
|
|
10061
10811
|
|
|
10062
10812
|
/** The default value of props. */
|
|
10063
10813
|
const DEFAULT_PROPS$I = {
|
|
@@ -10091,36 +10841,36 @@ const SelectField = _ref => {
|
|
|
10091
10841
|
variant,
|
|
10092
10842
|
selectElementRef
|
|
10093
10843
|
} = _ref,
|
|
10094
|
-
forwardedProps = _objectWithoutProperties(_ref, _excluded$
|
|
10844
|
+
forwardedProps = _objectWithoutProperties(_ref, _excluded$10);
|
|
10095
10845
|
return /*#__PURE__*/React.createElement(React.Fragment, null, variant === SelectVariant.input && /*#__PURE__*/React.createElement(React.Fragment, null, label && /*#__PURE__*/React.createElement("div", {
|
|
10096
|
-
className: `${CLASSNAME$
|
|
10846
|
+
className: `${CLASSNAME$V}__header`
|
|
10097
10847
|
}, /*#__PURE__*/React.createElement(InputLabel, {
|
|
10098
10848
|
htmlFor: id,
|
|
10099
|
-
className: `${CLASSNAME$
|
|
10849
|
+
className: `${CLASSNAME$V}__label`,
|
|
10100
10850
|
isRequired: isRequired,
|
|
10101
10851
|
theme: theme
|
|
10102
10852
|
}, label)), /*#__PURE__*/React.createElement("div", _extends({
|
|
10103
10853
|
ref: mergeRefs(anchorRef, selectElementRef),
|
|
10104
10854
|
id: id,
|
|
10105
|
-
className: `${CLASSNAME$
|
|
10855
|
+
className: `${CLASSNAME$V}__wrapper`,
|
|
10106
10856
|
onClick: onInputClick,
|
|
10107
10857
|
onKeyDown: handleKeyboardNav,
|
|
10108
10858
|
tabIndex: isDisabled ? undefined : 0,
|
|
10109
10859
|
"aria-disabled": isDisabled || undefined
|
|
10110
10860
|
}, forwardedProps), icon && /*#__PURE__*/React.createElement(Icon, {
|
|
10111
|
-
className: `${CLASSNAME$
|
|
10861
|
+
className: `${CLASSNAME$V}__input-icon`,
|
|
10112
10862
|
color: theme === Theme.dark ? 'light' : undefined,
|
|
10113
10863
|
icon: icon,
|
|
10114
10864
|
size: Size.xs
|
|
10115
10865
|
}), /*#__PURE__*/React.createElement("div", {
|
|
10116
|
-
className: classnames([`${CLASSNAME$
|
|
10866
|
+
className: classnames([`${CLASSNAME$V}__input-native`, isEmpty && placeholder && `${CLASSNAME$V}__input-native--placeholder`])
|
|
10117
10867
|
}, !isEmpty && /*#__PURE__*/React.createElement("span", null, selectedValueRender === null || selectedValueRender === void 0 ? void 0 : selectedValueRender(value)), isEmpty && placeholder && /*#__PURE__*/React.createElement("span", null, placeholder)), (isValid || hasError) && /*#__PURE__*/React.createElement("div", {
|
|
10118
|
-
className: `${CLASSNAME$
|
|
10868
|
+
className: `${CLASSNAME$V}__input-validity`
|
|
10119
10869
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
10120
10870
|
icon: isValid ? mdiCheckCircle : mdiAlertCircle,
|
|
10121
10871
|
size: Size.xxs
|
|
10122
10872
|
})), hasInputClear && clearButtonProps && /*#__PURE__*/React.createElement(IconButton, _extends({}, clearButtonProps, {
|
|
10123
|
-
className: `${CLASSNAME$
|
|
10873
|
+
className: `${CLASSNAME$V}__input-clear`,
|
|
10124
10874
|
icon: mdiCloseCircle,
|
|
10125
10875
|
emphasis: Emphasis.low,
|
|
10126
10876
|
size: Size.s,
|
|
@@ -10128,7 +10878,7 @@ const SelectField = _ref => {
|
|
|
10128
10878
|
onClick: onClear,
|
|
10129
10879
|
onKeyDown: stopPropagation
|
|
10130
10880
|
})), /*#__PURE__*/React.createElement("div", {
|
|
10131
|
-
className: `${CLASSNAME$
|
|
10881
|
+
className: `${CLASSNAME$V}__input-indicator`
|
|
10132
10882
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
10133
10883
|
icon: mdiMenuDown,
|
|
10134
10884
|
size: Size.s
|
|
@@ -10160,26 +10910,26 @@ const Select = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10160
10910
|
className: classnames(props.className, handleBasicClasses({
|
|
10161
10911
|
hasInputClear,
|
|
10162
10912
|
hasUnique: !props.isEmpty,
|
|
10163
|
-
prefix: CLASSNAME$
|
|
10913
|
+
prefix: CLASSNAME$V
|
|
10164
10914
|
})),
|
|
10165
10915
|
hasInputClear,
|
|
10166
10916
|
isEmpty: isEmpty$1
|
|
10167
10917
|
}), ref);
|
|
10168
10918
|
});
|
|
10169
|
-
Select.displayName = COMPONENT_NAME$
|
|
10170
|
-
Select.className = CLASSNAME$
|
|
10919
|
+
Select.displayName = COMPONENT_NAME$Y;
|
|
10920
|
+
Select.className = CLASSNAME$V;
|
|
10171
10921
|
Select.defaultProps = DEFAULT_PROPS$I;
|
|
10172
|
-
Select.className = CLASSNAME$
|
|
10922
|
+
Select.className = CLASSNAME$V;
|
|
10173
10923
|
|
|
10174
|
-
const _excluded$
|
|
10924
|
+
const _excluded$11 = ["anchorRef", "handleKeyboardNav", "hasError", "icon", "id", "isDisabled", "isEmpty", "isRequired", "isValid", "label", "onClear", "onInputClick", "placeholder", "selectedChipRender", "selectedValueRender", "theme", "value", "variant", "selectElementRef"];
|
|
10175
10925
|
|
|
10176
10926
|
/** Defines the props of the component. */
|
|
10177
10927
|
|
|
10178
10928
|
/** The display name of the component. */
|
|
10179
|
-
const COMPONENT_NAME$
|
|
10929
|
+
const COMPONENT_NAME$Z = 'Select';
|
|
10180
10930
|
|
|
10181
10931
|
/** The default class name and classes prefix for this component. */
|
|
10182
|
-
const CLASSNAME$
|
|
10932
|
+
const CLASSNAME$W = getRootClassName(COMPONENT_NAME$Z);
|
|
10183
10933
|
|
|
10184
10934
|
/** The default value of props. */
|
|
10185
10935
|
const DEFAULT_PROPS$J = {
|
|
@@ -10222,38 +10972,38 @@ const SelectMultipleField = _ref => {
|
|
|
10222
10972
|
variant,
|
|
10223
10973
|
selectElementRef
|
|
10224
10974
|
} = _ref,
|
|
10225
|
-
forwardedProps = _objectWithoutProperties(_ref, _excluded$
|
|
10975
|
+
forwardedProps = _objectWithoutProperties(_ref, _excluded$11);
|
|
10226
10976
|
return /*#__PURE__*/React.createElement(React.Fragment, null, variant === SelectVariant.input && /*#__PURE__*/React.createElement(React.Fragment, null, label && /*#__PURE__*/React.createElement("div", {
|
|
10227
|
-
className: `${CLASSNAME$
|
|
10977
|
+
className: `${CLASSNAME$W}__header`
|
|
10228
10978
|
}, /*#__PURE__*/React.createElement(InputLabel, {
|
|
10229
10979
|
htmlFor: id,
|
|
10230
|
-
className: `${CLASSNAME$
|
|
10980
|
+
className: `${CLASSNAME$W}__label`,
|
|
10231
10981
|
isRequired: isRequired,
|
|
10232
10982
|
theme: theme
|
|
10233
10983
|
}, label)), /*#__PURE__*/React.createElement("div", _extends({
|
|
10234
10984
|
ref: mergeRefs(anchorRef, selectElementRef),
|
|
10235
10985
|
id: id,
|
|
10236
|
-
className: `${CLASSNAME$
|
|
10986
|
+
className: `${CLASSNAME$W}__wrapper`,
|
|
10237
10987
|
onClick: onInputClick,
|
|
10238
10988
|
onKeyDown: handleKeyboardNav,
|
|
10239
10989
|
tabIndex: isDisabled ? undefined : 0,
|
|
10240
10990
|
"aria-disabled": isDisabled || undefined
|
|
10241
10991
|
}, forwardedProps), icon && /*#__PURE__*/React.createElement(Icon, {
|
|
10242
|
-
className: `${CLASSNAME$
|
|
10992
|
+
className: `${CLASSNAME$W}__input-icon`,
|
|
10243
10993
|
color: theme === Theme.dark ? 'light' : undefined,
|
|
10244
10994
|
icon: icon,
|
|
10245
10995
|
size: Size.xs
|
|
10246
10996
|
}), /*#__PURE__*/React.createElement("div", {
|
|
10247
|
-
className: `${CLASSNAME$
|
|
10997
|
+
className: `${CLASSNAME$W}__chips`
|
|
10248
10998
|
}, !isEmpty && value.map((val, index) => selectedChipRender === null || selectedChipRender === void 0 ? void 0 : selectedChipRender(val, index, onClear, isDisabled, theme))), isEmpty && placeholder && /*#__PURE__*/React.createElement("div", {
|
|
10249
|
-
className: classnames([`${CLASSNAME$
|
|
10999
|
+
className: classnames([`${CLASSNAME$W}__input-native`, `${CLASSNAME$W}__input-native--placeholder`])
|
|
10250
11000
|
}, /*#__PURE__*/React.createElement("span", null, placeholder)), (isValid || hasError) && /*#__PURE__*/React.createElement("div", {
|
|
10251
|
-
className: `${CLASSNAME$
|
|
11001
|
+
className: `${CLASSNAME$W}__input-validity`
|
|
10252
11002
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
10253
11003
|
icon: isValid ? mdiCheckCircle : mdiAlertCircle,
|
|
10254
11004
|
size: Size.xxs
|
|
10255
11005
|
})), /*#__PURE__*/React.createElement("div", {
|
|
10256
|
-
className: `${CLASSNAME$
|
|
11006
|
+
className: `${CLASSNAME$W}__input-indicator`
|
|
10257
11007
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
10258
11008
|
icon: mdiMenuDown,
|
|
10259
11009
|
size: Size.s
|
|
@@ -10282,17 +11032,17 @@ const SelectMultiple = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10282
11032
|
return WithSelectContext(SelectMultipleField, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
10283
11033
|
className: classnames(props.className, handleBasicClasses({
|
|
10284
11034
|
hasMultiple: !props.isEmpty,
|
|
10285
|
-
prefix: CLASSNAME$
|
|
11035
|
+
prefix: CLASSNAME$W
|
|
10286
11036
|
})),
|
|
10287
11037
|
isEmpty: props.value.length === 0,
|
|
10288
11038
|
isMultiple: true
|
|
10289
11039
|
}), ref);
|
|
10290
11040
|
});
|
|
10291
|
-
SelectMultiple.displayName = COMPONENT_NAME$
|
|
10292
|
-
SelectMultiple.className = CLASSNAME$
|
|
11041
|
+
SelectMultiple.displayName = COMPONENT_NAME$Z;
|
|
11042
|
+
SelectMultiple.className = CLASSNAME$W;
|
|
10293
11043
|
SelectMultiple.defaultProps = DEFAULT_PROPS$J;
|
|
10294
11044
|
|
|
10295
|
-
const _excluded
|
|
11045
|
+
const _excluded$12 = ["children", "className", "theme"];
|
|
10296
11046
|
|
|
10297
11047
|
/**
|
|
10298
11048
|
* Defines the props of the component.
|
|
@@ -10301,12 +11051,12 @@ const _excluded$$ = ["children", "className", "theme"];
|
|
|
10301
11051
|
/**
|
|
10302
11052
|
* Component display name.
|
|
10303
11053
|
*/
|
|
10304
|
-
const COMPONENT_NAME$
|
|
11054
|
+
const COMPONENT_NAME$_ = 'SideNavigation';
|
|
10305
11055
|
|
|
10306
11056
|
/**
|
|
10307
11057
|
* Component default class name and class prefix.
|
|
10308
11058
|
*/
|
|
10309
|
-
const CLASSNAME$
|
|
11059
|
+
const CLASSNAME$X = getRootClassName(COMPONENT_NAME$_);
|
|
10310
11060
|
|
|
10311
11061
|
/**
|
|
10312
11062
|
* SideNavigation component.
|
|
@@ -10321,20 +11071,20 @@ const SideNavigation = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10321
11071
|
className,
|
|
10322
11072
|
theme
|
|
10323
11073
|
} = props,
|
|
10324
|
-
forwardedProps = _objectWithoutProperties(props, _excluded
|
|
11074
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$12);
|
|
10325
11075
|
const content = Children.toArray(children).filter(isComponent(SideNavigationItem));
|
|
10326
11076
|
return /*#__PURE__*/React.createElement("ul", _extends({
|
|
10327
11077
|
ref: ref
|
|
10328
11078
|
}, forwardedProps, {
|
|
10329
11079
|
className: classnames(className, theme === Theme.dark && 'lumx-color-font-light-N', handleBasicClasses({
|
|
10330
|
-
prefix: CLASSNAME$
|
|
11080
|
+
prefix: CLASSNAME$X
|
|
10331
11081
|
}))
|
|
10332
11082
|
}), content);
|
|
10333
11083
|
});
|
|
10334
|
-
SideNavigation.displayName = COMPONENT_NAME$
|
|
10335
|
-
SideNavigation.className = CLASSNAME$
|
|
11084
|
+
SideNavigation.displayName = COMPONENT_NAME$_;
|
|
11085
|
+
SideNavigation.className = CLASSNAME$X;
|
|
10336
11086
|
|
|
10337
|
-
const _excluded$
|
|
11087
|
+
const _excluded$13 = ["linkAs", "href"];
|
|
10338
11088
|
/**
|
|
10339
11089
|
* Render <button> HTML component, fallbacks to `<a>` when a `href` is provided or a custom component with `linkAs`.
|
|
10340
11090
|
*/
|
|
@@ -10343,7 +11093,7 @@ const renderButtonOrLink = function (props) {
|
|
|
10343
11093
|
linkAs,
|
|
10344
11094
|
href
|
|
10345
11095
|
} = props,
|
|
10346
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
11096
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$13);
|
|
10347
11097
|
for (var _len = arguments.length, children = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
10348
11098
|
children[_key - 1] = arguments[_key];
|
|
10349
11099
|
}
|
|
@@ -10353,7 +11103,7 @@ const renderButtonOrLink = function (props) {
|
|
|
10353
11103
|
}, forwardedProps), ...children);
|
|
10354
11104
|
};
|
|
10355
11105
|
|
|
10356
|
-
const _excluded$
|
|
11106
|
+
const _excluded$14 = ["children", "className", "emphasis", "icon", "isOpen", "isSelected", "label", "linkAs", "linkProps", "onActionClick", "onClick", "toggleButtonProps", "closeMode"];
|
|
10357
11107
|
|
|
10358
11108
|
/**
|
|
10359
11109
|
* Defines the props of the component.
|
|
@@ -10362,12 +11112,12 @@ const _excluded$11 = ["children", "className", "emphasis", "icon", "isOpen", "is
|
|
|
10362
11112
|
/**
|
|
10363
11113
|
* Component display name.
|
|
10364
11114
|
*/
|
|
10365
|
-
const COMPONENT_NAME
|
|
11115
|
+
const COMPONENT_NAME$$ = 'SideNavigationItem';
|
|
10366
11116
|
|
|
10367
11117
|
/**
|
|
10368
11118
|
* Component default class name and class prefix.
|
|
10369
11119
|
*/
|
|
10370
|
-
const CLASSNAME$
|
|
11120
|
+
const CLASSNAME$Y = getRootClassName(COMPONENT_NAME$$);
|
|
10371
11121
|
|
|
10372
11122
|
/**
|
|
10373
11123
|
* Component default props.
|
|
@@ -10400,7 +11150,7 @@ const SideNavigationItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10400
11150
|
toggleButtonProps,
|
|
10401
11151
|
closeMode = 'unmount'
|
|
10402
11152
|
} = props,
|
|
10403
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
11153
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$14);
|
|
10404
11154
|
const content = children && Children.toArray(children).filter(isComponent(SideNavigationItem));
|
|
10405
11155
|
const hasContent = !isEmpty(content);
|
|
10406
11156
|
const shouldSplitActions = Boolean(onActionClick);
|
|
@@ -10419,22 +11169,22 @@ const SideNavigationItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10419
11169
|
emphasis,
|
|
10420
11170
|
isOpen: showChildren,
|
|
10421
11171
|
isSelected,
|
|
10422
|
-
prefix: CLASSNAME$
|
|
11172
|
+
prefix: CLASSNAME$Y
|
|
10423
11173
|
}))
|
|
10424
11174
|
}), shouldSplitActions ? /*#__PURE__*/React.createElement("div", {
|
|
10425
|
-
className: `${CLASSNAME$
|
|
11175
|
+
className: `${CLASSNAME$Y}__wrapper`
|
|
10426
11176
|
}, renderLink(_objectSpread2(_objectSpread2({
|
|
10427
11177
|
linkAs
|
|
10428
11178
|
}, linkProps), {}, {
|
|
10429
|
-
className: `${CLASSNAME$
|
|
11179
|
+
className: `${CLASSNAME$Y}__link`,
|
|
10430
11180
|
onClick,
|
|
10431
11181
|
tabIndex: 0
|
|
10432
11182
|
}), icon && /*#__PURE__*/React.createElement(Icon, {
|
|
10433
|
-
className: `${CLASSNAME$
|
|
11183
|
+
className: `${CLASSNAME$Y}__icon`,
|
|
10434
11184
|
icon: icon,
|
|
10435
11185
|
size: Size.xs
|
|
10436
11186
|
}), /*#__PURE__*/React.createElement("span", null, label)), /*#__PURE__*/React.createElement(IconButton, _extends({}, toggleButtonProps, {
|
|
10437
|
-
className: `${CLASSNAME$
|
|
11187
|
+
className: `${CLASSNAME$Y}__toggle`,
|
|
10438
11188
|
icon: isOpen ? mdiChevronUp : mdiChevronDown,
|
|
10439
11189
|
size: Size.m,
|
|
10440
11190
|
emphasis: Emphasis.low,
|
|
@@ -10442,27 +11192,27 @@ const SideNavigationItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10442
11192
|
}, ariaProps))) : renderButtonOrLink(_objectSpread2(_objectSpread2({
|
|
10443
11193
|
linkAs
|
|
10444
11194
|
}, linkProps), {}, {
|
|
10445
|
-
className: `${CLASSNAME$
|
|
11195
|
+
className: `${CLASSNAME$Y}__link`,
|
|
10446
11196
|
tabIndex: 0,
|
|
10447
11197
|
onClick
|
|
10448
11198
|
}, ariaProps), icon && /*#__PURE__*/React.createElement(Icon, {
|
|
10449
|
-
className: `${CLASSNAME$
|
|
11199
|
+
className: `${CLASSNAME$Y}__icon`,
|
|
10450
11200
|
icon: icon,
|
|
10451
11201
|
size: Size.xs
|
|
10452
11202
|
}), /*#__PURE__*/React.createElement("span", null, label), hasContent && /*#__PURE__*/React.createElement(Icon, {
|
|
10453
|
-
className: `${CLASSNAME$
|
|
11203
|
+
className: `${CLASSNAME$Y}__chevron`,
|
|
10454
11204
|
icon: isOpen ? mdiChevronUp : mdiChevronDown,
|
|
10455
11205
|
size: Size.xs
|
|
10456
11206
|
})), (closeMode === 'hide' || showChildren) && /*#__PURE__*/React.createElement("ul", {
|
|
10457
|
-
className: `${CLASSNAME$
|
|
11207
|
+
className: `${CLASSNAME$Y}__children`,
|
|
10458
11208
|
id: contentId
|
|
10459
11209
|
}, content));
|
|
10460
11210
|
});
|
|
10461
|
-
SideNavigationItem.displayName = COMPONENT_NAME
|
|
10462
|
-
SideNavigationItem.className = CLASSNAME$
|
|
11211
|
+
SideNavigationItem.displayName = COMPONENT_NAME$$;
|
|
11212
|
+
SideNavigationItem.className = CLASSNAME$Y;
|
|
10463
11213
|
SideNavigationItem.defaultProps = DEFAULT_PROPS$K;
|
|
10464
11214
|
|
|
10465
|
-
const _excluded$
|
|
11215
|
+
const _excluded$15 = ["className", "size", "color", "theme"];
|
|
10466
11216
|
|
|
10467
11217
|
/**
|
|
10468
11218
|
* Defines the props of the component.
|
|
@@ -10475,12 +11225,12 @@ const DEFAULT_PROPS$L = {
|
|
|
10475
11225
|
/**
|
|
10476
11226
|
* Component display name.
|
|
10477
11227
|
*/
|
|
10478
|
-
const COMPONENT_NAME
|
|
11228
|
+
const COMPONENT_NAME$10 = 'SkeletonCircle';
|
|
10479
11229
|
|
|
10480
11230
|
/**
|
|
10481
11231
|
* Component default class name and class prefix.
|
|
10482
11232
|
*/
|
|
10483
|
-
const CLASSNAME$
|
|
11233
|
+
const CLASSNAME$Z = getRootClassName(COMPONENT_NAME$10);
|
|
10484
11234
|
|
|
10485
11235
|
/**
|
|
10486
11236
|
* SkeletonCircle component.
|
|
@@ -10496,23 +11246,23 @@ const SkeletonCircle = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10496
11246
|
color,
|
|
10497
11247
|
theme
|
|
10498
11248
|
} = props,
|
|
10499
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
11249
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$15);
|
|
10500
11250
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
10501
11251
|
ref: ref
|
|
10502
11252
|
}, forwardedProps, {
|
|
10503
11253
|
className: classnames(className, handleBasicClasses({
|
|
10504
|
-
prefix: CLASSNAME$
|
|
11254
|
+
prefix: CLASSNAME$Z,
|
|
10505
11255
|
size,
|
|
10506
11256
|
color,
|
|
10507
11257
|
theme
|
|
10508
11258
|
}))
|
|
10509
11259
|
}));
|
|
10510
11260
|
});
|
|
10511
|
-
SkeletonCircle.displayName = COMPONENT_NAME
|
|
11261
|
+
SkeletonCircle.displayName = COMPONENT_NAME$10;
|
|
10512
11262
|
SkeletonCircle.defaultProps = DEFAULT_PROPS$L;
|
|
10513
|
-
SkeletonCircle.className = CLASSNAME$
|
|
11263
|
+
SkeletonCircle.className = CLASSNAME$Z;
|
|
10514
11264
|
|
|
10515
|
-
const _excluded$
|
|
11265
|
+
const _excluded$16 = ["aspectRatio", "className", "height", "theme", "variant", "width", "color"];
|
|
10516
11266
|
|
|
10517
11267
|
/**
|
|
10518
11268
|
* Skeleton variants.
|
|
@@ -10535,12 +11285,12 @@ const DEFAULT_PROPS$M = {
|
|
|
10535
11285
|
/**
|
|
10536
11286
|
* Component display name.
|
|
10537
11287
|
*/
|
|
10538
|
-
const COMPONENT_NAME$
|
|
11288
|
+
const COMPONENT_NAME$11 = 'SkeletonRectangle';
|
|
10539
11289
|
|
|
10540
11290
|
/**
|
|
10541
11291
|
* Component default class name and class prefix.
|
|
10542
11292
|
*/
|
|
10543
|
-
const CLASSNAME$
|
|
11293
|
+
const CLASSNAME$_ = getRootClassName(COMPONENT_NAME$11);
|
|
10544
11294
|
|
|
10545
11295
|
/**
|
|
10546
11296
|
* SkeletonRectangle component.
|
|
@@ -10559,12 +11309,12 @@ const SkeletonRectangle = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10559
11309
|
width,
|
|
10560
11310
|
color
|
|
10561
11311
|
} = props,
|
|
10562
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
11312
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$16);
|
|
10563
11313
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
10564
11314
|
ref: ref
|
|
10565
11315
|
}, forwardedProps, {
|
|
10566
11316
|
className: classnames(className, handleBasicClasses({
|
|
10567
|
-
prefix: CLASSNAME$
|
|
11317
|
+
prefix: CLASSNAME$_,
|
|
10568
11318
|
aspectRatio,
|
|
10569
11319
|
height: aspectRatio ? undefined : height,
|
|
10570
11320
|
theme,
|
|
@@ -10573,14 +11323,14 @@ const SkeletonRectangle = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10573
11323
|
color
|
|
10574
11324
|
}))
|
|
10575
11325
|
}), /*#__PURE__*/React.createElement("div", {
|
|
10576
|
-
className: `${CLASSNAME$
|
|
11326
|
+
className: `${CLASSNAME$_}__inner`
|
|
10577
11327
|
}));
|
|
10578
11328
|
});
|
|
10579
|
-
SkeletonRectangle.displayName = COMPONENT_NAME$
|
|
10580
|
-
SkeletonRectangle.className = CLASSNAME$
|
|
11329
|
+
SkeletonRectangle.displayName = COMPONENT_NAME$11;
|
|
11330
|
+
SkeletonRectangle.className = CLASSNAME$_;
|
|
10581
11331
|
SkeletonRectangle.defaultProps = DEFAULT_PROPS$M;
|
|
10582
11332
|
|
|
10583
|
-
const _excluded$
|
|
11333
|
+
const _excluded$17 = ["className", "theme", "typography", "width", "color"];
|
|
10584
11334
|
|
|
10585
11335
|
/**
|
|
10586
11336
|
* Defines the props of the component.
|
|
@@ -10593,12 +11343,12 @@ const DEFAULT_PROPS$N = {
|
|
|
10593
11343
|
/**
|
|
10594
11344
|
* Component display name.
|
|
10595
11345
|
*/
|
|
10596
|
-
const COMPONENT_NAME$
|
|
11346
|
+
const COMPONENT_NAME$12 = 'SkeletonTypography';
|
|
10597
11347
|
|
|
10598
11348
|
/**
|
|
10599
11349
|
* Component default class name and class prefix.
|
|
10600
11350
|
*/
|
|
10601
|
-
const CLASSNAME
|
|
11351
|
+
const CLASSNAME$$ = getRootClassName(COMPONENT_NAME$12);
|
|
10602
11352
|
|
|
10603
11353
|
/**
|
|
10604
11354
|
* SkeletonTypography component.
|
|
@@ -10615,12 +11365,12 @@ const SkeletonTypography = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10615
11365
|
width,
|
|
10616
11366
|
color
|
|
10617
11367
|
} = props,
|
|
10618
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
11368
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$17);
|
|
10619
11369
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
10620
11370
|
ref: ref
|
|
10621
11371
|
}, forwardedProps, {
|
|
10622
11372
|
className: classnames(className, handleBasicClasses({
|
|
10623
|
-
prefix: CLASSNAME
|
|
11373
|
+
prefix: CLASSNAME$$,
|
|
10624
11374
|
theme,
|
|
10625
11375
|
typography,
|
|
10626
11376
|
color
|
|
@@ -10629,12 +11379,12 @@ const SkeletonTypography = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10629
11379
|
width
|
|
10630
11380
|
})
|
|
10631
11381
|
}), /*#__PURE__*/React.createElement("div", {
|
|
10632
|
-
className: `${CLASSNAME
|
|
11382
|
+
className: `${CLASSNAME$$}__inner`
|
|
10633
11383
|
}));
|
|
10634
11384
|
});
|
|
10635
|
-
SkeletonTypography.displayName = COMPONENT_NAME$
|
|
11385
|
+
SkeletonTypography.displayName = COMPONENT_NAME$12;
|
|
10636
11386
|
SkeletonTypography.defaultProps = DEFAULT_PROPS$N;
|
|
10637
|
-
SkeletonTypography.className = CLASSNAME
|
|
11387
|
+
SkeletonTypography.className = CLASSNAME$$;
|
|
10638
11388
|
|
|
10639
11389
|
const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
10640
11390
|
|
|
@@ -10670,7 +11420,7 @@ const clamp = (value, min, max) => {
|
|
|
10670
11420
|
return value;
|
|
10671
11421
|
};
|
|
10672
11422
|
|
|
10673
|
-
const _excluded$
|
|
11423
|
+
const _excluded$18 = ["className", "disabled", "helper", "hideMinMaxLabel", "id", "isDisabled", "label", "max", "min", "name", "onChange", "onMouseDown", "precision", "steps", "theme", "value"];
|
|
10674
11424
|
|
|
10675
11425
|
/**
|
|
10676
11426
|
* Defines the props of the component.
|
|
@@ -10679,12 +11429,12 @@ const _excluded$15 = ["className", "disabled", "helper", "hideMinMaxLabel", "id"
|
|
|
10679
11429
|
/**
|
|
10680
11430
|
* Component display name.
|
|
10681
11431
|
*/
|
|
10682
|
-
const COMPONENT_NAME$
|
|
11432
|
+
const COMPONENT_NAME$13 = 'Slider';
|
|
10683
11433
|
|
|
10684
11434
|
/**
|
|
10685
11435
|
* Component default class name and class prefix.
|
|
10686
11436
|
*/
|
|
10687
|
-
const CLASSNAME
|
|
11437
|
+
const CLASSNAME$10 = getRootClassName(COMPONENT_NAME$13);
|
|
10688
11438
|
|
|
10689
11439
|
/**
|
|
10690
11440
|
* Component default props.
|
|
@@ -10745,7 +11495,7 @@ const Slider = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10745
11495
|
theme,
|
|
10746
11496
|
value
|
|
10747
11497
|
} = props,
|
|
10748
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
11498
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$18);
|
|
10749
11499
|
const sliderId = useMemo(() => id || `slider-${uid()}`, [id]);
|
|
10750
11500
|
const sliderLabelId = useMemo(() => `label-${sliderId}`, [sliderId]);
|
|
10751
11501
|
const sliderRef = useRef(null);
|
|
@@ -10878,7 +11628,7 @@ const Slider = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10878
11628
|
ref: ref
|
|
10879
11629
|
}, forwardedProps, {
|
|
10880
11630
|
className: classnames(className, handleBasicClasses({
|
|
10881
|
-
prefix: CLASSNAME
|
|
11631
|
+
prefix: CLASSNAME$10,
|
|
10882
11632
|
theme,
|
|
10883
11633
|
hasLabel: Boolean(label)
|
|
10884
11634
|
})),
|
|
@@ -10887,30 +11637,30 @@ const Slider = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10887
11637
|
}), label && /*#__PURE__*/React.createElement(InputLabel, {
|
|
10888
11638
|
id: sliderLabelId,
|
|
10889
11639
|
htmlFor: sliderId,
|
|
10890
|
-
className: `${CLASSNAME
|
|
11640
|
+
className: `${CLASSNAME$10}__label`,
|
|
10891
11641
|
theme: theme
|
|
10892
11642
|
}, label), helper && /*#__PURE__*/React.createElement(InputHelper, {
|
|
10893
|
-
className: `${CLASSNAME
|
|
11643
|
+
className: `${CLASSNAME$10}__helper`,
|
|
10894
11644
|
theme: theme
|
|
10895
11645
|
}, helper), /*#__PURE__*/React.createElement("div", {
|
|
10896
|
-
className: `${CLASSNAME
|
|
11646
|
+
className: `${CLASSNAME$10}__ui-wrapper`
|
|
10897
11647
|
}, !hideMinMaxLabel && /*#__PURE__*/React.createElement("span", {
|
|
10898
|
-
className: `${CLASSNAME
|
|
11648
|
+
className: `${CLASSNAME$10}__value-label ${CLASSNAME$10}__value-label--min`
|
|
10899
11649
|
}, min), /*#__PURE__*/React.createElement("div", {
|
|
10900
|
-
className: `${CLASSNAME
|
|
11650
|
+
className: `${CLASSNAME$10}__wrapper`,
|
|
10901
11651
|
ref: sliderRef
|
|
10902
11652
|
}, /*#__PURE__*/React.createElement("div", {
|
|
10903
|
-
className: `${CLASSNAME
|
|
11653
|
+
className: `${CLASSNAME$10}__track ${CLASSNAME$10}__track--background`
|
|
10904
11654
|
}), /*#__PURE__*/React.createElement("div", {
|
|
10905
|
-
className: `${CLASSNAME
|
|
11655
|
+
className: `${CLASSNAME$10}__track ${CLASSNAME$10}__track--active`,
|
|
10906
11656
|
style: {
|
|
10907
11657
|
width: percentString
|
|
10908
11658
|
}
|
|
10909
11659
|
}), steps ? /*#__PURE__*/React.createElement("div", {
|
|
10910
|
-
className: `${CLASSNAME
|
|
11660
|
+
className: `${CLASSNAME$10}__ticks`
|
|
10911
11661
|
}, availableSteps.map((step, idx) => /*#__PURE__*/React.createElement("div", {
|
|
10912
11662
|
key: `tick_${idx}`,
|
|
10913
|
-
className: `${CLASSNAME
|
|
11663
|
+
className: `${CLASSNAME$10}__tick`,
|
|
10914
11664
|
style: {
|
|
10915
11665
|
left: `${step * 100}%`
|
|
10916
11666
|
}
|
|
@@ -10919,18 +11669,18 @@ const Slider = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10919
11669
|
"aria-labelledby": sliderLabelId,
|
|
10920
11670
|
name: name,
|
|
10921
11671
|
id: sliderId,
|
|
10922
|
-
className: `${CLASSNAME
|
|
11672
|
+
className: `${CLASSNAME$10}__handle`,
|
|
10923
11673
|
style: {
|
|
10924
11674
|
left: percentString
|
|
10925
11675
|
},
|
|
10926
11676
|
onKeyDown: handleKeyDown,
|
|
10927
11677
|
disabled: isDisabled
|
|
10928
11678
|
})), !hideMinMaxLabel && /*#__PURE__*/React.createElement("span", {
|
|
10929
|
-
className: `${CLASSNAME
|
|
11679
|
+
className: `${CLASSNAME$10}__value-label ${CLASSNAME$10}__value-label--max`
|
|
10930
11680
|
}, max)));
|
|
10931
11681
|
});
|
|
10932
|
-
Slider.displayName = COMPONENT_NAME$
|
|
10933
|
-
Slider.className = CLASSNAME
|
|
11682
|
+
Slider.displayName = COMPONENT_NAME$13;
|
|
11683
|
+
Slider.className = CLASSNAME$10;
|
|
10934
11684
|
Slider.defaultProps = DEFAULT_PROPS$O;
|
|
10935
11685
|
|
|
10936
11686
|
/**
|
|
@@ -11251,7 +12001,7 @@ const useSlideFocusManagement = _ref => {
|
|
|
11251
12001
|
}, [isSlideDisplayed, slideRef]);
|
|
11252
12002
|
};
|
|
11253
12003
|
|
|
11254
|
-
const _excluded$
|
|
12004
|
+
const _excluded$19 = ["className", "children", "role", "label", "isDisplayed"];
|
|
11255
12005
|
|
|
11256
12006
|
/**
|
|
11257
12007
|
* Defines the props of the component.
|
|
@@ -11260,12 +12010,12 @@ const _excluded$16 = ["className", "children", "role", "label", "isDisplayed"];
|
|
|
11260
12010
|
/**
|
|
11261
12011
|
* Component display name.
|
|
11262
12012
|
*/
|
|
11263
|
-
const COMPONENT_NAME$
|
|
12013
|
+
const COMPONENT_NAME$14 = 'SlideshowItemGroup';
|
|
11264
12014
|
|
|
11265
12015
|
/**
|
|
11266
12016
|
* Component default class name and class prefix.
|
|
11267
12017
|
*/
|
|
11268
|
-
const CLASSNAME$
|
|
12018
|
+
const CLASSNAME$11 = getRootClassName(COMPONENT_NAME$14);
|
|
11269
12019
|
const buildSlideShowGroupId = (slidesId, index) => `${slidesId}-slide-${index}`;
|
|
11270
12020
|
|
|
11271
12021
|
/**
|
|
@@ -11283,7 +12033,7 @@ const SlideshowItemGroup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11283
12033
|
label,
|
|
11284
12034
|
isDisplayed
|
|
11285
12035
|
} = props,
|
|
11286
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12036
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$19);
|
|
11287
12037
|
const groupRef = React.useRef(null);
|
|
11288
12038
|
useSlideFocusManagement({
|
|
11289
12039
|
isSlideDisplayed: isDisplayed,
|
|
@@ -11293,16 +12043,16 @@ const SlideshowItemGroup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11293
12043
|
ref: mergeRefs(groupRef, ref),
|
|
11294
12044
|
role: role,
|
|
11295
12045
|
className: classnames(className, handleBasicClasses({
|
|
11296
|
-
prefix: CLASSNAME$
|
|
12046
|
+
prefix: CLASSNAME$11
|
|
11297
12047
|
})),
|
|
11298
12048
|
"aria-roledescription": "slide",
|
|
11299
12049
|
"aria-label": label
|
|
11300
12050
|
}, forwardedProps), children);
|
|
11301
12051
|
});
|
|
11302
|
-
SlideshowItemGroup.displayName = COMPONENT_NAME$
|
|
11303
|
-
SlideshowItemGroup.className = CLASSNAME$
|
|
12052
|
+
SlideshowItemGroup.displayName = COMPONENT_NAME$14;
|
|
12053
|
+
SlideshowItemGroup.className = CLASSNAME$11;
|
|
11304
12054
|
|
|
11305
|
-
const _excluded$
|
|
12055
|
+
const _excluded$1a = ["activeIndex", "autoPlay", "children", "className", "fillHeight", "groupBy", "interval", "onChange", "slideshowControlsProps", "theme", "id", "slidesId", "slideGroupLabel"];
|
|
11306
12056
|
|
|
11307
12057
|
/**
|
|
11308
12058
|
* Defines the props of the component.
|
|
@@ -11338,7 +12088,7 @@ const Slideshow = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11338
12088
|
slidesId,
|
|
11339
12089
|
slideGroupLabel
|
|
11340
12090
|
} = props,
|
|
11341
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12091
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1a);
|
|
11342
12092
|
// Number of slideshow items.
|
|
11343
12093
|
const itemsCount = React.Children.count(children);
|
|
11344
12094
|
const {
|
|
@@ -11420,7 +12170,7 @@ const Slideshow = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11420
12170
|
Slideshow.displayName = 'Slideshow';
|
|
11421
12171
|
Slideshow.defaultProps = DEFAULT_PROPS$P;
|
|
11422
12172
|
|
|
11423
|
-
const _excluded$
|
|
12173
|
+
const _excluded$1b = ["className", "children"];
|
|
11424
12174
|
|
|
11425
12175
|
/**
|
|
11426
12176
|
* Defines the props of the component.
|
|
@@ -11429,12 +12179,12 @@ const _excluded$18 = ["className", "children"];
|
|
|
11429
12179
|
/**
|
|
11430
12180
|
* Component display name.
|
|
11431
12181
|
*/
|
|
11432
|
-
const COMPONENT_NAME$
|
|
12182
|
+
const COMPONENT_NAME$15 = 'SlideshowItem';
|
|
11433
12183
|
|
|
11434
12184
|
/**
|
|
11435
12185
|
* Component default class name and class prefix.
|
|
11436
12186
|
*/
|
|
11437
|
-
const CLASSNAME$
|
|
12187
|
+
const CLASSNAME$12 = getRootClassName(COMPONENT_NAME$15);
|
|
11438
12188
|
|
|
11439
12189
|
/**
|
|
11440
12190
|
* SlideshowItem component.
|
|
@@ -11448,16 +12198,16 @@ const SlideshowItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11448
12198
|
className,
|
|
11449
12199
|
children
|
|
11450
12200
|
} = props,
|
|
11451
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12201
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1b);
|
|
11452
12202
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
11453
12203
|
ref: ref,
|
|
11454
12204
|
className: classnames(className, handleBasicClasses({
|
|
11455
|
-
prefix: CLASSNAME$
|
|
12205
|
+
prefix: CLASSNAME$12
|
|
11456
12206
|
}))
|
|
11457
12207
|
}, forwardedProps), children);
|
|
11458
12208
|
});
|
|
11459
|
-
SlideshowItem.displayName = COMPONENT_NAME$
|
|
11460
|
-
SlideshowItem.className = CLASSNAME$
|
|
12209
|
+
SlideshowItem.displayName = COMPONENT_NAME$15;
|
|
12210
|
+
SlideshowItem.className = CLASSNAME$12;
|
|
11461
12211
|
|
|
11462
12212
|
const isTouchDevice = () => 'ontouchstart' in window;
|
|
11463
12213
|
|
|
@@ -11516,7 +12266,7 @@ function usePaginationVisibleRange(activeIndex, slideCount) {
|
|
|
11516
12266
|
}, [activeIndex, slideCount]);
|
|
11517
12267
|
}
|
|
11518
12268
|
|
|
11519
|
-
const _excluded$
|
|
12269
|
+
const _excluded$1c = ["activeIndex", "className", "nextButtonProps", "onNextClick", "onPaginationClick", "onPreviousClick", "parentRef", "previousButtonProps", "paginationProps", "slidesCount", "theme", "isAutoPlaying", "playButtonProps", "paginationItemLabel", "paginationItemProps"],
|
|
11520
12270
|
_excluded2$2 = ["className", "label"];
|
|
11521
12271
|
|
|
11522
12272
|
/**
|
|
@@ -11526,12 +12276,12 @@ const _excluded$19 = ["activeIndex", "className", "nextButtonProps", "onNextClic
|
|
|
11526
12276
|
/**
|
|
11527
12277
|
* Component display name.
|
|
11528
12278
|
*/
|
|
11529
|
-
const COMPONENT_NAME$
|
|
12279
|
+
const COMPONENT_NAME$16 = 'SlideshowControls';
|
|
11530
12280
|
|
|
11531
12281
|
/**
|
|
11532
12282
|
* Component default class name and class prefix.
|
|
11533
12283
|
*/
|
|
11534
|
-
const CLASSNAME$
|
|
12284
|
+
const CLASSNAME$13 = getRootClassName(COMPONENT_NAME$16);
|
|
11535
12285
|
|
|
11536
12286
|
/**
|
|
11537
12287
|
* Component default props.
|
|
@@ -11566,7 +12316,7 @@ const InternalSlideshowControls = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11566
12316
|
paginationItemLabel,
|
|
11567
12317
|
paginationItemProps
|
|
11568
12318
|
} = props,
|
|
11569
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12319
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1c);
|
|
11570
12320
|
let parent;
|
|
11571
12321
|
if (WINDOW) {
|
|
11572
12322
|
// Checking window object to avoid errors in SSR.
|
|
@@ -11603,22 +12353,22 @@ const InternalSlideshowControls = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11603
12353
|
ref: ref
|
|
11604
12354
|
}, forwardedProps, {
|
|
11605
12355
|
className: classnames(className, handleBasicClasses({
|
|
11606
|
-
prefix: CLASSNAME$
|
|
12356
|
+
prefix: CLASSNAME$13,
|
|
11607
12357
|
theme
|
|
11608
12358
|
}), {
|
|
11609
|
-
[`${CLASSNAME$
|
|
12359
|
+
[`${CLASSNAME$13}--has-infinite-pagination`]: slidesCount > PAGINATION_ITEMS_MAX
|
|
11610
12360
|
})
|
|
11611
12361
|
}), /*#__PURE__*/React.createElement(IconButton, _extends({}, previousButtonProps, {
|
|
11612
12362
|
icon: mdiChevronLeft,
|
|
11613
|
-
className: `${CLASSNAME$
|
|
12363
|
+
className: `${CLASSNAME$13}__navigation`,
|
|
11614
12364
|
color: theme === Theme.dark ? 'light' : 'dark',
|
|
11615
12365
|
emphasis: Emphasis.low,
|
|
11616
12366
|
onClick: onPreviousClick
|
|
11617
12367
|
})), /*#__PURE__*/React.createElement("div", {
|
|
11618
12368
|
ref: paginationRef,
|
|
11619
|
-
className: `${CLASSNAME$
|
|
12369
|
+
className: `${CLASSNAME$13}__pagination`
|
|
11620
12370
|
}, /*#__PURE__*/React.createElement("div", _extends({
|
|
11621
|
-
className: `${CLASSNAME$
|
|
12371
|
+
className: `${CLASSNAME$13}__pagination-items`,
|
|
11622
12372
|
style: wrapperStyle,
|
|
11623
12373
|
role: "tablist"
|
|
11624
12374
|
}, paginationProps), useMemo(() => range(slidesCount).map(index => {
|
|
@@ -11634,7 +12384,7 @@ const InternalSlideshowControls = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11634
12384
|
const ariaLabel = label || (paginationItemLabel === null || paginationItemLabel === void 0 ? void 0 : paginationItemLabel(index)) || `${index + 1} / ${slidesCount}`;
|
|
11635
12385
|
return /*#__PURE__*/React.createElement("button", _extends({
|
|
11636
12386
|
className: classnames(handleBasicClasses({
|
|
11637
|
-
prefix: `${CLASSNAME$
|
|
12387
|
+
prefix: `${CLASSNAME$13}__pagination-item`,
|
|
11638
12388
|
isActive,
|
|
11639
12389
|
isOnEdge,
|
|
11640
12390
|
isOutRange
|
|
@@ -11649,35 +12399,35 @@ const InternalSlideshowControls = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11649
12399
|
}, itemProps));
|
|
11650
12400
|
}), [slidesCount, visibleRange.min, visibleRange.max, activeIndex, paginationItemProps, paginationItemLabel, onPaginationClick]))), playButtonProps ? /*#__PURE__*/React.createElement(IconButton, _extends({}, playButtonProps, {
|
|
11651
12401
|
icon: isAutoPlaying ? mdiPauseCircleOutline : mdiPlayCircleOutline,
|
|
11652
|
-
className: `${CLASSNAME$
|
|
12402
|
+
className: `${CLASSNAME$13}__play`,
|
|
11653
12403
|
color: theme === Theme.dark ? 'light' : 'dark',
|
|
11654
12404
|
emphasis: Emphasis.low
|
|
11655
12405
|
})) : null, /*#__PURE__*/React.createElement(IconButton, _extends({}, nextButtonProps, {
|
|
11656
12406
|
icon: mdiChevronRight,
|
|
11657
|
-
className: `${CLASSNAME$
|
|
12407
|
+
className: `${CLASSNAME$13}__navigation`,
|
|
11658
12408
|
color: theme === Theme.dark ? 'light' : 'dark',
|
|
11659
12409
|
emphasis: Emphasis.low,
|
|
11660
12410
|
onClick: onNextClick
|
|
11661
12411
|
})));
|
|
11662
12412
|
});
|
|
11663
|
-
InternalSlideshowControls.displayName = COMPONENT_NAME$
|
|
11664
|
-
InternalSlideshowControls.className = CLASSNAME$
|
|
12413
|
+
InternalSlideshowControls.displayName = COMPONENT_NAME$16;
|
|
12414
|
+
InternalSlideshowControls.className = CLASSNAME$13;
|
|
11665
12415
|
InternalSlideshowControls.defaultProps = DEFAULT_PROPS$Q;
|
|
11666
12416
|
const SlideshowControls = Object.assign(InternalSlideshowControls, {
|
|
11667
12417
|
useSlideshowControls,
|
|
11668
12418
|
useSlideshowControlsDefaultOptions: DEFAULT_OPTIONS$1
|
|
11669
12419
|
});
|
|
11670
12420
|
|
|
11671
|
-
const _excluded$
|
|
12421
|
+
const _excluded$1d = ["activeIndex", "id", "className", "theme", "fillHeight", "groupBy", "isAutoPlaying", "toggleAutoPlay", "slidesId", "children", "afterSlides", "hasControls", "slideGroupLabel"];
|
|
11672
12422
|
/**
|
|
11673
12423
|
* Component display name.
|
|
11674
12424
|
*/
|
|
11675
|
-
const COMPONENT_NAME$
|
|
12425
|
+
const COMPONENT_NAME$17 = 'Slideshow';
|
|
11676
12426
|
|
|
11677
12427
|
/**
|
|
11678
12428
|
* Component default class name and class prefix.
|
|
11679
12429
|
*/
|
|
11680
|
-
const CLASSNAME$
|
|
12430
|
+
const CLASSNAME$14 = getRootClassName(COMPONENT_NAME$17);
|
|
11681
12431
|
|
|
11682
12432
|
/**
|
|
11683
12433
|
* Slides component.
|
|
@@ -11702,7 +12452,7 @@ const Slides = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11702
12452
|
hasControls,
|
|
11703
12453
|
slideGroupLabel
|
|
11704
12454
|
} = props,
|
|
11705
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12455
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1d);
|
|
11706
12456
|
const wrapperRef = React.useRef(null);
|
|
11707
12457
|
const startIndexVisible = activeIndex;
|
|
11708
12458
|
const endIndexVisible = startIndexVisible + 1;
|
|
@@ -11720,22 +12470,22 @@ const Slides = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11720
12470
|
ref: ref
|
|
11721
12471
|
}, forwardedProps, {
|
|
11722
12472
|
className: classnames(className, handleBasicClasses({
|
|
11723
|
-
prefix: CLASSNAME$
|
|
12473
|
+
prefix: CLASSNAME$14,
|
|
11724
12474
|
theme
|
|
11725
12475
|
}), {
|
|
11726
|
-
[`${CLASSNAME$
|
|
11727
|
-
[`${CLASSNAME$
|
|
12476
|
+
[`${CLASSNAME$14}--fill-height`]: fillHeight,
|
|
12477
|
+
[`${CLASSNAME$14}--group-by-${groupBy}`]: Boolean(groupBy)
|
|
11728
12478
|
}),
|
|
11729
12479
|
"aria-roledescription": "carousel"
|
|
11730
12480
|
}), /*#__PURE__*/React.createElement("div", {
|
|
11731
12481
|
id: slidesId,
|
|
11732
|
-
className: `${CLASSNAME$
|
|
12482
|
+
className: `${CLASSNAME$14}__slides`,
|
|
11733
12483
|
onMouseEnter: toggleAutoPlay,
|
|
11734
12484
|
onMouseLeave: toggleAutoPlay,
|
|
11735
12485
|
"aria-live": isAutoPlaying ? 'off' : 'polite'
|
|
11736
12486
|
}, /*#__PURE__*/React.createElement("div", {
|
|
11737
12487
|
ref: wrapperRef,
|
|
11738
|
-
className: `${CLASSNAME$
|
|
12488
|
+
className: `${CLASSNAME$14}__wrapper`,
|
|
11739
12489
|
style: wrapperStyle
|
|
11740
12490
|
}, groups.map((group, index) => /*#__PURE__*/React.createElement(SlideshowItemGroup, {
|
|
11741
12491
|
key: index,
|
|
@@ -11745,10 +12495,10 @@ const Slides = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11745
12495
|
isDisplayed: index >= startIndexVisible && index < endIndexVisible
|
|
11746
12496
|
}, group)))), afterSlides);
|
|
11747
12497
|
});
|
|
11748
|
-
Slides.displayName = COMPONENT_NAME$
|
|
11749
|
-
Slides.className = CLASSNAME$
|
|
12498
|
+
Slides.displayName = COMPONENT_NAME$17;
|
|
12499
|
+
Slides.className = CLASSNAME$14;
|
|
11750
12500
|
|
|
11751
|
-
const _excluded$
|
|
12501
|
+
const _excluded$1e = ["checked", "children", "className", "disabled", "helper", "id", "isChecked", "isDisabled", "name", "onChange", "position", "theme", "value", "inputProps"];
|
|
11752
12502
|
|
|
11753
12503
|
/**
|
|
11754
12504
|
* Defines the props of the component.
|
|
@@ -11757,12 +12507,12 @@ const _excluded$1b = ["checked", "children", "className", "disabled", "helper",
|
|
|
11757
12507
|
/**
|
|
11758
12508
|
* Component display name.
|
|
11759
12509
|
*/
|
|
11760
|
-
const COMPONENT_NAME$
|
|
12510
|
+
const COMPONENT_NAME$18 = 'Switch';
|
|
11761
12511
|
|
|
11762
12512
|
/**
|
|
11763
12513
|
* Component default class name and class prefix.
|
|
11764
12514
|
*/
|
|
11765
|
-
const CLASSNAME$
|
|
12515
|
+
const CLASSNAME$15 = getRootClassName(COMPONENT_NAME$18);
|
|
11766
12516
|
|
|
11767
12517
|
/**
|
|
11768
12518
|
* Component default props.
|
|
@@ -11796,7 +12546,7 @@ const Switch = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11796
12546
|
value,
|
|
11797
12547
|
inputProps = {}
|
|
11798
12548
|
} = props,
|
|
11799
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12549
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1e);
|
|
11800
12550
|
const inputId = useMemo(() => id || `switch-${uid()}`, [id]);
|
|
11801
12551
|
const handleChange = event => {
|
|
11802
12552
|
if (onChange) {
|
|
@@ -11807,7 +12557,7 @@ const Switch = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11807
12557
|
ref: ref
|
|
11808
12558
|
}, forwardedProps, {
|
|
11809
12559
|
className: classnames(className, handleBasicClasses({
|
|
11810
|
-
prefix: CLASSNAME$
|
|
12560
|
+
prefix: CLASSNAME$15,
|
|
11811
12561
|
isChecked,
|
|
11812
12562
|
isDisabled,
|
|
11813
12563
|
position,
|
|
@@ -11816,12 +12566,12 @@ const Switch = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11816
12566
|
})),
|
|
11817
12567
|
"aria-disabled": isDisabled
|
|
11818
12568
|
}), /*#__PURE__*/React.createElement("div", {
|
|
11819
|
-
className: `${CLASSNAME$
|
|
12569
|
+
className: `${CLASSNAME$15}__input-wrapper`
|
|
11820
12570
|
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
11821
12571
|
type: "checkbox",
|
|
11822
12572
|
role: "switch",
|
|
11823
12573
|
id: inputId,
|
|
11824
|
-
className: `${CLASSNAME$
|
|
12574
|
+
className: `${CLASSNAME$15}__input-native`,
|
|
11825
12575
|
name: name,
|
|
11826
12576
|
value: value,
|
|
11827
12577
|
disabled: isDisabled,
|
|
@@ -11830,28 +12580,28 @@ const Switch = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11830
12580
|
onChange: handleChange,
|
|
11831
12581
|
"aria-describedby": helper ? `${inputId}-helper` : undefined
|
|
11832
12582
|
}, inputProps)), /*#__PURE__*/React.createElement("div", {
|
|
11833
|
-
className: `${CLASSNAME$
|
|
12583
|
+
className: `${CLASSNAME$15}__input-placeholder`
|
|
11834
12584
|
}, /*#__PURE__*/React.createElement("div", {
|
|
11835
|
-
className: `${CLASSNAME$
|
|
12585
|
+
className: `${CLASSNAME$15}__input-background`
|
|
11836
12586
|
}), /*#__PURE__*/React.createElement("div", {
|
|
11837
|
-
className: `${CLASSNAME$
|
|
12587
|
+
className: `${CLASSNAME$15}__input-indicator`
|
|
11838
12588
|
}))), Children.count(children) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
11839
|
-
className: `${CLASSNAME$
|
|
12589
|
+
className: `${CLASSNAME$15}__content`
|
|
11840
12590
|
}, /*#__PURE__*/React.createElement(InputLabel, {
|
|
11841
12591
|
htmlFor: inputId,
|
|
11842
12592
|
theme: theme,
|
|
11843
|
-
className: `${CLASSNAME$
|
|
12593
|
+
className: `${CLASSNAME$15}__label`
|
|
11844
12594
|
}, children), !isEmpty(helper) && /*#__PURE__*/React.createElement(InputHelper, {
|
|
11845
12595
|
id: `${inputId}-helper`,
|
|
11846
12596
|
theme: theme,
|
|
11847
|
-
className: `${CLASSNAME$
|
|
12597
|
+
className: `${CLASSNAME$15}__helper`
|
|
11848
12598
|
}, helper)));
|
|
11849
12599
|
});
|
|
11850
|
-
Switch.displayName = COMPONENT_NAME$
|
|
11851
|
-
Switch.className = CLASSNAME$
|
|
12600
|
+
Switch.displayName = COMPONENT_NAME$18;
|
|
12601
|
+
Switch.className = CLASSNAME$15;
|
|
11852
12602
|
Switch.defaultProps = DEFAULT_PROPS$R;
|
|
11853
12603
|
|
|
11854
|
-
const _excluded$
|
|
12604
|
+
const _excluded$1f = ["children", "className", "hasBefore", "hasDividers", "theme"];
|
|
11855
12605
|
|
|
11856
12606
|
/**
|
|
11857
12607
|
* Defines the props of the component.
|
|
@@ -11860,12 +12610,12 @@ const _excluded$1c = ["children", "className", "hasBefore", "hasDividers", "them
|
|
|
11860
12610
|
/**
|
|
11861
12611
|
* Component display name.
|
|
11862
12612
|
*/
|
|
11863
|
-
const COMPONENT_NAME$
|
|
12613
|
+
const COMPONENT_NAME$19 = 'Table';
|
|
11864
12614
|
|
|
11865
12615
|
/**
|
|
11866
12616
|
* Component default class name and class prefix.
|
|
11867
12617
|
*/
|
|
11868
|
-
const CLASSNAME$
|
|
12618
|
+
const CLASSNAME$16 = getRootClassName(COMPONENT_NAME$19);
|
|
11869
12619
|
|
|
11870
12620
|
/**
|
|
11871
12621
|
* Component default props.
|
|
@@ -11889,23 +12639,23 @@ const Table = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11889
12639
|
hasDividers,
|
|
11890
12640
|
theme
|
|
11891
12641
|
} = props,
|
|
11892
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12642
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1f);
|
|
11893
12643
|
return /*#__PURE__*/React.createElement("table", _extends({
|
|
11894
12644
|
ref: ref
|
|
11895
12645
|
}, forwardedProps, {
|
|
11896
12646
|
className: classnames(className, handleBasicClasses({
|
|
11897
|
-
prefix: CLASSNAME$
|
|
12647
|
+
prefix: CLASSNAME$16,
|
|
11898
12648
|
hasBefore,
|
|
11899
12649
|
hasDividers,
|
|
11900
12650
|
theme
|
|
11901
12651
|
}))
|
|
11902
12652
|
}), children);
|
|
11903
12653
|
});
|
|
11904
|
-
Table.displayName = COMPONENT_NAME$
|
|
11905
|
-
Table.className = CLASSNAME$
|
|
12654
|
+
Table.displayName = COMPONENT_NAME$19;
|
|
12655
|
+
Table.className = CLASSNAME$16;
|
|
11906
12656
|
Table.defaultProps = DEFAULT_PROPS$S;
|
|
11907
12657
|
|
|
11908
|
-
const _excluded$
|
|
12658
|
+
const _excluded$1g = ["children", "className"];
|
|
11909
12659
|
|
|
11910
12660
|
/**
|
|
11911
12661
|
* Defines the props of the component.
|
|
@@ -11914,12 +12664,12 @@ const _excluded$1d = ["children", "className"];
|
|
|
11914
12664
|
/**
|
|
11915
12665
|
* Component display name.
|
|
11916
12666
|
*/
|
|
11917
|
-
const COMPONENT_NAME$
|
|
12667
|
+
const COMPONENT_NAME$1a = 'TableBody';
|
|
11918
12668
|
|
|
11919
12669
|
/**
|
|
11920
12670
|
* Component default class name and class prefix.
|
|
11921
12671
|
*/
|
|
11922
|
-
const CLASSNAME$
|
|
12672
|
+
const CLASSNAME$17 = getRootClassName(COMPONENT_NAME$1a, true);
|
|
11923
12673
|
|
|
11924
12674
|
/**
|
|
11925
12675
|
* TableBody component.
|
|
@@ -11933,19 +12683,19 @@ const TableBody = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11933
12683
|
children,
|
|
11934
12684
|
className
|
|
11935
12685
|
} = props,
|
|
11936
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12686
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1g);
|
|
11937
12687
|
return /*#__PURE__*/React.createElement("tbody", _extends({
|
|
11938
12688
|
ref: ref
|
|
11939
12689
|
}, forwardedProps, {
|
|
11940
12690
|
className: classnames(className, handleBasicClasses({
|
|
11941
|
-
prefix: CLASSNAME$
|
|
12691
|
+
prefix: CLASSNAME$17
|
|
11942
12692
|
}))
|
|
11943
12693
|
}), children);
|
|
11944
12694
|
});
|
|
11945
|
-
TableBody.displayName = COMPONENT_NAME$
|
|
11946
|
-
TableBody.className = CLASSNAME$
|
|
12695
|
+
TableBody.displayName = COMPONENT_NAME$1a;
|
|
12696
|
+
TableBody.className = CLASSNAME$17;
|
|
11947
12697
|
|
|
11948
|
-
const _excluded$
|
|
12698
|
+
const _excluded$1h = ["children", "className", "icon", "isSortable", "onHeaderClick", "sortOrder", "variant"];
|
|
11949
12699
|
|
|
11950
12700
|
/**
|
|
11951
12701
|
* Table head cell sort order.
|
|
@@ -11969,12 +12719,12 @@ const TableCellVariant = {
|
|
|
11969
12719
|
/**
|
|
11970
12720
|
* Component display name.
|
|
11971
12721
|
*/
|
|
11972
|
-
const COMPONENT_NAME$
|
|
12722
|
+
const COMPONENT_NAME$1b = 'TableCell';
|
|
11973
12723
|
|
|
11974
12724
|
/**
|
|
11975
12725
|
* Component default class name and class prefix.
|
|
11976
12726
|
*/
|
|
11977
|
-
const CLASSNAME$
|
|
12727
|
+
const CLASSNAME$18 = getRootClassName(COMPONENT_NAME$1b, true);
|
|
11978
12728
|
|
|
11979
12729
|
/**
|
|
11980
12730
|
* Component default props.
|
|
@@ -12000,7 +12750,7 @@ const TableCell = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12000
12750
|
sortOrder,
|
|
12001
12751
|
variant
|
|
12002
12752
|
} = props,
|
|
12003
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12753
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1h);
|
|
12004
12754
|
|
|
12005
12755
|
// Use button if clickable
|
|
12006
12756
|
const Wrapper = onHeaderClick ? 'button' : 'div';
|
|
@@ -12020,40 +12770,40 @@ const TableCell = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12020
12770
|
ref: ref
|
|
12021
12771
|
}, forwardedProps, {
|
|
12022
12772
|
className: classnames(handleBasicClasses({
|
|
12023
|
-
prefix: CLASSNAME$
|
|
12773
|
+
prefix: CLASSNAME$18,
|
|
12024
12774
|
isSortable,
|
|
12025
12775
|
isSorted: isSortable && !!sortOrder
|
|
12026
|
-
}), className, `${CLASSNAME$
|
|
12776
|
+
}), className, `${CLASSNAME$18}--head`),
|
|
12027
12777
|
"aria-sort": ariaSort
|
|
12028
12778
|
}), /*#__PURE__*/React.createElement(Wrapper, _extends({
|
|
12029
|
-
className: `${CLASSNAME$
|
|
12779
|
+
className: `${CLASSNAME$18}-wrapper`
|
|
12030
12780
|
}, wrapperProps), icon && !isSortable && /*#__PURE__*/React.createElement(Icon, {
|
|
12031
|
-
className: `${CLASSNAME$
|
|
12781
|
+
className: `${CLASSNAME$18}-icon`,
|
|
12032
12782
|
icon: icon,
|
|
12033
12783
|
size: Size.xxs
|
|
12034
12784
|
}), isSortable && sortOrder === ThOrder.asc && /*#__PURE__*/React.createElement(Icon, {
|
|
12035
|
-
className: `${CLASSNAME$
|
|
12785
|
+
className: `${CLASSNAME$18}-icon`,
|
|
12036
12786
|
icon: mdiArrowUp,
|
|
12037
12787
|
size: Size.xxs
|
|
12038
12788
|
}), isSortable && sortOrder === ThOrder.desc && /*#__PURE__*/React.createElement(Icon, {
|
|
12039
|
-
className: `${CLASSNAME$
|
|
12789
|
+
className: `${CLASSNAME$18}-icon`,
|
|
12040
12790
|
icon: mdiArrowDown,
|
|
12041
12791
|
size: Size.xxs
|
|
12042
12792
|
}), /*#__PURE__*/React.createElement("div", {
|
|
12043
|
-
className: `${CLASSNAME$
|
|
12793
|
+
className: `${CLASSNAME$18}-content`
|
|
12044
12794
|
}, children))), variant === TableCellVariant.body && /*#__PURE__*/React.createElement("td", _extends({}, forwardedProps, {
|
|
12045
12795
|
className: classnames(className, handleBasicClasses({
|
|
12046
|
-
prefix: CLASSNAME$
|
|
12047
|
-
}), `${CLASSNAME$
|
|
12796
|
+
prefix: CLASSNAME$18
|
|
12797
|
+
}), `${CLASSNAME$18}--body`)
|
|
12048
12798
|
}), /*#__PURE__*/React.createElement("div", {
|
|
12049
|
-
className: `${CLASSNAME$
|
|
12799
|
+
className: `${CLASSNAME$18}-content`
|
|
12050
12800
|
}, children)));
|
|
12051
12801
|
});
|
|
12052
|
-
TableCell.displayName = COMPONENT_NAME$
|
|
12053
|
-
TableCell.className = CLASSNAME$
|
|
12802
|
+
TableCell.displayName = COMPONENT_NAME$1b;
|
|
12803
|
+
TableCell.className = CLASSNAME$18;
|
|
12054
12804
|
TableCell.defaultProps = DEFAULT_PROPS$T;
|
|
12055
12805
|
|
|
12056
|
-
const _excluded$
|
|
12806
|
+
const _excluded$1i = ["children", "className"];
|
|
12057
12807
|
|
|
12058
12808
|
/**
|
|
12059
12809
|
* Defines the props of the component.
|
|
@@ -12062,12 +12812,12 @@ const _excluded$1f = ["children", "className"];
|
|
|
12062
12812
|
/**
|
|
12063
12813
|
* Component display name.
|
|
12064
12814
|
*/
|
|
12065
|
-
const COMPONENT_NAME$
|
|
12815
|
+
const COMPONENT_NAME$1c = 'TableHeader';
|
|
12066
12816
|
|
|
12067
12817
|
/**
|
|
12068
12818
|
* Component default class name and class prefix.
|
|
12069
12819
|
*/
|
|
12070
|
-
const CLASSNAME$
|
|
12820
|
+
const CLASSNAME$19 = getRootClassName(COMPONENT_NAME$1c, true);
|
|
12071
12821
|
|
|
12072
12822
|
/**
|
|
12073
12823
|
* Component default props.
|
|
@@ -12086,20 +12836,20 @@ const TableHeader = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12086
12836
|
children,
|
|
12087
12837
|
className
|
|
12088
12838
|
} = props,
|
|
12089
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12839
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1i);
|
|
12090
12840
|
return /*#__PURE__*/React.createElement("thead", _extends({
|
|
12091
12841
|
ref: ref
|
|
12092
12842
|
}, forwardedProps, {
|
|
12093
12843
|
className: classnames(className, handleBasicClasses({
|
|
12094
|
-
prefix: CLASSNAME$
|
|
12844
|
+
prefix: CLASSNAME$19
|
|
12095
12845
|
}))
|
|
12096
12846
|
}), children);
|
|
12097
12847
|
});
|
|
12098
|
-
TableHeader.displayName = COMPONENT_NAME$
|
|
12099
|
-
TableHeader.className = CLASSNAME$
|
|
12848
|
+
TableHeader.displayName = COMPONENT_NAME$1c;
|
|
12849
|
+
TableHeader.className = CLASSNAME$19;
|
|
12100
12850
|
TableHeader.defaultProps = DEFAULT_PROPS$U;
|
|
12101
12851
|
|
|
12102
|
-
const _excluded$
|
|
12852
|
+
const _excluded$1j = ["children", "className", "disabled", "isClickable", "isDisabled", "isSelected"];
|
|
12103
12853
|
|
|
12104
12854
|
/**
|
|
12105
12855
|
* Defines the props of the component.
|
|
@@ -12108,12 +12858,12 @@ const _excluded$1g = ["children", "className", "disabled", "isClickable", "isDis
|
|
|
12108
12858
|
/**
|
|
12109
12859
|
* Component display name.
|
|
12110
12860
|
*/
|
|
12111
|
-
const COMPONENT_NAME$
|
|
12861
|
+
const COMPONENT_NAME$1d = 'TableRow';
|
|
12112
12862
|
|
|
12113
12863
|
/**
|
|
12114
12864
|
* Component default class name and class prefix.
|
|
12115
12865
|
*/
|
|
12116
|
-
const CLASSNAME$
|
|
12866
|
+
const CLASSNAME$1a = getRootClassName(COMPONENT_NAME$1d, true);
|
|
12117
12867
|
|
|
12118
12868
|
/**
|
|
12119
12869
|
* Component default props.
|
|
@@ -12136,7 +12886,7 @@ const TableRow = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12136
12886
|
isDisabled = disabled,
|
|
12137
12887
|
isSelected
|
|
12138
12888
|
} = props,
|
|
12139
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12889
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1j);
|
|
12140
12890
|
return /*#__PURE__*/React.createElement("tr", _extends({
|
|
12141
12891
|
ref: ref,
|
|
12142
12892
|
tabIndex: isClickable && !isDisabled ? 0 : -1
|
|
@@ -12145,16 +12895,16 @@ const TableRow = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12145
12895
|
isClickable: isClickable && !isDisabled,
|
|
12146
12896
|
isDisabled,
|
|
12147
12897
|
isSelected: isSelected && !isDisabled,
|
|
12148
|
-
prefix: CLASSNAME$
|
|
12898
|
+
prefix: CLASSNAME$1a
|
|
12149
12899
|
})),
|
|
12150
12900
|
"aria-disabled": isDisabled
|
|
12151
12901
|
}), children);
|
|
12152
12902
|
});
|
|
12153
|
-
TableRow.displayName = COMPONENT_NAME$
|
|
12154
|
-
TableRow.className = CLASSNAME$
|
|
12903
|
+
TableRow.displayName = COMPONENT_NAME$1d;
|
|
12904
|
+
TableRow.className = CLASSNAME$1a;
|
|
12155
12905
|
TableRow.defaultProps = DEFAULT_PROPS$V;
|
|
12156
12906
|
|
|
12157
|
-
const _excluded$
|
|
12907
|
+
const _excluded$1k = ["children", "onChange"];
|
|
12158
12908
|
const DEFAULT_PROPS$W = {
|
|
12159
12909
|
isLazy: INIT_STATE.isLazy,
|
|
12160
12910
|
shouldActivateOnFocus: INIT_STATE.shouldActivateOnFocus
|
|
@@ -12174,7 +12924,7 @@ const TabProvider = props => {
|
|
|
12174
12924
|
children,
|
|
12175
12925
|
onChange
|
|
12176
12926
|
} = props,
|
|
12177
|
-
propState = _objectWithoutProperties(props, _excluded$
|
|
12927
|
+
propState = _objectWithoutProperties(props, _excluded$1k);
|
|
12178
12928
|
const [state, dispatch] = useReducer(reducer, INIT_STATE);
|
|
12179
12929
|
|
|
12180
12930
|
// On prop state change => dispatch update.
|
|
@@ -12202,7 +12952,7 @@ const TabProvider = props => {
|
|
|
12202
12952
|
};
|
|
12203
12953
|
TabProvider.defaultProps = DEFAULT_PROPS$W;
|
|
12204
12954
|
|
|
12205
|
-
const _excluded$
|
|
12955
|
+
const _excluded$1l = ["aria-label", "children", "className", "layout", "position", "theme"];
|
|
12206
12956
|
let TabListLayout = /*#__PURE__*/function (TabListLayout) {
|
|
12207
12957
|
TabListLayout["clustered"] = "clustered";
|
|
12208
12958
|
TabListLayout["fixed"] = "fixed";
|
|
@@ -12216,12 +12966,12 @@ let TabListLayout = /*#__PURE__*/function (TabListLayout) {
|
|
|
12216
12966
|
/**
|
|
12217
12967
|
* Component display name.
|
|
12218
12968
|
*/
|
|
12219
|
-
const COMPONENT_NAME$
|
|
12969
|
+
const COMPONENT_NAME$1e = 'TabList';
|
|
12220
12970
|
|
|
12221
12971
|
/**
|
|
12222
12972
|
* Component default class name and class prefix.
|
|
12223
12973
|
*/
|
|
12224
|
-
const CLASSNAME$
|
|
12974
|
+
const CLASSNAME$1b = `${CSS_PREFIX}-tabs`;
|
|
12225
12975
|
|
|
12226
12976
|
/**
|
|
12227
12977
|
* Component default props.
|
|
@@ -12250,7 +13000,7 @@ const TabList = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12250
13000
|
position,
|
|
12251
13001
|
theme
|
|
12252
13002
|
} = props,
|
|
12253
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
13003
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1l);
|
|
12254
13004
|
const tabListRef = React.useRef(null);
|
|
12255
13005
|
useRovingTabIndex({
|
|
12256
13006
|
parentRef: tabListRef,
|
|
@@ -12262,22 +13012,22 @@ const TabList = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12262
13012
|
ref: mergeRefs(ref, tabListRef)
|
|
12263
13013
|
}, forwardedProps, {
|
|
12264
13014
|
className: classnames(className, handleBasicClasses({
|
|
12265
|
-
prefix: CLASSNAME$
|
|
13015
|
+
prefix: CLASSNAME$1b,
|
|
12266
13016
|
layout,
|
|
12267
13017
|
position,
|
|
12268
13018
|
theme
|
|
12269
13019
|
}))
|
|
12270
13020
|
}), /*#__PURE__*/React.createElement("div", {
|
|
12271
|
-
className: `${CLASSNAME$
|
|
13021
|
+
className: `${CLASSNAME$1b}__links`,
|
|
12272
13022
|
role: "tablist",
|
|
12273
13023
|
"aria-label": ariaLabel
|
|
12274
13024
|
}, children));
|
|
12275
13025
|
});
|
|
12276
|
-
TabList.displayName = COMPONENT_NAME$
|
|
12277
|
-
TabList.className = CLASSNAME$
|
|
13026
|
+
TabList.displayName = COMPONENT_NAME$1e;
|
|
13027
|
+
TabList.className = CLASSNAME$1b;
|
|
12278
13028
|
TabList.defaultProps = DEFAULT_PROPS$X;
|
|
12279
13029
|
|
|
12280
|
-
const _excluded$
|
|
13030
|
+
const _excluded$1m = ["className", "disabled", "icon", "iconProps", "id", "isActive", "isDisabled", "label", "onFocus", "onKeyPress", "tabIndex"];
|
|
12281
13031
|
|
|
12282
13032
|
/**
|
|
12283
13033
|
* Defines the props of the component.
|
|
@@ -12286,12 +13036,12 @@ const _excluded$1j = ["className", "disabled", "icon", "iconProps", "id", "isAct
|
|
|
12286
13036
|
/**
|
|
12287
13037
|
* Component display name.
|
|
12288
13038
|
*/
|
|
12289
|
-
const COMPONENT_NAME$
|
|
13039
|
+
const COMPONENT_NAME$1f = 'Tab';
|
|
12290
13040
|
|
|
12291
13041
|
/**
|
|
12292
13042
|
* Component default class name and class prefix.
|
|
12293
13043
|
*/
|
|
12294
|
-
const CLASSNAME$
|
|
13044
|
+
const CLASSNAME$1c = `${CSS_PREFIX}-tabs__link`;
|
|
12295
13045
|
|
|
12296
13046
|
/**
|
|
12297
13047
|
* Component default props.
|
|
@@ -12321,7 +13071,7 @@ const Tab = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12321
13071
|
onKeyPress,
|
|
12322
13072
|
tabIndex = -1
|
|
12323
13073
|
} = props,
|
|
12324
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
13074
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1m);
|
|
12325
13075
|
const state = useTabProviderContext('tab', id);
|
|
12326
13076
|
const isActive = propIsActive || (state === null || state === void 0 ? void 0 : state.isActive);
|
|
12327
13077
|
const changeToCurrentTab = useCallback(() => {
|
|
@@ -12349,7 +13099,7 @@ const Tab = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12349
13099
|
type: "button",
|
|
12350
13100
|
id: state === null || state === void 0 ? void 0 : state.tabId,
|
|
12351
13101
|
className: classnames(className, handleBasicClasses({
|
|
12352
|
-
prefix: CLASSNAME$
|
|
13102
|
+
prefix: CLASSNAME$1c,
|
|
12353
13103
|
isActive,
|
|
12354
13104
|
isDisabled
|
|
12355
13105
|
})),
|
|
@@ -12366,11 +13116,11 @@ const Tab = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12366
13116
|
size: Size.xs
|
|
12367
13117
|
}, iconProps)), label && /*#__PURE__*/React.createElement("span", null, label));
|
|
12368
13118
|
});
|
|
12369
|
-
Tab.displayName = COMPONENT_NAME$
|
|
12370
|
-
Tab.className = CLASSNAME$
|
|
13119
|
+
Tab.displayName = COMPONENT_NAME$1f;
|
|
13120
|
+
Tab.className = CLASSNAME$1c;
|
|
12371
13121
|
Tab.defaultProps = DEFAULT_PROPS$Y;
|
|
12372
13122
|
|
|
12373
|
-
const _excluded$
|
|
13123
|
+
const _excluded$1n = ["children", "id", "className", "isActive"];
|
|
12374
13124
|
|
|
12375
13125
|
/**
|
|
12376
13126
|
* Defines the props of the component.
|
|
@@ -12379,12 +13129,12 @@ const _excluded$1k = ["children", "id", "className", "isActive"];
|
|
|
12379
13129
|
/**
|
|
12380
13130
|
* Component display name.
|
|
12381
13131
|
*/
|
|
12382
|
-
const COMPONENT_NAME$
|
|
13132
|
+
const COMPONENT_NAME$1g = 'TabPanel';
|
|
12383
13133
|
|
|
12384
13134
|
/**
|
|
12385
13135
|
* Component default class name and class prefix.
|
|
12386
13136
|
*/
|
|
12387
|
-
const CLASSNAME$
|
|
13137
|
+
const CLASSNAME$1d = `${CSS_PREFIX}-tab-panel`;
|
|
12388
13138
|
|
|
12389
13139
|
/**
|
|
12390
13140
|
* Component default props.
|
|
@@ -12407,7 +13157,7 @@ const TabPanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12407
13157
|
className,
|
|
12408
13158
|
isActive: propIsActive
|
|
12409
13159
|
} = props,
|
|
12410
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
13160
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1n);
|
|
12411
13161
|
const state = useTabProviderContext('tabPanel', id);
|
|
12412
13162
|
const isActive = propIsActive || (state === null || state === void 0 ? void 0 : state.isActive);
|
|
12413
13163
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
@@ -12415,7 +13165,7 @@ const TabPanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12415
13165
|
}, forwardedProps, {
|
|
12416
13166
|
id: state === null || state === void 0 ? void 0 : state.tabPanelId,
|
|
12417
13167
|
className: classnames(className, handleBasicClasses({
|
|
12418
|
-
prefix: CLASSNAME$
|
|
13168
|
+
prefix: CLASSNAME$1d,
|
|
12419
13169
|
isActive
|
|
12420
13170
|
})),
|
|
12421
13171
|
role: "tabpanel",
|
|
@@ -12423,11 +13173,11 @@ const TabPanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12423
13173
|
"aria-labelledby": state === null || state === void 0 ? void 0 : state.tabId
|
|
12424
13174
|
}), (!(state !== null && state !== void 0 && state.isLazy) || isActive) && children);
|
|
12425
13175
|
});
|
|
12426
|
-
TabPanel.displayName = COMPONENT_NAME$
|
|
12427
|
-
TabPanel.className = CLASSNAME$
|
|
13176
|
+
TabPanel.displayName = COMPONENT_NAME$1g;
|
|
13177
|
+
TabPanel.className = CLASSNAME$1d;
|
|
12428
13178
|
TabPanel.defaultProps = DEFAULT_PROPS$Z;
|
|
12429
13179
|
|
|
12430
|
-
const _excluded$
|
|
13180
|
+
const _excluded$1o = ["id", "isDisabled", "isRequired", "placeholder", "multiline", "value", "setFocus", "onChange", "onFocus", "onBlur", "inputRef", "rows", "recomputeNumberOfRows", "type", "name", "hasError", "describedById"],
|
|
12431
13181
|
_excluded2$3 = ["chips", "className", "clearButtonProps", "disabled", "error", "forceFocusStyle", "hasError", "helper", "icon", "id", "inputRef", "isDisabled", "isRequired", "isValid", "label", "labelProps", "maxLength", "minimumRows", "multiline", "name", "onBlur", "onChange", "onClear", "onFocus", "placeholder", "textFieldRef", "theme", "type", "value", "afterElement"];
|
|
12432
13182
|
|
|
12433
13183
|
/**
|
|
@@ -12437,12 +13187,12 @@ const _excluded$1l = ["id", "isDisabled", "isRequired", "placeholder", "multilin
|
|
|
12437
13187
|
/**
|
|
12438
13188
|
* Component display name.
|
|
12439
13189
|
*/
|
|
12440
|
-
const COMPONENT_NAME$
|
|
13190
|
+
const COMPONENT_NAME$1h = 'TextField';
|
|
12441
13191
|
|
|
12442
13192
|
/**
|
|
12443
13193
|
* Component default class name and class prefix.
|
|
12444
13194
|
*/
|
|
12445
|
-
const CLASSNAME$
|
|
13195
|
+
const CLASSNAME$1e = getRootClassName(COMPONENT_NAME$1h);
|
|
12446
13196
|
|
|
12447
13197
|
/**
|
|
12448
13198
|
* Default minimum number of rows in the multiline mode.
|
|
@@ -12512,7 +13262,7 @@ const renderInputNative = props => {
|
|
|
12512
13262
|
hasError,
|
|
12513
13263
|
describedById
|
|
12514
13264
|
} = props,
|
|
12515
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
13265
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1o);
|
|
12516
13266
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
12517
13267
|
const ref = useRef(null);
|
|
12518
13268
|
|
|
@@ -12537,7 +13287,7 @@ const renderInputNative = props => {
|
|
|
12537
13287
|
const Component = multiline ? 'textarea' : 'input';
|
|
12538
13288
|
const inputProps = _objectSpread2(_objectSpread2({}, forwardedProps), {}, {
|
|
12539
13289
|
id,
|
|
12540
|
-
className: multiline ? `${CLASSNAME$
|
|
13290
|
+
className: multiline ? `${CLASSNAME$1e}__input-native ${CLASSNAME$1e}__input-native--textarea` : `${CLASSNAME$1e}__input-native ${CLASSNAME$1e}__input-native--text`,
|
|
12541
13291
|
placeholder,
|
|
12542
13292
|
value,
|
|
12543
13293
|
name,
|
|
@@ -12658,31 +13408,31 @@ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12658
13408
|
isDisabled,
|
|
12659
13409
|
isFocus: isFocus || forceFocusStyle,
|
|
12660
13410
|
isValid,
|
|
12661
|
-
prefix: CLASSNAME$
|
|
13411
|
+
prefix: CLASSNAME$1e,
|
|
12662
13412
|
theme
|
|
12663
13413
|
}))
|
|
12664
13414
|
}, (label || maxLength) && /*#__PURE__*/React.createElement("div", {
|
|
12665
|
-
className: `${CLASSNAME$
|
|
13415
|
+
className: `${CLASSNAME$1e}__header`
|
|
12666
13416
|
}, label && /*#__PURE__*/React.createElement(InputLabel, _extends({}, labelProps, {
|
|
12667
13417
|
htmlFor: textFieldId,
|
|
12668
|
-
className: `${CLASSNAME$
|
|
13418
|
+
className: `${CLASSNAME$1e}__label`,
|
|
12669
13419
|
isRequired: isRequired,
|
|
12670
13420
|
theme: theme
|
|
12671
13421
|
}), label), maxLength && /*#__PURE__*/React.createElement("div", {
|
|
12672
|
-
className: `${CLASSNAME$
|
|
13422
|
+
className: `${CLASSNAME$1e}__char-counter`
|
|
12673
13423
|
}, /*#__PURE__*/React.createElement("span", null, maxLength - valueLength), maxLength - valueLength === 0 && /*#__PURE__*/React.createElement(Icon, {
|
|
12674
13424
|
icon: mdiAlertCircle,
|
|
12675
13425
|
size: Size.xxs
|
|
12676
13426
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
12677
|
-
className: `${CLASSNAME$
|
|
13427
|
+
className: `${CLASSNAME$1e}__wrapper`,
|
|
12678
13428
|
ref: textFieldRef
|
|
12679
13429
|
}, icon && /*#__PURE__*/React.createElement(Icon, {
|
|
12680
|
-
className: `${CLASSNAME$
|
|
13430
|
+
className: `${CLASSNAME$1e}__input-icon`,
|
|
12681
13431
|
color: theme === Theme.dark ? 'light' : undefined,
|
|
12682
13432
|
icon: icon,
|
|
12683
13433
|
size: Size.xs
|
|
12684
13434
|
}), chips && /*#__PURE__*/React.createElement("div", {
|
|
12685
|
-
className: `${CLASSNAME$
|
|
13435
|
+
className: `${CLASSNAME$1e}__chips`
|
|
12686
13436
|
}, chips, renderInputNative(_objectSpread2({
|
|
12687
13437
|
id: textFieldId,
|
|
12688
13438
|
inputRef,
|
|
@@ -12703,7 +13453,7 @@ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12703
13453
|
hasError,
|
|
12704
13454
|
describedById
|
|
12705
13455
|
}, forwardedProps))), !chips && /*#__PURE__*/React.createElement("div", {
|
|
12706
|
-
className: `${CLASSNAME$
|
|
13456
|
+
className: `${CLASSNAME$1e}__input-wrapper`
|
|
12707
13457
|
}, renderInputNative(_objectSpread2({
|
|
12708
13458
|
id: textFieldId,
|
|
12709
13459
|
inputRef,
|
|
@@ -12724,12 +13474,12 @@ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12724
13474
|
hasError,
|
|
12725
13475
|
describedById
|
|
12726
13476
|
}, forwardedProps))), (isValid || hasError) && /*#__PURE__*/React.createElement(Icon, {
|
|
12727
|
-
className: `${CLASSNAME$
|
|
13477
|
+
className: `${CLASSNAME$1e}__input-validity`,
|
|
12728
13478
|
color: theme === Theme.dark ? 'light' : undefined,
|
|
12729
13479
|
icon: isValid ? mdiCheckCircle : mdiAlertCircle,
|
|
12730
13480
|
size: Size.xxs
|
|
12731
13481
|
}), clearButtonProps && isNotEmpty && /*#__PURE__*/React.createElement(IconButton, _extends({}, clearButtonProps, {
|
|
12732
|
-
className: `${CLASSNAME$
|
|
13482
|
+
className: `${CLASSNAME$1e}__input-clear`,
|
|
12733
13483
|
icon: mdiCloseCircle,
|
|
12734
13484
|
emphasis: Emphasis.low,
|
|
12735
13485
|
size: Size.s,
|
|
@@ -12737,20 +13487,20 @@ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12737
13487
|
onClick: handleClear,
|
|
12738
13488
|
type: "button"
|
|
12739
13489
|
})), afterElement && /*#__PURE__*/React.createElement("div", {
|
|
12740
|
-
className: `${CLASSNAME$
|
|
13490
|
+
className: `${CLASSNAME$1e}__after-element`
|
|
12741
13491
|
}, afterElement)), hasError && error && /*#__PURE__*/React.createElement(InputHelper, {
|
|
12742
|
-
className: `${CLASSNAME$
|
|
13492
|
+
className: `${CLASSNAME$1e}__helper`,
|
|
12743
13493
|
kind: Kind.error,
|
|
12744
13494
|
theme: theme,
|
|
12745
13495
|
id: errorId
|
|
12746
13496
|
}, error), helper && /*#__PURE__*/React.createElement(InputHelper, {
|
|
12747
|
-
className: `${CLASSNAME$
|
|
13497
|
+
className: `${CLASSNAME$1e}__helper`,
|
|
12748
13498
|
theme: theme,
|
|
12749
13499
|
id: helperId
|
|
12750
13500
|
}, helper));
|
|
12751
13501
|
});
|
|
12752
|
-
TextField.displayName = COMPONENT_NAME$
|
|
12753
|
-
TextField.className = CLASSNAME$
|
|
13502
|
+
TextField.displayName = COMPONENT_NAME$1h;
|
|
13503
|
+
TextField.className = CLASSNAME$1e;
|
|
12754
13504
|
TextField.defaultProps = DEFAULT_PROPS$_;
|
|
12755
13505
|
|
|
12756
13506
|
function getState(img, event) {
|
|
@@ -12803,6 +13553,7 @@ function shiftPosition(_ref) {
|
|
|
12803
13553
|
const shift = startFocus / (scaledSize - containerSize);
|
|
12804
13554
|
return Math.floor(Math.max(Math.min(shift, 1), 0) * 100);
|
|
12805
13555
|
}
|
|
13556
|
+
|
|
12806
13557
|
// Compute CSS properties to apply the focus point.
|
|
12807
13558
|
const useFocusPointStyle = (_ref2, element, isLoaded) => {
|
|
12808
13559
|
let {
|
|
@@ -12895,7 +13646,7 @@ const useFocusPointStyle = (_ref2, element, isLoaded) => {
|
|
|
12895
13646
|
return style;
|
|
12896
13647
|
};
|
|
12897
13648
|
|
|
12898
|
-
const _excluded$
|
|
13649
|
+
const _excluded$1p = ["align", "alt", "aspectRatio", "badge", "className", "crossOrigin", "fallback", "fillHeight", "focusPoint", "image", "imgProps", "imgRef", "isLoading", "objectFit", "loading", "loadingPlaceholderImageRef", "size", "theme", "variant", "linkProps", "linkAs"];
|
|
12899
13650
|
|
|
12900
13651
|
/**
|
|
12901
13652
|
* Defines the props of the component.
|
|
@@ -12904,12 +13655,12 @@ const _excluded$1m = ["align", "alt", "aspectRatio", "badge", "className", "cros
|
|
|
12904
13655
|
/**
|
|
12905
13656
|
* Component display name.
|
|
12906
13657
|
*/
|
|
12907
|
-
const COMPONENT_NAME$
|
|
13658
|
+
const COMPONENT_NAME$1i = 'Thumbnail';
|
|
12908
13659
|
|
|
12909
13660
|
/**
|
|
12910
13661
|
* Component default class name and class prefix.
|
|
12911
13662
|
*/
|
|
12912
|
-
const CLASSNAME$
|
|
13663
|
+
const CLASSNAME$1f = getRootClassName(COMPONENT_NAME$1i);
|
|
12913
13664
|
|
|
12914
13665
|
/**
|
|
12915
13666
|
* Component default props.
|
|
@@ -12954,7 +13705,7 @@ const Thumbnail = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12954
13705
|
linkProps,
|
|
12955
13706
|
linkAs
|
|
12956
13707
|
} = props,
|
|
12957
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
13708
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1p);
|
|
12958
13709
|
const [imgElement, setImgElement] = useState();
|
|
12959
13710
|
|
|
12960
13711
|
// Image loading state.
|
|
@@ -13001,7 +13752,7 @@ const Thumbnail = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13001
13752
|
className: classnames(linkProps === null || linkProps === void 0 ? void 0 : linkProps.className, className, handleBasicClasses({
|
|
13002
13753
|
align,
|
|
13003
13754
|
aspectRatio,
|
|
13004
|
-
prefix: CLASSNAME$
|
|
13755
|
+
prefix: CLASSNAME$1f,
|
|
13005
13756
|
size,
|
|
13006
13757
|
theme,
|
|
13007
13758
|
variant,
|
|
@@ -13012,9 +13763,9 @@ const Thumbnail = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13012
13763
|
isLoading,
|
|
13013
13764
|
objectFit,
|
|
13014
13765
|
hasBadge: !!badge
|
|
13015
|
-
}), fillHeight && `${CLASSNAME$
|
|
13766
|
+
}), fillHeight && `${CLASSNAME$1f}--fill-height`)
|
|
13016
13767
|
}), /*#__PURE__*/React.createElement("span", {
|
|
13017
|
-
className: `${CLASSNAME$
|
|
13768
|
+
className: `${CLASSNAME$1f}__background`
|
|
13018
13769
|
}, /*#__PURE__*/React.createElement("img", _extends({
|
|
13019
13770
|
// Use placeholder image size
|
|
13020
13771
|
width: loadingPlaceholderImage === null || loadingPlaceholderImage === void 0 ? void 0 : loadingPlaceholderImage.naturalWidth,
|
|
@@ -13026,7 +13777,7 @@ const Thumbnail = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13026
13777
|
}, imgProps === null || imgProps === void 0 ? void 0 : imgProps.style), imageErrorStyle), focusPointStyle), loadingStyle),
|
|
13027
13778
|
ref: useMergeRefs(setImgElement, propImgRef),
|
|
13028
13779
|
className: classnames(handleBasicClasses({
|
|
13029
|
-
prefix: `${CLASSNAME$
|
|
13780
|
+
prefix: `${CLASSNAME$1f}__image`,
|
|
13030
13781
|
isLoading,
|
|
13031
13782
|
hasDefinedSize: Boolean((imgProps === null || imgProps === void 0 ? void 0 : imgProps.height) && imgProps.width)
|
|
13032
13783
|
}), imgProps === null || imgProps === void 0 ? void 0 : imgProps.className),
|
|
@@ -13035,17 +13786,17 @@ const Thumbnail = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13035
13786
|
alt: alt,
|
|
13036
13787
|
loading: loading
|
|
13037
13788
|
})), !isLoading && hasError && /*#__PURE__*/React.createElement("span", {
|
|
13038
|
-
className: `${CLASSNAME$
|
|
13789
|
+
className: `${CLASSNAME$1f}__fallback`
|
|
13039
13790
|
}, hasIconErrorFallback ? /*#__PURE__*/React.createElement(Icon, {
|
|
13040
13791
|
icon: fallback,
|
|
13041
13792
|
size: Size.xxs,
|
|
13042
13793
|
theme: theme
|
|
13043
13794
|
}) : fallback)), badge && /*#__PURE__*/React.cloneElement(badge, {
|
|
13044
|
-
className: classnames(`${CLASSNAME$
|
|
13795
|
+
className: classnames(`${CLASSNAME$1f}__badge`, badge.props.className)
|
|
13045
13796
|
}));
|
|
13046
13797
|
});
|
|
13047
|
-
Thumbnail.displayName = COMPONENT_NAME$
|
|
13048
|
-
Thumbnail.className = CLASSNAME$
|
|
13798
|
+
Thumbnail.displayName = COMPONENT_NAME$1i;
|
|
13799
|
+
Thumbnail.className = CLASSNAME$1f;
|
|
13049
13800
|
Thumbnail.defaultProps = DEFAULT_PROPS$$;
|
|
13050
13801
|
|
|
13051
13802
|
/**
|
|
@@ -13083,7 +13834,7 @@ const ThumbnailObjectFit = {
|
|
|
13083
13834
|
contain: 'contain'
|
|
13084
13835
|
};
|
|
13085
13836
|
|
|
13086
|
-
const _excluded$
|
|
13837
|
+
const _excluded$1q = ["after", "before", "className", "label"];
|
|
13087
13838
|
|
|
13088
13839
|
/**
|
|
13089
13840
|
* Defines the props of the component.
|
|
@@ -13092,12 +13843,12 @@ const _excluded$1n = ["after", "before", "className", "label"];
|
|
|
13092
13843
|
/**
|
|
13093
13844
|
* Component display name.
|
|
13094
13845
|
*/
|
|
13095
|
-
const COMPONENT_NAME$
|
|
13846
|
+
const COMPONENT_NAME$1j = 'Toolbar';
|
|
13096
13847
|
|
|
13097
13848
|
/**
|
|
13098
13849
|
* Component default class name and class prefix.
|
|
13099
13850
|
*/
|
|
13100
|
-
const CLASSNAME$
|
|
13851
|
+
const CLASSNAME$1g = getRootClassName(COMPONENT_NAME$1j);
|
|
13101
13852
|
|
|
13102
13853
|
/**
|
|
13103
13854
|
* Component default props.
|
|
@@ -13118,7 +13869,7 @@ const Toolbar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13118
13869
|
className,
|
|
13119
13870
|
label
|
|
13120
13871
|
} = props,
|
|
13121
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
13872
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1q);
|
|
13122
13873
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
13123
13874
|
ref: ref
|
|
13124
13875
|
}, forwardedProps, {
|
|
@@ -13126,18 +13877,18 @@ const Toolbar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13126
13877
|
hasAfter: Boolean(after),
|
|
13127
13878
|
hasBefore: Boolean(before),
|
|
13128
13879
|
hasLabel: Boolean(label),
|
|
13129
|
-
prefix: CLASSNAME$
|
|
13880
|
+
prefix: CLASSNAME$1g
|
|
13130
13881
|
}))
|
|
13131
13882
|
}), before && /*#__PURE__*/React.createElement("div", {
|
|
13132
|
-
className: `${CLASSNAME$
|
|
13883
|
+
className: `${CLASSNAME$1g}__before`
|
|
13133
13884
|
}, before), label && /*#__PURE__*/React.createElement("div", {
|
|
13134
|
-
className: `${CLASSNAME$
|
|
13885
|
+
className: `${CLASSNAME$1g}__label`
|
|
13135
13886
|
}, label), after && /*#__PURE__*/React.createElement("div", {
|
|
13136
|
-
className: `${CLASSNAME$
|
|
13887
|
+
className: `${CLASSNAME$1g}__after`
|
|
13137
13888
|
}, after));
|
|
13138
13889
|
});
|
|
13139
|
-
Toolbar.displayName = COMPONENT_NAME$
|
|
13140
|
-
Toolbar.className = CLASSNAME$
|
|
13890
|
+
Toolbar.displayName = COMPONENT_NAME$1j;
|
|
13891
|
+
Toolbar.className = CLASSNAME$1g;
|
|
13141
13892
|
Toolbar.defaultProps = DEFAULT_PROPS$10;
|
|
13142
13893
|
|
|
13143
13894
|
/**
|
|
@@ -13315,7 +14066,7 @@ function useTooltipOpen(delay, anchorElement) {
|
|
|
13315
14066
|
};
|
|
13316
14067
|
}
|
|
13317
14068
|
|
|
13318
|
-
const _excluded$
|
|
14069
|
+
const _excluded$1r = ["label", "children", "className", "delay", "placement", "forceOpen"];
|
|
13319
14070
|
|
|
13320
14071
|
/** Position of the tooltip relative to the anchor element. */
|
|
13321
14072
|
|
|
@@ -13326,12 +14077,12 @@ const _excluded$1o = ["label", "children", "className", "delay", "placement", "f
|
|
|
13326
14077
|
/**
|
|
13327
14078
|
* Component display name.
|
|
13328
14079
|
*/
|
|
13329
|
-
const COMPONENT_NAME$
|
|
14080
|
+
const COMPONENT_NAME$1k = 'Tooltip';
|
|
13330
14081
|
|
|
13331
14082
|
/**
|
|
13332
14083
|
* Component default class name and class prefix.
|
|
13333
14084
|
*/
|
|
13334
|
-
const CLASSNAME$
|
|
14085
|
+
const CLASSNAME$1h = getRootClassName(COMPONENT_NAME$1k);
|
|
13335
14086
|
|
|
13336
14087
|
/**
|
|
13337
14088
|
* Component default props.
|
|
@@ -13362,7 +14113,7 @@ const Tooltip = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13362
14113
|
placement,
|
|
13363
14114
|
forceOpen
|
|
13364
14115
|
} = props,
|
|
13365
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
14116
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1r);
|
|
13366
14117
|
// Disable in SSR or without a label.
|
|
13367
14118
|
if (!DOCUMENT || !label) {
|
|
13368
14119
|
return /*#__PURE__*/React.createElement(TooltipContextProvider, null, children);
|
|
@@ -13396,23 +14147,23 @@ const Tooltip = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13396
14147
|
role: "tooltip",
|
|
13397
14148
|
"aria-label": label,
|
|
13398
14149
|
className: classnames(className, handleBasicClasses({
|
|
13399
|
-
prefix: CLASSNAME$
|
|
14150
|
+
prefix: CLASSNAME$1h,
|
|
13400
14151
|
position
|
|
13401
14152
|
})),
|
|
13402
14153
|
style: styles.popper
|
|
13403
14154
|
}, attributes.popper), /*#__PURE__*/React.createElement("div", {
|
|
13404
|
-
className: `${CLASSNAME$
|
|
14155
|
+
className: `${CLASSNAME$1h}__arrow`
|
|
13405
14156
|
}), /*#__PURE__*/React.createElement("div", {
|
|
13406
|
-
className: `${CLASSNAME$
|
|
14157
|
+
className: `${CLASSNAME$1h}__inner`
|
|
13407
14158
|
}, label.indexOf('\n') !== -1 ? label.split('\n').map(sentence => /*#__PURE__*/React.createElement("p", {
|
|
13408
14159
|
key: sentence
|
|
13409
14160
|
}, sentence)) : label)), document.body));
|
|
13410
14161
|
});
|
|
13411
|
-
Tooltip.displayName = COMPONENT_NAME$
|
|
13412
|
-
Tooltip.className = CLASSNAME$
|
|
14162
|
+
Tooltip.displayName = COMPONENT_NAME$1k;
|
|
14163
|
+
Tooltip.className = CLASSNAME$1h;
|
|
13413
14164
|
Tooltip.defaultProps = DEFAULT_PROPS$11;
|
|
13414
14165
|
|
|
13415
|
-
const _excluded$
|
|
14166
|
+
const _excluded$1s = ["aspectRatio", "className", "label", "icon", "size", "theme", "variant", "fileInputProps"];
|
|
13416
14167
|
|
|
13417
14168
|
/**
|
|
13418
14169
|
* Uploader variants.
|
|
@@ -13438,12 +14189,12 @@ const UploaderVariant = {
|
|
|
13438
14189
|
/**
|
|
13439
14190
|
* Component display name.
|
|
13440
14191
|
*/
|
|
13441
|
-
const COMPONENT_NAME$
|
|
14192
|
+
const COMPONENT_NAME$1l = 'Uploader';
|
|
13442
14193
|
|
|
13443
14194
|
/**
|
|
13444
14195
|
* Component default class name and class prefix.
|
|
13445
14196
|
*/
|
|
13446
|
-
const CLASSNAME$
|
|
14197
|
+
const CLASSNAME$1i = getRootClassName(COMPONENT_NAME$1l);
|
|
13447
14198
|
|
|
13448
14199
|
/**
|
|
13449
14200
|
* Component default props.
|
|
@@ -13473,7 +14224,7 @@ const Uploader = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13473
14224
|
variant,
|
|
13474
14225
|
fileInputProps
|
|
13475
14226
|
} = props,
|
|
13476
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
14227
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1s);
|
|
13477
14228
|
// Adjust to square aspect ratio when using circle variants.
|
|
13478
14229
|
const adjustedAspectRatio = variant === UploaderVariant.circle ? AspectRatio.square : aspectRatio;
|
|
13479
14230
|
const inputId = React.useMemo(() => (fileInputProps === null || fileInputProps === void 0 ? void 0 : fileInputProps.id) || uniqueId('uploader-input-'), [fileInputProps === null || fileInputProps === void 0 ? void 0 : fileInputProps.id]);
|
|
@@ -13502,26 +14253,26 @@ const Uploader = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13502
14253
|
}, wrapper.props, forwardedProps, {
|
|
13503
14254
|
className: classnames(className, handleBasicClasses({
|
|
13504
14255
|
aspectRatio: adjustedAspectRatio,
|
|
13505
|
-
prefix: CLASSNAME$
|
|
14256
|
+
prefix: CLASSNAME$1i,
|
|
13506
14257
|
size,
|
|
13507
14258
|
theme,
|
|
13508
14259
|
variant,
|
|
13509
14260
|
isDragHovering
|
|
13510
14261
|
}))
|
|
13511
14262
|
}), /*#__PURE__*/React.createElement("span", {
|
|
13512
|
-
className: `${CLASSNAME$
|
|
14263
|
+
className: `${CLASSNAME$1i}__background`
|
|
13513
14264
|
}), /*#__PURE__*/React.createElement("span", {
|
|
13514
|
-
className: `${CLASSNAME$
|
|
14265
|
+
className: `${CLASSNAME$1i}__wrapper`
|
|
13515
14266
|
}, icon && /*#__PURE__*/React.createElement(Icon, {
|
|
13516
|
-
className: `${CLASSNAME$
|
|
14267
|
+
className: `${CLASSNAME$1i}__icon`,
|
|
13517
14268
|
icon: icon,
|
|
13518
14269
|
size: Size.s
|
|
13519
14270
|
}), label && /*#__PURE__*/React.createElement("span", {
|
|
13520
|
-
className: `${CLASSNAME$
|
|
14271
|
+
className: `${CLASSNAME$1i}__label`
|
|
13521
14272
|
}, label)), fileInputProps && /*#__PURE__*/React.createElement("input", _extends({
|
|
13522
14273
|
type: "file",
|
|
13523
14274
|
id: inputId,
|
|
13524
|
-
className: `${CLASSNAME$
|
|
14275
|
+
className: `${CLASSNAME$1i}__input`
|
|
13525
14276
|
}, fileInputProps, {
|
|
13526
14277
|
onChange: onChange,
|
|
13527
14278
|
onDragEnter: setDragHovering,
|
|
@@ -13529,11 +14280,11 @@ const Uploader = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13529
14280
|
onDrop: unsetDragHovering
|
|
13530
14281
|
})));
|
|
13531
14282
|
});
|
|
13532
|
-
Uploader.displayName = COMPONENT_NAME$
|
|
13533
|
-
Uploader.className = CLASSNAME$
|
|
14283
|
+
Uploader.displayName = COMPONENT_NAME$1l;
|
|
14284
|
+
Uploader.className = CLASSNAME$1i;
|
|
13534
14285
|
Uploader.defaultProps = DEFAULT_PROPS$12;
|
|
13535
14286
|
|
|
13536
|
-
const _excluded$
|
|
14287
|
+
const _excluded$1t = ["avatarProps", "className", "fields", "linkProps", "linkAs", "multipleActions", "name", "nameProps", "onClick", "onMouseEnter", "onMouseLeave", "orientation", "simpleAction", "size", "theme"];
|
|
13537
14288
|
|
|
13538
14289
|
/**
|
|
13539
14290
|
* User block sizes.
|
|
@@ -13546,12 +14297,12 @@ const _excluded$1q = ["avatarProps", "className", "fields", "linkProps", "linkAs
|
|
|
13546
14297
|
/**
|
|
13547
14298
|
* Component display name.
|
|
13548
14299
|
*/
|
|
13549
|
-
const COMPONENT_NAME$
|
|
14300
|
+
const COMPONENT_NAME$1m = 'UserBlock';
|
|
13550
14301
|
|
|
13551
14302
|
/**
|
|
13552
14303
|
* Component default class name and class prefix.
|
|
13553
14304
|
*/
|
|
13554
|
-
const CLASSNAME$
|
|
14305
|
+
const CLASSNAME$1j = getRootClassName(COMPONENT_NAME$1m);
|
|
13555
14306
|
|
|
13556
14307
|
/**
|
|
13557
14308
|
* Component default props.
|
|
@@ -13587,7 +14338,7 @@ const UserBlock = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13587
14338
|
size,
|
|
13588
14339
|
theme
|
|
13589
14340
|
} = props,
|
|
13590
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
14341
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1t);
|
|
13591
14342
|
let componentSize = size;
|
|
13592
14343
|
|
|
13593
14344
|
// Special case - When using vertical orientation force the size to be Sizes.l.
|
|
@@ -13603,7 +14354,7 @@ const UserBlock = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13603
14354
|
}
|
|
13604
14355
|
let NameComponent = 'span';
|
|
13605
14356
|
const nProps = _objectSpread2(_objectSpread2({}, nameProps), {}, {
|
|
13606
|
-
className: classnames(`${CLASSNAME$
|
|
14357
|
+
className: classnames(`${CLASSNAME$1j}__name`, linkProps === null || linkProps === void 0 ? void 0 : linkProps.className, nameProps === null || nameProps === void 0 ? void 0 : nameProps.className)
|
|
13607
14358
|
});
|
|
13608
14359
|
if (isClickable) {
|
|
13609
14360
|
NameComponent = Link;
|
|
@@ -13620,16 +14371,16 @@ const UserBlock = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13620
14371
|
return /*#__PURE__*/React.createElement(NameComponent, nProps, name);
|
|
13621
14372
|
}, [avatarProps, isClickable, linkAs, linkProps, name, nameProps, onClick]);
|
|
13622
14373
|
const fieldsBlock = fields && componentSize !== Size.s && /*#__PURE__*/React.createElement("div", {
|
|
13623
|
-
className: `${CLASSNAME$
|
|
14374
|
+
className: `${CLASSNAME$1j}__fields`
|
|
13624
14375
|
}, fields.map((field, idx) => /*#__PURE__*/React.createElement("span", {
|
|
13625
14376
|
key: idx,
|
|
13626
|
-
className: `${CLASSNAME$
|
|
14377
|
+
className: `${CLASSNAME$1j}__field`
|
|
13627
14378
|
}, field)));
|
|
13628
14379
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
13629
14380
|
ref: ref
|
|
13630
14381
|
}, forwardedProps, {
|
|
13631
14382
|
className: classnames(className, handleBasicClasses({
|
|
13632
|
-
prefix: CLASSNAME$
|
|
14383
|
+
prefix: CLASSNAME$1j,
|
|
13633
14384
|
orientation,
|
|
13634
14385
|
size: componentSize,
|
|
13635
14386
|
theme,
|
|
@@ -13642,21 +14393,21 @@ const UserBlock = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13642
14393
|
linkProps: linkProps,
|
|
13643
14394
|
alt: ""
|
|
13644
14395
|
}, avatarProps, {
|
|
13645
|
-
className: classnames(`${CLASSNAME$
|
|
14396
|
+
className: classnames(`${CLASSNAME$1j}__avatar`, avatarProps.className),
|
|
13646
14397
|
size: componentSize,
|
|
13647
14398
|
onClick: onClick,
|
|
13648
14399
|
theme: theme
|
|
13649
14400
|
})), (fields || name) && /*#__PURE__*/React.createElement("div", {
|
|
13650
|
-
className: `${CLASSNAME$
|
|
14401
|
+
className: `${CLASSNAME$1j}__wrapper`
|
|
13651
14402
|
}, nameBlock, fieldsBlock), shouldDisplayActions && simpleAction && /*#__PURE__*/React.createElement("div", {
|
|
13652
|
-
className: `${CLASSNAME$
|
|
14403
|
+
className: `${CLASSNAME$1j}__action`
|
|
13653
14404
|
}, simpleAction), shouldDisplayActions && multipleActions && /*#__PURE__*/React.createElement("div", {
|
|
13654
|
-
className: `${CLASSNAME$
|
|
14405
|
+
className: `${CLASSNAME$1j}__actions`
|
|
13655
14406
|
}, multipleActions));
|
|
13656
14407
|
});
|
|
13657
|
-
UserBlock.displayName = COMPONENT_NAME$
|
|
13658
|
-
UserBlock.className = CLASSNAME$
|
|
14408
|
+
UserBlock.displayName = COMPONENT_NAME$1m;
|
|
14409
|
+
UserBlock.className = CLASSNAME$1j;
|
|
13659
14410
|
UserBlock.defaultProps = DEFAULT_PROPS$13;
|
|
13660
14411
|
|
|
13661
|
-
export { AlertDialog, Alignment, AspectRatio, Autocomplete, AutocompleteMultiple, Avatar, Badge, Button, ButtonEmphasis, ButtonGroup, Checkbox, Chip, ChipGroup, ColorPalette, ColorVariant, CommentBlock, CommentBlockVariant, DatePicker, DatePickerControlled, DatePickerField, Dialog, Divider, DragHandle, Dropdown, Emphasis, ExpansionPanel, Flag, FlexBox, GenericBlock, GenericBlockGapSize, Grid, GridColumn, GridItem, Heading, HeadingLevelProvider, Icon, IconButton, ImageBlock, ImageBlockCaptionPosition, InlineList, InputHelper, InputLabel, Kind, Lightbox, Link, LinkPreview, List, ListDivider, ListItem, ListSubheader, Message, Mosaic, Navigation, Notification, Orientation, Placement, Popover, PopoverDialog, PostBlock, Progress, ProgressCircular, ProgressLinear, ProgressTracker, ProgressTrackerProvider, ProgressTrackerStep, ProgressTrackerStepPanel, ProgressVariant, RadioButton, RadioGroup, Select, SelectMultiple, SelectMultipleField, SelectVariant, SideNavigation, SideNavigationItem, Size, SkeletonCircle, SkeletonRectangle, SkeletonRectangleVariant, SkeletonTypography, Slider, Slides, Slideshow, SlideshowControls, SlideshowItem, Switch, Tab, TabList, TabListLayout, TabPanel, TabProvider, Table, TableBody, TableCell, TableCellVariant, TableHeader, TableRow, Text, TextField, ThOrder, Theme, Thumbnail, ThumbnailAspectRatio, ThumbnailObjectFit, ThumbnailVariant, Toolbar, Tooltip, Typography, TypographyCustom, TypographyInterface, TypographyTitleCustom, Uploader, UploaderVariant, UserBlock, WhiteSpace, clamp, isClickable, useFocusPointStyle, useHeadingLevel };
|
|
14412
|
+
export { AlertDialog, Alignment, AspectRatio, Autocomplete, AutocompleteMultiple, Avatar, Badge, Button, ButtonEmphasis, ButtonGroup, Checkbox, Chip, ChipGroup, ColorPalette, ColorVariant, CommentBlock, CommentBlockVariant, DatePicker, DatePickerControlled, DatePickerField, Dialog, Divider, DragHandle, Dropdown, Emphasis, ExpansionPanel, Flag, FlexBox, GenericBlock, GenericBlockGapSize, Grid, GridColumn, GridItem, Heading, HeadingLevelProvider, Icon, IconButton, ImageBlock, ImageBlockCaptionPosition, ImageLightbox, InlineList, InputHelper, InputLabel, Kind, Lightbox, Link, LinkPreview, List, ListDivider, ListItem, ListSubheader, Message, Mosaic, Navigation, Notification, Orientation, Placement, Popover, PopoverDialog, PostBlock, Progress, ProgressCircular, ProgressLinear, ProgressTracker, ProgressTrackerProvider, ProgressTrackerStep, ProgressTrackerStepPanel, ProgressVariant, RadioButton, RadioGroup, Select, SelectMultiple, SelectMultipleField, SelectVariant, SideNavigation, SideNavigationItem, Size, SkeletonCircle, SkeletonRectangle, SkeletonRectangleVariant, SkeletonTypography, Slider, Slides, Slideshow, SlideshowControls, SlideshowItem, Switch, Tab, TabList, TabListLayout, TabPanel, TabProvider, Table, TableBody, TableCell, TableCellVariant, TableHeader, TableRow, Text, TextField, ThOrder, Theme, Thumbnail, ThumbnailAspectRatio, ThumbnailObjectFit, ThumbnailVariant, Toolbar, Tooltip, Typography, TypographyCustom, TypographyInterface, TypographyTitleCustom, Uploader, UploaderVariant, UserBlock, WhiteSpace, clamp, isClickable, useFocusPointStyle, useHeadingLevel };
|
|
13662
14413
|
//# sourceMappingURL=index.js.map
|