@ultraviolet/ui 1.28.0 → 1.29.1

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.
Files changed (112) hide show
  1. package/README.md +14 -7
  2. package/dist/index.d.ts +61 -12
  3. package/dist/react-datepicker/dist/react-datepicker.min.css.js +1 -1
  4. package/dist/src/components/ActionBar/index.js +22 -37
  5. package/dist/src/components/Alert/index.js +27 -41
  6. package/dist/src/components/Avatar/index.js +48 -69
  7. package/dist/src/components/Badge/index.js +29 -49
  8. package/dist/src/components/Banner/index.js +42 -62
  9. package/dist/src/components/BarChart/Tooltip.js +35 -50
  10. package/dist/src/components/BarChart/index.js +13 -14
  11. package/dist/src/components/BarStack/index.js +100 -191
  12. package/dist/src/components/Breadcrumbs/index.js +29 -39
  13. package/dist/src/components/Bullet/index.js +42 -55
  14. package/dist/src/components/Button/index.js +73 -99
  15. package/dist/src/components/Card/index.js +39 -57
  16. package/dist/src/components/Carousel/index.js +32 -60
  17. package/dist/src/components/Checkbox/index.js +153 -341
  18. package/dist/src/components/CheckboxGroup/index.js +25 -27
  19. package/dist/src/components/CopyButton/index.js +11 -12
  20. package/dist/src/components/DateInput/index.js +141 -268
  21. package/dist/src/components/EmptyState/index.js +68 -83
  22. package/dist/src/components/Expandable/index.js +13 -20
  23. package/dist/src/components/GlobalAlert/GlobalAlertLink.js +12 -13
  24. package/dist/src/components/GlobalAlert/index.js +19 -32
  25. package/dist/src/components/LineChart/CustomLegend.js +80 -89
  26. package/dist/src/components/LineChart/Tooltip.js +32 -47
  27. package/dist/src/components/LineChart/helpers.js +15 -50
  28. package/dist/src/components/LineChart/index.js +23 -33
  29. package/dist/src/components/Link/index.js +46 -65
  30. package/dist/src/components/List/Body.js +9 -15
  31. package/dist/src/components/List/Cell.js +6 -7
  32. package/dist/src/components/List/HeaderCell.js +28 -56
  33. package/dist/src/components/List/HeaderRow.js +9 -16
  34. package/dist/src/components/List/ListContext.js +5 -6
  35. package/dist/src/components/List/Row.js +44 -90
  36. package/dist/src/components/List/SelectBar.js +9 -13
  37. package/dist/src/components/List/SkeletonRows.js +5 -6
  38. package/dist/src/components/List/index.js +15 -25
  39. package/dist/src/components/Loader/index.js +18 -25
  40. package/dist/src/components/Menu/Item.js +39 -49
  41. package/dist/src/components/Menu/index.js +31 -56
  42. package/dist/src/components/MenuV2/Item.js +39 -49
  43. package/dist/src/components/MenuV2/index.js +28 -47
  44. package/dist/src/components/Meter/index.js +25 -47
  45. package/dist/src/components/Modal/Dialog.js +33 -58
  46. package/dist/src/components/Modal/Disclosure.js +8 -9
  47. package/dist/src/components/Modal/index.js +26 -33
  48. package/dist/src/components/Notice/index.js +21 -27
  49. package/dist/src/components/NumberInput/index.js +73 -137
  50. package/dist/src/components/Pagination/getPageNumbers.js +1 -4
  51. package/dist/src/components/Pagination/index.js +17 -27
  52. package/dist/src/components/PasswordCheck/index.js +26 -32
  53. package/dist/src/components/PasswordStrengthMeter/index.js +25 -44
  54. package/dist/src/components/PieChart/Legends.js +71 -107
  55. package/dist/src/components/PieChart/Tooltip.js +33 -36
  56. package/dist/src/components/PieChart/index.js +13 -17
  57. package/dist/src/components/Popover/index.js +58 -75
  58. package/dist/src/components/Popup/helpers.js +13 -15
  59. package/dist/src/components/Popup/index.js +55 -98
  60. package/dist/src/components/ProgressBar/index.js +31 -49
  61. package/dist/src/components/Radio/index.js +58 -113
  62. package/dist/src/components/RadioGroup/index.js +26 -28
  63. package/dist/src/components/Row/index.js +25 -31
  64. package/dist/src/components/SelectInput/index.js +357 -410
  65. package/dist/src/components/SelectableCard/index.js +60 -111
  66. package/dist/src/components/Separator/index.js +52 -73
  67. package/dist/src/components/Skeleton/Block.js +23 -41
  68. package/dist/src/components/Skeleton/Blocks.js +23 -41
  69. package/dist/src/components/Skeleton/BoxWithIcon.js +21 -36
  70. package/dist/src/components/Skeleton/Donut.js +3 -6
  71. package/dist/src/components/Skeleton/IconSkeleton.js +13 -31
  72. package/dist/src/components/Skeleton/Line.js +5 -11
  73. package/dist/src/components/Skeleton/List.js +22 -31
  74. package/dist/src/components/Skeleton/Slider.js +25 -46
  75. package/dist/src/components/Skeleton/Square.js +3 -6
  76. package/dist/src/components/Skeleton/index.js +17 -33
  77. package/dist/src/components/Snippet/index.js +82 -137
  78. package/dist/src/components/Stack/index.js +11 -14
  79. package/dist/src/components/Status/index.js +48 -78
  80. package/dist/src/components/StepList/index.js +45 -63
  81. package/dist/src/components/Stepper/index.js +74 -129
  82. package/dist/src/components/SwitchButton/FocusOverlay.js +13 -23
  83. package/dist/src/components/SwitchButton/index.js +36 -62
  84. package/dist/src/components/Table/Body.js +5 -8
  85. package/dist/src/components/Table/Cell.js +14 -20
  86. package/dist/src/components/Table/Header.js +8 -14
  87. package/dist/src/components/Table/HeaderCell.js +40 -56
  88. package/dist/src/components/Table/HeaderRow.js +4 -5
  89. package/dist/src/components/Table/Row.js +10 -14
  90. package/dist/src/components/Table/SelectBar.js +9 -13
  91. package/dist/src/components/Table/SkeletonRows.js +5 -6
  92. package/dist/src/components/Table/TableContext.js +6 -7
  93. package/dist/src/components/Table/index.js +44 -50
  94. package/dist/src/components/Tabs/Tab.js +57 -118
  95. package/dist/src/components/Tabs/TabMenu.js +32 -38
  96. package/dist/src/components/Tabs/TabMenuItem.js +9 -13
  97. package/dist/src/components/Tabs/index.js +24 -43
  98. package/dist/src/components/Tag/index.js +57 -74
  99. package/dist/src/components/TagInput/index.js +63 -94
  100. package/dist/src/components/TagList/index.js +22 -35
  101. package/dist/src/components/Text/index.js +29 -31
  102. package/dist/src/components/TextArea/index.js +240 -0
  103. package/dist/src/components/TextInput/index.js +166 -260
  104. package/dist/src/components/TimeInput/index.js +10 -13
  105. package/dist/src/components/Toaster/index.js +51 -67
  106. package/dist/src/components/Toggle/index.js +62 -129
  107. package/dist/src/components/ToggleGroup/index.js +21 -23
  108. package/dist/src/components/Tooltip/index.js +28 -31
  109. package/dist/src/components/VerificationCode/index.js +55 -90
  110. package/dist/src/index.js +1 -0
  111. package/dist/src/utils/ids.js +1 -6
  112. package/package.json +6 -6
@@ -14,37 +14,31 @@ import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
14
14
 
15
15
  const StyledSeparator = /*#__PURE__*/_styled(Separator, {
16
16
  target: "e11gt5pw5"
17
- })("background-color:", _ref => {
18
- let {
19
- theme
20
- } = _ref;
21
- return theme.colors.neutral.border;
22
- }, ";height:100%;");
23
- const getControlColor = _ref2 => {
24
- let {
25
- state,
26
- error,
27
- theme
28
- } = _ref2;
17
+ })("background-color:", ({
18
+ theme
19
+ }) => theme.colors.neutral.border, ";height:100%;");
20
+ const getControlColor = ({
21
+ state,
22
+ error,
23
+ theme
24
+ }) => {
29
25
  if (state.isDisabled) return theme.colors.neutral.textDisabled;
30
26
  if (error) return theme.colors.danger.text;
31
27
  return theme.colors.neutral.text;
32
28
  };
33
- const getPlaceholderColor = _ref3 => {
34
- let {
35
- state,
36
- error,
37
- theme
38
- } = _ref3;
29
+ const getPlaceholderColor = ({
30
+ state,
31
+ error,
32
+ theme
33
+ }) => {
39
34
  if (state.isDisabled) return theme.colors.neutral.textDisabled;
40
35
  if (error) return theme.colors.danger.text;
41
36
  return theme.colors.neutral.textWeak;
42
37
  };
43
- const getOptionColor = _ref4 => {
44
- let {
45
- state,
46
- theme
47
- } = _ref4;
38
+ const getOptionColor = ({
39
+ state,
40
+ theme
41
+ }) => {
48
42
  let color = theme.colors.neutral.text;
49
43
  let backgroundColor = theme.colors.neutral.backgroundWeakElevated;
50
44
  if (state.isDisabled) {
@@ -61,197 +55,182 @@ const getOptionColor = _ref4 => {
61
55
  color
62
56
  };
63
57
  };
64
- const getSelectStyles = _ref5 => {
65
- let {
66
- error,
67
- customStyle,
68
- animation,
69
- animationDuration,
70
- noTopLabel,
71
- theme
72
- } = _ref5;
73
- return {
74
- control: (provided, state) => ({
75
- ...provided,
76
- backgroundColor: state.isDisabled ? theme.colors.neutral.backgroundDisabled : theme.colors.neutral.background,
77
- borderColor: error ? theme.colors.danger.border : theme.colors.neutral.border,
78
- borderRadius: '4px',
79
- borderStyle: 'solid',
80
- borderWidth: '1px',
81
- boxShadow: 'none',
82
- color: getControlColor({
83
- error,
84
- state,
85
- theme
86
- }),
87
- fontSize: '16px',
88
- fontWeight: 500,
89
- lineHeight: '24px',
90
- minHeight: '48px',
91
- transition: 'border-color 200ms ease, box-shadow 200ms ease',
92
- cursor: state.isDisabled ? 'not-allowed' : 'pointer',
93
- ...(!state.isDisabled && {
94
- ':focus-within': {
95
- borderColor: error ? theme.colors.danger.border : theme.colors.primary.border,
96
- boxShadow: error ? theme.shadows.focusDanger : theme.shadows.focusPrimary,
97
- svg: {
98
- fill: error ? theme.colors.danger.text : theme.colors.primary.text
99
- }
100
- },
101
- ':hover': {
102
- borderColor: error ? theme.colors.danger.borderHover : theme.colors.primary.borderHover,
103
- svg: {
104
- fill: error ? theme.colors.danger.text : theme.colors.primary.text
105
- }
106
- }
107
- }),
108
- ...(customStyle(state)?.['control'] || {}),
109
- animation: animation ? `${animationDuration}ms ${animations[animation]}` : 'none'
110
- }),
111
- indicatorsContainer: provided => ({
112
- ...provided,
113
- maxHeight: '48px'
114
- }),
115
- indicatorSeparator: (provided, state) => ({
116
- ...provided,
117
- backgroundColor: theme.colors.neutral.border,
118
- display: 'none',
119
- ...(customStyle(state)?.['indicatorSeparator'] || {})
120
- }),
121
- input: provided => ({
122
- ...provided,
123
- flexGrow: 1,
124
- marginLeft: 0,
125
- paddingTop: noTopLabel ? 0 : 11
126
- }),
127
- menu: (provided, state) => ({
128
- ...provided,
129
- ...(customStyle(state)?.['menu'] || {}),
130
- boxShadow: theme.shadows.menu
131
- }),
132
- menuList: (provided, state) => ({
133
- ...provided,
134
- backgroundColor: theme.colors.neutral.backgroundWeak,
135
- maxHeight: '225px',
136
- ...(customStyle(state)?.['menuList'] || {})
137
- }),
138
- menuPortal: (provided, state) => ({
139
- ...provided,
140
- zIndex: 10000,
141
- ...(customStyle(state)?.['menuPortal'] || {})
142
- }),
143
- multiValue: (provided, state) => ({
144
- ...provided,
145
- alignItems: 'center',
146
- backgroundColor: theme.colors.neutral.backgroundDisabled,
147
- borderRadius: '4px',
148
- color: theme.colors.neutral.text,
149
- fontSize: '14px',
150
- fontWeight: 500,
151
- height: '24px',
152
- justifyContent: 'center',
153
- marginTop: theme.space[noTopLabel ? '0.5' : '2'],
154
- textOverflow: 'ellipsis',
155
- ...(customStyle(state)?.['multiValue'] || {})
156
- }),
157
- multiValueLabel: (provided, state) => ({
158
- ...provided,
159
- color: state.isDisabled ? theme.colors.neutral.textDisabled : theme.colors.neutral.text,
160
- fontSize: '14px',
161
- fontWeight: 'normal',
162
- lineHeight: '20px',
163
- ...(customStyle(state)?.['multiValueLabel'] || {})
164
- }),
165
- multiValueRemove: (provided, state) => ({
166
- ...provided,
167
- ...(state.isDisabled ? {
168
- color: theme.colors.neutral.textDisabled,
169
- cursor: 'none',
170
- pointerEvents: 'none'
171
- } : {
172
- color: theme.colors.primary.text
173
- }),
174
- ':hover': {
175
- color: state.isDisabled ? theme.colors.neutral.textDisabled : theme.colors.primary.text,
176
- cursor: state.isDisabled ? 'none' : 'pointer',
177
- pointerEvents: state.isDisabled ? 'none' : 'fill'
178
- },
179
- ...(customStyle(state)?.['multiValueRemove'] || {})
58
+ const getSelectStyles = ({
59
+ error,
60
+ customStyle,
61
+ animation,
62
+ animationDuration,
63
+ noTopLabel,
64
+ theme
65
+ }) => ({
66
+ control: (provided, state) => ({
67
+ ...provided,
68
+ backgroundColor: state.isDisabled ? theme.colors.neutral.backgroundDisabled : theme.colors.neutral.background,
69
+ borderColor: error ? theme.colors.danger.border : theme.colors.neutral.border,
70
+ borderRadius: '4px',
71
+ borderStyle: 'solid',
72
+ borderWidth: '1px',
73
+ boxShadow: 'none',
74
+ color: getControlColor({
75
+ error,
76
+ state,
77
+ theme
180
78
  }),
181
- option: (provided, state) => ({
182
- ...provided,
183
- ...getOptionColor({
184
- state,
185
- theme
186
- }),
187
- cursor: state.isDisabled ? 'not-allowed' : 'pointer',
188
- ':active': {
189
- backgroundColor: state.isDisabled ? theme.colors.neutral.backgroundDisabled : theme.colors.primary.background,
190
- color: state.isDisabled ? theme.colors.neutral.textDisabled : theme.colors.primary.text
79
+ fontSize: '16px',
80
+ fontWeight: 500,
81
+ lineHeight: '24px',
82
+ minHeight: '48px',
83
+ transition: 'border-color 200ms ease, box-shadow 200ms ease',
84
+ cursor: state.isDisabled ? 'not-allowed' : 'pointer',
85
+ ...(!state.isDisabled && {
86
+ ':focus-within': {
87
+ borderColor: error ? theme.colors.danger.border : theme.colors.primary.border,
88
+ boxShadow: error ? theme.shadows.focusDanger : theme.shadows.focusPrimary,
89
+ svg: {
90
+ fill: error ? theme.colors.danger.text : theme.colors.primary.text
91
+ }
191
92
  },
192
93
  ':hover': {
193
- backgroundColor: state.isDisabled ? theme.colors.neutral.backgroundDisabled : theme.colors.primary.background,
194
- color: state.isDisabled ? theme.colors.neutral.textDisabled : theme.colors.neutral.text
195
- },
196
- ...(customStyle(state)?.['option'] || {})
94
+ borderColor: error ? theme.colors.danger.borderHover : theme.colors.primary.borderHover,
95
+ svg: {
96
+ fill: error ? theme.colors.danger.text : theme.colors.primary.text
97
+ }
98
+ }
197
99
  }),
198
- placeholder: (provided, state) => ({
199
- ...provided,
200
- color: getPlaceholderColor({
201
- error,
202
- state,
203
- theme
204
- }),
205
- ...(customStyle(state)?.['placeholder'] || {})
100
+ ...(customStyle(state)?.['control'] || {}),
101
+ animation: animation ? `${animationDuration}ms ${animations[animation]}` : 'none'
102
+ }),
103
+ indicatorsContainer: provided => ({
104
+ ...provided,
105
+ maxHeight: '48px'
106
+ }),
107
+ indicatorSeparator: (provided, state) => ({
108
+ ...provided,
109
+ backgroundColor: theme.colors.neutral.border,
110
+ display: 'none',
111
+ ...(customStyle(state)?.['indicatorSeparator'] || {})
112
+ }),
113
+ input: provided => ({
114
+ ...provided,
115
+ flexGrow: 1,
116
+ marginLeft: 0,
117
+ paddingTop: noTopLabel ? 0 : 11
118
+ }),
119
+ menu: (provided, state) => ({
120
+ ...provided,
121
+ ...(customStyle(state)?.['menu'] || {}),
122
+ boxShadow: theme.shadows.menu
123
+ }),
124
+ menuList: (provided, state) => ({
125
+ ...provided,
126
+ backgroundColor: theme.colors.neutral.backgroundWeak,
127
+ maxHeight: '225px',
128
+ ...(customStyle(state)?.['menuList'] || {})
129
+ }),
130
+ menuPortal: (provided, state) => ({
131
+ ...provided,
132
+ zIndex: 10000,
133
+ ...(customStyle(state)?.['menuPortal'] || {})
134
+ }),
135
+ multiValue: (provided, state) => ({
136
+ ...provided,
137
+ alignItems: 'center',
138
+ backgroundColor: theme.colors.neutral.backgroundDisabled,
139
+ borderRadius: '4px',
140
+ color: theme.colors.neutral.text,
141
+ fontSize: '14px',
142
+ fontWeight: 500,
143
+ height: '24px',
144
+ justifyContent: 'center',
145
+ marginTop: theme.space[noTopLabel ? '0.5' : '2'],
146
+ textOverflow: 'ellipsis',
147
+ ...(customStyle(state)?.['multiValue'] || {})
148
+ }),
149
+ multiValueLabel: (provided, state) => ({
150
+ ...provided,
151
+ color: state.isDisabled ? theme.colors.neutral.textDisabled : theme.colors.neutral.text,
152
+ fontSize: '14px',
153
+ fontWeight: 'normal',
154
+ lineHeight: '20px',
155
+ ...(customStyle(state)?.['multiValueLabel'] || {})
156
+ }),
157
+ multiValueRemove: (provided, state) => ({
158
+ ...provided,
159
+ ...(state.isDisabled ? {
160
+ color: theme.colors.neutral.textDisabled,
161
+ cursor: 'none',
162
+ pointerEvents: 'none'
163
+ } : {
164
+ color: theme.colors.primary.text
206
165
  }),
207
- singleValue: (provided, state) => ({
208
- ...provided,
209
- color: state.isDisabled ? theme.colors.neutral.textDisabled : theme.colors.neutral.text,
210
- marginLeft: state.hasValue ? 0 : undefined,
211
- marginRight: state.hasValue ? 0 : undefined,
212
- marginTop: !state.hasValue || noTopLabel ? 0 : '5px',
213
- paddingLeft: state.hasValue ? 0 : undefined,
214
- ...(customStyle(state)?.['singleValue'] || {})
166
+ ':hover': {
167
+ color: state.isDisabled ? theme.colors.neutral.textDisabled : theme.colors.primary.text,
168
+ cursor: state.isDisabled ? 'none' : 'pointer',
169
+ pointerEvents: state.isDisabled ? 'none' : 'fill'
170
+ },
171
+ ...(customStyle(state)?.['multiValueRemove'] || {})
172
+ }),
173
+ option: (provided, state) => ({
174
+ ...provided,
175
+ ...getOptionColor({
176
+ state,
177
+ theme
215
178
  }),
216
- valueContainer: (provided, state) => ({
217
- ...provided,
218
- ...(customStyle(state)?.['valueContainer'] || {}),
219
- cursor: state.isDisabled ? 'not-allowed' : undefined,
220
- height: '100%',
221
- label: {
222
- display: noTopLabel ? 'none' : 'initial'
223
- },
224
- paddingTop: 0
225
- })
226
- };
227
- };
179
+ cursor: state.isDisabled ? 'not-allowed' : 'pointer',
180
+ ':active': {
181
+ backgroundColor: state.isDisabled ? theme.colors.neutral.backgroundDisabled : theme.colors.primary.background,
182
+ color: state.isDisabled ? theme.colors.neutral.textDisabled : theme.colors.primary.text
183
+ },
184
+ ':hover': {
185
+ backgroundColor: state.isDisabled ? theme.colors.neutral.backgroundDisabled : theme.colors.primary.background,
186
+ color: state.isDisabled ? theme.colors.neutral.textDisabled : theme.colors.neutral.text
187
+ },
188
+ ...(customStyle(state)?.['option'] || {})
189
+ }),
190
+ placeholder: (provided, state) => ({
191
+ ...provided,
192
+ color: getPlaceholderColor({
193
+ error,
194
+ state,
195
+ theme
196
+ }),
197
+ ...(customStyle(state)?.['placeholder'] || {})
198
+ }),
199
+ singleValue: (provided, state) => ({
200
+ ...provided,
201
+ color: state.isDisabled ? theme.colors.neutral.textDisabled : theme.colors.neutral.text,
202
+ marginLeft: state.hasValue ? 0 : undefined,
203
+ marginRight: state.hasValue ? 0 : undefined,
204
+ marginTop: !state.hasValue || noTopLabel ? 0 : '5px',
205
+ paddingLeft: state.hasValue ? 0 : undefined,
206
+ ...(customStyle(state)?.['singleValue'] || {})
207
+ }),
208
+ valueContainer: (provided, state) => ({
209
+ ...provided,
210
+ ...(customStyle(state)?.['valueContainer'] || {}),
211
+ cursor: state.isDisabled ? 'not-allowed' : undefined,
212
+ height: '100%',
213
+ label: {
214
+ display: noTopLabel ? 'none' : 'initial'
215
+ },
216
+ paddingTop: 0
217
+ })
218
+ });
228
219
  const StyledContainer = /*#__PURE__*/_styled('div', {
229
220
  shouldForwardProp: prop => !['isDisabled', 'additionalStyles'].includes(prop),
230
221
  target: "e11gt5pw4"
231
- })("width:100%;", _ref6 => {
232
- let {
233
- isDisabled
234
- } = _ref6;
235
- return isDisabled && `pointer-events: initial;`;
236
- }, ";", _ref7 => {
237
- let {
238
- additionalStyles
239
- } = _ref7;
240
- return /*#__PURE__*/css(additionalStyles);
241
- }, ";");
222
+ })("width:100%;", ({
223
+ isDisabled
224
+ }) => isDisabled && `pointer-events: initial;`, ";", ({
225
+ additionalStyles
226
+ }) => /*#__PURE__*/css(additionalStyles), ";");
242
227
  const StyledError = /*#__PURE__*/_styled("div", {
243
228
  target: "e11gt5pw3"
244
- })("font-size:12px;color:", _ref8 => {
245
- let {
246
- theme
247
- } = _ref8;
248
- return theme.colors.danger.text;
249
- }, ";padding-top:", _ref9 => {
250
- let {
251
- theme
252
- } = _ref9;
253
- return theme.space['0.25'];
254
- }, ";");
229
+ })("font-size:12px;color:", ({
230
+ theme
231
+ }) => theme.colors.danger.text, ";padding-top:", ({
232
+ theme
233
+ }) => theme.space['0.25'], ";");
255
234
  const SelectContainer = props => {
256
235
  const {
257
236
  children,
@@ -284,179 +263,151 @@ const SelectContainer = props => {
284
263
  const StyledPlaceholder = /*#__PURE__*/_styled('label', {
285
264
  shouldForwardProp: prop => !['error', 'hasValue', 'isDisabled', 'isMulti'].includes(prop),
286
265
  target: "e11gt5pw2"
287
- })("position:absolute;left:0;font-weight:400;pointer-events:none;color:", _ref10 => {
288
- let {
289
- theme,
290
- error
291
- } = _ref10;
292
- return error ? theme.colors.danger.text : theme.colors.neutral.text;
293
- }, ";white-space:nowrap;width:100%;height:100%;font-size:16px;transition:transform 250ms ease;opacity:0;", _ref11 => {
294
- let {
295
- hasValue
296
- } = _ref11;
297
- return hasValue && `
266
+ })("position:absolute;left:0;font-weight:400;pointer-events:none;color:", ({
267
+ theme,
268
+ error
269
+ }) => error ? theme.colors.danger.text : theme.colors.neutral.text, ";white-space:nowrap;width:100%;height:100%;font-size:16px;transition:transform 250ms ease;opacity:0;", ({
270
+ hasValue
271
+ }) => hasValue && `
298
272
  transform: translate(0, -8px) scale(0.8);
299
273
  transform-origin: left;
300
274
  padding-left: 8px;
301
275
  left: 0;
302
276
  top: 2px;
303
277
  opacity: 1;
304
- `;
305
- }, " ", _ref12 => {
306
- let {
307
- isDisabled,
308
- hasValue
309
- } = _ref12;
310
- return hasValue && isDisabled && 'opacity: 0.5';
311
- }, ";");
278
+ `, " ", ({
279
+ isDisabled,
280
+ hasValue
281
+ }) => hasValue && isDisabled && 'opacity: 0.5', ";");
312
282
  const StyledText = /*#__PURE__*/_styled(Text, {
313
283
  target: "e11gt5pw1"
314
- })("margin-left:", _ref13 => {
315
- let {
316
- theme
317
- } = _ref13;
318
- return theme.space['1'];
319
- }, ";color:", _ref14 => {
320
- let {
321
- isSelectedAndNotFocused,
322
- theme
323
- } = _ref14;
324
- return isSelectedAndNotFocused ? theme.colors.primary.textStrong : undefined;
325
- }, ";");
284
+ })("margin-left:", ({
285
+ theme
286
+ }) => theme.space['1'], ";color:", ({
287
+ isSelectedAndNotFocused,
288
+ theme
289
+ }) => isSelectedAndNotFocused ? theme.colors.primary.textStrong : undefined, ";");
326
290
  const MaxLineStyledText = /*#__PURE__*/_styled(StyledText, {
327
291
  target: "e11gt5pw0"
328
- })("-webkit-line-clamp:3;margin-top:", _ref15 => {
329
- let {
330
- theme
331
- } = _ref15;
332
- return theme.space['2'];
333
- }, ";");
334
- const ValueContainer = _ref16 => {
335
- let {
336
- isDisabled,
337
- children,
338
- selectProps: {
339
- error,
340
- labelId,
341
- inputId,
342
- ...selectProps
343
- },
344
- isMulti,
345
- hasValue,
346
- clearValue,
347
- getStyles,
348
- getValue,
349
- getClassNames,
350
- isRtl,
351
- cx,
352
- options,
353
- selectOption,
354
- setValue,
355
- theme,
356
- className,
357
- innerProps
358
- } = _ref16;
359
- return jsx(components.ValueContainer, {
360
- clearValue: clearValue,
361
- getStyles: getStyles,
362
- getValue: getValue,
363
- isRtl: isRtl,
364
- cx: cx,
365
- options: options,
366
- selectOption: selectOption,
367
- setValue: setValue,
368
- theme: theme,
369
- className: className,
370
- innerProps: innerProps,
371
- selectProps: selectProps,
372
- isMulti: isMulti,
373
- hasValue: hasValue,
374
- isDisabled: isDisabled,
375
- getClassNames: getClassNames,
376
- children: jsxs(Fragment, {
377
- children: [selectProps.placeholder ? jsx(StyledPlaceholder, {
378
- as: "label",
379
- id: labelId,
380
- htmlFor: inputId,
381
- "aria-live": "assertive",
382
- error: error,
383
- isMulti: isMulti,
384
- isDisabled: isDisabled,
385
- hasValue: hasValue,
386
- children: selectProps.placeholder
387
- }) : null, children]
388
- })
389
- });
390
- };
391
- const inputStyles = _ref17 => {
392
- let {
292
+ })("-webkit-line-clamp:3;margin-top:", ({
293
+ theme
294
+ }) => theme.space['2'], ";");
295
+ const ValueContainer = ({
296
+ isDisabled,
297
+ children,
298
+ selectProps: {
299
+ error,
300
+ labelId,
301
+ inputId,
302
+ ...selectProps
303
+ },
304
+ isMulti,
305
+ hasValue,
306
+ clearValue,
307
+ getStyles,
308
+ getValue,
309
+ getClassNames,
310
+ isRtl,
311
+ cx,
312
+ options,
313
+ selectOption,
314
+ setValue,
315
+ theme,
316
+ className,
317
+ innerProps
318
+ }) => jsx(components.ValueContainer, {
319
+ clearValue: clearValue,
320
+ getStyles: getStyles,
321
+ getValue: getValue,
322
+ isRtl: isRtl,
323
+ cx: cx,
324
+ options: options,
325
+ selectOption: selectOption,
326
+ setValue: setValue,
327
+ theme: theme,
328
+ className: className,
329
+ innerProps: innerProps,
330
+ selectProps: selectProps,
331
+ isMulti: isMulti,
332
+ hasValue: hasValue,
333
+ isDisabled: isDisabled,
334
+ getClassNames: getClassNames,
335
+ children: jsxs(Fragment, {
336
+ children: [selectProps.placeholder ? jsx(StyledPlaceholder, {
337
+ as: "label",
338
+ id: labelId,
339
+ htmlFor: inputId,
340
+ "aria-live": "assertive",
341
+ error: error,
342
+ isMulti: isMulti,
343
+ isDisabled: isDisabled,
344
+ hasValue: hasValue,
345
+ children: selectProps.placeholder
346
+ }) : null, children]
347
+ })
348
+ });
349
+ const inputStyles = ({
350
+ isMulti
351
+ }) => /*#__PURE__*/css("margin-left:0px;", !isMulti && 'caret-color: transparent', ";");
352
+ const Input = ({
353
+ isMulti,
354
+ hasValue,
355
+ selectProps: {
356
+ inputId,
357
+ labelId,
358
+ placeholder,
359
+ ...selectProps
360
+ },
361
+ clearValue,
362
+ getStyles,
363
+ getValue,
364
+ isRtl,
365
+ cx,
366
+ options,
367
+ selectOption,
368
+ setValue,
369
+ theme,
370
+ className,
371
+ isHidden,
372
+ ...props
373
+ }) => jsx(components.Input, {
374
+ ...props,
375
+ css: inputStyles({
393
376
  isMulti
394
- } = _ref17;
395
- return /*#__PURE__*/css("margin-left:0px;", !isMulti && 'caret-color: transparent', ";");
396
- };
397
- const Input = _ref18 => {
398
- let {
399
- isMulti,
400
- hasValue,
401
- selectProps: {
402
- inputId,
403
- labelId,
404
- placeholder,
405
- ...selectProps
406
- },
407
- clearValue,
408
- getStyles,
409
- getValue,
410
- isRtl,
411
- cx,
412
- options,
413
- selectOption,
414
- setValue,
415
- theme,
416
- className,
417
- isHidden,
418
- ...props
419
- } = _ref18;
420
- return jsx(components.Input, {
421
- ...props,
422
- css: inputStyles({
423
- isMulti
424
- }),
425
- id: inputId,
426
- "aria-controls": labelId,
427
- hasValue: hasValue,
428
- isMulti: isMulti,
429
- clearValue: clearValue,
430
- getStyles: getStyles,
431
- getValue: getValue,
432
- isRtl: isRtl,
433
- cx: cx,
434
- options: options,
435
- selectOption: selectOption,
436
- setValue: setValue,
437
- theme: theme,
438
- className: className,
439
- isHidden: isHidden,
440
- selectProps: {
441
- ...selectProps,
442
- placeholder
443
- }
444
- });
445
- };
446
- const Option = _ref19 => {
447
- let {
448
- selectProps,
449
- value,
450
- label,
451
- children,
452
- data: {
453
- inlineDescription,
454
- description
455
- },
456
- isSelected,
457
- data,
458
- ...props
459
- } = _ref19;
377
+ }),
378
+ id: inputId,
379
+ "aria-controls": labelId,
380
+ hasValue: hasValue,
381
+ isMulti: isMulti,
382
+ clearValue: clearValue,
383
+ getStyles: getStyles,
384
+ getValue: getValue,
385
+ isRtl: isRtl,
386
+ cx: cx,
387
+ options: options,
388
+ selectOption: selectOption,
389
+ setValue: setValue,
390
+ theme: theme,
391
+ className: className,
392
+ isHidden: isHidden,
393
+ selectProps: {
394
+ ...selectProps,
395
+ placeholder
396
+ }
397
+ });
398
+ const Option = ({
399
+ selectProps,
400
+ value,
401
+ label,
402
+ children,
403
+ data: {
404
+ inlineDescription,
405
+ description
406
+ },
407
+ isSelected,
408
+ data,
409
+ ...props
410
+ }) => {
460
411
  const [isFocused, setIsFocused] = useState(false);
461
412
  return jsx("div", {
462
413
  "data-testid": `option-${selectProps.name || ''}-${isJSONString(value) ? label : value}`,
@@ -547,39 +498,38 @@ const MultiValueRemove = props => jsx(components.MultiValueRemove, {
547
498
  })
548
499
  });
549
500
  const defaultCustomStyle = () => ({});
550
- const FwdSelectInput = _ref20 => {
551
- let {
552
- animation = 'pulse',
553
- animationDuration = 1000,
554
- animationOnChange = false,
555
- children,
556
- className,
557
- customComponents,
558
- customStyle = defaultCustomStyle,
559
- disabled = false,
560
- error,
561
- innerRef,
562
- inputId: inputIdProp,
563
- isClearable = false,
564
- isMulti = false,
565
- isSearchable = true,
566
- menuPortalTarget,
567
- noTopLabel = false,
568
- onBlur,
569
- onChange,
570
- onFocus,
571
- options,
572
- placeholder,
573
- readOnly = false,
574
- value,
575
- name,
576
- id: idProp,
577
- time,
578
- isLoading,
579
- required,
580
- emptyState,
581
- 'data-testid': dataTestId
582
- } = _ref20;
501
+ const FwdSelectInput = ({
502
+ animation = 'pulse',
503
+ animationDuration = 1000,
504
+ animationOnChange = false,
505
+ children,
506
+ className,
507
+ customComponents,
508
+ customStyle = defaultCustomStyle,
509
+ disabled = false,
510
+ error,
511
+ innerRef,
512
+ inputId: inputIdProp,
513
+ isClearable = false,
514
+ isMulti = false,
515
+ isSearchable = true,
516
+ menuPortalTarget,
517
+ noTopLabel = false,
518
+ onBlur,
519
+ onChange,
520
+ onFocus,
521
+ options,
522
+ placeholder,
523
+ readOnly = false,
524
+ value,
525
+ name,
526
+ id: idProp,
527
+ time,
528
+ isLoading,
529
+ required,
530
+ emptyState,
531
+ 'data-testid': dataTestId
532
+ }) => {
583
533
  const id = useId();
584
534
  const inputId = inputIdProp ?? id;
585
535
  const theme = useTheme();
@@ -587,18 +537,15 @@ const FwdSelectInput = _ref20 => {
587
537
  const currentValue = value?.value;
588
538
 
589
539
  // Options need to keep the same reference otherwise react-select doesn't focus the selected option
590
- const selectOptions = useMemo(() => options || flattenChildren(children).map(_ref21 => {
591
- let {
592
- props: {
593
- children: label,
594
- ...subProps
595
- }
596
- } = _ref21;
597
- return {
598
- ...subProps,
599
- label
600
- };
601
- }), [options, children]);
540
+ const selectOptions = useMemo(() => options || flattenChildren(children).map(({
541
+ props: {
542
+ children: label,
543
+ ...subProps
544
+ }
545
+ }) => ({
546
+ ...subProps,
547
+ label
548
+ })), [options, children]);
602
549
  useEffect(() => {
603
550
  if (animationOnChange) {
604
551
  setIsAnimated(true);