@contentful/field-editor-json 4.0.8 → 4.0.9-canary.10
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.
|
@@ -66,10 +66,10 @@ const styles = {
|
|
|
66
66
|
root: (0, _css.css)({
|
|
67
67
|
cursor: 'text',
|
|
68
68
|
padding: _f36tokens.default.spacingS,
|
|
69
|
-
border: `1px solid ${_f36tokens.default.
|
|
69
|
+
border: `1px solid ${_f36tokens.default.gray400}`,
|
|
70
70
|
borderTop: 'none',
|
|
71
|
-
borderBottomLeftRadius: _f36tokens.default.
|
|
72
|
-
borderBottomRightRadius: _f36tokens.default.
|
|
71
|
+
borderBottomLeftRadius: _f36tokens.default.borderRadiusMedium,
|
|
72
|
+
borderBottomRightRadius: _f36tokens.default.borderRadiusMedium,
|
|
73
73
|
fontSize: _f36tokens.default.fontSizeM,
|
|
74
74
|
'.cm-editor': {
|
|
75
75
|
color: _f36tokens.default.gray900,
|
|
@@ -10,6 +10,7 @@ Object.defineProperty(exports, "JsonEditorToolbar", {
|
|
|
10
10
|
});
|
|
11
11
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
12
12
|
const _f36components = require("@contentful/f36-components");
|
|
13
|
+
const _f36icons = require("@contentful/f36-icons");
|
|
13
14
|
const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
|
|
14
15
|
const _css = require("@emotion/css");
|
|
15
16
|
function _interop_require_default(obj) {
|
|
@@ -59,37 +60,33 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
59
60
|
return newObj;
|
|
60
61
|
}
|
|
61
62
|
const styles = {
|
|
63
|
+
arrowButton: (0, _css.css)({
|
|
64
|
+
'& > span:first-child': {
|
|
65
|
+
paddingBottom: '2px'
|
|
66
|
+
}
|
|
67
|
+
}),
|
|
62
68
|
toolbar: (0, _css.css)({
|
|
63
69
|
display: 'flex',
|
|
64
70
|
alignItems: 'center',
|
|
65
71
|
padding: _f36tokens.default.spacingXs,
|
|
66
72
|
justifyContent: 'space-between',
|
|
67
73
|
backgroundColor: _f36tokens.default.gray100,
|
|
68
|
-
border: `1px solid ${_f36tokens.default.
|
|
69
|
-
borderTopLeftRadius: _f36tokens.default.
|
|
70
|
-
borderTopRightRadius: _f36tokens.default.
|
|
71
|
-
borderBottom: 'none'
|
|
72
|
-
}),
|
|
73
|
-
title: (0, _css.css)({
|
|
74
|
-
fontFamily: _f36tokens.default.fontStackPrimary,
|
|
75
|
-
fontSize: _f36tokens.default.fontSizeM,
|
|
76
|
-
color: _f36tokens.default.gray600
|
|
77
|
-
}),
|
|
78
|
-
actions: (0, _css.css)({
|
|
79
|
-
button: {
|
|
80
|
-
marginLeft: _f36tokens.default.spacingS
|
|
81
|
-
}
|
|
74
|
+
border: `1px solid ${_f36tokens.default.gray400}`,
|
|
75
|
+
borderTopLeftRadius: _f36tokens.default.borderRadiusMedium,
|
|
76
|
+
borderTopRightRadius: _f36tokens.default.borderRadiusMedium
|
|
82
77
|
})
|
|
83
78
|
};
|
|
84
79
|
function JsonEditorToolbar(props) {
|
|
85
80
|
return /*#__PURE__*/ _react.createElement("div", {
|
|
86
81
|
className: styles.toolbar
|
|
87
|
-
}, /*#__PURE__*/ _react.createElement(
|
|
88
|
-
|
|
89
|
-
}, "JSON Editor"), /*#__PURE__*/ _react.createElement("div", {
|
|
90
|
-
className: styles.actions
|
|
82
|
+
}, /*#__PURE__*/ _react.createElement(_f36components.Flex, {
|
|
83
|
+
alignItems: "center"
|
|
91
84
|
}, /*#__PURE__*/ _react.createElement(_f36components.Button, {
|
|
92
|
-
|
|
85
|
+
className: styles.arrowButton,
|
|
86
|
+
variant: "transparent",
|
|
87
|
+
startIcon: /*#__PURE__*/ _react.createElement(_f36icons.ArrowUUpLeftIcon, {
|
|
88
|
+
size: "small"
|
|
89
|
+
}),
|
|
93
90
|
size: "small",
|
|
94
91
|
isDisabled: props.isUndoDisabled,
|
|
95
92
|
testId: "json-editor-undo",
|
|
@@ -97,8 +94,12 @@ function JsonEditorToolbar(props) {
|
|
|
97
94
|
props.onUndo();
|
|
98
95
|
}
|
|
99
96
|
}, "Undo"), /*#__PURE__*/ _react.createElement(_f36components.Button, {
|
|
100
|
-
|
|
97
|
+
className: styles.arrowButton,
|
|
98
|
+
variant: "transparent",
|
|
101
99
|
size: "small",
|
|
100
|
+
startIcon: /*#__PURE__*/ _react.createElement(_f36icons.ArrowUUpRightIcon, {
|
|
101
|
+
size: "small"
|
|
102
|
+
}),
|
|
102
103
|
isDisabled: props.isRedoDisabled,
|
|
103
104
|
testId: "json-editor-redo",
|
|
104
105
|
onClick: ()=>{
|
|
@@ -10,10 +10,10 @@ const styles = {
|
|
|
10
10
|
root: css({
|
|
11
11
|
cursor: 'text',
|
|
12
12
|
padding: tokens.spacingS,
|
|
13
|
-
border: `1px solid ${tokens.
|
|
13
|
+
border: `1px solid ${tokens.gray400}`,
|
|
14
14
|
borderTop: 'none',
|
|
15
|
-
borderBottomLeftRadius: tokens.
|
|
16
|
-
borderBottomRightRadius: tokens.
|
|
15
|
+
borderBottomLeftRadius: tokens.borderRadiusMedium,
|
|
16
|
+
borderBottomRightRadius: tokens.borderRadiusMedium,
|
|
17
17
|
fontSize: tokens.fontSizeM,
|
|
18
18
|
'.cm-editor': {
|
|
19
19
|
color: tokens.gray900,
|
|
@@ -1,39 +1,36 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Button } from '@contentful/f36-components';
|
|
2
|
+
import { Button, Flex } from '@contentful/f36-components';
|
|
3
|
+
import { ArrowUUpLeftIcon, ArrowUUpRightIcon } from '@contentful/f36-icons';
|
|
3
4
|
import tokens from '@contentful/f36-tokens';
|
|
4
5
|
import { css } from '@emotion/css';
|
|
5
6
|
const styles = {
|
|
7
|
+
arrowButton: css({
|
|
8
|
+
'& > span:first-child': {
|
|
9
|
+
paddingBottom: '2px'
|
|
10
|
+
}
|
|
11
|
+
}),
|
|
6
12
|
toolbar: css({
|
|
7
13
|
display: 'flex',
|
|
8
14
|
alignItems: 'center',
|
|
9
15
|
padding: tokens.spacingXs,
|
|
10
16
|
justifyContent: 'space-between',
|
|
11
17
|
backgroundColor: tokens.gray100,
|
|
12
|
-
border: `1px solid ${tokens.
|
|
13
|
-
borderTopLeftRadius: tokens.
|
|
14
|
-
borderTopRightRadius: tokens.
|
|
15
|
-
borderBottom: 'none'
|
|
16
|
-
}),
|
|
17
|
-
title: css({
|
|
18
|
-
fontFamily: tokens.fontStackPrimary,
|
|
19
|
-
fontSize: tokens.fontSizeM,
|
|
20
|
-
color: tokens.gray600
|
|
21
|
-
}),
|
|
22
|
-
actions: css({
|
|
23
|
-
button: {
|
|
24
|
-
marginLeft: tokens.spacingS
|
|
25
|
-
}
|
|
18
|
+
border: `1px solid ${tokens.gray400}`,
|
|
19
|
+
borderTopLeftRadius: tokens.borderRadiusMedium,
|
|
20
|
+
borderTopRightRadius: tokens.borderRadiusMedium
|
|
26
21
|
})
|
|
27
22
|
};
|
|
28
23
|
export function JsonEditorToolbar(props) {
|
|
29
24
|
return /*#__PURE__*/ React.createElement("div", {
|
|
30
25
|
className: styles.toolbar
|
|
31
|
-
}, /*#__PURE__*/ React.createElement(
|
|
32
|
-
|
|
33
|
-
}, "JSON Editor"), /*#__PURE__*/ React.createElement("div", {
|
|
34
|
-
className: styles.actions
|
|
26
|
+
}, /*#__PURE__*/ React.createElement(Flex, {
|
|
27
|
+
alignItems: "center"
|
|
35
28
|
}, /*#__PURE__*/ React.createElement(Button, {
|
|
36
|
-
|
|
29
|
+
className: styles.arrowButton,
|
|
30
|
+
variant: "transparent",
|
|
31
|
+
startIcon: /*#__PURE__*/ React.createElement(ArrowUUpLeftIcon, {
|
|
32
|
+
size: "small"
|
|
33
|
+
}),
|
|
37
34
|
size: "small",
|
|
38
35
|
isDisabled: props.isUndoDisabled,
|
|
39
36
|
testId: "json-editor-undo",
|
|
@@ -41,8 +38,12 @@ export function JsonEditorToolbar(props) {
|
|
|
41
38
|
props.onUndo();
|
|
42
39
|
}
|
|
43
40
|
}, "Undo"), /*#__PURE__*/ React.createElement(Button, {
|
|
44
|
-
|
|
41
|
+
className: styles.arrowButton,
|
|
42
|
+
variant: "transparent",
|
|
45
43
|
size: "small",
|
|
44
|
+
startIcon: /*#__PURE__*/ React.createElement(ArrowUUpRightIcon, {
|
|
45
|
+
size: "small"
|
|
46
|
+
}),
|
|
46
47
|
isDisabled: props.isRedoDisabled,
|
|
47
48
|
testId: "json-editor-redo",
|
|
48
49
|
onClick: ()=>{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-json",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.9-canary.10+c7a44a8c",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"@codemirror/language": "^6.0.0",
|
|
39
39
|
"@codemirror/view": "^6.0.0",
|
|
40
40
|
"@contentful/f36-components": "^6.7.1",
|
|
41
|
+
"@contentful/f36-icons": "^6.7.1",
|
|
41
42
|
"@contentful/f36-tokens": "^6.1.2",
|
|
42
43
|
"@contentful/field-editor-shared": "^4.0.0",
|
|
43
44
|
"@emotion/css": "^11.13.5",
|
|
@@ -56,5 +57,5 @@
|
|
|
56
57
|
"publishConfig": {
|
|
57
58
|
"registry": "https://npm.pkg.github.com/"
|
|
58
59
|
},
|
|
59
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "c7a44a8cb5f4ed247bb5c66e8ae3d1a46de49c14"
|
|
60
61
|
}
|