@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
|
@@ -10,7 +10,12 @@ let _ = t => t,
|
|
|
10
10
|
_t6,
|
|
11
11
|
_t7,
|
|
12
12
|
_t8;
|
|
13
|
-
const
|
|
13
|
+
const shouldForwardProp = prop => {
|
|
14
|
+
return prop !== 'theme' && !prop.startsWith('$');
|
|
15
|
+
};
|
|
16
|
+
const Badge = styled.span.withConfig({
|
|
17
|
+
shouldForwardProp
|
|
18
|
+
}).attrs(applyDefaultTheme)(_t || (_t = _`
|
|
14
19
|
align-content: center;
|
|
15
20
|
display: ${0};
|
|
16
21
|
font-family: ${0};
|
|
@@ -19,13 +24,17 @@ const Badge = styled.span.attrs(applyDefaultTheme)(_t || (_t = _`
|
|
|
19
24
|
min-height: 24px;
|
|
20
25
|
position: relative;
|
|
21
26
|
width: ${0};
|
|
22
|
-
`), props => props
|
|
23
|
-
const BadgeChildrenContainer = styled.span.
|
|
27
|
+
`), props => props.$elevated || !props.$hasChildren ? 'inline-flex' : 'flex', props => props.theme.primaryFontFamily, props => props.$elevated ? 'fit-content' : 'initial');
|
|
28
|
+
const BadgeChildrenContainer = styled.span.withConfig({
|
|
29
|
+
shouldForwardProp
|
|
30
|
+
}).attrs(applyDefaultTheme)(_t2 || (_t2 = _`
|
|
24
31
|
align-self: center;
|
|
25
32
|
height: fit-content;
|
|
26
33
|
margin-right: 8px;
|
|
27
34
|
`));
|
|
28
|
-
const BadgeLabel = styled.span.
|
|
35
|
+
const BadgeLabel = styled.span.withConfig({
|
|
36
|
+
shouldForwardProp
|
|
37
|
+
}).attrs(applyDefaultTheme)(_t3 || (_t3 = _`
|
|
29
38
|
border-radius: ${0};
|
|
30
39
|
display: flex;
|
|
31
40
|
align-items: center;
|
|
@@ -54,29 +63,29 @@ const BadgeLabel = styled.span.attrs(applyDefaultTheme)(_t3 || (_t3 = _`
|
|
|
54
63
|
${0}
|
|
55
64
|
|
|
56
65
|
${0}
|
|
57
|
-
`), props => props
|
|
66
|
+
`), props => props.$elevated ? '12px' : '14px', props => {
|
|
58
67
|
if (props.fontSize) {
|
|
59
68
|
return `${props.fontSize}px`;
|
|
60
69
|
} else {
|
|
61
70
|
return props.elevated ? '0.625rem' : '0.750rem';
|
|
62
71
|
}
|
|
63
|
-
}, props => props.fontWeight ? props.fontWeight : 'normal', props => props
|
|
72
|
+
}, props => props.fontWeight ? props.fontWeight : 'normal', props => props.$lineHeight ? `${props.$lineHeight}px` : 'normal', props => props.height ? `${props.height}px` : 'fit-content', props => props.$elevated ? '15px' : 'auto', props => props.$elevated ? 'absolute' : 'initial', props => props.$elevated ? 'translate(33%, -8px)' : 'initial', props => props.width ? css(_t4 || (_t4 = _`
|
|
64
73
|
width: ${0}px;
|
|
65
|
-
`), props.width) : null, props => props
|
|
74
|
+
`), props.width) : null, props => props.$minWidth ? css(_t5 || (_t5 = _`
|
|
66
75
|
min-width: ${0}px;
|
|
67
|
-
`), props
|
|
76
|
+
`), props.$minWidth) : null, props => props.minHeight ? css(_t6 || (_t6 = _`
|
|
68
77
|
min-height: ${0}px;
|
|
69
78
|
`), props.minHeight) : null, props => {
|
|
70
|
-
const verticalPadding = props.verticalPadding ? `${props.verticalPadding}px` : props
|
|
71
|
-
const horizontalPadding = props
|
|
79
|
+
const verticalPadding = props.verticalPadding ? `${props.verticalPadding}px` : props.$elevated ? '4px' : '6px';
|
|
80
|
+
const horizontalPadding = props.$horizontalPadding ? `${props.$horizontalPadding}px` : props.$elevated ? '7px' : '10px';
|
|
72
81
|
return css(_t7 || (_t7 = _`
|
|
73
82
|
padding: ${0} ${0};
|
|
74
83
|
`), verticalPadding, horizontalPadding);
|
|
75
84
|
}, props => props.theme.themeProp('background', () => {
|
|
76
85
|
var _props$backgroundColo, _props$backgroundColo2;
|
|
77
|
-
const active = props
|
|
78
|
-
const error = props
|
|
79
|
-
const warning = props
|
|
86
|
+
const active = props.$active;
|
|
87
|
+
const error = props.$error;
|
|
88
|
+
const warning = props.$warning;
|
|
80
89
|
const defaultBgColor = (_props$backgroundColo = props === null || props === void 0 || (_props$backgroundColo2 = props.backgroundColors) === null || _props$backgroundColo2 === void 0 ? void 0 : _props$backgroundColo2[0]) !== null && _props$backgroundColo !== void 0 ? _props$backgroundColo : props.theme.getColor('gray-600');
|
|
81
90
|
switch (true) {
|
|
82
91
|
case !error && !warning && !active:
|
|
@@ -95,11 +104,11 @@ const BadgeLabel = styled.span.attrs(applyDefaultTheme)(_t3 || (_t3 = _`
|
|
|
95
104
|
return props.theme.getColor('gray-600');
|
|
96
105
|
}
|
|
97
106
|
}, () => {
|
|
98
|
-
var _props
|
|
99
|
-
const active = props
|
|
100
|
-
const error = props
|
|
101
|
-
const warning = props
|
|
102
|
-
const defaultBgColor = (_props
|
|
107
|
+
var _props$$backgroundCol, _props$$backgroundCol2;
|
|
108
|
+
const active = props.$active;
|
|
109
|
+
const error = props.$error;
|
|
110
|
+
const warning = props.$warning;
|
|
111
|
+
const defaultBgColor = (_props$$backgroundCol = props === null || props === void 0 || (_props$$backgroundCol2 = props.$backgroundColors) === null || _props$$backgroundCol2 === void 0 ? void 0 : _props$$backgroundCol2[1]) !== null && _props$$backgroundCol !== void 0 ? _props$$backgroundCol : props.theme.getColor('gray-200');
|
|
103
112
|
switch (true) {
|
|
104
113
|
case !error && !warning && !active:
|
|
105
114
|
return defaultBgColor;
|
|
@@ -117,29 +126,31 @@ const BadgeLabel = styled.span.attrs(applyDefaultTheme)(_t3 || (_t3 = _`
|
|
|
117
126
|
return props.theme.getColor('gray-200');
|
|
118
127
|
}
|
|
119
128
|
}), props => props.theme.themeProp('color', () => {
|
|
120
|
-
var _props
|
|
121
|
-
const defaultColor = (_props
|
|
122
|
-
if (props
|
|
129
|
+
var _props$$colors$, _props$$colors;
|
|
130
|
+
const defaultColor = (_props$$colors$ = props === null || props === void 0 || (_props$$colors = props.$colors) === null || _props$$colors === void 0 ? void 0 : _props$$colors[0]) !== null && _props$$colors$ !== void 0 ? _props$$colors$ : props.theme.getColor('white');
|
|
131
|
+
if (props.$warning && !props.$error || props.error && !props.$active) {
|
|
123
132
|
return props.theme.getColor('gray-900');
|
|
124
133
|
} else {
|
|
125
134
|
return defaultColor;
|
|
126
135
|
}
|
|
127
136
|
}, () => {
|
|
128
|
-
var _props
|
|
129
|
-
const defaultColor = (_props
|
|
130
|
-
if (props
|
|
137
|
+
var _props$$colors$2, _props$$colors2;
|
|
138
|
+
const defaultColor = (_props$$colors$2 = props === null || props === void 0 || (_props$$colors2 = props.$colors) === null || _props$$colors2 === void 0 ? void 0 : _props$$colors2[1]) !== null && _props$$colors$2 !== void 0 ? _props$$colors$2 : props.theme.getColor('gray-900');
|
|
139
|
+
if (props.$error && props.$active) {
|
|
131
140
|
return props.theme.getColor('white');
|
|
132
141
|
} else {
|
|
133
142
|
return defaultColor;
|
|
134
143
|
}
|
|
135
144
|
}));
|
|
136
|
-
const BadgeIcon = styled.span.
|
|
145
|
+
const BadgeIcon = styled.span.withConfig({
|
|
146
|
+
shouldForwardProp
|
|
147
|
+
}).attrs(applyDefaultTheme)(_t8 || (_t8 = _`
|
|
137
148
|
display: flex;
|
|
138
149
|
align-items: center;
|
|
139
150
|
margin-right: ${0};
|
|
140
151
|
svg {
|
|
141
152
|
height: 12px;
|
|
142
153
|
}
|
|
143
|
-
`), props => props
|
|
154
|
+
`), props => props.$useGutter ? '4px' : 0);
|
|
144
155
|
|
|
145
156
|
export { Badge, BadgeChildrenContainer, BadgeIcon, BadgeLabel };
|
|
@@ -35,6 +35,8 @@ const Popover = React.forwardRef(function Popover(_ref, ref) {
|
|
|
35
35
|
});
|
|
36
36
|
}));
|
|
37
37
|
};
|
|
38
|
+
const eventHandlerProps = ['onClick', 'onChange', 'onSubmit'];
|
|
39
|
+
const filteredProps = Object.fromEntries(Object.entries(props).filter(([key]) => !eventHandlerProps.includes(key)));
|
|
38
40
|
return React.createElement("div", null, React.createElement(Popover$2, _extends({
|
|
39
41
|
ref: ref,
|
|
40
42
|
content: content,
|
|
@@ -70,9 +72,9 @@ const Popover = React.forwardRef(function Popover(_ref, ref) {
|
|
|
70
72
|
}
|
|
71
73
|
}, ...modifiers]
|
|
72
74
|
},
|
|
73
|
-
|
|
75
|
+
onShow: contextMenu ? handleContextMenuItemClick : undefined,
|
|
74
76
|
maxWidth: maxWidth
|
|
75
|
-
},
|
|
77
|
+
}, filteredProps), children));
|
|
76
78
|
});
|
|
77
79
|
Popover.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
78
80
|
content: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,
|
|
@@ -3,7 +3,12 @@ import { applyDefaultTheme } from '../../../utils/defaultTheme.js';
|
|
|
3
3
|
|
|
4
4
|
let _ = t => t,
|
|
5
5
|
_t;
|
|
6
|
-
const
|
|
6
|
+
const shouldForwardProp = prop => {
|
|
7
|
+
return prop !== 'theme' && !prop.startsWith('$');
|
|
8
|
+
};
|
|
9
|
+
const Tab = styled.p.withConfig({
|
|
10
|
+
shouldForwardProp
|
|
11
|
+
}).attrs(applyDefaultTheme)(_t || (_t = _`
|
|
7
12
|
font-family: ${0};
|
|
8
13
|
font-size: 1rem;
|
|
9
14
|
font-weight: 500;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
1
|
+
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends, objectSpread2 as _objectSpread2 } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import { isEmpty, isNil } from 'lodash';
|
|
3
3
|
import PropTypes from '../../../node_modules/prop-types/index.js';
|
|
4
4
|
import React from '../../../node_modules/react/index.js';
|
|
@@ -6,12 +6,13 @@ import { Tabs as Tabs$2, TabHeaders, TabHeader, TabHeaderBorder, TabContent } fr
|
|
|
6
6
|
import { r as react } from '../../../_virtual/index.js';
|
|
7
7
|
import Tab from '../Tab/Tab.js';
|
|
8
8
|
|
|
9
|
-
const _excluded = ["children", "defaultMinHeight", "customPadding"];
|
|
9
|
+
const _excluded = ["children", "defaultMinHeight", "customPadding", "onTabClick"];
|
|
10
10
|
const Tabs = React.forwardRef(function Tabs(_ref, forwardedRef) {
|
|
11
11
|
let {
|
|
12
12
|
children,
|
|
13
|
-
defaultMinHeight,
|
|
14
|
-
customPadding
|
|
13
|
+
defaultMinHeight = '',
|
|
14
|
+
customPadding = 0,
|
|
15
|
+
onTabClick = () => {}
|
|
15
16
|
} = _ref,
|
|
16
17
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
18
|
const [activeTab, setActiveTab] = react.exports.useState(0);
|
|
@@ -48,20 +49,32 @@ const Tabs = React.forwardRef(function Tabs(_ref, forwardedRef) {
|
|
|
48
49
|
}
|
|
49
50
|
return tabs;
|
|
50
51
|
}, [children]);
|
|
52
|
+
const handleTabClick = tab => {
|
|
53
|
+
setActiveTab(tab.key);
|
|
54
|
+
let triggerText = '';
|
|
55
|
+
if (tab.trigger && tab.trigger.props && tab.trigger.props.children) {
|
|
56
|
+
triggerText = tab.trigger.props.children;
|
|
57
|
+
}
|
|
58
|
+
if (onTabClick) {
|
|
59
|
+
onTabClick(_objectSpread2(_objectSpread2({}, tab), {}, {
|
|
60
|
+
triggerText: triggerText
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
};
|
|
51
64
|
return React.createElement(Tabs$2, _extends({
|
|
52
65
|
ref: forwardedRef
|
|
53
66
|
}, props, {
|
|
54
67
|
role: "tablist"
|
|
55
68
|
}), React.createElement(TabHeaders, {
|
|
56
|
-
|
|
69
|
+
custompadding: customPadding
|
|
57
70
|
}, tabs.map(tab => React.createElement(TabHeader, {
|
|
58
71
|
key: tab.key,
|
|
59
72
|
hidden: tab.hidden,
|
|
60
|
-
active: tab.key === activeTab,
|
|
61
|
-
onClick: () =>
|
|
73
|
+
$active: tab.key === activeTab,
|
|
74
|
+
onClick: () => handleTabClick(tab),
|
|
62
75
|
role: "tab"
|
|
63
76
|
}, tab.trigger))), React.createElement(TabHeaderBorder, {
|
|
64
|
-
|
|
77
|
+
custompadding: customPadding
|
|
65
78
|
}), React.createElement(TabContent, null, tabs.map(tab => React.createElement("div", {
|
|
66
79
|
ref: tab.key === (activeTab === null || activeTab === void 0 ? void 0 : activeTab.key) ? contentRef : null,
|
|
67
80
|
key: tab.key,
|
|
@@ -72,15 +85,12 @@ const Tabs = React.forwardRef(function Tabs(_ref, forwardedRef) {
|
|
|
72
85
|
}
|
|
73
86
|
}, tab.content))));
|
|
74
87
|
});
|
|
75
|
-
Tabs.defaultProps = {
|
|
76
|
-
defaultMinHeight: '',
|
|
77
|
-
customPadding: 0
|
|
78
|
-
};
|
|
79
88
|
Tabs.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
80
89
|
children: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),
|
|
81
90
|
backgroundColor: PropTypes.string,
|
|
82
91
|
defaultMinHeight: PropTypes.string,
|
|
83
|
-
customPadding: PropTypes.string
|
|
92
|
+
customPadding: PropTypes.string,
|
|
93
|
+
onTabClick: PropTypes.func
|
|
84
94
|
} : {};
|
|
85
95
|
var Tabs$1 = Tabs;
|
|
86
96
|
|
|
@@ -11,16 +11,23 @@ let _ = t => t,
|
|
|
11
11
|
_t7,
|
|
12
12
|
_t8,
|
|
13
13
|
_t9,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
14
|
+
_t0,
|
|
15
|
+
_t1;
|
|
16
|
+
const shouldForwardProp = prop => {
|
|
17
|
+
return prop !== 'theme' && !prop.startsWith('$');
|
|
18
|
+
};
|
|
19
|
+
const Tabs = styled.div.withConfig({
|
|
20
|
+
shouldForwardProp
|
|
21
|
+
}).attrs(applyDefaultTheme)(_t || (_t = _`
|
|
17
22
|
display: block;
|
|
18
23
|
position: relative;
|
|
19
24
|
${0};
|
|
20
25
|
`), props => props.backgroundColor && css(_t2 || (_t2 = _`
|
|
21
26
|
background-color: ${0};
|
|
22
27
|
`), props.backgroundColor));
|
|
23
|
-
const TabHeaders = styled.ul.
|
|
28
|
+
const TabHeaders = styled.ul.withConfig({
|
|
29
|
+
shouldForwardProp
|
|
30
|
+
}).attrs(applyDefaultTheme)(_t3 || (_t3 = _`
|
|
24
31
|
display: flex;
|
|
25
32
|
overflow-x: auto;
|
|
26
33
|
overflow-y: hidden;
|
|
@@ -30,12 +37,14 @@ const TabHeaders = styled.ul.attrs(applyDefaultTheme)(_t3 || (_t3 = _`
|
|
|
30
37
|
margin: 0;
|
|
31
38
|
${0};
|
|
32
39
|
${0};
|
|
33
|
-
`), props => !props.
|
|
40
|
+
`), props => !props.custompadding && css(_t4 || (_t4 = _`
|
|
34
41
|
padding: 0;
|
|
35
|
-
`)), props => props.
|
|
42
|
+
`)), props => props.custompadding && css(_t5 || (_t5 = _`
|
|
36
43
|
padding: 0 ${0};
|
|
37
|
-
`), props.
|
|
38
|
-
const TabHeader = styled.li.
|
|
44
|
+
`), props.custompadding));
|
|
45
|
+
const TabHeader = styled.li.withConfig({
|
|
46
|
+
shouldForwardProp
|
|
47
|
+
}).attrs(applyDefaultTheme)(_t6 || (_t6 = _`
|
|
39
48
|
font-family: ${0};
|
|
40
49
|
text-transform: uppercase;
|
|
41
50
|
font-weight: 600;
|
|
@@ -52,34 +61,38 @@ const TabHeader = styled.li.attrs(applyDefaultTheme)(_t6 || (_t6 = _`
|
|
|
52
61
|
&&:hover:not(:focus) {
|
|
53
62
|
${0};
|
|
54
63
|
}
|
|
55
|
-
`), props => props.theme.secondaryFontFamily, props => props
|
|
64
|
+
`), props => props.theme.secondaryFontFamily, props => props.$active && css(_t7 || (_t7 = _`
|
|
56
65
|
${0}
|
|
57
66
|
`), props => props.theme.themeProp('border-color', props.theme.getColor('gray-400'), props.theme.getColor('gray-700'))), props => props.theme.themeProp('border-color', () => {
|
|
58
|
-
if (props
|
|
67
|
+
if (props.$active) {
|
|
59
68
|
return props.theme.getColor('gray-400');
|
|
60
69
|
} else {
|
|
61
70
|
return props.theme.getColor('gray-400');
|
|
62
71
|
}
|
|
63
72
|
}, () => {
|
|
64
|
-
if (props
|
|
73
|
+
if (props.$active) {
|
|
65
74
|
return props.theme.getColor('gray-700');
|
|
66
75
|
} else {
|
|
67
76
|
return props.theme.getColor('gray-700');
|
|
68
77
|
}
|
|
69
78
|
}));
|
|
70
|
-
const TabContent = styled.div.
|
|
79
|
+
const TabContent = styled.div.withConfig({
|
|
80
|
+
shouldForwardProp
|
|
81
|
+
}).attrs(applyDefaultTheme)(_t8 || (_t8 = _`
|
|
71
82
|
display: block;
|
|
72
83
|
`));
|
|
73
|
-
const TabHeaderBorder = styled.div.
|
|
84
|
+
const TabHeaderBorder = styled.div.withConfig({
|
|
85
|
+
shouldForwardProp
|
|
86
|
+
}).attrs(applyDefaultTheme)(_t9 || (_t9 = _`
|
|
74
87
|
border-top: 1px solid;
|
|
75
88
|
|
|
76
89
|
${0};
|
|
77
90
|
${0};
|
|
78
91
|
${0};
|
|
79
|
-
`), props => props.theme.themeProp('border-color', props.theme.getColor('gray-600'), '#F0F2F5'), props => !props.
|
|
92
|
+
`), props => props.theme.themeProp('border-color', props.theme.getColor('gray-600'), '#F0F2F5'), props => !props.custompadding && css(_t0 || (_t0 = _`
|
|
80
93
|
margin: -2px 0;
|
|
81
|
-
`)), props => props.
|
|
94
|
+
`)), props => props.custompadding && css(_t1 || (_t1 = _`
|
|
82
95
|
margin: -2px ${0};
|
|
83
|
-
`), props.
|
|
96
|
+
`), props.custompadding));
|
|
84
97
|
|
|
85
98
|
export { TabContent, TabHeader, TabHeaderBorder, TabHeaders, Tabs };
|
|
@@ -15,6 +15,8 @@ const Tooltip = React.forwardRef(function Tooltip(_ref, ref) {
|
|
|
15
15
|
children
|
|
16
16
|
} = _ref,
|
|
17
17
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
|
+
const eventHandlerProps = ['onClick', 'onChange', 'onSubmit'];
|
|
19
|
+
const filteredProps = Object.fromEntries(Object.entries(props).filter(([key]) => !eventHandlerProps.includes(key)));
|
|
18
20
|
return React.createElement("div", null, React.createElement(Tooltip$2, _extends({
|
|
19
21
|
ref: ref,
|
|
20
22
|
content: content,
|
|
@@ -24,7 +26,7 @@ const Tooltip = React.forwardRef(function Tooltip(_ref, ref) {
|
|
|
24
26
|
trigger: trigger,
|
|
25
27
|
visible: visible,
|
|
26
28
|
animation: 'shift-away-subtle'
|
|
27
|
-
},
|
|
29
|
+
}, filteredProps), children));
|
|
28
30
|
});
|
|
29
31
|
Tooltip.defaultProps = {
|
|
30
32
|
content: 'Tooltip',
|
|
@@ -13,15 +13,15 @@ const VerificationStatusIcon = React.forwardRef(function VerificationStatusIcon(
|
|
|
13
13
|
} = _ref,
|
|
14
14
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
15
15
|
return React.createElement(VerificationIconWrapper, {
|
|
16
|
-
background: background
|
|
16
|
+
$background: background
|
|
17
17
|
}, React.createElement(VerificationStatusIcon$2, _extends({
|
|
18
|
-
iconHeight: iconHeight,
|
|
19
|
-
background: background,
|
|
18
|
+
$iconHeight: iconHeight,
|
|
19
|
+
$background: background,
|
|
20
20
|
ref: forwardedRef
|
|
21
21
|
}, props), React.createElement(SvgVerification, null), React.createElement(VerificationStatusColor, {
|
|
22
|
-
iconHeight: iconHeight,
|
|
23
|
-
status: status,
|
|
24
|
-
background: background
|
|
22
|
+
$iconHeight: iconHeight,
|
|
23
|
+
$status: status,
|
|
24
|
+
$background: background
|
|
25
25
|
})));
|
|
26
26
|
});
|
|
27
27
|
VerificationStatusIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -6,16 +6,23 @@ let _ = t => t,
|
|
|
6
6
|
_t2,
|
|
7
7
|
_t3,
|
|
8
8
|
_t4;
|
|
9
|
-
const
|
|
9
|
+
const shouldForwardProp = prop => {
|
|
10
|
+
return prop !== 'theme' && !prop.startsWith('$');
|
|
11
|
+
};
|
|
12
|
+
const VerificationIconWrapper = styled.div.withConfig({
|
|
13
|
+
shouldForwardProp
|
|
14
|
+
}).attrs(applyDefaultTheme)(_t || (_t = _`
|
|
10
15
|
${0};
|
|
11
|
-
`), props => props
|
|
16
|
+
`), props => props.$background && css(_t2 || (_t2 = _`
|
|
12
17
|
background-color: #000 !important;
|
|
13
18
|
width: fit-content;
|
|
14
19
|
padding: 6px 14px 6px 9px;
|
|
15
20
|
border-radius: 15px;
|
|
16
21
|
}
|
|
17
22
|
`)));
|
|
18
|
-
const VerificationStatusIcon = styled.div.
|
|
23
|
+
const VerificationStatusIcon = styled.div.withConfig({
|
|
24
|
+
shouldForwardProp
|
|
25
|
+
}).attrs(applyDefaultTheme)(_t3 || (_t3 = _`
|
|
19
26
|
display: flex;
|
|
20
27
|
position: relative;
|
|
21
28
|
font: normal normal normal 12px/16px Roboto;
|
|
@@ -26,11 +33,13 @@ const VerificationStatusIcon = styled.div.attrs(applyDefaultTheme)(_t3 || (_t3 =
|
|
|
26
33
|
svg {
|
|
27
34
|
height: ${0}px;
|
|
28
35
|
}
|
|
29
|
-
`), props => props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-700')), props => props
|
|
36
|
+
`), props => props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-700')), props => props.$background && props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-100')), props => {
|
|
30
37
|
var _props$iconHeight;
|
|
31
38
|
return (_props$iconHeight = props.iconHeight) !== null && _props$iconHeight !== void 0 ? _props$iconHeight : 15;
|
|
32
39
|
});
|
|
33
|
-
const VerificationStatusColor = styled.div.
|
|
40
|
+
const VerificationStatusColor = styled.div.withConfig({
|
|
41
|
+
shouldForwardProp
|
|
42
|
+
}).attrs(applyDefaultTheme)(_t4 || (_t4 = _`
|
|
34
43
|
position: absolute;
|
|
35
44
|
bottom: 0;
|
|
36
45
|
left: ${0}px;
|
|
@@ -39,27 +48,27 @@ const VerificationStatusColor = styled.div.attrs(applyDefaultTheme)(_t4 || (_t4
|
|
|
39
48
|
border-radius: 50%;
|
|
40
49
|
${0};
|
|
41
50
|
`), props => {
|
|
42
|
-
var _props
|
|
43
|
-
return ((_props
|
|
51
|
+
var _props$$iconHeight;
|
|
52
|
+
return ((_props$$iconHeight = props.$iconHeight) !== null && _props$$iconHeight !== void 0 ? _props$$iconHeight : 15) * 2 / 3;
|
|
44
53
|
}, props => {
|
|
45
|
-
var _props
|
|
46
|
-
return ((_props
|
|
54
|
+
var _props$$iconHeight2;
|
|
55
|
+
return ((_props$$iconHeight2 = props.$iconHeight) !== null && _props$$iconHeight2 !== void 0 ? _props$$iconHeight2 : 15) * 2 / 3;
|
|
47
56
|
}, props => {
|
|
48
|
-
var _props
|
|
49
|
-
return ((_props
|
|
57
|
+
var _props$$iconHeight3;
|
|
58
|
+
return ((_props$$iconHeight3 = props.$iconHeight) !== null && _props$$iconHeight3 !== void 0 ? _props$$iconHeight3 : 15) * 2 / 3;
|
|
50
59
|
}, props => {
|
|
51
60
|
let darkThemeColor = props.theme.getColor('gray-100');
|
|
52
61
|
let lightThemeColor = props.theme.getColor('gray-500');
|
|
53
|
-
if (props
|
|
62
|
+
if (props.$status === 'verified') {
|
|
54
63
|
darkThemeColor = props.theme.getColor('emerald-500');
|
|
55
64
|
lightThemeColor = props.theme.getColor('emerald-500');
|
|
56
|
-
} else if (props
|
|
65
|
+
} else if (props.$status === 'pending') {
|
|
57
66
|
darkThemeColor = props.theme.getColor('signal-yellow-500');
|
|
58
67
|
lightThemeColor = props.theme.getColor('signal-yellow-500');
|
|
59
|
-
} else if (props
|
|
68
|
+
} else if (props.$status === 'rejected') {
|
|
60
69
|
darkThemeColor = props.theme.getColor('red-600');
|
|
61
70
|
lightThemeColor = props.theme.getColor('red-600');
|
|
62
|
-
} else if (props
|
|
71
|
+
} else if (props.$status === 'mixed') {
|
|
63
72
|
darkThemeColor = '#008CDB';
|
|
64
73
|
lightThemeColor = '#008CDB';
|
|
65
74
|
}
|
|
@@ -3,14 +3,15 @@ import React from '../../../node_modules/react/index.js';
|
|
|
3
3
|
import PropTypes from '../../../node_modules/prop-types/index.js';
|
|
4
4
|
import { ActionButton as ActionButton$2 } from './ActionButton.styled.js';
|
|
5
5
|
|
|
6
|
-
const _excluded = ["icon", "disabled", "active", "onClick", "actionWidthHeight"];
|
|
6
|
+
const _excluded = ["icon", "disabled", "active", "onClick", "actionWidthHeight", "backgroundColors"];
|
|
7
7
|
const ActionButton = React.forwardRef(function ActionButton(_ref, forwardedRef) {
|
|
8
8
|
let {
|
|
9
9
|
icon,
|
|
10
10
|
disabled,
|
|
11
11
|
active,
|
|
12
12
|
onClick,
|
|
13
|
-
actionWidthHeight
|
|
13
|
+
actionWidthHeight,
|
|
14
|
+
backgroundColors
|
|
14
15
|
} = _ref,
|
|
15
16
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
17
|
return React.createElement(ActionButton$2, _extends({
|
|
@@ -18,7 +19,8 @@ const ActionButton = React.forwardRef(function ActionButton(_ref, forwardedRef)
|
|
|
18
19
|
disabled: disabled,
|
|
19
20
|
active: active,
|
|
20
21
|
onClick: onClick,
|
|
21
|
-
actionWidthHeight: actionWidthHeight
|
|
22
|
+
actionWidthHeight: actionWidthHeight,
|
|
23
|
+
backgroundColors: backgroundColors
|
|
22
24
|
}, props), icon);
|
|
23
25
|
});
|
|
24
26
|
ActionButton.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -15,7 +15,7 @@ const ActionButton = styled.button.attrs(applyDefaultTheme)(_t || (_t = _`
|
|
|
15
15
|
border: 0;
|
|
16
16
|
color: inherit;
|
|
17
17
|
background-color: transparent;
|
|
18
|
-
|
|
18
|
+
|
|
19
19
|
background-position: center;
|
|
20
20
|
background-repeat: no-repeat;
|
|
21
21
|
background-size: 0 0;
|
|
@@ -24,6 +24,17 @@ const ActionButton = styled.button.attrs(applyDefaultTheme)(_t || (_t = _`
|
|
|
24
24
|
|
|
25
25
|
${0}
|
|
26
26
|
|
|
27
|
+
&:hover:not(:disabled) {
|
|
28
|
+
background-size: ${0}px
|
|
29
|
+
${0}px;
|
|
30
|
+
|
|
31
|
+
svg {
|
|
32
|
+
${0};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
${0}
|
|
37
|
+
|
|
27
38
|
${0}
|
|
28
39
|
|
|
29
40
|
&:disabled {
|
|
@@ -36,7 +47,6 @@ const ActionButton = styled.button.attrs(applyDefaultTheme)(_t || (_t = _`
|
|
|
36
47
|
width: 100%;
|
|
37
48
|
max-width: ${0};
|
|
38
49
|
max-height: ${0};
|
|
39
|
-
|
|
40
50
|
pointer-events: none;
|
|
41
51
|
transition: color 250ms;
|
|
42
52
|
}
|
|
@@ -44,15 +54,14 @@ const ActionButton = styled.button.attrs(applyDefaultTheme)(_t || (_t = _`
|
|
|
44
54
|
var _props$backgroundColo, _props$backgroundColo2, _props$backgroundColo3, _props$backgroundColo4;
|
|
45
55
|
const darkThemeBgColor = (_props$backgroundColo = props === null || props === void 0 || (_props$backgroundColo2 = props.backgroundColors) === null || _props$backgroundColo2 === void 0 ? void 0 : _props$backgroundColo2[0]) !== null && _props$backgroundColo !== void 0 ? _props$backgroundColo : props.theme.getColor('gray-600');
|
|
46
56
|
const lightThemeBgColor = (_props$backgroundColo3 = props === null || props === void 0 || (_props$backgroundColo4 = props.backgroundColors) === null || _props$backgroundColo4 === void 0 ? void 0 : _props$backgroundColo4[1]) !== null && _props$backgroundColo3 !== void 0 ? _props$backgroundColo3 : props.theme.getColor('gray-200');
|
|
47
|
-
return props.theme.themeProp('background-image', `radial-gradient(circle at center, ${darkThemeBgColor} 50%, transparent
|
|
48
|
-
}, props => css(_t2 || (_t2 = _`
|
|
49
|
-
|
|
50
|
-
|
|
57
|
+
return props.theme.themeProp('background-image', `radial-gradient(circle at center, ${darkThemeBgColor} 50%, transparent 51%)`, `radial-gradient(circle at center, ${lightThemeBgColor} 50%, transparent 51%)`);
|
|
58
|
+
}, props => Math.max(props.actionWidthHeight[0], props.actionWidthHeight[1]) * 2, props => Math.max(props.actionWidthHeight[0], props.actionWidthHeight[1]) * 2, props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-700')), props => props.active && css(_t2 || (_t2 = _`
|
|
59
|
+
background-size: ${0}px
|
|
60
|
+
${0}px;
|
|
51
61
|
|
|
52
62
|
svg {
|
|
53
63
|
${0};
|
|
54
64
|
}
|
|
55
|
-
}
|
|
56
|
-
`), props.active ? '' : ':hover', props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-700'))), props => props.useShadow ? props.theme.themeProp('box-shadow', `0px 3px 6px ${rgba(props.theme.getColor('black'), 0.7)}`, `0px 3px 6px ${props.theme.getColor('black')}`) : null, props => `${props.actionWidthHeight[0] - 15}px`, props => `${props.actionWidthHeight[1] - 15}px`);
|
|
65
|
+
`), Math.max(props.actionWidthHeight[0], props.actionWidthHeight[1]) * 2, Math.max(props.actionWidthHeight[0], props.actionWidthHeight[1]) * 2, props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-700'))), props => props.useShadow ? props.theme.themeProp('box-shadow', `0px 3px 6px ${rgba(props.theme.getColor('black'), 0.7)}`, `0px 3px 6px ${props.theme.getColor('black')}`) : null, props => `${props.actionWidthHeight[0] - 15}px`, props => `${props.actionWidthHeight[1] - 15}px`);
|
|
57
66
|
|
|
58
67
|
export { ActionButton };
|