@ntbjs/react-components 2.0.0-rc.12 → 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 +17 -23
- 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
|
@@ -41,18 +41,18 @@ const Alert = index["default"].forwardRef(function Alert(_ref, forwardedRef) {
|
|
|
41
41
|
}
|
|
42
42
|
return index["default"].createElement(Alert_styled.Alert, _rollupPluginBabelHelpers["extends"]({
|
|
43
43
|
ref: forwardedRef,
|
|
44
|
-
alertMessage: alertMessage,
|
|
45
|
-
warning: isWarning,
|
|
46
|
-
error: isError,
|
|
47
|
-
info: isInfo,
|
|
48
|
-
align: align,
|
|
49
|
-
verticalPadding: verticalPadding,
|
|
50
|
-
horizontalPadding: horizontalPadding,
|
|
44
|
+
$alertMessage: alertMessage,
|
|
45
|
+
$warning: isWarning,
|
|
46
|
+
$error: isError,
|
|
47
|
+
$info: isInfo,
|
|
48
|
+
$align: align,
|
|
49
|
+
$verticalPadding: verticalPadding,
|
|
50
|
+
$horizontalPadding: horizontalPadding,
|
|
51
51
|
width: width
|
|
52
52
|
}, props), index["default"].createElement(Alert_styled.AlertRender, {
|
|
53
53
|
fontSize: fontSize,
|
|
54
54
|
lineHeight: lineHeight,
|
|
55
|
-
lineClamp: lineClamp
|
|
55
|
+
$lineClamp: lineClamp
|
|
56
56
|
}, icon, " ", index["default"].createElement("span", null, alertMessage)));
|
|
57
57
|
});
|
|
58
58
|
Alert.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -68,8 +68,6 @@ Alert.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
68
68
|
width: index$1["default"].number
|
|
69
69
|
} : {};
|
|
70
70
|
Alert.defaultProps = {
|
|
71
|
-
warning: false,
|
|
72
|
-
error: false,
|
|
73
71
|
align: 'left',
|
|
74
72
|
alertMessage: 'Use subject to restrictions. Editorial use only, no commercial use without prior consent from rights holder.',
|
|
75
73
|
lineClamp: 0,
|
|
@@ -16,7 +16,12 @@ let _ = t => t,
|
|
|
16
16
|
_t4,
|
|
17
17
|
_t5,
|
|
18
18
|
_t6;
|
|
19
|
-
const
|
|
19
|
+
const shouldForwardProp = prop => {
|
|
20
|
+
return prop !== 'theme' && !prop.startsWith('$');
|
|
21
|
+
};
|
|
22
|
+
const Alert = styled__default["default"].div.withConfig({
|
|
23
|
+
shouldForwardProp
|
|
24
|
+
}).attrs(defaultTheme.applyDefaultTheme)(_t || (_t = _`
|
|
20
25
|
display: flex;
|
|
21
26
|
flex-direction: column;
|
|
22
27
|
padding: ${0};
|
|
@@ -31,18 +36,20 @@ const Alert = styled__default["default"].div.attrs(defaultTheme.applyDefaultThem
|
|
|
31
36
|
|
|
32
37
|
text-align: ${0};
|
|
33
38
|
`), props => {
|
|
34
|
-
var _props
|
|
35
|
-
const verticalPadding = (_props
|
|
36
|
-
const horizontalPadding = (_props
|
|
39
|
+
var _props$$verticalPaddi, _props$$horizontalPad;
|
|
40
|
+
const verticalPadding = (_props$$verticalPaddi = props.$verticalPadding) !== null && _props$$verticalPaddi !== void 0 ? _props$$verticalPaddi : 17;
|
|
41
|
+
const horizontalPadding = (_props$$horizontalPad = props.$horizontalPadding) !== null && _props$$horizontalPad !== void 0 ? _props$$horizontalPad : 30;
|
|
37
42
|
return `${verticalPadding}px ${horizontalPadding}px`;
|
|
38
|
-
}, props => props.width ? `${props.width}px` : '100%', props => props
|
|
43
|
+
}, props => props.width ? `${props.width}px` : '100%', props => props.$warning && styled.css(_t2 || (_t2 = _`
|
|
39
44
|
${0}
|
|
40
|
-
`), props.theme.themeProp('background', '#634E01', props.theme.getColor('signal-yellow-400'))), props => props
|
|
45
|
+
`), props.theme.themeProp('background', '#634E01', props.theme.getColor('signal-yellow-400'))), props => props.$error && styled.css(_t3 || (_t3 = _`
|
|
41
46
|
${0}
|
|
42
|
-
`), props.theme.themeProp('background', '#7F1B1B', props.theme.getColor('red-200'))), props => props
|
|
47
|
+
`), props.theme.themeProp('background', '#7F1B1B', props.theme.getColor('red-200'))), props => props.$info && styled.css(_t4 || (_t4 = _`
|
|
43
48
|
background: transparent;
|
|
44
49
|
`)), props => props.align === 'center' ? 'center' : 'left');
|
|
45
|
-
const AlertRender = styled__default["default"].div.
|
|
50
|
+
const AlertRender = styled__default["default"].div.withConfig({
|
|
51
|
+
shouldForwardProp
|
|
52
|
+
}).attrs(defaultTheme.applyDefaultTheme)(_t5 || (_t5 = _`
|
|
46
53
|
display: flex;
|
|
47
54
|
align-items: center;
|
|
48
55
|
word-break: break-word;
|
|
@@ -60,13 +67,13 @@ const AlertRender = styled__default["default"].div.attrs(defaultTheme.applyDefau
|
|
|
60
67
|
padding-left: 5px;
|
|
61
68
|
${0};
|
|
62
69
|
}
|
|
63
|
-
`), props => props.lineHeight ? `line-height: ${props.lineHeight}px;` : null, props => props.fontSize ? `font-size: ${props.fontSize}px;` : null, props => props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700')), props => props
|
|
70
|
+
`), props => props.lineHeight ? `line-height: ${props.lineHeight}px;` : null, props => props.fontSize ? `font-size: ${props.fontSize}px;` : null, props => props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700')), props => props.$lineClamp ? styled.css(_t6 || (_t6 = _`
|
|
64
71
|
display: -webkit-box;
|
|
65
72
|
-webkit-line-clamp: ${0};
|
|
66
73
|
-webkit-box-orient: vertical;
|
|
67
74
|
overflow: hidden;
|
|
68
75
|
text-overflow: ellipsis;
|
|
69
|
-
`), props
|
|
76
|
+
`), props.$lineClamp) : null);
|
|
70
77
|
|
|
71
78
|
exports.Alert = Alert;
|
|
72
79
|
exports.AlertRender = AlertRender;
|
|
@@ -37,26 +37,26 @@ const Badge = index["default"].forwardRef(function Badge(_ref, forwardedRef) {
|
|
|
37
37
|
}
|
|
38
38
|
return index["default"].createElement(Badge_styled.Badge, _rollupPluginBabelHelpers["extends"]({
|
|
39
39
|
ref: forwardedRef,
|
|
40
|
-
elevated: elevated,
|
|
41
|
-
hasChildren: Boolean(children)
|
|
40
|
+
$elevated: elevated,
|
|
41
|
+
$hasChildren: Boolean(children)
|
|
42
42
|
}, props), children && index["default"].createElement(Badge_styled.BadgeChildrenContainer, null, children), (badgeIcon || badgeContent) && index["default"].createElement(Badge_styled.BadgeLabel, {
|
|
43
|
-
backgroundColors: backgroundColors,
|
|
44
|
-
colors: colors,
|
|
45
|
-
elevated: elevated,
|
|
43
|
+
$backgroundColors: backgroundColors,
|
|
44
|
+
$colors: colors,
|
|
45
|
+
$elevated: elevated,
|
|
46
46
|
fontSize: fontSize,
|
|
47
47
|
fontWeight: fontWeight,
|
|
48
|
-
lineHeight: lineHeight,
|
|
49
|
-
active: active,
|
|
50
|
-
error: error,
|
|
51
|
-
warning: warning,
|
|
52
|
-
|
|
53
|
-
horizontalPadding: horizontalPadding,
|
|
48
|
+
$lineHeight: lineHeight,
|
|
49
|
+
$active: active,
|
|
50
|
+
$error: error,
|
|
51
|
+
$warning: warning,
|
|
52
|
+
$elevatedverticalPadding: verticalPadding,
|
|
53
|
+
$horizontalPadding: horizontalPadding,
|
|
54
54
|
height: height,
|
|
55
55
|
minHeight: minHeight,
|
|
56
56
|
width: width,
|
|
57
|
-
minWidth: minWidth
|
|
57
|
+
$minWidth: minWidth
|
|
58
58
|
}, badgeIcon && index["default"].createElement(Badge_styled.BadgeIcon, {
|
|
59
|
-
useGutter: !!badgeContent
|
|
59
|
+
$useGutter: !!badgeContent
|
|
60
60
|
}, badgeIcon), badgeContent));
|
|
61
61
|
});
|
|
62
62
|
Badge.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -18,7 +18,12 @@ let _ = t => t,
|
|
|
18
18
|
_t6,
|
|
19
19
|
_t7,
|
|
20
20
|
_t8;
|
|
21
|
-
const
|
|
21
|
+
const shouldForwardProp = prop => {
|
|
22
|
+
return prop !== 'theme' && !prop.startsWith('$');
|
|
23
|
+
};
|
|
24
|
+
const Badge = styled__default["default"].span.withConfig({
|
|
25
|
+
shouldForwardProp
|
|
26
|
+
}).attrs(defaultTheme.applyDefaultTheme)(_t || (_t = _`
|
|
22
27
|
align-content: center;
|
|
23
28
|
display: ${0};
|
|
24
29
|
font-family: ${0};
|
|
@@ -27,13 +32,17 @@ const Badge = styled__default["default"].span.attrs(defaultTheme.applyDefaultThe
|
|
|
27
32
|
min-height: 24px;
|
|
28
33
|
position: relative;
|
|
29
34
|
width: ${0};
|
|
30
|
-
`), props => props
|
|
31
|
-
const BadgeChildrenContainer = styled__default["default"].span.
|
|
35
|
+
`), props => props.$elevated || !props.$hasChildren ? 'inline-flex' : 'flex', props => props.theme.primaryFontFamily, props => props.$elevated ? 'fit-content' : 'initial');
|
|
36
|
+
const BadgeChildrenContainer = styled__default["default"].span.withConfig({
|
|
37
|
+
shouldForwardProp
|
|
38
|
+
}).attrs(defaultTheme.applyDefaultTheme)(_t2 || (_t2 = _`
|
|
32
39
|
align-self: center;
|
|
33
40
|
height: fit-content;
|
|
34
41
|
margin-right: 8px;
|
|
35
42
|
`));
|
|
36
|
-
const BadgeLabel = styled__default["default"].span.
|
|
43
|
+
const BadgeLabel = styled__default["default"].span.withConfig({
|
|
44
|
+
shouldForwardProp
|
|
45
|
+
}).attrs(defaultTheme.applyDefaultTheme)(_t3 || (_t3 = _`
|
|
37
46
|
border-radius: ${0};
|
|
38
47
|
display: flex;
|
|
39
48
|
align-items: center;
|
|
@@ -62,29 +71,29 @@ const BadgeLabel = styled__default["default"].span.attrs(defaultTheme.applyDefau
|
|
|
62
71
|
${0}
|
|
63
72
|
|
|
64
73
|
${0}
|
|
65
|
-
`), props => props
|
|
74
|
+
`), props => props.$elevated ? '12px' : '14px', props => {
|
|
66
75
|
if (props.fontSize) {
|
|
67
76
|
return `${props.fontSize}px`;
|
|
68
77
|
} else {
|
|
69
78
|
return props.elevated ? '0.625rem' : '0.750rem';
|
|
70
79
|
}
|
|
71
|
-
}, props => props.fontWeight ? props.fontWeight : 'normal', props => props
|
|
80
|
+
}, 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 ? styled.css(_t4 || (_t4 = _`
|
|
72
81
|
width: ${0}px;
|
|
73
|
-
`), props.width) : null, props => props
|
|
82
|
+
`), props.width) : null, props => props.$minWidth ? styled.css(_t5 || (_t5 = _`
|
|
74
83
|
min-width: ${0}px;
|
|
75
|
-
`), props
|
|
84
|
+
`), props.$minWidth) : null, props => props.minHeight ? styled.css(_t6 || (_t6 = _`
|
|
76
85
|
min-height: ${0}px;
|
|
77
86
|
`), props.minHeight) : null, props => {
|
|
78
|
-
const verticalPadding = props.verticalPadding ? `${props.verticalPadding}px` : props
|
|
79
|
-
const horizontalPadding = props
|
|
87
|
+
const verticalPadding = props.verticalPadding ? `${props.verticalPadding}px` : props.$elevated ? '4px' : '6px';
|
|
88
|
+
const horizontalPadding = props.$horizontalPadding ? `${props.$horizontalPadding}px` : props.$elevated ? '7px' : '10px';
|
|
80
89
|
return styled.css(_t7 || (_t7 = _`
|
|
81
90
|
padding: ${0} ${0};
|
|
82
91
|
`), verticalPadding, horizontalPadding);
|
|
83
92
|
}, props => props.theme.themeProp('background', () => {
|
|
84
93
|
var _props$backgroundColo, _props$backgroundColo2;
|
|
85
|
-
const active = props
|
|
86
|
-
const error = props
|
|
87
|
-
const warning = props
|
|
94
|
+
const active = props.$active;
|
|
95
|
+
const error = props.$error;
|
|
96
|
+
const warning = props.$warning;
|
|
88
97
|
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');
|
|
89
98
|
switch (true) {
|
|
90
99
|
case !error && !warning && !active:
|
|
@@ -103,11 +112,11 @@ const BadgeLabel = styled__default["default"].span.attrs(defaultTheme.applyDefau
|
|
|
103
112
|
return props.theme.getColor('gray-600');
|
|
104
113
|
}
|
|
105
114
|
}, () => {
|
|
106
|
-
var _props
|
|
107
|
-
const active = props
|
|
108
|
-
const error = props
|
|
109
|
-
const warning = props
|
|
110
|
-
const defaultBgColor = (_props
|
|
115
|
+
var _props$$backgroundCol, _props$$backgroundCol2;
|
|
116
|
+
const active = props.$active;
|
|
117
|
+
const error = props.$error;
|
|
118
|
+
const warning = props.$warning;
|
|
119
|
+
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');
|
|
111
120
|
switch (true) {
|
|
112
121
|
case !error && !warning && !active:
|
|
113
122
|
return defaultBgColor;
|
|
@@ -125,30 +134,32 @@ const BadgeLabel = styled__default["default"].span.attrs(defaultTheme.applyDefau
|
|
|
125
134
|
return props.theme.getColor('gray-200');
|
|
126
135
|
}
|
|
127
136
|
}), props => props.theme.themeProp('color', () => {
|
|
128
|
-
var _props
|
|
129
|
-
const defaultColor = (_props
|
|
130
|
-
if (props
|
|
137
|
+
var _props$$colors$, _props$$colors;
|
|
138
|
+
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');
|
|
139
|
+
if (props.$warning && !props.$error || props.error && !props.$active) {
|
|
131
140
|
return props.theme.getColor('gray-900');
|
|
132
141
|
} else {
|
|
133
142
|
return defaultColor;
|
|
134
143
|
}
|
|
135
144
|
}, () => {
|
|
136
|
-
var _props
|
|
137
|
-
const defaultColor = (_props
|
|
138
|
-
if (props
|
|
145
|
+
var _props$$colors$2, _props$$colors2;
|
|
146
|
+
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');
|
|
147
|
+
if (props.$error && props.$active) {
|
|
139
148
|
return props.theme.getColor('white');
|
|
140
149
|
} else {
|
|
141
150
|
return defaultColor;
|
|
142
151
|
}
|
|
143
152
|
}));
|
|
144
|
-
const BadgeIcon = styled__default["default"].span.
|
|
153
|
+
const BadgeIcon = styled__default["default"].span.withConfig({
|
|
154
|
+
shouldForwardProp
|
|
155
|
+
}).attrs(defaultTheme.applyDefaultTheme)(_t8 || (_t8 = _`
|
|
145
156
|
display: flex;
|
|
146
157
|
align-items: center;
|
|
147
158
|
margin-right: ${0};
|
|
148
159
|
svg {
|
|
149
160
|
height: 12px;
|
|
150
161
|
}
|
|
151
|
-
`), props => props
|
|
162
|
+
`), props => props.$useGutter ? '4px' : 0);
|
|
152
163
|
|
|
153
164
|
exports.Badge = Badge;
|
|
154
165
|
exports.BadgeChildrenContainer = BadgeChildrenContainer;
|
|
@@ -43,6 +43,8 @@ const Popover = index["default"].forwardRef(function Popover(_ref, ref) {
|
|
|
43
43
|
});
|
|
44
44
|
}));
|
|
45
45
|
};
|
|
46
|
+
const eventHandlerProps = ['onClick', 'onChange', 'onSubmit'];
|
|
47
|
+
const filteredProps = Object.fromEntries(Object.entries(props).filter(([key]) => !eventHandlerProps.includes(key)));
|
|
46
48
|
return index["default"].createElement("div", null, index["default"].createElement(Popover_styled.Popover, _rollupPluginBabelHelpers["extends"]({
|
|
47
49
|
ref: ref,
|
|
48
50
|
content: content,
|
|
@@ -78,9 +80,9 @@ const Popover = index["default"].forwardRef(function Popover(_ref, ref) {
|
|
|
78
80
|
}
|
|
79
81
|
}, ...modifiers]
|
|
80
82
|
},
|
|
81
|
-
|
|
83
|
+
onShow: contextMenu ? handleContextMenuItemClick : undefined,
|
|
82
84
|
maxWidth: maxWidth
|
|
83
|
-
},
|
|
85
|
+
}, filteredProps), children));
|
|
84
86
|
});
|
|
85
87
|
Popover.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
86
88
|
content: index$2["default"].oneOfType([index$2["default"].string, index$2["default"].element]).isRequired,
|
|
@@ -11,7 +11,12 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
|
11
11
|
|
|
12
12
|
let _ = t => t,
|
|
13
13
|
_t;
|
|
14
|
-
const
|
|
14
|
+
const shouldForwardProp = prop => {
|
|
15
|
+
return prop !== 'theme' && !prop.startsWith('$');
|
|
16
|
+
};
|
|
17
|
+
const Tab = styled__default["default"].p.withConfig({
|
|
18
|
+
shouldForwardProp
|
|
19
|
+
}).attrs(defaultTheme.applyDefaultTheme)(_t || (_t = _`
|
|
15
20
|
font-family: ${0};
|
|
16
21
|
font-size: 1rem;
|
|
17
22
|
font-weight: 500;
|
|
@@ -10,12 +10,13 @@ var Tabs_styled = require('./Tabs.styled.js');
|
|
|
10
10
|
var index$1 = require('../../../_virtual/index.js');
|
|
11
11
|
var Tab = require('../Tab/Tab.js');
|
|
12
12
|
|
|
13
|
-
const _excluded = ["children", "defaultMinHeight", "customPadding"];
|
|
13
|
+
const _excluded = ["children", "defaultMinHeight", "customPadding", "onTabClick"];
|
|
14
14
|
const Tabs = index["default"].forwardRef(function Tabs(_ref, forwardedRef) {
|
|
15
15
|
let {
|
|
16
16
|
children,
|
|
17
|
-
defaultMinHeight,
|
|
18
|
-
customPadding
|
|
17
|
+
defaultMinHeight = '',
|
|
18
|
+
customPadding = 0,
|
|
19
|
+
onTabClick = () => {}
|
|
19
20
|
} = _ref,
|
|
20
21
|
props = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
21
22
|
const [activeTab, setActiveTab] = index$1.react.exports.useState(0);
|
|
@@ -52,20 +53,32 @@ const Tabs = index["default"].forwardRef(function Tabs(_ref, forwardedRef) {
|
|
|
52
53
|
}
|
|
53
54
|
return tabs;
|
|
54
55
|
}, [children]);
|
|
56
|
+
const handleTabClick = tab => {
|
|
57
|
+
setActiveTab(tab.key);
|
|
58
|
+
let triggerText = '';
|
|
59
|
+
if (tab.trigger && tab.trigger.props && tab.trigger.props.children) {
|
|
60
|
+
triggerText = tab.trigger.props.children;
|
|
61
|
+
}
|
|
62
|
+
if (onTabClick) {
|
|
63
|
+
onTabClick(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, tab), {}, {
|
|
64
|
+
triggerText: triggerText
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
};
|
|
55
68
|
return index["default"].createElement(Tabs_styled.Tabs, _rollupPluginBabelHelpers["extends"]({
|
|
56
69
|
ref: forwardedRef
|
|
57
70
|
}, props, {
|
|
58
71
|
role: "tablist"
|
|
59
72
|
}), index["default"].createElement(Tabs_styled.TabHeaders, {
|
|
60
|
-
|
|
73
|
+
custompadding: customPadding
|
|
61
74
|
}, tabs.map(tab => index["default"].createElement(Tabs_styled.TabHeader, {
|
|
62
75
|
key: tab.key,
|
|
63
76
|
hidden: tab.hidden,
|
|
64
|
-
active: tab.key === activeTab,
|
|
65
|
-
onClick: () =>
|
|
77
|
+
$active: tab.key === activeTab,
|
|
78
|
+
onClick: () => handleTabClick(tab),
|
|
66
79
|
role: "tab"
|
|
67
80
|
}, tab.trigger))), index["default"].createElement(Tabs_styled.TabHeaderBorder, {
|
|
68
|
-
|
|
81
|
+
custompadding: customPadding
|
|
69
82
|
}), index["default"].createElement(Tabs_styled.TabContent, null, tabs.map(tab => index["default"].createElement("div", {
|
|
70
83
|
ref: tab.key === (activeTab === null || activeTab === void 0 ? void 0 : activeTab.key) ? contentRef : null,
|
|
71
84
|
key: tab.key,
|
|
@@ -76,15 +89,12 @@ const Tabs = index["default"].forwardRef(function Tabs(_ref, forwardedRef) {
|
|
|
76
89
|
}
|
|
77
90
|
}, tab.content))));
|
|
78
91
|
});
|
|
79
|
-
Tabs.defaultProps = {
|
|
80
|
-
defaultMinHeight: '',
|
|
81
|
-
customPadding: 0
|
|
82
|
-
};
|
|
83
92
|
Tabs.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
84
93
|
children: index$2["default"].oneOfType([index$2["default"].array, index$2["default"].object]),
|
|
85
94
|
backgroundColor: index$2["default"].string,
|
|
86
95
|
defaultMinHeight: index$2["default"].string,
|
|
87
|
-
customPadding: index$2["default"].string
|
|
96
|
+
customPadding: index$2["default"].string,
|
|
97
|
+
onTabClick: index$2["default"].func
|
|
88
98
|
} : {};
|
|
89
99
|
var Tabs$1 = Tabs;
|
|
90
100
|
|
|
@@ -19,16 +19,23 @@ let _ = t => t,
|
|
|
19
19
|
_t7,
|
|
20
20
|
_t8,
|
|
21
21
|
_t9,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const
|
|
22
|
+
_t0,
|
|
23
|
+
_t1;
|
|
24
|
+
const shouldForwardProp = prop => {
|
|
25
|
+
return prop !== 'theme' && !prop.startsWith('$');
|
|
26
|
+
};
|
|
27
|
+
const Tabs = styled__default["default"].div.withConfig({
|
|
28
|
+
shouldForwardProp
|
|
29
|
+
}).attrs(defaultTheme.applyDefaultTheme)(_t || (_t = _`
|
|
25
30
|
display: block;
|
|
26
31
|
position: relative;
|
|
27
32
|
${0};
|
|
28
33
|
`), props => props.backgroundColor && styled.css(_t2 || (_t2 = _`
|
|
29
34
|
background-color: ${0};
|
|
30
35
|
`), props.backgroundColor));
|
|
31
|
-
const TabHeaders = styled__default["default"].ul.
|
|
36
|
+
const TabHeaders = styled__default["default"].ul.withConfig({
|
|
37
|
+
shouldForwardProp
|
|
38
|
+
}).attrs(defaultTheme.applyDefaultTheme)(_t3 || (_t3 = _`
|
|
32
39
|
display: flex;
|
|
33
40
|
overflow-x: auto;
|
|
34
41
|
overflow-y: hidden;
|
|
@@ -38,12 +45,14 @@ const TabHeaders = styled__default["default"].ul.attrs(defaultTheme.applyDefault
|
|
|
38
45
|
margin: 0;
|
|
39
46
|
${0};
|
|
40
47
|
${0};
|
|
41
|
-
`), props => !props.
|
|
48
|
+
`), props => !props.custompadding && styled.css(_t4 || (_t4 = _`
|
|
42
49
|
padding: 0;
|
|
43
|
-
`)), props => props.
|
|
50
|
+
`)), props => props.custompadding && styled.css(_t5 || (_t5 = _`
|
|
44
51
|
padding: 0 ${0};
|
|
45
|
-
`), props.
|
|
46
|
-
const TabHeader = styled__default["default"].li.
|
|
52
|
+
`), props.custompadding));
|
|
53
|
+
const TabHeader = styled__default["default"].li.withConfig({
|
|
54
|
+
shouldForwardProp
|
|
55
|
+
}).attrs(defaultTheme.applyDefaultTheme)(_t6 || (_t6 = _`
|
|
47
56
|
font-family: ${0};
|
|
48
57
|
text-transform: uppercase;
|
|
49
58
|
font-weight: 600;
|
|
@@ -60,35 +69,39 @@ const TabHeader = styled__default["default"].li.attrs(defaultTheme.applyDefaultT
|
|
|
60
69
|
&&:hover:not(:focus) {
|
|
61
70
|
${0};
|
|
62
71
|
}
|
|
63
|
-
`), props => props.theme.secondaryFontFamily, props => props
|
|
72
|
+
`), props => props.theme.secondaryFontFamily, props => props.$active && styled.css(_t7 || (_t7 = _`
|
|
64
73
|
${0}
|
|
65
74
|
`), props => props.theme.themeProp('border-color', props.theme.getColor('gray-400'), props.theme.getColor('gray-700'))), props => props.theme.themeProp('border-color', () => {
|
|
66
|
-
if (props
|
|
75
|
+
if (props.$active) {
|
|
67
76
|
return props.theme.getColor('gray-400');
|
|
68
77
|
} else {
|
|
69
78
|
return props.theme.getColor('gray-400');
|
|
70
79
|
}
|
|
71
80
|
}, () => {
|
|
72
|
-
if (props
|
|
81
|
+
if (props.$active) {
|
|
73
82
|
return props.theme.getColor('gray-700');
|
|
74
83
|
} else {
|
|
75
84
|
return props.theme.getColor('gray-700');
|
|
76
85
|
}
|
|
77
86
|
}));
|
|
78
|
-
const TabContent = styled__default["default"].div.
|
|
87
|
+
const TabContent = styled__default["default"].div.withConfig({
|
|
88
|
+
shouldForwardProp
|
|
89
|
+
}).attrs(defaultTheme.applyDefaultTheme)(_t8 || (_t8 = _`
|
|
79
90
|
display: block;
|
|
80
91
|
`));
|
|
81
|
-
const TabHeaderBorder = styled__default["default"].div.
|
|
92
|
+
const TabHeaderBorder = styled__default["default"].div.withConfig({
|
|
93
|
+
shouldForwardProp
|
|
94
|
+
}).attrs(defaultTheme.applyDefaultTheme)(_t9 || (_t9 = _`
|
|
82
95
|
border-top: 1px solid;
|
|
83
96
|
|
|
84
97
|
${0};
|
|
85
98
|
${0};
|
|
86
99
|
${0};
|
|
87
|
-
`), props => props.theme.themeProp('border-color', props.theme.getColor('gray-600'), '#F0F2F5'), props => !props.
|
|
100
|
+
`), props => props.theme.themeProp('border-color', props.theme.getColor('gray-600'), '#F0F2F5'), props => !props.custompadding && styled.css(_t0 || (_t0 = _`
|
|
88
101
|
margin: -2px 0;
|
|
89
|
-
`)), props => props.
|
|
102
|
+
`)), props => props.custompadding && styled.css(_t1 || (_t1 = _`
|
|
90
103
|
margin: -2px ${0};
|
|
91
|
-
`), props.
|
|
104
|
+
`), props.custompadding));
|
|
92
105
|
|
|
93
106
|
exports.TabContent = TabContent;
|
|
94
107
|
exports.TabHeader = TabHeader;
|
|
@@ -19,6 +19,8 @@ const Tooltip = index["default"].forwardRef(function Tooltip(_ref, ref) {
|
|
|
19
19
|
children
|
|
20
20
|
} = _ref,
|
|
21
21
|
props = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
22
|
+
const eventHandlerProps = ['onClick', 'onChange', 'onSubmit'];
|
|
23
|
+
const filteredProps = Object.fromEntries(Object.entries(props).filter(([key]) => !eventHandlerProps.includes(key)));
|
|
22
24
|
return index["default"].createElement("div", null, index["default"].createElement(Tooltip_styled.Tooltip, _rollupPluginBabelHelpers["extends"]({
|
|
23
25
|
ref: ref,
|
|
24
26
|
content: content,
|
|
@@ -28,7 +30,7 @@ const Tooltip = index["default"].forwardRef(function Tooltip(_ref, ref) {
|
|
|
28
30
|
trigger: trigger,
|
|
29
31
|
visible: visible,
|
|
30
32
|
animation: 'shift-away-subtle'
|
|
31
|
-
},
|
|
33
|
+
}, filteredProps), children));
|
|
32
34
|
});
|
|
33
35
|
Tooltip.defaultProps = {
|
|
34
36
|
content: 'Tooltip',
|
|
@@ -17,15 +17,15 @@ const VerificationStatusIcon = index["default"].forwardRef(function Verification
|
|
|
17
17
|
} = _ref,
|
|
18
18
|
props = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
19
19
|
return index["default"].createElement(VerificationStatusIcon_styled.VerificationIconWrapper, {
|
|
20
|
-
background: background
|
|
20
|
+
$background: background
|
|
21
21
|
}, index["default"].createElement(VerificationStatusIcon_styled.VerificationStatusIcon, _rollupPluginBabelHelpers["extends"]({
|
|
22
|
-
iconHeight: iconHeight,
|
|
23
|
-
background: background,
|
|
22
|
+
$iconHeight: iconHeight,
|
|
23
|
+
$background: background,
|
|
24
24
|
ref: forwardedRef
|
|
25
25
|
}, props), index["default"].createElement(verification.ReactComponent, null), index["default"].createElement(VerificationStatusIcon_styled.VerificationStatusColor, {
|
|
26
|
-
iconHeight: iconHeight,
|
|
27
|
-
status: status,
|
|
28
|
-
background: background
|
|
26
|
+
$iconHeight: iconHeight,
|
|
27
|
+
$status: status,
|
|
28
|
+
$background: background
|
|
29
29
|
})));
|
|
30
30
|
});
|
|
31
31
|
VerificationStatusIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -14,16 +14,23 @@ let _ = t => t,
|
|
|
14
14
|
_t2,
|
|
15
15
|
_t3,
|
|
16
16
|
_t4;
|
|
17
|
-
const
|
|
17
|
+
const shouldForwardProp = prop => {
|
|
18
|
+
return prop !== 'theme' && !prop.startsWith('$');
|
|
19
|
+
};
|
|
20
|
+
const VerificationIconWrapper = styled__default["default"].div.withConfig({
|
|
21
|
+
shouldForwardProp
|
|
22
|
+
}).attrs(defaultTheme.applyDefaultTheme)(_t || (_t = _`
|
|
18
23
|
${0};
|
|
19
|
-
`), props => props
|
|
24
|
+
`), props => props.$background && styled.css(_t2 || (_t2 = _`
|
|
20
25
|
background-color: #000 !important;
|
|
21
26
|
width: fit-content;
|
|
22
27
|
padding: 6px 14px 6px 9px;
|
|
23
28
|
border-radius: 15px;
|
|
24
29
|
}
|
|
25
30
|
`)));
|
|
26
|
-
const VerificationStatusIcon = styled__default["default"].div.
|
|
31
|
+
const VerificationStatusIcon = styled__default["default"].div.withConfig({
|
|
32
|
+
shouldForwardProp
|
|
33
|
+
}).attrs(defaultTheme.applyDefaultTheme)(_t3 || (_t3 = _`
|
|
27
34
|
display: flex;
|
|
28
35
|
position: relative;
|
|
29
36
|
font: normal normal normal 12px/16px Roboto;
|
|
@@ -34,11 +41,13 @@ const VerificationStatusIcon = styled__default["default"].div.attrs(defaultTheme
|
|
|
34
41
|
svg {
|
|
35
42
|
height: ${0}px;
|
|
36
43
|
}
|
|
37
|
-
`), props => props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-700')), props => props
|
|
44
|
+
`), 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 => {
|
|
38
45
|
var _props$iconHeight;
|
|
39
46
|
return (_props$iconHeight = props.iconHeight) !== null && _props$iconHeight !== void 0 ? _props$iconHeight : 15;
|
|
40
47
|
});
|
|
41
|
-
const VerificationStatusColor = styled__default["default"].div.
|
|
48
|
+
const VerificationStatusColor = styled__default["default"].div.withConfig({
|
|
49
|
+
shouldForwardProp
|
|
50
|
+
}).attrs(defaultTheme.applyDefaultTheme)(_t4 || (_t4 = _`
|
|
42
51
|
position: absolute;
|
|
43
52
|
bottom: 0;
|
|
44
53
|
left: ${0}px;
|
|
@@ -47,27 +56,27 @@ const VerificationStatusColor = styled__default["default"].div.attrs(defaultThem
|
|
|
47
56
|
border-radius: 50%;
|
|
48
57
|
${0};
|
|
49
58
|
`), props => {
|
|
50
|
-
var _props
|
|
51
|
-
return ((_props
|
|
59
|
+
var _props$$iconHeight;
|
|
60
|
+
return ((_props$$iconHeight = props.$iconHeight) !== null && _props$$iconHeight !== void 0 ? _props$$iconHeight : 15) * 2 / 3;
|
|
52
61
|
}, props => {
|
|
53
|
-
var _props
|
|
54
|
-
return ((_props
|
|
62
|
+
var _props$$iconHeight2;
|
|
63
|
+
return ((_props$$iconHeight2 = props.$iconHeight) !== null && _props$$iconHeight2 !== void 0 ? _props$$iconHeight2 : 15) * 2 / 3;
|
|
55
64
|
}, props => {
|
|
56
|
-
var _props
|
|
57
|
-
return ((_props
|
|
65
|
+
var _props$$iconHeight3;
|
|
66
|
+
return ((_props$$iconHeight3 = props.$iconHeight) !== null && _props$$iconHeight3 !== void 0 ? _props$$iconHeight3 : 15) * 2 / 3;
|
|
58
67
|
}, props => {
|
|
59
68
|
let darkThemeColor = props.theme.getColor('gray-100');
|
|
60
69
|
let lightThemeColor = props.theme.getColor('gray-500');
|
|
61
|
-
if (props
|
|
70
|
+
if (props.$status === 'verified') {
|
|
62
71
|
darkThemeColor = props.theme.getColor('emerald-500');
|
|
63
72
|
lightThemeColor = props.theme.getColor('emerald-500');
|
|
64
|
-
} else if (props
|
|
73
|
+
} else if (props.$status === 'pending') {
|
|
65
74
|
darkThemeColor = props.theme.getColor('signal-yellow-500');
|
|
66
75
|
lightThemeColor = props.theme.getColor('signal-yellow-500');
|
|
67
|
-
} else if (props
|
|
76
|
+
} else if (props.$status === 'rejected') {
|
|
68
77
|
darkThemeColor = props.theme.getColor('red-600');
|
|
69
78
|
lightThemeColor = props.theme.getColor('red-600');
|
|
70
|
-
} else if (props
|
|
79
|
+
} else if (props.$status === 'mixed') {
|
|
71
80
|
darkThemeColor = '#008CDB';
|
|
72
81
|
lightThemeColor = '#008CDB';
|
|
73
82
|
}
|
|
@@ -7,14 +7,15 @@ var index = require('../../../node_modules/react/index.js');
|
|
|
7
7
|
var index$1 = require('../../../node_modules/prop-types/index.js');
|
|
8
8
|
var ActionButton_styled = require('./ActionButton.styled.js');
|
|
9
9
|
|
|
10
|
-
const _excluded = ["icon", "disabled", "active", "onClick", "actionWidthHeight"];
|
|
10
|
+
const _excluded = ["icon", "disabled", "active", "onClick", "actionWidthHeight", "backgroundColors"];
|
|
11
11
|
const ActionButton = index["default"].forwardRef(function ActionButton(_ref, forwardedRef) {
|
|
12
12
|
let {
|
|
13
13
|
icon,
|
|
14
14
|
disabled,
|
|
15
15
|
active,
|
|
16
16
|
onClick,
|
|
17
|
-
actionWidthHeight
|
|
17
|
+
actionWidthHeight,
|
|
18
|
+
backgroundColors
|
|
18
19
|
} = _ref,
|
|
19
20
|
props = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
20
21
|
return index["default"].createElement(ActionButton_styled.ActionButton, _rollupPluginBabelHelpers["extends"]({
|
|
@@ -22,7 +23,8 @@ const ActionButton = index["default"].forwardRef(function ActionButton(_ref, for
|
|
|
22
23
|
disabled: disabled,
|
|
23
24
|
active: active,
|
|
24
25
|
onClick: onClick,
|
|
25
|
-
actionWidthHeight: actionWidthHeight
|
|
26
|
+
actionWidthHeight: actionWidthHeight,
|
|
27
|
+
backgroundColors: backgroundColors
|
|
26
28
|
}, props), icon);
|
|
27
29
|
});
|
|
28
30
|
ActionButton.propTypes = process.env.NODE_ENV !== "production" ? {
|