@atlaskit/editor-plugin-tasks-and-decisions 10.0.2 → 10.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @atlaskit/editor-plugin-tasks-and-decisions
2
2
 
3
+ ## 10.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`7c8501566cbe0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7c8501566cbe0) -
8
+ improve task item styles by using 1 inline svg instead of 2
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
3
14
  ## 10.0.2
4
15
 
5
16
  ### Patch Changes
@@ -91,23 +91,27 @@ function taskItemToDom(node, placeholder, intl) {
91
91
  'data-empty': 'true'
92
92
  } : {};
93
93
  }
94
- return ['div', _objectSpread(_objectSpread({
95
- class: "".concat(_styles.TaskDecisionSharedCssClassName.TASK_CONTAINER)
96
- }, dataAttrs), {}, {
97
- state: node.attrs.state
98
- }), ['div', {
99
- 'data-component': 'task-item-main'
100
- }, ['span', {
101
- contenteditable: 'false',
102
- class: "".concat(_styles.TaskDecisionSharedCssClassName.TASK_CHECKBOX_CONTAINER),
103
- 'data-component': 'task-item-input-wrap'
104
- }, ['input', _objectSpread(_objectSpread({}, inputAttrs), {}, {
105
- 'data-input-type': 'task-item',
106
- 'data-task-input': true,
107
- 'data-testid': 'task-item-checkbox',
108
- 'data-component': 'task-item-input',
109
- role: 'checkbox'
110
- })], ['span', {
94
+ var checkboxIcons = (0, _expValEquals.expValEquals)('platform_editor_task_item_styles', 'isEnabled', true) ? ['http://www.w3.org/2000/svg svg', {
95
+ width: '20',
96
+ height: '20',
97
+ viewBox: '2 2 20 20',
98
+ role: 'presentation',
99
+ 'data-component': 'checkbox-icon'
100
+ }, ['http://www.w3.org/2000/svg g', {
101
+ 'fill-rule': 'evenodd'
102
+ }, ['http://www.w3.org/2000/svg rect', {
103
+ fill: 'currentcolor',
104
+ x: '5.5',
105
+ y: '5.5',
106
+ width: '13',
107
+ height: '13',
108
+ rx: '1.5'
109
+ }], ['http://www.w3.org/2000/svg path', {
110
+ 'fill-rule': 'evenodd',
111
+ 'clip-rule': 'evenodd',
112
+ d: 'm16.326 9.48-1.152-.96-4.424 5.308-1.924-2.308-1.152.96 2.5 3a.75.75 0 0 0 1.152 0z',
113
+ fill: 'inherit'
114
+ }]]] : ['span', {
111
115
  'aria-hidden': true,
112
116
  'data-component': 'checkbox-icon-wrap'
113
117
  }, ['http://www.w3.org/2000/svg svg', {
@@ -137,7 +141,24 @@ function taskItemToDom(node, placeholder, intl) {
137
141
  'fill-rule': 'evenodd',
138
142
  'clip-rule': 'evenodd',
139
143
  d: 'M3 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2zm9.326 4.48-1.152-.96L6.75 9.828 4.826 7.52l-1.152.96 2.5 3a.75.75 0 0 0 1.152 0z'
140
- }]]]], ['span', {
144
+ }]]];
145
+ return ['div', _objectSpread(_objectSpread({
146
+ class: "".concat(_styles.TaskDecisionSharedCssClassName.TASK_CONTAINER)
147
+ }, dataAttrs), {}, {
148
+ state: node.attrs.state
149
+ }), ['div', {
150
+ 'data-component': 'task-item-main'
151
+ }, ['span', {
152
+ contenteditable: 'false',
153
+ class: "".concat(_styles.TaskDecisionSharedCssClassName.TASK_CHECKBOX_CONTAINER),
154
+ 'data-component': 'task-item-input-wrap'
155
+ }, ['input', _objectSpread(_objectSpread({}, inputAttrs), {}, {
156
+ 'data-input-type': 'task-item',
157
+ 'data-task-input': true,
158
+ 'data-testid': 'task-item-checkbox',
159
+ 'data-component': 'task-item-input',
160
+ role: 'checkbox'
161
+ })], checkboxIcons], ['span', {
141
162
  class: 'placeholder-node-view',
142
163
  'data-testid': 'task-decision-item-placeholder',
143
164
  'data-component': 'placeholder',
@@ -77,24 +77,27 @@ export function taskItemToDom(node, placeholder, intl) {
77
77
  'data-empty': 'true'
78
78
  } : {};
79
79
  }
80
- return ['div', {
81
- class: `${TaskDecisionSharedCssClassName.TASK_CONTAINER}`,
82
- ...dataAttrs,
83
- state: node.attrs.state
84
- }, ['div', {
85
- 'data-component': 'task-item-main'
86
- }, ['span', {
87
- contenteditable: 'false',
88
- class: `${TaskDecisionSharedCssClassName.TASK_CHECKBOX_CONTAINER}`,
89
- 'data-component': 'task-item-input-wrap'
90
- }, ['input', {
91
- ...inputAttrs,
92
- 'data-input-type': 'task-item',
93
- 'data-task-input': true,
94
- 'data-testid': 'task-item-checkbox',
95
- 'data-component': 'task-item-input',
96
- role: 'checkbox'
97
- }], ['span', {
80
+ const checkboxIcons = expValEquals('platform_editor_task_item_styles', 'isEnabled', true) ? ['http://www.w3.org/2000/svg svg', {
81
+ width: '20',
82
+ height: '20',
83
+ viewBox: '2 2 20 20',
84
+ role: 'presentation',
85
+ 'data-component': 'checkbox-icon'
86
+ }, ['http://www.w3.org/2000/svg g', {
87
+ 'fill-rule': 'evenodd'
88
+ }, ['http://www.w3.org/2000/svg rect', {
89
+ fill: 'currentcolor',
90
+ x: '5.5',
91
+ y: '5.5',
92
+ width: '13',
93
+ height: '13',
94
+ rx: '1.5'
95
+ }], ['http://www.w3.org/2000/svg path', {
96
+ 'fill-rule': 'evenodd',
97
+ 'clip-rule': 'evenodd',
98
+ d: 'm16.326 9.48-1.152-.96-4.424 5.308-1.924-2.308-1.152.96 2.5 3a.75.75 0 0 0 1.152 0z',
99
+ fill: 'inherit'
100
+ }]]] : ['span', {
98
101
  'aria-hidden': true,
99
102
  'data-component': 'checkbox-icon-wrap'
100
103
  }, ['http://www.w3.org/2000/svg svg', {
@@ -124,7 +127,25 @@ export function taskItemToDom(node, placeholder, intl) {
124
127
  'fill-rule': 'evenodd',
125
128
  'clip-rule': 'evenodd',
126
129
  d: 'M3 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2zm9.326 4.48-1.152-.96L6.75 9.828 4.826 7.52l-1.152.96 2.5 3a.75.75 0 0 0 1.152 0z'
127
- }]]]], ['span', {
130
+ }]]];
131
+ return ['div', {
132
+ class: `${TaskDecisionSharedCssClassName.TASK_CONTAINER}`,
133
+ ...dataAttrs,
134
+ state: node.attrs.state
135
+ }, ['div', {
136
+ 'data-component': 'task-item-main'
137
+ }, ['span', {
138
+ contenteditable: 'false',
139
+ class: `${TaskDecisionSharedCssClassName.TASK_CHECKBOX_CONTAINER}`,
140
+ 'data-component': 'task-item-input-wrap'
141
+ }, ['input', {
142
+ ...inputAttrs,
143
+ 'data-input-type': 'task-item',
144
+ 'data-task-input': true,
145
+ 'data-testid': 'task-item-checkbox',
146
+ 'data-component': 'task-item-input',
147
+ role: 'checkbox'
148
+ }], checkboxIcons], ['span', {
128
149
  class: 'placeholder-node-view',
129
150
  'data-testid': 'task-decision-item-placeholder',
130
151
  'data-component': 'placeholder',
@@ -83,23 +83,27 @@ export function taskItemToDom(node, placeholder, intl) {
83
83
  'data-empty': 'true'
84
84
  } : {};
85
85
  }
86
- return ['div', _objectSpread(_objectSpread({
87
- class: "".concat(TaskDecisionSharedCssClassName.TASK_CONTAINER)
88
- }, dataAttrs), {}, {
89
- state: node.attrs.state
90
- }), ['div', {
91
- 'data-component': 'task-item-main'
92
- }, ['span', {
93
- contenteditable: 'false',
94
- class: "".concat(TaskDecisionSharedCssClassName.TASK_CHECKBOX_CONTAINER),
95
- 'data-component': 'task-item-input-wrap'
96
- }, ['input', _objectSpread(_objectSpread({}, inputAttrs), {}, {
97
- 'data-input-type': 'task-item',
98
- 'data-task-input': true,
99
- 'data-testid': 'task-item-checkbox',
100
- 'data-component': 'task-item-input',
101
- role: 'checkbox'
102
- })], ['span', {
86
+ var checkboxIcons = expValEquals('platform_editor_task_item_styles', 'isEnabled', true) ? ['http://www.w3.org/2000/svg svg', {
87
+ width: '20',
88
+ height: '20',
89
+ viewBox: '2 2 20 20',
90
+ role: 'presentation',
91
+ 'data-component': 'checkbox-icon'
92
+ }, ['http://www.w3.org/2000/svg g', {
93
+ 'fill-rule': 'evenodd'
94
+ }, ['http://www.w3.org/2000/svg rect', {
95
+ fill: 'currentcolor',
96
+ x: '5.5',
97
+ y: '5.5',
98
+ width: '13',
99
+ height: '13',
100
+ rx: '1.5'
101
+ }], ['http://www.w3.org/2000/svg path', {
102
+ 'fill-rule': 'evenodd',
103
+ 'clip-rule': 'evenodd',
104
+ d: 'm16.326 9.48-1.152-.96-4.424 5.308-1.924-2.308-1.152.96 2.5 3a.75.75 0 0 0 1.152 0z',
105
+ fill: 'inherit'
106
+ }]]] : ['span', {
103
107
  'aria-hidden': true,
104
108
  'data-component': 'checkbox-icon-wrap'
105
109
  }, ['http://www.w3.org/2000/svg svg', {
@@ -129,7 +133,24 @@ export function taskItemToDom(node, placeholder, intl) {
129
133
  'fill-rule': 'evenodd',
130
134
  'clip-rule': 'evenodd',
131
135
  d: 'M3 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2zm9.326 4.48-1.152-.96L6.75 9.828 4.826 7.52l-1.152.96 2.5 3a.75.75 0 0 0 1.152 0z'
132
- }]]]], ['span', {
136
+ }]]];
137
+ return ['div', _objectSpread(_objectSpread({
138
+ class: "".concat(TaskDecisionSharedCssClassName.TASK_CONTAINER)
139
+ }, dataAttrs), {}, {
140
+ state: node.attrs.state
141
+ }), ['div', {
142
+ 'data-component': 'task-item-main'
143
+ }, ['span', {
144
+ contenteditable: 'false',
145
+ class: "".concat(TaskDecisionSharedCssClassName.TASK_CHECKBOX_CONTAINER),
146
+ 'data-component': 'task-item-input-wrap'
147
+ }, ['input', _objectSpread(_objectSpread({}, inputAttrs), {}, {
148
+ 'data-input-type': 'task-item',
149
+ 'data-task-input': true,
150
+ 'data-testid': 'task-item-checkbox',
151
+ 'data-component': 'task-item-input',
152
+ role: 'checkbox'
153
+ })], checkboxIcons], ['span', {
133
154
  class: 'placeholder-node-view',
134
155
  'data-testid': 'task-decision-item-placeholder',
135
156
  'data-component': 'placeholder',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-tasks-and-decisions",
3
- "version": "10.0.2",
3
+ "version": "10.1.0",
4
4
  "description": "Tasks and decisions plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -49,7 +49,7 @@
49
49
  "@atlaskit/primitives": "^17.0.0",
50
50
  "@atlaskit/prosemirror-input-rules": "^3.6.0",
51
51
  "@atlaskit/task-decision": "^19.2.0",
52
- "@atlaskit/tmp-editor-statsig": "^16.11.0",
52
+ "@atlaskit/tmp-editor-statsig": "^16.14.0",
53
53
  "@atlaskit/tokens": "^9.1.0",
54
54
  "@babel/runtime": "^7.0.0",
55
55
  "@compiled/react": "^0.18.6",