@atlaskit/inline-edit 12.3.2 → 12.3.4
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 +12 -0
- package/dist/cjs/inline-edit.js +1 -1
- package/dist/cjs/inline-editable-textfield.js +2 -2
- package/dist/cjs/internal/buttons.js +4 -4
- package/dist/cjs/internal/constants.js +1 -3
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/inline-edit.js +1 -1
- package/dist/es2019/inline-editable-textfield.js +3 -3
- package/dist/es2019/internal/buttons.js +5 -5
- package/dist/es2019/internal/constants.js +1 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/inline-edit.js +1 -1
- package/dist/esm/inline-editable-textfield.js +3 -3
- package/dist/esm/internal/buttons.js +5 -5
- package/dist/esm/internal/constants.js +1 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/internal/constants.d.ts +0 -1
- package/dist/types-ts4.5/internal/constants.d.ts +0 -1
- package/package.json +8 -8
- package/tmp/api-report-tmp.d.ts +62 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/inline-edit
|
|
2
2
|
|
|
3
|
+
## 12.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`599bfe90ee3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/599bfe90ee3) - Internal change to use shape tokens. There is no expected visual change.
|
|
8
|
+
|
|
9
|
+
## 12.3.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`49b08bfdf5f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/49b08bfdf5f) - Migrated use of `gridSize` to space tokens where possible. There is no expected visual or behaviour change.
|
|
14
|
+
|
|
3
15
|
## 12.3.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/cjs/inline-edit.js
CHANGED
|
@@ -32,7 +32,7 @@ var buttonStyles = (0, _react2.css)({
|
|
|
32
32
|
var analyticsAttributes = {
|
|
33
33
|
componentName: 'inlineEdit',
|
|
34
34
|
packageName: "@atlaskit/inline-edit",
|
|
35
|
-
packageVersion: "12.3.
|
|
35
|
+
packageVersion: "12.3.4"
|
|
36
36
|
};
|
|
37
37
|
var noop = function noop() {};
|
|
38
38
|
var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
@@ -23,10 +23,10 @@ var errorIconContainerStyles = (0, _react.css)({
|
|
|
23
23
|
var readViewForTextFieldStyles = (0, _react.css)({
|
|
24
24
|
display: 'flex',
|
|
25
25
|
maxWidth: '100%',
|
|
26
|
-
minHeight: "".concat(
|
|
26
|
+
minHeight: "".concat(8 * 2.5 / _constants.fontSize, "em"),
|
|
27
27
|
padding: "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-075, 6px)"),
|
|
28
28
|
fontSize: _constants.fontSize,
|
|
29
|
-
lineHeight:
|
|
29
|
+
lineHeight: 8 * 2.5 / _constants.fontSize,
|
|
30
30
|
wordBreak: 'break-word'
|
|
31
31
|
});
|
|
32
32
|
var compactStyles = (0, _react.css)({
|
|
@@ -17,9 +17,9 @@ var buttonsContainerStyles = (0, _react.css)({
|
|
|
17
17
|
display: 'flex',
|
|
18
18
|
marginTop: "var(--ds-space-075, 6px)",
|
|
19
19
|
position: 'absolute',
|
|
20
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
20
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
21
21
|
top: '100%',
|
|
22
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
22
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
23
23
|
right: 0,
|
|
24
24
|
flexShrink: 0
|
|
25
25
|
});
|
|
@@ -59,10 +59,10 @@ var buttonWrapperElevationLightStyles = (0, _react.css)({
|
|
|
59
59
|
});
|
|
60
60
|
var buttonWrapperBaseStyles = (0, _react.css)({
|
|
61
61
|
boxSizing: 'border-box',
|
|
62
|
-
width:
|
|
62
|
+
width: "var(--ds-space-400, 32px)",
|
|
63
63
|
zIndex: 200,
|
|
64
64
|
backgroundColor: "var(--ds-surface-overlay, ".concat(_colors.N0, ")"),
|
|
65
|
-
borderRadius:
|
|
65
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
66
66
|
fontSize: _constants.fontSize,
|
|
67
67
|
'&:last-child': {
|
|
68
68
|
marginLeft: "var(--ds-space-050, 4px)"
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.fontSize = exports.borderRadius = void 0;
|
|
7
7
|
var _constants = require("@atlaskit/theme/constants");
|
|
8
|
-
var gridSize = (0, _constants.gridSize)();
|
|
9
|
-
exports.gridSize = gridSize;
|
|
10
8
|
var fontSize = (0, _constants.fontSize)();
|
|
11
9
|
exports.fontSize = fontSize;
|
|
12
10
|
var borderRadius = (0, _constants.borderRadius)();
|
package/dist/cjs/version.json
CHANGED
|
@@ -6,7 +6,7 @@ import InlineDialog from '@atlaskit/inline-dialog';
|
|
|
6
6
|
import Textfield from '@atlaskit/textfield';
|
|
7
7
|
import { R400 } from '@atlaskit/theme/colors';
|
|
8
8
|
import InlineEdit from './inline-edit';
|
|
9
|
-
import { fontSize
|
|
9
|
+
import { fontSize } from './internal/constants';
|
|
10
10
|
const errorIconContainerStyles = css({
|
|
11
11
|
paddingRight: "var(--ds-space-075, 6px)",
|
|
12
12
|
lineHeight: '100%'
|
|
@@ -14,10 +14,10 @@ const errorIconContainerStyles = css({
|
|
|
14
14
|
const readViewForTextFieldStyles = css({
|
|
15
15
|
display: 'flex',
|
|
16
16
|
maxWidth: '100%',
|
|
17
|
-
minHeight: `${
|
|
17
|
+
minHeight: `${8 * 2.5 / fontSize}em`,
|
|
18
18
|
padding: `${"var(--ds-space-100, 8px)"} ${"var(--ds-space-075, 6px)"}`,
|
|
19
19
|
fontSize: fontSize,
|
|
20
|
-
lineHeight:
|
|
20
|
+
lineHeight: 8 * 2.5 / fontSize,
|
|
21
21
|
wordBreak: 'break-word'
|
|
22
22
|
});
|
|
23
23
|
const compactStyles = css({
|
|
@@ -5,14 +5,14 @@ import Button from '@atlaskit/button/standard-button';
|
|
|
5
5
|
import ConfirmIcon from '@atlaskit/icon/glyph/check';
|
|
6
6
|
import CancelIcon from '@atlaskit/icon/glyph/cross';
|
|
7
7
|
import { B400, B75, DN50A, DN60, DN60A, DN70, N0, N20A, N30A, N50A, N60A } from '@atlaskit/theme/colors';
|
|
8
|
-
import { fontSize
|
|
8
|
+
import { fontSize } from './constants';
|
|
9
9
|
const buttonsContainerStyles = css({
|
|
10
10
|
display: 'flex',
|
|
11
11
|
marginTop: "var(--ds-space-075, 6px)",
|
|
12
12
|
position: 'absolute',
|
|
13
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
13
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
14
14
|
top: '100%',
|
|
15
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
15
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
16
16
|
right: 0,
|
|
17
17
|
flexShrink: 0
|
|
18
18
|
});
|
|
@@ -52,10 +52,10 @@ const buttonWrapperElevationLightStyles = css({
|
|
|
52
52
|
});
|
|
53
53
|
const buttonWrapperBaseStyles = css({
|
|
54
54
|
boxSizing: 'border-box',
|
|
55
|
-
width:
|
|
55
|
+
width: "var(--ds-space-400, 32px)",
|
|
56
56
|
zIndex: 200,
|
|
57
57
|
backgroundColor: `var(--ds-surface-overlay, ${N0})`,
|
|
58
|
-
borderRadius:
|
|
58
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
59
59
|
fontSize: fontSize,
|
|
60
60
|
'&:last-child': {
|
|
61
61
|
marginLeft: "var(--ds-space-050, 4px)"
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { borderRadius as getBorderRadius, fontSize as getFontSize
|
|
2
|
-
export const gridSize = getGridSize();
|
|
1
|
+
import { borderRadius as getBorderRadius, fontSize as getFontSize } from '@atlaskit/theme/constants';
|
|
3
2
|
export const fontSize = getFontSize();
|
|
4
3
|
export const borderRadius = getBorderRadius();
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/inline-edit.js
CHANGED
|
@@ -23,7 +23,7 @@ var buttonStyles = css({
|
|
|
23
23
|
var analyticsAttributes = {
|
|
24
24
|
componentName: 'inlineEdit',
|
|
25
25
|
packageName: "@atlaskit/inline-edit",
|
|
26
|
-
packageVersion: "12.3.
|
|
26
|
+
packageVersion: "12.3.4"
|
|
27
27
|
};
|
|
28
28
|
var noop = function noop() {};
|
|
29
29
|
var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
@@ -8,7 +8,7 @@ import InlineDialog from '@atlaskit/inline-dialog';
|
|
|
8
8
|
import Textfield from '@atlaskit/textfield';
|
|
9
9
|
import { R400 } from '@atlaskit/theme/colors';
|
|
10
10
|
import InlineEdit from './inline-edit';
|
|
11
|
-
import { fontSize
|
|
11
|
+
import { fontSize } from './internal/constants';
|
|
12
12
|
var errorIconContainerStyles = css({
|
|
13
13
|
paddingRight: "var(--ds-space-075, 6px)",
|
|
14
14
|
lineHeight: '100%'
|
|
@@ -16,10 +16,10 @@ var errorIconContainerStyles = css({
|
|
|
16
16
|
var readViewForTextFieldStyles = css({
|
|
17
17
|
display: 'flex',
|
|
18
18
|
maxWidth: '100%',
|
|
19
|
-
minHeight: "".concat(
|
|
19
|
+
minHeight: "".concat(8 * 2.5 / fontSize, "em"),
|
|
20
20
|
padding: "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-075, 6px)"),
|
|
21
21
|
fontSize: fontSize,
|
|
22
|
-
lineHeight:
|
|
22
|
+
lineHeight: 8 * 2.5 / fontSize,
|
|
23
23
|
wordBreak: 'break-word'
|
|
24
24
|
});
|
|
25
25
|
var compactStyles = css({
|
|
@@ -5,14 +5,14 @@ import Button from '@atlaskit/button/standard-button';
|
|
|
5
5
|
import ConfirmIcon from '@atlaskit/icon/glyph/check';
|
|
6
6
|
import CancelIcon from '@atlaskit/icon/glyph/cross';
|
|
7
7
|
import { B400, B75, DN50A, DN60, DN60A, DN70, N0, N20A, N30A, N50A, N60A } from '@atlaskit/theme/colors';
|
|
8
|
-
import { fontSize
|
|
8
|
+
import { fontSize } from './constants';
|
|
9
9
|
var buttonsContainerStyles = css({
|
|
10
10
|
display: 'flex',
|
|
11
11
|
marginTop: "var(--ds-space-075, 6px)",
|
|
12
12
|
position: 'absolute',
|
|
13
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
13
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
14
14
|
top: '100%',
|
|
15
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
15
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
16
16
|
right: 0,
|
|
17
17
|
flexShrink: 0
|
|
18
18
|
});
|
|
@@ -52,10 +52,10 @@ var buttonWrapperElevationLightStyles = css({
|
|
|
52
52
|
});
|
|
53
53
|
var buttonWrapperBaseStyles = css({
|
|
54
54
|
boxSizing: 'border-box',
|
|
55
|
-
width:
|
|
55
|
+
width: "var(--ds-space-400, 32px)",
|
|
56
56
|
zIndex: 200,
|
|
57
57
|
backgroundColor: "var(--ds-surface-overlay, ".concat(N0, ")"),
|
|
58
|
-
borderRadius:
|
|
58
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
59
59
|
fontSize: fontSize,
|
|
60
60
|
'&:last-child': {
|
|
61
61
|
marginLeft: "var(--ds-space-050, 4px)"
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { borderRadius as getBorderRadius, fontSize as getFontSize
|
|
2
|
-
export var gridSize = getGridSize();
|
|
1
|
+
import { borderRadius as getBorderRadius, fontSize as getFontSize } from '@atlaskit/theme/constants';
|
|
3
2
|
export var fontSize = getFontSize();
|
|
4
3
|
export var borderRadius = getBorderRadius();
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/inline-edit",
|
|
3
|
-
"version": "12.3.
|
|
3
|
+
"version": "12.3.4",
|
|
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/"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"homepage": "https://atlassian.design/components/inline-edit/",
|
|
26
26
|
"atlassian": {
|
|
27
27
|
"team": "Design System Team",
|
|
28
|
-
"releaseModel": "
|
|
28
|
+
"releaseModel": "continuous",
|
|
29
29
|
"website": {
|
|
30
30
|
"name": "Inline edit",
|
|
31
31
|
"category": "Components"
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
36
|
-
"@atlaskit/button": "^16.
|
|
36
|
+
"@atlaskit/button": "^16.8.0",
|
|
37
37
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
38
38
|
"@atlaskit/form": "^8.11.0",
|
|
39
39
|
"@atlaskit/icon": "^21.12.0",
|
|
40
40
|
"@atlaskit/inline-dialog": "^13.6.0",
|
|
41
|
-
"@atlaskit/textfield": "^5.
|
|
41
|
+
"@atlaskit/textfield": "^5.5.0",
|
|
42
42
|
"@atlaskit/theme": "^12.5.0",
|
|
43
|
-
"@atlaskit/tokens": "^1.
|
|
43
|
+
"@atlaskit/tokens": "^1.11.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"@emotion/react": "^11.7.1"
|
|
46
46
|
},
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"react": "^16.8.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@atlaskit/datetime-picker": "^12.
|
|
51
|
+
"@atlaskit/datetime-picker": "^12.7.0",
|
|
52
52
|
"@atlaskit/docs": "*",
|
|
53
53
|
"@atlaskit/section-message": "^6.4.0",
|
|
54
|
-
"@atlaskit/select": "^16.
|
|
54
|
+
"@atlaskit/select": "^16.5.0",
|
|
55
55
|
"@atlaskit/ssr": "*",
|
|
56
56
|
"@atlaskit/tag": "^11.5.0",
|
|
57
57
|
"@atlaskit/tag-group": "^10.2.0",
|
|
58
|
-
"@atlaskit/textarea": "^4.
|
|
58
|
+
"@atlaskit/textarea": "^4.7.0",
|
|
59
59
|
"@atlaskit/visual-regression": "*",
|
|
60
60
|
"@atlaskit/webdriver-runner": "*",
|
|
61
61
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/inline-edit"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { FieldProps } from '@atlaskit/form';
|
|
8
|
+
import { jsx } from '@emotion/react';
|
|
9
|
+
import { default as React_2 } from 'react';
|
|
10
|
+
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
11
|
+
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
12
|
+
|
|
13
|
+
// @public (undocumented)
|
|
14
|
+
interface CommonProps extends WithAnalyticsEventsProps {
|
|
15
|
+
analyticsContext?: Record<string, any>;
|
|
16
|
+
cancelButtonLabel?: string;
|
|
17
|
+
confirmButtonLabel?: string;
|
|
18
|
+
defaultValue: any;
|
|
19
|
+
editButtonLabel?: string;
|
|
20
|
+
hideActionButtons?: boolean;
|
|
21
|
+
isRequired?: boolean;
|
|
22
|
+
keepEditViewOpenOnBlur?: boolean;
|
|
23
|
+
label?: string;
|
|
24
|
+
onCancel?: () => void;
|
|
25
|
+
readViewFitContainerWidth?: boolean;
|
|
26
|
+
startWithEditViewOpen?: boolean;
|
|
27
|
+
validate?: (value: any, formState: {}, fieldState: {}) => Promise<string | void> | string | void;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// @public (undocumented)
|
|
31
|
+
interface ExtendedFieldProps<FieldValue> extends FieldProps<FieldValue> {
|
|
32
|
+
// (undocumented)
|
|
33
|
+
errorMessage?: string | undefined;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// @public (undocumented)
|
|
37
|
+
const InlineEdit: <FieldValue extends unknown = string>(props: InlineEditProps<FieldValue>) => jsx.JSX.Element;
|
|
38
|
+
export default InlineEdit;
|
|
39
|
+
|
|
40
|
+
// @public (undocumented)
|
|
41
|
+
export const InlineEditableTextfield: (props: InlineEditableTextfieldProps) => jsx.JSX.Element;
|
|
42
|
+
|
|
43
|
+
// @public (undocumented)
|
|
44
|
+
export interface InlineEditableTextfieldProps extends CommonProps {
|
|
45
|
+
isCompact?: boolean;
|
|
46
|
+
onConfirm: (value: string, analyticsEvent: UIAnalyticsEvent) => void;
|
|
47
|
+
placeholder: string;
|
|
48
|
+
testId?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// @public (undocumented)
|
|
52
|
+
export interface InlineEditProps<FieldValue> extends CommonProps {
|
|
53
|
+
editView: (fieldProps: ExtendedFieldProps<FieldValue>, ref: React_2.RefObject<any>) => React_2.ReactNode;
|
|
54
|
+
isEditing?: boolean;
|
|
55
|
+
onConfirm: (value: any, analyticsEvent: UIAnalyticsEvent) => void;
|
|
56
|
+
onEdit?: () => void;
|
|
57
|
+
readView: () => React_2.ReactNode;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// (No @packageDocumentation comment for this package)
|
|
61
|
+
|
|
62
|
+
```
|