@atlaskit/color-picker 3.2.12 → 3.2.14

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.
@@ -0,0 +1,43 @@
1
+ {
2
+ "extends": "../../../../tsconfig.entry-points.confluence.json",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "target": "es5",
6
+ "composite": true,
7
+ "outDir": "../dist",
8
+ "rootDir": "../",
9
+ "baseUrl": "../"
10
+ },
11
+ "include": [
12
+ "../src/**/*.ts",
13
+ "../src/**/*.tsx"
14
+ ],
15
+ "exclude": [
16
+ "../src/**/__tests__/*",
17
+ "../src/**/*.test.*",
18
+ "../src/**/test.*"
19
+ ],
20
+ "references": [
21
+ {
22
+ "path": "../../../analytics/analytics-next/afm-cc/tsconfig.json"
23
+ },
24
+ {
25
+ "path": "../../../design-system/icon/afm-cc/tsconfig.json"
26
+ },
27
+ {
28
+ "path": "../../../platform/feature-flags/afm-cc/tsconfig.json"
29
+ },
30
+ {
31
+ "path": "../../../design-system/select/afm-cc/tsconfig.json"
32
+ },
33
+ {
34
+ "path": "../../../design-system/theme/afm-cc/tsconfig.json"
35
+ },
36
+ {
37
+ "path": "../../../design-system/tokens/afm-cc/tsconfig.json"
38
+ },
39
+ {
40
+ "path": "../../../design-system/tooltip/afm-cc/tsconfig.json"
41
+ }
42
+ ]
43
+ }
@@ -6,8 +6,15 @@ import {
6
6
  isUsingProp,
7
7
  } from './utils/helpers';
8
8
 
9
- import core, { API, ASTPath, FileInfo, JSXElement, Options } from 'jscodeshift';
10
- import { Collection } from 'jscodeshift/src/Collection';
9
+ import {
10
+ type API,
11
+ type default as core,
12
+ type ASTPath,
13
+ type FileInfo,
14
+ type JSXElement,
15
+ type Options,
16
+ } from 'jscodeshift';
17
+ import { type Collection } from 'jscodeshift/src/Collection';
11
18
 
12
19
  function updatePopperProps(
13
20
  j: core.JSCodeshift,
@@ -1,12 +1,13 @@
1
- import { NodePath } from 'ast-types/lib/node-path';
2
- import core, {
3
- ASTPath,
4
- ImportDeclaration,
5
- JSXAttribute,
6
- JSXElement,
7
- Node,
1
+ import { type NodePath } from 'ast-types/lib/node-path';
2
+ import {
3
+ type default as core,
4
+ type ASTPath,
5
+ type ImportDeclaration,
6
+ type JSXAttribute,
7
+ type JSXElement,
8
+ type Node,
8
9
  } from 'jscodeshift';
9
- import { Collection } from 'jscodeshift/src/Collection';
10
+ import { type Collection } from 'jscodeshift/src/Collection';
10
11
 
11
12
  export type Nullable<T> = T | null;
12
13
 
@@ -71,7 +71,10 @@ var ColorCard = function ColorCard(props) {
71
71
  onMouseDown: handleMouseDown,
72
72
  onKeyDown: handleKeyDown,
73
73
  role: "radio",
74
- "aria-checked": selected,
74
+ "aria-checked": selected
75
+ }, !(0, _platformFeatureFlags.getBooleanFF)('platform.jca11y-1559-dashboard-view-dashboard-remove-duplicate-aria-label_g5i3i') && {
76
+ 'aria-label': label
77
+ }, {
75
78
  tabIndex: 0
76
79
  }, (0, _platformFeatureFlags.getBooleanFF)('platform.color-picker-radio-button-functionality_6hkcy') && {
77
80
  ref: ref
@@ -34,7 +34,7 @@ var ColorPaletteMenuWithoutAnalytics = exports.ColorPaletteMenuWithoutAnalytics
34
34
  attributes: {
35
35
  componentName: 'color-picker',
36
36
  packageName: "@atlaskit/color-picker",
37
- packageVersion: "3.2.12"
37
+ packageVersion: "3.2.14"
38
38
  }
39
39
  })(createAnalyticsEvent);
40
40
  }
@@ -76,7 +76,7 @@ var ColorPaletteMenuWithoutAnalytics = exports.ColorPaletteMenuWithoutAnalytics
76
76
  var _default = exports.default = (0, _analyticsNext.withAnalyticsContext)({
77
77
  componentName: 'color-picker',
78
78
  packageName: "@atlaskit/color-picker",
79
- packageVersion: "3.2.12"
79
+ packageVersion: "3.2.14"
80
80
  })((0, _analyticsNext.withAnalyticsEvents)()(ColorPaletteMenuWithoutAnalytics));
81
81
  var colorCardWrapperStyles = (0, _react.css)({
82
82
  display: 'flex',
@@ -40,7 +40,7 @@ var defaultPopperProps = {
40
40
  placement: 'bottom-start'
41
41
  };
42
42
  var packageName = "@atlaskit/color-picker";
43
- var packageVersion = "3.2.12";
43
+ var packageVersion = "3.2.14";
44
44
  var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
45
45
  (0, _inherits2.default)(ColorPickerWithoutAnalyticsBase, _React$Component);
46
46
  var _super = _createSuper(ColorPickerWithoutAnalyticsBase);
@@ -91,20 +91,13 @@ var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
91
91
  }
92
92
  });
93
93
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getFullLabel", function (intl, value, label) {
94
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.jca11y-1480-inappropriate-label-for-color-picker_76tfe')) {
95
- if (value && value.label) {
96
- return intl.formatMessage(_messages.default.colorPickerAriaLabel, {
97
- color: value.label,
98
- message: label
99
- });
100
- } else {
101
- return label;
102
- }
103
- } else {
104
- return intl.formatMessage(_messages.default.colorPickerAriaLabelOldFormat, {
94
+ if (value && value.label) {
95
+ return intl.formatMessage(_messages.default.colorPickerAriaLabel, {
105
96
  color: value.label,
106
97
  message: label
107
98
  });
99
+ } else {
100
+ return label;
108
101
  }
109
102
  });
110
103
  return _this;
@@ -10,10 +10,5 @@ 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
- colorPickerAriaLabelOldFormat: {
15
- id: 'jira.color-picker.src.color-picker-aria-label-old-format',
16
- defaultMessage: "{message}, {color} selected",
17
- description: 'This text is used as aria-label text in color picker component'
18
13
  }
19
14
  });
@@ -63,7 +63,10 @@ const ColorCard = props => {
63
63
  onMouseDown: handleMouseDown,
64
64
  onKeyDown: handleKeyDown,
65
65
  role: "radio",
66
- "aria-checked": selected,
66
+ "aria-checked": selected
67
+ }, !getBooleanFF('platform.jca11y-1559-dashboard-view-dashboard-remove-duplicate-aria-label_g5i3i') && {
68
+ 'aria-label': label
69
+ }, {
67
70
  tabIndex: 0
68
71
  }, getBooleanFF('platform.color-picker-radio-button-functionality_6hkcy') && {
69
72
  ref: ref
@@ -24,7 +24,7 @@ export const ColorPaletteMenuWithoutAnalytics = ({
24
24
  attributes: {
25
25
  componentName: 'color-picker',
26
26
  packageName: "@atlaskit/color-picker",
27
- packageVersion: "3.2.12"
27
+ packageVersion: "3.2.14"
28
28
  }
29
29
  })(createAnalyticsEvent);
30
30
  }
@@ -66,7 +66,7 @@ export const ColorPaletteMenuWithoutAnalytics = ({
66
66
  export default withAnalyticsContext({
67
67
  componentName: 'color-picker',
68
68
  packageName: "@atlaskit/color-picker",
69
- packageVersion: "3.2.12"
69
+ packageVersion: "3.2.14"
70
70
  })(withAnalyticsEvents()(ColorPaletteMenuWithoutAnalytics));
71
71
  const colorCardWrapperStyles = css({
72
72
  display: 'flex',
@@ -23,7 +23,7 @@ const defaultPopperProps = {
23
23
  placement: 'bottom-start'
24
24
  };
25
25
  const packageName = "@atlaskit/color-picker";
26
- const packageVersion = "3.2.12";
26
+ const packageVersion = "3.2.14";
27
27
  class ColorPickerWithoutAnalyticsBase extends React.Component {
28
28
  constructor(...args) {
29
29
  super(...args);
@@ -69,20 +69,13 @@ class ColorPickerWithoutAnalyticsBase extends React.Component {
69
69
  }
70
70
  });
71
71
  _defineProperty(this, "getFullLabel", (intl, value, label) => {
72
- if (getBooleanFF('platform.jca11y-1480-inappropriate-label-for-color-picker_76tfe')) {
73
- if (value && value.label) {
74
- return intl.formatMessage(messages.colorPickerAriaLabel, {
75
- color: value.label,
76
- message: label
77
- });
78
- } else {
79
- return label;
80
- }
81
- } else {
82
- return intl.formatMessage(messages.colorPickerAriaLabelOldFormat, {
72
+ if (value && value.label) {
73
+ return intl.formatMessage(messages.colorPickerAriaLabel, {
83
74
  color: value.label,
84
75
  message: label
85
76
  });
77
+ } else {
78
+ return label;
86
79
  }
87
80
  });
88
81
  }
@@ -4,10 +4,5 @@ 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
- colorPickerAriaLabelOldFormat: {
9
- id: 'jira.color-picker.src.color-picker-aria-label-old-format',
10
- defaultMessage: `{message}, {color} selected`,
11
- description: 'This text is used as aria-label text in color picker component'
12
7
  }
13
8
  });
@@ -60,7 +60,10 @@ var ColorCard = function ColorCard(props) {
60
60
  onMouseDown: handleMouseDown,
61
61
  onKeyDown: handleKeyDown,
62
62
  role: "radio",
63
- "aria-checked": selected,
63
+ "aria-checked": selected
64
+ }, !getBooleanFF('platform.jca11y-1559-dashboard-view-dashboard-remove-duplicate-aria-label_g5i3i') && {
65
+ 'aria-label': label
66
+ }, {
64
67
  tabIndex: 0
65
68
  }, getBooleanFF('platform.color-picker-radio-button-functionality_6hkcy') && {
66
69
  ref: ref
@@ -26,7 +26,7 @@ export var ColorPaletteMenuWithoutAnalytics = function ColorPaletteMenuWithoutAn
26
26
  attributes: {
27
27
  componentName: 'color-picker',
28
28
  packageName: "@atlaskit/color-picker",
29
- packageVersion: "3.2.12"
29
+ packageVersion: "3.2.14"
30
30
  }
31
31
  })(createAnalyticsEvent);
32
32
  }
@@ -68,7 +68,7 @@ export var ColorPaletteMenuWithoutAnalytics = function ColorPaletteMenuWithoutAn
68
68
  export default withAnalyticsContext({
69
69
  componentName: 'color-picker',
70
70
  packageName: "@atlaskit/color-picker",
71
- packageVersion: "3.2.12"
71
+ packageVersion: "3.2.14"
72
72
  })(withAnalyticsEvents()(ColorPaletteMenuWithoutAnalytics));
73
73
  var colorCardWrapperStyles = css({
74
74
  display: 'flex',
@@ -31,7 +31,7 @@ var defaultPopperProps = {
31
31
  placement: 'bottom-start'
32
32
  };
33
33
  var packageName = "@atlaskit/color-picker";
34
- var packageVersion = "3.2.12";
34
+ var packageVersion = "3.2.14";
35
35
  var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
36
36
  _inherits(ColorPickerWithoutAnalyticsBase, _React$Component);
37
37
  var _super = _createSuper(ColorPickerWithoutAnalyticsBase);
@@ -82,20 +82,13 @@ var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
82
82
  }
83
83
  });
84
84
  _defineProperty(_assertThisInitialized(_this), "getFullLabel", function (intl, value, label) {
85
- if (getBooleanFF('platform.jca11y-1480-inappropriate-label-for-color-picker_76tfe')) {
86
- if (value && value.label) {
87
- return intl.formatMessage(messages.colorPickerAriaLabel, {
88
- color: value.label,
89
- message: label
90
- });
91
- } else {
92
- return label;
93
- }
94
- } else {
95
- return intl.formatMessage(messages.colorPickerAriaLabelOldFormat, {
85
+ if (value && value.label) {
86
+ return intl.formatMessage(messages.colorPickerAriaLabel, {
96
87
  color: value.label,
97
88
  message: label
98
89
  });
90
+ } else {
91
+ return label;
99
92
  }
100
93
  });
101
94
  return _this;
@@ -4,10 +4,5 @@ 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
- colorPickerAriaLabelOldFormat: {
9
- id: 'jira.color-picker.src.color-picker-aria-label-old-format',
10
- defaultMessage: "{message}, {color} selected",
11
- description: 'This text is used as aria-label text in color picker component'
12
7
  }
13
8
  });
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  /** @jsx jsx */
3
- import { Mode, Palette } from '../types';
3
+ import { Mode, type Palette } from '../types';
4
4
  import { jsx } from '@emotion/react';
5
5
  export type Props = {
6
6
  /** color picker button label */
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import { PopupSelectProps } from '@atlaskit/select';
4
- import { Palette, SwatchSize } from '../types';
3
+ import { type PopupSelectProps } from '@atlaskit/select';
4
+ import { type Palette, type SwatchSize } from '../types';
5
5
  import type { WrappedComponentProps } from 'react-intl-next';
6
6
  export interface Props {
7
7
  /** color picker button label */
@@ -28,7 +28,7 @@ export interface Props {
28
28
  isDisabledSelectedSwatch?: boolean;
29
29
  }
30
30
  export declare const ColorPickerWithoutAnalytics: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
31
- WrappedComponent: React.ComponentType<Props & WrappedComponentProps>; /** maximum column length */
31
+ WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
32
32
  };
33
33
  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>>;
34
34
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { jsx } from '@emotion/react';
2
- import { SwatchSize } from '../types';
2
+ import { type SwatchSize } from '../types';
3
3
  export interface Props {
4
4
  value: string;
5
5
  label?: string;
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
- import { MenuListComponentProps, OptionProps } from '@atlaskit/select';
3
- import { Color } from '../types';
2
+ import { type MenuListComponentProps, type OptionProps } from '@atlaskit/select';
3
+ import { type Color } from '../types';
4
4
  import { jsx } from '@emotion/react';
5
5
  export declare const MenuList: (props: MenuListComponentProps<Color>) => jsx.JSX.Element;
6
6
  export declare const Option: (props: OptionProps<Color>) => jsx.JSX.Element;
@@ -4,10 +4,5 @@ declare const _default: {
4
4
  defaultMessage: string;
5
5
  description: string;
6
6
  };
7
- colorPickerAriaLabelOldFormat: {
8
- id: string;
9
- defaultMessage: string;
10
- description: string;
11
- };
12
7
  };
13
8
  export default _default;
@@ -1,4 +1,4 @@
1
- import { Mode, Palette } from './types';
1
+ import { Mode, type Palette } from './types';
2
2
  export declare const getWidth: (cols: number, mode?: Mode) => number;
3
3
  export declare const getOptions: import("memoize-one").MemoizedFn<(palette: Palette, selectedColor?: string, showDefaultSwatchColor?: boolean) => {
4
4
  options: Palette;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  /** @jsx jsx */
3
- import { Mode, Palette } from '../types';
3
+ import { Mode, type Palette } from '../types';
4
4
  import { jsx } from '@emotion/react';
5
5
  export type Props = {
6
6
  /** color picker button label */
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import { PopupSelectProps } from '@atlaskit/select';
4
- import { Palette, SwatchSize } from '../types';
3
+ import { type PopupSelectProps } from '@atlaskit/select';
4
+ import { type Palette, type SwatchSize } from '../types';
5
5
  import type { WrappedComponentProps } from 'react-intl-next';
6
6
  export interface Props {
7
7
  /** color picker button label */
@@ -28,7 +28,7 @@ export interface Props {
28
28
  isDisabledSelectedSwatch?: boolean;
29
29
  }
30
30
  export declare const ColorPickerWithoutAnalytics: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
31
- WrappedComponent: React.ComponentType<Props & WrappedComponentProps>; /** maximum column length */
31
+ WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
32
32
  };
33
33
  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>>;
34
34
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { jsx } from '@emotion/react';
2
- import { SwatchSize } from '../types';
2
+ import { type SwatchSize } from '../types';
3
3
  export interface Props {
4
4
  value: string;
5
5
  label?: string;
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
- import { MenuListComponentProps, OptionProps } from '@atlaskit/select';
3
- import { Color } from '../types';
2
+ import { type MenuListComponentProps, type OptionProps } from '@atlaskit/select';
3
+ import { type Color } from '../types';
4
4
  import { jsx } from '@emotion/react';
5
5
  export declare const MenuList: (props: MenuListComponentProps<Color>) => jsx.JSX.Element;
6
6
  export declare const Option: (props: OptionProps<Color>) => jsx.JSX.Element;
@@ -4,10 +4,5 @@ declare const _default: {
4
4
  defaultMessage: string;
5
5
  description: string;
6
6
  };
7
- colorPickerAriaLabelOldFormat: {
8
- id: string;
9
- defaultMessage: string;
10
- description: string;
11
- };
12
7
  };
13
8
  export default _default;
@@ -1,4 +1,4 @@
1
- import { Mode, Palette } from './types';
1
+ import { Mode, type Palette } from './types';
2
2
  export declare const getWidth: (cols: number, mode?: Mode) => number;
3
3
  export declare const getOptions: import("memoize-one").MemoizedFn<(palette: Palette, selectedColor?: string, showDefaultSwatchColor?: boolean) => {
4
4
  options: Palette;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/color-picker",
3
- "version": "3.2.12",
3
+ "version": "3.2.14",
4
4
  "description": "Jira Color Picker Component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -33,12 +33,12 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@atlaskit/analytics-next": "^9.3.0",
36
- "@atlaskit/icon": "^22.1.0",
36
+ "@atlaskit/icon": "^22.3.0",
37
37
  "@atlaskit/platform-feature-flags": "^0.2.5",
38
- "@atlaskit/select": "^17.9.0",
39
- "@atlaskit/theme": "^12.7.0",
40
- "@atlaskit/tokens": "^1.45.0",
41
- "@atlaskit/tooltip": "^18.3.0",
38
+ "@atlaskit/select": "^17.10.0",
39
+ "@atlaskit/theme": "^12.8.0",
40
+ "@atlaskit/tokens": "^1.49.0",
41
+ "@atlaskit/tooltip": "^18.4.0",
42
42
  "@babel/runtime": "^7.0.0",
43
43
  "@emotion/react": "^11.7.1",
44
44
  "memoize-one": "^6.0.0",
@@ -49,9 +49,8 @@
49
49
  },
50
50
  "devDependencies": {
51
51
  "@af/visual-regression": "*",
52
- "@atlaskit/primitives": "^6.1.0",
52
+ "@atlaskit/primitives": "^6.5.0",
53
53
  "@atlaskit/visual-regression": "*",
54
- "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
55
54
  "@testing-library/react": "^12.1.5",
56
55
  "@testing-library/user-event": "^14.4.3",
57
56
  "ast-types": "^0.13.3",
@@ -77,12 +76,11 @@
77
76
  ]
78
77
  }
79
78
  },
80
- "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
81
79
  "platform-feature-flags": {
82
80
  "platform.color-picker-radio-button-functionality_6hkcy": {
83
81
  "type": "boolean"
84
82
  },
85
- "platform.jca11y-1480-inappropriate-label-for-color-picker_76tfe": {
83
+ "platform.jca11y-1559-dashboard-view-dashboard-remove-duplicate-aria-label_g5i3i": {
86
84
  "type": "boolean"
87
85
  }
88
86
  }