@atlaskit/inline-edit 12.1.14 → 12.2.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 +10 -0
- package/dist/cjs/inline-edit.js +14 -14
- package/dist/cjs/inline-editable-textfield.js +11 -11
- package/dist/cjs/internal/buttons.js +12 -12
- package/dist/cjs/internal/read-view.js +8 -8
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/inline-edit.js +2 -2
- package/dist/es2019/inline-editable-textfield.js +1 -1
- package/dist/es2019/internal/buttons.js +1 -1
- package/dist/es2019/internal/read-view.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/inline-edit.js +2 -2
- package/dist/esm/inline-editable-textfield.js +1 -1
- package/dist/esm/internal/buttons.js +1 -1
- package/dist/esm/internal/read-view.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/inline-edit.d.ts +2 -2
- package/dist/types/inline-editable-textfield.d.ts +3 -2
- package/dist/types/internal/buttons.d.ts +2 -1
- package/dist/types/internal/read-view.d.ts +2 -1
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/inline-edit
|
|
2
2
|
|
|
3
|
+
## 12.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`b52ffa29d19`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b52ffa29d19) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 12.1.14
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/cjs/inline-edit.js
CHANGED
|
@@ -17,7 +17,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
17
17
|
|
|
18
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _react2 = require("@emotion/react");
|
|
21
21
|
|
|
22
22
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
23
23
|
|
|
@@ -41,17 +41,17 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
41
41
|
|
|
42
42
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
43
43
|
|
|
44
|
-
var fieldStyles = (0,
|
|
44
|
+
var fieldStyles = (0, _react2.css)({
|
|
45
45
|
maxWidth: '100%',
|
|
46
46
|
position: 'relative'
|
|
47
47
|
});
|
|
48
|
-
var buttonStyles = (0,
|
|
48
|
+
var buttonStyles = (0, _react2.css)({
|
|
49
49
|
display: 'none'
|
|
50
50
|
});
|
|
51
51
|
var analyticsAttributes = {
|
|
52
52
|
componentName: 'inlineEdit',
|
|
53
53
|
packageName: "@atlaskit/inline-edit",
|
|
54
|
-
packageVersion: "12.
|
|
54
|
+
packageVersion: "12.2.0"
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
var noop = function noop() {};
|
|
@@ -180,7 +180,7 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
180
180
|
}, []);
|
|
181
181
|
|
|
182
182
|
var renderReadView = function renderReadView() {
|
|
183
|
-
return (0,
|
|
183
|
+
return (0, _react2.jsx)(_readView.default, {
|
|
184
184
|
editButtonLabel: editButtonLabel,
|
|
185
185
|
onEditRequested: onEditRequested,
|
|
186
186
|
postReadViewClick: doNotFocusOnEditButton,
|
|
@@ -192,7 +192,7 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
192
192
|
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
|
|
193
193
|
|
|
194
194
|
|
|
195
|
-
return (0,
|
|
195
|
+
return (0, _react2.jsx)(_Form.default, {
|
|
196
196
|
onSubmit: function onSubmit(data) {
|
|
197
197
|
return onConfirm(data.inlineEdit);
|
|
198
198
|
}
|
|
@@ -201,7 +201,7 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
201
201
|
_onKeyDown = _ref$formProps.onKeyDown,
|
|
202
202
|
onSubmit = _ref$formProps.onSubmit,
|
|
203
203
|
formRef = _ref$formProps.ref;
|
|
204
|
-
return (0,
|
|
204
|
+
return (0, _react2.jsx)("form", {
|
|
205
205
|
onKeyDown: function onKeyDown(e) {
|
|
206
206
|
_onKeyDown(e);
|
|
207
207
|
|
|
@@ -211,7 +211,7 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
211
211
|
},
|
|
212
212
|
onSubmit: onSubmit,
|
|
213
213
|
ref: formRef
|
|
214
|
-
}, shouldBeEditing ? (0,
|
|
214
|
+
}, shouldBeEditing ? (0, _react2.jsx)(_Field.default, {
|
|
215
215
|
name: "inlineEdit",
|
|
216
216
|
label: label,
|
|
217
217
|
defaultValue: defaultValue,
|
|
@@ -222,7 +222,7 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
222
222
|
}, function (_ref2) {
|
|
223
223
|
var fieldProps = _ref2.fieldProps,
|
|
224
224
|
error = _ref2.error;
|
|
225
|
-
return (0,
|
|
225
|
+
return (0, _react2.jsx)("div", {
|
|
226
226
|
css: fieldStyles,
|
|
227
227
|
onBlur: function onBlur() {
|
|
228
228
|
onEditViewWrapperBlur(fieldProps.isInvalid, onSubmit, formRef);
|
|
@@ -230,7 +230,7 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
230
230
|
onFocus: onEditViewWrapperFocus
|
|
231
231
|
}, editView(_objectSpread(_objectSpread({}, fieldProps), {}, {
|
|
232
232
|
errorMessage: error
|
|
233
|
-
}), editViewRef), !hideActionButtons ? (0,
|
|
233
|
+
}), editViewRef), !hideActionButtons ? (0, _react2.jsx)(_buttons.default, {
|
|
234
234
|
cancelButtonLabel: cancelButtonLabel,
|
|
235
235
|
confirmButtonLabel: confirmButtonLabel,
|
|
236
236
|
onMouseDown: function onMouseDown() {
|
|
@@ -241,13 +241,13 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
241
241
|
onCancelClick: onCancelClick
|
|
242
242
|
}) :
|
|
243
243
|
/** This is to allow Ctrl + Enter to submit without action buttons */
|
|
244
|
-
(0,
|
|
244
|
+
(0, _react2.jsx)("button", {
|
|
245
245
|
css: buttonStyles,
|
|
246
246
|
type: "submit"
|
|
247
247
|
}));
|
|
248
248
|
}) :
|
|
249
249
|
/** Field is used here only for the label */
|
|
250
|
-
(0,
|
|
250
|
+
(0, _react2.jsx)(_Field.default, {
|
|
251
251
|
name: "inlineEdit",
|
|
252
252
|
label: label,
|
|
253
253
|
defaultValue: "",
|
|
@@ -260,9 +260,9 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
260
260
|
};
|
|
261
261
|
|
|
262
262
|
var InlineEdit = function InlineEdit(props) {
|
|
263
|
-
return (0,
|
|
263
|
+
return (0, _react2.jsx)(_components.default.Consumer, null, function (tokens) {
|
|
264
264
|
var mode = tokens.mode;
|
|
265
|
-
return (0,
|
|
265
|
+
return (0, _react2.jsx)(InnerInlineEdit, (0, _extends2.default)({}, props, {
|
|
266
266
|
mode: mode
|
|
267
267
|
}));
|
|
268
268
|
});
|
|
@@ -11,7 +11,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
|
|
12
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _react = require("@emotion/react");
|
|
15
15
|
|
|
16
16
|
var _error = _interopRequireDefault(require("@atlaskit/icon/glyph/error"));
|
|
17
17
|
|
|
@@ -26,11 +26,11 @@ var _inlineEdit = _interopRequireDefault(require("./inline-edit"));
|
|
|
26
26
|
var _constants = require("./internal/constants");
|
|
27
27
|
|
|
28
28
|
var _excluded = ["errorMessage", "isInvalid"];
|
|
29
|
-
var errorIconContainerStyles = (0,
|
|
29
|
+
var errorIconContainerStyles = (0, _react.css)({
|
|
30
30
|
paddingRight: _constants.gridSize - 2,
|
|
31
31
|
lineHeight: '100%'
|
|
32
32
|
});
|
|
33
|
-
var readViewForTextFieldStyles = (0,
|
|
33
|
+
var readViewForTextFieldStyles = (0, _react.css)({
|
|
34
34
|
display: 'flex',
|
|
35
35
|
maxWidth: '100%',
|
|
36
36
|
minHeight: "".concat(_constants.gridSize * 2.5 / _constants.fontSize, "em"),
|
|
@@ -39,7 +39,7 @@ var readViewForTextFieldStyles = (0, _core.css)({
|
|
|
39
39
|
lineHeight: _constants.gridSize * 2.5 / _constants.fontSize,
|
|
40
40
|
wordBreak: 'break-word'
|
|
41
41
|
});
|
|
42
|
-
var compactStyles = (0,
|
|
42
|
+
var compactStyles = (0, _react.css)({
|
|
43
43
|
padding: "".concat(_constants.gridSize / 2, "px ").concat(_constants.gridSize - 2, "px")
|
|
44
44
|
});
|
|
45
45
|
|
|
@@ -49,22 +49,22 @@ var InlineEditableTextfield = function InlineEditableTextfield(props) {
|
|
|
49
49
|
defaultValue = props.defaultValue,
|
|
50
50
|
placeholder = props.placeholder,
|
|
51
51
|
testId = props.testId;
|
|
52
|
-
return (0,
|
|
52
|
+
return (0, _react.jsx)(_inlineEdit.default, (0, _extends2.default)({}, props, {
|
|
53
53
|
defaultValue: defaultValue,
|
|
54
54
|
editView: function editView(_ref) {
|
|
55
55
|
var errorMessage = _ref.errorMessage,
|
|
56
56
|
isInvalid = _ref.isInvalid,
|
|
57
57
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
58
|
-
return (0,
|
|
58
|
+
return (0, _react.jsx)(_inlineDialog.default, {
|
|
59
59
|
isOpen: isInvalid,
|
|
60
|
-
content: (0,
|
|
60
|
+
content: (0, _react.jsx)("div", {
|
|
61
61
|
id: "error-message"
|
|
62
62
|
}, errorMessage),
|
|
63
63
|
placement: "right"
|
|
64
|
-
}, (0,
|
|
65
|
-
elemAfterInput: isInvalid && (0,
|
|
64
|
+
}, (0, _react.jsx)(_textfield.default, (0, _extends2.default)({}, props, {
|
|
65
|
+
elemAfterInput: isInvalid && (0, _react.jsx)("div", {
|
|
66
66
|
css: errorIconContainerStyles
|
|
67
|
-
}, (0,
|
|
67
|
+
}, (0, _react.jsx)(_error.default, {
|
|
68
68
|
label: "error",
|
|
69
69
|
primaryColor: "var(--ds-icon-danger, ".concat(_colors.R400, ")")
|
|
70
70
|
})),
|
|
@@ -74,7 +74,7 @@ var InlineEditableTextfield = function InlineEditableTextfield(props) {
|
|
|
74
74
|
})));
|
|
75
75
|
},
|
|
76
76
|
readView: function readView() {
|
|
77
|
-
return (0,
|
|
77
|
+
return (0, _react.jsx)("div", {
|
|
78
78
|
css: [readViewForTextFieldStyles, isCompact && compactStyles],
|
|
79
79
|
"data-compact": isCompact,
|
|
80
80
|
"data-testid": testId && "read-view-".concat(testId)
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _react = require("@emotion/react");
|
|
11
11
|
|
|
12
12
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
13
13
|
|
|
@@ -20,7 +20,7 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
20
20
|
var _constants = require("./constants");
|
|
21
21
|
|
|
22
22
|
/** @jsx jsx */
|
|
23
|
-
var buttonsContainerStyles = (0,
|
|
23
|
+
var buttonsContainerStyles = (0, _react.css)({
|
|
24
24
|
display: 'flex',
|
|
25
25
|
marginTop: _constants.gridSize - 2,
|
|
26
26
|
position: 'absolute',
|
|
@@ -28,13 +28,13 @@ var buttonsContainerStyles = (0, _core.css)({
|
|
|
28
28
|
right: 0,
|
|
29
29
|
flexShrink: 0
|
|
30
30
|
});
|
|
31
|
-
var buttonWrapperElevationDarkStyles = (0,
|
|
31
|
+
var buttonWrapperElevationDarkStyles = (0, _react.css)({
|
|
32
32
|
boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(_colors.DN50A, ", 0 0 1px ").concat(_colors.DN60A), ")")
|
|
33
33
|
});
|
|
34
|
-
var buttonWrapperElevationLightStyles = (0,
|
|
34
|
+
var buttonWrapperElevationLightStyles = (0, _react.css)({
|
|
35
35
|
boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A), ")")
|
|
36
36
|
});
|
|
37
|
-
var buttonWrapperBaseStyles = (0,
|
|
37
|
+
var buttonWrapperBaseStyles = (0, _react.css)({
|
|
38
38
|
boxSizing: 'border-box',
|
|
39
39
|
width: _constants.gridSize * 4,
|
|
40
40
|
zIndex: 200,
|
|
@@ -52,24 +52,24 @@ var Buttons = function Buttons(_ref) {
|
|
|
52
52
|
cancelButtonLabel = _ref.cancelButtonLabel,
|
|
53
53
|
onMouseDown = _ref.onMouseDown,
|
|
54
54
|
onCancelClick = _ref.onCancelClick;
|
|
55
|
-
return (0,
|
|
55
|
+
return (0, _react.jsx)("div", {
|
|
56
56
|
css: buttonsContainerStyles
|
|
57
|
-
}, (0,
|
|
57
|
+
}, (0, _react.jsx)("div", {
|
|
58
58
|
css: [buttonWrapperBaseStyles, mode === 'light' ? buttonWrapperElevationLightStyles : buttonWrapperElevationDarkStyles]
|
|
59
|
-
}, (0,
|
|
59
|
+
}, (0, _react.jsx)(_standardButton.default, {
|
|
60
60
|
"aria-label": confirmButtonLabel,
|
|
61
61
|
type: "submit",
|
|
62
|
-
iconBefore: (0,
|
|
62
|
+
iconBefore: (0, _react.jsx)(_check.default, {
|
|
63
63
|
label: confirmButtonLabel,
|
|
64
64
|
size: "small"
|
|
65
65
|
}),
|
|
66
66
|
shouldFitContainer: true,
|
|
67
67
|
onMouseDown: onMouseDown
|
|
68
|
-
})), (0,
|
|
68
|
+
})), (0, _react.jsx)("div", {
|
|
69
69
|
css: [buttonWrapperBaseStyles, mode === 'light' ? buttonWrapperElevationLightStyles : buttonWrapperElevationDarkStyles]
|
|
70
|
-
}, (0,
|
|
70
|
+
}, (0, _react.jsx)(_standardButton.default, {
|
|
71
71
|
"aria-label": cancelButtonLabel,
|
|
72
|
-
iconBefore: (0,
|
|
72
|
+
iconBefore: (0, _react.jsx)(_cross.default, {
|
|
73
73
|
label: cancelButtonLabel,
|
|
74
74
|
size: "small"
|
|
75
75
|
}),
|
|
@@ -9,7 +9,7 @@ exports.default = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _react2 = require("@emotion/react");
|
|
13
13
|
|
|
14
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
15
|
|
|
@@ -20,10 +20,10 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
20
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
|
|
22
22
|
/** @jsx jsx */
|
|
23
|
-
var readViewContainerStyles = (0,
|
|
23
|
+
var readViewContainerStyles = (0, _react2.css)({
|
|
24
24
|
lineHeight: 1
|
|
25
25
|
});
|
|
26
|
-
var editButtonStyles = (0,
|
|
26
|
+
var editButtonStyles = (0, _react2.css)({
|
|
27
27
|
display: 'block',
|
|
28
28
|
margin: '0',
|
|
29
29
|
padding: '0',
|
|
@@ -36,7 +36,7 @@ var editButtonStyles = (0, _core.css)({
|
|
|
36
36
|
border: "2px solid ".concat("var(--ds-border-focused, ".concat(_colors.B100, ")"))
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
-
var readViewWrapperStyles = (0,
|
|
39
|
+
var readViewWrapperStyles = (0, _react2.css)({
|
|
40
40
|
display: 'inline-block',
|
|
41
41
|
boxSizing: 'border-box',
|
|
42
42
|
width: 'auto',
|
|
@@ -48,7 +48,7 @@ var readViewWrapperStyles = (0, _core.css)({
|
|
|
48
48
|
background: "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.N30, ")")
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
|
-
var readViewFitContainerWidthStyles = (0,
|
|
51
|
+
var readViewFitContainerWidthStyles = (0, _react2.css)({
|
|
52
52
|
width: '100%'
|
|
53
53
|
});
|
|
54
54
|
var DRAG_THRESHOLD = 5;
|
|
@@ -80,15 +80,15 @@ var ReadView = function ReadView(_ref) {
|
|
|
80
80
|
/* eslint-disable jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions,jsx-a11y/no-noninteractive-element-interactions */
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
return (0,
|
|
83
|
+
return (0, _react2.jsx)("div", {
|
|
84
84
|
css: readViewContainerStyles
|
|
85
|
-
}, (0,
|
|
85
|
+
}, (0, _react2.jsx)("button", {
|
|
86
86
|
css: editButtonStyles,
|
|
87
87
|
"aria-label": editButtonLabel,
|
|
88
88
|
type: "button",
|
|
89
89
|
onClick: onEditRequested,
|
|
90
90
|
ref: editButtonRef
|
|
91
|
-
}), (0,
|
|
91
|
+
}), (0, _react2.jsx)("div", {
|
|
92
92
|
css: [readViewWrapperStyles, readViewFitContainerWidth && readViewFitContainerWidthStyles],
|
|
93
93
|
onClick: onReadViewClick,
|
|
94
94
|
onMouseDown: function onMouseDown(e) {
|
package/dist/cjs/version.json
CHANGED
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import React, { useCallback, useRef, useState } from 'react';
|
|
5
|
-
import { css, jsx } from '@emotion/
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
6
6
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
7
7
|
import Field from '@atlaskit/form/Field';
|
|
8
8
|
import Form from '@atlaskit/form/Form';
|
|
@@ -20,7 +20,7 @@ const buttonStyles = css({
|
|
|
20
20
|
const analyticsAttributes = {
|
|
21
21
|
componentName: 'inlineEdit',
|
|
22
22
|
packageName: "@atlaskit/inline-edit",
|
|
23
|
-
packageVersion: "12.
|
|
23
|
+
packageVersion: "12.2.0"
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const noop = () => {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
-
import { css, jsx } from '@emotion/
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
6
6
|
import InlineDialog from '@atlaskit/inline-dialog';
|
|
7
7
|
import Textfield from '@atlaskit/textfield';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { css, jsx } from '@emotion/
|
|
2
|
+
import { css, jsx } from '@emotion/react';
|
|
3
3
|
import Button from '@atlaskit/button/standard-button';
|
|
4
4
|
import ConfirmIcon from '@atlaskit/icon/glyph/check';
|
|
5
5
|
import CancelIcon from '@atlaskit/icon/glyph/cross';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React, { useRef } from 'react';
|
|
3
|
-
import { css, jsx } from '@emotion/
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { B100, N30 } from '@atlaskit/theme/colors';
|
|
5
5
|
import { borderRadius } from './constants';
|
|
6
6
|
const readViewContainerStyles = css({
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/inline-edit.js
CHANGED
|
@@ -8,7 +8,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
8
8
|
|
|
9
9
|
/** @jsx jsx */
|
|
10
10
|
import React, { useCallback, useRef, useState } from 'react';
|
|
11
|
-
import { css, jsx } from '@emotion/
|
|
11
|
+
import { css, jsx } from '@emotion/react';
|
|
12
12
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
13
13
|
import Field from '@atlaskit/form/Field';
|
|
14
14
|
import Form from '@atlaskit/form/Form';
|
|
@@ -26,7 +26,7 @@ var buttonStyles = css({
|
|
|
26
26
|
var analyticsAttributes = {
|
|
27
27
|
componentName: 'inlineEdit',
|
|
28
28
|
packageName: "@atlaskit/inline-edit",
|
|
29
|
-
packageVersion: "12.
|
|
29
|
+
packageVersion: "12.2.0"
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
var noop = function noop() {};
|
|
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
var _excluded = ["errorMessage", "isInvalid"];
|
|
4
4
|
|
|
5
5
|
/** @jsx jsx */
|
|
6
|
-
import { css, jsx } from '@emotion/
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
7
7
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
8
8
|
import InlineDialog from '@atlaskit/inline-dialog';
|
|
9
9
|
import Textfield from '@atlaskit/textfield';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { css, jsx } from '@emotion/
|
|
2
|
+
import { css, jsx } from '@emotion/react';
|
|
3
3
|
import Button from '@atlaskit/button/standard-button';
|
|
4
4
|
import ConfirmIcon from '@atlaskit/icon/glyph/check';
|
|
5
5
|
import CancelIcon from '@atlaskit/icon/glyph/cross';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React, { useRef } from 'react';
|
|
3
|
-
import { css, jsx } from '@emotion/
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { B100, N30 } from '@atlaskit/theme/colors';
|
|
5
5
|
import { borderRadius } from './constants';
|
|
6
6
|
var readViewContainerStyles = css({
|
package/dist/esm/version.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
2
|
import { InlineEditProps } from './types';
|
|
3
|
-
declare const InlineEdit: <FieldValue extends unknown = string>(props: InlineEditProps<FieldValue>) => JSX.Element;
|
|
3
|
+
declare const InlineEdit: <FieldValue extends unknown = string>(props: InlineEditProps<FieldValue>) => jsx.JSX.Element;
|
|
4
4
|
export default InlineEdit;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
2
3
|
import { InlineEditableTextfieldProps } from './types';
|
|
3
|
-
declare const InlineEditableTextfield: (props: InlineEditableTextfieldProps) => JSX.Element;
|
|
4
|
+
declare const InlineEditableTextfield: (props: InlineEditableTextfieldProps) => jsx.JSX.Element;
|
|
4
5
|
export default InlineEditableTextfield;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
/// <reference types="react" />
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
3
4
|
import { ThemeModes } from '@atlaskit/theme/types';
|
|
4
5
|
interface ButtonsProp {
|
|
5
6
|
mode: ThemeModes;
|
|
@@ -8,5 +9,5 @@ interface ButtonsProp {
|
|
|
8
9
|
onMouseDown: () => void;
|
|
9
10
|
onCancelClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
10
11
|
}
|
|
11
|
-
declare const Buttons: ({ mode, confirmButtonLabel, cancelButtonLabel, onMouseDown, onCancelClick, }: ButtonsProp) => JSX.Element;
|
|
12
|
+
declare const Buttons: ({ mode, confirmButtonLabel, cancelButtonLabel, onMouseDown, onCancelClick, }: ButtonsProp) => jsx.JSX.Element;
|
|
12
13
|
export default Buttons;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
3
4
|
interface ReadViewProps {
|
|
4
5
|
editButtonLabel: string;
|
|
5
6
|
onEditRequested: () => void;
|
|
@@ -8,5 +9,5 @@ interface ReadViewProps {
|
|
|
8
9
|
readViewFitContainerWidth?: boolean;
|
|
9
10
|
readView: () => React.ReactNode;
|
|
10
11
|
}
|
|
11
|
-
declare const ReadView: ({ editButtonLabel, onEditRequested, postReadViewClick, editButtonRef, readViewFitContainerWidth, readView, }: ReadViewProps) => JSX.Element;
|
|
12
|
+
declare const ReadView: ({ editButtonLabel, onEditRequested, postReadViewClick, editButtonRef, readViewFitContainerWidth, readView, }: ReadViewProps) => jsx.JSX.Element;
|
|
12
13
|
export default ReadView;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/inline-edit",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.2.0",
|
|
4
4
|
"description": "An inline edit displays a custom input component that switches between reading and editing on the same page.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -29,29 +29,29 @@
|
|
|
29
29
|
"@atlaskit/codemod-utils": "^4.1.0",
|
|
30
30
|
"@atlaskit/form": "^8.5.0",
|
|
31
31
|
"@atlaskit/icon": "^21.10.0",
|
|
32
|
-
"@atlaskit/inline-dialog": "^13.
|
|
33
|
-
"@atlaskit/textfield": "^5.
|
|
34
|
-
"@atlaskit/theme": "^12.
|
|
32
|
+
"@atlaskit/inline-dialog": "^13.4.0",
|
|
33
|
+
"@atlaskit/textfield": "^5.2.0",
|
|
34
|
+
"@atlaskit/theme": "^12.2.0",
|
|
35
35
|
"@atlaskit/tokens": "^0.10.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|
|
37
|
-
"@emotion/
|
|
37
|
+
"@emotion/react": "^11.7.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"react": "^16.8.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@atlaskit/datetime-picker": "^12.
|
|
43
|
+
"@atlaskit/datetime-picker": "^12.2.0",
|
|
44
44
|
"@atlaskit/docs": "*",
|
|
45
|
-
"@atlaskit/section-message": "^6.
|
|
46
|
-
"@atlaskit/select": "^15.
|
|
45
|
+
"@atlaskit/section-message": "^6.2.0",
|
|
46
|
+
"@atlaskit/select": "^15.7.0",
|
|
47
47
|
"@atlaskit/ssr": "*",
|
|
48
|
-
"@atlaskit/tag": "^11.
|
|
49
|
-
"@atlaskit/tag-group": "^10.
|
|
48
|
+
"@atlaskit/tag": "^11.4.0",
|
|
49
|
+
"@atlaskit/tag-group": "^10.1.0",
|
|
50
50
|
"@atlaskit/textarea": "^4.3.0",
|
|
51
51
|
"@atlaskit/visual-regression": "*",
|
|
52
52
|
"@atlaskit/webdriver-runner": "*",
|
|
53
53
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
54
|
-
"@emotion/styled": "^
|
|
54
|
+
"@emotion/styled": "^11.0.0",
|
|
55
55
|
"@testing-library/dom": "^7.7.3",
|
|
56
56
|
"@testing-library/react": "^8.0.1",
|
|
57
57
|
"ast-types": "^0.13.3",
|