@hitachivantara/uikit-react-core 5.58.3 → 5.60.0

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 (80) hide show
  1. package/dist/cjs/BulkActions/BulkActions.styles.cjs +13 -1
  2. package/dist/cjs/BulkActions/BulkActions.styles.cjs.map +1 -1
  3. package/dist/cjs/Button/Button.styles.cjs.map +1 -1
  4. package/dist/cjs/DropDownMenu/DropDownMenu.cjs +12 -20
  5. package/dist/cjs/DropDownMenu/DropDownMenu.cjs.map +1 -1
  6. package/dist/cjs/DropDownMenu/DropDownMenu.styles.cjs +4 -34
  7. package/dist/cjs/DropDownMenu/DropDownMenu.styles.cjs.map +1 -1
  8. package/dist/cjs/DropdownButton/DropdownButton.cjs +57 -0
  9. package/dist/cjs/DropdownButton/DropdownButton.cjs.map +1 -0
  10. package/dist/cjs/DropdownButton/DropdownButton.styles.cjs +65 -0
  11. package/dist/cjs/DropdownButton/DropdownButton.styles.cjs.map +1 -0
  12. package/dist/cjs/IconButton/IconButton.cjs +2 -1
  13. package/dist/cjs/IconButton/IconButton.cjs.map +1 -1
  14. package/dist/cjs/MultiButton/MultiButton.cjs +20 -5
  15. package/dist/cjs/MultiButton/MultiButton.cjs.map +1 -1
  16. package/dist/cjs/MultiButton/MultiButton.styles.cjs +56 -326
  17. package/dist/cjs/MultiButton/MultiButton.styles.cjs.map +1 -1
  18. package/dist/cjs/QueryBuilder/Context.cjs +1 -0
  19. package/dist/cjs/QueryBuilder/Context.cjs.map +1 -1
  20. package/dist/cjs/QueryBuilder/QueryBuilder.cjs +39 -18
  21. package/dist/cjs/QueryBuilder/QueryBuilder.cjs.map +1 -1
  22. package/dist/cjs/QueryBuilder/RuleGroup/RuleGroup.cjs.map +1 -1
  23. package/dist/cjs/QueryBuilder/types.cjs.map +1 -1
  24. package/dist/cjs/QueryBuilder/utils/index.cjs +29 -5
  25. package/dist/cjs/QueryBuilder/utils/index.cjs.map +1 -1
  26. package/dist/cjs/QueryBuilder/utils/reducer.cjs +6 -2
  27. package/dist/cjs/QueryBuilder/utils/reducer.cjs.map +1 -1
  28. package/dist/cjs/Select/Select.cjs +6 -2
  29. package/dist/cjs/Select/Select.cjs.map +1 -1
  30. package/dist/cjs/Snackbar/SnackbarContent/SnackbarContent.styles.cjs +0 -3
  31. package/dist/cjs/Snackbar/SnackbarContent/SnackbarContent.styles.cjs.map +1 -1
  32. package/dist/cjs/Table/hooks/useRowState.cjs +7 -0
  33. package/dist/cjs/Table/hooks/useRowState.cjs.map +1 -0
  34. package/dist/cjs/hooks/useControlled.cjs.map +1 -1
  35. package/dist/cjs/index.cjs +2 -0
  36. package/dist/cjs/index.cjs.map +1 -1
  37. package/dist/cjs/types/generic.cjs.map +1 -1
  38. package/dist/esm/BulkActions/BulkActions.styles.js +13 -1
  39. package/dist/esm/BulkActions/BulkActions.styles.js.map +1 -1
  40. package/dist/esm/Button/Button.styles.js.map +1 -1
  41. package/dist/esm/DropDownMenu/DropDownMenu.js +12 -20
  42. package/dist/esm/DropDownMenu/DropDownMenu.js.map +1 -1
  43. package/dist/esm/DropDownMenu/DropDownMenu.styles.js +4 -34
  44. package/dist/esm/DropDownMenu/DropDownMenu.styles.js.map +1 -1
  45. package/dist/esm/DropdownButton/DropdownButton.js +58 -0
  46. package/dist/esm/DropdownButton/DropdownButton.js.map +1 -0
  47. package/dist/esm/DropdownButton/DropdownButton.styles.js +65 -0
  48. package/dist/esm/DropdownButton/DropdownButton.styles.js.map +1 -0
  49. package/dist/esm/IconButton/IconButton.js +2 -1
  50. package/dist/esm/IconButton/IconButton.js.map +1 -1
  51. package/dist/esm/MultiButton/MultiButton.js +22 -7
  52. package/dist/esm/MultiButton/MultiButton.js.map +1 -1
  53. package/dist/esm/MultiButton/MultiButton.styles.js +56 -326
  54. package/dist/esm/MultiButton/MultiButton.styles.js.map +1 -1
  55. package/dist/esm/QueryBuilder/Context.js +1 -0
  56. package/dist/esm/QueryBuilder/Context.js.map +1 -1
  57. package/dist/esm/QueryBuilder/QueryBuilder.js +40 -19
  58. package/dist/esm/QueryBuilder/QueryBuilder.js.map +1 -1
  59. package/dist/esm/QueryBuilder/RuleGroup/RuleGroup.js.map +1 -1
  60. package/dist/esm/QueryBuilder/types.js.map +1 -1
  61. package/dist/esm/QueryBuilder/utils/index.js +30 -6
  62. package/dist/esm/QueryBuilder/utils/index.js.map +1 -1
  63. package/dist/esm/QueryBuilder/utils/reducer.js +6 -2
  64. package/dist/esm/QueryBuilder/utils/reducer.js.map +1 -1
  65. package/dist/esm/Select/Select.js +6 -2
  66. package/dist/esm/Select/Select.js.map +1 -1
  67. package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.styles.js +0 -3
  68. package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.styles.js.map +1 -1
  69. package/dist/esm/Table/hooks/useRowState.js +7 -0
  70. package/dist/esm/Table/hooks/useRowState.js.map +1 -0
  71. package/dist/esm/hooks/useControlled.js.map +1 -1
  72. package/dist/esm/index.js +2 -0
  73. package/dist/esm/index.js.map +1 -1
  74. package/dist/esm/types/generic.js.map +1 -1
  75. package/dist/types/index.d.ts +155 -108
  76. package/package.json +5 -5
  77. package/dist/cjs/Select/SelectButton.cjs +0 -92
  78. package/dist/cjs/Select/SelectButton.cjs.map +0 -1
  79. package/dist/esm/Select/SelectButton.js +0 -92
  80. package/dist/esm/Select/SelectButton.js.map +0 -1
@@ -1,5 +1,6 @@
1
1
  import { theme } from "@hitachivantara/uikit-styles";
2
2
  import { createClasses } from "../utils/classes.js";
3
+ import { getColoringStyle, getSizeStyles } from "../Button/Button.styles.js";
3
4
  import { staticClasses as staticClasses$1 } from "../DropDownMenu/DropDownMenu.styles.js";
4
5
  import "@emotion/react/jsx-runtime";
5
6
  import "react";
@@ -9,9 +10,11 @@ const { staticClasses, useClasses } = createClasses("HvMultiButton", {
9
10
  display: "flex",
10
11
  alignItems: "center",
11
12
  transition: "none",
12
- background: theme.colors.atmo2,
13
13
  position: "relative",
14
- zIndex: 0,
14
+ zIndex: 0
15
+ },
16
+ multiple: {
17
+ background: theme.colors.atmo2,
15
18
  // prevent the focus ring to be hidden by sibling hover background
16
19
  "&>.HvIsFocusVisible": {
17
20
  zIndex: 5
@@ -90,215 +93,50 @@ const { staticClasses, useClasses } = createClasses("HvMultiButton", {
90
93
  border: `solid 1px ${theme.colors.atmo4}`
91
94
  }
92
95
  }
93
- },
94
- // dropdown menu styles
95
- "& $button": {
96
- [`&.${staticClasses$1.container}`]: {
97
- width: "unset"
98
- },
99
- [`& .${staticClasses$1.icon}`]: {
100
- borderTop: `solid 1px ${theme.colors.atmo4}`,
101
- borderBottom: `solid 1px ${theme.colors.atmo4}`,
102
- borderLeft: "solid 1px transparent",
103
- borderRight: "solid 1px transparent",
104
- borderRadius: 0,
105
- "&:disabled": {
106
- borderTop: `solid 1px ${theme.colors.atmo4}`,
107
- borderBottom: `solid 1px ${theme.colors.atmo4}`,
108
- "&:hover": {
109
- borderTop: `solid 1px ${theme.colors.atmo4}`,
110
- borderBottom: `solid 1px ${theme.colors.atmo4}`,
111
- borderLeft: "solid 1px transparent",
112
- borderRight: "solid 1px transparent"
113
- }
114
- }
115
- },
116
- [`& .${staticClasses$1.iconSelected}`]: {
117
- border: `solid 1px ${theme.colors.secondary}`
118
- },
119
- "&$firstButton": {
120
- [`& .${staticClasses$1.icon}`]: {
121
- borderLeft: `solid 1px ${theme.colors.atmo4}`,
122
- borderTopLeftRadius: theme.radii.base,
123
- borderBottomLeftRadius: theme.radii.base,
124
- "&:disabled": {
125
- borderLeft: `solid 1px ${theme.colors.atmo4}`
126
- }
127
- },
128
- [`& .${staticClasses$1.iconSelected}`]: {
129
- border: `solid 1px ${theme.colors.secondary}`
130
- }
131
- },
132
- "&$lastButton": {
133
- [`& .${staticClasses$1.icon}`]: {
134
- borderRight: `solid 1px ${theme.colors.atmo4}`,
135
- borderTopRightRadius: theme.radii.base,
136
- borderBottomRightRadius: theme.radii.base,
137
- "&:disabled": {
138
- borderRight: `solid 1px ${theme.colors.atmo4}`
139
- },
140
- "&:disabled:hover": {
141
- borderRight: `solid 1px ${theme.colors.atmo4}`
142
- }
143
- },
144
- [`& .${staticClasses$1.iconSelected}`]: {
145
- border: `solid 1px ${theme.colors.secondary}`
146
- }
147
- },
148
- "&:not($firstButton) > button": {
149
- marginLeft: "-1px"
150
- }
151
96
  }
152
97
  },
153
98
  splitGroup: {
99
+ width: "fit-content",
154
100
  background: theme.colors.atmo1,
101
+ // Button
155
102
  "& button$button": {
156
- marginLeft: -1,
157
- "&:disabled": {
158
- borderTop: "none",
159
- borderBottom: "none",
160
- "&:hover": {
161
- borderTop: "none",
162
- borderBottom: "none"
163
- }
164
- },
165
103
  "&$firstButton": {
166
- "&:not($selected):disabled": {
167
- borderLeft: "none",
168
- "&:hover": {
169
- borderLeft: "none"
170
- }
104
+ borderTopRightRadius: 0,
105
+ borderBottomRightRadius: 0,
106
+ "& + div$splitContainer": {
107
+ marginLeft: -1
171
108
  }
172
109
  },
173
110
  "&$lastButton": {
174
- "&:not($selected):disabled": {
175
- borderRight: "none",
176
- "&:hover": {
177
- borderRight: "none"
178
- }
179
- }
180
- },
181
- "&:not($firstButton)": {
182
- marginLeft: 0
111
+ borderTopLeftRadius: 0,
112
+ borderBottomLeftRadius: 0
183
113
  }
184
114
  },
185
- // dropdown menu styles
186
- "& $button": {
187
- marginLeft: -1,
188
- [`& .${staticClasses$1.icon}`]: {
189
- "&:disabled": {
190
- borderTop: "none",
191
- borderBottom: "none",
192
- "&:hover": {
193
- borderTop: "none",
194
- borderBottom: "none"
195
- }
196
- }
197
- },
198
- [`& .${staticClasses$1.iconSelected}`]: {
199
- zIndex: 2
200
- },
201
- "&$firstButton": {
202
- [`& .${staticClasses$1.icon}`]: {
203
- "&:disabled": {
204
- borderLeft: "none",
205
- "&:hover": {
206
- borderLeft: "none"
207
- }
208
- }
209
- }
210
- },
211
- "&$lastButton": {
212
- [`& .${staticClasses$1.icon}`]: {
213
- "&:disabled": {
214
- borderRight: "none",
215
- "&:hover": {
216
- borderRight: "none"
217
- }
218
- }
115
+ // Dropdown Menu
116
+ [`& .${staticClasses$1.root}`]: {
117
+ "&:has($firstButton)": {
118
+ "& + div$splitContainer": {
119
+ marginRight: -1
219
120
  }
220
- },
221
- "&:not($firstButton) > button": {
222
- marginLeft: 0
223
121
  }
224
122
  },
225
- "&$secondarySubtle": {
226
- "& button$button": {
227
- borderTop: `solid 1px ${theme.colors.secondary}`,
228
- borderBottom: `solid 1px ${theme.colors.secondary}`,
229
- "&$firstButton": {
230
- borderLeft: `solid 1px ${theme.colors.secondary}`
231
- },
232
- "&$lastButton": {
233
- borderRight: `solid 1px ${theme.colors.secondary}`
234
- },
235
- "&:not($selected):disabled": {
236
- borderTop: "none",
237
- borderBottom: "none",
238
- "&:hover": {
239
- borderTop: "none",
240
- borderBottom: "none"
241
- },
242
- "&$firstButton": {
243
- "&:not($selected):disabled": {
244
- borderLeft: "none",
245
- "&:hover": {
246
- borderLeft: "none"
247
- }
248
- }
249
- },
250
- "&$lastButton": {
251
- "&:not($selected):disabled": {
252
- borderRight: "none",
253
- "&:hover": {
254
- borderRight: "none"
255
- }
256
- }
257
- }
258
- }
259
- },
260
- "& $button": {
261
- [`& .${staticClasses$1.icon}`]: {
262
- borderTop: `solid 1px ${theme.colors.secondary}`,
263
- borderBottom: `solid 1px ${theme.colors.secondary}`,
264
- "&:disabled": {
265
- borderTop: "none",
266
- borderBottom: "none",
267
- "&:hover": {
268
- borderTop: "none",
269
- borderBottom: "none"
270
- }
271
- }
272
- },
273
- "&$firstButton": {
274
- [`& .${staticClasses$1.icon}`]: {
275
- borderLeft: `solid 1px ${theme.colors.secondary}`,
276
- "&:disabled": {
277
- borderLeft: "none",
278
- "&:hover": {
279
- borderLeft: "none"
280
- }
281
- }
282
- }
283
- },
284
- "&$lastButton": {
285
- [`& .${staticClasses$1.icon}`]: {
286
- borderRight: `solid 1px ${theme.colors.secondary}`,
287
- "&:disabled": {
288
- borderRight: "none",
289
- "&:hover": {
290
- borderRight: "none"
291
- }
292
- }
293
- }
294
- }
295
- }
123
+ "& $button$firstButton > button": {
124
+ marginRight: -1.5,
125
+ borderTopRightRadius: 0,
126
+ borderBottomRightRadius: 0
127
+ },
128
+ "& $button$lastButton > button": {
129
+ marginLeft: -1.5,
130
+ borderTopLeftRadius: 0,
131
+ borderBottomLeftRadius: 0
132
+ },
133
+ [`& .${staticClasses$1.iconSelected}`]: {
134
+ zIndex: 2
296
135
  }
297
136
  },
298
- splitGroupDisabled: { background: "transparent" },
137
+ splitGroupDisabled: { background: theme.colors.atmo3 },
299
138
  button: {},
300
139
  selected: {},
301
- // vertical button display Styling
302
140
  vertical: {
303
141
  flexDirection: "column",
304
142
  height: "auto",
@@ -362,151 +200,43 @@ const { staticClasses, useClasses } = createClasses("HvMultiButton", {
362
200
  }
363
201
  }
364
202
  },
365
- primary: {
366
- "& button$button": {
367
- borderTop: "none",
368
- borderBottom: "none",
369
- "&$firstButton": {
370
- borderLeft: "none"
371
- },
372
- "&$lastButton": {
373
- borderRight: "none"
374
- },
375
- "&$selected": {
376
- border: `solid 1px ${theme.colors.secondary}`
377
- }
378
- },
379
- // dropdown menu styles
380
- "& $button": {
381
- [`& .${staticClasses$1.icon}`]: {
382
- borderTop: "none",
383
- borderBottom: "none"
384
- },
385
- [`& .${staticClasses$1.iconSelected}`]: {
386
- border: `solid 1px ${theme.colors.secondary}`
387
- },
388
- "&$firstButton": {
389
- [`& .${staticClasses$1.icon}`]: {
390
- borderLeft: "none"
391
- },
392
- [`& .${staticClasses$1.iconSelected}`]: {
393
- borderLeft: `solid 1px ${theme.colors.secondary}`
394
- }
395
- },
396
- "&$lastButton": {
397
- [`& .${staticClasses$1.icon}`]: {
398
- borderRight: "none"
399
- },
400
- [`& .${staticClasses$1.iconSelected}`]: {
401
- borderRight: `solid 1px ${theme.colors.secondary}`
402
- }
403
- }
404
- }
405
- },
406
- primarySubtle: {
407
- "& button$button": {
408
- borderTop: `solid 1px ${theme.colors.primary}`,
409
- borderBottom: `solid 1px ${theme.colors.primary}`,
410
- "&$firstButton": {
411
- borderLeft: `solid 1px ${theme.colors.primary}`
412
- },
413
- "&$lastButton": {
414
- borderRight: `solid 1px ${theme.colors.primary}`
415
- }
416
- },
417
- // dropdown menu styles
418
- "& $button": {
419
- [`& .${staticClasses$1.icon}`]: {
420
- borderTop: `solid 1px ${theme.colors.primary}`,
421
- borderBottom: `solid 1px ${theme.colors.primary}`
422
- },
423
- "&$firstButton": {
424
- [`& .${staticClasses$1.icon}`]: {
425
- borderLeft: `solid 1px ${theme.colors.primary}`
426
- },
427
- [`& .${staticClasses$1.iconSelected}`]: {
428
- border: `solid 1px ${theme.colors.secondary}`
429
- }
430
- },
431
- "&$lastButton": {
432
- [`& .${staticClasses$1.icon}`]: {
433
- borderRight: `solid 1px ${theme.colors.primary}`
434
- },
435
- [`& .${staticClasses$1.iconSelected}`]: {
436
- border: `solid 1px ${theme.colors.secondary}`
437
- }
438
- }
439
- }
440
- },
441
- primaryGhost: {},
442
- secondary: {},
443
- secondarySubtle: {},
444
- secondaryGhost: {
445
- "& button$button": {
446
- "&:disabled": {
447
- background: theme.colors.atmo3
448
- }
449
- },
450
- // dropdown menu styles
451
- "& $button": {
452
- [`& .${staticClasses$1.icon}`]: {
453
- "&:disabled": {
454
- background: theme.colors.atmo3
455
- }
456
- }
457
- }
458
- },
459
- firstButton: {},
460
- lastButton: {},
461
203
  split: {
462
204
  width: 1,
463
205
  height: "100%",
464
206
  background: "currentColor"
465
207
  },
466
208
  splitContainer: {
209
+ display: "flex",
210
+ justifyContent: "center",
467
211
  zIndex: 1,
468
- marginLeft: -1,
469
- width: 1,
470
- height: "100%",
212
+ width: 2,
471
213
  paddingTop: 4,
472
214
  paddingBottom: 4,
473
- color: theme.colors.secondary,
474
- borderTop: `1px solid ${theme.colors.atmo4}`,
475
- borderBottom: `1px solid ${theme.colors.atmo4}`,
476
- "&$primary": {
477
- color: theme.colors.atmo1,
478
- backgroundColor: theme.colors.primary,
479
- borderTop: `1px solid ${theme.colors.primary}`,
480
- borderBottom: `1px solid ${theme.colors.primary}`
481
- },
482
- "&$primarySubtle": {
483
- color: theme.colors.primary,
484
- borderTop: `1px solid ${theme.colors.primary}`,
485
- borderBottom: `1px solid ${theme.colors.primary}`
486
- },
487
- "&$primaryGhost": {
488
- color: theme.colors.primary,
489
- borderTop: `1px solid ${theme.colors.primary}`,
490
- borderBottom: `1px solid ${theme.colors.primary}`
491
- },
492
- "&$secondarySubtle": {
493
- color: theme.colors.secondary,
494
- borderTop: `1px solid ${theme.colors.secondary}`,
495
- borderBottom: `1px solid ${theme.colors.secondary}`
496
- },
497
- "&$secondaryGhost": {
498
- color: theme.colors.secondary
499
- },
500
- "&$splitDisabled": {
501
- background: "transparent",
502
- color: theme.colors.secondary_60,
503
- borderTop: "none",
504
- borderBottom: "none"
505
- }
215
+ height: "calc(32px - 2px)"
506
216
  },
507
- splitDisabled: {}
217
+ splitDisabled: {
218
+ color: theme.colors.secondary_60
219
+ },
220
+ firstButton: {},
221
+ lastButton: {},
222
+ // TODO - review the need for these classes in v6
223
+ primary: {},
224
+ primarySubtle: {},
225
+ primaryGhost: {},
226
+ secondary: {},
227
+ secondarySubtle: {},
228
+ secondaryGhost: {}
229
+ });
230
+ const getSplitContainerColor = (color, type, disabled) => ({
231
+ color: getColoringStyle(color, type).color,
232
+ backgroundColor: disabled ? theme.colors.atmo3 : type === "subtle" ? theme.colors.atmo1 : "transparent"
233
+ });
234
+ const getSplitContainerHeight = (size) => ({
235
+ height: `calc(${getSizeStyles(size).height} - 2px)`
508
236
  });
509
237
  export {
238
+ getSplitContainerColor,
239
+ getSplitContainerHeight,
510
240
  staticClasses,
511
241
  useClasses
512
242
  };
@@ -1 +1 @@
1
- {"version":3,"file":"MultiButton.styles.js","sources":["../../../src/MultiButton/MultiButton.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { dropDownMenuClasses } from \"../DropDownMenu\";\n\nimport { createClasses } from \"../utils/classes\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvMultiButton\", {\n root: {\n display: \"flex\",\n alignItems: \"center\",\n transition: \"none\",\n background: theme.colors.atmo2,\n position: \"relative\",\n zIndex: 0,\n\n // prevent the focus ring to be hidden by sibling hover background\n \"&>.HvIsFocusVisible\": {\n zIndex: 5,\n },\n\n \"& button$button\": {\n minWidth: \"unset\",\n width: \"100%\",\n maxWidth: 200,\n padding: 0,\n transition: \"none\",\n flex: \"1 0 0px\",\n borderTop: `solid 1px ${theme.colors.atmo4}`,\n borderBottom: `solid 1px ${theme.colors.atmo4}`,\n borderLeft: \"solid 1px transparent\",\n borderRight: \"solid 1px transparent\",\n borderRadius: 0,\n fontWeight: theme.typography.body.fontWeight,\n fontSize: theme.typography.body.fontSize,\n \"&:disabled\": {\n color: theme.colors.secondary_60,\n borderTop: `solid 1px ${theme.colors.atmo4}`,\n borderBottom: `solid 1px ${theme.colors.atmo4}`,\n \"&:hover\": {\n borderTop: `solid 1px ${theme.colors.atmo4}`,\n borderBottom: `solid 1px ${theme.colors.atmo4}`,\n borderLeft: \"solid 1px transparent\",\n borderRight: \"solid 1px transparent\",\n },\n },\n \"&$firstButton\": {\n borderLeft: `solid 1px ${theme.colors.atmo4}`,\n borderTopLeftRadius: theme.radii.base,\n borderBottomLeftRadius: theme.radii.base,\n \"&:disabled\": {\n borderLeft: `solid 1px ${theme.colors.atmo4}`,\n },\n },\n \"&$lastButton\": {\n borderRight: `solid 1px ${theme.colors.atmo4}`,\n borderTopRightRadius: theme.radii.base,\n borderBottomRightRadius: theme.radii.base,\n \"&:disabled\": {\n borderRight: `solid 1px ${theme.colors.atmo4}`,\n },\n \"&:disabled:hover\": {\n borderRight: `solid 1px ${theme.colors.atmo4}`,\n },\n },\n \"&:not($firstButton)\": {\n marginLeft: \"-1px\",\n },\n \"&$selected\": {\n background: theme.colors.atmo1,\n ...theme.typography.label,\n borderRadius: theme.radii.base,\n border: `solid 1px ${theme.colors.secondary}`,\n zIndex: 2,\n \"&:hover\": {\n background: theme.colors.atmo3,\n \"&:not(:disabled)\": {\n border: `solid 1px ${theme.colors.secondary}`,\n },\n \"&:disabled\": {\n border: `solid 1px ${theme.colors.atmo4}`,\n },\n },\n // prevent the focus ring to be hidden by sibling hover background\n // even when selected\n \"&.HvIsFocusVisible\": {\n zIndex: 5,\n },\n \"&:disabled\": {\n zIndex: 1,\n color: theme.colors.secondary_60,\n background: theme.colors.atmo1,\n border: `solid 1px ${theme.colors.atmo4}`,\n },\n },\n },\n\n // dropdown menu styles\n \"& $button\": {\n [`&.${dropDownMenuClasses.container}`]: {\n width: \"unset\",\n },\n [`& .${dropDownMenuClasses.icon}`]: {\n borderTop: `solid 1px ${theme.colors.atmo4}`,\n borderBottom: `solid 1px ${theme.colors.atmo4}`,\n borderLeft: \"solid 1px transparent\",\n borderRight: \"solid 1px transparent\",\n borderRadius: 0,\n \"&:disabled\": {\n borderTop: `solid 1px ${theme.colors.atmo4}`,\n borderBottom: `solid 1px ${theme.colors.atmo4}`,\n \"&:hover\": {\n borderTop: `solid 1px ${theme.colors.atmo4}`,\n borderBottom: `solid 1px ${theme.colors.atmo4}`,\n borderLeft: \"solid 1px transparent\",\n borderRight: \"solid 1px transparent\",\n },\n },\n },\n [`& .${dropDownMenuClasses.iconSelected}`]: {\n border: `solid 1px ${theme.colors.secondary}`,\n },\n \"&$firstButton\": {\n [`& .${dropDownMenuClasses.icon}`]: {\n borderLeft: `solid 1px ${theme.colors.atmo4}`,\n borderTopLeftRadius: theme.radii.base,\n borderBottomLeftRadius: theme.radii.base,\n \"&:disabled\": {\n borderLeft: `solid 1px ${theme.colors.atmo4}`,\n },\n },\n [`& .${dropDownMenuClasses.iconSelected}`]: {\n border: `solid 1px ${theme.colors.secondary}`,\n },\n },\n \"&$lastButton\": {\n [`& .${dropDownMenuClasses.icon}`]: {\n borderRight: `solid 1px ${theme.colors.atmo4}`,\n borderTopRightRadius: theme.radii.base,\n borderBottomRightRadius: theme.radii.base,\n \"&:disabled\": {\n borderRight: `solid 1px ${theme.colors.atmo4}`,\n },\n \"&:disabled:hover\": {\n borderRight: `solid 1px ${theme.colors.atmo4}`,\n },\n },\n [`& .${dropDownMenuClasses.iconSelected}`]: {\n border: `solid 1px ${theme.colors.secondary}`,\n },\n },\n \"&:not($firstButton) > button\": {\n marginLeft: \"-1px\",\n },\n },\n },\n splitGroup: {\n background: theme.colors.atmo1,\n \"& button$button\": {\n marginLeft: -1,\n \"&:disabled\": {\n borderTop: \"none\",\n borderBottom: \"none\",\n \"&:hover\": {\n borderTop: \"none\",\n borderBottom: \"none\",\n },\n },\n \"&$firstButton\": {\n \"&:not($selected):disabled\": {\n borderLeft: \"none\",\n \"&:hover\": {\n borderLeft: \"none\",\n },\n },\n },\n \"&$lastButton\": {\n \"&:not($selected):disabled\": {\n borderRight: \"none\",\n \"&:hover\": {\n borderRight: \"none\",\n },\n },\n },\n \"&:not($firstButton)\": {\n marginLeft: 0,\n },\n },\n // dropdown menu styles\n \"& $button\": {\n marginLeft: -1,\n [`& .${dropDownMenuClasses.icon}`]: {\n \"&:disabled\": {\n borderTop: \"none\",\n borderBottom: \"none\",\n \"&:hover\": {\n borderTop: \"none\",\n borderBottom: \"none\",\n },\n },\n },\n [`& .${dropDownMenuClasses.iconSelected}`]: {\n zIndex: 2,\n },\n \"&$firstButton\": {\n [`& .${dropDownMenuClasses.icon}`]: {\n \"&:disabled\": {\n borderLeft: \"none\",\n \"&:hover\": {\n borderLeft: \"none\",\n },\n },\n },\n },\n \"&$lastButton\": {\n [`& .${dropDownMenuClasses.icon}`]: {\n \"&:disabled\": {\n borderRight: \"none\",\n \"&:hover\": {\n borderRight: \"none\",\n },\n },\n },\n },\n \"&:not($firstButton) > button\": {\n marginLeft: 0,\n },\n },\n \"&$secondarySubtle\": {\n \"& button$button\": {\n borderTop: `solid 1px ${theme.colors.secondary}`,\n borderBottom: `solid 1px ${theme.colors.secondary}`,\n \"&$firstButton\": {\n borderLeft: `solid 1px ${theme.colors.secondary}`,\n },\n \"&$lastButton\": {\n borderRight: `solid 1px ${theme.colors.secondary}`,\n },\n \"&:not($selected):disabled\": {\n borderTop: \"none\",\n borderBottom: \"none\",\n \"&:hover\": {\n borderTop: \"none\",\n borderBottom: \"none\",\n },\n \"&$firstButton\": {\n \"&:not($selected):disabled\": {\n borderLeft: \"none\",\n \"&:hover\": {\n borderLeft: \"none\",\n },\n },\n },\n \"&$lastButton\": {\n \"&:not($selected):disabled\": {\n borderRight: \"none\",\n \"&:hover\": {\n borderRight: \"none\",\n },\n },\n },\n },\n },\n \"& $button\": {\n [`& .${dropDownMenuClasses.icon}`]: {\n borderTop: `solid 1px ${theme.colors.secondary}`,\n borderBottom: `solid 1px ${theme.colors.secondary}`,\n \"&:disabled\": {\n borderTop: \"none\",\n borderBottom: \"none\",\n \"&:hover\": {\n borderTop: \"none\",\n borderBottom: \"none\",\n },\n },\n },\n \"&$firstButton\": {\n [`& .${dropDownMenuClasses.icon}`]: {\n borderLeft: `solid 1px ${theme.colors.secondary}`,\n \"&:disabled\": {\n borderLeft: \"none\",\n \"&:hover\": {\n borderLeft: \"none\",\n },\n },\n },\n },\n \"&$lastButton\": {\n [`& .${dropDownMenuClasses.icon}`]: {\n borderRight: `solid 1px ${theme.colors.secondary}`,\n \"&:disabled\": {\n borderRight: \"none\",\n \"&:hover\": {\n borderRight: \"none\",\n },\n },\n },\n },\n },\n },\n },\n splitGroupDisabled: { background: \"transparent\" },\n button: {},\n selected: {},\n // vertical button display Styling\n vertical: {\n flexDirection: \"column\",\n height: \"auto\",\n btnSecondary: {\n flex: \"1 1 20px\",\n },\n \"& button$button\": {\n minWidth: 32,\n width: \"100%\",\n borderLeft: `solid 1px ${theme.colors.atmo4}`,\n borderRight: `solid 1px ${theme.colors.atmo4}`,\n borderTop: \"solid 1px transparent\",\n borderBottom: \"solid 1px transparent\",\n \"&:disabled\": {\n color: theme.colors.secondary_60,\n borderLeft: `solid 1px ${theme.colors.atmo4}`,\n borderRight: `solid 1px ${theme.colors.atmo4}`,\n borderTop: \"solid 1px transparent\",\n borderBottom: \"solid 1px transparent\",\n \"&:hover\": {\n borderLeft: `solid 1px ${theme.colors.atmo4}`,\n borderRight: `solid 1px ${theme.colors.atmo4}`,\n borderTop: \"solid 1px transparent\",\n borderBottom: \"solid 1px transparent\",\n },\n },\n \"&$firstButton\": {\n borderTop: `solid 1px ${theme.colors.atmo4}`,\n borderTopLeftRadius: theme.radii.base,\n borderTopRightRadius: theme.radii.base,\n },\n \"&$lastButton\": {\n borderBottom: `solid 1px ${theme.colors.atmo4}`,\n borderBottomLeftRadius: theme.radii.base,\n borderBottomRightRadius: theme.radii.base,\n \"&:disabled:hover\": {\n borderBottom: `solid 1px ${theme.colors.atmo4}`,\n },\n },\n \"&:not($firstButton)\": {\n marginLeft: 0,\n marginTop: -1,\n },\n \"&$selected\": {\n height: 32,\n width: `calc(100% + 2px) !important`,\n background: theme.colors.atmo1,\n ...theme.typography.label,\n borderRadius: theme.radii.base,\n border: `solid 1px ${theme.colors.secondary}`,\n zIndex: 2,\n \"&:hover, &:focus\": {\n background: theme.colors.atmo3,\n },\n \"&:disabled\": {\n zIndex: 1,\n color: theme.colors.secondary_60,\n background: theme.colors.atmo1,\n border: `solid 1px ${theme.colors.atmo4}`,\n },\n },\n },\n },\n primary: {\n \"& button$button\": {\n borderTop: \"none\",\n borderBottom: \"none\",\n\n \"&$firstButton\": {\n borderLeft: \"none\",\n },\n \"&$lastButton\": {\n borderRight: \"none\",\n },\n \"&$selected\": {\n border: `solid 1px ${theme.colors.secondary}`,\n },\n },\n\n // dropdown menu styles\n \"& $button\": {\n [`& .${dropDownMenuClasses.icon}`]: {\n borderTop: \"none\",\n borderBottom: \"none\",\n },\n [`& .${dropDownMenuClasses.iconSelected}`]: {\n border: `solid 1px ${theme.colors.secondary}`,\n },\n \"&$firstButton\": {\n [`& .${dropDownMenuClasses.icon}`]: {\n borderLeft: \"none\",\n },\n [`& .${dropDownMenuClasses.iconSelected}`]: {\n borderLeft: `solid 1px ${theme.colors.secondary}`,\n },\n },\n \"&$lastButton\": {\n [`& .${dropDownMenuClasses.icon}`]: {\n borderRight: \"none\",\n },\n [`& .${dropDownMenuClasses.iconSelected}`]: {\n borderRight: `solid 1px ${theme.colors.secondary}`,\n },\n },\n },\n },\n primarySubtle: {\n \"& button$button\": {\n borderTop: `solid 1px ${theme.colors.primary}`,\n borderBottom: `solid 1px ${theme.colors.primary}`,\n \"&$firstButton\": {\n borderLeft: `solid 1px ${theme.colors.primary}`,\n },\n \"&$lastButton\": {\n borderRight: `solid 1px ${theme.colors.primary}`,\n },\n },\n // dropdown menu styles\n \"& $button\": {\n [`& .${dropDownMenuClasses.icon}`]: {\n borderTop: `solid 1px ${theme.colors.primary}`,\n borderBottom: `solid 1px ${theme.colors.primary}`,\n },\n \"&$firstButton\": {\n [`& .${dropDownMenuClasses.icon}`]: {\n borderLeft: `solid 1px ${theme.colors.primary}`,\n },\n [`& .${dropDownMenuClasses.iconSelected}`]: {\n border: `solid 1px ${theme.colors.secondary}`,\n },\n },\n \"&$lastButton\": {\n [`& .${dropDownMenuClasses.icon}`]: {\n borderRight: `solid 1px ${theme.colors.primary}`,\n },\n [`& .${dropDownMenuClasses.iconSelected}`]: {\n border: `solid 1px ${theme.colors.secondary}`,\n },\n },\n },\n },\n primaryGhost: {},\n secondary: {},\n secondarySubtle: {},\n secondaryGhost: {\n \"& button$button\": {\n \"&:disabled\": {\n background: theme.colors.atmo3,\n },\n },\n // dropdown menu styles\n \"& $button\": {\n [`& .${dropDownMenuClasses.icon}`]: {\n \"&:disabled\": {\n background: theme.colors.atmo3,\n },\n },\n },\n },\n firstButton: {},\n lastButton: {},\n split: {\n width: 1,\n height: \"100%\",\n background: \"currentColor\",\n },\n splitContainer: {\n zIndex: 1,\n marginLeft: -1,\n width: 1,\n height: \"100%\",\n paddingTop: 4,\n paddingBottom: 4,\n color: theme.colors.secondary,\n borderTop: `1px solid ${theme.colors.atmo4}`,\n borderBottom: `1px solid ${theme.colors.atmo4}`,\n \"&$primary\": {\n color: theme.colors.atmo1,\n backgroundColor: theme.colors.primary,\n borderTop: `1px solid ${theme.colors.primary}`,\n borderBottom: `1px solid ${theme.colors.primary}`,\n },\n \"&$primarySubtle\": {\n color: theme.colors.primary,\n borderTop: `1px solid ${theme.colors.primary}`,\n borderBottom: `1px solid ${theme.colors.primary}`,\n },\n \"&$primaryGhost\": {\n color: theme.colors.primary,\n borderTop: `1px solid ${theme.colors.primary}`,\n borderBottom: `1px solid ${theme.colors.primary}`,\n },\n \"&$secondarySubtle\": {\n color: theme.colors.secondary,\n borderTop: `1px solid ${theme.colors.secondary}`,\n borderBottom: `1px solid ${theme.colors.secondary}`,\n },\n \"&$secondaryGhost\": {\n color: theme.colors.secondary,\n },\n \"&$splitDisabled\": {\n background: \"transparent\",\n color: theme.colors.secondary_60,\n borderTop: \"none\",\n borderBottom: \"none\",\n },\n },\n splitDisabled: {},\n});\n"],"names":["dropDownMenuClasses"],"mappings":";;;;;;AAMO,MAAM,EAAE,eAAe,eAAe,cAAc,iBAAiB;AAAA,EAC1E,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,YAAY,MAAM,OAAO;AAAA,IACzB,UAAU;AAAA,IACV,QAAQ;AAAA;AAAA,IAGR,uBAAuB;AAAA,MACrB,QAAQ;AAAA,IACV;AAAA,IAEA,mBAAmB;AAAA,MACjB,UAAU;AAAA,MACV,OAAO;AAAA,MACP,UAAU;AAAA,MACV,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,MAAM;AAAA,MACN,WAAW,aAAa,MAAM,OAAO,KAAK;AAAA,MAC1C,cAAc,aAAa,MAAM,OAAO,KAAK;AAAA,MAC7C,YAAY;AAAA,MACZ,aAAa;AAAA,MACb,cAAc;AAAA,MACd,YAAY,MAAM,WAAW,KAAK;AAAA,MAClC,UAAU,MAAM,WAAW,KAAK;AAAA,MAChC,cAAc;AAAA,QACZ,OAAO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AAM,OAAO,KAAK;AAAA,IAC7C,aAAa;AAAA,MACX,OAAO,MAAM,OAAO;AAAA,MACpB,iBAAiB,MAAM,OAAO;AAAA,MAC9B,WAAW,aAAa,MAAM,OAAO,OAAO;AAAA,MAC5C,cAAc,aAAa,MAAM,OAAO,OAAO;AAAA,IACjD;AAAA,IACA,mBAAmB;AAAA,MACjB,OAAO,MAAM,OAAO;AAAA,MACpB,WAAW,aAAa,MAAM,OAAO,OAAO;AAAA,MAC5C,cAAc,aAAa,MAAM,OAAO,OAAO;AAAA,IACjD;AAAA,IACA,kBAAkB;AAAA,MAChB,OAAO,MAAM,OAAO;AAAA,MACpB,WAAW,aAAa,MAAM,OAAO,OAAO;AAAA,MAC5C,cAAc,aAAa,MAAM,OAAO,OAAO;AAAA,IACjD;AAAA,IACA,qBAAqB;AAAA,MACnB,OAAO,MAAM,OAAO;AAAA,MACpB,WAAW,aAAa,MAAM,OAAO,SAAS;AAAA,MAC9C,cAAc,aAAa,MAAM,OAAO,SAAS;AAAA,IACnD;AAAA,IACA,oBAAoB;AAAA,MAClB,OAAO,MAAM,OAAO;AAAA,IACtB;AAAA,IACA,mBAAmB;AAAA,MACjB,YAAY;AAAA,MACZ,OAAO,MAAM,OAAO;AAAA,MACpB,WAAW;AAAA,MACX,cAAc;AAAA,IAChB;AAAA,EACF;AAAA,EACA,eAAe,CAAC;AAClB,CAAC;"}
1
+ {"version":3,"file":"MultiButton.styles.js","sources":["../../../src/MultiButton/MultiButton.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { createClasses } from \"../utils/classes\";\nimport { dropDownMenuClasses } from \"../DropDownMenu\";\nimport { getColoringStyle, getSizeStyles } from \"../Button/Button.styles\";\nimport { HvButtonSize } from \"../Button\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvMultiButton\", {\n root: {\n display: \"flex\",\n alignItems: \"center\",\n transition: \"none\",\n position: \"relative\",\n zIndex: 0,\n },\n multiple: {\n background: theme.colors.atmo2,\n\n // prevent the focus ring to be hidden by sibling hover background\n \"&>.HvIsFocusVisible\": {\n zIndex: 5,\n },\n\n \"& button$button\": {\n minWidth: \"unset\",\n width: \"100%\",\n maxWidth: 200,\n padding: 0,\n transition: \"none\",\n flex: \"1 0 0px\",\n borderTop: `solid 1px ${theme.colors.atmo4}`,\n borderBottom: `solid 1px ${theme.colors.atmo4}`,\n borderLeft: \"solid 1px transparent\",\n borderRight: \"solid 1px transparent\",\n borderRadius: 0,\n fontWeight: theme.typography.body.fontWeight,\n fontSize: theme.typography.body.fontSize,\n \"&:disabled\": {\n color: theme.colors.secondary_60,\n borderTop: `solid 1px ${theme.colors.atmo4}`,\n borderBottom: `solid 1px ${theme.colors.atmo4}`,\n \"&:hover\": {\n borderTop: `solid 1px ${theme.colors.atmo4}`,\n borderBottom: `solid 1px ${theme.colors.atmo4}`,\n borderLeft: \"solid 1px transparent\",\n borderRight: \"solid 1px transparent\",\n },\n },\n \"&$firstButton\": {\n borderLeft: `solid 1px ${theme.colors.atmo4}`,\n borderTopLeftRadius: theme.radii.base,\n borderBottomLeftRadius: theme.radii.base,\n \"&:disabled\": {\n borderLeft: `solid 1px ${theme.colors.atmo4}`,\n },\n },\n \"&$lastButton\": {\n borderRight: `solid 1px ${theme.colors.atmo4}`,\n borderTopRightRadius: theme.radii.base,\n borderBottomRightRadius: theme.radii.base,\n \"&:disabled\": {\n borderRight: `solid 1px ${theme.colors.atmo4}`,\n },\n \"&:disabled:hover\": {\n borderRight: `solid 1px ${theme.colors.atmo4}`,\n },\n },\n \"&:not($firstButton)\": {\n marginLeft: \"-1px\",\n },\n \"&$selected\": {\n background: theme.colors.atmo1,\n ...theme.typography.label,\n borderRadius: theme.radii.base,\n border: `solid 1px ${theme.colors.secondary}`,\n zIndex: 2,\n \"&:hover\": {\n background: theme.colors.atmo3,\n \"&:not(:disabled)\": {\n border: `solid 1px ${theme.colors.secondary}`,\n },\n \"&:disabled\": {\n border: `solid 1px ${theme.colors.atmo4}`,\n },\n },\n // prevent the focus ring to be hidden by sibling hover background\n // even when selected\n \"&.HvIsFocusVisible\": {\n zIndex: 5,\n },\n \"&:disabled\": {\n zIndex: 1,\n color: theme.colors.secondary_60,\n background: theme.colors.atmo1,\n border: `solid 1px ${theme.colors.atmo4}`,\n },\n },\n },\n },\n splitGroup: {\n width: \"fit-content\",\n background: theme.colors.atmo1,\n\n // Button\n \"& button$button\": {\n \"&$firstButton\": {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n \"& + div$splitContainer\": {\n marginLeft: -1,\n },\n },\n \"&$lastButton\": {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n },\n },\n\n // Dropdown Menu\n [`& .${dropDownMenuClasses.root}`]: {\n \"&:has($firstButton)\": {\n \"& + div$splitContainer\": {\n marginRight: -1,\n },\n },\n },\n \"& $button$firstButton > button\": {\n marginRight: -1.5,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n },\n \"& $button$lastButton > button\": {\n marginLeft: -1.5,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n },\n [`& .${dropDownMenuClasses.iconSelected}`]: {\n zIndex: 2,\n },\n },\n splitGroupDisabled: { background: theme.colors.atmo3 },\n button: {},\n selected: {},\n vertical: {\n flexDirection: \"column\",\n height: \"auto\",\n btnSecondary: {\n flex: \"1 1 20px\",\n },\n \"& button$button\": {\n minWidth: 32,\n width: \"100%\",\n borderLeft: `solid 1px ${theme.colors.atmo4}`,\n borderRight: `solid 1px ${theme.colors.atmo4}`,\n borderTop: \"solid 1px transparent\",\n borderBottom: \"solid 1px transparent\",\n \"&:disabled\": {\n color: theme.colors.secondary_60,\n borderLeft: `solid 1px ${theme.colors.atmo4}`,\n borderRight: `solid 1px ${theme.colors.atmo4}`,\n borderTop: \"solid 1px transparent\",\n borderBottom: \"solid 1px transparent\",\n \"&:hover\": {\n borderLeft: `solid 1px ${theme.colors.atmo4}`,\n borderRight: `solid 1px ${theme.colors.atmo4}`,\n borderTop: \"solid 1px transparent\",\n borderBottom: \"solid 1px transparent\",\n },\n },\n \"&$firstButton\": {\n borderTop: `solid 1px ${theme.colors.atmo4}`,\n borderTopLeftRadius: theme.radii.base,\n borderTopRightRadius: theme.radii.base,\n },\n \"&$lastButton\": {\n borderBottom: `solid 1px ${theme.colors.atmo4}`,\n borderBottomLeftRadius: theme.radii.base,\n borderBottomRightRadius: theme.radii.base,\n \"&:disabled:hover\": {\n borderBottom: `solid 1px ${theme.colors.atmo4}`,\n },\n },\n \"&:not($firstButton)\": {\n marginLeft: 0,\n marginTop: -1,\n },\n \"&$selected\": {\n height: 32,\n width: `calc(100% + 2px) !important`,\n background: theme.colors.atmo1,\n ...theme.typography.label,\n borderRadius: theme.radii.base,\n border: `solid 1px ${theme.colors.secondary}`,\n zIndex: 2,\n \"&:hover, &:focus\": {\n background: theme.colors.atmo3,\n },\n \"&:disabled\": {\n zIndex: 1,\n color: theme.colors.secondary_60,\n background: theme.colors.atmo1,\n border: `solid 1px ${theme.colors.atmo4}`,\n },\n },\n },\n },\n split: {\n width: 1,\n height: \"100%\",\n background: \"currentColor\",\n },\n splitContainer: {\n display: \"flex\",\n justifyContent: \"center\",\n zIndex: 1,\n width: 2,\n paddingTop: 4,\n paddingBottom: 4,\n height: \"calc(32px - 2px)\",\n },\n splitDisabled: {\n color: theme.colors.secondary_60,\n },\n firstButton: {},\n lastButton: {},\n\n // TODO - review the need for these classes in v6\n primary: {},\n primarySubtle: {},\n primaryGhost: {},\n secondary: {},\n secondarySubtle: {},\n secondaryGhost: {},\n});\n\nexport const getSplitContainerColor = (\n color: string,\n type?: string,\n disabled?: boolean\n) => ({\n color: getColoringStyle(color, type).color,\n backgroundColor: disabled\n ? theme.colors.atmo3\n : type === \"subtle\"\n ? theme.colors.atmo1\n : \"transparent\",\n});\n\nexport const getSplitContainerHeight = (size: HvButtonSize) => ({\n height: `calc(${getSizeStyles(size).height} - 2px)`,\n});\n"],"names":["dropDownMenuClasses"],"mappings":";;;;;;;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AI,EAAE;AAAA,EACrC,iBAAiB,WACb,MAAM,OAAO,QACb,SAAS,WACT,MAAM,OAAO,QACb;AACN;AAEa,MAAA,0BAA0B,CAAC,UAAwB;AAAA,EAC9D,QAAQ,QAAQ,cAAc,IAAI,EAAE,MAAM;AAC5C;"}
@@ -298,6 +298,7 @@ const HvQueryBuilderContext = createContext({
298
298
  dispatchAction: () => ({}),
299
299
  askAction: () => ({}),
300
300
  selectLocation: () => ({}),
301
+ // TODO - remove in v6 (not used)
301
302
  attributes: {},
302
303
  operators: defaultOperators,
303
304
  combinators: defaultCombinators,
@@ -1 +1 @@
1
- {"version":3,"file":"Context.js","sources":["../../../src/QueryBuilder/Context.tsx"],"sourcesContent":["import { createContext, useContext } from \"react\";\n\nimport {\n AskAction,\n HvQueryBuilderAttribute,\n QueryAction,\n HvQueryBuilderLabels,\n HvQueryBuilderQueryCombinator,\n HvQueryBuilderQueryOperator,\n HvQueryBuilderRenderers,\n} from \"./types\";\n\nexport const defaultOperators = {\n numeric: [\n {\n operator: \"greaterThan\",\n label: \"Greater than (>)\",\n combinators: [\"and\"],\n },\n {\n operator: \"lessThan\",\n label: \"Less than (<)\",\n combinators: [\"and\"],\n },\n {\n operator: \"equalsTo\",\n label: \"Equal to (=)\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"greaterThanEq\",\n label: \"Greater than or equal to (>=)\",\n combinators: [\"and\"],\n },\n {\n operator: \"lessThanEq\",\n label: \"Less than or equal to (<=)\",\n combinators: [\"and\"],\n },\n {\n operator: \"notEqual\",\n label: \"Not equal to (!=)\",\n combinators: [\"and\"],\n },\n {\n operator: \"range\",\n label: \"Range\",\n combinators: [\"and\"],\n },\n ],\n text: [\n {\n operator: \"equals\",\n label: \"Equals\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"equalsIgnoreCase\",\n label: \"Equals Ignore Case\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"Contains\",\n label: \"Contains\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"StartsWith\",\n label: \"A string begins with\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"EndsWith\",\n label: \"A string ends with\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"IsNotEmpty\",\n label: \"Is Not empty\",\n combinators: [\"and\"],\n },\n {\n operator: \"IsNot\",\n label: \"Is Not\",\n combinators: [\"and\"],\n },\n {\n operator: \"Empty\",\n label: \"Empty\",\n combinators: [\"and\"],\n },\n ],\n textarea: [\n {\n operator: \"equals\",\n label: \"Equals\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"equalsIgnoreCase\",\n label: \"Equals Ignore Case\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"Contains\",\n label: \"Contains\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"StartsWith\",\n label: \"A string begins with\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"EndsWith\",\n label: \"A string ends with\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"IsNotEmpty\",\n label: \"Is Not empty\",\n combinators: [\"and\"],\n },\n {\n operator: \"IsNot\",\n label: \"Is Not\",\n combinators: [\"and\"],\n },\n {\n operator: \"Empty\",\n label: \"Empty\",\n combinators: [\"and\"],\n },\n ],\n boolean: [\n {\n operator: \"equalsTo\",\n label: \"=\",\n combinators: [\"and\", \"or\"],\n },\n ],\n dateandtime: [\n {\n operator: \"greaterThan\",\n label: \"Greater than\",\n combinators: [\"and\"],\n },\n {\n operator: \"lessThan\",\n label: \"Less than\",\n combinators: [\"and\"],\n },\n {\n operator: \"equalsTo\",\n label: \"Equal to\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"greaterThanEq\",\n label: \"Greater than or equal to\",\n combinators: [\"and\"],\n },\n {\n operator: \"lessThanEq\",\n label: \"Less than or equal to\",\n combinators: [\"and\"],\n },\n {\n operator: \"notEqual\",\n label: \"Not equal to\",\n combinators: [\"and\"],\n },\n {\n operator: \"range\",\n label: \"Range\",\n combinators: [\"and\"],\n },\n ],\n};\n\nexport const defaultCombinators = [\n { operand: \"and\", label: \"AND\" },\n { operand: \"or\", label: \"OR\" },\n];\n\nexport const defaultLabels = {\n query: {\n delete: {\n ariaLabel: \"Reset query\",\n tooltip: \"Reset query\",\n dialogTitle: \"Remove all conditions?\",\n dialogMessage:\n \"Are you sure you want to remove all the conditions? They will be removed permanently.\",\n dialogConfirm: \"Yes\",\n dialogCancel: \"No\",\n dialogCloseTooltip: \"Close\",\n },\n },\n rule: {\n attribute: {\n label: \"Attribute\",\n placeholder: \"Select attribute...\",\n exists: \"Attribute already exists.\",\n },\n operator: {\n label: \"Operator\",\n placeholder: \"Select operator...\",\n },\n value: {\n distance: {\n label: \"Value\",\n connectorText: \"radius miles from\",\n button: \"Select location\",\n validation: {\n required: \"The value is required.\",\n invalid: \"Value must be a positive number.\",\n },\n },\n text: {\n label: \"Value\",\n placeholder: \"Enter value...\",\n validation: {\n required: \"The value is required.\",\n },\n },\n boolean: {\n label: \"Value\",\n placeholder: \"Enter value\",\n options: {\n true: \"True\",\n false: \"False\",\n },\n },\n numeric: {\n label: \"Value\",\n placeholder: \"Enter value\",\n validation: {\n required: \"The value is required.\",\n invalid: \"Value must be a number.\",\n equal: \"Cannot be equal.\",\n greaterThan: \"Needs to be greater.\",\n },\n range: {\n leftLabel: \"From\",\n rightLabel: \"To\",\n },\n },\n datetime: {\n dateLabel: \"Date\",\n datePlaceholder: \"Select Date\",\n timeLabel: \"Time\",\n timePlaceholder: \"Select Time\",\n startDateLabel: \"Start Date\",\n startDatePlaceholder: \"Select Start Date\",\n startTimeLabel: \"Start Time\",\n startTimePlaceholder: \"Select Start Time\",\n endDateLabel: \"End Date\",\n endDatePlaceholder: \"Select End Date\",\n endTimeLabel: \"End Time\",\n endTimePlaceholder: \"Select End Time\",\n validation: {\n required: \"The value is required.\",\n invalidInterval:\n \"End date and time must be after start date and time.\",\n },\n },\n },\n delete: {\n ariaLabel: \"Remove condition\",\n tooltip: \"Remove condition\",\n dialogTitle: \"Remove condition?\",\n dialogMessage:\n \"Are you sure you want to remove the condition? It will be removed permanently.\",\n dialogConfirm: \"Yes\",\n dialogCancel: \"No\",\n dialogCloseTooltip: \"Close\",\n },\n },\n group: {\n delete: {\n ariaLabel: \"Remove group\",\n tooltip: \"Remove group\",\n dialogTitle: \"Remove group?\",\n dialogMessage:\n \"Are you sure you want to remove the group? It will be removed permanently.\",\n dialogConfirm: \"Yes\",\n dialogCancel: \"No\",\n dialogCloseTooltip: \"Close\",\n },\n reset: {\n ariaLabel: \"Change operator\",\n tooltip: \"Change operator query\",\n dialogTitle: \"Change conditional operator?\",\n dialogMessage:\n \"Do you want to change conditional operator? You won't be able to undo this operation. Conditions and/or groups will be removed.\",\n dialogConfirm: \"Yes\",\n dialogCancel: \"No\",\n dialogCloseTooltip: \"Close\",\n },\n addRule: {\n label: \"Add condition\",\n },\n addGroup: {\n label: \"Add group\",\n },\n },\n empty: {\n title: \"No conditions created yet\",\n createCondition: \"Create a condition\",\n createGroup: \"condition group\",\n spacer: \" or a \",\n },\n};\n\nexport interface HvQueryBuilderContextValue {\n dispatchAction: React.Dispatch<QueryAction>;\n askAction: React.Dispatch<React.SetStateAction<AskAction | undefined>>;\n selectLocation?: React.Dispatch<unknown>;\n attributes?: Record<string, HvQueryBuilderAttribute>;\n operators: Record<string, HvQueryBuilderQueryOperator[]>;\n combinators: HvQueryBuilderQueryCombinator[];\n maxDepth: number;\n labels: HvQueryBuilderLabels;\n initialTouched: boolean;\n readOnly: boolean;\n disableConfirmation: boolean;\n renderers?: HvQueryBuilderRenderers;\n emptyRenderer?: string[];\n}\n\nexport const HvQueryBuilderContext = createContext<HvQueryBuilderContextValue>({\n dispatchAction: () => ({}),\n askAction: () => ({}),\n selectLocation: () => ({}),\n attributes: {},\n operators: defaultOperators,\n combinators: defaultCombinators,\n maxDepth: 1,\n labels: defaultLabels,\n initialTouched: false,\n disableConfirmation: false,\n readOnly: false,\n});\n\nexport interface HvQueryBuilderProviderProps {\n value: HvQueryBuilderContextValue;\n children: React.ReactNode;\n}\n\nexport const HvQueryBuilderProvider = ({\n children,\n value,\n}: HvQueryBuilderProviderProps) => {\n return (\n <HvQueryBuilderContext.Provider value={value}>\n {children}\n </HvQueryBuilderContext.Provider>\n );\n};\n\nexport const useQueryBuilderContext = () => {\n return useContext(HvQueryBuilderContext);\n};\n"],"names":[],"mappings":";;AAYO,MAAM,mBAAmB;AAAA,EAC9B,SAAS;AAAA,IACP;AAAA,MACE,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAa,CAAC,KAAK;AAAA,IACrB;AAAA,IACA;AAAA,MACE,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAa,CAAC,KAAK;AAAA,IACrB;AAAA,IACA;AAAA,MACE,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAa,CAAC,OAAO,IAAI;AAAA,IAC3B;AAAA,IACA;AAAA,MACE,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAa,CAAC,KAAK;AAAA,IACrB;AAAA,IACA;AAAA,MACE,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAa,CAAC,KAAK;AAAA,IACrB;AAAA,IACA;AAAA,MACE,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAa,CAAC,KAAK;AAAA,IACrB;AAAA,IACA;AAAA,MACE,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAa,CAAC,KAAK;AAAA,IACrB;AAAA,EACF;AAAA,EACA,MAAM;AAAA,IACJ;AAAA,MACE,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAa,CAAC,OAAO,IAAI;AAAA,IAC3B;AAAA,IACA;AAAA,MACE,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAa,CAAC,OAAO,IAAI;AAAA,IAC3B;AAAA,IACA;AAAA,MACE,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAa,CAAC,OAAO,IAAI;AAAA,IAC3B;AAAA,IACA;AAAA,MACE,UAAU;AAAA,MACV,O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X,SAAS;AAAA,MACT,aAAa;AAAA,MACb,eACE;AAAA,MACF,eAAe;AAAA,MACf,cAAc;AAAA,MACd,oBAAoB;AAAA,IACtB;AAAA,IACA,SAAS;AAAA,MACP,OAAO;AAAA,IACT;AAAA,IACA,UAAU;AAAA,MACR,OAAO;AAAA,IACT;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IACL,OAAO;AAAA,IACP,iBAAiB;AAAA,IACjB,aAAa;AAAA,IACb,QAAQ;AAAA,EACV;AACF;AAkBO,MAAM,wBAAwB,cAA0C;AAAA,EAC7E,gBAAgB,OAAO,CAAA;AAAA,EACvB,WAAW,OAAO,CAAA;AAAA,EAClB,gBAAgB,OAAO,CAAA;AAAA,EACvB,YAAY,CAAC;AAAA,EACb,WAAW;AAAA,EACX,aAAa;AAAA,EACb,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,UAAU;AACZ,CAAC;AAOM,MAAM,yBAAyB,CAAC;AAAA,EACrC;AAAA,EACA;AACF,MAAmC;AACjC,SACG,oBAAA,sBAAsB,UAAtB,EAA+B,OAC7B,SACH,CAAA;AAEJ;AAEO,MAAM,yBAAyB,MAAM;AAC1C,SAAO,WAAW,qBAAqB;AACzC;"}
1
+ {"version":3,"file":"Context.js","sources":["../../../src/QueryBuilder/Context.tsx"],"sourcesContent":["import { createContext, useContext } from \"react\";\n\nimport {\n AskAction,\n HvQueryBuilderAttribute,\n QueryAction,\n HvQueryBuilderLabels,\n HvQueryBuilderQueryCombinator,\n HvQueryBuilderQueryOperator,\n HvQueryBuilderRenderers,\n} from \"./types\";\n\nexport const defaultOperators = {\n numeric: [\n {\n operator: \"greaterThan\",\n label: \"Greater than (>)\",\n combinators: [\"and\"],\n },\n {\n operator: \"lessThan\",\n label: \"Less than (<)\",\n combinators: [\"and\"],\n },\n {\n operator: \"equalsTo\",\n label: \"Equal to (=)\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"greaterThanEq\",\n label: \"Greater than or equal to (>=)\",\n combinators: [\"and\"],\n },\n {\n operator: \"lessThanEq\",\n label: \"Less than or equal to (<=)\",\n combinators: [\"and\"],\n },\n {\n operator: \"notEqual\",\n label: \"Not equal to (!=)\",\n combinators: [\"and\"],\n },\n {\n operator: \"range\",\n label: \"Range\",\n combinators: [\"and\"],\n },\n ],\n text: [\n {\n operator: \"equals\",\n label: \"Equals\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"equalsIgnoreCase\",\n label: \"Equals Ignore Case\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"Contains\",\n label: \"Contains\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"StartsWith\",\n label: \"A string begins with\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"EndsWith\",\n label: \"A string ends with\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"IsNotEmpty\",\n label: \"Is Not empty\",\n combinators: [\"and\"],\n },\n {\n operator: \"IsNot\",\n label: \"Is Not\",\n combinators: [\"and\"],\n },\n {\n operator: \"Empty\",\n label: \"Empty\",\n combinators: [\"and\"],\n },\n ],\n textarea: [\n {\n operator: \"equals\",\n label: \"Equals\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"equalsIgnoreCase\",\n label: \"Equals Ignore Case\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"Contains\",\n label: \"Contains\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"StartsWith\",\n label: \"A string begins with\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"EndsWith\",\n label: \"A string ends with\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"IsNotEmpty\",\n label: \"Is Not empty\",\n combinators: [\"and\"],\n },\n {\n operator: \"IsNot\",\n label: \"Is Not\",\n combinators: [\"and\"],\n },\n {\n operator: \"Empty\",\n label: \"Empty\",\n combinators: [\"and\"],\n },\n ],\n boolean: [\n {\n operator: \"equalsTo\",\n label: \"=\",\n combinators: [\"and\", \"or\"],\n },\n ],\n dateandtime: [\n {\n operator: \"greaterThan\",\n label: \"Greater than\",\n combinators: [\"and\"],\n },\n {\n operator: \"lessThan\",\n label: \"Less than\",\n combinators: [\"and\"],\n },\n {\n operator: \"equalsTo\",\n label: \"Equal to\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"greaterThanEq\",\n label: \"Greater than or equal to\",\n combinators: [\"and\"],\n },\n {\n operator: \"lessThanEq\",\n label: \"Less than or equal to\",\n combinators: [\"and\"],\n },\n {\n operator: \"notEqual\",\n label: \"Not equal to\",\n combinators: [\"and\"],\n },\n {\n operator: \"range\",\n label: \"Range\",\n combinators: [\"and\"],\n },\n ],\n};\n\nexport const defaultCombinators = [\n { operand: \"and\", label: \"AND\" },\n { operand: \"or\", label: \"OR\" },\n];\n\nexport const defaultLabels = {\n query: {\n delete: {\n ariaLabel: \"Reset query\",\n tooltip: \"Reset query\",\n dialogTitle: \"Remove all conditions?\",\n dialogMessage:\n \"Are you sure you want to remove all the conditions? They will be removed permanently.\",\n dialogConfirm: \"Yes\",\n dialogCancel: \"No\",\n dialogCloseTooltip: \"Close\",\n },\n },\n rule: {\n attribute: {\n label: \"Attribute\",\n placeholder: \"Select attribute...\",\n exists: \"Attribute already exists.\",\n },\n operator: {\n label: \"Operator\",\n placeholder: \"Select operator...\",\n },\n value: {\n distance: {\n label: \"Value\",\n connectorText: \"radius miles from\",\n button: \"Select location\",\n validation: {\n required: \"The value is required.\",\n invalid: \"Value must be a positive number.\",\n },\n },\n text: {\n label: \"Value\",\n placeholder: \"Enter value...\",\n validation: {\n required: \"The value is required.\",\n },\n },\n boolean: {\n label: \"Value\",\n placeholder: \"Enter value\",\n options: {\n true: \"True\",\n false: \"False\",\n },\n },\n numeric: {\n label: \"Value\",\n placeholder: \"Enter value\",\n validation: {\n required: \"The value is required.\",\n invalid: \"Value must be a number.\",\n equal: \"Cannot be equal.\",\n greaterThan: \"Needs to be greater.\",\n },\n range: {\n leftLabel: \"From\",\n rightLabel: \"To\",\n },\n },\n datetime: {\n dateLabel: \"Date\",\n datePlaceholder: \"Select Date\",\n timeLabel: \"Time\",\n timePlaceholder: \"Select Time\",\n startDateLabel: \"Start Date\",\n startDatePlaceholder: \"Select Start Date\",\n startTimeLabel: \"Start Time\",\n startTimePlaceholder: \"Select Start Time\",\n endDateLabel: \"End Date\",\n endDatePlaceholder: \"Select End Date\",\n endTimeLabel: \"End Time\",\n endTimePlaceholder: \"Select End Time\",\n validation: {\n required: \"The value is required.\",\n invalidInterval:\n \"End date and time must be after start date and time.\",\n },\n },\n },\n delete: {\n ariaLabel: \"Remove condition\",\n tooltip: \"Remove condition\",\n dialogTitle: \"Remove condition?\",\n dialogMessage:\n \"Are you sure you want to remove the condition? It will be removed permanently.\",\n dialogConfirm: \"Yes\",\n dialogCancel: \"No\",\n dialogCloseTooltip: \"Close\",\n },\n },\n group: {\n delete: {\n ariaLabel: \"Remove group\",\n tooltip: \"Remove group\",\n dialogTitle: \"Remove group?\",\n dialogMessage:\n \"Are you sure you want to remove the group? It will be removed permanently.\",\n dialogConfirm: \"Yes\",\n dialogCancel: \"No\",\n dialogCloseTooltip: \"Close\",\n },\n reset: {\n ariaLabel: \"Change operator\",\n tooltip: \"Change operator query\",\n dialogTitle: \"Change conditional operator?\",\n dialogMessage:\n \"Do you want to change conditional operator? You won't be able to undo this operation. Conditions and/or groups will be removed.\",\n dialogConfirm: \"Yes\",\n dialogCancel: \"No\",\n dialogCloseTooltip: \"Close\",\n },\n addRule: {\n label: \"Add condition\",\n },\n addGroup: {\n label: \"Add group\",\n },\n },\n empty: {\n title: \"No conditions created yet\",\n createCondition: \"Create a condition\",\n createGroup: \"condition group\",\n spacer: \" or a \",\n },\n};\n\nexport interface HvQueryBuilderContextValue {\n dispatchAction: React.Dispatch<QueryAction>;\n askAction: React.Dispatch<React.SetStateAction<AskAction | undefined>>;\n selectLocation?: React.Dispatch<unknown>; // TODO - remove in v6 (not used)\n attributes?: Record<string, HvQueryBuilderAttribute>;\n operators: Record<string, HvQueryBuilderQueryOperator[]>;\n combinators: HvQueryBuilderQueryCombinator[];\n maxDepth: number;\n labels: HvQueryBuilderLabels;\n initialTouched: boolean;\n readOnly: boolean;\n disableConfirmation: boolean;\n renderers?: HvQueryBuilderRenderers;\n emptyRenderer?: string[];\n}\n\nexport const HvQueryBuilderContext = createContext<HvQueryBuilderContextValue>({\n dispatchAction: () => ({}),\n askAction: () => ({}),\n selectLocation: () => ({}), // TODO - remove in v6 (not used)\n attributes: {},\n operators: defaultOperators,\n combinators: defaultCombinators,\n maxDepth: 1,\n labels: defaultLabels,\n initialTouched: false,\n disableConfirmation: false,\n readOnly: false,\n});\n\nexport interface HvQueryBuilderProviderProps {\n value: HvQueryBuilderContextValue;\n children: React.ReactNode;\n}\n\nexport const HvQueryBuilderProvider = ({\n children,\n value,\n}: HvQueryBuilderProviderProps) => {\n return (\n <HvQueryBuilderContext.Provider value={value}>\n {children}\n </HvQueryBuilderContext.Provider>\n );\n};\n\nexport const useQueryBuilderContext = () => {\n return useContext(HvQueryBuilderContext);\n};\n"],"names":[],"mappings":";;AAYO,MAAM,mBAAmB;AAAA,EAC9B,SAAS;AAAA,IACP;AAAA,MACE,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAa,CAAC,KAAK;AAAA,IACrB;AAAA,IACA;AAAA,MACE,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAa,CAAC,KAAK;AAAA,IACrB;AAAA,IACA;AAAA,MACE,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAa,CAAC,OAAO,IAAI;AAAA,IAC3B;AAAA,IACA;AAAA,MACE,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAa,CAAC,KAAK;AAAA,IACrB;AAAA,IACA;AAAA,MACE,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAa,CAAC,KAAK;AAAA,IACrB;AAAA,IACA;AAAA,MACE,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAa,CAAC,KA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