@contentful/field-editor-shared 3.0.1 → 3.0.2-canary.9
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/dist/cjs/CharCounter.js +3 -3
- package/dist/cjs/LocalePublishingEntityStatusBadge/LocalePublishingPopover.js +6 -6
- package/dist/cjs/ReleaseEntityStatusBadge/ReleaseEntityStatusPopover.js +7 -7
- package/dist/esm/CharCounter.js +1 -1
- package/dist/esm/LocalePublishingEntityStatusBadge/LocalePublishingPopover.js +1 -1
- package/dist/esm/ReleaseEntityStatusBadge/ReleaseEntityStatusPopover.js +1 -1
- package/package.json +2 -2
package/dist/cjs/CharCounter.js
CHANGED
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "CharCounter", {
|
|
|
10
10
|
});
|
|
11
11
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
12
12
|
const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
|
|
13
|
-
const
|
|
13
|
+
const _css = require("@emotion/css");
|
|
14
14
|
function _interop_require_default(obj) {
|
|
15
15
|
return obj && obj.__esModule ? obj : {
|
|
16
16
|
default: obj
|
|
@@ -58,7 +58,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
58
58
|
return newObj;
|
|
59
59
|
}
|
|
60
60
|
const styles = {
|
|
61
|
-
invalid: (0,
|
|
61
|
+
invalid: (0, _css.css)({
|
|
62
62
|
color: _f36tokens.default.red600
|
|
63
63
|
})
|
|
64
64
|
};
|
|
@@ -70,7 +70,7 @@ function CharCounter(props) {
|
|
|
70
70
|
const valid = count === 0 || props.checkConstraint(count);
|
|
71
71
|
return /*#__PURE__*/ _react.createElement("span", {
|
|
72
72
|
"data-status-code": valid ? null : 'invalid-size',
|
|
73
|
-
className: (0,
|
|
73
|
+
className: (0, _css.cx)({
|
|
74
74
|
[styles.invalid]: !valid
|
|
75
75
|
})
|
|
76
76
|
}, count, " characters");
|
|
@@ -12,7 +12,7 @@ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
|
12
12
|
const _f36components = require("@contentful/f36-components");
|
|
13
13
|
const _f36icons = require("@contentful/f36-icons");
|
|
14
14
|
const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
|
|
15
|
-
const
|
|
15
|
+
const _css = require("@emotion/css");
|
|
16
16
|
const _entityHelpers = /*#__PURE__*/ _interop_require_wildcard(require("../utils/entityHelpers"));
|
|
17
17
|
const _LocalePublishingStatusList = require("./LocalePublishingStatusList");
|
|
18
18
|
const _ScheduledBanner = require("./ScheduledBanner");
|
|
@@ -99,7 +99,7 @@ const getColor = ({ secondary, tertiary, isHover })=>{
|
|
|
99
99
|
return isHover ? colors[status]?.hover : colors[status]?.default;
|
|
100
100
|
};
|
|
101
101
|
const generateDynamicStyles = (status)=>{
|
|
102
|
-
const wrapperClass = (0,
|
|
102
|
+
const wrapperClass = (0, _css.css)({
|
|
103
103
|
'& svg[data-status="secondary"]': {
|
|
104
104
|
fill: getColor({
|
|
105
105
|
secondary: status?.secondary,
|
|
@@ -131,13 +131,13 @@ const generateDynamicStyles = (status)=>{
|
|
|
131
131
|
};
|
|
132
132
|
const getIconColor = (status)=>colors[status].icon;
|
|
133
133
|
const styles = {
|
|
134
|
-
badge: (0,
|
|
134
|
+
badge: (0, _css.css)({
|
|
135
135
|
'&:focus': {
|
|
136
136
|
outline: 'none',
|
|
137
137
|
boxShadow: `inset ${_f36tokens.default.glowPrimary}`
|
|
138
138
|
}
|
|
139
139
|
}),
|
|
140
|
-
wrapper: (0,
|
|
140
|
+
wrapper: (0, _css.css)({
|
|
141
141
|
'& svg': {
|
|
142
142
|
transition: 'fill 0.2s ease-in-out'
|
|
143
143
|
},
|
|
@@ -145,7 +145,7 @@ const styles = {
|
|
|
145
145
|
marginLeft: '-1px'
|
|
146
146
|
}
|
|
147
147
|
}),
|
|
148
|
-
popoverContent: (0,
|
|
148
|
+
popoverContent: (0, _css.css)({
|
|
149
149
|
maxWidth: '336px',
|
|
150
150
|
maxHeight: '368px',
|
|
151
151
|
overflowY: 'auto',
|
|
@@ -256,7 +256,7 @@ function LocalePublishingPopover({ entity, jobs, isScheduled, localesStatusMap,
|
|
|
256
256
|
}, /*#__PURE__*/ _react.default.createElement(_f36components.Popover.Trigger, null, /*#__PURE__*/ _react.default.createElement(_f36components.Flex, {
|
|
257
257
|
"aria-label": ariaLabel,
|
|
258
258
|
alignItems: "center",
|
|
259
|
-
className: (0,
|
|
259
|
+
className: (0, _css.cx)(styles.wrapper, wrapperClass)
|
|
260
260
|
}, /*#__PURE__*/ _react.default.createElement(_f36components.EntityStatusBadge, {
|
|
261
261
|
className: styles.badge,
|
|
262
262
|
testId: "entity-state",
|
|
@@ -12,7 +12,7 @@ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
|
12
12
|
const _f36components = require("@contentful/f36-components");
|
|
13
13
|
const _f36icons = require("@contentful/f36-icons");
|
|
14
14
|
const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
|
|
15
|
-
const
|
|
15
|
+
const _css = require("@emotion/css");
|
|
16
16
|
const _getReleaseStatusBadgeConfig = require("../utils/getReleaseStatusBadgeConfig");
|
|
17
17
|
const _ReleaseEntityStatusLocalesList = require("./ReleaseEntityStatusLocalesList");
|
|
18
18
|
function _interop_require_default(obj) {
|
|
@@ -69,7 +69,7 @@ const getColor = ({ secondary, tertiary, isHover })=>{
|
|
|
69
69
|
return isHover ? (0, _getReleaseStatusBadgeConfig.getReleaseStatusBadgeConfig)(status).hover : (0, _getReleaseStatusBadgeConfig.getReleaseStatusBadgeConfig)(status).default;
|
|
70
70
|
};
|
|
71
71
|
const generateDynamicStyles = (status)=>{
|
|
72
|
-
const wrapperClass = (0,
|
|
72
|
+
const wrapperClass = (0, _css.css)({
|
|
73
73
|
...status?.secondary && {
|
|
74
74
|
'& svg[data-status="secondary"]': {
|
|
75
75
|
fill: getColor({
|
|
@@ -102,13 +102,13 @@ const generateDynamicStyles = (status)=>{
|
|
|
102
102
|
return wrapperClass;
|
|
103
103
|
};
|
|
104
104
|
const styles = {
|
|
105
|
-
badge: (0,
|
|
105
|
+
badge: (0, _css.css)({
|
|
106
106
|
'&:focus': {
|
|
107
107
|
outline: 'none',
|
|
108
108
|
boxShadow: `inset ${_f36tokens.default.glowPrimary}`
|
|
109
109
|
}
|
|
110
110
|
}),
|
|
111
|
-
wrapper: (0,
|
|
111
|
+
wrapper: (0, _css.css)({
|
|
112
112
|
'& svg': {
|
|
113
113
|
transition: 'fill 0.2s ease-in-out'
|
|
114
114
|
},
|
|
@@ -116,13 +116,13 @@ const styles = {
|
|
|
116
116
|
marginLeft: '-1px'
|
|
117
117
|
}
|
|
118
118
|
}),
|
|
119
|
-
popoverContent: (0,
|
|
119
|
+
popoverContent: (0, _css.css)({
|
|
120
120
|
maxWidth: '336px',
|
|
121
121
|
maxHeight: '368px',
|
|
122
122
|
overflowY: 'auto',
|
|
123
123
|
padding: `${_f36tokens.default.spacing2Xs} 0`
|
|
124
124
|
}),
|
|
125
|
-
skeletonBadge: (0,
|
|
125
|
+
skeletonBadge: (0, _css.css)({
|
|
126
126
|
flexShrink: 0,
|
|
127
127
|
display: 'block',
|
|
128
128
|
height: '20px',
|
|
@@ -226,7 +226,7 @@ function ReleaseEntityStatusPopover({ releaseStatusMap, activeLocales }) {
|
|
|
226
226
|
}, /*#__PURE__*/ _react.default.createElement(_f36components.Popover.Trigger, null, /*#__PURE__*/ _react.default.createElement(_f36components.Flex, {
|
|
227
227
|
"aria-label": ariaLabel,
|
|
228
228
|
alignItems: "center",
|
|
229
|
-
className: (0,
|
|
229
|
+
className: (0, _css.cx)(styles.wrapper, wrapperClass)
|
|
230
230
|
}, /*#__PURE__*/ _react.default.createElement(_f36components.Badge, {
|
|
231
231
|
tabIndex: 0,
|
|
232
232
|
variant: variant,
|
package/dist/esm/CharCounter.js
CHANGED
|
@@ -2,7 +2,7 @@ import React, { useCallback, useRef, useState } from 'react';
|
|
|
2
2
|
import { EntityStatusBadge, Flex, Popover } from '@contentful/f36-components';
|
|
3
3
|
import { CaretDownIcon } from '@contentful/f36-icons';
|
|
4
4
|
import tokens from '@contentful/f36-tokens';
|
|
5
|
-
import { cx, css } from 'emotion';
|
|
5
|
+
import { cx, css } from '@emotion/css';
|
|
6
6
|
import * as entityHelpers from '../utils/entityHelpers';
|
|
7
7
|
import { LocalePublishingStatusList } from './LocalePublishingStatusList';
|
|
8
8
|
import { ScheduledBanner } from './ScheduledBanner';
|
|
@@ -2,7 +2,7 @@ import React, { useCallback, useRef, useState } from 'react';
|
|
|
2
2
|
import { Badge, Flex, Popover } from '@contentful/f36-components';
|
|
3
3
|
import { CaretDownIcon } from '@contentful/f36-icons';
|
|
4
4
|
import tokens from '@contentful/f36-tokens';
|
|
5
|
-
import { css, cx } from 'emotion';
|
|
5
|
+
import { css, cx } from '@emotion/css';
|
|
6
6
|
import { getReleaseStatusBadgeConfig } from '../utils/getReleaseStatusBadgeConfig';
|
|
7
7
|
import { ReleaseEntityStatusLocalesList } from './ReleaseEntityStatusLocalesList';
|
|
8
8
|
const getColor = ({ secondary, tertiary, isHover })=>{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-shared",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2-canary.9+78e1d2c5",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"registry": "https://npm.pkg.github.com/"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "78e1d2c5e559a6db26a47ce2ddb109a8eb985715"
|
|
77
77
|
}
|