@atlaskit/color-picker 3.2.21 → 3.2.22
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/CHANGELOG.md +6 -0
- package/afm-jira/tsconfig.json +0 -3
- package/dist/cjs/components/ColorPaletteMenu.js +2 -2
- package/dist/cjs/components/ColorPicker.js +4 -2
- package/dist/cjs/components/Trigger.js +4 -2
- package/dist/es2019/components/ColorPaletteMenu.js +2 -2
- package/dist/es2019/components/ColorPicker.js +4 -2
- package/dist/es2019/components/Trigger.js +4 -2
- package/dist/esm/components/ColorPaletteMenu.js +2 -2
- package/dist/esm/components/ColorPicker.js +4 -2
- package/dist/esm/components/Trigger.js +4 -2
- package/dist/types/components/ColorPicker.d.ts +3 -1
- package/dist/types/components/Trigger.d.ts +2 -1
- package/dist/types-ts4.5/components/ColorPicker.d.ts +3 -1
- package/dist/types-ts4.5/components/Trigger.d.ts +2 -1
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
package/afm-jira/tsconfig.json
CHANGED
|
@@ -39,7 +39,7 @@ var ColorPaletteMenuWithoutAnalytics = exports.ColorPaletteMenuWithoutAnalytics
|
|
|
39
39
|
attributes: {
|
|
40
40
|
componentName: 'color-picker',
|
|
41
41
|
packageName: "@atlaskit/color-picker",
|
|
42
|
-
packageVersion: "3.2.
|
|
42
|
+
packageVersion: "3.2.22"
|
|
43
43
|
}
|
|
44
44
|
})(createAnalyticsEvent);
|
|
45
45
|
}
|
|
@@ -86,7 +86,7 @@ var ColorPaletteMenuWithoutAnalytics = exports.ColorPaletteMenuWithoutAnalytics
|
|
|
86
86
|
var _default = exports.default = (0, _analyticsNext.withAnalyticsContext)({
|
|
87
87
|
componentName: 'color-picker',
|
|
88
88
|
packageName: "@atlaskit/color-picker",
|
|
89
|
-
packageVersion: "3.2.
|
|
89
|
+
packageVersion: "3.2.22"
|
|
90
90
|
})((0, _analyticsNext.withAnalyticsEvents)()(ColorPaletteMenuWithoutAnalytics));
|
|
91
91
|
var colorCardWrapperStyles = (0, _react.css)({
|
|
92
92
|
display: 'flex',
|
|
@@ -42,7 +42,7 @@ var defaultPopperProps = {
|
|
|
42
42
|
placement: 'bottom-start'
|
|
43
43
|
};
|
|
44
44
|
var packageName = "@atlaskit/color-picker";
|
|
45
|
-
var packageVersion = "3.2.
|
|
45
|
+
var packageVersion = "3.2.22";
|
|
46
46
|
var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
|
|
47
47
|
(0, _inherits2.default)(ColorPickerWithoutAnalyticsBase, _React$Component);
|
|
48
48
|
var _super = _createSuper(ColorPickerWithoutAnalyticsBase);
|
|
@@ -116,6 +116,7 @@ var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
|
|
|
116
116
|
popperProps = _this$props$popperPro === void 0 ? defaultPopperProps : _this$props$popperPro,
|
|
117
117
|
_this$props$label = _this$props.label,
|
|
118
118
|
label = _this$props$label === void 0 ? 'Color picker' : _this$props$label,
|
|
119
|
+
triggerId = _this$props.triggerId,
|
|
119
120
|
selectedColourSwatchSize = _this$props.selectedColourSwatchSize,
|
|
120
121
|
_this$props$showDefau = _this$props.showDefaultSwatchColor,
|
|
121
122
|
showDefaultSwatchColor = _this$props$showDefau === void 0 ? true : _this$props$showDefau,
|
|
@@ -136,7 +137,8 @@ var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
|
|
|
136
137
|
label: fullLabel,
|
|
137
138
|
expanded: isOpen,
|
|
138
139
|
swatchSize: selectedColourSwatchSize,
|
|
139
|
-
isDisabled: isDisabledSelectedSwatch
|
|
140
|
+
isDisabled: isDisabledSelectedSwatch,
|
|
141
|
+
id: triggerId
|
|
140
142
|
})));
|
|
141
143
|
},
|
|
142
144
|
popperProps: popperProps,
|
|
@@ -23,7 +23,8 @@ var ColorCard = function ColorCard(_ref) {
|
|
|
23
23
|
onClick = _ref.onClick,
|
|
24
24
|
_ref$swatchSize = _ref.swatchSize,
|
|
25
25
|
swatchSize = _ref$swatchSize === void 0 ? 'default' : _ref$swatchSize,
|
|
26
|
-
isDisabled = _ref.isDisabled
|
|
26
|
+
isDisabled = _ref.isDisabled,
|
|
27
|
+
id = _ref.id;
|
|
27
28
|
var handleMouseDown = (0, _react.useCallback)(function (event) {
|
|
28
29
|
event.preventDefault();
|
|
29
30
|
}, []);
|
|
@@ -44,7 +45,8 @@ var ColorCard = function ColorCard(_ref) {
|
|
|
44
45
|
"aria-label": label,
|
|
45
46
|
"aria-expanded": expanded,
|
|
46
47
|
"aria-haspopup": true,
|
|
47
|
-
type: "button"
|
|
48
|
+
type: "button",
|
|
49
|
+
id: id
|
|
48
50
|
}, (0, _react2.jsx)("span", {
|
|
49
51
|
css: colorCardWrapperStyles
|
|
50
52
|
}, (0, _react2.jsx)("span", {
|
|
@@ -28,7 +28,7 @@ export const ColorPaletteMenuWithoutAnalytics = ({
|
|
|
28
28
|
attributes: {
|
|
29
29
|
componentName: 'color-picker',
|
|
30
30
|
packageName: "@atlaskit/color-picker",
|
|
31
|
-
packageVersion: "3.2.
|
|
31
|
+
packageVersion: "3.2.22"
|
|
32
32
|
}
|
|
33
33
|
})(createAnalyticsEvent);
|
|
34
34
|
}
|
|
@@ -75,7 +75,7 @@ export const ColorPaletteMenuWithoutAnalytics = ({
|
|
|
75
75
|
export default withAnalyticsContext({
|
|
76
76
|
componentName: 'color-picker',
|
|
77
77
|
packageName: "@atlaskit/color-picker",
|
|
78
|
-
packageVersion: "3.2.
|
|
78
|
+
packageVersion: "3.2.22"
|
|
79
79
|
})(withAnalyticsEvents()(ColorPaletteMenuWithoutAnalytics));
|
|
80
80
|
const colorCardWrapperStyles = css({
|
|
81
81
|
display: 'flex',
|
|
@@ -26,7 +26,7 @@ const defaultPopperProps = {
|
|
|
26
26
|
placement: 'bottom-start'
|
|
27
27
|
};
|
|
28
28
|
const packageName = "@atlaskit/color-picker";
|
|
29
|
-
const packageVersion = "3.2.
|
|
29
|
+
const packageVersion = "3.2.22";
|
|
30
30
|
class ColorPickerWithoutAnalyticsBase extends React.Component {
|
|
31
31
|
constructor(...args) {
|
|
32
32
|
super(...args);
|
|
@@ -90,6 +90,7 @@ class ColorPickerWithoutAnalyticsBase extends React.Component {
|
|
|
90
90
|
cols,
|
|
91
91
|
popperProps = defaultPopperProps,
|
|
92
92
|
label = 'Color picker',
|
|
93
|
+
triggerId,
|
|
93
94
|
selectedColourSwatchSize,
|
|
94
95
|
showDefaultSwatchColor = true,
|
|
95
96
|
isDisabledSelectedSwatch,
|
|
@@ -111,7 +112,8 @@ class ColorPickerWithoutAnalyticsBase extends React.Component {
|
|
|
111
112
|
label: fullLabel,
|
|
112
113
|
expanded: isOpen,
|
|
113
114
|
swatchSize: selectedColourSwatchSize,
|
|
114
|
-
isDisabled: isDisabledSelectedSwatch
|
|
115
|
+
isDisabled: isDisabledSelectedSwatch,
|
|
116
|
+
id: triggerId
|
|
115
117
|
}))),
|
|
116
118
|
popperProps: popperProps,
|
|
117
119
|
maxMenuWidth: "auto",
|
|
@@ -13,7 +13,8 @@ const ColorCard = ({
|
|
|
13
13
|
expanded,
|
|
14
14
|
onClick,
|
|
15
15
|
swatchSize = 'default',
|
|
16
|
-
isDisabled
|
|
16
|
+
isDisabled,
|
|
17
|
+
id
|
|
17
18
|
}) => {
|
|
18
19
|
const handleMouseDown = useCallback(event => {
|
|
19
20
|
event.preventDefault();
|
|
@@ -35,7 +36,8 @@ const ColorCard = ({
|
|
|
35
36
|
"aria-label": label,
|
|
36
37
|
"aria-expanded": expanded,
|
|
37
38
|
"aria-haspopup": true,
|
|
38
|
-
type: "button"
|
|
39
|
+
type: "button",
|
|
40
|
+
id: id
|
|
39
41
|
}, jsx("span", {
|
|
40
42
|
css: colorCardWrapperStyles
|
|
41
43
|
}, jsx("span", {
|
|
@@ -30,7 +30,7 @@ export var ColorPaletteMenuWithoutAnalytics = function ColorPaletteMenuWithoutAn
|
|
|
30
30
|
attributes: {
|
|
31
31
|
componentName: 'color-picker',
|
|
32
32
|
packageName: "@atlaskit/color-picker",
|
|
33
|
-
packageVersion: "3.2.
|
|
33
|
+
packageVersion: "3.2.22"
|
|
34
34
|
}
|
|
35
35
|
})(createAnalyticsEvent);
|
|
36
36
|
}
|
|
@@ -77,7 +77,7 @@ export var ColorPaletteMenuWithoutAnalytics = function ColorPaletteMenuWithoutAn
|
|
|
77
77
|
export default withAnalyticsContext({
|
|
78
78
|
componentName: 'color-picker',
|
|
79
79
|
packageName: "@atlaskit/color-picker",
|
|
80
|
-
packageVersion: "3.2.
|
|
80
|
+
packageVersion: "3.2.22"
|
|
81
81
|
})(withAnalyticsEvents()(ColorPaletteMenuWithoutAnalytics));
|
|
82
82
|
var colorCardWrapperStyles = css({
|
|
83
83
|
display: 'flex',
|
|
@@ -34,7 +34,7 @@ var defaultPopperProps = {
|
|
|
34
34
|
placement: 'bottom-start'
|
|
35
35
|
};
|
|
36
36
|
var packageName = "@atlaskit/color-picker";
|
|
37
|
-
var packageVersion = "3.2.
|
|
37
|
+
var packageVersion = "3.2.22";
|
|
38
38
|
var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
|
|
39
39
|
_inherits(ColorPickerWithoutAnalyticsBase, _React$Component);
|
|
40
40
|
var _super = _createSuper(ColorPickerWithoutAnalyticsBase);
|
|
@@ -108,6 +108,7 @@ var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
|
|
|
108
108
|
popperProps = _this$props$popperPro === void 0 ? defaultPopperProps : _this$props$popperPro,
|
|
109
109
|
_this$props$label = _this$props.label,
|
|
110
110
|
label = _this$props$label === void 0 ? 'Color picker' : _this$props$label,
|
|
111
|
+
triggerId = _this$props.triggerId,
|
|
111
112
|
selectedColourSwatchSize = _this$props.selectedColourSwatchSize,
|
|
112
113
|
_this$props$showDefau = _this$props.showDefaultSwatchColor,
|
|
113
114
|
showDefaultSwatchColor = _this$props$showDefau === void 0 ? true : _this$props$showDefau,
|
|
@@ -128,7 +129,8 @@ var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
|
|
|
128
129
|
label: fullLabel,
|
|
129
130
|
expanded: isOpen,
|
|
130
131
|
swatchSize: selectedColourSwatchSize,
|
|
131
|
-
isDisabled: isDisabledSelectedSwatch
|
|
132
|
+
isDisabled: isDisabledSelectedSwatch,
|
|
133
|
+
id: triggerId
|
|
132
134
|
})));
|
|
133
135
|
},
|
|
134
136
|
popperProps: popperProps,
|
|
@@ -14,7 +14,8 @@ var ColorCard = function ColorCard(_ref) {
|
|
|
14
14
|
onClick = _ref.onClick,
|
|
15
15
|
_ref$swatchSize = _ref.swatchSize,
|
|
16
16
|
swatchSize = _ref$swatchSize === void 0 ? 'default' : _ref$swatchSize,
|
|
17
|
-
isDisabled = _ref.isDisabled
|
|
17
|
+
isDisabled = _ref.isDisabled,
|
|
18
|
+
id = _ref.id;
|
|
18
19
|
var handleMouseDown = useCallback(function (event) {
|
|
19
20
|
event.preventDefault();
|
|
20
21
|
}, []);
|
|
@@ -35,7 +36,8 @@ var ColorCard = function ColorCard(_ref) {
|
|
|
35
36
|
"aria-label": label,
|
|
36
37
|
"aria-expanded": expanded,
|
|
37
38
|
"aria-haspopup": true,
|
|
38
|
-
type: "button"
|
|
39
|
+
type: "button",
|
|
40
|
+
id: id
|
|
39
41
|
}, jsx("span", {
|
|
40
42
|
css: colorCardWrapperStyles
|
|
41
43
|
}, jsx("span", {
|
|
@@ -9,6 +9,8 @@ import type { WrappedComponentProps } from 'react-intl-next';
|
|
|
9
9
|
export interface Props {
|
|
10
10
|
/** color picker button label */
|
|
11
11
|
label?: string;
|
|
12
|
+
/** trigger id for accessability labelling */
|
|
13
|
+
triggerId?: string;
|
|
12
14
|
/** list of available colors */
|
|
13
15
|
palette: Palette;
|
|
14
16
|
/** selected color */
|
|
@@ -33,5 +35,5 @@ export interface Props {
|
|
|
33
35
|
export declare const ColorPickerWithoutAnalytics: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
|
34
36
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
35
37
|
};
|
|
36
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "label" | "analyticsContext" | "key" | "onChange" | "checkMarkColor" | "cols" | "popperProps" | "palette" | "selectedColor" | "selectedColourSwatchSize" | "showDefaultSwatchColor" | "isDisabledSelectedSwatch" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
38
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "label" | "analyticsContext" | "key" | "onChange" | "checkMarkColor" | "cols" | "popperProps" | "palette" | "triggerId" | "selectedColor" | "selectedColourSwatchSize" | "showDefaultSwatchColor" | "isDisabledSelectedSwatch" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
37
39
|
export default _default;
|
|
@@ -7,6 +7,7 @@ export interface Props {
|
|
|
7
7
|
expanded?: boolean;
|
|
8
8
|
swatchSize?: SwatchSize;
|
|
9
9
|
isDisabled?: boolean;
|
|
10
|
+
id?: string;
|
|
10
11
|
}
|
|
11
|
-
declare const ColorCard: ({ value, label, expanded, onClick, swatchSize, isDisabled, }: Props) => jsx.JSX.Element;
|
|
12
|
+
declare const ColorCard: ({ value, label, expanded, onClick, swatchSize, isDisabled, id, }: Props) => jsx.JSX.Element;
|
|
12
13
|
export default ColorCard;
|
|
@@ -9,6 +9,8 @@ import type { WrappedComponentProps } from 'react-intl-next';
|
|
|
9
9
|
export interface Props {
|
|
10
10
|
/** color picker button label */
|
|
11
11
|
label?: string;
|
|
12
|
+
/** trigger id for accessability labelling */
|
|
13
|
+
triggerId?: string;
|
|
12
14
|
/** list of available colors */
|
|
13
15
|
palette: Palette;
|
|
14
16
|
/** selected color */
|
|
@@ -33,5 +35,5 @@ export interface Props {
|
|
|
33
35
|
export declare const ColorPickerWithoutAnalytics: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
|
34
36
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
35
37
|
};
|
|
36
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "label" | "analyticsContext" | "key" | "onChange" | "checkMarkColor" | "cols" | "popperProps" | "palette" | "selectedColor" | "selectedColourSwatchSize" | "showDefaultSwatchColor" | "isDisabledSelectedSwatch" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
38
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "label" | "analyticsContext" | "key" | "onChange" | "checkMarkColor" | "cols" | "popperProps" | "palette" | "triggerId" | "selectedColor" | "selectedColourSwatchSize" | "showDefaultSwatchColor" | "isDisabledSelectedSwatch" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
37
39
|
export default _default;
|
|
@@ -7,6 +7,7 @@ export interface Props {
|
|
|
7
7
|
expanded?: boolean;
|
|
8
8
|
swatchSize?: SwatchSize;
|
|
9
9
|
isDisabled?: boolean;
|
|
10
|
+
id?: string;
|
|
10
11
|
}
|
|
11
|
-
declare const ColorCard: ({ value, label, expanded, onClick, swatchSize, isDisabled, }: Props) => jsx.JSX.Element;
|
|
12
|
+
declare const ColorCard: ({ value, label, expanded, onClick, swatchSize, isDisabled, id, }: Props) => jsx.JSX.Element;
|
|
12
13
|
export default ColorCard;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/color-picker",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.22",
|
|
4
4
|
"description": "Jira Color Picker Component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -29,14 +29,15 @@
|
|
|
29
29
|
],
|
|
30
30
|
"website": {
|
|
31
31
|
"name": "Color Picker"
|
|
32
|
-
}
|
|
32
|
+
},
|
|
33
|
+
"runReact18": true
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
|
-
"@atlaskit/analytics-next": "^
|
|
36
|
-
"@atlaskit/icon": "^22.
|
|
36
|
+
"@atlaskit/analytics-next": "^10.0.0",
|
|
37
|
+
"@atlaskit/icon": "^22.10.0",
|
|
37
38
|
"@atlaskit/select": "^17.11.0",
|
|
38
39
|
"@atlaskit/theme": "^12.11.0",
|
|
39
|
-
"@atlaskit/tokens": "^1.
|
|
40
|
+
"@atlaskit/tokens": "^1.57.0",
|
|
40
41
|
"@atlaskit/tooltip": "^18.5.0",
|
|
41
42
|
"@babel/runtime": "^7.0.0",
|
|
42
43
|
"@emotion/react": "^11.7.1",
|