@atlaskit/inline-edit 12.1.14 → 12.2.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/inline-edit
2
2
 
3
+ ## 12.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`be93a207731`](https://bitbucket.org/atlassian/atlassian-frontend/commits/be93a207731) - Action buttons now use interactive elevation design tokens. There is no change to their appearance when design tokens are not enabled.
8
+
9
+ ## 12.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`b52ffa29d19`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b52ffa29d19) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change.
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 12.1.14
4
20
 
5
21
  ### Patch Changes
@@ -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 _core = require("@emotion/core");
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, _core.css)({
44
+ var fieldStyles = (0, _react2.css)({
45
45
  maxWidth: '100%',
46
46
  position: 'relative'
47
47
  });
48
- var buttonStyles = (0, _core.css)({
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.1.14"
54
+ packageVersion: "12.2.1"
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, _core.jsx)(_readView.default, {
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, _core.jsx)(_Form.default, {
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, _core.jsx)("form", {
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, _core.jsx)(_Field.default, {
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, _core.jsx)("div", {
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, _core.jsx)(_buttons.default, {
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, _core.jsx)("button", {
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, _core.jsx)(_Field.default, {
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, _core.jsx)(_components.default.Consumer, null, function (tokens) {
263
+ return (0, _react2.jsx)(_components.default.Consumer, null, function (tokens) {
264
264
  var mode = tokens.mode;
265
- return (0, _core.jsx)(InnerInlineEdit, (0, _extends2.default)({}, props, {
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 _core = require("@emotion/core");
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, _core.css)({
29
+ var errorIconContainerStyles = (0, _react.css)({
30
30
  paddingRight: _constants.gridSize - 2,
31
31
  lineHeight: '100%'
32
32
  });
33
- var readViewForTextFieldStyles = (0, _core.css)({
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, _core.css)({
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, _core.jsx)(_inlineEdit.default, (0, _extends2.default)({}, props, {
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, _core.jsx)(_inlineDialog.default, {
58
+ return (0, _react.jsx)(_inlineDialog.default, {
59
59
  isOpen: isInvalid,
60
- content: (0, _core.jsx)("div", {
60
+ content: (0, _react.jsx)("div", {
61
61
  id: "error-message"
62
62
  }, errorMessage),
63
63
  placement: "right"
64
- }, (0, _core.jsx)(_textfield.default, (0, _extends2.default)({}, props, {
65
- elemAfterInput: isInvalid && (0, _core.jsx)("div", {
64
+ }, (0, _react.jsx)(_textfield.default, (0, _extends2.default)({}, props, {
65
+ elemAfterInput: isInvalid && (0, _react.jsx)("div", {
66
66
  css: errorIconContainerStyles
67
- }, (0, _core.jsx)(_error.default, {
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, _core.jsx)("div", {
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 _core = require("@emotion/core");
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, _core.css)({
23
+ var buttonsContainerStyles = (0, _react.css)({
24
24
  display: 'flex',
25
25
  marginTop: _constants.gridSize - 2,
26
26
  position: 'absolute',
@@ -28,13 +28,41 @@ var buttonsContainerStyles = (0, _core.css)({
28
28
  right: 0,
29
29
  flexShrink: 0
30
30
  });
31
- var buttonWrapperElevationDarkStyles = (0, _core.css)({
32
- boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(_colors.DN50A, ", 0 0 1px ").concat(_colors.DN60A), ")")
31
+ var buttonWrapperElevationDarkStyles = (0, _react.css)({
32
+ boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(_colors.DN50A, ", 0 0 1px ").concat(_colors.DN60A), ")"),
33
+ // These buttons are floating, so they need an override to overlay interaction states
34
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
35
+ '& > button': {
36
+ backgroundColor: "var(--ds-surface-overlay, ".concat(_colors.DN70, ")")
37
+ },
38
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
39
+ '& > button:hover': {
40
+ backgroundColor: "var(--ds-surface-overlay-hovered, ".concat(_colors.DN60, ")")
41
+ },
42
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
43
+ '& > button:active': {
44
+ backgroundColor: "var(--ds-surface-overlay-pressed, ".concat(_colors.B75, ")"),
45
+ color: "var(--ds-text, ".concat(_colors.B400, ")")
46
+ }
33
47
  });
34
- var buttonWrapperElevationLightStyles = (0, _core.css)({
35
- boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A), ")")
48
+ var buttonWrapperElevationLightStyles = (0, _react.css)({
49
+ boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A), ")"),
50
+ // These buttons are floating, so they need an override to overlay interaction states
51
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
52
+ '& > button': {
53
+ backgroundColor: "var(--ds-surface-overlay, ".concat(_colors.N20A, ")")
54
+ },
55
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
56
+ '& > button:hover': {
57
+ backgroundColor: "var(--ds-surface-overlay-hovered, ".concat(_colors.N30A, ")")
58
+ },
59
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
60
+ '& > button:active': {
61
+ backgroundColor: "var(--ds-surface-overlay-pressed, rgba(179, 212, 255, 0.6))",
62
+ color: "var(--ds-text, ".concat(_colors.B400, ")")
63
+ }
36
64
  });
37
- var buttonWrapperBaseStyles = (0, _core.css)({
65
+ var buttonWrapperBaseStyles = (0, _react.css)({
38
66
  boxSizing: 'border-box',
39
67
  width: _constants.gridSize * 4,
40
68
  zIndex: 200,
@@ -52,24 +80,24 @@ var Buttons = function Buttons(_ref) {
52
80
  cancelButtonLabel = _ref.cancelButtonLabel,
53
81
  onMouseDown = _ref.onMouseDown,
54
82
  onCancelClick = _ref.onCancelClick;
55
- return (0, _core.jsx)("div", {
83
+ return (0, _react.jsx)("div", {
56
84
  css: buttonsContainerStyles
57
- }, (0, _core.jsx)("div", {
85
+ }, (0, _react.jsx)("div", {
58
86
  css: [buttonWrapperBaseStyles, mode === 'light' ? buttonWrapperElevationLightStyles : buttonWrapperElevationDarkStyles]
59
- }, (0, _core.jsx)(_standardButton.default, {
87
+ }, (0, _react.jsx)(_standardButton.default, {
60
88
  "aria-label": confirmButtonLabel,
61
89
  type: "submit",
62
- iconBefore: (0, _core.jsx)(_check.default, {
90
+ iconBefore: (0, _react.jsx)(_check.default, {
63
91
  label: confirmButtonLabel,
64
92
  size: "small"
65
93
  }),
66
94
  shouldFitContainer: true,
67
95
  onMouseDown: onMouseDown
68
- })), (0, _core.jsx)("div", {
96
+ })), (0, _react.jsx)("div", {
69
97
  css: [buttonWrapperBaseStyles, mode === 'light' ? buttonWrapperElevationLightStyles : buttonWrapperElevationDarkStyles]
70
- }, (0, _core.jsx)(_standardButton.default, {
98
+ }, (0, _react.jsx)(_standardButton.default, {
71
99
  "aria-label": cancelButtonLabel,
72
- iconBefore: (0, _core.jsx)(_cross.default, {
100
+ iconBefore: (0, _react.jsx)(_cross.default, {
73
101
  label: cancelButtonLabel,
74
102
  size: "small"
75
103
  }),
@@ -9,7 +9,7 @@ exports.default = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
12
- var _core = require("@emotion/core");
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, _core.css)({
23
+ var readViewContainerStyles = (0, _react2.css)({
24
24
  lineHeight: 1
25
25
  });
26
- var editButtonStyles = (0, _core.css)({
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, _core.css)({
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, _core.css)({
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, _core.jsx)("div", {
83
+ return (0, _react2.jsx)("div", {
84
84
  css: readViewContainerStyles
85
- }, (0, _core.jsx)("button", {
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, _core.jsx)("div", {
91
+ }), (0, _react2.jsx)("div", {
92
92
  css: [readViewWrapperStyles, readViewFitContainerWidth && readViewFitContainerWidthStyles],
93
93
  onClick: onReadViewClick,
94
94
  onMouseDown: function onMouseDown(e) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-edit",
3
- "version": "12.1.14",
3
+ "version": "12.2.1",
4
4
  "sideEffects": false
5
5
  }
@@ -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/core';
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.1.14"
23
+ packageVersion: "12.2.1"
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/core';
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,9 +1,9 @@
1
1
  /** @jsx jsx */
2
- import { css, jsx } from '@emotion/core';
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';
6
- import { DN50A, DN60A, N0, N50A, N60A } from '@atlaskit/theme/colors';
6
+ import { B400, B75, DN50A, DN60, DN60A, DN70, N0, N20A, N30A, N50A, N60A } from '@atlaskit/theme/colors';
7
7
  import { fontSize, gridSize } from './constants';
8
8
  const buttonsContainerStyles = css({
9
9
  display: 'flex',
@@ -14,10 +14,38 @@ const buttonsContainerStyles = css({
14
14
  flexShrink: 0
15
15
  });
16
16
  const buttonWrapperElevationDarkStyles = css({
17
- boxShadow: `var(--ds-shadow-overlay, ${`0 4px 8px -2px ${DN50A}, 0 0 1px ${DN60A}`})`
17
+ boxShadow: `var(--ds-shadow-overlay, ${`0 4px 8px -2px ${DN50A}, 0 0 1px ${DN60A}`})`,
18
+ // These buttons are floating, so they need an override to overlay interaction states
19
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
20
+ '& > button': {
21
+ backgroundColor: `var(--ds-surface-overlay, ${DN70})`
22
+ },
23
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
24
+ '& > button:hover': {
25
+ backgroundColor: `var(--ds-surface-overlay-hovered, ${DN60})`
26
+ },
27
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
28
+ '& > button:active': {
29
+ backgroundColor: `var(--ds-surface-overlay-pressed, ${B75})`,
30
+ color: `var(--ds-text, ${B400})`
31
+ }
18
32
  });
19
33
  const buttonWrapperElevationLightStyles = css({
20
- boxShadow: `var(--ds-shadow-overlay, ${`0 4px 8px -2px ${N50A}, 0 0 1px ${N60A}`})`
34
+ boxShadow: `var(--ds-shadow-overlay, ${`0 4px 8px -2px ${N50A}, 0 0 1px ${N60A}`})`,
35
+ // These buttons are floating, so they need an override to overlay interaction states
36
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
37
+ '& > button': {
38
+ backgroundColor: `var(--ds-surface-overlay, ${N20A})`
39
+ },
40
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
41
+ '& > button:hover': {
42
+ backgroundColor: `var(--ds-surface-overlay-hovered, ${N30A})`
43
+ },
44
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
45
+ '& > button:active': {
46
+ backgroundColor: "var(--ds-surface-overlay-pressed, rgba(179, 212, 255, 0.6))",
47
+ color: `var(--ds-text, ${B400})`
48
+ }
21
49
  });
22
50
  const buttonWrapperBaseStyles = css({
23
51
  boxSizing: 'border-box',
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React, { useRef } from 'react';
3
- import { css, jsx } from '@emotion/core';
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({
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-edit",
3
- "version": "12.1.14",
3
+ "version": "12.2.1",
4
4
  "sideEffects": false
5
5
  }
@@ -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/core';
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.1.14"
29
+ packageVersion: "12.2.1"
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/core';
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,9 +1,9 @@
1
1
  /** @jsx jsx */
2
- import { css, jsx } from '@emotion/core';
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';
6
- import { DN50A, DN60A, N0, N50A, N60A } from '@atlaskit/theme/colors';
6
+ import { B400, B75, DN50A, DN60, DN60A, DN70, N0, N20A, N30A, N50A, N60A } from '@atlaskit/theme/colors';
7
7
  import { fontSize, gridSize } from './constants';
8
8
  var buttonsContainerStyles = css({
9
9
  display: 'flex',
@@ -14,10 +14,38 @@ var buttonsContainerStyles = css({
14
14
  flexShrink: 0
15
15
  });
16
16
  var buttonWrapperElevationDarkStyles = css({
17
- boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(DN50A, ", 0 0 1px ").concat(DN60A), ")")
17
+ boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(DN50A, ", 0 0 1px ").concat(DN60A), ")"),
18
+ // These buttons are floating, so they need an override to overlay interaction states
19
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
20
+ '& > button': {
21
+ backgroundColor: "var(--ds-surface-overlay, ".concat(DN70, ")")
22
+ },
23
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
24
+ '& > button:hover': {
25
+ backgroundColor: "var(--ds-surface-overlay-hovered, ".concat(DN60, ")")
26
+ },
27
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
28
+ '& > button:active': {
29
+ backgroundColor: "var(--ds-surface-overlay-pressed, ".concat(B75, ")"),
30
+ color: "var(--ds-text, ".concat(B400, ")")
31
+ }
18
32
  });
19
33
  var buttonWrapperElevationLightStyles = css({
20
- boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(N50A, ", 0 0 1px ").concat(N60A), ")")
34
+ boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(N50A, ", 0 0 1px ").concat(N60A), ")"),
35
+ // These buttons are floating, so they need an override to overlay interaction states
36
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
37
+ '& > button': {
38
+ backgroundColor: "var(--ds-surface-overlay, ".concat(N20A, ")")
39
+ },
40
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
41
+ '& > button:hover': {
42
+ backgroundColor: "var(--ds-surface-overlay-hovered, ".concat(N30A, ")")
43
+ },
44
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
45
+ '& > button:active': {
46
+ backgroundColor: "var(--ds-surface-overlay-pressed, rgba(179, 212, 255, 0.6))",
47
+ color: "var(--ds-text, ".concat(B400, ")")
48
+ }
21
49
  });
22
50
  var buttonWrapperBaseStyles = css({
23
51
  boxSizing: 'border-box',
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React, { useRef } from 'react';
3
- import { css, jsx } from '@emotion/core';
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({
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-edit",
3
- "version": "12.1.14",
3
+ "version": "12.2.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
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
- /// <reference types="react" />
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.1.14",
3
+ "version": "12.2.1",
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,31 +29,31 @@
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.3.0",
33
- "@atlaskit/textfield": "^5.1.0",
34
- "@atlaskit/theme": "^12.1.0",
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/core": "^10.0.9"
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.1.0",
43
+ "@atlaskit/datetime-picker": "^12.2.0",
44
44
  "@atlaskit/docs": "*",
45
- "@atlaskit/section-message": "^6.1.0",
46
- "@atlaskit/select": "^15.6.0",
45
+ "@atlaskit/section-message": "^6.2.0",
46
+ "@atlaskit/select": "^15.7.0",
47
47
  "@atlaskit/ssr": "*",
48
- "@atlaskit/tag": "^11.3.0",
49
- "@atlaskit/tag-group": "^10.0.0",
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": "^10.0.7",
55
- "@testing-library/dom": "^7.7.3",
56
- "@testing-library/react": "^8.0.1",
54
+ "@emotion/styled": "^11.0.0",
55
+ "@testing-library/dom": "^8.17.1",
56
+ "@testing-library/react": "^12.1.5",
57
57
  "ast-types": "^0.13.3",
58
58
  "jscodeshift": "^0.13.0",
59
59
  "react-dom": "^16.8.0",