@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
|
@@ -15,6 +15,8 @@ let _ = t => t,
|
|
|
15
15
|
_t7,
|
|
16
16
|
_t8,
|
|
17
17
|
_t9,
|
|
18
|
+
_t0,
|
|
19
|
+
_t1,
|
|
18
20
|
_t10,
|
|
19
21
|
_t11,
|
|
20
22
|
_t12,
|
|
@@ -30,9 +32,7 @@ let _ = t => t,
|
|
|
30
32
|
_t22,
|
|
31
33
|
_t23,
|
|
32
34
|
_t24,
|
|
33
|
-
_t25
|
|
34
|
-
_t26,
|
|
35
|
-
_t27;
|
|
35
|
+
_t25;
|
|
36
36
|
const AsyncCreatableSelectPaginate = withAsyncPaginate(CreatableSelect$1);
|
|
37
37
|
const showMoreHeight = 114;
|
|
38
38
|
const sharedStyle = css(_t || (_t = _`
|
|
@@ -41,7 +41,7 @@ const sharedStyle = css(_t || (_t = _`
|
|
|
41
41
|
font-weight: 400;
|
|
42
42
|
position: relative;
|
|
43
43
|
`), props => props.theme.primaryFontFamily);
|
|
44
|
-
|
|
44
|
+
styled.label.attrs(applyDefaultTheme)(_t2 || (_t2 = _`
|
|
45
45
|
${0};
|
|
46
46
|
flex-basis: 33.33%;
|
|
47
47
|
font-size: 0.875rem;
|
|
@@ -66,7 +66,7 @@ const AsyncMultiSelect = styled(AsyncPaginate).attrs(applyDefaultTheme)(_t6 || (
|
|
|
66
66
|
const MultiSelectWrapper = styled.div.attrs(applyDefaultTheme)(_t7 || (_t7 = _`
|
|
67
67
|
position: relative;
|
|
68
68
|
`));
|
|
69
|
-
|
|
69
|
+
styled(components.Control).attrs(applyDefaultTheme)(_t8 || (_t8 = _`
|
|
70
70
|
&& {
|
|
71
71
|
align-items: flex-start;
|
|
72
72
|
background: transparent;
|
|
@@ -78,7 +78,7 @@ const Control = styled(components.Control).attrs(applyDefaultTheme)(_t8 || (_t8
|
|
|
78
78
|
cursor: ${0};
|
|
79
79
|
}
|
|
80
80
|
`), props => !props.isDisabled && props.focused || props.readOnly ? 'default' : 'pointer');
|
|
81
|
-
|
|
81
|
+
styled(components.ValueContainer)(_t9 || (_t9 = _`
|
|
82
82
|
&& {
|
|
83
83
|
align-items: flex-start;
|
|
84
84
|
gap: 8px;
|
|
@@ -89,21 +89,21 @@ const ValueContainer = styled(components.ValueContainer)(_t9 || (_t9 = _`
|
|
|
89
89
|
${0}
|
|
90
90
|
}
|
|
91
91
|
`), props => {
|
|
92
|
-
return props.showMore ? props
|
|
93
|
-
}, props => (props
|
|
92
|
+
return props.showMore ? props.$error || props.$warning ? '100%' : showMoreHeight + 16 + 'px' : '100%';
|
|
93
|
+
}, props => (props.$error || props.$warning) && css(_t0 || (_t0 = _`
|
|
94
94
|
border: 1px solid;
|
|
95
95
|
border-radius: 3px;
|
|
96
96
|
padding: 4px;
|
|
97
97
|
|
|
98
98
|
border-color: ${0};
|
|
99
|
-
`), props => props
|
|
100
|
-
const MultiValueWrapper = styled.div.attrs(applyDefaultTheme)(
|
|
99
|
+
`), props => props.$error ? props.theme.getColor('red-500') : props.warning ? props.theme.getColor('orange-500') : 'inherit'));
|
|
100
|
+
const MultiValueWrapper = styled.div.attrs(applyDefaultTheme)(_t1 || (_t1 = _`
|
|
101
101
|
&& {
|
|
102
102
|
border-radius: 3px;
|
|
103
103
|
margin: 0;
|
|
104
104
|
}
|
|
105
105
|
`));
|
|
106
|
-
const MultiValue = styled(components.MultiValue).attrs(applyDefaultTheme)(
|
|
106
|
+
const MultiValue = styled(components.MultiValue).attrs(applyDefaultTheme)(_t10 || (_t10 = _`
|
|
107
107
|
&& {
|
|
108
108
|
border-radius: 3px;
|
|
109
109
|
margin: 0;
|
|
@@ -146,8 +146,8 @@ const MultiValue = styled(components.MultiValue).attrs(applyDefaultTheme)(_t12 |
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
`), props => props.theme.themeProp('background-color', props.theme.getColor('gray-600'), props.theme.getColor('gray-800')), props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-100')), props => props.isDisabled || props.readOnly ? '0 8px' : '0 3px 0 8px', props => props.theme.getColor('red-500'));
|
|
149
|
-
const MultiValueRemove = styled(components.MultiValueRemove).attrs(applyDefaultTheme)(
|
|
150
|
-
|
|
149
|
+
const MultiValueRemove = styled(components.MultiValueRemove).attrs(applyDefaultTheme)(_t11 || (_t11 = _``));
|
|
150
|
+
styled(components.Input).attrs(applyDefaultTheme)(_t12 || (_t12 = _`
|
|
151
151
|
align-self: center;
|
|
152
152
|
font-size: ${0};
|
|
153
153
|
min-width: 150px;
|
|
@@ -156,7 +156,7 @@ const Input = styled(components.Input).attrs(applyDefaultTheme)(_t14 || (_t14 =
|
|
|
156
156
|
|
|
157
157
|
${0}
|
|
158
158
|
}
|
|
159
|
-
`), props => props.$focused ? '14px' : '12px', props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900')), props => !props.$focused && css(
|
|
159
|
+
`), props => props.$focused ? '14px' : '12px', props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900')), props => !props.$focused && css(_t13 || (_t13 = _`
|
|
160
160
|
${0}
|
|
161
161
|
|
|
162
162
|
:before {
|
|
@@ -166,14 +166,14 @@ const Input = styled(components.Input).attrs(applyDefaultTheme)(_t14 || (_t14 =
|
|
|
166
166
|
content: '${0}';
|
|
167
167
|
}
|
|
168
168
|
`), props => props.theme.themeProp('color', props.theme.getColor('gray-400'), props.theme.getColor('gray-500')), props => props.edittext));
|
|
169
|
-
const DropdownMenu = styled(components.Menu).attrs(applyDefaultTheme)(
|
|
169
|
+
const DropdownMenu = styled(components.Menu).attrs(applyDefaultTheme)(_t14 || (_t14 = _`
|
|
170
170
|
font-size: 14px;
|
|
171
171
|
|
|
172
172
|
${0}
|
|
173
173
|
|
|
174
174
|
${0}
|
|
175
175
|
`), props => props.theme.themeProp('background-color', props.theme.getColor('gray-600'), props.theme.getColor('white')), props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900')));
|
|
176
|
-
const sharedOptionStyle = css(
|
|
176
|
+
const sharedOptionStyle = css(_t15 || (_t15 = _`
|
|
177
177
|
${0}
|
|
178
178
|
|
|
179
179
|
${0}
|
|
@@ -183,31 +183,31 @@ const sharedOptionStyle = css(_t17 || (_t17 = _`
|
|
|
183
183
|
:hover {
|
|
184
184
|
cursor: pointer;
|
|
185
185
|
}
|
|
186
|
-
`), props => props.isFocused && css(
|
|
186
|
+
`), props => props.isFocused && css(_t16 || (_t16 = _`
|
|
187
187
|
${0}
|
|
188
|
-
`), props.theme.themeProp('background-color', props.theme.getColor('gray-500'), props.theme.getColor('gray-200'))), props => props.isSelected && css(
|
|
188
|
+
`), props.theme.themeProp('background-color', props.theme.getColor('gray-500'), props.theme.getColor('gray-200'))), props => props.isSelected && css(_t17 || (_t17 = _`
|
|
189
189
|
${0}
|
|
190
190
|
|
|
191
191
|
${0}
|
|
192
|
-
`), props.theme.themeProp('background-color', 'transparent', 'transparent'), props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900'))), props => props.isFocused && props.isSelected && css(
|
|
192
|
+
`), props.theme.themeProp('background-color', 'transparent', 'transparent'), props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900'))), props => props.isFocused && props.isSelected && css(_t18 || (_t18 = _`
|
|
193
193
|
${0}
|
|
194
194
|
`), props.theme.themeProp('background-color', props.theme.getColor('gray-500'), props.theme.getColor('gray-200'))));
|
|
195
|
-
const Option = styled(components.Option).attrs(applyDefaultTheme)(
|
|
195
|
+
const Option = styled(components.Option).attrs(applyDefaultTheme)(_t19 || (_t19 = _`
|
|
196
196
|
${0}
|
|
197
197
|
`), sharedOptionStyle);
|
|
198
|
-
const SelectedOption = styled(components.Option).attrs(applyDefaultTheme)(
|
|
198
|
+
const SelectedOption = styled(components.Option).attrs(applyDefaultTheme)(_t20 || (_t20 = _`
|
|
199
199
|
${0}
|
|
200
200
|
|
|
201
201
|
display: flex !important;
|
|
202
202
|
justify-content: space-between;
|
|
203
203
|
`), sharedOptionStyle);
|
|
204
|
-
const DropdownOptionDeleteIcon = styled(SvgClose).attrs(applyDefaultTheme)(
|
|
204
|
+
const DropdownOptionDeleteIcon = styled(SvgClose).attrs(applyDefaultTheme)(_t21 || (_t21 = _`
|
|
205
205
|
stroke-width: 1px;
|
|
206
206
|
width: 8px;
|
|
207
207
|
|
|
208
208
|
${0}
|
|
209
209
|
`), props => props.theme.themeProp('stroke', props.theme.getColor('gray-100'), props.theme.getColor('gray-900')));
|
|
210
|
-
const ShowMoreWrapper = styled.div.attrs(applyDefaultTheme)(
|
|
210
|
+
const ShowMoreWrapper = styled.div.attrs(applyDefaultTheme)(_t22 || (_t22 = _`
|
|
211
211
|
align-items: end;
|
|
212
212
|
display: flex;
|
|
213
213
|
flex-direction: column;
|
|
@@ -225,7 +225,7 @@ const ShowMoreWrapper = styled.div.attrs(applyDefaultTheme)(_t24 || (_t24 = _`
|
|
|
225
225
|
text-decoration: underline;
|
|
226
226
|
}
|
|
227
227
|
`), showMoreHeight + 16, props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('emerald-500')));
|
|
228
|
-
const ShowMoreOverlay = styled.div.attrs(applyDefaultTheme)(
|
|
228
|
+
const ShowMoreOverlay = styled.div.attrs(applyDefaultTheme)(_t23 || (_t23 = _`
|
|
229
229
|
align-items: end;
|
|
230
230
|
display: block;
|
|
231
231
|
height: 100%;
|
|
@@ -236,16 +236,16 @@ const ShowMoreOverlay = styled.div.attrs(applyDefaultTheme)(_t25 || (_t25 = _`
|
|
|
236
236
|
|
|
237
237
|
${0}
|
|
238
238
|
`), showMoreHeight, props => props.theme.themeProp('background', 'transparent linear-gradient(180deg, #12121200 0%, #12121230 40%, #12121279 70%, #121212 95%, #121212 100%) 0% 0% no-repeat padding-box', 'transparent linear-gradient(180deg, #fefefe00 0%, #fefefe30 40%, #fefefe79 70%, #fefefe 95%, #fefefe 100%) 0% 0% no-repeat padding-box'));
|
|
239
|
-
const ShowMoreText = styled.div.attrs(applyDefaultTheme)(
|
|
239
|
+
const ShowMoreText = styled.div.attrs(applyDefaultTheme)(_t24 || (_t24 = _`
|
|
240
240
|
font-size: 0.875rem;
|
|
241
241
|
width: 100%;
|
|
242
242
|
${0}
|
|
243
243
|
`), props => props.theme.themeProp('background-color', '#121212', '#fefefe'));
|
|
244
|
-
const ErrorMessage = styled.div.attrs(applyDefaultTheme)(
|
|
244
|
+
const ErrorMessage = styled.div.attrs(applyDefaultTheme)(_t25 || (_t25 = _`
|
|
245
245
|
color: ${0};
|
|
246
246
|
font-size: 0.75rem;
|
|
247
247
|
margin-top: 8px;
|
|
248
248
|
padding: 0 12px;
|
|
249
|
-
`), props => props
|
|
249
|
+
`), props => props.$error ? props.theme.getColor('red-500') : props.$warning ? props.theme.getColor('orange-500') : 'inherit');
|
|
250
250
|
|
|
251
|
-
export { AsyncCreatableMultiSelect, AsyncMultiSelect,
|
|
251
|
+
export { AsyncCreatableMultiSelect, AsyncMultiSelect, CreatableMultiSelect, DropdownMenu, DropdownOptionDeleteIcon, ErrorMessage, MultiSelect, MultiSelectWrapper, MultiValue, MultiValueRemove, MultiValueWrapper, Option, SelectedOption, ShowMoreOverlay, ShowMoreText, ShowMoreWrapper };
|
|
@@ -8,14 +8,21 @@ let _ = t => t,
|
|
|
8
8
|
_t3,
|
|
9
9
|
_t4;
|
|
10
10
|
const radioSize = '18px';
|
|
11
|
-
const
|
|
11
|
+
const shouldForwardProp = prop => {
|
|
12
|
+
return prop !== 'theme' && !prop.startsWith('$');
|
|
13
|
+
};
|
|
14
|
+
const RadioLabel = styled.div.withConfig({
|
|
15
|
+
shouldForwardProp
|
|
16
|
+
}).attrs(applyDefaultTheme)(_t || (_t = _`
|
|
12
17
|
padding-left: ${0};
|
|
13
18
|
font-weight: 400;
|
|
14
19
|
font-size: 0.875rem;
|
|
15
20
|
|
|
16
21
|
${0};
|
|
17
22
|
`), math(`${radioSize} + 10px`), props => props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-600')));
|
|
18
|
-
const Radio = styled.label.
|
|
23
|
+
const Radio = styled.label.withConfig({
|
|
24
|
+
shouldForwardProp
|
|
25
|
+
}).attrs(applyDefaultTheme)(_t2 || (_t2 = _`
|
|
19
26
|
display: block;
|
|
20
27
|
position: relative;
|
|
21
28
|
cursor: pointer;
|
|
@@ -38,7 +38,7 @@ const Switch = React.forwardRef(function Switch({
|
|
|
38
38
|
onBlur: onBlur,
|
|
39
39
|
onChange: onChange
|
|
40
40
|
}), React.createElement(SwitchIndicator, null, React.createElement(SwitchIndicatorButton, null)), typeof label === 'string' && label.length > 0 && React.createElement(SwitchIndicatorLabelText, null, label)), typeof description === 'string' && description.length > 0 && React.createElement(Description, {
|
|
41
|
-
|
|
41
|
+
$spaciousdescription: spaciousDescription
|
|
42
42
|
}, description));
|
|
43
43
|
});
|
|
44
44
|
Switch.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -12,7 +12,12 @@ let _ = t => t,
|
|
|
12
12
|
_t7,
|
|
13
13
|
_t8;
|
|
14
14
|
const switchButtonSize = '16px';
|
|
15
|
-
const
|
|
15
|
+
const shouldForwardProp = prop => {
|
|
16
|
+
return prop !== 'theme' && !prop.startsWith('$');
|
|
17
|
+
};
|
|
18
|
+
const Switch = styled.div.withConfig({
|
|
19
|
+
shouldForwardProp
|
|
20
|
+
}).attrs(applyDefaultTheme)(_t || (_t = _`
|
|
16
21
|
* {
|
|
17
22
|
box-sizing: border-box;
|
|
18
23
|
}
|
|
@@ -37,7 +42,9 @@ const Switch = styled.div.attrs(applyDefaultTheme)(_t || (_t = _`
|
|
|
37
42
|
user-select: text;
|
|
38
43
|
}
|
|
39
44
|
`)));
|
|
40
|
-
const SwitchIndicator = styled.div.
|
|
45
|
+
const SwitchIndicator = styled.div.withConfig({
|
|
46
|
+
shouldForwardProp
|
|
47
|
+
}).attrs(applyDefaultTheme)(_t4 || (_t4 = _`
|
|
41
48
|
display: inline-block;
|
|
42
49
|
position: relative;
|
|
43
50
|
${0}
|
|
@@ -48,7 +55,9 @@ const SwitchIndicator = styled.div.attrs(applyDefaultTheme)(_t4 || (_t4 = _`
|
|
|
48
55
|
${0}
|
|
49
56
|
transition: background 200ms;
|
|
50
57
|
`), props => props.theme.themeProp('background', props.theme.getColor('gray-900'), props.theme.getColor('gray-200')), math(`${switchButtonSize} + 2px`), props => props.theme.themeProp('border-color', props.theme.getColor('gray-500'), props.theme.getColor('gray-300')));
|
|
51
|
-
const SwitchIndicatorButton = styled.div.
|
|
58
|
+
const SwitchIndicatorButton = styled.div.withConfig({
|
|
59
|
+
shouldForwardProp
|
|
60
|
+
}).attrs(applyDefaultTheme)(_t5 || (_t5 = _`
|
|
52
61
|
position: absolute;
|
|
53
62
|
${0}
|
|
54
63
|
height: ${0};
|
|
@@ -57,7 +66,9 @@ const SwitchIndicatorButton = styled.div.attrs(applyDefaultTheme)(_t5 || (_t5 =
|
|
|
57
66
|
box-shadow: ${0} 0 0px 2px 0px;
|
|
58
67
|
transition: left 200ms;
|
|
59
68
|
`), props => props.theme.themeProp('background', props.theme.getColor('gray-200'), props.theme.getColor('white')), switchButtonSize, switchButtonSize, props => props.theme.getColor('gray-500'));
|
|
60
|
-
const SwitchIndicatorLabelText = styled.div.
|
|
69
|
+
const SwitchIndicatorLabelText = styled.div.withConfig({
|
|
70
|
+
shouldForwardProp
|
|
71
|
+
}).attrs(applyDefaultTheme)(_t6 || (_t6 = _`
|
|
61
72
|
padding-left: 10px;
|
|
62
73
|
font-weight: 400;
|
|
63
74
|
font-size: 0.875rem;
|
|
@@ -65,7 +76,9 @@ const SwitchIndicatorLabelText = styled.div.attrs(applyDefaultTheme)(_t6 || (_t6
|
|
|
65
76
|
|
|
66
77
|
${0};
|
|
67
78
|
`), props => props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-600')));
|
|
68
|
-
const SwitchLabel = styled.label.
|
|
79
|
+
const SwitchLabel = styled.label.withConfig({
|
|
80
|
+
shouldForwardProp
|
|
81
|
+
}).attrs(applyDefaultTheme)(_t7 || (_t7 = _`
|
|
69
82
|
display: inline-flex;
|
|
70
83
|
margin-right: auto;
|
|
71
84
|
cursor: pointer;
|
|
@@ -99,12 +112,14 @@ const SwitchLabel = styled.label.attrs(applyDefaultTheme)(_t7 || (_t7 = _`
|
|
|
99
112
|
}
|
|
100
113
|
}
|
|
101
114
|
`), SwitchIndicatorButton, SwitchIndicatorButton, switchButtonSize, SwitchIndicator, props => props.theme.getColor('emerald-500'), props => props.theme.themeProp('border-color', props.theme.getColor('gray-400'), props.theme.getColor('gray-300'), 1), SwitchIndicatorButton, props => props.theme.themeProp('outline', `8px solid ${rgba(props.theme.getColor('emerald-500'), 0.5)}`, `8px solid ${rgba(props.theme.getColor('emerald-500'), 0.3)}`, 1));
|
|
102
|
-
const Description = styled.div.
|
|
115
|
+
const Description = styled.div.withConfig({
|
|
116
|
+
shouldForwardProp
|
|
117
|
+
}).attrs(applyDefaultTheme)(_t8 || (_t8 = _`
|
|
103
118
|
margin: ${0} 0 0 0;
|
|
104
119
|
font-size: 0.75rem;
|
|
105
120
|
line-height: 1.333;
|
|
106
121
|
|
|
107
122
|
${0};
|
|
108
|
-
`), props => props
|
|
123
|
+
`), props => props.$spaciousdescription ? '16px' : '6px', props => props.theme.themeProp('color', props.theme.getColor('gray-400'), props.theme.getColor('gray-500')));
|
|
109
124
|
|
|
110
125
|
export { Description, Switch, SwitchIndicator, SwitchIndicatorButton, SwitchIndicatorLabelText, SwitchLabel };
|
|
@@ -1,7 +1,7 @@
|
|
|
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 { isEmpty } from 'lodash';
|
|
4
|
-
import useMergedRefs from '../../../node_modules/@restart/hooks/
|
|
4
|
+
import useMergedRefs from '../../../node_modules/@restart/hooks/lib/useMergedRefs.js';
|
|
5
5
|
import { nanoid } from 'nanoid';
|
|
6
6
|
import PropTypes from '../../../node_modules/prop-types/index.js';
|
|
7
7
|
import { ReactComponent as SvgEditNote } from '../../../icons/edit-note.svg.js';
|
|
@@ -9,7 +9,7 @@ import { TextAreaContainter, Label, SuccessContainerLabel, TextInput, TextInputF
|
|
|
9
9
|
import Tooltip from '../../data/Tooltip/Tooltip.js';
|
|
10
10
|
import { r as react } from '../../../_virtual/index.js';
|
|
11
11
|
|
|
12
|
-
const _excluded = ["value", "defaultValue", "name", "label", "placeholder", "required", "disabled", "hidden", "readOnly", "edit", "autoComplete", "description", "type", "icon", "rows", "className", "style", "onChange", "onBlur", "noBorder", "
|
|
12
|
+
const _excluded = ["value", "defaultValue", "name", "label", "placeholder", "required", "disabled", "hidden", "readOnly", "edit", "autoComplete", "description", "type", "icon", "rows", "className", "style", "onChange", "onBlur", "noBorder", "loadingIcon", "successIcon", "padding", "descriptionToolTip", "borderRadius", "fieldLabel"];
|
|
13
13
|
const TextArea = React.forwardRef(function TextArea(_ref, forwardedRef) {
|
|
14
14
|
let {
|
|
15
15
|
value,
|
|
@@ -32,7 +32,6 @@ const TextArea = React.forwardRef(function TextArea(_ref, forwardedRef) {
|
|
|
32
32
|
onChange,
|
|
33
33
|
onBlur,
|
|
34
34
|
noBorder,
|
|
35
|
-
instructionsTextArea,
|
|
36
35
|
loadingIcon,
|
|
37
36
|
successIcon,
|
|
38
37
|
padding,
|
|
@@ -72,7 +71,7 @@ const TextArea = React.forwardRef(function TextArea(_ref, forwardedRef) {
|
|
|
72
71
|
type: type
|
|
73
72
|
}, icon), React.createElement(TextInputField, _extends({
|
|
74
73
|
autoFocus: autoFocus,
|
|
75
|
-
borderRadius: borderRadius,
|
|
74
|
+
$borderRadius: borderRadius,
|
|
76
75
|
ref: textInputRef,
|
|
77
76
|
rows: rows,
|
|
78
77
|
value: value,
|
|
@@ -82,15 +81,13 @@ const TextArea = React.forwardRef(function TextArea(_ref, forwardedRef) {
|
|
|
82
81
|
required: required,
|
|
83
82
|
readOnly: readOnly,
|
|
84
83
|
disabled: disabled,
|
|
85
|
-
edit: edit,
|
|
86
|
-
instructionsTextArea: instructionsTextArea,
|
|
84
|
+
$edit: edit,
|
|
87
85
|
type: type,
|
|
88
86
|
autoComplete: autoComplete,
|
|
89
|
-
hasIcon: Boolean(icon),
|
|
90
|
-
icon: icon,
|
|
87
|
+
$hasIcon: Boolean(icon),
|
|
91
88
|
id: `text-input-${uniqueId}`,
|
|
92
89
|
key: uniqueId,
|
|
93
|
-
padding: padding,
|
|
90
|
+
$padding: padding,
|
|
94
91
|
onChange: e => {
|
|
95
92
|
if (e.target.value) {
|
|
96
93
|
setInputIsEmpty(false);
|
|
@@ -107,17 +104,16 @@ const TextArea = React.forwardRef(function TextArea(_ref, forwardedRef) {
|
|
|
107
104
|
},
|
|
108
105
|
onKeyDown: onKeyDown,
|
|
109
106
|
onBlur: onBlur,
|
|
110
|
-
noBorder: noBorder
|
|
107
|
+
$noBorder: noBorder
|
|
111
108
|
}, rest)), !fieldLabel && (type === 'loading' || type === 'success') && React.createElement(SuccessContainer, null, type === 'loading' && loadingIcon, type === 'success' && successIcon), !readOnly && noBorder && React.createElement(InputIconContainer, {
|
|
112
109
|
disabled: disabled
|
|
113
110
|
}, React.createElement(SvgEditNote, {
|
|
114
111
|
className: padding === 'small' ? 'smallPadingIcon' : undefined
|
|
115
112
|
})), label && React.createElement(TextInputLabel, {
|
|
116
113
|
htmlFor: `text-input-${uniqueId}`,
|
|
117
|
-
hasPlaceholder: Boolean(placeholder),
|
|
118
|
-
hasIcon: Boolean(icon),
|
|
119
|
-
inputIsEmpty: inputIsEmpty
|
|
120
|
-
type: type
|
|
114
|
+
$hasPlaceholder: Boolean(placeholder),
|
|
115
|
+
$hasIcon: Boolean(icon),
|
|
116
|
+
$inputIsEmpty: inputIsEmpty
|
|
121
117
|
}, label, required && ' *'), typeof description === 'string' && description.length > 0 && React.createElement(Description, {
|
|
122
118
|
type: type
|
|
123
119
|
}, description)));
|
|
@@ -139,9 +135,7 @@ TextArea.defaultProps = {
|
|
|
139
135
|
hidden: false,
|
|
140
136
|
type: '',
|
|
141
137
|
padding: 'medium',
|
|
142
|
-
instructionsTextArea: false,
|
|
143
138
|
descriptionToolTip: '',
|
|
144
|
-
isExpanded: () => {},
|
|
145
139
|
onChange: () => {},
|
|
146
140
|
borderRadius: 0
|
|
147
141
|
};
|
|
@@ -159,8 +153,6 @@ TextArea.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
159
153
|
edit: PropTypes.bool,
|
|
160
154
|
autoComplete: PropTypes.string,
|
|
161
155
|
description: PropTypes.string,
|
|
162
|
-
error: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
163
|
-
warning: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
164
156
|
icon: PropTypes.element,
|
|
165
157
|
rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
166
158
|
className: PropTypes.string,
|
|
@@ -169,9 +161,7 @@ TextArea.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
169
161
|
onChange: PropTypes.func,
|
|
170
162
|
onBlur: PropTypes.func,
|
|
171
163
|
noBorder: PropTypes.bool,
|
|
172
|
-
isExpanded: PropTypes.func,
|
|
173
164
|
type: PropTypes.oneOf(['', 'error', 'error-border', 'warning-border', 'warning', 'loading', 'success']),
|
|
174
|
-
instructionsTextArea: PropTypes.bool,
|
|
175
165
|
loadingIcon: PropTypes.element,
|
|
176
166
|
successIcon: PropTypes.element,
|
|
177
167
|
descriptionToolTip: PropTypes.string,
|