@ntbjs/react-components 2.0.0-rc.11 → 2.0.0-rc.13
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/cjs/components/data/Alert/Alert.js +8 -10
- package/cjs/components/data/Alert/Alert.styled.js +17 -10
- package/cjs/components/data/Badge/Badge.js +13 -13
- package/cjs/components/data/Badge/Badge.styled.js +37 -26
- package/cjs/components/data/Popover/Popover.js +4 -2
- package/cjs/components/data/Tab/Tab.styled.js +6 -1
- package/cjs/components/data/Tabs/Tabs.js +22 -12
- package/cjs/components/data/Tabs/Tabs.styled.js +29 -16
- package/cjs/components/data/Tooltip/Tooltip.js +3 -1
- package/cjs/components/data/VerificationStatusIcon/VerificationStatusIcon.js +6 -6
- package/cjs/components/data/VerificationStatusIcon/VerificationStatusIcon.styled.js +24 -15
- package/cjs/components/inputs/ActionButton/ActionButton.js +5 -3
- package/cjs/components/inputs/ActionButton/ActionButton.styled.js +17 -8
- package/cjs/components/inputs/Button/Button.js +45 -38
- package/cjs/components/inputs/Button/Button.styled.js +84 -38
- package/cjs/components/inputs/Checkbox/Checkbox.js +1 -1
- package/cjs/components/inputs/Checkbox/Checkbox.styled.js +23 -8
- package/cjs/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js +2 -2
- package/cjs/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js +46 -35
- package/cjs/components/inputs/CompactStarRating/CompactStarRating.js +3 -4
- package/cjs/components/inputs/CompactStarRating/CompactStarRating.styled.js +36 -25
- package/cjs/components/inputs/CompactTextInput/CompactTextInput.js +5 -5
- package/cjs/components/inputs/CompactTextInput/CompactTextInput.styled.js +79 -25
- package/cjs/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js +24 -7
- package/cjs/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js +1 -1
- package/cjs/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js +38 -13
- package/cjs/components/inputs/MultiSelect/MultiSelect.js +5 -48
- package/cjs/components/inputs/MultiSelect/MultiSelect.styled.js +27 -31
- package/cjs/components/inputs/Radio/Radio.styled.js +9 -2
- package/cjs/components/inputs/Switch/Switch.js +1 -1
- package/cjs/components/inputs/Switch/Switch.styled.js +22 -7
- package/cjs/components/inputs/TextArea/TextArea.js +10 -20
- package/cjs/components/inputs/TextArea/TextArea.styled.js +208 -133
- package/cjs/components/inputs/TextInput/TextInput.js +21 -22
- package/cjs/components/inputs/TextInput/TextInput.styled.js +58 -45
- package/cjs/components/layout/InputGroup/InputGroup.styled.js +6 -1
- package/cjs/components/layout/SectionSeparator/SectionSeparator.js +7 -7
- package/cjs/components/layout/SectionSeparator/SectionSeparator.styled.js +12 -5
- package/cjs/components/widgets/AssetAction/AssetAction.js +1 -1
- package/cjs/components/widgets/AssetAction/AssetAction.styled.js +16 -5
- package/cjs/components/widgets/AssetActionsBase/AssetActionsBase.styled.js +6 -1
- package/cjs/components/widgets/AssetGallery/AssetGallery.js +5 -1
- package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js +9 -6
- package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js +12 -3
- package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +7 -4
- package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +80 -33
- package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +1 -1
- package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +22 -22
- package/cjs/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +2 -2
- package/cjs/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js +18 -7
- package/cjs/components/widgets/ContextMenu/ContextMenu.js +2 -1
- package/cjs/components/widgets/ContextMenu/ContextMenu.styled.js +6 -1
- package/cjs/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js +4 -4
- package/cjs/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js +16 -7
- package/cjs/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js +6 -1
- package/cjs/components/widgets/InfoCard/InfoCard.js +17 -9
- package/cjs/components/widgets/InfoCard/InfoCard.styled.js +40 -13
- package/cjs/components/widgets/ProgressBar/ProgressBar.js +43 -22
- package/cjs/components/widgets/ProgressBar/ProgressBar.styled.js +78 -22
- package/cjs/components/widgets/SummaryCard/SummaryCard.js +9 -8
- package/cjs/components/widgets/SummaryCard/SummaryCard.styled.js +46 -19
- package/cjs/components/widgets/widgets/index.js +0 -2
- package/cjs/node_modules/@emotion/cache/dist/{emotion-cache.browser.esm.js → emotion-cache.esm.js} +61 -3
- package/cjs/node_modules/@emotion/react/dist/{emotion-element-f0de968e.browser.esm.js → emotion-element-d59e098f.esm.js} +54 -12
- package/cjs/node_modules/@emotion/react/dist/{emotion-react.browser.esm.js → emotion-react.esm.js} +10 -7
- package/cjs/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/{emotion-use-insertion-effect-with-fallbacks.browser.esm.js → emotion-use-insertion-effect-with-fallbacks.esm.js} +3 -1
- package/cjs/node_modules/@emotion/utils/dist/{emotion-utils.browser.esm.js → emotion-utils.esm.js} +12 -3
- package/cjs/node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js +20 -0
- package/cjs/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +20 -12
- package/cjs/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +1 -1
- package/cjs/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js +4 -2
- package/cjs/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +9 -8
- package/cjs/node_modules/@restart/hooks/{esm → lib}/useMergedRefs.js +8 -11
- package/cjs/node_modules/@restart/hooks/{esm → lib}/useUpdateEffect.js +2 -4
- package/cjs/node_modules/react/cjs/react.development.js +125 -82
- package/cjs/node_modules/react/cjs/react.production.js +88 -92
- package/cjs/node_modules/react-dom/cjs/react-dom.development.js +1 -1
- package/cjs/node_modules/react-dom/cjs/react-dom.production.js +1 -1
- package/cjs/node_modules/react-select/creatable/dist/react-select-creatable.esm.js +5 -5
- package/cjs/node_modules/react-select/dist/{Select-aab027f3.esm.js → Select-ef7c0426.esm.js} +23 -17
- package/cjs/node_modules/react-select/dist/index-641ee5b8.esm.js +47 -47
- package/cjs/node_modules/react-select/dist/{useCreatable-84008237.esm.js → useCreatable-09aaeb9a.esm.js} +3 -3
- package/cjs/node_modules/use-isomorphic-layout-effect/dist/{use-isomorphic-layout-effect.browser.esm.js → use-isomorphic-layout-effect.esm.js} +4 -1
- package/cjs/styles/utils/colors-export.js +41 -0
- package/cjs/utils/defaultTheme.js +28 -5
- package/esm/components/data/Alert/Alert.js +8 -10
- package/esm/components/data/Alert/Alert.styled.js +17 -10
- package/esm/components/data/Badge/Badge.js +13 -13
- package/esm/components/data/Badge/Badge.styled.js +37 -26
- package/esm/components/data/Popover/Popover.js +4 -2
- package/esm/components/data/Tab/Tab.styled.js +6 -1
- package/esm/components/data/Tabs/Tabs.js +23 -13
- package/esm/components/data/Tabs/Tabs.styled.js +29 -16
- package/esm/components/data/Tooltip/Tooltip.js +3 -1
- package/esm/components/data/VerificationStatusIcon/VerificationStatusIcon.js +6 -6
- package/esm/components/data/VerificationStatusIcon/VerificationStatusIcon.styled.js +24 -15
- package/esm/components/inputs/ActionButton/ActionButton.js +5 -3
- package/esm/components/inputs/ActionButton/ActionButton.styled.js +17 -8
- package/esm/components/inputs/Button/Button.js +45 -38
- package/esm/components/inputs/Button/Button.styled.js +84 -38
- package/esm/components/inputs/Checkbox/Checkbox.js +1 -1
- package/esm/components/inputs/Checkbox/Checkbox.styled.js +23 -8
- package/esm/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js +4 -4
- package/esm/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js +46 -35
- package/esm/components/inputs/CompactStarRating/CompactStarRating.js +3 -4
- package/esm/components/inputs/CompactStarRating/CompactStarRating.styled.js +36 -25
- package/esm/components/inputs/CompactTextInput/CompactTextInput.js +5 -5
- package/esm/components/inputs/CompactTextInput/CompactTextInput.styled.js +79 -25
- package/esm/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js +24 -7
- package/esm/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js +1 -1
- package/esm/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js +38 -13
- package/esm/components/inputs/MultiSelect/MultiSelect.js +6 -49
- package/esm/components/inputs/MultiSelect/MultiSelect.styled.js +28 -28
- package/esm/components/inputs/Radio/Radio.styled.js +9 -2
- package/esm/components/inputs/Switch/Switch.js +1 -1
- package/esm/components/inputs/Switch/Switch.styled.js +22 -7
- package/esm/components/inputs/TextArea/TextArea.js +10 -20
- package/esm/components/inputs/TextArea/TextArea.styled.js +208 -133
- package/esm/components/inputs/TextInput/TextInput.js +21 -22
- package/esm/components/inputs/TextInput/TextInput.styled.js +58 -45
- package/esm/components/layout/InputGroup/InputGroup.styled.js +6 -1
- package/esm/components/layout/SectionSeparator/SectionSeparator.js +7 -7
- package/esm/components/layout/SectionSeparator/SectionSeparator.styled.js +12 -5
- package/esm/components/widgets/AssetAction/AssetAction.js +1 -1
- package/esm/components/widgets/AssetAction/AssetAction.styled.js +16 -5
- package/esm/components/widgets/AssetActionsBase/AssetActionsBase.styled.js +6 -1
- package/esm/components/widgets/AssetGallery/AssetGallery.js +5 -1
- package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js +9 -6
- package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js +12 -3
- package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +7 -4
- package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +80 -33
- package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +1 -1
- package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +22 -22
- package/esm/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +2 -2
- package/esm/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js +18 -7
- package/esm/components/widgets/ContextMenu/ContextMenu.js +2 -1
- package/esm/components/widgets/ContextMenu/ContextMenu.styled.js +6 -1
- package/esm/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js +4 -4
- package/esm/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js +16 -7
- package/esm/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js +6 -1
- package/esm/components/widgets/InfoCard/InfoCard.js +10 -2
- package/esm/components/widgets/InfoCard/InfoCard.styled.js +40 -13
- package/esm/components/widgets/ProgressBar/ProgressBar.js +31 -10
- package/esm/components/widgets/ProgressBar/ProgressBar.styled.js +77 -23
- package/esm/components/widgets/SummaryCard/SummaryCard.js +9 -8
- package/esm/components/widgets/SummaryCard/SummaryCard.styled.js +46 -19
- package/esm/components/widgets/widgets/index.js +0 -1
- package/esm/node_modules/@emotion/cache/dist/{emotion-cache.browser.esm.js → emotion-cache.esm.js} +61 -3
- package/esm/node_modules/@emotion/react/dist/{emotion-element-f0de968e.browser.esm.js → emotion-element-d59e098f.esm.js} +47 -5
- package/esm/node_modules/@emotion/react/dist/{emotion-react.browser.esm.js → emotion-react.esm.js} +3 -3
- package/esm/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/{emotion-use-insertion-effect-with-fallbacks.browser.esm.js → emotion-use-insertion-effect-with-fallbacks.esm.js} +3 -1
- package/esm/node_modules/@emotion/utils/dist/{emotion-utils.browser.esm.js → emotion-utils.esm.js} +12 -3
- package/esm/node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js +16 -0
- package/esm/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +20 -12
- package/esm/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +4 -4
- package/esm/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js +4 -2
- package/esm/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +9 -8
- package/esm/node_modules/@restart/hooks/{esm → lib}/useMergedRefs.js +8 -11
- package/esm/node_modules/@restart/hooks/{esm → lib}/useUpdateEffect.js +2 -4
- package/esm/node_modules/react/cjs/react.development.js +125 -82
- package/esm/node_modules/react/cjs/react.production.js +88 -92
- package/esm/node_modules/react-dom/cjs/react-dom.development.js +1 -1
- package/esm/node_modules/react-dom/cjs/react-dom.production.js +1 -1
- package/esm/node_modules/react-select/creatable/dist/react-select-creatable.esm.js +3 -3
- package/esm/node_modules/react-select/dist/{Select-aab027f3.esm.js → Select-ef7c0426.esm.js} +12 -6
- package/esm/node_modules/react-select/dist/index-641ee5b8.esm.js +2 -2
- package/esm/node_modules/react-select/dist/{useCreatable-84008237.esm.js → useCreatable-09aaeb9a.esm.js} +1 -1
- package/esm/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js +9 -0
- package/esm/styles/utils/colors-export.js +37 -0
- package/esm/utils/defaultTheme.js +28 -5
- package/package.json +16 -22
- package/styles/utils/colors-export.js +35 -0
- package/cjs/components/widgets/Instructions/Instructions.js +0 -217
- package/cjs/components/widgets/Instructions/Instructions.styled.js +0 -47
- package/cjs/components/widgets/Instructions/widgets/Instructions/index.js +0 -9
- package/cjs/styles/utils/colors.scss.js +0 -11
- package/esm/components/widgets/Instructions/Instructions.js +0 -213
- package/esm/components/widgets/Instructions/Instructions.styled.js +0 -36
- package/esm/components/widgets/Instructions/widgets/Instructions/index.js +0 -1
- package/esm/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js +0 -6
- package/esm/styles/utils/colors.scss.js +0 -7
- package/styles/config.scss +0 -37
- /package/styles/utils/{colors.scss → .colors.scss} +0 -0
|
@@ -12,7 +12,12 @@ let _ = t => t,
|
|
|
12
12
|
_t7,
|
|
13
13
|
_t8,
|
|
14
14
|
_t9;
|
|
15
|
-
const
|
|
15
|
+
const shouldForwardProp = prop => {
|
|
16
|
+
return prop !== 'theme' && !prop.startsWith('$');
|
|
17
|
+
};
|
|
18
|
+
const Container = styled.div.withConfig({
|
|
19
|
+
shouldForwardProp
|
|
20
|
+
}).attrs(applyDefaultTheme)(_t || (_t = _`
|
|
16
21
|
font-family: ${0};
|
|
17
22
|
font-size: 1rem;
|
|
18
23
|
font-weight: 500;
|
|
@@ -23,8 +28,10 @@ const Container = styled.div.attrs(applyDefaultTheme)(_t || (_t = _`
|
|
|
23
28
|
flex-direction: row;
|
|
24
29
|
align-items: center;
|
|
25
30
|
padding: 5px 0;
|
|
26
|
-
`), props => props.theme.primaryFontFamily, props => props.theme.themeProp('background', props.theme.getColor('gray-
|
|
27
|
-
const MetricsContainer = styled.div.
|
|
31
|
+
`), props => props.theme.primaryFontFamily, props => props.theme.themeProp('background', props.theme.getColor('gray-800'), props.theme.getColor('gray-50')), props => props.height ? `${props.height}px` : '50px');
|
|
32
|
+
const MetricsContainer = styled.div.withConfig({
|
|
33
|
+
shouldForwardProp
|
|
34
|
+
}).attrs(applyDefaultTheme)(_t2 || (_t2 = _`
|
|
28
35
|
display: flex;
|
|
29
36
|
flex-direction: column;
|
|
30
37
|
justify-content: center;
|
|
@@ -33,31 +40,41 @@ const MetricsContainer = styled.div.attrs(applyDefaultTheme)(_t2 || (_t2 = _`
|
|
|
33
40
|
gap: 5px;
|
|
34
41
|
padding-left: 15px;
|
|
35
42
|
`));
|
|
36
|
-
const IconTotalContainer = styled.div.
|
|
43
|
+
const IconTotalContainer = styled.div.withConfig({
|
|
44
|
+
shouldForwardProp
|
|
45
|
+
}).attrs(applyDefaultTheme)(_t3 || (_t3 = _`
|
|
37
46
|
display: flex;
|
|
38
47
|
justify-content: center;
|
|
39
48
|
align-items: center;
|
|
40
49
|
gap: 10px;
|
|
41
50
|
`));
|
|
42
|
-
const Total = styled.div.
|
|
51
|
+
const Total = styled.div.withConfig({
|
|
52
|
+
shouldForwardProp
|
|
53
|
+
}).attrs(applyDefaultTheme)(_t4 || (_t4 = _`
|
|
43
54
|
font-size: 1.22rem;
|
|
44
55
|
font-weight: 700;
|
|
45
56
|
${0};
|
|
46
57
|
`), props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900')));
|
|
47
|
-
const Label = styled.div.
|
|
58
|
+
const Label = styled.div.withConfig({
|
|
59
|
+
shouldForwardProp
|
|
60
|
+
}).attrs(applyDefaultTheme)(_t5 || (_t5 = _`
|
|
48
61
|
font-size: 0.875rem;
|
|
49
62
|
font-weight: 400;
|
|
50
63
|
opacity: 0.8;
|
|
51
64
|
${0};
|
|
52
65
|
`), props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-500')));
|
|
53
|
-
const IconContainer = styled.div.
|
|
66
|
+
const IconContainer = styled.div.withConfig({
|
|
67
|
+
shouldForwardProp
|
|
68
|
+
}).attrs(applyDefaultTheme)(_t6 || (_t6 = _`
|
|
54
69
|
display: flex;
|
|
55
70
|
justify-content: center;
|
|
56
71
|
align-items: center;
|
|
57
72
|
width: 18px;
|
|
58
73
|
margin-top: -0.05rem;
|
|
59
74
|
`));
|
|
60
|
-
const Link = styled.div.
|
|
75
|
+
const Link = styled.div.withConfig({
|
|
76
|
+
shouldForwardProp
|
|
77
|
+
}).attrs(applyDefaultTheme)(_t7 || (_t7 = _`
|
|
61
78
|
font-size: 0.875rem;
|
|
62
79
|
font-weight: 400;
|
|
63
80
|
width: 30%;
|
|
@@ -76,19 +93,29 @@ const Link = styled.div.attrs(applyDefaultTheme)(_t7 || (_t7 = _`
|
|
|
76
93
|
transform: translateX(2px);
|
|
77
94
|
}
|
|
78
95
|
`));
|
|
79
|
-
const ButtonLink = styled.div.
|
|
96
|
+
const ButtonLink = styled.div.withConfig({
|
|
97
|
+
shouldForwardProp
|
|
98
|
+
}).attrs(applyDefaultTheme)(_t8 || (_t8 = _`
|
|
80
99
|
font-size: 0.875rem;
|
|
81
100
|
font-weight: 500;
|
|
82
101
|
height: 100%;
|
|
83
102
|
display: flex;
|
|
84
103
|
align-items: center;
|
|
85
104
|
white-space: nowrap;
|
|
105
|
+
opacity: ${0};
|
|
106
|
+
transition: color 0.2s ease-in-out;
|
|
86
107
|
${0};
|
|
87
|
-
`), props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('
|
|
88
|
-
const StyledArrowIcon = styled(SvgArrowForward).
|
|
89
|
-
|
|
108
|
+
`), props => props.$isHovered ? 1 : 0.8, props => props.$isHovered ? props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('black')) : props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900')));
|
|
109
|
+
const StyledArrowIcon = styled(SvgArrowForward).withConfig({
|
|
110
|
+
shouldForwardProp
|
|
111
|
+
}).attrs(applyDefaultTheme)(_t9 || (_t9 = _`
|
|
112
|
+
height: 15px;
|
|
90
113
|
margin-right: 10px;
|
|
114
|
+
opacity: ${0};
|
|
115
|
+
transition: transform 0.2s ease-in-out, fill 0.2s ease-in-out;
|
|
116
|
+
transform: ${0};
|
|
117
|
+
|
|
91
118
|
${0};
|
|
92
|
-
`), props => props.theme.themeProp('fill', props.theme.getColor('
|
|
119
|
+
`), props => props.$isHovered ? 1 : 0.8, props => props.$isHovered ? 'translateX(2px)' : 'translateX(0)', props => props.$isHovered ? props.theme.themeProp('fill', props.theme.getColor('white'), props.theme.getColor('black')) : props.theme.themeProp('fill', props.theme.getColor('white'), props.theme.getColor('black')));
|
|
93
120
|
|
|
94
121
|
export { ButtonLink, Container, IconContainer, IconTotalContainer, Label, Link, MetricsContainer, StyledArrowIcon, Total };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React from '../../../node_modules/react/index.js';
|
|
3
3
|
import PropTypes from '../../../node_modules/prop-types/index.js';
|
|
4
|
-
import { Container, Label, ProgressBarTrack, MetricsContainer,
|
|
4
|
+
import { Container, Label, InnerContainer, Completed, ProgressBarTrack, MetricsContainer, ProgressBarFill, PercentageIndicator, ExternalPercentageIndicator, Link, ButtonLink, StyledArrowIcon } from './ProgressBar.styled.js';
|
|
5
|
+
import { r as react } from '../../../_virtual/index.js';
|
|
5
6
|
|
|
6
7
|
const _excluded = ["totalAssets", "completedAssets", "percentageText", "barColor", "height", "label", "type", "linkText", "onClick"];
|
|
7
8
|
const ProgressBar = _ref => {
|
|
@@ -17,26 +18,46 @@ const ProgressBar = _ref => {
|
|
|
17
18
|
onClick
|
|
18
19
|
} = _ref,
|
|
19
20
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
+
const [isLinkHovered, setIsLinkHovered] = react.exports.useState(false);
|
|
20
22
|
const safeCompletedAssets = Math.max(0, completedAssets);
|
|
21
23
|
const safeTotalAssets = Math.max(1, totalAssets);
|
|
22
24
|
const percentage = safeCompletedAssets / safeTotalAssets * 100;
|
|
23
25
|
const formattedPercentage = `${Math.round(percentage)}%`;
|
|
26
|
+
const isLowPercentage = percentage <= 5;
|
|
24
27
|
const handleLinkClick = e => onClick(e);
|
|
28
|
+
const formatNumberNew = num => {
|
|
29
|
+
if (num < 1000000) {
|
|
30
|
+
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
|
|
31
|
+
} else {
|
|
32
|
+
const units = ['K', 'M', 'B', 'T'];
|
|
33
|
+
const unit = Math.floor((num.toString().length - 1) / 3) - 1;
|
|
34
|
+
const shortNum = num / Math.pow(1000, unit + 1);
|
|
35
|
+
return shortNum.toFixed(shortNum < 10 ? 1 : 0) + units[unit];
|
|
36
|
+
}
|
|
37
|
+
};
|
|
25
38
|
return React.createElement(Container, _extends({
|
|
26
39
|
height: height
|
|
27
|
-
}, props), React.createElement(Label, null, label), React.createElement(
|
|
28
|
-
|
|
40
|
+
}, props), React.createElement(Label, null, label), React.createElement(InnerContainer, {
|
|
41
|
+
type: type
|
|
29
42
|
}, React.createElement(Completed, {
|
|
30
43
|
type: type
|
|
31
|
-
},
|
|
44
|
+
}, formatNumberNew(completedAssets)), React.createElement(ProgressBarTrack, null, React.createElement(MetricsContainer, {
|
|
45
|
+
$hasLink: Boolean(linkText)
|
|
46
|
+
}, React.createElement(ProgressBarFill, {
|
|
32
47
|
type: type,
|
|
33
|
-
percentage: percentage,
|
|
48
|
+
$percentage: percentage,
|
|
34
49
|
barColor: barColor
|
|
35
|
-
}, React.createElement(PercentageIndicator, {
|
|
36
|
-
hasLink: Boolean(linkText)
|
|
37
|
-
}, percentageText || formattedPercentage))), linkText && React.createElement(Link, {
|
|
38
|
-
onClick: handleLinkClick
|
|
39
|
-
|
|
50
|
+
}, !isLowPercentage && React.createElement(PercentageIndicator, {
|
|
51
|
+
$hasLink: Boolean(linkText)
|
|
52
|
+
}, percentageText || formattedPercentage)), isLowPercentage && React.createElement(ExternalPercentageIndicator, null, percentageText || formattedPercentage)), linkText && React.createElement(Link, {
|
|
53
|
+
onClick: handleLinkClick,
|
|
54
|
+
onMouseEnter: () => setIsLinkHovered(true),
|
|
55
|
+
onMouseLeave: () => setIsLinkHovered(false)
|
|
56
|
+
}, React.createElement(ButtonLink, {
|
|
57
|
+
$isHovered: isLinkHovered
|
|
58
|
+
}, linkText), React.createElement(StyledArrowIcon, {
|
|
59
|
+
$isHovered: isLinkHovered
|
|
60
|
+
})))));
|
|
40
61
|
};
|
|
41
62
|
ProgressBar.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
42
63
|
totalAssets: PropTypes.number.isRequired,
|
|
@@ -12,9 +12,14 @@ let _ = t => t,
|
|
|
12
12
|
_t7,
|
|
13
13
|
_t8,
|
|
14
14
|
_t9,
|
|
15
|
+
_t0,
|
|
16
|
+
_t1,
|
|
15
17
|
_t10,
|
|
16
18
|
_t11,
|
|
17
19
|
_t12;
|
|
20
|
+
const shouldForwardProp = prop => {
|
|
21
|
+
return prop !== 'theme' && !prop.startsWith('$');
|
|
22
|
+
};
|
|
18
23
|
const getBackgroundColor = props => {
|
|
19
24
|
if (props.barColor) {
|
|
20
25
|
return `background: ${props.barColor};`;
|
|
@@ -29,17 +34,29 @@ const getBackgroundColor = props => {
|
|
|
29
34
|
const [darkColor, lightColor] = colorMap[props.type] || colorMap.default;
|
|
30
35
|
return props.theme.themeProp('background', props.theme.getColor(darkColor), props.theme.getColor(lightColor));
|
|
31
36
|
};
|
|
32
|
-
styled.p.
|
|
37
|
+
styled.p.withConfig({
|
|
38
|
+
shouldForwardProp
|
|
39
|
+
}).attrs(applyDefaultTheme)(_t || (_t = _`
|
|
33
40
|
font-family: ${0};
|
|
34
41
|
font-size: 1rem;
|
|
35
42
|
font-weight: 500;
|
|
36
43
|
`), props => props.theme.primaryFontFamily);
|
|
37
|
-
const Container = styled.div.
|
|
44
|
+
const Container = styled.div.withConfig({
|
|
45
|
+
shouldForwardProp
|
|
46
|
+
}).attrs(applyDefaultTheme)(_t2 || (_t2 = _`
|
|
38
47
|
width: 100%;
|
|
39
48
|
height: ${0};
|
|
40
49
|
font-family: ${0};
|
|
41
50
|
`), props => props.height ? `${props.height}px` : '50px', props => props.theme.primaryFontFamily);
|
|
42
|
-
const
|
|
51
|
+
const InnerContainer = styled.div.withConfig({
|
|
52
|
+
shouldForwardProp
|
|
53
|
+
}).attrs(applyDefaultTheme)(_t3 || (_t3 = _`
|
|
54
|
+
display: flex;
|
|
55
|
+
height: 100%;
|
|
56
|
+
`));
|
|
57
|
+
const MetricsContainer = styled.div.withConfig({
|
|
58
|
+
shouldForwardProp
|
|
59
|
+
}).attrs(applyDefaultTheme)(_t4 || (_t4 = _`
|
|
43
60
|
display: flex;
|
|
44
61
|
flex-direction: column;
|
|
45
62
|
justify-content: center;
|
|
@@ -48,17 +65,24 @@ const MetricsContainer = styled.div.attrs(applyDefaultTheme)(_t3 || (_t3 = _`
|
|
|
48
65
|
height: 100%;
|
|
49
66
|
flex-direction: row;
|
|
50
67
|
justify-content: flex-start;
|
|
51
|
-
`), props => props
|
|
52
|
-
const Label = styled.div.
|
|
68
|
+
`), props => props.$hasLink ? '85%' : '100%');
|
|
69
|
+
const Label = styled.div.withConfig({
|
|
70
|
+
shouldForwardProp
|
|
71
|
+
}).attrs(applyDefaultTheme)(_t5 || (_t5 = _`
|
|
53
72
|
font-size: 0.875rem;
|
|
73
|
+
padding-bottom: 5px;
|
|
54
74
|
${0}
|
|
55
75
|
`), props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-700')));
|
|
56
|
-
styled.div.
|
|
76
|
+
styled.div.withConfig({
|
|
77
|
+
shouldForwardProp
|
|
78
|
+
}).attrs(applyDefaultTheme)(_t6 || (_t6 = _`
|
|
57
79
|
font-size: 0.875rem;
|
|
58
80
|
font-weight: 500;
|
|
59
81
|
${0}
|
|
60
82
|
`), props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-700')));
|
|
61
|
-
const ProgressBarTrack = styled.div.
|
|
83
|
+
const ProgressBarTrack = styled.div.withConfig({
|
|
84
|
+
shouldForwardProp
|
|
85
|
+
}).attrs(applyDefaultTheme)(_t7 || (_t7 = _`
|
|
62
86
|
width: 100%;
|
|
63
87
|
display: flex;
|
|
64
88
|
flex-direction: row;
|
|
@@ -68,20 +92,22 @@ const ProgressBarTrack = styled.div.attrs(applyDefaultTheme)(_t6 || (_t6 = _`
|
|
|
68
92
|
border-radius: 3px;
|
|
69
93
|
height: 100%;
|
|
70
94
|
${0}
|
|
71
|
-
`), props => props.theme.themeProp('background', props.theme.getColor('gray-
|
|
72
|
-
const Completed = styled.div.
|
|
95
|
+
`), props => props.theme.themeProp('background', props.theme.getColor('gray-800'), props.theme.getColor('gray-50')));
|
|
96
|
+
const Completed = styled.div.withConfig({
|
|
97
|
+
shouldForwardProp
|
|
98
|
+
}).attrs(applyDefaultTheme)(_t8 || (_t8 = _`
|
|
73
99
|
font-size: 1.2rem;
|
|
74
100
|
font-weight: 400;
|
|
75
101
|
height: 100%;
|
|
76
|
-
|
|
77
|
-
border-radius: 3px 0 0 3px;
|
|
78
|
-
border-right: 1px solid rgba(255, 255, 255, 0.2);
|
|
102
|
+
border-radius: 3px;
|
|
79
103
|
display: flex;
|
|
80
104
|
align-items: center;
|
|
81
|
-
|
|
105
|
+
width: 96px;
|
|
82
106
|
${0};
|
|
83
|
-
`), props =>
|
|
84
|
-
const PercentageIndicator = styled.div.
|
|
107
|
+
`), props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-800')));
|
|
108
|
+
const PercentageIndicator = styled.div.withConfig({
|
|
109
|
+
shouldForwardProp
|
|
110
|
+
}).attrs(applyDefaultTheme)(_t9 || (_t9 = _`
|
|
85
111
|
position: absolute;
|
|
86
112
|
right: 10px;
|
|
87
113
|
font-weight: 400;
|
|
@@ -90,7 +116,21 @@ const PercentageIndicator = styled.div.attrs(applyDefaultTheme)(_t8 || (_t8 = _`
|
|
|
90
116
|
opacity: 0.8;
|
|
91
117
|
${0};
|
|
92
118
|
`), props => props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-500')));
|
|
93
|
-
const
|
|
119
|
+
const ExternalPercentageIndicator = styled.div.withConfig({
|
|
120
|
+
shouldForwardProp
|
|
121
|
+
}).attrs(applyDefaultTheme)(_t0 || (_t0 = _`
|
|
122
|
+
margin-left: 8px;
|
|
123
|
+
font-size: 1.2rem;
|
|
124
|
+
font-weight: 400;
|
|
125
|
+
font-size: 0.875rem;
|
|
126
|
+
opacity: 0.9;
|
|
127
|
+
${0};
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
`), props => props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-500')));
|
|
131
|
+
const ProgressBarFill = styled.div.withConfig({
|
|
132
|
+
shouldForwardProp
|
|
133
|
+
}).attrs(applyDefaultTheme)(_t1 || (_t1 = _`
|
|
94
134
|
height: 100%;
|
|
95
135
|
border-radius: 0 3px 3px 0;
|
|
96
136
|
width: ${0}%;
|
|
@@ -100,8 +140,10 @@ const ProgressBarFill = styled.div.attrs(applyDefaultTheme)(_t9 || (_t9 = _`
|
|
|
100
140
|
justify-content: flex-end;
|
|
101
141
|
${0}
|
|
102
142
|
transition: width 0.3s ease;
|
|
103
|
-
`), props => props
|
|
104
|
-
const Link = styled.div.
|
|
143
|
+
`), props => props.$percentage, props => getBackgroundColor(props));
|
|
144
|
+
const Link = styled.div.withConfig({
|
|
145
|
+
shouldForwardProp
|
|
146
|
+
}).attrs(applyDefaultTheme)(_t10 || (_t10 = _`
|
|
105
147
|
font-size: 0.875rem;
|
|
106
148
|
font-weight: 400;
|
|
107
149
|
width: 15%;
|
|
@@ -120,18 +162,30 @@ const Link = styled.div.attrs(applyDefaultTheme)(_t10 || (_t10 = _`
|
|
|
120
162
|
transform: translateX(2px);
|
|
121
163
|
}
|
|
122
164
|
`));
|
|
123
|
-
const ButtonLink = styled.div.
|
|
165
|
+
const ButtonLink = styled.div.withConfig({
|
|
166
|
+
shouldForwardProp
|
|
167
|
+
}).attrs(applyDefaultTheme)(_t11 || (_t11 = _`
|
|
124
168
|
font-size: 0.875rem;
|
|
125
169
|
font-weight: 500;
|
|
126
170
|
height: 100%;
|
|
127
171
|
display: flex;
|
|
128
172
|
align-items: center;
|
|
173
|
+
opacity: ${0};
|
|
174
|
+
transition: color 0.2s ease-in-out;
|
|
129
175
|
${0};
|
|
130
|
-
`), props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900')));
|
|
131
|
-
const StyledArrowIcon = styled(SvgArrowForward).
|
|
176
|
+
`), props => props.$isHovered ? 1 : 0.8, props => props.$isHovered ? props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('black')) : props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900')));
|
|
177
|
+
const StyledArrowIcon = styled(SvgArrowForward).withConfig({
|
|
178
|
+
shouldForwardProp
|
|
179
|
+
}).attrs(applyDefaultTheme)(_t12 || (_t12 = _`
|
|
132
180
|
height: 15px;
|
|
133
181
|
margin-right: 10px;
|
|
182
|
+
opacity: ${0};
|
|
183
|
+
transition:
|
|
184
|
+
transform 0.2s ease-in-out,
|
|
185
|
+
fill 0.2s ease-in-out;
|
|
186
|
+
transform: ${0};
|
|
187
|
+
|
|
134
188
|
${0};
|
|
135
|
-
`), props => props.theme.themeProp('fill', props.theme.getColor('
|
|
189
|
+
`), props => props.$isHovered ? 1 : 0.8, props => props.$isHovered ? 'translateX(2px)' : 'translateX(0)', props => props.$isHovered ? props.theme.themeProp('fill', props.theme.getColor('white'), props.theme.getColor('black')) : props.theme.themeProp('fill', props.theme.getColor('white'), props.theme.getColor('black')));
|
|
136
190
|
|
|
137
|
-
export { ButtonLink, Completed, Container, Label, Link, MetricsContainer, PercentageIndicator, ProgressBarFill, ProgressBarTrack, StyledArrowIcon };
|
|
191
|
+
export { ButtonLink, Completed, Container, ExternalPercentageIndicator, InnerContainer, Label, Link, MetricsContainer, PercentageIndicator, ProgressBarFill, ProgressBarTrack, StyledArrowIcon };
|
|
@@ -28,20 +28,21 @@ const SummaryCard = React.forwardRef(function AssetSummaryCard(_ref, forwardedRe
|
|
|
28
28
|
const shouldAddGutterAfterInstructions = shouldRenderInstructions && shouldRenderFooter;
|
|
29
29
|
const shouldAddGutterAfterTitle = !!title && (!!description || !!instructions || shouldRenderFooter);
|
|
30
30
|
if (!activeSummaryCard) return null;
|
|
31
|
+
const filteredProps = Object.fromEntries(Object.entries(props).filter(([key]) => key !== 'compact'));
|
|
31
32
|
return React.createElement(SummaryCard$2, _extends({
|
|
32
33
|
ref: forwardedRef,
|
|
33
34
|
width: width,
|
|
34
|
-
useBorder: useBorder
|
|
35
|
-
},
|
|
35
|
+
$useBorder: useBorder
|
|
36
|
+
}, filteredProps, {
|
|
36
37
|
view: view
|
|
37
38
|
}), shouldRenderHeader && React.createElement(React.Fragment, null, React.createElement(Gutter, {
|
|
38
|
-
gutter: 8
|
|
39
|
+
$gutter: 8
|
|
39
40
|
}), React.createElement(Header, null, React.createElement(HeaderLeft, null, headerLeft), React.createElement(HeaderRight, null, headerRight))), React.createElement(Gutter, {
|
|
40
|
-
gutter: shouldRenderHeader ? 8 : 16
|
|
41
|
+
$gutter: shouldRenderHeader ? 8 : 16
|
|
41
42
|
}), title && React.createElement(Title, null, title), shouldAddGutterAfterTitle && React.createElement(Gutter, {
|
|
42
|
-
gutter: 4
|
|
43
|
+
$gutter: 4
|
|
43
44
|
}), description && React.createElement(Description, null, description), React.createElement(Gutter, {
|
|
44
|
-
gutter: 16
|
|
45
|
+
$gutter: 16
|
|
45
46
|
}), shouldRenderInstructions && React.createElement(Instruction, null, React.createElement(Alert, {
|
|
46
47
|
icon: React.createElement(SvgWarningCircle, null),
|
|
47
48
|
alertMessage: instructions,
|
|
@@ -52,9 +53,9 @@ const SummaryCard = React.forwardRef(function AssetSummaryCard(_ref, forwardedRe
|
|
|
52
53
|
width: width,
|
|
53
54
|
lineClamp: 1
|
|
54
55
|
})), shouldAddGutterAfterInstructions && React.createElement(Gutter, {
|
|
55
|
-
gutter: 16
|
|
56
|
+
$gutter: 16
|
|
56
57
|
}), shouldRenderFooter && React.createElement(Footer, null, React.createElement(FooterLeft, null, footerLeft), React.createElement(FooterRight, null, footerRight)), shouldRenderFooter && React.createElement(Gutter, {
|
|
57
|
-
gutter: 16
|
|
58
|
+
$gutter: 16
|
|
58
59
|
}));
|
|
59
60
|
});
|
|
60
61
|
SummaryCard.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -12,12 +12,17 @@ let _ = t => t,
|
|
|
12
12
|
_t7,
|
|
13
13
|
_t8,
|
|
14
14
|
_t9,
|
|
15
|
+
_t0,
|
|
16
|
+
_t1,
|
|
15
17
|
_t10,
|
|
16
18
|
_t11,
|
|
17
|
-
_t12
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
_t12;
|
|
20
|
+
const shouldForwardProp = prop => {
|
|
21
|
+
return prop !== 'theme' && !prop.startsWith('$');
|
|
22
|
+
};
|
|
23
|
+
const SummaryCard = styled.div.withConfig({
|
|
24
|
+
shouldForwardProp
|
|
25
|
+
}).attrs(applyDefaultTheme)(_t || (_t = _`
|
|
21
26
|
display: flex;
|
|
22
27
|
flex-direction: column;
|
|
23
28
|
border-radius: 4px;
|
|
@@ -25,28 +30,34 @@ const SummaryCard = styled.div.attrs(applyDefaultTheme)(_t || (_t = _`
|
|
|
25
30
|
${0};
|
|
26
31
|
|
|
27
32
|
${0}
|
|
28
|
-
`), props => props.width ? `${props.width}px` : '100%', props => props.compact ? props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('white')) : 'background: transparent', props => props
|
|
29
|
-
const Gutter = styled.div.
|
|
33
|
+
`), props => props.width ? `${props.width}px` : '100%', props => props.view === 'compact' ? props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('white')) : 'background: transparent', props => props.$useBorder ? props.theme.themeProp('border', `1px solid ${props.theme.getColor('gray-500')}`, `1px solid ${props.theme.getColor('gray-300')}`) : null);
|
|
34
|
+
const Gutter = styled.div.withConfig({
|
|
35
|
+
shouldForwardProp
|
|
36
|
+
}).attrs(applyDefaultTheme)(_t2 || (_t2 = _`
|
|
30
37
|
${0}
|
|
31
38
|
padding-bottom: ${0}px;
|
|
32
39
|
`), props => {
|
|
33
40
|
if (props.renderAsMargin) {
|
|
34
41
|
return css(_t3 || (_t3 = _`
|
|
35
42
|
margin-bottom: ${0}px;
|
|
36
|
-
`), props
|
|
43
|
+
`), props.$gutter || 8);
|
|
37
44
|
} else {
|
|
38
45
|
return css(_t4 || (_t4 = _`
|
|
39
46
|
padding-bottom: ${0}px;
|
|
40
|
-
`), props
|
|
47
|
+
`), props.$gutter || 8);
|
|
41
48
|
}
|
|
42
|
-
}, props => props
|
|
43
|
-
const Header = styled.div.
|
|
49
|
+
}, props => props.$gutter || 8);
|
|
50
|
+
const Header = styled.div.withConfig({
|
|
51
|
+
shouldForwardProp
|
|
52
|
+
}).attrs(applyDefaultTheme)(_t5 || (_t5 = _`
|
|
44
53
|
display: flex;
|
|
45
54
|
align-items: center;
|
|
46
55
|
justify-content: space-between;
|
|
47
56
|
padding: 0 16px;
|
|
48
57
|
`));
|
|
49
|
-
const HeaderLeft = styled.div.
|
|
58
|
+
const HeaderLeft = styled.div.withConfig({
|
|
59
|
+
shouldForwardProp
|
|
60
|
+
}).attrs(applyDefaultTheme)(_t6 || (_t6 = _`
|
|
50
61
|
display: flex;
|
|
51
62
|
align-items: center;
|
|
52
63
|
justify-content: flex-start;
|
|
@@ -55,7 +66,9 @@ const HeaderLeft = styled.div.attrs(applyDefaultTheme)(_t6 || (_t6 = _`
|
|
|
55
66
|
margin-right: 4px;
|
|
56
67
|
}
|
|
57
68
|
`));
|
|
58
|
-
const HeaderRight = styled.div.
|
|
69
|
+
const HeaderRight = styled.div.withConfig({
|
|
70
|
+
shouldForwardProp
|
|
71
|
+
}).attrs(applyDefaultTheme)(_t7 || (_t7 = _`
|
|
59
72
|
display: flex;
|
|
60
73
|
align-items: center;
|
|
61
74
|
justify-content: flex-end;
|
|
@@ -64,7 +77,9 @@ const HeaderRight = styled.div.attrs(applyDefaultTheme)(_t7 || (_t7 = _`
|
|
|
64
77
|
margin-left: 4px;
|
|
65
78
|
}
|
|
66
79
|
`));
|
|
67
|
-
const Title = styled.span.
|
|
80
|
+
const Title = styled.span.withConfig({
|
|
81
|
+
shouldForwardProp
|
|
82
|
+
}).attrs(applyDefaultTheme)(_t8 || (_t8 = _`
|
|
68
83
|
display: inline-block;
|
|
69
84
|
padding: 0 16px;
|
|
70
85
|
font: normal normal 500 14px/19px Roboto;
|
|
@@ -78,7 +93,9 @@ const Title = styled.span.attrs(applyDefaultTheme)(_t8 || (_t8 = _`
|
|
|
78
93
|
|
|
79
94
|
${0};
|
|
80
95
|
`), props => props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700')));
|
|
81
|
-
const Description = styled.span.
|
|
96
|
+
const Description = styled.span.withConfig({
|
|
97
|
+
shouldForwardProp
|
|
98
|
+
}).attrs(applyDefaultTheme)(_t9 || (_t9 = _`
|
|
82
99
|
padding: 0 16px;
|
|
83
100
|
text-align: left;
|
|
84
101
|
font: normal normal normal 12px/16px Roboto;
|
|
@@ -92,14 +109,20 @@ const Description = styled.span.attrs(applyDefaultTheme)(_t9 || (_t9 = _`
|
|
|
92
109
|
|
|
93
110
|
${0};
|
|
94
111
|
`), props => props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700')));
|
|
95
|
-
const Instruction = styled.div.
|
|
96
|
-
|
|
112
|
+
const Instruction = styled.div.withConfig({
|
|
113
|
+
shouldForwardProp
|
|
114
|
+
}).attrs(applyDefaultTheme)(_t0 || (_t0 = _``));
|
|
115
|
+
const Footer = styled.div.withConfig({
|
|
116
|
+
shouldForwardProp
|
|
117
|
+
}).attrs(applyDefaultTheme)(_t1 || (_t1 = _`
|
|
97
118
|
display: flex;
|
|
98
119
|
align-items: center;
|
|
99
120
|
justify-content: space-between;
|
|
100
121
|
padding: 0 16px;
|
|
101
122
|
`));
|
|
102
|
-
const FooterLeft = styled.div.
|
|
123
|
+
const FooterLeft = styled.div.withConfig({
|
|
124
|
+
shouldForwardProp
|
|
125
|
+
}).attrs(applyDefaultTheme)(_t10 || (_t10 = _`
|
|
103
126
|
display: flex;
|
|
104
127
|
align-items: center;
|
|
105
128
|
justify-content: flex-start;
|
|
@@ -108,7 +131,9 @@ const FooterLeft = styled.div.attrs(applyDefaultTheme)(_t12 || (_t12 = _`
|
|
|
108
131
|
margin-right: 4px;
|
|
109
132
|
}
|
|
110
133
|
`));
|
|
111
|
-
const FooterRight = styled.div.
|
|
134
|
+
const FooterRight = styled.div.withConfig({
|
|
135
|
+
shouldForwardProp
|
|
136
|
+
}).attrs(applyDefaultTheme)(_t11 || (_t11 = _`
|
|
112
137
|
display: flex;
|
|
113
138
|
align-items: center;
|
|
114
139
|
justify-content: flex-end;
|
|
@@ -117,7 +142,9 @@ const FooterRight = styled.div.attrs(applyDefaultTheme)(_t13 || (_t13 = _`
|
|
|
117
142
|
margin-left: 4px;
|
|
118
143
|
}
|
|
119
144
|
`));
|
|
120
|
-
styled(FloatingArrow).
|
|
145
|
+
styled(FloatingArrow).withConfig({
|
|
146
|
+
shouldForwardProp
|
|
147
|
+
}).attrs(applyDefaultTheme)(_t12 || (_t12 = _`
|
|
121
148
|
${0}
|
|
122
149
|
`), props => props.theme.themeProp('fill', props.theme.getColor('gray-700'), props.theme.getColor('white')));
|
|
123
150
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { default as AssetGallery } from '../AssetGallery/AssetGallery.js';
|
|
2
2
|
export { default as ContextMenu } from '../ContextMenu/ContextMenu.js';
|
|
3
3
|
export { default as AssetPreviewTopBar } from '../AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js';
|
|
4
|
-
export { default as Instructions } from '../Instructions/Instructions.js';
|
|
5
4
|
export { default as SummaryCard } from '../SummaryCard/SummaryCard.js';
|
|
6
5
|
export { default as AssetActionBase } from '../AssetActionsBase/AssetActionsBase.js';
|
|
7
6
|
export { default as AssetAction } from '../AssetAction/AssetAction.js';
|
package/esm/node_modules/@emotion/cache/dist/{emotion-cache.browser.esm.js → emotion-cache.esm.js}
RENAMED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { StyleSheet } from '../../sheet/dist/emotion-sheet.esm.js';
|
|
2
|
+
import weakMemoize from '../../weak-memoize/dist/emotion-weak-memoize.esm.js';
|
|
3
|
+
import memoize from '../../memoize/dist/emotion-memoize.esm.js';
|
|
2
4
|
import { middleware, rulesheet } from '../../../stylis/src/Middleware.js';
|
|
3
5
|
import { RULESET, KEYFRAMES, DECLARATION, WEBKIT, MS, MOZ } from '../../../stylis/src/Enum.js';
|
|
4
6
|
import { combine, replace, hash, charat, strlen, indexof, match, from } from '../../../stylis/src/Utility.js';
|
|
@@ -6,6 +8,8 @@ import { serialize, stringify } from '../../../stylis/src/Serializer.js';
|
|
|
6
8
|
import { copy, dealloc, alloc, next, token, peek, delimit, slice, position } from '../../../stylis/src/Tokenizer.js';
|
|
7
9
|
import { compile } from '../../../stylis/src/Parser.js';
|
|
8
10
|
|
|
11
|
+
var isBrowser = typeof document !== 'undefined';
|
|
12
|
+
|
|
9
13
|
var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
|
|
10
14
|
var previous = 0;
|
|
11
15
|
var character = 0;
|
|
@@ -343,12 +347,17 @@ var prefixer = function prefixer(element, index, children, callback) {
|
|
|
343
347
|
}
|
|
344
348
|
};
|
|
345
349
|
|
|
350
|
+
var getServerStylisCache = isBrowser ? undefined : weakMemoize(function () {
|
|
351
|
+
return memoize(function () {
|
|
352
|
+
return {};
|
|
353
|
+
});
|
|
354
|
+
});
|
|
346
355
|
var defaultStylisPlugins = [prefixer];
|
|
347
356
|
|
|
348
357
|
var createCache = function createCache(options) {
|
|
349
358
|
var key = options.key;
|
|
350
359
|
|
|
351
|
-
if (key === 'css') {
|
|
360
|
+
if (isBrowser && key === 'css') {
|
|
352
361
|
var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration
|
|
353
362
|
// document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
|
|
354
363
|
// note this very very intentionally targets all style elements regardless of the key to ensure
|
|
@@ -378,7 +387,7 @@ var createCache = function createCache(options) {
|
|
|
378
387
|
var container;
|
|
379
388
|
var nodesToHydrate = [];
|
|
380
389
|
|
|
381
|
-
{
|
|
390
|
+
if (isBrowser) {
|
|
382
391
|
container = options.container || document.head;
|
|
383
392
|
Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
|
|
384
393
|
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
@@ -397,7 +406,7 @@ var createCache = function createCache(options) {
|
|
|
397
406
|
|
|
398
407
|
var omnipresentPlugins = [compat, removeLabel];
|
|
399
408
|
|
|
400
|
-
{
|
|
409
|
+
if (!getServerStylisCache) {
|
|
401
410
|
var currentSheet;
|
|
402
411
|
var finalizingPlugins = [stringify, rulesheet(function (rule) {
|
|
403
412
|
currentSheet.insert(rule);
|
|
@@ -417,6 +426,55 @@ var createCache = function createCache(options) {
|
|
|
417
426
|
cache.inserted[serialized.name] = true;
|
|
418
427
|
}
|
|
419
428
|
};
|
|
429
|
+
} else {
|
|
430
|
+
var _finalizingPlugins = [stringify];
|
|
431
|
+
|
|
432
|
+
var _serializer = middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
|
|
433
|
+
|
|
434
|
+
var _stylis = function _stylis(styles) {
|
|
435
|
+
return serialize(compile(styles), _serializer);
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
|
|
439
|
+
|
|
440
|
+
var getRules = function getRules(selector, serialized) {
|
|
441
|
+
var name = serialized.name;
|
|
442
|
+
|
|
443
|
+
if (serverStylisCache[name] === undefined) {
|
|
444
|
+
serverStylisCache[name] = _stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
return serverStylisCache[name];
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
_insert = function _insert(selector, serialized, sheet, shouldCache) {
|
|
451
|
+
var name = serialized.name;
|
|
452
|
+
var rules = getRules(selector, serialized);
|
|
453
|
+
|
|
454
|
+
if (cache.compat === undefined) {
|
|
455
|
+
// in regular mode, we don't set the styles on the inserted cache
|
|
456
|
+
// since we don't need to and that would be wasting memory
|
|
457
|
+
// we return them so that they are rendered in a style tag
|
|
458
|
+
if (shouldCache) {
|
|
459
|
+
cache.inserted[name] = true;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
return rules;
|
|
463
|
+
} else {
|
|
464
|
+
// in compat mode, we put the styles on the inserted cache so
|
|
465
|
+
// that emotion-server can pull out the styles
|
|
466
|
+
// except when we don't want to cache it which was in Global but now
|
|
467
|
+
// is nowhere but we don't want to do a major right now
|
|
468
|
+
// and just in case we're going to leave the case here
|
|
469
|
+
// it's also not affecting client side bundle size
|
|
470
|
+
// so it's really not a big deal
|
|
471
|
+
if (shouldCache) {
|
|
472
|
+
cache.inserted[name] = rules;
|
|
473
|
+
} else {
|
|
474
|
+
return rules;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
};
|
|
420
478
|
}
|
|
421
479
|
|
|
422
480
|
var cache = {
|