@atlaskit/task-decision 17.10.1 → 17.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/afm-jira/tsconfig.json +39 -0
- package/afm-post-office/tsconfig.json +39 -0
- package/dist/cjs/components/DecisionItem.js +11 -2
- package/dist/cjs/components/DecisionList.js +20 -14
- package/dist/cjs/components/Item.js +22 -11
- package/dist/cjs/components/TaskItem.js +9 -2
- package/dist/cjs/components/TaskList.js +24 -18
- package/dist/cjs/components/styles.js +53 -0
- package/dist/es2019/components/DecisionItem.js +10 -2
- package/dist/es2019/components/DecisionList.js +22 -15
- package/dist/es2019/components/Item.js +22 -11
- package/dist/es2019/components/TaskItem.js +8 -2
- package/dist/es2019/components/TaskList.js +26 -19
- package/dist/es2019/components/styles.js +52 -0
- package/dist/esm/components/DecisionItem.js +10 -2
- package/dist/esm/components/DecisionList.js +21 -14
- package/dist/esm/components/Item.js +22 -11
- package/dist/esm/components/TaskItem.js +8 -2
- package/dist/esm/components/TaskList.js +25 -18
- package/dist/esm/components/styles.js +52 -0
- package/dist/types/components/DecisionItem.d.ts +4 -1
- package/dist/types/components/DecisionList.d.ts +4 -1
- package/dist/types/components/Item.d.ts +4 -1
- package/dist/types/components/TaskItem.d.ts +4 -1
- package/dist/types-ts4.5/components/DecisionItem.d.ts +4 -1
- package/dist/types-ts4.5/components/DecisionList.d.ts +4 -1
- package/dist/types-ts4.5/components/Item.d.ts +4 -1
- package/dist/types-ts4.5/components/TaskItem.d.ts +4 -1
- package/package.json +86 -86
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../../tsconfig.entry-points.jira.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"target": "es5",
|
|
6
|
+
"outDir": "../../../../../tsDist/@atlaskit__task-decision/app",
|
|
7
|
+
"composite": true,
|
|
8
|
+
"rootDir": "../"
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"../src/**/*.ts",
|
|
12
|
+
"../src/**/*.tsx"
|
|
13
|
+
],
|
|
14
|
+
"exclude": [
|
|
15
|
+
"../src/**/__tests__/*",
|
|
16
|
+
"../src/**/*.test.*",
|
|
17
|
+
"../src/**/test.*"
|
|
18
|
+
],
|
|
19
|
+
"references": [
|
|
20
|
+
{
|
|
21
|
+
"path": "../../../analytics/analytics-namespaced-context/afm-jira/tsconfig.json"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"path": "../../../analytics/analytics-next/afm-jira/tsconfig.json"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "../../../design-system/icon/afm-jira/tsconfig.json"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"path": "../../../design-system/theme/afm-jira/tsconfig.json"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "../../../design-system/tokens/afm-jira/tsconfig.json"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "../../util-service-support/afm-jira/tsconfig.json"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../../tsconfig.entry-points.post-office.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"target": "es5",
|
|
6
|
+
"outDir": "../../../../../tsDist/@atlaskit__task-decision/app",
|
|
7
|
+
"composite": true,
|
|
8
|
+
"rootDir": "../"
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"../src/**/*.ts",
|
|
12
|
+
"../src/**/*.tsx"
|
|
13
|
+
],
|
|
14
|
+
"exclude": [
|
|
15
|
+
"../src/**/__tests__/*",
|
|
16
|
+
"../src/**/*.test.*",
|
|
17
|
+
"../src/**/test.*"
|
|
18
|
+
],
|
|
19
|
+
"references": [
|
|
20
|
+
{
|
|
21
|
+
"path": "../../../analytics/analytics-namespaced-context/afm-post-office/tsconfig.json"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"path": "../../../analytics/analytics-next/afm-post-office/tsconfig.json"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "../../../design-system/icon/afm-post-office/tsconfig.json"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"path": "../../../design-system/theme/afm-post-office/tsconfig.json"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "../../../design-system/tokens/afm-post-office/tsconfig.json"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "../../util-service-support/afm-post-office/tsconfig.json"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
@@ -9,7 +9,12 @@ var _react = require("@emotion/react");
|
|
|
9
9
|
var _decision = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/decision"));
|
|
10
10
|
var _Item = _interopRequireDefault(require("./Item"));
|
|
11
11
|
var _colors = require("@atlaskit/theme/colors");
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* @jsxRuntime classic
|
|
14
|
+
* @jsx jsx
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
18
|
|
|
14
19
|
var iconStyles = function iconStyles(showPlaceholder) {
|
|
15
20
|
return (0, _react.css)({
|
|
@@ -17,7 +22,9 @@ var iconStyles = function iconStyles(showPlaceholder) {
|
|
|
17
22
|
height: '16px',
|
|
18
23
|
width: '16px',
|
|
19
24
|
margin: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-150, 12px)", " 0 0"),
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
20
26
|
color: showPlaceholder ? "var(--ds-icon-subtle, ".concat(_colors.N100, ")") : "var(--ds-icon-success, ".concat(_colors.G400, ")"),
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
21
28
|
'> span': {
|
|
22
29
|
margin: "var(--ds-space-negative-100, -8px)"
|
|
23
30
|
}
|
|
@@ -30,7 +37,9 @@ var DecisionItem = function DecisionItem(_ref) {
|
|
|
30
37
|
placeholder = _ref.placeholder,
|
|
31
38
|
showPlaceholder = _ref.showPlaceholder,
|
|
32
39
|
dataAttributes = _ref.dataAttributes;
|
|
33
|
-
var icon =
|
|
40
|
+
var icon =
|
|
41
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
42
|
+
(0, _react.jsx)("span", {
|
|
34
43
|
contentEditable: false,
|
|
35
44
|
css: iconStyles(showPlaceholder)
|
|
36
45
|
}, (0, _react.jsx)(_decision.default, {
|
|
@@ -17,7 +17,10 @@ var _styles = require("./styles");
|
|
|
17
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
18
18
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
19
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
20
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
20
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
21
|
+
* @jsxRuntime classic
|
|
22
|
+
* @jsx jsx
|
|
23
|
+
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
21
24
|
var DecisionList = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
22
25
|
(0, _inherits2.default)(DecisionList, _PureComponent);
|
|
23
26
|
var _super = _createSuper(DecisionList);
|
|
@@ -39,19 +42,22 @@ var DecisionList = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
|
39
42
|
// and action items, which all share the common `<li>` element.
|
|
40
43
|
// The value of `data-decision-local-id` should be discarded upon paste, with a
|
|
41
44
|
// a new uuid generated by the editor for the cloned content.
|
|
42
|
-
return (
|
|
43
|
-
css
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
return (
|
|
46
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
47
|
+
(0, _react2.jsx)("ol", {
|
|
48
|
+
css: _styles.listStyles,
|
|
49
|
+
"data-decision-list-local-id": "",
|
|
50
|
+
"data-node-type": "decisionList"
|
|
51
|
+
}, _react.default.Children.map(children, function (child, idx) {
|
|
52
|
+
var _ref = child.props,
|
|
53
|
+
localId = _ref.localId;
|
|
54
|
+
return (0, _react2.jsx)("li", {
|
|
55
|
+
key: idx,
|
|
56
|
+
"data-decision-local-id": localId || '',
|
|
57
|
+
"data-decision-state": "DECIDED"
|
|
58
|
+
}, child);
|
|
59
|
+
}))
|
|
60
|
+
);
|
|
55
61
|
}
|
|
56
62
|
}]);
|
|
57
63
|
return DecisionList;
|
|
@@ -17,7 +17,11 @@ var _react2 = require("@emotion/react");
|
|
|
17
17
|
var _constants = require("@atlaskit/theme/constants");
|
|
18
18
|
var _styles = require("./styles");
|
|
19
19
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
20
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
20
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
21
|
+
* @jsxRuntime classic
|
|
22
|
+
* @jsx jsx
|
|
23
|
+
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
24
|
+
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
21
25
|
var Item = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
22
26
|
(0, _inherits2.default)(Item, _PureComponent);
|
|
23
27
|
var _super = _createSuper(Item);
|
|
@@ -42,7 +46,9 @@ var Item = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
|
42
46
|
var offset = (0, _constants.gridSize)() * (itemType === 'TASK' ? 3 : 3.5);
|
|
43
47
|
return (0, _react2.jsx)("span", {
|
|
44
48
|
"data-testid": "task-decision-item-placeholder",
|
|
45
|
-
"data-component": "placeholder"
|
|
49
|
+
"data-component": "placeholder"
|
|
50
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
51
|
+
,
|
|
46
52
|
css: (0, _styles.placeholderStyles)(offset),
|
|
47
53
|
contentEditable: false
|
|
48
54
|
}, placeholder);
|
|
@@ -58,17 +64,22 @@ var Item = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
|
58
64
|
checkBoxId = _this$props2.checkBoxId,
|
|
59
65
|
dataAttributes = _this$props2.dataAttributes;
|
|
60
66
|
if (itemType === 'TASK') {
|
|
61
|
-
return (
|
|
62
|
-
css
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
return (
|
|
68
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
69
|
+
(0, _react2.jsx)("div", {
|
|
70
|
+
css: _styles.taskStyles,
|
|
71
|
+
id: "".concat(checkBoxId, "-wrapper")
|
|
72
|
+
}, icon, this.renderPlaceholder(), (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
73
|
+
"data-component": "content",
|
|
74
|
+
css: _styles.contentStyles,
|
|
75
|
+
ref: contentRef
|
|
76
|
+
}, dataAttributes), children))
|
|
77
|
+
);
|
|
69
78
|
} else if (itemType === 'DECISION') {
|
|
70
79
|
return (0, _react2.jsx)("div", {
|
|
71
|
-
"data-testid": "elements-decision-item"
|
|
80
|
+
"data-testid": "elements-decision-item"
|
|
81
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
82
|
+
,
|
|
72
83
|
css: (0, _styles.decisionStyles)(),
|
|
73
84
|
"data-decision-wrapper": "true"
|
|
74
85
|
}, icon, this.renderPlaceholder(), (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
@@ -15,7 +15,12 @@ var _analytics = require("../analytics");
|
|
|
15
15
|
var _styles = require("./styles");
|
|
16
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* @jsxRuntime classic
|
|
20
|
+
* @jsx jsx
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
19
24
|
|
|
20
25
|
var taskCount = 0;
|
|
21
26
|
var getCheckBoxId = function getCheckBoxId(localId) {
|
|
@@ -65,7 +70,9 @@ var TaskItem = function TaskItem(props) {
|
|
|
65
70
|
};
|
|
66
71
|
}, [handleOnChange]);
|
|
67
72
|
var inputRef = (0, _react.useRef)(null);
|
|
68
|
-
var icon =
|
|
73
|
+
var icon =
|
|
74
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
75
|
+
(0, _react2.jsx)("span", {
|
|
69
76
|
css: (0, _styles.checkboxStyles)(isRenderer),
|
|
70
77
|
contentEditable: false
|
|
71
78
|
}, (0, _react2.jsx)("input", {
|
|
@@ -18,7 +18,10 @@ var _styles = require("./styles");
|
|
|
18
18
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
19
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
20
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
21
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
21
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
22
|
+
* @jsxRuntime classic
|
|
23
|
+
* @jsx jsx
|
|
24
|
+
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
22
25
|
var TaskList = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
23
26
|
(0, _inherits2.default)(TaskList, _PureComponent);
|
|
24
27
|
var _super = _createSuper(TaskList);
|
|
@@ -43,23 +46,26 @@ var TaskList = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
|
43
46
|
// and action items, which all share the common `<li>` element.
|
|
44
47
|
// The value of `data-task-local-id` should be discarded upon paste, with a
|
|
45
48
|
// a new uuid generated by the editor for the cloned content.
|
|
46
|
-
return (
|
|
47
|
-
css
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
49
|
+
return (
|
|
50
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
51
|
+
(0, _react2.jsx)("div", {
|
|
52
|
+
css: [_styles.listStyles, _styles.taskListStyles],
|
|
53
|
+
"data-task-list-local-id": ""
|
|
54
|
+
}, _react.default.Children.map(children, function (child, idx) {
|
|
55
|
+
var _ref = child.props,
|
|
56
|
+
localId = _ref.localId;
|
|
57
|
+
return (0, _react2.jsx)(_analyticsNamespacedContext.FabricElementsAnalyticsContext, {
|
|
58
|
+
data: {
|
|
59
|
+
listLocalId: listId,
|
|
60
|
+
listSize: listSize,
|
|
61
|
+
position: idx
|
|
62
|
+
}
|
|
63
|
+
}, (0, _react2.jsx)("div", {
|
|
64
|
+
key: idx,
|
|
65
|
+
"data-task-local-id": localId || ''
|
|
66
|
+
}, child));
|
|
67
|
+
}))
|
|
68
|
+
);
|
|
63
69
|
}
|
|
64
70
|
}]);
|
|
65
71
|
return TaskList;
|
|
@@ -8,27 +8,38 @@ exports.taskStyles = exports.taskListStyles = exports.placeholderStyles = export
|
|
|
8
8
|
var _react = require("@emotion/react");
|
|
9
9
|
var _colors = require("@atlaskit/theme/colors");
|
|
10
10
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
|
+
|
|
11
13
|
/*
|
|
12
14
|
Increasing specificity with double ampersand to ensure these rules take
|
|
13
15
|
priority over the global styles applied to 'ol' elements.
|
|
14
16
|
*/
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
15
18
|
var listStyles = exports.listStyles = (0, _react.css)({
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
16
20
|
'&&': {
|
|
17
21
|
listStyleType: 'none',
|
|
18
22
|
paddingLeft: 0
|
|
19
23
|
}
|
|
20
24
|
});
|
|
25
|
+
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
21
27
|
var taskListStyles = exports.taskListStyles = (0, _react.css)({
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
22
29
|
'div + div': {
|
|
23
30
|
marginTop: "var(--ds-space-050, 4px)"
|
|
24
31
|
}
|
|
25
32
|
});
|
|
33
|
+
|
|
34
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
26
35
|
var contentStyles = exports.contentStyles = (0, _react.css)({
|
|
27
36
|
margin: 0,
|
|
28
37
|
wordWrap: 'break-word',
|
|
29
38
|
minWidth: 0,
|
|
30
39
|
flex: '1 1 auto'
|
|
31
40
|
});
|
|
41
|
+
|
|
42
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
32
43
|
var taskStyles = exports.taskStyles = (0, _react.css)({
|
|
33
44
|
display: 'flex',
|
|
34
45
|
flexDirection: 'row',
|
|
@@ -44,6 +55,7 @@ var decisionStyles = exports.decisionStyles = function decisionStyles() {
|
|
|
44
55
|
borderRadius: "var(--ds-border-radius-100, 3px)",
|
|
45
56
|
backgroundColor: "var(--ds-background-neutral, ".concat(_colors.N20A, ")"),
|
|
46
57
|
position: 'relative',
|
|
58
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
47
59
|
'.decision-item': {
|
|
48
60
|
cursor: 'initial'
|
|
49
61
|
}
|
|
@@ -51,6 +63,7 @@ var decisionStyles = exports.decisionStyles = function decisionStyles() {
|
|
|
51
63
|
};
|
|
52
64
|
var placeholderStyles = exports.placeholderStyles = function placeholderStyles(offset) {
|
|
53
65
|
return (0, _react.css)({
|
|
66
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
54
67
|
margin: "0 0 0 ".concat(offset, "px"),
|
|
55
68
|
position: 'absolute',
|
|
56
69
|
color: "var(--ds-text-subtlest, ".concat(_colors.N200, ")"),
|
|
@@ -74,6 +87,7 @@ var checkboxStyles = exports.checkboxStyles = function checkboxStyles(isRenderer
|
|
|
74
87
|
height: '24px',
|
|
75
88
|
position: 'relative',
|
|
76
89
|
alignSelf: 'start',
|
|
90
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
77
91
|
"& > input[type='checkbox']": {
|
|
78
92
|
width: '16px',
|
|
79
93
|
height: '16px',
|
|
@@ -86,9 +100,11 @@ var checkboxStyles = exports.checkboxStyles = function checkboxStyles(isRenderer
|
|
|
86
100
|
top: '50%',
|
|
87
101
|
left: '50%',
|
|
88
102
|
transform: 'translate(-50%, -50%)',
|
|
103
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
89
104
|
'&[disabled]': {
|
|
90
105
|
cursor: 'default'
|
|
91
106
|
},
|
|
107
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
92
108
|
'+ span': {
|
|
93
109
|
width: '24px',
|
|
94
110
|
height: '24px',
|
|
@@ -97,6 +113,7 @@ var checkboxStyles = exports.checkboxStyles = function checkboxStyles(isRenderer
|
|
|
97
113
|
left: '50%',
|
|
98
114
|
transform: 'translate(-50%, -50%)'
|
|
99
115
|
},
|
|
116
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
100
117
|
'+ span > svg': {
|
|
101
118
|
boxSizing: 'border-box',
|
|
102
119
|
display: 'inline',
|
|
@@ -107,68 +124,104 @@ var checkboxStyles = exports.checkboxStyles = function checkboxStyles(isRenderer
|
|
|
107
124
|
maxHeight: 'unset',
|
|
108
125
|
position: 'absolute',
|
|
109
126
|
overflow: 'hidden',
|
|
127
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
110
128
|
color: _theme.default.light.boxColor.rest,
|
|
111
129
|
transition: 'color 0.2s ease-in-out, fill 0.2s ease-in-out',
|
|
130
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
112
131
|
'path:first-of-type': {
|
|
113
132
|
visibility: 'hidden'
|
|
114
133
|
},
|
|
134
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
115
135
|
'rect:first-of-type': {
|
|
136
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
116
137
|
stroke: _theme.default.light.borderColor.rest,
|
|
117
138
|
strokeWidth: 1,
|
|
118
139
|
transition: 'stroke 0.2s ease-in-out'
|
|
119
140
|
}
|
|
120
141
|
},
|
|
142
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
121
143
|
'&:hover + span > svg': {
|
|
144
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
122
145
|
color: _theme.default.light.boxColor.hovered,
|
|
146
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
123
147
|
'rect:first-of-type': {
|
|
148
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
124
149
|
stroke: _theme.default.light.borderColor.hovered
|
|
125
150
|
}
|
|
126
151
|
},
|
|
152
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
127
153
|
'&:checked:hover + span > svg': {
|
|
154
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
128
155
|
color: _theme.default.light.boxColor.hoveredAndChecked,
|
|
156
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
129
157
|
fill: _theme.default.light.tickColor.checked,
|
|
158
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
130
159
|
'rect:first-of-type': {
|
|
160
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
131
161
|
stroke: _theme.default.light.borderColor.hoveredAndChecked
|
|
132
162
|
}
|
|
133
163
|
},
|
|
134
164
|
'&:checked': {
|
|
165
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
135
166
|
'+ span > svg': {
|
|
167
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
136
168
|
'path:first-of-type': {
|
|
137
169
|
visibility: 'visible'
|
|
138
170
|
},
|
|
171
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
139
172
|
color: _theme.default.light.boxColor.checked,
|
|
173
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
140
174
|
fill: _theme.default.light.tickColor.checked,
|
|
175
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
141
176
|
'rect:first-of-type': {
|
|
177
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
142
178
|
stroke: _theme.default.light.borderColor.checked
|
|
143
179
|
}
|
|
144
180
|
}
|
|
145
181
|
},
|
|
182
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
146
183
|
'&:active + span > svg': {
|
|
184
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
147
185
|
color: _theme.default.light.boxColor.active,
|
|
186
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
148
187
|
'rect:first-of-type': {
|
|
188
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
149
189
|
stroke: _theme.default.light.borderColor.active
|
|
150
190
|
}
|
|
151
191
|
},
|
|
192
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
152
193
|
'&:checked:active + span > svg': {
|
|
194
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
153
195
|
color: _theme.default.light.boxColor.active,
|
|
196
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
154
197
|
fill: _theme.default.light.tickColor.activeAndChecked,
|
|
198
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
155
199
|
'rect:first-of-type': {
|
|
200
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
156
201
|
stroke: _theme.default.light.borderColor.active
|
|
157
202
|
}
|
|
158
203
|
},
|
|
204
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
159
205
|
'&:disabled + span > svg, &:disabled:hover + span > svg, &:disabled:focus + span > svg, &:disabled:active + span > svg': {
|
|
206
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
160
207
|
color: _theme.default.light.boxColor.disabled,
|
|
208
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
161
209
|
'rect:first-of-type': {
|
|
210
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
162
211
|
stroke: _theme.default.light.borderColor.disabled
|
|
163
212
|
}
|
|
164
213
|
},
|
|
214
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
165
215
|
'&:disabled:checked + span > svg': {
|
|
216
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
166
217
|
fill: _theme.default.light.tickColor.disabledAndChecked
|
|
167
218
|
},
|
|
219
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
168
220
|
'&:focus + span::after': {
|
|
169
221
|
position: 'absolute',
|
|
170
222
|
width: "var(--ds-space-200, 16px)",
|
|
171
223
|
height: "var(--ds-space-200, 16px)",
|
|
224
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
172
225
|
border: "2px solid ".concat(_theme.default.light.borderColor.focused),
|
|
173
226
|
borderRadius: "var(--ds-space-050, 4px)",
|
|
174
227
|
content: "''",
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
2
5
|
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
7
|
import { css, jsx } from '@emotion/react';
|
|
4
8
|
import DecisionIcon from '@atlaskit/icon/glyph/editor/decision';
|
|
5
9
|
import Item from './Item';
|
|
@@ -10,7 +14,9 @@ const iconStyles = showPlaceholder => {
|
|
|
10
14
|
height: '16px',
|
|
11
15
|
width: '16px',
|
|
12
16
|
margin: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-150, 12px)"} 0 0`,
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
13
18
|
color: showPlaceholder ? `var(--ds-icon-subtle, ${N100})` : `var(--ds-icon-success, ${G400})`,
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
14
20
|
'> span': {
|
|
15
21
|
margin: "var(--ds-space-negative-100, -8px)"
|
|
16
22
|
}
|
|
@@ -24,7 +30,9 @@ const DecisionItem = ({
|
|
|
24
30
|
showPlaceholder,
|
|
25
31
|
dataAttributes
|
|
26
32
|
}) => {
|
|
27
|
-
const icon =
|
|
33
|
+
const icon =
|
|
34
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
35
|
+
jsx("span", {
|
|
28
36
|
contentEditable: false,
|
|
29
37
|
css: iconStyles(showPlaceholder)
|
|
30
38
|
}, jsx(DecisionIcon, {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
2
5
|
|
|
3
6
|
import React from 'react';
|
|
4
7
|
import { PureComponent } from 'react';
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
9
|
import { jsx } from '@emotion/react';
|
|
6
10
|
import { listStyles } from './styles';
|
|
7
11
|
export default class DecisionList extends PureComponent {
|
|
@@ -19,19 +23,22 @@ export default class DecisionList extends PureComponent {
|
|
|
19
23
|
// and action items, which all share the common `<li>` element.
|
|
20
24
|
// The value of `data-decision-local-id` should be discarded upon paste, with a
|
|
21
25
|
// a new uuid generated by the editor for the cloned content.
|
|
22
|
-
return
|
|
23
|
-
css
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
return (
|
|
27
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
28
|
+
jsx("ol", {
|
|
29
|
+
css: listStyles,
|
|
30
|
+
"data-decision-list-local-id": "",
|
|
31
|
+
"data-node-type": "decisionList"
|
|
32
|
+
}, React.Children.map(children, (child, idx) => {
|
|
33
|
+
const {
|
|
34
|
+
localId
|
|
35
|
+
} = child.props;
|
|
36
|
+
return jsx("li", {
|
|
37
|
+
key: idx,
|
|
38
|
+
"data-decision-local-id": localId || '',
|
|
39
|
+
"data-decision-state": "DECIDED"
|
|
40
|
+
}, child);
|
|
41
|
+
}))
|
|
42
|
+
);
|
|
36
43
|
}
|
|
37
44
|
}
|