@redsift/design-system 8.0.1 → 8.0.3
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 +3 -1
- package/index.js +17 -12
- package/index.js.map +1 -1
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -1556,6 +1556,8 @@ declare const Shield: Comp<ShieldProps, HTMLDivElement>;
|
|
|
1556
1556
|
interface DetailedCardProps extends ComponentProps<'div'>, StylingProps {
|
|
1557
1557
|
/** Whether the component is collapsed or not. Used for controlled version. */
|
|
1558
1558
|
areAllCollapsed?: boolean;
|
|
1559
|
+
/** Banner variant. */
|
|
1560
|
+
bannerVariant?: 'standard' | 'condensed';
|
|
1559
1561
|
/** Banner color. */
|
|
1560
1562
|
color?: ColorPalette;
|
|
1561
1563
|
/** Default collapse status. Used for uncontrolled version. */
|
|
@@ -1675,7 +1677,7 @@ interface DetailedCardSectionProps extends ComponentProps<'div'> {
|
|
|
1675
1677
|
/** Props to pass to the badge displayed next to the title. */
|
|
1676
1678
|
badge?: Omit<BadgeProps, 'ref'>;
|
|
1677
1679
|
/** Color that will be used on the header line. */
|
|
1678
|
-
color?: ColorPalette;
|
|
1680
|
+
color?: ColorPalette | DataVizColorPalette | string;
|
|
1679
1681
|
/** Header. */
|
|
1680
1682
|
header?: string | ReactElement;
|
|
1681
1683
|
/** Whether the section is collapsed or not. */
|
package/index.js
CHANGED
|
@@ -5880,6 +5880,8 @@ const StyledDetailedCardCollapsibleSectionItems = styled.div`
|
|
|
5880
5880
|
justify-content: flex-end;
|
|
5881
5881
|
line-height: 14px;
|
|
5882
5882
|
margin: 8px 0px;
|
|
5883
|
+
padding-top: 8px;
|
|
5884
|
+
border-top: 1px solid var(--redsift-color-neutral-midgrey);
|
|
5883
5885
|
}
|
|
5884
5886
|
`;
|
|
5885
5887
|
|
|
@@ -5918,13 +5920,16 @@ const StyledDetailedCardSection = styled.div`
|
|
|
5918
5920
|
margin: 8px 0;
|
|
5919
5921
|
|
|
5920
5922
|
.redsift-detailed-card-section__header {
|
|
5921
|
-
|
|
5922
|
-
${_ref => {
|
|
5923
|
+
${_ref => {
|
|
5923
5924
|
let {
|
|
5924
5925
|
$color
|
|
5925
5926
|
} = _ref;
|
|
5926
|
-
return $color
|
|
5927
|
-
}
|
|
5927
|
+
return $color && [...Object.keys(ColorPalette), ...Object.keys(ProductColorPalette)].indexOf($color) !== -1 ? css`
|
|
5928
|
+
border-bottom: 1px solid var(--redsift-color-${$color}-primary);
|
|
5929
|
+
` : css`
|
|
5930
|
+
border-bottom: 1px solid ${$color || css`var(--redsift-color-neutral-midgrey)`};
|
|
5931
|
+
`;
|
|
5932
|
+
}}
|
|
5928
5933
|
margin-bottom: 8px;
|
|
5929
5934
|
}
|
|
5930
5935
|
|
|
@@ -6195,6 +6200,7 @@ const DetailedCardSection = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
6195
6200
|
}, header), badge ? /*#__PURE__*/React__default.createElement(Badge, _extends$1({
|
|
6196
6201
|
variant: BadgeVariant.standard
|
|
6197
6202
|
}, badge)) : null)) : null, isCollapsible && !isLoading ? /*#__PURE__*/React__default.createElement(IconButton, {
|
|
6203
|
+
marginLeft: "auto",
|
|
6198
6204
|
"aria-label": stringFormatter.format(isCollapsed ? 'expand' : 'collapse'),
|
|
6199
6205
|
className: `${DetailedCardSection.className}-header__collapse-button`,
|
|
6200
6206
|
color: "question",
|
|
@@ -6306,13 +6312,11 @@ const StyledPill = styled.div`
|
|
|
6306
6312
|
${$color === 'black' ? 'background-color: var(--redsift-color-neutral-black);' : $color === 'white' ? css`
|
|
6307
6313
|
background-color: var(--redsift-color-neutral-white);
|
|
6308
6314
|
border: 1px solid #d6d6d6;
|
|
6309
|
-
` : $color === 'error' ? 'background-color: var(--redsift-data-viz-color-
|
|
6315
|
+
` : $color === 'error' ? 'background-color: var(--redsift-data-viz-color-red-light);' : $color === 'warning' ? 'background-color: var(--redsift-data-viz-color-orange-light);' : $color === 'success' ? 'background-color: var(--redsift-data-viz-color-green-light);' : `background-color: var(--redsift-data-viz-color-${$color}-light);`}
|
|
6310
6316
|
|
|
6311
6317
|
&,
|
|
6312
6318
|
.redsift-icon {
|
|
6313
|
-
color: var(
|
|
6314
|
-
--redsift-color-neutral-${$color === 'black' ? 'white' : 'black'}
|
|
6315
|
-
);
|
|
6319
|
+
color: var(--redsift-color-neutral-${$color === 'black' ? 'white' : 'black'});
|
|
6316
6320
|
}
|
|
6317
6321
|
`;
|
|
6318
6322
|
}}}
|
|
@@ -10225,7 +10229,7 @@ const useTooltipContext = () => {
|
|
|
10225
10229
|
return context;
|
|
10226
10230
|
};
|
|
10227
10231
|
|
|
10228
|
-
const _excluded$a = ["areAllCollapsed", "children", "className", "color", "defaultAllCollapsed", "icon", "isCollapsible", "isLoading", "onCollapseAll", "shield"];
|
|
10232
|
+
const _excluded$a = ["areAllCollapsed", "bannerVariant", "children", "className", "color", "defaultAllCollapsed", "icon", "isCollapsible", "isLoading", "onCollapseAll", "shield"];
|
|
10229
10233
|
const COMPONENT_NAME$a = 'DetailedCard';
|
|
10230
10234
|
const CLASSNAME$a = 'redsift-detailed-card';
|
|
10231
10235
|
const DEFAULT_PROPS$a = {
|
|
@@ -10257,6 +10261,7 @@ const hasMultipleCollapsibleChildren = children => {
|
|
|
10257
10261
|
const BaseDetailedCard = /*#__PURE__*/forwardRef((props, ref) => {
|
|
10258
10262
|
const {
|
|
10259
10263
|
areAllCollapsed: propsAreAllCollapsed,
|
|
10264
|
+
bannerVariant,
|
|
10260
10265
|
children,
|
|
10261
10266
|
className,
|
|
10262
10267
|
color,
|
|
@@ -10294,17 +10299,17 @@ const BaseDetailedCard = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10294
10299
|
ref: ref,
|
|
10295
10300
|
$color: color
|
|
10296
10301
|
}), color ? isLoading ? /*#__PURE__*/React__default.createElement(Skeleton, {
|
|
10297
|
-
height:
|
|
10302
|
+
height: bannerVariant === 'condensed' ? '8px' : '80px',
|
|
10298
10303
|
width: "calc(100% + 32px)",
|
|
10299
10304
|
margin: "-16px -16px 16px -16px"
|
|
10300
10305
|
}) : /*#__PURE__*/React__default.createElement(Flexbox, {
|
|
10301
10306
|
className: `${BaseDetailedCard.className}__banner`,
|
|
10302
10307
|
alignItems: "center",
|
|
10303
|
-
height:
|
|
10308
|
+
height: bannerVariant === 'condensed' ? '8px' : '80px',
|
|
10304
10309
|
justifyContent: "center",
|
|
10305
10310
|
margin: "-16px -16px 16px -16px",
|
|
10306
10311
|
width: "calc(100% + 32px)"
|
|
10307
|
-
}, shield ? /*#__PURE__*/React__default.createElement(Shield, {
|
|
10312
|
+
}, bannerVariant === 'condensed' ? null : shield ? /*#__PURE__*/React__default.createElement(Shield, {
|
|
10308
10313
|
variant: shield,
|
|
10309
10314
|
isOutlined: true,
|
|
10310
10315
|
isReversed: true,
|