@redsift/design-system 11.6.0-muiv5-alpha.5 → 11.6.0-muiv5-alpha.7
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/_internal/Alert2.js +182 -39
- package/_internal/AppBar.js +240 -29
- package/_internal/AppContainer.js +132 -86
- package/_internal/AppContent.js +84 -17
- package/_internal/Badge2.js +137 -4
- package/_internal/BreadcrumbItem.js +85 -3
- package/_internal/Breadcrumbs2.js +86 -21
- package/_internal/Button2.js +81 -20
- package/_internal/ButtonGroup.js +165 -25
- package/_internal/ButtonLink.js +74 -18
- package/_internal/Card2.js +151 -29
- package/_internal/CardActions.js +38 -3
- package/_internal/CardBody.js +36 -3
- package/_internal/CardHeader.js +77 -3
- package/_internal/Checkbox2.js +234 -58
- package/_internal/CheckboxGroup.js +182 -4
- package/_internal/ConditionalWrapper.js +11 -12
- package/_internal/DetailedCard.js +6912 -48
- package/_internal/DetailedCardCollapsibleSectionItems.js +58 -3
- package/_internal/DetailedCardHeader.js +61 -3
- package/_internal/DetailedCardSection.js +166 -3
- package/_internal/DetailedCardSectionItem.js +88 -3
- package/_internal/Flexbox2.js +85 -22
- package/_internal/Grid2.js +87 -24
- package/_internal/GridItem.js +34 -3
- package/_internal/Heading2.js +107 -3
- package/_internal/Icon2.js +206 -5
- package/_internal/IconButton.js +71 -3
- package/_internal/IconButtonLink.js +65 -18
- package/_internal/Item2.js +390 -73
- package/_internal/Link2.js +56 -15
- package/_internal/LinkButton.js +56 -13
- package/_internal/Number2.js +103 -61
- package/_internal/NumberField.js +3959 -65
- package/_internal/Pill2.js +400 -4
- package/_internal/ProgressBar.js +61 -18
- package/_internal/Radio2.js +227 -56
- package/_internal/RadioGroup.js +170 -4
- package/_internal/Shield2.js +220 -4
- package/_internal/SideNavigationMenu.js +586 -4
- package/_internal/SideNavigationMenuItem.js +299 -4
- package/_internal/Skeleton2.js +36 -9
- package/_internal/SkeletonCircle.js +52 -3
- package/_internal/SkeletonText.js +71 -3
- package/_internal/Spinner2.js +319 -29
- package/_internal/Switch2.js +310 -56
- package/_internal/SwitchGroup.js +182 -4
- package/_internal/Text2.js +45 -3
- package/_internal/TextArea.js +430 -20
- package/_internal/TextField.js +463 -19
- package/_internal/alert.js +2 -5
- package/_internal/app-bar.js +2 -8
- package/_internal/app-container.js +3 -9
- package/_internal/app-content.js +2 -5
- package/_internal/app-side-panel.js +3 -11
- package/_internal/badge.js +2 -6
- package/_internal/breadcrumb-item.js +1 -4
- package/_internal/breadcrumbs.js +2 -6
- package/_internal/button-group.js +2 -5
- package/_internal/button-link.js +2 -8
- package/_internal/button.js +3 -8
- package/_internal/card-actions.js +1 -4
- package/_internal/card-body.js +1 -4
- package/_internal/card-header.js +1 -8
- package/_internal/card.js +2 -11
- package/_internal/checkbox-group.js +2 -6
- package/_internal/checkbox.js +2 -6
- package/_internal/colors.js +87 -91
- package/_internal/conditional-wrapper.js +2 -2
- package/_internal/detailed-card-collapsible-section-items.js +1 -3
- package/_internal/detailed-card-header.js +1 -7
- package/_internal/detailed-card-section-item.js +1 -10
- package/_internal/detailed-card-section.js +1 -6
- package/_internal/detailed-card.js +2 -16
- package/_internal/flexbox.js +2 -5
- package/_internal/focus-within-group.js +3 -3
- package/_internal/fonts.js +4 -6
- package/_internal/gradient-border.js +35 -16
- package/_internal/grid-item.js +1 -4
- package/_internal/grid.js +2 -6
- package/_internal/heading.js +2 -6
- package/_internal/icon-button-link.js +2 -8
- package/_internal/icon-button.js +2 -6
- package/_internal/icon.js +2 -6
- package/_internal/item.js +2 -8
- package/_internal/link-button.js +2 -8
- package/_internal/link.js +3 -8
- package/_internal/listbox.js +3 -6
- package/_internal/number-field.js +2 -9
- package/_internal/number.js +2 -7
- package/_internal/pill.js +2 -6
- package/_internal/progress-bar.js +2 -5
- package/_internal/radio-group.js +2 -6
- package/_internal/radio.js +2 -6
- package/_internal/shared.js +2 -5
- package/_internal/shield.js +2 -6
- package/_internal/side-navigation-menu-bar.js +3 -9
- package/_internal/side-navigation-menu-item.js +2 -8
- package/_internal/side-navigation-menu.js +2 -8
- package/_internal/skeleton-circle.js +1 -6
- package/_internal/skeleton-text.js +2 -6
- package/_internal/skeleton.js +1 -7
- package/_internal/spinner.js +2 -5
- package/_internal/styles.js +235 -17
- package/_internal/styles2.js +44 -280
- package/_internal/switch-group.js +2 -6
- package/_internal/switch.js +2 -6
- package/_internal/text-area.js +2 -9
- package/_internal/text-field.js +2 -10
- package/_internal/text.js +2 -6
- package/_internal/theme.js +1 -3
- package/_internal/types.js +7 -31
- package/_internal/types2.js +18 -29
- package/_internal/types3.js +15 -18
- package/_internal/useAppSidePanel.js +331 -6
- package/_internal/useFocusOnList.js +502 -44
- package/_internal/useListboxItem.js +120 -23
- package/_internal/useSideNavigationMenuBar.js +371 -7
- package/_internal/useTheme.js +10 -8
- package/index.d.ts +4667 -0
- package/index.js +523 -1674
- package/package.json +2 -2
- package/_internal/SideNavigationMenuBar.js +0 -9
- package/_internal/helpers.js +0 -23
- package/_internal/types10.js +0 -20
- package/_internal/types11.js +0 -27
- package/_internal/types12.js +0 -35
- package/_internal/types13.js +0 -143
- package/_internal/types14.js +0 -11
- package/_internal/types15.js +0 -62
- package/_internal/types16.js +0 -56
- package/_internal/types17.js +0 -57
- package/_internal/types18.js +0 -40
- package/_internal/types19.js +0 -101
- package/_internal/types20.js +0 -47
- package/_internal/types21.js +0 -68
- package/_internal/types22.js +0 -52
- package/_internal/types23.js +0 -174
- package/_internal/types24.js +0 -18
- package/_internal/types25.js +0 -12
- package/_internal/types26.js +0 -36
- package/_internal/types27.js +0 -72
- package/_internal/types28.js +0 -73
- package/_internal/types29.js +0 -99
- package/_internal/types4.js +0 -67
- package/_internal/types5.js +0 -11
- package/_internal/types6.js +0 -11
- package/_internal/types7.js +0 -28
- package/_internal/types8.js +0 -72
- package/_internal/types9.js +0 -16
|
@@ -1,9 +1,64 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { b as _objectWithoutProperties, c as _extends } from './_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React__default, { forwardRef } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import styled, { css } from 'styled-components';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Component style.
|
|
8
|
+
*/
|
|
9
|
+
const StyledDetailedCardCollapsibleSectionItems = styled.div`
|
|
10
|
+
${_ref => {
|
|
11
|
+
let {
|
|
12
|
+
$hideBackground
|
|
13
|
+
} = _ref;
|
|
14
|
+
return $hideBackground ? css`
|
|
15
|
+
background: none;
|
|
16
|
+
` : css`
|
|
17
|
+
background-color: var(--redsift-color-neutral-x-light-grey);
|
|
18
|
+
margin: 8px -16px;
|
|
19
|
+
padding: 8px 16px;
|
|
20
|
+
`;
|
|
21
|
+
}}
|
|
22
|
+
|
|
23
|
+
.redsift-detailed-card-collapsible-section-items__caption {
|
|
24
|
+
color: var(--redsift-color-neutral-x-dark-grey);
|
|
25
|
+
display: flex;
|
|
26
|
+
font-family: var(--redsift-typography-font-family-poppins);
|
|
27
|
+
font-size: 12px;
|
|
28
|
+
font-weight: 300;
|
|
29
|
+
justify-content: flex-end;
|
|
30
|
+
line-height: 14px;
|
|
31
|
+
margin: 8px 0px;
|
|
32
|
+
padding-top: 8px;
|
|
33
|
+
border-top: 1px solid var(--redsift-color-neutral-mid-grey);
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
const _excluded = ["caption", "children", "className", "hideBackground"];
|
|
38
|
+
const COMPONENT_NAME = 'DetailedCardCollapsibleSectionItems';
|
|
39
|
+
const CLASSNAME = 'redsift-detailed-card-collapsible-section-items';
|
|
3
40
|
|
|
4
41
|
/**
|
|
5
42
|
* The DetailedCardCollapsibleSectionItems Section component.
|
|
6
43
|
*/
|
|
7
|
-
|
|
44
|
+
const DetailedCardCollapsibleSectionItems = /*#__PURE__*/forwardRef((props, ref) => {
|
|
45
|
+
const {
|
|
46
|
+
caption,
|
|
47
|
+
children,
|
|
48
|
+
className,
|
|
49
|
+
hideBackground
|
|
50
|
+
} = props,
|
|
51
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
52
|
+
return /*#__PURE__*/React__default.createElement(StyledDetailedCardCollapsibleSectionItems, _extends({}, forwardedProps, {
|
|
53
|
+
className: classNames(DetailedCardCollapsibleSectionItems.className, className),
|
|
54
|
+
ref: ref,
|
|
55
|
+
$hideBackground: hideBackground
|
|
56
|
+
}), children, caption ? /*#__PURE__*/React__default.createElement("div", {
|
|
57
|
+
className: `${DetailedCardCollapsibleSectionItems.className}__caption`
|
|
58
|
+
}, caption) : null);
|
|
59
|
+
});
|
|
60
|
+
DetailedCardCollapsibleSectionItems.className = CLASSNAME;
|
|
61
|
+
DetailedCardCollapsibleSectionItems.displayName = COMPONENT_NAME;
|
|
8
62
|
|
|
9
63
|
export { DetailedCardCollapsibleSectionItems as D };
|
|
64
|
+
//# sourceMappingURL=DetailedCardCollapsibleSectionItems.js.map
|
|
@@ -1,9 +1,67 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { b as _objectWithoutProperties, c as _extends } from './_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React__default, { forwardRef } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import { T as Theme } from './colors.js';
|
|
6
|
+
import { u as useTheme } from './useTheme.js';
|
|
7
|
+
import { S as Skeleton } from './Skeleton2.js';
|
|
8
|
+
import { H as Heading } from './Heading2.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Component style.
|
|
12
|
+
*/
|
|
13
|
+
const StyledDetailedCardHeader = styled.div`
|
|
14
|
+
margin: 8px 0;
|
|
15
|
+
|
|
16
|
+
.redsift-detailed-card-header__header {
|
|
17
|
+
color: var(--redsift-color-neutral-${_ref => {
|
|
18
|
+
let {
|
|
19
|
+
$theme
|
|
20
|
+
} = _ref;
|
|
21
|
+
return $theme === Theme.light ? 'x-dark-grey' : 'white';
|
|
22
|
+
}});
|
|
23
|
+
font-family: var(--redsift-typography-font-family-poppins);
|
|
24
|
+
font-size: 32px;
|
|
25
|
+
font-weight: 500;
|
|
26
|
+
line-height: 32px;
|
|
27
|
+
margin-bottom: 16px;
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
|
|
31
|
+
const _excluded = ["children", "className", "header", "headingProps", "isLoading"];
|
|
32
|
+
const COMPONENT_NAME = 'DetailedCardHeader';
|
|
33
|
+
const CLASSNAME = 'redsift-detailed-card-header';
|
|
3
34
|
|
|
4
35
|
/**
|
|
5
36
|
* The DetailedCardHeader component.
|
|
6
37
|
*/
|
|
7
|
-
|
|
38
|
+
const DetailedCardHeader = /*#__PURE__*/forwardRef((props, ref) => {
|
|
39
|
+
const {
|
|
40
|
+
children,
|
|
41
|
+
className,
|
|
42
|
+
header,
|
|
43
|
+
headingProps,
|
|
44
|
+
isLoading
|
|
45
|
+
} = props,
|
|
46
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
47
|
+
const theme = useTheme();
|
|
48
|
+
return /*#__PURE__*/React__default.createElement(StyledDetailedCardHeader, _extends({}, forwardedProps, {
|
|
49
|
+
className: classNames(DetailedCardHeader.className, className),
|
|
50
|
+
ref: ref,
|
|
51
|
+
$theme: theme
|
|
52
|
+
}), header ? /*#__PURE__*/React__default.createElement(Skeleton.Text, {
|
|
53
|
+
variant: "h2",
|
|
54
|
+
isLoaded: !isLoading,
|
|
55
|
+
height: "32px",
|
|
56
|
+
marginBottom: "16px"
|
|
57
|
+
}, /*#__PURE__*/React__default.createElement(Heading, _extends({
|
|
58
|
+
as: "h2",
|
|
59
|
+
className: `${DetailedCardHeader.className}__header`,
|
|
60
|
+
variant: "h2"
|
|
61
|
+
}, headingProps), header)) : null, children);
|
|
62
|
+
});
|
|
63
|
+
DetailedCardHeader.className = CLASSNAME;
|
|
64
|
+
DetailedCardHeader.displayName = COMPONENT_NAME;
|
|
8
65
|
|
|
9
66
|
export { DetailedCardHeader as D };
|
|
67
|
+
//# sourceMappingURL=DetailedCardHeader.js.map
|
|
@@ -1,9 +1,172 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { b as _objectWithoutProperties, c as _extends } from './_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React__default, { forwardRef, useState } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { mdiChevronDown, mdiChevronUp } from '@redsift/icons';
|
|
5
|
+
import { i as isComponent } from './isComponent.js';
|
|
6
|
+
import styled, { css } from 'styled-components';
|
|
7
|
+
import { N as NotificationsColorPalette, e as ProductColorPalette } from './colors.js';
|
|
8
|
+
import { u as useMessageFormatter } from './useMessageFormatter.js';
|
|
9
|
+
import { D as DetailedCardCollapsibleSectionItems } from './DetailedCardCollapsibleSectionItems.js';
|
|
10
|
+
import { F as Flexbox } from './Flexbox2.js';
|
|
11
|
+
import { S as Skeleton } from './Skeleton2.js';
|
|
12
|
+
import { T as Text } from './Text2.js';
|
|
13
|
+
import { a as Badge, B as BadgeVariant } from './Badge2.js';
|
|
14
|
+
import { I as IconButton } from './IconButton.js';
|
|
15
|
+
|
|
16
|
+
var collapse$1 = "Collapse details";
|
|
17
|
+
var expand$1 = "Expand details";
|
|
18
|
+
var enUS = {
|
|
19
|
+
collapse: collapse$1,
|
|
20
|
+
expand: expand$1
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
var collapse = "Réduire les détails";
|
|
24
|
+
var expand = "Développer les détails";
|
|
25
|
+
var frFR = {
|
|
26
|
+
collapse: collapse,
|
|
27
|
+
expand: expand
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var intlMessages = {
|
|
31
|
+
'en-US': enUS,
|
|
32
|
+
'fr-FR': frFR
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Component style.
|
|
37
|
+
*/
|
|
38
|
+
const StyledDetailedCardSection = styled.div`
|
|
39
|
+
margin: 8px 0;
|
|
40
|
+
|
|
41
|
+
.redsift-detailed-card-section__header {
|
|
42
|
+
${_ref => {
|
|
43
|
+
let {
|
|
44
|
+
$color
|
|
45
|
+
} = _ref;
|
|
46
|
+
return $color && Object.keys(NotificationsColorPalette).indexOf($color) !== -1 ? css`
|
|
47
|
+
border-bottom: 1px solid var(--redsift-color-notifications-${$color}-primary);
|
|
48
|
+
` : $color && Object.keys(ProductColorPalette).indexOf($color) !== -1 ? css`
|
|
49
|
+
border-bottom: 1px solid var(--redsift-color-product-${$color});
|
|
50
|
+
` : css`
|
|
51
|
+
border-bottom: 1px solid ${$color || css`var(--redsift-color-neutral-mid-grey)`};
|
|
52
|
+
`;
|
|
53
|
+
}}
|
|
54
|
+
margin-bottom: 8px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.redsift-detailed-card-section-header__title {
|
|
58
|
+
font-size: 18px;
|
|
59
|
+
font-weight: 500;
|
|
60
|
+
lineheight: 22px;
|
|
61
|
+
padding: 6px 0px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.redsift-detailed-card-section-header__collapse-button {
|
|
65
|
+
color: var(--redsift-color-neutral-x-dark-grey);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.redsift-detailed-card-collapsible-section-items {
|
|
69
|
+
visibility: ${_ref2 => {
|
|
70
|
+
let {
|
|
71
|
+
$isCollapsed
|
|
72
|
+
} = _ref2;
|
|
73
|
+
return !$isCollapsed ? 'visible' : 'hidden';
|
|
74
|
+
}};
|
|
75
|
+
overflow: ${_ref3 => {
|
|
76
|
+
let {
|
|
77
|
+
$isCollapsed
|
|
78
|
+
} = _ref3;
|
|
79
|
+
return !$isCollapsed ? 'visible' : 'hidden';
|
|
80
|
+
}};
|
|
81
|
+
height: ${_ref4 => {
|
|
82
|
+
let {
|
|
83
|
+
$isCollapsed
|
|
84
|
+
} = _ref4;
|
|
85
|
+
return !$isCollapsed ? 'auto' : '0px';
|
|
86
|
+
}};
|
|
87
|
+
${_ref5 => {
|
|
88
|
+
let {
|
|
89
|
+
$isCollapsed
|
|
90
|
+
} = _ref5;
|
|
91
|
+
return $isCollapsed ? css`
|
|
92
|
+
margin: unset;
|
|
93
|
+
padding: unset;
|
|
94
|
+
` : '';
|
|
95
|
+
}};
|
|
96
|
+
}
|
|
97
|
+
`;
|
|
98
|
+
|
|
99
|
+
const _excluded = ["badge", "color", "children", "className", "header", "isCollapsed", "isCollapsible", "isLoading"];
|
|
100
|
+
const COMPONENT_NAME = 'DetailedCardSection';
|
|
101
|
+
const CLASSNAME = 'redsift-detailed-card-section';
|
|
102
|
+
const hasCollapsibleChildren = children => {
|
|
103
|
+
let hasCollapsible = false;
|
|
104
|
+
React__default.Children.map(children, child => {
|
|
105
|
+
if (isComponent(DetailedCardCollapsibleSectionItems)(child)) {
|
|
106
|
+
hasCollapsible = true;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
return hasCollapsible;
|
|
110
|
+
};
|
|
3
111
|
|
|
4
112
|
/**
|
|
5
113
|
* The DetailedCardSection component.
|
|
6
114
|
*/
|
|
7
|
-
|
|
115
|
+
const DetailedCardSection = /*#__PURE__*/forwardRef((props, ref) => {
|
|
116
|
+
const {
|
|
117
|
+
badge,
|
|
118
|
+
color,
|
|
119
|
+
children,
|
|
120
|
+
className,
|
|
121
|
+
header,
|
|
122
|
+
isCollapsed: propsIsCollapsed,
|
|
123
|
+
isCollapsible: propsIsCollapsible = true,
|
|
124
|
+
isLoading
|
|
125
|
+
} = props,
|
|
126
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
127
|
+
const format = useMessageFormatter(intlMessages);
|
|
128
|
+
const isCollapsible = propsIsCollapsible && hasCollapsibleChildren(children);
|
|
129
|
+
const [isCollapsed, setIsCollapsed] = useState(Boolean(propsIsCollapsed));
|
|
130
|
+
return /*#__PURE__*/React__default.createElement(StyledDetailedCardSection, _extends({}, forwardedProps, {
|
|
131
|
+
className: classNames(DetailedCardSection.className, className),
|
|
132
|
+
ref: ref,
|
|
133
|
+
$color: color,
|
|
134
|
+
$isCollapsed: isCollapsed
|
|
135
|
+
}), /*#__PURE__*/React__default.createElement(Flexbox, {
|
|
136
|
+
justifyContent: "space-between",
|
|
137
|
+
className: `${DetailedCardSection.className}__header`
|
|
138
|
+
}, header ? /*#__PURE__*/React__default.createElement(Skeleton.Text, {
|
|
139
|
+
variant: "body",
|
|
140
|
+
isLoaded: !isLoading,
|
|
141
|
+
fontSize: "18px",
|
|
142
|
+
lineHeight: "22px",
|
|
143
|
+
marginTop: "6px",
|
|
144
|
+
marginBottom: "12px"
|
|
145
|
+
}, /*#__PURE__*/React__default.createElement(Flexbox, {
|
|
146
|
+
alignItems: "center",
|
|
147
|
+
gap: "8px"
|
|
148
|
+
}, typeof header === 'string' ? /*#__PURE__*/React__default.createElement(Text, {
|
|
149
|
+
className: `${DetailedCardSection.className}-header__title`,
|
|
150
|
+
color: "black",
|
|
151
|
+
fontSize: "18px",
|
|
152
|
+
lineHeight: "22px"
|
|
153
|
+
}, header) : /*#__PURE__*/React__default.createElement("div", {
|
|
154
|
+
className: `${DetailedCardSection.className}-header__title`
|
|
155
|
+
}, header), badge ? /*#__PURE__*/React__default.createElement(Badge, _extends({
|
|
156
|
+
variant: BadgeVariant.standard
|
|
157
|
+
}, badge)) : null)) : null, isCollapsible && !isLoading ? /*#__PURE__*/React__default.createElement(IconButton, {
|
|
158
|
+
marginLeft: "auto",
|
|
159
|
+
"aria-label": format(isCollapsed ? 'expand' : 'collapse'),
|
|
160
|
+
className: `${DetailedCardSection.className}-header__collapse-button`,
|
|
161
|
+
color: "grey",
|
|
162
|
+
icon: isCollapsed ? mdiChevronDown : mdiChevronUp,
|
|
163
|
+
onClick: () => {
|
|
164
|
+
setIsCollapsed(isCollapsed => !isCollapsed);
|
|
165
|
+
}
|
|
166
|
+
}) : null), children);
|
|
167
|
+
});
|
|
168
|
+
DetailedCardSection.className = CLASSNAME;
|
|
169
|
+
DetailedCardSection.displayName = COMPONENT_NAME;
|
|
8
170
|
|
|
9
171
|
export { DetailedCardSection as D };
|
|
172
|
+
//# sourceMappingURL=DetailedCardSection.js.map
|
|
@@ -1,9 +1,94 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { b as _objectWithoutProperties, c as _extends } from './_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React__default, { forwardRef } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import { S as Shield } from './Shield2.js';
|
|
6
|
+
import { a as Pill } from './Pill2.js';
|
|
7
|
+
import { F as Flexbox } from './Flexbox2.js';
|
|
8
|
+
import { S as Skeleton } from './Skeleton2.js';
|
|
9
|
+
import { a as Icon } from './Icon2.js';
|
|
10
|
+
import { T as Text } from './Text2.js';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Component style.
|
|
14
|
+
*/
|
|
15
|
+
const StyledDetailedCardSectionItem = styled.div`
|
|
16
|
+
padding: 8px 0;
|
|
17
|
+
|
|
18
|
+
.redsift-detailed-card-section-item-header__shield {
|
|
19
|
+
align-items: center;
|
|
20
|
+
display: flex;
|
|
21
|
+
height: 28px;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
padding: 0 4px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.redsift-detailed-card-section-item-header__icon {
|
|
27
|
+
height: 28px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.redsift-detailed-card-section-item-header__pill {
|
|
31
|
+
display: inline-block;
|
|
32
|
+
margin-right: 8px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.redsift-detailed-card-section-item-header__description {
|
|
36
|
+
line-height: 28px;
|
|
37
|
+
display: inline-flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
41
|
+
|
|
42
|
+
const _excluded = ["children", "className", "description", "descriptionProps", "icon", "iconProps", "isLoading", "pill", "pillProps", "shield"];
|
|
43
|
+
const COMPONENT_NAME = 'DetailedCardSectionItem';
|
|
44
|
+
const CLASSNAME = 'redsift-detailed-card-section-item';
|
|
3
45
|
|
|
4
46
|
/**
|
|
5
47
|
* The DetailedCardSectionItems component.
|
|
6
48
|
*/
|
|
7
|
-
|
|
49
|
+
const DetailedCardSectionItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
50
|
+
const {
|
|
51
|
+
children,
|
|
52
|
+
className,
|
|
53
|
+
description,
|
|
54
|
+
descriptionProps,
|
|
55
|
+
icon,
|
|
56
|
+
iconProps,
|
|
57
|
+
isLoading,
|
|
58
|
+
pill,
|
|
59
|
+
pillProps,
|
|
60
|
+
shield
|
|
61
|
+
} = props,
|
|
62
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
63
|
+
return /*#__PURE__*/React__default.createElement(StyledDetailedCardSectionItem, _extends({}, forwardedProps, {
|
|
64
|
+
className: classNames(DetailedCardSectionItem.className, className),
|
|
65
|
+
ref: ref
|
|
66
|
+
}), /*#__PURE__*/React__default.createElement(Flexbox, {
|
|
67
|
+
alignItems: "flex-start",
|
|
68
|
+
className: `${DetailedCardSectionItem.className}__header`
|
|
69
|
+
}, shield ? /*#__PURE__*/React__default.createElement(Skeleton, {
|
|
70
|
+
isLoaded: !isLoading
|
|
71
|
+
}, /*#__PURE__*/React__default.createElement(Shield, {
|
|
72
|
+
variant: shield,
|
|
73
|
+
className: `${DetailedCardSectionItem.className}-header__shield`
|
|
74
|
+
})) : icon ? /*#__PURE__*/React__default.createElement(Skeleton, {
|
|
75
|
+
isLoaded: !isLoading
|
|
76
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
77
|
+
className: `${DetailedCardSectionItem.className}-header__icon`
|
|
78
|
+
}, /*#__PURE__*/React__default.createElement(Icon, _extends({
|
|
79
|
+
icon: icon
|
|
80
|
+
}, iconProps, {
|
|
81
|
+
size: "large"
|
|
82
|
+
})))) : null, description || pill ? /*#__PURE__*/React__default.createElement("div", {
|
|
83
|
+
className: `${DetailedCardSectionItem.className}-header__description`
|
|
84
|
+
}, /*#__PURE__*/React__default.createElement(Skeleton, {
|
|
85
|
+
isLoaded: !isLoading
|
|
86
|
+
}, pill && /*#__PURE__*/React__default.createElement(Pill, _extends({
|
|
87
|
+
className: `${DetailedCardSectionItem.className}-header__pill`
|
|
88
|
+
}, pillProps), pill), typeof description === 'string' ? /*#__PURE__*/React__default.createElement(Text, descriptionProps, description) : description)) : null), children);
|
|
89
|
+
});
|
|
90
|
+
DetailedCardSectionItem.className = CLASSNAME;
|
|
91
|
+
DetailedCardSectionItem.displayName = COMPONENT_NAME;
|
|
8
92
|
|
|
9
93
|
export { DetailedCardSectionItem as D };
|
|
94
|
+
//# sourceMappingURL=DetailedCardSectionItem.js.map
|
package/_internal/Flexbox2.js
CHANGED
|
@@ -1,30 +1,93 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { b as _objectWithoutProperties, c as _extends } from './_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React__default, { forwardRef } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import styled, { css } from 'styled-components';
|
|
5
|
+
import { i as baseStyling, c as baseInternalSpacing, f as baseBorder, g as baseFlexbox } from './styles4.js';
|
|
6
|
+
import { u as useTheme, a as ThemeProvider } from './useTheme.js';
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
|
-
* Component
|
|
9
|
+
* Component style.
|
|
8
10
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
11
|
+
const StyledFlexbox = styled.div`
|
|
12
|
+
display: ${_ref => {
|
|
13
|
+
let {
|
|
14
|
+
inline
|
|
15
|
+
} = _ref;
|
|
16
|
+
return inline ? 'inline-flex' : 'flex';
|
|
17
|
+
}};
|
|
18
|
+
|
|
19
|
+
${baseStyling}
|
|
20
|
+
${baseInternalSpacing}
|
|
21
|
+
${baseBorder}
|
|
22
|
+
${baseFlexbox}
|
|
23
|
+
|
|
24
|
+
${_ref2 => {
|
|
25
|
+
let {
|
|
26
|
+
$divider
|
|
27
|
+
} = _ref2;
|
|
28
|
+
return $divider ? css`
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
> *:not(:empty) {
|
|
31
|
+
position: relative;
|
|
32
|
+
|
|
33
|
+
::before {
|
|
34
|
+
content: '';
|
|
35
|
+
position: absolute;
|
|
36
|
+
background-color: var(--redsift-color-neutral-light-grey);
|
|
37
|
+
inline-size: 1px;
|
|
38
|
+
block-size: 100%;
|
|
39
|
+
inset-inline-start: calc(${Math.max(1, $divider.colGap / 2)}px * -1);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
::after {
|
|
43
|
+
content: '';
|
|
44
|
+
position: absolute;
|
|
45
|
+
background-color: var(--redsift-color-neutral-light-grey);
|
|
46
|
+
inline-size: 200vw;
|
|
47
|
+
block-size: 1px;
|
|
48
|
+
inset-inline-start: -100vw;
|
|
49
|
+
inset-block-start: calc(${Math.max(1, $divider.rowGap / 2)}px * -1);
|
|
50
|
+
z-index: 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
` : '';
|
|
54
|
+
}}
|
|
55
|
+
`;
|
|
56
|
+
|
|
57
|
+
const _excluded = ["as", "children", "className", "divider", "gap", "theme"];
|
|
58
|
+
const COMPONENT_NAME = 'Flexbox';
|
|
59
|
+
const CLASSNAME = 'redsift-flex-box';
|
|
24
60
|
|
|
25
61
|
/**
|
|
26
62
|
* The Flexbox component.
|
|
27
63
|
*/
|
|
28
|
-
|
|
64
|
+
const Flexbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
65
|
+
const {
|
|
66
|
+
as,
|
|
67
|
+
children,
|
|
68
|
+
className,
|
|
69
|
+
divider,
|
|
70
|
+
gap = '16px',
|
|
71
|
+
theme: propsTheme
|
|
72
|
+
} = props,
|
|
73
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
74
|
+
const theme = useTheme(propsTheme);
|
|
75
|
+
return /*#__PURE__*/React__default.createElement(ThemeProvider, {
|
|
76
|
+
value: {
|
|
77
|
+
theme
|
|
78
|
+
}
|
|
79
|
+
}, /*#__PURE__*/React__default.createElement(StyledFlexbox, _extends({
|
|
80
|
+
as: as
|
|
81
|
+
}, forwardedProps, {
|
|
82
|
+
gap: divider ? `${divider.rowGap}px ${divider.colGap}px` : gap,
|
|
83
|
+
className: classNames(Flexbox.className, className),
|
|
84
|
+
ref: ref,
|
|
85
|
+
$divider: divider,
|
|
86
|
+
$theme: theme
|
|
87
|
+
}), children));
|
|
88
|
+
});
|
|
89
|
+
Flexbox.className = CLASSNAME;
|
|
90
|
+
Flexbox.displayName = COMPONENT_NAME;
|
|
29
91
|
|
|
30
|
-
export {
|
|
92
|
+
export { Flexbox as F };
|
|
93
|
+
//# sourceMappingURL=Flexbox2.js.map
|
package/_internal/Grid2.js
CHANGED
|
@@ -1,32 +1,95 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { b as _objectWithoutProperties, c as _extends } from './_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React__default, { forwardRef } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import styled, { css } from 'styled-components';
|
|
5
|
+
import { i as baseStyling, c as baseInternalSpacing, h as baseGrid, f as baseBorder } from './styles4.js';
|
|
6
|
+
import { G as GridItem } from './GridItem.js';
|
|
7
|
+
import { u as useTheme, a as ThemeProvider } from './useTheme.js';
|
|
6
8
|
|
|
7
9
|
/**
|
|
8
|
-
* Component
|
|
10
|
+
* Component style.
|
|
9
11
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
12
|
+
const StyledGrid = styled.div`
|
|
13
|
+
display: ${_ref => {
|
|
14
|
+
let {
|
|
15
|
+
inline
|
|
16
|
+
} = _ref;
|
|
17
|
+
return inline ? 'inline-grid' : 'grid';
|
|
18
|
+
}};
|
|
19
|
+
flex: 1;
|
|
20
|
+
|
|
21
|
+
${baseStyling}
|
|
22
|
+
${baseInternalSpacing}
|
|
23
|
+
${baseGrid}
|
|
24
|
+
${baseBorder}
|
|
25
|
+
|
|
26
|
+
${_ref2 => {
|
|
27
|
+
let {
|
|
28
|
+
$divider
|
|
29
|
+
} = _ref2;
|
|
30
|
+
return $divider ? css`
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
> .redsift-grid-item:not(:empty) {
|
|
33
|
+
position: relative;
|
|
34
|
+
|
|
35
|
+
::before {
|
|
36
|
+
content: '';
|
|
37
|
+
position: absolute;
|
|
38
|
+
background-color: var(--redsift-color-neutral-light-grey);
|
|
39
|
+
inline-size: 1px;
|
|
40
|
+
block-size: 100%;
|
|
41
|
+
inset-inline-start: calc(${Math.max(1, $divider.colGap / 2)}px * -1);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
::after {
|
|
45
|
+
content: '';
|
|
46
|
+
position: absolute;
|
|
47
|
+
background-color: var(--redsift-color-neutral-light-grey);
|
|
48
|
+
inline-size: 200vw;
|
|
49
|
+
block-size: 1px;
|
|
50
|
+
inset-inline-start: -100vw;
|
|
51
|
+
inset-block-start: calc(${Math.max(1, $divider.rowGap / 2)}px * -1);
|
|
52
|
+
z-index: 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
` : '';
|
|
56
|
+
}}
|
|
57
|
+
`;
|
|
58
|
+
|
|
59
|
+
const _excluded = ["children", "className", "divider", "gap", "theme"];
|
|
60
|
+
const COMPONENT_NAME = 'Grid';
|
|
61
|
+
const CLASSNAME = 'redsift-grid';
|
|
23
62
|
|
|
24
63
|
/**
|
|
25
64
|
* The Grid component.
|
|
26
65
|
*/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
66
|
+
const BaseGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
67
|
+
const {
|
|
68
|
+
children,
|
|
69
|
+
className,
|
|
70
|
+
divider,
|
|
71
|
+
gap,
|
|
72
|
+
theme: propsTheme
|
|
73
|
+
} = props,
|
|
74
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
75
|
+
const theme = useTheme(propsTheme);
|
|
76
|
+
return /*#__PURE__*/React__default.createElement(ThemeProvider, {
|
|
77
|
+
value: {
|
|
78
|
+
theme
|
|
79
|
+
}
|
|
80
|
+
}, /*#__PURE__*/React__default.createElement(StyledGrid, _extends({}, forwardedProps, {
|
|
81
|
+
gap: divider ? `${divider.rowGap}px ${divider.colGap}px` : gap,
|
|
82
|
+
className: classNames(BaseGrid.className, className),
|
|
83
|
+
ref: ref,
|
|
84
|
+
$divider: divider,
|
|
85
|
+
$theme: theme
|
|
86
|
+
}), children));
|
|
87
|
+
});
|
|
88
|
+
BaseGrid.className = CLASSNAME;
|
|
89
|
+
BaseGrid.displayName = COMPONENT_NAME;
|
|
90
|
+
const Grid = Object.assign(BaseGrid, {
|
|
91
|
+
Item: GridItem
|
|
92
|
+
});
|
|
31
93
|
|
|
32
|
-
export { BaseGrid as B,
|
|
94
|
+
export { BaseGrid as B, Grid as G };
|
|
95
|
+
//# sourceMappingURL=Grid2.js.map
|