@zendeskgarden/react-colorpickers 9.0.0-next.1 → 9.0.0-next.2
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/index.cjs.js +254 -225
- package/dist/index.esm.js +256 -227
- package/dist/typings/styled/ColorSwatch/StyledColorSwatch.d.ts +1 -2
- package/dist/typings/styled/ColorSwatch/StyledColorSwatchInput.d.ts +13 -0
- package/dist/typings/styled/ColorSwatch/StyledColorSwatchLabel.d.ts +16 -0
- package/dist/typings/styled/ColorSwatch/StyledIcon.d.ts +1 -3
- package/dist/typings/styled/index.d.ts +2 -1
- package/dist/typings/types/index.d.ts +10 -30
- package/package.json +10 -9
- package/dist/typings/styled/ColorSwatch/StyledSwatchButton.d.ts +0 -8
|
@@ -10,5 +10,4 @@
|
|
|
10
10
|
export declare const StyledColorSwatch: import("styled-components").StyledComponent<"table", import("styled-components").DefaultTheme, {
|
|
11
11
|
'data-garden-id': string;
|
|
12
12
|
'data-garden-version': string;
|
|
13
|
-
|
|
14
|
-
}, "role" | "data-garden-id" | "data-garden-version">;
|
|
13
|
+
}, "data-garden-id" | "data-garden-version">;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Accessibly hidden checkbox with support for tooltip hover
|
|
9
|
+
*/
|
|
10
|
+
export declare const StyledColorSwatchInput: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {
|
|
11
|
+
'data-garden-id': string;
|
|
12
|
+
'data-garden-version': string;
|
|
13
|
+
}, "data-garden-id" | "data-garden-version">;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import { DefaultTheme, ThemeProps } from 'styled-components';
|
|
8
|
+
interface IStyledColorSwatchLabelProps extends ThemeProps<DefaultTheme> {
|
|
9
|
+
backgroundColor: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const StyledColorSwatchLabel: import("styled-components").StyledComponent<"span", DefaultTheme, import("../ColorpickerDialog/StyledButtonPreview").IStyleButtonPreviewProps & {
|
|
12
|
+
as: string;
|
|
13
|
+
'data-garden-id': string;
|
|
14
|
+
'data-garden-version': string;
|
|
15
|
+
} & IStyledColorSwatchLabelProps, "data-garden-id" | "data-garden-version" | "as">;
|
|
16
|
+
export {};
|
|
@@ -4,9 +4,7 @@
|
|
|
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
|
-
|
|
8
|
-
import React from 'react';
|
|
9
|
-
export declare const StyledIcon: import("styled-components").StyledComponent<({ children, color, theme, ...props }: any) => React.DetailedReactHTMLElement<any, HTMLElement>, DefaultTheme, {
|
|
7
|
+
export declare const StyledIcon: import("styled-components").StyledComponent<"svg", import("styled-components").DefaultTheme, {
|
|
10
8
|
'data-garden-id': string;
|
|
11
9
|
'data-garden-version': string;
|
|
12
10
|
}, "data-garden-id" | "data-garden-version">;
|
|
@@ -21,7 +21,8 @@ export * from './ColorpickerDialog/StyledButton';
|
|
|
21
21
|
export * from './ColorpickerDialog/StyledButtonPreview';
|
|
22
22
|
export * from './ColorpickerDialog/StyledTooltipModal';
|
|
23
23
|
export * from './ColorpickerDialog/StyledTooltipBody';
|
|
24
|
-
export * from './ColorSwatch/StyledSwatchButton';
|
|
25
24
|
export * from './ColorSwatch/StyledColorSwatch';
|
|
25
|
+
export * from './ColorSwatch/StyledColorSwatchInput';
|
|
26
|
+
export * from './ColorSwatch/StyledColorSwatchLabel';
|
|
26
27
|
export * from './ColorSwatch/StyledIcon';
|
|
27
28
|
export * from './ColorSwatch/StyledCell';
|
|
@@ -70,10 +70,6 @@ export interface IColorpickerDialogProps extends IColorpickerProps {
|
|
|
70
70
|
placement?: ITooltipModalProps['placement'];
|
|
71
71
|
/** Disables the color dialog button */
|
|
72
72
|
disabled?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Modifies [Popper instance](https://popper.js.org/docs/v2/modifiers/) to customize positioning logic
|
|
75
|
-
*/
|
|
76
|
-
popperModifiers?: ITooltipModalProps['popperModifiers'];
|
|
77
73
|
/**
|
|
78
74
|
* Sets the `z-index` of the color dialog
|
|
79
75
|
*/
|
|
@@ -111,48 +107,32 @@ export interface ILabeledColor {
|
|
|
111
107
|
value: string;
|
|
112
108
|
label: string;
|
|
113
109
|
}
|
|
114
|
-
export interface IColorSwatchProps extends Omit<HTMLAttributes<HTMLTableElement>, '
|
|
110
|
+
export interface IColorSwatchProps extends Omit<HTMLAttributes<HTMLTableElement>, 'onSelect'> {
|
|
111
|
+
/** Sets the name used to reference the value of the control */
|
|
112
|
+
name: string;
|
|
115
113
|
/** Sets the two-dimension array of labeled HEX and RGB/A string colors */
|
|
116
114
|
colors: {
|
|
117
115
|
value: string;
|
|
118
116
|
label: string;
|
|
119
117
|
}[][];
|
|
120
|
-
/**
|
|
121
|
-
|
|
122
|
-
/** Sets the
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
/** Sets the selected row index in a controlled color swatch.
|
|
127
|
-
* Can be set to `-1` to clear the column focus.
|
|
128
|
-
*/
|
|
129
|
-
selectedRowIndex?: number;
|
|
130
|
-
/** Sets the selected column index in a controlled color swatch.
|
|
131
|
-
* Can be set to `-1` to clear the row selection.
|
|
132
|
-
*/
|
|
133
|
-
selectedColIndex?: number;
|
|
134
|
-
/** Sets the default focused row index in an uncontrolled color swatch.
|
|
135
|
-
* Can be set to `-1` to clear the column selection.
|
|
136
|
-
*/
|
|
137
|
-
defaultRowIndex?: number;
|
|
138
|
-
/** Sets the default focused column index in an uncontrolled color swatch */
|
|
139
|
-
defaultColIndex?: number;
|
|
118
|
+
/** Determines if the color swatch is backed by radio (default) or checkbox inputs */
|
|
119
|
+
isCheckboxGroup?: boolean;
|
|
120
|
+
/** Sets the selected row index in a controlled color swatch */
|
|
121
|
+
selectedRowIndex?: number | null;
|
|
122
|
+
/** Sets the selected column index in a controlled color swatch */
|
|
123
|
+
selectedColIndex?: number | null;
|
|
140
124
|
/** Sets the default selected row index in an uncontrolled color swatch */
|
|
141
125
|
defaultSelectedRowIndex?: number;
|
|
142
126
|
/** Sets the default selected column index in an uncontrolled color swatch */
|
|
143
127
|
defaultSelectedColIndex?: number;
|
|
144
|
-
/** Handles color swatch changes */
|
|
145
|
-
onChange?: (rowIndex: number, colIndex: number) => void;
|
|
146
128
|
/** Handles color swatch select event */
|
|
147
|
-
onSelect?: (rowIndex: number, colIndex: number) => void;
|
|
129
|
+
onSelect?: (rowIndex: number | null, colIndex: number | null) => void;
|
|
148
130
|
}
|
|
149
131
|
export interface IColorSwatchDialogProps extends IColorSwatchProps {
|
|
150
132
|
/** Adjusts the placement of the color dialog */
|
|
151
133
|
placement?: ITooltipModalProps['placement'];
|
|
152
134
|
/** Disables the color dialog button */
|
|
153
135
|
disabled?: boolean;
|
|
154
|
-
/** Modifies [Popper instance](https://popper.js.org/docs/v2/modifiers/) to customize positioning logic */
|
|
155
|
-
popperModifiers?: ITooltipModalProps['popperModifiers'];
|
|
156
136
|
/** Sets the `z-index` of the color dialog */
|
|
157
137
|
zIndex?: ITooltipModalProps['zIndex'];
|
|
158
138
|
/** Adds an arrow to the color dialog */
|
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.2",
|
|
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>",
|
|
@@ -21,16 +21,17 @@
|
|
|
21
21
|
"sideEffects": false,
|
|
22
22
|
"types": "dist/typings/index.d.ts",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@zendeskgarden/container-grid": "^0.
|
|
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.2",
|
|
27
|
+
"@zendeskgarden/react-forms": "^9.0.0-next.2",
|
|
28
|
+
"@zendeskgarden/react-modals": "^9.0.0-next.2",
|
|
29
|
+
"@zendeskgarden/react-tooltips": "^9.0.0-next.2",
|
|
30
30
|
"lodash.isequal": "^4.5.0",
|
|
31
31
|
"lodash.throttle": "^4.1.1",
|
|
32
32
|
"polished": "^4.0.0",
|
|
33
|
-
"prop-types": "^15.7.2"
|
|
33
|
+
"prop-types": "^15.7.2",
|
|
34
|
+
"react-merge-refs": "^2.0.0"
|
|
34
35
|
},
|
|
35
36
|
"peerDependencies": {
|
|
36
37
|
"@zendeskgarden/react-theming": "^8.67.0",
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
"devDependencies": {
|
|
42
43
|
"@types/lodash.isequal": "4.5.8",
|
|
43
44
|
"@types/lodash.throttle": "4.1.9",
|
|
44
|
-
"@zendeskgarden/react-theming": "^9.0.0-next.
|
|
45
|
+
"@zendeskgarden/react-theming": "^9.0.0-next.2",
|
|
45
46
|
"@zendeskgarden/svg-icons": "7.0.0"
|
|
46
47
|
},
|
|
47
48
|
"keywords": [
|
|
@@ -55,5 +56,5 @@
|
|
|
55
56
|
"access": "public"
|
|
56
57
|
},
|
|
57
58
|
"zendeskgarden:src": "src/index.ts",
|
|
58
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "e47dd011fedf130106acdb485a023340564171af"
|
|
59
60
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
import { IStyleButtonPreviewProps } from '../ColorpickerDialog/StyledButtonPreview';
|
|
8
|
-
export declare const StyledSwatchButton: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, IStyleButtonPreviewProps, never>;
|