@atlaskit/task-decision 17.10.4 → 17.11.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,21 @@
1
1
  # @atlaskit/task-decision
2
2
 
3
+ ## 17.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#144209](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/144209)
8
+ [`8a016767c9e26`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8a016767c9e26) -
9
+ [ux] Enable new icons behind a feature flag.
10
+
11
+ ## 17.10.5
12
+
13
+ ### Patch Changes
14
+
15
+ - [#142911](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/142911)
16
+ [`f661df7842ec7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f661df7842ec7) -
17
+ [ux] [ED-24772] create request to edit component under feature toggle
18
+
3
19
  ## 17.10.4
4
20
 
5
21
  ### Patch Changes
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = void 0;
8
8
  var _react = require("@emotion/react");
9
- var _decision = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/decision"));
9
+ var _decisionEditorDecision = _interopRequireDefault(require("@atlaskit/icon/core/migration/decision--editor-decision"));
10
10
  var _Item = _interopRequireDefault(require("./Item"));
11
11
  /**
12
12
  * @jsxRuntime classic
@@ -23,10 +23,9 @@ var iconStyles = function iconStyles(showPlaceholder) {
23
23
  margin: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-150, 12px)", " 0 0"),
24
24
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
25
25
  color: showPlaceholder ? "var(--ds-icon-subtle, #626F86)" : "var(--ds-icon-success, #22A06B)",
26
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
27
- '> span': {
28
- margin: "var(--ds-space-negative-100, -8px)"
29
- }
26
+ display: 'flex',
27
+ alignItems: 'center',
28
+ justifyContent: 'center'
30
29
  });
31
30
  };
32
31
  var DecisionItem = function DecisionItem(_ref) {
@@ -41,9 +40,11 @@ var DecisionItem = function DecisionItem(_ref) {
41
40
  (0, _react.jsx)("span", {
42
41
  contentEditable: false,
43
42
  css: iconStyles(showPlaceholder)
44
- }, (0, _react.jsx)(_decision.default, {
43
+ }, (0, _react.jsx)(_decisionEditorDecision.default, {
45
44
  label: "Decision",
46
- size: "large"
45
+ spacing: "spacious",
46
+ color: "currentColor",
47
+ LEGACY_size: "large"
47
48
  }));
48
49
  return (0, _react.jsx)(_Item.default, {
49
50
  appearance: appearance,
@@ -39,7 +39,12 @@ var ResourcedTaskItem = exports.default = /*#__PURE__*/function (_PureComponent)
39
39
  var _this$props = _this.props,
40
40
  taskDecisionProvider = _this$props.taskDecisionProvider,
41
41
  objectAri = _this$props.objectAri,
42
- onChange = _this$props.onChange;
42
+ onChange = _this$props.onChange,
43
+ disableOnChange = _this$props.disableOnChange;
44
+ if (disableOnChange) {
45
+ return;
46
+ }
47
+
43
48
  // Optimistically update the task
44
49
  _this.setState({
45
50
  isDone: isDone
@@ -68,6 +73,12 @@ var ResourcedTaskItem = exports.default = /*#__PURE__*/function (_PureComponent)
68
73
  }
69
74
  }
70
75
  });
76
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleOnClick", function () {
77
+ var onClick = _this.props.onClick;
78
+ if (onClick) {
79
+ onClick();
80
+ }
81
+ });
71
82
  _this.state = {
72
83
  isDone: props.isDone
73
84
  };
@@ -157,7 +168,8 @@ var ResourcedTaskItem = exports.default = /*#__PURE__*/function (_PureComponent)
157
168
  disabled = _this$props3.disabled,
158
169
  dataAttributes = _this$props3.dataAttributes,
159
170
  isRenderer = _this$props3.isRenderer,
160
- isFocused = _this$props3.isFocused;
171
+ isFocused = _this$props3.isFocused,
172
+ inputRef = _this$props3.inputRef;
161
173
  return /*#__PURE__*/_react.default.createElement(_analyticsNamespacedContext.FabricElementsAnalyticsContext, {
162
174
  data: {
163
175
  objectAri: objectAri
@@ -168,12 +180,14 @@ var ResourcedTaskItem = exports.default = /*#__PURE__*/function (_PureComponent)
168
180
  isFocused: isFocused,
169
181
  taskId: taskId,
170
182
  onChange: this.handleOnChange,
183
+ onClick: this.handleOnClick,
171
184
  appearance: appearance,
172
185
  contentRef: contentRef,
173
186
  showPlaceholder: showPlaceholder,
174
187
  placeholder: placeholder,
175
188
  disabled: disabled,
176
- dataAttributes: dataAttributes
189
+ dataAttributes: dataAttributes,
190
+ inputRef: inputRef
177
191
  }, children));
178
192
  }
179
193
  }]);
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _react2 = require("@emotion/react");
11
- var _checkbox = _interopRequireDefault(require("@atlaskit/icon/glyph/checkbox"));
11
+ var _checkboxCheckedCheckbox = _interopRequireDefault(require("@atlaskit/icon/core/migration/checkbox-checked--checkbox"));
12
12
  var _Item = _interopRequireDefault(require("./Item"));
13
13
  var _analyticsNext = require("@atlaskit/analytics-next");
14
14
  var _analytics = require("../analytics");
@@ -39,7 +39,9 @@ var TaskItem = function TaskItem(props) {
39
39
  dataAttributes = props.dataAttributes,
40
40
  taskId = props.taskId,
41
41
  onChange = props.onChange,
42
- createAnalyticsEvent = props.createAnalyticsEvent;
42
+ onClick = props.onClick,
43
+ createAnalyticsEvent = props.createAnalyticsEvent,
44
+ inputRefFromProps = props.inputRef;
43
45
  var checkBoxId = (0, _react.useMemo)(function () {
44
46
  return getCheckBoxId(taskId);
45
47
  }, [taskId]);
@@ -69,7 +71,8 @@ var TaskItem = function TaskItem(props) {
69
71
  }
70
72
  };
71
73
  }, [handleOnChange]);
72
- var inputRef = (0, _react.useRef)(null);
74
+ var defaultInputRef = (0, _react.useRef)(null);
75
+ var inputRef = inputRefFromProps !== null && inputRefFromProps !== void 0 ? inputRefFromProps : defaultInputRef;
73
76
  var icon =
74
77
  // 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
78
  (0, _react2.jsx)("span", {
@@ -81,12 +84,15 @@ var TaskItem = function TaskItem(props) {
81
84
  name: checkBoxId,
82
85
  type: "checkbox",
83
86
  onChange: handleOnChange,
87
+ onClick: onClick,
84
88
  checked: !!isDone,
85
89
  disabled: !!disabled,
86
90
  suppressHydrationWarning: true,
87
91
  onKeyPress: handleOnKeyPress,
88
92
  ref: inputRef
89
- }), (0, _react2.jsx)(_checkbox.default, {
93
+ }), (0, _react2.jsx)(_checkboxCheckedCheckbox.default, {
94
+ color: "currentColor",
95
+ spacing: "spacious",
90
96
  label: ""
91
97
  }));
92
98
  _react.default.useEffect(function () {
@@ -99,7 +105,7 @@ var TaskItem = function TaskItem(props) {
99
105
  (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 || _inputRef$current3.focus();
100
106
  }, 100);
101
107
  }
102
- }, [isFocused]);
108
+ }, [isFocused, inputRef]);
103
109
  return (0, _react2.jsx)(_Item.default, {
104
110
  appearance: appearance,
105
111
  contentRef: contentRef,
@@ -5,7 +5,7 @@
5
5
 
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { css, jsx } from '@emotion/react';
8
- import DecisionIcon from '@atlaskit/icon/glyph/editor/decision';
8
+ import DecisionIcon from '@atlaskit/icon/core/migration/decision--editor-decision';
9
9
  import Item from './Item';
10
10
  const iconStyles = showPlaceholder => {
11
11
  return css({
@@ -15,10 +15,9 @@ const iconStyles = showPlaceholder => {
15
15
  margin: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-150, 12px)"} 0 0`,
16
16
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
17
17
  color: showPlaceholder ? "var(--ds-icon-subtle, #626F86)" : "var(--ds-icon-success, #22A06B)",
18
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
19
- '> span': {
20
- margin: "var(--ds-space-negative-100, -8px)"
21
- }
18
+ display: 'flex',
19
+ alignItems: 'center',
20
+ justifyContent: 'center'
22
21
  });
23
22
  };
24
23
  const DecisionItem = ({
@@ -36,7 +35,9 @@ const DecisionItem = ({
36
35
  css: iconStyles(showPlaceholder)
37
36
  }, jsx(DecisionIcon, {
38
37
  label: "Decision",
39
- size: "large"
38
+ spacing: "spacious",
39
+ color: "currentColor",
40
+ LEGACY_size: "large"
40
41
  }));
41
42
  return jsx(Item, {
42
43
  appearance: appearance,
@@ -16,8 +16,13 @@ export default class ResourcedTaskItem extends PureComponent {
16
16
  const {
17
17
  taskDecisionProvider,
18
18
  objectAri,
19
- onChange
19
+ onChange,
20
+ disableOnChange
20
21
  } = this.props;
22
+ if (disableOnChange) {
23
+ return;
24
+ }
25
+
21
26
  // Optimistically update the task
22
27
  this.setState({
23
28
  isDone
@@ -46,6 +51,14 @@ export default class ResourcedTaskItem extends PureComponent {
46
51
  }
47
52
  }
48
53
  });
54
+ _defineProperty(this, "handleOnClick", () => {
55
+ const {
56
+ onClick
57
+ } = this.props;
58
+ if (onClick) {
59
+ onClick();
60
+ }
61
+ });
49
62
  this.state = {
50
63
  isDone: props.isDone
51
64
  };
@@ -126,7 +139,8 @@ export default class ResourcedTaskItem extends PureComponent {
126
139
  disabled,
127
140
  dataAttributes,
128
141
  isRenderer,
129
- isFocused
142
+ isFocused,
143
+ inputRef
130
144
  } = this.props;
131
145
  return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
132
146
  data: {
@@ -138,12 +152,14 @@ export default class ResourcedTaskItem extends PureComponent {
138
152
  isFocused: isFocused,
139
153
  taskId: taskId,
140
154
  onChange: this.handleOnChange,
155
+ onClick: this.handleOnClick,
141
156
  appearance: appearance,
142
157
  contentRef: contentRef,
143
158
  showPlaceholder: showPlaceholder,
144
159
  placeholder: placeholder,
145
160
  disabled: disabled,
146
- dataAttributes: dataAttributes
161
+ dataAttributes: dataAttributes,
162
+ inputRef: inputRef
147
163
  }, children));
148
164
  }
149
165
  }
@@ -5,7 +5,7 @@
5
5
  import React, { useMemo, useRef } from 'react';
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { jsx } from '@emotion/react';
8
- import CheckboxIcon from '@atlaskit/icon/glyph/checkbox';
8
+ import CheckboxIcon from '@atlaskit/icon/core/migration/checkbox-checked--checkbox';
9
9
  import Item from './Item';
10
10
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
11
11
  import { createAndFireEventInElementsChannel } from '../analytics';
@@ -26,7 +26,9 @@ const TaskItem = props => {
26
26
  dataAttributes,
27
27
  taskId,
28
28
  onChange,
29
- createAnalyticsEvent
29
+ onClick,
30
+ createAnalyticsEvent,
31
+ inputRef: inputRefFromProps
30
32
  } = props;
31
33
  const checkBoxId = useMemo(() => getCheckBoxId(taskId), [taskId]);
32
34
  const handleOnChange = useMemo(() => {
@@ -53,7 +55,8 @@ const TaskItem = props => {
53
55
  handleOnChange(event);
54
56
  }
55
57
  }, [handleOnChange]);
56
- const inputRef = useRef(null);
58
+ const defaultInputRef = useRef(null);
59
+ const inputRef = inputRefFromProps !== null && inputRefFromProps !== void 0 ? inputRefFromProps : defaultInputRef;
57
60
  const icon =
58
61
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
59
62
  jsx("span", {
@@ -65,12 +68,15 @@ const TaskItem = props => {
65
68
  name: checkBoxId,
66
69
  type: "checkbox",
67
70
  onChange: handleOnChange,
71
+ onClick: onClick,
68
72
  checked: !!isDone,
69
73
  disabled: !!disabled,
70
74
  suppressHydrationWarning: true,
71
75
  onKeyPress: handleOnKeyPress,
72
76
  ref: inputRef
73
77
  }), jsx(CheckboxIcon, {
78
+ color: "currentColor",
79
+ spacing: "spacious",
74
80
  label: ""
75
81
  }));
76
82
  React.useEffect(() => {
@@ -83,7 +89,7 @@ const TaskItem = props => {
83
89
  (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.focus();
84
90
  }, 100);
85
91
  }
86
- }, [isFocused]);
92
+ }, [isFocused, inputRef]);
87
93
  return jsx(Item, {
88
94
  appearance: appearance,
89
95
  contentRef: contentRef,
@@ -5,7 +5,7 @@
5
5
 
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { css, jsx } from '@emotion/react';
8
- import DecisionIcon from '@atlaskit/icon/glyph/editor/decision';
8
+ import DecisionIcon from '@atlaskit/icon/core/migration/decision--editor-decision';
9
9
  import Item from './Item';
10
10
  var iconStyles = function iconStyles(showPlaceholder) {
11
11
  return css({
@@ -15,10 +15,9 @@ var iconStyles = function iconStyles(showPlaceholder) {
15
15
  margin: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-150, 12px)", " 0 0"),
16
16
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
17
17
  color: showPlaceholder ? "var(--ds-icon-subtle, #626F86)" : "var(--ds-icon-success, #22A06B)",
18
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
19
- '> span': {
20
- margin: "var(--ds-space-negative-100, -8px)"
21
- }
18
+ display: 'flex',
19
+ alignItems: 'center',
20
+ justifyContent: 'center'
22
21
  });
23
22
  };
24
23
  var DecisionItem = function DecisionItem(_ref) {
@@ -35,7 +34,9 @@ var DecisionItem = function DecisionItem(_ref) {
35
34
  css: iconStyles(showPlaceholder)
36
35
  }, jsx(DecisionIcon, {
37
36
  label: "Decision",
38
- size: "large"
37
+ spacing: "spacious",
38
+ color: "currentColor",
39
+ LEGACY_size: "large"
39
40
  }));
40
41
  return jsx(Item, {
41
42
  appearance: appearance,
@@ -30,7 +30,12 @@ var ResourcedTaskItem = /*#__PURE__*/function (_PureComponent) {
30
30
  var _this$props = _this.props,
31
31
  taskDecisionProvider = _this$props.taskDecisionProvider,
32
32
  objectAri = _this$props.objectAri,
33
- onChange = _this$props.onChange;
33
+ onChange = _this$props.onChange,
34
+ disableOnChange = _this$props.disableOnChange;
35
+ if (disableOnChange) {
36
+ return;
37
+ }
38
+
34
39
  // Optimistically update the task
35
40
  _this.setState({
36
41
  isDone: isDone
@@ -59,6 +64,12 @@ var ResourcedTaskItem = /*#__PURE__*/function (_PureComponent) {
59
64
  }
60
65
  }
61
66
  });
67
+ _defineProperty(_assertThisInitialized(_this), "handleOnClick", function () {
68
+ var onClick = _this.props.onClick;
69
+ if (onClick) {
70
+ onClick();
71
+ }
72
+ });
62
73
  _this.state = {
63
74
  isDone: props.isDone
64
75
  };
@@ -148,7 +159,8 @@ var ResourcedTaskItem = /*#__PURE__*/function (_PureComponent) {
148
159
  disabled = _this$props3.disabled,
149
160
  dataAttributes = _this$props3.dataAttributes,
150
161
  isRenderer = _this$props3.isRenderer,
151
- isFocused = _this$props3.isFocused;
162
+ isFocused = _this$props3.isFocused,
163
+ inputRef = _this$props3.inputRef;
152
164
  return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
153
165
  data: {
154
166
  objectAri: objectAri
@@ -159,12 +171,14 @@ var ResourcedTaskItem = /*#__PURE__*/function (_PureComponent) {
159
171
  isFocused: isFocused,
160
172
  taskId: taskId,
161
173
  onChange: this.handleOnChange,
174
+ onClick: this.handleOnClick,
162
175
  appearance: appearance,
163
176
  contentRef: contentRef,
164
177
  showPlaceholder: showPlaceholder,
165
178
  placeholder: placeholder,
166
179
  disabled: disabled,
167
- dataAttributes: dataAttributes
180
+ dataAttributes: dataAttributes,
181
+ inputRef: inputRef
168
182
  }, children));
169
183
  }
170
184
  }]);
@@ -5,7 +5,7 @@
5
5
  import React, { useMemo, useRef } from 'react';
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { jsx } from '@emotion/react';
8
- import CheckboxIcon from '@atlaskit/icon/glyph/checkbox';
8
+ import CheckboxIcon from '@atlaskit/icon/core/migration/checkbox-checked--checkbox';
9
9
  import Item from './Item';
10
10
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
11
11
  import { createAndFireEventInElementsChannel } from '../analytics';
@@ -27,7 +27,9 @@ var TaskItem = function TaskItem(props) {
27
27
  dataAttributes = props.dataAttributes,
28
28
  taskId = props.taskId,
29
29
  onChange = props.onChange,
30
- createAnalyticsEvent = props.createAnalyticsEvent;
30
+ onClick = props.onClick,
31
+ createAnalyticsEvent = props.createAnalyticsEvent,
32
+ inputRefFromProps = props.inputRef;
31
33
  var checkBoxId = useMemo(function () {
32
34
  return getCheckBoxId(taskId);
33
35
  }, [taskId]);
@@ -57,7 +59,8 @@ var TaskItem = function TaskItem(props) {
57
59
  }
58
60
  };
59
61
  }, [handleOnChange]);
60
- var inputRef = useRef(null);
62
+ var defaultInputRef = useRef(null);
63
+ var inputRef = inputRefFromProps !== null && inputRefFromProps !== void 0 ? inputRefFromProps : defaultInputRef;
61
64
  var icon =
62
65
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
63
66
  jsx("span", {
@@ -69,12 +72,15 @@ var TaskItem = function TaskItem(props) {
69
72
  name: checkBoxId,
70
73
  type: "checkbox",
71
74
  onChange: handleOnChange,
75
+ onClick: onClick,
72
76
  checked: !!isDone,
73
77
  disabled: !!disabled,
74
78
  suppressHydrationWarning: true,
75
79
  onKeyPress: handleOnKeyPress,
76
80
  ref: inputRef
77
81
  }), jsx(CheckboxIcon, {
82
+ color: "currentColor",
83
+ spacing: "spacious",
78
84
  label: ""
79
85
  }));
80
86
  React.useEffect(function () {
@@ -87,7 +93,7 @@ var TaskItem = function TaskItem(props) {
87
93
  (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 || _inputRef$current3.focus();
88
94
  }, 100);
89
95
  }
90
- }, [isFocused]);
96
+ }, [isFocused, inputRef]);
91
97
  return jsx(Item, {
92
98
  appearance: appearance,
93
99
  contentRef: contentRef,
@@ -1,3 +1,4 @@
1
+ import { type RefObject } from 'react';
1
2
  import { PureComponent } from 'react';
2
3
  import { type Appearance, type ContentRef, type TaskDecisionProvider } from '../types';
3
4
  export interface Props {
@@ -6,6 +7,7 @@ export interface Props {
6
7
  isRenderer?: boolean;
7
8
  isFocused?: boolean;
8
9
  onChange?: (taskId: string, isChecked: boolean) => void;
10
+ onClick?: () => void;
9
11
  contentRef?: ContentRef;
10
12
  children?: any;
11
13
  taskDecisionProvider?: Promise<TaskDecisionProvider>;
@@ -17,6 +19,8 @@ export interface Props {
17
19
  dataAttributes?: {
18
20
  [key: string]: string | number;
19
21
  };
22
+ inputRef?: RefObject<HTMLInputElement>;
23
+ disableOnChange?: boolean;
20
24
  }
21
25
  export interface State {
22
26
  isDone?: boolean;
@@ -32,5 +36,6 @@ export default class ResourcedTaskItem extends PureComponent<Props, State> {
32
36
  private unsubscribe;
33
37
  private onUpdate;
34
38
  private handleOnChange;
39
+ private handleOnClick;
35
40
  render(): JSX.Element;
36
41
  }
@@ -2,7 +2,7 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import React from 'react';
5
+ import React, { type RefObject } from 'react';
6
6
  import { type Appearance, type ContentRef } from '../types';
7
7
  import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
8
8
  export interface Props {
@@ -11,6 +11,7 @@ export interface Props {
11
11
  isFocused?: boolean;
12
12
  isRenderer?: boolean;
13
13
  onChange?: (taskId: string, isChecked: boolean) => void;
14
+ onClick?: () => void;
14
15
  contentRef?: ContentRef;
15
16
  children?: any;
16
17
  placeholder?: string;
@@ -20,6 +21,7 @@ export interface Props {
20
21
  dataAttributes?: {
21
22
  [key: string]: string | number;
22
23
  };
24
+ inputRef?: RefObject<HTMLInputElement>;
23
25
  }
24
26
  declare const _default: React.ForwardRefExoticComponent<Omit<Props & WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
25
27
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { type RefObject } from 'react';
1
2
  import { PureComponent } from 'react';
2
3
  import { type Appearance, type ContentRef, type TaskDecisionProvider } from '../types';
3
4
  export interface Props {
@@ -6,6 +7,7 @@ export interface Props {
6
7
  isRenderer?: boolean;
7
8
  isFocused?: boolean;
8
9
  onChange?: (taskId: string, isChecked: boolean) => void;
10
+ onClick?: () => void;
9
11
  contentRef?: ContentRef;
10
12
  children?: any;
11
13
  taskDecisionProvider?: Promise<TaskDecisionProvider>;
@@ -17,6 +19,8 @@ export interface Props {
17
19
  dataAttributes?: {
18
20
  [key: string]: string | number;
19
21
  };
22
+ inputRef?: RefObject<HTMLInputElement>;
23
+ disableOnChange?: boolean;
20
24
  }
21
25
  export interface State {
22
26
  isDone?: boolean;
@@ -32,5 +36,6 @@ export default class ResourcedTaskItem extends PureComponent<Props, State> {
32
36
  private unsubscribe;
33
37
  private onUpdate;
34
38
  private handleOnChange;
39
+ private handleOnClick;
35
40
  render(): JSX.Element;
36
41
  }
@@ -2,7 +2,7 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import React from 'react';
5
+ import React, { type RefObject } from 'react';
6
6
  import { type Appearance, type ContentRef } from '../types';
7
7
  import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
8
8
  export interface Props {
@@ -11,6 +11,7 @@ export interface Props {
11
11
  isFocused?: boolean;
12
12
  isRenderer?: boolean;
13
13
  onChange?: (taskId: string, isChecked: boolean) => void;
14
+ onClick?: () => void;
14
15
  contentRef?: ContentRef;
15
16
  children?: any;
16
17
  placeholder?: string;
@@ -20,6 +21,7 @@ export interface Props {
20
21
  dataAttributes?: {
21
22
  [key: string]: string | number;
22
23
  };
24
+ inputRef?: RefObject<HTMLInputElement>;
23
25
  }
24
26
  declare const _default: React.ForwardRefExoticComponent<Omit<Props & WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
25
27
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/task-decision",
3
- "version": "17.10.4",
3
+ "version": "17.11.0",
4
4
  "description": "Tasks and decisions react components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -43,7 +43,7 @@
43
43
  "@atlaskit/analytics-next": "^10.1.0",
44
44
  "@atlaskit/icon": "^22.18.0",
45
45
  "@atlaskit/theme": "^13.0.0",
46
- "@atlaskit/tokens": "^1.60.0",
46
+ "@atlaskit/tokens": "^1.61.0",
47
47
  "@atlaskit/util-service-support": "^6.2.0",
48
48
  "@babel/runtime": "^7.0.0",
49
49
  "@emotion/react": "^11.7.1",