@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
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { objectSpread2 as _objectSpread2 } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
1
2
|
import styled, { keyframes, css } from 'styled-components';
|
|
2
3
|
import { applyDefaultTheme } from '../../../utils/defaultTheme.js';
|
|
3
4
|
|
|
@@ -11,6 +12,8 @@ let _ = t => t,
|
|
|
11
12
|
_t7,
|
|
12
13
|
_t8,
|
|
13
14
|
_t9,
|
|
15
|
+
_t0,
|
|
16
|
+
_t1,
|
|
14
17
|
_t10,
|
|
15
18
|
_t11,
|
|
16
19
|
_t12,
|
|
@@ -87,13 +90,20 @@ const commonAnchorTagStyle = css(_t7 || (_t7 = _`
|
|
|
87
90
|
const readOnlyBackground = css(_t8 || (_t8 = _`
|
|
88
91
|
${0}
|
|
89
92
|
`), props => props.theme.themeProp('background', props.theme.getColor('gray-900'), props.theme.getColor('white')));
|
|
90
|
-
const
|
|
93
|
+
const shouldForwardProp = prop => {
|
|
94
|
+
return prop !== 'theme' && !prop.startsWith('$');
|
|
95
|
+
};
|
|
96
|
+
const CompactTextInput = styled.div.withConfig({
|
|
97
|
+
shouldForwardProp
|
|
98
|
+
}).attrs(applyDefaultTheme)(_t9 || (_t9 = _`
|
|
91
99
|
display: flex;
|
|
92
100
|
align-items: center;
|
|
93
101
|
height: 24px;
|
|
94
102
|
font-family: ${0};
|
|
95
103
|
`), props => props.theme.primaryFontFamily);
|
|
96
|
-
const Label = styled.label.
|
|
104
|
+
const Label = styled.label.withConfig({
|
|
105
|
+
shouldForwardProp
|
|
106
|
+
}).attrs(applyDefaultTheme)(_t0 || (_t0 = _`
|
|
97
107
|
${0};
|
|
98
108
|
flex-basis: 33.33%;
|
|
99
109
|
font-size: 0.875rem;
|
|
@@ -103,16 +113,20 @@ const Label = styled.label.attrs(applyDefaultTheme)(_t10 || (_t10 = _`
|
|
|
103
113
|
display: flex;
|
|
104
114
|
align-items: center;
|
|
105
115
|
${0}
|
|
106
|
-
`), props => props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700')), props => props.disabled && css(
|
|
116
|
+
`), props => props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700')), props => props.disabled && css(_t1 || (_t1 = _`
|
|
107
117
|
opacity: 0.5;
|
|
108
118
|
cursor: not-allowed;
|
|
109
119
|
`)));
|
|
110
|
-
const InputContainer = styled.div.
|
|
120
|
+
const InputContainer = styled.div.withConfig({
|
|
121
|
+
shouldForwardProp
|
|
122
|
+
}).attrs(applyDefaultTheme)(_t10 || (_t10 = _`
|
|
111
123
|
position: relative;
|
|
112
124
|
height: 19px;
|
|
113
125
|
flex-basis: ${0};
|
|
114
126
|
`), props => props.$hasLabel ? '66.66%' : '100%');
|
|
115
|
-
const SuccessContainer = styled.div.
|
|
127
|
+
const SuccessContainer = styled.div.withConfig({
|
|
128
|
+
shouldForwardProp
|
|
129
|
+
}).attrs(applyDefaultTheme)(_t11 || (_t11 = _`
|
|
116
130
|
opacity: 1;
|
|
117
131
|
pointer-events: none;
|
|
118
132
|
display: flex;
|
|
@@ -125,7 +139,9 @@ const SuccessContainer = styled.div.attrs(applyDefaultTheme)(_t13 || (_t13 = _`
|
|
|
125
139
|
width: 13px;
|
|
126
140
|
}
|
|
127
141
|
`), props => props.fadeIn ? 0 : 1, props => props.fadeIn ? fadeOutCheck : fadeInCheck, props => props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-500')));
|
|
128
|
-
const InputSuccessContainer = styled.div.
|
|
142
|
+
const InputSuccessContainer = styled.div.withConfig({
|
|
143
|
+
shouldForwardProp
|
|
144
|
+
}).attrs(applyDefaultTheme)(_t12 || (_t12 = _`
|
|
129
145
|
opacity: 1;
|
|
130
146
|
pointer-events: none;
|
|
131
147
|
display: flex;
|
|
@@ -141,7 +157,9 @@ const InputSuccessContainer = styled.div.attrs(applyDefaultTheme)(_t14 || (_t14
|
|
|
141
157
|
width: 13px;
|
|
142
158
|
}
|
|
143
159
|
`), props => props.fadeIn ? 0 : 1, props => props.fadeIn ? fadeOutCheck : fadeInCheck, props => props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-500')));
|
|
144
|
-
const InputIconContainer = styled.div.
|
|
160
|
+
const InputIconContainer = styled.div.withConfig({
|
|
161
|
+
shouldForwardProp
|
|
162
|
+
}).attrs(applyDefaultTheme)(_t13 || (_t13 = _`
|
|
145
163
|
opacity: 0;
|
|
146
164
|
pointer-events: none;
|
|
147
165
|
border-top-right-radius: 3px;
|
|
@@ -164,16 +182,20 @@ const InputIconContainer = styled.div.attrs(applyDefaultTheme)(_t15 || (_t15 = _
|
|
|
164
182
|
> svg {
|
|
165
183
|
width: 12px;
|
|
166
184
|
}
|
|
167
|
-
`), props => props.theme.themeProp('background', css(
|
|
185
|
+
`), props => props.theme.themeProp('background', css(_t14 || (_t14 = _`
|
|
168
186
|
linear-gradient(-90deg,
|
|
169
187
|
${0} 55%,
|
|
170
188
|
transparent)
|
|
171
|
-
`), props => props.type === 'error' ? '#901d1d' : props.type === 'warning' ? '#816600' : props.theme.getColor('gray-700')), css(
|
|
189
|
+
`), props => props.type === 'error' ? '#901d1d' : props.type === 'warning' ? '#816600' : props.theme.getColor('gray-700')), css(_t15 || (_t15 = _`
|
|
172
190
|
linear-gradient(-90deg,
|
|
173
191
|
${0} 55%,
|
|
174
192
|
transparent)
|
|
175
193
|
`), props => props.type === 'error' ? '#f7d5d0' : props.type === 'warning' ? '#fffebf' : props.theme.getColor('gray-100'))), props => props.theme.getColor('gray-400'), props => props.type === 'warning' && props.theme.themeProp('color', '#C3AF43', '#C3AF43'), props => props.type === 'error' && props.theme.themeProp('color', '#CB968F', '#CB968F'));
|
|
176
|
-
const Input = styled.input.
|
|
194
|
+
const Input = styled.input.withConfig({
|
|
195
|
+
shouldForwardProp
|
|
196
|
+
}).attrs(props => _objectSpread2(_objectSpread2({}, applyDefaultTheme(props)), {}, {
|
|
197
|
+
type: props.inputtype || 'text'
|
|
198
|
+
}))(_t16 || (_t16 = _`
|
|
177
199
|
box-sizing: border-box;
|
|
178
200
|
height: 22px;
|
|
179
201
|
width: 100%;
|
|
@@ -185,7 +207,7 @@ const Input = styled.input.attrs(applyDefaultTheme)(_t18 || (_t18 = _`
|
|
|
185
207
|
border-radius: 3px;
|
|
186
208
|
border: 1px solid transparent;
|
|
187
209
|
|
|
188
|
-
|
|
210
|
+
${0}
|
|
189
211
|
|
|
190
212
|
${0}
|
|
191
213
|
|
|
@@ -193,11 +215,12 @@ const Input = styled.input.attrs(applyDefaultTheme)(_t18 || (_t18 = _`
|
|
|
193
215
|
|
|
194
216
|
${0}
|
|
195
217
|
|
|
196
|
-
${0}
|
|
197
|
-
${0};
|
|
198
218
|
|
|
199
|
-
${0}
|
|
200
|
-
|
|
219
|
+
${0}
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
201
224
|
|
|
202
225
|
${0};
|
|
203
226
|
|
|
@@ -205,8 +228,11 @@ const Input = styled.input.attrs(applyDefaultTheme)(_t18 || (_t18 = _`
|
|
|
205
228
|
|
|
206
229
|
|
|
207
230
|
&&:not(:hover):not(:focus) {
|
|
231
|
+
|
|
232
|
+
${0}
|
|
208
233
|
|
|
209
|
-
|
|
234
|
+
|
|
235
|
+
|
|
210
236
|
${0};
|
|
211
237
|
|
|
212
238
|
${0}
|
|
@@ -258,13 +284,25 @@ const Input = styled.input.attrs(applyDefaultTheme)(_t18 || (_t18 = _`
|
|
|
258
284
|
}
|
|
259
285
|
|
|
260
286
|
${0}
|
|
261
|
-
`), props =>
|
|
287
|
+
`), props => {
|
|
288
|
+
if (props.type === 'error') {
|
|
289
|
+
return css(_t17 || (_t17 = _`
|
|
290
|
+
${0} !important;
|
|
291
|
+
`), props.theme.themeProp('background', '#7f1b1b', '#FEE2E2'));
|
|
292
|
+
} else if (props.type === 'warning') {
|
|
293
|
+
return css(_t18 || (_t18 = _`
|
|
294
|
+
${0} !important;
|
|
295
|
+
`), props.theme.themeProp('background', '#634E01', '#FFFDE8'));
|
|
296
|
+
} else {
|
|
297
|
+
return props.theme.themeProp('background', props.theme.getColor('gray-900'), props.theme.getColor('white'));
|
|
298
|
+
}
|
|
299
|
+
}, props => props.readOnly && css(_t19 || (_t19 = _`
|
|
262
300
|
cursor: default;
|
|
263
301
|
`)), props => props.disabled && css(_t20 || (_t20 = _`
|
|
264
302
|
opacity: 0.5;
|
|
265
303
|
`)), props => props.type === 'success' && css(_t21 || (_t21 = _`
|
|
266
304
|
animation: ${0} 0.5s ease-in-out;
|
|
267
|
-
`), props => props.type === 'success' ? fadeIn : fadeOut), props => props.theme.themeProp('color', props.theme.getColor('gray-200'), props.theme.getColor('gray-700')), props => props.
|
|
305
|
+
`), props => props.type === 'success' ? fadeIn : fadeOut), props => props.theme.themeProp('color', props.theme.getColor('gray-200'), props.theme.getColor('gray-700')), props => props.haslink && css(_t22 || (_t22 = _`
|
|
268
306
|
&&:not(:focus),
|
|
269
307
|
&&:read-only {
|
|
270
308
|
${0}
|
|
@@ -272,7 +310,17 @@ const Input = styled.input.attrs(applyDefaultTheme)(_t18 || (_t18 = _`
|
|
|
272
310
|
&&:read-only {
|
|
273
311
|
cursor: default;
|
|
274
312
|
}
|
|
275
|
-
`), linkColor), props =>
|
|
313
|
+
`), linkColor), props => {
|
|
314
|
+
if (props.$edit) {
|
|
315
|
+
if (props.type === 'error') {
|
|
316
|
+
return props.theme.themeProp('background', '#7f1b1b', '#FEE2E2');
|
|
317
|
+
} else if (props.type === 'warning') {
|
|
318
|
+
return props.theme.themeProp('background', '#634E01', '#FFFDE8');
|
|
319
|
+
} else {
|
|
320
|
+
return props.theme.themeProp('background', 'rgba(39,39,42, 0.7)', 'rgba(244,244,245, 0.3)');
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}, props => props.$edit && props.theme.themeProp('border-color', 'rgba(39,39,42, 0.7)', 'rgba(228,228,231, 0.3)'), props => props.haslink && css(_t23 || (_t23 = _`
|
|
276
324
|
&&:not(:focus),
|
|
277
325
|
&&:read-only {
|
|
278
326
|
cursor: default;
|
|
@@ -280,7 +328,7 @@ const Input = styled.input.attrs(applyDefaultTheme)(_t18 || (_t18 = _`
|
|
|
280
328
|
}
|
|
281
329
|
`), linkColor), props => props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('gray-100')), props => props.readOnly && css(_t24 || (_t24 = _`
|
|
282
330
|
${0}
|
|
283
|
-
`), readOnlyBackground), props => props
|
|
331
|
+
`), readOnlyBackground), props => props.$edit && props.theme.themeProp('border-color', props.theme.getColor('gray-700'), props.theme.getColor('gray-100')), props => props.type === 'warning' && props.theme.themeProp('background', '#806403', '#FFFEBF'), props => props.type === 'error' && props.theme.themeProp('background', '#901d1d', '#F7D5D0'), props => props.$haslink && css(_t25 || (_t25 = _`
|
|
284
332
|
cursor: pointer;
|
|
285
333
|
&&:read-only {
|
|
286
334
|
background: none !important;
|
|
@@ -289,7 +337,7 @@ const Input = styled.input.attrs(applyDefaultTheme)(_t18 || (_t18 = _`
|
|
|
289
337
|
`)), InputIconContainer, props => props.disabled && css(_t26 || (_t26 = _`
|
|
290
338
|
background: none !important;
|
|
291
339
|
cursor: not-allowed;
|
|
292
|
-
`)), props => props.disabled && props
|
|
340
|
+
`)), props => props.disabled && props.$haslink && css(_t27 || (_t27 = _`
|
|
293
341
|
background: none !important;
|
|
294
342
|
cursor: not-allowed !important;
|
|
295
343
|
`)), props => !props.readOnly && props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('gray-100')), props => props.readOnly && css(_t28 || (_t28 = _`
|
|
@@ -304,14 +352,16 @@ const Input = styled.input.attrs(applyDefaultTheme)(_t18 || (_t18 = _`
|
|
|
304
352
|
${0}
|
|
305
353
|
${0}
|
|
306
354
|
${0}
|
|
307
|
-
`), props => props.theme.themeProp('border-color', '#D83018', '#D83018'), props.theme.themeProp('background', 'white', 'white'), props.theme.themeProp('color', 'black', 'black')), props => props
|
|
355
|
+
`), props => props.theme.themeProp('border-color', '#D83018', '#D83018'), props.theme.themeProp('background', 'white', 'white'), props.theme.themeProp('color', 'black', 'black')), props => props.$bold && css(_t32 || (_t32 = _`
|
|
308
356
|
font-size: 1rem;
|
|
309
357
|
font-weight: 500;
|
|
310
358
|
line-height: 1.0625;
|
|
311
359
|
padding-top: 3px;
|
|
312
360
|
padding-bottom: 2px;
|
|
313
361
|
`)));
|
|
314
|
-
const LinkPopoverContainer = styled.div.
|
|
362
|
+
const LinkPopoverContainer = styled.div.withConfig({
|
|
363
|
+
shouldForwardProp
|
|
364
|
+
}).attrs(applyDefaultTheme)(_t33 || (_t33 = _`
|
|
315
365
|
${0}
|
|
316
366
|
|
|
317
367
|
padding: 5px 8px;
|
|
@@ -321,11 +371,15 @@ const LinkPopoverContainer = styled.div.attrs(applyDefaultTheme)(_t33 || (_t33 =
|
|
|
321
371
|
margin-right: 8px;
|
|
322
372
|
}
|
|
323
373
|
`), commonAnchorTagStyle);
|
|
324
|
-
const StyledLink = styled.a.
|
|
374
|
+
const StyledLink = styled.a.withConfig({
|
|
375
|
+
shouldForwardProp
|
|
376
|
+
}).attrs(applyDefaultTheme)(_t34 || (_t34 = _`
|
|
325
377
|
${0}
|
|
326
378
|
${0}
|
|
327
379
|
`), commonAnchorTagStyle, linkColor);
|
|
328
|
-
const ReadOnlyLinkContainer = styled.div.
|
|
380
|
+
const ReadOnlyLinkContainer = styled.div.withConfig({
|
|
381
|
+
shouldForwardProp
|
|
382
|
+
}).attrs(applyDefaultTheme)(_t35 || (_t35 = _`
|
|
329
383
|
${0};
|
|
330
384
|
border: 1px solid transparent;
|
|
331
385
|
border-radius: 3px;
|
|
@@ -11,24 +11,35 @@ let _ = t => t,
|
|
|
11
11
|
_t7,
|
|
12
12
|
_t8,
|
|
13
13
|
_t9;
|
|
14
|
-
const
|
|
14
|
+
const shouldForwardProp = prop => {
|
|
15
|
+
return prop !== 'theme' && !prop.startsWith('$');
|
|
16
|
+
};
|
|
17
|
+
const MultiLevelCheckbox = styled.fieldset.withConfig({
|
|
18
|
+
shouldForwardProp
|
|
19
|
+
}).attrs(applyDefaultTheme)(_t || (_t = _`
|
|
15
20
|
padding: 0;
|
|
16
21
|
border: 0;
|
|
17
22
|
margin: 0;
|
|
18
23
|
`));
|
|
19
|
-
const MultiLevelCheckboxLegend = styled.legend.
|
|
24
|
+
const MultiLevelCheckboxLegend = styled.legend.withConfig({
|
|
25
|
+
shouldForwardProp
|
|
26
|
+
}).attrs(applyDefaultTheme)(_t2 || (_t2 = _`
|
|
20
27
|
line-height: 1.2;
|
|
21
28
|
font-size: 0.75rem;
|
|
22
29
|
padding: 0 0 4px;
|
|
23
30
|
letter-spacing: 0.03em;
|
|
24
31
|
${0}
|
|
25
32
|
`), props => props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-600')));
|
|
26
|
-
const MultiLevelCheckboxNoResults = styled.div.
|
|
33
|
+
const MultiLevelCheckboxNoResults = styled.div.withConfig({
|
|
34
|
+
shouldForwardProp
|
|
35
|
+
}).attrs(applyDefaultTheme)(_t3 || (_t3 = _`
|
|
27
36
|
text-align: center;
|
|
28
37
|
opacity: 0.7;
|
|
29
38
|
font-size: 0.875rem;
|
|
30
39
|
`));
|
|
31
|
-
const CheckboxTreeChildren = styled.div.
|
|
40
|
+
const CheckboxTreeChildren = styled.div.withConfig({
|
|
41
|
+
shouldForwardProp
|
|
42
|
+
}).attrs(applyDefaultTheme)(_t4 || (_t4 = _`
|
|
32
43
|
display: grid;
|
|
33
44
|
grid-template-rows: 0fr;
|
|
34
45
|
padding-left: 28px;
|
|
@@ -43,14 +54,20 @@ const CheckboxTreeChildren = styled.div.attrs(applyDefaultTheme)(_t4 || (_t4 = _
|
|
|
43
54
|
`), props => props.$expanded && css(_t5 || (_t5 = _`
|
|
44
55
|
grid-template-rows: 1fr;
|
|
45
56
|
`)));
|
|
46
|
-
const CheckboxTree = styled.div.
|
|
57
|
+
const CheckboxTree = styled.div.withConfig({
|
|
58
|
+
shouldForwardProp
|
|
59
|
+
}).attrs(applyDefaultTheme)(_t6 || (_t6 = _`
|
|
47
60
|
width: fit-content;
|
|
48
61
|
`));
|
|
49
|
-
const CheckboxTreeCheckboxContainer = styled.div.
|
|
62
|
+
const CheckboxTreeCheckboxContainer = styled.div.withConfig({
|
|
63
|
+
shouldForwardProp
|
|
64
|
+
}).attrs(applyDefaultTheme)(_t7 || (_t7 = _`
|
|
50
65
|
position: relative;
|
|
51
66
|
margin-top: 4px;
|
|
52
67
|
`));
|
|
53
|
-
const ExpandTreeButton = styled.button.
|
|
68
|
+
const ExpandTreeButton = styled.button.withConfig({
|
|
69
|
+
shouldForwardProp
|
|
70
|
+
}).attrs(applyDefaultTheme)(_t8 || (_t8 = _`
|
|
54
71
|
-webkit-appearance: none;
|
|
55
72
|
background: none;
|
|
56
73
|
border: none;
|
|
@@ -7,7 +7,7 @@ import { ReactComponent as SvgClose } from '../../../icons/close.svg.js';
|
|
|
7
7
|
import MultiLevelCheckbox, { NodeType, findChildValues } from '../MultiLevelCheckbox/MultiLevelCheckbox.js';
|
|
8
8
|
import { useEventListener } from '../../../hooks/useEventListner.js';
|
|
9
9
|
import { useOnClickOutside } from '../../../hooks/useOnClickOutside.js';
|
|
10
|
-
import useUpdateEffect from '../../../node_modules/@restart/hooks/
|
|
10
|
+
import useUpdateEffect from '../../../node_modules/@restart/hooks/lib/useUpdateEffect.js';
|
|
11
11
|
import { isFunction } from 'lodash';
|
|
12
12
|
import Popover from '../../data/Popover/Popover.js';
|
|
13
13
|
import TextInput from '../TextInput/TextInput.js';
|
|
@@ -11,12 +11,19 @@ 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 MultiLevelCheckboxSelect = styled.div.withConfig({
|
|
20
|
+
shouldForwardProp
|
|
21
|
+
}).attrs(applyDefaultTheme)(_t || (_t = _`
|
|
17
22
|
font-family: ${0};
|
|
18
23
|
`), props => props.theme.primaryFontFamily);
|
|
19
|
-
const MultiLevelCheckboxSelectInput = styled.div.
|
|
24
|
+
const MultiLevelCheckboxSelectInput = styled.div.withConfig({
|
|
25
|
+
shouldForwardProp
|
|
26
|
+
}).attrs(applyDefaultTheme)(_t2 || (_t2 = _`
|
|
20
27
|
position: relative;
|
|
21
28
|
border: 1px solid;
|
|
22
29
|
${0}
|
|
@@ -33,7 +40,9 @@ const MultiLevelCheckboxSelectInput = styled.div.attrs(applyDefaultTheme)(_t2 ||
|
|
|
33
40
|
${0}
|
|
34
41
|
}
|
|
35
42
|
`), props => props.theme.themeProp('border-color', props.theme.getColor('gray-500'), props.theme.getColor('gray-400')), props => props.theme.themeProp('border-color', props.theme.getColor('gray-500'), props.theme.getColor('gray-600'), 1));
|
|
36
|
-
const Item = styled.div.
|
|
43
|
+
const Item = styled.div.withConfig({
|
|
44
|
+
shouldForwardProp
|
|
45
|
+
}).attrs(applyDefaultTheme)(_t3 || (_t3 = _`
|
|
37
46
|
display: flex;
|
|
38
47
|
align-items: center;
|
|
39
48
|
background: #272727;
|
|
@@ -42,10 +51,14 @@ const Item = styled.div.attrs(applyDefaultTheme)(_t3 || (_t3 = _`
|
|
|
42
51
|
height: 26px;
|
|
43
52
|
border-radius: 3px;
|
|
44
53
|
`));
|
|
45
|
-
const ItemLabel = styled.div.
|
|
54
|
+
const ItemLabel = styled.div.withConfig({
|
|
55
|
+
shouldForwardProp
|
|
56
|
+
}).attrs(applyDefaultTheme)(_t4 || (_t4 = _`
|
|
46
57
|
padding: 0 5px 0 8px;
|
|
47
58
|
`));
|
|
48
|
-
const ItemRemoveButton = styled.button.
|
|
59
|
+
const ItemRemoveButton = styled.button.withConfig({
|
|
60
|
+
shouldForwardProp
|
|
61
|
+
}).attrs(applyDefaultTheme)(_t5 || (_t5 = _`
|
|
49
62
|
color: inherit;
|
|
50
63
|
border: none;
|
|
51
64
|
background: none;
|
|
@@ -65,7 +78,9 @@ const ItemRemoveButton = styled.button.attrs(applyDefaultTheme)(_t5 || (_t5 = _`
|
|
|
65
78
|
display: block;
|
|
66
79
|
}
|
|
67
80
|
`), props => props.theme.getColor('red-500'));
|
|
68
|
-
const Label = styled.div.
|
|
81
|
+
const Label = styled.div.withConfig({
|
|
82
|
+
shouldForwardProp
|
|
83
|
+
}).attrs(applyDefaultTheme)(_t6 || (_t6 = _`
|
|
69
84
|
position: absolute;
|
|
70
85
|
top: -8px;
|
|
71
86
|
left: 7px;
|
|
@@ -78,24 +93,34 @@ const Label = styled.div.attrs(applyDefaultTheme)(_t6 || (_t6 = _`
|
|
|
78
93
|
${0}
|
|
79
94
|
${0}
|
|
80
95
|
`), props => props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-600')), props => props.theme.themeProp('background', `linear-gradient(0deg, ${props.theme.getColor('gray-900')} calc(50% + 1px), transparent 50%)`, `linear-gradient(0deg, ${props.theme.getColor('white')} calc(50% + 1px), transparent 50%)`));
|
|
81
|
-
const Placeholder = styled.div.
|
|
96
|
+
const Placeholder = styled.div.withConfig({
|
|
97
|
+
shouldForwardProp
|
|
98
|
+
}).attrs(applyDefaultTheme)(_t7 || (_t7 = _`
|
|
82
99
|
font-size: 0.875rem;
|
|
83
100
|
line-height: 26px;
|
|
84
101
|
padding-left: 4px;
|
|
85
102
|
opacity: 0.4;
|
|
86
103
|
`));
|
|
87
|
-
const PopoverContainer = styled.div.
|
|
104
|
+
const PopoverContainer = styled.div.withConfig({
|
|
105
|
+
shouldForwardProp
|
|
106
|
+
}).attrs(applyDefaultTheme)(_t8 || (_t8 = _`
|
|
88
107
|
max-height: inherit;
|
|
89
108
|
display: flex;
|
|
90
109
|
flex-direction: column;
|
|
91
110
|
`));
|
|
92
|
-
const PopoverHeader = styled.div.
|
|
111
|
+
const PopoverHeader = styled.div.withConfig({
|
|
112
|
+
shouldForwardProp
|
|
113
|
+
}).attrs(applyDefaultTheme)(_t9 || (_t9 = _`
|
|
93
114
|
${0}
|
|
94
115
|
`), props => props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('white')));
|
|
95
|
-
const SearchContainer = styled.div.
|
|
116
|
+
const SearchContainer = styled.div.withConfig({
|
|
117
|
+
shouldForwardProp
|
|
118
|
+
}).attrs(applyDefaultTheme)(_t0 || (_t0 = _`
|
|
96
119
|
padding: 12px 8px;
|
|
97
120
|
`));
|
|
98
|
-
const OptionsContainer = styled.div.
|
|
121
|
+
const OptionsContainer = styled.div.withConfig({
|
|
122
|
+
shouldForwardProp
|
|
123
|
+
}).attrs(applyDefaultTheme)(_t1 || (_t1 = _`
|
|
99
124
|
padding: 12px 8px;
|
|
100
125
|
overflow: auto;
|
|
101
126
|
box-sizing: border-box;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React from '../../../node_modules/react/index.js';
|
|
3
3
|
import PropTypes from '../../../node_modules/prop-types/index.js';
|
|
4
|
-
import {
|
|
5
|
-
import { MultiSelectWrapper, AsyncCreatableMultiSelect, AsyncMultiSelect, CreatableMultiSelect, MultiSelect as MultiSelect$2, ShowMoreWrapper, ShowMoreOverlay, ShowMoreText, ErrorMessage, MultiValueRemove as MultiValueRemove$1, DropdownMenu, Option as Option$1, SelectedOption as SelectedOption$1, DropdownOptionDeleteIcon, Control, Label, ValueContainer, MultiValueWrapper, MultiValue, Input } from './MultiSelect.styled.js';
|
|
4
|
+
import { MultiSelectWrapper, AsyncCreatableMultiSelect, AsyncMultiSelect, CreatableMultiSelect, MultiSelect as MultiSelect$2, ShowMoreWrapper, ShowMoreOverlay, ShowMoreText, ErrorMessage, MultiValueRemove as MultiValueRemove$1, DropdownMenu, Option as Option$1, SelectedOption as SelectedOption$1, DropdownOptionDeleteIcon, MultiValueWrapper, MultiValue } from './MultiSelect.styled.js';
|
|
6
5
|
import { ReactComponent as SvgClose } from '../../../icons/close.svg.js';
|
|
7
6
|
import { r as react } from '../../../_virtual/index.js';
|
|
8
7
|
|
|
9
|
-
const _excluded = ["
|
|
8
|
+
const _excluded = ["selectedOptions", "availableOptions", "loadOptions", "loadingMessageFunc", "onUpdateCallback", "editText", "createNewOptionMessageFunc", "noOptionsMessageFunc", "onMultiValueClick", "showMore", "showMoreText", "displayTotalOnShowMore", "creatable", "readOnly", "hidden", "disabled", "error", "warning"];
|
|
10
9
|
const MultiSelect = React.forwardRef(function MultiSelect(_ref, forwardedRef) {
|
|
11
10
|
let {
|
|
12
|
-
label,
|
|
13
11
|
selectedOptions,
|
|
14
12
|
availableOptions,
|
|
15
13
|
loadOptions,
|
|
@@ -30,7 +28,6 @@ const MultiSelect = React.forwardRef(function MultiSelect(_ref, forwardedRef) {
|
|
|
30
28
|
warning
|
|
31
29
|
} = _ref,
|
|
32
30
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
33
|
-
const [uniqueId] = react.exports.useState(nanoid());
|
|
34
31
|
const [selected, setSelected] = react.exports.useState(selectedOptions);
|
|
35
32
|
const [focused, setFocused] = react.exports.useState(false);
|
|
36
33
|
const [displayShowMore, setDisplayShowMore] = react.exports.useState(error || warning ? false : showMore);
|
|
@@ -41,30 +38,6 @@ const MultiSelect = React.forwardRef(function MultiSelect(_ref, forwardedRef) {
|
|
|
41
38
|
const handleShowMoreClick = () => {
|
|
42
39
|
setDisplayShowMore(false);
|
|
43
40
|
};
|
|
44
|
-
const Control$1 = react.exports.useMemo(() => {
|
|
45
|
-
const ControlWrapper = innerProps => {
|
|
46
|
-
return React.createElement(Control, _extends({
|
|
47
|
-
className: "multi-select-control",
|
|
48
|
-
readOnly: readOnly
|
|
49
|
-
}, innerProps));
|
|
50
|
-
};
|
|
51
|
-
ControlWrapper.displayName = 'ControlWrapper';
|
|
52
|
-
return ControlWrapper;
|
|
53
|
-
}, []);
|
|
54
|
-
const ValueContainer$1 = react.exports.useMemo(() => {
|
|
55
|
-
const ValueContainerWrapper = innerProps => {
|
|
56
|
-
return React.createElement(React.Fragment, null, label && React.createElement(Label, {
|
|
57
|
-
htmlFor: uniqueId
|
|
58
|
-
}, label), React.createElement(ValueContainer, _extends({
|
|
59
|
-
showMore: displayShowMore,
|
|
60
|
-
error: error,
|
|
61
|
-
warning: warning,
|
|
62
|
-
className: "multi-select-values-container"
|
|
63
|
-
}, innerProps)));
|
|
64
|
-
};
|
|
65
|
-
ValueContainerWrapper.displayName = 'ValueContainerWrapper';
|
|
66
|
-
return ValueContainerWrapper;
|
|
67
|
-
}, [displayShowMore, error, warning]);
|
|
68
41
|
const MultiValue$1 = innerProps => {
|
|
69
42
|
return React.createElement(MultiValueWrapper, {
|
|
70
43
|
className: "multi-value-wrapper",
|
|
@@ -79,28 +52,12 @@ const MultiSelect = React.forwardRef(function MultiSelect(_ref, forwardedRef) {
|
|
|
79
52
|
readOnly: readOnly
|
|
80
53
|
}, innerProps)));
|
|
81
54
|
};
|
|
82
|
-
const Input$1 = react.exports.useMemo(() => {
|
|
83
|
-
const InputWrapper = innerProps => {
|
|
84
|
-
return React.createElement(Input, _extends({
|
|
85
|
-
className: "multi-select-input",
|
|
86
|
-
$focused: focused,
|
|
87
|
-
edittext: editText
|
|
88
|
-
}, innerProps, {
|
|
89
|
-
isDisabled: readOnly || disabled
|
|
90
|
-
}));
|
|
91
|
-
};
|
|
92
|
-
InputWrapper.displayName = 'InputWrapper';
|
|
93
|
-
return InputWrapper;
|
|
94
|
-
}, [focused]);
|
|
95
55
|
const innerComponents = {
|
|
96
56
|
DropdownIndicator: null,
|
|
97
|
-
Control: Control$1,
|
|
98
57
|
MultiValue: MultiValue$1,
|
|
99
58
|
MultiValueRemove: innerProps => {
|
|
100
59
|
return readOnly || disabled ? false : MultiValueRemove(innerProps);
|
|
101
60
|
},
|
|
102
|
-
ValueContainer: ValueContainer$1,
|
|
103
|
-
Input: Input$1,
|
|
104
61
|
Menu,
|
|
105
62
|
Option: innerProps => {
|
|
106
63
|
return innerProps.isSelected ? SelectedOption(innerProps) : Option(innerProps);
|
|
@@ -178,13 +135,13 @@ const MultiSelect = React.forwardRef(function MultiSelect(_ref, forwardedRef) {
|
|
|
178
135
|
};
|
|
179
136
|
if (hidden) return null;
|
|
180
137
|
return React.createElement(MultiSelectWrapper, {
|
|
181
|
-
error: error,
|
|
182
|
-
warning: warning
|
|
138
|
+
$error: error,
|
|
139
|
+
$warning: warning
|
|
183
140
|
}, loadOptions ? creatable ? React.createElement(AsyncCreatableMultiSelect, _extends({}, sharedSelectProps, props)) : React.createElement(AsyncMultiSelect, _extends({}, sharedSelectProps, props)) : creatable ? React.createElement(CreatableMultiSelect, _extends({}, sharedSelectProps, props)) : React.createElement(MultiSelect$2, _extends({}, sharedSelectProps, props)), displayShowMore && !(error || warning) && React.createElement(ShowMoreWrapper, {
|
|
184
141
|
onClick: handleShowMoreClick
|
|
185
142
|
}, React.createElement(ShowMoreOverlay, null), React.createElement(ShowMoreText, null, showMoreText, " ", displayTotalOnShowMore && '(' + selected.length + ')')), (typeof error === 'string' || typeof warning === 'string') && React.createElement(ErrorMessage, {
|
|
186
|
-
error: error,
|
|
187
|
-
warning: warning
|
|
143
|
+
$error: error,
|
|
144
|
+
$warning: warning
|
|
188
145
|
}, error ? error : warning));
|
|
189
146
|
});
|
|
190
147
|
MultiSelect.propTypes = process.env.NODE_ENV !== "production" ? {
|