@zendeskgarden/react-colorpickers 9.12.3 → 9.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/elements/ColorPicker/ColorWell.js +6 -7
- package/dist/esm/elements/ColorPicker/index.js +9 -10
- package/dist/esm/elements/ColorPicker/reducer.js +1 -1
- package/dist/esm/elements/ColorPickerDialog/index.js +28 -27
- package/dist/esm/elements/ColorSwatch/index.js +11 -12
- package/dist/esm/elements/ColorSwatchDialog/index.js +29 -28
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-down-stroke.svg.js +4 -4
- package/dist/esm/styled/ColorPicker/StyledAlphaRange.js +5 -5
- package/dist/esm/styled/ColorPicker/StyledColorPicker.js +3 -3
- package/dist/esm/styled/ColorPicker/StyledColorWell.js +5 -5
- package/dist/esm/styled/ColorPicker/StyledColorWellThumb.js +10 -12
- package/dist/esm/styled/ColorPicker/StyledHexField.js +3 -3
- package/dist/esm/styled/ColorPicker/StyledHueRange.js +3 -3
- package/dist/esm/styled/ColorPicker/StyledInput.js +3 -3
- package/dist/esm/styled/ColorPicker/StyledInputGroup.js +3 -3
- package/dist/esm/styled/ColorPicker/StyledLabel.js +3 -3
- package/dist/esm/styled/ColorPicker/StyledPreview.js +5 -5
- package/dist/esm/styled/ColorPicker/StyledRGBAField.js +5 -5
- package/dist/esm/styled/ColorPicker/StyledSliderGroup.js +3 -3
- package/dist/esm/styled/ColorPicker/StyledSliders.js +3 -3
- package/dist/esm/styled/ColorPickerDialog/StyledButton.js +1 -1
- package/dist/esm/styled/ColorPickerDialog/StyledButtonPreview.js +7 -8
- package/dist/esm/styled/ColorPickerDialog/StyledTooltipBody.js +3 -3
- package/dist/esm/styled/ColorPickerDialog/StyledTooltipDialog.js +3 -3
- package/dist/esm/styled/ColorSwatch/StyledCell.js +1 -1
- package/dist/esm/styled/ColorSwatch/StyledColorSwatch.js +3 -3
- package/dist/esm/styled/ColorSwatch/StyledColorSwatchInput.js +3 -3
- package/dist/esm/styled/ColorSwatch/StyledColorSwatchLabel.js +7 -8
- package/dist/esm/styled/ColorSwatch/StyledIcon.js +3 -3
- package/dist/esm/styled/common/StyledRange.js +12 -16
- package/dist/index.cjs.js +126 -135
- package/package.json +8 -8
|
@@ -32,13 +32,12 @@ import '../../styled/ColorSwatch/StyledColorSwatchLabel.js';
|
|
|
32
32
|
import '../../styled/ColorSwatch/StyledIcon.js';
|
|
33
33
|
import '../../styled/ColorSwatch/StyledCell.js';
|
|
34
34
|
|
|
35
|
-
const ColorWell = React__default.memo(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
} = _ref;
|
|
35
|
+
const ColorWell = React__default.memo(({
|
|
36
|
+
hue,
|
|
37
|
+
saturation,
|
|
38
|
+
lightness,
|
|
39
|
+
onChange
|
|
40
|
+
}) => {
|
|
42
41
|
const {
|
|
43
42
|
rtl
|
|
44
43
|
} = useContext(ThemeContext);
|
|
@@ -32,16 +32,15 @@ import '../../styled/ColorSwatch/StyledIcon.js';
|
|
|
32
32
|
import '../../styled/ColorSwatch/StyledCell.js';
|
|
33
33
|
import { reducer, getInitialState, convertStringToColor, areColorsEqual } from './reducer.js';
|
|
34
34
|
|
|
35
|
-
const ColorPicker = forwardRef((
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
} = _ref;
|
|
35
|
+
const ColorPicker = forwardRef(({
|
|
36
|
+
color,
|
|
37
|
+
defaultColor = '#fff',
|
|
38
|
+
isOpaque,
|
|
39
|
+
labels = {},
|
|
40
|
+
autofocus,
|
|
41
|
+
onChange,
|
|
42
|
+
...props
|
|
43
|
+
}, ref) => {
|
|
45
44
|
const [state, dispatch] = useReducer(reducer, getInitialState(color || defaultColor));
|
|
46
45
|
const previousComputedColorRef = useRef(state.color);
|
|
47
46
|
const previousStateColorRef = useRef(state.color);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import isEqual from 'lodash.isequal';
|
|
8
|
-
import { parseToHsl,
|
|
8
|
+
import { parseToHsl, rgb, parseToRgb, hsl } from 'polished';
|
|
9
9
|
import { hsvToHsl } from '../../utils/conversion.js';
|
|
10
10
|
import { isValidHex } from '../../utils/validation.js';
|
|
11
11
|
|
|
@@ -36,27 +36,26 @@ import '../../styled/ColorSwatch/StyledIcon.js';
|
|
|
36
36
|
import '../../styled/ColorSwatch/StyledCell.js';
|
|
37
37
|
import { useText, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
38
38
|
|
|
39
|
-
const ColorPickerDialog = forwardRef((
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
} = _ref;
|
|
39
|
+
const ColorPickerDialog = forwardRef(({
|
|
40
|
+
color,
|
|
41
|
+
defaultColor,
|
|
42
|
+
placement = 'bottom-start',
|
|
43
|
+
onChange,
|
|
44
|
+
onClose,
|
|
45
|
+
labels,
|
|
46
|
+
hasArrow = false,
|
|
47
|
+
isAnimated = true,
|
|
48
|
+
isOpaque,
|
|
49
|
+
isOpen,
|
|
50
|
+
zIndex = 1000,
|
|
51
|
+
focusInset,
|
|
52
|
+
disabled,
|
|
53
|
+
buttonProps,
|
|
54
|
+
onDialogChange,
|
|
55
|
+
'aria-label': ariaLabel,
|
|
56
|
+
children,
|
|
57
|
+
...props
|
|
58
|
+
}, ref) => {
|
|
60
59
|
const isControlled = color !== null && color !== undefined;
|
|
61
60
|
const isDialogControlled = isOpen !== undefined && isOpen !== null;
|
|
62
61
|
const buttonRef = useRef(null);
|
|
@@ -69,15 +68,17 @@ const ColorPickerDialog = forwardRef((_ref, ref) => {
|
|
|
69
68
|
const theme = useTheme() || DEFAULT_THEME;
|
|
70
69
|
const openDialog = () => {
|
|
71
70
|
setReferenceElement(buttonRef.current);
|
|
72
|
-
onDialogChange
|
|
71
|
+
onDialogChange?.({
|
|
73
72
|
isOpen: true
|
|
74
73
|
});
|
|
75
74
|
};
|
|
76
75
|
const closeDialog = () => {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
if (referenceElement) {
|
|
77
|
+
setReferenceElement(null);
|
|
78
|
+
onDialogChange?.({
|
|
79
|
+
isOpen: false
|
|
80
|
+
});
|
|
81
|
+
}
|
|
81
82
|
};
|
|
82
83
|
const onClick = composeEventHandlers(props.onClick, () => {
|
|
83
84
|
if (referenceElement) {
|
|
@@ -118,7 +119,7 @@ const ColorPickerDialog = forwardRef((_ref, ref) => {
|
|
|
118
119
|
referenceElement: referenceElement,
|
|
119
120
|
onClose: () => {
|
|
120
121
|
closeDialog();
|
|
121
|
-
onClose
|
|
122
|
+
onClose?.(isControlled ? color : uncontrolledColor);
|
|
122
123
|
},
|
|
123
124
|
"aria-label": ariaLabelText
|
|
124
125
|
}, props), React__default.createElement(StyledTooltipBody, null, React__default.createElement(ColorPicker, {
|
|
@@ -36,18 +36,17 @@ import { StyledColorSwatchLabel } from '../../styled/ColorSwatch/StyledColorSwat
|
|
|
36
36
|
import { StyledIcon } from '../../styled/ColorSwatch/StyledIcon.js';
|
|
37
37
|
import { StyledCell } from '../../styled/ColorSwatch/StyledCell.js';
|
|
38
38
|
|
|
39
|
-
const ColorSwatch = forwardRef((
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
} = _ref;
|
|
39
|
+
const ColorSwatch = forwardRef(({
|
|
40
|
+
name,
|
|
41
|
+
colors,
|
|
42
|
+
isCheckboxGroup,
|
|
43
|
+
defaultSelectedColIndex,
|
|
44
|
+
defaultSelectedRowIndex,
|
|
45
|
+
selectedColIndex,
|
|
46
|
+
selectedRowIndex,
|
|
47
|
+
onSelect,
|
|
48
|
+
...props
|
|
49
|
+
}, ref) => {
|
|
51
50
|
const theme = useContext(ThemeContext) || DEFAULT_THEME;
|
|
52
51
|
const environment = useDocument(theme);
|
|
53
52
|
const gridRef = useRef();
|
|
@@ -36,29 +36,28 @@ import '../../styled/ColorSwatch/StyledColorSwatchLabel.js';
|
|
|
36
36
|
import '../../styled/ColorSwatch/StyledIcon.js';
|
|
37
37
|
import '../../styled/ColorSwatch/StyledCell.js';
|
|
38
38
|
|
|
39
|
-
const ColorSwatchDialog = forwardRef((
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
} = _ref;
|
|
39
|
+
const ColorSwatchDialog = forwardRef(({
|
|
40
|
+
name,
|
|
41
|
+
colors,
|
|
42
|
+
isCheckboxGroup,
|
|
43
|
+
selectedRowIndex,
|
|
44
|
+
selectedColIndex,
|
|
45
|
+
defaultSelectedRowIndex,
|
|
46
|
+
defaultSelectedColIndex,
|
|
47
|
+
placement = 'bottom-start',
|
|
48
|
+
onSelect,
|
|
49
|
+
hasArrow = false,
|
|
50
|
+
isAnimated = true,
|
|
51
|
+
zIndex = 1000,
|
|
52
|
+
isOpen,
|
|
53
|
+
focusInset,
|
|
54
|
+
disabled,
|
|
55
|
+
buttonProps,
|
|
56
|
+
onDialogChange,
|
|
57
|
+
children,
|
|
58
|
+
'aria-label': ariaLabel,
|
|
59
|
+
...props
|
|
60
|
+
}, ref) => {
|
|
62
61
|
const isControlled = selectedRowIndex !== undefined && selectedColIndex !== undefined;
|
|
63
62
|
const isDialogControlled = isOpen !== undefined && isOpen !== null;
|
|
64
63
|
const buttonRef = useRef(null);
|
|
@@ -89,15 +88,17 @@ const ColorSwatchDialog = forwardRef((_ref, ref) => {
|
|
|
89
88
|
}, [isOpen, isDialogControlled]);
|
|
90
89
|
const openDialog = () => {
|
|
91
90
|
setReferenceElement(buttonRef.current);
|
|
92
|
-
onDialogChange
|
|
91
|
+
onDialogChange?.({
|
|
93
92
|
isOpen: true
|
|
94
93
|
});
|
|
95
94
|
};
|
|
96
95
|
const closeDialog = () => {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
if (referenceElement) {
|
|
97
|
+
setReferenceElement(null);
|
|
98
|
+
onDialogChange?.({
|
|
99
|
+
isOpen: false
|
|
100
|
+
});
|
|
101
|
+
}
|
|
101
102
|
};
|
|
102
103
|
const onClick = composeEventHandlers(props.onClick, () => {
|
|
103
104
|
if (referenceElement) {
|
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
|
|
9
|
-
var _path;
|
|
10
|
-
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); }
|
|
9
|
+
var _path$1;
|
|
10
|
+
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); }
|
|
11
11
|
var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
|
|
12
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
12
|
+
return /*#__PURE__*/React.createElement("svg", _extends$1({
|
|
13
13
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14
14
|
width: 16,
|
|
15
15
|
height: 16,
|
|
16
16
|
focusable: "false",
|
|
17
17
|
viewBox: "0 0 16 16",
|
|
18
18
|
"aria-hidden": "true"
|
|
19
|
-
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
19
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
|
|
20
20
|
fill: "currentColor",
|
|
21
21
|
d: "M12.688 5.61a.5.5 0 01.69.718l-.066.062-5 4a.5.5 0 01-.542.054l-.082-.054-5-4a.5.5 0 01.55-.83l.074.05L8 9.359l4.688-3.75z"
|
|
22
22
|
})));
|
|
@@ -8,8 +8,8 @@ import styled from 'styled-components';
|
|
|
8
8
|
import { getCheckeredBackground } from '@zendeskgarden/react-theming';
|
|
9
9
|
import { StyledRange, getTrackMargin, getTrackHeight } from '../common/StyledRange.js';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'colorpickers.colorpicker_alpha';
|
|
12
|
-
const background = props => {
|
|
11
|
+
const COMPONENT_ID$i = 'colorpickers.colorpicker_alpha';
|
|
12
|
+
const background$3 = props => {
|
|
13
13
|
const direction = `to ${props.theme.rtl ? 'left' : 'right'}`;
|
|
14
14
|
const fromColor = `rgba(${props.$red}, ${props.$green}, ${props.$blue}, 0)`;
|
|
15
15
|
const toColor = `rgb(${props.$red}, ${props.$green}, ${props.$blue})`;
|
|
@@ -27,10 +27,10 @@ const background = props => {
|
|
|
27
27
|
const StyledAlphaRange = styled(StyledRange).attrs(props => ({
|
|
28
28
|
style: {
|
|
29
29
|
backgroundSize: 'auto',
|
|
30
|
-
background: background(props)
|
|
30
|
+
background: background$3(props)
|
|
31
31
|
},
|
|
32
|
-
'data-garden-id': COMPONENT_ID,
|
|
33
|
-
'data-garden-version': '9.12.
|
|
32
|
+
'data-garden-id': COMPONENT_ID$i,
|
|
33
|
+
'data-garden-version': '9.12.4'
|
|
34
34
|
})).withConfig({
|
|
35
35
|
displayName: "StyledAlphaRange",
|
|
36
36
|
componentId: "sc-1f6hp2j-0"
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
|
-
const COMPONENT_ID = 'colorpickers.colorpicker';
|
|
10
|
+
const COMPONENT_ID$l = 'colorpickers.colorpicker';
|
|
11
11
|
const getColorPickerWidth = props => {
|
|
12
12
|
return props.$isOpaque ? 268 : 312;
|
|
13
13
|
};
|
|
14
14
|
const StyledColorPicker = styled.div.attrs({
|
|
15
|
-
'data-garden-id': COMPONENT_ID,
|
|
16
|
-
'data-garden-version': '9.12.
|
|
15
|
+
'data-garden-id': COMPONENT_ID$l,
|
|
16
|
+
'data-garden-version': '9.12.4'
|
|
17
17
|
}).withConfig({
|
|
18
18
|
displayName: "StyledColorPicker",
|
|
19
19
|
componentId: "sc-gspq4q-0"
|
|
@@ -8,8 +8,8 @@ import styled from 'styled-components';
|
|
|
8
8
|
import { rgba, hsl } from 'polished';
|
|
9
9
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'colorpickers.colorpicker_colorwell';
|
|
12
|
-
const background = props => {
|
|
11
|
+
const COMPONENT_ID$g = 'colorpickers.colorpicker_colorwell';
|
|
12
|
+
const background$1 = props => {
|
|
13
13
|
const blackAlpha = rgba(props.theme.palette.black, 0.9);
|
|
14
14
|
const black = `linear-gradient(0deg, ${props.theme.palette.black}, ${blackAlpha} 1%, transparent 99%)`;
|
|
15
15
|
const whiteAngle = `${props.theme.rtl ? -90 : 90}deg`;
|
|
@@ -19,11 +19,11 @@ const background = props => {
|
|
|
19
19
|
return `${black}, ${white}, ${color}`;
|
|
20
20
|
};
|
|
21
21
|
const StyledColorWell = styled.div.attrs(props => ({
|
|
22
|
-
'data-garden-id': COMPONENT_ID,
|
|
23
|
-
'data-garden-version': '9.12.
|
|
22
|
+
'data-garden-id': COMPONENT_ID$g,
|
|
23
|
+
'data-garden-version': '9.12.4',
|
|
24
24
|
'data-test-id': 'colorwell',
|
|
25
25
|
style: {
|
|
26
|
-
background: background(props)
|
|
26
|
+
background: background$1(props)
|
|
27
27
|
}
|
|
28
28
|
})).withConfig({
|
|
29
29
|
displayName: "StyledColorWell",
|
|
@@ -8,11 +8,10 @@ import styled, { css } from 'styled-components';
|
|
|
8
8
|
import { stripUnit } from 'polished';
|
|
9
9
|
import { componentStyles, getColor } from '@zendeskgarden/react-theming';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'colorpickers.colorpicker_colorwell_thumb';
|
|
12
|
-
const colorStyles =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = _ref;
|
|
11
|
+
const COMPONENT_ID$f = 'colorpickers.colorpicker_colorwell_thumb';
|
|
12
|
+
const colorStyles$1 = ({
|
|
13
|
+
theme
|
|
14
|
+
}) => {
|
|
16
15
|
const borderColor = getColor({
|
|
17
16
|
theme,
|
|
18
17
|
hue: 'white'
|
|
@@ -23,18 +22,17 @@ const colorStyles = _ref => {
|
|
|
23
22
|
}))}`;
|
|
24
23
|
return css(["border-color:", ";box-shadow:", ";"], borderColor, boxShadow);
|
|
25
24
|
};
|
|
26
|
-
const sizeStyles =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} = _ref2;
|
|
25
|
+
const sizeStyles$2 = ({
|
|
26
|
+
theme
|
|
27
|
+
}) => {
|
|
30
28
|
const borderWidth = stripUnit(theme.borderWidths.sm) * 2;
|
|
31
29
|
const size = theme.space.base * 5;
|
|
32
30
|
const translateValue = size / -2;
|
|
33
31
|
return css(["transform:translate(", "px,", "px);box-sizing:border-box;border-width:", "px;width:", "px;height:", "px;"], translateValue, translateValue, borderWidth, size, size);
|
|
34
32
|
};
|
|
35
33
|
const StyledColorWellThumb = styled.div.attrs(props => ({
|
|
36
|
-
'data-garden-id': COMPONENT_ID,
|
|
37
|
-
'data-garden-version': '9.12.
|
|
34
|
+
'data-garden-id': COMPONENT_ID$f,
|
|
35
|
+
'data-garden-version': '9.12.4',
|
|
38
36
|
'data-test-id': 'colorwell-thumb',
|
|
39
37
|
style: {
|
|
40
38
|
top: `${props.$top}%`,
|
|
@@ -43,6 +41,6 @@ const StyledColorWellThumb = styled.div.attrs(props => ({
|
|
|
43
41
|
})).withConfig({
|
|
44
42
|
displayName: "StyledColorWellThumb",
|
|
45
43
|
componentId: "sc-1npyab0-0"
|
|
46
|
-
})(["position:absolute;border:", ";border-radius:50%;", " ", " ", ";"], props => props.theme.borders.sm, sizeStyles, colorStyles, componentStyles);
|
|
44
|
+
})(["position:absolute;border:", ";border-radius:50%;", " ", " ", ";"], props => props.theme.borders.sm, sizeStyles$2, colorStyles$1, componentStyles);
|
|
47
45
|
|
|
48
46
|
export { StyledColorWellThumb };
|
|
@@ -8,10 +8,10 @@ import styled from 'styled-components';
|
|
|
8
8
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
import { Field } from '@zendeskgarden/react-forms';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'colorpickers.colorpicker_hex_field';
|
|
11
|
+
const COMPONENT_ID$d = 'colorpickers.colorpicker_hex_field';
|
|
12
12
|
const StyledHexField = styled(Field).attrs({
|
|
13
|
-
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.12.
|
|
13
|
+
'data-garden-id': COMPONENT_ID$d,
|
|
14
|
+
'data-garden-version': '9.12.4',
|
|
15
15
|
spellCheck: false
|
|
16
16
|
}).withConfig({
|
|
17
17
|
displayName: "StyledHexField",
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { StyledRange, getTrackMargin, getTrackHeight } from '../common/StyledRange.js';
|
|
9
9
|
|
|
10
|
-
const COMPONENT_ID = 'colorpickers.colorpicker_hue';
|
|
10
|
+
const COMPONENT_ID$j = 'colorpickers.colorpicker_hue';
|
|
11
11
|
const StyledHueRange = styled(StyledRange).attrs({
|
|
12
|
-
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.12.
|
|
12
|
+
'data-garden-id': COMPONENT_ID$j,
|
|
13
|
+
'data-garden-version': '9.12.4'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledHueRange",
|
|
16
16
|
componentId: "sc-1gdhww1-0"
|
|
@@ -8,10 +8,10 @@ import styled from 'styled-components';
|
|
|
8
8
|
import { Input } from '@zendeskgarden/react-forms';
|
|
9
9
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'colorpickers.colorpicker_input';
|
|
11
|
+
const COMPONENT_ID$b = 'colorpickers.colorpicker_input';
|
|
12
12
|
const StyledInput = styled(Input).attrs({
|
|
13
|
-
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.12.
|
|
13
|
+
'data-garden-id': COMPONENT_ID$b,
|
|
14
|
+
'data-garden-version': '9.12.4',
|
|
15
15
|
focusInset: false
|
|
16
16
|
}).withConfig({
|
|
17
17
|
displayName: "StyledInput",
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
|
-
const COMPONENT_ID = 'colorpickers.colorpicker_input_group';
|
|
10
|
+
const COMPONENT_ID$a = 'colorpickers.colorpicker_input_group';
|
|
11
11
|
const StyledInputGroup = styled.div.attrs({
|
|
12
|
-
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.12.
|
|
12
|
+
'data-garden-id': COMPONENT_ID$a,
|
|
13
|
+
'data-garden-version': '9.12.4'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledInputGroup",
|
|
16
16
|
componentId: "sc-1m9g2wg-0"
|
|
@@ -8,10 +8,10 @@ import styled from 'styled-components';
|
|
|
8
8
|
import { Label } from '@zendeskgarden/react-forms';
|
|
9
9
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'colorpickers.colorpicker_label';
|
|
11
|
+
const COMPONENT_ID$c = 'colorpickers.colorpicker_label';
|
|
12
12
|
const StyledLabel = styled(Label).attrs({
|
|
13
|
-
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.12.
|
|
13
|
+
'data-garden-id': COMPONENT_ID$c,
|
|
14
|
+
'data-garden-version': '9.12.4'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledLabel",
|
|
17
17
|
componentId: "sc-1vxt3m9-0"
|
|
@@ -8,8 +8,8 @@ import styled from 'styled-components';
|
|
|
8
8
|
import { rgba } from 'polished';
|
|
9
9
|
import { componentStyles, getCheckeredBackground } from '@zendeskgarden/react-theming';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'colorpickers.colorpicker_preview_box';
|
|
12
|
-
const background = props => {
|
|
11
|
+
const COMPONENT_ID$h = 'colorpickers.colorpicker_preview_box';
|
|
12
|
+
const background$2 = props => {
|
|
13
13
|
const alpha = props.$alpha ? props.$alpha / 100 : 0;
|
|
14
14
|
let retVal = `rgba(${props.$red}, ${props.$green}, ${props.$blue}, ${alpha})`;
|
|
15
15
|
if (!props.$isOpaque) {
|
|
@@ -23,10 +23,10 @@ const background = props => {
|
|
|
23
23
|
};
|
|
24
24
|
const StyledPreview = styled.div.attrs(props => ({
|
|
25
25
|
style: {
|
|
26
|
-
background: background(props)
|
|
26
|
+
background: background$2(props)
|
|
27
27
|
},
|
|
28
|
-
'data-garden-id': COMPONENT_ID,
|
|
29
|
-
'data-garden-version': '9.12.
|
|
28
|
+
'data-garden-id': COMPONENT_ID$h,
|
|
29
|
+
'data-garden-version': '9.12.4',
|
|
30
30
|
'data-test-id': 'preview-box'
|
|
31
31
|
})).withConfig({
|
|
32
32
|
displayName: "StyledPreview",
|
|
@@ -8,8 +8,8 @@ import { Field } from '@zendeskgarden/react-forms';
|
|
|
8
8
|
import styled from 'styled-components';
|
|
9
9
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'colorpickers.colorpicker_rgb_field';
|
|
12
|
-
const sizeStyles = theme => {
|
|
11
|
+
const COMPONENT_ID$9 = 'colorpickers.colorpicker_rgb_field';
|
|
12
|
+
const sizeStyles$1 = theme => {
|
|
13
13
|
const margin = `${theme.space.base * 1.5}px`;
|
|
14
14
|
const width = `${theme.space.base * 12.75}px`;
|
|
15
15
|
return `
|
|
@@ -19,11 +19,11 @@ const sizeStyles = theme => {
|
|
|
19
19
|
`;
|
|
20
20
|
};
|
|
21
21
|
const StyledRGBAField = styled(Field).attrs({
|
|
22
|
-
'data-garden-id': COMPONENT_ID,
|
|
23
|
-
'data-garden-version': '9.12.
|
|
22
|
+
'data-garden-id': COMPONENT_ID$9,
|
|
23
|
+
'data-garden-version': '9.12.4'
|
|
24
24
|
}).withConfig({
|
|
25
25
|
displayName: "StyledRGBAField",
|
|
26
26
|
componentId: "sc-13266k8-0"
|
|
27
|
-
})(["display:flex;flex-direction:column;text-align:center;", ";", ";"], props => sizeStyles(props.theme), componentStyles);
|
|
27
|
+
})(["display:flex;flex-direction:column;text-align:center;", ";", ";"], props => sizeStyles$1(props.theme), componentStyles);
|
|
28
28
|
|
|
29
29
|
export { StyledRGBAField };
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
|
-
const COMPONENT_ID = 'colorpickers.colorpicker_slider_group';
|
|
10
|
+
const COMPONENT_ID$e = 'colorpickers.colorpicker_slider_group';
|
|
11
11
|
const StyledSliderGroup = styled.div.attrs({
|
|
12
|
-
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.12.
|
|
12
|
+
'data-garden-id': COMPONENT_ID$e,
|
|
13
|
+
'data-garden-version': '9.12.4'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledSliderGroup",
|
|
16
16
|
componentId: "sc-tigkzg-0"
|
|
@@ -8,7 +8,7 @@ import styled from 'styled-components';
|
|
|
8
8
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
import { getTrackHeight, getTrackMargin } from '../common/StyledRange.js';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'colorpickers.colorpicker_sliders';
|
|
11
|
+
const COMPONENT_ID$8 = 'colorpickers.colorpicker_sliders';
|
|
12
12
|
const sizeStyles = props => {
|
|
13
13
|
if (props.$isOpaque) {
|
|
14
14
|
return undefined;
|
|
@@ -32,8 +32,8 @@ const sizeStyles = props => {
|
|
|
32
32
|
`;
|
|
33
33
|
};
|
|
34
34
|
const StyledSliders = styled.div.attrs({
|
|
35
|
-
'data-garden-id': COMPONENT_ID,
|
|
36
|
-
'data-garden-version': '9.12.
|
|
35
|
+
'data-garden-id': COMPONENT_ID$8,
|
|
36
|
+
'data-garden-version': '9.12.4'
|
|
37
37
|
}).withConfig({
|
|
38
38
|
displayName: "StyledSliders",
|
|
39
39
|
componentId: "sc-1lgr50m-0"
|
|
@@ -9,7 +9,7 @@ import { Button } from '@zendeskgarden/react-buttons';
|
|
|
9
9
|
|
|
10
10
|
const StyledButton = styled(Button).attrs({
|
|
11
11
|
isNeutral: true,
|
|
12
|
-
'data-garden-version': '9.12.
|
|
12
|
+
'data-garden-version': '9.12.4'
|
|
13
13
|
}).withConfig({
|
|
14
14
|
displayName: "StyledButton",
|
|
15
15
|
componentId: "sc-1dlijfv-0"
|
|
@@ -8,12 +8,11 @@ import styled from 'styled-components';
|
|
|
8
8
|
import { rgba } from 'polished';
|
|
9
9
|
import { getCheckeredBackground, componentStyles } from '@zendeskgarden/react-theming';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'colorpickers.colordialog_preview';
|
|
12
|
-
const background =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} = _ref;
|
|
11
|
+
const COMPONENT_ID$7 = 'colorpickers.colordialog_preview';
|
|
12
|
+
const background = ({
|
|
13
|
+
$backgroundColor,
|
|
14
|
+
theme
|
|
15
|
+
}) => {
|
|
17
16
|
let retVal;
|
|
18
17
|
if (typeof $backgroundColor === 'string') {
|
|
19
18
|
retVal = $backgroundColor;
|
|
@@ -38,8 +37,8 @@ const StyledButtonPreview = styled.span.attrs(props => ({
|
|
|
38
37
|
overlay: background(props)
|
|
39
38
|
})
|
|
40
39
|
},
|
|
41
|
-
'data-garden-id': COMPONENT_ID,
|
|
42
|
-
'data-garden-version': '9.12.
|
|
40
|
+
'data-garden-id': COMPONENT_ID$7,
|
|
41
|
+
'data-garden-version': '9.12.4',
|
|
43
42
|
'data-test-id': 'dialog-preview'
|
|
44
43
|
})).withConfig({
|
|
45
44
|
displayName: "StyledButtonPreview",
|
|
@@ -8,10 +8,10 @@ import styled from 'styled-components';
|
|
|
8
8
|
import { TooltipDialog } from '@zendeskgarden/react-modals';
|
|
9
9
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'colorpickers.colordialog_tooltipdialog_body';
|
|
11
|
+
const COMPONENT_ID$5 = 'colorpickers.colordialog_tooltipdialog_body';
|
|
12
12
|
const StyledTooltipBody = styled(TooltipDialog.Body).attrs({
|
|
13
|
-
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.12.
|
|
13
|
+
'data-garden-id': COMPONENT_ID$5,
|
|
14
|
+
'data-garden-version': '9.12.4'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledTooltipBody",
|
|
17
17
|
componentId: "sc-1ueddpo-0"
|
|
@@ -8,10 +8,10 @@ import styled from 'styled-components';
|
|
|
8
8
|
import { TooltipDialog } from '@zendeskgarden/react-modals';
|
|
9
9
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'colorpickers.colordialog_tooltipdialog';
|
|
11
|
+
const COMPONENT_ID$6 = 'colorpickers.colordialog_tooltipdialog';
|
|
12
12
|
const StyledTooltipDialog = styled(TooltipDialog).attrs({
|
|
13
|
-
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.12.
|
|
13
|
+
'data-garden-id': COMPONENT_ID$6,
|
|
14
|
+
'data-garden-version': '9.12.4'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledTooltipDialog",
|
|
17
17
|
componentId: "sc-1vbkccl-0"
|
|
@@ -10,7 +10,7 @@ import { componentStyles } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
const COMPONENT_ID = 'colorpickers.swatch_cell';
|
|
11
11
|
const StyledCell = styled.td.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.12.
|
|
13
|
+
'data-garden-version': '9.12.4'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledCell",
|
|
16
16
|
componentId: "sc-qr3oit-0"
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
|
-
const COMPONENT_ID = 'colorpickers.color_swatch';
|
|
10
|
+
const COMPONENT_ID$4 = 'colorpickers.color_swatch';
|
|
11
11
|
const StyledColorSwatch = styled.table.attrs({
|
|
12
|
-
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.12.
|
|
12
|
+
'data-garden-id': COMPONENT_ID$4,
|
|
13
|
+
'data-garden-version': '9.12.4'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledColorSwatch",
|
|
16
16
|
componentId: "sc-ajx440-0"
|