@atlaskit/task-decision 17.8.0 → 17.9.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/task-decision
2
2
 
3
+ ## 17.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`96f4e9fe6de`](https://bitbucket.org/atlassian/atlassian-frontend/commits/96f4e9fe6de) - [ux] ECA11Y-1 Added keyboard support to focus checkbox, check or uncheck, inside action item
8
+
9
+ ## 17.8.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`6900f89eb0e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6900f89eb0e) - Internal changes to use space tokens. There is no expected visual or behaviour change.
14
+
3
15
  ## 17.8.0
4
16
 
5
17
  ### Minor Changes
@@ -26,7 +26,7 @@ var iconStyles = function iconStyles(showPlaceholder) {
26
26
  theme: theme
27
27
  }),
28
28
  '> span': {
29
- margin: '-8px'
29
+ margin: "var(--ds-space-negative-100, -8px)"
30
30
  }
31
31
  });
32
32
  };
@@ -156,7 +156,8 @@ var ResourcedTaskItem = /*#__PURE__*/function (_PureComponent) {
156
156
  taskId = _this$props3.taskId,
157
157
  disabled = _this$props3.disabled,
158
158
  dataAttributes = _this$props3.dataAttributes,
159
- isRenderer = _this$props3.isRenderer;
159
+ isRenderer = _this$props3.isRenderer,
160
+ isFocused = _this$props3.isFocused;
160
161
  return /*#__PURE__*/_react.default.createElement(_analyticsNamespacedContext.FabricElementsAnalyticsContext, {
161
162
  data: {
162
163
  objectAri: objectAri
@@ -164,6 +165,7 @@ var ResourcedTaskItem = /*#__PURE__*/function (_PureComponent) {
164
165
  }, /*#__PURE__*/_react.default.createElement(_TaskItem.default, {
165
166
  isDone: isDone,
166
167
  isRenderer: isRenderer,
168
+ isFocused: isFocused,
167
169
  taskId: taskId,
168
170
  onChange: this.handleOnChange,
169
171
  appearance: appearance,
@@ -25,6 +25,7 @@ var getCheckBoxId = function getCheckBoxId(localId) {
25
25
  var TaskItem = function TaskItem(props) {
26
26
  var appearance = props.appearance,
27
27
  isDone = props.isDone,
28
+ isFocused = props.isFocused,
28
29
  isRenderer = props.isRenderer,
29
30
  contentRef = props.contentRef,
30
31
  children = props.children,
@@ -65,6 +66,7 @@ var TaskItem = function TaskItem(props) {
65
66
  }
66
67
  };
67
68
  }, [handleOnChange]);
69
+ var inputRef = (0, _react.useRef)(null);
68
70
  var icon = (0, _react2.jsx)("span", {
69
71
  css: (0, _styles.checkboxStyles)(isRenderer)(theme),
70
72
  contentEditable: false
@@ -77,10 +79,22 @@ var TaskItem = function TaskItem(props) {
77
79
  checked: !!isDone,
78
80
  disabled: !!disabled,
79
81
  suppressHydrationWarning: true,
80
- onKeyPress: handleOnKeyPress
82
+ onKeyPress: handleOnKeyPress,
83
+ ref: inputRef
81
84
  }), (0, _react2.jsx)(_checkbox.default, {
82
85
  label: ""
83
86
  }));
87
+ _react.default.useEffect(function () {
88
+ if (isFocused && inputRef.current) {
89
+ var _inputRef$current, _inputRef$current2;
90
+ (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
91
+ (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.blur();
92
+ setTimeout(function () {
93
+ var _inputRef$current3;
94
+ (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.focus();
95
+ }, 100);
96
+ }
97
+ }, [isFocused]);
84
98
  return (0, _react2.jsx)(_Item.default, {
85
99
  appearance: appearance,
86
100
  contentRef: contentRef,
@@ -45,7 +45,7 @@ var placeholderStyles = function placeholderStyles(offset) {
45
45
  exports.placeholderStyles = placeholderStyles;
46
46
  var checkboxStyles = function checkboxStyles(isRenderer) {
47
47
  return function (theme) {
48
- return (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n flex: 0 0 24px;\n width: 24px;\n height: 24px;\n position: relative;\n align-self: start;\n\n & > input[type='checkbox'] {\n width: 16px;\n height: 16px;\n z-index: 1;\n cursor: pointer;\n outline: none;\n margin: 0;\n opacity: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n\n &[disabled] {\n cursor: default;\n }\n\n + span {\n width: 24px;\n height: 24px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n + span > svg {\n box-sizing: border-box;\n display: inline;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n max-width: unset;\n max-height: unset;\n position: absolute;\n overflow: hidden;\n color: ", ";\n transition: color 0.2s ease-in-out, fill 0.2s ease-in-out;\n path:first-of-type {\n visibility: hidden;\n }\n rect:first-of-type {\n stroke: ", ";\n stroke-width: ", ";\n transition: stroke 0.2s ease-in-out;\n }\n }\n\n &&:focus + span > svg,\n &&:checked:focus + span > svg {\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:hover + span > svg {\n color: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:checked:hover + span > svg {\n color: ", ";\n fill: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:checked {\n + span > svg {\n path:first-of-type {\n visibility: visible;\n }\n color: ", ";\n fill: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n }\n\n &:active + span > svg {\n color: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:checked:active + span > svg {\n color: ", ";\n fill: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:disabled + span > svg,\n &:disabled:hover + span > svg,\n &:disabled:focus + span > svg,\n &:disabled:active + span > svg {\n color: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:disabled:checked + span > svg {\n fill: ", ";\n }\n\n ", "\n }\n "])), (0, _components.themed)({
48
+ return (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n flex: 0 0 24px;\n width: 24px;\n height: 24px;\n position: relative;\n align-self: start;\n\n & > input[type='checkbox'] {\n width: 16px;\n height: 16px;\n z-index: 1;\n cursor: pointer;\n outline: none;\n margin: 0;\n opacity: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n\n &[disabled] {\n cursor: default;\n }\n\n + span {\n width: 24px;\n height: 24px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n + span > svg {\n box-sizing: border-box;\n display: inline;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n max-width: unset;\n max-height: unset;\n position: absolute;\n overflow: hidden;\n color: ", ";\n transition: color 0.2s ease-in-out, fill 0.2s ease-in-out;\n path:first-of-type {\n visibility: hidden;\n }\n rect:first-of-type {\n stroke: ", ";\n stroke-width: ", ";\n transition: stroke 0.2s ease-in-out;\n }\n }\n\n &&:focus + span > svg,\n &&:checked:focus + span > svg {\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:hover + span > svg {\n color: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:checked:hover + span > svg {\n color: ", ";\n fill: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:checked {\n + span > svg {\n path:first-of-type {\n visibility: visible;\n }\n color: ", ";\n fill: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n }\n\n &:active + span > svg {\n color: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:checked:active + span > svg {\n color: ", ";\n fill: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:disabled + span > svg,\n &:disabled:hover + span > svg,\n &:disabled:focus + span > svg,\n &:disabled:active + span > svg {\n color: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:disabled:checked + span > svg {\n fill: ", ";\n }\n\n &:focus + span > svg rect:first-of-type {\n stroke: ", ";\n }\n &:checked:focus + span {\n & > svg {\n rect:first-of-type {\n stroke: ", ";\n }\n }\n }\n\n ", "\n }\n "])), (0, _components.themed)({
49
49
  light: _theme.default.light.boxColor.rest,
50
50
  dark: _theme.default.dark.boxColor.rest
51
51
  })({
@@ -140,6 +140,16 @@ var checkboxStyles = function checkboxStyles(isRenderer) {
140
140
  dark: _theme.default.dark.tickColor.disabledAndChecked
141
141
  })({
142
142
  theme: theme
143
+ }), (0, _components.themed)({
144
+ light: _theme.default.light.boxColor.checked,
145
+ dark: _theme.default.dark.boxColor.checked
146
+ })({
147
+ theme: theme
148
+ }), (0, _components.themed)({
149
+ light: _theme.default.light.borderColor.focused,
150
+ dark: _theme.default.dark.borderColor.focused
151
+ })({
152
+ theme: theme
143
153
  }), isRenderer ? (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n &:focus + span > svg,\n &:checked:focus + span > svg {\n rect:first-of-type {\n stroke: ", ";\n }\n }\n "])), (0, _components.themed)({
144
154
  light: _theme.default.light.borderColor.focused,
145
155
  dark: _theme.default.dark.borderColor.focused
@@ -18,7 +18,7 @@ const iconStyles = showPlaceholder => theme => {
18
18
  theme
19
19
  }),
20
20
  '> span': {
21
- margin: '-8px'
21
+ margin: "var(--ds-space-negative-100, -8px)"
22
22
  }
23
23
  });
24
24
  };
@@ -125,7 +125,8 @@ export default class ResourcedTaskItem extends PureComponent {
125
125
  taskId,
126
126
  disabled,
127
127
  dataAttributes,
128
- isRenderer
128
+ isRenderer,
129
+ isFocused
129
130
  } = this.props;
130
131
  return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
131
132
  data: {
@@ -134,6 +135,7 @@ export default class ResourcedTaskItem extends PureComponent {
134
135
  }, /*#__PURE__*/React.createElement(TaskItem, {
135
136
  isDone: isDone,
136
137
  isRenderer: isRenderer,
138
+ isFocused: isFocused,
137
139
  taskId: taskId,
138
140
  onChange: this.handleOnChange,
139
141
  appearance: appearance,
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import React, { useMemo } from 'react';
2
+ import React, { useMemo, useRef } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
4
  import CheckboxIcon from '@atlaskit/icon/glyph/checkbox';
5
5
  import Item from './Item';
@@ -13,6 +13,7 @@ const TaskItem = props => {
13
13
  const {
14
14
  appearance,
15
15
  isDone,
16
+ isFocused,
16
17
  isRenderer,
17
18
  contentRef,
18
19
  children,
@@ -50,6 +51,7 @@ const TaskItem = props => {
50
51
  handleOnChange(event);
51
52
  }
52
53
  }, [handleOnChange]);
54
+ const inputRef = useRef(null);
53
55
  const icon = jsx("span", {
54
56
  css: checkboxStyles(isRenderer)(theme),
55
57
  contentEditable: false
@@ -62,10 +64,22 @@ const TaskItem = props => {
62
64
  checked: !!isDone,
63
65
  disabled: !!disabled,
64
66
  suppressHydrationWarning: true,
65
- onKeyPress: handleOnKeyPress
67
+ onKeyPress: handleOnKeyPress,
68
+ ref: inputRef
66
69
  }), jsx(CheckboxIcon, {
67
70
  label: ""
68
71
  }));
72
+ React.useEffect(() => {
73
+ if (isFocused && inputRef.current) {
74
+ var _inputRef$current, _inputRef$current2;
75
+ (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
76
+ (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.blur();
77
+ setTimeout(() => {
78
+ var _inputRef$current3;
79
+ (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.focus();
80
+ }, 100);
81
+ }
82
+ }, [isFocused]);
69
83
  return jsx(Item, {
70
84
  appearance: appearance,
71
85
  contentRef: contentRef,
@@ -279,6 +279,27 @@ export const checkboxStyles = isRenderer => theme => css`
279
279
  })};
280
280
  }
281
281
 
282
+ &:focus + span > svg rect:first-of-type {
283
+ stroke: ${themed({
284
+ light: checkboxTheme.light.boxColor.checked,
285
+ dark: checkboxTheme.dark.boxColor.checked
286
+ })({
287
+ theme
288
+ })};
289
+ }
290
+ &:checked:focus + span {
291
+ & > svg {
292
+ rect:first-of-type {
293
+ stroke: ${themed({
294
+ light: checkboxTheme.light.borderColor.focused,
295
+ dark: checkboxTheme.dark.borderColor.focused
296
+ })({
297
+ theme
298
+ })};
299
+ }
300
+ }
301
+ }
302
+
282
303
  ${isRenderer ? css`
283
304
  &:focus + span > svg,
284
305
  &:checked:focus + span > svg {
@@ -19,7 +19,7 @@ var iconStyles = function iconStyles(showPlaceholder) {
19
19
  theme: theme
20
20
  }),
21
21
  '> span': {
22
- margin: '-8px'
22
+ margin: "var(--ds-space-negative-100, -8px)"
23
23
  }
24
24
  });
25
25
  };
@@ -147,7 +147,8 @@ var ResourcedTaskItem = /*#__PURE__*/function (_PureComponent) {
147
147
  taskId = _this$props3.taskId,
148
148
  disabled = _this$props3.disabled,
149
149
  dataAttributes = _this$props3.dataAttributes,
150
- isRenderer = _this$props3.isRenderer;
150
+ isRenderer = _this$props3.isRenderer,
151
+ isFocused = _this$props3.isFocused;
151
152
  return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
152
153
  data: {
153
154
  objectAri: objectAri
@@ -155,6 +156,7 @@ var ResourcedTaskItem = /*#__PURE__*/function (_PureComponent) {
155
156
  }, /*#__PURE__*/React.createElement(TaskItem, {
156
157
  isDone: isDone,
157
158
  isRenderer: isRenderer,
159
+ isFocused: isFocused,
158
160
  taskId: taskId,
159
161
  onChange: this.handleOnChange,
160
162
  appearance: appearance,
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import React, { useMemo } from 'react';
2
+ import React, { useMemo, useRef } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
4
  import CheckboxIcon from '@atlaskit/icon/glyph/checkbox';
5
5
  import Item from './Item';
@@ -14,6 +14,7 @@ var getCheckBoxId = function getCheckBoxId(localId) {
14
14
  var TaskItem = function TaskItem(props) {
15
15
  var appearance = props.appearance,
16
16
  isDone = props.isDone,
17
+ isFocused = props.isFocused,
17
18
  isRenderer = props.isRenderer,
18
19
  contentRef = props.contentRef,
19
20
  children = props.children,
@@ -54,6 +55,7 @@ var TaskItem = function TaskItem(props) {
54
55
  }
55
56
  };
56
57
  }, [handleOnChange]);
58
+ var inputRef = useRef(null);
57
59
  var icon = jsx("span", {
58
60
  css: checkboxStyles(isRenderer)(theme),
59
61
  contentEditable: false
@@ -66,10 +68,22 @@ var TaskItem = function TaskItem(props) {
66
68
  checked: !!isDone,
67
69
  disabled: !!disabled,
68
70
  suppressHydrationWarning: true,
69
- onKeyPress: handleOnKeyPress
71
+ onKeyPress: handleOnKeyPress,
72
+ ref: inputRef
70
73
  }), jsx(CheckboxIcon, {
71
74
  label: ""
72
75
  }));
76
+ React.useEffect(function () {
77
+ if (isFocused && inputRef.current) {
78
+ var _inputRef$current, _inputRef$current2;
79
+ (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
80
+ (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.blur();
81
+ setTimeout(function () {
82
+ var _inputRef$current3;
83
+ (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.focus();
84
+ }, 100);
85
+ }
86
+ }, [isFocused]);
73
87
  return jsx(Item, {
74
88
  appearance: appearance,
75
89
  contentRef: contentRef,
@@ -33,7 +33,7 @@ export var placeholderStyles = function placeholderStyles(offset) {
33
33
  */
34
34
  export var checkboxStyles = function checkboxStyles(isRenderer) {
35
35
  return function (theme) {
36
- return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n flex: 0 0 24px;\n width: 24px;\n height: 24px;\n position: relative;\n align-self: start;\n\n & > input[type='checkbox'] {\n width: 16px;\n height: 16px;\n z-index: 1;\n cursor: pointer;\n outline: none;\n margin: 0;\n opacity: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n\n &[disabled] {\n cursor: default;\n }\n\n + span {\n width: 24px;\n height: 24px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n + span > svg {\n box-sizing: border-box;\n display: inline;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n max-width: unset;\n max-height: unset;\n position: absolute;\n overflow: hidden;\n color: ", ";\n transition: color 0.2s ease-in-out, fill 0.2s ease-in-out;\n path:first-of-type {\n visibility: hidden;\n }\n rect:first-of-type {\n stroke: ", ";\n stroke-width: ", ";\n transition: stroke 0.2s ease-in-out;\n }\n }\n\n &&:focus + span > svg,\n &&:checked:focus + span > svg {\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:hover + span > svg {\n color: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:checked:hover + span > svg {\n color: ", ";\n fill: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:checked {\n + span > svg {\n path:first-of-type {\n visibility: visible;\n }\n color: ", ";\n fill: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n }\n\n &:active + span > svg {\n color: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:checked:active + span > svg {\n color: ", ";\n fill: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:disabled + span > svg,\n &:disabled:hover + span > svg,\n &:disabled:focus + span > svg,\n &:disabled:active + span > svg {\n color: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:disabled:checked + span > svg {\n fill: ", ";\n }\n\n ", "\n }\n "])), themed({
36
+ return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n flex: 0 0 24px;\n width: 24px;\n height: 24px;\n position: relative;\n align-self: start;\n\n & > input[type='checkbox'] {\n width: 16px;\n height: 16px;\n z-index: 1;\n cursor: pointer;\n outline: none;\n margin: 0;\n opacity: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n\n &[disabled] {\n cursor: default;\n }\n\n + span {\n width: 24px;\n height: 24px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n + span > svg {\n box-sizing: border-box;\n display: inline;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n max-width: unset;\n max-height: unset;\n position: absolute;\n overflow: hidden;\n color: ", ";\n transition: color 0.2s ease-in-out, fill 0.2s ease-in-out;\n path:first-of-type {\n visibility: hidden;\n }\n rect:first-of-type {\n stroke: ", ";\n stroke-width: ", ";\n transition: stroke 0.2s ease-in-out;\n }\n }\n\n &&:focus + span > svg,\n &&:checked:focus + span > svg {\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:hover + span > svg {\n color: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:checked:hover + span > svg {\n color: ", ";\n fill: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:checked {\n + span > svg {\n path:first-of-type {\n visibility: visible;\n }\n color: ", ";\n fill: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n }\n\n &:active + span > svg {\n color: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:checked:active + span > svg {\n color: ", ";\n fill: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:disabled + span > svg,\n &:disabled:hover + span > svg,\n &:disabled:focus + span > svg,\n &:disabled:active + span > svg {\n color: ", ";\n rect:first-of-type {\n stroke: ", ";\n }\n }\n\n &:disabled:checked + span > svg {\n fill: ", ";\n }\n\n &:focus + span > svg rect:first-of-type {\n stroke: ", ";\n }\n &:checked:focus + span {\n & > svg {\n rect:first-of-type {\n stroke: ", ";\n }\n }\n }\n\n ", "\n }\n "])), themed({
37
37
  light: checkboxTheme.light.boxColor.rest,
38
38
  dark: checkboxTheme.dark.boxColor.rest
39
39
  })({
@@ -128,6 +128,16 @@ export var checkboxStyles = function checkboxStyles(isRenderer) {
128
128
  dark: checkboxTheme.dark.tickColor.disabledAndChecked
129
129
  })({
130
130
  theme: theme
131
+ }), themed({
132
+ light: checkboxTheme.light.boxColor.checked,
133
+ dark: checkboxTheme.dark.boxColor.checked
134
+ })({
135
+ theme: theme
136
+ }), themed({
137
+ light: checkboxTheme.light.borderColor.focused,
138
+ dark: checkboxTheme.dark.borderColor.focused
139
+ })({
140
+ theme: theme
131
141
  }), isRenderer ? css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n &:focus + span > svg,\n &:checked:focus + span > svg {\n rect:first-of-type {\n stroke: ", ";\n }\n }\n "])), themed({
132
142
  light: checkboxTheme.light.borderColor.focused,
133
143
  dark: checkboxTheme.dark.borderColor.focused
@@ -4,6 +4,7 @@ export interface Props {
4
4
  taskId: string;
5
5
  isDone?: boolean;
6
6
  isRenderer?: boolean;
7
+ isFocused?: boolean;
7
8
  onChange?: (taskId: string, isChecked: boolean) => void;
8
9
  contentRef?: ContentRef;
9
10
  children?: any;
@@ -5,6 +5,7 @@ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
5
5
  export interface Props {
6
6
  taskId: string;
7
7
  isDone?: boolean;
8
+ isFocused?: boolean;
8
9
  isRenderer?: boolean;
9
10
  onChange?: (taskId: string, isChecked: boolean) => void;
10
11
  contentRef?: ContentRef;
@@ -4,6 +4,7 @@ export interface Props {
4
4
  taskId: string;
5
5
  isDone?: boolean;
6
6
  isRenderer?: boolean;
7
+ isFocused?: boolean;
7
8
  onChange?: (taskId: string, isChecked: boolean) => void;
8
9
  contentRef?: ContentRef;
9
10
  children?: any;
@@ -5,6 +5,7 @@ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
5
5
  export interface Props {
6
6
  taskId: string;
7
7
  isDone?: boolean;
8
+ isFocused?: boolean;
8
9
  isRenderer?: boolean;
9
10
  onChange?: (taskId: string, isChecked: boolean) => void;
10
11
  contentRef?: ContentRef;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/task-decision",
3
- "version": "17.8.0",
3
+ "version": "17.9.0",
4
4
  "description": "Tasks and decisions react components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -39,7 +39,7 @@
39
39
  "@atlaskit/icon": "^21.12.0",
40
40
  "@atlaskit/platform-feature-flags": "^0.2.2",
41
41
  "@atlaskit/theme": "^12.6.0",
42
- "@atlaskit/tokens": "^1.21.0",
42
+ "@atlaskit/tokens": "^1.22.0",
43
43
  "@atlaskit/util-service-support": "^6.2.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "@emotion/react": "^11.7.1",
package/report.api.md CHANGED
@@ -164,6 +164,8 @@ interface Props_3 {
164
164
  // (undocumented)
165
165
  isDone?: boolean;
166
166
  // (undocumented)
167
+ isFocused?: boolean;
168
+ // (undocumented)
167
169
  isRenderer?: boolean;
168
170
  // (undocumented)
169
171
  objectAri?: string;
@@ -196,6 +198,8 @@ interface Props_4 {
196
198
  // (undocumented)
197
199
  isDone?: boolean;
198
200
  // (undocumented)
201
+ isFocused?: boolean;
202
+ // (undocumented)
199
203
  isRenderer?: boolean;
200
204
  // (undocumented)
201
205
  onChange?: (taskId: string, isChecked: boolean) => void;
@@ -146,6 +146,8 @@ interface Props_3 {
146
146
  // (undocumented)
147
147
  isDone?: boolean;
148
148
  // (undocumented)
149
+ isFocused?: boolean;
150
+ // (undocumented)
149
151
  isRenderer?: boolean;
150
152
  // (undocumented)
151
153
  objectAri?: string;
@@ -178,6 +180,8 @@ interface Props_4 {
178
180
  // (undocumented)
179
181
  isDone?: boolean;
180
182
  // (undocumented)
183
+ isFocused?: boolean;
184
+ // (undocumented)
181
185
  isRenderer?: boolean;
182
186
  // (undocumented)
183
187
  onChange?: (taskId: string, isChecked: boolean) => void;