@atlaskit/color-picker 3.1.2 → 3.1.4
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/ColorCard.js +8 -3
- package/dist/cjs/components/ColorPaletteMenu.js +2 -1
- package/dist/cjs/components/ColorPicker.js +1 -1
- package/dist/cjs/components/Trigger.js +5 -3
- package/dist/cjs/components/components.js +1 -1
- package/dist/cjs/styled/ColorCard.js +3 -3
- package/dist/cjs/styled/ColorPalette.js +3 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/ColorCard.js +8 -3
- package/dist/es2019/components/ColorPaletteMenu.js +2 -1
- package/dist/es2019/components/ColorPicker.js +1 -1
- package/dist/es2019/components/Trigger.js +5 -3
- package/dist/es2019/components/components.js +1 -1
- package/dist/es2019/styled/ColorCard.js +3 -3
- package/dist/es2019/styled/ColorPalette.js +3 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/ColorCard.js +8 -3
- package/dist/esm/components/ColorPaletteMenu.js +2 -1
- package/dist/esm/components/ColorPicker.js +1 -1
- package/dist/esm/components/Trigger.js +5 -3
- package/dist/esm/components/components.js +1 -1
- package/dist/esm/styled/ColorCard.js +3 -3
- package/dist/esm/styled/ColorPalette.js +3 -2
- package/dist/esm/version.json +1 -1
- package/dist/types-ts4.5/components/ColorCard.d.ts +20 -0
- package/dist/types-ts4.5/components/ColorPaletteMenu.d.ts +35 -0
- package/dist/types-ts4.5/components/ColorPicker.d.ts +34 -0
- package/dist/types-ts4.5/components/Trigger.d.ts +12 -0
- package/dist/types-ts4.5/components/components.d.ts +7 -0
- package/dist/types-ts4.5/constants.d.ts +6 -0
- package/dist/types-ts4.5/index.d.ts +10 -0
- package/dist/types-ts4.5/styled/ColorCard.d.ts +13 -0
- package/dist/types-ts4.5/styled/ColorPalette.d.ts +13 -0
- package/dist/types-ts4.5/styled/ColorPicker.d.ts +2 -0
- package/dist/types-ts4.5/types.d.ts +9 -0
- package/dist/types-ts4.5/utils.d.ts +7 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/color-picker
|
|
2
2
|
|
|
3
|
+
## 3.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`bada4c7ae21`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bada4c7ae21) - Role and Tooltip added for Accessibility
|
|
8
|
+
|
|
9
|
+
## 3.1.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
|
|
14
|
+
|
|
3
15
|
## 3.1.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -16,6 +16,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
var _done = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/done"));
|
|
18
18
|
var _theme = require("@atlaskit/theme");
|
|
19
|
+
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
19
20
|
var _ColorCard = require("../styled/ColorCard");
|
|
20
21
|
var _constants = require("../constants");
|
|
21
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -73,11 +74,15 @@ var ColorCard = /*#__PURE__*/function (_PureComponent) {
|
|
|
73
74
|
_this$props3$checkMar = _this$props3.checkMarkColor,
|
|
74
75
|
checkMarkColor = _this$props3$checkMar === void 0 ? _theme.colors.N0 : _this$props3$checkMar,
|
|
75
76
|
isTabbing = _this$props3.isTabbing;
|
|
76
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
77
|
+
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
78
|
+
content: label
|
|
79
|
+
}, /*#__PURE__*/_react.default.createElement(_ColorCard.ColorCardOption, {
|
|
77
80
|
onClick: this.onClick,
|
|
78
81
|
onMouseDown: this.onMouseDown,
|
|
79
82
|
focused: focused,
|
|
80
|
-
|
|
83
|
+
role: "radio",
|
|
84
|
+
"aria-checked": selected,
|
|
85
|
+
"aria-label": label,
|
|
81
86
|
tabIndex: 0,
|
|
82
87
|
onKeyDown: this.onKeyDown,
|
|
83
88
|
isTabbing: isTabbing
|
|
@@ -86,7 +91,7 @@ var ColorCard = /*#__PURE__*/function (_PureComponent) {
|
|
|
86
91
|
}, selected && /*#__PURE__*/_react.default.createElement(_ColorCard.ColorCardContentCheckMark, null, /*#__PURE__*/_react.default.createElement(_done.default, {
|
|
87
92
|
primaryColor: checkMarkColor,
|
|
88
93
|
label: ""
|
|
89
|
-
}))));
|
|
94
|
+
})))));
|
|
90
95
|
}
|
|
91
96
|
}]);
|
|
92
97
|
return ColorCard;
|
|
@@ -71,7 +71,8 @@ var ColorPaletteMenuWithoutAnalytics = /*#__PURE__*/function (_React$Component)
|
|
|
71
71
|
return /*#__PURE__*/_react.default.createElement(_ColorPalette.ColorPaletteMenu, {
|
|
72
72
|
cols: cols,
|
|
73
73
|
"aria-label": fullLabel,
|
|
74
|
-
mode: mode
|
|
74
|
+
mode: mode,
|
|
75
|
+
role: "radiogroup"
|
|
75
76
|
}, /*#__PURE__*/_react.default.createElement(_ColorPalette.ColorPaletteContainer, {
|
|
76
77
|
mode: mode
|
|
77
78
|
}, options.map(function (_ref) {
|
|
@@ -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.
|
|
40
|
+
var packageVersion = "3.1.4";
|
|
41
41
|
var ColorPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
42
42
|
(0, _inherits2.default)(ColorPickerWithoutAnalytics, _React$Component);
|
|
43
43
|
var _super = _createSuper(ColorPickerWithoutAnalytics);
|
|
@@ -14,6 +14,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
15
|
var _react = _interopRequireDefault(require("react"));
|
|
16
16
|
var _ColorCard = require("../styled/ColorCard");
|
|
17
|
+
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
17
18
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
18
19
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
19
20
|
var ColorCard = /*#__PURE__*/function (_React$PureComponent) {
|
|
@@ -46,8 +47,9 @@ var ColorCard = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
46
47
|
value = _this$props.value,
|
|
47
48
|
label = _this$props.label,
|
|
48
49
|
expanded = _this$props.expanded;
|
|
49
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
50
|
-
|
|
50
|
+
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
51
|
+
content: label
|
|
52
|
+
}, /*#__PURE__*/_react.default.createElement(_ColorCard.ColorCardButton, {
|
|
51
53
|
onClick: this.onClick,
|
|
52
54
|
onMouseDown: this.onMouseDown,
|
|
53
55
|
focused: expanded,
|
|
@@ -57,7 +59,7 @@ var ColorCard = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
57
59
|
type: "button"
|
|
58
60
|
}, /*#__PURE__*/_react.default.createElement(_ColorCard.ColorCardContent, {
|
|
59
61
|
color: value || 'transparent'
|
|
60
|
-
}));
|
|
62
|
+
})));
|
|
61
63
|
}
|
|
62
64
|
}]);
|
|
63
65
|
return ColorCard;
|
|
@@ -18,7 +18,7 @@ var MenuList = function MenuList(props) {
|
|
|
18
18
|
innerRef = props.innerRef,
|
|
19
19
|
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
20
20
|
return /*#__PURE__*/_react.default.createElement(_ColorPalette.ColorPaletteContainer, (0, _extends2.default)({
|
|
21
|
-
role: "
|
|
21
|
+
role: "radiogroup",
|
|
22
22
|
style: {
|
|
23
23
|
maxWidth: cols ? (0, _utils.getWidth)(cols) : undefined
|
|
24
24
|
},
|
|
@@ -18,7 +18,7 @@ var buttonFocusedBorder = "border-color: ".concat("var(--ds-border-focused, ".co
|
|
|
18
18
|
var sharedColorContainerStyles = (0, _styledComponents.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n position: relative;\n width: ", "px;\n height: ", "px;\n border: 2px solid transparent;\n box-sizing: border-box;\n border-radius: ", "px;\n transition: border-color 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38);\n background-color: transparent;\n border-color: transparent;\n padding: 0;\n cursor: pointer;\n outline: none;\n"])), _constants.COLOR_CARD_SIZE, _constants.COLOR_CARD_SIZE, (0, _theme.borderRadius)() * 2);
|
|
19
19
|
var ColorCardOption = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n\n ", "\n\n ", ";\n"])), sharedColorContainerStyles, function (props) {
|
|
20
20
|
if (props.isTabbing === undefined || props.isTabbing) {
|
|
21
|
-
return "&:hover,\n
|
|
21
|
+
return "&:hover,\n &:focus {\n border-color: ".concat("var(--ds-border-focused, ".concat(_theme.colors.B75, ")"), ";\n }");
|
|
22
22
|
}
|
|
23
23
|
}, function (props) {
|
|
24
24
|
if (props.focused && !props.isTabbing) {
|
|
@@ -33,12 +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
|
|
36
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
37
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) {
|
|
38
38
|
return props.color;
|
|
39
39
|
}, "var(--ds-background-inverse-subtle, ".concat(_theme.colors.DN600A, ")"));
|
|
40
40
|
|
|
41
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
41
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
42
42
|
exports.ColorCardContent = ColorCardContent;
|
|
43
43
|
var ColorCardContentCheckMark = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin: 1px;\n"])));
|
|
44
44
|
exports.ColorCardContentCheckMark = ColorCardContentCheckMark;
|
|
@@ -10,9 +10,10 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
10
10
|
var _theme = require("@atlaskit/theme");
|
|
11
11
|
var _utils = require("../utils");
|
|
12
12
|
var _types = require("../types");
|
|
13
|
+
var _constants = require("../constants");
|
|
13
14
|
var _templateObject, _templateObject2, _templateObject3; // AFP-2532 TODO: Fix automatic suppressions below
|
|
14
15
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
15
|
-
var ColorCardWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin: ", ";\n"])), "var(--ds-space-025, 2px)");
|
|
16
|
+
var ColorCardWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin: ", ";\n height: ", "px;\n"])), "var(--ds-space-025, 2px)", _constants.COLOR_CARD_SIZE);
|
|
16
17
|
exports.ColorCardWrapper = ColorCardWrapper;
|
|
17
18
|
var ColorPaletteContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-wrap: wrap;\n padding: ", ";\n"])), function (props) {
|
|
18
19
|
return props.mode === _types.Mode.Compact ? "0" : "var(--ds-space-050, 4px)";
|
|
@@ -21,6 +22,6 @@ exports.ColorPaletteContainer = ColorPaletteContainer;
|
|
|
21
22
|
var ColorPaletteMenu = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n margin: 0;\n background-color: ", ";\n width: ", "px;\n ", "\n"])), "var(--ds-surface-overlay, ".concat(_theme.colors.N0, ")"), function (props) {
|
|
22
23
|
return (0, _utils.getWidth)(props.cols);
|
|
23
24
|
}, function (props) {
|
|
24
|
-
return props.mode && props.mode === _types.Mode.Standard && "\n box-radius: ".concat("var(--ds-radius-100, 3px)", ";\n box-shadow: ", "var(--ds-shadow-overlay, ".concat("0 0 0 1px ".concat(_theme.colors.N40, ", 0 0 8px ").concat(_theme.colors.N40), ")"), ";\n width: ", (0, _utils.getWidth)(props.cols) + (0, _theme.gridSize)(), "px;\n ");
|
|
25
|
+
return props.mode && props.mode === _types.Mode.Standard && "\n box-radius: ".concat("var(--ds-border-radius-100, 3px)", ";\n box-shadow: ", "var(--ds-shadow-overlay, ".concat("0 0 0 1px ".concat(_theme.colors.N40, ", 0 0 8px ").concat(_theme.colors.N40), ")"), ";\n width: ", (0, _utils.getWidth)(props.cols) + (0, _theme.gridSize)(), "px;\n ");
|
|
25
26
|
});
|
|
26
27
|
exports.ColorPaletteMenu = ColorPaletteMenu;
|
package/dist/cjs/version.json
CHANGED
|
@@ -5,6 +5,7 @@ import EditorDoneIcon from '@atlaskit/icon/glyph/editor/done';
|
|
|
5
5
|
// AFP-2532 TODO: Fix automatic suppressions below
|
|
6
6
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
7
7
|
import { colors } from '@atlaskit/theme';
|
|
8
|
+
import Tooltip from '@atlaskit/tooltip';
|
|
8
9
|
import { ColorCardOption, ColorCardContent, ColorCardContentCheckMark } from '../styled/ColorCard';
|
|
9
10
|
import { KEY_SPACE, KEY_ENTER } from '../constants';
|
|
10
11
|
export default class ColorCard extends PureComponent {
|
|
@@ -52,11 +53,15 @@ export default class ColorCard extends PureComponent {
|
|
|
52
53
|
checkMarkColor = colors.N0,
|
|
53
54
|
isTabbing
|
|
54
55
|
} = this.props;
|
|
55
|
-
return /*#__PURE__*/React.createElement(
|
|
56
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
57
|
+
content: label
|
|
58
|
+
}, /*#__PURE__*/React.createElement(ColorCardOption, {
|
|
56
59
|
onClick: this.onClick,
|
|
57
60
|
onMouseDown: this.onMouseDown,
|
|
58
61
|
focused: focused,
|
|
59
|
-
"
|
|
62
|
+
role: "radio",
|
|
63
|
+
"aria-checked": selected,
|
|
64
|
+
"aria-label": label,
|
|
60
65
|
tabIndex: 0,
|
|
61
66
|
onKeyDown: this.onKeyDown,
|
|
62
67
|
isTabbing: isTabbing
|
|
@@ -65,6 +70,6 @@ export default class ColorCard extends PureComponent {
|
|
|
65
70
|
}, selected && /*#__PURE__*/React.createElement(ColorCardContentCheckMark, null, /*#__PURE__*/React.createElement(EditorDoneIcon, {
|
|
66
71
|
primaryColor: checkMarkColor,
|
|
67
72
|
label: ""
|
|
68
|
-
}))));
|
|
73
|
+
})))));
|
|
69
74
|
}
|
|
70
75
|
}
|
|
@@ -48,7 +48,8 @@ export class ColorPaletteMenuWithoutAnalytics extends React.Component {
|
|
|
48
48
|
return /*#__PURE__*/React.createElement(ColorPaletteMenu, {
|
|
49
49
|
cols: cols,
|
|
50
50
|
"aria-label": fullLabel,
|
|
51
|
-
mode: mode
|
|
51
|
+
mode: mode,
|
|
52
|
+
role: "radiogroup"
|
|
52
53
|
}, /*#__PURE__*/React.createElement(ColorPaletteContainer, {
|
|
53
54
|
mode: mode
|
|
54
55
|
}, options.map(({
|
|
@@ -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.
|
|
22
|
+
const packageVersion = "3.1.4";
|
|
23
23
|
export class ColorPickerWithoutAnalytics extends React.Component {
|
|
24
24
|
constructor(...args) {
|
|
25
25
|
super(...args);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ColorCardButton, ColorCardContent } from '../styled/ColorCard';
|
|
4
|
+
import Tooltip from '@atlaskit/tooltip';
|
|
4
5
|
export default class ColorCard extends React.PureComponent {
|
|
5
6
|
constructor(...args) {
|
|
6
7
|
super(...args);
|
|
@@ -24,8 +25,9 @@ export default class ColorCard extends React.PureComponent {
|
|
|
24
25
|
label,
|
|
25
26
|
expanded
|
|
26
27
|
} = this.props;
|
|
27
|
-
return /*#__PURE__*/React.createElement(
|
|
28
|
-
|
|
28
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
29
|
+
content: label
|
|
30
|
+
}, /*#__PURE__*/React.createElement(ColorCardButton, {
|
|
29
31
|
onClick: this.onClick,
|
|
30
32
|
onMouseDown: this.onMouseDown,
|
|
31
33
|
focused: expanded,
|
|
@@ -35,6 +37,6 @@ export default class ColorCard extends React.PureComponent {
|
|
|
35
37
|
type: "button"
|
|
36
38
|
}, /*#__PURE__*/React.createElement(ColorCardContent, {
|
|
37
39
|
color: value || 'transparent'
|
|
38
|
-
}));
|
|
40
|
+
})));
|
|
39
41
|
}
|
|
40
42
|
}
|
|
@@ -25,7 +25,7 @@ export const ColorCardOption = styled.div`
|
|
|
25
25
|
${props => {
|
|
26
26
|
if (props.isTabbing === undefined || props.isTabbing) {
|
|
27
27
|
return `&:hover,
|
|
28
|
-
|
|
28
|
+
&:focus {
|
|
29
29
|
border-color: ${`var(--ds-border-focused, ${colors.B75})`};
|
|
30
30
|
}`;
|
|
31
31
|
}
|
|
@@ -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 */ // eslint-disable-next-line @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
|
|
57
57
|
export const ColorCardContent = styled.div`
|
|
58
58
|
position: absolute;
|
|
59
59
|
top: 1px;
|
|
@@ -66,7 +66,7 @@ export const ColorCardContent = styled.div`
|
|
|
66
66
|
${`var(--ds-background-inverse-subtle, ${colors.DN600A})`};
|
|
67
67
|
`;
|
|
68
68
|
|
|
69
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
69
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
70
70
|
export const ColorCardContentCheckMark = styled.div`
|
|
71
71
|
margin: 1px;
|
|
72
72
|
`;
|
|
@@ -4,9 +4,11 @@ import styled from 'styled-components';
|
|
|
4
4
|
import { gridSize, colors } from '@atlaskit/theme';
|
|
5
5
|
import { getWidth } from '../utils';
|
|
6
6
|
import { Mode } from '../types';
|
|
7
|
+
import { COLOR_CARD_SIZE } from '../constants';
|
|
7
8
|
export const ColorCardWrapper = styled.div`
|
|
8
9
|
display: flex;
|
|
9
10
|
margin: ${"var(--ds-space-025, 2px)"};
|
|
11
|
+
height: ${COLOR_CARD_SIZE}px;
|
|
10
12
|
`;
|
|
11
13
|
export const ColorPaletteContainer = styled.div`
|
|
12
14
|
display: flex;
|
|
@@ -19,7 +21,7 @@ export const ColorPaletteMenu = styled.div`
|
|
|
19
21
|
background-color: ${`var(--ds-surface-overlay, ${colors.N0})`};
|
|
20
22
|
width: ${props => getWidth(props.cols)}px;
|
|
21
23
|
${props => props.mode && props.mode === Mode.Standard && `
|
|
22
|
-
box-radius: ${"var(--ds-radius-100, 3px)"};
|
|
24
|
+
box-radius: ${"var(--ds-border-radius-100, 3px)"};
|
|
23
25
|
box-shadow: ${`var(--ds-shadow-overlay, ${`0 0 0 1px ${colors.N40}, 0 0 8px ${colors.N40}`})`};
|
|
24
26
|
width: ${getWidth(props.cols) + gridSize()}px;
|
|
25
27
|
`}
|
package/dist/es2019/version.json
CHANGED
|
@@ -13,6 +13,7 @@ import EditorDoneIcon from '@atlaskit/icon/glyph/editor/done';
|
|
|
13
13
|
// AFP-2532 TODO: Fix automatic suppressions below
|
|
14
14
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
15
15
|
import { colors } from '@atlaskit/theme';
|
|
16
|
+
import Tooltip from '@atlaskit/tooltip';
|
|
16
17
|
import { ColorCardOption, ColorCardContent, ColorCardContentCheckMark } from '../styled/ColorCard';
|
|
17
18
|
import { KEY_SPACE, KEY_ENTER } from '../constants';
|
|
18
19
|
var ColorCard = /*#__PURE__*/function (_PureComponent) {
|
|
@@ -65,11 +66,15 @@ var ColorCard = /*#__PURE__*/function (_PureComponent) {
|
|
|
65
66
|
_this$props3$checkMar = _this$props3.checkMarkColor,
|
|
66
67
|
checkMarkColor = _this$props3$checkMar === void 0 ? colors.N0 : _this$props3$checkMar,
|
|
67
68
|
isTabbing = _this$props3.isTabbing;
|
|
68
|
-
return /*#__PURE__*/React.createElement(
|
|
69
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
70
|
+
content: label
|
|
71
|
+
}, /*#__PURE__*/React.createElement(ColorCardOption, {
|
|
69
72
|
onClick: this.onClick,
|
|
70
73
|
onMouseDown: this.onMouseDown,
|
|
71
74
|
focused: focused,
|
|
72
|
-
|
|
75
|
+
role: "radio",
|
|
76
|
+
"aria-checked": selected,
|
|
77
|
+
"aria-label": label,
|
|
73
78
|
tabIndex: 0,
|
|
74
79
|
onKeyDown: this.onKeyDown,
|
|
75
80
|
isTabbing: isTabbing
|
|
@@ -78,7 +83,7 @@ var ColorCard = /*#__PURE__*/function (_PureComponent) {
|
|
|
78
83
|
}, selected && /*#__PURE__*/React.createElement(ColorCardContentCheckMark, null, /*#__PURE__*/React.createElement(EditorDoneIcon, {
|
|
79
84
|
primaryColor: checkMarkColor,
|
|
80
85
|
label: ""
|
|
81
|
-
}))));
|
|
86
|
+
})))));
|
|
82
87
|
}
|
|
83
88
|
}]);
|
|
84
89
|
return ColorCard;
|
|
@@ -64,7 +64,8 @@ export var ColorPaletteMenuWithoutAnalytics = /*#__PURE__*/function (_React$Comp
|
|
|
64
64
|
return /*#__PURE__*/React.createElement(ColorPaletteMenu, {
|
|
65
65
|
cols: cols,
|
|
66
66
|
"aria-label": fullLabel,
|
|
67
|
-
mode: mode
|
|
67
|
+
mode: mode,
|
|
68
|
+
role: "radiogroup"
|
|
68
69
|
}, /*#__PURE__*/React.createElement(ColorPaletteContainer, {
|
|
69
70
|
mode: mode
|
|
70
71
|
}, options.map(function (_ref) {
|
|
@@ -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.
|
|
30
|
+
var packageVersion = "3.1.4";
|
|
31
31
|
export var ColorPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
32
32
|
_inherits(ColorPickerWithoutAnalytics, _React$Component);
|
|
33
33
|
var _super = _createSuper(ColorPickerWithoutAnalytics);
|
|
@@ -9,6 +9,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
9
9
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { ColorCardButton, ColorCardContent } from '../styled/ColorCard';
|
|
12
|
+
import Tooltip from '@atlaskit/tooltip';
|
|
12
13
|
var ColorCard = /*#__PURE__*/function (_React$PureComponent) {
|
|
13
14
|
_inherits(ColorCard, _React$PureComponent);
|
|
14
15
|
var _super = _createSuper(ColorCard);
|
|
@@ -39,8 +40,9 @@ var ColorCard = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
39
40
|
value = _this$props.value,
|
|
40
41
|
label = _this$props.label,
|
|
41
42
|
expanded = _this$props.expanded;
|
|
42
|
-
return /*#__PURE__*/React.createElement(
|
|
43
|
-
|
|
43
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
44
|
+
content: label
|
|
45
|
+
}, /*#__PURE__*/React.createElement(ColorCardButton, {
|
|
44
46
|
onClick: this.onClick,
|
|
45
47
|
onMouseDown: this.onMouseDown,
|
|
46
48
|
focused: expanded,
|
|
@@ -50,7 +52,7 @@ var ColorCard = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
50
52
|
type: "button"
|
|
51
53
|
}, /*#__PURE__*/React.createElement(ColorCardContent, {
|
|
52
54
|
color: value || 'transparent'
|
|
53
|
-
}));
|
|
55
|
+
})));
|
|
54
56
|
}
|
|
55
57
|
}]);
|
|
56
58
|
return ColorCard;
|
|
@@ -11,7 +11,7 @@ export var MenuList = function MenuList(props) {
|
|
|
11
11
|
innerRef = props.innerRef,
|
|
12
12
|
rest = _objectWithoutProperties(props, _excluded);
|
|
13
13
|
return /*#__PURE__*/React.createElement(ColorPaletteContainer, _extends({
|
|
14
|
-
role: "
|
|
14
|
+
role: "radiogroup",
|
|
15
15
|
style: {
|
|
16
16
|
maxWidth: cols ? getWidth(cols) : undefined
|
|
17
17
|
},
|
|
@@ -9,7 +9,7 @@ var buttonFocusedBorder = "border-color: ".concat("var(--ds-border-focused, ".co
|
|
|
9
9
|
var sharedColorContainerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-block;\n position: relative;\n width: ", "px;\n height: ", "px;\n border: 2px solid transparent;\n box-sizing: border-box;\n border-radius: ", "px;\n transition: border-color 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38);\n background-color: transparent;\n border-color: transparent;\n padding: 0;\n cursor: pointer;\n outline: none;\n"])), COLOR_CARD_SIZE, COLOR_CARD_SIZE, borderRadius() * 2);
|
|
10
10
|
export var ColorCardOption = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", ";\n\n ", "\n\n ", ";\n"])), sharedColorContainerStyles, function (props) {
|
|
11
11
|
if (props.isTabbing === undefined || props.isTabbing) {
|
|
12
|
-
return "&:hover,\n
|
|
12
|
+
return "&:hover,\n &:focus {\n border-color: ".concat("var(--ds-border-focused, ".concat(colors.B75, ")"), ";\n }");
|
|
13
13
|
}
|
|
14
14
|
}, function (props) {
|
|
15
15
|
if (props.focused && !props.isTabbing) {
|
|
@@ -21,10 +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 */ // eslint-disable-next-line @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
|
|
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
28
|
|
|
29
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
29
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
30
30
|
export var ColorCardContentCheckMark = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin: 1px;\n"])));
|
|
@@ -6,12 +6,13 @@ import styled from 'styled-components';
|
|
|
6
6
|
import { gridSize, colors } from '@atlaskit/theme';
|
|
7
7
|
import { getWidth } from '../utils';
|
|
8
8
|
import { Mode } from '../types';
|
|
9
|
-
|
|
9
|
+
import { COLOR_CARD_SIZE } from '../constants';
|
|
10
|
+
export var ColorCardWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n margin: ", ";\n height: ", "px;\n"])), "var(--ds-space-025, 2px)", COLOR_CARD_SIZE);
|
|
10
11
|
export var ColorPaletteContainer = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n padding: ", ";\n"])), function (props) {
|
|
11
12
|
return props.mode === Mode.Compact ? "0" : "var(--ds-space-050, 4px)";
|
|
12
13
|
});
|
|
13
14
|
export var ColorPaletteMenu = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n margin: 0;\n background-color: ", ";\n width: ", "px;\n ", "\n"])), "var(--ds-surface-overlay, ".concat(colors.N0, ")"), function (props) {
|
|
14
15
|
return getWidth(props.cols);
|
|
15
16
|
}, function (props) {
|
|
16
|
-
return props.mode && props.mode === Mode.Standard && "\n box-radius: ".concat("var(--ds-radius-100, 3px)", ";\n box-shadow: ", "var(--ds-shadow-overlay, ".concat("0 0 0 1px ".concat(colors.N40, ", 0 0 8px ").concat(colors.N40), ")"), ";\n width: ", getWidth(props.cols) + gridSize(), "px;\n ");
|
|
17
|
+
return props.mode && props.mode === Mode.Standard && "\n box-radius: ".concat("var(--ds-border-radius-100, 3px)", ";\n box-shadow: ", "var(--ds-shadow-overlay, ".concat("0 0 0 1px ".concat(colors.N40, ", 0 0 8px ").concat(colors.N40), ")"), ";\n width: ", getWidth(props.cols) + gridSize(), "px;\n ");
|
|
17
18
|
});
|
package/dist/esm/version.json
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PureComponent } from 'react';
|
|
3
|
+
export interface Props {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
onClick?: (value: string) => void;
|
|
7
|
+
onKeyDown?: (value: string) => void;
|
|
8
|
+
checkMarkColor?: string;
|
|
9
|
+
selected?: boolean;
|
|
10
|
+
focused?: boolean;
|
|
11
|
+
isOption?: boolean;
|
|
12
|
+
isTabbing?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export default class ColorCard extends PureComponent<Props> {
|
|
15
|
+
onMouseDown: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
16
|
+
onClick: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
17
|
+
onKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
18
|
+
ref: React.RefObject<HTMLButtonElement>;
|
|
19
|
+
render(): JSX.Element;
|
|
20
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Palette, Mode } from '../types';
|
|
3
|
+
export interface Props {
|
|
4
|
+
/** color picker button label */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** list of available colors */
|
|
7
|
+
palette: Palette;
|
|
8
|
+
/** selected color */
|
|
9
|
+
selectedColor?: string;
|
|
10
|
+
/** maximum column length */
|
|
11
|
+
cols: number;
|
|
12
|
+
/** color of checkmark on selected color */
|
|
13
|
+
checkMarkColor?: string;
|
|
14
|
+
/** onChange handler */
|
|
15
|
+
onChange: (value: string, analyticsEvent?: object) => void;
|
|
16
|
+
/** You should not be accessing this prop under any circumstances. It is provided by @atlaskit/analytics-next. */
|
|
17
|
+
createAnalyticsEvent?: any;
|
|
18
|
+
/** style of the color-picker, either 'Compact' or 'Standard', default value is 'Standard' */
|
|
19
|
+
mode?: Mode;
|
|
20
|
+
}
|
|
21
|
+
export declare class ColorPaletteMenuWithoutAnalytics extends React.Component<Props> {
|
|
22
|
+
static defaultProps: {
|
|
23
|
+
cols: number;
|
|
24
|
+
mode: Mode;
|
|
25
|
+
};
|
|
26
|
+
createAndFireEventOnAtlaskit: (payload: import("@atlaskit/analytics-next").AnalyticsEventPayload) => (createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent) => import("@atlaskit/analytics-next").UIAnalyticsEvent;
|
|
27
|
+
changeAnalyticsCaller: () => import("@atlaskit/analytics-next").UIAnalyticsEvent | undefined;
|
|
28
|
+
onChange: (value: string) => void;
|
|
29
|
+
render(): JSX.Element;
|
|
30
|
+
}
|
|
31
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "label" | "onChange" | "checkMarkColor" | "palette" | "selectedColor"> & Partial<Pick<Omit<Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "cols" | "mode">> & Partial<Pick<{
|
|
32
|
+
cols: number;
|
|
33
|
+
mode: Mode;
|
|
34
|
+
}, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "label" | "key" | "onChange" | "checkMarkColor" | "cols" | "mode" | "palette" | "selectedColor" | "analyticsContext"> & React.RefAttributes<any>>;
|
|
35
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ValueType, PopupSelectProps } from '@atlaskit/select';
|
|
3
|
+
import { Palette, Color } from '../types';
|
|
4
|
+
export interface Props {
|
|
5
|
+
/** color picker button label */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** list of available colors */
|
|
8
|
+
palette: Palette;
|
|
9
|
+
/** selected color */
|
|
10
|
+
selectedColor?: string;
|
|
11
|
+
/** maximum column length */
|
|
12
|
+
cols?: number;
|
|
13
|
+
/** color of checkmark on selected color */
|
|
14
|
+
checkMarkColor?: string;
|
|
15
|
+
/** props for react-popper */
|
|
16
|
+
popperProps?: PopupSelectProps['popperProps'];
|
|
17
|
+
/** onChange handler */
|
|
18
|
+
onChange: (value: string, analyticsEvent?: object) => void;
|
|
19
|
+
/** You should not be accessing this prop under any circumstances. It is provided by @atlaskit/analytics-next. */
|
|
20
|
+
createAnalyticsEvent?: any;
|
|
21
|
+
}
|
|
22
|
+
export declare class ColorPickerWithoutAnalytics extends React.Component<Props> {
|
|
23
|
+
createAndFireEventOnAtlaskit: (payload: import("@atlaskit/analytics-next").AnalyticsEventPayload) => (createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent) => import("@atlaskit/analytics-next").UIAnalyticsEvent;
|
|
24
|
+
state: {
|
|
25
|
+
isTabbing: boolean;
|
|
26
|
+
};
|
|
27
|
+
changeAnalyticsCaller: () => import("@atlaskit/analytics-next").UIAnalyticsEvent | undefined;
|
|
28
|
+
onChangeSelect: (option: ValueType<Color>) => void;
|
|
29
|
+
onOptionKeyDown: (value: string) => void;
|
|
30
|
+
onKeyDown: (e: React.KeyboardEvent<HTMLElement>) => void;
|
|
31
|
+
render(): JSX.Element;
|
|
32
|
+
}
|
|
33
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "label" | "key" | "onChange" | "checkMarkColor" | "cols" | "popperProps" | "palette" | "selectedColor" | "analyticsContext"> & React.RefAttributes<any>>;
|
|
34
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface Props {
|
|
3
|
+
value: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
expanded?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export default class ColorCard extends React.PureComponent<Props> {
|
|
9
|
+
onMouseDown: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
10
|
+
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
11
|
+
render(): JSX.Element;
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MenuListComponentProps, OptionProps } from '@atlaskit/select';
|
|
3
|
+
import { Color } from '../types';
|
|
4
|
+
export declare const MenuList: (props: MenuListComponentProps<Color>) => JSX.Element;
|
|
5
|
+
export declare const Option: (props: OptionProps<Color>) => JSX.Element;
|
|
6
|
+
export declare const DropdownIndicator: () => null;
|
|
7
|
+
export declare const Placeholder: () => null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import ColorPicker from './components/ColorPicker';
|
|
2
|
+
import { Mode } from './types';
|
|
3
|
+
declare const Compact: Mode, Standard: Mode;
|
|
4
|
+
export { ColorPickerWithoutAnalytics } from './components/ColorPicker';
|
|
5
|
+
export type { Props as ColorPickerProps } from './components/ColorPicker';
|
|
6
|
+
export { ColorPaletteMenuWithoutAnalytics } from './components/ColorPaletteMenu';
|
|
7
|
+
export type { Props as ColorPaletteMenuProps } from './components/ColorPaletteMenu';
|
|
8
|
+
export default ColorPicker;
|
|
9
|
+
export { default as ColorPaletteMenu } from './components/ColorPaletteMenu';
|
|
10
|
+
export { Standard, Compact };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type ColorCardProps = {
|
|
3
|
+
focused?: boolean;
|
|
4
|
+
isTabbing?: boolean;
|
|
5
|
+
};
|
|
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
|
+
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
|
+
type ColorCardContentProps = {
|
|
9
|
+
color: string;
|
|
10
|
+
};
|
|
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>;
|
|
12
|
+
export declare const ColorCardContentCheckMark: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Mode } from '../types';
|
|
3
|
+
type Props = {
|
|
4
|
+
mode?: Mode;
|
|
5
|
+
};
|
|
6
|
+
type ColorPaletteMenuProps = {
|
|
7
|
+
cols: number;
|
|
8
|
+
mode?: Mode;
|
|
9
|
+
};
|
|
10
|
+
export declare const ColorCardWrapper: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
|
|
11
|
+
export declare const ColorPaletteContainer: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Props, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Props>;
|
|
12
|
+
export declare const ColorPaletteMenu: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & ColorPaletteMenuProps, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & ColorPaletteMenuProps>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ColorCardWrapper: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Palette } from './types';
|
|
2
|
+
export declare const getWidth: (cols: number) => number;
|
|
3
|
+
export declare const getOptions: import("memoize-one").MemoizedFn<(palette: Palette, selectedColor?: string) => {
|
|
4
|
+
options: Palette;
|
|
5
|
+
value: import("./types").Color;
|
|
6
|
+
focusedItemIndex: number;
|
|
7
|
+
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/color-picker",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.4",
|
|
4
4
|
"description": "Jira Color Picker Component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,9 +31,10 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
33
33
|
"@atlaskit/icon": "^21.12.0",
|
|
34
|
-
"@atlaskit/select": "^16.
|
|
34
|
+
"@atlaskit/select": "^16.5.0",
|
|
35
35
|
"@atlaskit/theme": "^12.5.0",
|
|
36
|
-
"@atlaskit/tokens": "^1.
|
|
36
|
+
"@atlaskit/tokens": "^1.14.0",
|
|
37
|
+
"@atlaskit/tooltip": "^17.8.0",
|
|
37
38
|
"@babel/runtime": "^7.0.0",
|
|
38
39
|
"memoize-one": "^6.0.0",
|
|
39
40
|
"styled-components": "^3.2.6"
|
|
@@ -42,12 +43,11 @@
|
|
|
42
43
|
"react": "^16.8.0"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
|
-
"@atlaskit/docs": "*",
|
|
46
46
|
"@atlaskit/visual-regression": "*",
|
|
47
47
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
48
|
+
"@testing-library/react": "^12.1.5",
|
|
49
|
+
"@testing-library/user-event": "^14.4.3",
|
|
48
50
|
"ast-types": "^0.13.3",
|
|
49
|
-
"enzyme": "^3.10.0",
|
|
50
|
-
"enzyme-adapter-react-16": "^1.15.1",
|
|
51
51
|
"jscodeshift": "^0.13.0",
|
|
52
52
|
"react": "^16.8.0",
|
|
53
53
|
"typescript": "~4.9.5"
|