@atlaskit/color-picker 3.1.0 → 3.1.2

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,17 @@
1
1
  # @atlaskit/color-picker
2
2
 
3
+ ## 3.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
8
+
9
+ ## 3.1.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`4fd4b6307b7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4fd4b6307b7) - Internal change to enforce token usage for spacing properties. There is no expected visual or behaviour change.
14
+
3
15
  ## 3.1.0
4
16
 
5
17
  ### Minor Changes
@@ -5,9 +5,9 @@
5
5
  "module:es2019": "../dist/es2019/components/ColorPaletteMenu.js",
6
6
  "types": "../dist/types/components/ColorPaletteMenu.d.ts",
7
7
  "typesVersions": {
8
- ">=4.0 <4.5": {
8
+ ">=4.5 <4.9": {
9
9
  "*": [
10
- "../dist/types-ts4.0/components/ColorPaletteMenu.d.ts"
10
+ "../dist/types-ts4.5/components/ColorPaletteMenu.d.ts"
11
11
  ]
12
12
  }
13
13
  }
@@ -37,7 +37,7 @@ var defaultPopperProps = {
37
37
  placement: 'bottom-start'
38
38
  };
39
39
  var packageName = "@atlaskit/color-picker";
40
- var packageVersion = "3.1.0";
40
+ var packageVersion = "3.1.2";
41
41
  var ColorPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
42
42
  (0, _inherits2.default)(ColorPickerWithoutAnalytics, _React$Component);
43
43
  var _super = _createSuper(ColorPickerWithoutAnalytics);
@@ -33,9 +33,12 @@ var ColorCardButton = _styledComponents.default.button(_templateObject3 || (_tem
33
33
  });
34
34
  exports.ColorCardButton = ColorCardButton;
35
35
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
36
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
36
37
  var ColorCardContent = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n top: 1px;\n left: 1px;\n width: 24px;\n height: 24px;\n border-radius: ", "px;\n background: ", ";\n box-shadow: inset 0px 0px 0px 1px\n ", ";\n"])), (0, _theme.borderRadius)(), function (props) {
37
38
  return props.color;
38
39
  }, "var(--ds-background-inverse-subtle, ".concat(_theme.colors.DN600A, ")"));
40
+
41
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
39
42
  exports.ColorCardContent = ColorCardContent;
40
43
  var ColorCardContentCheckMark = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin: 1px;\n"])));
41
44
  exports.ColorCardContentCheckMark = ColorCardContentCheckMark;
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/color-picker",
3
- "version": "3.1.0"
3
+ "version": "3.1.2"
4
4
  }
@@ -19,7 +19,7 @@ const defaultPopperProps = {
19
19
  placement: 'bottom-start'
20
20
  };
21
21
  const packageName = "@atlaskit/color-picker";
22
- const packageVersion = "3.1.0";
22
+ const packageVersion = "3.1.2";
23
23
  export class ColorPickerWithoutAnalytics extends React.Component {
24
24
  constructor(...args) {
25
25
  super(...args);
@@ -53,7 +53,7 @@ export const ColorCardButton = styled.button`
53
53
  }
54
54
  }};
55
55
  `;
56
- /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
56
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
57
57
  export const ColorCardContent = styled.div`
58
58
  position: absolute;
59
59
  top: 1px;
@@ -65,6 +65,8 @@ export const ColorCardContent = styled.div`
65
65
  box-shadow: inset 0px 0px 0px 1px
66
66
  ${`var(--ds-background-inverse-subtle, ${colors.DN600A})`};
67
67
  `;
68
+
69
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
68
70
  export const ColorCardContentCheckMark = styled.div`
69
71
  margin: 1px;
70
72
  `;
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/color-picker",
3
- "version": "3.1.0"
3
+ "version": "3.1.2"
4
4
  }
@@ -27,7 +27,7 @@ var defaultPopperProps = {
27
27
  placement: 'bottom-start'
28
28
  };
29
29
  var packageName = "@atlaskit/color-picker";
30
- var packageVersion = "3.1.0";
30
+ var packageVersion = "3.1.2";
31
31
  export var ColorPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
32
32
  _inherits(ColorPickerWithoutAnalytics, _React$Component);
33
33
  var _super = _createSuper(ColorPickerWithoutAnalytics);
@@ -21,8 +21,10 @@ export var ColorCardButton = styled.button(_templateObject3 || (_templateObject3
21
21
  return buttonFocusedBorder;
22
22
  }
23
23
  });
24
- /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
24
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
25
25
  export var ColorCardContent = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n top: 1px;\n left: 1px;\n width: 24px;\n height: 24px;\n border-radius: ", "px;\n background: ", ";\n box-shadow: inset 0px 0px 0px 1px\n ", ";\n"])), borderRadius(), function (props) {
26
26
  return props.color;
27
27
  }, "var(--ds-background-inverse-subtle, ".concat(colors.DN600A, ")"));
28
+
29
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
28
30
  export var ColorCardContentCheckMark = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin: 1px;\n"])));
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/color-picker",
3
- "version": "3.1.0"
3
+ "version": "3.1.2"
4
4
  }
@@ -1,11 +1,11 @@
1
1
  /// <reference types="react" />
2
- declare type ColorCardProps = {
2
+ type ColorCardProps = {
3
3
  focused?: boolean;
4
4
  isTabbing?: boolean;
5
5
  };
6
6
  export declare const ColorCardOption: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & ColorCardProps, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & ColorCardProps>;
7
7
  export declare const ColorCardButton: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & ColorCardProps, any, import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & ColorCardProps>;
8
- declare type ColorCardContentProps = {
8
+ type ColorCardContentProps = {
9
9
  color: string;
10
10
  };
11
11
  export declare const ColorCardContent: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & ColorCardContentProps, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & ColorCardContentProps>;
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { Mode } from '../types';
3
- declare type Props = {
3
+ type Props = {
4
4
  mode?: Mode;
5
5
  };
6
- declare type ColorPaletteMenuProps = {
6
+ type ColorPaletteMenuProps = {
7
7
  cols: number;
8
8
  mode?: Mode;
9
9
  };
@@ -2,7 +2,7 @@ export interface Color {
2
2
  label: string;
3
3
  value: string;
4
4
  }
5
- export declare type Palette = Color[];
5
+ export type Palette = Color[];
6
6
  export declare enum Mode {
7
7
  Compact = 0,
8
8
  Standard = 1
@@ -1,6 +1,6 @@
1
1
  import { Palette } from './types';
2
2
  export declare const getWidth: (cols: number) => number;
3
- export declare const getOptions: import("memoize-one").MemoizedFn<(palette: Palette, selectedColor?: string | undefined) => {
3
+ export declare const getOptions: import("memoize-one").MemoizedFn<(palette: Palette, selectedColor?: string) => {
4
4
  options: Palette;
5
5
  value: import("./types").Color;
6
6
  focusedItemIndex: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/color-picker",
3
- "version": "3.1.0",
3
+ "version": "3.1.2",
4
4
  "description": "Jira Color Picker Component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,6 +12,14 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
+ "typesVersions": {
16
+ ">=4.5 <4.9": {
17
+ "*": [
18
+ "dist/types-ts4.5/*",
19
+ "dist/types-ts4.5/index.d.ts"
20
+ ]
21
+ }
22
+ },
15
23
  "atlaskit:src": "src/index.ts",
16
24
  "atlassian": {
17
25
  "team": "Jira Software: Roadmaps",
@@ -25,7 +33,7 @@
25
33
  "@atlaskit/icon": "^21.12.0",
26
34
  "@atlaskit/select": "^16.2.0",
27
35
  "@atlaskit/theme": "^12.5.0",
28
- "@atlaskit/tokens": "^1.3.0",
36
+ "@atlaskit/tokens": "^1.4.0",
29
37
  "@babel/runtime": "^7.0.0",
30
38
  "memoize-one": "^6.0.0",
31
39
  "styled-components": "^3.2.6"
@@ -42,7 +50,7 @@
42
50
  "enzyme-adapter-react-16": "^1.15.1",
43
51
  "jscodeshift": "^0.13.0",
44
52
  "react": "^16.8.0",
45
- "typescript": "4.5.5"
53
+ "typescript": "~4.9.5"
46
54
  },
47
55
  "keywords": [
48
56
  "ui",
@@ -57,7 +65,8 @@
57
65
  "techstack": {
58
66
  "@repo/internal": {
59
67
  "design-tokens": [
60
- "color"
68
+ "color",
69
+ "spacing"
61
70
  ]
62
71
  }
63
72
  },
@@ -0,0 +1,114 @@
1
+ ## API Report File for "@atlaskit/color-picker"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import { AnalyticsEventPayload } from '@atlaskit/analytics-next';
8
+ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
9
+ import { PopupSelectProps } from '@atlaskit/select';
10
+ import { default as React_2 } from 'react';
11
+ import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
12
+ import { ValueType } from '@atlaskit/select';
13
+ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
14
+ import { WithContextProps } from '@atlaskit/analytics-next';
15
+
16
+ // @public (undocumented)
17
+ interface Color {
18
+ // (undocumented)
19
+ label: string;
20
+ // (undocumented)
21
+ value: string;
22
+ }
23
+
24
+ // @public (undocumented)
25
+ export const ColorPaletteMenu: React_2.ForwardRefExoticComponent<Pick<Pick<Omit<ColorPaletteMenuProps, keyof WithAnalyticsEventsProps>, "checkMarkColor" | "label" | "onChange" | "palette" | "selectedColor"> & Partial<Pick<Omit<ColorPaletteMenuProps, keyof WithAnalyticsEventsProps>, "cols" | "mode">> & Partial<Pick<{
26
+ cols: number;
27
+ mode: Mode;
28
+ }, never>> & React_2.RefAttributes<any> & WithContextProps, "analyticsContext" | "checkMarkColor" | "cols" | "key" | "label" | "mode" | "onChange" | "palette" | "selectedColor"> & React_2.RefAttributes<any>>;
29
+
30
+ // @public (undocumented)
31
+ export interface ColorPaletteMenuProps {
32
+ checkMarkColor?: string;
33
+ cols: number;
34
+ createAnalyticsEvent?: any;
35
+ label?: string;
36
+ mode?: Mode;
37
+ onChange: (value: string, analyticsEvent?: object) => void;
38
+ palette: Palette;
39
+ selectedColor?: string;
40
+ }
41
+
42
+ // @public (undocumented)
43
+ export class ColorPaletteMenuWithoutAnalytics extends React_2.Component<ColorPaletteMenuProps> {
44
+ // (undocumented)
45
+ changeAnalyticsCaller: () => UIAnalyticsEvent | undefined;
46
+ // (undocumented)
47
+ createAndFireEventOnAtlaskit: (payload: AnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) => UIAnalyticsEvent;
48
+ // (undocumented)
49
+ static defaultProps: {
50
+ cols: number;
51
+ mode: Mode;
52
+ };
53
+ // (undocumented)
54
+ onChange: (value: string) => void;
55
+ // (undocumented)
56
+ render(): JSX.Element;
57
+ }
58
+
59
+ // @public (undocumented)
60
+ export interface ColorPickerProps {
61
+ checkMarkColor?: string;
62
+ cols?: number;
63
+ createAnalyticsEvent?: any;
64
+ label?: string;
65
+ onChange: (value: string, analyticsEvent?: object) => void;
66
+ palette: Palette;
67
+ popperProps?: PopupSelectProps['popperProps'];
68
+ selectedColor?: string;
69
+ }
70
+
71
+ // @public (undocumented)
72
+ export class ColorPickerWithoutAnalytics extends React_2.Component<ColorPickerProps> {
73
+ // (undocumented)
74
+ changeAnalyticsCaller: () => UIAnalyticsEvent | undefined;
75
+ // (undocumented)
76
+ createAndFireEventOnAtlaskit: (payload: AnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) => UIAnalyticsEvent;
77
+ // (undocumented)
78
+ onChangeSelect: (option: ValueType<Color>) => void;
79
+ // (undocumented)
80
+ onKeyDown: (e: React_2.KeyboardEvent<HTMLElement>) => void;
81
+ // (undocumented)
82
+ onOptionKeyDown: (value: string) => void;
83
+ // (undocumented)
84
+ render(): JSX.Element;
85
+ // (undocumented)
86
+ state: {
87
+ isTabbing: boolean;
88
+ };
89
+ }
90
+
91
+ // @public (undocumented)
92
+ export const Compact: Mode;
93
+
94
+ // @public (undocumented)
95
+ const _default: React_2.ForwardRefExoticComponent<Pick<Omit<ColorPickerProps, keyof WithAnalyticsEventsProps> & React_2.RefAttributes<any> & WithContextProps, "analyticsContext" | "checkMarkColor" | "cols" | "key" | "label" | "onChange" | "palette" | "popperProps" | "selectedColor"> & React_2.RefAttributes<any>>;
96
+ export default _default;
97
+
98
+ // @public (undocumented)
99
+ enum Mode {
100
+ // (undocumented)
101
+ Compact = 0,
102
+ // (undocumented)
103
+ Standard = 1
104
+ }
105
+
106
+ // @public (undocumented)
107
+ type Palette = Color[];
108
+
109
+ // @public (undocumented)
110
+ export const Standard: Mode;
111
+
112
+ // (No @packageDocumentation comment for this package)
113
+
114
+ ```