@atlaskit/task-decision 17.3.1 → 17.4.1

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,31 @@
1
1
  # @atlaskit/task-decision
2
2
 
3
+ ## 17.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
8
+
9
+ ## 17.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`785548f317d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/785548f317d) - [ux] Instrumented `@atlaskit/task-decision` with the new theming package, `@atlaskit/tokens`.
14
+
15
+ New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).
16
+ These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
17
+
18
+ ### Patch Changes
19
+
20
+ - [`7edfc6b2928`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7edfc6b2928) - [ux] Fix for checkbox hover state
21
+ - Updated dependencies
22
+
23
+ ## 17.3.2
24
+
25
+ ### Patch Changes
26
+
27
+ - [`053b9d1b25e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/053b9d1b25e) - AK-729: an empty label was removed from action item component
28
+
3
29
  ## 17.3.1
4
30
 
5
31
  ### Patch Changes
@@ -125,10 +125,7 @@ var TaskItem = /*#__PURE__*/function (_PureComponent) {
125
125
  disabled: !!disabled,
126
126
  suppressHydrationWarning: true,
127
127
  onKeyPress: this.handleOnKeyPress
128
- }), /*#__PURE__*/_react.default.createElement("label", {
129
- htmlFor: this.checkBoxId,
130
- suppressHydrationWarning: true
131
- }));
128
+ }), /*#__PURE__*/_react.default.createElement("div", null));
132
129
 
133
130
  return /*#__PURE__*/_react.default.createElement(_Item.default, {
134
131
  appearance: appearance,
@@ -17,12 +17,14 @@ var _constants = require("@atlaskit/theme/constants");
17
17
 
18
18
  var _colors = require("@atlaskit/theme/colors");
19
19
 
20
+ var _tokens = require("@atlaskit/tokens");
21
+
20
22
  var _templateObject;
21
23
 
22
24
  var EditorIconWrapper = _styledComponents.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n flex: 0 0 16px;\n height: 16px;\n width: 16px;\n color: ", ";\n margin: 4px ", "px 0 0;\n\n > span {\n margin: -8px;\n }\n"])), function (props) {
23
- return props.showPlaceholder ? _colors.N100 : (0, _components.themed)({
24
- light: _colors.G400,
25
- dark: _colors.G200
25
+ return props.showPlaceholder ? (0, _tokens.token)('color.icon.subtle', _colors.N100) : (0, _components.themed)({
26
+ light: (0, _tokens.token)('color.icon.success', _colors.G400),
27
+ dark: (0, _tokens.token)('color.icon.success', _colors.G200)
26
28
  });
27
29
  }, (0, _constants.gridSize)() * 1.5);
28
30
 
@@ -17,6 +17,8 @@ var _constants = require("@atlaskit/theme/constants");
17
17
 
18
18
  var _colors = require("@atlaskit/theme/colors");
19
19
 
20
+ var _tokens = require("@atlaskit/tokens");
21
+
20
22
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
21
23
 
22
24
  var ContentWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n margin: 0;\n word-wrap: break-word;\n min-width: 0;\n flex: 1 1 auto;\n"])));
@@ -28,8 +30,8 @@ var TaskWrapper = _styledComponents.default.div(_templateObject2 || (_templateOb
28
30
  exports.TaskWrapper = TaskWrapper;
29
31
 
30
32
  var DecisionWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n margin: ", "px 0 0 0;\n padding: ", "px;\n padding-left: ", "px;\n border-radius: ", "px;\n background-color: ", ";\n position: relative;\n\n .decision-item {\n cursor: initial;\n }\n"])), (0, _constants.gridSize)(), (0, _constants.gridSize)(), (0, _constants.gridSize)() * 1.5, (0, _constants.borderRadius)(), (0, _components.themed)({
31
- light: _colors.N20A,
32
- dark: _colors.DN50
33
+ light: (0, _tokens.token)('color.background.neutral', _colors.N20A),
34
+ dark: (0, _tokens.token)('color.background.neutral', _colors.DN50)
33
35
  }));
34
36
 
35
37
  exports.DecisionWrapper = DecisionWrapper;
@@ -13,10 +13,12 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
13
13
 
14
14
  var _colors = require("@atlaskit/theme/colors");
15
15
 
16
+ var _tokens = require("@atlaskit/tokens");
17
+
16
18
  var _templateObject;
17
19
 
18
20
  var Placeholder = _styledComponents.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n margin: ", ";\n position: absolute;\n color: ", ";\n pointer-events: none;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n max-width: calc(100% - 50px);\n"])), function (props) {
19
21
  return "0 0 0 ".concat(props.offset, "px;");
20
- }, _colors.N100);
22
+ }, (0, _tokens.token)('color.text.subtlest', _colors.N100));
21
23
 
22
24
  exports.Placeholder = Placeholder;
@@ -19,26 +19,28 @@ var _constants = require("@atlaskit/theme/constants");
19
19
 
20
20
  var _colors = require("@atlaskit/theme/colors");
21
21
 
22
+ var _tokens = require("@atlaskit/tokens");
23
+
22
24
  var _templateObject, _templateObject2;
23
25
 
24
26
  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); }
25
27
 
26
28
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
29
 
28
- var CheckBoxWrapper = _styledComponents.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n flex: 0 0 16px;\n width: 16px;\n height: 16px;\n position: relative;\n align-self: start;\n margin: 4px ", "px 0 0;\n\n & > input[type='checkbox'] {\n position: absolute;\n outline: none;\n margin: 0;\n opacity: 0;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n\n + label {\n box-sizing: border-box;\n display: block;\n position: relative;\n width: 100%;\n cursor: pointer;\n\n &::after {\n background: ", "\n background-size: 16px;\n border-radius: 3px;\n border-style: solid;\n border-width: 1px;\n border-color: ", "\n box-sizing: border-box;\n content: '';\n height: 16px;\n left: 50%;\n position: absolute;\n transition: border-color 0.2s ease-in-out;\n top: 8px;\n width: 16px;\n transform: translate(-50%, -50%);\n }\n }\n &:focus-visible + label:after {\n ", "\n }\n &:not([disabled]) + label:hover::after {\n background: ", "\n transition: border 0.2s ease-in-out;\n }\n &[disabled] + label {\n opacity: 0.5;\n cursor: default;\n }\n &:checked {\n + label::after {\n background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDA1MkNDIj48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)\n no-repeat 0 0;\n background-size: 16px;\n border: 0;\n border-color: transparent;\n }\n &:not([disabled]) + label:hover::after {\n background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDc0N0E2Ij48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)\n no-repeat 0 0;\n background-size: 16px;\n }\n }\n }\n"])), (0, _constants.gridSize)(), (0, _components.themed)({
29
- light: _colors.N0,
30
- dark: _colors.DN100
30
+ var CheckBoxWrapper = _styledComponents.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n flex: 0 0 16px;\n width: 16px;\n height: 16px;\n position: relative;\n align-self: start;\n margin: 4px ", "px 0 0;\n\n & > input[type='checkbox'] {\n width: 16px;\n height: 16px;\n z-index: 1;\n cursor: pointer;\n position: absolute;\n outline: none;\n margin: 0;\n opacity: 0;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n\n + div {\n box-sizing: border-box;\n display: block;\n position: relative;\n width: 100%;\n cursor: pointer;\n\n &::after {\n background: ", ";\n background-size: 16px;\n border-radius: 3px;\n border-style: solid;\n border-width: 1px;\n border-color: ", ";\n box-sizing: border-box;\n content: '';\n height: 16px;\n left: 50%;\n position: absolute;\n transition: border-color 0.2s ease-in-out;\n top: 8px;\n width: 16px;\n transform: translate(-50%, -50%);\n }\n }\n &:focus-visible + div:after {\n ", "\n }\n &:not([disabled]):hover + div::after {\n background: ", ";\n transition: border 0.2s ease-in-out;\n }\n &[disabled] + div {\n opacity: 0.5;\n cursor: default;\n }\n &:checked {\n + div::after {\n background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDA1MkNDIj48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)\n no-repeat 0 0;\n background-size: 16px;\n border: 0;\n border-color: transparent;\n }\n &:not([disabled]):hover + div::after {\n background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDc0N0E2Ij48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)\n no-repeat 0 0;\n background-size: 16px;\n }\n }\n }\n"])), (0, _constants.gridSize)(), (0, _components.themed)({
31
+ light: (0, _tokens.token)('color.background.input', _colors.N0),
32
+ dark: (0, _tokens.token)('color.background.input', _colors.DN100)
31
33
  }), (0, _components.themed)({
32
- light: _colors.N90,
33
- dark: _colors.DN200
34
+ light: (0, _tokens.token)('color.border', _colors.N90),
35
+ dark: (0, _tokens.token)('color.border', _colors.DN200)
34
36
  }), function (props) {
35
- return props.isRenderer ? (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n outline: 2px solid ", ";\n "])), (0, _components.themed)({
36
- light: _colors.B300,
37
- dark: _colors.B75
37
+ return props.isRenderer ? (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n outline: 2px solid\n ", ";\n "])), (0, _components.themed)({
38
+ light: (0, _tokens.token)('color.border.focused', _colors.B300),
39
+ dark: (0, _tokens.token)('color.border.focused', _colors.B75)
38
40
  })) : '';
39
41
  }, (0, _components.themed)({
40
- light: _colors.N30,
41
- dark: _colors.B75
42
+ light: (0, _tokens.token)('color.background.input', _colors.N30),
43
+ dark: (0, _tokens.token)('color.background.input', _colors.B75)
42
44
  }));
43
45
 
44
46
  exports.CheckBoxWrapper = CheckBoxWrapper;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/task-decision",
3
- "version": "17.3.1",
3
+ "version": "17.4.1",
4
4
  "sideEffects": false
5
5
  }
@@ -80,10 +80,7 @@ export class TaskItem extends PureComponent {
80
80
  disabled: !!disabled,
81
81
  suppressHydrationWarning: true,
82
82
  onKeyPress: this.handleOnKeyPress
83
- }), /*#__PURE__*/React.createElement("label", {
84
- htmlFor: this.checkBoxId,
85
- suppressHydrationWarning: true
86
- }));
83
+ }), /*#__PURE__*/React.createElement("div", null));
87
84
  return /*#__PURE__*/React.createElement(Item, {
88
85
  appearance: appearance,
89
86
  contentRef: contentRef,
@@ -4,13 +4,14 @@ import styled from 'styled-components'; // @ts-ignore: unused variable
4
4
  import { themed } from '@atlaskit/theme/components';
5
5
  import { gridSize } from '@atlaskit/theme/constants';
6
6
  import { N100, G400, G200 } from '@atlaskit/theme/colors';
7
+ import { token } from '@atlaskit/tokens';
7
8
  export const EditorIconWrapper = styled.span`
8
9
  flex: 0 0 16px;
9
10
  height: 16px;
10
11
  width: 16px;
11
- color: ${props => props.showPlaceholder ? N100 : themed({
12
- light: G400,
13
- dark: G200
12
+ color: ${props => props.showPlaceholder ? token('color.icon.subtle', N100) : themed({
13
+ light: token('color.icon.success', G400),
14
+ dark: token('color.icon.success', G200)
14
15
  })};
15
16
  margin: 4px ${gridSize() * 1.5}px 0 0;
16
17
 
@@ -4,6 +4,7 @@ import styled from 'styled-components'; // @ts-ignore: unused variable
4
4
  import { themed } from '@atlaskit/theme/components';
5
5
  import { borderRadius, gridSize } from '@atlaskit/theme/constants';
6
6
  import { N20A, DN50 } from '@atlaskit/theme/colors';
7
+ import { token } from '@atlaskit/tokens';
7
8
  export const ContentWrapper = styled.div`
8
9
  margin: 0;
9
10
  word-wrap: break-word;
@@ -24,8 +25,8 @@ export const DecisionWrapper = styled.div`
24
25
  padding-left: ${gridSize() * 1.5}px;
25
26
  border-radius: ${borderRadius()}px;
26
27
  background-color: ${themed({
27
- light: N20A,
28
- dark: DN50
28
+ light: token('color.background.neutral', N20A),
29
+ dark: token('color.background.neutral', DN50)
29
30
  })};
30
31
  position: relative;
31
32
 
@@ -2,10 +2,11 @@ import styled from 'styled-components'; // @ts-ignore: unused variable
2
2
  // prettier-ignore
3
3
 
4
4
  import { N100 } from '@atlaskit/theme/colors';
5
+ import { token } from '@atlaskit/tokens';
5
6
  export const Placeholder = styled.span`
6
7
  margin: ${props => `0 0 0 ${props.offset}px;`};
7
8
  position: absolute;
8
- color: ${N100};
9
+ color: ${token('color.text.subtlest', N100)};
9
10
  pointer-events: none;
10
11
  text-overflow: ellipsis;
11
12
  overflow: hidden;
@@ -4,6 +4,7 @@ import styled, { css } from 'styled-components'; // @ts-ignore: unused variable
4
4
  import { themed } from '@atlaskit/theme/components';
5
5
  import { gridSize } from '@atlaskit/theme/constants';
6
6
  import { N0, DN100, DN200, N30, N90, B75, B300 } from '@atlaskit/theme/colors';
7
+ import { token } from '@atlaskit/tokens';
7
8
  export const CheckBoxWrapper = styled.span`
8
9
  flex: 0 0 16px;
9
10
  width: 16px;
@@ -13,6 +14,10 @@ export const CheckBoxWrapper = styled.span`
13
14
  margin: 4px ${gridSize()}px 0 0;
14
15
 
15
16
  & > input[type='checkbox'] {
17
+ width: 16px;
18
+ height: 16px;
19
+ z-index: 1;
20
+ cursor: pointer;
16
21
  position: absolute;
17
22
  outline: none;
18
23
  margin: 0;
@@ -21,7 +26,7 @@ export const CheckBoxWrapper = styled.span`
21
26
  top: 50%;
22
27
  transform: translateY(-50%);
23
28
 
24
- + label {
29
+ + div {
25
30
  box-sizing: border-box;
26
31
  display: block;
27
32
  position: relative;
@@ -30,17 +35,17 @@ export const CheckBoxWrapper = styled.span`
30
35
 
31
36
  &::after {
32
37
  background: ${themed({
33
- light: N0,
34
- dark: DN100
35
- })}
38
+ light: token('color.background.input', N0),
39
+ dark: token('color.background.input', DN100)
40
+ })};
36
41
  background-size: 16px;
37
42
  border-radius: 3px;
38
43
  border-style: solid;
39
44
  border-width: 1px;
40
45
  border-color: ${themed({
41
- light: N90,
42
- dark: DN200
43
- })}
46
+ light: token('color.border', N90),
47
+ dark: token('color.border', DN200)
48
+ })};
44
49
  box-sizing: border-box;
45
50
  content: '';
46
51
  height: 16px;
@@ -52,34 +57,35 @@ export const CheckBoxWrapper = styled.span`
52
57
  transform: translate(-50%, -50%);
53
58
  }
54
59
  }
55
- &:focus-visible + label:after {
60
+ &:focus-visible + div:after {
56
61
  ${props => props.isRenderer ? css`
57
- outline: 2px solid ${themed({
58
- light: B300,
59
- dark: B75
62
+ outline: 2px solid
63
+ ${themed({
64
+ light: token('color.border.focused', B300),
65
+ dark: token('color.border.focused', B75)
60
66
  })};
61
67
  ` : ''}
62
68
  }
63
- &:not([disabled]) + label:hover::after {
69
+ &:not([disabled]):hover + div::after {
64
70
  background: ${themed({
65
- light: N30,
66
- dark: B75
67
- })}
71
+ light: token('color.background.input', N30),
72
+ dark: token('color.background.input', B75)
73
+ })};
68
74
  transition: border 0.2s ease-in-out;
69
75
  }
70
- &[disabled] + label {
76
+ &[disabled] + div {
71
77
  opacity: 0.5;
72
78
  cursor: default;
73
79
  }
74
80
  &:checked {
75
- + label::after {
81
+ + div::after {
76
82
  background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDA1MkNDIj48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)
77
83
  no-repeat 0 0;
78
84
  background-size: 16px;
79
85
  border: 0;
80
86
  border-color: transparent;
81
87
  }
82
- &:not([disabled]) + label:hover::after {
88
+ &:not([disabled]):hover + div::after {
83
89
  background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDc0N0E2Ij48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)
84
90
  no-repeat 0 0;
85
91
  background-size: 16px;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/task-decision",
3
- "version": "17.3.1",
3
+ "version": "17.4.1",
4
4
  "sideEffects": false
5
5
  }
@@ -103,10 +103,7 @@ export var TaskItem = /*#__PURE__*/function (_PureComponent) {
103
103
  disabled: !!disabled,
104
104
  suppressHydrationWarning: true,
105
105
  onKeyPress: this.handleOnKeyPress
106
- }), /*#__PURE__*/React.createElement("label", {
107
- htmlFor: this.checkBoxId,
108
- suppressHydrationWarning: true
109
- }));
106
+ }), /*#__PURE__*/React.createElement("div", null));
110
107
  return /*#__PURE__*/React.createElement(Item, {
111
108
  appearance: appearance,
112
109
  contentRef: contentRef,
@@ -8,9 +8,10 @@ import styled from 'styled-components'; // @ts-ignore: unused variable
8
8
  import { themed } from '@atlaskit/theme/components';
9
9
  import { gridSize } from '@atlaskit/theme/constants';
10
10
  import { N100, G400, G200 } from '@atlaskit/theme/colors';
11
+ import { token } from '@atlaskit/tokens';
11
12
  export var EditorIconWrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 0 0 16px;\n height: 16px;\n width: 16px;\n color: ", ";\n margin: 4px ", "px 0 0;\n\n > span {\n margin: -8px;\n }\n"])), function (props) {
12
- return props.showPlaceholder ? N100 : themed({
13
- light: G400,
14
- dark: G200
13
+ return props.showPlaceholder ? token('color.icon.subtle', N100) : themed({
14
+ light: token('color.icon.success', G400),
15
+ dark: token('color.icon.success', G200)
15
16
  });
16
17
  }, gridSize() * 1.5);
@@ -8,10 +8,11 @@ import styled from 'styled-components'; // @ts-ignore: unused variable
8
8
  import { themed } from '@atlaskit/theme/components';
9
9
  import { borderRadius, gridSize } from '@atlaskit/theme/constants';
10
10
  import { N20A, DN50 } from '@atlaskit/theme/colors';
11
+ import { token } from '@atlaskit/tokens';
11
12
  export var ContentWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin: 0;\n word-wrap: break-word;\n min-width: 0;\n flex: 1 1 auto;\n"])));
12
13
  export var TaskWrapper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n padding: 6px 3px;\n position: relative;\n"])));
13
14
  export var DecisionWrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n margin: ", "px 0 0 0;\n padding: ", "px;\n padding-left: ", "px;\n border-radius: ", "px;\n background-color: ", ";\n position: relative;\n\n .decision-item {\n cursor: initial;\n }\n"])), gridSize(), gridSize(), gridSize() * 1.5, borderRadius(), themed({
14
- light: N20A,
15
- dark: DN50
15
+ light: token('color.background.neutral', N20A),
16
+ dark: token('color.background.neutral', DN50)
16
17
  }));
17
18
  export var ParticipantWrapper = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin: -2px 8px;\n"])));
@@ -6,6 +6,7 @@ import styled from 'styled-components'; // @ts-ignore: unused variable
6
6
  // prettier-ignore
7
7
 
8
8
  import { N100 } from '@atlaskit/theme/colors';
9
+ import { token } from '@atlaskit/tokens';
9
10
  export var Placeholder = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin: ", ";\n position: absolute;\n color: ", ";\n pointer-events: none;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n max-width: calc(100% - 50px);\n"])), function (props) {
10
11
  return "0 0 0 ".concat(props.offset, "px;");
11
- }, N100);
12
+ }, token('color.text.subtlest', N100));
@@ -8,18 +8,19 @@ import styled, { css } from 'styled-components'; // @ts-ignore: unused variable
8
8
  import { themed } from '@atlaskit/theme/components';
9
9
  import { gridSize } from '@atlaskit/theme/constants';
10
10
  import { N0, DN100, DN200, N30, N90, B75, B300 } from '@atlaskit/theme/colors';
11
- export var CheckBoxWrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 0 0 16px;\n width: 16px;\n height: 16px;\n position: relative;\n align-self: start;\n margin: 4px ", "px 0 0;\n\n & > input[type='checkbox'] {\n position: absolute;\n outline: none;\n margin: 0;\n opacity: 0;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n\n + label {\n box-sizing: border-box;\n display: block;\n position: relative;\n width: 100%;\n cursor: pointer;\n\n &::after {\n background: ", "\n background-size: 16px;\n border-radius: 3px;\n border-style: solid;\n border-width: 1px;\n border-color: ", "\n box-sizing: border-box;\n content: '';\n height: 16px;\n left: 50%;\n position: absolute;\n transition: border-color 0.2s ease-in-out;\n top: 8px;\n width: 16px;\n transform: translate(-50%, -50%);\n }\n }\n &:focus-visible + label:after {\n ", "\n }\n &:not([disabled]) + label:hover::after {\n background: ", "\n transition: border 0.2s ease-in-out;\n }\n &[disabled] + label {\n opacity: 0.5;\n cursor: default;\n }\n &:checked {\n + label::after {\n background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDA1MkNDIj48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)\n no-repeat 0 0;\n background-size: 16px;\n border: 0;\n border-color: transparent;\n }\n &:not([disabled]) + label:hover::after {\n background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDc0N0E2Ij48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)\n no-repeat 0 0;\n background-size: 16px;\n }\n }\n }\n"])), gridSize(), themed({
12
- light: N0,
13
- dark: DN100
11
+ import { token } from '@atlaskit/tokens';
12
+ export var CheckBoxWrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 0 0 16px;\n width: 16px;\n height: 16px;\n position: relative;\n align-self: start;\n margin: 4px ", "px 0 0;\n\n & > input[type='checkbox'] {\n width: 16px;\n height: 16px;\n z-index: 1;\n cursor: pointer;\n position: absolute;\n outline: none;\n margin: 0;\n opacity: 0;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n\n + div {\n box-sizing: border-box;\n display: block;\n position: relative;\n width: 100%;\n cursor: pointer;\n\n &::after {\n background: ", ";\n background-size: 16px;\n border-radius: 3px;\n border-style: solid;\n border-width: 1px;\n border-color: ", ";\n box-sizing: border-box;\n content: '';\n height: 16px;\n left: 50%;\n position: absolute;\n transition: border-color 0.2s ease-in-out;\n top: 8px;\n width: 16px;\n transform: translate(-50%, -50%);\n }\n }\n &:focus-visible + div:after {\n ", "\n }\n &:not([disabled]):hover + div::after {\n background: ", ";\n transition: border 0.2s ease-in-out;\n }\n &[disabled] + div {\n opacity: 0.5;\n cursor: default;\n }\n &:checked {\n + div::after {\n background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDA1MkNDIj48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)\n no-repeat 0 0;\n background-size: 16px;\n border: 0;\n border-color: transparent;\n }\n &:not([disabled]):hover + div::after {\n background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDc0N0E2Ij48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)\n no-repeat 0 0;\n background-size: 16px;\n }\n }\n }\n"])), gridSize(), themed({
13
+ light: token('color.background.input', N0),
14
+ dark: token('color.background.input', DN100)
14
15
  }), themed({
15
- light: N90,
16
- dark: DN200
16
+ light: token('color.border', N90),
17
+ dark: token('color.border', DN200)
17
18
  }), function (props) {
18
- return props.isRenderer ? css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n outline: 2px solid ", ";\n "])), themed({
19
- light: B300,
20
- dark: B75
19
+ return props.isRenderer ? css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n outline: 2px solid\n ", ";\n "])), themed({
20
+ light: token('color.border.focused', B300),
21
+ dark: token('color.border.focused', B75)
21
22
  })) : '';
22
23
  }, themed({
23
- light: N30,
24
- dark: B75
24
+ light: token('color.background.input', N30),
25
+ dark: token('color.background.input', B75)
25
26
  }));
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/task-decision",
3
- "version": "17.3.1",
3
+ "version": "17.4.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,2 +1,2 @@
1
1
  export declare const fabricElementsChannel = "fabric-elements";
2
- export declare const createAndFireEventInElementsChannel: (payload: Record<string, any>) => (createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent) => import("@atlaskit/analytics-next").UIAnalyticsEvent;
2
+ export declare const createAndFireEventInElementsChannel: (payload: import("@atlaskit/analytics-next").AnalyticsEventPayload) => (createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent) => import("@atlaskit/analytics-next").UIAnalyticsEvent;
@@ -26,5 +26,5 @@ export declare class TaskItem extends PureComponent<Props & WithAnalyticsEventsP
26
26
  handleOnKeyPress: (event: React.KeyboardEvent<HTMLInputElement>) => void;
27
27
  render(): JSX.Element;
28
28
  }
29
- declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Props & WithAnalyticsEventsProps, "placeholder" | "children" | "onChange" | "showPlaceholder" | "appearance" | "contentRef" | "dataAttributes" | "taskId" | "isDone" | "isRenderer" | "disabled">, never> & Partial<Pick<Pick<Props & WithAnalyticsEventsProps, "placeholder" | "children" | "onChange" | "showPlaceholder" | "appearance" | "contentRef" | "dataAttributes" | "taskId" | "isDone" | "isRenderer" | "disabled">, "placeholder" | "children" | "onChange" | "showPlaceholder" | "appearance" | "contentRef" | "dataAttributes" | "taskId" | "isDone" | "isRenderer" | "disabled">> & Partial<Pick<Partial<Props>, never>> & React.RefAttributes<any>>;
29
+ declare const _default: React.ForwardRefExoticComponent<Pick<Omit<Props & WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps>, never> & Partial<Pick<Omit<Props & WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps>, keyof Props>> & Partial<Pick<Partial<Props>, never>> & React.RefAttributes<any>>;
30
30
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/task-decision",
3
- "version": "17.3.1",
3
+ "version": "17.4.1",
4
4
  "description": "Tasks and decisions react components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,6 +30,7 @@
30
30
  "@atlaskit/analytics-next": "^8.2.0",
31
31
  "@atlaskit/icon": "^21.10.0",
32
32
  "@atlaskit/theme": "^12.1.0",
33
+ "@atlaskit/tokens": "^0.9.0",
33
34
  "@atlaskit/util-service-support": "^6.1.0",
34
35
  "@babel/runtime": "^7.0.0",
35
36
  "uuid": "^3.1.0"
@@ -44,9 +45,9 @@
44
45
  "@atlaskit/analytics-listeners": "^8.2.0",
45
46
  "@atlaskit/avatar": "^20.5.0",
46
47
  "@atlaskit/docs": "*",
47
- "@atlaskit/editor-common": "^64.0.0",
48
+ "@atlaskit/editor-common": "^66.0.0",
48
49
  "@atlaskit/elements-test-helpers": "^0.7.0",
49
- "@atlaskit/renderer": "^86.0.0",
50
+ "@atlaskit/renderer": "^93.0.0",
50
51
  "@atlaskit/util-data-test": "^17.2.0",
51
52
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
52
53
  "@types/url-search-params": "^0.10.0",
@@ -57,12 +58,15 @@
57
58
  "jest-fetch-mock": "^3.0.3",
58
59
  "react": "^16.8.0",
59
60
  "sinon": "^2.2.0",
60
- "typescript": "3.9.6",
61
+ "typescript": "4.2.4",
61
62
  "url-search-params": "^0.10.0"
62
63
  },
63
64
  "techstack": {
64
65
  "@atlassian/frontend": {
65
66
  "tree-shaking": []
67
+ },
68
+ "@repo/internal": {
69
+ "theming": "tokens"
66
70
  }
67
71
  },
68
72
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"