@atlaskit/color-picker 3.4.5 → 3.4.6

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,13 @@
1
1
  # @atlaskit/color-picker
2
2
 
3
+ ## 3.4.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#163555](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/163555)
8
+ [`f13bab6193072`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f13bab6193072) -
9
+ Fixed roles to align with radio button use case
10
+
3
11
  ## 3.4.5
4
12
 
5
13
  ### Patch Changes
@@ -1,42 +1,42 @@
1
1
  {
2
- "extends": "../../../../tsconfig.entry-points.jira.json",
3
- "compilerOptions": {
4
- "declaration": true,
5
- "target": "es5",
6
- "outDir": "../../../../../tsDist/@atlaskit__color-picker/app",
7
- "composite": true,
8
- "rootDir": "../"
9
- },
10
- "include": [
11
- "../src/**/*.ts",
12
- "../src/**/*.tsx"
13
- ],
14
- "exclude": [
15
- "../src/**/__tests__/*",
16
- "../src/**/*.test.*",
17
- "../src/**/test.*"
18
- ],
19
- "references": [
20
- {
21
- "path": "../../../analytics/analytics-next/afm-jira/tsconfig.json"
22
- },
23
- {
24
- "path": "../../../design-system/icon/afm-jira/tsconfig.json"
25
- },
26
- {
27
- "path": "../../../platform/feature-flags/afm-jira/tsconfig.json"
28
- },
29
- {
30
- "path": "../../../design-system/select/afm-jira/tsconfig.json"
31
- },
32
- {
33
- "path": "../../../design-system/theme/afm-jira/tsconfig.json"
34
- },
35
- {
36
- "path": "../../../design-system/tokens/afm-jira/tsconfig.json"
37
- },
38
- {
39
- "path": "../../../design-system/tooltip/afm-jira/tsconfig.json"
40
- }
41
- ]
42
- }
2
+ "extends": "../../../../tsconfig.entry-points.jira.json",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "target": "es5",
6
+ "outDir": "../../../../../tsDist/@atlaskit__color-picker/app",
7
+ "rootDir": "../",
8
+ "composite": true
9
+ },
10
+ "include": [
11
+ "../src/**/*.ts",
12
+ "../src/**/*.tsx"
13
+ ],
14
+ "exclude": [
15
+ "../src/**/__tests__/*",
16
+ "../src/**/*.test.*",
17
+ "../src/**/test.*"
18
+ ],
19
+ "references": [
20
+ {
21
+ "path": "../../../analytics/analytics-next/afm-jira/tsconfig.json"
22
+ },
23
+ {
24
+ "path": "../../../design-system/icon/afm-jira/tsconfig.json"
25
+ },
26
+ {
27
+ "path": "../../../platform/feature-flags/afm-jira/tsconfig.json"
28
+ },
29
+ {
30
+ "path": "../../../design-system/select/afm-jira/tsconfig.json"
31
+ },
32
+ {
33
+ "path": "../../../design-system/theme/afm-jira/tsconfig.json"
34
+ },
35
+ {
36
+ "path": "../../../design-system/tokens/afm-jira/tsconfig.json"
37
+ },
38
+ {
39
+ "path": "../../../design-system/tooltip/afm-jira/tsconfig.json"
40
+ }
41
+ ]
42
+ }
@@ -61,7 +61,7 @@ var ColorPaletteMenuWithoutAnalytics = exports.ColorPaletteMenuWithoutAnalytics
61
61
  attributes: {
62
62
  componentName: 'color-picker',
63
63
  packageName: "@atlaskit/color-picker",
64
- packageVersion: "3.4.5"
64
+ packageVersion: "3.4.6"
65
65
  }
66
66
  })(createAnalyticsEvent);
67
67
  }
@@ -146,7 +146,7 @@ var ColorPaletteMenuWithoutAnalytics = exports.ColorPaletteMenuWithoutAnalytics
146
146
  var _default = exports.default = (0, _analyticsNext.withAnalyticsContext)({
147
147
  componentName: 'color-picker',
148
148
  packageName: "@atlaskit/color-picker",
149
- packageVersion: "3.4.5"
149
+ packageVersion: "3.4.6"
150
150
  })((0, _analyticsNext.withAnalyticsEvents)()(ColorPaletteMenuWithoutAnalytics));
151
151
  var colorCardWrapperStyles = (0, _react2.css)({
152
152
  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.5";
45
+ var packageVersion = "3.4.6";
46
46
  var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
47
47
  (0, _inherits2.default)(ColorPickerWithoutAnalyticsBase, _React$Component);
48
48
  var _super = _createSuper(ColorPickerWithoutAnalyticsBase);
@@ -12,6 +12,7 @@ var _react = require("@emotion/react");
12
12
  var _constants = require("../constants");
13
13
  var _reactIntlNext = require("react-intl-next");
14
14
  var _messages = _interopRequireDefault(require("../messages"));
15
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
16
  /**
16
17
  * @jsxRuntime classic
17
18
  * @jsx jsx
@@ -27,7 +28,7 @@ var MenuList = exports.MenuList = function MenuList(props) {
27
28
  formatMessage = _useIntl.formatMessage;
28
29
  return (0, _react.jsx)("div", {
29
30
  css: colorPaletteContainerStyles,
30
- role: "listbox",
31
+ role: (0, _platformFeatureFlags.fg)('jsw_roadmaps_fix-color-picker-roles') ? 'group' : 'listbox',
31
32
  "aria-label": formatMessage(_messages.default.menuListAriaLabel),
32
33
  style: {
33
34
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
@@ -51,7 +52,11 @@ var Option = exports.Option = function Option(props) {
51
52
  innerProps = props.innerProps;
52
53
  return (0, _react.jsx)("div", (0, _extends2.default)({
53
54
  css: colorCardWrapperStyles
54
- }, innerProps, {
55
+ }, innerProps, (0, _platformFeatureFlags.fg)('jsw_roadmaps_fix-color-picker-roles') && {
56
+ role: 'radio',
57
+ 'aria-checked': isSelected,
58
+ 'aria-selected': undefined
59
+ }, {
55
60
  "aria-label": label
56
61
  }), (0, _react.jsx)(_ColorCard.default, {
57
62
  type: _constants.COLOR_PICKER,
@@ -43,7 +43,7 @@ export const ColorPaletteMenuWithoutAnalytics = ({
43
43
  attributes: {
44
44
  componentName: 'color-picker',
45
45
  packageName: "@atlaskit/color-picker",
46
- packageVersion: "3.4.5"
46
+ packageVersion: "3.4.6"
47
47
  }
48
48
  })(createAnalyticsEvent);
49
49
  }
@@ -121,7 +121,7 @@ export const ColorPaletteMenuWithoutAnalytics = ({
121
121
  export default withAnalyticsContext({
122
122
  componentName: 'color-picker',
123
123
  packageName: "@atlaskit/color-picker",
124
- packageVersion: "3.4.5"
124
+ packageVersion: "3.4.6"
125
125
  })(withAnalyticsEvents()(ColorPaletteMenuWithoutAnalytics));
126
126
  const colorCardWrapperStyles = css({
127
127
  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.5";
29
+ const packageVersion = "3.4.6";
30
30
  class ColorPickerWithoutAnalyticsBase extends React.Component {
31
31
  constructor(...args) {
32
32
  super(...args);
@@ -11,6 +11,7 @@ import { css, jsx } from '@emotion/react';
11
11
  import { COLOR_PICKER } from '../constants';
12
12
  import { useIntl } from 'react-intl-next';
13
13
  import messages from '../messages';
14
+ import { fg } from '@atlaskit/platform-feature-flags';
14
15
  export const MenuList = props => {
15
16
  const {
16
17
  //@ts-ignore react-select unsupported props
@@ -25,7 +26,7 @@ export const MenuList = props => {
25
26
  } = useIntl();
26
27
  return jsx("div", {
27
28
  css: colorPaletteContainerStyles,
28
- role: "listbox",
29
+ role: fg('jsw_roadmaps_fix-color-picker-roles') ? 'group' : 'listbox',
29
30
  "aria-label": formatMessage(messages.menuListAriaLabel),
30
31
  style: {
31
32
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
@@ -54,7 +55,11 @@ export const Option = props => {
54
55
  } = props;
55
56
  return jsx("div", _extends({
56
57
  css: colorCardWrapperStyles
57
- }, innerProps, {
58
+ }, innerProps, fg('jsw_roadmaps_fix-color-picker-roles') && {
59
+ role: 'radio',
60
+ 'aria-checked': isSelected,
61
+ 'aria-selected': undefined
62
+ }, {
58
63
  "aria-label": label
59
64
  }), jsx(ColorCard, {
60
65
  type: COLOR_PICKER,
@@ -52,7 +52,7 @@ export var ColorPaletteMenuWithoutAnalytics = function ColorPaletteMenuWithoutAn
52
52
  attributes: {
53
53
  componentName: 'color-picker',
54
54
  packageName: "@atlaskit/color-picker",
55
- packageVersion: "3.4.5"
55
+ packageVersion: "3.4.6"
56
56
  }
57
57
  })(createAnalyticsEvent);
58
58
  }
@@ -137,7 +137,7 @@ export var ColorPaletteMenuWithoutAnalytics = function ColorPaletteMenuWithoutAn
137
137
  export default withAnalyticsContext({
138
138
  componentName: 'color-picker',
139
139
  packageName: "@atlaskit/color-picker",
140
- packageVersion: "3.4.5"
140
+ packageVersion: "3.4.6"
141
141
  })(withAnalyticsEvents()(ColorPaletteMenuWithoutAnalytics));
142
142
  var colorCardWrapperStyles = css({
143
143
  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.5";
37
+ var packageVersion = "3.4.6";
38
38
  var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
39
39
  _inherits(ColorPickerWithoutAnalyticsBase, _React$Component);
40
40
  var _super = _createSuper(ColorPickerWithoutAnalyticsBase);
@@ -11,6 +11,7 @@ import { css, jsx } from '@emotion/react';
11
11
  import { COLOR_PICKER } from '../constants';
12
12
  import { useIntl } from 'react-intl-next';
13
13
  import messages from '../messages';
14
+ import { fg } from '@atlaskit/platform-feature-flags';
14
15
  export var MenuList = function MenuList(props) {
15
16
  var cols = props.selectProps.cols,
16
17
  innerRef = props.innerRef,
@@ -19,7 +20,7 @@ export var MenuList = function MenuList(props) {
19
20
  formatMessage = _useIntl.formatMessage;
20
21
  return jsx("div", {
21
22
  css: colorPaletteContainerStyles,
22
- role: "listbox",
23
+ role: fg('jsw_roadmaps_fix-color-picker-roles') ? 'group' : 'listbox',
23
24
  "aria-label": formatMessage(messages.menuListAriaLabel),
24
25
  style: {
25
26
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
@@ -43,7 +44,11 @@ export var Option = function Option(props) {
43
44
  innerProps = props.innerProps;
44
45
  return jsx("div", _extends({
45
46
  css: colorCardWrapperStyles
46
- }, innerProps, {
47
+ }, innerProps, fg('jsw_roadmaps_fix-color-picker-roles') && {
48
+ role: 'radio',
49
+ 'aria-checked': isSelected,
50
+ 'aria-selected': undefined
51
+ }, {
47
52
  "aria-label": label
48
53
  }), jsx(ColorCard, {
49
54
  type: COLOR_PICKER,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/color-picker",
3
- "version": "3.4.5",
3
+ "version": "3.4.6",
4
4
  "description": "Jira Color Picker Component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -32,10 +32,10 @@
32
32
  "@atlaskit/analytics-next": "^10.1.0",
33
33
  "@atlaskit/icon": "^22.24.0",
34
34
  "@atlaskit/platform-feature-flags": "0.3.0",
35
- "@atlaskit/select": "^18.4.0",
35
+ "@atlaskit/select": "^18.5.0",
36
36
  "@atlaskit/theme": "^14.0.0",
37
- "@atlaskit/tokens": "^2.0.0",
38
- "@atlaskit/tooltip": "^18.8.0",
37
+ "@atlaskit/tokens": "^2.2.0",
38
+ "@atlaskit/tooltip": "^18.9.0",
39
39
  "@babel/runtime": "^7.0.0",
40
40
  "@emotion/react": "^11.7.1",
41
41
  "memoize-one": "^6.0.0",
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "devDependencies": {
49
49
  "@af/visual-regression": "*",
50
- "@atlaskit/primitives": "^12.2.0",
50
+ "@atlaskit/primitives": "^13.1.0",
51
51
  "@atlaskit/visual-regression": "*",
52
52
  "@atlassian/a11y-jest-testing": "*",
53
53
  "@testing-library/react": "^12.1.5",
@@ -78,6 +78,9 @@
78
78
  "platform-feature-flags": {
79
79
  "platform-design-system-dsp-20821-color-pickr-focus": {
80
80
  "type": "boolean"
81
+ },
82
+ "jsw_roadmaps_fix-color-picker-roles": {
83
+ "type": "boolean"
81
84
  }
82
85
  }
83
86
  }