@atlaskit/color-picker 3.4.1 → 3.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/color-picker
2
2
 
3
+ ## 3.4.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#153070](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/153070)
8
+ [`f04b3abac1315`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f04b3abac1315) -
9
+ Removed FG to expose color palette event
10
+
11
+ ## 3.4.2
12
+
13
+ ### Patch Changes
14
+
15
+ - [#150969](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/150969)
16
+ [`a15fc4e53f226`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a15fc4e53f226) -
17
+ Fixed a11y violations in ColorPicker and ColorPaletteMenu
18
+
3
19
  ## 3.4.1
4
20
 
5
21
  ### 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 ((0, _platformFeatureFlags.fg)('platform_color_palette-expose-event')) {
52
- if (onClick) {
53
- event.preventDefault();
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, onClickOld, value]);
54
+ }, [onClick, value]);
63
55
  var handleKeyDown = (0, _react.useCallback)(function (event) {
64
- if ((isColorPaletteMenu || isTabbing === undefined || isTabbing) && (onClickOld && !(0, _platformFeatureFlags.fg)('platform_color_palette-expose-event') || onClick && (0, _platformFeatureFlags.fg)('platform_color_palette-expose-event')) && (event.key === _constants.KEY_ENTER || event.key === _constants.KEY_SPACE)) {
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, onClickOld, onKeyDown]);
69
+ }, [isColorPaletteMenu, isTabbing, value, onClick, onKeyDown]);
80
70
  (0, _react.useImperativeHandle)(componentRef, function () {
81
71
  return {
82
72
  focus: function focus() {
@@ -93,16 +83,20 @@ var ColorCard = /*#__PURE__*/(0, _react.forwardRef)(function (props, componentRe
93
83
  }
94
84
  };
95
85
  }, [autoFocus, isColorPaletteMenu, initialFocusRef]);
86
+ var isInsideMenuRole = isInsideMenu ? 'menuitemradio' : 'radio';
87
+ var role = isColorPaletteMenu ? isInsideMenuRole : 'presentation';
88
+ var ariaChecked = isColorPaletteMenu ? selected : undefined;
89
+ var ariaLabel = isColorPaletteMenu ? label : undefined;
96
90
  return (0, _react2.jsx)(_tooltip.default, {
97
91
  content: label
98
92
  }, function (tooltipProps) {
99
93
  delete tooltipProps['aria-describedby'];
100
94
  return (0, _react2.jsx)("div", (0, _extends2.default)({}, tooltipProps, {
101
95
  ref: initialFocusRef ? (0, _useCallbackRef.mergeRefs)([ref, tooltipProps.ref, initialFocusRef]) : (0, _useCallbackRef.mergeRefs)([ref, tooltipProps.ref]),
102
- role: isInsideMenu ? 'menuitemradio' : 'radio',
96
+ role: (0, _platformFeatureFlags.fg)('platform_color_picker-fix-a11y-violations') ? role : isInsideMenuRole,
103
97
  tabIndex: selected ? 0 : -1,
104
- "aria-checked": selected,
105
- "aria-label": label,
98
+ "aria-checked": (0, _platformFeatureFlags.fg)('platform_color_picker-fix-a11y-violations') ? ariaChecked : selected,
99
+ "aria-label": (0, _platformFeatureFlags.fg)('platform_color_picker-fix-a11y-violations') ? ariaLabel : label,
106
100
  css: [sharedColorContainerStyles, (isColorPaletteMenu || isTabbing === undefined || isTabbing) && colorCardOptionTabbingStyles, focused && (isColorPaletteMenu || !isTabbing) && colorCardOptionFocusedStyles],
107
101
  onClick: handleClick,
108
102
  onMouseDown: handleMouseDown,
@@ -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.1"
65
+ packageVersion: "3.4.3"
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
- // Set to required on FG cleanup platform_color_palette-expose-event
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;
@@ -112,9 +106,11 @@ var ColorPaletteMenuWithoutAnalytics = exports.ColorPaletteMenuWithoutAnalytics
112
106
  break;
113
107
  }
114
108
  }, [isFocusLockEnabled, selectedColorIndex, setFocusedIndex, options]);
109
+ var isInsideMenuRole = (0, _platformFeatureFlags.fg)('platform_color_picker-fix-a11y-violations') ? 'menu' : 'group';
110
+ var role = isInsideMenu ? isInsideMenuRole : 'radiogroup';
115
111
  return (0, _react2.jsx)("div", {
116
112
  "aria-label": fullLabel,
117
- role: isInsideMenu ? 'group' : 'radiogroup'
113
+ role: role
118
114
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
119
115
  ,
120
116
  css: [colorPaletteMenuStyles, mode === _types.Mode.Standard && colorPaletteMenuStandardStyles],
@@ -132,18 +128,14 @@ var ColorPaletteMenuWithoutAnalytics = exports.ColorPaletteMenuWithoutAnalytics
132
128
  return (0, _react2.jsx)("div", {
133
129
  css: colorCardWrapperStyles,
134
130
  key: value
135
- }, (0, _react2.jsx)(_ColorCard.default, (0, _extends2.default)({
131
+ }, (0, _react2.jsx)(_ColorCard.default, {
136
132
  type: _constants.COLOR_PALETTE_MENU,
137
133
  label: label,
138
134
  value: value,
139
135
  checkMarkColor: checkMarkColor,
140
136
  isOption: true,
141
- selected: value === selectedValue.value
142
- }, (0, _platformFeatureFlags.fg)('platform_color_palette-expose-event') ? {
143
- onClick: handleChange
144
- } : {
145
- onClickOld: handleChangeOld
146
- }, {
137
+ selected: value === selectedValue.value,
138
+ onClick: handleChange,
147
139
  ref: function ref(_ref4) {
148
140
  colorCardRefs[index] = _ref4;
149
141
  },
@@ -151,13 +143,13 @@ var ColorPaletteMenuWithoutAnalytics = exports.ColorPaletteMenuWithoutAnalytics
151
143
  initialFocusRef: value === selectedValue.value ? initialFocusRef : undefined,
152
144
  isInsideMenu: isInsideMenu,
153
145
  onKeyDown: handleKeyDown
154
- })));
146
+ }));
155
147
  })));
156
148
  };
157
149
  var _default = exports.default = (0, _analyticsNext.withAnalyticsContext)({
158
150
  componentName: 'color-picker',
159
151
  packageName: "@atlaskit/color-picker",
160
- packageVersion: "3.4.1"
152
+ packageVersion: "3.4.3"
161
153
  })((0, _analyticsNext.withAnalyticsEvents)()(ColorPaletteMenuWithoutAnalytics));
162
154
  var colorCardWrapperStyles = (0, _react2.css)({
163
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.1";
45
+ var packageVersion = "3.4.3";
46
46
  var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
47
47
  (0, _inherits2.default)(ColorPickerWithoutAnalyticsBase, _React$Component);
48
48
  var _super = _createSuper(ColorPickerWithoutAnalyticsBase);
@@ -10,6 +10,9 @@ var _ColorCard = _interopRequireDefault(require("./ColorCard"));
10
10
  var _utils = require("../utils");
11
11
  var _react = require("@emotion/react");
12
12
  var _constants = require("../constants");
13
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
+ var _reactIntlNext = require("react-intl-next");
15
+ var _messages = _interopRequireDefault(require("../messages"));
13
16
  /**
14
17
  * @jsxRuntime classic
15
18
  * @jsx jsx
@@ -21,9 +24,14 @@ var MenuList = exports.MenuList = function MenuList(props) {
21
24
  var cols = props.selectProps.cols,
22
25
  innerRef = props.innerRef,
23
26
  children = props.children;
24
- return (0, _react.jsx)("div", {
27
+ var _useIntl = (0, _reactIntlNext.useIntl)(),
28
+ formatMessage = _useIntl.formatMessage;
29
+ return (0, _react.jsx)("div", (0, _extends2.default)({
25
30
  css: colorPaletteContainerStyles,
26
- role: "group",
31
+ role: (0, _platformFeatureFlags.fg)('platform_color_picker-fix-a11y-violations') ? 'listbox' : 'group'
32
+ }, (0, _platformFeatureFlags.fg)('platform_color_picker-fix-a11y-violations') ? {
33
+ 'aria-label': formatMessage(_messages.default.menuListAriaLabel)
34
+ } : {}, {
27
35
  style: {
28
36
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
29
37
  maxWidth: cols ? (0, _utils.getWidth)(cols) : undefined
@@ -31,7 +39,7 @@ var MenuList = exports.MenuList = function MenuList(props) {
31
39
  //@ts-ignore react-select unsupported props
32
40
  ,
33
41
  ref: innerRef
34
- }, children);
42
+ }), children);
35
43
  };
36
44
  var Option = exports.Option = function Option(props) {
37
45
  var _props$data = props.data,
@@ -46,7 +54,9 @@ var Option = exports.Option = function Option(props) {
46
54
  innerProps = props.innerProps;
47
55
  return (0, _react.jsx)("div", (0, _extends2.default)({
48
56
  css: colorCardWrapperStyles
49
- }, innerProps), (0, _react.jsx)(_ColorCard.default, {
57
+ }, innerProps, (0, _platformFeatureFlags.fg)('platform_color_picker-fix-a11y-violations') ? {
58
+ 'aria-label': label
59
+ } : {}), (0, _react.jsx)(_ColorCard.default, {
50
60
  type: _constants.COLOR_PICKER,
51
61
  label: label,
52
62
  value: value,
@@ -10,5 +10,10 @@ var _default = exports.default = (0, _reactIntlNext.defineMessages)({
10
10
  id: 'jira.color-picker.src.color-picker-aria-label',
11
11
  defaultMessage: '{color} selected, {message}',
12
12
  description: 'This text is used as aria-label text in color picker component'
13
+ },
14
+ menuListAriaLabel: {
15
+ id: 'jira.color-picker.src.menu-list-aria-label',
16
+ defaultMessage: 'Color picker list',
17
+ description: 'This text is used as aria-label text for the listbox element in color picker component'
13
18
  }
14
19
  });
@@ -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 (fg('platform_color_palette-expose-event')) {
39
- if (onClick) {
40
- event.preventDefault();
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, onClickOld, value]);
41
+ }, [onClick, value]);
50
42
  const handleKeyDown = useCallback(event => {
51
- if ((isColorPaletteMenu || isTabbing === undefined || isTabbing) && (onClickOld && !fg('platform_color_palette-expose-event') || onClick && fg('platform_color_palette-expose-event')) && (event.key === KEY_ENTER || event.key === KEY_SPACE)) {
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, onClickOld, onKeyDown]);
56
+ }, [isColorPaletteMenu, isTabbing, value, onClick, onKeyDown]);
67
57
  useImperativeHandle(componentRef, () => ({
68
58
  focus: () => {
69
59
  if (isColorPaletteMenu) {
@@ -78,16 +68,20 @@ const ColorCard = /*#__PURE__*/forwardRef((props, componentRef) => {
78
68
  }
79
69
  }
80
70
  }), [autoFocus, isColorPaletteMenu, initialFocusRef]);
71
+ const isInsideMenuRole = isInsideMenu ? 'menuitemradio' : 'radio';
72
+ const role = isColorPaletteMenu ? isInsideMenuRole : 'presentation';
73
+ const ariaChecked = isColorPaletteMenu ? selected : undefined;
74
+ const ariaLabel = isColorPaletteMenu ? label : undefined;
81
75
  return jsx(Tooltip, {
82
76
  content: label
83
77
  }, tooltipProps => {
84
78
  delete tooltipProps['aria-describedby'];
85
79
  return jsx("div", _extends({}, tooltipProps, {
86
80
  ref: initialFocusRef ? mergeRefs([ref, tooltipProps.ref, initialFocusRef]) : mergeRefs([ref, tooltipProps.ref]),
87
- role: isInsideMenu ? 'menuitemradio' : 'radio',
81
+ role: fg('platform_color_picker-fix-a11y-violations') ? role : isInsideMenuRole,
88
82
  tabIndex: selected ? 0 : -1,
89
- "aria-checked": selected,
90
- "aria-label": label,
83
+ "aria-checked": fg('platform_color_picker-fix-a11y-violations') ? ariaChecked : selected,
84
+ "aria-label": fg('platform_color_picker-fix-a11y-violations') ? ariaLabel : label,
91
85
  css: [sharedColorContainerStyles, (isColorPaletteMenu || isTabbing === undefined || isTabbing) && colorCardOptionTabbingStyles, focused && (isColorPaletteMenu || !isTabbing) && colorCardOptionFocusedStyles],
92
86
  onClick: handleClick,
93
87
  onMouseDown: handleMouseDown,
@@ -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.1"
47
+ packageVersion: "3.4.3"
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
- // Set to required on FG cleanup platform_color_palette-expose-event
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;
@@ -88,9 +82,11 @@ export const ColorPaletteMenuWithoutAnalytics = ({
88
82
  break;
89
83
  }
90
84
  }, [isFocusLockEnabled, selectedColorIndex, setFocusedIndex, options]);
85
+ const isInsideMenuRole = fg('platform_color_picker-fix-a11y-violations') ? 'menu' : 'group';
86
+ const role = isInsideMenu ? isInsideMenuRole : 'radiogroup';
91
87
  return jsx("div", {
92
88
  "aria-label": fullLabel,
93
- role: isInsideMenu ? 'group' : 'radiogroup'
89
+ role: role
94
90
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
95
91
  ,
96
92
  css: [colorPaletteMenuStyles, mode === Mode.Standard && colorPaletteMenuStandardStyles],
@@ -108,18 +104,14 @@ export const ColorPaletteMenuWithoutAnalytics = ({
108
104
  }, index) => jsx("div", {
109
105
  css: colorCardWrapperStyles,
110
106
  key: value
111
- }, jsx(ColorCard, _extends({
107
+ }, jsx(ColorCard, {
112
108
  type: COLOR_PALETTE_MENU,
113
109
  label: label,
114
110
  value: value,
115
111
  checkMarkColor: checkMarkColor,
116
112
  isOption: true,
117
- selected: value === selectedValue.value
118
- }, fg('platform_color_palette-expose-event') ? {
119
- onClick: handleChange
120
- } : {
121
- onClickOld: handleChangeOld
122
- }, {
113
+ selected: value === selectedValue.value,
114
+ onClick: handleChange,
123
115
  ref: ref => {
124
116
  colorCardRefs[index] = ref;
125
117
  },
@@ -127,12 +119,12 @@ export const ColorPaletteMenuWithoutAnalytics = ({
127
119
  initialFocusRef: value === selectedValue.value ? initialFocusRef : undefined,
128
120
  isInsideMenu: isInsideMenu,
129
121
  onKeyDown: handleKeyDown
130
- }))))));
122
+ })))));
131
123
  };
132
124
  export default withAnalyticsContext({
133
125
  componentName: 'color-picker',
134
126
  packageName: "@atlaskit/color-picker",
135
- packageVersion: "3.4.1"
127
+ packageVersion: "3.4.3"
136
128
  })(withAnalyticsEvents()(ColorPaletteMenuWithoutAnalytics));
137
129
  const colorCardWrapperStyles = css({
138
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.1";
29
+ const packageVersion = "3.4.3";
30
30
  class ColorPickerWithoutAnalyticsBase extends React.Component {
31
31
  constructor(...args) {
32
32
  super(...args);
@@ -9,6 +9,9 @@ import { getWidth } from '../utils';
9
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
10
  import { css, jsx } from '@emotion/react';
11
11
  import { COLOR_PICKER } from '../constants';
12
+ import { fg } from '@atlaskit/platform-feature-flags';
13
+ import { useIntl } from 'react-intl-next';
14
+ import messages from '../messages';
12
15
  export const MenuList = props => {
13
16
  const {
14
17
  //@ts-ignore react-select unsupported props
@@ -18,9 +21,15 @@ export const MenuList = props => {
18
21
  innerRef,
19
22
  children
20
23
  } = props;
21
- return jsx("div", {
24
+ const {
25
+ formatMessage
26
+ } = useIntl();
27
+ return jsx("div", _extends({
22
28
  css: colorPaletteContainerStyles,
23
- role: "group",
29
+ role: fg('platform_color_picker-fix-a11y-violations') ? 'listbox' : 'group'
30
+ }, fg('platform_color_picker-fix-a11y-violations') ? {
31
+ 'aria-label': formatMessage(messages.menuListAriaLabel)
32
+ } : {}, {
24
33
  style: {
25
34
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
26
35
  maxWidth: cols ? getWidth(cols) : undefined
@@ -28,7 +37,7 @@ export const MenuList = props => {
28
37
  //@ts-ignore react-select unsupported props
29
38
  ,
30
39
  ref: innerRef
31
- }, children);
40
+ }), children);
32
41
  };
33
42
  export const Option = props => {
34
43
  const {
@@ -48,7 +57,9 @@ export const Option = props => {
48
57
  } = props;
49
58
  return jsx("div", _extends({
50
59
  css: colorCardWrapperStyles
51
- }, innerProps), jsx(ColorCard, {
60
+ }, innerProps, fg('platform_color_picker-fix-a11y-violations') ? {
61
+ 'aria-label': label
62
+ } : {}), jsx(ColorCard, {
52
63
  type: COLOR_PICKER,
53
64
  label: label,
54
65
  value: value,
@@ -4,5 +4,10 @@ export default defineMessages({
4
4
  id: 'jira.color-picker.src.color-picker-aria-label',
5
5
  defaultMessage: '{color} selected, {message}',
6
6
  description: 'This text is used as aria-label text in color picker component'
7
+ },
8
+ menuListAriaLabel: {
9
+ id: 'jira.color-picker.src.menu-list-aria-label',
10
+ defaultMessage: 'Color picker list',
11
+ description: 'This text is used as aria-label text for the listbox element in color picker component'
7
12
  }
8
13
  });
@@ -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 (fg('platform_color_palette-expose-event')) {
40
- if (onClick) {
41
- event.preventDefault();
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, onClickOld, value]);
42
+ }, [onClick, value]);
51
43
  var handleKeyDown = useCallback(function (event) {
52
- if ((isColorPaletteMenu || isTabbing === undefined || isTabbing) && (onClickOld && !fg('platform_color_palette-expose-event') || onClick && fg('platform_color_palette-expose-event')) && (event.key === KEY_ENTER || event.key === KEY_SPACE)) {
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, onClickOld, onKeyDown]);
57
+ }, [isColorPaletteMenu, isTabbing, value, onClick, onKeyDown]);
68
58
  useImperativeHandle(componentRef, function () {
69
59
  return {
70
60
  focus: function focus() {
@@ -81,16 +71,20 @@ var ColorCard = /*#__PURE__*/forwardRef(function (props, componentRef) {
81
71
  }
82
72
  };
83
73
  }, [autoFocus, isColorPaletteMenu, initialFocusRef]);
74
+ var isInsideMenuRole = isInsideMenu ? 'menuitemradio' : 'radio';
75
+ var role = isColorPaletteMenu ? isInsideMenuRole : 'presentation';
76
+ var ariaChecked = isColorPaletteMenu ? selected : undefined;
77
+ var ariaLabel = isColorPaletteMenu ? label : undefined;
84
78
  return jsx(Tooltip, {
85
79
  content: label
86
80
  }, function (tooltipProps) {
87
81
  delete tooltipProps['aria-describedby'];
88
82
  return jsx("div", _extends({}, tooltipProps, {
89
83
  ref: initialFocusRef ? mergeRefs([ref, tooltipProps.ref, initialFocusRef]) : mergeRefs([ref, tooltipProps.ref]),
90
- role: isInsideMenu ? 'menuitemradio' : 'radio',
84
+ role: fg('platform_color_picker-fix-a11y-violations') ? role : isInsideMenuRole,
91
85
  tabIndex: selected ? 0 : -1,
92
- "aria-checked": selected,
93
- "aria-label": label,
86
+ "aria-checked": fg('platform_color_picker-fix-a11y-violations') ? ariaChecked : selected,
87
+ "aria-label": fg('platform_color_picker-fix-a11y-violations') ? ariaLabel : label,
94
88
  css: [sharedColorContainerStyles, (isColorPaletteMenu || isTabbing === undefined || isTabbing) && colorCardOptionTabbingStyles, focused && (isColorPaletteMenu || !isTabbing) && colorCardOptionFocusedStyles],
95
89
  onClick: handleClick,
96
90
  onMouseDown: handleMouseDown,
@@ -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.1"
56
+ packageVersion: "3.4.3"
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
- // Set to required on FG cleanup platform_color_palette-expose-event
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;
@@ -103,9 +97,11 @@ export var ColorPaletteMenuWithoutAnalytics = function ColorPaletteMenuWithoutAn
103
97
  break;
104
98
  }
105
99
  }, [isFocusLockEnabled, selectedColorIndex, setFocusedIndex, options]);
100
+ var isInsideMenuRole = fg('platform_color_picker-fix-a11y-violations') ? 'menu' : 'group';
101
+ var role = isInsideMenu ? isInsideMenuRole : 'radiogroup';
106
102
  return jsx("div", {
107
103
  "aria-label": fullLabel,
108
- role: isInsideMenu ? 'group' : 'radiogroup'
104
+ role: role
109
105
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
110
106
  ,
111
107
  css: [colorPaletteMenuStyles, mode === Mode.Standard && colorPaletteMenuStandardStyles],
@@ -123,18 +119,14 @@ export var ColorPaletteMenuWithoutAnalytics = function ColorPaletteMenuWithoutAn
123
119
  return jsx("div", {
124
120
  css: colorCardWrapperStyles,
125
121
  key: value
126
- }, jsx(ColorCard, _extends({
122
+ }, jsx(ColorCard, {
127
123
  type: COLOR_PALETTE_MENU,
128
124
  label: label,
129
125
  value: value,
130
126
  checkMarkColor: checkMarkColor,
131
127
  isOption: true,
132
- selected: value === selectedValue.value
133
- }, fg('platform_color_palette-expose-event') ? {
134
- onClick: handleChange
135
- } : {
136
- onClickOld: handleChangeOld
137
- }, {
128
+ selected: value === selectedValue.value,
129
+ onClick: handleChange,
138
130
  ref: function ref(_ref4) {
139
131
  colorCardRefs[index] = _ref4;
140
132
  },
@@ -142,13 +134,13 @@ export var ColorPaletteMenuWithoutAnalytics = function ColorPaletteMenuWithoutAn
142
134
  initialFocusRef: value === selectedValue.value ? initialFocusRef : undefined,
143
135
  isInsideMenu: isInsideMenu,
144
136
  onKeyDown: handleKeyDown
145
- })));
137
+ }));
146
138
  })));
147
139
  };
148
140
  export default withAnalyticsContext({
149
141
  componentName: 'color-picker',
150
142
  packageName: "@atlaskit/color-picker",
151
- packageVersion: "3.4.1"
143
+ packageVersion: "3.4.3"
152
144
  })(withAnalyticsEvents()(ColorPaletteMenuWithoutAnalytics));
153
145
  var colorCardWrapperStyles = css({
154
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.1";
37
+ var packageVersion = "3.4.3";
38
38
  var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
39
39
  _inherits(ColorPickerWithoutAnalyticsBase, _React$Component);
40
40
  var _super = _createSuper(ColorPickerWithoutAnalyticsBase);
@@ -9,13 +9,21 @@ import { getWidth } from '../utils';
9
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
10
  import { css, jsx } from '@emotion/react';
11
11
  import { COLOR_PICKER } from '../constants';
12
+ import { fg } from '@atlaskit/platform-feature-flags';
13
+ import { useIntl } from 'react-intl-next';
14
+ import messages from '../messages';
12
15
  export var MenuList = function MenuList(props) {
13
16
  var cols = props.selectProps.cols,
14
17
  innerRef = props.innerRef,
15
18
  children = props.children;
16
- return jsx("div", {
19
+ var _useIntl = useIntl(),
20
+ formatMessage = _useIntl.formatMessage;
21
+ return jsx("div", _extends({
17
22
  css: colorPaletteContainerStyles,
18
- role: "group",
23
+ role: fg('platform_color_picker-fix-a11y-violations') ? 'listbox' : 'group'
24
+ }, fg('platform_color_picker-fix-a11y-violations') ? {
25
+ 'aria-label': formatMessage(messages.menuListAriaLabel)
26
+ } : {}, {
19
27
  style: {
20
28
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
21
29
  maxWidth: cols ? getWidth(cols) : undefined
@@ -23,7 +31,7 @@ export var MenuList = function MenuList(props) {
23
31
  //@ts-ignore react-select unsupported props
24
32
  ,
25
33
  ref: innerRef
26
- }, children);
34
+ }), children);
27
35
  };
28
36
  export var Option = function Option(props) {
29
37
  var _props$data = props.data,
@@ -38,7 +46,9 @@ export var Option = function Option(props) {
38
46
  innerProps = props.innerProps;
39
47
  return jsx("div", _extends({
40
48
  css: colorCardWrapperStyles
41
- }, innerProps), jsx(ColorCard, {
49
+ }, innerProps, fg('platform_color_picker-fix-a11y-violations') ? {
50
+ 'aria-label': label
51
+ } : {}), jsx(ColorCard, {
42
52
  type: COLOR_PICKER,
43
53
  label: label,
44
54
  value: value,
@@ -4,5 +4,10 @@ export default defineMessages({
4
4
  id: 'jira.color-picker.src.color-picker-aria-label',
5
5
  defaultMessage: '{color} selected, {message}',
6
6
  description: 'This text is used as aria-label text in color picker component'
7
+ },
8
+ menuListAriaLabel: {
9
+ id: 'jira.color-picker.src.menu-list-aria-label',
10
+ defaultMessage: 'Color picker list',
11
+ description: 'This text is used as aria-label text for the listbox element in color picker component'
7
12
  }
8
13
  });
@@ -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?: (event: MouseEvent | KeyboardEvent, value: string, analyticsEvent?: UIAnalyticsEvent) => void;
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, onChangeOld, palette, selectedColor, checkMarkColor, label, cols, mode, initialFocusRef, }: Props) => jsx.JSX.Element;
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" | "onChangeOld" | "mode"> & import("react").RefAttributes<any>>;
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;
@@ -35,5 +35,7 @@ export interface Props {
35
35
  export declare const ColorPickerWithoutAnalytics: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
36
36
  WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
37
37
  };
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>>;
38
+ declare const _default: React.ForwardRefExoticComponent<Pick<Omit<Omit<Props & WrappedComponentProps, "intl"> & {
39
+ forwardedRef?: React.Ref<any> | undefined;
40
+ }, 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>>;
39
41
  export default _default;
@@ -4,5 +4,10 @@ declare const _default: {
4
4
  defaultMessage: string;
5
5
  description: string;
6
6
  };
7
+ menuListAriaLabel: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
7
12
  };
8
13
  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?: (event: MouseEvent | KeyboardEvent, value: string, analyticsEvent?: UIAnalyticsEvent) => void;
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, onChangeOld, palette, selectedColor, checkMarkColor, label, cols, mode, initialFocusRef, }: Props) => jsx.JSX.Element;
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" | "onChangeOld" | "mode"> & import("react").RefAttributes<any>>;
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;
@@ -35,5 +35,7 @@ export interface Props {
35
35
  export declare const ColorPickerWithoutAnalytics: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
36
36
  WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
37
37
  };
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>>;
38
+ declare const _default: React.ForwardRefExoticComponent<Pick<Omit<Omit<Props & WrappedComponentProps, "intl"> & {
39
+ forwardedRef?: React.Ref<any> | undefined;
40
+ }, 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>>;
39
41
  export default _default;
@@ -4,5 +4,10 @@ declare const _default: {
4
4
  defaultMessage: string;
5
5
  description: string;
6
6
  };
7
+ menuListAriaLabel: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
7
12
  };
8
13
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/color-picker",
3
- "version": "3.4.1",
3
+ "version": "3.4.3",
4
4
  "description": "Jira Color Picker Component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,10 +30,10 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@atlaskit/analytics-next": "^10.1.0",
33
- "@atlaskit/icon": "^22.20.0",
33
+ "@atlaskit/icon": "^22.22.0",
34
34
  "@atlaskit/platform-feature-flags": "0.3.0",
35
- "@atlaskit/select": "^18.0.0",
36
- "@atlaskit/theme": "^13.0.0",
35
+ "@atlaskit/select": "^18.1.0",
36
+ "@atlaskit/theme": "^13.1.0",
37
37
  "@atlaskit/tokens": "^2.0.0",
38
38
  "@atlaskit/tooltip": "^18.8.0",
39
39
  "@babel/runtime": "^7.0.0",
@@ -49,6 +49,7 @@
49
49
  "@af/visual-regression": "*",
50
50
  "@atlaskit/primitives": "^12.2.0",
51
51
  "@atlaskit/visual-regression": "*",
52
+ "@atlassian/a11y-jest-testing": "*",
52
53
  "@testing-library/react": "^12.1.5",
53
54
  "@testing-library/user-event": "^14.4.3",
54
55
  "ast-types": "^0.13.3",
@@ -75,10 +76,10 @@
75
76
  }
76
77
  },
77
78
  "platform-feature-flags": {
78
- "platform_color_palette-expose-event": {
79
+ "platform-design-system-dsp-20821-color-pickr-focus": {
79
80
  "type": "boolean"
80
81
  },
81
- "platform-design-system-dsp-20821-color-pickr-focus": {
82
+ "platform_color_picker-fix-a11y-violations": {
82
83
  "type": "boolean"
83
84
  }
84
85
  }