@zendeskgarden/react-colorpickers 9.0.0-next.8 → 9.0.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 (49) hide show
  1. package/dist/esm/elements/ColorPicker/ColorWell.js +10 -12
  2. package/dist/esm/elements/ColorPicker/index.js +12 -12
  3. package/dist/esm/elements/ColorPickerDialog/index.js +7 -5
  4. package/dist/esm/elements/ColorSwatch/index.js +64 -61
  5. package/dist/esm/elements/ColorSwatchDialog/index.js +7 -4
  6. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/check-sm-fill.svg.js +1 -1
  7. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-down-stroke.svg.js +1 -1
  8. package/dist/esm/styled/ColorPicker/StyledAlphaRange.js +12 -10
  9. package/dist/esm/styled/ColorPicker/StyledColorPicker.js +3 -6
  10. package/dist/esm/styled/ColorPicker/StyledColorWell.js +3 -6
  11. package/dist/esm/styled/ColorPicker/StyledColorWellThumb.js +23 -15
  12. package/dist/esm/styled/ColorPicker/StyledHexField.js +2 -5
  13. package/dist/esm/styled/ColorPicker/StyledHueRange.js +2 -6
  14. package/dist/esm/styled/ColorPicker/StyledInput.js +2 -5
  15. package/dist/esm/styled/ColorPicker/StyledInputGroup.js +2 -5
  16. package/dist/esm/styled/ColorPicker/StyledLabel.js +2 -5
  17. package/dist/esm/styled/ColorPicker/StyledPreview.js +11 -12
  18. package/dist/esm/styled/ColorPicker/StyledRGBAField.js +2 -5
  19. package/dist/esm/styled/ColorPicker/StyledSliderGroup.js +2 -5
  20. package/dist/esm/styled/ColorPicker/StyledSliders.js +26 -7
  21. package/dist/esm/styled/ColorPickerDialog/StyledButton.js +2 -8
  22. package/dist/esm/styled/ColorPickerDialog/StyledButtonPreview.js +20 -19
  23. package/dist/esm/styled/ColorPickerDialog/StyledTooltipBody.js +5 -8
  24. package/dist/esm/styled/ColorPickerDialog/StyledTooltipDialog.js +20 -0
  25. package/dist/esm/styled/ColorSwatch/StyledCell.js +2 -5
  26. package/dist/esm/styled/ColorSwatch/StyledColorSwatch.js +2 -5
  27. package/dist/esm/styled/ColorSwatch/StyledColorSwatchInput.js +2 -5
  28. package/dist/esm/styled/ColorSwatch/StyledColorSwatchLabel.js +19 -9
  29. package/dist/esm/styled/ColorSwatch/StyledIcon.js +2 -5
  30. package/dist/esm/styled/common/StyledRange.js +38 -32
  31. package/dist/index.cjs.js +298 -315
  32. package/dist/typings/styled/ColorPicker/StyledAlphaRange.d.ts +2 -2
  33. package/dist/typings/styled/ColorPicker/StyledColorPicker.d.ts +1 -1
  34. package/dist/typings/styled/ColorPicker/StyledColorWell.d.ts +1 -1
  35. package/dist/typings/styled/ColorPicker/StyledPreview.d.ts +3 -3
  36. package/dist/typings/styled/ColorPicker/StyledSliders.d.ts +3 -2
  37. package/dist/typings/styled/ColorPickerDialog/StyledButton.d.ts +0 -1
  38. package/dist/typings/styled/ColorPickerDialog/StyledButtonPreview.d.ts +1 -1
  39. package/dist/typings/styled/ColorPickerDialog/{StyledTooltipModal.d.ts → StyledTooltipDialog.d.ts} +2 -2
  40. package/dist/typings/styled/ColorSwatch/StyledColorSwatchLabel.d.ts +1 -1
  41. package/dist/typings/styled/common/StyledRange.d.ts +2 -2
  42. package/dist/typings/styled/index.d.ts +1 -1
  43. package/dist/typings/styled/types.d.ts +12 -0
  44. package/dist/typings/types/index.d.ts +9 -9
  45. package/package.json +11 -12
  46. package/LICENSE.md +0 -176
  47. package/dist/esm/styled/ColorPickerDialog/StyledTooltipModal.js +0 -23
  48. package/dist/esm/styled/common/checkeredBackground.js +0 -28
  49. package/dist/typings/styled/common/checkeredBackground.d.ts +0 -8
package/dist/index.cjs.js CHANGED
@@ -131,22 +131,19 @@ const getThumbPosition = (x, y, rtl, container) => {
131
131
  };
132
132
  };
133
133
 
134
- const COMPONENT_ID$m = 'colorpickers.colorpicker';
134
+ const COMPONENT_ID$l = 'colorpickers.colorpicker';
135
135
  const getColorPickerWidth = props => {
136
- return props.isOpaque ? 268 : 312;
136
+ return props.$isOpaque ? 268 : 312;
137
137
  };
138
138
  const StyledColorPicker = styled__default.default.div.attrs({
139
- 'data-garden-id': COMPONENT_ID$m,
140
- 'data-garden-version': '9.0.0-next.8'
139
+ 'data-garden-id': COMPONENT_ID$l,
140
+ 'data-garden-version': '9.0.0'
141
141
  }).withConfig({
142
142
  displayName: "StyledColorPicker",
143
143
  componentId: "sc-gspq4q-0"
144
- })(["width:", "px;min-width:", "px;", ";"], getColorPickerWidth, getColorPickerWidth, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$m, props));
145
- StyledColorPicker.defaultProps = {
146
- theme: reactTheming.DEFAULT_THEME
147
- };
144
+ })(["width:", "px;min-width:", "px;", ";"], getColorPickerWidth, getColorPickerWidth, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$l, props));
148
145
 
149
- const COMPONENT_ID$l = 'colorpickers.colorpicker_range';
146
+ const COMPONENT_ID$k = 'colorpickers.colorpicker_range';
150
147
  const thumbStyles = function (styles) {
151
148
  let modifier = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
152
149
  return `
@@ -191,17 +188,36 @@ const trackLowerStyles = function (styles) {
191
188
  }
192
189
  `;
193
190
  };
194
- const colorStyles$1 = props => {
195
- const thumbBackgroundColor = reactTheming.getColorV8('neutralHue', 100, props.theme);
196
- const thumbBorderColor = thumbBackgroundColor;
197
- const thumbActiveBackgroundColor = reactTheming.getColorV8('neutralHue', 200, props.theme);
198
- const thumbActiveBorderColor = reactTheming.getColorV8('primaryHue', 600, props.theme);
199
- const thumbFocusBorderColor = reactTheming.getColorV8('primaryHue', 400, props.theme);
200
- const thumbHoverBackgroundColor = thumbActiveBackgroundColor;
201
- const thumbHoverBorderColor = thumbHoverBackgroundColor;
191
+ const colorStyles$2 = _ref => {
192
+ let {
193
+ theme
194
+ } = _ref;
195
+ const thumbBackgroundColor = reactTheming.getColor({
196
+ theme,
197
+ variable: 'background.default'
198
+ });
199
+ const thumbBorderColor = reactTheming.getColor({
200
+ theme,
201
+ variable: 'border.default',
202
+ dark: {
203
+ offset: -100
204
+ },
205
+ light: {
206
+ offset: 100
207
+ }
208
+ });
209
+ const thumbActiveBackgroundColor = thumbBackgroundColor;
210
+ const thumbActiveBorderColor = reactTheming.getColor({
211
+ theme,
212
+ variable: 'border.primaryEmphasis'
213
+ });
214
+ const thumbFocusBorderColor = thumbActiveBorderColor;
215
+ const thumbHoverBackgroundColor = reactTheming.getColor({
216
+ theme,
217
+ variable: 'background.subtle'
218
+ });
219
+ const thumbHoverBorderColor = thumbActiveBorderColor;
202
220
  return `
203
- border-color: ${props.isOpaque && reactTheming.getColorV8('background', 600 , props.theme)};
204
-
205
221
  ${trackStyles(`
206
222
  background-color: transparent;
207
223
  `)}
@@ -231,32 +247,22 @@ const colorStyles$1 = props => {
231
247
  `, ':active')}
232
248
  `;
233
249
  };
234
- const getThumbSize = props => props.theme.space.base * (props.isOpaque ? 6 : 4);
235
- const getTrackHeight = props => props.theme.space.base * (props.isOpaque ? 6 : 3);
250
+ const getThumbSize = props => props.theme.space.base * (props.$isOpaque ? 6 : 4);
251
+ const getTrackHeight = props => props.theme.space.base * (props.$isOpaque ? 6 : 3);
236
252
  const getTrackMargin = props => (getThumbSize(props) - getTrackHeight(props)) / 2 + polished.stripUnit(props.theme.shadowWidths.md);
237
- const sizeStyles$2 = props => {
253
+ const sizeStyles$3 = props => {
238
254
  const thumbSize = getThumbSize(props);
239
255
  const trackHeight = getTrackHeight(props);
240
256
  const trackMargin = getTrackMargin(props);
241
257
  const thumbMargin = (trackHeight - thumbSize) / 2;
242
- const trackOffset = props.theme.space.base * (props.isOpaque ? -2 : -1);
243
- const height = props.isOpaque ? trackHeight : trackMargin * 2 + trackHeight;
244
- let marginHorizontal;
245
- let border;
246
- let borderRadius;
247
- if (props.isOpaque) {
248
- marginHorizontal = `-${trackMargin}px`;
249
- border = `${trackMargin}px ${props.theme.borderStyles.solid}`;
250
- borderRadius = `${trackMargin + polished.stripUnit(props.theme.shadowWidths.md)}px`;
251
- }
258
+ const trackOffset = props.theme.space.base * (props.$isOpaque ? -2 : -1);
259
+ const height = props.$isOpaque ? trackHeight : trackMargin * 2 + trackHeight;
252
260
  return `
253
261
  /* stylelint-disable-next-line declaration-no-important */
254
262
  margin-top: 0 !important;
255
- margin-${props.theme.rtl ? 'right' : 'left'}: ${marginHorizontal};
256
263
  height: ${height}px; /* [1] */
257
264
  box-sizing: content-box; /* [2] */
258
- border: ${border};
259
- border-radius: ${borderRadius};
265
+ border-radius: ${props.$isOpaque && props.theme.borderRadii.md};
260
266
 
261
267
  ${trackStyles(`
262
268
  margin: ${trackMargin}px ${trackOffset}px;
@@ -265,89 +271,70 @@ const sizeStyles$2 = props => {
265
271
 
266
272
  ${thumbStyles(`
267
273
  margin: ${thumbMargin}px 0;
268
- border-width: ${polished.math(`${props.theme.borderWidths.sm} * 2`)};
274
+ border-width: ${props.theme.borderWidths.sm};
269
275
  height: ${thumbSize}px;
270
276
  width: ${thumbSize}px;
271
277
  `)};
272
278
  `;
273
279
  };
274
280
  const StyledRange = styled__default.default(reactForms.Range).attrs({
275
- 'data-garden-id': COMPONENT_ID$l,
276
- 'data-garden-version': '9.0.0-next.8',
281
+ 'data-garden-id': COMPONENT_ID$k,
282
+ 'data-garden-version': '9.0.0',
277
283
  hasLowerTrack: false
278
284
  }).withConfig({
279
285
  displayName: "StyledRange",
280
286
  componentId: "sc-ug3wi9-0"
281
- })(["", ";", " ", ";", ";"], sizeStyles$2, trackStyles(`
287
+ })(["", ";", " ", ";", ";"], sizeStyles$3, trackStyles(`
282
288
  border-radius: 0;
283
- `), colorStyles$1, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$l, props));
284
- StyledRange.defaultProps = {
285
- theme: reactTheming.DEFAULT_THEME
286
- };
289
+ `), colorStyles$2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$k, props));
287
290
 
288
- const COMPONENT_ID$k = 'colorpickers.colorpicker_hue';
291
+ const COMPONENT_ID$j = 'colorpickers.colorpicker_hue';
289
292
  const StyledHueRange = styled__default.default(StyledRange).attrs({
290
- 'data-garden-id': COMPONENT_ID$k,
291
- 'data-garden-version': '9.0.0-next.8'
293
+ 'data-garden-id': COMPONENT_ID$j,
294
+ 'data-garden-version': '9.0.0'
292
295
  }).withConfig({
293
296
  displayName: "StyledHueRange",
294
297
  componentId: "sc-1gdhww1-0"
295
- })(["background:linear-gradient( to ", ",#f00 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100% ) no-repeat;background-position:", ";background-size:100% ", "px;"], props => props.theme.rtl ? 'left' : 'right', props => !props.isOpaque && `0 ${getTrackMargin(props)}px`, props => getTrackHeight(props));
296
- StyledHueRange.defaultProps = {
297
- theme: reactTheming.DEFAULT_THEME
298
- };
299
-
300
- const checkeredBackground = function (theme, size) {
301
- let positionY = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
302
- let repeat = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'repeat';
303
- const color = reactTheming.getColorV8('neutralHue', 400, theme);
304
- const dimensions = `${size}px ${size}px`;
305
- const positionX1 = theme.rtl ? '100%' : '0';
306
- const positionX2 = theme.rtl ? `calc(100% - ${size / 2}px)` : `${size / 2}px`;
307
- const position1 = `${positionX1} ${positionY}px`;
308
- const position2 = `${positionX2} ${size / 2 + positionY}px`;
309
- const position3 = `${positionX2} ${positionY}px`;
310
- const position4 = `${positionX1} ${size / -2 + positionY}px`;
311
- return `
312
- linear-gradient(45deg, ${color} 25%, transparent 25%) ${position1} / ${dimensions} ${repeat},
313
- linear-gradient(45deg, transparent 75%, ${color} 75%) ${position2} / ${dimensions} ${repeat},
314
- linear-gradient(135deg, ${color} 25%, transparent 25%) ${position3} / ${dimensions} ${repeat},
315
- linear-gradient(135deg, transparent 75%, ${color} 75%) ${position4} / ${dimensions} ${repeat}
316
- `;
317
- };
298
+ })(["background:linear-gradient( to ", ",#f00 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100% ) no-repeat;background-position:", ";background-size:100% ", "px;"], props => props.theme.rtl ? 'left' : 'right', props => !props.$isOpaque && `0 ${getTrackMargin(props)}px`, props => getTrackHeight(props));
318
299
 
319
- const COMPONENT_ID$j = 'colorpickers.colorpicker_alpha';
300
+ const COMPONENT_ID$i = 'colorpickers.colorpicker_alpha';
320
301
  const background$3 = props => {
321
302
  const direction = `to ${props.theme.rtl ? 'left' : 'right'}`;
322
- const fromColor = `rgba(${props.red}, ${props.green}, ${props.blue}, 0)`;
323
- const toColor = `rgb(${props.red}, ${props.green}, ${props.blue})`;
303
+ const fromColor = `rgba(${props.$red}, ${props.$green}, ${props.$blue}, 0)`;
304
+ const toColor = `rgb(${props.$red}, ${props.$green}, ${props.$blue})`;
324
305
  const positionY = getTrackMargin(props);
325
306
  const height = getTrackHeight(props);
326
- const gradientBackground = `linear-gradient(${direction}, ${fromColor}, ${toColor}) 0 ${positionY}px / 100% ${height}px no-repeat`;
327
- return `${gradientBackground}, ${checkeredBackground(props.theme, height, positionY, 'repeat-x')}`;
307
+ const overlay = `linear-gradient(${direction}, ${fromColor}, ${toColor}) 0 ${positionY}px / 100% ${height}px no-repeat`;
308
+ return reactTheming.getCheckeredBackground({
309
+ theme: props.theme,
310
+ size: height,
311
+ positionY,
312
+ repeat: 'repeat-x',
313
+ overlay
314
+ });
328
315
  };
329
316
  const StyledAlphaRange = styled__default.default(StyledRange).attrs(props => ({
330
317
  style: {
331
318
  backgroundSize: 'auto',
332
319
  background: background$3(props)
333
320
  },
334
- 'data-garden-id': COMPONENT_ID$j,
335
- 'data-garden-version': '9.0.0-next.8'
321
+ 'data-garden-id': COMPONENT_ID$i,
322
+ 'data-garden-version': '9.0.0'
336
323
  })).withConfig({
337
324
  displayName: "StyledAlphaRange",
338
325
  componentId: "sc-1f6hp2j-0"
339
326
  })([""]);
340
- StyledAlphaRange.defaultProps = {
341
- theme: reactTheming.DEFAULT_THEME
342
- };
343
327
 
344
- const COMPONENT_ID$i = 'colorpickers.colorpicker_preview_box';
328
+ const COMPONENT_ID$h = 'colorpickers.colorpicker_preview_box';
345
329
  const background$2 = props => {
346
- const alpha = props.alpha ? props.alpha / 100 : 0;
347
- const color = `rgba(${props.red}, ${props.green}, ${props.blue}, ${alpha})`;
348
- let retVal = `linear-gradient(${color}, ${color})`;
349
- if (!props.isOpaque) {
350
- retVal = `${retVal}, ${checkeredBackground(props.theme, 13)}`;
330
+ const alpha = props.$alpha ? props.$alpha / 100 : 0;
331
+ let retVal = `rgba(${props.$red}, ${props.$green}, ${props.$blue}, ${alpha})`;
332
+ if (!props.$isOpaque) {
333
+ retVal = reactTheming.getCheckeredBackground({
334
+ theme: props.theme,
335
+ size: 13,
336
+ overlay: retVal
337
+ });
351
338
  }
352
339
  return retVal;
353
340
  };
@@ -355,30 +342,27 @@ const StyledPreview = styled__default.default.div.attrs(props => ({
355
342
  style: {
356
343
  background: background$2(props)
357
344
  },
358
- 'data-garden-id': COMPONENT_ID$i,
359
- 'data-garden-version': '9.0.0-next.8',
345
+ 'data-garden-id': COMPONENT_ID$h,
346
+ 'data-garden-version': '9.0.0',
360
347
  'data-test-id': 'preview-box'
361
348
  })).withConfig({
362
349
  displayName: "StyledPreview",
363
350
  componentId: "sc-1z5nh7-0"
364
- })(["flex-shrink:0;border-radius:", ";box-shadow:inset 0 0 0 ", " ", ";width:", "px;height:", "px;", ";"], props => props.theme.borderRadii.md, props => props.theme.borderWidths.sm, props => polished.rgba(props.theme.palette.black, 0.19), props => props.theme.space.base * (props.isOpaque ? 6 : 8), props => props.theme.space.base * (props.isOpaque ? 6 : 8), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$i, props));
365
- StyledPreview.defaultProps = {
366
- theme: reactTheming.DEFAULT_THEME
367
- };
351
+ })(["flex-shrink:0;border-radius:", ";box-shadow:inset 0 0 0 ", " ", ";width:", "px;height:", "px;", ";"], props => props.theme.borderRadii.md, props => props.theme.borderWidths.sm, props => polished.rgba(props.theme.palette.black, 0.19), props => props.theme.space.base * (props.$isOpaque ? 6 : 8), props => props.theme.space.base * (props.$isOpaque ? 6 : 8), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$h, props));
368
352
 
369
- const COMPONENT_ID$h = 'colorpickers.colorpicker_colorwell';
353
+ const COMPONENT_ID$g = 'colorpickers.colorpicker_colorwell';
370
354
  const background$1 = props => {
371
355
  const blackAlpha = polished.rgba(props.theme.palette.black, 0.9);
372
356
  const black = `linear-gradient(0deg, ${props.theme.palette.black}, ${blackAlpha} 1%, transparent 99%)`;
373
357
  const whiteAngle = `${props.theme.rtl ? -90 : 90}deg`;
374
358
  const white = `linear-gradient(${whiteAngle}, ${props.theme.palette.white} 1%, transparent)`;
375
- const colorValue = polished.hsl(props.hue, 1, 0.5);
359
+ const colorValue = polished.hsl(props.$hue, 1, 0.5);
376
360
  const color = `linear-gradient(${colorValue}, ${colorValue})`;
377
361
  return `${black}, ${white}, ${color}`;
378
362
  };
379
363
  const StyledColorWell = styled__default.default.div.attrs(props => ({
380
- 'data-garden-id': COMPONENT_ID$h,
381
- 'data-garden-version': '9.0.0-next.8',
364
+ 'data-garden-id': COMPONENT_ID$g,
365
+ 'data-garden-version': '9.0.0',
382
366
  'data-test-id': 'colorwell',
383
367
  style: {
384
368
  background: background$1(props)
@@ -386,27 +370,35 @@ const StyledColorWell = styled__default.default.div.attrs(props => ({
386
370
  })).withConfig({
387
371
  displayName: "StyledColorWell",
388
372
  componentId: "sc-1gg9z8m-0"
389
- })(["position:relative;margin-bottom:", "px;cursor:pointer;height:208px;overflow:hidden;", ";"], props => props.theme.space.base * 2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$h, props));
390
- StyledColorWell.defaultProps = {
391
- theme: reactTheming.DEFAULT_THEME
392
- };
373
+ })(["position:relative;margin-bottom:", "px;cursor:pointer;height:208px;overflow:hidden;", ";"], props => props.theme.space.base * 2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$g, props));
393
374
 
394
- const COMPONENT_ID$g = 'colorpickers.colorpicker_colorwell_thumb';
395
- const sizeStyles$1 = theme => {
375
+ const COMPONENT_ID$f = 'colorpickers.colorpicker_colorwell_thumb';
376
+ const colorStyles$1 = _ref => {
377
+ let {
378
+ theme
379
+ } = _ref;
380
+ const borderColor = reactTheming.getColor({
381
+ theme,
382
+ hue: 'white'
383
+ });
384
+ const boxShadow = `${theme.shadows.xs(reactTheming.getColor({
385
+ theme,
386
+ hue: 'black'
387
+ }))}`;
388
+ return styled.css(["border-color:", ";box-shadow:", ";"], borderColor, boxShadow);
389
+ };
390
+ const sizeStyles$2 = _ref2 => {
391
+ let {
392
+ theme
393
+ } = _ref2;
396
394
  const borderWidth = polished.stripUnit(theme.borderWidths.sm) * 2;
397
395
  const size = theme.space.base * 5;
398
396
  const translateValue = size / -2;
399
- return `
400
- transform: translate(${translateValue}px, ${translateValue}px);
401
- box-sizing: border-box;
402
- border-width: ${borderWidth}px;
403
- width: ${size}px;
404
- height: ${size}px;
405
- `;
397
+ return styled.css(["transform:translate(", "px,", "px);box-sizing:border-box;border-width:", "px;width:", "px;height:", "px;"], translateValue, translateValue, borderWidth, size, size);
406
398
  };
407
399
  const StyledColorWellThumb = styled__default.default.div.attrs(props => ({
408
- 'data-garden-id': COMPONENT_ID$g,
409
- 'data-garden-version': '9.0.0-next.8',
400
+ 'data-garden-id': COMPONENT_ID$f,
401
+ 'data-garden-version': '9.0.0',
410
402
  'data-test-id': 'colorwell-thumb',
411
403
  style: {
412
404
  top: `${props.top}%`,
@@ -415,75 +407,57 @@ const StyledColorWellThumb = styled__default.default.div.attrs(props => ({
415
407
  })).withConfig({
416
408
  displayName: "StyledColorWellThumb",
417
409
  componentId: "sc-1npyab0-0"
418
- })(["position:absolute;border:solid ", ";border-radius:50%;box-shadow:", ";", ";", ";"], props => props.theme.palette.white, props => props.theme.shadows.lg(`${props.theme.space.base}px`, `${props.theme.space.base * 2}px`, reactTheming.getColorV8('neutralHue', 800, props.theme, 0.24)), props => sizeStyles$1(props.theme), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$g, props));
419
- StyledColorWellThumb.defaultProps = {
420
- theme: reactTheming.DEFAULT_THEME
421
- };
410
+ })(["position:absolute;border:", ";border-radius:50%;", " ", " ", ";"], props => props.theme.borders.sm, sizeStyles$2, colorStyles$1, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$f, props));
422
411
 
423
- const COMPONENT_ID$f = 'colorpickers.colorpicker_slider_group';
412
+ const COMPONENT_ID$e = 'colorpickers.colorpicker_slider_group';
424
413
  const StyledSliderGroup = styled__default.default.div.attrs({
425
- 'data-garden-id': COMPONENT_ID$f,
426
- 'data-garden-version': '9.0.0-next.8'
414
+ 'data-garden-id': COMPONENT_ID$e,
415
+ 'data-garden-version': '9.0.0'
427
416
  }).withConfig({
428
417
  displayName: "StyledSliderGroup",
429
418
  componentId: "sc-tigkzg-0"
430
- })(["display:flex;justify-content:space-between;margin-bottom:", "px;", ";"], props => props.theme.space.base * 2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$f, props));
431
- StyledSliderGroup.defaultProps = {
432
- theme: reactTheming.DEFAULT_THEME
433
- };
419
+ })(["display:flex;justify-content:space-between;margin-bottom:", "px;", ";"], props => props.theme.space.base * 2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$e, props));
434
420
 
435
- const COMPONENT_ID$e = 'colorpickers.colorpicker_hex_field';
421
+ const COMPONENT_ID$d = 'colorpickers.colorpicker_hex_field';
436
422
  const StyledHexField = styled__default.default(reactForms.Field).attrs({
437
- 'data-garden-id': COMPONENT_ID$e,
438
- 'data-garden-version': '9.0.0-next.8',
423
+ 'data-garden-id': COMPONENT_ID$d,
424
+ 'data-garden-version': '9.0.0',
439
425
  spellcheck: false
440
426
  }).withConfig({
441
427
  displayName: "StyledHexField",
442
428
  componentId: "sc-ijq1c-0"
443
- })(["display:flex;flex-basis:0;flex-direction:column;flex-grow:1;width:auto;text-align:center;input{direction:ltr;}", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$e, props));
444
- StyledHexField.defaultProps = {
445
- theme: reactTheming.DEFAULT_THEME
446
- };
429
+ })(["display:flex;flex-basis:0;flex-direction:column;flex-grow:1;width:auto;text-align:center;input{direction:ltr;}", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$d, props));
447
430
 
448
- const COMPONENT_ID$d = 'colorpickers.colorpicker_label';
431
+ const COMPONENT_ID$c = 'colorpickers.colorpicker_label';
449
432
  const StyledLabel = styled__default.default(reactForms.Label).attrs({
450
- 'data-garden-id': COMPONENT_ID$d,
451
- 'data-garden-version': '9.0.0-next.8'
433
+ 'data-garden-id': COMPONENT_ID$c,
434
+ 'data-garden-version': '9.0.0'
452
435
  }).withConfig({
453
436
  displayName: "StyledLabel",
454
437
  componentId: "sc-1vxt3m9-0"
455
- })(["overflow:hidden;text-overflow:ellipsis;white-space:nowrap;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$d, props));
456
- StyledLabel.defaultProps = {
457
- theme: reactTheming.DEFAULT_THEME
458
- };
438
+ })(["overflow:hidden;text-overflow:ellipsis;white-space:nowrap;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$c, props));
459
439
 
460
- const COMPONENT_ID$c = 'colorpickers.colorpicker_input';
440
+ const COMPONENT_ID$b = 'colorpickers.colorpicker_input';
461
441
  const StyledInput = styled__default.default(reactForms.Input).attrs({
462
- 'data-garden-id': COMPONENT_ID$c,
463
- 'data-garden-version': '9.0.0-next.8',
442
+ 'data-garden-id': COMPONENT_ID$b,
443
+ 'data-garden-version': '9.0.0',
464
444
  focusInset: false
465
445
  }).withConfig({
466
446
  displayName: "StyledInput",
467
447
  componentId: "sc-1uzlutt-0"
468
- })(["text-align:center;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$c, props));
469
- StyledInput.defaultProps = {
470
- theme: reactTheming.DEFAULT_THEME
471
- };
448
+ })(["text-align:center;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$b, props));
472
449
 
473
- const COMPONENT_ID$b = 'colorpickers.colorpicker_input_group';
450
+ const COMPONENT_ID$a = 'colorpickers.colorpicker_input_group';
474
451
  const StyledInputGroup = styled__default.default.div.attrs({
475
- 'data-garden-id': COMPONENT_ID$b,
476
- 'data-garden-version': '9.0.0-next.8'
452
+ 'data-garden-id': COMPONENT_ID$a,
453
+ 'data-garden-version': '9.0.0'
477
454
  }).withConfig({
478
455
  displayName: "StyledInputGroup",
479
456
  componentId: "sc-1m9g2wg-0"
480
- })(["display:flex;justify-content:space-between;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$b, props));
481
- StyledInputGroup.defaultProps = {
482
- theme: reactTheming.DEFAULT_THEME
483
- };
457
+ })(["display:flex;justify-content:space-between;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$a, props));
484
458
 
485
- const COMPONENT_ID$a = 'colorpickers.colorpicker_rgb_field';
486
- const sizeStyles = theme => {
459
+ const COMPONENT_ID$9 = 'colorpickers.colorpicker_rgb_field';
460
+ const sizeStyles$1 = theme => {
487
461
  const margin = `${theme.space.base * 1.5}px`;
488
462
  const width = `${theme.space.base * 12.75}px`;
489
463
  return `
@@ -493,133 +467,147 @@ const sizeStyles = theme => {
493
467
  `;
494
468
  };
495
469
  const StyledRGBAField = styled__default.default(reactForms.Field).attrs({
496
- 'data-garden-id': COMPONENT_ID$a,
497
- 'data-garden-version': '9.0.0-next.8'
470
+ 'data-garden-id': COMPONENT_ID$9,
471
+ 'data-garden-version': '9.0.0'
498
472
  }).withConfig({
499
473
  displayName: "StyledRGBAField",
500
474
  componentId: "sc-13266k8-0"
501
- })(["display:flex;flex-direction:column;text-align:center;", ";", ";"], props => sizeStyles(props.theme), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$a, props));
502
- StyledRGBAField.defaultProps = {
503
- theme: reactTheming.DEFAULT_THEME
504
- };
475
+ })(["display:flex;flex-direction:column;text-align:center;", ";", ";"], props => sizeStyles$1(props.theme), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$9, props));
505
476
 
506
- const COMPONENT_ID$9 = 'colorpickers.colorpicker_sliders';
477
+ const COMPONENT_ID$8 = 'colorpickers.colorpicker_sliders';
478
+ const sizeStyles = props => {
479
+ if (props.$isOpaque) {
480
+ return undefined;
481
+ }
482
+ const trackHeight = getTrackHeight(props);
483
+ const trackMargin = getTrackMargin(props);
484
+ return `
485
+ & > * {
486
+ position: absolute;
487
+ width: 100%;
488
+ height: ${trackMargin * 2 + trackHeight}px;
489
+ }
490
+
491
+ & > :first-child {
492
+ top: -${trackMargin}px;
493
+ }
494
+
495
+ & > :last-child {
496
+ bottom: -${trackMargin}px;
497
+ }
498
+ `;
499
+ };
507
500
  const StyledSliders = styled__default.default.div.attrs({
508
- 'data-garden-id': COMPONENT_ID$9,
509
- 'data-garden-version': '9.0.0-next.8'
501
+ 'data-garden-id': COMPONENT_ID$8,
502
+ 'data-garden-version': '9.0.0'
510
503
  }).withConfig({
511
504
  displayName: "StyledSliders",
512
505
  componentId: "sc-1lgr50m-0"
513
- })(["position:relative;margin-", ":", "px;width:100%;& > *{position:absolute;width:100%;height:", "px;}& > :first-child{top:-", "px;}& > :last-child{bottom:-", "px;}", ";"], props => props.theme.rtl ? 'right' : 'left', props => props.theme.space.base * 2, props => getTrackMargin(props) * 2 + getTrackHeight(props), getTrackMargin, getTrackMargin, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$9, props));
514
- StyledSliders.defaultProps = {
515
- theme: reactTheming.DEFAULT_THEME
516
- };
506
+ })(["position:relative;margin-", ":", "px;width:100%;", " ", ";"], props => props.theme.rtl ? 'right' : 'left', props => props.theme.space.base * 2, sizeStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$8, props));
517
507
 
518
- const COMPONENT_ID$8 = 'colorpickers.colordialog_button';
519
508
  const StyledButton = styled__default.default(reactButtons.Button).attrs({
520
509
  isNeutral: true,
521
- 'data-garden-id': COMPONENT_ID$8,
522
- 'data-garden-version': '9.0.0-next.8'
510
+ 'data-garden-version': '9.0.0'
523
511
  }).withConfig({
524
512
  displayName: "StyledButton",
525
513
  componentId: "sc-1dlijfv-0"
526
- })(["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, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$8, props));
527
- StyledButton.defaultProps = {
528
- theme: reactTheming.DEFAULT_THEME
529
- };
514
+ })(["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);
530
515
 
531
516
  const COMPONENT_ID$7 = 'colorpickers.colordialog_preview';
532
- const background = props => {
533
- const {
534
- backgroundColor
535
- } = props;
536
- let color;
537
- if (typeof backgroundColor === 'string') {
538
- color = backgroundColor;
539
- } else if (backgroundColor === undefined) {
540
- color = props.theme.palette.white;
517
+ const background = _ref => {
518
+ let {
519
+ $backgroundColor,
520
+ theme
521
+ } = _ref;
522
+ let retVal;
523
+ if (typeof $backgroundColor === 'string') {
524
+ retVal = $backgroundColor;
525
+ } else if ($backgroundColor === undefined) {
526
+ retVal = theme.palette.white;
541
527
  } else {
542
528
  const {
543
529
  red,
544
530
  green,
545
531
  blue,
546
532
  alpha = 1
547
- } = backgroundColor;
548
- color = `rgba(${red}, ${green}, ${blue}, ${alpha ? alpha / 100 : 0})`;
533
+ } = $backgroundColor;
534
+ retVal = `rgba(${red}, ${green}, ${blue}, ${alpha ? alpha / 100 : 0})`;
549
535
  }
550
- return `linear-gradient(${color}, ${color})`;
536
+ return retVal;
551
537
  };
552
538
  const StyledButtonPreview = styled__default.default.span.attrs(props => ({
553
539
  style: {
554
- background: `${background(props)}, ${checkeredBackground(props.theme, 8)}`
540
+ background: reactTheming.getCheckeredBackground({
541
+ theme: props.theme,
542
+ size: 8,
543
+ overlay: background(props)
544
+ })
555
545
  },
556
546
  'data-garden-id': COMPONENT_ID$7,
557
- 'data-garden-version': '9.0.0-next.8',
547
+ 'data-garden-version': '9.0.0',
558
548
  'data-test-id': 'dialog-preview'
559
549
  })).withConfig({
560
550
  displayName: "StyledButtonPreview",
561
551
  componentId: "sc-yxis8h-0"
562
552
  })(["display:inline-block;bottom:", "px;border-radius:", ";box-shadow:inset 0 0 0 ", " ", ";width:", "px;height:", "px;", ";"], props => props.theme.space.base, props => props.theme.borderRadii.sm, props => props.theme.borderWidths.sm, props => polished.rgba(props.theme.palette.black, 0.19), props => props.theme.space.base * 5, props => props.theme.space.base * 5, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$7, props));
563
- StyledButtonPreview.defaultProps = {
564
- theme: reactTheming.DEFAULT_THEME
565
- };
566
553
 
567
- const COMPONENT_ID$6 = 'colorpickers.colordialog_tooltipmodal';
568
- const StyledTooltipModal = styled__default.default(reactModals.TooltipModal).attrs({
554
+ const COMPONENT_ID$6 = 'colorpickers.colordialog_tooltipdialog';
555
+ const StyledTooltipDialog = styled__default.default(reactModals.TooltipDialog).attrs({
569
556
  'data-garden-id': COMPONENT_ID$6,
570
- 'data-garden-version': '9.0.0-next.8'
557
+ 'data-garden-version': '9.0.0'
571
558
  }).withConfig({
572
- displayName: "StyledTooltipModal",
573
- componentId: "sc-gykkrw-0"
559
+ displayName: "StyledTooltipDialog",
560
+ componentId: "sc-1vbkccl-0"
574
561
  })(["width:auto !important;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$6, props));
575
- StyledTooltipModal.defaultProps = {
576
- theme: reactTheming.DEFAULT_THEME
577
- };
578
562
 
579
- const COMPONENT_ID$5 = 'colorpickers.colordialog_tooltipmodal_body';
580
- const StyledTooltipBody = styled__default.default(reactModals.TooltipModal.Body).attrs({
563
+ const COMPONENT_ID$5 = 'colorpickers.colordialog_tooltipdialog_body';
564
+ const StyledTooltipBody = styled__default.default(reactModals.TooltipDialog.Body).attrs({
581
565
  'data-garden-id': COMPONENT_ID$5,
582
- 'data-garden-version': '9.0.0-next.8'
566
+ 'data-garden-version': '9.0.0'
583
567
  }).withConfig({
584
568
  displayName: "StyledTooltipBody",
585
569
  componentId: "sc-1ueddpo-0"
586
570
  })(["padding:0;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$5, props));
587
- StyledTooltipBody.defaultProps = {
588
- theme: reactTheming.DEFAULT_THEME
589
- };
590
571
 
591
572
  const COMPONENT_ID$4 = 'colorpickers.color_swatch';
592
573
  const StyledColorSwatch = styled__default.default.table.attrs({
593
574
  'data-garden-id': COMPONENT_ID$4,
594
- 'data-garden-version': '9.0.0-next.8'
575
+ 'data-garden-version': '9.0.0'
595
576
  }).withConfig({
596
577
  displayName: "StyledColorSwatch",
597
578
  componentId: "sc-ajx440-0"
598
579
  })(["border-collapse:collapse;line-height:normal;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
599
- StyledColorSwatch.defaultProps = {
600
- theme: reactTheming.DEFAULT_THEME
601
- };
602
580
 
603
581
  const COMPONENT_ID$3 = 'colorpickers.color_swatch_input';
604
582
  const StyledColorSwatchInput = styled__default.default.input.attrs({
605
583
  'data-garden-id': COMPONENT_ID$3,
606
- 'data-garden-version': '9.0.0-next.8'
584
+ 'data-garden-version': '9.0.0'
607
585
  }).withConfig({
608
586
  displayName: "StyledColorSwatchInput",
609
587
  componentId: "sc-em45h0-0"
610
588
  })(["position:absolute;opacity:0;z-index:1;margin:0;cursor:pointer;width:100%;height:100%;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
611
- StyledColorSwatchInput.defaultProps = {
612
- theme: reactTheming.DEFAULT_THEME
613
- };
614
589
 
615
590
  const COMPONENT_ID$2 = 'colorpickers.color_swatch_label';
616
- const colorStyles = props => {
591
+ const colorStyles = _ref => {
592
+ let {
593
+ $backgroundColor,
594
+ theme
595
+ } = _ref;
617
596
  const {
618
597
  alpha
619
- } = polished.parseToRgb(props.backgroundColor);
620
- let foregroundColor = reactTheming.getColorV8('foreground', 600 , props.theme);
598
+ } = polished.parseToRgb($backgroundColor);
599
+ const returnIfLightColor = reactTheming.getColor({
600
+ theme,
601
+ hue: 'neutralHue',
602
+ shade: 900
603
+ });
604
+ let foregroundColor = returnIfLightColor;
621
605
  if (alpha === undefined || alpha >= 0.4) {
622
- foregroundColor = polished.readableColor(props.backgroundColor, foregroundColor, reactTheming.getColorV8('background', 600 , props.theme), false );
606
+ const returnIfDarkColor = reactTheming.getColor({
607
+ theme,
608
+ hue: 'white'
609
+ });
610
+ foregroundColor = polished.readableColor($backgroundColor, returnIfLightColor, returnIfDarkColor, false );
623
611
  }
624
612
  return `
625
613
  color: ${foregroundColor};
@@ -628,7 +616,7 @@ const colorStyles = props => {
628
616
  const StyledColorSwatchLabel = styled__default.default(StyledButtonPreview).attrs({
629
617
  as: 'label',
630
618
  'data-garden-id': COMPONENT_ID$2,
631
- 'data-garden-version': '9.0.0-next.8'
619
+ 'data-garden-version': '9.0.0'
632
620
  }).withConfig({
633
621
  displayName: "StyledColorSwatchLabel",
634
622
  componentId: "sc-1aghocg-0"
@@ -636,12 +624,9 @@ const StyledColorSwatchLabel = styled__default.default(StyledButtonPreview).attr
636
624
  theme: props.theme,
637
625
  selector: '&:has(:focus-visible)'
638
626
  }), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$2, props));
639
- StyledColorSwatchLabel.defaultProps = {
640
- theme: reactTheming.DEFAULT_THEME
641
- };
642
627
 
643
628
  var _path$1;
644
- function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
629
+ function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
645
630
  var SvgCheckSmFill = function SvgCheckSmFill(props) {
646
631
  return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
647
632
  xmlns: "http://www.w3.org/2000/svg",
@@ -663,26 +648,20 @@ var SvgCheckSmFill = function SvgCheckSmFill(props) {
663
648
  const COMPONENT_ID$1 = 'colorpickers.colorswatch_check';
664
649
  const StyledIcon = styled__default.default(SvgCheckSmFill).attrs({
665
650
  'data-garden-id': COMPONENT_ID$1,
666
- 'data-garden-version': '9.0.0-next.8'
651
+ 'data-garden-version': '9.0.0'
667
652
  }).withConfig({
668
653
  displayName: "StyledIcon",
669
654
  componentId: "sc-8oigif-0"
670
655
  })(["position:absolute;top:0;left:0;transition:opacity 0.2s ease-in-out;opacity:0;width:100%;height:100%;", ":checked ~ &{opacity:1;}", ";"], StyledColorSwatchInput, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props));
671
- StyledIcon.defaultProps = {
672
- theme: reactTheming.DEFAULT_THEME
673
- };
674
656
 
675
657
  const COMPONENT_ID = 'colorpickers.swatch_cell';
676
658
  const StyledCell = styled__default.default.td.attrs({
677
659
  'data-garden-id': COMPONENT_ID,
678
- 'data-garden-version': '9.0.0-next.8'
660
+ 'data-garden-version': '9.0.0'
679
661
  }).withConfig({
680
662
  displayName: "StyledCell",
681
663
  componentId: "sc-qr3oit-0"
682
664
  })(["padding:", "px;font-size:0;", ";"], props => props.theme.space.base, props => reactTheming.retrieveComponentStyles(COMPONENT_ID, props));
683
- StyledCell.defaultProps = {
684
- theme: reactTheming.DEFAULT_THEME
685
- };
686
665
 
687
666
  const ColorWell = React__namespace.default.memo(_ref => {
688
667
  let {
@@ -745,17 +724,15 @@ const ColorWell = React__namespace.default.memo(_ref => {
745
724
  throttledChange.cancel();
746
725
  };
747
726
  }, [throttledChange]);
748
- return (
749
- React__namespace.default.createElement(StyledColorWell, {
750
- hue: hue,
751
- ref: containerRef,
752
- role: "presentation",
753
- onMouseDown: handleMouseDown
754
- }, React__namespace.default.createElement(StyledColorWellThumb, {
755
- top: mouseActiveRef.current ? topFromMouse : topPosition,
756
- left: mouseActiveRef.current ? leftFromMouse : leftPosition
757
- }))
758
- );
727
+ return React__namespace.default.createElement(StyledColorWell, {
728
+ $hue: hue,
729
+ ref: containerRef,
730
+ role: "presentation",
731
+ onMouseDown: handleMouseDown
732
+ }, React__namespace.default.createElement(StyledColorWellThumb, {
733
+ top: mouseActiveRef.current ? topFromMouse : topPosition,
734
+ left: mouseActiveRef.current ? leftFromMouse : leftPosition
735
+ }));
759
736
  });
760
737
  ColorWell.displayName = 'ColorWell';
761
738
 
@@ -1129,27 +1106,27 @@ const ColorPicker = React.forwardRef((_ref, ref) => {
1129
1106
  }, [computedColor]);
1130
1107
  return React__namespace.default.createElement(StyledColorPicker, Object.assign({
1131
1108
  ref: ref,
1132
- isOpaque: isOpaque
1109
+ $isOpaque: isOpaque
1133
1110
  }, props), React__namespace.default.createElement(ColorWell, {
1134
1111
  hue: computedColor.hue,
1135
1112
  saturation: computedColor.saturation,
1136
1113
  lightness: computedColor.lightness,
1137
1114
  onChange: handleColorWellChange
1138
1115
  }), React__namespace.default.createElement(StyledSliderGroup, null, React__namespace.default.createElement(StyledPreview, {
1139
- red: computedColor.red,
1140
- green: computedColor.green,
1141
- blue: computedColor.blue,
1142
- alpha: computedColor.alpha,
1143
- isOpaque: isOpaque
1116
+ $red: computedColor.red,
1117
+ $green: computedColor.green,
1118
+ $blue: computedColor.blue,
1119
+ $alpha: computedColor.alpha,
1120
+ $isOpaque: isOpaque
1144
1121
  }), React__namespace.default.createElement(StyledSliders, {
1145
- isOpaque: isOpaque
1122
+ $isOpaque: isOpaque
1146
1123
  }, React__namespace.default.createElement(reactForms.Field, null, React__namespace.default.createElement(reactForms.Field.Label, {
1147
1124
  hidden: true
1148
1125
  }, labels.hueSlider || 'Hue slider'), React__namespace.default.createElement(StyledHueRange, {
1149
1126
  step: 1,
1150
1127
  max: 360,
1151
1128
  value: computedColor.hue,
1152
- isOpaque: isOpaque,
1129
+ $isOpaque: isOpaque,
1153
1130
  onChange: handleHueChange
1154
1131
  })), !isOpaque && React__namespace.default.createElement(reactForms.Field, null, React__namespace.default.createElement(reactForms.Field.Label, {
1155
1132
  hidden: true
@@ -1158,9 +1135,9 @@ const ColorPicker = React.forwardRef((_ref, ref) => {
1158
1135
  step: 0.01,
1159
1136
  value: computedColor.alpha / 100,
1160
1137
  onChange: handleAlphaSliderChange,
1161
- red: computedColor.red,
1162
- green: computedColor.green,
1163
- blue: computedColor.blue
1138
+ $red: computedColor.red,
1139
+ $green: computedColor.green,
1140
+ $blue: computedColor.blue
1164
1141
  })))), React__namespace.default.createElement(StyledInputGroup, null, React__namespace.default.createElement(StyledHexField, null, React__namespace.default.createElement(StyledLabel, {
1165
1142
  isRegular: true
1166
1143
  }, labels.hex || 'Hex'), React__namespace.default.createElement(StyledInput, {
@@ -1230,7 +1207,7 @@ ColorPicker.propTypes = {
1230
1207
  };
1231
1208
 
1232
1209
  var _path;
1233
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1210
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
1234
1211
  var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
1235
1212
  return /*#__PURE__*/React__namespace.createElement("svg", _extends({
1236
1213
  xmlns: "http://www.w3.org/2000/svg",
@@ -1275,6 +1252,7 @@ const ColorPickerDialog = React.forwardRef((_ref, ref) => {
1275
1252
  const ariaLabelText = reactTheming.useText(ColorPickerDialog, {
1276
1253
  'aria-label': ariaLabel
1277
1254
  }, 'aria-label', 'Color picker');
1255
+ const theme = styled.useTheme() || reactTheming.DEFAULT_THEME;
1278
1256
  const openDialog = () => {
1279
1257
  setReferenceElement(buttonRef.current);
1280
1258
  onDialogChange && onDialogChange({
@@ -1312,17 +1290,17 @@ const ColorPickerDialog = React.forwardRef((_ref, ref) => {
1312
1290
  ref: buttonRef,
1313
1291
  onClick: onClick
1314
1292
  }, buttonProps), React__namespace.default.createElement(StyledButtonPreview, {
1315
- backgroundColor: isControlled ? color : uncontrolledColor
1293
+ $backgroundColor: isControlled ? color : uncontrolledColor
1316
1294
  }), React__namespace.default.createElement(reactButtons.Button.EndIcon, {
1317
1295
  isRotated: referenceElement != null
1318
- }, React__namespace.default.createElement(SvgChevronDownStroke, null))), React__namespace.default.createElement(StyledTooltipModal, Object.assign({
1296
+ }, React__namespace.default.createElement(SvgChevronDownStroke, null))), React__namespace.default.createElement(StyledTooltipDialog, Object.assign({
1319
1297
  ref: ref,
1320
1298
  hasArrow: hasArrow,
1321
1299
  zIndex: zIndex,
1322
1300
  isAnimated: isAnimated,
1323
- isOpaque: isOpaque,
1324
1301
  focusOnMount: false,
1325
1302
  placement: placement,
1303
+ offset: theme.space.base,
1326
1304
  referenceElement: referenceElement,
1327
1305
  onClose: () => {
1328
1306
  closeDialog();
@@ -1396,69 +1374,72 @@ const ColorSwatch = React.forwardRef((_ref, ref) => {
1396
1374
  setColIndex(col);
1397
1375
  }
1398
1376
  });
1399
- return React__namespace.default.createElement(StyledColorSwatch, Object.assign({
1400
- role: "grid",
1401
- ref: reactMergeRefs.mergeRefs([gridRef, ref])
1402
- }, props), React__namespace.default.createElement("tbody", null, colors.map((row, _rowIndex) => React__namespace.default.createElement("tr", {
1403
- key: row[0].value
1404
- }, row.map((color, _colIndex) => {
1405
- const {
1406
- label,
1407
- value
1408
- } = color;
1409
- const {
1410
- role,
1411
- ...gridCellProps
1412
- } = getGridCellProps({
1413
- colIndex: _colIndex,
1414
- rowIndex: _rowIndex
1415
- });
1416
- const checked = isControlled ? selectedRowIndex === _rowIndex && selectedColIndex === _colIndex : undefined;
1417
- const defaultChecked = isControlled ? undefined : defaultSelectedRowIndex === _rowIndex && defaultSelectedColIndex === _colIndex;
1418
- const handleChange = event => {
1419
- if (onSelect) {
1420
- if (event.target.checked) {
1421
- onSelect(_rowIndex, _colIndex);
1422
- } else {
1423
- onSelect(null, null);
1424
- }
1425
- }
1426
- if (isCheckboxGroup && event.target.checked) {
1427
- const inputs = gridRef.current?.querySelectorAll('input');
1428
- inputs?.forEach(input => {
1429
- if (input !== event.target) {
1430
- input.checked = false;
1377
+ return (
1378
+ React__namespace.default.createElement(StyledColorSwatch, Object.assign({
1379
+ role: "grid",
1380
+ ref: reactMergeRefs.mergeRefs([gridRef, ref])
1381
+ }, props), React__namespace.default.createElement("tbody", null, colors.map((row, _rowIndex) => React__namespace.default.createElement("tr", {
1382
+ key: row[0].value
1383
+ }, row.map((color, _colIndex) => {
1384
+ const {
1385
+ label,
1386
+ value
1387
+ } = color;
1388
+ const {
1389
+ role,
1390
+ ...gridCellProps
1391
+ } = getGridCellProps({
1392
+ colIndex: _colIndex,
1393
+ rowIndex: _rowIndex
1394
+ });
1395
+ const checked = isControlled ? selectedRowIndex === _rowIndex && selectedColIndex === _colIndex : undefined;
1396
+ const defaultChecked = isControlled ? undefined : defaultSelectedRowIndex === _rowIndex && defaultSelectedColIndex === _colIndex;
1397
+ const handleChange = event => {
1398
+ if (onSelect) {
1399
+ if (event.target.checked) {
1400
+ onSelect(_rowIndex, _colIndex);
1401
+ } else {
1402
+ onSelect(null, null);
1431
1403
  }
1432
- });
1433
- }
1434
- };
1435
- const handleBlur = event => {
1436
- if (!(isCheckboxGroup || gridRef.current?.contains(event.relatedTarget))) {
1437
- const selectedInput = gridRef.current?.querySelector(`input[name='${event.target.name}']:checked`);
1438
- if (selectedInput !== null) {
1404
+ }
1405
+ if (isCheckboxGroup && event.target.checked) {
1439
1406
  const inputs = gridRef.current?.querySelectorAll('input');
1440
- inputs?.forEach(input => input.setAttribute('tabIndex', input.checked ? '0' : '-1'));
1407
+ inputs?.forEach(input => {
1408
+ if (input !== event.target) {
1409
+ input.checked = false;
1410
+ }
1411
+ });
1441
1412
  }
1442
- }
1443
- };
1444
- return React__namespace.default.createElement(StyledCell, {
1445
- key: value,
1446
- role: role
1447
- }, React__namespace.default.createElement(StyledColorSwatchLabel, {
1448
- backgroundColor: value
1449
- }, React__namespace.default.createElement(reactTooltips.Tooltip, {
1450
- content: label
1451
- }, React__namespace.default.createElement(StyledColorSwatchInput, Object.assign({
1452
- "aria-label": label,
1453
- name: name,
1454
- type: isCheckboxGroup ? 'checkbox' : 'radio',
1455
- value: value,
1456
- defaultChecked: defaultChecked,
1457
- checked: checked,
1458
- onBlur: handleBlur,
1459
- onChange: handleChange
1460
- }, gridCellProps))), React__namespace.default.createElement(StyledIcon, null)));
1461
- })))));
1413
+ };
1414
+ const handleBlur = event => {
1415
+ if (!(isCheckboxGroup || gridRef.current?.contains(event.relatedTarget))) {
1416
+ const selectedInput = gridRef.current?.querySelector(`input[name='${event.target.name}']:checked`);
1417
+ if (selectedInput !== null) {
1418
+ const inputs = gridRef.current?.querySelectorAll('input');
1419
+ inputs?.forEach(input => input.setAttribute('tabIndex', input.checked ? '0' : '-1'));
1420
+ }
1421
+ }
1422
+ };
1423
+ return React__namespace.default.createElement(StyledCell, {
1424
+ key: value,
1425
+ role: role
1426
+ }, React__namespace.default.createElement(StyledColorSwatchLabel, {
1427
+ $backgroundColor: value
1428
+ }, React__namespace.default.createElement(reactTooltips.Tooltip, {
1429
+ content: label,
1430
+ zIndex: 1
1431
+ }, React__namespace.default.createElement(StyledColorSwatchInput, Object.assign({
1432
+ "aria-label": label,
1433
+ name: name,
1434
+ type: isCheckboxGroup ? 'checkbox' : 'radio',
1435
+ value: value,
1436
+ defaultChecked: defaultChecked,
1437
+ checked: checked,
1438
+ onBlur: handleBlur,
1439
+ onChange: handleChange
1440
+ }, gridCellProps))), React__namespace.default.createElement(StyledIcon, null)));
1441
+ })))))
1442
+ );
1462
1443
  });
1463
1444
  ColorSwatch.displayName = 'ColorSwatch';
1464
1445
  ColorSwatch.propTypes = {
@@ -1502,6 +1483,7 @@ const ColorSwatchDialog = React.forwardRef((_ref, ref) => {
1502
1483
  const [referenceElement, setReferenceElement] = React.useState(null);
1503
1484
  const [rowIndex, setRowIndex] = React.useState(defaultSelectedRowIndex);
1504
1485
  const [colIndex, setColIndex] = React.useState(defaultSelectedColIndex);
1486
+ const theme = styled.useTheme() || reactTheming.DEFAULT_THEME;
1505
1487
  let backgroundColor;
1506
1488
  if (isControlled) {
1507
1489
  if (selectedRowIndex !== null && selectedColIndex !== null) {
@@ -1568,15 +1550,16 @@ const ColorSwatchDialog = React.forwardRef((_ref, ref) => {
1568
1550
  ref: buttonRef,
1569
1551
  onClick: onClick
1570
1552
  }, buttonProps), React__namespace.default.createElement(StyledButtonPreview, {
1571
- backgroundColor: backgroundColor
1553
+ $backgroundColor: backgroundColor
1572
1554
  }), React__namespace.default.createElement(reactButtons.Button.EndIcon, {
1573
1555
  isRotated: referenceElement !== null
1574
- }, React__namespace.default.createElement(SvgChevronDownStroke, null))), React__namespace.default.createElement(StyledTooltipModal, Object.assign({
1556
+ }, React__namespace.default.createElement(SvgChevronDownStroke, null))), React__namespace.default.createElement(StyledTooltipDialog, Object.assign({
1575
1557
  ref: ref,
1576
1558
  zIndex: zIndex,
1577
1559
  hasArrow: hasArrow,
1578
1560
  focusOnMount: false,
1579
1561
  placement: placement,
1562
+ offset: theme.space.base,
1580
1563
  isAnimated: isAnimated,
1581
1564
  referenceElement: referenceElement,
1582
1565
  onClose: closeDialog,