@atlaskit/color-picker 3.4.6 → 3.5.0
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 +12 -0
- package/dist/cjs/components/ColorPaletteMenu.js +2 -2
- package/dist/cjs/components/ColorPicker.js +6 -3
- package/dist/es2019/components/ColorPaletteMenu.js +2 -2
- package/dist/es2019/components/ColorPicker.js +6 -3
- package/dist/esm/components/ColorPaletteMenu.js +2 -2
- package/dist/esm/components/ColorPicker.js +6 -3
- package/dist/types/components/ColorPicker.d.ts +3 -1
- package/dist/types-ts4.5/components/ColorPicker.d.ts +3 -1
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/color-picker
|
|
2
2
|
|
|
3
|
+
## 3.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#164925](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/164925)
|
|
8
|
+
[`ee7ea6daa7a37`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ee7ea6daa7a37) -
|
|
9
|
+
Added onMenuOpen callback as a new prop
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 3.4.6
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -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.
|
|
64
|
+
packageVersion: "3.5.0"
|
|
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.
|
|
149
|
+
packageVersion: "3.5.0"
|
|
150
150
|
})((0, _analyticsNext.withAnalyticsEvents)()(ColorPaletteMenuWithoutAnalytics));
|
|
151
151
|
var colorCardWrapperStyles = (0, _react2.css)({
|
|
152
152
|
display: 'flex',
|
|
@@ -23,6 +23,7 @@ var _analyticsNext = require("@atlaskit/analytics-next");
|
|
|
23
23
|
var _utils = require("../utils");
|
|
24
24
|
var _react2 = require("@emotion/react");
|
|
25
25
|
var _reactIntlNext = require("react-intl-next");
|
|
26
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
26
27
|
var _messages = _interopRequireDefault(require("../messages"));
|
|
27
28
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
28
29
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -42,7 +43,7 @@ var defaultPopperProps = {
|
|
|
42
43
|
placement: 'bottom-start'
|
|
43
44
|
};
|
|
44
45
|
var packageName = "@atlaskit/color-picker";
|
|
45
|
-
var packageVersion = "3.
|
|
46
|
+
var packageVersion = "3.5.0";
|
|
46
47
|
var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
|
|
47
48
|
(0, _inherits2.default)(ColorPickerWithoutAnalyticsBase, _React$Component);
|
|
48
49
|
var _super = _createSuper(ColorPickerWithoutAnalyticsBase);
|
|
@@ -126,7 +127,7 @@ var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
|
|
|
126
127
|
options = _getOptions.options,
|
|
127
128
|
value = _getOptions.value;
|
|
128
129
|
var fullLabel = this.getFullLabel(intl, value, label);
|
|
129
|
-
return (0, _react2.jsx)(_select.PopupSelect, {
|
|
130
|
+
return (0, _react2.jsx)(_select.PopupSelect, (0, _extends2.default)({
|
|
130
131
|
target: function target(_ref) {
|
|
131
132
|
var ref = _ref.ref,
|
|
132
133
|
isOpen = _ref.isOpen;
|
|
@@ -160,7 +161,9 @@ var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
|
|
|
160
161
|
onKeyDown: this.onKeyDown,
|
|
161
162
|
isTabbing: this.state.isTabbing,
|
|
162
163
|
onOptionKeyDown: this.onOptionKeyDown
|
|
163
|
-
})
|
|
164
|
+
}, (0, _platformFeatureFlags.fg)('one_event_rules_them_all_fg') && {
|
|
165
|
+
onMenuOpen: this.props.onMenuOpen
|
|
166
|
+
}));
|
|
164
167
|
}
|
|
165
168
|
}]);
|
|
166
169
|
return ColorPickerWithoutAnalyticsBase;
|
|
@@ -43,7 +43,7 @@ export const ColorPaletteMenuWithoutAnalytics = ({
|
|
|
43
43
|
attributes: {
|
|
44
44
|
componentName: 'color-picker',
|
|
45
45
|
packageName: "@atlaskit/color-picker",
|
|
46
|
-
packageVersion: "3.
|
|
46
|
+
packageVersion: "3.5.0"
|
|
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.
|
|
124
|
+
packageVersion: "3.5.0"
|
|
125
125
|
})(withAnalyticsEvents()(ColorPaletteMenuWithoutAnalytics));
|
|
126
126
|
const colorCardWrapperStyles = css({
|
|
127
127
|
display: 'flex',
|
|
@@ -14,6 +14,7 @@ import { getOptions } from '../utils';
|
|
|
14
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
15
|
import { css, jsx } from '@emotion/react';
|
|
16
16
|
import { injectIntl } from 'react-intl-next';
|
|
17
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
18
|
import messages from '../messages';
|
|
18
19
|
const defaultPopperProps = {
|
|
19
20
|
strategy: 'fixed',
|
|
@@ -26,7 +27,7 @@ const defaultPopperProps = {
|
|
|
26
27
|
placement: 'bottom-start'
|
|
27
28
|
};
|
|
28
29
|
const packageName = "@atlaskit/color-picker";
|
|
29
|
-
const packageVersion = "3.
|
|
30
|
+
const packageVersion = "3.5.0";
|
|
30
31
|
class ColorPickerWithoutAnalyticsBase extends React.Component {
|
|
31
32
|
constructor(...args) {
|
|
32
33
|
super(...args);
|
|
@@ -101,7 +102,7 @@ class ColorPickerWithoutAnalyticsBase extends React.Component {
|
|
|
101
102
|
value
|
|
102
103
|
} = getOptions(palette, selectedColor, showDefaultSwatchColor);
|
|
103
104
|
const fullLabel = this.getFullLabel(intl, value, label);
|
|
104
|
-
return jsx(PopupSelect, {
|
|
105
|
+
return jsx(PopupSelect, _extends({
|
|
105
106
|
target: ({
|
|
106
107
|
ref,
|
|
107
108
|
isOpen
|
|
@@ -134,7 +135,9 @@ class ColorPickerWithoutAnalyticsBase extends React.Component {
|
|
|
134
135
|
onKeyDown: this.onKeyDown,
|
|
135
136
|
isTabbing: this.state.isTabbing,
|
|
136
137
|
onOptionKeyDown: this.onOptionKeyDown
|
|
137
|
-
})
|
|
138
|
+
}, fg('one_event_rules_them_all_fg') && {
|
|
139
|
+
onMenuOpen: this.props.onMenuOpen
|
|
140
|
+
}));
|
|
138
141
|
}
|
|
139
142
|
}
|
|
140
143
|
export const ColorPickerWithoutAnalytics = injectIntl(ColorPickerWithoutAnalyticsBase);
|
|
@@ -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.
|
|
55
|
+
packageVersion: "3.5.0"
|
|
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.
|
|
140
|
+
packageVersion: "3.5.0"
|
|
141
141
|
})(withAnalyticsEvents()(ColorPaletteMenuWithoutAnalytics));
|
|
142
142
|
var colorCardWrapperStyles = css({
|
|
143
143
|
display: 'flex',
|
|
@@ -22,6 +22,7 @@ import { getOptions } from '../utils';
|
|
|
22
22
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
23
23
|
import { css, jsx } from '@emotion/react';
|
|
24
24
|
import { injectIntl } from 'react-intl-next';
|
|
25
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
25
26
|
import messages from '../messages';
|
|
26
27
|
var defaultPopperProps = {
|
|
27
28
|
strategy: 'fixed',
|
|
@@ -34,7 +35,7 @@ var defaultPopperProps = {
|
|
|
34
35
|
placement: 'bottom-start'
|
|
35
36
|
};
|
|
36
37
|
var packageName = "@atlaskit/color-picker";
|
|
37
|
-
var packageVersion = "3.
|
|
38
|
+
var packageVersion = "3.5.0";
|
|
38
39
|
var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
|
|
39
40
|
_inherits(ColorPickerWithoutAnalyticsBase, _React$Component);
|
|
40
41
|
var _super = _createSuper(ColorPickerWithoutAnalyticsBase);
|
|
@@ -118,7 +119,7 @@ var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
|
|
|
118
119
|
options = _getOptions.options,
|
|
119
120
|
value = _getOptions.value;
|
|
120
121
|
var fullLabel = this.getFullLabel(intl, value, label);
|
|
121
|
-
return jsx(PopupSelect, {
|
|
122
|
+
return jsx(PopupSelect, _extends({
|
|
122
123
|
target: function target(_ref) {
|
|
123
124
|
var ref = _ref.ref,
|
|
124
125
|
isOpen = _ref.isOpen;
|
|
@@ -152,7 +153,9 @@ var ColorPickerWithoutAnalyticsBase = /*#__PURE__*/function (_React$Component) {
|
|
|
152
153
|
onKeyDown: this.onKeyDown,
|
|
153
154
|
isTabbing: this.state.isTabbing,
|
|
154
155
|
onOptionKeyDown: this.onOptionKeyDown
|
|
155
|
-
})
|
|
156
|
+
}, fg('one_event_rules_them_all_fg') && {
|
|
157
|
+
onMenuOpen: this.props.onMenuOpen
|
|
158
|
+
}));
|
|
156
159
|
}
|
|
157
160
|
}]);
|
|
158
161
|
return ColorPickerWithoutAnalyticsBase;
|
|
@@ -31,11 +31,13 @@ export interface Props {
|
|
|
31
31
|
showDefaultSwatchColor?: boolean;
|
|
32
32
|
/** diasble swatch button */
|
|
33
33
|
isDisabledSelectedSwatch?: boolean;
|
|
34
|
+
/** onMenuOpen handler */
|
|
35
|
+
onMenuOpen?: () => void;
|
|
34
36
|
}
|
|
35
37
|
export declare const ColorPickerWithoutAnalytics: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
|
36
38
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
37
39
|
};
|
|
38
40
|
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<Omit<Props & WrappedComponentProps, "intl"> & {
|
|
39
41
|
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>>;
|
|
42
|
+
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "label" | "analyticsContext" | "key" | "onChange" | "checkMarkColor" | "cols" | "popperProps" | "onMenuOpen" | "palette" | "triggerId" | "selectedColor" | "selectedColourSwatchSize" | "showDefaultSwatchColor" | "isDisabledSelectedSwatch" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
41
43
|
export default _default;
|
|
@@ -31,11 +31,13 @@ export interface Props {
|
|
|
31
31
|
showDefaultSwatchColor?: boolean;
|
|
32
32
|
/** diasble swatch button */
|
|
33
33
|
isDisabledSelectedSwatch?: boolean;
|
|
34
|
+
/** onMenuOpen handler */
|
|
35
|
+
onMenuOpen?: () => void;
|
|
34
36
|
}
|
|
35
37
|
export declare const ColorPickerWithoutAnalytics: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
|
36
38
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
37
39
|
};
|
|
38
40
|
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<Omit<Props & WrappedComponentProps, "intl"> & {
|
|
39
41
|
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>>;
|
|
42
|
+
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "label" | "analyticsContext" | "key" | "onChange" | "checkMarkColor" | "cols" | "popperProps" | "onMenuOpen" | "palette" | "triggerId" | "selectedColor" | "selectedColourSwatchSize" | "showDefaultSwatchColor" | "isDisabledSelectedSwatch" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
41
43
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/color-picker",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "Jira Color Picker Component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
33
|
-
"@atlaskit/icon": "^22.
|
|
33
|
+
"@atlaskit/icon": "^22.25.0",
|
|
34
34
|
"@atlaskit/platform-feature-flags": "0.3.0",
|
|
35
35
|
"@atlaskit/select": "^18.5.0",
|
|
36
36
|
"@atlaskit/theme": "^14.0.0",
|
|
37
|
-
"@atlaskit/tokens": "^2.
|
|
37
|
+
"@atlaskit/tokens": "^2.3.0",
|
|
38
38
|
"@atlaskit/tooltip": "^18.9.0",
|
|
39
39
|
"@babel/runtime": "^7.0.0",
|
|
40
40
|
"@emotion/react": "^11.7.1",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@af/visual-regression": "*",
|
|
50
|
-
"@atlaskit/primitives": "^13.
|
|
50
|
+
"@atlaskit/primitives": "^13.2.0",
|
|
51
51
|
"@atlaskit/visual-regression": "*",
|
|
52
52
|
"@atlassian/a11y-jest-testing": "*",
|
|
53
53
|
"@testing-library/react": "^12.1.5",
|
|
@@ -81,6 +81,9 @@
|
|
|
81
81
|
},
|
|
82
82
|
"jsw_roadmaps_fix-color-picker-roles": {
|
|
83
83
|
"type": "boolean"
|
|
84
|
+
},
|
|
85
|
+
"one_event_rules_them_all_fg": {
|
|
86
|
+
"type": "boolean"
|
|
84
87
|
}
|
|
85
88
|
}
|
|
86
89
|
}
|