@atlaskit/color-picker 3.4.2 → 3.4.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/CHANGELOG.md +14 -0
- package/dist/cjs/components/ColorCard.js +7 -17
- package/dist/cjs/components/ColorPaletteMenu.js +7 -17
- package/dist/cjs/components/ColorPicker.js +1 -1
- package/dist/es2019/components/ColorCard.js +7 -17
- package/dist/es2019/components/ColorPaletteMenu.js +7 -17
- package/dist/es2019/components/ColorPicker.js +1 -1
- package/dist/esm/components/ColorCard.js +7 -17
- package/dist/esm/components/ColorPaletteMenu.js +7 -17
- package/dist/esm/components/ColorPicker.js +1 -1
- package/dist/types/components/ColorCard.d.ts +0 -1
- package/dist/types/components/ColorPaletteMenu.d.ts +3 -5
- package/dist/types-ts4.5/components/ColorCard.d.ts +0 -1
- package/dist/types-ts4.5/components/ColorPaletteMenu.d.ts +3 -5
- package/package.json +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/color-picker
|
|
2
2
|
|
|
3
|
+
## 3.4.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 3.4.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#153070](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/153070)
|
|
14
|
+
[`f04b3abac1315`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f04b3abac1315) -
|
|
15
|
+
Removed FG to expose color palette event
|
|
16
|
+
|
|
3
17
|
## 3.4.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -39,7 +39,6 @@ var ColorCard = /*#__PURE__*/(0, _react.forwardRef)(function (props, componentRe
|
|
|
39
39
|
checkMarkColor = _props$checkMarkColor === void 0 ? _colors.N0 : _props$checkMarkColor,
|
|
40
40
|
isTabbing = props.isTabbing,
|
|
41
41
|
onClick = props.onClick,
|
|
42
|
-
onClickOld = props.onClickOld,
|
|
43
42
|
onKeyDown = props.onKeyDown;
|
|
44
43
|
var ref = (0, _react.useRef)(null);
|
|
45
44
|
var isInitialFocus = (0, _react.useRef)(true);
|
|
@@ -48,27 +47,18 @@ var ColorCard = /*#__PURE__*/(0, _react.forwardRef)(function (props, componentRe
|
|
|
48
47
|
event.preventDefault();
|
|
49
48
|
}, []);
|
|
50
49
|
var handleClick = (0, _react.useCallback)(function (event) {
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
onClick(event, value);
|
|
55
|
-
}
|
|
56
|
-
} else {
|
|
57
|
-
if (onClickOld) {
|
|
58
|
-
event.preventDefault();
|
|
59
|
-
onClickOld(value);
|
|
60
|
-
}
|
|
50
|
+
if (onClick) {
|
|
51
|
+
event.preventDefault();
|
|
52
|
+
onClick(event, value);
|
|
61
53
|
}
|
|
62
|
-
}, [onClick,
|
|
54
|
+
}, [onClick, value]);
|
|
63
55
|
var handleKeyDown = (0, _react.useCallback)(function (event) {
|
|
64
|
-
if ((isColorPaletteMenu || isTabbing === undefined || isTabbing) &&
|
|
56
|
+
if ((isColorPaletteMenu || isTabbing === undefined || isTabbing) && onClick && (event.key === _constants.KEY_ENTER || event.key === _constants.KEY_SPACE)) {
|
|
65
57
|
event.preventDefault();
|
|
66
58
|
if (isTabbing) {
|
|
67
59
|
event.stopPropagation();
|
|
68
60
|
}
|
|
69
|
-
|
|
70
|
-
// Remove optional call on FG cleanup platform_color_palette-expose-event
|
|
71
|
-
(0, _platformFeatureFlags.fg)('platform_color_palette-expose-event') ? onClick === null || onClick === void 0 ? void 0 : onClick(event, value) : onClickOld === null || onClickOld === void 0 ? void 0 : onClickOld(value);
|
|
61
|
+
onClick(event, value);
|
|
72
62
|
}
|
|
73
63
|
if (isColorPaletteMenu) {
|
|
74
64
|
onKeyDown === null || onKeyDown === void 0 || onKeyDown(event);
|
|
@@ -76,7 +66,7 @@ var ColorCard = /*#__PURE__*/(0, _react.forwardRef)(function (props, componentRe
|
|
|
76
66
|
event.preventDefault();
|
|
77
67
|
event.stopPropagation();
|
|
78
68
|
}
|
|
79
|
-
}, [isColorPaletteMenu, isTabbing, value, onClick,
|
|
69
|
+
}, [isColorPaletteMenu, isTabbing, value, onClick, onKeyDown]);
|
|
80
70
|
(0, _react.useImperativeHandle)(componentRef, function () {
|
|
81
71
|
return {
|
|
82
72
|
focus: function focus() {
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.ColorPaletteMenuWithoutAnalytics = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
9
|
var _react = require("react");
|
|
11
10
|
var _types = require("../types");
|
|
@@ -32,7 +31,6 @@ var ColorPaletteMenuWithoutAnalytics = exports.ColorPaletteMenuWithoutAnalytics
|
|
|
32
31
|
isInsideMenu = _ref$isInsideMenu === void 0 ? true : _ref$isInsideMenu,
|
|
33
32
|
createAnalyticsEvent = _ref.createAnalyticsEvent,
|
|
34
33
|
onChange = _ref.onChange,
|
|
35
|
-
onChangeOld = _ref.onChangeOld,
|
|
36
34
|
palette = _ref.palette,
|
|
37
35
|
selectedColor = _ref.selectedColor,
|
|
38
36
|
checkMarkColor = _ref.checkMarkColor,
|
|
@@ -64,7 +62,7 @@ var ColorPaletteMenuWithoutAnalytics = exports.ColorPaletteMenuWithoutAnalytics
|
|
|
64
62
|
attributes: {
|
|
65
63
|
componentName: 'color-picker',
|
|
66
64
|
packageName: "@atlaskit/color-picker",
|
|
67
|
-
packageVersion: "3.4.
|
|
65
|
+
packageVersion: "3.4.4"
|
|
68
66
|
}
|
|
69
67
|
})(createAnalyticsEvent);
|
|
70
68
|
}
|
|
@@ -73,12 +71,8 @@ var ColorPaletteMenuWithoutAnalytics = exports.ColorPaletteMenuWithoutAnalytics
|
|
|
73
71
|
var colorCardRefs = (0, _react.useMemo)(function () {
|
|
74
72
|
return [];
|
|
75
73
|
}, []);
|
|
76
|
-
var handleChangeOld = function handleChangeOld(value) {
|
|
77
|
-
onChangeOld === null || onChangeOld === void 0 || onChangeOld(value, changeAnalyticsCaller());
|
|
78
|
-
};
|
|
79
74
|
var handleChange = function handleChange(event, value) {
|
|
80
|
-
|
|
81
|
-
onChange === null || onChange === void 0 || onChange(event, value, changeAnalyticsCaller());
|
|
75
|
+
onChange(event, value, changeAnalyticsCaller());
|
|
82
76
|
};
|
|
83
77
|
(0, _react.useEffect)(function () {
|
|
84
78
|
var _colorCardRefs$focuse;
|
|
@@ -134,18 +128,14 @@ var ColorPaletteMenuWithoutAnalytics = exports.ColorPaletteMenuWithoutAnalytics
|
|
|
134
128
|
return (0, _react2.jsx)("div", {
|
|
135
129
|
css: colorCardWrapperStyles,
|
|
136
130
|
key: value
|
|
137
|
-
}, (0, _react2.jsx)(_ColorCard.default,
|
|
131
|
+
}, (0, _react2.jsx)(_ColorCard.default, {
|
|
138
132
|
type: _constants.COLOR_PALETTE_MENU,
|
|
139
133
|
label: label,
|
|
140
134
|
value: value,
|
|
141
135
|
checkMarkColor: checkMarkColor,
|
|
142
136
|
isOption: true,
|
|
143
|
-
selected: value === selectedValue.value
|
|
144
|
-
|
|
145
|
-
onClick: handleChange
|
|
146
|
-
} : {
|
|
147
|
-
onClickOld: handleChangeOld
|
|
148
|
-
}, {
|
|
137
|
+
selected: value === selectedValue.value,
|
|
138
|
+
onClick: handleChange,
|
|
149
139
|
ref: function ref(_ref4) {
|
|
150
140
|
colorCardRefs[index] = _ref4;
|
|
151
141
|
},
|
|
@@ -153,13 +143,13 @@ var ColorPaletteMenuWithoutAnalytics = exports.ColorPaletteMenuWithoutAnalytics
|
|
|
153
143
|
initialFocusRef: value === selectedValue.value ? initialFocusRef : undefined,
|
|
154
144
|
isInsideMenu: isInsideMenu,
|
|
155
145
|
onKeyDown: handleKeyDown
|
|
156
|
-
}))
|
|
146
|
+
}));
|
|
157
147
|
})));
|
|
158
148
|
};
|
|
159
149
|
var _default = exports.default = (0, _analyticsNext.withAnalyticsContext)({
|
|
160
150
|
componentName: 'color-picker',
|
|
161
151
|
packageName: "@atlaskit/color-picker",
|
|
162
|
-
packageVersion: "3.4.
|
|
152
|
+
packageVersion: "3.4.4"
|
|
163
153
|
})((0, _analyticsNext.withAnalyticsEvents)()(ColorPaletteMenuWithoutAnalytics));
|
|
164
154
|
var colorCardWrapperStyles = (0, _react2.css)({
|
|
165
155
|
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.4.
|
|
45
|
+
var packageVersion = "3.4.4";
|
|
46
46
|
var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
|
|
47
47
|
(0, _inherits2.default)(ColorPickerWithoutAnalyticsBase, _React$Component);
|
|
48
48
|
var _super = _createSuper(ColorPickerWithoutAnalyticsBase);
|
|
@@ -25,7 +25,6 @@ const ColorCard = /*#__PURE__*/forwardRef((props, componentRef) => {
|
|
|
25
25
|
checkMarkColor = N0,
|
|
26
26
|
isTabbing,
|
|
27
27
|
onClick,
|
|
28
|
-
onClickOld,
|
|
29
28
|
onKeyDown
|
|
30
29
|
} = props;
|
|
31
30
|
const ref = useRef(null);
|
|
@@ -35,27 +34,18 @@ const ColorCard = /*#__PURE__*/forwardRef((props, componentRef) => {
|
|
|
35
34
|
event.preventDefault();
|
|
36
35
|
}, []);
|
|
37
36
|
const handleClick = useCallback(event => {
|
|
38
|
-
if (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
onClick(event, value);
|
|
42
|
-
}
|
|
43
|
-
} else {
|
|
44
|
-
if (onClickOld) {
|
|
45
|
-
event.preventDefault();
|
|
46
|
-
onClickOld(value);
|
|
47
|
-
}
|
|
37
|
+
if (onClick) {
|
|
38
|
+
event.preventDefault();
|
|
39
|
+
onClick(event, value);
|
|
48
40
|
}
|
|
49
|
-
}, [onClick,
|
|
41
|
+
}, [onClick, value]);
|
|
50
42
|
const handleKeyDown = useCallback(event => {
|
|
51
|
-
if ((isColorPaletteMenu || isTabbing === undefined || isTabbing) &&
|
|
43
|
+
if ((isColorPaletteMenu || isTabbing === undefined || isTabbing) && onClick && (event.key === KEY_ENTER || event.key === KEY_SPACE)) {
|
|
52
44
|
event.preventDefault();
|
|
53
45
|
if (isTabbing) {
|
|
54
46
|
event.stopPropagation();
|
|
55
47
|
}
|
|
56
|
-
|
|
57
|
-
// Remove optional call on FG cleanup platform_color_palette-expose-event
|
|
58
|
-
fg('platform_color_palette-expose-event') ? onClick === null || onClick === void 0 ? void 0 : onClick(event, value) : onClickOld === null || onClickOld === void 0 ? void 0 : onClickOld(value);
|
|
48
|
+
onClick(event, value);
|
|
59
49
|
}
|
|
60
50
|
if (isColorPaletteMenu) {
|
|
61
51
|
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);
|
|
@@ -63,7 +53,7 @@ const ColorCard = /*#__PURE__*/forwardRef((props, componentRef) => {
|
|
|
63
53
|
event.preventDefault();
|
|
64
54
|
event.stopPropagation();
|
|
65
55
|
}
|
|
66
|
-
}, [isColorPaletteMenu, isTabbing, value, onClick,
|
|
56
|
+
}, [isColorPaletteMenu, isTabbing, value, onClick, onKeyDown]);
|
|
67
57
|
useImperativeHandle(componentRef, () => ({
|
|
68
58
|
focus: () => {
|
|
69
59
|
if (isColorPaletteMenu) {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
/**
|
|
3
2
|
* @jsxRuntime classic
|
|
4
3
|
* @jsx jsx
|
|
@@ -19,7 +18,6 @@ export const ColorPaletteMenuWithoutAnalytics = ({
|
|
|
19
18
|
isInsideMenu = true,
|
|
20
19
|
createAnalyticsEvent,
|
|
21
20
|
onChange,
|
|
22
|
-
onChangeOld,
|
|
23
21
|
palette,
|
|
24
22
|
selectedColor,
|
|
25
23
|
checkMarkColor,
|
|
@@ -46,19 +44,15 @@ export const ColorPaletteMenuWithoutAnalytics = ({
|
|
|
46
44
|
attributes: {
|
|
47
45
|
componentName: 'color-picker',
|
|
48
46
|
packageName: "@atlaskit/color-picker",
|
|
49
|
-
packageVersion: "3.4.
|
|
47
|
+
packageVersion: "3.4.4"
|
|
50
48
|
}
|
|
51
49
|
})(createAnalyticsEvent);
|
|
52
50
|
}
|
|
53
51
|
return undefined;
|
|
54
52
|
};
|
|
55
53
|
const colorCardRefs = useMemo(() => [], []);
|
|
56
|
-
const handleChangeOld = value => {
|
|
57
|
-
onChangeOld === null || onChangeOld === void 0 ? void 0 : onChangeOld(value, changeAnalyticsCaller());
|
|
58
|
-
};
|
|
59
54
|
const handleChange = (event, value) => {
|
|
60
|
-
|
|
61
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(event, value, changeAnalyticsCaller());
|
|
55
|
+
onChange(event, value, changeAnalyticsCaller());
|
|
62
56
|
};
|
|
63
57
|
useEffect(() => {
|
|
64
58
|
var _colorCardRefs$focuse;
|
|
@@ -110,18 +104,14 @@ export const ColorPaletteMenuWithoutAnalytics = ({
|
|
|
110
104
|
}, index) => jsx("div", {
|
|
111
105
|
css: colorCardWrapperStyles,
|
|
112
106
|
key: value
|
|
113
|
-
}, jsx(ColorCard,
|
|
107
|
+
}, jsx(ColorCard, {
|
|
114
108
|
type: COLOR_PALETTE_MENU,
|
|
115
109
|
label: label,
|
|
116
110
|
value: value,
|
|
117
111
|
checkMarkColor: checkMarkColor,
|
|
118
112
|
isOption: true,
|
|
119
|
-
selected: value === selectedValue.value
|
|
120
|
-
|
|
121
|
-
onClick: handleChange
|
|
122
|
-
} : {
|
|
123
|
-
onClickOld: handleChangeOld
|
|
124
|
-
}, {
|
|
113
|
+
selected: value === selectedValue.value,
|
|
114
|
+
onClick: handleChange,
|
|
125
115
|
ref: ref => {
|
|
126
116
|
colorCardRefs[index] = ref;
|
|
127
117
|
},
|
|
@@ -129,12 +119,12 @@ export const ColorPaletteMenuWithoutAnalytics = ({
|
|
|
129
119
|
initialFocusRef: value === selectedValue.value ? initialFocusRef : undefined,
|
|
130
120
|
isInsideMenu: isInsideMenu,
|
|
131
121
|
onKeyDown: handleKeyDown
|
|
132
|
-
})))))
|
|
122
|
+
})))));
|
|
133
123
|
};
|
|
134
124
|
export default withAnalyticsContext({
|
|
135
125
|
componentName: 'color-picker',
|
|
136
126
|
packageName: "@atlaskit/color-picker",
|
|
137
|
-
packageVersion: "3.4.
|
|
127
|
+
packageVersion: "3.4.4"
|
|
138
128
|
})(withAnalyticsEvents()(ColorPaletteMenuWithoutAnalytics));
|
|
139
129
|
const colorCardWrapperStyles = css({
|
|
140
130
|
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.4.
|
|
29
|
+
const packageVersion = "3.4.4";
|
|
30
30
|
class ColorPickerWithoutAnalyticsBase extends React.Component {
|
|
31
31
|
constructor(...args) {
|
|
32
32
|
super(...args);
|
|
@@ -27,7 +27,6 @@ var ColorCard = /*#__PURE__*/forwardRef(function (props, componentRef) {
|
|
|
27
27
|
checkMarkColor = _props$checkMarkColor === void 0 ? N0 : _props$checkMarkColor,
|
|
28
28
|
isTabbing = props.isTabbing,
|
|
29
29
|
onClick = props.onClick,
|
|
30
|
-
onClickOld = props.onClickOld,
|
|
31
30
|
onKeyDown = props.onKeyDown;
|
|
32
31
|
var ref = useRef(null);
|
|
33
32
|
var isInitialFocus = useRef(true);
|
|
@@ -36,27 +35,18 @@ var ColorCard = /*#__PURE__*/forwardRef(function (props, componentRef) {
|
|
|
36
35
|
event.preventDefault();
|
|
37
36
|
}, []);
|
|
38
37
|
var handleClick = useCallback(function (event) {
|
|
39
|
-
if (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
onClick(event, value);
|
|
43
|
-
}
|
|
44
|
-
} else {
|
|
45
|
-
if (onClickOld) {
|
|
46
|
-
event.preventDefault();
|
|
47
|
-
onClickOld(value);
|
|
48
|
-
}
|
|
38
|
+
if (onClick) {
|
|
39
|
+
event.preventDefault();
|
|
40
|
+
onClick(event, value);
|
|
49
41
|
}
|
|
50
|
-
}, [onClick,
|
|
42
|
+
}, [onClick, value]);
|
|
51
43
|
var handleKeyDown = useCallback(function (event) {
|
|
52
|
-
if ((isColorPaletteMenu || isTabbing === undefined || isTabbing) &&
|
|
44
|
+
if ((isColorPaletteMenu || isTabbing === undefined || isTabbing) && onClick && (event.key === KEY_ENTER || event.key === KEY_SPACE)) {
|
|
53
45
|
event.preventDefault();
|
|
54
46
|
if (isTabbing) {
|
|
55
47
|
event.stopPropagation();
|
|
56
48
|
}
|
|
57
|
-
|
|
58
|
-
// Remove optional call on FG cleanup platform_color_palette-expose-event
|
|
59
|
-
fg('platform_color_palette-expose-event') ? onClick === null || onClick === void 0 ? void 0 : onClick(event, value) : onClickOld === null || onClickOld === void 0 ? void 0 : onClickOld(value);
|
|
49
|
+
onClick(event, value);
|
|
60
50
|
}
|
|
61
51
|
if (isColorPaletteMenu) {
|
|
62
52
|
onKeyDown === null || onKeyDown === void 0 || onKeyDown(event);
|
|
@@ -64,7 +54,7 @@ var ColorCard = /*#__PURE__*/forwardRef(function (props, componentRef) {
|
|
|
64
54
|
event.preventDefault();
|
|
65
55
|
event.stopPropagation();
|
|
66
56
|
}
|
|
67
|
-
}, [isColorPaletteMenu, isTabbing, value, onClick,
|
|
57
|
+
}, [isColorPaletteMenu, isTabbing, value, onClick, onKeyDown]);
|
|
68
58
|
useImperativeHandle(componentRef, function () {
|
|
69
59
|
return {
|
|
70
60
|
focus: function focus() {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
2
|
/**
|
|
4
3
|
* @jsxRuntime classic
|
|
@@ -23,7 +22,6 @@ export var ColorPaletteMenuWithoutAnalytics = function ColorPaletteMenuWithoutAn
|
|
|
23
22
|
isInsideMenu = _ref$isInsideMenu === void 0 ? true : _ref$isInsideMenu,
|
|
24
23
|
createAnalyticsEvent = _ref.createAnalyticsEvent,
|
|
25
24
|
onChange = _ref.onChange,
|
|
26
|
-
onChangeOld = _ref.onChangeOld,
|
|
27
25
|
palette = _ref.palette,
|
|
28
26
|
selectedColor = _ref.selectedColor,
|
|
29
27
|
checkMarkColor = _ref.checkMarkColor,
|
|
@@ -55,7 +53,7 @@ export var ColorPaletteMenuWithoutAnalytics = function ColorPaletteMenuWithoutAn
|
|
|
55
53
|
attributes: {
|
|
56
54
|
componentName: 'color-picker',
|
|
57
55
|
packageName: "@atlaskit/color-picker",
|
|
58
|
-
packageVersion: "3.4.
|
|
56
|
+
packageVersion: "3.4.4"
|
|
59
57
|
}
|
|
60
58
|
})(createAnalyticsEvent);
|
|
61
59
|
}
|
|
@@ -64,12 +62,8 @@ export var ColorPaletteMenuWithoutAnalytics = function ColorPaletteMenuWithoutAn
|
|
|
64
62
|
var colorCardRefs = useMemo(function () {
|
|
65
63
|
return [];
|
|
66
64
|
}, []);
|
|
67
|
-
var handleChangeOld = function handleChangeOld(value) {
|
|
68
|
-
onChangeOld === null || onChangeOld === void 0 || onChangeOld(value, changeAnalyticsCaller());
|
|
69
|
-
};
|
|
70
65
|
var handleChange = function handleChange(event, value) {
|
|
71
|
-
|
|
72
|
-
onChange === null || onChange === void 0 || onChange(event, value, changeAnalyticsCaller());
|
|
66
|
+
onChange(event, value, changeAnalyticsCaller());
|
|
73
67
|
};
|
|
74
68
|
useEffect(function () {
|
|
75
69
|
var _colorCardRefs$focuse;
|
|
@@ -125,18 +119,14 @@ export var ColorPaletteMenuWithoutAnalytics = function ColorPaletteMenuWithoutAn
|
|
|
125
119
|
return jsx("div", {
|
|
126
120
|
css: colorCardWrapperStyles,
|
|
127
121
|
key: value
|
|
128
|
-
}, jsx(ColorCard,
|
|
122
|
+
}, jsx(ColorCard, {
|
|
129
123
|
type: COLOR_PALETTE_MENU,
|
|
130
124
|
label: label,
|
|
131
125
|
value: value,
|
|
132
126
|
checkMarkColor: checkMarkColor,
|
|
133
127
|
isOption: true,
|
|
134
|
-
selected: value === selectedValue.value
|
|
135
|
-
|
|
136
|
-
onClick: handleChange
|
|
137
|
-
} : {
|
|
138
|
-
onClickOld: handleChangeOld
|
|
139
|
-
}, {
|
|
128
|
+
selected: value === selectedValue.value,
|
|
129
|
+
onClick: handleChange,
|
|
140
130
|
ref: function ref(_ref4) {
|
|
141
131
|
colorCardRefs[index] = _ref4;
|
|
142
132
|
},
|
|
@@ -144,13 +134,13 @@ export var ColorPaletteMenuWithoutAnalytics = function ColorPaletteMenuWithoutAn
|
|
|
144
134
|
initialFocusRef: value === selectedValue.value ? initialFocusRef : undefined,
|
|
145
135
|
isInsideMenu: isInsideMenu,
|
|
146
136
|
onKeyDown: handleKeyDown
|
|
147
|
-
}))
|
|
137
|
+
}));
|
|
148
138
|
})));
|
|
149
139
|
};
|
|
150
140
|
export default withAnalyticsContext({
|
|
151
141
|
componentName: 'color-picker',
|
|
152
142
|
packageName: "@atlaskit/color-picker",
|
|
153
|
-
packageVersion: "3.4.
|
|
143
|
+
packageVersion: "3.4.4"
|
|
154
144
|
})(withAnalyticsEvents()(ColorPaletteMenuWithoutAnalytics));
|
|
155
145
|
var colorCardWrapperStyles = css({
|
|
156
146
|
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.4.
|
|
37
|
+
var packageVersion = "3.4.4";
|
|
38
38
|
var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
|
|
39
39
|
_inherits(ColorPickerWithoutAnalyticsBase, _React$Component);
|
|
40
40
|
var _super = _createSuper(ColorPickerWithoutAnalyticsBase);
|
|
@@ -11,7 +11,6 @@ export interface Props {
|
|
|
11
11
|
type: ColorCardType;
|
|
12
12
|
value: string;
|
|
13
13
|
label: string;
|
|
14
|
-
onClickOld?: (value: string) => void;
|
|
15
14
|
onClick?: (event: React.MouseEvent | React.KeyboardEvent, value: string) => void;
|
|
16
15
|
onKeyDown?: KeyboardEventHandler<HTMLElement>;
|
|
17
16
|
checkMarkColor?: string;
|
|
@@ -23,10 +23,8 @@ export type Props = {
|
|
|
23
23
|
cols: number;
|
|
24
24
|
/** color of checkmark on selected color */
|
|
25
25
|
checkMarkColor?: string;
|
|
26
|
-
/** onChange handler deprecated */
|
|
27
|
-
onChangeOld?: (value: string, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
28
26
|
/** onChange handler */
|
|
29
|
-
onChange
|
|
27
|
+
onChange: (event: MouseEvent | KeyboardEvent, value: string, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
30
28
|
/** You should not be accessing this prop under any circumstances. It is provided by @atlaskit/analytics-next. */
|
|
31
29
|
createAnalyticsEvent?: any;
|
|
32
30
|
/** style of the color-picker, either 'Compact' or 'Standard', default value is 'Standard' */
|
|
@@ -34,6 +32,6 @@ export type Props = {
|
|
|
34
32
|
/** the ref object (usually the currently selected color palette) that consumer can leverage to focus on load */
|
|
35
33
|
initialFocusRef?: Ref<HTMLDivElement>;
|
|
36
34
|
};
|
|
37
|
-
export declare const ColorPaletteMenuWithoutAnalytics: ({ autoFocus, isFocusLockEnabled, isInsideMenu, createAnalyticsEvent, onChange,
|
|
38
|
-
declare const _default: import("react").ForwardRefExoticComponent<Pick<Omit<Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "label" | "analyticsContext" | "key" | "autoFocus" | "onChange" | "initialFocusRef" | "isInsideMenu" | "checkMarkColor" | "cols" | "palette" | "selectedColor" | "isFocusLockEnabled" | "
|
|
35
|
+
export declare const ColorPaletteMenuWithoutAnalytics: ({ autoFocus, isFocusLockEnabled, isInsideMenu, createAnalyticsEvent, onChange, palette, selectedColor, checkMarkColor, label, cols, mode, initialFocusRef, }: Props) => jsx.JSX.Element;
|
|
36
|
+
declare const _default: import("react").ForwardRefExoticComponent<Pick<Omit<Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "label" | "analyticsContext" | "key" | "autoFocus" | "onChange" | "initialFocusRef" | "isInsideMenu" | "checkMarkColor" | "cols" | "palette" | "selectedColor" | "isFocusLockEnabled" | "mode"> & import("react").RefAttributes<any>>;
|
|
39
37
|
export default _default;
|
|
@@ -11,7 +11,6 @@ export interface Props {
|
|
|
11
11
|
type: ColorCardType;
|
|
12
12
|
value: string;
|
|
13
13
|
label: string;
|
|
14
|
-
onClickOld?: (value: string) => void;
|
|
15
14
|
onClick?: (event: React.MouseEvent | React.KeyboardEvent, value: string) => void;
|
|
16
15
|
onKeyDown?: KeyboardEventHandler<HTMLElement>;
|
|
17
16
|
checkMarkColor?: string;
|
|
@@ -23,10 +23,8 @@ export type Props = {
|
|
|
23
23
|
cols: number;
|
|
24
24
|
/** color of checkmark on selected color */
|
|
25
25
|
checkMarkColor?: string;
|
|
26
|
-
/** onChange handler deprecated */
|
|
27
|
-
onChangeOld?: (value: string, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
28
26
|
/** onChange handler */
|
|
29
|
-
onChange
|
|
27
|
+
onChange: (event: MouseEvent | KeyboardEvent, value: string, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
30
28
|
/** You should not be accessing this prop under any circumstances. It is provided by @atlaskit/analytics-next. */
|
|
31
29
|
createAnalyticsEvent?: any;
|
|
32
30
|
/** style of the color-picker, either 'Compact' or 'Standard', default value is 'Standard' */
|
|
@@ -34,6 +32,6 @@ export type Props = {
|
|
|
34
32
|
/** the ref object (usually the currently selected color palette) that consumer can leverage to focus on load */
|
|
35
33
|
initialFocusRef?: Ref<HTMLDivElement>;
|
|
36
34
|
};
|
|
37
|
-
export declare const ColorPaletteMenuWithoutAnalytics: ({ autoFocus, isFocusLockEnabled, isInsideMenu, createAnalyticsEvent, onChange,
|
|
38
|
-
declare const _default: import("react").ForwardRefExoticComponent<Pick<Omit<Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "label" | "analyticsContext" | "key" | "autoFocus" | "onChange" | "initialFocusRef" | "isInsideMenu" | "checkMarkColor" | "cols" | "palette" | "selectedColor" | "isFocusLockEnabled" | "
|
|
35
|
+
export declare const ColorPaletteMenuWithoutAnalytics: ({ autoFocus, isFocusLockEnabled, isInsideMenu, createAnalyticsEvent, onChange, palette, selectedColor, checkMarkColor, label, cols, mode, initialFocusRef, }: Props) => jsx.JSX.Element;
|
|
36
|
+
declare const _default: import("react").ForwardRefExoticComponent<Pick<Omit<Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "label" | "analyticsContext" | "key" | "autoFocus" | "onChange" | "initialFocusRef" | "isInsideMenu" | "checkMarkColor" | "cols" | "palette" | "selectedColor" | "isFocusLockEnabled" | "mode"> & import("react").RefAttributes<any>>;
|
|
39
37
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/color-picker",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.4",
|
|
4
4
|
"description": "Jira Color Picker Component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@atlaskit/icon": "^22.22.0",
|
|
34
34
|
"@atlaskit/platform-feature-flags": "0.3.0",
|
|
35
35
|
"@atlaskit/select": "^18.1.0",
|
|
36
|
-
"@atlaskit/theme": "^
|
|
36
|
+
"@atlaskit/theme": "^14.0.0",
|
|
37
37
|
"@atlaskit/tokens": "^2.0.0",
|
|
38
38
|
"@atlaskit/tooltip": "^18.8.0",
|
|
39
39
|
"@babel/runtime": "^7.0.0",
|
|
@@ -76,9 +76,6 @@
|
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
"platform-feature-flags": {
|
|
79
|
-
"platform_color_palette-expose-event": {
|
|
80
|
-
"type": "boolean"
|
|
81
|
-
},
|
|
82
79
|
"platform-design-system-dsp-20821-color-pickr-focus": {
|
|
83
80
|
"type": "boolean"
|
|
84
81
|
},
|