@atlaskit/task-decision 17.3.0 → 17.4.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 +26 -0
- package/dist/cjs/components/ResourcedTaskItem.js +3 -1
- package/dist/cjs/components/TaskItem.js +11 -6
- package/dist/cjs/styled/DecisionItem.js +5 -3
- package/dist/cjs/styled/Item.js +4 -2
- package/dist/cjs/styled/Placeholder.js +3 -1
- package/dist/cjs/styled/TaskItem.js +23 -10
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/ResourcedTaskItem.js +3 -1
- package/dist/es2019/components/TaskItem.js +12 -6
- package/dist/es2019/styled/DecisionItem.js +4 -3
- package/dist/es2019/styled/Item.js +3 -2
- package/dist/es2019/styled/Placeholder.js +2 -1
- package/dist/es2019/styled/TaskItem.js +30 -17
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/ResourcedTaskItem.js +3 -1
- package/dist/esm/components/TaskItem.js +12 -6
- package/dist/esm/styled/DecisionItem.js +4 -3
- package/dist/esm/styled/Item.js +3 -2
- package/dist/esm/styled/Placeholder.js +2 -1
- package/dist/esm/styled/TaskItem.js +17 -11
- package/dist/esm/version.json +1 -1
- package/dist/types/components/ResourcedTaskItem.d.ts +1 -0
- package/dist/types/components/TaskItem.d.ts +3 -1
- package/dist/types/styled/TaskItem.d.ts +6 -2
- package/package.json +10 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @atlaskit/task-decision
|
|
2
2
|
|
|
3
|
+
## 17.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`785548f317d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/785548f317d) - [ux] Instrumented `@atlaskit/task-decision` with the new theming package, `@atlaskit/tokens`.
|
|
8
|
+
|
|
9
|
+
New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).
|
|
10
|
+
These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`7edfc6b2928`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7edfc6b2928) - [ux] Fix for checkbox hover state
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
17
|
+
## 17.3.2
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [`053b9d1b25e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/053b9d1b25e) - AK-729: an empty label was removed from action item component
|
|
22
|
+
|
|
23
|
+
## 17.3.1
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- [`57f3b255fb2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/57f3b255fb2) - [ux] AK-608: Action items are keyboard accessible
|
|
28
|
+
|
|
3
29
|
## 17.3.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
|
@@ -186,13 +186,15 @@ var ResourcedTaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
186
186
|
placeholder = _this$props3.placeholder,
|
|
187
187
|
taskId = _this$props3.taskId,
|
|
188
188
|
disabled = _this$props3.disabled,
|
|
189
|
-
dataAttributes = _this$props3.dataAttributes
|
|
189
|
+
dataAttributes = _this$props3.dataAttributes,
|
|
190
|
+
isRenderer = _this$props3.isRenderer;
|
|
190
191
|
return /*#__PURE__*/_react.default.createElement(_analyticsNamespacedContext.FabricElementsAnalyticsContext, {
|
|
191
192
|
data: {
|
|
192
193
|
objectAri: objectAri
|
|
193
194
|
}
|
|
194
195
|
}, /*#__PURE__*/_react.default.createElement(_TaskItem.default, {
|
|
195
196
|
isDone: isDone,
|
|
197
|
+
isRenderer: isRenderer,
|
|
196
198
|
taskId: taskId,
|
|
197
199
|
onChange: this.handleOnChange,
|
|
198
200
|
appearance: appearance,
|
|
@@ -82,6 +82,11 @@ var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
82
82
|
})(createAnalyticsEvent);
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleOnKeyPress", function (event) {
|
|
86
|
+
if (event.key === 'Enter') {
|
|
87
|
+
_this.handleOnChange(event);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
85
90
|
_this.checkBoxId = getCheckBoxId(props.taskId);
|
|
86
91
|
return _this;
|
|
87
92
|
}
|
|
@@ -99,6 +104,7 @@ var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
99
104
|
var _this$props2 = this.props,
|
|
100
105
|
appearance = _this$props2.appearance,
|
|
101
106
|
isDone = _this$props2.isDone,
|
|
107
|
+
isRenderer = _this$props2.isRenderer,
|
|
102
108
|
contentRef = _this$props2.contentRef,
|
|
103
109
|
children = _this$props2.children,
|
|
104
110
|
placeholder = _this$props2.placeholder,
|
|
@@ -107,7 +113,8 @@ var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
107
113
|
dataAttributes = _this$props2.dataAttributes;
|
|
108
114
|
|
|
109
115
|
var icon = /*#__PURE__*/_react.default.createElement(_TaskItem.CheckBoxWrapper, {
|
|
110
|
-
contentEditable: false
|
|
116
|
+
contentEditable: false,
|
|
117
|
+
isRenderer: isRenderer
|
|
111
118
|
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
112
119
|
id: this.checkBoxId,
|
|
113
120
|
"aria-labelledby": "".concat(this.checkBoxId, "-wrapper"),
|
|
@@ -116,11 +123,9 @@ var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
116
123
|
onChange: this.handleOnChange,
|
|
117
124
|
checked: !!isDone,
|
|
118
125
|
disabled: !!disabled,
|
|
119
|
-
suppressHydrationWarning: true
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
suppressHydrationWarning: true
|
|
123
|
-
}));
|
|
126
|
+
suppressHydrationWarning: true,
|
|
127
|
+
onKeyPress: this.handleOnKeyPress
|
|
128
|
+
}), /*#__PURE__*/_react.default.createElement("div", null));
|
|
124
129
|
|
|
125
130
|
return /*#__PURE__*/_react.default.createElement(_Item.default, {
|
|
126
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
|
|
package/dist/cjs/styled/Item.js
CHANGED
|
@@ -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;
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
5
7
|
Object.defineProperty(exports, "__esModule", {
|
|
6
8
|
value: true
|
|
7
9
|
});
|
|
@@ -9,7 +11,7 @@ exports.CheckBoxWrapper = void 0;
|
|
|
9
11
|
|
|
10
12
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
13
|
|
|
12
|
-
var _styledComponents =
|
|
14
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
13
15
|
|
|
14
16
|
var _components = require("@atlaskit/theme/components");
|
|
15
17
|
|
|
@@ -17,17 +19,28 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
17
19
|
|
|
18
20
|
var _colors = require("@atlaskit/theme/colors");
|
|
19
21
|
|
|
20
|
-
var
|
|
22
|
+
var _tokens = require("@atlaskit/tokens");
|
|
21
23
|
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
var _templateObject, _templateObject2;
|
|
25
|
+
|
|
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); }
|
|
27
|
+
|
|
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; }
|
|
29
|
+
|
|
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)
|
|
28
33
|
}), (0, _components.themed)({
|
|
29
|
-
light: _colors.
|
|
30
|
-
dark: _colors.
|
|
34
|
+
light: (0, _tokens.token)('color.border', _colors.N90),
|
|
35
|
+
dark: (0, _tokens.token)('color.border', _colors.DN200)
|
|
36
|
+
}), function (props) {
|
|
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)
|
|
40
|
+
})) : '';
|
|
41
|
+
}, (0, _components.themed)({
|
|
42
|
+
light: (0, _tokens.token)('color.background.input', _colors.N30),
|
|
43
|
+
dark: (0, _tokens.token)('color.background.input', _colors.B75)
|
|
31
44
|
}));
|
|
32
45
|
|
|
33
46
|
exports.CheckBoxWrapper = CheckBoxWrapper;
|
package/dist/cjs/version.json
CHANGED
|
@@ -137,7 +137,8 @@ export default class ResourcedTaskItem extends PureComponent {
|
|
|
137
137
|
placeholder,
|
|
138
138
|
taskId,
|
|
139
139
|
disabled,
|
|
140
|
-
dataAttributes
|
|
140
|
+
dataAttributes,
|
|
141
|
+
isRenderer
|
|
141
142
|
} = this.props;
|
|
142
143
|
return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
|
|
143
144
|
data: {
|
|
@@ -145,6 +146,7 @@ export default class ResourcedTaskItem extends PureComponent {
|
|
|
145
146
|
}
|
|
146
147
|
}, /*#__PURE__*/React.createElement(TaskItem, {
|
|
147
148
|
isDone: isDone,
|
|
149
|
+
isRenderer: isRenderer,
|
|
148
150
|
taskId: taskId,
|
|
149
151
|
onChange: this.handleOnChange,
|
|
150
152
|
appearance: appearance,
|
|
@@ -40,6 +40,12 @@ export class TaskItem extends PureComponent {
|
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
+
_defineProperty(this, "handleOnKeyPress", event => {
|
|
44
|
+
if (event.key === 'Enter') {
|
|
45
|
+
this.handleOnChange(event);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
|
|
43
49
|
this.checkBoxId = getCheckBoxId(props.taskId);
|
|
44
50
|
}
|
|
45
51
|
|
|
@@ -53,6 +59,7 @@ export class TaskItem extends PureComponent {
|
|
|
53
59
|
const {
|
|
54
60
|
appearance,
|
|
55
61
|
isDone,
|
|
62
|
+
isRenderer,
|
|
56
63
|
contentRef,
|
|
57
64
|
children,
|
|
58
65
|
placeholder,
|
|
@@ -61,7 +68,8 @@ export class TaskItem extends PureComponent {
|
|
|
61
68
|
dataAttributes
|
|
62
69
|
} = this.props;
|
|
63
70
|
const icon = /*#__PURE__*/React.createElement(CheckBoxWrapper, {
|
|
64
|
-
contentEditable: false
|
|
71
|
+
contentEditable: false,
|
|
72
|
+
isRenderer: isRenderer
|
|
65
73
|
}, /*#__PURE__*/React.createElement("input", {
|
|
66
74
|
id: this.checkBoxId,
|
|
67
75
|
"aria-labelledby": `${this.checkBoxId}-wrapper`,
|
|
@@ -70,11 +78,9 @@ export class TaskItem extends PureComponent {
|
|
|
70
78
|
onChange: this.handleOnChange,
|
|
71
79
|
checked: !!isDone,
|
|
72
80
|
disabled: !!disabled,
|
|
73
|
-
suppressHydrationWarning: true
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
suppressHydrationWarning: true
|
|
77
|
-
}));
|
|
81
|
+
suppressHydrationWarning: true,
|
|
82
|
+
onKeyPress: this.handleOnKeyPress
|
|
83
|
+
}), /*#__PURE__*/React.createElement("div", null));
|
|
78
84
|
return /*#__PURE__*/React.createElement(Item, {
|
|
79
85
|
appearance: appearance,
|
|
80
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;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import styled from 'styled-components'; // @ts-ignore: unused variable
|
|
1
|
+
import styled, { css } from 'styled-components'; // @ts-ignore: unused variable
|
|
2
2
|
// prettier-ignore
|
|
3
3
|
|
|
4
4
|
import { themed } from '@atlaskit/theme/components';
|
|
5
5
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
6
|
-
import { N0, DN100, DN200, N30, N90, B75 } from '@atlaskit/theme/colors';
|
|
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
|
-
+
|
|
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,27 +57,35 @@ export const CheckBoxWrapper = styled.span`
|
|
|
52
57
|
transform: translate(-50%, -50%);
|
|
53
58
|
}
|
|
54
59
|
}
|
|
55
|
-
&:
|
|
60
|
+
&:focus-visible + div:after {
|
|
61
|
+
${props => props.isRenderer ? css`
|
|
62
|
+
outline: 2px solid
|
|
63
|
+
${themed({
|
|
64
|
+
light: token('color.border.focused', B300),
|
|
65
|
+
dark: token('color.border.focused', B75)
|
|
66
|
+
})};
|
|
67
|
+
` : ''}
|
|
68
|
+
}
|
|
69
|
+
&:not([disabled]):hover + div::after {
|
|
56
70
|
background: ${themed({
|
|
57
|
-
light: N30,
|
|
58
|
-
dark: B75
|
|
59
|
-
})}
|
|
71
|
+
light: token('color.background.input', N30),
|
|
72
|
+
dark: token('color.background.input', B75)
|
|
73
|
+
})};
|
|
60
74
|
transition: border 0.2s ease-in-out;
|
|
61
75
|
}
|
|
62
|
-
&[disabled] +
|
|
76
|
+
&[disabled] + div {
|
|
63
77
|
opacity: 0.5;
|
|
64
78
|
cursor: default;
|
|
65
79
|
}
|
|
66
80
|
&:checked {
|
|
67
|
-
+
|
|
81
|
+
+ div::after {
|
|
68
82
|
background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDA1MkNDIj48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)
|
|
69
83
|
no-repeat 0 0;
|
|
70
84
|
background-size: 16px;
|
|
71
85
|
border: 0;
|
|
72
86
|
border-color: transparent;
|
|
73
|
-
border-radius: 0; /* FS-1392 */
|
|
74
87
|
}
|
|
75
|
-
&:not([disabled]) +
|
|
88
|
+
&:not([disabled]):hover + div::after {
|
|
76
89
|
background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDc0N0E2Ij48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)
|
|
77
90
|
no-repeat 0 0;
|
|
78
91
|
background-size: 16px;
|
package/dist/es2019/version.json
CHANGED
|
@@ -169,13 +169,15 @@ var ResourcedTaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
169
169
|
placeholder = _this$props3.placeholder,
|
|
170
170
|
taskId = _this$props3.taskId,
|
|
171
171
|
disabled = _this$props3.disabled,
|
|
172
|
-
dataAttributes = _this$props3.dataAttributes
|
|
172
|
+
dataAttributes = _this$props3.dataAttributes,
|
|
173
|
+
isRenderer = _this$props3.isRenderer;
|
|
173
174
|
return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
|
|
174
175
|
data: {
|
|
175
176
|
objectAri: objectAri
|
|
176
177
|
}
|
|
177
178
|
}, /*#__PURE__*/React.createElement(TaskItem, {
|
|
178
179
|
isDone: isDone,
|
|
180
|
+
isRenderer: isRenderer,
|
|
179
181
|
taskId: taskId,
|
|
180
182
|
onChange: this.handleOnChange,
|
|
181
183
|
appearance: appearance,
|
|
@@ -60,6 +60,12 @@ export var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
|
|
63
|
+
_defineProperty(_assertThisInitialized(_this), "handleOnKeyPress", function (event) {
|
|
64
|
+
if (event.key === 'Enter') {
|
|
65
|
+
_this.handleOnChange(event);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
63
69
|
_this.checkBoxId = getCheckBoxId(props.taskId);
|
|
64
70
|
return _this;
|
|
65
71
|
}
|
|
@@ -77,6 +83,7 @@ export var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
77
83
|
var _this$props2 = this.props,
|
|
78
84
|
appearance = _this$props2.appearance,
|
|
79
85
|
isDone = _this$props2.isDone,
|
|
86
|
+
isRenderer = _this$props2.isRenderer,
|
|
80
87
|
contentRef = _this$props2.contentRef,
|
|
81
88
|
children = _this$props2.children,
|
|
82
89
|
placeholder = _this$props2.placeholder,
|
|
@@ -84,7 +91,8 @@ export var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
84
91
|
disabled = _this$props2.disabled,
|
|
85
92
|
dataAttributes = _this$props2.dataAttributes;
|
|
86
93
|
var icon = /*#__PURE__*/React.createElement(CheckBoxWrapper, {
|
|
87
|
-
contentEditable: false
|
|
94
|
+
contentEditable: false,
|
|
95
|
+
isRenderer: isRenderer
|
|
88
96
|
}, /*#__PURE__*/React.createElement("input", {
|
|
89
97
|
id: this.checkBoxId,
|
|
90
98
|
"aria-labelledby": "".concat(this.checkBoxId, "-wrapper"),
|
|
@@ -93,11 +101,9 @@ export var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
93
101
|
onChange: this.handleOnChange,
|
|
94
102
|
checked: !!isDone,
|
|
95
103
|
disabled: !!disabled,
|
|
96
|
-
suppressHydrationWarning: true
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
suppressHydrationWarning: true
|
|
100
|
-
}));
|
|
104
|
+
suppressHydrationWarning: true,
|
|
105
|
+
onKeyPress: this.handleOnKeyPress
|
|
106
|
+
}), /*#__PURE__*/React.createElement("div", null));
|
|
101
107
|
return /*#__PURE__*/React.createElement(Item, {
|
|
102
108
|
appearance: appearance,
|
|
103
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);
|
package/dist/esm/styled/Item.js
CHANGED
|
@@ -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));
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
|
|
3
|
-
var _templateObject;
|
|
3
|
+
var _templateObject, _templateObject2;
|
|
4
4
|
|
|
5
|
-
import styled from 'styled-components'; // @ts-ignore: unused variable
|
|
5
|
+
import styled, { css } from 'styled-components'; // @ts-ignore: unused variable
|
|
6
6
|
// prettier-ignore
|
|
7
7
|
|
|
8
8
|
import { themed } from '@atlaskit/theme/components';
|
|
9
9
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
10
|
-
import { N0, DN100, DN200, N30, N90, B75 } from '@atlaskit/theme/colors';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
import { N0, DN100, DN200, N30, N90, B75, B300 } from '@atlaskit/theme/colors';
|
|
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
|
|
17
|
-
}),
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
light: token('color.border', N90),
|
|
17
|
+
dark: token('color.border', DN200)
|
|
18
|
+
}), function (props) {
|
|
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)
|
|
22
|
+
})) : '';
|
|
23
|
+
}, themed({
|
|
24
|
+
light: token('color.background.input', N30),
|
|
25
|
+
dark: token('color.background.input', B75)
|
|
20
26
|
}));
|
package/dist/esm/version.json
CHANGED
|
@@ -5,6 +5,7 @@ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
|
5
5
|
export interface Props {
|
|
6
6
|
taskId: string;
|
|
7
7
|
isDone?: boolean;
|
|
8
|
+
isRenderer?: boolean;
|
|
8
9
|
onChange?: (taskId: string, isChecked: boolean) => void;
|
|
9
10
|
contentRef?: ContentRef;
|
|
10
11
|
children?: any;
|
|
@@ -22,7 +23,8 @@ export declare class TaskItem extends PureComponent<Props & WithAnalyticsEventsP
|
|
|
22
23
|
constructor(props: Props & WithAnalyticsEventsProps);
|
|
23
24
|
UNSAFE_componentWillReceiveProps(nextProps: Props): void;
|
|
24
25
|
handleOnChange: (_evt: React.SyntheticEvent<HTMLInputElement>) => void;
|
|
26
|
+
handleOnKeyPress: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
25
27
|
render(): JSX.Element;
|
|
26
28
|
}
|
|
27
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Props & WithAnalyticsEventsProps, "placeholder" | "children" | "onChange" | "showPlaceholder" | "appearance" | "contentRef" | "dataAttributes" | "taskId" | "isDone" | "disabled">, never> & Partial<Pick<Pick<Props & WithAnalyticsEventsProps, "placeholder" | "children" | "onChange" | "showPlaceholder" | "appearance" | "contentRef" | "dataAttributes" | "taskId" | "isDone" | "disabled">, "placeholder" | "children" | "onChange" | "showPlaceholder" | "appearance" | "contentRef" | "dataAttributes" | "taskId" | "isDone" | "disabled">> & Partial<Pick<Partial<Props>, never>> & React.RefAttributes<any>>;
|
|
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>>;
|
|
28
30
|
export default _default;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import { HTMLAttributes,
|
|
2
|
-
export declare const CheckBoxWrapper:
|
|
1
|
+
import { HTMLAttributes, ClassAttributes } from 'react';
|
|
2
|
+
export declare const CheckBoxWrapper: import("styled-components").StyledComponentClass<ClassAttributes<HTMLSpanElement> & HTMLAttributes<HTMLSpanElement> & {
|
|
3
|
+
isRenderer: boolean | undefined;
|
|
4
|
+
}, any, ClassAttributes<HTMLSpanElement> & HTMLAttributes<HTMLSpanElement> & {
|
|
5
|
+
isRenderer: boolean | undefined;
|
|
6
|
+
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/task-decision",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.4.0",
|
|
4
4
|
"description": "Tasks and decisions react components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -26,10 +26,11 @@
|
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@atlaskit/analytics-namespaced-context": "^6.
|
|
29
|
+
"@atlaskit/analytics-namespaced-context": "^6.4.0",
|
|
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"
|
|
@@ -41,12 +42,12 @@
|
|
|
41
42
|
"url-search-params": "^0.10.0"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
|
-
"@atlaskit/analytics-listeners": "^8.
|
|
45
|
+
"@atlaskit/analytics-listeners": "^8.2.0",
|
|
45
46
|
"@atlaskit/avatar": "^20.5.0",
|
|
46
47
|
"@atlaskit/docs": "*",
|
|
47
|
-
"@atlaskit/editor-common": "^
|
|
48
|
+
"@atlaskit/editor-common": "^66.0.0",
|
|
48
49
|
"@atlaskit/elements-test-helpers": "^0.7.0",
|
|
49
|
-
"@atlaskit/renderer": "^
|
|
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.
|
|
61
|
+
"typescript": "3.9.10",
|
|
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"
|