@redsift/design-system 10.0.0-muiv5-alpha.1 → 10.0.0-muiv5-alpha.2
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 +76 -70
- package/index.js +22 -5
- package/index.js.map +1 -1
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -2438,12 +2438,85 @@ type StyledPillProps = Omit<PillProps, 'color' | 'autoBreak'> & {
|
|
|
2438
2438
|
*/
|
|
2439
2439
|
declare const Pill: Comp<PillProps, HTMLDivElement>;
|
|
2440
2440
|
|
|
2441
|
+
/**
|
|
2442
|
+
* Component variant.
|
|
2443
|
+
*/
|
|
2444
|
+
declare const TextVariant: {
|
|
2445
|
+
readonly body: "body";
|
|
2446
|
+
readonly button: "button";
|
|
2447
|
+
readonly caption: "caption";
|
|
2448
|
+
readonly helper: "helper";
|
|
2449
|
+
readonly inherit: "inherit";
|
|
2450
|
+
};
|
|
2451
|
+
type TextVariant = ValueOf<typeof TextVariant>;
|
|
2452
|
+
declare const TextComponent: {
|
|
2453
|
+
readonly p: "p";
|
|
2454
|
+
readonly b: "b";
|
|
2455
|
+
readonly i: "i";
|
|
2456
|
+
readonly u: "u";
|
|
2457
|
+
readonly abbr: "abbr";
|
|
2458
|
+
readonly cite: "cite";
|
|
2459
|
+
readonly del: "del";
|
|
2460
|
+
readonly em: "em";
|
|
2461
|
+
readonly ins: "ins";
|
|
2462
|
+
readonly kbd: "kbd";
|
|
2463
|
+
readonly mark: "mark";
|
|
2464
|
+
readonly s: "s";
|
|
2465
|
+
readonly samp: "samp";
|
|
2466
|
+
readonly sub: "sub";
|
|
2467
|
+
readonly sup: "sup";
|
|
2468
|
+
};
|
|
2469
|
+
type TextComponent = ValueOf<typeof TextComponent>;
|
|
2470
|
+
/**
|
|
2471
|
+
* Component props.
|
|
2472
|
+
*/
|
|
2473
|
+
interface TextProps extends ComponentProps<'span'>, StylingProps {
|
|
2474
|
+
/** Override component. */
|
|
2475
|
+
as?: TextComponent;
|
|
2476
|
+
/** Color variant. Either from color palette or hex or rgb strings. */
|
|
2477
|
+
color?: NotificationsColorPalette | NeutralColorPalette | (string & {});
|
|
2478
|
+
/** Font family. */
|
|
2479
|
+
fontFamily?: FontFamily;
|
|
2480
|
+
/** Font size. */
|
|
2481
|
+
fontSize?: string;
|
|
2482
|
+
/** Font weight. */
|
|
2483
|
+
fontWeight?: string;
|
|
2484
|
+
/** Line height. */
|
|
2485
|
+
lineHeight?: string;
|
|
2486
|
+
/** Whether the text will truncate with a text overflow ellipsis or wrap. */
|
|
2487
|
+
noWrap?: boolean;
|
|
2488
|
+
/** Theme. */
|
|
2489
|
+
theme?: Theme;
|
|
2490
|
+
/** Variant. */
|
|
2491
|
+
variant?: TextVariant;
|
|
2492
|
+
/** Word break CSS properties */
|
|
2493
|
+
wordBreak?: string;
|
|
2494
|
+
}
|
|
2495
|
+
type StyledTextProps = Omit<TextProps, 'as' | 'color' | 'fontFamily' | 'fontSize' | 'lineHeight' | 'noWrap' | 'variant'> & {
|
|
2496
|
+
$as: TextProps['as'];
|
|
2497
|
+
$color: TextProps['color'];
|
|
2498
|
+
$fontFamily?: TextProps['fontFamily'];
|
|
2499
|
+
$fontSize: TextProps['fontSize'];
|
|
2500
|
+
$fontWeight: TextProps['fontWeight'];
|
|
2501
|
+
$lineHeight: TextProps['lineHeight'];
|
|
2502
|
+
$noWrap: TextProps['noWrap'];
|
|
2503
|
+
$variant: TextProps['variant'];
|
|
2504
|
+
$theme: TextProps['theme'];
|
|
2505
|
+
};
|
|
2506
|
+
|
|
2507
|
+
/**
|
|
2508
|
+
* The Text component.
|
|
2509
|
+
*/
|
|
2510
|
+
declare const Text: Comp<TextProps, HTMLDivElement>;
|
|
2511
|
+
|
|
2441
2512
|
/**
|
|
2442
2513
|
* Component props.
|
|
2443
2514
|
*/
|
|
2444
2515
|
interface DetailedCardSectionItemProps extends ComponentProps<'div'> {
|
|
2445
2516
|
/** Description */
|
|
2446
2517
|
description?: string | ReactElement;
|
|
2518
|
+
/** TextProps to forward to the description. */
|
|
2519
|
+
descriptionProps?: Omit<TextProps, 'ref'>;
|
|
2447
2520
|
/**
|
|
2448
2521
|
* Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />
|
|
2449
2522
|
* Can also be a ReactElement.
|
|
@@ -2498,7 +2571,9 @@ interface DetailedCardHeaderProps extends ComponentProps<'div'> {
|
|
|
2498
2571
|
/** Whether the card is loading or not. */
|
|
2499
2572
|
isLoading?: boolean;
|
|
2500
2573
|
}
|
|
2501
|
-
type StyledDetailedCardHeaderProps = DetailedCardHeaderProps & {
|
|
2574
|
+
type StyledDetailedCardHeaderProps = DetailedCardHeaderProps & {
|
|
2575
|
+
$theme: Theme;
|
|
2576
|
+
};
|
|
2502
2577
|
|
|
2503
2578
|
/**
|
|
2504
2579
|
* The DetailedCardHeader component.
|
|
@@ -2983,75 +3058,6 @@ type StyledLinkButtonProps = Omit<LinkButtonProps, 'isDisabled'> & {
|
|
|
2983
3058
|
*/
|
|
2984
3059
|
declare const LinkButton: Comp<LinkButtonProps, HTMLButtonElement>;
|
|
2985
3060
|
|
|
2986
|
-
/**
|
|
2987
|
-
* Component variant.
|
|
2988
|
-
*/
|
|
2989
|
-
declare const TextVariant: {
|
|
2990
|
-
readonly body: "body";
|
|
2991
|
-
readonly button: "button";
|
|
2992
|
-
readonly caption: "caption";
|
|
2993
|
-
readonly helper: "helper";
|
|
2994
|
-
readonly inherit: "inherit";
|
|
2995
|
-
};
|
|
2996
|
-
type TextVariant = ValueOf<typeof TextVariant>;
|
|
2997
|
-
declare const TextComponent: {
|
|
2998
|
-
readonly p: "p";
|
|
2999
|
-
readonly b: "b";
|
|
3000
|
-
readonly i: "i";
|
|
3001
|
-
readonly u: "u";
|
|
3002
|
-
readonly abbr: "abbr";
|
|
3003
|
-
readonly cite: "cite";
|
|
3004
|
-
readonly del: "del";
|
|
3005
|
-
readonly em: "em";
|
|
3006
|
-
readonly ins: "ins";
|
|
3007
|
-
readonly kbd: "kbd";
|
|
3008
|
-
readonly mark: "mark";
|
|
3009
|
-
readonly s: "s";
|
|
3010
|
-
readonly samp: "samp";
|
|
3011
|
-
readonly sub: "sub";
|
|
3012
|
-
readonly sup: "sup";
|
|
3013
|
-
};
|
|
3014
|
-
type TextComponent = ValueOf<typeof TextComponent>;
|
|
3015
|
-
/**
|
|
3016
|
-
* Component props.
|
|
3017
|
-
*/
|
|
3018
|
-
interface TextProps extends ComponentProps<'span'>, StylingProps {
|
|
3019
|
-
/** Override component. */
|
|
3020
|
-
as?: TextComponent;
|
|
3021
|
-
/** Color variant. Either from color palette or hex or rgb strings. */
|
|
3022
|
-
color?: NotificationsColorPalette | NeutralColorPalette | (string & {});
|
|
3023
|
-
/** Font family. */
|
|
3024
|
-
fontFamily?: FontFamily;
|
|
3025
|
-
/** Font size. */
|
|
3026
|
-
fontSize?: string;
|
|
3027
|
-
/** Font weight. */
|
|
3028
|
-
fontWeight?: string;
|
|
3029
|
-
/** Line height. */
|
|
3030
|
-
lineHeight?: string;
|
|
3031
|
-
/** Whether the text will truncate with a text overflow ellipsis or wrap. */
|
|
3032
|
-
noWrap?: boolean;
|
|
3033
|
-
/** Theme. */
|
|
3034
|
-
theme?: Theme;
|
|
3035
|
-
/** Variant. */
|
|
3036
|
-
variant?: TextVariant;
|
|
3037
|
-
}
|
|
3038
|
-
type StyledTextProps = Omit<TextProps, 'as' | 'color' | 'fontFamily' | 'fontSize' | 'lineHeight' | 'noWrap' | 'variant'> & {
|
|
3039
|
-
$as: TextProps['as'];
|
|
3040
|
-
$color: TextProps['color'];
|
|
3041
|
-
$fontFamily?: TextProps['fontFamily'];
|
|
3042
|
-
$fontSize: TextProps['fontSize'];
|
|
3043
|
-
$fontWeight: TextProps['fontWeight'];
|
|
3044
|
-
$lineHeight: TextProps['lineHeight'];
|
|
3045
|
-
$noWrap: TextProps['noWrap'];
|
|
3046
|
-
$variant: TextProps['variant'];
|
|
3047
|
-
$theme: TextProps['theme'];
|
|
3048
|
-
};
|
|
3049
|
-
|
|
3050
|
-
/**
|
|
3051
|
-
* The Text component.
|
|
3052
|
-
*/
|
|
3053
|
-
declare const Text: Comp<TextProps, HTMLDivElement>;
|
|
3054
|
-
|
|
3055
3061
|
interface NumberFormatOptions {
|
|
3056
3062
|
}
|
|
3057
3063
|
/**
|
package/index.js
CHANGED
|
@@ -2479,6 +2479,15 @@ const StyledText = styled.span`
|
|
|
2479
2479
|
white-space: nowrap;
|
|
2480
2480
|
` : '';
|
|
2481
2481
|
}}
|
|
2482
|
+
|
|
2483
|
+
${_ref5 => {
|
|
2484
|
+
let {
|
|
2485
|
+
wordBreak
|
|
2486
|
+
} = _ref5;
|
|
2487
|
+
return wordBreak ? css`
|
|
2488
|
+
word-break: ${wordBreak};
|
|
2489
|
+
` : '';
|
|
2490
|
+
}}
|
|
2482
2491
|
`;
|
|
2483
2492
|
|
|
2484
2493
|
const _excluded$L = ["as", "children", "className", "color", "fontFamily", "fontSize", "fontWeight", "lineHeight", "noWrap", "theme", "variant"];
|
|
@@ -6722,7 +6731,12 @@ const StyledDetailedCardHeader = styled.div`
|
|
|
6722
6731
|
margin: 8px 0;
|
|
6723
6732
|
|
|
6724
6733
|
.redsift-detailed-card-header__header {
|
|
6725
|
-
color: var(--redsift-color-neutral
|
|
6734
|
+
color: var(--redsift-color-neutral-${_ref => {
|
|
6735
|
+
let {
|
|
6736
|
+
$theme
|
|
6737
|
+
} = _ref;
|
|
6738
|
+
return $theme === Theme.light ? 'x-dark-grey' : 'white';
|
|
6739
|
+
}});
|
|
6726
6740
|
font-family: var(--redsift-typography-font-family-poppins);
|
|
6727
6741
|
font-size: 32px;
|
|
6728
6742
|
font-weight: 500;
|
|
@@ -6748,9 +6762,11 @@ const DetailedCardHeader = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
6748
6762
|
isLoading
|
|
6749
6763
|
} = props,
|
|
6750
6764
|
forwardedProps = _objectWithoutProperties(props, _excluded$i);
|
|
6765
|
+
const theme = useTheme();
|
|
6751
6766
|
return /*#__PURE__*/React__default.createElement(StyledDetailedCardHeader, _extends$1({}, forwardedProps, {
|
|
6752
6767
|
className: classNames(DetailedCardHeader.className, className),
|
|
6753
|
-
ref: ref
|
|
6768
|
+
ref: ref,
|
|
6769
|
+
$theme: theme
|
|
6754
6770
|
}), header ? /*#__PURE__*/React__default.createElement(Skeleton.Text, {
|
|
6755
6771
|
variant: "h2",
|
|
6756
6772
|
isLoaded: !isLoading,
|
|
@@ -7001,7 +7017,7 @@ const StyledDetailedCardSectionItem = styled.div`
|
|
|
7001
7017
|
}
|
|
7002
7018
|
`;
|
|
7003
7019
|
|
|
7004
|
-
const _excluded$g = ["children", "className", "description", "icon", "iconProps", "isLoading", "pill", "pillProps", "shield"];
|
|
7020
|
+
const _excluded$g = ["children", "className", "description", "descriptionProps", "icon", "iconProps", "isLoading", "pill", "pillProps", "shield"];
|
|
7005
7021
|
const COMPONENT_NAME$h = 'DetailedCardSectionItem';
|
|
7006
7022
|
const CLASSNAME$h = 'redsift-detailed-card-section-item';
|
|
7007
7023
|
const DEFAULT_PROPS$h = {};
|
|
@@ -7014,6 +7030,7 @@ const DetailedCardSectionItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7014
7030
|
children,
|
|
7015
7031
|
className,
|
|
7016
7032
|
description,
|
|
7033
|
+
descriptionProps,
|
|
7017
7034
|
icon,
|
|
7018
7035
|
iconProps,
|
|
7019
7036
|
isLoading,
|
|
@@ -7047,7 +7064,7 @@ const DetailedCardSectionItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7047
7064
|
isLoaded: !isLoading
|
|
7048
7065
|
}, pill && /*#__PURE__*/React__default.createElement(Pill, _extends$1({
|
|
7049
7066
|
className: `${DetailedCardSectionItem.className}-header__pill`
|
|
7050
|
-
}, pillProps), pill), typeof description === 'string' ? /*#__PURE__*/React__default.createElement(Text,
|
|
7067
|
+
}, pillProps), pill), typeof description === 'string' ? /*#__PURE__*/React__default.createElement(Text, descriptionProps, description) : description)) : null), children);
|
|
7051
7068
|
});
|
|
7052
7069
|
DetailedCardSectionItem.className = CLASSNAME$h;
|
|
7053
7070
|
DetailedCardSectionItem.defaultProps = DEFAULT_PROPS$h;
|
|
@@ -11062,7 +11079,7 @@ const BaseDetailedCard = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
11062
11079
|
const [[header], content] = partitionComponents(React__default.Children.toArray(children), [isComponent('DetailedCardHeader')]);
|
|
11063
11080
|
return /*#__PURE__*/React__default.createElement(ThemeProvider, {
|
|
11064
11081
|
value: {
|
|
11065
|
-
theme
|
|
11082
|
+
theme
|
|
11066
11083
|
}
|
|
11067
11084
|
}, /*#__PURE__*/React__default.createElement(StyledDetailedCard, _extends$1({}, forwardedProps, {
|
|
11068
11085
|
className: classNames(BaseDetailedCard.className, className),
|