@zendeskgarden/react-colorpickers 9.12.3 → 9.12.4

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 (32) hide show
  1. package/dist/esm/elements/ColorPicker/ColorWell.js +6 -7
  2. package/dist/esm/elements/ColorPicker/index.js +9 -10
  3. package/dist/esm/elements/ColorPicker/reducer.js +1 -1
  4. package/dist/esm/elements/ColorPickerDialog/index.js +28 -27
  5. package/dist/esm/elements/ColorSwatch/index.js +11 -12
  6. package/dist/esm/elements/ColorSwatchDialog/index.js +29 -28
  7. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-down-stroke.svg.js +4 -4
  8. package/dist/esm/styled/ColorPicker/StyledAlphaRange.js +5 -5
  9. package/dist/esm/styled/ColorPicker/StyledColorPicker.js +3 -3
  10. package/dist/esm/styled/ColorPicker/StyledColorWell.js +5 -5
  11. package/dist/esm/styled/ColorPicker/StyledColorWellThumb.js +10 -12
  12. package/dist/esm/styled/ColorPicker/StyledHexField.js +3 -3
  13. package/dist/esm/styled/ColorPicker/StyledHueRange.js +3 -3
  14. package/dist/esm/styled/ColorPicker/StyledInput.js +3 -3
  15. package/dist/esm/styled/ColorPicker/StyledInputGroup.js +3 -3
  16. package/dist/esm/styled/ColorPicker/StyledLabel.js +3 -3
  17. package/dist/esm/styled/ColorPicker/StyledPreview.js +5 -5
  18. package/dist/esm/styled/ColorPicker/StyledRGBAField.js +5 -5
  19. package/dist/esm/styled/ColorPicker/StyledSliderGroup.js +3 -3
  20. package/dist/esm/styled/ColorPicker/StyledSliders.js +3 -3
  21. package/dist/esm/styled/ColorPickerDialog/StyledButton.js +1 -1
  22. package/dist/esm/styled/ColorPickerDialog/StyledButtonPreview.js +7 -8
  23. package/dist/esm/styled/ColorPickerDialog/StyledTooltipBody.js +3 -3
  24. package/dist/esm/styled/ColorPickerDialog/StyledTooltipDialog.js +3 -3
  25. package/dist/esm/styled/ColorSwatch/StyledCell.js +1 -1
  26. package/dist/esm/styled/ColorSwatch/StyledColorSwatch.js +3 -3
  27. package/dist/esm/styled/ColorSwatch/StyledColorSwatchInput.js +3 -3
  28. package/dist/esm/styled/ColorSwatch/StyledColorSwatchLabel.js +7 -8
  29. package/dist/esm/styled/ColorSwatch/StyledIcon.js +3 -3
  30. package/dist/esm/styled/common/StyledRange.js +12 -16
  31. package/dist/index.cjs.js +126 -135
  32. package/package.json +8 -8
@@ -7,10 +7,10 @@
7
7
  import styled from 'styled-components';
8
8
  import { componentStyles } from '@zendeskgarden/react-theming';
9
9
 
10
- const COMPONENT_ID = 'colorpickers.color_swatch_input';
10
+ const COMPONENT_ID$3 = 'colorpickers.color_swatch_input';
11
11
  const StyledColorSwatchInput = styled.input.attrs({
12
- 'data-garden-id': COMPONENT_ID,
13
- 'data-garden-version': '9.12.3'
12
+ 'data-garden-id': COMPONENT_ID$3,
13
+ 'data-garden-version': '9.12.4'
14
14
  }).withConfig({
15
15
  displayName: "StyledColorSwatchInput",
16
16
  componentId: "sc-em45h0-0"
@@ -9,12 +9,11 @@ import { parseToRgb, readableColor } from 'polished';
9
9
  import { focusStyles, componentStyles, getColor } from '@zendeskgarden/react-theming';
10
10
  import { StyledButtonPreview } from '../ColorPickerDialog/StyledButtonPreview.js';
11
11
 
12
- const COMPONENT_ID = 'colorpickers.color_swatch_label';
13
- const colorStyles = _ref => {
14
- let {
15
- $backgroundColor,
16
- theme
17
- } = _ref;
12
+ const COMPONENT_ID$2 = 'colorpickers.color_swatch_label';
13
+ const colorStyles = ({
14
+ $backgroundColor,
15
+ theme
16
+ }) => {
18
17
  const {
19
18
  alpha
20
19
  } = parseToRgb($backgroundColor);
@@ -37,8 +36,8 @@ const colorStyles = _ref => {
37
36
  };
38
37
  const StyledColorSwatchLabel = styled(StyledButtonPreview).attrs({
39
38
  as: 'label',
40
- 'data-garden-id': COMPONENT_ID,
41
- 'data-garden-version': '9.12.3'
39
+ 'data-garden-id': COMPONENT_ID$2,
40
+ 'data-garden-version': '9.12.4'
42
41
  }).withConfig({
43
42
  displayName: "StyledColorSwatchLabel",
44
43
  componentId: "sc-1aghocg-0"
@@ -8,10 +8,10 @@ import styled from 'styled-components';
8
8
  import { StyledBaseIcon, componentStyles } from '@zendeskgarden/react-theming';
9
9
  import { StyledColorSwatchInput } from './StyledColorSwatchInput.js';
10
10
 
11
- const COMPONENT_ID = 'colorpickers.colorswatch_check';
11
+ const COMPONENT_ID$1 = 'colorpickers.colorswatch_check';
12
12
  const StyledIcon = styled(StyledBaseIcon).attrs({
13
- 'data-garden-id': COMPONENT_ID,
14
- 'data-garden-version': '9.12.3'
13
+ 'data-garden-id': COMPONENT_ID$1,
14
+ 'data-garden-version': '9.12.4'
15
15
  }).withConfig({
16
16
  displayName: "StyledIcon",
17
17
  componentId: "sc-8oigif-0"
@@ -9,9 +9,8 @@ import styled from 'styled-components';
9
9
  import { stripUnit } from 'polished';
10
10
  import { componentStyles, getColor } from '@zendeskgarden/react-theming';
11
11
 
12
- const COMPONENT_ID = 'colorpickers.colorpicker_range';
13
- const thumbStyles = function (styles) {
14
- let modifier = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
12
+ const COMPONENT_ID$k = 'colorpickers.colorpicker_range';
13
+ const thumbStyles = (styles, modifier = '') => {
15
14
  return `
16
15
  &${modifier}::-moz-range-thumb {
17
16
  ${styles}
@@ -26,8 +25,7 @@ const thumbStyles = function (styles) {
26
25
  }
27
26
  `;
28
27
  };
29
- const trackStyles = function (styles) {
30
- let modifier = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
28
+ const trackStyles = (styles, modifier = '') => {
31
29
  return `
32
30
  &${modifier}::-moz-range-track {
33
31
  ${styles}
@@ -42,8 +40,7 @@ const trackStyles = function (styles) {
42
40
  }
43
41
  `;
44
42
  };
45
- const trackLowerStyles = function (styles) {
46
- let modifier = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
43
+ const trackLowerStyles = (styles, modifier = '') => {
47
44
  return `
48
45
  &${modifier}::-moz-range-progress {
49
46
  ${styles}
@@ -54,10 +51,9 @@ const trackLowerStyles = function (styles) {
54
51
  }
55
52
  `;
56
53
  };
57
- const colorStyles = _ref => {
58
- let {
59
- theme
60
- } = _ref;
54
+ const colorStyles$2 = ({
55
+ theme
56
+ }) => {
61
57
  const thumbBackgroundColor = getColor({
62
58
  theme,
63
59
  variable: 'background.default'
@@ -116,7 +112,7 @@ const colorStyles = _ref => {
116
112
  const getThumbSize = props => props.theme.space.base * (props.$isOpaque ? 6 : 4);
117
113
  const getTrackHeight = props => props.theme.space.base * (props.$isOpaque ? 6 : 3);
118
114
  const getTrackMargin = props => (getThumbSize(props) - getTrackHeight(props)) / 2 + stripUnit(props.theme.shadowWidths.md);
119
- const sizeStyles = props => {
115
+ const sizeStyles$3 = props => {
120
116
  const thumbSize = getThumbSize(props);
121
117
  const trackHeight = getTrackHeight(props);
122
118
  const trackMargin = getTrackMargin(props);
@@ -144,14 +140,14 @@ const sizeStyles = props => {
144
140
  `;
145
141
  };
146
142
  const StyledRange = styled(Range).attrs({
147
- 'data-garden-id': COMPONENT_ID,
148
- 'data-garden-version': '9.12.3',
143
+ 'data-garden-id': COMPONENT_ID$k,
144
+ 'data-garden-version': '9.12.4',
149
145
  hasLowerTrack: false
150
146
  }).withConfig({
151
147
  displayName: "StyledRange",
152
148
  componentId: "sc-ug3wi9-0"
153
- })(["", ";", " ", ";", ";"], sizeStyles, trackStyles(`
149
+ })(["", ";", " ", ";", ";"], sizeStyles$3, trackStyles(`
154
150
  border-radius: 0;
155
- `), colorStyles, componentStyles);
151
+ `), colorStyles$2, componentStyles);
156
152
 
157
153
  export { StyledRange, getTrackHeight, getTrackMargin, trackStyles };
package/dist/index.cjs.js CHANGED
@@ -137,15 +137,14 @@ const getColorPickerWidth = props => {
137
137
  };
138
138
  const StyledColorPicker = styled__default.default.div.attrs({
139
139
  'data-garden-id': COMPONENT_ID$l,
140
- 'data-garden-version': '9.12.3'
140
+ 'data-garden-version': '9.12.4'
141
141
  }).withConfig({
142
142
  displayName: "StyledColorPicker",
143
143
  componentId: "sc-gspq4q-0"
144
144
  })(["width:", "px;min-width:", "px;", ";"], getColorPickerWidth, getColorPickerWidth, reactTheming.componentStyles);
145
145
 
146
146
  const COMPONENT_ID$k = 'colorpickers.colorpicker_range';
147
- const thumbStyles = function (styles) {
148
- let modifier = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
147
+ const thumbStyles = (styles, modifier = '') => {
149
148
  return `
150
149
  &${modifier}::-moz-range-thumb {
151
150
  ${styles}
@@ -160,8 +159,7 @@ const thumbStyles = function (styles) {
160
159
  }
161
160
  `;
162
161
  };
163
- const trackStyles = function (styles) {
164
- let modifier = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
162
+ const trackStyles = (styles, modifier = '') => {
165
163
  return `
166
164
  &${modifier}::-moz-range-track {
167
165
  ${styles}
@@ -176,8 +174,7 @@ const trackStyles = function (styles) {
176
174
  }
177
175
  `;
178
176
  };
179
- const trackLowerStyles = function (styles) {
180
- let modifier = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
177
+ const trackLowerStyles = (styles, modifier = '') => {
181
178
  return `
182
179
  &${modifier}::-moz-range-progress {
183
180
  ${styles}
@@ -188,10 +185,9 @@ const trackLowerStyles = function (styles) {
188
185
  }
189
186
  `;
190
187
  };
191
- const colorStyles$2 = _ref => {
192
- let {
193
- theme
194
- } = _ref;
188
+ const colorStyles$2 = ({
189
+ theme
190
+ }) => {
195
191
  const thumbBackgroundColor = reactTheming.getColor({
196
192
  theme,
197
193
  variable: 'background.default'
@@ -279,7 +275,7 @@ const sizeStyles$3 = props => {
279
275
  };
280
276
  const StyledRange = styled__default.default(reactForms.Range).attrs({
281
277
  'data-garden-id': COMPONENT_ID$k,
282
- 'data-garden-version': '9.12.3',
278
+ 'data-garden-version': '9.12.4',
283
279
  hasLowerTrack: false
284
280
  }).withConfig({
285
281
  displayName: "StyledRange",
@@ -291,7 +287,7 @@ const StyledRange = styled__default.default(reactForms.Range).attrs({
291
287
  const COMPONENT_ID$j = 'colorpickers.colorpicker_hue';
292
288
  const StyledHueRange = styled__default.default(StyledRange).attrs({
293
289
  'data-garden-id': COMPONENT_ID$j,
294
- 'data-garden-version': '9.12.3'
290
+ 'data-garden-version': '9.12.4'
295
291
  }).withConfig({
296
292
  displayName: "StyledHueRange",
297
293
  componentId: "sc-1gdhww1-0"
@@ -319,7 +315,7 @@ const StyledAlphaRange = styled__default.default(StyledRange).attrs(props => ({
319
315
  background: background$3(props)
320
316
  },
321
317
  'data-garden-id': COMPONENT_ID$i,
322
- 'data-garden-version': '9.12.3'
318
+ 'data-garden-version': '9.12.4'
323
319
  })).withConfig({
324
320
  displayName: "StyledAlphaRange",
325
321
  componentId: "sc-1f6hp2j-0"
@@ -343,7 +339,7 @@ const StyledPreview = styled__default.default.div.attrs(props => ({
343
339
  background: background$2(props)
344
340
  },
345
341
  'data-garden-id': COMPONENT_ID$h,
346
- 'data-garden-version': '9.12.3',
342
+ 'data-garden-version': '9.12.4',
347
343
  'data-test-id': 'preview-box'
348
344
  })).withConfig({
349
345
  displayName: "StyledPreview",
@@ -362,7 +358,7 @@ const background$1 = props => {
362
358
  };
363
359
  const StyledColorWell = styled__default.default.div.attrs(props => ({
364
360
  'data-garden-id': COMPONENT_ID$g,
365
- 'data-garden-version': '9.12.3',
361
+ 'data-garden-version': '9.12.4',
366
362
  'data-test-id': 'colorwell',
367
363
  style: {
368
364
  background: background$1(props)
@@ -373,10 +369,9 @@ const StyledColorWell = styled__default.default.div.attrs(props => ({
373
369
  })(["position:relative;margin-bottom:", "px;cursor:pointer;height:208px;overflow:hidden;", ";"], props => props.theme.space.base * 2, reactTheming.componentStyles);
374
370
 
375
371
  const COMPONENT_ID$f = 'colorpickers.colorpicker_colorwell_thumb';
376
- const colorStyles$1 = _ref => {
377
- let {
378
- theme
379
- } = _ref;
372
+ const colorStyles$1 = ({
373
+ theme
374
+ }) => {
380
375
  const borderColor = reactTheming.getColor({
381
376
  theme,
382
377
  hue: 'white'
@@ -387,10 +382,9 @@ const colorStyles$1 = _ref => {
387
382
  }))}`;
388
383
  return styled.css(["border-color:", ";box-shadow:", ";"], borderColor, boxShadow);
389
384
  };
390
- const sizeStyles$2 = _ref2 => {
391
- let {
392
- theme
393
- } = _ref2;
385
+ const sizeStyles$2 = ({
386
+ theme
387
+ }) => {
394
388
  const borderWidth = polished.stripUnit(theme.borderWidths.sm) * 2;
395
389
  const size = theme.space.base * 5;
396
390
  const translateValue = size / -2;
@@ -398,7 +392,7 @@ const sizeStyles$2 = _ref2 => {
398
392
  };
399
393
  const StyledColorWellThumb = styled__default.default.div.attrs(props => ({
400
394
  'data-garden-id': COMPONENT_ID$f,
401
- 'data-garden-version': '9.12.3',
395
+ 'data-garden-version': '9.12.4',
402
396
  'data-test-id': 'colorwell-thumb',
403
397
  style: {
404
398
  top: `${props.$top}%`,
@@ -412,7 +406,7 @@ const StyledColorWellThumb = styled__default.default.div.attrs(props => ({
412
406
  const COMPONENT_ID$e = 'colorpickers.colorpicker_slider_group';
413
407
  const StyledSliderGroup = styled__default.default.div.attrs({
414
408
  'data-garden-id': COMPONENT_ID$e,
415
- 'data-garden-version': '9.12.3'
409
+ 'data-garden-version': '9.12.4'
416
410
  }).withConfig({
417
411
  displayName: "StyledSliderGroup",
418
412
  componentId: "sc-tigkzg-0"
@@ -421,7 +415,7 @@ const StyledSliderGroup = styled__default.default.div.attrs({
421
415
  const COMPONENT_ID$d = 'colorpickers.colorpicker_hex_field';
422
416
  const StyledHexField = styled__default.default(reactForms.Field).attrs({
423
417
  'data-garden-id': COMPONENT_ID$d,
424
- 'data-garden-version': '9.12.3',
418
+ 'data-garden-version': '9.12.4',
425
419
  spellCheck: false
426
420
  }).withConfig({
427
421
  displayName: "StyledHexField",
@@ -431,7 +425,7 @@ const StyledHexField = styled__default.default(reactForms.Field).attrs({
431
425
  const COMPONENT_ID$c = 'colorpickers.colorpicker_label';
432
426
  const StyledLabel = styled__default.default(reactForms.Label).attrs({
433
427
  'data-garden-id': COMPONENT_ID$c,
434
- 'data-garden-version': '9.12.3'
428
+ 'data-garden-version': '9.12.4'
435
429
  }).withConfig({
436
430
  displayName: "StyledLabel",
437
431
  componentId: "sc-1vxt3m9-0"
@@ -440,7 +434,7 @@ const StyledLabel = styled__default.default(reactForms.Label).attrs({
440
434
  const COMPONENT_ID$b = 'colorpickers.colorpicker_input';
441
435
  const StyledInput = styled__default.default(reactForms.Input).attrs({
442
436
  'data-garden-id': COMPONENT_ID$b,
443
- 'data-garden-version': '9.12.3',
437
+ 'data-garden-version': '9.12.4',
444
438
  focusInset: false
445
439
  }).withConfig({
446
440
  displayName: "StyledInput",
@@ -450,7 +444,7 @@ const StyledInput = styled__default.default(reactForms.Input).attrs({
450
444
  const COMPONENT_ID$a = 'colorpickers.colorpicker_input_group';
451
445
  const StyledInputGroup = styled__default.default.div.attrs({
452
446
  'data-garden-id': COMPONENT_ID$a,
453
- 'data-garden-version': '9.12.3'
447
+ 'data-garden-version': '9.12.4'
454
448
  }).withConfig({
455
449
  displayName: "StyledInputGroup",
456
450
  componentId: "sc-1m9g2wg-0"
@@ -468,7 +462,7 @@ const sizeStyles$1 = theme => {
468
462
  };
469
463
  const StyledRGBAField = styled__default.default(reactForms.Field).attrs({
470
464
  'data-garden-id': COMPONENT_ID$9,
471
- 'data-garden-version': '9.12.3'
465
+ 'data-garden-version': '9.12.4'
472
466
  }).withConfig({
473
467
  displayName: "StyledRGBAField",
474
468
  componentId: "sc-13266k8-0"
@@ -499,7 +493,7 @@ const sizeStyles = props => {
499
493
  };
500
494
  const StyledSliders = styled__default.default.div.attrs({
501
495
  'data-garden-id': COMPONENT_ID$8,
502
- 'data-garden-version': '9.12.3'
496
+ 'data-garden-version': '9.12.4'
503
497
  }).withConfig({
504
498
  displayName: "StyledSliders",
505
499
  componentId: "sc-1lgr50m-0"
@@ -507,18 +501,17 @@ const StyledSliders = styled__default.default.div.attrs({
507
501
 
508
502
  const StyledButton = styled__default.default(reactButtons.Button).attrs({
509
503
  isNeutral: true,
510
- 'data-garden-version': '9.12.3'
504
+ 'data-garden-version': '9.12.4'
511
505
  }).withConfig({
512
506
  displayName: "StyledButton",
513
507
  componentId: "sc-1dlijfv-0"
514
508
  })(["padding:0;width:", "px;max-width:", "px;&:last-of-type:not(:first-child){border-top-", "-radius:", " !important;border-bottom-", "-radius:", " !important;}"], props => props.theme.space.base * 17, props => props.theme.space.base * 17, props => props.theme.rtl ? 'left' : 'right', props => props.theme.borderRadii.md, props => props.theme.rtl ? 'left' : 'right', props => props.theme.borderRadii.md);
515
509
 
516
510
  const COMPONENT_ID$7 = 'colorpickers.colordialog_preview';
517
- const background = _ref => {
518
- let {
519
- $backgroundColor,
520
- theme
521
- } = _ref;
511
+ const background = ({
512
+ $backgroundColor,
513
+ theme
514
+ }) => {
522
515
  let retVal;
523
516
  if (typeof $backgroundColor === 'string') {
524
517
  retVal = $backgroundColor;
@@ -544,7 +537,7 @@ const StyledButtonPreview = styled__default.default.span.attrs(props => ({
544
537
  })
545
538
  },
546
539
  'data-garden-id': COMPONENT_ID$7,
547
- 'data-garden-version': '9.12.3',
540
+ 'data-garden-version': '9.12.4',
548
541
  'data-test-id': 'dialog-preview'
549
542
  })).withConfig({
550
543
  displayName: "StyledButtonPreview",
@@ -554,7 +547,7 @@ const StyledButtonPreview = styled__default.default.span.attrs(props => ({
554
547
  const COMPONENT_ID$6 = 'colorpickers.colordialog_tooltipdialog';
555
548
  const StyledTooltipDialog = styled__default.default(reactModals.TooltipDialog).attrs({
556
549
  'data-garden-id': COMPONENT_ID$6,
557
- 'data-garden-version': '9.12.3'
550
+ 'data-garden-version': '9.12.4'
558
551
  }).withConfig({
559
552
  displayName: "StyledTooltipDialog",
560
553
  componentId: "sc-1vbkccl-0"
@@ -563,7 +556,7 @@ const StyledTooltipDialog = styled__default.default(reactModals.TooltipDialog).a
563
556
  const COMPONENT_ID$5 = 'colorpickers.colordialog_tooltipdialog_body';
564
557
  const StyledTooltipBody = styled__default.default(reactModals.TooltipDialog.Body).attrs({
565
558
  'data-garden-id': COMPONENT_ID$5,
566
- 'data-garden-version': '9.12.3'
559
+ 'data-garden-version': '9.12.4'
567
560
  }).withConfig({
568
561
  displayName: "StyledTooltipBody",
569
562
  componentId: "sc-1ueddpo-0"
@@ -572,7 +565,7 @@ const StyledTooltipBody = styled__default.default(reactModals.TooltipDialog.Body
572
565
  const COMPONENT_ID$4 = 'colorpickers.color_swatch';
573
566
  const StyledColorSwatch = styled__default.default.table.attrs({
574
567
  'data-garden-id': COMPONENT_ID$4,
575
- 'data-garden-version': '9.12.3'
568
+ 'data-garden-version': '9.12.4'
576
569
  }).withConfig({
577
570
  displayName: "StyledColorSwatch",
578
571
  componentId: "sc-ajx440-0"
@@ -581,18 +574,17 @@ const StyledColorSwatch = styled__default.default.table.attrs({
581
574
  const COMPONENT_ID$3 = 'colorpickers.color_swatch_input';
582
575
  const StyledColorSwatchInput = styled__default.default.input.attrs({
583
576
  'data-garden-id': COMPONENT_ID$3,
584
- 'data-garden-version': '9.12.3'
577
+ 'data-garden-version': '9.12.4'
585
578
  }).withConfig({
586
579
  displayName: "StyledColorSwatchInput",
587
580
  componentId: "sc-em45h0-0"
588
581
  })(["position:absolute;opacity:0;z-index:1;margin:0;cursor:pointer;width:100%;height:100%;", ";"], reactTheming.componentStyles);
589
582
 
590
583
  const COMPONENT_ID$2 = 'colorpickers.color_swatch_label';
591
- const colorStyles = _ref => {
592
- let {
593
- $backgroundColor,
594
- theme
595
- } = _ref;
584
+ const colorStyles = ({
585
+ $backgroundColor,
586
+ theme
587
+ }) => {
596
588
  const {
597
589
  alpha
598
590
  } = polished.parseToRgb($backgroundColor);
@@ -616,7 +608,7 @@ const colorStyles = _ref => {
616
608
  const StyledColorSwatchLabel = styled__default.default(StyledButtonPreview).attrs({
617
609
  as: 'label',
618
610
  'data-garden-id': COMPONENT_ID$2,
619
- 'data-garden-version': '9.12.3'
611
+ 'data-garden-version': '9.12.4'
620
612
  }).withConfig({
621
613
  displayName: "StyledColorSwatchLabel",
622
614
  componentId: "sc-1aghocg-0"
@@ -628,7 +620,7 @@ const StyledColorSwatchLabel = styled__default.default(StyledButtonPreview).attr
628
620
  const COMPONENT_ID$1 = 'colorpickers.colorswatch_check';
629
621
  const StyledIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
630
622
  'data-garden-id': COMPONENT_ID$1,
631
- 'data-garden-version': '9.12.3'
623
+ 'data-garden-version': '9.12.4'
632
624
  }).withConfig({
633
625
  displayName: "StyledIcon",
634
626
  componentId: "sc-8oigif-0"
@@ -637,19 +629,18 @@ const StyledIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
637
629
  const COMPONENT_ID = 'colorpickers.swatch_cell';
638
630
  const StyledCell = styled__default.default.td.attrs({
639
631
  'data-garden-id': COMPONENT_ID,
640
- 'data-garden-version': '9.12.3'
632
+ 'data-garden-version': '9.12.4'
641
633
  }).withConfig({
642
634
  displayName: "StyledCell",
643
635
  componentId: "sc-qr3oit-0"
644
636
  })(["padding:", "px;font-size:0;", ";"], props => props.theme.space.base, reactTheming.componentStyles);
645
637
 
646
- const ColorWell = React__namespace.default.memo(_ref => {
647
- let {
648
- hue,
649
- saturation,
650
- lightness,
651
- onChange
652
- } = _ref;
638
+ const ColorWell = React__namespace.default.memo(({
639
+ hue,
640
+ saturation,
641
+ lightness,
642
+ onChange
643
+ }) => {
653
644
  const {
654
645
  rtl
655
646
  } = React.useContext(styled.ThemeContext);
@@ -986,16 +977,15 @@ const reducer = (state, action) => {
986
977
  }
987
978
  };
988
979
 
989
- const ColorPicker = React.forwardRef((_ref, ref) => {
990
- let {
991
- color,
992
- defaultColor = '#fff',
993
- isOpaque,
994
- labels = {},
995
- autofocus,
996
- onChange,
997
- ...props
998
- } = _ref;
980
+ const ColorPicker = React.forwardRef(({
981
+ color,
982
+ defaultColor = '#fff',
983
+ isOpaque,
984
+ labels = {},
985
+ autofocus,
986
+ onChange,
987
+ ...props
988
+ }, ref) => {
999
989
  const [state, dispatch] = React.useReducer(reducer, getInitialState(color || defaultColor));
1000
990
  const previousComputedColorRef = React.useRef(state.color);
1001
991
  const previousStateColorRef = React.useRef(state.color);
@@ -1201,27 +1191,26 @@ var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
1201
1191
  })));
1202
1192
  };
1203
1193
 
1204
- const ColorPickerDialog = React.forwardRef((_ref, ref) => {
1205
- let {
1206
- color,
1207
- defaultColor,
1208
- placement = 'bottom-start',
1209
- onChange,
1210
- onClose,
1211
- labels,
1212
- hasArrow = false,
1213
- isAnimated = true,
1214
- isOpaque,
1215
- isOpen,
1216
- zIndex = 1000,
1217
- focusInset,
1218
- disabled,
1219
- buttonProps,
1220
- onDialogChange,
1221
- 'aria-label': ariaLabel,
1222
- children,
1223
- ...props
1224
- } = _ref;
1194
+ const ColorPickerDialog = React.forwardRef(({
1195
+ color,
1196
+ defaultColor,
1197
+ placement = 'bottom-start',
1198
+ onChange,
1199
+ onClose,
1200
+ labels,
1201
+ hasArrow = false,
1202
+ isAnimated = true,
1203
+ isOpaque,
1204
+ isOpen,
1205
+ zIndex = 1000,
1206
+ focusInset,
1207
+ disabled,
1208
+ buttonProps,
1209
+ onDialogChange,
1210
+ 'aria-label': ariaLabel,
1211
+ children,
1212
+ ...props
1213
+ }, ref) => {
1225
1214
  const isControlled = color !== null && color !== undefined;
1226
1215
  const isDialogControlled = isOpen !== undefined && isOpen !== null;
1227
1216
  const buttonRef = React.useRef(null);
@@ -1234,15 +1223,17 @@ const ColorPickerDialog = React.forwardRef((_ref, ref) => {
1234
1223
  const theme = styled.useTheme() || reactTheming.DEFAULT_THEME;
1235
1224
  const openDialog = () => {
1236
1225
  setReferenceElement(buttonRef.current);
1237
- onDialogChange && onDialogChange({
1226
+ onDialogChange?.({
1238
1227
  isOpen: true
1239
1228
  });
1240
1229
  };
1241
1230
  const closeDialog = () => {
1242
- setReferenceElement(null);
1243
- onDialogChange && onDialogChange({
1244
- isOpen: false
1245
- });
1231
+ if (referenceElement) {
1232
+ setReferenceElement(null);
1233
+ onDialogChange?.({
1234
+ isOpen: false
1235
+ });
1236
+ }
1246
1237
  };
1247
1238
  const onClick = containerUtilities.composeEventHandlers(props.onClick, () => {
1248
1239
  if (referenceElement) {
@@ -1283,7 +1274,7 @@ const ColorPickerDialog = React.forwardRef((_ref, ref) => {
1283
1274
  referenceElement: referenceElement,
1284
1275
  onClose: () => {
1285
1276
  closeDialog();
1286
- onClose && onClose(isControlled ? color : uncontrolledColor);
1277
+ onClose?.(isControlled ? color : uncontrolledColor);
1287
1278
  },
1288
1279
  "aria-label": ariaLabelText
1289
1280
  }, props), React__namespace.default.createElement(StyledTooltipBody, null, React__namespace.default.createElement(ColorPicker, {
@@ -1332,18 +1323,17 @@ var SvgCheckSmFill = function SvgCheckSmFill(props) {
1332
1323
  })));
1333
1324
  };
1334
1325
 
1335
- const ColorSwatch = React.forwardRef((_ref, ref) => {
1336
- let {
1337
- name,
1338
- colors,
1339
- isCheckboxGroup,
1340
- defaultSelectedColIndex,
1341
- defaultSelectedRowIndex,
1342
- selectedColIndex,
1343
- selectedRowIndex,
1344
- onSelect,
1345
- ...props
1346
- } = _ref;
1326
+ const ColorSwatch = React.forwardRef(({
1327
+ name,
1328
+ colors,
1329
+ isCheckboxGroup,
1330
+ defaultSelectedColIndex,
1331
+ defaultSelectedRowIndex,
1332
+ selectedColIndex,
1333
+ selectedRowIndex,
1334
+ onSelect,
1335
+ ...props
1336
+ }, ref) => {
1347
1337
  const theme = React.useContext(styled.ThemeContext) || reactTheming.DEFAULT_THEME;
1348
1338
  const environment = reactTheming.useDocument(theme);
1349
1339
  const gridRef = React.useRef();
@@ -1444,29 +1434,28 @@ ColorSwatch.propTypes = {
1444
1434
  onSelect: PropTypes__default.default.func
1445
1435
  };
1446
1436
 
1447
- const ColorSwatchDialog = React.forwardRef((_ref, ref) => {
1448
- let {
1449
- name,
1450
- colors,
1451
- isCheckboxGroup,
1452
- selectedRowIndex,
1453
- selectedColIndex,
1454
- defaultSelectedRowIndex,
1455
- defaultSelectedColIndex,
1456
- placement = 'bottom-start',
1457
- onSelect,
1458
- hasArrow = false,
1459
- isAnimated = true,
1460
- zIndex = 1000,
1461
- isOpen,
1462
- focusInset,
1463
- disabled,
1464
- buttonProps,
1465
- onDialogChange,
1466
- children,
1467
- 'aria-label': ariaLabel,
1468
- ...props
1469
- } = _ref;
1437
+ const ColorSwatchDialog = React.forwardRef(({
1438
+ name,
1439
+ colors,
1440
+ isCheckboxGroup,
1441
+ selectedRowIndex,
1442
+ selectedColIndex,
1443
+ defaultSelectedRowIndex,
1444
+ defaultSelectedColIndex,
1445
+ placement = 'bottom-start',
1446
+ onSelect,
1447
+ hasArrow = false,
1448
+ isAnimated = true,
1449
+ zIndex = 1000,
1450
+ isOpen,
1451
+ focusInset,
1452
+ disabled,
1453
+ buttonProps,
1454
+ onDialogChange,
1455
+ children,
1456
+ 'aria-label': ariaLabel,
1457
+ ...props
1458
+ }, ref) => {
1470
1459
  const isControlled = selectedRowIndex !== undefined && selectedColIndex !== undefined;
1471
1460
  const isDialogControlled = isOpen !== undefined && isOpen !== null;
1472
1461
  const buttonRef = React.useRef(null);
@@ -1497,15 +1486,17 @@ const ColorSwatchDialog = React.forwardRef((_ref, ref) => {
1497
1486
  }, [isOpen, isDialogControlled]);
1498
1487
  const openDialog = () => {
1499
1488
  setReferenceElement(buttonRef.current);
1500
- onDialogChange && onDialogChange({
1489
+ onDialogChange?.({
1501
1490
  isOpen: true
1502
1491
  });
1503
1492
  };
1504
1493
  const closeDialog = () => {
1505
- setReferenceElement(null);
1506
- onDialogChange && onDialogChange({
1507
- isOpen: false
1508
- });
1494
+ if (referenceElement) {
1495
+ setReferenceElement(null);
1496
+ onDialogChange?.({
1497
+ isOpen: false
1498
+ });
1499
+ }
1509
1500
  };
1510
1501
  const onClick = containerUtilities.composeEventHandlers(props.onClick, () => {
1511
1502
  if (referenceElement) {