@redsift/design-system 7.7.0-alpha.3 → 7.7.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 +5 -2
- package/index.js +64 -23
- package/index.js.map +1 -1
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -1633,8 +1633,10 @@ declare const DetailedCardHeader: Comp<DetailedCardHeaderProps, HTMLDivElement>;
|
|
|
1633
1633
|
interface DetailedCardSectionProps extends ComponentProps<'div'> {
|
|
1634
1634
|
/** Props to pass to the badge displayed next to the title. */
|
|
1635
1635
|
badge?: Omit<BadgeProps, 'ref'>;
|
|
1636
|
+
/** Color that will be used on the header line. */
|
|
1637
|
+
color?: ColorPalette;
|
|
1636
1638
|
/** Header. */
|
|
1637
|
-
header?: string;
|
|
1639
|
+
header?: string | ReactElement;
|
|
1638
1640
|
/** Whether the section is collapsed or not. */
|
|
1639
1641
|
readonly isCollapsed?: boolean;
|
|
1640
1642
|
/** Whether the section can be collasped or not. */
|
|
@@ -1642,7 +1644,8 @@ interface DetailedCardSectionProps extends ComponentProps<'div'> {
|
|
|
1642
1644
|
/** Whether the card is loading or not. */
|
|
1643
1645
|
isLoading?: boolean;
|
|
1644
1646
|
}
|
|
1645
|
-
type StyledDetailedCardSectionProps = Omit<DetailedCardSectionProps, 'isCollapsed'> & {
|
|
1647
|
+
type StyledDetailedCardSectionProps = Omit<DetailedCardSectionProps, 'color' | 'isCollapsed'> & {
|
|
1648
|
+
$color: DetailedCardSectionProps['color'];
|
|
1646
1649
|
$isCollapsed: DetailedCardSectionProps['isCollapsed'];
|
|
1647
1650
|
};
|
|
1648
1651
|
|
package/index.js
CHANGED
|
@@ -2231,9 +2231,15 @@ const StyledSideNavigationMenuItem = styled.a`
|
|
|
2231
2231
|
$isDisabled
|
|
2232
2232
|
} = _ref;
|
|
2233
2233
|
return !$isDisabled ? css`
|
|
2234
|
-
|
|
2234
|
+
&,
|
|
2235
|
+
.redsift-icon.first {
|
|
2236
|
+
color: var(--redsift-side-navigation-color-menu-item-text-resting);
|
|
2237
|
+
}
|
|
2235
2238
|
` : css`
|
|
2236
|
-
|
|
2239
|
+
&,
|
|
2240
|
+
.redsift-icon.first {
|
|
2241
|
+
color: var(--redsift-side-navigation-color-menu-item-text-disabled);
|
|
2242
|
+
}
|
|
2237
2243
|
`;
|
|
2238
2244
|
}}
|
|
2239
2245
|
align-items: center;
|
|
@@ -2256,7 +2262,10 @@ const StyledSideNavigationMenuItem = styled.a`
|
|
|
2256
2262
|
background-color: var(
|
|
2257
2263
|
--redsift-side-navigation-color-menu-item-background-hover
|
|
2258
2264
|
);
|
|
2259
|
-
|
|
2265
|
+
&,
|
|
2266
|
+
.redsift-icon.first {
|
|
2267
|
+
color: var(--redsift-side-navigation-color-menu-item-text-hover);
|
|
2268
|
+
}
|
|
2260
2269
|
` : '';
|
|
2261
2270
|
}}
|
|
2262
2271
|
}
|
|
@@ -2268,8 +2277,8 @@ const StyledSideNavigationMenuItem = styled.a`
|
|
|
2268
2277
|
} = _ref3;
|
|
2269
2278
|
return !$isSecondLevel ? css`
|
|
2270
2279
|
/**
|
|
2271
|
-
|
|
2272
|
-
|
|
2280
|
+
* First-level items
|
|
2281
|
+
*/
|
|
2273
2282
|
|
|
2274
2283
|
background-color: var(--redsift-side-navigation-color-background);
|
|
2275
2284
|
padding: 8px 16px;
|
|
@@ -2552,9 +2561,19 @@ const StyledSideNavigationMenu = styled.div`
|
|
|
2552
2561
|
$isDisabled
|
|
2553
2562
|
} = _ref;
|
|
2554
2563
|
return !$isDisabled ? css`
|
|
2555
|
-
|
|
2564
|
+
&,
|
|
2565
|
+
.redsift-icon.first {
|
|
2566
|
+
color: var(
|
|
2567
|
+
--redsift-side-navigation-color-menu-item-text-resting
|
|
2568
|
+
);
|
|
2569
|
+
}
|
|
2556
2570
|
` : css`
|
|
2557
|
-
|
|
2571
|
+
&,
|
|
2572
|
+
.redsift-icon.first {
|
|
2573
|
+
color: var(
|
|
2574
|
+
--redsift-side-navigation-color-menu-item-text-disabled
|
|
2575
|
+
);
|
|
2576
|
+
}
|
|
2558
2577
|
`;
|
|
2559
2578
|
}}
|
|
2560
2579
|
align-items: center;
|
|
@@ -2607,12 +2626,12 @@ const StyledSideNavigationMenu = styled.div`
|
|
|
2607
2626
|
background-color: var(
|
|
2608
2627
|
--redsift-side-navigation-color-menu-item-background-hover
|
|
2609
2628
|
);
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2629
|
+
&,
|
|
2630
|
+
.redsift-icon.first,
|
|
2613
2631
|
.redsift-side-navigation-menu__expand-icon {
|
|
2614
2632
|
color: var(--redsift-side-navigation-color-menu-item-text-hover);
|
|
2615
2633
|
}
|
|
2634
|
+
cursor: pointer;
|
|
2616
2635
|
` : '';
|
|
2617
2636
|
}}
|
|
2618
2637
|
}
|
|
@@ -2623,9 +2642,19 @@ const StyledSideNavigationMenu = styled.div`
|
|
|
2623
2642
|
$isDisabled
|
|
2624
2643
|
} = _ref3;
|
|
2625
2644
|
return !$isDisabled ? css`
|
|
2626
|
-
|
|
2645
|
+
&,
|
|
2646
|
+
.redsift-icon.first {
|
|
2647
|
+
color: var(
|
|
2648
|
+
--redsift-side-navigation-color-menu-item-text-resting
|
|
2649
|
+
);
|
|
2650
|
+
}
|
|
2627
2651
|
` : css`
|
|
2628
|
-
|
|
2652
|
+
&,
|
|
2653
|
+
.redsift-icon.first {
|
|
2654
|
+
color: var(
|
|
2655
|
+
--redsift-side-navigation-color-menu-item-text-disabled
|
|
2656
|
+
);
|
|
2657
|
+
}
|
|
2629
2658
|
`;
|
|
2630
2659
|
}}
|
|
2631
2660
|
margin-left: auto;
|
|
@@ -4741,12 +4770,20 @@ const StyledDetailedCardSection = styled.div`
|
|
|
4741
4770
|
margin: 8px 0;
|
|
4742
4771
|
|
|
4743
4772
|
.redsift-detailed-card-section__header {
|
|
4744
|
-
border-bottom: 1px solid
|
|
4773
|
+
border-bottom: 1px solid
|
|
4774
|
+
${_ref => {
|
|
4775
|
+
let {
|
|
4776
|
+
$color
|
|
4777
|
+
} = _ref;
|
|
4778
|
+
return $color ? css`var(--redsift-color-${$color}-primary)` : 'var(--redsift-color-neutral-midgrey)';
|
|
4779
|
+
}};
|
|
4745
4780
|
margin-bottom: 8px;
|
|
4746
4781
|
}
|
|
4747
4782
|
|
|
4748
4783
|
.redsift-detailed-card-section-header__title {
|
|
4784
|
+
font-size: 18px;
|
|
4749
4785
|
font-weight: 700;
|
|
4786
|
+
lineheight: 22px;
|
|
4750
4787
|
padding: 6px 0px;
|
|
4751
4788
|
}
|
|
4752
4789
|
|
|
@@ -4755,28 +4792,28 @@ const StyledDetailedCardSection = styled.div`
|
|
|
4755
4792
|
}
|
|
4756
4793
|
|
|
4757
4794
|
.redsift-detailed-card-collapsible-section-items {
|
|
4758
|
-
visibility: ${
|
|
4795
|
+
visibility: ${_ref2 => {
|
|
4759
4796
|
let {
|
|
4760
4797
|
$isCollapsed
|
|
4761
|
-
} =
|
|
4798
|
+
} = _ref2;
|
|
4762
4799
|
return !$isCollapsed ? 'visible' : 'hidden';
|
|
4763
4800
|
}};
|
|
4764
|
-
overflow: ${
|
|
4801
|
+
overflow: ${_ref3 => {
|
|
4765
4802
|
let {
|
|
4766
4803
|
$isCollapsed
|
|
4767
|
-
} =
|
|
4804
|
+
} = _ref3;
|
|
4768
4805
|
return !$isCollapsed ? 'visible' : 'hidden';
|
|
4769
4806
|
}};
|
|
4770
|
-
height: ${
|
|
4807
|
+
height: ${_ref4 => {
|
|
4771
4808
|
let {
|
|
4772
4809
|
$isCollapsed
|
|
4773
|
-
} =
|
|
4810
|
+
} = _ref4;
|
|
4774
4811
|
return !$isCollapsed ? 'auto' : '0px';
|
|
4775
4812
|
}};
|
|
4776
|
-
${
|
|
4813
|
+
${_ref5 => {
|
|
4777
4814
|
let {
|
|
4778
4815
|
$isCollapsed
|
|
4779
|
-
} =
|
|
4816
|
+
} = _ref5;
|
|
4780
4817
|
return $isCollapsed ? css`
|
|
4781
4818
|
margin: unset;
|
|
4782
4819
|
padding: unset;
|
|
@@ -4943,7 +4980,7 @@ Text.className = CLASSNAME$h;
|
|
|
4943
4980
|
Text.defaultProps = DEFAULT_PROPS$h;
|
|
4944
4981
|
Text.displayName = COMPONENT_NAME$h;
|
|
4945
4982
|
|
|
4946
|
-
const _excluded$d = ["badge", "children", "className", "header", "isCollapsed", "isCollapsible", "isLoading"];
|
|
4983
|
+
const _excluded$d = ["badge", "color", "children", "className", "header", "isCollapsed", "isCollapsible", "isLoading"];
|
|
4947
4984
|
const COMPONENT_NAME$g = 'DetailedCardSection';
|
|
4948
4985
|
const CLASSNAME$g = 'redsift-detailed-card-section';
|
|
4949
4986
|
const DEFAULT_PROPS$g = {
|
|
@@ -4965,6 +5002,7 @@ const hasCollapsibleChildren = children => {
|
|
|
4965
5002
|
const DetailedCardSection = /*#__PURE__*/forwardRef((props, ref) => {
|
|
4966
5003
|
const {
|
|
4967
5004
|
badge,
|
|
5005
|
+
color,
|
|
4968
5006
|
children,
|
|
4969
5007
|
className,
|
|
4970
5008
|
header,
|
|
@@ -4979,6 +5017,7 @@ const DetailedCardSection = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
4979
5017
|
return /*#__PURE__*/React__default.createElement(StyledDetailedCardSection, _extends$1({}, forwardedProps, {
|
|
4980
5018
|
className: classNames(DetailedCardSection.className, className),
|
|
4981
5019
|
ref: ref,
|
|
5020
|
+
$color: color,
|
|
4982
5021
|
$isCollapsed: isCollapsed
|
|
4983
5022
|
}), /*#__PURE__*/React__default.createElement(Flexbox, {
|
|
4984
5023
|
justifyContent: "space-between",
|
|
@@ -4993,12 +5032,14 @@ const DetailedCardSection = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
4993
5032
|
}, /*#__PURE__*/React__default.createElement(Flexbox, {
|
|
4994
5033
|
alignItems: "center",
|
|
4995
5034
|
gap: "8px"
|
|
4996
|
-
}, /*#__PURE__*/React__default.createElement(Text, {
|
|
5035
|
+
}, typeof header === 'string' ? /*#__PURE__*/React__default.createElement(Text, {
|
|
4997
5036
|
className: `${DetailedCardSection.className}-header__title`,
|
|
4998
5037
|
color: "black",
|
|
4999
5038
|
fontFamily: "raleway",
|
|
5000
5039
|
fontSize: "18px",
|
|
5001
5040
|
lineHeight: "22px"
|
|
5041
|
+
}, header) : /*#__PURE__*/React__default.createElement("div", {
|
|
5042
|
+
className: `${DetailedCardSection.className}-header__title`
|
|
5002
5043
|
}, header), badge ? /*#__PURE__*/React__default.createElement(Badge, _extends$1({
|
|
5003
5044
|
variant: BadgeVariant.standard
|
|
5004
5045
|
}, badge)) : null)) : null, isCollapsible && !isLoading ? /*#__PURE__*/React__default.createElement(IconButton, {
|