@zendeskgarden/react-colorpickers 9.0.0-next.2 → 9.0.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -2
- package/dist/index.cjs.js +58 -59
- package/dist/index.esm.js +58 -59
- package/dist/typings/elements/{Colorpicker → ColorPicker}/index.d.ts +2 -2
- package/dist/typings/elements/{ColorpickerDialog → ColorPickerDialog}/index.d.ts +2 -2
- package/dist/typings/index.d.ts +3 -3
- package/dist/typings/styled/{ColorpickerDialog → ColorPickerDialog}/StyledButtonPreview.d.ts +2 -2
- package/dist/typings/styled/ColorSwatch/StyledColorSwatchLabel.d.ts +1 -1
- package/dist/typings/styled/index.d.ts +17 -17
- package/dist/typings/types/index.d.ts +2 -2
- package/package.json +7 -7
- /package/dist/typings/elements/{Colorpicker → ColorPicker}/ColorWell.d.ts +0 -0
- /package/dist/typings/elements/{Colorpicker → ColorPicker}/reducer.d.ts +0 -0
- /package/dist/typings/styled/{Colorpicker → ColorPicker}/StyledAlphaRange.d.ts +0 -0
- /package/dist/typings/styled/{Colorpicker → ColorPicker}/StyledColorPicker.d.ts +0 -0
- /package/dist/typings/styled/{Colorpicker → ColorPicker}/StyledColorWell.d.ts +0 -0
- /package/dist/typings/styled/{Colorpicker → ColorPicker}/StyledColorWellThumb.d.ts +0 -0
- /package/dist/typings/styled/{Colorpicker → ColorPicker}/StyledHexField.d.ts +0 -0
- /package/dist/typings/styled/{Colorpicker → ColorPicker}/StyledHueRange.d.ts +0 -0
- /package/dist/typings/styled/{Colorpicker → ColorPicker}/StyledInput.d.ts +0 -0
- /package/dist/typings/styled/{Colorpicker → ColorPicker}/StyledInputGroup.d.ts +0 -0
- /package/dist/typings/styled/{Colorpicker → ColorPicker}/StyledLabel.d.ts +0 -0
- /package/dist/typings/styled/{Colorpicker → ColorPicker}/StyledPreview.d.ts +0 -0
- /package/dist/typings/styled/{Colorpicker → ColorPicker}/StyledRGBAField.d.ts +0 -0
- /package/dist/typings/styled/{Colorpicker → ColorPicker}/StyledSliderGroup.d.ts +0 -0
- /package/dist/typings/styled/{Colorpicker → ColorPicker}/StyledSliders.d.ts +0 -0
- /package/dist/typings/styled/{ColorpickerDialog → ColorPickerDialog}/StyledButton.d.ts +0 -0
- /package/dist/typings/styled/{ColorpickerDialog → ColorPickerDialog}/StyledTooltipBody.d.ts +0 -0
- /package/dist/typings/styled/{ColorpickerDialog → ColorPickerDialog}/StyledTooltipModal.d.ts +0 -0
package/README.md
CHANGED
|
@@ -14,15 +14,85 @@ npm install react react-dom styled-components @zendeskgarden/react-theming
|
|
|
14
14
|
|
|
15
15
|
## Usage
|
|
16
16
|
|
|
17
|
+
### ColorPicker
|
|
18
|
+
|
|
17
19
|
```jsx
|
|
18
20
|
import { ThemeProvider } from '@zendeskgarden/react-theming';
|
|
19
|
-
import {
|
|
21
|
+
import { ColorPicker } from '@zendeskgarden/react-colorpickers';
|
|
20
22
|
|
|
21
23
|
|
|
22
24
|
/**
|
|
23
25
|
* Place a `ThemeProvider` at the root of your React application
|
|
24
26
|
*/
|
|
25
27
|
<ThemeProvider>
|
|
26
|
-
<
|
|
28
|
+
<ColorPicker defaultColor="#17494D">
|
|
27
29
|
</ThemeProvider>
|
|
28
30
|
```
|
|
31
|
+
|
|
32
|
+
### ColorPickerDialog
|
|
33
|
+
|
|
34
|
+
```jsx
|
|
35
|
+
import { ThemeProvider } from '@zendeskgarden/react-theming';
|
|
36
|
+
import { ColorPickerDialog } from '@zendeskgarden/react-colorpickers';
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Place a `ThemeProvider` at the root of your React application
|
|
40
|
+
*/
|
|
41
|
+
<ThemeProvider>
|
|
42
|
+
<ColorPickerDialog defaultColor="#17494D" buttonProps={{ 'aria-label': 'Example label' }} />
|
|
43
|
+
</ThemeProvider>;
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### ColorSwatch
|
|
47
|
+
|
|
48
|
+
```jsx
|
|
49
|
+
import { ThemeProvider } from '@zendeskgarden/react-theming';
|
|
50
|
+
import { ColorSwatch } from '@zendeskgarden/react-colorpickers';
|
|
51
|
+
|
|
52
|
+
const colors = [
|
|
53
|
+
[
|
|
54
|
+
{ label: 'Green-800', value: '#0b3b29' },
|
|
55
|
+
{ label: 'Green-700', value: '#186146' }
|
|
56
|
+
],
|
|
57
|
+
[
|
|
58
|
+
{ label: 'Green-600', value: '#038153' },
|
|
59
|
+
{ label: 'Green-500', value: '#228f67' }
|
|
60
|
+
]
|
|
61
|
+
];
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Place a `ThemeProvider` at the root of your React application
|
|
65
|
+
*/
|
|
66
|
+
<ThemeProvider>
|
|
67
|
+
<ColorSwatch colors={colors} name="swatch" />
|
|
68
|
+
</ThemeProvider>;
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### ColorSwatchDialog
|
|
72
|
+
|
|
73
|
+
```jsx
|
|
74
|
+
import { ThemeProvider } from '@zendeskgarden/react-theming';
|
|
75
|
+
import { ColorSwatchDialog } from '@zendeskgarden/react-colorpickers';
|
|
76
|
+
|
|
77
|
+
const colors = [
|
|
78
|
+
[
|
|
79
|
+
{ label: 'Green-800', value: '#0b3b29' },
|
|
80
|
+
{ label: 'Green-700', value: '#186146' }
|
|
81
|
+
],
|
|
82
|
+
[
|
|
83
|
+
{ label: 'Green-600', value: '#038153' },
|
|
84
|
+
{ label: 'Green-500', value: '#228f67' }
|
|
85
|
+
]
|
|
86
|
+
];
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Place a `ThemeProvider` at the root of your React application
|
|
90
|
+
*/
|
|
91
|
+
<ThemeProvider>
|
|
92
|
+
<ColorSwatchDialog
|
|
93
|
+
colors={colors}
|
|
94
|
+
name="swatch-dialog"
|
|
95
|
+
buttonProps={{ 'aria-label': 'Example label' }}
|
|
96
|
+
/>
|
|
97
|
+
</ThemeProvider>;
|
|
98
|
+
```
|
package/dist/index.cjs.js
CHANGED
|
@@ -153,10 +153,10 @@ const getColorPickerWidth = props => {
|
|
|
153
153
|
};
|
|
154
154
|
const StyledColorPicker = styled__default.default.div.attrs({
|
|
155
155
|
'data-garden-id': COMPONENT_ID$m,
|
|
156
|
-
'data-garden-version': '9.0.0-next.
|
|
156
|
+
'data-garden-version': '9.0.0-next.3'
|
|
157
157
|
}).withConfig({
|
|
158
158
|
displayName: "StyledColorPicker",
|
|
159
|
-
componentId: "sc-
|
|
159
|
+
componentId: "sc-gspq4q-0"
|
|
160
160
|
})(["width:", "px;min-width:", "px;", ";"], getColorPickerWidth, getColorPickerWidth, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$m, props));
|
|
161
161
|
StyledColorPicker.defaultProps = {
|
|
162
162
|
theme: reactTheming.DEFAULT_THEME
|
|
@@ -289,7 +289,7 @@ const sizeStyles$2 = props => {
|
|
|
289
289
|
};
|
|
290
290
|
const StyledRange = styled__default.default(reactForms.Range).attrs({
|
|
291
291
|
'data-garden-id': COMPONENT_ID$l,
|
|
292
|
-
'data-garden-version': '9.0.0-next.
|
|
292
|
+
'data-garden-version': '9.0.0-next.3',
|
|
293
293
|
hasLowerTrack: false
|
|
294
294
|
}).withConfig({
|
|
295
295
|
displayName: "StyledRange",
|
|
@@ -304,10 +304,10 @@ StyledRange.defaultProps = {
|
|
|
304
304
|
const COMPONENT_ID$k = 'colorpickers.colorpicker_hue';
|
|
305
305
|
const StyledHueRange = styled__default.default(StyledRange).attrs({
|
|
306
306
|
'data-garden-id': COMPONENT_ID$k,
|
|
307
|
-
'data-garden-version': '9.0.0-next.
|
|
307
|
+
'data-garden-version': '9.0.0-next.3'
|
|
308
308
|
}).withConfig({
|
|
309
309
|
displayName: "StyledHueRange",
|
|
310
|
-
componentId: "sc-
|
|
310
|
+
componentId: "sc-1gdhww1-0"
|
|
311
311
|
})(["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));
|
|
312
312
|
StyledHueRange.defaultProps = {
|
|
313
313
|
theme: reactTheming.DEFAULT_THEME
|
|
@@ -348,10 +348,10 @@ const StyledAlphaRange = styled__default.default(StyledRange).attrs(props => ({
|
|
|
348
348
|
background: background$3(props)
|
|
349
349
|
},
|
|
350
350
|
'data-garden-id': COMPONENT_ID$j,
|
|
351
|
-
'data-garden-version': '9.0.0-next.
|
|
351
|
+
'data-garden-version': '9.0.0-next.3'
|
|
352
352
|
})).withConfig({
|
|
353
353
|
displayName: "StyledAlphaRange",
|
|
354
|
-
componentId: "sc-
|
|
354
|
+
componentId: "sc-1f6hp2j-0"
|
|
355
355
|
})([""]);
|
|
356
356
|
StyledAlphaRange.defaultProps = {
|
|
357
357
|
theme: reactTheming.DEFAULT_THEME
|
|
@@ -372,11 +372,11 @@ const StyledPreview = styled__default.default.div.attrs(props => ({
|
|
|
372
372
|
background: background$2(props)
|
|
373
373
|
},
|
|
374
374
|
'data-garden-id': COMPONENT_ID$i,
|
|
375
|
-
'data-garden-version': '9.0.0-next.
|
|
375
|
+
'data-garden-version': '9.0.0-next.3',
|
|
376
376
|
'data-test-id': 'preview-box'
|
|
377
377
|
})).withConfig({
|
|
378
378
|
displayName: "StyledPreview",
|
|
379
|
-
componentId: "sc-
|
|
379
|
+
componentId: "sc-1z5nh7-0"
|
|
380
380
|
})(["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));
|
|
381
381
|
StyledPreview.defaultProps = {
|
|
382
382
|
theme: reactTheming.DEFAULT_THEME
|
|
@@ -394,14 +394,14 @@ const background$1 = props => {
|
|
|
394
394
|
};
|
|
395
395
|
const StyledColorWell = styled__default.default.div.attrs(props => ({
|
|
396
396
|
'data-garden-id': COMPONENT_ID$h,
|
|
397
|
-
'data-garden-version': '9.0.0-next.
|
|
397
|
+
'data-garden-version': '9.0.0-next.3',
|
|
398
398
|
'data-test-id': 'colorwell',
|
|
399
399
|
style: {
|
|
400
400
|
background: background$1(props)
|
|
401
401
|
}
|
|
402
402
|
})).withConfig({
|
|
403
403
|
displayName: "StyledColorWell",
|
|
404
|
-
componentId: "sc-
|
|
404
|
+
componentId: "sc-1gg9z8m-0"
|
|
405
405
|
})(["position:relative;margin-bottom:", "px;cursor:pointer;height:208px;overflow:hidden;", ";"], props => props.theme.space.base * 2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$h, props));
|
|
406
406
|
StyledColorWell.defaultProps = {
|
|
407
407
|
theme: reactTheming.DEFAULT_THEME
|
|
@@ -422,7 +422,7 @@ const sizeStyles$1 = theme => {
|
|
|
422
422
|
};
|
|
423
423
|
const StyledColorWellThumb = styled__default.default.div.attrs(props => ({
|
|
424
424
|
'data-garden-id': COMPONENT_ID$g,
|
|
425
|
-
'data-garden-version': '9.0.0-next.
|
|
425
|
+
'data-garden-version': '9.0.0-next.3',
|
|
426
426
|
'data-test-id': 'colorwell-thumb',
|
|
427
427
|
style: {
|
|
428
428
|
top: `${props.top}%`,
|
|
@@ -430,7 +430,7 @@ const StyledColorWellThumb = styled__default.default.div.attrs(props => ({
|
|
|
430
430
|
}
|
|
431
431
|
})).withConfig({
|
|
432
432
|
displayName: "StyledColorWellThumb",
|
|
433
|
-
componentId: "sc-
|
|
433
|
+
componentId: "sc-1npyab0-0"
|
|
434
434
|
})(["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.getColor('neutralHue', 800, props.theme, 0.24)), props => sizeStyles$1(props.theme), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$g, props));
|
|
435
435
|
StyledColorWellThumb.defaultProps = {
|
|
436
436
|
theme: reactTheming.DEFAULT_THEME
|
|
@@ -439,10 +439,10 @@ StyledColorWellThumb.defaultProps = {
|
|
|
439
439
|
const COMPONENT_ID$f = 'colorpickers.colorpicker_slider_group';
|
|
440
440
|
const StyledSliderGroup = styled__default.default.div.attrs({
|
|
441
441
|
'data-garden-id': COMPONENT_ID$f,
|
|
442
|
-
'data-garden-version': '9.0.0-next.
|
|
442
|
+
'data-garden-version': '9.0.0-next.3'
|
|
443
443
|
}).withConfig({
|
|
444
444
|
displayName: "StyledSliderGroup",
|
|
445
|
-
componentId: "sc-
|
|
445
|
+
componentId: "sc-tigkzg-0"
|
|
446
446
|
})(["display:flex;justify-content:space-between;margin-bottom:", "px;", ";"], props => props.theme.space.base * 2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$f, props));
|
|
447
447
|
StyledSliderGroup.defaultProps = {
|
|
448
448
|
theme: reactTheming.DEFAULT_THEME
|
|
@@ -451,11 +451,11 @@ StyledSliderGroup.defaultProps = {
|
|
|
451
451
|
const COMPONENT_ID$e = 'colorpickers.colorpicker_hex_field';
|
|
452
452
|
const StyledHexField = styled__default.default(reactForms.Field).attrs({
|
|
453
453
|
'data-garden-id': COMPONENT_ID$e,
|
|
454
|
-
'data-garden-version': '9.0.0-next.
|
|
454
|
+
'data-garden-version': '9.0.0-next.3',
|
|
455
455
|
spellcheck: false
|
|
456
456
|
}).withConfig({
|
|
457
457
|
displayName: "StyledHexField",
|
|
458
|
-
componentId: "sc-
|
|
458
|
+
componentId: "sc-ijq1c-0"
|
|
459
459
|
})(["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));
|
|
460
460
|
StyledHexField.defaultProps = {
|
|
461
461
|
theme: reactTheming.DEFAULT_THEME
|
|
@@ -464,10 +464,10 @@ StyledHexField.defaultProps = {
|
|
|
464
464
|
const COMPONENT_ID$d = 'colorpickers.colorpicker_label';
|
|
465
465
|
const StyledLabel = styled__default.default(reactForms.Label).attrs({
|
|
466
466
|
'data-garden-id': COMPONENT_ID$d,
|
|
467
|
-
'data-garden-version': '9.0.0-next.
|
|
467
|
+
'data-garden-version': '9.0.0-next.3'
|
|
468
468
|
}).withConfig({
|
|
469
469
|
displayName: "StyledLabel",
|
|
470
|
-
componentId: "sc-
|
|
470
|
+
componentId: "sc-1vxt3m9-0"
|
|
471
471
|
})(["overflow:hidden;text-overflow:ellipsis;white-space:nowrap;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$d, props));
|
|
472
472
|
StyledLabel.defaultProps = {
|
|
473
473
|
theme: reactTheming.DEFAULT_THEME
|
|
@@ -476,11 +476,11 @@ StyledLabel.defaultProps = {
|
|
|
476
476
|
const COMPONENT_ID$c = 'colorpickers.colorpicker_input';
|
|
477
477
|
const StyledInput = styled__default.default(reactForms.Input).attrs({
|
|
478
478
|
'data-garden-id': COMPONENT_ID$c,
|
|
479
|
-
'data-garden-version': '9.0.0-next.
|
|
479
|
+
'data-garden-version': '9.0.0-next.3',
|
|
480
480
|
focusInset: false
|
|
481
481
|
}).withConfig({
|
|
482
482
|
displayName: "StyledInput",
|
|
483
|
-
componentId: "sc-
|
|
483
|
+
componentId: "sc-1uzlutt-0"
|
|
484
484
|
})(["text-align:center;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$c, props));
|
|
485
485
|
StyledInput.defaultProps = {
|
|
486
486
|
theme: reactTheming.DEFAULT_THEME
|
|
@@ -489,10 +489,10 @@ StyledInput.defaultProps = {
|
|
|
489
489
|
const COMPONENT_ID$b = 'colorpickers.colorpicker_input_group';
|
|
490
490
|
const StyledInputGroup = styled__default.default.div.attrs({
|
|
491
491
|
'data-garden-id': COMPONENT_ID$b,
|
|
492
|
-
'data-garden-version': '9.0.0-next.
|
|
492
|
+
'data-garden-version': '9.0.0-next.3'
|
|
493
493
|
}).withConfig({
|
|
494
494
|
displayName: "StyledInputGroup",
|
|
495
|
-
componentId: "sc-
|
|
495
|
+
componentId: "sc-1m9g2wg-0"
|
|
496
496
|
})(["display:flex;justify-content:space-between;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$b, props));
|
|
497
497
|
StyledInputGroup.defaultProps = {
|
|
498
498
|
theme: reactTheming.DEFAULT_THEME
|
|
@@ -510,10 +510,10 @@ const sizeStyles = theme => {
|
|
|
510
510
|
};
|
|
511
511
|
const StyledRGBAField = styled__default.default(reactForms.Field).attrs({
|
|
512
512
|
'data-garden-id': COMPONENT_ID$a,
|
|
513
|
-
'data-garden-version': '9.0.0-next.
|
|
513
|
+
'data-garden-version': '9.0.0-next.3'
|
|
514
514
|
}).withConfig({
|
|
515
515
|
displayName: "StyledRGBAField",
|
|
516
|
-
componentId: "sc-
|
|
516
|
+
componentId: "sc-13266k8-0"
|
|
517
517
|
})(["display:flex;flex-direction:column;text-align:center;", ";", ";"], props => sizeStyles(props.theme), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$a, props));
|
|
518
518
|
StyledRGBAField.defaultProps = {
|
|
519
519
|
theme: reactTheming.DEFAULT_THEME
|
|
@@ -522,10 +522,10 @@ StyledRGBAField.defaultProps = {
|
|
|
522
522
|
const COMPONENT_ID$9 = 'colorpickers.colorpicker_sliders';
|
|
523
523
|
const StyledSliders = styled__default.default.div.attrs({
|
|
524
524
|
'data-garden-id': COMPONENT_ID$9,
|
|
525
|
-
'data-garden-version': '9.0.0-next.
|
|
525
|
+
'data-garden-version': '9.0.0-next.3'
|
|
526
526
|
}).withConfig({
|
|
527
527
|
displayName: "StyledSliders",
|
|
528
|
-
componentId: "sc-
|
|
528
|
+
componentId: "sc-1lgr50m-0"
|
|
529
529
|
})(["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));
|
|
530
530
|
StyledSliders.defaultProps = {
|
|
531
531
|
theme: reactTheming.DEFAULT_THEME
|
|
@@ -535,10 +535,10 @@ const COMPONENT_ID$8 = 'colorpickers.colordialog_button';
|
|
|
535
535
|
const StyledButton = styled__default.default(reactButtons.Button).attrs({
|
|
536
536
|
isNeutral: true,
|
|
537
537
|
'data-garden-id': COMPONENT_ID$8,
|
|
538
|
-
'data-garden-version': '9.0.0-next.
|
|
538
|
+
'data-garden-version': '9.0.0-next.3'
|
|
539
539
|
}).withConfig({
|
|
540
540
|
displayName: "StyledButton",
|
|
541
|
-
componentId: "sc-
|
|
541
|
+
componentId: "sc-1dlijfv-0"
|
|
542
542
|
})(["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));
|
|
543
543
|
StyledButton.defaultProps = {
|
|
544
544
|
theme: reactTheming.DEFAULT_THEME
|
|
@@ -570,11 +570,11 @@ const StyledButtonPreview = styled__default.default.span.attrs(props => ({
|
|
|
570
570
|
background: `${background(props)}, ${checkeredBackground(props.theme, 8)}`
|
|
571
571
|
},
|
|
572
572
|
'data-garden-id': COMPONENT_ID$7,
|
|
573
|
-
'data-garden-version': '9.0.0-next.
|
|
573
|
+
'data-garden-version': '9.0.0-next.3',
|
|
574
574
|
'data-test-id': 'dialog-preview'
|
|
575
575
|
})).withConfig({
|
|
576
576
|
displayName: "StyledButtonPreview",
|
|
577
|
-
componentId: "sc-
|
|
577
|
+
componentId: "sc-yxis8h-0"
|
|
578
578
|
})(["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));
|
|
579
579
|
StyledButtonPreview.defaultProps = {
|
|
580
580
|
theme: reactTheming.DEFAULT_THEME
|
|
@@ -583,10 +583,10 @@ StyledButtonPreview.defaultProps = {
|
|
|
583
583
|
const COMPONENT_ID$6 = 'colorpickers.colordialog_tooltipmodal';
|
|
584
584
|
const StyledTooltipModal = styled__default.default(reactModals.TooltipModal).attrs({
|
|
585
585
|
'data-garden-id': COMPONENT_ID$6,
|
|
586
|
-
'data-garden-version': '9.0.0-next.
|
|
586
|
+
'data-garden-version': '9.0.0-next.3'
|
|
587
587
|
}).withConfig({
|
|
588
588
|
displayName: "StyledTooltipModal",
|
|
589
|
-
componentId: "sc-
|
|
589
|
+
componentId: "sc-gykkrw-0"
|
|
590
590
|
})(["width:auto !important;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$6, props));
|
|
591
591
|
StyledTooltipModal.defaultProps = {
|
|
592
592
|
theme: reactTheming.DEFAULT_THEME
|
|
@@ -595,10 +595,10 @@ StyledTooltipModal.defaultProps = {
|
|
|
595
595
|
const COMPONENT_ID$5 = 'colorpickers.colordialog_tooltipmodal_body';
|
|
596
596
|
const StyledTooltipBody = styled__default.default(reactModals.TooltipModal.Body).attrs({
|
|
597
597
|
'data-garden-id': COMPONENT_ID$5,
|
|
598
|
-
'data-garden-version': '9.0.0-next.
|
|
598
|
+
'data-garden-version': '9.0.0-next.3'
|
|
599
599
|
}).withConfig({
|
|
600
600
|
displayName: "StyledTooltipBody",
|
|
601
|
-
componentId: "sc-
|
|
601
|
+
componentId: "sc-1ueddpo-0"
|
|
602
602
|
})(["padding:0;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$5, props));
|
|
603
603
|
StyledTooltipBody.defaultProps = {
|
|
604
604
|
theme: reactTheming.DEFAULT_THEME
|
|
@@ -607,7 +607,7 @@ StyledTooltipBody.defaultProps = {
|
|
|
607
607
|
const COMPONENT_ID$4 = 'colorpickers.color_swatch';
|
|
608
608
|
const StyledColorSwatch = styled__default.default.table.attrs({
|
|
609
609
|
'data-garden-id': COMPONENT_ID$4,
|
|
610
|
-
'data-garden-version': '9.0.0-next.
|
|
610
|
+
'data-garden-version': '9.0.0-next.3'
|
|
611
611
|
}).withConfig({
|
|
612
612
|
displayName: "StyledColorSwatch",
|
|
613
613
|
componentId: "sc-ajx440-0"
|
|
@@ -619,18 +619,17 @@ StyledColorSwatch.defaultProps = {
|
|
|
619
619
|
const COMPONENT_ID$3 = 'colorpickers.color_swatch_input';
|
|
620
620
|
const StyledColorSwatchInput = styled__default.default.input.attrs({
|
|
621
621
|
'data-garden-id': COMPONENT_ID$3,
|
|
622
|
-
'data-garden-version': '9.0.0-next.
|
|
622
|
+
'data-garden-version': '9.0.0-next.3'
|
|
623
623
|
}).withConfig({
|
|
624
624
|
displayName: "StyledColorSwatchInput",
|
|
625
625
|
componentId: "sc-em45h0-0"
|
|
626
|
-
})(["position:absolute;opacity:0;z-index:1;margin:0;width:100%;height:100%;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
|
|
626
|
+
})(["position:absolute;opacity:0;z-index:1;margin:0;cursor:pointer;width:100%;height:100%;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
|
|
627
627
|
StyledColorSwatchInput.defaultProps = {
|
|
628
628
|
theme: reactTheming.DEFAULT_THEME
|
|
629
629
|
};
|
|
630
630
|
|
|
631
631
|
const COMPONENT_ID$2 = 'colorpickers.color_swatch_label';
|
|
632
632
|
const colorStyles = props => {
|
|
633
|
-
const boxShadow = props.theme.shadows.md(reactTheming.getColor('primaryHue', 600, props.theme, 0.35));
|
|
634
633
|
const {
|
|
635
634
|
alpha
|
|
636
635
|
} = polished.parseToRgb(props.backgroundColor);
|
|
@@ -642,19 +641,19 @@ const colorStyles = props => {
|
|
|
642
641
|
}
|
|
643
642
|
return `
|
|
644
643
|
color: ${foregroundColor};
|
|
645
|
-
|
|
646
|
-
&[data-garden-focus-visible] {
|
|
647
|
-
box-shadow: ${boxShadow};
|
|
648
644
|
`;
|
|
649
645
|
};
|
|
650
646
|
const StyledColorSwatchLabel = styled__default.default(StyledButtonPreview).attrs({
|
|
651
647
|
as: 'label',
|
|
652
648
|
'data-garden-id': COMPONENT_ID$2,
|
|
653
|
-
'data-garden-version': '9.0.0-next.
|
|
649
|
+
'data-garden-version': '9.0.0-next.3'
|
|
654
650
|
}).withConfig({
|
|
655
651
|
displayName: "StyledColorSwatchLabel",
|
|
656
652
|
componentId: "sc-1aghocg-0"
|
|
657
|
-
})(["position:relative;border-radius:", ";
|
|
653
|
+
})(["position:relative;top:0;border-radius:", ";", ";", " ", ";"], props => props.theme.borderRadii.md, colorStyles, props => reactTheming.focusStyles({
|
|
654
|
+
theme: props.theme,
|
|
655
|
+
selector: '&:has(:focus-visible)'
|
|
656
|
+
}), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$2, props));
|
|
658
657
|
StyledColorSwatchLabel.defaultProps = {
|
|
659
658
|
theme: reactTheming.DEFAULT_THEME
|
|
660
659
|
};
|
|
@@ -682,7 +681,7 @@ var SvgCheckSmFill = function SvgCheckSmFill(props) {
|
|
|
682
681
|
const COMPONENT_ID$1 = 'colorpickers.colorswatch_check';
|
|
683
682
|
const StyledIcon = styled__default.default(SvgCheckSmFill).attrs({
|
|
684
683
|
'data-garden-id': COMPONENT_ID$1,
|
|
685
|
-
'data-garden-version': '9.0.0-next.
|
|
684
|
+
'data-garden-version': '9.0.0-next.3'
|
|
686
685
|
}).withConfig({
|
|
687
686
|
displayName: "StyledIcon",
|
|
688
687
|
componentId: "sc-8oigif-0"
|
|
@@ -694,7 +693,7 @@ StyledIcon.defaultProps = {
|
|
|
694
693
|
const COMPONENT_ID = 'colorpickers.swatch_cell';
|
|
695
694
|
const StyledCell = styled__default.default.td.attrs({
|
|
696
695
|
'data-garden-id': COMPONENT_ID,
|
|
697
|
-
'data-garden-version': '9.0.0-next.
|
|
696
|
+
'data-garden-version': '9.0.0-next.3'
|
|
698
697
|
}).withConfig({
|
|
699
698
|
displayName: "StyledCell",
|
|
700
699
|
componentId: "sc-qr3oit-0"
|
|
@@ -1046,7 +1045,7 @@ const reducer = (state, action) => {
|
|
|
1046
1045
|
}
|
|
1047
1046
|
};
|
|
1048
1047
|
|
|
1049
|
-
const
|
|
1048
|
+
const ColorPicker = React.forwardRef((_ref, ref) => {
|
|
1050
1049
|
let {
|
|
1051
1050
|
color,
|
|
1052
1051
|
defaultColor,
|
|
@@ -1236,11 +1235,11 @@ const Colorpicker = React.forwardRef((_ref, ref) => {
|
|
|
1236
1235
|
onChange: handleAlphaChange
|
|
1237
1236
|
}))));
|
|
1238
1237
|
});
|
|
1239
|
-
|
|
1238
|
+
ColorPicker.defaultProps = {
|
|
1240
1239
|
defaultColor: '#fff'
|
|
1241
1240
|
};
|
|
1242
|
-
|
|
1243
|
-
|
|
1241
|
+
ColorPicker.displayName = 'ColorPicker';
|
|
1242
|
+
ColorPicker.propTypes = {
|
|
1244
1243
|
color: PropTypes__default.default.oneOfType([PropTypes__default.default.object, PropTypes__default.default.string]),
|
|
1245
1244
|
isOpaque: PropTypes__default.default.bool,
|
|
1246
1245
|
onChange: PropTypes__default.default.func,
|
|
@@ -1264,7 +1263,7 @@ var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
|
|
|
1264
1263
|
})));
|
|
1265
1264
|
};
|
|
1266
1265
|
|
|
1267
|
-
const
|
|
1266
|
+
const ColorPickerDialog = React.forwardRef((_ref, ref) => {
|
|
1268
1267
|
let {
|
|
1269
1268
|
color,
|
|
1270
1269
|
defaultColor,
|
|
@@ -1291,7 +1290,7 @@ const ColorpickerDialog = React.forwardRef((_ref, ref) => {
|
|
|
1291
1290
|
const colorPickerRef = React.useRef(null);
|
|
1292
1291
|
const [referenceElement, setReferenceElement] = React.useState();
|
|
1293
1292
|
const [uncontrolledColor, setUncontrolledColor] = React.useState(defaultColor);
|
|
1294
|
-
const ariaLabelText = reactTheming.useText(
|
|
1293
|
+
const ariaLabelText = reactTheming.useText(ColorPickerDialog, {
|
|
1295
1294
|
'aria-label': ariaLabel
|
|
1296
1295
|
}, 'aria-label', 'Color picker');
|
|
1297
1296
|
const openDialog = () => {
|
|
@@ -1348,7 +1347,7 @@ const ColorpickerDialog = React.forwardRef((_ref, ref) => {
|
|
|
1348
1347
|
onClose && onClose(isControlled ? color : uncontrolledColor);
|
|
1349
1348
|
},
|
|
1350
1349
|
"aria-label": ariaLabelText
|
|
1351
|
-
}, props), React__namespace.default.createElement(StyledTooltipBody, null, React__namespace.default.createElement(
|
|
1350
|
+
}, props), React__namespace.default.createElement(StyledTooltipBody, null, React__namespace.default.createElement(ColorPicker, {
|
|
1352
1351
|
autofocus: true,
|
|
1353
1352
|
color: color,
|
|
1354
1353
|
isOpaque: isOpaque,
|
|
@@ -1358,8 +1357,8 @@ const ColorpickerDialog = React.forwardRef((_ref, ref) => {
|
|
|
1358
1357
|
onChange: isControlled ? onChange : setUncontrolledColor
|
|
1359
1358
|
}))));
|
|
1360
1359
|
});
|
|
1361
|
-
|
|
1362
|
-
...
|
|
1360
|
+
ColorPickerDialog.propTypes = {
|
|
1361
|
+
...ColorPicker.propTypes,
|
|
1363
1362
|
placement: PropTypes__default.default.oneOf(reactModals.PLACEMENT),
|
|
1364
1363
|
onClose: PropTypes__default.default.func,
|
|
1365
1364
|
onDialogChange: PropTypes__default.default.func,
|
|
@@ -1372,13 +1371,13 @@ ColorpickerDialog.propTypes = {
|
|
|
1372
1371
|
isOpen: PropTypes__default.default.bool,
|
|
1373
1372
|
focusInset: PropTypes__default.default.bool
|
|
1374
1373
|
};
|
|
1375
|
-
|
|
1374
|
+
ColorPickerDialog.defaultProps = {
|
|
1376
1375
|
placement: 'bottom-start',
|
|
1377
1376
|
isAnimated: true,
|
|
1378
1377
|
zIndex: 1000,
|
|
1379
1378
|
hasArrow: false
|
|
1380
1379
|
};
|
|
1381
|
-
|
|
1380
|
+
ColorPickerDialog.displayName = 'ColorPickerDialog';
|
|
1382
1381
|
|
|
1383
1382
|
const ColorSwatch = React.forwardRef((_ref, ref) => {
|
|
1384
1383
|
let {
|
|
@@ -1636,7 +1635,7 @@ ColorSwatchDialog.defaultProps = {
|
|
|
1636
1635
|
};
|
|
1637
1636
|
ColorSwatchDialog.displayName = 'ColorSwatchDialog';
|
|
1638
1637
|
|
|
1638
|
+
exports.ColorPicker = ColorPicker;
|
|
1639
|
+
exports.ColorPickerDialog = ColorPickerDialog;
|
|
1639
1640
|
exports.ColorSwatch = ColorSwatch;
|
|
1640
1641
|
exports.ColorSwatchDialog = ColorSwatchDialog;
|
|
1641
|
-
exports.Colorpicker = Colorpicker;
|
|
1642
|
-
exports.ColorpickerDialog = ColorpickerDialog;
|
package/dist/index.esm.js
CHANGED
|
@@ -11,7 +11,7 @@ import PropTypes from 'prop-types';
|
|
|
11
11
|
import { Range, Field, Label, Input } from '@zendeskgarden/react-forms';
|
|
12
12
|
import throttle from 'lodash.throttle';
|
|
13
13
|
import styled, { ThemeContext } from 'styled-components';
|
|
14
|
-
import { retrieveComponentStyles, DEFAULT_THEME, getColor, useText, useDocument } from '@zendeskgarden/react-theming';
|
|
14
|
+
import { retrieveComponentStyles, DEFAULT_THEME, getColor, focusStyles, useText, useDocument } from '@zendeskgarden/react-theming';
|
|
15
15
|
import { stripUnit, math, rgba, hsl, parseToRgb, readableColor, parseToHsl, rgb } from 'polished';
|
|
16
16
|
import { Button } from '@zendeskgarden/react-buttons';
|
|
17
17
|
import { TooltipModal, PLACEMENT } from '@zendeskgarden/react-modals';
|
|
@@ -126,10 +126,10 @@ const getColorPickerWidth = props => {
|
|
|
126
126
|
};
|
|
127
127
|
const StyledColorPicker = styled.div.attrs({
|
|
128
128
|
'data-garden-id': COMPONENT_ID$m,
|
|
129
|
-
'data-garden-version': '9.0.0-next.
|
|
129
|
+
'data-garden-version': '9.0.0-next.3'
|
|
130
130
|
}).withConfig({
|
|
131
131
|
displayName: "StyledColorPicker",
|
|
132
|
-
componentId: "sc-
|
|
132
|
+
componentId: "sc-gspq4q-0"
|
|
133
133
|
})(["width:", "px;min-width:", "px;", ";"], getColorPickerWidth, getColorPickerWidth, props => retrieveComponentStyles(COMPONENT_ID$m, props));
|
|
134
134
|
StyledColorPicker.defaultProps = {
|
|
135
135
|
theme: DEFAULT_THEME
|
|
@@ -262,7 +262,7 @@ const sizeStyles$2 = props => {
|
|
|
262
262
|
};
|
|
263
263
|
const StyledRange = styled(Range).attrs({
|
|
264
264
|
'data-garden-id': COMPONENT_ID$l,
|
|
265
|
-
'data-garden-version': '9.0.0-next.
|
|
265
|
+
'data-garden-version': '9.0.0-next.3',
|
|
266
266
|
hasLowerTrack: false
|
|
267
267
|
}).withConfig({
|
|
268
268
|
displayName: "StyledRange",
|
|
@@ -277,10 +277,10 @@ StyledRange.defaultProps = {
|
|
|
277
277
|
const COMPONENT_ID$k = 'colorpickers.colorpicker_hue';
|
|
278
278
|
const StyledHueRange = styled(StyledRange).attrs({
|
|
279
279
|
'data-garden-id': COMPONENT_ID$k,
|
|
280
|
-
'data-garden-version': '9.0.0-next.
|
|
280
|
+
'data-garden-version': '9.0.0-next.3'
|
|
281
281
|
}).withConfig({
|
|
282
282
|
displayName: "StyledHueRange",
|
|
283
|
-
componentId: "sc-
|
|
283
|
+
componentId: "sc-1gdhww1-0"
|
|
284
284
|
})(["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));
|
|
285
285
|
StyledHueRange.defaultProps = {
|
|
286
286
|
theme: DEFAULT_THEME
|
|
@@ -321,10 +321,10 @@ const StyledAlphaRange = styled(StyledRange).attrs(props => ({
|
|
|
321
321
|
background: background$3(props)
|
|
322
322
|
},
|
|
323
323
|
'data-garden-id': COMPONENT_ID$j,
|
|
324
|
-
'data-garden-version': '9.0.0-next.
|
|
324
|
+
'data-garden-version': '9.0.0-next.3'
|
|
325
325
|
})).withConfig({
|
|
326
326
|
displayName: "StyledAlphaRange",
|
|
327
|
-
componentId: "sc-
|
|
327
|
+
componentId: "sc-1f6hp2j-0"
|
|
328
328
|
})([""]);
|
|
329
329
|
StyledAlphaRange.defaultProps = {
|
|
330
330
|
theme: DEFAULT_THEME
|
|
@@ -345,11 +345,11 @@ const StyledPreview = styled.div.attrs(props => ({
|
|
|
345
345
|
background: background$2(props)
|
|
346
346
|
},
|
|
347
347
|
'data-garden-id': COMPONENT_ID$i,
|
|
348
|
-
'data-garden-version': '9.0.0-next.
|
|
348
|
+
'data-garden-version': '9.0.0-next.3',
|
|
349
349
|
'data-test-id': 'preview-box'
|
|
350
350
|
})).withConfig({
|
|
351
351
|
displayName: "StyledPreview",
|
|
352
|
-
componentId: "sc-
|
|
352
|
+
componentId: "sc-1z5nh7-0"
|
|
353
353
|
})(["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 => 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 => retrieveComponentStyles(COMPONENT_ID$i, props));
|
|
354
354
|
StyledPreview.defaultProps = {
|
|
355
355
|
theme: DEFAULT_THEME
|
|
@@ -367,14 +367,14 @@ const background$1 = props => {
|
|
|
367
367
|
};
|
|
368
368
|
const StyledColorWell = styled.div.attrs(props => ({
|
|
369
369
|
'data-garden-id': COMPONENT_ID$h,
|
|
370
|
-
'data-garden-version': '9.0.0-next.
|
|
370
|
+
'data-garden-version': '9.0.0-next.3',
|
|
371
371
|
'data-test-id': 'colorwell',
|
|
372
372
|
style: {
|
|
373
373
|
background: background$1(props)
|
|
374
374
|
}
|
|
375
375
|
})).withConfig({
|
|
376
376
|
displayName: "StyledColorWell",
|
|
377
|
-
componentId: "sc-
|
|
377
|
+
componentId: "sc-1gg9z8m-0"
|
|
378
378
|
})(["position:relative;margin-bottom:", "px;cursor:pointer;height:208px;overflow:hidden;", ";"], props => props.theme.space.base * 2, props => retrieveComponentStyles(COMPONENT_ID$h, props));
|
|
379
379
|
StyledColorWell.defaultProps = {
|
|
380
380
|
theme: DEFAULT_THEME
|
|
@@ -395,7 +395,7 @@ const sizeStyles$1 = theme => {
|
|
|
395
395
|
};
|
|
396
396
|
const StyledColorWellThumb = styled.div.attrs(props => ({
|
|
397
397
|
'data-garden-id': COMPONENT_ID$g,
|
|
398
|
-
'data-garden-version': '9.0.0-next.
|
|
398
|
+
'data-garden-version': '9.0.0-next.3',
|
|
399
399
|
'data-test-id': 'colorwell-thumb',
|
|
400
400
|
style: {
|
|
401
401
|
top: `${props.top}%`,
|
|
@@ -403,7 +403,7 @@ const StyledColorWellThumb = styled.div.attrs(props => ({
|
|
|
403
403
|
}
|
|
404
404
|
})).withConfig({
|
|
405
405
|
displayName: "StyledColorWellThumb",
|
|
406
|
-
componentId: "sc-
|
|
406
|
+
componentId: "sc-1npyab0-0"
|
|
407
407
|
})(["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`, getColor('neutralHue', 800, props.theme, 0.24)), props => sizeStyles$1(props.theme), props => retrieveComponentStyles(COMPONENT_ID$g, props));
|
|
408
408
|
StyledColorWellThumb.defaultProps = {
|
|
409
409
|
theme: DEFAULT_THEME
|
|
@@ -412,10 +412,10 @@ StyledColorWellThumb.defaultProps = {
|
|
|
412
412
|
const COMPONENT_ID$f = 'colorpickers.colorpicker_slider_group';
|
|
413
413
|
const StyledSliderGroup = styled.div.attrs({
|
|
414
414
|
'data-garden-id': COMPONENT_ID$f,
|
|
415
|
-
'data-garden-version': '9.0.0-next.
|
|
415
|
+
'data-garden-version': '9.0.0-next.3'
|
|
416
416
|
}).withConfig({
|
|
417
417
|
displayName: "StyledSliderGroup",
|
|
418
|
-
componentId: "sc-
|
|
418
|
+
componentId: "sc-tigkzg-0"
|
|
419
419
|
})(["display:flex;justify-content:space-between;margin-bottom:", "px;", ";"], props => props.theme.space.base * 2, props => retrieveComponentStyles(COMPONENT_ID$f, props));
|
|
420
420
|
StyledSliderGroup.defaultProps = {
|
|
421
421
|
theme: DEFAULT_THEME
|
|
@@ -424,11 +424,11 @@ StyledSliderGroup.defaultProps = {
|
|
|
424
424
|
const COMPONENT_ID$e = 'colorpickers.colorpicker_hex_field';
|
|
425
425
|
const StyledHexField = styled(Field).attrs({
|
|
426
426
|
'data-garden-id': COMPONENT_ID$e,
|
|
427
|
-
'data-garden-version': '9.0.0-next.
|
|
427
|
+
'data-garden-version': '9.0.0-next.3',
|
|
428
428
|
spellcheck: false
|
|
429
429
|
}).withConfig({
|
|
430
430
|
displayName: "StyledHexField",
|
|
431
|
-
componentId: "sc-
|
|
431
|
+
componentId: "sc-ijq1c-0"
|
|
432
432
|
})(["display:flex;flex-basis:0;flex-direction:column;flex-grow:1;width:auto;text-align:center;input{direction:ltr;}", ";"], props => retrieveComponentStyles(COMPONENT_ID$e, props));
|
|
433
433
|
StyledHexField.defaultProps = {
|
|
434
434
|
theme: DEFAULT_THEME
|
|
@@ -437,10 +437,10 @@ StyledHexField.defaultProps = {
|
|
|
437
437
|
const COMPONENT_ID$d = 'colorpickers.colorpicker_label';
|
|
438
438
|
const StyledLabel = styled(Label).attrs({
|
|
439
439
|
'data-garden-id': COMPONENT_ID$d,
|
|
440
|
-
'data-garden-version': '9.0.0-next.
|
|
440
|
+
'data-garden-version': '9.0.0-next.3'
|
|
441
441
|
}).withConfig({
|
|
442
442
|
displayName: "StyledLabel",
|
|
443
|
-
componentId: "sc-
|
|
443
|
+
componentId: "sc-1vxt3m9-0"
|
|
444
444
|
})(["overflow:hidden;text-overflow:ellipsis;white-space:nowrap;", ";"], props => retrieveComponentStyles(COMPONENT_ID$d, props));
|
|
445
445
|
StyledLabel.defaultProps = {
|
|
446
446
|
theme: DEFAULT_THEME
|
|
@@ -449,11 +449,11 @@ StyledLabel.defaultProps = {
|
|
|
449
449
|
const COMPONENT_ID$c = 'colorpickers.colorpicker_input';
|
|
450
450
|
const StyledInput = styled(Input).attrs({
|
|
451
451
|
'data-garden-id': COMPONENT_ID$c,
|
|
452
|
-
'data-garden-version': '9.0.0-next.
|
|
452
|
+
'data-garden-version': '9.0.0-next.3',
|
|
453
453
|
focusInset: false
|
|
454
454
|
}).withConfig({
|
|
455
455
|
displayName: "StyledInput",
|
|
456
|
-
componentId: "sc-
|
|
456
|
+
componentId: "sc-1uzlutt-0"
|
|
457
457
|
})(["text-align:center;", ";"], props => retrieveComponentStyles(COMPONENT_ID$c, props));
|
|
458
458
|
StyledInput.defaultProps = {
|
|
459
459
|
theme: DEFAULT_THEME
|
|
@@ -462,10 +462,10 @@ StyledInput.defaultProps = {
|
|
|
462
462
|
const COMPONENT_ID$b = 'colorpickers.colorpicker_input_group';
|
|
463
463
|
const StyledInputGroup = styled.div.attrs({
|
|
464
464
|
'data-garden-id': COMPONENT_ID$b,
|
|
465
|
-
'data-garden-version': '9.0.0-next.
|
|
465
|
+
'data-garden-version': '9.0.0-next.3'
|
|
466
466
|
}).withConfig({
|
|
467
467
|
displayName: "StyledInputGroup",
|
|
468
|
-
componentId: "sc-
|
|
468
|
+
componentId: "sc-1m9g2wg-0"
|
|
469
469
|
})(["display:flex;justify-content:space-between;", ";"], props => retrieveComponentStyles(COMPONENT_ID$b, props));
|
|
470
470
|
StyledInputGroup.defaultProps = {
|
|
471
471
|
theme: DEFAULT_THEME
|
|
@@ -483,10 +483,10 @@ const sizeStyles = theme => {
|
|
|
483
483
|
};
|
|
484
484
|
const StyledRGBAField = styled(Field).attrs({
|
|
485
485
|
'data-garden-id': COMPONENT_ID$a,
|
|
486
|
-
'data-garden-version': '9.0.0-next.
|
|
486
|
+
'data-garden-version': '9.0.0-next.3'
|
|
487
487
|
}).withConfig({
|
|
488
488
|
displayName: "StyledRGBAField",
|
|
489
|
-
componentId: "sc-
|
|
489
|
+
componentId: "sc-13266k8-0"
|
|
490
490
|
})(["display:flex;flex-direction:column;text-align:center;", ";", ";"], props => sizeStyles(props.theme), props => retrieveComponentStyles(COMPONENT_ID$a, props));
|
|
491
491
|
StyledRGBAField.defaultProps = {
|
|
492
492
|
theme: DEFAULT_THEME
|
|
@@ -495,10 +495,10 @@ StyledRGBAField.defaultProps = {
|
|
|
495
495
|
const COMPONENT_ID$9 = 'colorpickers.colorpicker_sliders';
|
|
496
496
|
const StyledSliders = styled.div.attrs({
|
|
497
497
|
'data-garden-id': COMPONENT_ID$9,
|
|
498
|
-
'data-garden-version': '9.0.0-next.
|
|
498
|
+
'data-garden-version': '9.0.0-next.3'
|
|
499
499
|
}).withConfig({
|
|
500
500
|
displayName: "StyledSliders",
|
|
501
|
-
componentId: "sc-
|
|
501
|
+
componentId: "sc-1lgr50m-0"
|
|
502
502
|
})(["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 => retrieveComponentStyles(COMPONENT_ID$9, props));
|
|
503
503
|
StyledSliders.defaultProps = {
|
|
504
504
|
theme: DEFAULT_THEME
|
|
@@ -508,10 +508,10 @@ const COMPONENT_ID$8 = 'colorpickers.colordialog_button';
|
|
|
508
508
|
const StyledButton = styled(Button).attrs({
|
|
509
509
|
isNeutral: true,
|
|
510
510
|
'data-garden-id': COMPONENT_ID$8,
|
|
511
|
-
'data-garden-version': '9.0.0-next.
|
|
511
|
+
'data-garden-version': '9.0.0-next.3'
|
|
512
512
|
}).withConfig({
|
|
513
513
|
displayName: "StyledButton",
|
|
514
|
-
componentId: "sc-
|
|
514
|
+
componentId: "sc-1dlijfv-0"
|
|
515
515
|
})(["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 => retrieveComponentStyles(COMPONENT_ID$8, props));
|
|
516
516
|
StyledButton.defaultProps = {
|
|
517
517
|
theme: DEFAULT_THEME
|
|
@@ -543,11 +543,11 @@ const StyledButtonPreview = styled.span.attrs(props => ({
|
|
|
543
543
|
background: `${background(props)}, ${checkeredBackground(props.theme, 8)}`
|
|
544
544
|
},
|
|
545
545
|
'data-garden-id': COMPONENT_ID$7,
|
|
546
|
-
'data-garden-version': '9.0.0-next.
|
|
546
|
+
'data-garden-version': '9.0.0-next.3',
|
|
547
547
|
'data-test-id': 'dialog-preview'
|
|
548
548
|
})).withConfig({
|
|
549
549
|
displayName: "StyledButtonPreview",
|
|
550
|
-
componentId: "sc-
|
|
550
|
+
componentId: "sc-yxis8h-0"
|
|
551
551
|
})(["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 => rgba(props.theme.palette.black, 0.19), props => props.theme.space.base * 5, props => props.theme.space.base * 5, props => retrieveComponentStyles(COMPONENT_ID$7, props));
|
|
552
552
|
StyledButtonPreview.defaultProps = {
|
|
553
553
|
theme: DEFAULT_THEME
|
|
@@ -556,10 +556,10 @@ StyledButtonPreview.defaultProps = {
|
|
|
556
556
|
const COMPONENT_ID$6 = 'colorpickers.colordialog_tooltipmodal';
|
|
557
557
|
const StyledTooltipModal = styled(TooltipModal).attrs({
|
|
558
558
|
'data-garden-id': COMPONENT_ID$6,
|
|
559
|
-
'data-garden-version': '9.0.0-next.
|
|
559
|
+
'data-garden-version': '9.0.0-next.3'
|
|
560
560
|
}).withConfig({
|
|
561
561
|
displayName: "StyledTooltipModal",
|
|
562
|
-
componentId: "sc-
|
|
562
|
+
componentId: "sc-gykkrw-0"
|
|
563
563
|
})(["width:auto !important;", ";"], props => retrieveComponentStyles(COMPONENT_ID$6, props));
|
|
564
564
|
StyledTooltipModal.defaultProps = {
|
|
565
565
|
theme: DEFAULT_THEME
|
|
@@ -568,10 +568,10 @@ StyledTooltipModal.defaultProps = {
|
|
|
568
568
|
const COMPONENT_ID$5 = 'colorpickers.colordialog_tooltipmodal_body';
|
|
569
569
|
const StyledTooltipBody = styled(TooltipModal.Body).attrs({
|
|
570
570
|
'data-garden-id': COMPONENT_ID$5,
|
|
571
|
-
'data-garden-version': '9.0.0-next.
|
|
571
|
+
'data-garden-version': '9.0.0-next.3'
|
|
572
572
|
}).withConfig({
|
|
573
573
|
displayName: "StyledTooltipBody",
|
|
574
|
-
componentId: "sc-
|
|
574
|
+
componentId: "sc-1ueddpo-0"
|
|
575
575
|
})(["padding:0;", ";"], props => retrieveComponentStyles(COMPONENT_ID$5, props));
|
|
576
576
|
StyledTooltipBody.defaultProps = {
|
|
577
577
|
theme: DEFAULT_THEME
|
|
@@ -580,7 +580,7 @@ StyledTooltipBody.defaultProps = {
|
|
|
580
580
|
const COMPONENT_ID$4 = 'colorpickers.color_swatch';
|
|
581
581
|
const StyledColorSwatch = styled.table.attrs({
|
|
582
582
|
'data-garden-id': COMPONENT_ID$4,
|
|
583
|
-
'data-garden-version': '9.0.0-next.
|
|
583
|
+
'data-garden-version': '9.0.0-next.3'
|
|
584
584
|
}).withConfig({
|
|
585
585
|
displayName: "StyledColorSwatch",
|
|
586
586
|
componentId: "sc-ajx440-0"
|
|
@@ -592,18 +592,17 @@ StyledColorSwatch.defaultProps = {
|
|
|
592
592
|
const COMPONENT_ID$3 = 'colorpickers.color_swatch_input';
|
|
593
593
|
const StyledColorSwatchInput = styled.input.attrs({
|
|
594
594
|
'data-garden-id': COMPONENT_ID$3,
|
|
595
|
-
'data-garden-version': '9.0.0-next.
|
|
595
|
+
'data-garden-version': '9.0.0-next.3'
|
|
596
596
|
}).withConfig({
|
|
597
597
|
displayName: "StyledColorSwatchInput",
|
|
598
598
|
componentId: "sc-em45h0-0"
|
|
599
|
-
})(["position:absolute;opacity:0;z-index:1;margin:0;width:100%;height:100%;", ";"], props => retrieveComponentStyles(COMPONENT_ID$3, props));
|
|
599
|
+
})(["position:absolute;opacity:0;z-index:1;margin:0;cursor:pointer;width:100%;height:100%;", ";"], props => retrieveComponentStyles(COMPONENT_ID$3, props));
|
|
600
600
|
StyledColorSwatchInput.defaultProps = {
|
|
601
601
|
theme: DEFAULT_THEME
|
|
602
602
|
};
|
|
603
603
|
|
|
604
604
|
const COMPONENT_ID$2 = 'colorpickers.color_swatch_label';
|
|
605
605
|
const colorStyles = props => {
|
|
606
|
-
const boxShadow = props.theme.shadows.md(getColor('primaryHue', 600, props.theme, 0.35));
|
|
607
606
|
const {
|
|
608
607
|
alpha
|
|
609
608
|
} = parseToRgb(props.backgroundColor);
|
|
@@ -615,19 +614,19 @@ const colorStyles = props => {
|
|
|
615
614
|
}
|
|
616
615
|
return `
|
|
617
616
|
color: ${foregroundColor};
|
|
618
|
-
|
|
619
|
-
&[data-garden-focus-visible] {
|
|
620
|
-
box-shadow: ${boxShadow};
|
|
621
617
|
`;
|
|
622
618
|
};
|
|
623
619
|
const StyledColorSwatchLabel = styled(StyledButtonPreview).attrs({
|
|
624
620
|
as: 'label',
|
|
625
621
|
'data-garden-id': COMPONENT_ID$2,
|
|
626
|
-
'data-garden-version': '9.0.0-next.
|
|
622
|
+
'data-garden-version': '9.0.0-next.3'
|
|
627
623
|
}).withConfig({
|
|
628
624
|
displayName: "StyledColorSwatchLabel",
|
|
629
625
|
componentId: "sc-1aghocg-0"
|
|
630
|
-
})(["position:relative;border-radius:", ";
|
|
626
|
+
})(["position:relative;top:0;border-radius:", ";", ";", " ", ";"], props => props.theme.borderRadii.md, colorStyles, props => focusStyles({
|
|
627
|
+
theme: props.theme,
|
|
628
|
+
selector: '&:has(:focus-visible)'
|
|
629
|
+
}), props => retrieveComponentStyles(COMPONENT_ID$2, props));
|
|
631
630
|
StyledColorSwatchLabel.defaultProps = {
|
|
632
631
|
theme: DEFAULT_THEME
|
|
633
632
|
};
|
|
@@ -655,7 +654,7 @@ var SvgCheckSmFill = function SvgCheckSmFill(props) {
|
|
|
655
654
|
const COMPONENT_ID$1 = 'colorpickers.colorswatch_check';
|
|
656
655
|
const StyledIcon = styled(SvgCheckSmFill).attrs({
|
|
657
656
|
'data-garden-id': COMPONENT_ID$1,
|
|
658
|
-
'data-garden-version': '9.0.0-next.
|
|
657
|
+
'data-garden-version': '9.0.0-next.3'
|
|
659
658
|
}).withConfig({
|
|
660
659
|
displayName: "StyledIcon",
|
|
661
660
|
componentId: "sc-8oigif-0"
|
|
@@ -667,7 +666,7 @@ StyledIcon.defaultProps = {
|
|
|
667
666
|
const COMPONENT_ID = 'colorpickers.swatch_cell';
|
|
668
667
|
const StyledCell = styled.td.attrs({
|
|
669
668
|
'data-garden-id': COMPONENT_ID,
|
|
670
|
-
'data-garden-version': '9.0.0-next.
|
|
669
|
+
'data-garden-version': '9.0.0-next.3'
|
|
671
670
|
}).withConfig({
|
|
672
671
|
displayName: "StyledCell",
|
|
673
672
|
componentId: "sc-qr3oit-0"
|
|
@@ -1019,7 +1018,7 @@ const reducer = (state, action) => {
|
|
|
1019
1018
|
}
|
|
1020
1019
|
};
|
|
1021
1020
|
|
|
1022
|
-
const
|
|
1021
|
+
const ColorPicker = forwardRef((_ref, ref) => {
|
|
1023
1022
|
let {
|
|
1024
1023
|
color,
|
|
1025
1024
|
defaultColor,
|
|
@@ -1209,11 +1208,11 @@ const Colorpicker = forwardRef((_ref, ref) => {
|
|
|
1209
1208
|
onChange: handleAlphaChange
|
|
1210
1209
|
}))));
|
|
1211
1210
|
});
|
|
1212
|
-
|
|
1211
|
+
ColorPicker.defaultProps = {
|
|
1213
1212
|
defaultColor: '#fff'
|
|
1214
1213
|
};
|
|
1215
|
-
|
|
1216
|
-
|
|
1214
|
+
ColorPicker.displayName = 'ColorPicker';
|
|
1215
|
+
ColorPicker.propTypes = {
|
|
1217
1216
|
color: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
1218
1217
|
isOpaque: PropTypes.bool,
|
|
1219
1218
|
onChange: PropTypes.func,
|
|
@@ -1237,7 +1236,7 @@ var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
|
|
|
1237
1236
|
})));
|
|
1238
1237
|
};
|
|
1239
1238
|
|
|
1240
|
-
const
|
|
1239
|
+
const ColorPickerDialog = forwardRef((_ref, ref) => {
|
|
1241
1240
|
let {
|
|
1242
1241
|
color,
|
|
1243
1242
|
defaultColor,
|
|
@@ -1264,7 +1263,7 @@ const ColorpickerDialog = forwardRef((_ref, ref) => {
|
|
|
1264
1263
|
const colorPickerRef = useRef(null);
|
|
1265
1264
|
const [referenceElement, setReferenceElement] = useState();
|
|
1266
1265
|
const [uncontrolledColor, setUncontrolledColor] = useState(defaultColor);
|
|
1267
|
-
const ariaLabelText = useText(
|
|
1266
|
+
const ariaLabelText = useText(ColorPickerDialog, {
|
|
1268
1267
|
'aria-label': ariaLabel
|
|
1269
1268
|
}, 'aria-label', 'Color picker');
|
|
1270
1269
|
const openDialog = () => {
|
|
@@ -1321,7 +1320,7 @@ const ColorpickerDialog = forwardRef((_ref, ref) => {
|
|
|
1321
1320
|
onClose && onClose(isControlled ? color : uncontrolledColor);
|
|
1322
1321
|
},
|
|
1323
1322
|
"aria-label": ariaLabelText
|
|
1324
|
-
}, props), React__default.createElement(StyledTooltipBody, null, React__default.createElement(
|
|
1323
|
+
}, props), React__default.createElement(StyledTooltipBody, null, React__default.createElement(ColorPicker, {
|
|
1325
1324
|
autofocus: true,
|
|
1326
1325
|
color: color,
|
|
1327
1326
|
isOpaque: isOpaque,
|
|
@@ -1331,8 +1330,8 @@ const ColorpickerDialog = forwardRef((_ref, ref) => {
|
|
|
1331
1330
|
onChange: isControlled ? onChange : setUncontrolledColor
|
|
1332
1331
|
}))));
|
|
1333
1332
|
});
|
|
1334
|
-
|
|
1335
|
-
...
|
|
1333
|
+
ColorPickerDialog.propTypes = {
|
|
1334
|
+
...ColorPicker.propTypes,
|
|
1336
1335
|
placement: PropTypes.oneOf(PLACEMENT),
|
|
1337
1336
|
onClose: PropTypes.func,
|
|
1338
1337
|
onDialogChange: PropTypes.func,
|
|
@@ -1345,13 +1344,13 @@ ColorpickerDialog.propTypes = {
|
|
|
1345
1344
|
isOpen: PropTypes.bool,
|
|
1346
1345
|
focusInset: PropTypes.bool
|
|
1347
1346
|
};
|
|
1348
|
-
|
|
1347
|
+
ColorPickerDialog.defaultProps = {
|
|
1349
1348
|
placement: 'bottom-start',
|
|
1350
1349
|
isAnimated: true,
|
|
1351
1350
|
zIndex: 1000,
|
|
1352
1351
|
hasArrow: false
|
|
1353
1352
|
};
|
|
1354
|
-
|
|
1353
|
+
ColorPickerDialog.displayName = 'ColorPickerDialog';
|
|
1355
1354
|
|
|
1356
1355
|
const ColorSwatch = forwardRef((_ref, ref) => {
|
|
1357
1356
|
let {
|
|
@@ -1609,4 +1608,4 @@ ColorSwatchDialog.defaultProps = {
|
|
|
1609
1608
|
};
|
|
1610
1609
|
ColorSwatchDialog.displayName = 'ColorSwatchDialog';
|
|
1611
1610
|
|
|
1612
|
-
export {
|
|
1611
|
+
export { ColorPicker, ColorPickerDialog, ColorSwatch, ColorSwatchDialog };
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import {
|
|
8
|
+
import { IColorPickerProps } from '../../types';
|
|
9
9
|
/**
|
|
10
10
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
11
11
|
*/
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const ColorPicker: React.ForwardRefExoticComponent<IColorPickerProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import {
|
|
8
|
+
import { IColorPickerDialogProps } from '../../types';
|
|
9
9
|
/**
|
|
10
10
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
11
11
|
*/
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const ColorPickerDialog: React.ForwardRefExoticComponent<IColorPickerDialogProps & React.RefAttributes<HTMLDivElement>>;
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
7
|
+
export { ColorPicker } from './elements/ColorPicker';
|
|
8
|
+
export { ColorPickerDialog } from './elements/ColorPickerDialog';
|
|
9
9
|
export { ColorSwatch } from './elements/ColorSwatch';
|
|
10
10
|
export { ColorSwatchDialog } from './elements/ColorSwatchDialog';
|
|
11
|
-
export type { IColor,
|
|
11
|
+
export type { IColor, IColorPickerProps, IColorPickerDialogProps, ILabeledColor, IColorSwatchProps, IColorSwatchDialogProps } from './types';
|
package/dist/typings/styled/{ColorpickerDialog → ColorPickerDialog}/StyledButtonPreview.d.ts
RENAMED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import { ThemeProps, DefaultTheme } from 'styled-components';
|
|
8
|
-
import {
|
|
8
|
+
import { IColorPickerDialogProps } from '../../types';
|
|
9
9
|
export interface IStyleButtonPreviewProps extends ThemeProps<DefaultTheme> {
|
|
10
|
-
backgroundColor?:
|
|
10
|
+
backgroundColor?: IColorPickerDialogProps['color'];
|
|
11
11
|
}
|
|
12
12
|
export declare const StyledButtonPreview: import("styled-components").StyledComponent<"span", DefaultTheme, IStyleButtonPreviewProps, never>;
|
|
@@ -8,7 +8,7 @@ import { DefaultTheme, ThemeProps } from 'styled-components';
|
|
|
8
8
|
interface IStyledColorSwatchLabelProps extends ThemeProps<DefaultTheme> {
|
|
9
9
|
backgroundColor: string;
|
|
10
10
|
}
|
|
11
|
-
export declare const StyledColorSwatchLabel: import("styled-components").StyledComponent<"span", DefaultTheme, import("../
|
|
11
|
+
export declare const StyledColorSwatchLabel: import("styled-components").StyledComponent<"span", DefaultTheme, import("../ColorPickerDialog/StyledButtonPreview").IStyleButtonPreviewProps & {
|
|
12
12
|
as: string;
|
|
13
13
|
'data-garden-id': string;
|
|
14
14
|
'data-garden-version': string;
|
|
@@ -4,23 +4,23 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './
|
|
14
|
-
export * from './
|
|
15
|
-
export * from './
|
|
16
|
-
export * from './
|
|
17
|
-
export * from './
|
|
18
|
-
export * from './
|
|
19
|
-
export * from './
|
|
20
|
-
export * from './
|
|
21
|
-
export * from './
|
|
22
|
-
export * from './
|
|
23
|
-
export * from './
|
|
7
|
+
export * from './ColorPicker/StyledColorPicker';
|
|
8
|
+
export * from './ColorPicker/StyledHueRange';
|
|
9
|
+
export * from './ColorPicker/StyledAlphaRange';
|
|
10
|
+
export * from './ColorPicker/StyledPreview';
|
|
11
|
+
export * from './ColorPicker/StyledColorWell';
|
|
12
|
+
export * from './ColorPicker/StyledColorWellThumb';
|
|
13
|
+
export * from './ColorPicker/StyledSliderGroup';
|
|
14
|
+
export * from './ColorPicker/StyledHexField';
|
|
15
|
+
export * from './ColorPicker/StyledLabel';
|
|
16
|
+
export * from './ColorPicker/StyledInput';
|
|
17
|
+
export * from './ColorPicker/StyledInputGroup';
|
|
18
|
+
export * from './ColorPicker/StyledRGBAField';
|
|
19
|
+
export * from './ColorPicker/StyledSliders';
|
|
20
|
+
export * from './ColorPickerDialog/StyledButton';
|
|
21
|
+
export * from './ColorPickerDialog/StyledButtonPreview';
|
|
22
|
+
export * from './ColorPickerDialog/StyledTooltipModal';
|
|
23
|
+
export * from './ColorPickerDialog/StyledTooltipBody';
|
|
24
24
|
export * from './ColorSwatch/StyledColorSwatch';
|
|
25
25
|
export * from './ColorSwatch/StyledColorSwatchInput';
|
|
26
26
|
export * from './ColorSwatch/StyledColorSwatchLabel';
|
|
@@ -33,7 +33,7 @@ export interface IRGBColor {
|
|
|
33
33
|
blue: number;
|
|
34
34
|
alpha?: number;
|
|
35
35
|
}
|
|
36
|
-
export interface
|
|
36
|
+
export interface IColorPickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color' | 'onChange'> {
|
|
37
37
|
/** Sets the color for an uncontrolled color picker */
|
|
38
38
|
defaultColor?: string | IColor;
|
|
39
39
|
/** Sets the color for a controlled color picker */
|
|
@@ -59,7 +59,7 @@ export interface IColorpickerProps extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
59
59
|
/** @ignore */
|
|
60
60
|
autofocus?: boolean;
|
|
61
61
|
}
|
|
62
|
-
export interface
|
|
62
|
+
export interface IColorPickerDialogProps extends IColorPickerProps {
|
|
63
63
|
/**
|
|
64
64
|
* Handles close actions. Can be triggered from the backdrop.
|
|
65
65
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-colorpickers",
|
|
3
|
-
"version": "9.0.0-next.
|
|
3
|
+
"version": "9.0.0-next.3",
|
|
4
4
|
"description": "Components related to color pickers in the Garden Design System",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@zendeskgarden/container-grid": "^3.0.0",
|
|
25
25
|
"@zendeskgarden/container-utilities": "^2.0.0",
|
|
26
|
-
"@zendeskgarden/react-buttons": "^9.0.0-next.
|
|
27
|
-
"@zendeskgarden/react-forms": "^9.0.0-next.
|
|
28
|
-
"@zendeskgarden/react-modals": "^9.0.0-next.
|
|
29
|
-
"@zendeskgarden/react-tooltips": "^9.0.0-next.
|
|
26
|
+
"@zendeskgarden/react-buttons": "^9.0.0-next.3",
|
|
27
|
+
"@zendeskgarden/react-forms": "^9.0.0-next.3",
|
|
28
|
+
"@zendeskgarden/react-modals": "^9.0.0-next.3",
|
|
29
|
+
"@zendeskgarden/react-tooltips": "^9.0.0-next.3",
|
|
30
30
|
"lodash.isequal": "^4.5.0",
|
|
31
31
|
"lodash.throttle": "^4.1.1",
|
|
32
32
|
"polished": "^4.0.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/lodash.isequal": "4.5.8",
|
|
44
44
|
"@types/lodash.throttle": "4.1.9",
|
|
45
|
-
"@zendeskgarden/react-theming": "^9.0.0-next.
|
|
45
|
+
"@zendeskgarden/react-theming": "^9.0.0-next.3",
|
|
46
46
|
"@zendeskgarden/svg-icons": "7.0.0"
|
|
47
47
|
},
|
|
48
48
|
"keywords": [
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
58
|
"zendeskgarden:src": "src/index.ts",
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "d5086e8a3ae0c8608361966954bf434ef03005ec"
|
|
60
60
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/typings/styled/{ColorpickerDialog → ColorPickerDialog}/StyledTooltipModal.d.ts
RENAMED
|
File without changes
|