@lumx/react 3.8.0 → 3.8.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +63 -1
- package/index.js +1285 -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 +72 -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`.
|
|
@@ -7804,7 +7817,736 @@ ImageBlock.displayName = COMPONENT_NAME$x;
|
|
|
7804
7817
|
ImageBlock.className = CLASSNAME$u;
|
|
7805
7818
|
ImageBlock.defaultProps = DEFAULT_PROPS$q;
|
|
7806
7819
|
|
|
7807
|
-
|
|
7820
|
+
/**
|
|
7821
|
+
* Component display name.
|
|
7822
|
+
*/
|
|
7823
|
+
const COMPONENT_NAME$y = 'ImageLightbox';
|
|
7824
|
+
|
|
7825
|
+
/**
|
|
7826
|
+
* Component default class name and class prefix.
|
|
7827
|
+
*/
|
|
7828
|
+
const CLASSNAME$v = getRootClassName(COMPONENT_NAME$y);
|
|
7829
|
+
|
|
7830
|
+
/**
|
|
7831
|
+
* Observe element size (only works if it's size depends on the window size).
|
|
7832
|
+
*
|
|
7833
|
+
* (Not using ResizeObserver for better browser backward compat)
|
|
7834
|
+
*
|
|
7835
|
+
* @param elementRef Element to observe
|
|
7836
|
+
* @return the size and a manual update callback
|
|
7837
|
+
*/
|
|
7838
|
+
function useElementSizeDependentOfWindowSize(elementRef) {
|
|
7839
|
+
const [size, setSize] = React.useState(null);
|
|
7840
|
+
const updateSize = React.useMemo(() => throttle(() => {
|
|
7841
|
+
var _elementRef$current;
|
|
7842
|
+
const newSize = (_elementRef$current = elementRef.current) === null || _elementRef$current === void 0 ? void 0 : _elementRef$current.getBoundingClientRect();
|
|
7843
|
+
if (newSize) setSize(newSize);
|
|
7844
|
+
}, 10), [elementRef]);
|
|
7845
|
+
React.useEffect(() => {
|
|
7846
|
+
updateSize();
|
|
7847
|
+
window.addEventListener('resize', updateSize);
|
|
7848
|
+
return () => window.removeEventListener('resize', updateSize);
|
|
7849
|
+
}, [updateSize]);
|
|
7850
|
+
return [size, updateSize];
|
|
7851
|
+
}
|
|
7852
|
+
|
|
7853
|
+
/** Get natural image size after load. */
|
|
7854
|
+
function useImageSize(imgRef, getInitialSize) {
|
|
7855
|
+
const [imageSize, setImageSize] = React.useState(getInitialSize || null);
|
|
7856
|
+
React.useEffect(() => {
|
|
7857
|
+
const {
|
|
7858
|
+
current: img
|
|
7859
|
+
} = imgRef;
|
|
7860
|
+
if (!img) {
|
|
7861
|
+
return undefined;
|
|
7862
|
+
}
|
|
7863
|
+
const onLoad = () => setImageSize({
|
|
7864
|
+
width: img.naturalWidth,
|
|
7865
|
+
height: img.naturalHeight
|
|
7866
|
+
});
|
|
7867
|
+
img.addEventListener('load', onLoad);
|
|
7868
|
+
return () => img.removeEventListener('load', onLoad);
|
|
7869
|
+
}, [imgRef]);
|
|
7870
|
+
return imageSize;
|
|
7871
|
+
}
|
|
7872
|
+
|
|
7873
|
+
/** Check if user prefers reduced motion */
|
|
7874
|
+
function getPrefersReducedMotion() {
|
|
7875
|
+
var _WINDOW$matchMedia;
|
|
7876
|
+
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;
|
|
7877
|
+
}
|
|
7878
|
+
|
|
7879
|
+
/** Minimal recursive deep equal of JS values */
|
|
7880
|
+
function isEqual(obj1, obj2) {
|
|
7881
|
+
if (obj1 === obj2) return true;
|
|
7882
|
+
if (typeof obj1 === 'object' && typeof obj2 === 'object') {
|
|
7883
|
+
const keys1 = Object.keys(obj1);
|
|
7884
|
+
const keys2 = Object.keys(obj2);
|
|
7885
|
+
if (keys1.length !== keys2.length) return false;
|
|
7886
|
+
return keys1.every(key1 => isEqual(obj1[key1], obj2[key1]));
|
|
7887
|
+
}
|
|
7888
|
+
return false;
|
|
7889
|
+
}
|
|
7890
|
+
|
|
7891
|
+
/**
|
|
7892
|
+
* Listen to mouse wheel + ctrl and multi-pointer pinch to zoom
|
|
7893
|
+
*/
|
|
7894
|
+
function usePointerZoom(scrollAreaRef, onScaleChange, animateScroll) {
|
|
7895
|
+
const [isPointerZooming, setPointerZooming] = React.useState(false);
|
|
7896
|
+
React.useEffect(() => {
|
|
7897
|
+
const scrollArea = scrollAreaRef.current;
|
|
7898
|
+
if (!scrollArea || !onScaleChange) {
|
|
7899
|
+
return undefined;
|
|
7900
|
+
}
|
|
7901
|
+
let animationFrame;
|
|
7902
|
+
let zoomStateTimeoutId;
|
|
7903
|
+
function updateScaleOnNextFrame(newScale, mousePosition) {
|
|
7904
|
+
// Cancel previously scheduled frame
|
|
7905
|
+
if (animationFrame) cancelAnimationFrame(animationFrame);
|
|
7906
|
+
|
|
7907
|
+
// Cancel previously scheduled zoom state change
|
|
7908
|
+
if (zoomStateTimeoutId) clearTimeout(zoomStateTimeoutId);
|
|
7909
|
+
function nextFrame() {
|
|
7910
|
+
setPointerZooming(true);
|
|
7911
|
+
onScaleChange === null || onScaleChange === void 0 ? void 0 : onScaleChange(newScale);
|
|
7912
|
+
animationFrame = null;
|
|
7913
|
+
// Wait a bit before indicating the pointer zooming is finished
|
|
7914
|
+
zoomStateTimeoutId = setTimeout(() => setPointerZooming(false), 100);
|
|
7915
|
+
}
|
|
7916
|
+
animationFrame = requestAnimationFrame(nextFrame);
|
|
7917
|
+
|
|
7918
|
+
// Animate scroll in parallel (centering on the current mouse position)
|
|
7919
|
+
animateScroll(mousePosition, {
|
|
7920
|
+
width: scrollArea.scrollWidth,
|
|
7921
|
+
height: scrollArea.scrollHeight
|
|
7922
|
+
});
|
|
7923
|
+
}
|
|
7924
|
+
function onWheel(event) {
|
|
7925
|
+
if (!event.ctrlKey) {
|
|
7926
|
+
return;
|
|
7927
|
+
}
|
|
7928
|
+
event.preventDefault();
|
|
7929
|
+
const newScale = Math.exp(-event.deltaY / 50);
|
|
7930
|
+
|
|
7931
|
+
// Update scale on next frame (focused on the mouse position)
|
|
7932
|
+
updateScaleOnNextFrame(newScale, {
|
|
7933
|
+
x: event.pageX,
|
|
7934
|
+
y: event.pageY
|
|
7935
|
+
});
|
|
7936
|
+
}
|
|
7937
|
+
const activePointers = {};
|
|
7938
|
+
let prevDistance = null;
|
|
7939
|
+
let previousCenterPoint = null;
|
|
7940
|
+
function onPointerDown(event) {
|
|
7941
|
+
activePointers[event.pointerId] = event;
|
|
7942
|
+
}
|
|
7943
|
+
function onPointerMove(event) {
|
|
7944
|
+
// Update pointer in cache
|
|
7945
|
+
if (activePointers[event.pointerId]) {
|
|
7946
|
+
activePointers[event.pointerId] = event;
|
|
7947
|
+
}
|
|
7948
|
+
const pointers = Object.values(activePointers);
|
|
7949
|
+
|
|
7950
|
+
// Make sure we run computation on one of the pointer in the group
|
|
7951
|
+
if (pointers[0].pointerId !== event.pointerId) {
|
|
7952
|
+
return;
|
|
7953
|
+
}
|
|
7954
|
+
|
|
7955
|
+
// Centered point between all pointers
|
|
7956
|
+
const centerPoint = {
|
|
7957
|
+
x: pointers.reduce((x, _ref) => {
|
|
7958
|
+
let {
|
|
7959
|
+
clientX
|
|
7960
|
+
} = _ref;
|
|
7961
|
+
return x + clientX;
|
|
7962
|
+
}, 0) / pointers.length,
|
|
7963
|
+
y: pointers.reduce((y, _ref2) => {
|
|
7964
|
+
let {
|
|
7965
|
+
clientY
|
|
7966
|
+
} = _ref2;
|
|
7967
|
+
return y + clientY;
|
|
7968
|
+
}, 0) / pointers.length
|
|
7969
|
+
};
|
|
7970
|
+
|
|
7971
|
+
// Movement of the center point
|
|
7972
|
+
const deltaCenterPoint = previousCenterPoint && {
|
|
7973
|
+
left: previousCenterPoint.x - centerPoint.x,
|
|
7974
|
+
top: previousCenterPoint.y - centerPoint.y
|
|
7975
|
+
};
|
|
7976
|
+
|
|
7977
|
+
// Pan X & Y
|
|
7978
|
+
if (deltaCenterPoint) {
|
|
7979
|
+
// Apply movement of the center point to the scroll
|
|
7980
|
+
scrollArea.scrollBy({
|
|
7981
|
+
top: deltaCenterPoint.top / 2,
|
|
7982
|
+
left: deltaCenterPoint.left / 2
|
|
7983
|
+
});
|
|
7984
|
+
}
|
|
7985
|
+
|
|
7986
|
+
// Pinch to zoom
|
|
7987
|
+
if (pointers.length === 2) {
|
|
7988
|
+
const [pointer1, pointer2] = pointers;
|
|
7989
|
+
const distance = Math.hypot(pointer2.clientX - pointer1.clientX, pointer2.clientY - pointer1.clientY);
|
|
7990
|
+
if (prevDistance && deltaCenterPoint) {
|
|
7991
|
+
const delta = prevDistance - distance;
|
|
7992
|
+
const absDelta = Math.abs(delta);
|
|
7993
|
+
|
|
7994
|
+
// Zoom only if we are "pinching" more than we are moving the pointers
|
|
7995
|
+
if (absDelta > Math.abs(deltaCenterPoint.left) && absDelta > Math.abs(deltaCenterPoint.top)) {
|
|
7996
|
+
// Update scale on next frame (focused on the center point between the two pointers)
|
|
7997
|
+
const newScale = Math.exp(-delta / 100);
|
|
7998
|
+
updateScaleOnNextFrame(newScale, centerPoint);
|
|
7999
|
+
}
|
|
8000
|
+
}
|
|
8001
|
+
prevDistance = distance;
|
|
8002
|
+
}
|
|
8003
|
+
previousCenterPoint = centerPoint;
|
|
8004
|
+
}
|
|
8005
|
+
function onPointerUp(event) {
|
|
8006
|
+
prevDistance = null;
|
|
8007
|
+
previousCenterPoint = null;
|
|
8008
|
+
delete activePointers[event.pointerId];
|
|
8009
|
+
}
|
|
8010
|
+
scrollArea.addEventListener('wheel', onWheel, {
|
|
8011
|
+
passive: false
|
|
8012
|
+
});
|
|
8013
|
+
const isMultiTouch = navigator.maxTouchPoints >= 2;
|
|
8014
|
+
if (isMultiTouch) {
|
|
8015
|
+
scrollArea.addEventListener('pointerdown', onPointerDown);
|
|
8016
|
+
scrollArea.addEventListener('pointermove', onPointerMove);
|
|
8017
|
+
scrollArea.addEventListener('pointerup', onPointerUp);
|
|
8018
|
+
}
|
|
8019
|
+
return () => {
|
|
8020
|
+
scrollArea.removeEventListener('wheel', onWheel);
|
|
8021
|
+
if (isMultiTouch) {
|
|
8022
|
+
scrollArea.removeEventListener('pointerdown', onPointerDown);
|
|
8023
|
+
scrollArea.removeEventListener('pointermove', onPointerMove);
|
|
8024
|
+
scrollArea.removeEventListener('pointerup', onPointerUp);
|
|
8025
|
+
}
|
|
8026
|
+
};
|
|
8027
|
+
}, [animateScroll, onScaleChange, scrollAreaRef]);
|
|
8028
|
+
return isPointerZooming;
|
|
8029
|
+
}
|
|
8030
|
+
|
|
8031
|
+
/** Maintains the scroll position centered relative to the original scroll area's dimensions when the content scales. */
|
|
8032
|
+
function useAnimateScroll(scrollAreaRef) {
|
|
8033
|
+
return React.useMemo(() => {
|
|
8034
|
+
let animationFrame = null;
|
|
8035
|
+
return function animate(centerPoint, initialScrollAreaSize) {
|
|
8036
|
+
const scrollArea = scrollAreaRef.current;
|
|
8037
|
+
if (!scrollArea) {
|
|
8038
|
+
return;
|
|
8039
|
+
}
|
|
8040
|
+
|
|
8041
|
+
// Cancel previously running animation
|
|
8042
|
+
if (animationFrame) cancelAnimationFrame(animationFrame);
|
|
8043
|
+
|
|
8044
|
+
// Center on the given point or else on the scroll area visual center
|
|
8045
|
+
const clientHeightRatio = centerPoint !== null && centerPoint !== void 0 && centerPoint.y ? centerPoint.y / scrollArea.clientHeight : 0.5;
|
|
8046
|
+
const clientWidthRatio = centerPoint !== null && centerPoint !== void 0 && centerPoint.x ? centerPoint.x / scrollArea.clientWidth : 0.5;
|
|
8047
|
+
const initialScrollHeight = (initialScrollAreaSize === null || initialScrollAreaSize === void 0 ? void 0 : initialScrollAreaSize.height) || scrollArea.scrollHeight;
|
|
8048
|
+
const initialScrollWidth = (initialScrollAreaSize === null || initialScrollAreaSize === void 0 ? void 0 : initialScrollAreaSize.width) || scrollArea.scrollWidth;
|
|
8049
|
+
const heightCenter = scrollArea.scrollTop + scrollArea.clientHeight * clientHeightRatio;
|
|
8050
|
+
const heightRatio = heightCenter / initialScrollHeight;
|
|
8051
|
+
const widthCenter = scrollArea.scrollLeft + scrollArea.clientWidth * clientWidthRatio;
|
|
8052
|
+
const widthRatio = widthCenter / initialScrollWidth;
|
|
8053
|
+
let prevScrollHeight = 0;
|
|
8054
|
+
let prevScrollWidth = 0;
|
|
8055
|
+
function nextFrame() {
|
|
8056
|
+
const {
|
|
8057
|
+
scrollHeight,
|
|
8058
|
+
scrollWidth,
|
|
8059
|
+
clientHeight,
|
|
8060
|
+
clientWidth
|
|
8061
|
+
} = scrollArea;
|
|
8062
|
+
|
|
8063
|
+
// Scroll area stopped expanding => stop animation
|
|
8064
|
+
if (scrollHeight === prevScrollHeight && scrollWidth === prevScrollWidth) {
|
|
8065
|
+
animationFrame = null;
|
|
8066
|
+
return;
|
|
8067
|
+
}
|
|
8068
|
+
|
|
8069
|
+
// Compute next scroll position
|
|
8070
|
+
const top = heightRatio * scrollHeight - clientHeight * clientHeightRatio;
|
|
8071
|
+
const left = widthRatio * scrollWidth - clientWidth * clientWidthRatio;
|
|
8072
|
+
scrollArea.scrollTo({
|
|
8073
|
+
top,
|
|
8074
|
+
left
|
|
8075
|
+
});
|
|
8076
|
+
prevScrollHeight = scrollHeight;
|
|
8077
|
+
prevScrollWidth = scrollWidth;
|
|
8078
|
+
animationFrame = requestAnimationFrame(nextFrame);
|
|
8079
|
+
}
|
|
8080
|
+
animationFrame = requestAnimationFrame(nextFrame);
|
|
8081
|
+
};
|
|
8082
|
+
}, [scrollAreaRef]);
|
|
8083
|
+
}
|
|
8084
|
+
|
|
8085
|
+
/** Internal image slide component for ImageLightbox */
|
|
8086
|
+
const ImageSlide = /*#__PURE__*/React.memo(props => {
|
|
8087
|
+
const {
|
|
8088
|
+
isActive,
|
|
8089
|
+
scale,
|
|
8090
|
+
onScaleChange,
|
|
8091
|
+
image: {
|
|
8092
|
+
image,
|
|
8093
|
+
imgRef: propImgRef,
|
|
8094
|
+
imgProps,
|
|
8095
|
+
alt,
|
|
8096
|
+
loadingPlaceholderImageRef
|
|
8097
|
+
}
|
|
8098
|
+
} = props;
|
|
8099
|
+
|
|
8100
|
+
// Get scroll area size
|
|
8101
|
+
const scrollAreaRef = React.useRef(null);
|
|
8102
|
+
const [scrollAreaSize, updateSize] = useElementSizeDependentOfWindowSize(scrollAreaRef);
|
|
8103
|
+
React.useEffect(() => {
|
|
8104
|
+
// Update size when active
|
|
8105
|
+
if (isActive) updateSize();
|
|
8106
|
+
}, [isActive, updateSize]);
|
|
8107
|
+
|
|
8108
|
+
// Get image size
|
|
8109
|
+
const imgRef = React.useRef(null);
|
|
8110
|
+
const imageSize = useImageSize(imgRef, () => {
|
|
8111
|
+
const width = Number.parseInt(imgProps === null || imgProps === void 0 ? void 0 : imgProps.width, 10);
|
|
8112
|
+
const height = Number.parseInt(imgProps === null || imgProps === void 0 ? void 0 : imgProps.height, 10);
|
|
8113
|
+
return width && height ? {
|
|
8114
|
+
width,
|
|
8115
|
+
height
|
|
8116
|
+
} : null;
|
|
8117
|
+
});
|
|
8118
|
+
|
|
8119
|
+
// Calculate new image size with scale
|
|
8120
|
+
const scaledImageSize = React.useMemo(() => {
|
|
8121
|
+
if (!scrollAreaSize || !imageSize) {
|
|
8122
|
+
return null;
|
|
8123
|
+
}
|
|
8124
|
+
const horizontalScale = scrollAreaSize.width / imageSize.width;
|
|
8125
|
+
const verticalScale = scrollAreaSize.height / imageSize.height;
|
|
8126
|
+
const baseScale = Math.min(1, Math.min(horizontalScale, verticalScale));
|
|
8127
|
+
return {
|
|
8128
|
+
width: imageSize.width * baseScale * (scale !== null && scale !== void 0 ? scale : 1),
|
|
8129
|
+
height: imageSize.height * baseScale * (scale !== null && scale !== void 0 ? scale : 1)
|
|
8130
|
+
};
|
|
8131
|
+
}, [scrollAreaSize, imageSize, scale]);
|
|
8132
|
+
|
|
8133
|
+
// Animate scroll to preserve the center of the current visible window in the scroll area
|
|
8134
|
+
const animateScroll = useAnimateScroll(scrollAreaRef);
|
|
8135
|
+
|
|
8136
|
+
// Zoom via mouse wheel or multi-touch pinch zoom
|
|
8137
|
+
const isPointerZooming = usePointerZoom(scrollAreaRef, onScaleChange, animateScroll);
|
|
8138
|
+
|
|
8139
|
+
// Animate scroll on scale change
|
|
8140
|
+
React.useLayoutEffect(() => {
|
|
8141
|
+
if (scale && !isPointerZooming) {
|
|
8142
|
+
animateScroll();
|
|
8143
|
+
}
|
|
8144
|
+
}, [isPointerZooming, scale, animateScroll]);
|
|
8145
|
+
const isScrollable = scaledImageSize && scrollAreaSize && (scaledImageSize.width > scrollAreaSize.width || scaledImageSize.height > scrollAreaSize.height);
|
|
8146
|
+
return /*#__PURE__*/React.createElement(SlideshowItem, {
|
|
8147
|
+
ref: scrollAreaRef
|
|
8148
|
+
// Make it accessible to keyboard nav when the zone is scrollable
|
|
8149
|
+
,
|
|
8150
|
+
tabIndex: isScrollable ? 0 : undefined,
|
|
8151
|
+
className: `${CLASSNAME$v}__image-slide`
|
|
8152
|
+
}, /*#__PURE__*/React.createElement(Thumbnail, {
|
|
8153
|
+
imgRef: useMergeRefs(imgRef, propImgRef),
|
|
8154
|
+
image: image,
|
|
8155
|
+
alt: alt,
|
|
8156
|
+
className: `${CLASSNAME$v}__thumbnail`,
|
|
8157
|
+
imgProps: _objectSpread2(_objectSpread2({}, imgProps), {}, {
|
|
8158
|
+
style: _objectSpread2(_objectSpread2(_objectSpread2({}, imgProps === null || imgProps === void 0 ? void 0 : imgProps.style), scaledImageSize || {
|
|
8159
|
+
maxHeight: scrollAreaSize === null || scrollAreaSize === void 0 ? void 0 : scrollAreaSize.height,
|
|
8160
|
+
maxWidth: scrollAreaSize === null || scrollAreaSize === void 0 ? void 0 : scrollAreaSize.width
|
|
8161
|
+
}), {}, {
|
|
8162
|
+
// Only animate when scale is set, and we are not pointer zooming and the user does not prefer reduced motion
|
|
8163
|
+
transition: scale && !isPointerZooming && !getPrefersReducedMotion() ? 'all 250ms' : undefined
|
|
8164
|
+
})
|
|
8165
|
+
}),
|
|
8166
|
+
loadingPlaceholderImageRef: loadingPlaceholderImageRef
|
|
8167
|
+
}));
|
|
8168
|
+
}, isEqual);
|
|
8169
|
+
|
|
8170
|
+
const _excluded$z = ["image", "imgRef"];
|
|
8171
|
+
/** Internal image slideshow component for ImageLightbox */
|
|
8172
|
+
const ImageSlideshow = _ref => {
|
|
8173
|
+
var _images$activeIndex, _images$activeIndex2, _images$activeIndex3;
|
|
8174
|
+
let {
|
|
8175
|
+
activeImageIndex,
|
|
8176
|
+
images,
|
|
8177
|
+
slideGroupLabel,
|
|
8178
|
+
zoomInButtonProps,
|
|
8179
|
+
zoomOutButtonProps,
|
|
8180
|
+
slideshowControlsProps,
|
|
8181
|
+
currentPaginationItemRef,
|
|
8182
|
+
footerRef,
|
|
8183
|
+
activeImageRef
|
|
8184
|
+
} = _ref;
|
|
8185
|
+
const {
|
|
8186
|
+
activeIndex,
|
|
8187
|
+
slideshowId,
|
|
8188
|
+
setSlideshow,
|
|
8189
|
+
slideshowSlidesId,
|
|
8190
|
+
slidesCount,
|
|
8191
|
+
onNextClick,
|
|
8192
|
+
onPaginationClick,
|
|
8193
|
+
onPreviousClick,
|
|
8194
|
+
toggleAutoPlay
|
|
8195
|
+
} = SlideshowControls.useSlideshowControls({
|
|
8196
|
+
itemsCount: images.length,
|
|
8197
|
+
activeIndex: activeImageIndex
|
|
8198
|
+
});
|
|
8199
|
+
|
|
8200
|
+
// Image metadata (caption)
|
|
8201
|
+
const title = (_images$activeIndex = images[activeIndex]) === null || _images$activeIndex === void 0 ? void 0 : _images$activeIndex.title;
|
|
8202
|
+
const description = (_images$activeIndex2 = images[activeIndex]) === null || _images$activeIndex2 === void 0 ? void 0 : _images$activeIndex2.description;
|
|
8203
|
+
const tags = (_images$activeIndex3 = images[activeIndex]) === null || _images$activeIndex3 === void 0 ? void 0 : _images$activeIndex3.tags;
|
|
8204
|
+
const metadata = title || description || tags ? /*#__PURE__*/React.createElement(ImageCaption, {
|
|
8205
|
+
theme: "dark",
|
|
8206
|
+
as: "div",
|
|
8207
|
+
title: title,
|
|
8208
|
+
description: description,
|
|
8209
|
+
tags: tags,
|
|
8210
|
+
align: "center"
|
|
8211
|
+
}) : null;
|
|
8212
|
+
|
|
8213
|
+
// Slideshow controls
|
|
8214
|
+
const slideShowControls = slidesCount > 1 && slideshowControlsProps ? /*#__PURE__*/React.createElement(SlideshowControls, _extends({
|
|
8215
|
+
theme: "dark",
|
|
8216
|
+
activeIndex: activeIndex,
|
|
8217
|
+
slidesCount: slidesCount,
|
|
8218
|
+
onNextClick: onNextClick,
|
|
8219
|
+
onPreviousClick: onPreviousClick,
|
|
8220
|
+
onPaginationClick: onPaginationClick
|
|
8221
|
+
}, slideshowControlsProps, {
|
|
8222
|
+
paginationItemProps: index => {
|
|
8223
|
+
var _slideshowControlsPro;
|
|
8224
|
+
const props = (slideshowControlsProps === null || slideshowControlsProps === void 0 ? void 0 : (_slideshowControlsPro = slideshowControlsProps.paginationItemProps) === null || _slideshowControlsPro === void 0 ? void 0 : _slideshowControlsPro.call(slideshowControlsProps, index)) || {};
|
|
8225
|
+
return _objectSpread2(_objectSpread2({}, props), {}, {
|
|
8226
|
+
ref: mergeRefs(props === null || props === void 0 ? void 0 : props.ref,
|
|
8227
|
+
// Focus the active pagination item once on mount
|
|
8228
|
+
activeIndex === index ? currentPaginationItemRef : undefined)
|
|
8229
|
+
});
|
|
8230
|
+
}
|
|
8231
|
+
})) : null;
|
|
8232
|
+
|
|
8233
|
+
// Zoom controls
|
|
8234
|
+
const [scale, setScale] = React.useState(undefined);
|
|
8235
|
+
const zoomEnabled = zoomInButtonProps && zoomOutButtonProps;
|
|
8236
|
+
const onScaleChange = React.useMemo(() => {
|
|
8237
|
+
if (!zoomEnabled) return undefined;
|
|
8238
|
+
return newScale => {
|
|
8239
|
+
setScale(function () {
|
|
8240
|
+
let prevScale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
8241
|
+
return Math.max(1, newScale * prevScale);
|
|
8242
|
+
});
|
|
8243
|
+
};
|
|
8244
|
+
}, [zoomEnabled]);
|
|
8245
|
+
const zoomIn = React.useCallback(() => onScaleChange === null || onScaleChange === void 0 ? void 0 : onScaleChange(1.5), [onScaleChange]);
|
|
8246
|
+
const zoomOut = React.useCallback(() => onScaleChange === null || onScaleChange === void 0 ? void 0 : onScaleChange(0.5), [onScaleChange]);
|
|
8247
|
+
React.useEffect(() => {
|
|
8248
|
+
// Reset scale on slide change
|
|
8249
|
+
if (activeIndex) setScale(undefined);
|
|
8250
|
+
}, [activeIndex]);
|
|
8251
|
+
const zoomControls = zoomEnabled && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconButton, _extends({}, zoomInButtonProps, {
|
|
8252
|
+
theme: "dark",
|
|
8253
|
+
emphasis: "low",
|
|
8254
|
+
icon: mdiMagnifyPlusOutline,
|
|
8255
|
+
onClick: zoomIn
|
|
8256
|
+
})), /*#__PURE__*/React.createElement(IconButton, _extends({}, zoomOutButtonProps, {
|
|
8257
|
+
theme: "dark",
|
|
8258
|
+
emphasis: "low",
|
|
8259
|
+
isDisabled: !scale || scale <= 1,
|
|
8260
|
+
icon: mdiMagnifyMinusOutline,
|
|
8261
|
+
onClick: zoomOut
|
|
8262
|
+
})));
|
|
8263
|
+
const getImgRef = React.useMemo(() => memoize((index, isActive) => {
|
|
8264
|
+
return mergeRefs(images === null || images === void 0 ? void 0 : images[index].imgRef, isActive ? activeImageRef : undefined);
|
|
8265
|
+
},
|
|
8266
|
+
// memoize based on both arguments
|
|
8267
|
+
function () {
|
|
8268
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8269
|
+
args[_key] = arguments[_key];
|
|
8270
|
+
}
|
|
8271
|
+
return args.join();
|
|
8272
|
+
}), [images, activeImageRef]);
|
|
8273
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Slides, {
|
|
8274
|
+
activeIndex: activeIndex,
|
|
8275
|
+
theme: "dark",
|
|
8276
|
+
slideGroupLabel: slideGroupLabel,
|
|
8277
|
+
fillHeight: true,
|
|
8278
|
+
id: slideshowId,
|
|
8279
|
+
ref: setSlideshow,
|
|
8280
|
+
slidesId: slideshowSlidesId,
|
|
8281
|
+
toggleAutoPlay: toggleAutoPlay
|
|
8282
|
+
}, images.map((_ref2, index) => {
|
|
8283
|
+
let {
|
|
8284
|
+
image,
|
|
8285
|
+
imgRef
|
|
8286
|
+
} = _ref2,
|
|
8287
|
+
imageProps = _objectWithoutProperties(_ref2, _excluded$z);
|
|
8288
|
+
const isActive = index === activeIndex;
|
|
8289
|
+
return /*#__PURE__*/React.createElement(ImageSlide, {
|
|
8290
|
+
isActive: isActive,
|
|
8291
|
+
key: image,
|
|
8292
|
+
image: _objectSpread2(_objectSpread2({}, imageProps), {}, {
|
|
8293
|
+
image,
|
|
8294
|
+
imgRef: getImgRef(index, isActive)
|
|
8295
|
+
}),
|
|
8296
|
+
scale: isActive ? scale : undefined,
|
|
8297
|
+
onScaleChange: onScaleChange
|
|
8298
|
+
});
|
|
8299
|
+
})), (metadata || slideShowControls || zoomControls) && /*#__PURE__*/React.createElement(FlexBox, {
|
|
8300
|
+
ref: footerRef,
|
|
8301
|
+
className: `${CLASSNAME$v}__footer`,
|
|
8302
|
+
orientation: "vertical",
|
|
8303
|
+
vAlign: "center",
|
|
8304
|
+
gap: "big"
|
|
8305
|
+
}, metadata, /*#__PURE__*/React.createElement(FlexBox, {
|
|
8306
|
+
className: `${CLASSNAME$v}__footer-actions`,
|
|
8307
|
+
orientation: "horizontal",
|
|
8308
|
+
gap: "regular"
|
|
8309
|
+
}, slideShowControls, zoomControls)));
|
|
8310
|
+
};
|
|
8311
|
+
|
|
8312
|
+
/** Unref a react ref or element */
|
|
8313
|
+
function unref(maybeElement) {
|
|
8314
|
+
if (maybeElement instanceof HTMLElement) return maybeElement;
|
|
8315
|
+
return maybeElement === null || maybeElement === void 0 ? void 0 : maybeElement.current;
|
|
8316
|
+
}
|
|
8317
|
+
|
|
8318
|
+
function setTransitionViewName(elementRef, name) {
|
|
8319
|
+
const element = unref(elementRef);
|
|
8320
|
+
if (element) element.style.viewTransitionName = name;
|
|
8321
|
+
}
|
|
8322
|
+
|
|
8323
|
+
/**
|
|
8324
|
+
* Wrapper around the `document.startViewTransition` handling browser incompatibilities, react DOM flush and
|
|
8325
|
+
* user preference.
|
|
8326
|
+
*
|
|
8327
|
+
* @param changes callback containing the changes to apply within the view transition.
|
|
8328
|
+
* @param setViewTransitionName set the `viewTransitionName` style on a `source` & `target` to morph these elements.
|
|
8329
|
+
*/
|
|
8330
|
+
async function startViewTransition(_ref) {
|
|
8331
|
+
var _document, _document$startViewTr;
|
|
8332
|
+
let {
|
|
8333
|
+
changes,
|
|
8334
|
+
viewTransitionName
|
|
8335
|
+
} = _ref;
|
|
8336
|
+
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);
|
|
8337
|
+
const prefersReducedMotion = getPrefersReducedMotion();
|
|
8338
|
+
const {
|
|
8339
|
+
flushSync
|
|
8340
|
+
} = ReactDOM;
|
|
8341
|
+
if (prefersReducedMotion || !start || !flushSync || !(viewTransitionName !== null && viewTransitionName !== void 0 && viewTransitionName.source) || !(viewTransitionName !== null && viewTransitionName !== void 0 && viewTransitionName.target)) {
|
|
8342
|
+
// Skip, apply changes without a transition
|
|
8343
|
+
changes();
|
|
8344
|
+
return;
|
|
8345
|
+
}
|
|
8346
|
+
|
|
8347
|
+
// Set transition name on source element
|
|
8348
|
+
setTransitionViewName(viewTransitionName.source, viewTransitionName.name);
|
|
8349
|
+
|
|
8350
|
+
// Start view transition, apply changes & flush to DOM
|
|
8351
|
+
await start(() => {
|
|
8352
|
+
// Un-set transition name on source element
|
|
8353
|
+
setTransitionViewName(viewTransitionName.source, null);
|
|
8354
|
+
flushSync(changes);
|
|
8355
|
+
|
|
8356
|
+
// Set transition name on target element
|
|
8357
|
+
setTransitionViewName(viewTransitionName.target, viewTransitionName.name);
|
|
8358
|
+
}).updateCallbackDone;
|
|
8359
|
+
|
|
8360
|
+
// Un-set transition name on target element
|
|
8361
|
+
setTransitionViewName(viewTransitionName.target, null);
|
|
8362
|
+
}
|
|
8363
|
+
|
|
8364
|
+
/** Find image in element including the element */
|
|
8365
|
+
const findImage = element => element !== null && element !== void 0 && element.matches('img') ? element : (element === null || element === void 0 ? void 0 : element.querySelector('img')) || null;
|
|
8366
|
+
|
|
8367
|
+
const _excluded$A = ["images"];
|
|
8368
|
+
|
|
8369
|
+
/** Subset of the ImageLightboxProps managed by the useImageLightbox hook */
|
|
8370
|
+
|
|
8371
|
+
const EMPTY_PROPS = {
|
|
8372
|
+
isOpen: false,
|
|
8373
|
+
images: [],
|
|
8374
|
+
parentElement: /*#__PURE__*/React.createRef()
|
|
8375
|
+
};
|
|
8376
|
+
/**
|
|
8377
|
+
* Set up an ImageLightbox with images and triggers.
|
|
8378
|
+
*
|
|
8379
|
+
* - Associate a trigger with the lightbox to properly focus the trigger on close
|
|
8380
|
+
* - Associate a trigger with an image to display on open
|
|
8381
|
+
* - Automatically provide a view transition between an image trigger and the displayed image on open & close
|
|
8382
|
+
*
|
|
8383
|
+
* @param initialProps Images to display in the image lightbox
|
|
8384
|
+
*/
|
|
8385
|
+
function useImageLightbox(initialProps) {
|
|
8386
|
+
const {
|
|
8387
|
+
images = []
|
|
8388
|
+
} = initialProps,
|
|
8389
|
+
otherProps = _objectWithoutProperties(initialProps, _excluded$A);
|
|
8390
|
+
const imagesPropsRef = React.useRef(images);
|
|
8391
|
+
React.useEffect(() => {
|
|
8392
|
+
imagesPropsRef.current = images.map(props => _objectSpread2({
|
|
8393
|
+
imgRef: /*#__PURE__*/React.createRef()
|
|
8394
|
+
}, props));
|
|
8395
|
+
}, [images]);
|
|
8396
|
+
const currentImageRef = React.useRef(null);
|
|
8397
|
+
const [imageLightboxProps, setImageLightboxProps] = React.useState(() => _objectSpread2(_objectSpread2({}, EMPTY_PROPS), otherProps));
|
|
8398
|
+
const getTriggerProps = React.useMemo(() => {
|
|
8399
|
+
const triggerImageRefs = {};
|
|
8400
|
+
async function close() {
|
|
8401
|
+
const currentImage = currentImageRef.current;
|
|
8402
|
+
if (!currentImage) {
|
|
8403
|
+
return;
|
|
8404
|
+
}
|
|
8405
|
+
const currentIndex = imagesPropsRef.current.findIndex(_ref => {
|
|
8406
|
+
let {
|
|
8407
|
+
imgRef
|
|
8408
|
+
} = _ref;
|
|
8409
|
+
return (imgRef === null || imgRef === void 0 ? void 0 : imgRef.current) === currentImage;
|
|
8410
|
+
});
|
|
8411
|
+
await startViewTransition({
|
|
8412
|
+
changes() {
|
|
8413
|
+
// Close lightbox
|
|
8414
|
+
setImageLightboxProps(prevProps => _objectSpread2(_objectSpread2({}, prevProps), {}, {
|
|
8415
|
+
isOpen: false
|
|
8416
|
+
}));
|
|
8417
|
+
},
|
|
8418
|
+
// Morph from the image in lightbox to the image in trigger
|
|
8419
|
+
viewTransitionName: {
|
|
8420
|
+
source: currentImageRef,
|
|
8421
|
+
target: triggerImageRefs[currentIndex],
|
|
8422
|
+
name: CLASSNAME$v
|
|
8423
|
+
}
|
|
8424
|
+
});
|
|
8425
|
+
}
|
|
8426
|
+
async function open(triggerElement) {
|
|
8427
|
+
var _triggerImageRefs;
|
|
8428
|
+
let {
|
|
8429
|
+
activeImageIndex
|
|
8430
|
+
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
8431
|
+
// If we find an image inside the trigger, animate it in transition with the opening image
|
|
8432
|
+
const triggerImage = ((_triggerImageRefs = triggerImageRefs[activeImageIndex]) === null || _triggerImageRefs === void 0 ? void 0 : _triggerImageRefs.current) || findImage(triggerElement);
|
|
8433
|
+
|
|
8434
|
+
// Inject the trigger image as loading placeholder for better loading state
|
|
8435
|
+
const imagesWithFallbackSize = imagesPropsRef.current.map((image, idx) => {
|
|
8436
|
+
if (triggerImage && idx === activeImageIndex && !image.loadingPlaceholderImageRef) {
|
|
8437
|
+
return _objectSpread2(_objectSpread2({}, image), {}, {
|
|
8438
|
+
loadingPlaceholderImageRef: {
|
|
8439
|
+
current: triggerImage
|
|
8440
|
+
}
|
|
8441
|
+
});
|
|
8442
|
+
}
|
|
8443
|
+
return image;
|
|
8444
|
+
});
|
|
8445
|
+
await startViewTransition({
|
|
8446
|
+
changes: () => {
|
|
8447
|
+
// Open lightbox with setup props
|
|
8448
|
+
setImageLightboxProps(prevProps => _objectSpread2(_objectSpread2({}, prevProps), {}, {
|
|
8449
|
+
activeImageRef: currentImageRef,
|
|
8450
|
+
parentElement: {
|
|
8451
|
+
current: triggerElement
|
|
8452
|
+
},
|
|
8453
|
+
isOpen: true,
|
|
8454
|
+
onClose: () => {
|
|
8455
|
+
var _prevProps$onClose;
|
|
8456
|
+
close();
|
|
8457
|
+
prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$onClose = prevProps.onClose) === null || _prevProps$onClose === void 0 ? void 0 : _prevProps$onClose.call(prevProps);
|
|
8458
|
+
},
|
|
8459
|
+
images: imagesWithFallbackSize,
|
|
8460
|
+
activeImageIndex: activeImageIndex || 0
|
|
8461
|
+
}));
|
|
8462
|
+
},
|
|
8463
|
+
// Morph from the image in trigger to the image in lightbox
|
|
8464
|
+
viewTransitionName: {
|
|
8465
|
+
source: triggerImage,
|
|
8466
|
+
target: currentImageRef,
|
|
8467
|
+
name: CLASSNAME$v
|
|
8468
|
+
}
|
|
8469
|
+
});
|
|
8470
|
+
}
|
|
8471
|
+
return memoize(options => ({
|
|
8472
|
+
ref(element) {
|
|
8473
|
+
// Track trigger image ref if any
|
|
8474
|
+
if ((options === null || options === void 0 ? void 0 : options.activeImageIndex) !== undefined && element) {
|
|
8475
|
+
triggerImageRefs[options.activeImageIndex] = {
|
|
8476
|
+
current: findImage(element)
|
|
8477
|
+
};
|
|
8478
|
+
}
|
|
8479
|
+
},
|
|
8480
|
+
onClick(e) {
|
|
8481
|
+
open(e.target, options);
|
|
8482
|
+
}
|
|
8483
|
+
}));
|
|
8484
|
+
}, []);
|
|
8485
|
+
return {
|
|
8486
|
+
getTriggerProps,
|
|
8487
|
+
imageLightboxProps
|
|
8488
|
+
};
|
|
8489
|
+
}
|
|
8490
|
+
|
|
8491
|
+
const _excluded$B = ["className", "isOpen", "closeButtonProps", "onClose", "parentElement", "activeImageIndex", "slideshowControlsProps", "slideGroupLabel", "images", "zoomOutButtonProps", "zoomInButtonProps", "activeImageRef"];
|
|
8492
|
+
const Inner = /*#__PURE__*/forwardRef((props, ref) => {
|
|
8493
|
+
const {
|
|
8494
|
+
className,
|
|
8495
|
+
isOpen,
|
|
8496
|
+
closeButtonProps,
|
|
8497
|
+
onClose,
|
|
8498
|
+
parentElement,
|
|
8499
|
+
activeImageIndex,
|
|
8500
|
+
slideshowControlsProps,
|
|
8501
|
+
slideGroupLabel,
|
|
8502
|
+
images,
|
|
8503
|
+
zoomOutButtonProps,
|
|
8504
|
+
zoomInButtonProps,
|
|
8505
|
+
activeImageRef: propImageRef
|
|
8506
|
+
} = props,
|
|
8507
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$B);
|
|
8508
|
+
const currentPaginationItemRef = React.useRef(null);
|
|
8509
|
+
const footerRef = React.useRef(null);
|
|
8510
|
+
const imageRef = React.useRef(null);
|
|
8511
|
+
const clickAwayChildrenRefs = React.useRef([imageRef, footerRef]);
|
|
8512
|
+
return /*#__PURE__*/React.createElement(Lightbox, _extends({
|
|
8513
|
+
ref: ref,
|
|
8514
|
+
className: classnames(className, CLASSNAME$v),
|
|
8515
|
+
parentElement: parentElement,
|
|
8516
|
+
isOpen: isOpen,
|
|
8517
|
+
onClose: onClose,
|
|
8518
|
+
closeButtonProps: closeButtonProps,
|
|
8519
|
+
focusElement: currentPaginationItemRef
|
|
8520
|
+
}, forwardedProps), /*#__PURE__*/React.createElement(ClickAwayProvider, {
|
|
8521
|
+
childrenRefs: clickAwayChildrenRefs,
|
|
8522
|
+
callback: onClose
|
|
8523
|
+
}, /*#__PURE__*/React.createElement(ImageSlideshow, {
|
|
8524
|
+
activeImageIndex: activeImageIndex,
|
|
8525
|
+
slideGroupLabel: slideGroupLabel,
|
|
8526
|
+
slideshowControlsProps: slideshowControlsProps,
|
|
8527
|
+
images: images,
|
|
8528
|
+
zoomInButtonProps: zoomInButtonProps,
|
|
8529
|
+
zoomOutButtonProps: zoomOutButtonProps,
|
|
8530
|
+
footerRef: footerRef,
|
|
8531
|
+
activeImageRef: mergeRefs(propImageRef, imageRef),
|
|
8532
|
+
currentPaginationItemRef: currentPaginationItemRef
|
|
8533
|
+
})));
|
|
8534
|
+
});
|
|
8535
|
+
Inner.displayName = COMPONENT_NAME$y;
|
|
8536
|
+
Inner.className = CLASSNAME$v;
|
|
8537
|
+
|
|
8538
|
+
/**
|
|
8539
|
+
* ImageLightbox component.
|
|
8540
|
+
*
|
|
8541
|
+
* @param props Component props.
|
|
8542
|
+
* @param ref Component ref.
|
|
8543
|
+
* @return React element.
|
|
8544
|
+
*/
|
|
8545
|
+
const ImageLightbox = Object.assign(Inner, {
|
|
8546
|
+
useImageLightbox
|
|
8547
|
+
});
|
|
8548
|
+
|
|
8549
|
+
const _excluded$C = ["className", "color", "colorVariant", "typography", "children", "wrap"];
|
|
7808
8550
|
|
|
7809
8551
|
/**
|
|
7810
8552
|
* Defines the props of the component.
|
|
@@ -7813,12 +8555,12 @@ const _excluded$z = ["className", "color", "colorVariant", "typography", "childr
|
|
|
7813
8555
|
/**
|
|
7814
8556
|
* Component display name.
|
|
7815
8557
|
*/
|
|
7816
|
-
const COMPONENT_NAME$
|
|
8558
|
+
const COMPONENT_NAME$z = 'InlineList';
|
|
7817
8559
|
|
|
7818
8560
|
/**
|
|
7819
8561
|
* Component default class name and class prefix.
|
|
7820
8562
|
*/
|
|
7821
|
-
const CLASSNAME$
|
|
8563
|
+
const CLASSNAME$w = getRootClassName(COMPONENT_NAME$z);
|
|
7822
8564
|
|
|
7823
8565
|
/**
|
|
7824
8566
|
* Component default props.
|
|
@@ -7841,7 +8583,7 @@ const InlineList = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7841
8583
|
children,
|
|
7842
8584
|
wrap
|
|
7843
8585
|
} = props,
|
|
7844
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
8586
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$C);
|
|
7845
8587
|
const fontColorClassName = color && getFontColorClassName(color, colorVariant);
|
|
7846
8588
|
const typographyClassName = typography && getTypographyClassName(typography);
|
|
7847
8589
|
return (
|
|
@@ -7849,7 +8591,7 @@ const InlineList = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7849
8591
|
// eslint-disable-next-line jsx-a11y/no-redundant-roles
|
|
7850
8592
|
React.createElement("ul", _extends({}, forwardedProps, {
|
|
7851
8593
|
ref: ref,
|
|
7852
|
-
className: classnames(className, CLASSNAME$
|
|
8594
|
+
className: classnames(className, CLASSNAME$w, wrap && `${CLASSNAME$w}--wrap`, fontColorClassName, typographyClassName)
|
|
7853
8595
|
// Lists with removed bullet style can lose their a11y list role on some browsers
|
|
7854
8596
|
,
|
|
7855
8597
|
role: "list"
|
|
@@ -7862,17 +8604,17 @@ const InlineList = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7862
8604
|
React.createElement("li", {
|
|
7863
8605
|
key: key,
|
|
7864
8606
|
role: "listitem",
|
|
7865
|
-
className: `${CLASSNAME$
|
|
8607
|
+
className: `${CLASSNAME$w}__item`
|
|
7866
8608
|
}, index !== 0 && /*#__PURE__*/React.createElement("span", {
|
|
7867
|
-
className: `${CLASSNAME$
|
|
8609
|
+
className: `${CLASSNAME$w}__item-separator`,
|
|
7868
8610
|
"aria-hidden": "true"
|
|
7869
8611
|
}, '\u00A0•\u00A0'), child)
|
|
7870
8612
|
);
|
|
7871
8613
|
}))
|
|
7872
8614
|
);
|
|
7873
8615
|
});
|
|
7874
|
-
InlineList.displayName = COMPONENT_NAME$
|
|
7875
|
-
InlineList.className = CLASSNAME$
|
|
8616
|
+
InlineList.displayName = COMPONENT_NAME$z;
|
|
8617
|
+
InlineList.className = CLASSNAME$w;
|
|
7876
8618
|
InlineList.defaultProps = DEFAULT_PROPS$r;
|
|
7877
8619
|
|
|
7878
8620
|
const INPUT_HELPER_CONFIGURATION = {
|
|
@@ -7887,7 +8629,7 @@ const INPUT_HELPER_CONFIGURATION = {
|
|
|
7887
8629
|
}
|
|
7888
8630
|
};
|
|
7889
8631
|
|
|
7890
|
-
const _excluded$
|
|
8632
|
+
const _excluded$D = ["children", "className", "kind", "theme"];
|
|
7891
8633
|
|
|
7892
8634
|
/**
|
|
7893
8635
|
* Defines the props of the component.
|
|
@@ -7896,12 +8638,12 @@ const _excluded$A = ["children", "className", "kind", "theme"];
|
|
|
7896
8638
|
/**
|
|
7897
8639
|
* Component display name.
|
|
7898
8640
|
*/
|
|
7899
|
-
const COMPONENT_NAME$
|
|
8641
|
+
const COMPONENT_NAME$A = 'InputHelper';
|
|
7900
8642
|
|
|
7901
8643
|
/**
|
|
7902
8644
|
* Component default class name and class prefix.
|
|
7903
8645
|
*/
|
|
7904
|
-
const CLASSNAME$
|
|
8646
|
+
const CLASSNAME$x = getRootClassName(COMPONENT_NAME$A);
|
|
7905
8647
|
|
|
7906
8648
|
/**
|
|
7907
8649
|
* Component default props.
|
|
@@ -7925,7 +8667,7 @@ const InputHelper = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7925
8667
|
kind,
|
|
7926
8668
|
theme
|
|
7927
8669
|
} = props,
|
|
7928
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
8670
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$D);
|
|
7929
8671
|
const {
|
|
7930
8672
|
color
|
|
7931
8673
|
} = INPUT_HELPER_CONFIGURATION[kind] || {};
|
|
@@ -7933,17 +8675,17 @@ const InputHelper = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7933
8675
|
ref: ref
|
|
7934
8676
|
}, forwardedProps, {
|
|
7935
8677
|
className: classnames(className, handleBasicClasses({
|
|
7936
|
-
prefix: CLASSNAME$
|
|
8678
|
+
prefix: CLASSNAME$x,
|
|
7937
8679
|
color,
|
|
7938
8680
|
theme
|
|
7939
8681
|
}))
|
|
7940
8682
|
}), children);
|
|
7941
8683
|
});
|
|
7942
|
-
InputHelper.displayName = COMPONENT_NAME$
|
|
7943
|
-
InputHelper.className = CLASSNAME$
|
|
8684
|
+
InputHelper.displayName = COMPONENT_NAME$A;
|
|
8685
|
+
InputHelper.className = CLASSNAME$x;
|
|
7944
8686
|
InputHelper.defaultProps = DEFAULT_PROPS$s;
|
|
7945
8687
|
|
|
7946
|
-
const _excluded$
|
|
8688
|
+
const _excluded$E = ["children", "className", "htmlFor", "isRequired", "theme"];
|
|
7947
8689
|
|
|
7948
8690
|
/**
|
|
7949
8691
|
* Defines the props of the component.
|
|
@@ -7952,12 +8694,12 @@ const _excluded$B = ["children", "className", "htmlFor", "isRequired", "theme"];
|
|
|
7952
8694
|
/**
|
|
7953
8695
|
* Component display name.
|
|
7954
8696
|
*/
|
|
7955
|
-
const COMPONENT_NAME$
|
|
8697
|
+
const COMPONENT_NAME$B = 'InputLabel';
|
|
7956
8698
|
|
|
7957
8699
|
/**
|
|
7958
8700
|
* Component default class name and class prefix.
|
|
7959
8701
|
*/
|
|
7960
|
-
const CLASSNAME$
|
|
8702
|
+
const CLASSNAME$y = getRootClassName(COMPONENT_NAME$B);
|
|
7961
8703
|
|
|
7962
8704
|
/**
|
|
7963
8705
|
* Component default props.
|
|
@@ -7981,23 +8723,23 @@ const InputLabel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7981
8723
|
isRequired,
|
|
7982
8724
|
theme
|
|
7983
8725
|
} = props,
|
|
7984
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
8726
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$E);
|
|
7985
8727
|
return /*#__PURE__*/React.createElement("label", _extends({
|
|
7986
8728
|
ref: ref
|
|
7987
8729
|
}, forwardedProps, {
|
|
7988
8730
|
htmlFor: htmlFor,
|
|
7989
8731
|
className: classnames(className, handleBasicClasses({
|
|
7990
|
-
prefix: CLASSNAME$
|
|
8732
|
+
prefix: CLASSNAME$y,
|
|
7991
8733
|
isRequired,
|
|
7992
8734
|
theme
|
|
7993
8735
|
}))
|
|
7994
8736
|
}), children);
|
|
7995
8737
|
});
|
|
7996
|
-
InputLabel.displayName = COMPONENT_NAME$
|
|
7997
|
-
InputLabel.className = CLASSNAME$
|
|
8738
|
+
InputLabel.displayName = COMPONENT_NAME$B;
|
|
8739
|
+
InputLabel.className = CLASSNAME$y;
|
|
7998
8740
|
InputLabel.defaultProps = DEFAULT_PROPS$t;
|
|
7999
8741
|
|
|
8000
|
-
const _excluded$
|
|
8742
|
+
const _excluded$F = ["aria-labelledby", "ariaLabelledBy", "aria-label", "ariaLabel", "children", "className", "closeButtonProps", "isOpen", "onClose", "parentElement", "focusElement", "preventAutoClose", "theme", "zIndex"];
|
|
8001
8743
|
|
|
8002
8744
|
/**
|
|
8003
8745
|
* Defines the props of the component.
|
|
@@ -8006,12 +8748,12 @@ const _excluded$C = ["aria-labelledby", "ariaLabelledBy", "aria-label", "ariaLab
|
|
|
8006
8748
|
/**
|
|
8007
8749
|
* Component display name.
|
|
8008
8750
|
*/
|
|
8009
|
-
const COMPONENT_NAME$
|
|
8751
|
+
const COMPONENT_NAME$C = 'Lightbox';
|
|
8010
8752
|
|
|
8011
8753
|
/**
|
|
8012
8754
|
* Component default class name and class prefix.
|
|
8013
8755
|
*/
|
|
8014
|
-
const CLASSNAME$
|
|
8756
|
+
const CLASSNAME$z = getRootClassName(COMPONENT_NAME$C);
|
|
8015
8757
|
|
|
8016
8758
|
/**
|
|
8017
8759
|
* Lightbox component.
|
|
@@ -8037,7 +8779,7 @@ const Lightbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8037
8779
|
theme,
|
|
8038
8780
|
zIndex
|
|
8039
8781
|
} = props,
|
|
8040
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
8782
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$F);
|
|
8041
8783
|
if (!DOCUMENT) {
|
|
8042
8784
|
// Can't render in SSR.
|
|
8043
8785
|
return null;
|
|
@@ -8098,7 +8840,7 @@ const Lightbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8098
8840
|
role: "dialog",
|
|
8099
8841
|
tabIndex: -1,
|
|
8100
8842
|
className: classnames(className, handleBasicClasses({
|
|
8101
|
-
prefix: CLASSNAME$
|
|
8843
|
+
prefix: CLASSNAME$z,
|
|
8102
8844
|
isHidden: !isOpen,
|
|
8103
8845
|
isShown: isOpen || isVisible,
|
|
8104
8846
|
theme
|
|
@@ -8107,7 +8849,7 @@ const Lightbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8107
8849
|
zIndex
|
|
8108
8850
|
}
|
|
8109
8851
|
}), closeButtonProps && /*#__PURE__*/React.createElement("div", {
|
|
8110
|
-
className: `${CLASSNAME$
|
|
8852
|
+
className: `${CLASSNAME$z}__close`
|
|
8111
8853
|
}, /*#__PURE__*/React.createElement(IconButton, _extends({}, closeButtonProps, {
|
|
8112
8854
|
ref: closeButtonRef,
|
|
8113
8855
|
emphasis: "low",
|
|
@@ -8121,14 +8863,14 @@ const Lightbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8121
8863
|
childrenRefs: clickAwayRefs
|
|
8122
8864
|
}, /*#__PURE__*/React.createElement("div", {
|
|
8123
8865
|
ref: childrenRef,
|
|
8124
|
-
className: `${CLASSNAME$
|
|
8866
|
+
className: `${CLASSNAME$z}__wrapper`,
|
|
8125
8867
|
role: "presentation"
|
|
8126
8868
|
}, children))), document.body);
|
|
8127
8869
|
});
|
|
8128
|
-
Lightbox.displayName = COMPONENT_NAME$
|
|
8129
|
-
Lightbox.className = CLASSNAME$
|
|
8870
|
+
Lightbox.displayName = COMPONENT_NAME$C;
|
|
8871
|
+
Lightbox.className = CLASSNAME$z;
|
|
8130
8872
|
|
|
8131
|
-
const _excluded$
|
|
8873
|
+
const _excluded$G = ["children", "className", "color", "colorVariant", "disabled", "isDisabled", "href", "leftIcon", "linkAs", "rightIcon", "target", "typography"];
|
|
8132
8874
|
|
|
8133
8875
|
/**
|
|
8134
8876
|
* Defines the props of the component.
|
|
@@ -8137,12 +8879,12 @@ const _excluded$D = ["children", "className", "color", "colorVariant", "disabled
|
|
|
8137
8879
|
/**
|
|
8138
8880
|
* Component display name.
|
|
8139
8881
|
*/
|
|
8140
|
-
const COMPONENT_NAME$
|
|
8882
|
+
const COMPONENT_NAME$D = 'Link';
|
|
8141
8883
|
|
|
8142
8884
|
/**
|
|
8143
8885
|
* Component default class name and class prefix.
|
|
8144
8886
|
*/
|
|
8145
|
-
const CLASSNAME$
|
|
8887
|
+
const CLASSNAME$A = getRootClassName(COMPONENT_NAME$D);
|
|
8146
8888
|
const getIconSize = typography => {
|
|
8147
8889
|
switch (typography) {
|
|
8148
8890
|
case Typography.display1:
|
|
@@ -8191,18 +8933,18 @@ const Link = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8191
8933
|
target,
|
|
8192
8934
|
typography
|
|
8193
8935
|
} = props,
|
|
8194
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
8936
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$G);
|
|
8195
8937
|
const renderedChildren = useMemo(() => /*#__PURE__*/React.createElement(React.Fragment, null, leftIcon && !isEmpty(leftIcon) && /*#__PURE__*/React.createElement(Icon, {
|
|
8196
8938
|
icon: leftIcon,
|
|
8197
|
-
className: `${CLASSNAME$
|
|
8939
|
+
className: `${CLASSNAME$A}__left-icon`,
|
|
8198
8940
|
size: getIconSize(typography)
|
|
8199
8941
|
}), children && /*#__PURE__*/React.createElement("span", {
|
|
8200
|
-
className: classnames(`${CLASSNAME$
|
|
8942
|
+
className: classnames(`${CLASSNAME$A}__content`, {
|
|
8201
8943
|
[`lumx-typography-${typography}`]: typography
|
|
8202
8944
|
})
|
|
8203
8945
|
}, children), rightIcon && !isEmpty(rightIcon) && /*#__PURE__*/React.createElement(Icon, {
|
|
8204
8946
|
icon: rightIcon,
|
|
8205
|
-
className: `${CLASSNAME$
|
|
8947
|
+
className: `${CLASSNAME$A}__right-icon`,
|
|
8206
8948
|
size: getIconSize(typography)
|
|
8207
8949
|
})), [leftIcon, typography, children, rightIcon]);
|
|
8208
8950
|
|
|
@@ -8217,7 +8959,7 @@ const Link = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8217
8959
|
ref: ref,
|
|
8218
8960
|
disabled: isDisabled,
|
|
8219
8961
|
className: classnames(className, handleBasicClasses({
|
|
8220
|
-
prefix: CLASSNAME$
|
|
8962
|
+
prefix: CLASSNAME$A,
|
|
8221
8963
|
color,
|
|
8222
8964
|
colorVariant
|
|
8223
8965
|
}))
|
|
@@ -8229,17 +8971,17 @@ const Link = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8229
8971
|
href,
|
|
8230
8972
|
target,
|
|
8231
8973
|
className: classnames(className, handleBasicClasses({
|
|
8232
|
-
prefix: CLASSNAME$
|
|
8974
|
+
prefix: CLASSNAME$A,
|
|
8233
8975
|
color,
|
|
8234
8976
|
colorVariant
|
|
8235
8977
|
})),
|
|
8236
8978
|
ref: ref
|
|
8237
8979
|
}), renderedChildren);
|
|
8238
8980
|
});
|
|
8239
|
-
Link.displayName = COMPONENT_NAME$
|
|
8240
|
-
Link.className = CLASSNAME$
|
|
8981
|
+
Link.displayName = COMPONENT_NAME$D;
|
|
8982
|
+
Link.className = CLASSNAME$A;
|
|
8241
8983
|
|
|
8242
|
-
const _excluded$
|
|
8984
|
+
const _excluded$H = ["className", "description", "link", "linkAs", "linkProps", "size", "theme", "thumbnailProps", "title", "titleHeading"];
|
|
8243
8985
|
|
|
8244
8986
|
/**
|
|
8245
8987
|
* Defines the props of the component.
|
|
@@ -8248,12 +8990,12 @@ const _excluded$E = ["className", "description", "link", "linkAs", "linkProps",
|
|
|
8248
8990
|
/**
|
|
8249
8991
|
* Component display name.
|
|
8250
8992
|
*/
|
|
8251
|
-
const COMPONENT_NAME$
|
|
8993
|
+
const COMPONENT_NAME$E = 'LinkPreview';
|
|
8252
8994
|
|
|
8253
8995
|
/**
|
|
8254
8996
|
* Component default class name and class prefix.
|
|
8255
8997
|
*/
|
|
8256
|
-
const CLASSNAME$
|
|
8998
|
+
const CLASSNAME$B = getRootClassName(COMPONENT_NAME$E);
|
|
8257
8999
|
|
|
8258
9000
|
/**
|
|
8259
9001
|
* Component default props.
|
|
@@ -8284,21 +9026,21 @@ const LinkPreview = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8284
9026
|
title,
|
|
8285
9027
|
titleHeading
|
|
8286
9028
|
} = props,
|
|
8287
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9029
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$H);
|
|
8288
9030
|
// Use title heading as title wrapper (see DEFAULT_PROPS for the default value).
|
|
8289
9031
|
const TitleHeading = titleHeading;
|
|
8290
9032
|
return /*#__PURE__*/React.createElement("article", _extends({
|
|
8291
9033
|
ref: ref
|
|
8292
9034
|
}, forwardedProps, {
|
|
8293
9035
|
className: classnames(className, handleBasicClasses({
|
|
8294
|
-
prefix: CLASSNAME$
|
|
9036
|
+
prefix: CLASSNAME$B,
|
|
8295
9037
|
size: size === Size.big && thumbnailProps ? Size.big : Size.regular,
|
|
8296
9038
|
theme
|
|
8297
9039
|
}))
|
|
8298
9040
|
}), /*#__PURE__*/React.createElement("div", {
|
|
8299
|
-
className: `${CLASSNAME$
|
|
9041
|
+
className: `${CLASSNAME$B}__wrapper`
|
|
8300
9042
|
}, thumbnailProps && /*#__PURE__*/React.createElement("div", {
|
|
8301
|
-
className: `${CLASSNAME$
|
|
9043
|
+
className: `${CLASSNAME$B}__thumbnail`
|
|
8302
9044
|
}, /*#__PURE__*/React.createElement(Thumbnail, _extends({}, thumbnailProps, {
|
|
8303
9045
|
linkAs: linkAs,
|
|
8304
9046
|
linkProps: _objectSpread2(_objectSpread2({}, linkProps), {}, {
|
|
@@ -8310,9 +9052,9 @@ const LinkPreview = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8310
9052
|
aspectRatio: AspectRatio.free,
|
|
8311
9053
|
fillHeight: true
|
|
8312
9054
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
8313
|
-
className: `${CLASSNAME$
|
|
9055
|
+
className: `${CLASSNAME$B}__container`
|
|
8314
9056
|
}, title && /*#__PURE__*/React.createElement(TitleHeading, {
|
|
8315
|
-
className: `${CLASSNAME$
|
|
9057
|
+
className: `${CLASSNAME$B}__title`
|
|
8316
9058
|
}, /*#__PURE__*/React.createElement(Link, _extends({}, linkProps, {
|
|
8317
9059
|
linkAs: linkAs,
|
|
8318
9060
|
target: "_blank",
|
|
@@ -8320,12 +9062,12 @@ const LinkPreview = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8320
9062
|
color: theme === Theme.light ? ColorPalette.dark : ColorPalette.light,
|
|
8321
9063
|
colorVariant: ColorVariant.N
|
|
8322
9064
|
}), title)), description && /*#__PURE__*/React.createElement("p", {
|
|
8323
|
-
className: `${CLASSNAME$
|
|
9065
|
+
className: `${CLASSNAME$B}__description`
|
|
8324
9066
|
}, description), /*#__PURE__*/React.createElement("div", {
|
|
8325
|
-
className: `${CLASSNAME$
|
|
9067
|
+
className: `${CLASSNAME$B}__link`
|
|
8326
9068
|
}, /*#__PURE__*/React.createElement(Link, _extends({}, linkProps, {
|
|
8327
9069
|
linkAs: linkAs,
|
|
8328
|
-
className: classnames(`${CLASSNAME$
|
|
9070
|
+
className: classnames(`${CLASSNAME$B}__link`, linkProps === null || linkProps === void 0 ? void 0 : linkProps.className),
|
|
8329
9071
|
target: "_blank",
|
|
8330
9072
|
href: link,
|
|
8331
9073
|
color: theme === Theme.light ? ColorPalette.primary : ColorPalette.light,
|
|
@@ -8335,11 +9077,11 @@ const LinkPreview = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8335
9077
|
tabIndex: title ? '-1' : undefined
|
|
8336
9078
|
}), link)))));
|
|
8337
9079
|
});
|
|
8338
|
-
LinkPreview.displayName = COMPONENT_NAME$
|
|
8339
|
-
LinkPreview.className = CLASSNAME$
|
|
9080
|
+
LinkPreview.displayName = COMPONENT_NAME$E;
|
|
9081
|
+
LinkPreview.className = CLASSNAME$B;
|
|
8340
9082
|
LinkPreview.defaultProps = DEFAULT_PROPS$u;
|
|
8341
9083
|
|
|
8342
|
-
const _excluded$
|
|
9084
|
+
const _excluded$I = ["className"];
|
|
8343
9085
|
|
|
8344
9086
|
/**
|
|
8345
9087
|
* Defines the props of the component.
|
|
@@ -8348,12 +9090,12 @@ const _excluded$F = ["className"];
|
|
|
8348
9090
|
/**
|
|
8349
9091
|
* Component display name.
|
|
8350
9092
|
*/
|
|
8351
|
-
const COMPONENT_NAME$
|
|
9093
|
+
const COMPONENT_NAME$F = 'ListDivider';
|
|
8352
9094
|
|
|
8353
9095
|
/**
|
|
8354
9096
|
* Component default class name and class prefix.
|
|
8355
9097
|
*/
|
|
8356
|
-
const CLASSNAME$
|
|
9098
|
+
const CLASSNAME$C = getRootClassName(COMPONENT_NAME$F);
|
|
8357
9099
|
|
|
8358
9100
|
/**
|
|
8359
9101
|
* ListDivider component.
|
|
@@ -8366,19 +9108,19 @@ const ListDivider = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8366
9108
|
const {
|
|
8367
9109
|
className
|
|
8368
9110
|
} = props,
|
|
8369
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9111
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$I);
|
|
8370
9112
|
return /*#__PURE__*/React.createElement("li", _extends({
|
|
8371
9113
|
ref: ref
|
|
8372
9114
|
}, forwardedProps, {
|
|
8373
9115
|
className: classnames(className, handleBasicClasses({
|
|
8374
|
-
prefix: CLASSNAME$
|
|
9116
|
+
prefix: CLASSNAME$C
|
|
8375
9117
|
}))
|
|
8376
9118
|
}));
|
|
8377
9119
|
});
|
|
8378
|
-
ListDivider.displayName = COMPONENT_NAME$
|
|
8379
|
-
ListDivider.className = CLASSNAME$
|
|
9120
|
+
ListDivider.displayName = COMPONENT_NAME$F;
|
|
9121
|
+
ListDivider.className = CLASSNAME$C;
|
|
8380
9122
|
|
|
8381
|
-
const _excluded$
|
|
9123
|
+
const _excluded$J = ["children", "className"];
|
|
8382
9124
|
|
|
8383
9125
|
/**
|
|
8384
9126
|
* Defines the props of the component.
|
|
@@ -8387,12 +9129,12 @@ const _excluded$G = ["children", "className"];
|
|
|
8387
9129
|
/**
|
|
8388
9130
|
* Component display name.
|
|
8389
9131
|
*/
|
|
8390
|
-
const COMPONENT_NAME$
|
|
9132
|
+
const COMPONENT_NAME$G = 'ListSubheader';
|
|
8391
9133
|
|
|
8392
9134
|
/**
|
|
8393
9135
|
* Component default class name and class prefix.
|
|
8394
9136
|
*/
|
|
8395
|
-
const CLASSNAME$
|
|
9137
|
+
const CLASSNAME$D = getRootClassName(COMPONENT_NAME$G);
|
|
8396
9138
|
|
|
8397
9139
|
/**
|
|
8398
9140
|
* ListSubheader component.
|
|
@@ -8406,19 +9148,19 @@ const ListSubheader = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8406
9148
|
children,
|
|
8407
9149
|
className
|
|
8408
9150
|
} = props,
|
|
8409
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9151
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$J);
|
|
8410
9152
|
return /*#__PURE__*/React.createElement("li", _extends({
|
|
8411
9153
|
ref: ref
|
|
8412
9154
|
}, forwardedProps, {
|
|
8413
9155
|
className: classnames(className, handleBasicClasses({
|
|
8414
|
-
prefix: CLASSNAME$
|
|
9156
|
+
prefix: CLASSNAME$D
|
|
8415
9157
|
}))
|
|
8416
9158
|
}), children);
|
|
8417
9159
|
});
|
|
8418
|
-
ListSubheader.displayName = COMPONENT_NAME$
|
|
8419
|
-
ListSubheader.className = CLASSNAME$
|
|
9160
|
+
ListSubheader.displayName = COMPONENT_NAME$G;
|
|
9161
|
+
ListSubheader.className = CLASSNAME$D;
|
|
8420
9162
|
|
|
8421
|
-
const _excluded$
|
|
9163
|
+
const _excluded$K = ["children", "className", "hasBackground", "kind", "icon", "closeButtonProps"];
|
|
8422
9164
|
|
|
8423
9165
|
/**
|
|
8424
9166
|
* Defines the props of the component.
|
|
@@ -8427,12 +9169,12 @@ const _excluded$H = ["children", "className", "hasBackground", "kind", "icon", "
|
|
|
8427
9169
|
/**
|
|
8428
9170
|
* Component display name.
|
|
8429
9171
|
*/
|
|
8430
|
-
const COMPONENT_NAME$
|
|
9172
|
+
const COMPONENT_NAME$H = 'Message';
|
|
8431
9173
|
|
|
8432
9174
|
/**
|
|
8433
9175
|
* Component default class name and class prefix.
|
|
8434
9176
|
*/
|
|
8435
|
-
const CLASSNAME$
|
|
9177
|
+
const CLASSNAME$E = getRootClassName(COMPONENT_NAME$H);
|
|
8436
9178
|
|
|
8437
9179
|
/**
|
|
8438
9180
|
* Associative map from message kind to color and icon.
|
|
@@ -8472,7 +9214,7 @@ const Message = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8472
9214
|
icon: customIcon,
|
|
8473
9215
|
closeButtonProps
|
|
8474
9216
|
} = props,
|
|
8475
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9217
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$K);
|
|
8476
9218
|
const {
|
|
8477
9219
|
color,
|
|
8478
9220
|
icon
|
|
@@ -8487,27 +9229,27 @@ const Message = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8487
9229
|
className: classnames(className, handleBasicClasses({
|
|
8488
9230
|
color,
|
|
8489
9231
|
hasBackground,
|
|
8490
|
-
prefix: CLASSNAME$
|
|
9232
|
+
prefix: CLASSNAME$E
|
|
8491
9233
|
}))
|
|
8492
9234
|
}, forwardedProps), (customIcon || icon) && /*#__PURE__*/React.createElement(Icon, {
|
|
8493
|
-
className: `${CLASSNAME$
|
|
9235
|
+
className: `${CLASSNAME$E}__icon`,
|
|
8494
9236
|
icon: customIcon || icon,
|
|
8495
9237
|
size: Size.xs,
|
|
8496
9238
|
color: color
|
|
8497
9239
|
}), /*#__PURE__*/React.createElement("div", {
|
|
8498
|
-
className: `${CLASSNAME$
|
|
9240
|
+
className: `${CLASSNAME$E}__text`
|
|
8499
9241
|
}, children), isCloseButtonDisplayed && /*#__PURE__*/React.createElement(IconButton, {
|
|
8500
|
-
className: `${CLASSNAME$
|
|
9242
|
+
className: `${CLASSNAME$E}__close-button`,
|
|
8501
9243
|
icon: mdiClose,
|
|
8502
9244
|
onClick: onClick,
|
|
8503
9245
|
label: closeButtonLabel,
|
|
8504
9246
|
emphasis: Emphasis.low
|
|
8505
9247
|
}));
|
|
8506
9248
|
});
|
|
8507
|
-
Message.displayName = COMPONENT_NAME$
|
|
8508
|
-
Message.className = CLASSNAME$
|
|
9249
|
+
Message.displayName = COMPONENT_NAME$H;
|
|
9250
|
+
Message.className = CLASSNAME$E;
|
|
8509
9251
|
|
|
8510
|
-
const _excluded$
|
|
9252
|
+
const _excluded$L = ["className", "theme", "thumbnails", "onImageClick"],
|
|
8511
9253
|
_excluded2$1 = ["image", "onClick", "align"];
|
|
8512
9254
|
|
|
8513
9255
|
/**
|
|
@@ -8517,12 +9259,12 @@ const _excluded$I = ["className", "theme", "thumbnails", "onImageClick"],
|
|
|
8517
9259
|
/**
|
|
8518
9260
|
* Component display name.
|
|
8519
9261
|
*/
|
|
8520
|
-
const COMPONENT_NAME$
|
|
9262
|
+
const COMPONENT_NAME$I = 'Mosaic';
|
|
8521
9263
|
|
|
8522
9264
|
/**
|
|
8523
9265
|
* Component default class name and class prefix.
|
|
8524
9266
|
*/
|
|
8525
|
-
const CLASSNAME$
|
|
9267
|
+
const CLASSNAME$F = getRootClassName(COMPONENT_NAME$I);
|
|
8526
9268
|
|
|
8527
9269
|
/**
|
|
8528
9270
|
* Component default props.
|
|
@@ -8545,7 +9287,7 @@ const Mosaic = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8545
9287
|
thumbnails,
|
|
8546
9288
|
onImageClick
|
|
8547
9289
|
} = props,
|
|
8548
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9290
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$L);
|
|
8549
9291
|
const handleImageClick = useMemo(() => {
|
|
8550
9292
|
if (!onImageClick) return undefined;
|
|
8551
9293
|
return (index, onClick) => event => {
|
|
@@ -8557,16 +9299,16 @@ const Mosaic = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8557
9299
|
ref: ref
|
|
8558
9300
|
}, forwardedProps, {
|
|
8559
9301
|
className: classnames(className, handleBasicClasses({
|
|
8560
|
-
prefix: CLASSNAME$
|
|
9302
|
+
prefix: CLASSNAME$F,
|
|
8561
9303
|
theme
|
|
8562
9304
|
}), {
|
|
8563
|
-
[`${CLASSNAME$
|
|
8564
|
-
[`${CLASSNAME$
|
|
8565
|
-
[`${CLASSNAME$
|
|
8566
|
-
[`${CLASSNAME$
|
|
9305
|
+
[`${CLASSNAME$F}--has-1-thumbnail`]: (thumbnails === null || thumbnails === void 0 ? void 0 : thumbnails.length) === 1,
|
|
9306
|
+
[`${CLASSNAME$F}--has-2-thumbnails`]: (thumbnails === null || thumbnails === void 0 ? void 0 : thumbnails.length) === 2,
|
|
9307
|
+
[`${CLASSNAME$F}--has-3-thumbnails`]: (thumbnails === null || thumbnails === void 0 ? void 0 : thumbnails.length) === 3,
|
|
9308
|
+
[`${CLASSNAME$F}--has-4-thumbnails`]: (thumbnails === null || thumbnails === void 0 ? void 0 : thumbnails.length) >= 4
|
|
8567
9309
|
})
|
|
8568
9310
|
}), /*#__PURE__*/React.createElement("div", {
|
|
8569
|
-
className: `${CLASSNAME$
|
|
9311
|
+
className: `${CLASSNAME$F}__wrapper`
|
|
8570
9312
|
}, take(thumbnails, 4).map((thumbnail, index) => {
|
|
8571
9313
|
const {
|
|
8572
9314
|
image,
|
|
@@ -8576,7 +9318,7 @@ const Mosaic = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8576
9318
|
thumbnailProps = _objectWithoutProperties(thumbnail, _excluded2$1);
|
|
8577
9319
|
return /*#__PURE__*/React.createElement("div", {
|
|
8578
9320
|
key: index,
|
|
8579
|
-
className: `${CLASSNAME$
|
|
9321
|
+
className: `${CLASSNAME$F}__thumbnail`
|
|
8580
9322
|
}, /*#__PURE__*/React.createElement(Thumbnail, _extends({}, thumbnailProps, {
|
|
8581
9323
|
align: align || Alignment.left,
|
|
8582
9324
|
image: image,
|
|
@@ -8585,12 +9327,12 @@ const Mosaic = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8585
9327
|
fillHeight: true,
|
|
8586
9328
|
onClick: (handleImageClick === null || handleImageClick === void 0 ? void 0 : handleImageClick(index, onClick)) || onClick
|
|
8587
9329
|
})), thumbnails.length > 4 && index === 3 && /*#__PURE__*/React.createElement("div", {
|
|
8588
|
-
className: `${CLASSNAME$
|
|
9330
|
+
className: `${CLASSNAME$F}__overlay`
|
|
8589
9331
|
}, /*#__PURE__*/React.createElement("span", null, "+", thumbnails.length - 4)));
|
|
8590
9332
|
})));
|
|
8591
9333
|
});
|
|
8592
|
-
Mosaic.displayName = COMPONENT_NAME$
|
|
8593
|
-
Mosaic.className = CLASSNAME$
|
|
9334
|
+
Mosaic.displayName = COMPONENT_NAME$I;
|
|
9335
|
+
Mosaic.className = CLASSNAME$F;
|
|
8594
9336
|
Mosaic.defaultProps = DEFAULT_PROPS$v;
|
|
8595
9337
|
|
|
8596
9338
|
const ThemeContext = /*#__PURE__*/createContext(undefined);
|
|
@@ -8600,7 +9342,7 @@ function forwardRefPolymorphic(render) {
|
|
|
8600
9342
|
return /*#__PURE__*/React.forwardRef(render);
|
|
8601
9343
|
}
|
|
8602
9344
|
|
|
8603
|
-
const _excluded$
|
|
9345
|
+
const _excluded$M = ["className", "icon", "label", "isCurrentPage", "as"];
|
|
8604
9346
|
|
|
8605
9347
|
/** Make `href` required when `as` is `a` */
|
|
8606
9348
|
|
|
@@ -8611,12 +9353,12 @@ const _excluded$J = ["className", "icon", "label", "isCurrentPage", "as"];
|
|
|
8611
9353
|
/**
|
|
8612
9354
|
* Component display name.
|
|
8613
9355
|
*/
|
|
8614
|
-
const COMPONENT_NAME$
|
|
9356
|
+
const COMPONENT_NAME$J = 'NavigationItem';
|
|
8615
9357
|
|
|
8616
9358
|
/**
|
|
8617
9359
|
* Component default class name and class prefix.
|
|
8618
9360
|
*/
|
|
8619
|
-
const CLASSNAME$
|
|
9361
|
+
const CLASSNAME$G = getRootClassName(COMPONENT_NAME$J);
|
|
8620
9362
|
const NavigationItem = Object.assign(forwardRefPolymorphic((props, ref) => {
|
|
8621
9363
|
const {
|
|
8622
9364
|
className,
|
|
@@ -8625,7 +9367,7 @@ const NavigationItem = Object.assign(forwardRefPolymorphic((props, ref) => {
|
|
|
8625
9367
|
isCurrentPage,
|
|
8626
9368
|
as: Element = 'a'
|
|
8627
9369
|
} = props,
|
|
8628
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9370
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$M);
|
|
8629
9371
|
const theme = useContext(ThemeContext);
|
|
8630
9372
|
const {
|
|
8631
9373
|
tooltipLabel,
|
|
@@ -8636,7 +9378,7 @@ const NavigationItem = Object.assign(forwardRefPolymorphic((props, ref) => {
|
|
|
8636
9378
|
} : {};
|
|
8637
9379
|
return /*#__PURE__*/React.createElement("li", {
|
|
8638
9380
|
className: classnames(className, handleBasicClasses({
|
|
8639
|
-
prefix: CLASSNAME$
|
|
9381
|
+
prefix: CLASSNAME$G,
|
|
8640
9382
|
theme
|
|
8641
9383
|
}))
|
|
8642
9384
|
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
@@ -8644,41 +9386,41 @@ const NavigationItem = Object.assign(forwardRefPolymorphic((props, ref) => {
|
|
|
8644
9386
|
placement: Placement.TOP
|
|
8645
9387
|
}, /*#__PURE__*/React.createElement(Element, _extends({
|
|
8646
9388
|
className: handleBasicClasses({
|
|
8647
|
-
prefix: `${CLASSNAME$
|
|
9389
|
+
prefix: `${CLASSNAME$G}__link`,
|
|
8648
9390
|
isSelected: isCurrentPage
|
|
8649
9391
|
}),
|
|
8650
9392
|
ref: ref,
|
|
8651
9393
|
"aria-current": isCurrentPage ? 'page' : undefined
|
|
8652
9394
|
}, buttonProps, forwardedProps), icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
8653
|
-
className: `${CLASSNAME$
|
|
9395
|
+
className: `${CLASSNAME$G}__icon`,
|
|
8654
9396
|
icon: icon,
|
|
8655
9397
|
size: Size.xs,
|
|
8656
9398
|
theme: theme
|
|
8657
9399
|
}) : null, /*#__PURE__*/React.createElement(Text, {
|
|
8658
9400
|
as: "span",
|
|
8659
9401
|
truncate: true,
|
|
8660
|
-
className: `${CLASSNAME$
|
|
9402
|
+
className: `${CLASSNAME$G}__label`,
|
|
8661
9403
|
ref: labelRef
|
|
8662
9404
|
}, label))));
|
|
8663
9405
|
}), {
|
|
8664
|
-
displayName: COMPONENT_NAME$
|
|
8665
|
-
className: CLASSNAME$
|
|
9406
|
+
displayName: COMPONENT_NAME$J,
|
|
9407
|
+
className: CLASSNAME$G
|
|
8666
9408
|
});
|
|
8667
9409
|
|
|
8668
9410
|
const NavigationContext = /*#__PURE__*/createContext({
|
|
8669
9411
|
orientation: Orientation.vertical
|
|
8670
9412
|
});
|
|
8671
9413
|
|
|
8672
|
-
const _excluded$
|
|
9414
|
+
const _excluded$N = ["children", "className", "label", "icon"];
|
|
8673
9415
|
/**
|
|
8674
9416
|
* Component display name.
|
|
8675
9417
|
*/
|
|
8676
|
-
const COMPONENT_NAME$
|
|
9418
|
+
const COMPONENT_NAME$K = 'NavigationSection';
|
|
8677
9419
|
|
|
8678
9420
|
/**
|
|
8679
9421
|
* Component default class name and class prefix.
|
|
8680
9422
|
*/
|
|
8681
|
-
const CLASSNAME$
|
|
9423
|
+
const CLASSNAME$H = getRootClassName(COMPONENT_NAME$K);
|
|
8682
9424
|
const NavigationSection = Object.assign( /*#__PURE__*/forwardRef((props, ref) => {
|
|
8683
9425
|
const {
|
|
8684
9426
|
children,
|
|
@@ -8686,7 +9428,7 @@ const NavigationSection = Object.assign( /*#__PURE__*/forwardRef((props, ref) =>
|
|
|
8686
9428
|
label,
|
|
8687
9429
|
icon
|
|
8688
9430
|
} = props,
|
|
8689
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9431
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$N);
|
|
8690
9432
|
const [isOpen, setIsOpen] = useState(false);
|
|
8691
9433
|
const buttonRef = useRef(null);
|
|
8692
9434
|
const sectionId = useMemo(() => uniqueId('section'), []);
|
|
@@ -8696,15 +9438,15 @@ const NavigationSection = Object.assign( /*#__PURE__*/forwardRef((props, ref) =>
|
|
|
8696
9438
|
const theme = useContext(ThemeContext);
|
|
8697
9439
|
const isDropdown = orientation === Orientation.horizontal;
|
|
8698
9440
|
return /*#__PURE__*/React.createElement("li", _extends({
|
|
8699
|
-
className: classnames(className, CLASSNAME$
|
|
8700
|
-
prefix: CLASSNAME$
|
|
9441
|
+
className: classnames(className, CLASSNAME$H, CLASSNAME$G, handleBasicClasses({
|
|
9442
|
+
prefix: CLASSNAME$G,
|
|
8701
9443
|
theme
|
|
8702
9444
|
})),
|
|
8703
9445
|
ref: ref
|
|
8704
9446
|
}, forwardedProps), /*#__PURE__*/React.createElement("button", {
|
|
8705
9447
|
"aria-controls": sectionId,
|
|
8706
9448
|
"aria-expanded": isOpen,
|
|
8707
|
-
className: classnames(`${CLASSNAME$
|
|
9449
|
+
className: classnames(`${CLASSNAME$G}__link`),
|
|
8708
9450
|
ref: buttonRef,
|
|
8709
9451
|
onClick: event => {
|
|
8710
9452
|
setIsOpen(!isOpen);
|
|
@@ -8712,16 +9454,16 @@ const NavigationSection = Object.assign( /*#__PURE__*/forwardRef((props, ref) =>
|
|
|
8712
9454
|
},
|
|
8713
9455
|
type: "button"
|
|
8714
9456
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
8715
|
-
className: `${CLASSNAME$
|
|
9457
|
+
className: `${CLASSNAME$G}__icon`,
|
|
8716
9458
|
icon: icon,
|
|
8717
9459
|
size: Size.xs
|
|
8718
9460
|
}) : null, /*#__PURE__*/React.createElement(Text, {
|
|
8719
9461
|
as: "span",
|
|
8720
9462
|
truncate: true,
|
|
8721
|
-
className: `${CLASSNAME$
|
|
9463
|
+
className: `${CLASSNAME$G}__label`,
|
|
8722
9464
|
ref: ref
|
|
8723
9465
|
}, label), /*#__PURE__*/React.createElement(Icon, {
|
|
8724
|
-
className: classnames(`${CLASSNAME$
|
|
9466
|
+
className: classnames(`${CLASSNAME$G}__icon`, `${CLASSNAME$H}__chevron`),
|
|
8725
9467
|
icon: isOpen ? mdiChevronUp : mdiChevronDown
|
|
8726
9468
|
})), isOpen && (isDropdown ? /*#__PURE__*/React.createElement(Popover, {
|
|
8727
9469
|
anchorRef: buttonRef,
|
|
@@ -8736,31 +9478,31 @@ const NavigationSection = Object.assign( /*#__PURE__*/forwardRef((props, ref) =>
|
|
|
8736
9478
|
}, /*#__PURE__*/React.createElement(ThemeContext.Provider, {
|
|
8737
9479
|
value: Theme.light
|
|
8738
9480
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
8739
|
-
className: `${CLASSNAME$
|
|
9481
|
+
className: `${CLASSNAME$H}__drawer--popover`,
|
|
8740
9482
|
id: sectionId
|
|
8741
9483
|
}, /*#__PURE__*/React.createElement(NavigationContext.Provider, {
|
|
8742
9484
|
value: {
|
|
8743
9485
|
orientation: Orientation.vertical
|
|
8744
9486
|
}
|
|
8745
9487
|
}, children)))) : /*#__PURE__*/React.createElement("ul", {
|
|
8746
|
-
className: `${CLASSNAME$
|
|
9488
|
+
className: `${CLASSNAME$H}__drawer`,
|
|
8747
9489
|
id: sectionId
|
|
8748
9490
|
}, children)));
|
|
8749
9491
|
}), {
|
|
8750
|
-
displayName: COMPONENT_NAME$
|
|
8751
|
-
className: CLASSNAME$
|
|
9492
|
+
displayName: COMPONENT_NAME$K,
|
|
9493
|
+
className: CLASSNAME$H
|
|
8752
9494
|
});
|
|
8753
9495
|
|
|
8754
|
-
const _excluded$
|
|
9496
|
+
const _excluded$O = ["children", "className", "theme", "orientation"];
|
|
8755
9497
|
/**
|
|
8756
9498
|
* Component display name.
|
|
8757
9499
|
*/
|
|
8758
|
-
const COMPONENT_NAME$
|
|
9500
|
+
const COMPONENT_NAME$L = 'Navigation';
|
|
8759
9501
|
|
|
8760
9502
|
/**
|
|
8761
9503
|
* Component default class name and class prefix.
|
|
8762
9504
|
*/
|
|
8763
|
-
const CLASSNAME$
|
|
9505
|
+
const CLASSNAME$I = getRootClassName(COMPONENT_NAME$L);
|
|
8764
9506
|
const Navigation = Object.assign(
|
|
8765
9507
|
/*#__PURE__*/
|
|
8766
9508
|
// eslint-disable-next-line react/display-name
|
|
@@ -8771,12 +9513,12 @@ forwardRef((props, ref) => {
|
|
|
8771
9513
|
theme,
|
|
8772
9514
|
orientation
|
|
8773
9515
|
} = props,
|
|
8774
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9516
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$O);
|
|
8775
9517
|
return /*#__PURE__*/React.createElement(ThemeContext.Provider, {
|
|
8776
9518
|
value: theme
|
|
8777
9519
|
}, /*#__PURE__*/React.createElement("nav", _extends({
|
|
8778
9520
|
className: classnames(className, handleBasicClasses({
|
|
8779
|
-
prefix: CLASSNAME$
|
|
9521
|
+
prefix: CLASSNAME$I,
|
|
8780
9522
|
theme,
|
|
8781
9523
|
orientation
|
|
8782
9524
|
})),
|
|
@@ -8786,11 +9528,11 @@ forwardRef((props, ref) => {
|
|
|
8786
9528
|
orientation
|
|
8787
9529
|
}
|
|
8788
9530
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
8789
|
-
className: `${CLASSNAME$
|
|
9531
|
+
className: `${CLASSNAME$I}__list`
|
|
8790
9532
|
}, children))));
|
|
8791
9533
|
}), {
|
|
8792
|
-
displayName: COMPONENT_NAME$
|
|
8793
|
-
className: CLASSNAME$
|
|
9534
|
+
displayName: COMPONENT_NAME$L,
|
|
9535
|
+
className: CLASSNAME$I,
|
|
8794
9536
|
defaultProps: {
|
|
8795
9537
|
theme: Theme.light,
|
|
8796
9538
|
orientation: Orientation.vertical
|
|
@@ -8822,7 +9564,7 @@ const NOTIFICATION_CONFIGURATION = {
|
|
|
8822
9564
|
}
|
|
8823
9565
|
};
|
|
8824
9566
|
|
|
8825
|
-
const _excluded$
|
|
9567
|
+
const _excluded$P = ["actionLabel", "className", "content", "isOpen", "onActionClick", "onClick", "theme", "type", "zIndex", "usePortal", "style"];
|
|
8826
9568
|
|
|
8827
9569
|
/**
|
|
8828
9570
|
* Defines the props of the component.
|
|
@@ -8831,12 +9573,12 @@ const _excluded$M = ["actionLabel", "className", "content", "isOpen", "onActionC
|
|
|
8831
9573
|
/**
|
|
8832
9574
|
* Component display name.
|
|
8833
9575
|
*/
|
|
8834
|
-
const COMPONENT_NAME$
|
|
9576
|
+
const COMPONENT_NAME$M = 'Notification';
|
|
8835
9577
|
|
|
8836
9578
|
/**
|
|
8837
9579
|
* Component default class name and class prefix.
|
|
8838
9580
|
*/
|
|
8839
|
-
const CLASSNAME$
|
|
9581
|
+
const CLASSNAME$J = getRootClassName(COMPONENT_NAME$M);
|
|
8840
9582
|
|
|
8841
9583
|
/**
|
|
8842
9584
|
* Component default props.
|
|
@@ -8869,7 +9611,7 @@ const Notification = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8869
9611
|
usePortal,
|
|
8870
9612
|
style
|
|
8871
9613
|
} = props,
|
|
8872
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9614
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$P);
|
|
8873
9615
|
if (!DOCUMENT) {
|
|
8874
9616
|
// Can't render in SSR.
|
|
8875
9617
|
return null;
|
|
@@ -8901,21 +9643,21 @@ const Notification = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8901
9643
|
color,
|
|
8902
9644
|
hasAction,
|
|
8903
9645
|
isHidden: !isOpen,
|
|
8904
|
-
prefix: CLASSNAME$
|
|
9646
|
+
prefix: CLASSNAME$J
|
|
8905
9647
|
})),
|
|
8906
9648
|
onClick: onClick,
|
|
8907
9649
|
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
8908
9650
|
zIndex
|
|
8909
9651
|
})
|
|
8910
9652
|
}), /*#__PURE__*/React.createElement("div", {
|
|
8911
|
-
className: `${CLASSNAME$
|
|
9653
|
+
className: `${CLASSNAME$J}__icon`
|
|
8912
9654
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
8913
9655
|
icon: icon,
|
|
8914
9656
|
size: Size.s
|
|
8915
9657
|
})), /*#__PURE__*/React.createElement("div", {
|
|
8916
|
-
className: `${CLASSNAME$
|
|
9658
|
+
className: `${CLASSNAME$J}__content`
|
|
8917
9659
|
}, content), hasAction && /*#__PURE__*/React.createElement("div", {
|
|
8918
|
-
className: `${CLASSNAME$
|
|
9660
|
+
className: `${CLASSNAME$J}__action`
|
|
8919
9661
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
8920
9662
|
emphasis: Emphasis.medium,
|
|
8921
9663
|
theme: theme,
|
|
@@ -8923,11 +9665,11 @@ const Notification = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8923
9665
|
}, /*#__PURE__*/React.createElement("span", null, actionLabel))));
|
|
8924
9666
|
return usePortal ? /*#__PURE__*/createPortal(notification, document.body) : notification;
|
|
8925
9667
|
});
|
|
8926
|
-
Notification.displayName = COMPONENT_NAME$
|
|
8927
|
-
Notification.className = CLASSNAME$
|
|
9668
|
+
Notification.displayName = COMPONENT_NAME$M;
|
|
9669
|
+
Notification.className = CLASSNAME$J;
|
|
8928
9670
|
Notification.defaultProps = DEFAULT_PROPS$w;
|
|
8929
9671
|
|
|
8930
|
-
const _excluded$
|
|
9672
|
+
const _excluded$Q = ["children", "isOpen", "focusElement", "aria-label", "label", "className"];
|
|
8931
9673
|
|
|
8932
9674
|
/**
|
|
8933
9675
|
* PopoverDialog props.
|
|
@@ -8937,12 +9679,12 @@ const _excluded$N = ["children", "isOpen", "focusElement", "aria-label", "label"
|
|
|
8937
9679
|
/**
|
|
8938
9680
|
* Component display name.
|
|
8939
9681
|
*/
|
|
8940
|
-
const COMPONENT_NAME$
|
|
9682
|
+
const COMPONENT_NAME$N = 'PopoverDialog';
|
|
8941
9683
|
|
|
8942
9684
|
/**
|
|
8943
9685
|
* Component default class name and class prefix.
|
|
8944
9686
|
*/
|
|
8945
|
-
const CLASSNAME$
|
|
9687
|
+
const CLASSNAME$K = getRootClassName(COMPONENT_NAME$N);
|
|
8946
9688
|
|
|
8947
9689
|
/**
|
|
8948
9690
|
* Component default props.
|
|
@@ -8965,11 +9707,11 @@ const PopoverDialog = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8965
9707
|
label = ariaLabel,
|
|
8966
9708
|
className
|
|
8967
9709
|
} = props,
|
|
8968
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9710
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$Q);
|
|
8969
9711
|
return /*#__PURE__*/React.createElement(Popover, _extends({}, forwardedProps, {
|
|
8970
9712
|
ref: ref,
|
|
8971
9713
|
className: classnames(className, handleBasicClasses({
|
|
8972
|
-
prefix: CLASSNAME$
|
|
9714
|
+
prefix: CLASSNAME$K
|
|
8973
9715
|
})),
|
|
8974
9716
|
role: "dialog",
|
|
8975
9717
|
"aria-modal": "true"
|
|
@@ -8985,11 +9727,11 @@ const PopoverDialog = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8985
9727
|
withFocusTrap: true
|
|
8986
9728
|
}), children);
|
|
8987
9729
|
});
|
|
8988
|
-
PopoverDialog.displayName = COMPONENT_NAME$
|
|
8989
|
-
PopoverDialog.className = CLASSNAME$
|
|
9730
|
+
PopoverDialog.displayName = COMPONENT_NAME$N;
|
|
9731
|
+
PopoverDialog.className = CLASSNAME$K;
|
|
8990
9732
|
PopoverDialog.defaultProps = DEFAULT_PROPS$x;
|
|
8991
9733
|
|
|
8992
|
-
const _excluded$
|
|
9734
|
+
const _excluded$R = ["actions", "attachments", "author", "className", "meta", "onClick", "orientation", "tags", "text", "theme", "thumbnailProps", "title"];
|
|
8993
9735
|
|
|
8994
9736
|
/**
|
|
8995
9737
|
* Defines the props of the component.
|
|
@@ -8998,12 +9740,12 @@ const _excluded$O = ["actions", "attachments", "author", "className", "meta", "o
|
|
|
8998
9740
|
/**
|
|
8999
9741
|
* Component display name.
|
|
9000
9742
|
*/
|
|
9001
|
-
const COMPONENT_NAME$
|
|
9743
|
+
const COMPONENT_NAME$O = 'PostBlock';
|
|
9002
9744
|
|
|
9003
9745
|
/**
|
|
9004
9746
|
* Component default class name and class prefix.
|
|
9005
9747
|
*/
|
|
9006
|
-
const CLASSNAME$
|
|
9748
|
+
const CLASSNAME$L = getRootClassName(COMPONENT_NAME$O);
|
|
9007
9749
|
|
|
9008
9750
|
/**
|
|
9009
9751
|
* Component default props.
|
|
@@ -9035,61 +9777,61 @@ const PostBlock = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9035
9777
|
thumbnailProps,
|
|
9036
9778
|
title
|
|
9037
9779
|
} = props,
|
|
9038
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9780
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$R);
|
|
9039
9781
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
9040
9782
|
ref: ref,
|
|
9041
9783
|
className: classnames(className, handleBasicClasses({
|
|
9042
|
-
prefix: CLASSNAME$
|
|
9784
|
+
prefix: CLASSNAME$L,
|
|
9043
9785
|
orientation,
|
|
9044
9786
|
theme
|
|
9045
9787
|
}))
|
|
9046
9788
|
}, forwardedProps), thumbnailProps && /*#__PURE__*/React.createElement("div", {
|
|
9047
|
-
className: `${CLASSNAME$
|
|
9789
|
+
className: `${CLASSNAME$L}__thumbnail`
|
|
9048
9790
|
}, /*#__PURE__*/React.createElement(Thumbnail, _extends({}, thumbnailProps, {
|
|
9049
9791
|
theme: theme,
|
|
9050
9792
|
variant: ThumbnailVariant.rounded
|
|
9051
9793
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
9052
|
-
className: `${CLASSNAME$
|
|
9794
|
+
className: `${CLASSNAME$L}__wrapper`
|
|
9053
9795
|
}, author && /*#__PURE__*/React.createElement("div", {
|
|
9054
|
-
className: `${CLASSNAME$
|
|
9796
|
+
className: `${CLASSNAME$L}__author`
|
|
9055
9797
|
}, author), title && /*#__PURE__*/React.createElement("button", {
|
|
9056
9798
|
type: "button",
|
|
9057
|
-
className: `${CLASSNAME$
|
|
9799
|
+
className: `${CLASSNAME$L}__title`,
|
|
9058
9800
|
onClick: onClick
|
|
9059
9801
|
}, title), meta && /*#__PURE__*/React.createElement("span", {
|
|
9060
|
-
className: `${CLASSNAME$
|
|
9802
|
+
className: `${CLASSNAME$L}__meta`
|
|
9061
9803
|
}, meta), isObject(text) && text.__html ?
|
|
9062
9804
|
/*#__PURE__*/
|
|
9063
9805
|
// eslint-disable-next-line react/no-danger
|
|
9064
9806
|
React.createElement("p", {
|
|
9065
9807
|
dangerouslySetInnerHTML: text,
|
|
9066
|
-
className: `${CLASSNAME$
|
|
9808
|
+
className: `${CLASSNAME$L}__text`
|
|
9067
9809
|
}) : /*#__PURE__*/React.createElement("p", {
|
|
9068
|
-
className: `${CLASSNAME$
|
|
9810
|
+
className: `${CLASSNAME$L}__text`
|
|
9069
9811
|
}, text), attachments && /*#__PURE__*/React.createElement("div", {
|
|
9070
|
-
className: `${CLASSNAME$
|
|
9812
|
+
className: `${CLASSNAME$L}__attachments`
|
|
9071
9813
|
}, attachments), (tags || actions) && /*#__PURE__*/React.createElement("div", {
|
|
9072
|
-
className: `${CLASSNAME$
|
|
9814
|
+
className: `${CLASSNAME$L}__toolbar`
|
|
9073
9815
|
}, tags && /*#__PURE__*/React.createElement("div", {
|
|
9074
|
-
className: `${CLASSNAME$
|
|
9816
|
+
className: `${CLASSNAME$L}__tags`
|
|
9075
9817
|
}, tags), actions && /*#__PURE__*/React.createElement("div", {
|
|
9076
|
-
className: `${CLASSNAME$
|
|
9818
|
+
className: `${CLASSNAME$L}__actions`
|
|
9077
9819
|
}, actions))));
|
|
9078
9820
|
});
|
|
9079
|
-
PostBlock.displayName = COMPONENT_NAME$
|
|
9080
|
-
PostBlock.className = CLASSNAME$
|
|
9821
|
+
PostBlock.displayName = COMPONENT_NAME$O;
|
|
9822
|
+
PostBlock.className = CLASSNAME$L;
|
|
9081
9823
|
PostBlock.defaultProps = DEFAULT_PROPS$y;
|
|
9082
9824
|
|
|
9083
|
-
const _excluded$
|
|
9825
|
+
const _excluded$S = ["className", "theme"];
|
|
9084
9826
|
/**
|
|
9085
9827
|
* Component display name.
|
|
9086
9828
|
*/
|
|
9087
|
-
const COMPONENT_NAME$
|
|
9829
|
+
const COMPONENT_NAME$P = 'ProgressLinear';
|
|
9088
9830
|
|
|
9089
9831
|
/**
|
|
9090
9832
|
* Component default class name and class prefix.
|
|
9091
9833
|
*/
|
|
9092
|
-
const CLASSNAME$
|
|
9834
|
+
const CLASSNAME$M = getRootClassName(COMPONENT_NAME$P);
|
|
9093
9835
|
|
|
9094
9836
|
/**
|
|
9095
9837
|
* Component default props.
|
|
@@ -9110,12 +9852,12 @@ const ProgressLinear = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9110
9852
|
className,
|
|
9111
9853
|
theme
|
|
9112
9854
|
} = props,
|
|
9113
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9855
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$S);
|
|
9114
9856
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
9115
9857
|
ref: ref
|
|
9116
9858
|
}, forwardedProps, {
|
|
9117
9859
|
className: classnames(className, handleBasicClasses({
|
|
9118
|
-
prefix: CLASSNAME$
|
|
9860
|
+
prefix: CLASSNAME$M,
|
|
9119
9861
|
theme
|
|
9120
9862
|
}))
|
|
9121
9863
|
}), /*#__PURE__*/React.createElement("div", {
|
|
@@ -9124,11 +9866,11 @@ const ProgressLinear = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9124
9866
|
className: "lumx-progress-linear__line2"
|
|
9125
9867
|
}));
|
|
9126
9868
|
});
|
|
9127
|
-
ProgressLinear.displayName = COMPONENT_NAME$
|
|
9128
|
-
ProgressLinear.className = CLASSNAME$
|
|
9869
|
+
ProgressLinear.displayName = COMPONENT_NAME$P;
|
|
9870
|
+
ProgressLinear.className = CLASSNAME$M;
|
|
9129
9871
|
ProgressLinear.defaultProps = DEFAULT_PROPS$z;
|
|
9130
9872
|
|
|
9131
|
-
const _excluded$
|
|
9873
|
+
const _excluded$T = ["className", "theme", "size"];
|
|
9132
9874
|
|
|
9133
9875
|
/**
|
|
9134
9876
|
* Progress sizes.
|
|
@@ -9141,12 +9883,12 @@ const _excluded$Q = ["className", "theme", "size"];
|
|
|
9141
9883
|
/**
|
|
9142
9884
|
* Component display name.
|
|
9143
9885
|
*/
|
|
9144
|
-
const COMPONENT_NAME$
|
|
9886
|
+
const COMPONENT_NAME$Q = 'ProgressCircular';
|
|
9145
9887
|
|
|
9146
9888
|
/**
|
|
9147
9889
|
* Component default class name and class prefix.
|
|
9148
9890
|
*/
|
|
9149
|
-
const CLASSNAME$
|
|
9891
|
+
const CLASSNAME$N = getRootClassName(COMPONENT_NAME$Q);
|
|
9150
9892
|
|
|
9151
9893
|
/**
|
|
9152
9894
|
* Component default props.
|
|
@@ -9169,12 +9911,12 @@ const ProgressCircular = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9169
9911
|
theme,
|
|
9170
9912
|
size
|
|
9171
9913
|
} = props,
|
|
9172
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9914
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$T);
|
|
9173
9915
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
9174
9916
|
ref: ref
|
|
9175
9917
|
}, forwardedProps, {
|
|
9176
9918
|
className: classnames(className, handleBasicClasses({
|
|
9177
|
-
prefix: CLASSNAME$
|
|
9919
|
+
prefix: CLASSNAME$N,
|
|
9178
9920
|
theme,
|
|
9179
9921
|
size
|
|
9180
9922
|
}))
|
|
@@ -9194,11 +9936,11 @@ const ProgressCircular = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9194
9936
|
strokeWidth: "5"
|
|
9195
9937
|
})));
|
|
9196
9938
|
});
|
|
9197
|
-
ProgressCircular.displayName = COMPONENT_NAME$
|
|
9198
|
-
ProgressCircular.className = CLASSNAME$
|
|
9939
|
+
ProgressCircular.displayName = COMPONENT_NAME$Q;
|
|
9940
|
+
ProgressCircular.className = CLASSNAME$N;
|
|
9199
9941
|
ProgressCircular.defaultProps = DEFAULT_PROPS$A;
|
|
9200
9942
|
|
|
9201
|
-
const _excluded$
|
|
9943
|
+
const _excluded$U = ["className", "theme", "variant"];
|
|
9202
9944
|
|
|
9203
9945
|
/**
|
|
9204
9946
|
* Progress variants.
|
|
@@ -9215,12 +9957,12 @@ const ProgressVariant = {
|
|
|
9215
9957
|
/**
|
|
9216
9958
|
* Component display name.
|
|
9217
9959
|
*/
|
|
9218
|
-
const COMPONENT_NAME$
|
|
9960
|
+
const COMPONENT_NAME$R = 'Progress';
|
|
9219
9961
|
|
|
9220
9962
|
/**
|
|
9221
9963
|
* Component default class name and class prefix.
|
|
9222
9964
|
*/
|
|
9223
|
-
const CLASSNAME$
|
|
9965
|
+
const CLASSNAME$O = getRootClassName(COMPONENT_NAME$R);
|
|
9224
9966
|
|
|
9225
9967
|
/**
|
|
9226
9968
|
* Component default props.
|
|
@@ -9244,12 +9986,12 @@ const Progress = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9244
9986
|
theme,
|
|
9245
9987
|
variant
|
|
9246
9988
|
} = props,
|
|
9247
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9989
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$U);
|
|
9248
9990
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
9249
9991
|
ref: ref
|
|
9250
9992
|
}, forwardedProps, {
|
|
9251
9993
|
className: classnames(className, handleBasicClasses({
|
|
9252
|
-
prefix: CLASSNAME$
|
|
9994
|
+
prefix: CLASSNAME$O,
|
|
9253
9995
|
theme,
|
|
9254
9996
|
variant
|
|
9255
9997
|
}))
|
|
@@ -9259,8 +10001,8 @@ const Progress = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9259
10001
|
theme: theme
|
|
9260
10002
|
}));
|
|
9261
10003
|
});
|
|
9262
|
-
Progress.displayName = COMPONENT_NAME$
|
|
9263
|
-
Progress.className = CLASSNAME$
|
|
10004
|
+
Progress.displayName = COMPONENT_NAME$R;
|
|
10005
|
+
Progress.className = CLASSNAME$O;
|
|
9264
10006
|
Progress.defaultProps = DEFAULT_PROPS$B;
|
|
9265
10007
|
|
|
9266
10008
|
const INIT_STATE = {
|
|
@@ -9382,7 +10124,7 @@ const useTabProviderContextState = () => {
|
|
|
9382
10124
|
return context === null || context === void 0 ? void 0 : context[0];
|
|
9383
10125
|
};
|
|
9384
10126
|
|
|
9385
|
-
const _excluded$
|
|
10127
|
+
const _excluded$V = ["children", "onChange"];
|
|
9386
10128
|
const DEFAULT_PROPS$C = {
|
|
9387
10129
|
isLazy: INIT_STATE.isLazy,
|
|
9388
10130
|
shouldActivateOnFocus: INIT_STATE.shouldActivateOnFocus
|
|
@@ -9404,7 +10146,7 @@ const ProgressTrackerProvider = props => {
|
|
|
9404
10146
|
children,
|
|
9405
10147
|
onChange
|
|
9406
10148
|
} = props,
|
|
9407
|
-
propState = _objectWithoutProperties(props, _excluded$
|
|
10149
|
+
propState = _objectWithoutProperties(props, _excluded$V);
|
|
9408
10150
|
const [state, dispatch] = useReducer(reducer, INIT_STATE);
|
|
9409
10151
|
|
|
9410
10152
|
// On prop state change => dispatch update.
|
|
@@ -9508,7 +10250,7 @@ const useRovingTabIndex = _ref => {
|
|
|
9508
10250
|
[parentRef, ...extraDependencies]);
|
|
9509
10251
|
};
|
|
9510
10252
|
|
|
9511
|
-
const _excluded$
|
|
10253
|
+
const _excluded$W = ["aria-label", "children", "className"];
|
|
9512
10254
|
|
|
9513
10255
|
/**
|
|
9514
10256
|
* Defines the props of the component.
|
|
@@ -9517,12 +10259,12 @@ const _excluded$T = ["aria-label", "children", "className"];
|
|
|
9517
10259
|
/**
|
|
9518
10260
|
* Component display name.
|
|
9519
10261
|
*/
|
|
9520
|
-
const COMPONENT_NAME$
|
|
10262
|
+
const COMPONENT_NAME$S = 'ProgressTracker';
|
|
9521
10263
|
|
|
9522
10264
|
/**
|
|
9523
10265
|
* Component default class name and class prefix.
|
|
9524
10266
|
*/
|
|
9525
|
-
const CLASSNAME$
|
|
10267
|
+
const CLASSNAME$P = getRootClassName(COMPONENT_NAME$S);
|
|
9526
10268
|
|
|
9527
10269
|
/**
|
|
9528
10270
|
* Component default props.
|
|
@@ -9545,7 +10287,7 @@ const ProgressTracker = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9545
10287
|
children,
|
|
9546
10288
|
className
|
|
9547
10289
|
} = props,
|
|
9548
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
10290
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$W);
|
|
9549
10291
|
const stepListRef = React.useRef(null);
|
|
9550
10292
|
useRovingTabIndex({
|
|
9551
10293
|
parentRef: stepListRef,
|
|
@@ -9561,20 +10303,20 @@ const ProgressTracker = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9561
10303
|
ref: mergeRefs(ref, stepListRef)
|
|
9562
10304
|
}, forwardedProps, {
|
|
9563
10305
|
className: classnames(className, handleBasicClasses({
|
|
9564
|
-
prefix: CLASSNAME$
|
|
10306
|
+
prefix: CLASSNAME$P
|
|
9565
10307
|
}))
|
|
9566
10308
|
}), /*#__PURE__*/React.createElement("div", {
|
|
9567
|
-
className: `${CLASSNAME$
|
|
10309
|
+
className: `${CLASSNAME$P}__steps`,
|
|
9568
10310
|
role: "tablist",
|
|
9569
10311
|
"aria-label": ariaLabel
|
|
9570
10312
|
}, children), /*#__PURE__*/React.createElement("div", {
|
|
9571
|
-
className: `${CLASSNAME$
|
|
10313
|
+
className: `${CLASSNAME$P}__background-bar`,
|
|
9572
10314
|
style: {
|
|
9573
10315
|
left: `${backgroundPosition}%`,
|
|
9574
10316
|
right: `${backgroundPosition}%`
|
|
9575
10317
|
}
|
|
9576
10318
|
}), /*#__PURE__*/React.createElement("div", {
|
|
9577
|
-
className: `${CLASSNAME$
|
|
10319
|
+
className: `${CLASSNAME$P}__foreground-bar`,
|
|
9578
10320
|
style: {
|
|
9579
10321
|
left: `${backgroundPosition}%`,
|
|
9580
10322
|
right: `${backgroundPosition}%`,
|
|
@@ -9582,11 +10324,11 @@ const ProgressTracker = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9582
10324
|
}
|
|
9583
10325
|
}));
|
|
9584
10326
|
});
|
|
9585
|
-
ProgressTracker.displayName = COMPONENT_NAME$
|
|
9586
|
-
ProgressTracker.className = CLASSNAME$
|
|
10327
|
+
ProgressTracker.displayName = COMPONENT_NAME$S;
|
|
10328
|
+
ProgressTracker.className = CLASSNAME$P;
|
|
9587
10329
|
ProgressTracker.defaultProps = DEFAULT_PROPS$D;
|
|
9588
10330
|
|
|
9589
|
-
const _excluded$
|
|
10331
|
+
const _excluded$X = ["className", "disabled", "hasError", "helper", "id", "isActive", "isComplete", "isDisabled", "label", "onFocus", "onKeyPress", "tabIndex"];
|
|
9590
10332
|
|
|
9591
10333
|
/**
|
|
9592
10334
|
* Defines the props of the component.
|
|
@@ -9595,12 +10337,12 @@ const _excluded$U = ["className", "disabled", "hasError", "helper", "id", "isAct
|
|
|
9595
10337
|
/**
|
|
9596
10338
|
* Component display name.
|
|
9597
10339
|
*/
|
|
9598
|
-
const COMPONENT_NAME$
|
|
10340
|
+
const COMPONENT_NAME$T = 'ProgressTrackerStep';
|
|
9599
10341
|
|
|
9600
10342
|
/**
|
|
9601
10343
|
* Component default class name and class prefix.
|
|
9602
10344
|
*/
|
|
9603
|
-
const CLASSNAME$
|
|
10345
|
+
const CLASSNAME$Q = getRootClassName(COMPONENT_NAME$T);
|
|
9604
10346
|
|
|
9605
10347
|
/**
|
|
9606
10348
|
* Component default props.
|
|
@@ -9631,7 +10373,7 @@ const ProgressTrackerStep = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9631
10373
|
onKeyPress,
|
|
9632
10374
|
tabIndex = -1
|
|
9633
10375
|
} = props,
|
|
9634
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
10376
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$X);
|
|
9635
10377
|
const state = useTabProviderContext('tab', id);
|
|
9636
10378
|
const isActive = propIsActive || (state === null || state === void 0 ? void 0 : state.isActive);
|
|
9637
10379
|
const changeToCurrentTab = useCallback(() => {
|
|
@@ -9668,7 +10410,7 @@ const ProgressTrackerStep = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9668
10410
|
type: "button",
|
|
9669
10411
|
id: state === null || state === void 0 ? void 0 : state.tabId,
|
|
9670
10412
|
className: classnames(className, handleBasicClasses({
|
|
9671
|
-
prefix: CLASSNAME$
|
|
10413
|
+
prefix: CLASSNAME$Q,
|
|
9672
10414
|
hasError,
|
|
9673
10415
|
isActive,
|
|
9674
10416
|
isClickable: state && !isDisabled,
|
|
@@ -9683,22 +10425,22 @@ const ProgressTrackerStep = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9683
10425
|
"aria-selected": isActive,
|
|
9684
10426
|
"aria-controls": state === null || state === void 0 ? void 0 : state.tabPanelId
|
|
9685
10427
|
}), /*#__PURE__*/React.createElement(Icon, {
|
|
9686
|
-
className: `${CLASSNAME$
|
|
10428
|
+
className: `${CLASSNAME$Q}__state`,
|
|
9687
10429
|
icon: getIcon(),
|
|
9688
10430
|
size: Size.s
|
|
9689
10431
|
}), /*#__PURE__*/React.createElement(InputLabel, {
|
|
9690
10432
|
htmlFor: (state === null || state === void 0 ? void 0 : state.tabId) || '',
|
|
9691
|
-
className: `${CLASSNAME$
|
|
10433
|
+
className: `${CLASSNAME$Q}__label`
|
|
9692
10434
|
}, label), helper && /*#__PURE__*/React.createElement(InputHelper, {
|
|
9693
10435
|
kind: hasError ? Kind.error : Kind.info,
|
|
9694
|
-
className: `${CLASSNAME$
|
|
10436
|
+
className: `${CLASSNAME$Q}__helper`
|
|
9695
10437
|
}, helper));
|
|
9696
10438
|
});
|
|
9697
|
-
ProgressTrackerStep.displayName = COMPONENT_NAME$
|
|
9698
|
-
ProgressTrackerStep.className = CLASSNAME$
|
|
10439
|
+
ProgressTrackerStep.displayName = COMPONENT_NAME$T;
|
|
10440
|
+
ProgressTrackerStep.className = CLASSNAME$Q;
|
|
9699
10441
|
ProgressTrackerStep.defaultProps = DEFAULT_PROPS$E;
|
|
9700
10442
|
|
|
9701
|
-
const _excluded$
|
|
10443
|
+
const _excluded$Y = ["children", "id", "className", "isActive"];
|
|
9702
10444
|
|
|
9703
10445
|
/**
|
|
9704
10446
|
* Defines the props of the component.
|
|
@@ -9707,12 +10449,12 @@ const _excluded$V = ["children", "id", "className", "isActive"];
|
|
|
9707
10449
|
/**
|
|
9708
10450
|
* Component display name.
|
|
9709
10451
|
*/
|
|
9710
|
-
const COMPONENT_NAME$
|
|
10452
|
+
const COMPONENT_NAME$U = 'ProgressTrackerStepPanel';
|
|
9711
10453
|
|
|
9712
10454
|
/**
|
|
9713
10455
|
* Component default class name and class prefix.
|
|
9714
10456
|
*/
|
|
9715
|
-
const CLASSNAME$
|
|
10457
|
+
const CLASSNAME$R = `${CSS_PREFIX}-step-panel`;
|
|
9716
10458
|
|
|
9717
10459
|
/**
|
|
9718
10460
|
* Component default props.
|
|
@@ -9735,7 +10477,7 @@ const ProgressTrackerStepPanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9735
10477
|
className,
|
|
9736
10478
|
isActive: propIsActive
|
|
9737
10479
|
} = props,
|
|
9738
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
10480
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$Y);
|
|
9739
10481
|
const state = useTabProviderContext('tabPanel', id);
|
|
9740
10482
|
const isActive = propIsActive || (state === null || state === void 0 ? void 0 : state.isActive);
|
|
9741
10483
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
@@ -9743,7 +10485,7 @@ const ProgressTrackerStepPanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9743
10485
|
}, forwardedProps, {
|
|
9744
10486
|
id: state === null || state === void 0 ? void 0 : state.tabPanelId,
|
|
9745
10487
|
className: classnames(className, handleBasicClasses({
|
|
9746
|
-
prefix: CLASSNAME$
|
|
10488
|
+
prefix: CLASSNAME$R,
|
|
9747
10489
|
isActive
|
|
9748
10490
|
})),
|
|
9749
10491
|
role: "tabpanel",
|
|
@@ -9751,11 +10493,11 @@ const ProgressTrackerStepPanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9751
10493
|
"aria-labelledby": state === null || state === void 0 ? void 0 : state.tabId
|
|
9752
10494
|
}), (!(state !== null && state !== void 0 && state.isLazy) || isActive) && children);
|
|
9753
10495
|
});
|
|
9754
|
-
ProgressTrackerStepPanel.displayName = COMPONENT_NAME$
|
|
9755
|
-
ProgressTrackerStepPanel.className = CLASSNAME$
|
|
10496
|
+
ProgressTrackerStepPanel.displayName = COMPONENT_NAME$U;
|
|
10497
|
+
ProgressTrackerStepPanel.className = CLASSNAME$R;
|
|
9756
10498
|
ProgressTrackerStepPanel.defaultProps = DEFAULT_PROPS$F;
|
|
9757
10499
|
|
|
9758
|
-
const _excluded$
|
|
10500
|
+
const _excluded$Z = ["checked", "className", "disabled", "helper", "id", "inputRef", "isChecked", "isDisabled", "label", "name", "onChange", "theme", "value", "inputProps"];
|
|
9759
10501
|
|
|
9760
10502
|
/**
|
|
9761
10503
|
* Defines the props of the component.
|
|
@@ -9764,12 +10506,12 @@ const _excluded$W = ["checked", "className", "disabled", "helper", "id", "inputR
|
|
|
9764
10506
|
/**
|
|
9765
10507
|
* Component display name.
|
|
9766
10508
|
*/
|
|
9767
|
-
const COMPONENT_NAME$
|
|
10509
|
+
const COMPONENT_NAME$V = 'RadioButton';
|
|
9768
10510
|
|
|
9769
10511
|
/**
|
|
9770
10512
|
* Component default class name and class prefix.
|
|
9771
10513
|
*/
|
|
9772
|
-
const CLASSNAME$
|
|
10514
|
+
const CLASSNAME$S = getRootClassName(COMPONENT_NAME$V);
|
|
9773
10515
|
|
|
9774
10516
|
/**
|
|
9775
10517
|
* Component default props.
|
|
@@ -9802,8 +10544,8 @@ const RadioButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9802
10544
|
value,
|
|
9803
10545
|
inputProps
|
|
9804
10546
|
} = props,
|
|
9805
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
9806
|
-
const inputId = useMemo(() => id || `${CLASSNAME$
|
|
10547
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$Z);
|
|
10548
|
+
const inputId = useMemo(() => id || `${CLASSNAME$S.toLowerCase()}-${uid()}`, [id]);
|
|
9807
10549
|
const handleChange = event => {
|
|
9808
10550
|
if (onChange) {
|
|
9809
10551
|
onChange(value, name, event);
|
|
@@ -9816,14 +10558,14 @@ const RadioButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9816
10558
|
isChecked,
|
|
9817
10559
|
isDisabled,
|
|
9818
10560
|
isUnchecked: !isChecked,
|
|
9819
|
-
prefix: CLASSNAME$
|
|
10561
|
+
prefix: CLASSNAME$S,
|
|
9820
10562
|
theme
|
|
9821
10563
|
}))
|
|
9822
10564
|
}), /*#__PURE__*/React.createElement("div", {
|
|
9823
|
-
className: `${CLASSNAME$
|
|
10565
|
+
className: `${CLASSNAME$S}__input-wrapper`
|
|
9824
10566
|
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
9825
10567
|
ref: inputRef,
|
|
9826
|
-
className: `${CLASSNAME$
|
|
10568
|
+
className: `${CLASSNAME$S}__input-native`,
|
|
9827
10569
|
disabled: isDisabled,
|
|
9828
10570
|
id: inputId,
|
|
9829
10571
|
tabIndex: isDisabled ? -1 : 0,
|
|
@@ -9834,28 +10576,28 @@ const RadioButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9834
10576
|
onChange: handleChange,
|
|
9835
10577
|
"aria-describedby": helper ? `${inputId}-helper` : undefined
|
|
9836
10578
|
}, inputProps)), /*#__PURE__*/React.createElement("div", {
|
|
9837
|
-
className: `${CLASSNAME$
|
|
10579
|
+
className: `${CLASSNAME$S}__input-placeholder`
|
|
9838
10580
|
}, /*#__PURE__*/React.createElement("div", {
|
|
9839
|
-
className: `${CLASSNAME$
|
|
10581
|
+
className: `${CLASSNAME$S}__input-background`
|
|
9840
10582
|
}), /*#__PURE__*/React.createElement("div", {
|
|
9841
|
-
className: `${CLASSNAME$
|
|
10583
|
+
className: `${CLASSNAME$S}__input-indicator`
|
|
9842
10584
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
9843
|
-
className: `${CLASSNAME$
|
|
10585
|
+
className: `${CLASSNAME$S}__content`
|
|
9844
10586
|
}, label && /*#__PURE__*/React.createElement(InputLabel, {
|
|
9845
10587
|
htmlFor: inputId,
|
|
9846
10588
|
theme: theme,
|
|
9847
|
-
className: `${CLASSNAME$
|
|
10589
|
+
className: `${CLASSNAME$S}__label`
|
|
9848
10590
|
}, label), helper && /*#__PURE__*/React.createElement(InputHelper, {
|
|
9849
10591
|
id: `${inputId}-helper`,
|
|
9850
10592
|
theme: theme,
|
|
9851
|
-
className: `${CLASSNAME$
|
|
10593
|
+
className: `${CLASSNAME$S}__helper`
|
|
9852
10594
|
}, helper)));
|
|
9853
10595
|
});
|
|
9854
|
-
RadioButton.displayName = COMPONENT_NAME$
|
|
9855
|
-
RadioButton.className = CLASSNAME$
|
|
10596
|
+
RadioButton.displayName = COMPONENT_NAME$V;
|
|
10597
|
+
RadioButton.className = CLASSNAME$S;
|
|
9856
10598
|
RadioButton.defaultProps = DEFAULT_PROPS$G;
|
|
9857
10599
|
|
|
9858
|
-
const _excluded$
|
|
10600
|
+
const _excluded$_ = ["children", "className"];
|
|
9859
10601
|
|
|
9860
10602
|
/**
|
|
9861
10603
|
* Defines the props of the component.
|
|
@@ -9864,12 +10606,12 @@ const _excluded$X = ["children", "className"];
|
|
|
9864
10606
|
/**
|
|
9865
10607
|
* Component display name.
|
|
9866
10608
|
*/
|
|
9867
|
-
const COMPONENT_NAME$
|
|
10609
|
+
const COMPONENT_NAME$W = 'RadioGroup';
|
|
9868
10610
|
|
|
9869
10611
|
/**
|
|
9870
10612
|
* Component default class name and class prefix.
|
|
9871
10613
|
*/
|
|
9872
|
-
const CLASSNAME$
|
|
10614
|
+
const CLASSNAME$T = getRootClassName(COMPONENT_NAME$W);
|
|
9873
10615
|
|
|
9874
10616
|
/**
|
|
9875
10617
|
* RadioGroup component.
|
|
@@ -9883,17 +10625,17 @@ const RadioGroup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9883
10625
|
children,
|
|
9884
10626
|
className
|
|
9885
10627
|
} = props,
|
|
9886
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
10628
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$_);
|
|
9887
10629
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
9888
10630
|
ref: ref
|
|
9889
10631
|
}, forwardedProps, {
|
|
9890
10632
|
className: classnames(className, handleBasicClasses({
|
|
9891
|
-
prefix: CLASSNAME$
|
|
10633
|
+
prefix: CLASSNAME$T
|
|
9892
10634
|
}))
|
|
9893
10635
|
}), children);
|
|
9894
10636
|
});
|
|
9895
|
-
RadioGroup.displayName = COMPONENT_NAME$
|
|
9896
|
-
RadioGroup.className = CLASSNAME$
|
|
10637
|
+
RadioGroup.displayName = COMPONENT_NAME$W;
|
|
10638
|
+
RadioGroup.className = CLASSNAME$T;
|
|
9897
10639
|
|
|
9898
10640
|
/**
|
|
9899
10641
|
* Listen on element focus to store the focus status.
|
|
@@ -9927,13 +10669,13 @@ const SelectVariant = {
|
|
|
9927
10669
|
chip: 'chip'
|
|
9928
10670
|
};
|
|
9929
10671
|
|
|
9930
|
-
const _excluded
|
|
10672
|
+
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"];
|
|
9931
10673
|
|
|
9932
10674
|
/** The display name of the component. */
|
|
9933
|
-
const COMPONENT_NAME$
|
|
10675
|
+
const COMPONENT_NAME$X = 'Select';
|
|
9934
10676
|
|
|
9935
10677
|
/** The default class name and classes prefix for this component. */
|
|
9936
|
-
const CLASSNAME$
|
|
10678
|
+
const CLASSNAME$U = getRootClassName(COMPONENT_NAME$X);
|
|
9937
10679
|
|
|
9938
10680
|
/** The default value of props. */
|
|
9939
10681
|
const DEFAULT_PROPS$H = {
|
|
@@ -9967,7 +10709,7 @@ const WithSelectContext = (SelectElement, _ref, ref) => {
|
|
|
9967
10709
|
value,
|
|
9968
10710
|
variant = DEFAULT_PROPS$H.variant
|
|
9969
10711
|
} = _ref,
|
|
9970
|
-
forwardedProps = _objectWithoutProperties(_ref, _excluded
|
|
10712
|
+
forwardedProps = _objectWithoutProperties(_ref, _excluded$$);
|
|
9971
10713
|
const selectId = useMemo(() => id || `select-${uid()}`, [id]);
|
|
9972
10714
|
const anchorRef = useRef(null);
|
|
9973
10715
|
const selectRef = useRef(null);
|
|
@@ -10001,7 +10743,7 @@ const WithSelectContext = (SelectElement, _ref, ref) => {
|
|
|
10001
10743
|
isFocus,
|
|
10002
10744
|
isOpen,
|
|
10003
10745
|
isValid,
|
|
10004
|
-
prefix: CLASSNAME$
|
|
10746
|
+
prefix: CLASSNAME$U,
|
|
10005
10747
|
theme: theme === Theme.light ? Theme.light : Theme.dark
|
|
10006
10748
|
}))
|
|
10007
10749
|
}, /*#__PURE__*/React.createElement(SelectElement, _extends({}, forwardedProps, {
|
|
@@ -10032,22 +10774,22 @@ const WithSelectContext = (SelectElement, _ref, ref) => {
|
|
|
10032
10774
|
onInfiniteScroll: onInfiniteScroll,
|
|
10033
10775
|
ref: dropdownRef
|
|
10034
10776
|
}, children), hasError && error && /*#__PURE__*/React.createElement(InputHelper, {
|
|
10035
|
-
className: `${CLASSNAME$
|
|
10777
|
+
className: `${CLASSNAME$U}__helper`,
|
|
10036
10778
|
kind: Kind.error,
|
|
10037
10779
|
theme: theme
|
|
10038
10780
|
}, error), helper && /*#__PURE__*/React.createElement(InputHelper, {
|
|
10039
|
-
className: `${CLASSNAME$
|
|
10781
|
+
className: `${CLASSNAME$U}__helper`,
|
|
10040
10782
|
theme: theme
|
|
10041
10783
|
}, helper));
|
|
10042
10784
|
};
|
|
10043
10785
|
|
|
10044
|
-
const _excluded$
|
|
10786
|
+
const _excluded$10 = ["anchorRef", "clearButtonProps", "handleKeyboardNav", "hasError", "hasInputClear", "icon", "id", "isDisabled", "isEmpty", "isRequired", "isValid", "label", "onClear", "onInputClick", "placeholder", "selectedValueRender", "theme", "value", "variant", "selectElementRef"];
|
|
10045
10787
|
|
|
10046
10788
|
/** The display name of the component. */
|
|
10047
|
-
const COMPONENT_NAME$
|
|
10789
|
+
const COMPONENT_NAME$Y = 'Select';
|
|
10048
10790
|
|
|
10049
10791
|
/** The default class name and classes prefix for this component. */
|
|
10050
|
-
const CLASSNAME$
|
|
10792
|
+
const CLASSNAME$V = getRootClassName(COMPONENT_NAME$Y);
|
|
10051
10793
|
|
|
10052
10794
|
/** The default value of props. */
|
|
10053
10795
|
const DEFAULT_PROPS$I = {
|
|
@@ -10081,36 +10823,36 @@ const SelectField = _ref => {
|
|
|
10081
10823
|
variant,
|
|
10082
10824
|
selectElementRef
|
|
10083
10825
|
} = _ref,
|
|
10084
|
-
forwardedProps = _objectWithoutProperties(_ref, _excluded$
|
|
10826
|
+
forwardedProps = _objectWithoutProperties(_ref, _excluded$10);
|
|
10085
10827
|
return /*#__PURE__*/React.createElement(React.Fragment, null, variant === SelectVariant.input && /*#__PURE__*/React.createElement(React.Fragment, null, label && /*#__PURE__*/React.createElement("div", {
|
|
10086
|
-
className: `${CLASSNAME$
|
|
10828
|
+
className: `${CLASSNAME$V}__header`
|
|
10087
10829
|
}, /*#__PURE__*/React.createElement(InputLabel, {
|
|
10088
10830
|
htmlFor: id,
|
|
10089
|
-
className: `${CLASSNAME$
|
|
10831
|
+
className: `${CLASSNAME$V}__label`,
|
|
10090
10832
|
isRequired: isRequired,
|
|
10091
10833
|
theme: theme
|
|
10092
10834
|
}, label)), /*#__PURE__*/React.createElement("div", _extends({
|
|
10093
10835
|
ref: mergeRefs(anchorRef, selectElementRef),
|
|
10094
10836
|
id: id,
|
|
10095
|
-
className: `${CLASSNAME$
|
|
10837
|
+
className: `${CLASSNAME$V}__wrapper`,
|
|
10096
10838
|
onClick: onInputClick,
|
|
10097
10839
|
onKeyDown: handleKeyboardNav,
|
|
10098
10840
|
tabIndex: isDisabled ? undefined : 0,
|
|
10099
10841
|
"aria-disabled": isDisabled || undefined
|
|
10100
10842
|
}, forwardedProps), icon && /*#__PURE__*/React.createElement(Icon, {
|
|
10101
|
-
className: `${CLASSNAME$
|
|
10843
|
+
className: `${CLASSNAME$V}__input-icon`,
|
|
10102
10844
|
color: theme === Theme.dark ? 'light' : undefined,
|
|
10103
10845
|
icon: icon,
|
|
10104
10846
|
size: Size.xs
|
|
10105
10847
|
}), /*#__PURE__*/React.createElement("div", {
|
|
10106
|
-
className: classnames([`${CLASSNAME$
|
|
10848
|
+
className: classnames([`${CLASSNAME$V}__input-native`, isEmpty && placeholder && `${CLASSNAME$V}__input-native--placeholder`])
|
|
10107
10849
|
}, !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", {
|
|
10108
|
-
className: `${CLASSNAME$
|
|
10850
|
+
className: `${CLASSNAME$V}__input-validity`
|
|
10109
10851
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
10110
10852
|
icon: isValid ? mdiCheckCircle : mdiAlertCircle,
|
|
10111
10853
|
size: Size.xxs
|
|
10112
10854
|
})), hasInputClear && clearButtonProps && /*#__PURE__*/React.createElement(IconButton, _extends({}, clearButtonProps, {
|
|
10113
|
-
className: `${CLASSNAME$
|
|
10855
|
+
className: `${CLASSNAME$V}__input-clear`,
|
|
10114
10856
|
icon: mdiCloseCircle,
|
|
10115
10857
|
emphasis: Emphasis.low,
|
|
10116
10858
|
size: Size.s,
|
|
@@ -10118,7 +10860,7 @@ const SelectField = _ref => {
|
|
|
10118
10860
|
onClick: onClear,
|
|
10119
10861
|
onKeyDown: stopPropagation
|
|
10120
10862
|
})), /*#__PURE__*/React.createElement("div", {
|
|
10121
|
-
className: `${CLASSNAME$
|
|
10863
|
+
className: `${CLASSNAME$V}__input-indicator`
|
|
10122
10864
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
10123
10865
|
icon: mdiMenuDown,
|
|
10124
10866
|
size: Size.s
|
|
@@ -10150,26 +10892,26 @@ const Select = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10150
10892
|
className: classnames(props.className, handleBasicClasses({
|
|
10151
10893
|
hasInputClear,
|
|
10152
10894
|
hasUnique: !props.isEmpty,
|
|
10153
|
-
prefix: CLASSNAME$
|
|
10895
|
+
prefix: CLASSNAME$V
|
|
10154
10896
|
})),
|
|
10155
10897
|
hasInputClear,
|
|
10156
10898
|
isEmpty: isEmpty$1
|
|
10157
10899
|
}), ref);
|
|
10158
10900
|
});
|
|
10159
|
-
Select.displayName = COMPONENT_NAME$
|
|
10160
|
-
Select.className = CLASSNAME$
|
|
10901
|
+
Select.displayName = COMPONENT_NAME$Y;
|
|
10902
|
+
Select.className = CLASSNAME$V;
|
|
10161
10903
|
Select.defaultProps = DEFAULT_PROPS$I;
|
|
10162
|
-
Select.className = CLASSNAME$
|
|
10904
|
+
Select.className = CLASSNAME$V;
|
|
10163
10905
|
|
|
10164
|
-
const _excluded$
|
|
10906
|
+
const _excluded$11 = ["anchorRef", "handleKeyboardNav", "hasError", "icon", "id", "isDisabled", "isEmpty", "isRequired", "isValid", "label", "onClear", "onInputClick", "placeholder", "selectedChipRender", "selectedValueRender", "theme", "value", "variant", "selectElementRef"];
|
|
10165
10907
|
|
|
10166
10908
|
/** Defines the props of the component. */
|
|
10167
10909
|
|
|
10168
10910
|
/** The display name of the component. */
|
|
10169
|
-
const COMPONENT_NAME$
|
|
10911
|
+
const COMPONENT_NAME$Z = 'Select';
|
|
10170
10912
|
|
|
10171
10913
|
/** The default class name and classes prefix for this component. */
|
|
10172
|
-
const CLASSNAME$
|
|
10914
|
+
const CLASSNAME$W = getRootClassName(COMPONENT_NAME$Z);
|
|
10173
10915
|
|
|
10174
10916
|
/** The default value of props. */
|
|
10175
10917
|
const DEFAULT_PROPS$J = {
|
|
@@ -10212,38 +10954,38 @@ const SelectMultipleField = _ref => {
|
|
|
10212
10954
|
variant,
|
|
10213
10955
|
selectElementRef
|
|
10214
10956
|
} = _ref,
|
|
10215
|
-
forwardedProps = _objectWithoutProperties(_ref, _excluded$
|
|
10957
|
+
forwardedProps = _objectWithoutProperties(_ref, _excluded$11);
|
|
10216
10958
|
return /*#__PURE__*/React.createElement(React.Fragment, null, variant === SelectVariant.input && /*#__PURE__*/React.createElement(React.Fragment, null, label && /*#__PURE__*/React.createElement("div", {
|
|
10217
|
-
className: `${CLASSNAME$
|
|
10959
|
+
className: `${CLASSNAME$W}__header`
|
|
10218
10960
|
}, /*#__PURE__*/React.createElement(InputLabel, {
|
|
10219
10961
|
htmlFor: id,
|
|
10220
|
-
className: `${CLASSNAME$
|
|
10962
|
+
className: `${CLASSNAME$W}__label`,
|
|
10221
10963
|
isRequired: isRequired,
|
|
10222
10964
|
theme: theme
|
|
10223
10965
|
}, label)), /*#__PURE__*/React.createElement("div", _extends({
|
|
10224
10966
|
ref: mergeRefs(anchorRef, selectElementRef),
|
|
10225
10967
|
id: id,
|
|
10226
|
-
className: `${CLASSNAME$
|
|
10968
|
+
className: `${CLASSNAME$W}__wrapper`,
|
|
10227
10969
|
onClick: onInputClick,
|
|
10228
10970
|
onKeyDown: handleKeyboardNav,
|
|
10229
10971
|
tabIndex: isDisabled ? undefined : 0,
|
|
10230
10972
|
"aria-disabled": isDisabled || undefined
|
|
10231
10973
|
}, forwardedProps), icon && /*#__PURE__*/React.createElement(Icon, {
|
|
10232
|
-
className: `${CLASSNAME$
|
|
10974
|
+
className: `${CLASSNAME$W}__input-icon`,
|
|
10233
10975
|
color: theme === Theme.dark ? 'light' : undefined,
|
|
10234
10976
|
icon: icon,
|
|
10235
10977
|
size: Size.xs
|
|
10236
10978
|
}), /*#__PURE__*/React.createElement("div", {
|
|
10237
|
-
className: `${CLASSNAME$
|
|
10979
|
+
className: `${CLASSNAME$W}__chips`
|
|
10238
10980
|
}, !isEmpty && value.map((val, index) => selectedChipRender === null || selectedChipRender === void 0 ? void 0 : selectedChipRender(val, index, onClear, isDisabled, theme))), isEmpty && placeholder && /*#__PURE__*/React.createElement("div", {
|
|
10239
|
-
className: classnames([`${CLASSNAME$
|
|
10981
|
+
className: classnames([`${CLASSNAME$W}__input-native`, `${CLASSNAME$W}__input-native--placeholder`])
|
|
10240
10982
|
}, /*#__PURE__*/React.createElement("span", null, placeholder)), (isValid || hasError) && /*#__PURE__*/React.createElement("div", {
|
|
10241
|
-
className: `${CLASSNAME$
|
|
10983
|
+
className: `${CLASSNAME$W}__input-validity`
|
|
10242
10984
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
10243
10985
|
icon: isValid ? mdiCheckCircle : mdiAlertCircle,
|
|
10244
10986
|
size: Size.xxs
|
|
10245
10987
|
})), /*#__PURE__*/React.createElement("div", {
|
|
10246
|
-
className: `${CLASSNAME$
|
|
10988
|
+
className: `${CLASSNAME$W}__input-indicator`
|
|
10247
10989
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
10248
10990
|
icon: mdiMenuDown,
|
|
10249
10991
|
size: Size.s
|
|
@@ -10272,17 +11014,17 @@ const SelectMultiple = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10272
11014
|
return WithSelectContext(SelectMultipleField, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
10273
11015
|
className: classnames(props.className, handleBasicClasses({
|
|
10274
11016
|
hasMultiple: !props.isEmpty,
|
|
10275
|
-
prefix: CLASSNAME$
|
|
11017
|
+
prefix: CLASSNAME$W
|
|
10276
11018
|
})),
|
|
10277
11019
|
isEmpty: props.value.length === 0,
|
|
10278
11020
|
isMultiple: true
|
|
10279
11021
|
}), ref);
|
|
10280
11022
|
});
|
|
10281
|
-
SelectMultiple.displayName = COMPONENT_NAME$
|
|
10282
|
-
SelectMultiple.className = CLASSNAME$
|
|
11023
|
+
SelectMultiple.displayName = COMPONENT_NAME$Z;
|
|
11024
|
+
SelectMultiple.className = CLASSNAME$W;
|
|
10283
11025
|
SelectMultiple.defaultProps = DEFAULT_PROPS$J;
|
|
10284
11026
|
|
|
10285
|
-
const _excluded
|
|
11027
|
+
const _excluded$12 = ["children", "className", "theme"];
|
|
10286
11028
|
|
|
10287
11029
|
/**
|
|
10288
11030
|
* Defines the props of the component.
|
|
@@ -10291,12 +11033,12 @@ const _excluded$$ = ["children", "className", "theme"];
|
|
|
10291
11033
|
/**
|
|
10292
11034
|
* Component display name.
|
|
10293
11035
|
*/
|
|
10294
|
-
const COMPONENT_NAME$
|
|
11036
|
+
const COMPONENT_NAME$_ = 'SideNavigation';
|
|
10295
11037
|
|
|
10296
11038
|
/**
|
|
10297
11039
|
* Component default class name and class prefix.
|
|
10298
11040
|
*/
|
|
10299
|
-
const CLASSNAME$
|
|
11041
|
+
const CLASSNAME$X = getRootClassName(COMPONENT_NAME$_);
|
|
10300
11042
|
|
|
10301
11043
|
/**
|
|
10302
11044
|
* SideNavigation component.
|
|
@@ -10311,20 +11053,20 @@ const SideNavigation = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10311
11053
|
className,
|
|
10312
11054
|
theme
|
|
10313
11055
|
} = props,
|
|
10314
|
-
forwardedProps = _objectWithoutProperties(props, _excluded
|
|
11056
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$12);
|
|
10315
11057
|
const content = Children.toArray(children).filter(isComponent(SideNavigationItem));
|
|
10316
11058
|
return /*#__PURE__*/React.createElement("ul", _extends({
|
|
10317
11059
|
ref: ref
|
|
10318
11060
|
}, forwardedProps, {
|
|
10319
11061
|
className: classnames(className, theme === Theme.dark && 'lumx-color-font-light-N', handleBasicClasses({
|
|
10320
|
-
prefix: CLASSNAME$
|
|
11062
|
+
prefix: CLASSNAME$X
|
|
10321
11063
|
}))
|
|
10322
11064
|
}), content);
|
|
10323
11065
|
});
|
|
10324
|
-
SideNavigation.displayName = COMPONENT_NAME$
|
|
10325
|
-
SideNavigation.className = CLASSNAME$
|
|
11066
|
+
SideNavigation.displayName = COMPONENT_NAME$_;
|
|
11067
|
+
SideNavigation.className = CLASSNAME$X;
|
|
10326
11068
|
|
|
10327
|
-
const _excluded$
|
|
11069
|
+
const _excluded$13 = ["linkAs", "href"];
|
|
10328
11070
|
/**
|
|
10329
11071
|
* Render <button> HTML component, fallbacks to `<a>` when a `href` is provided or a custom component with `linkAs`.
|
|
10330
11072
|
*/
|
|
@@ -10333,7 +11075,7 @@ const renderButtonOrLink = function (props) {
|
|
|
10333
11075
|
linkAs,
|
|
10334
11076
|
href
|
|
10335
11077
|
} = props,
|
|
10336
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
11078
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$13);
|
|
10337
11079
|
for (var _len = arguments.length, children = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
10338
11080
|
children[_key - 1] = arguments[_key];
|
|
10339
11081
|
}
|
|
@@ -10343,7 +11085,7 @@ const renderButtonOrLink = function (props) {
|
|
|
10343
11085
|
}, forwardedProps), ...children);
|
|
10344
11086
|
};
|
|
10345
11087
|
|
|
10346
|
-
const _excluded$
|
|
11088
|
+
const _excluded$14 = ["children", "className", "emphasis", "icon", "isOpen", "isSelected", "label", "linkAs", "linkProps", "onActionClick", "onClick", "toggleButtonProps", "closeMode"];
|
|
10347
11089
|
|
|
10348
11090
|
/**
|
|
10349
11091
|
* Defines the props of the component.
|
|
@@ -10352,12 +11094,12 @@ const _excluded$11 = ["children", "className", "emphasis", "icon", "isOpen", "is
|
|
|
10352
11094
|
/**
|
|
10353
11095
|
* Component display name.
|
|
10354
11096
|
*/
|
|
10355
|
-
const COMPONENT_NAME
|
|
11097
|
+
const COMPONENT_NAME$$ = 'SideNavigationItem';
|
|
10356
11098
|
|
|
10357
11099
|
/**
|
|
10358
11100
|
* Component default class name and class prefix.
|
|
10359
11101
|
*/
|
|
10360
|
-
const CLASSNAME$
|
|
11102
|
+
const CLASSNAME$Y = getRootClassName(COMPONENT_NAME$$);
|
|
10361
11103
|
|
|
10362
11104
|
/**
|
|
10363
11105
|
* Component default props.
|
|
@@ -10390,7 +11132,7 @@ const SideNavigationItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10390
11132
|
toggleButtonProps,
|
|
10391
11133
|
closeMode = 'unmount'
|
|
10392
11134
|
} = props,
|
|
10393
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
11135
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$14);
|
|
10394
11136
|
const content = children && Children.toArray(children).filter(isComponent(SideNavigationItem));
|
|
10395
11137
|
const hasContent = !isEmpty(content);
|
|
10396
11138
|
const shouldSplitActions = Boolean(onActionClick);
|
|
@@ -10409,22 +11151,22 @@ const SideNavigationItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10409
11151
|
emphasis,
|
|
10410
11152
|
isOpen: showChildren,
|
|
10411
11153
|
isSelected,
|
|
10412
|
-
prefix: CLASSNAME$
|
|
11154
|
+
prefix: CLASSNAME$Y
|
|
10413
11155
|
}))
|
|
10414
11156
|
}), shouldSplitActions ? /*#__PURE__*/React.createElement("div", {
|
|
10415
|
-
className: `${CLASSNAME$
|
|
11157
|
+
className: `${CLASSNAME$Y}__wrapper`
|
|
10416
11158
|
}, renderLink(_objectSpread2(_objectSpread2({
|
|
10417
11159
|
linkAs
|
|
10418
11160
|
}, linkProps), {}, {
|
|
10419
|
-
className: `${CLASSNAME$
|
|
11161
|
+
className: `${CLASSNAME$Y}__link`,
|
|
10420
11162
|
onClick,
|
|
10421
11163
|
tabIndex: 0
|
|
10422
11164
|
}), icon && /*#__PURE__*/React.createElement(Icon, {
|
|
10423
|
-
className: `${CLASSNAME$
|
|
11165
|
+
className: `${CLASSNAME$Y}__icon`,
|
|
10424
11166
|
icon: icon,
|
|
10425
11167
|
size: Size.xs
|
|
10426
11168
|
}), /*#__PURE__*/React.createElement("span", null, label)), /*#__PURE__*/React.createElement(IconButton, _extends({}, toggleButtonProps, {
|
|
10427
|
-
className: `${CLASSNAME$
|
|
11169
|
+
className: `${CLASSNAME$Y}__toggle`,
|
|
10428
11170
|
icon: isOpen ? mdiChevronUp : mdiChevronDown,
|
|
10429
11171
|
size: Size.m,
|
|
10430
11172
|
emphasis: Emphasis.low,
|
|
@@ -10432,27 +11174,27 @@ const SideNavigationItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10432
11174
|
}, ariaProps))) : renderButtonOrLink(_objectSpread2(_objectSpread2({
|
|
10433
11175
|
linkAs
|
|
10434
11176
|
}, linkProps), {}, {
|
|
10435
|
-
className: `${CLASSNAME$
|
|
11177
|
+
className: `${CLASSNAME$Y}__link`,
|
|
10436
11178
|
tabIndex: 0,
|
|
10437
11179
|
onClick
|
|
10438
11180
|
}, ariaProps), icon && /*#__PURE__*/React.createElement(Icon, {
|
|
10439
|
-
className: `${CLASSNAME$
|
|
11181
|
+
className: `${CLASSNAME$Y}__icon`,
|
|
10440
11182
|
icon: icon,
|
|
10441
11183
|
size: Size.xs
|
|
10442
11184
|
}), /*#__PURE__*/React.createElement("span", null, label), hasContent && /*#__PURE__*/React.createElement(Icon, {
|
|
10443
|
-
className: `${CLASSNAME$
|
|
11185
|
+
className: `${CLASSNAME$Y}__chevron`,
|
|
10444
11186
|
icon: isOpen ? mdiChevronUp : mdiChevronDown,
|
|
10445
11187
|
size: Size.xs
|
|
10446
11188
|
})), (closeMode === 'hide' || showChildren) && /*#__PURE__*/React.createElement("ul", {
|
|
10447
|
-
className: `${CLASSNAME$
|
|
11189
|
+
className: `${CLASSNAME$Y}__children`,
|
|
10448
11190
|
id: contentId
|
|
10449
11191
|
}, content));
|
|
10450
11192
|
});
|
|
10451
|
-
SideNavigationItem.displayName = COMPONENT_NAME
|
|
10452
|
-
SideNavigationItem.className = CLASSNAME$
|
|
11193
|
+
SideNavigationItem.displayName = COMPONENT_NAME$$;
|
|
11194
|
+
SideNavigationItem.className = CLASSNAME$Y;
|
|
10453
11195
|
SideNavigationItem.defaultProps = DEFAULT_PROPS$K;
|
|
10454
11196
|
|
|
10455
|
-
const _excluded$
|
|
11197
|
+
const _excluded$15 = ["className", "size", "color", "theme"];
|
|
10456
11198
|
|
|
10457
11199
|
/**
|
|
10458
11200
|
* Defines the props of the component.
|
|
@@ -10465,12 +11207,12 @@ const DEFAULT_PROPS$L = {
|
|
|
10465
11207
|
/**
|
|
10466
11208
|
* Component display name.
|
|
10467
11209
|
*/
|
|
10468
|
-
const COMPONENT_NAME
|
|
11210
|
+
const COMPONENT_NAME$10 = 'SkeletonCircle';
|
|
10469
11211
|
|
|
10470
11212
|
/**
|
|
10471
11213
|
* Component default class name and class prefix.
|
|
10472
11214
|
*/
|
|
10473
|
-
const CLASSNAME$
|
|
11215
|
+
const CLASSNAME$Z = getRootClassName(COMPONENT_NAME$10);
|
|
10474
11216
|
|
|
10475
11217
|
/**
|
|
10476
11218
|
* SkeletonCircle component.
|
|
@@ -10486,23 +11228,23 @@ const SkeletonCircle = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10486
11228
|
color,
|
|
10487
11229
|
theme
|
|
10488
11230
|
} = props,
|
|
10489
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
11231
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$15);
|
|
10490
11232
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
10491
11233
|
ref: ref
|
|
10492
11234
|
}, forwardedProps, {
|
|
10493
11235
|
className: classnames(className, handleBasicClasses({
|
|
10494
|
-
prefix: CLASSNAME$
|
|
11236
|
+
prefix: CLASSNAME$Z,
|
|
10495
11237
|
size,
|
|
10496
11238
|
color,
|
|
10497
11239
|
theme
|
|
10498
11240
|
}))
|
|
10499
11241
|
}));
|
|
10500
11242
|
});
|
|
10501
|
-
SkeletonCircle.displayName = COMPONENT_NAME
|
|
11243
|
+
SkeletonCircle.displayName = COMPONENT_NAME$10;
|
|
10502
11244
|
SkeletonCircle.defaultProps = DEFAULT_PROPS$L;
|
|
10503
|
-
SkeletonCircle.className = CLASSNAME$
|
|
11245
|
+
SkeletonCircle.className = CLASSNAME$Z;
|
|
10504
11246
|
|
|
10505
|
-
const _excluded$
|
|
11247
|
+
const _excluded$16 = ["aspectRatio", "className", "height", "theme", "variant", "width", "color"];
|
|
10506
11248
|
|
|
10507
11249
|
/**
|
|
10508
11250
|
* Skeleton variants.
|
|
@@ -10525,12 +11267,12 @@ const DEFAULT_PROPS$M = {
|
|
|
10525
11267
|
/**
|
|
10526
11268
|
* Component display name.
|
|
10527
11269
|
*/
|
|
10528
|
-
const COMPONENT_NAME$
|
|
11270
|
+
const COMPONENT_NAME$11 = 'SkeletonRectangle';
|
|
10529
11271
|
|
|
10530
11272
|
/**
|
|
10531
11273
|
* Component default class name and class prefix.
|
|
10532
11274
|
*/
|
|
10533
|
-
const CLASSNAME$
|
|
11275
|
+
const CLASSNAME$_ = getRootClassName(COMPONENT_NAME$11);
|
|
10534
11276
|
|
|
10535
11277
|
/**
|
|
10536
11278
|
* SkeletonRectangle component.
|
|
@@ -10549,12 +11291,12 @@ const SkeletonRectangle = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10549
11291
|
width,
|
|
10550
11292
|
color
|
|
10551
11293
|
} = props,
|
|
10552
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
11294
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$16);
|
|
10553
11295
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
10554
11296
|
ref: ref
|
|
10555
11297
|
}, forwardedProps, {
|
|
10556
11298
|
className: classnames(className, handleBasicClasses({
|
|
10557
|
-
prefix: CLASSNAME$
|
|
11299
|
+
prefix: CLASSNAME$_,
|
|
10558
11300
|
aspectRatio,
|
|
10559
11301
|
height: aspectRatio ? undefined : height,
|
|
10560
11302
|
theme,
|
|
@@ -10563,14 +11305,14 @@ const SkeletonRectangle = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10563
11305
|
color
|
|
10564
11306
|
}))
|
|
10565
11307
|
}), /*#__PURE__*/React.createElement("div", {
|
|
10566
|
-
className: `${CLASSNAME$
|
|
11308
|
+
className: `${CLASSNAME$_}__inner`
|
|
10567
11309
|
}));
|
|
10568
11310
|
});
|
|
10569
|
-
SkeletonRectangle.displayName = COMPONENT_NAME$
|
|
10570
|
-
SkeletonRectangle.className = CLASSNAME$
|
|
11311
|
+
SkeletonRectangle.displayName = COMPONENT_NAME$11;
|
|
11312
|
+
SkeletonRectangle.className = CLASSNAME$_;
|
|
10571
11313
|
SkeletonRectangle.defaultProps = DEFAULT_PROPS$M;
|
|
10572
11314
|
|
|
10573
|
-
const _excluded$
|
|
11315
|
+
const _excluded$17 = ["className", "theme", "typography", "width", "color"];
|
|
10574
11316
|
|
|
10575
11317
|
/**
|
|
10576
11318
|
* Defines the props of the component.
|
|
@@ -10583,12 +11325,12 @@ const DEFAULT_PROPS$N = {
|
|
|
10583
11325
|
/**
|
|
10584
11326
|
* Component display name.
|
|
10585
11327
|
*/
|
|
10586
|
-
const COMPONENT_NAME$
|
|
11328
|
+
const COMPONENT_NAME$12 = 'SkeletonTypography';
|
|
10587
11329
|
|
|
10588
11330
|
/**
|
|
10589
11331
|
* Component default class name and class prefix.
|
|
10590
11332
|
*/
|
|
10591
|
-
const CLASSNAME
|
|
11333
|
+
const CLASSNAME$$ = getRootClassName(COMPONENT_NAME$12);
|
|
10592
11334
|
|
|
10593
11335
|
/**
|
|
10594
11336
|
* SkeletonTypography component.
|
|
@@ -10605,12 +11347,12 @@ const SkeletonTypography = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10605
11347
|
width,
|
|
10606
11348
|
color
|
|
10607
11349
|
} = props,
|
|
10608
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
11350
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$17);
|
|
10609
11351
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
10610
11352
|
ref: ref
|
|
10611
11353
|
}, forwardedProps, {
|
|
10612
11354
|
className: classnames(className, handleBasicClasses({
|
|
10613
|
-
prefix: CLASSNAME
|
|
11355
|
+
prefix: CLASSNAME$$,
|
|
10614
11356
|
theme,
|
|
10615
11357
|
typography,
|
|
10616
11358
|
color
|
|
@@ -10619,12 +11361,12 @@ const SkeletonTypography = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10619
11361
|
width
|
|
10620
11362
|
})
|
|
10621
11363
|
}), /*#__PURE__*/React.createElement("div", {
|
|
10622
|
-
className: `${CLASSNAME
|
|
11364
|
+
className: `${CLASSNAME$$}__inner`
|
|
10623
11365
|
}));
|
|
10624
11366
|
});
|
|
10625
|
-
SkeletonTypography.displayName = COMPONENT_NAME$
|
|
11367
|
+
SkeletonTypography.displayName = COMPONENT_NAME$12;
|
|
10626
11368
|
SkeletonTypography.defaultProps = DEFAULT_PROPS$N;
|
|
10627
|
-
SkeletonTypography.className = CLASSNAME
|
|
11369
|
+
SkeletonTypography.className = CLASSNAME$$;
|
|
10628
11370
|
|
|
10629
11371
|
const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
10630
11372
|
|
|
@@ -10660,7 +11402,7 @@ const clamp = (value, min, max) => {
|
|
|
10660
11402
|
return value;
|
|
10661
11403
|
};
|
|
10662
11404
|
|
|
10663
|
-
const _excluded$
|
|
11405
|
+
const _excluded$18 = ["className", "disabled", "helper", "hideMinMaxLabel", "id", "isDisabled", "label", "max", "min", "name", "onChange", "onMouseDown", "precision", "steps", "theme", "value"];
|
|
10664
11406
|
|
|
10665
11407
|
/**
|
|
10666
11408
|
* Defines the props of the component.
|
|
@@ -10669,12 +11411,12 @@ const _excluded$15 = ["className", "disabled", "helper", "hideMinMaxLabel", "id"
|
|
|
10669
11411
|
/**
|
|
10670
11412
|
* Component display name.
|
|
10671
11413
|
*/
|
|
10672
|
-
const COMPONENT_NAME$
|
|
11414
|
+
const COMPONENT_NAME$13 = 'Slider';
|
|
10673
11415
|
|
|
10674
11416
|
/**
|
|
10675
11417
|
* Component default class name and class prefix.
|
|
10676
11418
|
*/
|
|
10677
|
-
const CLASSNAME
|
|
11419
|
+
const CLASSNAME$10 = getRootClassName(COMPONENT_NAME$13);
|
|
10678
11420
|
|
|
10679
11421
|
/**
|
|
10680
11422
|
* Component default props.
|
|
@@ -10735,7 +11477,7 @@ const Slider = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10735
11477
|
theme,
|
|
10736
11478
|
value
|
|
10737
11479
|
} = props,
|
|
10738
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
11480
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$18);
|
|
10739
11481
|
const sliderId = useMemo(() => id || `slider-${uid()}`, [id]);
|
|
10740
11482
|
const sliderLabelId = useMemo(() => `label-${sliderId}`, [sliderId]);
|
|
10741
11483
|
const sliderRef = useRef(null);
|
|
@@ -10868,7 +11610,7 @@ const Slider = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10868
11610
|
ref: ref
|
|
10869
11611
|
}, forwardedProps, {
|
|
10870
11612
|
className: classnames(className, handleBasicClasses({
|
|
10871
|
-
prefix: CLASSNAME
|
|
11613
|
+
prefix: CLASSNAME$10,
|
|
10872
11614
|
theme,
|
|
10873
11615
|
hasLabel: Boolean(label)
|
|
10874
11616
|
})),
|
|
@@ -10877,30 +11619,30 @@ const Slider = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10877
11619
|
}), label && /*#__PURE__*/React.createElement(InputLabel, {
|
|
10878
11620
|
id: sliderLabelId,
|
|
10879
11621
|
htmlFor: sliderId,
|
|
10880
|
-
className: `${CLASSNAME
|
|
11622
|
+
className: `${CLASSNAME$10}__label`,
|
|
10881
11623
|
theme: theme
|
|
10882
11624
|
}, label), helper && /*#__PURE__*/React.createElement(InputHelper, {
|
|
10883
|
-
className: `${CLASSNAME
|
|
11625
|
+
className: `${CLASSNAME$10}__helper`,
|
|
10884
11626
|
theme: theme
|
|
10885
11627
|
}, helper), /*#__PURE__*/React.createElement("div", {
|
|
10886
|
-
className: `${CLASSNAME
|
|
11628
|
+
className: `${CLASSNAME$10}__ui-wrapper`
|
|
10887
11629
|
}, !hideMinMaxLabel && /*#__PURE__*/React.createElement("span", {
|
|
10888
|
-
className: `${CLASSNAME
|
|
11630
|
+
className: `${CLASSNAME$10}__value-label ${CLASSNAME$10}__value-label--min`
|
|
10889
11631
|
}, min), /*#__PURE__*/React.createElement("div", {
|
|
10890
|
-
className: `${CLASSNAME
|
|
11632
|
+
className: `${CLASSNAME$10}__wrapper`,
|
|
10891
11633
|
ref: sliderRef
|
|
10892
11634
|
}, /*#__PURE__*/React.createElement("div", {
|
|
10893
|
-
className: `${CLASSNAME
|
|
11635
|
+
className: `${CLASSNAME$10}__track ${CLASSNAME$10}__track--background`
|
|
10894
11636
|
}), /*#__PURE__*/React.createElement("div", {
|
|
10895
|
-
className: `${CLASSNAME
|
|
11637
|
+
className: `${CLASSNAME$10}__track ${CLASSNAME$10}__track--active`,
|
|
10896
11638
|
style: {
|
|
10897
11639
|
width: percentString
|
|
10898
11640
|
}
|
|
10899
11641
|
}), steps ? /*#__PURE__*/React.createElement("div", {
|
|
10900
|
-
className: `${CLASSNAME
|
|
11642
|
+
className: `${CLASSNAME$10}__ticks`
|
|
10901
11643
|
}, availableSteps.map((step, idx) => /*#__PURE__*/React.createElement("div", {
|
|
10902
11644
|
key: `tick_${idx}`,
|
|
10903
|
-
className: `${CLASSNAME
|
|
11645
|
+
className: `${CLASSNAME$10}__tick`,
|
|
10904
11646
|
style: {
|
|
10905
11647
|
left: `${step * 100}%`
|
|
10906
11648
|
}
|
|
@@ -10909,18 +11651,18 @@ const Slider = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10909
11651
|
"aria-labelledby": sliderLabelId,
|
|
10910
11652
|
name: name,
|
|
10911
11653
|
id: sliderId,
|
|
10912
|
-
className: `${CLASSNAME
|
|
11654
|
+
className: `${CLASSNAME$10}__handle`,
|
|
10913
11655
|
style: {
|
|
10914
11656
|
left: percentString
|
|
10915
11657
|
},
|
|
10916
11658
|
onKeyDown: handleKeyDown,
|
|
10917
11659
|
disabled: isDisabled
|
|
10918
11660
|
})), !hideMinMaxLabel && /*#__PURE__*/React.createElement("span", {
|
|
10919
|
-
className: `${CLASSNAME
|
|
11661
|
+
className: `${CLASSNAME$10}__value-label ${CLASSNAME$10}__value-label--max`
|
|
10920
11662
|
}, max)));
|
|
10921
11663
|
});
|
|
10922
|
-
Slider.displayName = COMPONENT_NAME$
|
|
10923
|
-
Slider.className = CLASSNAME
|
|
11664
|
+
Slider.displayName = COMPONENT_NAME$13;
|
|
11665
|
+
Slider.className = CLASSNAME$10;
|
|
10924
11666
|
Slider.defaultProps = DEFAULT_PROPS$O;
|
|
10925
11667
|
|
|
10926
11668
|
/**
|
|
@@ -11241,7 +11983,7 @@ const useSlideFocusManagement = _ref => {
|
|
|
11241
11983
|
}, [isSlideDisplayed, slideRef]);
|
|
11242
11984
|
};
|
|
11243
11985
|
|
|
11244
|
-
const _excluded$
|
|
11986
|
+
const _excluded$19 = ["className", "children", "role", "label", "isDisplayed"];
|
|
11245
11987
|
|
|
11246
11988
|
/**
|
|
11247
11989
|
* Defines the props of the component.
|
|
@@ -11250,12 +11992,12 @@ const _excluded$16 = ["className", "children", "role", "label", "isDisplayed"];
|
|
|
11250
11992
|
/**
|
|
11251
11993
|
* Component display name.
|
|
11252
11994
|
*/
|
|
11253
|
-
const COMPONENT_NAME$
|
|
11995
|
+
const COMPONENT_NAME$14 = 'SlideshowItemGroup';
|
|
11254
11996
|
|
|
11255
11997
|
/**
|
|
11256
11998
|
* Component default class name and class prefix.
|
|
11257
11999
|
*/
|
|
11258
|
-
const CLASSNAME$
|
|
12000
|
+
const CLASSNAME$11 = getRootClassName(COMPONENT_NAME$14);
|
|
11259
12001
|
const buildSlideShowGroupId = (slidesId, index) => `${slidesId}-slide-${index}`;
|
|
11260
12002
|
|
|
11261
12003
|
/**
|
|
@@ -11273,7 +12015,7 @@ const SlideshowItemGroup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11273
12015
|
label,
|
|
11274
12016
|
isDisplayed
|
|
11275
12017
|
} = props,
|
|
11276
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12018
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$19);
|
|
11277
12019
|
const groupRef = React.useRef(null);
|
|
11278
12020
|
useSlideFocusManagement({
|
|
11279
12021
|
isSlideDisplayed: isDisplayed,
|
|
@@ -11283,16 +12025,16 @@ const SlideshowItemGroup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11283
12025
|
ref: mergeRefs(groupRef, ref),
|
|
11284
12026
|
role: role,
|
|
11285
12027
|
className: classnames(className, handleBasicClasses({
|
|
11286
|
-
prefix: CLASSNAME$
|
|
12028
|
+
prefix: CLASSNAME$11
|
|
11287
12029
|
})),
|
|
11288
12030
|
"aria-roledescription": "slide",
|
|
11289
12031
|
"aria-label": label
|
|
11290
12032
|
}, forwardedProps), children);
|
|
11291
12033
|
});
|
|
11292
|
-
SlideshowItemGroup.displayName = COMPONENT_NAME$
|
|
11293
|
-
SlideshowItemGroup.className = CLASSNAME$
|
|
12034
|
+
SlideshowItemGroup.displayName = COMPONENT_NAME$14;
|
|
12035
|
+
SlideshowItemGroup.className = CLASSNAME$11;
|
|
11294
12036
|
|
|
11295
|
-
const _excluded$
|
|
12037
|
+
const _excluded$1a = ["activeIndex", "autoPlay", "children", "className", "fillHeight", "groupBy", "interval", "onChange", "slideshowControlsProps", "theme", "id", "slidesId", "slideGroupLabel"];
|
|
11296
12038
|
|
|
11297
12039
|
/**
|
|
11298
12040
|
* Defines the props of the component.
|
|
@@ -11328,7 +12070,7 @@ const Slideshow = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11328
12070
|
slidesId,
|
|
11329
12071
|
slideGroupLabel
|
|
11330
12072
|
} = props,
|
|
11331
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12073
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1a);
|
|
11332
12074
|
// Number of slideshow items.
|
|
11333
12075
|
const itemsCount = React.Children.count(children);
|
|
11334
12076
|
const {
|
|
@@ -11410,7 +12152,7 @@ const Slideshow = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11410
12152
|
Slideshow.displayName = 'Slideshow';
|
|
11411
12153
|
Slideshow.defaultProps = DEFAULT_PROPS$P;
|
|
11412
12154
|
|
|
11413
|
-
const _excluded$
|
|
12155
|
+
const _excluded$1b = ["className", "children"];
|
|
11414
12156
|
|
|
11415
12157
|
/**
|
|
11416
12158
|
* Defines the props of the component.
|
|
@@ -11419,12 +12161,12 @@ const _excluded$18 = ["className", "children"];
|
|
|
11419
12161
|
/**
|
|
11420
12162
|
* Component display name.
|
|
11421
12163
|
*/
|
|
11422
|
-
const COMPONENT_NAME$
|
|
12164
|
+
const COMPONENT_NAME$15 = 'SlideshowItem';
|
|
11423
12165
|
|
|
11424
12166
|
/**
|
|
11425
12167
|
* Component default class name and class prefix.
|
|
11426
12168
|
*/
|
|
11427
|
-
const CLASSNAME$
|
|
12169
|
+
const CLASSNAME$12 = getRootClassName(COMPONENT_NAME$15);
|
|
11428
12170
|
|
|
11429
12171
|
/**
|
|
11430
12172
|
* SlideshowItem component.
|
|
@@ -11438,16 +12180,16 @@ const SlideshowItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11438
12180
|
className,
|
|
11439
12181
|
children
|
|
11440
12182
|
} = props,
|
|
11441
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12183
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1b);
|
|
11442
12184
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
11443
12185
|
ref: ref,
|
|
11444
12186
|
className: classnames(className, handleBasicClasses({
|
|
11445
|
-
prefix: CLASSNAME$
|
|
12187
|
+
prefix: CLASSNAME$12
|
|
11446
12188
|
}))
|
|
11447
12189
|
}, forwardedProps), children);
|
|
11448
12190
|
});
|
|
11449
|
-
SlideshowItem.displayName = COMPONENT_NAME$
|
|
11450
|
-
SlideshowItem.className = CLASSNAME$
|
|
12191
|
+
SlideshowItem.displayName = COMPONENT_NAME$15;
|
|
12192
|
+
SlideshowItem.className = CLASSNAME$12;
|
|
11451
12193
|
|
|
11452
12194
|
const isTouchDevice = () => 'ontouchstart' in window;
|
|
11453
12195
|
|
|
@@ -11506,7 +12248,7 @@ function usePaginationVisibleRange(activeIndex, slideCount) {
|
|
|
11506
12248
|
}, [activeIndex, slideCount]);
|
|
11507
12249
|
}
|
|
11508
12250
|
|
|
11509
|
-
const _excluded$
|
|
12251
|
+
const _excluded$1c = ["activeIndex", "className", "nextButtonProps", "onNextClick", "onPaginationClick", "onPreviousClick", "parentRef", "previousButtonProps", "paginationProps", "slidesCount", "theme", "isAutoPlaying", "playButtonProps", "paginationItemLabel", "paginationItemProps"],
|
|
11510
12252
|
_excluded2$2 = ["className", "label"];
|
|
11511
12253
|
|
|
11512
12254
|
/**
|
|
@@ -11516,12 +12258,12 @@ const _excluded$19 = ["activeIndex", "className", "nextButtonProps", "onNextClic
|
|
|
11516
12258
|
/**
|
|
11517
12259
|
* Component display name.
|
|
11518
12260
|
*/
|
|
11519
|
-
const COMPONENT_NAME$
|
|
12261
|
+
const COMPONENT_NAME$16 = 'SlideshowControls';
|
|
11520
12262
|
|
|
11521
12263
|
/**
|
|
11522
12264
|
* Component default class name and class prefix.
|
|
11523
12265
|
*/
|
|
11524
|
-
const CLASSNAME$
|
|
12266
|
+
const CLASSNAME$13 = getRootClassName(COMPONENT_NAME$16);
|
|
11525
12267
|
|
|
11526
12268
|
/**
|
|
11527
12269
|
* Component default props.
|
|
@@ -11556,7 +12298,7 @@ const InternalSlideshowControls = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11556
12298
|
paginationItemLabel,
|
|
11557
12299
|
paginationItemProps
|
|
11558
12300
|
} = props,
|
|
11559
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12301
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1c);
|
|
11560
12302
|
let parent;
|
|
11561
12303
|
if (WINDOW) {
|
|
11562
12304
|
// Checking window object to avoid errors in SSR.
|
|
@@ -11593,22 +12335,22 @@ const InternalSlideshowControls = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11593
12335
|
ref: ref
|
|
11594
12336
|
}, forwardedProps, {
|
|
11595
12337
|
className: classnames(className, handleBasicClasses({
|
|
11596
|
-
prefix: CLASSNAME$
|
|
12338
|
+
prefix: CLASSNAME$13,
|
|
11597
12339
|
theme
|
|
11598
12340
|
}), {
|
|
11599
|
-
[`${CLASSNAME$
|
|
12341
|
+
[`${CLASSNAME$13}--has-infinite-pagination`]: slidesCount > PAGINATION_ITEMS_MAX
|
|
11600
12342
|
})
|
|
11601
12343
|
}), /*#__PURE__*/React.createElement(IconButton, _extends({}, previousButtonProps, {
|
|
11602
12344
|
icon: mdiChevronLeft,
|
|
11603
|
-
className: `${CLASSNAME$
|
|
12345
|
+
className: `${CLASSNAME$13}__navigation`,
|
|
11604
12346
|
color: theme === Theme.dark ? 'light' : 'dark',
|
|
11605
12347
|
emphasis: Emphasis.low,
|
|
11606
12348
|
onClick: onPreviousClick
|
|
11607
12349
|
})), /*#__PURE__*/React.createElement("div", {
|
|
11608
12350
|
ref: paginationRef,
|
|
11609
|
-
className: `${CLASSNAME$
|
|
12351
|
+
className: `${CLASSNAME$13}__pagination`
|
|
11610
12352
|
}, /*#__PURE__*/React.createElement("div", _extends({
|
|
11611
|
-
className: `${CLASSNAME$
|
|
12353
|
+
className: `${CLASSNAME$13}__pagination-items`,
|
|
11612
12354
|
style: wrapperStyle,
|
|
11613
12355
|
role: "tablist"
|
|
11614
12356
|
}, paginationProps), useMemo(() => range(slidesCount).map(index => {
|
|
@@ -11624,7 +12366,7 @@ const InternalSlideshowControls = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11624
12366
|
const ariaLabel = label || (paginationItemLabel === null || paginationItemLabel === void 0 ? void 0 : paginationItemLabel(index)) || `${index + 1} / ${slidesCount}`;
|
|
11625
12367
|
return /*#__PURE__*/React.createElement("button", _extends({
|
|
11626
12368
|
className: classnames(handleBasicClasses({
|
|
11627
|
-
prefix: `${CLASSNAME$
|
|
12369
|
+
prefix: `${CLASSNAME$13}__pagination-item`,
|
|
11628
12370
|
isActive,
|
|
11629
12371
|
isOnEdge,
|
|
11630
12372
|
isOutRange
|
|
@@ -11639,35 +12381,35 @@ const InternalSlideshowControls = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11639
12381
|
}, itemProps));
|
|
11640
12382
|
}), [slidesCount, visibleRange.min, visibleRange.max, activeIndex, paginationItemProps, paginationItemLabel, onPaginationClick]))), playButtonProps ? /*#__PURE__*/React.createElement(IconButton, _extends({}, playButtonProps, {
|
|
11641
12383
|
icon: isAutoPlaying ? mdiPauseCircleOutline : mdiPlayCircleOutline,
|
|
11642
|
-
className: `${CLASSNAME$
|
|
12384
|
+
className: `${CLASSNAME$13}__play`,
|
|
11643
12385
|
color: theme === Theme.dark ? 'light' : 'dark',
|
|
11644
12386
|
emphasis: Emphasis.low
|
|
11645
12387
|
})) : null, /*#__PURE__*/React.createElement(IconButton, _extends({}, nextButtonProps, {
|
|
11646
12388
|
icon: mdiChevronRight,
|
|
11647
|
-
className: `${CLASSNAME$
|
|
12389
|
+
className: `${CLASSNAME$13}__navigation`,
|
|
11648
12390
|
color: theme === Theme.dark ? 'light' : 'dark',
|
|
11649
12391
|
emphasis: Emphasis.low,
|
|
11650
12392
|
onClick: onNextClick
|
|
11651
12393
|
})));
|
|
11652
12394
|
});
|
|
11653
|
-
InternalSlideshowControls.displayName = COMPONENT_NAME$
|
|
11654
|
-
InternalSlideshowControls.className = CLASSNAME$
|
|
12395
|
+
InternalSlideshowControls.displayName = COMPONENT_NAME$16;
|
|
12396
|
+
InternalSlideshowControls.className = CLASSNAME$13;
|
|
11655
12397
|
InternalSlideshowControls.defaultProps = DEFAULT_PROPS$Q;
|
|
11656
12398
|
const SlideshowControls = Object.assign(InternalSlideshowControls, {
|
|
11657
12399
|
useSlideshowControls,
|
|
11658
12400
|
useSlideshowControlsDefaultOptions: DEFAULT_OPTIONS$1
|
|
11659
12401
|
});
|
|
11660
12402
|
|
|
11661
|
-
const _excluded$
|
|
12403
|
+
const _excluded$1d = ["activeIndex", "id", "className", "theme", "fillHeight", "groupBy", "isAutoPlaying", "toggleAutoPlay", "slidesId", "children", "afterSlides", "hasControls", "slideGroupLabel"];
|
|
11662
12404
|
/**
|
|
11663
12405
|
* Component display name.
|
|
11664
12406
|
*/
|
|
11665
|
-
const COMPONENT_NAME$
|
|
12407
|
+
const COMPONENT_NAME$17 = 'Slideshow';
|
|
11666
12408
|
|
|
11667
12409
|
/**
|
|
11668
12410
|
* Component default class name and class prefix.
|
|
11669
12411
|
*/
|
|
11670
|
-
const CLASSNAME$
|
|
12412
|
+
const CLASSNAME$14 = getRootClassName(COMPONENT_NAME$17);
|
|
11671
12413
|
|
|
11672
12414
|
/**
|
|
11673
12415
|
* Slides component.
|
|
@@ -11692,7 +12434,7 @@ const Slides = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11692
12434
|
hasControls,
|
|
11693
12435
|
slideGroupLabel
|
|
11694
12436
|
} = props,
|
|
11695
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12437
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1d);
|
|
11696
12438
|
const wrapperRef = React.useRef(null);
|
|
11697
12439
|
const startIndexVisible = activeIndex;
|
|
11698
12440
|
const endIndexVisible = startIndexVisible + 1;
|
|
@@ -11710,22 +12452,22 @@ const Slides = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11710
12452
|
ref: ref
|
|
11711
12453
|
}, forwardedProps, {
|
|
11712
12454
|
className: classnames(className, handleBasicClasses({
|
|
11713
|
-
prefix: CLASSNAME$
|
|
12455
|
+
prefix: CLASSNAME$14,
|
|
11714
12456
|
theme
|
|
11715
12457
|
}), {
|
|
11716
|
-
[`${CLASSNAME$
|
|
11717
|
-
[`${CLASSNAME$
|
|
12458
|
+
[`${CLASSNAME$14}--fill-height`]: fillHeight,
|
|
12459
|
+
[`${CLASSNAME$14}--group-by-${groupBy}`]: Boolean(groupBy)
|
|
11718
12460
|
}),
|
|
11719
12461
|
"aria-roledescription": "carousel"
|
|
11720
12462
|
}), /*#__PURE__*/React.createElement("div", {
|
|
11721
12463
|
id: slidesId,
|
|
11722
|
-
className: `${CLASSNAME$
|
|
12464
|
+
className: `${CLASSNAME$14}__slides`,
|
|
11723
12465
|
onMouseEnter: toggleAutoPlay,
|
|
11724
12466
|
onMouseLeave: toggleAutoPlay,
|
|
11725
12467
|
"aria-live": isAutoPlaying ? 'off' : 'polite'
|
|
11726
12468
|
}, /*#__PURE__*/React.createElement("div", {
|
|
11727
12469
|
ref: wrapperRef,
|
|
11728
|
-
className: `${CLASSNAME$
|
|
12470
|
+
className: `${CLASSNAME$14}__wrapper`,
|
|
11729
12471
|
style: wrapperStyle
|
|
11730
12472
|
}, groups.map((group, index) => /*#__PURE__*/React.createElement(SlideshowItemGroup, {
|
|
11731
12473
|
key: index,
|
|
@@ -11735,10 +12477,10 @@ const Slides = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11735
12477
|
isDisplayed: index >= startIndexVisible && index < endIndexVisible
|
|
11736
12478
|
}, group)))), afterSlides);
|
|
11737
12479
|
});
|
|
11738
|
-
Slides.displayName = COMPONENT_NAME$
|
|
11739
|
-
Slides.className = CLASSNAME$
|
|
12480
|
+
Slides.displayName = COMPONENT_NAME$17;
|
|
12481
|
+
Slides.className = CLASSNAME$14;
|
|
11740
12482
|
|
|
11741
|
-
const _excluded$
|
|
12483
|
+
const _excluded$1e = ["checked", "children", "className", "disabled", "helper", "id", "isChecked", "isDisabled", "name", "onChange", "position", "theme", "value", "inputProps"];
|
|
11742
12484
|
|
|
11743
12485
|
/**
|
|
11744
12486
|
* Defines the props of the component.
|
|
@@ -11747,12 +12489,12 @@ const _excluded$1b = ["checked", "children", "className", "disabled", "helper",
|
|
|
11747
12489
|
/**
|
|
11748
12490
|
* Component display name.
|
|
11749
12491
|
*/
|
|
11750
|
-
const COMPONENT_NAME$
|
|
12492
|
+
const COMPONENT_NAME$18 = 'Switch';
|
|
11751
12493
|
|
|
11752
12494
|
/**
|
|
11753
12495
|
* Component default class name and class prefix.
|
|
11754
12496
|
*/
|
|
11755
|
-
const CLASSNAME$
|
|
12497
|
+
const CLASSNAME$15 = getRootClassName(COMPONENT_NAME$18);
|
|
11756
12498
|
|
|
11757
12499
|
/**
|
|
11758
12500
|
* Component default props.
|
|
@@ -11786,7 +12528,7 @@ const Switch = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11786
12528
|
value,
|
|
11787
12529
|
inputProps = {}
|
|
11788
12530
|
} = props,
|
|
11789
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12531
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1e);
|
|
11790
12532
|
const inputId = useMemo(() => id || `switch-${uid()}`, [id]);
|
|
11791
12533
|
const handleChange = event => {
|
|
11792
12534
|
if (onChange) {
|
|
@@ -11797,7 +12539,7 @@ const Switch = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11797
12539
|
ref: ref
|
|
11798
12540
|
}, forwardedProps, {
|
|
11799
12541
|
className: classnames(className, handleBasicClasses({
|
|
11800
|
-
prefix: CLASSNAME$
|
|
12542
|
+
prefix: CLASSNAME$15,
|
|
11801
12543
|
isChecked,
|
|
11802
12544
|
isDisabled,
|
|
11803
12545
|
position,
|
|
@@ -11806,12 +12548,12 @@ const Switch = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11806
12548
|
})),
|
|
11807
12549
|
"aria-disabled": isDisabled
|
|
11808
12550
|
}), /*#__PURE__*/React.createElement("div", {
|
|
11809
|
-
className: `${CLASSNAME$
|
|
12551
|
+
className: `${CLASSNAME$15}__input-wrapper`
|
|
11810
12552
|
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
11811
12553
|
type: "checkbox",
|
|
11812
12554
|
role: "switch",
|
|
11813
12555
|
id: inputId,
|
|
11814
|
-
className: `${CLASSNAME$
|
|
12556
|
+
className: `${CLASSNAME$15}__input-native`,
|
|
11815
12557
|
name: name,
|
|
11816
12558
|
value: value,
|
|
11817
12559
|
disabled: isDisabled,
|
|
@@ -11820,28 +12562,28 @@ const Switch = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11820
12562
|
onChange: handleChange,
|
|
11821
12563
|
"aria-describedby": helper ? `${inputId}-helper` : undefined
|
|
11822
12564
|
}, inputProps)), /*#__PURE__*/React.createElement("div", {
|
|
11823
|
-
className: `${CLASSNAME$
|
|
12565
|
+
className: `${CLASSNAME$15}__input-placeholder`
|
|
11824
12566
|
}, /*#__PURE__*/React.createElement("div", {
|
|
11825
|
-
className: `${CLASSNAME$
|
|
12567
|
+
className: `${CLASSNAME$15}__input-background`
|
|
11826
12568
|
}), /*#__PURE__*/React.createElement("div", {
|
|
11827
|
-
className: `${CLASSNAME$
|
|
12569
|
+
className: `${CLASSNAME$15}__input-indicator`
|
|
11828
12570
|
}))), Children.count(children) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
11829
|
-
className: `${CLASSNAME$
|
|
12571
|
+
className: `${CLASSNAME$15}__content`
|
|
11830
12572
|
}, /*#__PURE__*/React.createElement(InputLabel, {
|
|
11831
12573
|
htmlFor: inputId,
|
|
11832
12574
|
theme: theme,
|
|
11833
|
-
className: `${CLASSNAME$
|
|
12575
|
+
className: `${CLASSNAME$15}__label`
|
|
11834
12576
|
}, children), !isEmpty(helper) && /*#__PURE__*/React.createElement(InputHelper, {
|
|
11835
12577
|
id: `${inputId}-helper`,
|
|
11836
12578
|
theme: theme,
|
|
11837
|
-
className: `${CLASSNAME$
|
|
12579
|
+
className: `${CLASSNAME$15}__helper`
|
|
11838
12580
|
}, helper)));
|
|
11839
12581
|
});
|
|
11840
|
-
Switch.displayName = COMPONENT_NAME$
|
|
11841
|
-
Switch.className = CLASSNAME$
|
|
12582
|
+
Switch.displayName = COMPONENT_NAME$18;
|
|
12583
|
+
Switch.className = CLASSNAME$15;
|
|
11842
12584
|
Switch.defaultProps = DEFAULT_PROPS$R;
|
|
11843
12585
|
|
|
11844
|
-
const _excluded$
|
|
12586
|
+
const _excluded$1f = ["children", "className", "hasBefore", "hasDividers", "theme"];
|
|
11845
12587
|
|
|
11846
12588
|
/**
|
|
11847
12589
|
* Defines the props of the component.
|
|
@@ -11850,12 +12592,12 @@ const _excluded$1c = ["children", "className", "hasBefore", "hasDividers", "them
|
|
|
11850
12592
|
/**
|
|
11851
12593
|
* Component display name.
|
|
11852
12594
|
*/
|
|
11853
|
-
const COMPONENT_NAME$
|
|
12595
|
+
const COMPONENT_NAME$19 = 'Table';
|
|
11854
12596
|
|
|
11855
12597
|
/**
|
|
11856
12598
|
* Component default class name and class prefix.
|
|
11857
12599
|
*/
|
|
11858
|
-
const CLASSNAME$
|
|
12600
|
+
const CLASSNAME$16 = getRootClassName(COMPONENT_NAME$19);
|
|
11859
12601
|
|
|
11860
12602
|
/**
|
|
11861
12603
|
* Component default props.
|
|
@@ -11879,23 +12621,23 @@ const Table = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11879
12621
|
hasDividers,
|
|
11880
12622
|
theme
|
|
11881
12623
|
} = props,
|
|
11882
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12624
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1f);
|
|
11883
12625
|
return /*#__PURE__*/React.createElement("table", _extends({
|
|
11884
12626
|
ref: ref
|
|
11885
12627
|
}, forwardedProps, {
|
|
11886
12628
|
className: classnames(className, handleBasicClasses({
|
|
11887
|
-
prefix: CLASSNAME$
|
|
12629
|
+
prefix: CLASSNAME$16,
|
|
11888
12630
|
hasBefore,
|
|
11889
12631
|
hasDividers,
|
|
11890
12632
|
theme
|
|
11891
12633
|
}))
|
|
11892
12634
|
}), children);
|
|
11893
12635
|
});
|
|
11894
|
-
Table.displayName = COMPONENT_NAME$
|
|
11895
|
-
Table.className = CLASSNAME$
|
|
12636
|
+
Table.displayName = COMPONENT_NAME$19;
|
|
12637
|
+
Table.className = CLASSNAME$16;
|
|
11896
12638
|
Table.defaultProps = DEFAULT_PROPS$S;
|
|
11897
12639
|
|
|
11898
|
-
const _excluded$
|
|
12640
|
+
const _excluded$1g = ["children", "className"];
|
|
11899
12641
|
|
|
11900
12642
|
/**
|
|
11901
12643
|
* Defines the props of the component.
|
|
@@ -11904,12 +12646,12 @@ const _excluded$1d = ["children", "className"];
|
|
|
11904
12646
|
/**
|
|
11905
12647
|
* Component display name.
|
|
11906
12648
|
*/
|
|
11907
|
-
const COMPONENT_NAME$
|
|
12649
|
+
const COMPONENT_NAME$1a = 'TableBody';
|
|
11908
12650
|
|
|
11909
12651
|
/**
|
|
11910
12652
|
* Component default class name and class prefix.
|
|
11911
12653
|
*/
|
|
11912
|
-
const CLASSNAME$
|
|
12654
|
+
const CLASSNAME$17 = getRootClassName(COMPONENT_NAME$1a, true);
|
|
11913
12655
|
|
|
11914
12656
|
/**
|
|
11915
12657
|
* TableBody component.
|
|
@@ -11923,19 +12665,19 @@ const TableBody = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11923
12665
|
children,
|
|
11924
12666
|
className
|
|
11925
12667
|
} = props,
|
|
11926
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12668
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1g);
|
|
11927
12669
|
return /*#__PURE__*/React.createElement("tbody", _extends({
|
|
11928
12670
|
ref: ref
|
|
11929
12671
|
}, forwardedProps, {
|
|
11930
12672
|
className: classnames(className, handleBasicClasses({
|
|
11931
|
-
prefix: CLASSNAME$
|
|
12673
|
+
prefix: CLASSNAME$17
|
|
11932
12674
|
}))
|
|
11933
12675
|
}), children);
|
|
11934
12676
|
});
|
|
11935
|
-
TableBody.displayName = COMPONENT_NAME$
|
|
11936
|
-
TableBody.className = CLASSNAME$
|
|
12677
|
+
TableBody.displayName = COMPONENT_NAME$1a;
|
|
12678
|
+
TableBody.className = CLASSNAME$17;
|
|
11937
12679
|
|
|
11938
|
-
const _excluded$
|
|
12680
|
+
const _excluded$1h = ["children", "className", "icon", "isSortable", "onHeaderClick", "sortOrder", "variant"];
|
|
11939
12681
|
|
|
11940
12682
|
/**
|
|
11941
12683
|
* Table head cell sort order.
|
|
@@ -11959,12 +12701,12 @@ const TableCellVariant = {
|
|
|
11959
12701
|
/**
|
|
11960
12702
|
* Component display name.
|
|
11961
12703
|
*/
|
|
11962
|
-
const COMPONENT_NAME$
|
|
12704
|
+
const COMPONENT_NAME$1b = 'TableCell';
|
|
11963
12705
|
|
|
11964
12706
|
/**
|
|
11965
12707
|
* Component default class name and class prefix.
|
|
11966
12708
|
*/
|
|
11967
|
-
const CLASSNAME$
|
|
12709
|
+
const CLASSNAME$18 = getRootClassName(COMPONENT_NAME$1b, true);
|
|
11968
12710
|
|
|
11969
12711
|
/**
|
|
11970
12712
|
* Component default props.
|
|
@@ -11990,7 +12732,7 @@ const TableCell = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11990
12732
|
sortOrder,
|
|
11991
12733
|
variant
|
|
11992
12734
|
} = props,
|
|
11993
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12735
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1h);
|
|
11994
12736
|
|
|
11995
12737
|
// Use button if clickable
|
|
11996
12738
|
const Wrapper = onHeaderClick ? 'button' : 'div';
|
|
@@ -12010,40 +12752,40 @@ const TableCell = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12010
12752
|
ref: ref
|
|
12011
12753
|
}, forwardedProps, {
|
|
12012
12754
|
className: classnames(handleBasicClasses({
|
|
12013
|
-
prefix: CLASSNAME$
|
|
12755
|
+
prefix: CLASSNAME$18,
|
|
12014
12756
|
isSortable,
|
|
12015
12757
|
isSorted: isSortable && !!sortOrder
|
|
12016
|
-
}), className, `${CLASSNAME$
|
|
12758
|
+
}), className, `${CLASSNAME$18}--head`),
|
|
12017
12759
|
"aria-sort": ariaSort
|
|
12018
12760
|
}), /*#__PURE__*/React.createElement(Wrapper, _extends({
|
|
12019
|
-
className: `${CLASSNAME$
|
|
12761
|
+
className: `${CLASSNAME$18}-wrapper`
|
|
12020
12762
|
}, wrapperProps), icon && !isSortable && /*#__PURE__*/React.createElement(Icon, {
|
|
12021
|
-
className: `${CLASSNAME$
|
|
12763
|
+
className: `${CLASSNAME$18}-icon`,
|
|
12022
12764
|
icon: icon,
|
|
12023
12765
|
size: Size.xxs
|
|
12024
12766
|
}), isSortable && sortOrder === ThOrder.asc && /*#__PURE__*/React.createElement(Icon, {
|
|
12025
|
-
className: `${CLASSNAME$
|
|
12767
|
+
className: `${CLASSNAME$18}-icon`,
|
|
12026
12768
|
icon: mdiArrowUp,
|
|
12027
12769
|
size: Size.xxs
|
|
12028
12770
|
}), isSortable && sortOrder === ThOrder.desc && /*#__PURE__*/React.createElement(Icon, {
|
|
12029
|
-
className: `${CLASSNAME$
|
|
12771
|
+
className: `${CLASSNAME$18}-icon`,
|
|
12030
12772
|
icon: mdiArrowDown,
|
|
12031
12773
|
size: Size.xxs
|
|
12032
12774
|
}), /*#__PURE__*/React.createElement("div", {
|
|
12033
|
-
className: `${CLASSNAME$
|
|
12775
|
+
className: `${CLASSNAME$18}-content`
|
|
12034
12776
|
}, children))), variant === TableCellVariant.body && /*#__PURE__*/React.createElement("td", _extends({}, forwardedProps, {
|
|
12035
12777
|
className: classnames(className, handleBasicClasses({
|
|
12036
|
-
prefix: CLASSNAME$
|
|
12037
|
-
}), `${CLASSNAME$
|
|
12778
|
+
prefix: CLASSNAME$18
|
|
12779
|
+
}), `${CLASSNAME$18}--body`)
|
|
12038
12780
|
}), /*#__PURE__*/React.createElement("div", {
|
|
12039
|
-
className: `${CLASSNAME$
|
|
12781
|
+
className: `${CLASSNAME$18}-content`
|
|
12040
12782
|
}, children)));
|
|
12041
12783
|
});
|
|
12042
|
-
TableCell.displayName = COMPONENT_NAME$
|
|
12043
|
-
TableCell.className = CLASSNAME$
|
|
12784
|
+
TableCell.displayName = COMPONENT_NAME$1b;
|
|
12785
|
+
TableCell.className = CLASSNAME$18;
|
|
12044
12786
|
TableCell.defaultProps = DEFAULT_PROPS$T;
|
|
12045
12787
|
|
|
12046
|
-
const _excluded$
|
|
12788
|
+
const _excluded$1i = ["children", "className"];
|
|
12047
12789
|
|
|
12048
12790
|
/**
|
|
12049
12791
|
* Defines the props of the component.
|
|
@@ -12052,12 +12794,12 @@ const _excluded$1f = ["children", "className"];
|
|
|
12052
12794
|
/**
|
|
12053
12795
|
* Component display name.
|
|
12054
12796
|
*/
|
|
12055
|
-
const COMPONENT_NAME$
|
|
12797
|
+
const COMPONENT_NAME$1c = 'TableHeader';
|
|
12056
12798
|
|
|
12057
12799
|
/**
|
|
12058
12800
|
* Component default class name and class prefix.
|
|
12059
12801
|
*/
|
|
12060
|
-
const CLASSNAME$
|
|
12802
|
+
const CLASSNAME$19 = getRootClassName(COMPONENT_NAME$1c, true);
|
|
12061
12803
|
|
|
12062
12804
|
/**
|
|
12063
12805
|
* Component default props.
|
|
@@ -12076,20 +12818,20 @@ const TableHeader = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12076
12818
|
children,
|
|
12077
12819
|
className
|
|
12078
12820
|
} = props,
|
|
12079
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12821
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1i);
|
|
12080
12822
|
return /*#__PURE__*/React.createElement("thead", _extends({
|
|
12081
12823
|
ref: ref
|
|
12082
12824
|
}, forwardedProps, {
|
|
12083
12825
|
className: classnames(className, handleBasicClasses({
|
|
12084
|
-
prefix: CLASSNAME$
|
|
12826
|
+
prefix: CLASSNAME$19
|
|
12085
12827
|
}))
|
|
12086
12828
|
}), children);
|
|
12087
12829
|
});
|
|
12088
|
-
TableHeader.displayName = COMPONENT_NAME$
|
|
12089
|
-
TableHeader.className = CLASSNAME$
|
|
12830
|
+
TableHeader.displayName = COMPONENT_NAME$1c;
|
|
12831
|
+
TableHeader.className = CLASSNAME$19;
|
|
12090
12832
|
TableHeader.defaultProps = DEFAULT_PROPS$U;
|
|
12091
12833
|
|
|
12092
|
-
const _excluded$
|
|
12834
|
+
const _excluded$1j = ["children", "className", "disabled", "isClickable", "isDisabled", "isSelected"];
|
|
12093
12835
|
|
|
12094
12836
|
/**
|
|
12095
12837
|
* Defines the props of the component.
|
|
@@ -12098,12 +12840,12 @@ const _excluded$1g = ["children", "className", "disabled", "isClickable", "isDis
|
|
|
12098
12840
|
/**
|
|
12099
12841
|
* Component display name.
|
|
12100
12842
|
*/
|
|
12101
|
-
const COMPONENT_NAME$
|
|
12843
|
+
const COMPONENT_NAME$1d = 'TableRow';
|
|
12102
12844
|
|
|
12103
12845
|
/**
|
|
12104
12846
|
* Component default class name and class prefix.
|
|
12105
12847
|
*/
|
|
12106
|
-
const CLASSNAME$
|
|
12848
|
+
const CLASSNAME$1a = getRootClassName(COMPONENT_NAME$1d, true);
|
|
12107
12849
|
|
|
12108
12850
|
/**
|
|
12109
12851
|
* Component default props.
|
|
@@ -12126,7 +12868,7 @@ const TableRow = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12126
12868
|
isDisabled = disabled,
|
|
12127
12869
|
isSelected
|
|
12128
12870
|
} = props,
|
|
12129
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12871
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1j);
|
|
12130
12872
|
return /*#__PURE__*/React.createElement("tr", _extends({
|
|
12131
12873
|
ref: ref,
|
|
12132
12874
|
tabIndex: isClickable && !isDisabled ? 0 : -1
|
|
@@ -12135,16 +12877,16 @@ const TableRow = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12135
12877
|
isClickable: isClickable && !isDisabled,
|
|
12136
12878
|
isDisabled,
|
|
12137
12879
|
isSelected: isSelected && !isDisabled,
|
|
12138
|
-
prefix: CLASSNAME$
|
|
12880
|
+
prefix: CLASSNAME$1a
|
|
12139
12881
|
})),
|
|
12140
12882
|
"aria-disabled": isDisabled
|
|
12141
12883
|
}), children);
|
|
12142
12884
|
});
|
|
12143
|
-
TableRow.displayName = COMPONENT_NAME$
|
|
12144
|
-
TableRow.className = CLASSNAME$
|
|
12885
|
+
TableRow.displayName = COMPONENT_NAME$1d;
|
|
12886
|
+
TableRow.className = CLASSNAME$1a;
|
|
12145
12887
|
TableRow.defaultProps = DEFAULT_PROPS$V;
|
|
12146
12888
|
|
|
12147
|
-
const _excluded$
|
|
12889
|
+
const _excluded$1k = ["children", "onChange"];
|
|
12148
12890
|
const DEFAULT_PROPS$W = {
|
|
12149
12891
|
isLazy: INIT_STATE.isLazy,
|
|
12150
12892
|
shouldActivateOnFocus: INIT_STATE.shouldActivateOnFocus
|
|
@@ -12164,7 +12906,7 @@ const TabProvider = props => {
|
|
|
12164
12906
|
children,
|
|
12165
12907
|
onChange
|
|
12166
12908
|
} = props,
|
|
12167
|
-
propState = _objectWithoutProperties(props, _excluded$
|
|
12909
|
+
propState = _objectWithoutProperties(props, _excluded$1k);
|
|
12168
12910
|
const [state, dispatch] = useReducer(reducer, INIT_STATE);
|
|
12169
12911
|
|
|
12170
12912
|
// On prop state change => dispatch update.
|
|
@@ -12192,7 +12934,7 @@ const TabProvider = props => {
|
|
|
12192
12934
|
};
|
|
12193
12935
|
TabProvider.defaultProps = DEFAULT_PROPS$W;
|
|
12194
12936
|
|
|
12195
|
-
const _excluded$
|
|
12937
|
+
const _excluded$1l = ["aria-label", "children", "className", "layout", "position", "theme"];
|
|
12196
12938
|
let TabListLayout = /*#__PURE__*/function (TabListLayout) {
|
|
12197
12939
|
TabListLayout["clustered"] = "clustered";
|
|
12198
12940
|
TabListLayout["fixed"] = "fixed";
|
|
@@ -12206,12 +12948,12 @@ let TabListLayout = /*#__PURE__*/function (TabListLayout) {
|
|
|
12206
12948
|
/**
|
|
12207
12949
|
* Component display name.
|
|
12208
12950
|
*/
|
|
12209
|
-
const COMPONENT_NAME$
|
|
12951
|
+
const COMPONENT_NAME$1e = 'TabList';
|
|
12210
12952
|
|
|
12211
12953
|
/**
|
|
12212
12954
|
* Component default class name and class prefix.
|
|
12213
12955
|
*/
|
|
12214
|
-
const CLASSNAME$
|
|
12956
|
+
const CLASSNAME$1b = `${CSS_PREFIX}-tabs`;
|
|
12215
12957
|
|
|
12216
12958
|
/**
|
|
12217
12959
|
* Component default props.
|
|
@@ -12240,7 +12982,7 @@ const TabList = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12240
12982
|
position,
|
|
12241
12983
|
theme
|
|
12242
12984
|
} = props,
|
|
12243
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
12985
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1l);
|
|
12244
12986
|
const tabListRef = React.useRef(null);
|
|
12245
12987
|
useRovingTabIndex({
|
|
12246
12988
|
parentRef: tabListRef,
|
|
@@ -12252,22 +12994,22 @@ const TabList = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12252
12994
|
ref: mergeRefs(ref, tabListRef)
|
|
12253
12995
|
}, forwardedProps, {
|
|
12254
12996
|
className: classnames(className, handleBasicClasses({
|
|
12255
|
-
prefix: CLASSNAME$
|
|
12997
|
+
prefix: CLASSNAME$1b,
|
|
12256
12998
|
layout,
|
|
12257
12999
|
position,
|
|
12258
13000
|
theme
|
|
12259
13001
|
}))
|
|
12260
13002
|
}), /*#__PURE__*/React.createElement("div", {
|
|
12261
|
-
className: `${CLASSNAME$
|
|
13003
|
+
className: `${CLASSNAME$1b}__links`,
|
|
12262
13004
|
role: "tablist",
|
|
12263
13005
|
"aria-label": ariaLabel
|
|
12264
13006
|
}, children));
|
|
12265
13007
|
});
|
|
12266
|
-
TabList.displayName = COMPONENT_NAME$
|
|
12267
|
-
TabList.className = CLASSNAME$
|
|
13008
|
+
TabList.displayName = COMPONENT_NAME$1e;
|
|
13009
|
+
TabList.className = CLASSNAME$1b;
|
|
12268
13010
|
TabList.defaultProps = DEFAULT_PROPS$X;
|
|
12269
13011
|
|
|
12270
|
-
const _excluded$
|
|
13012
|
+
const _excluded$1m = ["className", "disabled", "icon", "iconProps", "id", "isActive", "isDisabled", "label", "onFocus", "onKeyPress", "tabIndex"];
|
|
12271
13013
|
|
|
12272
13014
|
/**
|
|
12273
13015
|
* Defines the props of the component.
|
|
@@ -12276,12 +13018,12 @@ const _excluded$1j = ["className", "disabled", "icon", "iconProps", "id", "isAct
|
|
|
12276
13018
|
/**
|
|
12277
13019
|
* Component display name.
|
|
12278
13020
|
*/
|
|
12279
|
-
const COMPONENT_NAME$
|
|
13021
|
+
const COMPONENT_NAME$1f = 'Tab';
|
|
12280
13022
|
|
|
12281
13023
|
/**
|
|
12282
13024
|
* Component default class name and class prefix.
|
|
12283
13025
|
*/
|
|
12284
|
-
const CLASSNAME$
|
|
13026
|
+
const CLASSNAME$1c = `${CSS_PREFIX}-tabs__link`;
|
|
12285
13027
|
|
|
12286
13028
|
/**
|
|
12287
13029
|
* Component default props.
|
|
@@ -12311,7 +13053,7 @@ const Tab = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12311
13053
|
onKeyPress,
|
|
12312
13054
|
tabIndex = -1
|
|
12313
13055
|
} = props,
|
|
12314
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
13056
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1m);
|
|
12315
13057
|
const state = useTabProviderContext('tab', id);
|
|
12316
13058
|
const isActive = propIsActive || (state === null || state === void 0 ? void 0 : state.isActive);
|
|
12317
13059
|
const changeToCurrentTab = useCallback(() => {
|
|
@@ -12339,7 +13081,7 @@ const Tab = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12339
13081
|
type: "button",
|
|
12340
13082
|
id: state === null || state === void 0 ? void 0 : state.tabId,
|
|
12341
13083
|
className: classnames(className, handleBasicClasses({
|
|
12342
|
-
prefix: CLASSNAME$
|
|
13084
|
+
prefix: CLASSNAME$1c,
|
|
12343
13085
|
isActive,
|
|
12344
13086
|
isDisabled
|
|
12345
13087
|
})),
|
|
@@ -12356,11 +13098,11 @@ const Tab = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12356
13098
|
size: Size.xs
|
|
12357
13099
|
}, iconProps)), label && /*#__PURE__*/React.createElement("span", null, label));
|
|
12358
13100
|
});
|
|
12359
|
-
Tab.displayName = COMPONENT_NAME$
|
|
12360
|
-
Tab.className = CLASSNAME$
|
|
13101
|
+
Tab.displayName = COMPONENT_NAME$1f;
|
|
13102
|
+
Tab.className = CLASSNAME$1c;
|
|
12361
13103
|
Tab.defaultProps = DEFAULT_PROPS$Y;
|
|
12362
13104
|
|
|
12363
|
-
const _excluded$
|
|
13105
|
+
const _excluded$1n = ["children", "id", "className", "isActive"];
|
|
12364
13106
|
|
|
12365
13107
|
/**
|
|
12366
13108
|
* Defines the props of the component.
|
|
@@ -12369,12 +13111,12 @@ const _excluded$1k = ["children", "id", "className", "isActive"];
|
|
|
12369
13111
|
/**
|
|
12370
13112
|
* Component display name.
|
|
12371
13113
|
*/
|
|
12372
|
-
const COMPONENT_NAME$
|
|
13114
|
+
const COMPONENT_NAME$1g = 'TabPanel';
|
|
12373
13115
|
|
|
12374
13116
|
/**
|
|
12375
13117
|
* Component default class name and class prefix.
|
|
12376
13118
|
*/
|
|
12377
|
-
const CLASSNAME$
|
|
13119
|
+
const CLASSNAME$1d = `${CSS_PREFIX}-tab-panel`;
|
|
12378
13120
|
|
|
12379
13121
|
/**
|
|
12380
13122
|
* Component default props.
|
|
@@ -12397,7 +13139,7 @@ const TabPanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12397
13139
|
className,
|
|
12398
13140
|
isActive: propIsActive
|
|
12399
13141
|
} = props,
|
|
12400
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
13142
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1n);
|
|
12401
13143
|
const state = useTabProviderContext('tabPanel', id);
|
|
12402
13144
|
const isActive = propIsActive || (state === null || state === void 0 ? void 0 : state.isActive);
|
|
12403
13145
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
@@ -12405,7 +13147,7 @@ const TabPanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12405
13147
|
}, forwardedProps, {
|
|
12406
13148
|
id: state === null || state === void 0 ? void 0 : state.tabPanelId,
|
|
12407
13149
|
className: classnames(className, handleBasicClasses({
|
|
12408
|
-
prefix: CLASSNAME$
|
|
13150
|
+
prefix: CLASSNAME$1d,
|
|
12409
13151
|
isActive
|
|
12410
13152
|
})),
|
|
12411
13153
|
role: "tabpanel",
|
|
@@ -12413,11 +13155,11 @@ const TabPanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12413
13155
|
"aria-labelledby": state === null || state === void 0 ? void 0 : state.tabId
|
|
12414
13156
|
}), (!(state !== null && state !== void 0 && state.isLazy) || isActive) && children);
|
|
12415
13157
|
});
|
|
12416
|
-
TabPanel.displayName = COMPONENT_NAME$
|
|
12417
|
-
TabPanel.className = CLASSNAME$
|
|
13158
|
+
TabPanel.displayName = COMPONENT_NAME$1g;
|
|
13159
|
+
TabPanel.className = CLASSNAME$1d;
|
|
12418
13160
|
TabPanel.defaultProps = DEFAULT_PROPS$Z;
|
|
12419
13161
|
|
|
12420
|
-
const _excluded$
|
|
13162
|
+
const _excluded$1o = ["id", "isDisabled", "isRequired", "placeholder", "multiline", "value", "setFocus", "onChange", "onFocus", "onBlur", "inputRef", "rows", "recomputeNumberOfRows", "type", "name", "hasError", "describedById"],
|
|
12421
13163
|
_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"];
|
|
12422
13164
|
|
|
12423
13165
|
/**
|
|
@@ -12427,12 +13169,12 @@ const _excluded$1l = ["id", "isDisabled", "isRequired", "placeholder", "multilin
|
|
|
12427
13169
|
/**
|
|
12428
13170
|
* Component display name.
|
|
12429
13171
|
*/
|
|
12430
|
-
const COMPONENT_NAME$
|
|
13172
|
+
const COMPONENT_NAME$1h = 'TextField';
|
|
12431
13173
|
|
|
12432
13174
|
/**
|
|
12433
13175
|
* Component default class name and class prefix.
|
|
12434
13176
|
*/
|
|
12435
|
-
const CLASSNAME$
|
|
13177
|
+
const CLASSNAME$1e = getRootClassName(COMPONENT_NAME$1h);
|
|
12436
13178
|
|
|
12437
13179
|
/**
|
|
12438
13180
|
* Default minimum number of rows in the multiline mode.
|
|
@@ -12502,7 +13244,7 @@ const renderInputNative = props => {
|
|
|
12502
13244
|
hasError,
|
|
12503
13245
|
describedById
|
|
12504
13246
|
} = props,
|
|
12505
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
13247
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1o);
|
|
12506
13248
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
12507
13249
|
const ref = useRef(null);
|
|
12508
13250
|
|
|
@@ -12527,7 +13269,7 @@ const renderInputNative = props => {
|
|
|
12527
13269
|
const Component = multiline ? 'textarea' : 'input';
|
|
12528
13270
|
const inputProps = _objectSpread2(_objectSpread2({}, forwardedProps), {}, {
|
|
12529
13271
|
id,
|
|
12530
|
-
className: multiline ? `${CLASSNAME$
|
|
13272
|
+
className: multiline ? `${CLASSNAME$1e}__input-native ${CLASSNAME$1e}__input-native--textarea` : `${CLASSNAME$1e}__input-native ${CLASSNAME$1e}__input-native--text`,
|
|
12531
13273
|
placeholder,
|
|
12532
13274
|
value,
|
|
12533
13275
|
name,
|
|
@@ -12648,31 +13390,31 @@ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12648
13390
|
isDisabled,
|
|
12649
13391
|
isFocus: isFocus || forceFocusStyle,
|
|
12650
13392
|
isValid,
|
|
12651
|
-
prefix: CLASSNAME$
|
|
13393
|
+
prefix: CLASSNAME$1e,
|
|
12652
13394
|
theme
|
|
12653
13395
|
}))
|
|
12654
13396
|
}, (label || maxLength) && /*#__PURE__*/React.createElement("div", {
|
|
12655
|
-
className: `${CLASSNAME$
|
|
13397
|
+
className: `${CLASSNAME$1e}__header`
|
|
12656
13398
|
}, label && /*#__PURE__*/React.createElement(InputLabel, _extends({}, labelProps, {
|
|
12657
13399
|
htmlFor: textFieldId,
|
|
12658
|
-
className: `${CLASSNAME$
|
|
13400
|
+
className: `${CLASSNAME$1e}__label`,
|
|
12659
13401
|
isRequired: isRequired,
|
|
12660
13402
|
theme: theme
|
|
12661
13403
|
}), label), maxLength && /*#__PURE__*/React.createElement("div", {
|
|
12662
|
-
className: `${CLASSNAME$
|
|
13404
|
+
className: `${CLASSNAME$1e}__char-counter`
|
|
12663
13405
|
}, /*#__PURE__*/React.createElement("span", null, maxLength - valueLength), maxLength - valueLength === 0 && /*#__PURE__*/React.createElement(Icon, {
|
|
12664
13406
|
icon: mdiAlertCircle,
|
|
12665
13407
|
size: Size.xxs
|
|
12666
13408
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
12667
|
-
className: `${CLASSNAME$
|
|
13409
|
+
className: `${CLASSNAME$1e}__wrapper`,
|
|
12668
13410
|
ref: textFieldRef
|
|
12669
13411
|
}, icon && /*#__PURE__*/React.createElement(Icon, {
|
|
12670
|
-
className: `${CLASSNAME$
|
|
13412
|
+
className: `${CLASSNAME$1e}__input-icon`,
|
|
12671
13413
|
color: theme === Theme.dark ? 'light' : undefined,
|
|
12672
13414
|
icon: icon,
|
|
12673
13415
|
size: Size.xs
|
|
12674
13416
|
}), chips && /*#__PURE__*/React.createElement("div", {
|
|
12675
|
-
className: `${CLASSNAME$
|
|
13417
|
+
className: `${CLASSNAME$1e}__chips`
|
|
12676
13418
|
}, chips, renderInputNative(_objectSpread2({
|
|
12677
13419
|
id: textFieldId,
|
|
12678
13420
|
inputRef,
|
|
@@ -12693,7 +13435,7 @@ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12693
13435
|
hasError,
|
|
12694
13436
|
describedById
|
|
12695
13437
|
}, forwardedProps))), !chips && /*#__PURE__*/React.createElement("div", {
|
|
12696
|
-
className: `${CLASSNAME$
|
|
13438
|
+
className: `${CLASSNAME$1e}__input-wrapper`
|
|
12697
13439
|
}, renderInputNative(_objectSpread2({
|
|
12698
13440
|
id: textFieldId,
|
|
12699
13441
|
inputRef,
|
|
@@ -12714,12 +13456,12 @@ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12714
13456
|
hasError,
|
|
12715
13457
|
describedById
|
|
12716
13458
|
}, forwardedProps))), (isValid || hasError) && /*#__PURE__*/React.createElement(Icon, {
|
|
12717
|
-
className: `${CLASSNAME$
|
|
13459
|
+
className: `${CLASSNAME$1e}__input-validity`,
|
|
12718
13460
|
color: theme === Theme.dark ? 'light' : undefined,
|
|
12719
13461
|
icon: isValid ? mdiCheckCircle : mdiAlertCircle,
|
|
12720
13462
|
size: Size.xxs
|
|
12721
13463
|
}), clearButtonProps && isNotEmpty && /*#__PURE__*/React.createElement(IconButton, _extends({}, clearButtonProps, {
|
|
12722
|
-
className: `${CLASSNAME$
|
|
13464
|
+
className: `${CLASSNAME$1e}__input-clear`,
|
|
12723
13465
|
icon: mdiCloseCircle,
|
|
12724
13466
|
emphasis: Emphasis.low,
|
|
12725
13467
|
size: Size.s,
|
|
@@ -12727,20 +13469,20 @@ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12727
13469
|
onClick: handleClear,
|
|
12728
13470
|
type: "button"
|
|
12729
13471
|
})), afterElement && /*#__PURE__*/React.createElement("div", {
|
|
12730
|
-
className: `${CLASSNAME$
|
|
13472
|
+
className: `${CLASSNAME$1e}__after-element`
|
|
12731
13473
|
}, afterElement)), hasError && error && /*#__PURE__*/React.createElement(InputHelper, {
|
|
12732
|
-
className: `${CLASSNAME$
|
|
13474
|
+
className: `${CLASSNAME$1e}__helper`,
|
|
12733
13475
|
kind: Kind.error,
|
|
12734
13476
|
theme: theme,
|
|
12735
13477
|
id: errorId
|
|
12736
13478
|
}, error), helper && /*#__PURE__*/React.createElement(InputHelper, {
|
|
12737
|
-
className: `${CLASSNAME$
|
|
13479
|
+
className: `${CLASSNAME$1e}__helper`,
|
|
12738
13480
|
theme: theme,
|
|
12739
13481
|
id: helperId
|
|
12740
13482
|
}, helper));
|
|
12741
13483
|
});
|
|
12742
|
-
TextField.displayName = COMPONENT_NAME$
|
|
12743
|
-
TextField.className = CLASSNAME$
|
|
13484
|
+
TextField.displayName = COMPONENT_NAME$1h;
|
|
13485
|
+
TextField.className = CLASSNAME$1e;
|
|
12744
13486
|
TextField.defaultProps = DEFAULT_PROPS$_;
|
|
12745
13487
|
|
|
12746
13488
|
function getState(img, event) {
|
|
@@ -12793,6 +13535,7 @@ function shiftPosition(_ref) {
|
|
|
12793
13535
|
const shift = startFocus / (scaledSize - containerSize);
|
|
12794
13536
|
return Math.floor(Math.max(Math.min(shift, 1), 0) * 100);
|
|
12795
13537
|
}
|
|
13538
|
+
|
|
12796
13539
|
// Compute CSS properties to apply the focus point.
|
|
12797
13540
|
const useFocusPointStyle = (_ref2, element, isLoaded) => {
|
|
12798
13541
|
let {
|
|
@@ -12885,7 +13628,7 @@ const useFocusPointStyle = (_ref2, element, isLoaded) => {
|
|
|
12885
13628
|
return style;
|
|
12886
13629
|
};
|
|
12887
13630
|
|
|
12888
|
-
const _excluded$
|
|
13631
|
+
const _excluded$1p = ["align", "alt", "aspectRatio", "badge", "className", "crossOrigin", "fallback", "fillHeight", "focusPoint", "image", "imgProps", "imgRef", "isLoading", "objectFit", "loading", "loadingPlaceholderImageRef", "size", "theme", "variant", "linkProps", "linkAs"];
|
|
12889
13632
|
|
|
12890
13633
|
/**
|
|
12891
13634
|
* Defines the props of the component.
|
|
@@ -12894,12 +13637,12 @@ const _excluded$1m = ["align", "alt", "aspectRatio", "badge", "className", "cros
|
|
|
12894
13637
|
/**
|
|
12895
13638
|
* Component display name.
|
|
12896
13639
|
*/
|
|
12897
|
-
const COMPONENT_NAME$
|
|
13640
|
+
const COMPONENT_NAME$1i = 'Thumbnail';
|
|
12898
13641
|
|
|
12899
13642
|
/**
|
|
12900
13643
|
* Component default class name and class prefix.
|
|
12901
13644
|
*/
|
|
12902
|
-
const CLASSNAME$
|
|
13645
|
+
const CLASSNAME$1f = getRootClassName(COMPONENT_NAME$1i);
|
|
12903
13646
|
|
|
12904
13647
|
/**
|
|
12905
13648
|
* Component default props.
|
|
@@ -12944,7 +13687,7 @@ const Thumbnail = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12944
13687
|
linkProps,
|
|
12945
13688
|
linkAs
|
|
12946
13689
|
} = props,
|
|
12947
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
13690
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1p);
|
|
12948
13691
|
const [imgElement, setImgElement] = useState();
|
|
12949
13692
|
|
|
12950
13693
|
// Image loading state.
|
|
@@ -12991,7 +13734,7 @@ const Thumbnail = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12991
13734
|
className: classnames(linkProps === null || linkProps === void 0 ? void 0 : linkProps.className, className, handleBasicClasses({
|
|
12992
13735
|
align,
|
|
12993
13736
|
aspectRatio,
|
|
12994
|
-
prefix: CLASSNAME$
|
|
13737
|
+
prefix: CLASSNAME$1f,
|
|
12995
13738
|
size,
|
|
12996
13739
|
theme,
|
|
12997
13740
|
variant,
|
|
@@ -13002,9 +13745,9 @@ const Thumbnail = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13002
13745
|
isLoading,
|
|
13003
13746
|
objectFit,
|
|
13004
13747
|
hasBadge: !!badge
|
|
13005
|
-
}), fillHeight && `${CLASSNAME$
|
|
13748
|
+
}), fillHeight && `${CLASSNAME$1f}--fill-height`)
|
|
13006
13749
|
}), /*#__PURE__*/React.createElement("span", {
|
|
13007
|
-
className: `${CLASSNAME$
|
|
13750
|
+
className: `${CLASSNAME$1f}__background`
|
|
13008
13751
|
}, /*#__PURE__*/React.createElement("img", _extends({
|
|
13009
13752
|
// Use placeholder image size
|
|
13010
13753
|
width: loadingPlaceholderImage === null || loadingPlaceholderImage === void 0 ? void 0 : loadingPlaceholderImage.naturalWidth,
|
|
@@ -13016,7 +13759,7 @@ const Thumbnail = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13016
13759
|
}, imgProps === null || imgProps === void 0 ? void 0 : imgProps.style), imageErrorStyle), focusPointStyle), loadingStyle),
|
|
13017
13760
|
ref: useMergeRefs(setImgElement, propImgRef),
|
|
13018
13761
|
className: classnames(handleBasicClasses({
|
|
13019
|
-
prefix: `${CLASSNAME$
|
|
13762
|
+
prefix: `${CLASSNAME$1f}__image`,
|
|
13020
13763
|
isLoading,
|
|
13021
13764
|
hasDefinedSize: Boolean((imgProps === null || imgProps === void 0 ? void 0 : imgProps.height) && imgProps.width)
|
|
13022
13765
|
}), imgProps === null || imgProps === void 0 ? void 0 : imgProps.className),
|
|
@@ -13025,17 +13768,17 @@ const Thumbnail = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13025
13768
|
alt: alt,
|
|
13026
13769
|
loading: loading
|
|
13027
13770
|
})), !isLoading && hasError && /*#__PURE__*/React.createElement("span", {
|
|
13028
|
-
className: `${CLASSNAME$
|
|
13771
|
+
className: `${CLASSNAME$1f}__fallback`
|
|
13029
13772
|
}, hasIconErrorFallback ? /*#__PURE__*/React.createElement(Icon, {
|
|
13030
13773
|
icon: fallback,
|
|
13031
13774
|
size: Size.xxs,
|
|
13032
13775
|
theme: theme
|
|
13033
13776
|
}) : fallback)), badge && /*#__PURE__*/React.cloneElement(badge, {
|
|
13034
|
-
className: classnames(`${CLASSNAME$
|
|
13777
|
+
className: classnames(`${CLASSNAME$1f}__badge`, badge.props.className)
|
|
13035
13778
|
}));
|
|
13036
13779
|
});
|
|
13037
|
-
Thumbnail.displayName = COMPONENT_NAME$
|
|
13038
|
-
Thumbnail.className = CLASSNAME$
|
|
13780
|
+
Thumbnail.displayName = COMPONENT_NAME$1i;
|
|
13781
|
+
Thumbnail.className = CLASSNAME$1f;
|
|
13039
13782
|
Thumbnail.defaultProps = DEFAULT_PROPS$$;
|
|
13040
13783
|
|
|
13041
13784
|
/**
|
|
@@ -13073,7 +13816,7 @@ const ThumbnailObjectFit = {
|
|
|
13073
13816
|
contain: 'contain'
|
|
13074
13817
|
};
|
|
13075
13818
|
|
|
13076
|
-
const _excluded$
|
|
13819
|
+
const _excluded$1q = ["after", "before", "className", "label"];
|
|
13077
13820
|
|
|
13078
13821
|
/**
|
|
13079
13822
|
* Defines the props of the component.
|
|
@@ -13082,12 +13825,12 @@ const _excluded$1n = ["after", "before", "className", "label"];
|
|
|
13082
13825
|
/**
|
|
13083
13826
|
* Component display name.
|
|
13084
13827
|
*/
|
|
13085
|
-
const COMPONENT_NAME$
|
|
13828
|
+
const COMPONENT_NAME$1j = 'Toolbar';
|
|
13086
13829
|
|
|
13087
13830
|
/**
|
|
13088
13831
|
* Component default class name and class prefix.
|
|
13089
13832
|
*/
|
|
13090
|
-
const CLASSNAME$
|
|
13833
|
+
const CLASSNAME$1g = getRootClassName(COMPONENT_NAME$1j);
|
|
13091
13834
|
|
|
13092
13835
|
/**
|
|
13093
13836
|
* Component default props.
|
|
@@ -13108,7 +13851,7 @@ const Toolbar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13108
13851
|
className,
|
|
13109
13852
|
label
|
|
13110
13853
|
} = props,
|
|
13111
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
13854
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1q);
|
|
13112
13855
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
13113
13856
|
ref: ref
|
|
13114
13857
|
}, forwardedProps, {
|
|
@@ -13116,18 +13859,18 @@ const Toolbar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13116
13859
|
hasAfter: Boolean(after),
|
|
13117
13860
|
hasBefore: Boolean(before),
|
|
13118
13861
|
hasLabel: Boolean(label),
|
|
13119
|
-
prefix: CLASSNAME$
|
|
13862
|
+
prefix: CLASSNAME$1g
|
|
13120
13863
|
}))
|
|
13121
13864
|
}), before && /*#__PURE__*/React.createElement("div", {
|
|
13122
|
-
className: `${CLASSNAME$
|
|
13865
|
+
className: `${CLASSNAME$1g}__before`
|
|
13123
13866
|
}, before), label && /*#__PURE__*/React.createElement("div", {
|
|
13124
|
-
className: `${CLASSNAME$
|
|
13867
|
+
className: `${CLASSNAME$1g}__label`
|
|
13125
13868
|
}, label), after && /*#__PURE__*/React.createElement("div", {
|
|
13126
|
-
className: `${CLASSNAME$
|
|
13869
|
+
className: `${CLASSNAME$1g}__after`
|
|
13127
13870
|
}, after));
|
|
13128
13871
|
});
|
|
13129
|
-
Toolbar.displayName = COMPONENT_NAME$
|
|
13130
|
-
Toolbar.className = CLASSNAME$
|
|
13872
|
+
Toolbar.displayName = COMPONENT_NAME$1j;
|
|
13873
|
+
Toolbar.className = CLASSNAME$1g;
|
|
13131
13874
|
Toolbar.defaultProps = DEFAULT_PROPS$10;
|
|
13132
13875
|
|
|
13133
13876
|
/**
|
|
@@ -13305,7 +14048,7 @@ function useTooltipOpen(delay, anchorElement) {
|
|
|
13305
14048
|
};
|
|
13306
14049
|
}
|
|
13307
14050
|
|
|
13308
|
-
const _excluded$
|
|
14051
|
+
const _excluded$1r = ["label", "children", "className", "delay", "placement", "forceOpen"];
|
|
13309
14052
|
|
|
13310
14053
|
/** Position of the tooltip relative to the anchor element. */
|
|
13311
14054
|
|
|
@@ -13316,12 +14059,12 @@ const _excluded$1o = ["label", "children", "className", "delay", "placement", "f
|
|
|
13316
14059
|
/**
|
|
13317
14060
|
* Component display name.
|
|
13318
14061
|
*/
|
|
13319
|
-
const COMPONENT_NAME$
|
|
14062
|
+
const COMPONENT_NAME$1k = 'Tooltip';
|
|
13320
14063
|
|
|
13321
14064
|
/**
|
|
13322
14065
|
* Component default class name and class prefix.
|
|
13323
14066
|
*/
|
|
13324
|
-
const CLASSNAME$
|
|
14067
|
+
const CLASSNAME$1h = getRootClassName(COMPONENT_NAME$1k);
|
|
13325
14068
|
|
|
13326
14069
|
/**
|
|
13327
14070
|
* Component default props.
|
|
@@ -13352,7 +14095,7 @@ const Tooltip = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13352
14095
|
placement,
|
|
13353
14096
|
forceOpen
|
|
13354
14097
|
} = props,
|
|
13355
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
14098
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1r);
|
|
13356
14099
|
// Disable in SSR or without a label.
|
|
13357
14100
|
if (!DOCUMENT || !label) {
|
|
13358
14101
|
return /*#__PURE__*/React.createElement(TooltipContextProvider, null, children);
|
|
@@ -13386,23 +14129,23 @@ const Tooltip = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13386
14129
|
role: "tooltip",
|
|
13387
14130
|
"aria-label": label,
|
|
13388
14131
|
className: classnames(className, handleBasicClasses({
|
|
13389
|
-
prefix: CLASSNAME$
|
|
14132
|
+
prefix: CLASSNAME$1h,
|
|
13390
14133
|
position
|
|
13391
14134
|
})),
|
|
13392
14135
|
style: styles.popper
|
|
13393
14136
|
}, attributes.popper), /*#__PURE__*/React.createElement("div", {
|
|
13394
|
-
className: `${CLASSNAME$
|
|
14137
|
+
className: `${CLASSNAME$1h}__arrow`
|
|
13395
14138
|
}), /*#__PURE__*/React.createElement("div", {
|
|
13396
|
-
className: `${CLASSNAME$
|
|
14139
|
+
className: `${CLASSNAME$1h}__inner`
|
|
13397
14140
|
}, label.indexOf('\n') !== -1 ? label.split('\n').map(sentence => /*#__PURE__*/React.createElement("p", {
|
|
13398
14141
|
key: sentence
|
|
13399
14142
|
}, sentence)) : label)), document.body));
|
|
13400
14143
|
});
|
|
13401
|
-
Tooltip.displayName = COMPONENT_NAME$
|
|
13402
|
-
Tooltip.className = CLASSNAME$
|
|
14144
|
+
Tooltip.displayName = COMPONENT_NAME$1k;
|
|
14145
|
+
Tooltip.className = CLASSNAME$1h;
|
|
13403
14146
|
Tooltip.defaultProps = DEFAULT_PROPS$11;
|
|
13404
14147
|
|
|
13405
|
-
const _excluded$
|
|
14148
|
+
const _excluded$1s = ["aspectRatio", "className", "label", "icon", "size", "theme", "variant", "fileInputProps"];
|
|
13406
14149
|
|
|
13407
14150
|
/**
|
|
13408
14151
|
* Uploader variants.
|
|
@@ -13428,12 +14171,12 @@ const UploaderVariant = {
|
|
|
13428
14171
|
/**
|
|
13429
14172
|
* Component display name.
|
|
13430
14173
|
*/
|
|
13431
|
-
const COMPONENT_NAME$
|
|
14174
|
+
const COMPONENT_NAME$1l = 'Uploader';
|
|
13432
14175
|
|
|
13433
14176
|
/**
|
|
13434
14177
|
* Component default class name and class prefix.
|
|
13435
14178
|
*/
|
|
13436
|
-
const CLASSNAME$
|
|
14179
|
+
const CLASSNAME$1i = getRootClassName(COMPONENT_NAME$1l);
|
|
13437
14180
|
|
|
13438
14181
|
/**
|
|
13439
14182
|
* Component default props.
|
|
@@ -13463,7 +14206,7 @@ const Uploader = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13463
14206
|
variant,
|
|
13464
14207
|
fileInputProps
|
|
13465
14208
|
} = props,
|
|
13466
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
14209
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1s);
|
|
13467
14210
|
// Adjust to square aspect ratio when using circle variants.
|
|
13468
14211
|
const adjustedAspectRatio = variant === UploaderVariant.circle ? AspectRatio.square : aspectRatio;
|
|
13469
14212
|
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]);
|
|
@@ -13492,26 +14235,26 @@ const Uploader = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13492
14235
|
}, wrapper.props, forwardedProps, {
|
|
13493
14236
|
className: classnames(className, handleBasicClasses({
|
|
13494
14237
|
aspectRatio: adjustedAspectRatio,
|
|
13495
|
-
prefix: CLASSNAME$
|
|
14238
|
+
prefix: CLASSNAME$1i,
|
|
13496
14239
|
size,
|
|
13497
14240
|
theme,
|
|
13498
14241
|
variant,
|
|
13499
14242
|
isDragHovering
|
|
13500
14243
|
}))
|
|
13501
14244
|
}), /*#__PURE__*/React.createElement("span", {
|
|
13502
|
-
className: `${CLASSNAME$
|
|
14245
|
+
className: `${CLASSNAME$1i}__background`
|
|
13503
14246
|
}), /*#__PURE__*/React.createElement("span", {
|
|
13504
|
-
className: `${CLASSNAME$
|
|
14247
|
+
className: `${CLASSNAME$1i}__wrapper`
|
|
13505
14248
|
}, icon && /*#__PURE__*/React.createElement(Icon, {
|
|
13506
|
-
className: `${CLASSNAME$
|
|
14249
|
+
className: `${CLASSNAME$1i}__icon`,
|
|
13507
14250
|
icon: icon,
|
|
13508
14251
|
size: Size.s
|
|
13509
14252
|
}), label && /*#__PURE__*/React.createElement("span", {
|
|
13510
|
-
className: `${CLASSNAME$
|
|
14253
|
+
className: `${CLASSNAME$1i}__label`
|
|
13511
14254
|
}, label)), fileInputProps && /*#__PURE__*/React.createElement("input", _extends({
|
|
13512
14255
|
type: "file",
|
|
13513
14256
|
id: inputId,
|
|
13514
|
-
className: `${CLASSNAME$
|
|
14257
|
+
className: `${CLASSNAME$1i}__input`
|
|
13515
14258
|
}, fileInputProps, {
|
|
13516
14259
|
onChange: onChange,
|
|
13517
14260
|
onDragEnter: setDragHovering,
|
|
@@ -13519,11 +14262,11 @@ const Uploader = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13519
14262
|
onDrop: unsetDragHovering
|
|
13520
14263
|
})));
|
|
13521
14264
|
});
|
|
13522
|
-
Uploader.displayName = COMPONENT_NAME$
|
|
13523
|
-
Uploader.className = CLASSNAME$
|
|
14265
|
+
Uploader.displayName = COMPONENT_NAME$1l;
|
|
14266
|
+
Uploader.className = CLASSNAME$1i;
|
|
13524
14267
|
Uploader.defaultProps = DEFAULT_PROPS$12;
|
|
13525
14268
|
|
|
13526
|
-
const _excluded$
|
|
14269
|
+
const _excluded$1t = ["avatarProps", "className", "fields", "linkProps", "linkAs", "multipleActions", "name", "nameProps", "onClick", "onMouseEnter", "onMouseLeave", "orientation", "simpleAction", "size", "theme"];
|
|
13527
14270
|
|
|
13528
14271
|
/**
|
|
13529
14272
|
* User block sizes.
|
|
@@ -13536,12 +14279,12 @@ const _excluded$1q = ["avatarProps", "className", "fields", "linkProps", "linkAs
|
|
|
13536
14279
|
/**
|
|
13537
14280
|
* Component display name.
|
|
13538
14281
|
*/
|
|
13539
|
-
const COMPONENT_NAME$
|
|
14282
|
+
const COMPONENT_NAME$1m = 'UserBlock';
|
|
13540
14283
|
|
|
13541
14284
|
/**
|
|
13542
14285
|
* Component default class name and class prefix.
|
|
13543
14286
|
*/
|
|
13544
|
-
const CLASSNAME$
|
|
14287
|
+
const CLASSNAME$1j = getRootClassName(COMPONENT_NAME$1m);
|
|
13545
14288
|
|
|
13546
14289
|
/**
|
|
13547
14290
|
* Component default props.
|
|
@@ -13577,7 +14320,7 @@ const UserBlock = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13577
14320
|
size,
|
|
13578
14321
|
theme
|
|
13579
14322
|
} = props,
|
|
13580
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
14323
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1t);
|
|
13581
14324
|
let componentSize = size;
|
|
13582
14325
|
|
|
13583
14326
|
// Special case - When using vertical orientation force the size to be Sizes.l.
|
|
@@ -13593,7 +14336,7 @@ const UserBlock = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13593
14336
|
}
|
|
13594
14337
|
let NameComponent = 'span';
|
|
13595
14338
|
const nProps = _objectSpread2(_objectSpread2({}, nameProps), {}, {
|
|
13596
|
-
className: classnames(`${CLASSNAME$
|
|
14339
|
+
className: classnames(`${CLASSNAME$1j}__name`, linkProps === null || linkProps === void 0 ? void 0 : linkProps.className, nameProps === null || nameProps === void 0 ? void 0 : nameProps.className)
|
|
13597
14340
|
});
|
|
13598
14341
|
if (isClickable) {
|
|
13599
14342
|
NameComponent = Link;
|
|
@@ -13610,16 +14353,16 @@ const UserBlock = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13610
14353
|
return /*#__PURE__*/React.createElement(NameComponent, nProps, name);
|
|
13611
14354
|
}, [avatarProps, isClickable, linkAs, linkProps, name, nameProps, onClick]);
|
|
13612
14355
|
const fieldsBlock = fields && componentSize !== Size.s && /*#__PURE__*/React.createElement("div", {
|
|
13613
|
-
className: `${CLASSNAME$
|
|
14356
|
+
className: `${CLASSNAME$1j}__fields`
|
|
13614
14357
|
}, fields.map((field, idx) => /*#__PURE__*/React.createElement("span", {
|
|
13615
14358
|
key: idx,
|
|
13616
|
-
className: `${CLASSNAME$
|
|
14359
|
+
className: `${CLASSNAME$1j}__field`
|
|
13617
14360
|
}, field)));
|
|
13618
14361
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
13619
14362
|
ref: ref
|
|
13620
14363
|
}, forwardedProps, {
|
|
13621
14364
|
className: classnames(className, handleBasicClasses({
|
|
13622
|
-
prefix: CLASSNAME$
|
|
14365
|
+
prefix: CLASSNAME$1j,
|
|
13623
14366
|
orientation,
|
|
13624
14367
|
size: componentSize,
|
|
13625
14368
|
theme,
|
|
@@ -13632,21 +14375,21 @@ const UserBlock = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13632
14375
|
linkProps: linkProps,
|
|
13633
14376
|
alt: ""
|
|
13634
14377
|
}, avatarProps, {
|
|
13635
|
-
className: classnames(`${CLASSNAME$
|
|
14378
|
+
className: classnames(`${CLASSNAME$1j}__avatar`, avatarProps.className),
|
|
13636
14379
|
size: componentSize,
|
|
13637
14380
|
onClick: onClick,
|
|
13638
14381
|
theme: theme
|
|
13639
14382
|
})), (fields || name) && /*#__PURE__*/React.createElement("div", {
|
|
13640
|
-
className: `${CLASSNAME$
|
|
14383
|
+
className: `${CLASSNAME$1j}__wrapper`
|
|
13641
14384
|
}, nameBlock, fieldsBlock), shouldDisplayActions && simpleAction && /*#__PURE__*/React.createElement("div", {
|
|
13642
|
-
className: `${CLASSNAME$
|
|
14385
|
+
className: `${CLASSNAME$1j}__action`
|
|
13643
14386
|
}, simpleAction), shouldDisplayActions && multipleActions && /*#__PURE__*/React.createElement("div", {
|
|
13644
|
-
className: `${CLASSNAME$
|
|
14387
|
+
className: `${CLASSNAME$1j}__actions`
|
|
13645
14388
|
}, multipleActions));
|
|
13646
14389
|
});
|
|
13647
|
-
UserBlock.displayName = COMPONENT_NAME$
|
|
13648
|
-
UserBlock.className = CLASSNAME$
|
|
14390
|
+
UserBlock.displayName = COMPONENT_NAME$1m;
|
|
14391
|
+
UserBlock.className = CLASSNAME$1j;
|
|
13649
14392
|
UserBlock.defaultProps = DEFAULT_PROPS$13;
|
|
13650
14393
|
|
|
13651
|
-
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 };
|
|
14394
|
+
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 };
|
|
13652
14395
|
//# sourceMappingURL=index.js.map
|