@atlaskit/task-decision 17.4.5 → 17.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/constants/package.json +8 -1
  3. package/dist/cjs/components/DecisionItem.js +58 -71
  4. package/dist/cjs/components/DecisionList.js +6 -3
  5. package/dist/cjs/components/Item.js +73 -20
  6. package/dist/cjs/components/TaskItem.js +89 -96
  7. package/dist/cjs/components/TaskList.js +7 -4
  8. package/dist/cjs/components/listStyle.js +21 -0
  9. package/dist/cjs/version.json +1 -1
  10. package/dist/es2019/components/DecisionItem.js +51 -34
  11. package/dist/es2019/components/DecisionList.js +6 -3
  12. package/dist/es2019/components/Item.js +70 -16
  13. package/dist/es2019/components/TaskItem.js +154 -72
  14. package/dist/es2019/components/TaskList.js +7 -4
  15. package/dist/es2019/components/listStyle.js +12 -0
  16. package/dist/es2019/version.json +1 -1
  17. package/dist/esm/components/DecisionItem.js +54 -62
  18. package/dist/esm/components/DecisionList.js +6 -3
  19. package/dist/esm/components/Item.js +72 -16
  20. package/dist/esm/components/TaskItem.js +86 -92
  21. package/dist/esm/components/TaskList.js +7 -4
  22. package/dist/esm/components/listStyle.js +12 -0
  23. package/dist/esm/version.json +1 -1
  24. package/dist/types/components/DecisionItem.d.ts +4 -5
  25. package/dist/types/components/DecisionList.d.ts +3 -1
  26. package/dist/types/components/Item.d.ts +6 -2
  27. package/dist/types/components/TaskItem.d.ts +2 -11
  28. package/dist/types/components/TaskList.d.ts +2 -1
  29. package/dist/types/components/listStyle.d.ts +2 -0
  30. package/dist/types-ts4.0/analytics/index.d.ts +2 -0
  31. package/dist/types-ts4.0/api/TaskDecisionResource.d.ts +67 -0
  32. package/dist/types-ts4.0/api/TaskDecisionUtils.d.ts +4 -0
  33. package/dist/types-ts4.0/components/DecisionItem.d.ts +15 -0
  34. package/dist/types-ts4.0/components/DecisionList.d.ts +9 -0
  35. package/dist/types-ts4.0/components/Item.d.ts +25 -0
  36. package/dist/types-ts4.0/components/ResourcedTaskItem.d.ts +35 -0
  37. package/dist/types-ts4.0/components/TaskItem.d.ts +21 -0
  38. package/dist/types-ts4.0/components/TaskList.d.ts +9 -0
  39. package/dist/types-ts4.0/components/listStyle.d.ts +2 -0
  40. package/dist/types-ts4.0/constants.d.ts +1 -0
  41. package/dist/types-ts4.0/index.d.ts +9 -0
  42. package/dist/types-ts4.0/type-helpers.d.ts +6 -0
  43. package/dist/types-ts4.0/types.d.ts +160 -0
  44. package/package.json +14 -5
  45. package/type-helpers/package.json +8 -1
  46. package/types/package.json +8 -1
  47. package/dist/cjs/styled/DecisionItem.js +0 -31
  48. package/dist/cjs/styled/Item.js +0 -41
  49. package/dist/cjs/styled/ListWrapper.js +0 -24
  50. package/dist/cjs/styled/Placeholder.js +0 -24
  51. package/dist/cjs/styled/TaskItem.js +0 -46
  52. package/dist/es2019/styled/DecisionItem.js +0 -21
  53. package/dist/es2019/styled/Item.js +0 -39
  54. package/dist/es2019/styled/ListWrapper.js +0 -20
  55. package/dist/es2019/styled/Placeholder.js +0 -15
  56. package/dist/es2019/styled/TaskItem.js +0 -94
  57. package/dist/esm/styled/DecisionItem.js +0 -17
  58. package/dist/esm/styled/Item.js +0 -18
  59. package/dist/esm/styled/ListWrapper.js +0 -11
  60. package/dist/esm/styled/Placeholder.js +0 -12
  61. package/dist/esm/styled/TaskItem.js +0 -26
  62. package/dist/types/styled/DecisionItem.d.ts +0 -5
  63. package/dist/types/styled/Item.d.ts +0 -7
  64. package/dist/types/styled/ListWrapper.d.ts +0 -4
  65. package/dist/types/styled/Placeholder.d.ts +0 -5
  66. package/dist/types/styled/TaskItem.d.ts +0 -6
@@ -1,94 +0,0 @@
1
- import styled, { css } from 'styled-components'; // @ts-ignore: unused variable
2
- // prettier-ignore
3
-
4
- import { themed } from '@atlaskit/theme/components';
5
- import { gridSize } from '@atlaskit/theme/constants';
6
- import { N0, DN100, DN200, N30, N90, B75, B300 } from '@atlaskit/theme/colors';
7
- import { token } from '@atlaskit/tokens';
8
- export const CheckBoxWrapper = styled.span`
9
- flex: 0 0 16px;
10
- width: 16px;
11
- height: 16px;
12
- position: relative;
13
- align-self: start;
14
- margin: 4px ${gridSize()}px 0 0;
15
-
16
- & > input[type='checkbox'] {
17
- width: 16px;
18
- height: 16px;
19
- z-index: 1;
20
- cursor: pointer;
21
- position: absolute;
22
- outline: none;
23
- margin: 0;
24
- opacity: 0;
25
- left: 0;
26
- top: 50%;
27
- transform: translateY(-50%);
28
-
29
- + div {
30
- box-sizing: border-box;
31
- display: inline;
32
- width: 100%;
33
- cursor: pointer;
34
-
35
- &::after {
36
- background: ${themed({
37
- light: token('color.background.input', N0),
38
- dark: token('color.background.input', DN100)
39
- })};
40
- background-size: 16px;
41
- border-radius: 3px;
42
- border-style: solid;
43
- border-width: 1px;
44
- border-color: ${themed({
45
- light: token('color.border', N90),
46
- dark: token('color.border', DN200)
47
- })};
48
- box-sizing: border-box;
49
- content: '';
50
- height: 16px;
51
- left: 50%;
52
- position: absolute;
53
- transition: border-color 0.2s ease-in-out;
54
- top: 8px;
55
- width: 16px;
56
- transform: translate(-50%, -50%);
57
- }
58
- }
59
- &:focus-visible + div:after {
60
- ${props => props.isRenderer ? css`
61
- outline: 2px solid
62
- ${themed({
63
- light: token('color.border.focused', B300),
64
- dark: token('color.border.focused', B75)
65
- })};
66
- ` : ''}
67
- }
68
- &:not([disabled]):hover + div::after {
69
- background: ${themed({
70
- light: token('color.background.input', N30),
71
- dark: token('color.background.input', B75)
72
- })};
73
- transition: border 0.2s ease-in-out;
74
- }
75
- &[disabled] + div {
76
- opacity: 0.5;
77
- cursor: default;
78
- }
79
- &:checked {
80
- + div::after {
81
- background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDA1MkNDIj48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)
82
- no-repeat 0 0;
83
- background-size: 16px;
84
- border: 0;
85
- border-color: transparent;
86
- }
87
- &:not([disabled]):hover + div::after {
88
- background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDc0N0E2Ij48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)
89
- no-repeat 0 0;
90
- background-size: 16px;
91
- }
92
- }
93
- }
94
- `;
@@ -1,17 +0,0 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
- var _templateObject;
4
-
5
- import styled from 'styled-components'; // @ts-ignore: unused variable
6
- // prettier-ignore
7
-
8
- import { themed } from '@atlaskit/theme/components';
9
- import { gridSize } from '@atlaskit/theme/constants';
10
- import { N100, G400, G200 } from '@atlaskit/theme/colors';
11
- import { token } from '@atlaskit/tokens';
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) {
13
- return props.showPlaceholder ? token('color.icon.subtle', N100) : themed({
14
- light: token('color.icon.success', G400),
15
- dark: token('color.icon.success', G200)
16
- });
17
- }, gridSize() * 1.5);
@@ -1,18 +0,0 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
- var _templateObject, _templateObject2, _templateObject3, _templateObject4;
4
-
5
- import styled from 'styled-components'; // @ts-ignore: unused variable
6
- // prettier-ignore
7
-
8
- import { themed } from '@atlaskit/theme/components';
9
- import { borderRadius, gridSize } from '@atlaskit/theme/constants';
10
- import { N20A, DN50 } from '@atlaskit/theme/colors';
11
- import { token } from '@atlaskit/tokens';
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"])));
13
- export var TaskWrapper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n padding: 6px 3px;\n position: relative;\n"])));
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({
15
- light: token('color.background.neutral', N20A),
16
- dark: token('color.background.neutral', DN50)
17
- }));
18
- export var ParticipantWrapper = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin: -2px 8px;\n"])));
@@ -1,11 +0,0 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
- var _templateObject, _templateObject2;
4
-
5
- import styled from 'styled-components'; // @ts-ignore: unused variable
6
- // prettier-ignore
7
-
8
- var WrapperStyles = "\n /*\n Increasing specificity with double ampersand to ensure these rules take\n priority over the global styles applied to 'ol' elements.\n */\n && {\n list-style-type: none;\n padding-left: 0;\n }\n";
9
- var TaskListWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n"])), WrapperStyles);
10
- var DecisionListWrapper = styled.ol(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n"])), WrapperStyles);
11
- export { TaskListWrapper, DecisionListWrapper };
@@ -1,12 +0,0 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
- var _templateObject;
4
-
5
- import styled from 'styled-components'; // @ts-ignore: unused variable
6
- // prettier-ignore
7
-
8
- import { N100 } from '@atlaskit/theme/colors';
9
- import { token } from '@atlaskit/tokens';
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) {
11
- return "0 0 0 ".concat(props.offset, "px;");
12
- }, token('color.text.subtlest', N100));
@@ -1,26 +0,0 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
- var _templateObject, _templateObject2;
4
-
5
- import styled, { css } from 'styled-components'; // @ts-ignore: unused variable
6
- // prettier-ignore
7
-
8
- import { themed } from '@atlaskit/theme/components';
9
- import { gridSize } from '@atlaskit/theme/constants';
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: 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 &: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)
15
- }), themed({
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)
26
- }));
@@ -1,5 +0,0 @@
1
- import { HTMLAttributes, ComponentClass } from 'react';
2
- export interface EditorIconWrapperProps {
3
- showPlaceholder?: boolean;
4
- }
5
- export declare const EditorIconWrapper: ComponentClass<HTMLAttributes<{}> & EditorIconWrapperProps>;
@@ -1,7 +0,0 @@
1
- import { HTMLAttributes, ComponentClass } from 'react';
2
- export declare const ContentWrapper: ComponentClass<HTMLAttributes<{}> & {
3
- innerRef?: any;
4
- }>;
5
- export declare const TaskWrapper: ComponentClass<HTMLAttributes<{}>>;
6
- export declare const DecisionWrapper: ComponentClass<HTMLAttributes<{}>>;
7
- export declare const ParticipantWrapper: ComponentClass<HTMLAttributes<{}>>;
@@ -1,4 +0,0 @@
1
- import { HTMLAttributes, ComponentClass } from 'react';
2
- declare const TaskListWrapper: ComponentClass<HTMLAttributes<HTMLDivElement>>;
3
- declare const DecisionListWrapper: ComponentClass<HTMLAttributes<HTMLOListElement>>;
4
- export { TaskListWrapper, DecisionListWrapper };
@@ -1,5 +0,0 @@
1
- import { HTMLAttributes, ComponentClass } from 'react';
2
- export declare type PlaceholderProps = {
3
- offset: number;
4
- };
5
- export declare const Placeholder: ComponentClass<HTMLAttributes<{}> & PlaceholderProps>;
@@ -1,6 +0,0 @@
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
- }>;