@atlaskit/task-decision 17.6.1 → 17.6.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/constants/package.json +2 -2
  3. package/dist/cjs/components/DecisionItem.js +1 -2
  4. package/dist/cjs/components/Item.js +7 -4
  5. package/dist/cjs/components/TaskItem.js +1 -2
  6. package/dist/cjs/version.json +1 -1
  7. package/dist/es2019/components/DecisionItem.js +1 -2
  8. package/dist/es2019/components/Item.js +7 -3
  9. package/dist/es2019/components/TaskItem.js +1 -2
  10. package/dist/es2019/version.json +1 -1
  11. package/dist/esm/components/DecisionItem.js +1 -2
  12. package/dist/esm/components/Item.js +7 -3
  13. package/dist/esm/components/TaskItem.js +1 -2
  14. package/dist/esm/version.json +1 -1
  15. package/dist/types/types.d.ts +14 -14
  16. package/dist/{types-ts4.0 → types-ts4.5}/types.d.ts +14 -14
  17. package/package.json +13 -5
  18. package/type-helpers/package.json +2 -2
  19. package/types/package.json +2 -2
  20. /package/dist/{types-ts4.0 → types-ts4.5}/analytics/index.d.ts +0 -0
  21. /package/dist/{types-ts4.0 → types-ts4.5}/api/TaskDecisionResource.d.ts +0 -0
  22. /package/dist/{types-ts4.0 → types-ts4.5}/api/TaskDecisionUtils.d.ts +0 -0
  23. /package/dist/{types-ts4.0 → types-ts4.5}/components/DecisionItem.d.ts +0 -0
  24. /package/dist/{types-ts4.0 → types-ts4.5}/components/DecisionList.d.ts +0 -0
  25. /package/dist/{types-ts4.0 → types-ts4.5}/components/Item.d.ts +0 -0
  26. /package/dist/{types-ts4.0 → types-ts4.5}/components/ResourcedTaskItem.d.ts +0 -0
  27. /package/dist/{types-ts4.0 → types-ts4.5}/components/TaskItem.d.ts +0 -0
  28. /package/dist/{types-ts4.0 → types-ts4.5}/components/TaskList.d.ts +0 -0
  29. /package/dist/{types-ts4.0 → types-ts4.5}/components/listStyle.d.ts +0 -0
  30. /package/dist/{types-ts4.0 → types-ts4.5}/constants.d.ts +0 -0
  31. /package/dist/{types-ts4.0 → types-ts4.5}/index.d.ts +0 -0
  32. /package/dist/{types-ts4.0 → types-ts4.5}/type-helpers.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/task-decision
2
2
 
3
+ ## 17.6.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`9369cc38a68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9369cc38a68) - Migrated use of `gridSize` to space tokens where possible. There is no expected visual or behaviour change.
8
+
9
+ ## 17.6.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
14
+
3
15
  ## 17.6.1
4
16
 
5
17
  ### Patch Changes
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/constants.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/constants.d.ts"
11
+ "../dist/types-ts4.5/constants.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -10,7 +10,6 @@ var _decision = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/deci
10
10
  var _Item = _interopRequireDefault(require("./Item"));
11
11
  var _colors = require("@atlaskit/theme/colors");
12
12
  var _components = require("@atlaskit/theme/components");
13
- var _constants = require("@atlaskit/theme/constants");
14
13
  /** @jsx jsx */
15
14
 
16
15
  var iconStyles = function iconStyles(showPlaceholder) {
@@ -19,7 +18,7 @@ var iconStyles = function iconStyles(showPlaceholder) {
19
18
  flex: '0 0 16px',
20
19
  height: '16px',
21
20
  width: '16px',
22
- margin: "4px ".concat((0, _constants.gridSize)() * 1.5, "px 0 0"),
21
+ margin: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-150, 12px)", " 0 0"),
23
22
  color: showPlaceholder ? "var(--ds-icon-subtle, ".concat(_colors.N100, ")") : (0, _components.themed)({
24
23
  light: "var(--ds-icon-success, ".concat(_colors.G400, ")"),
25
24
  dark: "var(--ds-icon-success, ".concat(_colors.G200, ")")
@@ -18,7 +18,7 @@ var _components = require("@atlaskit/theme/components");
18
18
  var _colors = require("@atlaskit/theme/colors");
19
19
  var _constants = require("@atlaskit/theme/constants");
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() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
21
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
22
22
  var contentStyle = (0, _react2.css)({
23
23
  margin: 0,
24
24
  wordWrap: 'break-word',
@@ -35,9 +35,9 @@ var decisionStyles = function decisionStyles(theme) {
35
35
  return (0, _react2.css)({
36
36
  display: 'flex',
37
37
  flexDirection: 'row',
38
- margin: "".concat((0, _constants.gridSize)(), "px 0 0 0"),
39
- padding: "".concat((0, _constants.gridSize)(), "px"),
40
- paddingLeft: "".concat((0, _constants.gridSize)() * 1.5, "px"),
38
+ margin: "var(--ds-space-100, 8px)".concat(" 0 0 0"),
39
+ padding: "var(--ds-space-100, 8px)",
40
+ paddingLeft: "var(--ds-space-150, 12px)",
41
41
  borderRadius: "".concat((0, _constants.borderRadius)(), "px"),
42
42
  backgroundColor: (0, _components.themed)({
43
43
  light: "var(--ds-background-neutral, ".concat(_colors.N20A, ")"),
@@ -81,6 +81,9 @@ var Item = /*#__PURE__*/function (_PureComponent) {
81
81
  if (!showPlaceholder || !placeholder || children) {
82
82
  return null;
83
83
  }
84
+
85
+ // TODO: Migrate away from gridSize
86
+ // Recommendation: Replace gridSize with 8
84
87
  var offset = (0, _constants.gridSize)() * (itemType === 'TASK' ? 3 : 3.5);
85
88
  return (0, _react2.jsx)("span", {
86
89
  "data-component": "placeholder",
@@ -12,7 +12,6 @@ var _react2 = require("@emotion/react");
12
12
  var _Item = _interopRequireDefault(require("./Item"));
13
13
  var _analyticsNext = require("@atlaskit/analytics-next");
14
14
  var _analytics = require("../analytics");
15
- var _constants = require("@atlaskit/theme/constants");
16
15
  var _components = require("@atlaskit/theme/components");
17
16
  var _colors = require("@atlaskit/theme/colors");
18
17
  var _templateObject, _templateObject2;
@@ -25,7 +24,7 @@ var getCheckBoxId = function getCheckBoxId(localId) {
25
24
  };
26
25
  var checkboxStyles = function checkboxStyles(isRenderer) {
27
26
  return function (theme) {
28
- return (0, _react2.css)(_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: inline;\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 ", "\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)({
27
+ return (0, _react2.css)(_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: ", " ", " 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: inline;\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 ", "\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 "])), "var(--ds-space-050, 4px)", "var(--ds-space-100, 8px)", (0, _components.themed)({
29
28
  light: "var(--ds-background-input, ".concat(_colors.N0, ")"),
30
29
  dark: "var(--ds-background-input, ".concat(_colors.DN100, ")")
31
30
  })({
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/task-decision",
3
- "version": "17.6.1",
3
+ "version": "17.6.3",
4
4
  "sideEffects": false
5
5
  }
@@ -5,13 +5,12 @@ import DecisionIcon from '@atlaskit/icon/glyph/editor/decision';
5
5
  import Item from './Item';
6
6
  import { G200, G400, N100 } from '@atlaskit/theme/colors';
7
7
  import { themed, useGlobalTheme } from '@atlaskit/theme/components';
8
- import { gridSize } from '@atlaskit/theme/constants';
9
8
  const iconStyles = showPlaceholder => theme => {
10
9
  return css({
11
10
  flex: '0 0 16px',
12
11
  height: '16px',
13
12
  width: '16px',
14
- margin: `4px ${gridSize() * 1.5}px 0 0`,
13
+ margin: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-150, 12px)"} 0 0`,
15
14
  color: showPlaceholder ? `var(--ds-icon-subtle, ${N100})` : themed({
16
15
  light: `var(--ds-icon-success, ${G400})`,
17
16
  dark: `var(--ds-icon-success, ${G200})`
@@ -6,6 +6,7 @@ import { PureComponent } from 'react';
6
6
  import { css, jsx } from '@emotion/react';
7
7
  import { themed } from '@atlaskit/theme/components';
8
8
  import { DN50, N200, N20A } from '@atlaskit/theme/colors';
9
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
9
10
  import { borderRadius, gridSize } from '@atlaskit/theme/constants';
10
11
  const contentStyle = css({
11
12
  margin: 0,
@@ -22,9 +23,9 @@ const taskStyles = css({
22
23
  const decisionStyles = theme => css({
23
24
  display: 'flex',
24
25
  flexDirection: 'row',
25
- margin: `${gridSize()}px 0 0 0`,
26
- padding: `${gridSize()}px`,
27
- paddingLeft: `${gridSize() * 1.5}px`,
26
+ margin: `${"var(--ds-space-100, 8px)"} 0 0 0`,
27
+ padding: "var(--ds-space-100, 8px)",
28
+ paddingLeft: `${"var(--ds-space-150, 12px)"}`,
28
29
  borderRadius: `${borderRadius()}px`,
29
30
  backgroundColor: themed({
30
31
  light: `var(--ds-background-neutral, ${N20A})`,
@@ -58,6 +59,9 @@ export default class Item extends PureComponent {
58
59
  if (!showPlaceholder || !placeholder || children) {
59
60
  return null;
60
61
  }
62
+
63
+ // TODO: Migrate away from gridSize
64
+ // Recommendation: Replace gridSize with 8
61
65
  const offset = gridSize() * (itemType === 'TASK' ? 3 : 3.5);
62
66
  return jsx("span", {
63
67
  "data-component": "placeholder",
@@ -4,7 +4,6 @@ import { css, jsx } from '@emotion/react';
4
4
  import Item from './Item';
5
5
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
6
6
  import { createAndFireEventInElementsChannel } from '../analytics';
7
- import { gridSize } from '@atlaskit/theme/constants';
8
7
  import { themed, useGlobalTheme } from '@atlaskit/theme/components';
9
8
  import { B300, B75, DN100, DN200, N0, N30, N90 } from '@atlaskit/theme/colors';
10
9
  let taskCount = 0;
@@ -15,7 +14,7 @@ const checkboxStyles = isRenderer => theme => css`
15
14
  height: 16px;
16
15
  position: relative;
17
16
  align-self: start;
18
- margin: 4px ${gridSize()}px 0 0;
17
+ margin: ${"var(--ds-space-050, 4px)"} ${"var(--ds-space-100, 8px)"} 0 0;
19
18
 
20
19
  & > input[type='checkbox'] {
21
20
  width: 16px;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/task-decision",
3
- "version": "17.6.1",
3
+ "version": "17.6.3",
4
4
  "sideEffects": false
5
5
  }
@@ -5,14 +5,13 @@ import DecisionIcon from '@atlaskit/icon/glyph/editor/decision';
5
5
  import Item from './Item';
6
6
  import { G200, G400, N100 } from '@atlaskit/theme/colors';
7
7
  import { themed, useGlobalTheme } from '@atlaskit/theme/components';
8
- import { gridSize } from '@atlaskit/theme/constants';
9
8
  var iconStyles = function iconStyles(showPlaceholder) {
10
9
  return function (theme) {
11
10
  return css({
12
11
  flex: '0 0 16px',
13
12
  height: '16px',
14
13
  width: '16px',
15
- margin: "4px ".concat(gridSize() * 1.5, "px 0 0"),
14
+ margin: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-150, 12px)", " 0 0"),
16
15
  color: showPlaceholder ? "var(--ds-icon-subtle, ".concat(N100, ")") : themed({
17
16
  light: "var(--ds-icon-success, ".concat(G400, ")"),
18
17
  dark: "var(--ds-icon-success, ".concat(G200, ")")
@@ -13,6 +13,7 @@ import { PureComponent } from 'react';
13
13
  import { css, jsx } from '@emotion/react';
14
14
  import { themed } from '@atlaskit/theme/components';
15
15
  import { DN50, N200, N20A } from '@atlaskit/theme/colors';
16
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
16
17
  import { borderRadius, gridSize } from '@atlaskit/theme/constants';
17
18
  var contentStyle = css({
18
19
  margin: 0,
@@ -30,9 +31,9 @@ var decisionStyles = function decisionStyles(theme) {
30
31
  return css({
31
32
  display: 'flex',
32
33
  flexDirection: 'row',
33
- margin: "".concat(gridSize(), "px 0 0 0"),
34
- padding: "".concat(gridSize(), "px"),
35
- paddingLeft: "".concat(gridSize() * 1.5, "px"),
34
+ margin: "var(--ds-space-100, 8px)".concat(" 0 0 0"),
35
+ padding: "var(--ds-space-100, 8px)",
36
+ paddingLeft: "var(--ds-space-150, 12px)",
36
37
  borderRadius: "".concat(borderRadius(), "px"),
37
38
  backgroundColor: themed({
38
39
  light: "var(--ds-background-neutral, ".concat(N20A, ")"),
@@ -76,6 +77,9 @@ var Item = /*#__PURE__*/function (_PureComponent) {
76
77
  if (!showPlaceholder || !placeholder || children) {
77
78
  return null;
78
79
  }
80
+
81
+ // TODO: Migrate away from gridSize
82
+ // Recommendation: Replace gridSize with 8
79
83
  var offset = gridSize() * (itemType === 'TASK' ? 3 : 3.5);
80
84
  return jsx("span", {
81
85
  "data-component": "placeholder",
@@ -6,7 +6,6 @@ import { css, jsx } from '@emotion/react';
6
6
  import Item from './Item';
7
7
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
8
8
  import { createAndFireEventInElementsChannel } from '../analytics';
9
- import { gridSize } from '@atlaskit/theme/constants';
10
9
  import { themed, useGlobalTheme } from '@atlaskit/theme/components';
11
10
  import { B300, B75, DN100, DN200, N0, N30, N90 } from '@atlaskit/theme/colors';
12
11
  var taskCount = 0;
@@ -15,7 +14,7 @@ var getCheckBoxId = function getCheckBoxId(localId) {
15
14
  };
16
15
  var checkboxStyles = function checkboxStyles(isRenderer) {
17
16
  return function (theme) {
18
- return css(_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: inline;\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 ", "\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({
17
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 0 0 16px;\n width: 16px;\n height: 16px;\n position: relative;\n align-self: start;\n margin: ", " ", " 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: inline;\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 ", "\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 "])), "var(--ds-space-050, 4px)", "var(--ds-space-100, 8px)", themed({
19
18
  light: "var(--ds-background-input, ".concat(N0, ")"),
20
19
  dark: "var(--ds-background-input, ".concat(DN100, ")")
21
20
  })({
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/task-decision",
3
- "version": "17.6.1",
3
+ "version": "17.6.3",
4
4
  "sideEffects": false
5
5
  }
@@ -1,11 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  import { ServiceConfig } from '@atlaskit/util-service-support';
3
- export declare type DecisionState = 'DECIDED';
4
- export declare type DecisionStatus = 'CREATED';
5
- export declare type TaskState = 'TODO' | 'DONE';
6
- export declare type Cursor = string;
7
- export declare type DecisionType = 'DECISION';
8
- export declare type TaskType = 'TASK';
3
+ export type DecisionState = 'DECIDED';
4
+ export type DecisionStatus = 'CREATED';
5
+ export type TaskState = 'TODO' | 'DONE';
6
+ export type Cursor = string;
7
+ export type DecisionType = 'DECISION';
8
+ export type TaskType = 'TASK';
9
9
  export interface ContentRef {
10
10
  (ref: HTMLElement | null): void;
11
11
  }
@@ -38,7 +38,7 @@ export interface ServiceDecisionResponse {
38
38
  decisions: ServiceDecision[];
39
39
  meta: Meta;
40
40
  }
41
- export declare type ServiceItem = ServiceDecision | ServiceTask;
41
+ export type ServiceItem = ServiceDecision | ServiceTask;
42
42
  export interface ServiceTaskState {
43
43
  lastUpdateDate: string;
44
44
  localId: string;
@@ -54,8 +54,8 @@ export interface Decision extends BaseItem<DecisionState> {
54
54
  status: DecisionStatus;
55
55
  type: DecisionType;
56
56
  }
57
- export declare type Item = Decision | Task;
58
- export declare type UserId = string;
57
+ export type Item = Decision | Task;
58
+ export type UserId = string;
59
59
  export interface ServiceTask {
60
60
  creationDate?: string;
61
61
  creatorId?: UserId;
@@ -79,8 +79,8 @@ export interface Task extends BaseItem<TaskState> {
79
79
  position?: number;
80
80
  type: TaskType;
81
81
  }
82
- export declare type Handler = (state: TaskState | DecisionState) => void;
83
- export declare type RecentUpdatesId = string;
82
+ export type Handler = (state: TaskState | DecisionState) => void;
83
+ export type RecentUpdatesId = string;
84
84
  export interface RecentUpdateContext {
85
85
  objectAri: string;
86
86
  localId?: string;
@@ -138,12 +138,12 @@ export interface RenderDocument {
138
138
  export interface OnUpdate<T> {
139
139
  (allDecisions: T[], newDecisions: T[]): void;
140
140
  }
141
- export declare type Appearance = 'inline';
141
+ export type Appearance = 'inline';
142
142
  /**
143
143
  * Same as PubSub client types (don't want a direct dep though)
144
144
  */
145
- export declare type ARI = string;
146
- export declare type AVI = string;
145
+ export type ARI = string;
146
+ export type AVI = string;
147
147
  export interface PubSubOnEvent<T = any> {
148
148
  (event: string, data: T): void;
149
149
  }
@@ -1,11 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  import { ServiceConfig } from '@atlaskit/util-service-support';
3
- export declare type DecisionState = 'DECIDED';
4
- export declare type DecisionStatus = 'CREATED';
5
- export declare type TaskState = 'TODO' | 'DONE';
6
- export declare type Cursor = string;
7
- export declare type DecisionType = 'DECISION';
8
- export declare type TaskType = 'TASK';
3
+ export type DecisionState = 'DECIDED';
4
+ export type DecisionStatus = 'CREATED';
5
+ export type TaskState = 'TODO' | 'DONE';
6
+ export type Cursor = string;
7
+ export type DecisionType = 'DECISION';
8
+ export type TaskType = 'TASK';
9
9
  export interface ContentRef {
10
10
  (ref: HTMLElement | null): void;
11
11
  }
@@ -38,7 +38,7 @@ export interface ServiceDecisionResponse {
38
38
  decisions: ServiceDecision[];
39
39
  meta: Meta;
40
40
  }
41
- export declare type ServiceItem = ServiceDecision | ServiceTask;
41
+ export type ServiceItem = ServiceDecision | ServiceTask;
42
42
  export interface ServiceTaskState {
43
43
  lastUpdateDate: string;
44
44
  localId: string;
@@ -54,8 +54,8 @@ export interface Decision extends BaseItem<DecisionState> {
54
54
  status: DecisionStatus;
55
55
  type: DecisionType;
56
56
  }
57
- export declare type Item = Decision | Task;
58
- export declare type UserId = string;
57
+ export type Item = Decision | Task;
58
+ export type UserId = string;
59
59
  export interface ServiceTask {
60
60
  creationDate?: string;
61
61
  creatorId?: UserId;
@@ -79,8 +79,8 @@ export interface Task extends BaseItem<TaskState> {
79
79
  position?: number;
80
80
  type: TaskType;
81
81
  }
82
- export declare type Handler = (state: TaskState | DecisionState) => void;
83
- export declare type RecentUpdatesId = string;
82
+ export type Handler = (state: TaskState | DecisionState) => void;
83
+ export type RecentUpdatesId = string;
84
84
  export interface RecentUpdateContext {
85
85
  objectAri: string;
86
86
  localId?: string;
@@ -138,12 +138,12 @@ export interface RenderDocument {
138
138
  export interface OnUpdate<T> {
139
139
  (allDecisions: T[], newDecisions: T[]): void;
140
140
  }
141
- export declare type Appearance = 'inline';
141
+ export type Appearance = 'inline';
142
142
  /**
143
143
  * Same as PubSub client types (don't want a direct dep though)
144
144
  */
145
- export declare type ARI = string;
146
- export declare type AVI = string;
145
+ export type ARI = string;
146
+ export type AVI = string;
147
147
  export interface PubSubOnEvent<T = any> {
148
148
  (event: string, data: T): void;
149
149
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/task-decision",
3
- "version": "17.6.1",
3
+ "version": "17.6.3",
4
4
  "description": "Tasks and decisions react components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,6 +12,14 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
+ "typesVersions": {
16
+ ">=4.5 <4.9": {
17
+ "*": [
18
+ "dist/types-ts4.5/*",
19
+ "dist/types-ts4.5/index.d.ts"
20
+ ]
21
+ }
22
+ },
15
23
  "sideEffects": false,
16
24
  "atlaskit:src": "src/index.ts",
17
25
  "atlassian": {
@@ -30,7 +38,7 @@
30
38
  "@atlaskit/analytics-next": "^9.1.0",
31
39
  "@atlaskit/icon": "^21.12.0",
32
40
  "@atlaskit/theme": "^12.5.0",
33
- "@atlaskit/tokens": "^1.3.0",
41
+ "@atlaskit/tokens": "^1.4.0",
34
42
  "@atlaskit/util-service-support": "^6.2.0",
35
43
  "@babel/runtime": "^7.0.0",
36
44
  "@emotion/react": "^11.7.1",
@@ -45,9 +53,9 @@
45
53
  "@atlaskit/analytics-listeners": "^8.7.0",
46
54
  "@atlaskit/avatar": "^21.3.0",
47
55
  "@atlaskit/docs": "*",
48
- "@atlaskit/editor-common": "^74.0.0",
56
+ "@atlaskit/editor-common": "^74.1.0",
49
57
  "@atlaskit/elements-test-helpers": "^0.7.0",
50
- "@atlaskit/renderer": "^108.0.0",
58
+ "@atlaskit/renderer": "^108.1.0",
51
59
  "@atlaskit/util-data-test": "^17.8.0",
52
60
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
53
61
  "@emotion/jest": "^11.8.0",
@@ -58,7 +66,7 @@
58
66
  "fetch-mock": "^8.0.0",
59
67
  "react": "^16.8.0",
60
68
  "sinon": "^2.2.0",
61
- "typescript": "4.5.5",
69
+ "typescript": "~4.9.5",
62
70
  "url-search-params": "^0.10.0"
63
71
  },
64
72
  "techstack": {
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/type-helpers.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/type-helpers.d.ts"
11
+ "../dist/types-ts4.5/type-helpers.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/types.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/types.d.ts"
11
+ "../dist/types-ts4.5/types.d.ts"
12
12
  ]
13
13
  }
14
14
  }
File without changes