@contentful/field-editor-json 4.0.7 → 4.0.9-canary.8
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) {
|
|
@@ -65,31 +66,21 @@ const styles = {
|
|
|
65
66
|
padding: _f36tokens.default.spacingXs,
|
|
66
67
|
justifyContent: 'space-between',
|
|
67
68
|
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
|
-
}
|
|
69
|
+
border: `1px solid ${_f36tokens.default.gray400}`,
|
|
70
|
+
borderTopLeftRadius: _f36tokens.default.borderRadiusMedium,
|
|
71
|
+
borderTopRightRadius: _f36tokens.default.borderRadiusMedium
|
|
82
72
|
})
|
|
83
73
|
};
|
|
84
74
|
function JsonEditorToolbar(props) {
|
|
85
75
|
return /*#__PURE__*/ _react.createElement("div", {
|
|
86
76
|
className: styles.toolbar
|
|
87
|
-
}, /*#__PURE__*/ _react.createElement(
|
|
88
|
-
|
|
89
|
-
}, "JSON Editor"), /*#__PURE__*/ _react.createElement("div", {
|
|
90
|
-
className: styles.actions
|
|
77
|
+
}, /*#__PURE__*/ _react.createElement(_f36components.Flex, {
|
|
78
|
+
alignItems: "center"
|
|
91
79
|
}, /*#__PURE__*/ _react.createElement(_f36components.Button, {
|
|
92
|
-
variant: "
|
|
80
|
+
variant: "transparent",
|
|
81
|
+
startIcon: /*#__PURE__*/ _react.createElement(_f36icons.ArrowCounterClockwiseIcon, {
|
|
82
|
+
size: "small"
|
|
83
|
+
}),
|
|
93
84
|
size: "small",
|
|
94
85
|
isDisabled: props.isUndoDisabled,
|
|
95
86
|
testId: "json-editor-undo",
|
|
@@ -97,8 +88,11 @@ function JsonEditorToolbar(props) {
|
|
|
97
88
|
props.onUndo();
|
|
98
89
|
}
|
|
99
90
|
}, "Undo"), /*#__PURE__*/ _react.createElement(_f36components.Button, {
|
|
100
|
-
variant: "
|
|
91
|
+
variant: "transparent",
|
|
101
92
|
size: "small",
|
|
93
|
+
startIcon: /*#__PURE__*/ _react.createElement(_f36icons.ArrowClockwiseIcon, {
|
|
94
|
+
size: "small"
|
|
95
|
+
}),
|
|
102
96
|
isDisabled: props.isRedoDisabled,
|
|
103
97
|
testId: "json-editor-redo",
|
|
104
98
|
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,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Button } from '@contentful/f36-components';
|
|
2
|
+
import { Button, Flex } from '@contentful/f36-components';
|
|
3
|
+
import { ArrowCounterClockwiseIcon, ArrowClockwiseIcon } from '@contentful/f36-icons';
|
|
3
4
|
import tokens from '@contentful/f36-tokens';
|
|
4
5
|
import { css } from '@emotion/css';
|
|
5
6
|
const styles = {
|
|
@@ -9,31 +10,21 @@ const styles = {
|
|
|
9
10
|
padding: tokens.spacingXs,
|
|
10
11
|
justifyContent: 'space-between',
|
|
11
12
|
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
|
-
}
|
|
13
|
+
border: `1px solid ${tokens.gray400}`,
|
|
14
|
+
borderTopLeftRadius: tokens.borderRadiusMedium,
|
|
15
|
+
borderTopRightRadius: tokens.borderRadiusMedium
|
|
26
16
|
})
|
|
27
17
|
};
|
|
28
18
|
export function JsonEditorToolbar(props) {
|
|
29
19
|
return /*#__PURE__*/ React.createElement("div", {
|
|
30
20
|
className: styles.toolbar
|
|
31
|
-
}, /*#__PURE__*/ React.createElement(
|
|
32
|
-
|
|
33
|
-
}, "JSON Editor"), /*#__PURE__*/ React.createElement("div", {
|
|
34
|
-
className: styles.actions
|
|
21
|
+
}, /*#__PURE__*/ React.createElement(Flex, {
|
|
22
|
+
alignItems: "center"
|
|
35
23
|
}, /*#__PURE__*/ React.createElement(Button, {
|
|
36
|
-
variant: "
|
|
24
|
+
variant: "transparent",
|
|
25
|
+
startIcon: /*#__PURE__*/ React.createElement(ArrowCounterClockwiseIcon, {
|
|
26
|
+
size: "small"
|
|
27
|
+
}),
|
|
37
28
|
size: "small",
|
|
38
29
|
isDisabled: props.isUndoDisabled,
|
|
39
30
|
testId: "json-editor-undo",
|
|
@@ -41,8 +32,11 @@ export function JsonEditorToolbar(props) {
|
|
|
41
32
|
props.onUndo();
|
|
42
33
|
}
|
|
43
34
|
}, "Undo"), /*#__PURE__*/ React.createElement(Button, {
|
|
44
|
-
variant: "
|
|
35
|
+
variant: "transparent",
|
|
45
36
|
size: "small",
|
|
37
|
+
startIcon: /*#__PURE__*/ React.createElement(ArrowClockwiseIcon, {
|
|
38
|
+
size: "small"
|
|
39
|
+
}),
|
|
46
40
|
isDisabled: props.isRedoDisabled,
|
|
47
41
|
testId: "json-editor-redo",
|
|
48
42
|
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.8+9399fc74",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -38,15 +38,16 @@
|
|
|
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
|
-
"@contentful/field-editor-shared": "^
|
|
43
|
+
"@contentful/field-editor-shared": "^4.0.0",
|
|
43
44
|
"@emotion/css": "^11.13.5",
|
|
44
45
|
"@types/react-codemirror": "1.0.11",
|
|
45
46
|
"@uiw/react-codemirror": "^4.11.4",
|
|
46
47
|
"lodash": "^4.17.15"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
|
-
"@contentful/field-editor-test-utils": "^
|
|
50
|
+
"@contentful/field-editor-test-utils": "^3.0.0",
|
|
50
51
|
"@lingui/core": "5.3.0"
|
|
51
52
|
},
|
|
52
53
|
"peerDependencies": {
|
|
@@ -56,5 +57,5 @@
|
|
|
56
57
|
"publishConfig": {
|
|
57
58
|
"registry": "https://npm.pkg.github.com/"
|
|
58
59
|
},
|
|
59
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "9399fc74f3b68d561e14ca82e6749c28b5b94aea"
|
|
60
61
|
}
|