@redsift/design-system 8.0.2 → 8.0.4
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 +4 -2
- package/index.js +94 -351
- package/index.js.map +1 -1
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { I18nProvider, useLocalizedStringFormatter, useFocusRing, useNumberFormatter, useFocusWithin } from 'react-aria';
|
|
2
2
|
export { I18nProvider, SSRProvider } from 'react-aria';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import React__default, { useState, useEffect, useContext,
|
|
4
|
+
import React__default, { useState, useEffect, useContext, useMemo, useRef, useCallback, forwardRef, useReducer, useLayoutEffect, useId as useId$1 } from 'react';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import { mdiClose, mdiAlert, mdiCheckCircle, mdiAlertCircle, mdiInformation, mdiMenu, mdiMenuOpen, mdiChevronDown, mdiChevronRight, mdiChevronUp, mdiCheckboxMarked, mdiMinusBox, mdiCheckboxBlankOutline, mdiPageLast, mdiKeyboardCaps, mdiRadioboxMarked, mdiRadioboxBlank } from '@redsift/icons';
|
|
7
7
|
import styled, { css, keyframes } from 'styled-components';
|
|
@@ -592,77 +592,7 @@ const $704cf1d3b684cc5c$var$defaultContext = {
|
|
|
592
592
|
isSSR: false
|
|
593
593
|
};
|
|
594
594
|
const $704cf1d3b684cc5c$var$SSRContext = /*#__PURE__*/ (React__default).createContext($704cf1d3b684cc5c$var$defaultContext);
|
|
595
|
-
let $704cf1d3b684cc5c$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
596
|
-
let $704cf1d3b684cc5c$var$componentIds = new WeakMap();
|
|
597
|
-
function $704cf1d3b684cc5c$var$useCounter(isDisabled = false) {
|
|
598
|
-
let ctx = (useContext)($704cf1d3b684cc5c$var$SSRContext);
|
|
599
|
-
let ref = (useRef)(null);
|
|
600
|
-
// eslint-disable-next-line rulesdir/pure-render
|
|
601
|
-
if (ref.current === null && !isDisabled) {
|
|
602
|
-
var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner;
|
|
603
|
-
// In strict mode, React renders components twice, and the ref will be reset to null on the second render.
|
|
604
|
-
// This means our id counter will be incremented twice instead of once. This is a problem because on the
|
|
605
|
-
// server, components are only rendered once and so ids generated on the server won't match the client.
|
|
606
|
-
// In React 18, useId was introduced to solve this, but it is not available in older versions. So to solve this
|
|
607
|
-
// we need to use some React internals to access the underlying Fiber instance, which is stable between renders.
|
|
608
|
-
// This is exposed as ReactCurrentOwner in development, which is all we need since StrictMode only runs in development.
|
|
609
|
-
// To ensure that we only increment the global counter once, we store the starting id for this component in
|
|
610
|
-
// a weak map associated with the Fiber. On the second render, we reset the global counter to this value.
|
|
611
|
-
// Since React runs the second render immediately after the first, this is safe.
|
|
612
|
-
// @ts-ignore
|
|
613
|
-
let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = (React__default).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;
|
|
614
|
-
if (currentOwner) {
|
|
615
|
-
let prevComponentValue = $704cf1d3b684cc5c$var$componentIds.get(currentOwner);
|
|
616
|
-
if (prevComponentValue == null) // On the first render, and first call to useId, store the id and state in our weak map.
|
|
617
|
-
$704cf1d3b684cc5c$var$componentIds.set(currentOwner, {
|
|
618
|
-
id: ctx.current,
|
|
619
|
-
state: currentOwner.memoizedState
|
|
620
|
-
});
|
|
621
|
-
else if (currentOwner.memoizedState !== prevComponentValue.state) {
|
|
622
|
-
// On the second render, the memoizedState gets reset by React.
|
|
623
|
-
// Reset the counter, and remove from the weak map so we don't
|
|
624
|
-
// do this for subsequent useId calls.
|
|
625
|
-
ctx.current = prevComponentValue.id;
|
|
626
|
-
$704cf1d3b684cc5c$var$componentIds.delete(currentOwner);
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
// eslint-disable-next-line rulesdir/pure-render
|
|
630
|
-
ref.current = ++ctx.current;
|
|
631
|
-
}
|
|
632
|
-
// eslint-disable-next-line rulesdir/pure-render
|
|
633
|
-
return ref.current;
|
|
634
|
-
}
|
|
635
|
-
function $704cf1d3b684cc5c$var$useLegacySSRSafeId(defaultId) {
|
|
636
|
-
let ctx = (useContext)($704cf1d3b684cc5c$var$SSRContext);
|
|
637
|
-
// If we are rendering in a non-DOM environment, and there's no SSRProvider,
|
|
638
|
-
// provide a warning to hint to the developer to add one.
|
|
639
|
-
if (ctx === $704cf1d3b684cc5c$var$defaultContext && !$704cf1d3b684cc5c$var$canUseDOM) console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
640
|
-
let counter = $704cf1d3b684cc5c$var$useCounter(!!defaultId);
|
|
641
|
-
return defaultId || `react-aria${ctx.prefix}-${counter}`;
|
|
642
|
-
}
|
|
643
|
-
function $704cf1d3b684cc5c$var$useModernSSRSafeId(defaultId) {
|
|
644
|
-
// @ts-ignore
|
|
645
|
-
let id = (React__default).useId();
|
|
646
|
-
let [didSSR] = (useState)($704cf1d3b684cc5c$export$535bd6ca7f90a273());
|
|
647
|
-
let prefix = didSSR ? "react-aria" : `react-aria${$704cf1d3b684cc5c$var$defaultContext.prefix}`;
|
|
648
|
-
return defaultId || `${prefix}-${id}`;
|
|
649
|
-
}
|
|
650
|
-
typeof (React__default)["useId"] === "function" ? $704cf1d3b684cc5c$var$useModernSSRSafeId : $704cf1d3b684cc5c$var$useLegacySSRSafeId;
|
|
651
|
-
function $704cf1d3b684cc5c$var$getSnapshot() {
|
|
652
|
-
return false;
|
|
653
|
-
}
|
|
654
|
-
function $704cf1d3b684cc5c$var$getServerSnapshot() {
|
|
655
|
-
return true;
|
|
656
|
-
}
|
|
657
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
658
|
-
function $704cf1d3b684cc5c$var$subscribe(onStoreChange) {
|
|
659
|
-
// noop
|
|
660
|
-
return ()=>{};
|
|
661
|
-
}
|
|
662
595
|
function $704cf1d3b684cc5c$export$535bd6ca7f90a273() {
|
|
663
|
-
// In React 18, we can use useSyncExternalStore to detect if we're server rendering or hydrating.
|
|
664
|
-
if (typeof (React__default)["useSyncExternalStore"] === "function") return (React__default)["useSyncExternalStore"]($704cf1d3b684cc5c$var$subscribe, $704cf1d3b684cc5c$var$getSnapshot, $704cf1d3b684cc5c$var$getServerSnapshot);
|
|
665
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
666
596
|
let cur = (useContext)($704cf1d3b684cc5c$var$SSRContext);
|
|
667
597
|
return cur.isSSR;
|
|
668
598
|
}
|
|
@@ -917,121 +847,6 @@ function $fb18d541ea1ad717$var$getResolvedHourCycle(locale, options) {
|
|
|
917
847
|
throw new Error("Unexpected hour cycle result");
|
|
918
848
|
}
|
|
919
849
|
|
|
920
|
-
/*
|
|
921
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
922
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
923
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
924
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
925
|
-
*
|
|
926
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
927
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
928
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
929
|
-
* governing permissions and limitations under the License.
|
|
930
|
-
*/ /*
|
|
931
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
932
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
933
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
934
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
935
|
-
*
|
|
936
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
937
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
938
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
939
|
-
* governing permissions and limitations under the License.
|
|
940
|
-
*/
|
|
941
|
-
/*
|
|
942
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
943
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
944
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
945
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
946
|
-
*
|
|
947
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
948
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
949
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
950
|
-
* governing permissions and limitations under the License.
|
|
951
|
-
*/
|
|
952
|
-
typeof window !== "undefined" ? (React__default).useLayoutEffect : ()=>{};
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
/*
|
|
956
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
957
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
958
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
959
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
960
|
-
*
|
|
961
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
962
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
963
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
964
|
-
* governing permissions and limitations under the License.
|
|
965
|
-
*/ // We store a global list of elements that are currently transitioning,
|
|
966
|
-
// mapped to a set of CSS properties that are transitioning for that element.
|
|
967
|
-
// This is necessary rather than a simple count of transitions because of browser
|
|
968
|
-
// bugs, e.g. Chrome sometimes fires both transitionend and transitioncancel rather
|
|
969
|
-
// than one or the other. So we need to track what's actually transitioning so that
|
|
970
|
-
// we can ignore these duplicate events.
|
|
971
|
-
let $bbed8b41f857bcc0$var$transitionsByElement = new Map();
|
|
972
|
-
// A list of callbacks to call once there are no transitioning elements.
|
|
973
|
-
let $bbed8b41f857bcc0$var$transitionCallbacks = new Set();
|
|
974
|
-
function $bbed8b41f857bcc0$var$setupGlobalEvents() {
|
|
975
|
-
if (typeof window === "undefined") return;
|
|
976
|
-
let onTransitionStart = (e)=>{
|
|
977
|
-
// Add the transitioning property to the list for this element.
|
|
978
|
-
let transitions = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);
|
|
979
|
-
if (!transitions) {
|
|
980
|
-
transitions = new Set();
|
|
981
|
-
$bbed8b41f857bcc0$var$transitionsByElement.set(e.target, transitions);
|
|
982
|
-
// The transitioncancel event must be registered on the element itself, rather than as a global
|
|
983
|
-
// event. This enables us to handle when the node is deleted from the document while it is transitioning.
|
|
984
|
-
// In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.
|
|
985
|
-
e.target.addEventListener("transitioncancel", onTransitionEnd);
|
|
986
|
-
}
|
|
987
|
-
transitions.add(e.propertyName);
|
|
988
|
-
};
|
|
989
|
-
let onTransitionEnd = (e)=>{
|
|
990
|
-
// Remove property from list of transitioning properties.
|
|
991
|
-
let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);
|
|
992
|
-
if (!properties) return;
|
|
993
|
-
properties.delete(e.propertyName);
|
|
994
|
-
// If empty, remove transitioncancel event, and remove the element from the list of transitioning elements.
|
|
995
|
-
if (properties.size === 0) {
|
|
996
|
-
e.target.removeEventListener("transitioncancel", onTransitionEnd);
|
|
997
|
-
$bbed8b41f857bcc0$var$transitionsByElement.delete(e.target);
|
|
998
|
-
}
|
|
999
|
-
// If no transitioning elements, call all of the queued callbacks.
|
|
1000
|
-
if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) {
|
|
1001
|
-
for (let cb of $bbed8b41f857bcc0$var$transitionCallbacks)cb();
|
|
1002
|
-
$bbed8b41f857bcc0$var$transitionCallbacks.clear();
|
|
1003
|
-
}
|
|
1004
|
-
};
|
|
1005
|
-
document.body.addEventListener("transitionrun", onTransitionStart);
|
|
1006
|
-
document.body.addEventListener("transitionend", onTransitionEnd);
|
|
1007
|
-
}
|
|
1008
|
-
if (typeof document !== "undefined") {
|
|
1009
|
-
if (document.readyState !== "loading") $bbed8b41f857bcc0$var$setupGlobalEvents();
|
|
1010
|
-
else document.addEventListener("DOMContentLoaded", $bbed8b41f857bcc0$var$setupGlobalEvents);
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
/*
|
|
1016
|
-
* Copyright 2023 Adobe. All rights reserved.
|
|
1017
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1018
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1019
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1020
|
-
*
|
|
1021
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
1022
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
1023
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1024
|
-
* governing permissions and limitations under the License.
|
|
1025
|
-
*/ /* eslint-disable rulesdir/pure-render */
|
|
1026
|
-
function $5a387cc49350e6db$export$722debc0e56fea39(value, isEqual) {
|
|
1027
|
-
// Using a ref during render is ok here because it's only an optimization – both values are equivalent.
|
|
1028
|
-
// If a render is thrown away, it'll still work the same no matter if the next render is the same or not.
|
|
1029
|
-
let lastValue = (useRef)(null);
|
|
1030
|
-
if (value && lastValue.current && isEqual(value, lastValue.current)) value = lastValue.current;
|
|
1031
|
-
lastValue.current = value;
|
|
1032
|
-
return value;
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
850
|
/*
|
|
1036
851
|
* Copyright 2020 Adobe. All rights reserved.
|
|
1037
852
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -1069,7 +884,7 @@ try {
|
|
|
1069
884
|
unit: "degree"
|
|
1070
885
|
}).resolvedOptions().style === "unit";
|
|
1071
886
|
// eslint-disable-next-line no-empty
|
|
1072
|
-
} catch (
|
|
887
|
+
} catch (e1) {}
|
|
1073
888
|
// Polyfill for units since Safari doesn't support them yet. See https://bugs.webkit.org/show_bug.cgi?id=215438.
|
|
1074
889
|
// Currently only polyfilling the unit degree in narrow format for ColorSlider in our supported locales.
|
|
1075
890
|
// Values were determined by switching to each locale manually in Chrome.
|
|
@@ -1407,10 +1222,11 @@ function $33bf17300c498528$export$a2f47a3d2973640(options = {}) {
|
|
|
1407
1222
|
*/
|
|
1408
1223
|
|
|
1409
1224
|
|
|
1410
|
-
|
|
1411
1225
|
function $896ba0a80a8f4d36$export$85fd5fdf27bacc79(options) {
|
|
1412
1226
|
// Reuse last options object if it is shallowly equal, which allows the useMemo result to also be reused.
|
|
1413
|
-
|
|
1227
|
+
let lastOptions = (useRef)(null);
|
|
1228
|
+
if (options && lastOptions.current && $896ba0a80a8f4d36$var$isEqual(options, lastOptions.current)) options = lastOptions.current;
|
|
1229
|
+
lastOptions.current = options;
|
|
1414
1230
|
let { locale: locale } = ($18f2051aff69b9bf$export$43bb16f9c6d9e3f7)();
|
|
1415
1231
|
return (useMemo)(()=>new ($fb18d541ea1ad717$export$ad991b66133851cf)(locale, options), [
|
|
1416
1232
|
locale,
|
|
@@ -5880,6 +5696,8 @@ const StyledDetailedCardCollapsibleSectionItems = styled.div`
|
|
|
5880
5696
|
justify-content: flex-end;
|
|
5881
5697
|
line-height: 14px;
|
|
5882
5698
|
margin: 8px 0px;
|
|
5699
|
+
padding-top: 8px;
|
|
5700
|
+
border-top: 1px solid var(--redsift-color-neutral-midgrey);
|
|
5883
5701
|
}
|
|
5884
5702
|
`;
|
|
5885
5703
|
|
|
@@ -5918,13 +5736,16 @@ const StyledDetailedCardSection = styled.div`
|
|
|
5918
5736
|
margin: 8px 0;
|
|
5919
5737
|
|
|
5920
5738
|
.redsift-detailed-card-section__header {
|
|
5921
|
-
|
|
5922
|
-
${_ref => {
|
|
5739
|
+
${_ref => {
|
|
5923
5740
|
let {
|
|
5924
5741
|
$color
|
|
5925
5742
|
} = _ref;
|
|
5926
|
-
return $color
|
|
5927
|
-
}
|
|
5743
|
+
return $color && [...Object.keys(ColorPalette), ...Object.keys(ProductColorPalette)].indexOf($color) !== -1 ? css`
|
|
5744
|
+
border-bottom: 1px solid var(--redsift-color-${$color}-primary);
|
|
5745
|
+
` : css`
|
|
5746
|
+
border-bottom: 1px solid ${$color || css`var(--redsift-color-neutral-midgrey)`};
|
|
5747
|
+
`;
|
|
5748
|
+
}}
|
|
5928
5749
|
margin-bottom: 8px;
|
|
5929
5750
|
}
|
|
5930
5751
|
|
|
@@ -6195,6 +6016,7 @@ const DetailedCardSection = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
6195
6016
|
}, header), badge ? /*#__PURE__*/React__default.createElement(Badge, _extends$1({
|
|
6196
6017
|
variant: BadgeVariant.standard
|
|
6197
6018
|
}, badge)) : null)) : null, isCollapsible && !isLoading ? /*#__PURE__*/React__default.createElement(IconButton, {
|
|
6019
|
+
marginLeft: "auto",
|
|
6198
6020
|
"aria-label": stringFormatter.format(isCollapsed ? 'expand' : 'collapse'),
|
|
6199
6021
|
className: `${DetailedCardSection.className}-header__collapse-button`,
|
|
6200
6022
|
color: "question",
|
|
@@ -6306,13 +6128,11 @@ const StyledPill = styled.div`
|
|
|
6306
6128
|
${$color === 'black' ? 'background-color: var(--redsift-color-neutral-black);' : $color === 'white' ? css`
|
|
6307
6129
|
background-color: var(--redsift-color-neutral-white);
|
|
6308
6130
|
border: 1px solid #d6d6d6;
|
|
6309
|
-
` : $color === 'error' ? 'background-color: var(--redsift-data-viz-color-
|
|
6131
|
+
` : $color === 'no-data' ? 'background-color: var(--redsift-color-neutral-midgrey);' : $color === 'error' ? 'background-color: var(--redsift-data-viz-color-red-lighter);' : $color === 'warning' ? 'background-color: var(--redsift-data-viz-color-orange-lighter);' : $color === 'success' ? 'background-color: var(--redsift-data-viz-color-green-lighter);' : $color === 'error-dark' ? 'background-color: var(--redsift-data-viz-color-red-default);' : $color === 'warning-dark' ? 'background-color: var(--redsift-data-viz-color-orange-default);' : $color === 'success-dark' ? 'background-color: var(--redsift-data-viz-color-green-default);' : `background-color: var(--redsift-data-viz-color-${$color}-light);`}
|
|
6310
6132
|
|
|
6311
6133
|
&,
|
|
6312
6134
|
.redsift-icon {
|
|
6313
|
-
color: var(
|
|
6314
|
-
--redsift-color-neutral-${$color === 'black' ? 'white' : 'black'}
|
|
6315
|
-
);
|
|
6135
|
+
color: var(--redsift-color-neutral-${['black', 'warning-dark', 'success-dark'].includes($color) ? 'white' : 'black'});
|
|
6316
6136
|
}
|
|
6317
6137
|
`;
|
|
6318
6138
|
}}}
|
|
@@ -6437,7 +6257,7 @@ DetailedCardSectionItem.defaultProps = DEFAULT_PROPS$e;
|
|
|
6437
6257
|
DetailedCardSectionItem.displayName = COMPONENT_NAME$e;
|
|
6438
6258
|
|
|
6439
6259
|
/*!
|
|
6440
|
-
* tabbable 6.2
|
|
6260
|
+
* tabbable 6.1.2
|
|
6441
6261
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
6442
6262
|
*/
|
|
6443
6263
|
// NOTE: separate `:not()` selectors has broader browser support than the newer
|
|
@@ -6617,27 +6437,7 @@ var getCandidatesIteratively = function getCandidatesIteratively(elements, inclu
|
|
|
6617
6437
|
}
|
|
6618
6438
|
return candidates;
|
|
6619
6439
|
};
|
|
6620
|
-
|
|
6621
|
-
/**
|
|
6622
|
-
* @private
|
|
6623
|
-
* Determines if the node has an explicitly specified `tabindex` attribute.
|
|
6624
|
-
* @param {HTMLElement} node
|
|
6625
|
-
* @returns {boolean} True if so; false if not.
|
|
6626
|
-
*/
|
|
6627
|
-
var hasTabIndex = function hasTabIndex(node) {
|
|
6628
|
-
return !isNaN(parseInt(node.getAttribute('tabindex'), 10));
|
|
6629
|
-
};
|
|
6630
|
-
|
|
6631
|
-
/**
|
|
6632
|
-
* Determine the tab index of a given node.
|
|
6633
|
-
* @param {HTMLElement} node
|
|
6634
|
-
* @returns {number} Tab order (negative, 0, or positive number).
|
|
6635
|
-
* @throws {Error} If `node` is falsy.
|
|
6636
|
-
*/
|
|
6637
|
-
var getTabIndex = function getTabIndex(node) {
|
|
6638
|
-
if (!node) {
|
|
6639
|
-
throw new Error('No node provided');
|
|
6640
|
-
}
|
|
6440
|
+
var getTabindex = function getTabindex(node, isScope) {
|
|
6641
6441
|
if (node.tabIndex < 0) {
|
|
6642
6442
|
// in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
|
|
6643
6443
|
// `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
|
|
@@ -6646,28 +6446,16 @@ var getTabIndex = function getTabIndex(node) {
|
|
|
6646
6446
|
// order, consider their tab index to be 0.
|
|
6647
6447
|
// Also browsers do not return `tabIndex` correctly for contentEditable nodes;
|
|
6648
6448
|
// so if they don't have a tabindex attribute specifically set, assume it's 0.
|
|
6649
|
-
|
|
6449
|
+
//
|
|
6450
|
+
// isScope is positive for custom element with shadow root or slot that by default
|
|
6451
|
+
// have tabIndex -1, but need to be sorted by document order in order for their
|
|
6452
|
+
// content to be inserted in the correct position
|
|
6453
|
+
if ((isScope || /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && isNaN(parseInt(node.getAttribute('tabindex'), 10))) {
|
|
6650
6454
|
return 0;
|
|
6651
6455
|
}
|
|
6652
6456
|
}
|
|
6653
6457
|
return node.tabIndex;
|
|
6654
6458
|
};
|
|
6655
|
-
|
|
6656
|
-
/**
|
|
6657
|
-
* Determine the tab index of a given node __for sort order purposes__.
|
|
6658
|
-
* @param {HTMLElement} node
|
|
6659
|
-
* @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,
|
|
6660
|
-
* has tabIndex -1, but needs to be sorted by document order in order for its content to be
|
|
6661
|
-
* inserted into the correct sort position.
|
|
6662
|
-
* @returns {number} Tab order (negative, 0, or positive number).
|
|
6663
|
-
*/
|
|
6664
|
-
var getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {
|
|
6665
|
-
var tabIndex = getTabIndex(node);
|
|
6666
|
-
if (tabIndex < 0 && isScope && !hasTabIndex(node)) {
|
|
6667
|
-
return 0;
|
|
6668
|
-
}
|
|
6669
|
-
return tabIndex;
|
|
6670
|
-
};
|
|
6671
6459
|
var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
|
|
6672
6460
|
return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
|
|
6673
6461
|
};
|
|
@@ -6910,7 +6698,7 @@ var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(o
|
|
|
6910
6698
|
return true;
|
|
6911
6699
|
};
|
|
6912
6700
|
var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
|
|
6913
|
-
if (isNonTabbableRadio(node) ||
|
|
6701
|
+
if (isNonTabbableRadio(node) || getTabindex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
|
|
6914
6702
|
return false;
|
|
6915
6703
|
}
|
|
6916
6704
|
return true;
|
|
@@ -6935,7 +6723,7 @@ var sortByOrder = function sortByOrder(candidates) {
|
|
|
6935
6723
|
candidates.forEach(function (item, i) {
|
|
6936
6724
|
var isScope = !!item.scopeParent;
|
|
6937
6725
|
var element = isScope ? item.scopeParent : item;
|
|
6938
|
-
var candidateTabindex =
|
|
6726
|
+
var candidateTabindex = getTabindex(element, isScope);
|
|
6939
6727
|
var elements = isScope ? sortByOrder(item.candidates) : element;
|
|
6940
6728
|
if (candidateTabindex === 0) {
|
|
6941
6729
|
isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
|
|
@@ -6954,18 +6742,18 @@ var sortByOrder = function sortByOrder(candidates) {
|
|
|
6954
6742
|
return acc;
|
|
6955
6743
|
}, []).concat(regularTabbables);
|
|
6956
6744
|
};
|
|
6957
|
-
var tabbable = function tabbable(
|
|
6745
|
+
var tabbable = function tabbable(el, options) {
|
|
6958
6746
|
options = options || {};
|
|
6959
6747
|
var candidates;
|
|
6960
6748
|
if (options.getShadowRoot) {
|
|
6961
|
-
candidates = getCandidatesIteratively([
|
|
6749
|
+
candidates = getCandidatesIteratively([el], options.includeContainer, {
|
|
6962
6750
|
filter: isNodeMatchingSelectorTabbable.bind(null, options),
|
|
6963
6751
|
flatten: false,
|
|
6964
6752
|
getShadowRoot: options.getShadowRoot,
|
|
6965
6753
|
shadowRootFilter: isValidShadowRootTabbable
|
|
6966
6754
|
});
|
|
6967
6755
|
} else {
|
|
6968
|
-
candidates = getCandidates(
|
|
6756
|
+
candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
|
|
6969
6757
|
}
|
|
6970
6758
|
return sortByOrder(candidates);
|
|
6971
6759
|
};
|
|
@@ -7307,7 +7095,7 @@ const arrow$1 = options => ({
|
|
|
7307
7095
|
[axis]: coords[axis] - alignmentOffset,
|
|
7308
7096
|
data: {
|
|
7309
7097
|
[axis]: offset,
|
|
7310
|
-
centerOffset: center - offset
|
|
7098
|
+
centerOffset: center - offset
|
|
7311
7099
|
}
|
|
7312
7100
|
};
|
|
7313
7101
|
}
|
|
@@ -7653,13 +7441,7 @@ function isNode(value) {
|
|
|
7653
7441
|
return value instanceof getWindow$1(value).Node;
|
|
7654
7442
|
}
|
|
7655
7443
|
function getNodeName(node) {
|
|
7656
|
-
|
|
7657
|
-
return (node.nodeName || '').toLowerCase();
|
|
7658
|
-
}
|
|
7659
|
-
// Mocked nodes in testing environments may not be instances of Node. By
|
|
7660
|
-
// returning `#document` an infinite loop won't occur.
|
|
7661
|
-
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
7662
|
-
return '#document';
|
|
7444
|
+
return isNode(node) ? (node.nodeName || '').toLowerCase() : '';
|
|
7663
7445
|
}
|
|
7664
7446
|
|
|
7665
7447
|
function isHTMLElement$1(value) {
|
|
@@ -7673,7 +7455,8 @@ function isShadowRoot$1(node) {
|
|
|
7673
7455
|
if (typeof ShadowRoot === 'undefined') {
|
|
7674
7456
|
return false;
|
|
7675
7457
|
}
|
|
7676
|
-
|
|
7458
|
+
const OwnElement = getWindow$1(node).ShadowRoot;
|
|
7459
|
+
return node instanceof OwnElement || node instanceof ShadowRoot;
|
|
7677
7460
|
}
|
|
7678
7461
|
function isOverflowElement(element) {
|
|
7679
7462
|
const {
|
|
@@ -7705,11 +7488,6 @@ function isLastTraversableNode(node) {
|
|
|
7705
7488
|
const min = Math.min;
|
|
7706
7489
|
const max = Math.max;
|
|
7707
7490
|
const round = Math.round;
|
|
7708
|
-
const floor = Math.floor;
|
|
7709
|
-
const createEmptyCoords = v => ({
|
|
7710
|
-
x: v,
|
|
7711
|
-
y: v
|
|
7712
|
-
});
|
|
7713
7491
|
|
|
7714
7492
|
function getCssDimensions(element) {
|
|
7715
7493
|
const css = getComputedStyle$1(element);
|
|
@@ -7728,7 +7506,7 @@ function getCssDimensions(element) {
|
|
|
7728
7506
|
return {
|
|
7729
7507
|
width,
|
|
7730
7508
|
height,
|
|
7731
|
-
|
|
7509
|
+
fallback: shouldFallback
|
|
7732
7510
|
};
|
|
7733
7511
|
}
|
|
7734
7512
|
|
|
@@ -7736,19 +7514,23 @@ function unwrapElement(element) {
|
|
|
7736
7514
|
return !isElement$1(element) ? element.contextElement : element;
|
|
7737
7515
|
}
|
|
7738
7516
|
|
|
7517
|
+
const FALLBACK_SCALE = {
|
|
7518
|
+
x: 1,
|
|
7519
|
+
y: 1
|
|
7520
|
+
};
|
|
7739
7521
|
function getScale(element) {
|
|
7740
7522
|
const domElement = unwrapElement(element);
|
|
7741
7523
|
if (!isHTMLElement$1(domElement)) {
|
|
7742
|
-
return
|
|
7524
|
+
return FALLBACK_SCALE;
|
|
7743
7525
|
}
|
|
7744
7526
|
const rect = domElement.getBoundingClientRect();
|
|
7745
7527
|
const {
|
|
7746
7528
|
width,
|
|
7747
7529
|
height,
|
|
7748
|
-
|
|
7530
|
+
fallback
|
|
7749
7531
|
} = getCssDimensions(domElement);
|
|
7750
|
-
let x = (
|
|
7751
|
-
let y = (
|
|
7532
|
+
let x = (fallback ? round(rect.width) : rect.width) / width;
|
|
7533
|
+
let y = (fallback ? round(rect.height) : rect.height) / height;
|
|
7752
7534
|
|
|
7753
7535
|
// 0, NaN, or Infinity should always fallback to 1.
|
|
7754
7536
|
|
|
@@ -7764,7 +7546,10 @@ function getScale(element) {
|
|
|
7764
7546
|
};
|
|
7765
7547
|
}
|
|
7766
7548
|
|
|
7767
|
-
const noOffsets =
|
|
7549
|
+
const noOffsets = {
|
|
7550
|
+
x: 0,
|
|
7551
|
+
y: 0
|
|
7552
|
+
};
|
|
7768
7553
|
function getVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
7769
7554
|
var _win$visualViewport, _win$visualViewport2;
|
|
7770
7555
|
if (isFixed === void 0) {
|
|
@@ -7792,7 +7577,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
7792
7577
|
}
|
|
7793
7578
|
const clientRect = element.getBoundingClientRect();
|
|
7794
7579
|
const domElement = unwrapElement(element);
|
|
7795
|
-
let scale =
|
|
7580
|
+
let scale = FALLBACK_SCALE;
|
|
7796
7581
|
if (includeScale) {
|
|
7797
7582
|
if (offsetParent) {
|
|
7798
7583
|
if (isElement$1(offsetParent)) {
|
|
@@ -7815,14 +7600,14 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
7815
7600
|
const iframeScale = getScale(currentIFrame);
|
|
7816
7601
|
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
7817
7602
|
const css = getComputedStyle(currentIFrame);
|
|
7818
|
-
|
|
7819
|
-
|
|
7603
|
+
iframeRect.x += (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
7604
|
+
iframeRect.y += (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
7820
7605
|
x *= iframeScale.x;
|
|
7821
7606
|
y *= iframeScale.y;
|
|
7822
7607
|
width *= iframeScale.x;
|
|
7823
7608
|
height *= iframeScale.y;
|
|
7824
|
-
x +=
|
|
7825
|
-
y +=
|
|
7609
|
+
x += iframeRect.x;
|
|
7610
|
+
y += iframeRect.y;
|
|
7826
7611
|
currentIFrame = getWindow$1(currentIFrame).frameElement;
|
|
7827
7612
|
}
|
|
7828
7613
|
}
|
|
@@ -7866,8 +7651,14 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
7866
7651
|
scrollLeft: 0,
|
|
7867
7652
|
scrollTop: 0
|
|
7868
7653
|
};
|
|
7869
|
-
let scale =
|
|
7870
|
-
|
|
7654
|
+
let scale = {
|
|
7655
|
+
x: 1,
|
|
7656
|
+
y: 1
|
|
7657
|
+
};
|
|
7658
|
+
const offsets = {
|
|
7659
|
+
x: 0,
|
|
7660
|
+
y: 0
|
|
7661
|
+
};
|
|
7871
7662
|
if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
|
|
7872
7663
|
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
7873
7664
|
scroll = getNodeScroll(offsetParent);
|
|
@@ -7933,7 +7724,9 @@ function getParentNode(node) {
|
|
|
7933
7724
|
function getNearestOverflowAncestor(node) {
|
|
7934
7725
|
const parentNode = getParentNode(node);
|
|
7935
7726
|
if (isLastTraversableNode(parentNode)) {
|
|
7936
|
-
return
|
|
7727
|
+
// `getParentNode` will never return a `Document` due to the fallback
|
|
7728
|
+
// check, so it's either the <html> or <body> element.
|
|
7729
|
+
return parentNode.ownerDocument.body;
|
|
7937
7730
|
}
|
|
7938
7731
|
if (isHTMLElement$1(parentNode) && isOverflowElement(parentNode)) {
|
|
7939
7732
|
return parentNode;
|
|
@@ -7985,7 +7778,10 @@ function getInnerBoundingClientRect(element, strategy) {
|
|
|
7985
7778
|
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
7986
7779
|
const top = clientRect.top + element.clientTop;
|
|
7987
7780
|
const left = clientRect.left + element.clientLeft;
|
|
7988
|
-
const scale = isHTMLElement$1(element) ? getScale(element) :
|
|
7781
|
+
const scale = isHTMLElement$1(element) ? getScale(element) : {
|
|
7782
|
+
x: 1,
|
|
7783
|
+
y: 1
|
|
7784
|
+
};
|
|
7989
7785
|
const width = element.clientWidth * scale.x;
|
|
7990
7786
|
const height = element.clientHeight * scale.y;
|
|
7991
7787
|
const x = left * scale.x;
|
|
@@ -8136,7 +7932,10 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
8136
7932
|
scrollLeft: 0,
|
|
8137
7933
|
scrollTop: 0
|
|
8138
7934
|
};
|
|
8139
|
-
const offsets =
|
|
7935
|
+
const offsets = {
|
|
7936
|
+
x: 0,
|
|
7937
|
+
y: 0
|
|
7938
|
+
};
|
|
8140
7939
|
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
8141
7940
|
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
8142
7941
|
scroll = getNodeScroll(offsetParent);
|
|
@@ -8186,67 +7985,6 @@ const platform = {
|
|
|
8186
7985
|
isRTL: element => getComputedStyle$1(element).direction === 'rtl'
|
|
8187
7986
|
};
|
|
8188
7987
|
|
|
8189
|
-
// https://samthor.au/2021/observing-dom/
|
|
8190
|
-
function observeMove(element, onMove) {
|
|
8191
|
-
let io = null;
|
|
8192
|
-
let timeoutId;
|
|
8193
|
-
const root = getDocumentElement(element);
|
|
8194
|
-
function cleanup() {
|
|
8195
|
-
clearTimeout(timeoutId);
|
|
8196
|
-
io && io.disconnect();
|
|
8197
|
-
io = null;
|
|
8198
|
-
}
|
|
8199
|
-
function refresh(skip, threshold) {
|
|
8200
|
-
if (skip === void 0) {
|
|
8201
|
-
skip = false;
|
|
8202
|
-
}
|
|
8203
|
-
if (threshold === void 0) {
|
|
8204
|
-
threshold = 1;
|
|
8205
|
-
}
|
|
8206
|
-
cleanup();
|
|
8207
|
-
const {
|
|
8208
|
-
left,
|
|
8209
|
-
top,
|
|
8210
|
-
width,
|
|
8211
|
-
height
|
|
8212
|
-
} = element.getBoundingClientRect();
|
|
8213
|
-
if (!skip) {
|
|
8214
|
-
onMove();
|
|
8215
|
-
}
|
|
8216
|
-
if (!width || !height) {
|
|
8217
|
-
return;
|
|
8218
|
-
}
|
|
8219
|
-
const insetTop = floor(top);
|
|
8220
|
-
const insetRight = floor(root.clientWidth - (left + width));
|
|
8221
|
-
const insetBottom = floor(root.clientHeight - (top + height));
|
|
8222
|
-
const insetLeft = floor(left);
|
|
8223
|
-
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
8224
|
-
let isFirstUpdate = true;
|
|
8225
|
-
io = new IntersectionObserver(entries => {
|
|
8226
|
-
const ratio = entries[0].intersectionRatio;
|
|
8227
|
-
if (ratio !== threshold) {
|
|
8228
|
-
if (!isFirstUpdate) {
|
|
8229
|
-
return refresh();
|
|
8230
|
-
}
|
|
8231
|
-
if (!ratio) {
|
|
8232
|
-
timeoutId = setTimeout(() => {
|
|
8233
|
-
refresh(false, 1e-7);
|
|
8234
|
-
}, 100);
|
|
8235
|
-
} else {
|
|
8236
|
-
refresh(false, ratio);
|
|
8237
|
-
}
|
|
8238
|
-
}
|
|
8239
|
-
isFirstUpdate = false;
|
|
8240
|
-
}, {
|
|
8241
|
-
rootMargin,
|
|
8242
|
-
threshold: max(0, min(1, threshold)) || 1
|
|
8243
|
-
});
|
|
8244
|
-
io.observe(element);
|
|
8245
|
-
}
|
|
8246
|
-
refresh(true);
|
|
8247
|
-
return cleanup;
|
|
8248
|
-
}
|
|
8249
|
-
|
|
8250
7988
|
/**
|
|
8251
7989
|
* Automatically updates the position of the floating element when necessary.
|
|
8252
7990
|
* Should only be called when the floating element is mounted on the DOM or
|
|
@@ -8263,25 +8001,29 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
8263
8001
|
ancestorScroll = true,
|
|
8264
8002
|
ancestorResize = true,
|
|
8265
8003
|
elementResize = true,
|
|
8266
|
-
layoutShift = typeof IntersectionObserver === 'function',
|
|
8267
8004
|
animationFrame = false
|
|
8268
8005
|
} = options;
|
|
8269
|
-
const
|
|
8270
|
-
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
|
|
8006
|
+
const ancestors = ancestorScroll || ancestorResize ? [...(isElement$1(reference) ? getOverflowAncestors(reference) : reference.contextElement ? getOverflowAncestors(reference.contextElement) : []), ...getOverflowAncestors(floating)] : [];
|
|
8271
8007
|
ancestors.forEach(ancestor => {
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
|
|
8008
|
+
// ignores Window, checks for [object VisualViewport]
|
|
8009
|
+
const isVisualViewport = !isElement$1(ancestor) && ancestor.toString().includes('V');
|
|
8010
|
+
if (ancestorScroll && (animationFrame ? isVisualViewport : true)) {
|
|
8011
|
+
ancestor.addEventListener('scroll', update, {
|
|
8012
|
+
passive: true
|
|
8013
|
+
});
|
|
8014
|
+
}
|
|
8275
8015
|
ancestorResize && ancestor.addEventListener('resize', update);
|
|
8276
8016
|
});
|
|
8277
|
-
|
|
8278
|
-
let resizeObserver = null;
|
|
8017
|
+
let observer = null;
|
|
8279
8018
|
if (elementResize) {
|
|
8280
|
-
|
|
8281
|
-
|
|
8282
|
-
|
|
8019
|
+
observer = new ResizeObserver(() => {
|
|
8020
|
+
update();
|
|
8021
|
+
});
|
|
8022
|
+
isElement$1(reference) && !animationFrame && observer.observe(reference);
|
|
8023
|
+
if (!isElement$1(reference) && reference.contextElement && !animationFrame) {
|
|
8024
|
+
observer.observe(reference.contextElement);
|
|
8283
8025
|
}
|
|
8284
|
-
|
|
8026
|
+
observer.observe(floating);
|
|
8285
8027
|
}
|
|
8286
8028
|
let frameId;
|
|
8287
8029
|
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
@@ -8298,13 +8040,13 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
8298
8040
|
}
|
|
8299
8041
|
update();
|
|
8300
8042
|
return () => {
|
|
8043
|
+
var _observer;
|
|
8301
8044
|
ancestors.forEach(ancestor => {
|
|
8302
8045
|
ancestorScroll && ancestor.removeEventListener('scroll', update);
|
|
8303
8046
|
ancestorResize && ancestor.removeEventListener('resize', update);
|
|
8304
8047
|
});
|
|
8305
|
-
|
|
8306
|
-
|
|
8307
|
-
resizeObserver = null;
|
|
8048
|
+
(_observer = observer) == null ? void 0 : _observer.disconnect();
|
|
8049
|
+
observer = null;
|
|
8308
8050
|
if (animationFrame) {
|
|
8309
8051
|
cancelAnimationFrame(frameId);
|
|
8310
8052
|
}
|
|
@@ -10225,7 +9967,7 @@ const useTooltipContext = () => {
|
|
|
10225
9967
|
return context;
|
|
10226
9968
|
};
|
|
10227
9969
|
|
|
10228
|
-
const _excluded$a = ["areAllCollapsed", "children", "className", "color", "defaultAllCollapsed", "icon", "isCollapsible", "isLoading", "onCollapseAll", "shield"];
|
|
9970
|
+
const _excluded$a = ["areAllCollapsed", "bannerVariant", "children", "className", "color", "defaultAllCollapsed", "icon", "isCollapsible", "isLoading", "onCollapseAll", "shield"];
|
|
10229
9971
|
const COMPONENT_NAME$a = 'DetailedCard';
|
|
10230
9972
|
const CLASSNAME$a = 'redsift-detailed-card';
|
|
10231
9973
|
const DEFAULT_PROPS$a = {
|
|
@@ -10257,6 +9999,7 @@ const hasMultipleCollapsibleChildren = children => {
|
|
|
10257
9999
|
const BaseDetailedCard = /*#__PURE__*/forwardRef((props, ref) => {
|
|
10258
10000
|
const {
|
|
10259
10001
|
areAllCollapsed: propsAreAllCollapsed,
|
|
10002
|
+
bannerVariant,
|
|
10260
10003
|
children,
|
|
10261
10004
|
className,
|
|
10262
10005
|
color,
|
|
@@ -10294,17 +10037,17 @@ const BaseDetailedCard = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10294
10037
|
ref: ref,
|
|
10295
10038
|
$color: color
|
|
10296
10039
|
}), color ? isLoading ? /*#__PURE__*/React__default.createElement(Skeleton, {
|
|
10297
|
-
height:
|
|
10040
|
+
height: bannerVariant === 'condensed' ? '8px' : '80px',
|
|
10298
10041
|
width: "calc(100% + 32px)",
|
|
10299
10042
|
margin: "-16px -16px 16px -16px"
|
|
10300
10043
|
}) : /*#__PURE__*/React__default.createElement(Flexbox, {
|
|
10301
10044
|
className: `${BaseDetailedCard.className}__banner`,
|
|
10302
10045
|
alignItems: "center",
|
|
10303
|
-
height:
|
|
10046
|
+
height: bannerVariant === 'condensed' ? '8px' : '80px',
|
|
10304
10047
|
justifyContent: "center",
|
|
10305
10048
|
margin: "-16px -16px 16px -16px",
|
|
10306
10049
|
width: "calc(100% + 32px)"
|
|
10307
|
-
}, shield ? /*#__PURE__*/React__default.createElement(Shield, {
|
|
10050
|
+
}, bannerVariant === 'condensed' ? null : shield ? /*#__PURE__*/React__default.createElement(Shield, {
|
|
10308
10051
|
variant: shield,
|
|
10309
10052
|
isOutlined: true,
|
|
10310
10053
|
isReversed: true,
|