@atlaskit/inline-edit 14.1.1 → 14.1.2

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,13 @@
1
1
  # @atlaskit/inline-edit
2
2
 
3
+ ## 14.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#108678](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/108678)
8
+ [`b4def55c00546`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b4def55c00546) -
9
+ Update dev depedencies.
10
+
3
11
  ## 14.1.1
4
12
 
5
13
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- /* inline-edit.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* inline-edit.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -29,7 +29,7 @@ var fieldStyles = null;
29
29
  var analyticsAttributes = {
30
30
  componentName: 'inlineEdit',
31
31
  packageName: "@atlaskit/inline-edit",
32
- packageVersion: "14.1.1"
32
+ packageVersion: "14.1.2"
33
33
  };
34
34
  var InnerInlineEdit = function InnerInlineEdit(props) {
35
35
  var _props$startWithEditV = props.startWithEditViewOpen,
@@ -1,4 +1,4 @@
1
- /* inline-editable-textfield.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* inline-editable-textfield.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* buttons.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* buttons.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,6 +1,4 @@
1
1
 
2
- ._18s8ze3t{margin:var(--ds-space-0,0)}
3
- ._1yt4ze3t{padding:var(--ds-space-0,0)}
4
2
  ._2rko1sit{border-radius:var(--ds-border-radius,3px)}
5
3
  ._v564thzt{transition:background .2s}
6
4
  ._14ly1bk5:focus+div{border-width:var(--ds-border-width-outline,2px)}
@@ -13,14 +11,22 @@
13
11
  ._1xp41p6i:focus+div{border-color:var(--ds-border-focused,#388bff)}
14
12
  ._12ji1r31{outline-color:currentColor}
15
13
  ._12y3idpf{outline-width:0}
14
+ ._18u0ze3t{margin-left:var(--ds-space-0,0)}
15
+ ._19bvze3t{padding-left:var(--ds-space-0,0)}
16
+ ._19pkze3t{margin-top:var(--ds-space-0,0)}
16
17
  ._1bsb1osq{width:100%}
17
18
  ._1bsb1wug{width:auto}
18
19
  ._1e0c1o8l{display:inline-block}
19
20
  ._1e0c1ule{display:block}
20
21
  ._1qu2glyw{outline-style:none}
22
+ ._2hwxze3t{margin-right:var(--ds-space-0,0)}
21
23
  ._bfhk18uv{background-color:initial}
24
+ ._ca0qze3t{padding-top:var(--ds-space-0,0)}
25
+ ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
26
+ ._otyrze3t{margin-bottom:var(--ds-space-0,0)}
22
27
  ._p12f1osq{max-width:100%}
23
28
  ._r06hglyw{-webkit-appearance:none;appearance:none}
29
+ ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
24
30
  ._vchhusvi{box-sizing:border-box}
25
31
  ._vwz4kb7n{line-height:1}._128midpf:focus-visible{outline-width:0}
26
32
  ._mizu1r31:focus-visible{outline-color:currentColor}
@@ -1,4 +1,4 @@
1
- /* read-view.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* read-view.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  "use strict";
3
3
 
4
4
  var _typeof = require("@babel/runtime/helpers/typeof");
@@ -15,7 +15,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
15
15
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
16
  var readViewContainerStyles = null;
17
17
  var editButtonStyles = {
18
- root: "_18s8ze3t _1yt4ze3t _12ji1r31 _1qu2glyw _12y3idpf _189e1grb _1dqoglyw _1h6d1j28 _1e0c1ule _r06hglyw _bfhk18uv _vwz4kb7n _1xp41p6i _14ly1bk5 _1j8znqa1 _mizu1r31 _ra3xglyw _128midpf"
18
+ root: "_12ji1r31 _1qu2glyw _12y3idpf _189e1grb _1dqoglyw _1h6d1j28 _1e0c1ule _19pkze3t _2hwxze3t _otyrze3t _18u0ze3t _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _r06hglyw _bfhk18uv _vwz4kb7n _1xp41p6i _14ly1bk5 _1j8znqa1 _mizu1r31 _ra3xglyw _128midpf"
19
19
  };
20
20
  var readViewWrapperStyles = null;
21
21
  var readViewFitContainerWidthStyles = null;
@@ -74,4 +74,6 @@ var ReadView = function ReadView(_ref) {
74
74
  }
75
75
  }, readView()));
76
76
  };
77
+
78
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
77
79
  var _default = exports.default = ReadView;
@@ -1,4 +1,4 @@
1
- /* inline-edit.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* inline-edit.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  import "./inline-edit.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback, useRef, useState } from 'react';
@@ -15,7 +15,7 @@ const fieldStyles = null;
15
15
  const analyticsAttributes = {
16
16
  componentName: 'inlineEdit',
17
17
  packageName: "@atlaskit/inline-edit",
18
- packageVersion: "14.1.1"
18
+ packageVersion: "14.1.2"
19
19
  };
20
20
  const InnerInlineEdit = props => {
21
21
  const {
@@ -1,4 +1,4 @@
1
- /* inline-editable-textfield.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* inline-editable-textfield.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./inline-editable-textfield.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* buttons.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* buttons.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./buttons.compiled.css";
4
4
  import * as React from 'react';
@@ -1,6 +1,4 @@
1
1
 
2
- ._18s8ze3t{margin:var(--ds-space-0,0)}
3
- ._1yt4ze3t{padding:var(--ds-space-0,0)}
4
2
  ._2rko1sit{border-radius:var(--ds-border-radius,3px)}
5
3
  ._v564thzt{transition:background .2s}
6
4
  ._14ly1bk5:focus+div{border-width:var(--ds-border-width-outline,2px)}
@@ -13,14 +11,22 @@
13
11
  ._1xp41p6i:focus+div{border-color:var(--ds-border-focused,#388bff)}
14
12
  ._12ji1r31{outline-color:currentColor}
15
13
  ._12y3idpf{outline-width:0}
14
+ ._18u0ze3t{margin-left:var(--ds-space-0,0)}
15
+ ._19bvze3t{padding-left:var(--ds-space-0,0)}
16
+ ._19pkze3t{margin-top:var(--ds-space-0,0)}
16
17
  ._1bsb1osq{width:100%}
17
18
  ._1bsb1wug{width:auto}
18
19
  ._1e0c1o8l{display:inline-block}
19
20
  ._1e0c1ule{display:block}
20
21
  ._1qu2glyw{outline-style:none}
22
+ ._2hwxze3t{margin-right:var(--ds-space-0,0)}
21
23
  ._bfhk18uv{background-color:initial}
24
+ ._ca0qze3t{padding-top:var(--ds-space-0,0)}
25
+ ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
26
+ ._otyrze3t{margin-bottom:var(--ds-space-0,0)}
22
27
  ._p12f1osq{max-width:100%}
23
28
  ._r06hglyw{-webkit-appearance:none;appearance:none}
29
+ ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
24
30
  ._vchhusvi{box-sizing:border-box}
25
31
  ._vwz4kb7n{line-height:1}._128midpf:focus-visible{outline-width:0}
26
32
  ._mizu1r31:focus-visible{outline-color:currentColor}
@@ -1,4 +1,4 @@
1
- /* read-view.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* read-view.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  import "./read-view.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useRef } from 'react';
@@ -6,7 +6,7 @@ import { Pressable } from '@atlaskit/primitives/compiled';
6
6
  import { N30 } from '@atlaskit/theme/colors';
7
7
  const readViewContainerStyles = null;
8
8
  const editButtonStyles = {
9
- root: "_18s8ze3t _1yt4ze3t _12ji1r31 _1qu2glyw _12y3idpf _189e1grb _1dqoglyw _1h6d1j28 _1e0c1ule _r06hglyw _bfhk18uv _vwz4kb7n _1xp41p6i _14ly1bk5 _1j8znqa1 _mizu1r31 _ra3xglyw _128midpf"
9
+ root: "_12ji1r31 _1qu2glyw _12y3idpf _189e1grb _1dqoglyw _1h6d1j28 _1e0c1ule _19pkze3t _2hwxze3t _otyrze3t _18u0ze3t _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _r06hglyw _bfhk18uv _vwz4kb7n _1xp41p6i _14ly1bk5 _1j8znqa1 _mizu1r31 _ra3xglyw _128midpf"
10
10
  };
11
11
  const readViewWrapperStyles = null;
12
12
  const readViewFitContainerWidthStyles = null;
@@ -63,4 +63,6 @@ const ReadView = ({
63
63
  className: ax(["_2rko1sit _v564thzt _1h6d1j28 _1dqonqa1 _189e1bk5 _1e0c1o8l _vchhusvi _1bsb1wug _p12f1osq _irr314ae", readViewFitContainerWidth && "_1bsb1osq"])
64
64
  }, readView()));
65
65
  };
66
+
67
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
66
68
  export default ReadView;
@@ -1,4 +1,4 @@
1
- /* inline-edit.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* inline-edit.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import "./inline-edit.compiled.css";
@@ -19,7 +19,7 @@ var fieldStyles = null;
19
19
  var analyticsAttributes = {
20
20
  componentName: 'inlineEdit',
21
21
  packageName: "@atlaskit/inline-edit",
22
- packageVersion: "14.1.1"
22
+ packageVersion: "14.1.2"
23
23
  };
24
24
  var InnerInlineEdit = function InnerInlineEdit(props) {
25
25
  var _props$startWithEditV = props.startWithEditViewOpen,
@@ -1,4 +1,4 @@
1
- /* inline-editable-textfield.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* inline-editable-textfield.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  var _excluded = ["errorMessage", "isInvalid"];
@@ -1,4 +1,4 @@
1
- /* buttons.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* buttons.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./buttons.compiled.css";
4
4
  import * as React from 'react';
@@ -1,6 +1,4 @@
1
1
 
2
- ._18s8ze3t{margin:var(--ds-space-0,0)}
3
- ._1yt4ze3t{padding:var(--ds-space-0,0)}
4
2
  ._2rko1sit{border-radius:var(--ds-border-radius,3px)}
5
3
  ._v564thzt{transition:background .2s}
6
4
  ._14ly1bk5:focus+div{border-width:var(--ds-border-width-outline,2px)}
@@ -13,14 +11,22 @@
13
11
  ._1xp41p6i:focus+div{border-color:var(--ds-border-focused,#388bff)}
14
12
  ._12ji1r31{outline-color:currentColor}
15
13
  ._12y3idpf{outline-width:0}
14
+ ._18u0ze3t{margin-left:var(--ds-space-0,0)}
15
+ ._19bvze3t{padding-left:var(--ds-space-0,0)}
16
+ ._19pkze3t{margin-top:var(--ds-space-0,0)}
16
17
  ._1bsb1osq{width:100%}
17
18
  ._1bsb1wug{width:auto}
18
19
  ._1e0c1o8l{display:inline-block}
19
20
  ._1e0c1ule{display:block}
20
21
  ._1qu2glyw{outline-style:none}
22
+ ._2hwxze3t{margin-right:var(--ds-space-0,0)}
21
23
  ._bfhk18uv{background-color:initial}
24
+ ._ca0qze3t{padding-top:var(--ds-space-0,0)}
25
+ ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
26
+ ._otyrze3t{margin-bottom:var(--ds-space-0,0)}
22
27
  ._p12f1osq{max-width:100%}
23
28
  ._r06hglyw{-webkit-appearance:none;appearance:none}
29
+ ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
24
30
  ._vchhusvi{box-sizing:border-box}
25
31
  ._vwz4kb7n{line-height:1}._128midpf:focus-visible{outline-width:0}
26
32
  ._mizu1r31:focus-visible{outline-color:currentColor}
@@ -1,4 +1,4 @@
1
- /* read-view.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* read-view.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  import "./read-view.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useRef } from 'react';
@@ -6,7 +6,7 @@ import { Pressable } from '@atlaskit/primitives/compiled';
6
6
  import { N30 } from '@atlaskit/theme/colors';
7
7
  var readViewContainerStyles = null;
8
8
  var editButtonStyles = {
9
- root: "_18s8ze3t _1yt4ze3t _12ji1r31 _1qu2glyw _12y3idpf _189e1grb _1dqoglyw _1h6d1j28 _1e0c1ule _r06hglyw _bfhk18uv _vwz4kb7n _1xp41p6i _14ly1bk5 _1j8znqa1 _mizu1r31 _ra3xglyw _128midpf"
9
+ root: "_12ji1r31 _1qu2glyw _12y3idpf _189e1grb _1dqoglyw _1h6d1j28 _1e0c1ule _19pkze3t _2hwxze3t _otyrze3t _18u0ze3t _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _r06hglyw _bfhk18uv _vwz4kb7n _1xp41p6i _14ly1bk5 _1j8znqa1 _mizu1r31 _ra3xglyw _128midpf"
10
10
  };
11
11
  var readViewWrapperStyles = null;
12
12
  var readViewFitContainerWidthStyles = null;
@@ -65,4 +65,6 @@ var ReadView = function ReadView(_ref) {
65
65
  }
66
66
  }, readView()));
67
67
  };
68
+
69
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
68
70
  export default ReadView;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-edit",
3
- "version": "14.1.1",
3
+ "version": "14.1.2",
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/"
@@ -45,7 +45,7 @@
45
45
  "@atlaskit/primitives": "^13.3.0",
46
46
  "@atlaskit/textfield": "^6.7.0",
47
47
  "@atlaskit/theme": "^14.0.0",
48
- "@atlaskit/tokens": "^3.1.0",
48
+ "@atlaskit/tokens": "^3.2.0",
49
49
  "@atlaskit/visually-hidden": "^1.5.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@compiled/react": "^0.18.1"
@@ -59,6 +59,8 @@
59
59
  "@atlaskit/datetime-picker": "^15.11.0",
60
60
  "@atlaskit/docs": "*",
61
61
  "@atlaskit/ds-lib": "^3.3.0",
62
+ "@atlaskit/heading": "^4.0.2",
63
+ "@atlaskit/link": "*",
62
64
  "@atlaskit/section-message": "^6.8.0",
63
65
  "@atlaskit/select": "^18.9.0",
64
66
  "@atlaskit/ssr": "*",
@@ -67,14 +69,11 @@
67
69
  "@atlaskit/textarea": "^5.7.0",
68
70
  "@atlaskit/visual-regression": "*",
69
71
  "@atlassian/feature-flags-test-utils": "*",
70
- "@emotion/styled": "^11.0.0",
71
- "@testing-library/dom": "^10.1.0",
72
72
  "@testing-library/react": "^12.1.5",
73
73
  "ast-types": "^0.13.3",
74
74
  "jscodeshift": "^0.13.0",
75
75
  "react-dom": "^16.8.0",
76
76
  "react-select-event": "^5.5.0",
77
- "storybook-addon-performance": "^0.17.3",
78
77
  "typescript": "~5.4.2"
79
78
  },
80
79
  "keywords": [
@@ -1,18 +0,0 @@
1
- import React, { useState } from 'react';
2
-
3
- import Textfield from '@atlaskit/textfield';
4
-
5
- import InlineEdit from '../src';
6
-
7
- export default () => {
8
- const [editValue, setEditValue] = useState('Field value');
9
- return (
10
- <InlineEdit
11
- defaultValue={editValue}
12
- label="Inline edit"
13
- editView={(fieldProps) => <Textfield {...fieldProps} autoFocus />}
14
- readView={() => <div>{editValue || 'Click to enter value'}</div>}
15
- onConfirm={(value) => setEditValue(value)}
16
- />
17
- );
18
- };
@@ -1,50 +0,0 @@
1
- import React, { useState } from 'react';
2
-
3
- import { fireEvent } from '@testing-library/dom';
4
- import { type InteractionTaskArgs, type PublicInteractionTask } from 'storybook-addon-performance';
5
-
6
- import { type FieldProps } from '@atlaskit/form';
7
- import Textfield from '@atlaskit/textfield';
8
-
9
- import InlineEdit from '../src';
10
-
11
- const InlineEditExample = () => {
12
- const [editValue, setEditValue] = useState('Field value');
13
- const renderEditView = (fieldProps: FieldProps<any>) => <Textfield {...fieldProps} autoFocus />;
14
- const renderReadView = () => (
15
- <div data-testid="read-view">{editValue || 'Click to enter value'}</div>
16
- );
17
-
18
- return (
19
- <InlineEdit
20
- defaultValue={editValue}
21
- label="Inline edit"
22
- editView={renderEditView}
23
- readView={renderReadView}
24
- onConfirm={setEditValue}
25
- validate={() => {}}
26
- />
27
- );
28
- };
29
-
30
- const interactionTasks: PublicInteractionTask[] = [
31
- {
32
- name: 'Change inline edit status',
33
- description: 'Activate on input',
34
- run: async ({ container }: InteractionTaskArgs): Promise<void> => {
35
- const readView = container.querySelector('[data-testid="read-view"]');
36
- fireEvent.click(readView!);
37
- },
38
- },
39
- ];
40
-
41
- InlineEditExample.story = {
42
- name: 'InlineEdit Component',
43
- parameters: {
44
- performance: {
45
- interactions: interactionTasks,
46
- },
47
- },
48
- };
49
-
50
- export default InlineEditExample;
@@ -1,16 +0,0 @@
1
- import React, { useState } from 'react';
2
-
3
- import { InlineEditableTextfield } from '../src';
4
-
5
- export default () => {
6
- const [editValue, setEditValue] = useState('Field value');
7
-
8
- return (
9
- <InlineEditableTextfield
10
- defaultValue={editValue}
11
- label="Inline editable textfield"
12
- onConfirm={(value) => setEditValue(value)}
13
- placeholder="Click to enter text"
14
- />
15
- );
16
- };