@contentful/field-editor-shared 2.11.1 → 2.11.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.
@@ -10,6 +10,7 @@ Object.defineProperty(exports, "LocalePublishingPopover", {
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 _emotion = require("emotion");
15
16
  const _entityHelpers = /*#__PURE__*/ _interop_require_wildcard(require("../utils/entityHelpers"));
@@ -149,14 +150,6 @@ const styles = {
149
150
  padding: `${_f36tokens.default.spacing2Xs} 0`
150
151
  })
151
152
  };
152
- const ArrowDownIcon = (0, _f36components.generateIcon)({
153
- name: 'ArrowDownIcon',
154
- viewBox: '0 0 12 20',
155
- path: /*#__PURE__*/ _react.default.createElement("path", {
156
- d: "M3.03076 8C2.20109 8 1.73228 8.95209 2.23814 9.60971L5.20727 13.4696C5.60757 13.99 6.39223 13.99 6.79252 13.4696L9.76166 9.60971C10.2675 8.95209 9.79871 8 8.96904 8L3.03076 8Z",
157
- fill: "currentColor"
158
- })
159
- });
160
153
  const determineBadgeStatus = (localesStatusMap, activeLocales)=>{
161
154
  if (!localesStatusMap) return;
162
155
  if (localesStatusMap.size === 1 || activeLocales && activeLocales.length === 1) return {
@@ -269,7 +262,7 @@ function LocalePublishingPopover({ entity, jobs, isScheduled, localesStatusMap,
269
262
  tabIndex: 0,
270
263
  onFocus: ()=>setIsOpen(true),
271
264
  onBlur: ()=>setIsOpen(false),
272
- endIcon: /*#__PURE__*/ _react.default.createElement(ArrowDownIcon, {
265
+ endIcon: /*#__PURE__*/ _react.default.createElement(_f36icons.ArrowDownIcon, {
273
266
  color: getIconColor(entityStatus)
274
267
  }),
275
268
  onMouseOver: onMouseEnter,
@@ -10,6 +10,7 @@ Object.defineProperty(exports, "ReleaseEntityStatusPopover", {
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 _emotion = require("emotion");
15
16
  const _constants = require("./constants");
@@ -209,14 +210,6 @@ function ReleaseEntityStatusPopover({ releaseLocalesStatusMap, activeLocales, is
209
210
  const status = determineBadgeStatus(releaseLocalesStatusMap, activeLocales);
210
211
  const ariaLabel = status.secondary ? 'Multiple statuses' : status.primary;
211
212
  const wrapperClass = generateDynamicStyles(status);
212
- const ArrowDownIcon = (0, _f36components.generateIcon)({
213
- name: 'ArrowDownIcon',
214
- viewBox: '0 0 12 20',
215
- path: /*#__PURE__*/ _react.default.createElement("path", {
216
- d: "M3.03076 8C2.20109 8 1.73228 8.95209 2.23814 9.60971L5.20727 13.4696C5.60757 13.99 6.39223 13.99 6.79252 13.4696L9.76166 9.60971C10.2675 8.95209 9.79871 8 8.96904 8L3.03076 8Z",
217
- fill: "currentColor"
218
- })
219
- });
220
213
  if (isLoading) {
221
214
  return /*#__PURE__*/ _react.default.createElement(_f36components.Skeleton.Container, {
222
215
  className: styles.skeletonBadge
@@ -240,7 +233,7 @@ function ReleaseEntityStatusPopover({ releaseLocalesStatusMap, activeLocales, is
240
233
  variant: _constants.RELEASE_BADGES[status.primary].variant,
241
234
  onFocus: ()=>setIsOpen(true),
242
235
  onBlur: ()=>setIsOpen(false),
243
- endIcon: /*#__PURE__*/ _react.default.createElement(ArrowDownIcon, {
236
+ endIcon: /*#__PURE__*/ _react.default.createElement(_f36icons.ArrowDownIcon, {
244
237
  color: _constants.RELEASE_BADGES[status.primary].icon
245
238
  }),
246
239
  onMouseOver: onMouseEnter,
@@ -1,5 +1,6 @@
1
1
  import React, { useCallback, useRef, useState } from 'react';
2
- import { EntityStatusBadge, Flex, Popover, generateIcon } from '@contentful/f36-components';
2
+ import { EntityStatusBadge, Flex, Popover } from '@contentful/f36-components';
3
+ import { ArrowDownIcon } from '@contentful/f36-icons';
3
4
  import tokens from '@contentful/f36-tokens';
4
5
  import { cx, css } from 'emotion';
5
6
  import * as entityHelpers from '../utils/entityHelpers';
@@ -93,14 +94,6 @@ const styles = {
93
94
  padding: `${tokens.spacing2Xs} 0`
94
95
  })
95
96
  };
96
- const ArrowDownIcon = generateIcon({
97
- name: 'ArrowDownIcon',
98
- viewBox: '0 0 12 20',
99
- path: /*#__PURE__*/ React.createElement("path", {
100
- d: "M3.03076 8C2.20109 8 1.73228 8.95209 2.23814 9.60971L5.20727 13.4696C5.60757 13.99 6.39223 13.99 6.79252 13.4696L9.76166 9.60971C10.2675 8.95209 9.79871 8 8.96904 8L3.03076 8Z",
101
- fill: "currentColor"
102
- })
103
- });
104
97
  const determineBadgeStatus = (localesStatusMap, activeLocales)=>{
105
98
  if (!localesStatusMap) return;
106
99
  if (localesStatusMap.size === 1 || activeLocales && activeLocales.length === 1) return {
@@ -1,5 +1,6 @@
1
1
  import React, { useCallback, useRef, useState } from 'react';
2
- import { Badge, Flex, generateIcon, Popover, Skeleton } from '@contentful/f36-components';
2
+ import { Badge, Flex, Popover, Skeleton } from '@contentful/f36-components';
3
+ import { ArrowDownIcon } from '@contentful/f36-icons';
3
4
  import tokens from '@contentful/f36-tokens';
4
5
  import { cx, css } from 'emotion';
5
6
  import { RELEASE_BADGES } from './constants';
@@ -153,14 +154,6 @@ export function ReleaseEntityStatusPopover({ releaseLocalesStatusMap, activeLoca
153
154
  const status = determineBadgeStatus(releaseLocalesStatusMap, activeLocales);
154
155
  const ariaLabel = status.secondary ? 'Multiple statuses' : status.primary;
155
156
  const wrapperClass = generateDynamicStyles(status);
156
- const ArrowDownIcon = generateIcon({
157
- name: 'ArrowDownIcon',
158
- viewBox: '0 0 12 20',
159
- path: /*#__PURE__*/ React.createElement("path", {
160
- d: "M3.03076 8C2.20109 8 1.73228 8.95209 2.23814 9.60971L5.20727 13.4696C5.60757 13.99 6.39223 13.99 6.79252 13.4696L9.76166 9.60971C10.2675 8.95209 9.79871 8 8.96904 8L3.03076 8Z",
161
- fill: "currentColor"
162
- })
163
- });
164
157
  if (isLoading) {
165
158
  return /*#__PURE__*/ React.createElement(Skeleton.Container, {
166
159
  className: styles.skeletonBadge
@@ -8,5 +8,5 @@ type LocalePublishingPopoverProps = {
8
8
  activeLocales?: Pick<LocaleProps, 'code'>[];
9
9
  localesStatusMap?: LocalePublishStatusMap;
10
10
  };
11
- export declare function LocalePublishingPopover({ entity, jobs, isScheduled, localesStatusMap, activeLocales, }: LocalePublishingPopoverProps): React.JSX.Element;
11
+ export declare function LocalePublishingPopover({ entity, jobs, isScheduled, localesStatusMap, activeLocales }: LocalePublishingPopoverProps): React.JSX.Element;
12
12
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-shared",
3
- "version": "2.11.1",
3
+ "version": "2.11.2",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -37,14 +37,14 @@
37
37
  },
38
38
  "devDependencies": {
39
39
  "@contentful/app-sdk": "^4.29.0",
40
- "@contentful/field-editor-test-utils": "^1.6.0",
40
+ "@contentful/field-editor-test-utils": "^1.6.1",
41
41
  "@lingui/core": "5.3.0",
42
- "@testing-library/react": "16.0.1"
42
+ "@testing-library/react": "16.3.0"
43
43
  },
44
44
  "dependencies": {
45
- "@contentful/f36-components": "^4.70.0",
46
- "@contentful/f36-note": "^4.70.0",
47
- "@contentful/f36-tokens": "^4.0.5",
45
+ "@contentful/f36-components": "5.1.1",
46
+ "@contentful/f36-note": "^5.1.0",
47
+ "@contentful/f36-tokens": "5.1.0",
48
48
  "contentful-management": "^11.45.1",
49
49
  "emotion": "^10.0.17",
50
50
  "fast-deep-equal": "^3.1.3",
@@ -58,5 +58,5 @@
58
58
  "publishConfig": {
59
59
  "registry": "https://npm.pkg.github.com/"
60
60
  },
61
- "gitHead": "9456bac33e2d0d4f05cadc302ba4a25f2de6e034"
61
+ "gitHead": "8ab6bd7a3ce2979634ab53673c6b122a6b1b5efb"
62
62
  }