@contentful/f36-entity-list 4.1.0 → 4.1.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 CHANGED
@@ -3,6 +3,38 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.1.4](https://github.com/contentful/forma-36/compare/@contentful/f36-entity-list@4.1.3...@contentful/f36-entity-list@4.1.4) (2022-01-31)
7
+
8
+ **Note:** Version bump only for package @contentful/f36-entity-list
9
+
10
+
11
+
12
+
13
+
14
+ ## [4.1.3](https://github.com/contentful/forma-36/compare/@contentful/f36-entity-list@4.1.2...@contentful/f36-entity-list@4.1.3) (2022-01-26)
15
+
16
+ **Note:** Version bump only for package @contentful/f36-entity-list
17
+
18
+
19
+
20
+
21
+
22
+ ## [4.1.2](https://github.com/contentful/forma-36/compare/@contentful/f36-entity-list@4.1.1...@contentful/f36-entity-list@4.1.2) (2022-01-25)
23
+
24
+ **Note:** Version bump only for package @contentful/f36-entity-list
25
+
26
+
27
+
28
+
29
+
30
+ ## [4.1.1](https://github.com/contentful/forma-36/compare/@contentful/f36-entity-list@4.1.0...@contentful/f36-entity-list@4.1.1) (2022-01-19)
31
+
32
+ **Note:** Version bump only for package @contentful/f36-entity-list
33
+
34
+
35
+
36
+
37
+
6
38
  # [4.1.0](https://github.com/contentful/forma-36/compare/@contentful/f36-entity-list@4.0.1...@contentful/f36-entity-list@4.1.0) (2022-01-13)
7
39
 
8
40
 
package/README.mdx CHANGED
@@ -8,91 +8,34 @@ storybook: 'https://v4-f36-storybook.netlify.app/?path=/story/components-entity-
8
8
  typescript: ./src/EntityList.tsx,./src/EntityListItem/EntityListItem.tsx
9
9
  ---
10
10
 
11
- # EntityList
12
-
13
- The EntityList is used to represent lists of entities (entries and assets).
14
-
15
- ## How to use EntityList
16
-
17
- This component should be used in combination with the EntityList.Item component. Its main purpose is to be used to entries or assets when in a list context, for example, a multiple entry reference field. It differs from existing EntryCard/AssetCard components as its intended use is for lists of entities, not individual ones.
18
-
19
- ## Code examples
20
-
21
- ```jsx
22
- <EntityList>
23
- <EntityList.Item
24
- title="Entry 1"
25
- description="Description"
26
- contentType="My content type"
27
- status="published"
28
- />
29
- <EntityList.Item
30
- title="Entry 2"
31
- description="Description"
32
- contentType="My content type"
33
- status="draft"
34
- />
35
- <EntityList.Item
36
- title="Entry 3"
37
- description="Description"
38
- contentType="My content type"
39
- status="archived"
40
- />
41
- </EntityList>
11
+ The EntityList is used to represent lists of entities (entries and assets). This component should be used in combination with the EntityList.Item component. Its main purpose is to be used to entries or assets when in a list context, for example, a multiple entry reference field. It differs from existing EntryCard/AssetCard components as its intended use is for lists of entities, not individual ones.
12
+
13
+ ## Import
14
+
15
+ ```js static=true
16
+ import { EntityList } from '@contentful/f36-components';
17
+ // or
18
+ import { EntityList } from '@contentful/f36-entity-list';
19
+ ```
20
+
21
+ ## Examples
22
+
23
+ ### Basic
24
+
25
+ ```jsx file=examples/BasicEntityListExample.tsx
26
+
42
27
  ```
43
28
 
44
29
  ### With actions menu
45
30
 
46
- ```jsx
47
- <EntityList>
48
- <EntityList.Item
49
- title="Entry title"
50
- description="Description"
51
- contentType="My content type"
52
- status="draft"
53
- entityType="entry"
54
- actions={[
55
- <MenuSectionTitle key="title">Actions</MenuSectionTitle>,
56
- <MenuItem key="edit">Edit</MenuItem>,
57
- <MenuItem key="download">Download</MenuItem>,
58
- <MenuItem key="remove">Remove</MenuItem>,
59
- ]}
60
- />
61
- <EntityList.Item
62
- title="Other entry title"
63
- description="Description"
64
- contentType="My content type"
65
- status="published"
66
- entityType="entry"
67
- actions={[
68
- <MenuSectionTitle key="title">Actions</MenuSectionTitle>,
69
- <MenuItem key="edit">Edit</MenuItem>,
70
- <MenuItem key="download">Download</MenuItem>,
71
- <MenuItem key="remove">Remove</MenuItem>,
72
- ]}
73
- />
74
- </EntityList>
31
+ ```jsx file=examples/EntityListWithActionsMenuExample.tsx
32
+
75
33
  ```
76
34
 
77
35
  ### With drag handle
78
36
 
79
- ```jsx
80
- <EntityList>
81
- <EntityList.Item
82
- title="Entry 1"
83
- description="Description"
84
- contentType="My content type"
85
- status="published"
86
- withDragHandle
87
- />
88
- <EntityList.Item
89
- title="Entry 2"
90
- description="Description"
91
- contentType="My content type"
92
- status="draft"
93
- withDragHandle
94
- />
95
- </EntityList>
37
+ ```jsx file=examples/EntityListWithDragHandleExample.tsx
38
+
96
39
  ```
97
40
 
98
41
  ## Props (API reference)
package/dist/types.d.ts CHANGED
@@ -4,12 +4,7 @@ import { DragHandleProps } from "@contentful/f36-drag-handle";
4
4
  export interface EntityListProps extends CommonProps {
5
5
  children?: React.ReactNode;
6
6
  }
7
- declare const _EntityList1: React.ForwardRefExoticComponent<{
8
- children?: React.ReactNode;
9
- className?: string;
10
- testId?: string;
11
- style?: React.CSSProperties;
12
- } & React.RefAttributes<HTMLUListElement>>;
7
+ declare const _EntityList1: React.ForwardRefExoticComponent<EntityListProps & React.RefAttributes<HTMLUListElement>>;
13
8
  type EntityListItemStatus = PickUnion<EntityStatus, 'archived' | 'changed' | 'draft' | 'published'>;
14
9
  export interface EntityListItemProps extends CommonProps {
15
10
  /**
@@ -1 +1 @@
1
- {"mappings":";;;ACMA,gCAAiC,SAAQ,WAAW;IAClD,QAAQ,CAAC,EAAE,MAAM,SAAS,CAAC;CAC5B;AAoBD,QAAO,MAAM;eArBA,MAAM,SAAS;;;;0CAqB2B,CAAC;AEIxD,4BAA4B,UAC1B,YAAY,EACZ,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,CAC/C,CAAC;AAQF,oCAAqC,SAAQ,WAAW;IACtD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,cAAc,CAAC;IAC/B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,uBAAuB,CAAC,EAAE,MAAM,SAAS,CAAC;IAC1C;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAC/C;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;IAC/D;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,+BAA+B,EAC7B,SAAS,EACT,MAAiC,EACjC,KAAK,EACL,WAAW,EACX,WAAW,EACX,UAAoB,EACpB,aAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,MAAM,EACN,OAAO,EACP,cAAc,EACd,YAAY,EACZ,SAAS,EACT,OAAO,EACP,IAAI,EACJ,mBAAmB,EACnB,uBAAuB,EACvB,iBAAyB,EACzB,GAAG,UAAU,EACd,EAAE,mBAAmB,GAAG,MAAM,YAAY,CAuI1C;AC7QD,0BAA0B,mBAAyB,GAAG;IACpD,IAAI,EAAE,qBAAqB,CAAC;CAC7B,CAAC;AAEF,OAAO,MAAM,8BAAqD,CAAC","sources":["packages/components/entity-list/src/src/EntityList.styles.ts","packages/components/entity-list/src/src/EntityList.tsx","packages/components/entity-list/src/src/EntityListItem/EntityListItem.styles.ts","packages/components/entity-list/src/src/EntityListItem/EntityListItem.tsx","packages/components/entity-list/src/src/CompoundEntityList.tsx","packages/components/entity-list/src/src/index.ts","packages/components/entity-list/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,"export { EntityList } from './CompoundEntityList';\nexport type { EntityListProps } from './EntityList';\nexport { EntityListItem } from './EntityListItem/EntityListItem';\nexport type { EntityListItemProps } from './EntityListItem/EntityListItem';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;ACMA,gCAAiC,SAAQ,WAAW;IAClD,QAAQ,CAAC,EAAE,MAAM,SAAS,CAAC;CAC5B;AAoBD,QAAO,MAAM,sGAA0C,CAAC;AEIxD,4BAA4B,UAC1B,YAAY,EACZ,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,CAC/C,CAAC;AAQF,oCAAqC,SAAQ,WAAW;IACtD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,cAAc,CAAC;IAC/B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,uBAAuB,CAAC,EAAE,MAAM,SAAS,CAAC;IAC1C;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAC/C;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;IAC/D;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,+BAA+B,EAC7B,SAAS,EACT,MAAiC,EACjC,KAAK,EACL,WAAW,EACX,WAAW,EACX,UAAoB,EACpB,aAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,MAAM,EACN,OAAO,EACP,cAAc,EACd,YAAY,EACZ,SAAS,EACT,OAAO,EACP,IAAI,EACJ,mBAAmB,EACnB,uBAAuB,EACvB,iBAAyB,EACzB,GAAG,UAAU,EACd,EAAE,mBAAmB,GAAG,MAAM,YAAY,CAuI1C;AC7QD,0BAA0B,mBAAyB,GAAG;IACpD,IAAI,EAAE,qBAAqB,CAAC;CAC7B,CAAC;AAEF,OAAO,MAAM,8BAAqD,CAAC","sources":["packages/components/entity-list/src/src/EntityList.styles.ts","packages/components/entity-list/src/src/EntityList.tsx","packages/components/entity-list/src/src/EntityListItem/EntityListItem.styles.ts","packages/components/entity-list/src/src/EntityListItem/EntityListItem.tsx","packages/components/entity-list/src/src/CompoundEntityList.tsx","packages/components/entity-list/src/src/index.ts","packages/components/entity-list/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,"export { EntityList } from './CompoundEntityList';\nexport type { EntityListProps } from './EntityList';\nexport { EntityListItem } from './EntityListItem/EntityListItem';\nexport type { EntityListItemProps } from './EntityListItem/EntityListItem';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "name": "@contentful/f36-entity-list",
3
- "version": "4.1.0",
3
+ "version": "4.1.4",
4
4
  "description": "Forma 36: EntityList component",
5
5
  "scripts": {
6
6
  "build": "parcel build"
7
7
  },
8
8
  "dependencies": {
9
9
  "@babel/runtime": "^7.6.2",
10
- "@contentful/f36-badge": "^4.0.1",
11
- "@contentful/f36-button": "^4.1.0",
12
- "@contentful/f36-core": "^4.0.1",
13
- "@contentful/f36-drag-handle": "^4.0.1",
14
- "@contentful/f36-icon": "^4.0.1",
15
- "@contentful/f36-icons": "^4.0.1",
16
- "@contentful/f36-menu": "^4.0.1",
17
- "@contentful/f36-skeleton": "^4.0.1",
10
+ "@contentful/f36-badge": "^4.1.0",
11
+ "@contentful/f36-button": "^4.1.3",
12
+ "@contentful/f36-core": "^4.1.0",
13
+ "@contentful/f36-drag-handle": "^4.1.0",
14
+ "@contentful/f36-icon": "^4.1.0",
15
+ "@contentful/f36-icons": "^4.0.2",
16
+ "@contentful/f36-menu": "^4.1.1",
17
+ "@contentful/f36-skeleton": "^4.1.0",
18
18
  "@contentful/f36-tokens": "^4.0.0",
19
- "@contentful/f36-typography": "^4.0.1",
19
+ "@contentful/f36-typography": "^4.1.0",
20
20
  "emotion": "^10.0.17"
21
21
  },
22
22
  "peerDependencies": {
@@ -39,5 +39,5 @@
39
39
  "publishConfig": {
40
40
  "access": "public"
41
41
  },
42
- "gitHead": "3bbe5bae60ddfb45a5e5101ea0348972242ac8a0"
42
+ "gitHead": "2ea3b5b814dbe3fb5e0b1b6adf65aff768e6855e"
43
43
  }