@atlaskit/color-picker 1.2.3 → 1.3.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 +24 -0
- package/build/tsconfig.json +6 -2
- package/dist/cjs/components/ColorPicker.js +1 -1
- package/dist/cjs/components/components.js +4 -2
- package/dist/cjs/constants.js +1 -1
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/styled/ColorCard.js +2 -6
- package/dist/cjs/utils.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/ColorPicker.js +1 -1
- package/dist/es2019/styled/ColorCard.js +2 -4
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/ColorPicker.js +1 -1
- package/dist/esm/components/components.js +2 -1
- package/dist/esm/styled/ColorCard.js +2 -6
- package/dist/esm/version.json +1 -1
- package/dist/types/components/components.d.ts +1 -0
- package/dist/types/utils.d.ts +2 -2
- package/package.json +7 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @atlaskit/color-picker
|
|
2
2
|
|
|
3
|
+
## 1.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`10b517acfea`](https://bitbucket.org/atlassian/atlassian-frontend/commits/10b517acfea) - [ux] Updated how the darker border for each colour block is rendered by using css instead of `darken()`
|
|
8
|
+
|
|
9
|
+
## 1.2.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`b85e7ce12cd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b85e7ce12cd) - Internal upgrade of memoize-one to 6.0.0
|
|
14
|
+
|
|
15
|
+
## 1.2.5
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
21
|
+
## 1.2.4
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
|
|
3
27
|
## 1.2.3
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/build/tsconfig.json
CHANGED
|
@@ -58,7 +58,7 @@ var defaultPopperProps = {
|
|
|
58
58
|
placement: 'bottom-start'
|
|
59
59
|
};
|
|
60
60
|
var packageName = "@atlaskit/color-picker";
|
|
61
|
-
var packageVersion = "1.
|
|
61
|
+
var packageVersion = "1.3.0";
|
|
62
62
|
|
|
63
63
|
var ColorPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
64
64
|
(0, _inherits2.default)(ColorPickerWithoutAnalytics, _React$Component);
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.Placeholder = exports.
|
|
8
|
+
exports.Placeholder = exports.Option = exports.MenuList = exports.DropdownIndicator = void 0;
|
|
9
9
|
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
|
|
@@ -19,11 +19,13 @@ var _utils = require("../utils");
|
|
|
19
19
|
|
|
20
20
|
var _ColorPalette = require("../styled/ColorPalette");
|
|
21
21
|
|
|
22
|
+
var _excluded = ["cx", "selectProps", "innerRef"];
|
|
23
|
+
|
|
22
24
|
var MenuList = function MenuList(props) {
|
|
23
25
|
var cx = props.cx,
|
|
24
26
|
cols = props.selectProps.cols,
|
|
25
27
|
innerRef = props.innerRef,
|
|
26
|
-
rest = (0, _objectWithoutProperties2.default)(props,
|
|
28
|
+
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
27
29
|
return /*#__PURE__*/_react.default.createElement(_ColorPalette.ColorPaletteContainer, (0, _extends2.default)({
|
|
28
30
|
role: "grid",
|
|
29
31
|
style: {
|
package/dist/cjs/constants.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.KEY_SPACE = exports.KEY_ENTER = exports.COLOR_CARD_SIZE = void 0;
|
|
7
7
|
var COLOR_CARD_SIZE = 30;
|
|
8
8
|
exports.COLOR_CARD_SIZE = COLOR_CARD_SIZE;
|
|
9
9
|
var KEY_SPACE = ' ';
|
package/dist/cjs/index.js
CHANGED
|
@@ -5,10 +5,10 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
Object.defineProperty(exports, "
|
|
8
|
+
Object.defineProperty(exports, "ColorPaletteMenu", {
|
|
9
9
|
enumerable: true,
|
|
10
10
|
get: function get() {
|
|
11
|
-
return
|
|
11
|
+
return _ColorPaletteMenu.default;
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "ColorPaletteMenuWithoutAnalytics", {
|
|
@@ -17,13 +17,13 @@ Object.defineProperty(exports, "ColorPaletteMenuWithoutAnalytics", {
|
|
|
17
17
|
return _ColorPaletteMenu.ColorPaletteMenuWithoutAnalytics;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
-
Object.defineProperty(exports, "
|
|
20
|
+
Object.defineProperty(exports, "ColorPickerWithoutAnalytics", {
|
|
21
21
|
enumerable: true,
|
|
22
22
|
get: function get() {
|
|
23
|
-
return
|
|
23
|
+
return _ColorPicker.ColorPickerWithoutAnalytics;
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
|
-
exports.
|
|
26
|
+
exports.default = exports.Standard = exports.Compact = void 0;
|
|
27
27
|
|
|
28
28
|
var _ColorPicker = _interopRequireWildcard(require("./components/ColorPicker"));
|
|
29
29
|
|
|
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.
|
|
10
|
+
exports.ColorCardOption = exports.ColorCardContent = exports.ColorCardButton = void 0;
|
|
11
11
|
|
|
12
12
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
13
|
|
|
@@ -17,8 +17,6 @@ var _theme = require("@atlaskit/theme");
|
|
|
17
17
|
|
|
18
18
|
var _constants = require("../constants");
|
|
19
19
|
|
|
20
|
-
var _darken = _interopRequireDefault(require("polished/lib/color/darken"));
|
|
21
|
-
|
|
22
20
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
23
21
|
|
|
24
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); }
|
|
@@ -44,10 +42,8 @@ var ColorCardButton = _styledComponents.default.button(_templateObject3 || (_tem
|
|
|
44
42
|
|
|
45
43
|
exports.ColorCardButton = ColorCardButton;
|
|
46
44
|
|
|
47
|
-
var ColorCardContent = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n top: 1px;\n left: 1px;\n width: 22px;\n height: 22px;\n border-radius: ", "px;\n background: ", ";\n border: solid
|
|
45
|
+
var ColorCardContent = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n top: 1px;\n left: 1px;\n width: 22px;\n height: 22px;\n border-radius: ", "px;\n background: ", ";\n border: 1px solid hsla(0, 0%, 0%, 0.2);\n"])), (0, _theme.borderRadius)(), function (props) {
|
|
48
46
|
return props.color;
|
|
49
|
-
}, function (props) {
|
|
50
|
-
return (0, _darken.default)(0.1, props.color);
|
|
51
47
|
});
|
|
52
48
|
|
|
53
49
|
exports.ColorCardContent = ColorCardContent;
|
package/dist/cjs/utils.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.getWidth = exports.getOptions = void 0;
|
|
9
9
|
|
|
10
10
|
var _theme = require("@atlaskit/theme");
|
|
11
11
|
|
package/dist/cjs/version.json
CHANGED
|
@@ -18,7 +18,7 @@ const defaultPopperProps = {
|
|
|
18
18
|
placement: 'bottom-start'
|
|
19
19
|
};
|
|
20
20
|
const packageName = "@atlaskit/color-picker";
|
|
21
|
-
const packageVersion = "1.
|
|
21
|
+
const packageVersion = "1.3.0";
|
|
22
22
|
export class ColorPickerWithoutAnalytics extends React.Component {
|
|
23
23
|
constructor(...args) {
|
|
24
24
|
super(...args);
|
|
@@ -2,9 +2,7 @@ import styled, { css } from 'styled-components'; // AFP-2532 TODO: Fix automatic
|
|
|
2
2
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
3
3
|
|
|
4
4
|
import { borderRadius, colors } from '@atlaskit/theme';
|
|
5
|
-
import { COLOR_CARD_SIZE } from '../constants';
|
|
6
|
-
|
|
7
|
-
import darken from 'polished/lib/color/darken';
|
|
5
|
+
import { COLOR_CARD_SIZE } from '../constants';
|
|
8
6
|
const buttonFocusedBorder = `border-color: ${colors.B100};`;
|
|
9
7
|
const sharedColorContainerStyles = css`
|
|
10
8
|
display: inline-block;
|
|
@@ -58,5 +56,5 @@ export const ColorCardContent = styled.div`
|
|
|
58
56
|
height: 22px;
|
|
59
57
|
border-radius: ${borderRadius()}px;
|
|
60
58
|
background: ${props => props.color};
|
|
61
|
-
border:
|
|
59
|
+
border: 1px solid hsla(0, 0%, 0%, 0.2);
|
|
62
60
|
`;
|
package/dist/es2019/version.json
CHANGED
|
@@ -29,7 +29,7 @@ var defaultPopperProps = {
|
|
|
29
29
|
placement: 'bottom-start'
|
|
30
30
|
};
|
|
31
31
|
var packageName = "@atlaskit/color-picker";
|
|
32
|
-
var packageVersion = "1.
|
|
32
|
+
var packageVersion = "1.3.0";
|
|
33
33
|
export var ColorPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
34
34
|
_inherits(ColorPickerWithoutAnalytics, _React$Component);
|
|
35
35
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["cx", "selectProps", "innerRef"];
|
|
3
4
|
import React from 'react';
|
|
4
5
|
import ColorCard from './ColorCard';
|
|
5
6
|
import { getWidth } from '../utils';
|
|
@@ -8,7 +9,7 @@ export var MenuList = function MenuList(props) {
|
|
|
8
9
|
var cx = props.cx,
|
|
9
10
|
cols = props.selectProps.cols,
|
|
10
11
|
innerRef = props.innerRef,
|
|
11
|
-
rest = _objectWithoutProperties(props,
|
|
12
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
12
13
|
|
|
13
14
|
return /*#__PURE__*/React.createElement(ColorPaletteContainer, _extends({
|
|
14
15
|
role: "grid",
|
|
@@ -6,9 +6,7 @@ import styled, { css } from 'styled-components'; // AFP-2532 TODO: Fix automatic
|
|
|
6
6
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
7
7
|
|
|
8
8
|
import { borderRadius, colors } from '@atlaskit/theme';
|
|
9
|
-
import { COLOR_CARD_SIZE } from '../constants';
|
|
10
|
-
|
|
11
|
-
import darken from 'polished/lib/color/darken';
|
|
9
|
+
import { COLOR_CARD_SIZE } from '../constants';
|
|
12
10
|
var buttonFocusedBorder = "border-color: ".concat(colors.B100, ";");
|
|
13
11
|
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 &:hover,\n &:focus {\n border-color: ", ";\n }\n"])), COLOR_CARD_SIZE, COLOR_CARD_SIZE, borderRadius() * 2, colors.B75);
|
|
14
12
|
export var ColorCardOption = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", ";\n\n ", ";\n"])), sharedColorContainerStyles, function (props) {
|
|
@@ -21,8 +19,6 @@ export var ColorCardButton = styled.button(_templateObject3 || (_templateObject3
|
|
|
21
19
|
return buttonFocusedBorder;
|
|
22
20
|
}
|
|
23
21
|
});
|
|
24
|
-
export var ColorCardContent = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n top: 1px;\n left: 1px;\n width: 22px;\n height: 22px;\n border-radius: ", "px;\n background: ", ";\n border: solid
|
|
22
|
+
export var ColorCardContent = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n top: 1px;\n left: 1px;\n width: 22px;\n height: 22px;\n border-radius: ", "px;\n background: ", ";\n border: 1px solid hsla(0, 0%, 0%, 0.2);\n"])), borderRadius(), function (props) {
|
|
25
23
|
return props.color;
|
|
26
|
-
}, function (props) {
|
|
27
|
-
return darken(0.1, props.color);
|
|
28
24
|
});
|
package/dist/esm/version.json
CHANGED
package/dist/types/utils.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Palette } from './types';
|
|
2
2
|
export declare const getWidth: (cols: number) => number;
|
|
3
|
-
export declare const getOptions: (palette: Palette, selectedColor?: string | undefined) => {
|
|
3
|
+
export declare const getOptions: import("memoize-one").MemoizedFn<(palette: Palette, selectedColor?: string | undefined) => {
|
|
4
4
|
options: Palette;
|
|
5
5
|
value: import("./types").Color;
|
|
6
6
|
focusedItemIndex: number;
|
|
7
|
-
}
|
|
7
|
+
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/color-picker",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Jira Color Picker Component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -21,13 +21,12 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@atlaskit/analytics-next": "^8.
|
|
25
|
-
"@atlaskit/icon": "^21.
|
|
26
|
-
"@atlaskit/select": "^
|
|
27
|
-
"@atlaskit/theme": "^
|
|
24
|
+
"@atlaskit/analytics-next": "^8.2.0",
|
|
25
|
+
"@atlaskit/icon": "^21.10.0",
|
|
26
|
+
"@atlaskit/select": "^15.0.0",
|
|
27
|
+
"@atlaskit/theme": "^12.1.0",
|
|
28
28
|
"@babel/runtime": "^7.0.0",
|
|
29
|
-
"memoize-one": "^
|
|
30
|
-
"polished": "1.9.3",
|
|
29
|
+
"memoize-one": "^6.0.0",
|
|
31
30
|
"styled-components": "^3.2.6"
|
|
32
31
|
},
|
|
33
32
|
"peerDependencies": {
|
|
@@ -40,7 +39,7 @@
|
|
|
40
39
|
"ast-types": "^0.13.3",
|
|
41
40
|
"enzyme": "^3.10.0",
|
|
42
41
|
"enzyme-adapter-react-16": "^1.15.1",
|
|
43
|
-
"jscodeshift": "^0.
|
|
42
|
+
"jscodeshift": "^0.13.0",
|
|
44
43
|
"react": "^16.8.0",
|
|
45
44
|
"typescript": "3.9.6"
|
|
46
45
|
},
|