decap-cms-core 3.13.0 → 3.15.0

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.
Files changed (86) hide show
  1. package/dist/decap-cms-core.js +9 -9
  2. package/dist/decap-cms-core.js.map +1 -1
  3. package/dist/esm/actions/config.js +14 -1
  4. package/dist/esm/actions/entries.js +15 -4
  5. package/dist/esm/backend.js +2 -0
  6. package/dist/esm/bootstrap.js +2 -2
  7. package/dist/esm/components/App/App.js +15 -8
  8. package/dist/esm/components/App/Header.js +18 -18
  9. package/dist/esm/components/Collection/Collection.js +7 -7
  10. package/dist/esm/components/Collection/CollectionControls.js +1 -1
  11. package/dist/esm/components/Collection/CollectionTop.js +8 -8
  12. package/dist/esm/components/Collection/ControlButton.js +2 -2
  13. package/dist/esm/components/Collection/Entries/Entries.js +2 -2
  14. package/dist/esm/components/Collection/Entries/EntryCard.js +30 -15
  15. package/dist/esm/components/Collection/NestedCollection.js +20 -11
  16. package/dist/esm/components/Collection/Sidebar.js +6 -6
  17. package/dist/esm/components/Editor/EditorPreviewPane/EditorPreviewPane.js +22 -6
  18. package/dist/esm/components/MediaLibrary/MediaLibraryButtons.js +48 -9
  19. package/dist/esm/components/MediaLibrary/MediaLibraryCard.js +7 -9
  20. package/dist/esm/components/MediaLibrary/MediaLibraryCardGrid.js +5 -5
  21. package/dist/esm/components/MediaLibrary/MediaLibraryHeader.js +15 -3
  22. package/dist/esm/components/MediaLibrary/MediaLibraryModal.js +4 -1
  23. package/dist/esm/components/MediaLibrary/MediaLibrarySearch.js +6 -6
  24. package/dist/esm/components/MediaLibrary/MediaLibraryTop.js +14 -24
  25. package/dist/esm/components/UI/ErrorBoundary.js +2 -2
  26. package/dist/esm/components/UI/Modal.js +11 -4
  27. package/dist/esm/components/UI/SettingsDropdown.js +25 -27
  28. package/dist/esm/components/Workflow/Workflow.js +5 -5
  29. package/dist/esm/components/Workflow/WorkflowCard.js +14 -14
  30. package/dist/esm/components/Workflow/WorkflowList.js +18 -42
  31. package/dist/esm/constants/configSchema.js +2 -3
  32. package/dist/esm/lib/registry.js +4 -1
  33. package/dist/esm/reducers/entries.js +9 -7
  34. package/dist/esm/reducers/entryDraft.js +39 -7
  35. package/dist/esm/reducers/mediaLibrary.js +2 -3
  36. package/dist/esm/reducers/notifications.js +1 -2
  37. package/index.d.ts +19 -3
  38. package/package.json +7 -8
  39. package/src/__tests__/backend.spec.js +214 -0
  40. package/src/actions/__tests__/config.spec.js +14 -0
  41. package/src/actions/__tests__/editorialWorkflow.spec.js +1 -3
  42. package/src/actions/__tests__/entries.spec.js +36 -1
  43. package/src/actions/config.ts +13 -1
  44. package/src/actions/entries.ts +22 -7
  45. package/src/backend.ts +2 -0
  46. package/src/components/App/App.js +22 -14
  47. package/src/components/App/Header.js +36 -11
  48. package/src/components/Collection/Collection.js +10 -3
  49. package/src/components/Collection/CollectionControls.js +4 -3
  50. package/src/components/Collection/CollectionTop.js +3 -2
  51. package/src/components/Collection/ControlButton.js +1 -0
  52. package/src/components/Collection/Entries/Entries.js +1 -0
  53. package/src/components/Collection/Entries/EntryCard.js +13 -3
  54. package/src/components/Collection/NestedCollection.js +14 -7
  55. package/src/components/Collection/Sidebar.js +8 -7
  56. package/src/components/Collection/__tests__/NestedCollection.spec.js +1 -1
  57. package/src/components/Collection/__tests__/__snapshots__/Collection.spec.js.snap +76 -12
  58. package/src/components/Collection/__tests__/__snapshots__/NestedCollection.spec.js.snap +0 -68
  59. package/src/components/Collection/__tests__/__snapshots__/Sidebar.spec.js.snap +76 -16
  60. package/src/components/Editor/EditorPreviewPane/EditorPreviewPane.js +6 -5
  61. package/src/components/Editor/__tests__/__snapshots__/EditorToolbar.spec.js.snap +104 -72
  62. package/src/components/MediaLibrary/MediaLibraryButtons.js +39 -7
  63. package/src/components/MediaLibrary/MediaLibraryCard.js +1 -3
  64. package/src/components/MediaLibrary/MediaLibraryCardGrid.js +2 -2
  65. package/src/components/MediaLibrary/MediaLibraryHeader.js +32 -17
  66. package/src/components/MediaLibrary/MediaLibraryModal.js +8 -4
  67. package/src/components/MediaLibrary/MediaLibrarySearch.js +3 -1
  68. package/src/components/MediaLibrary/MediaLibraryTop.js +19 -1
  69. package/src/components/MediaLibrary/__tests__/__snapshots__/MediaLibraryCard.spec.js.snap +6 -6
  70. package/src/components/UI/Modal.js +10 -3
  71. package/src/components/UI/SettingsDropdown.js +36 -9
  72. package/src/components/Workflow/Workflow.js +7 -1
  73. package/src/components/Workflow/WorkflowCard.js +52 -14
  74. package/src/components/Workflow/WorkflowList.js +50 -31
  75. package/src/constants/__tests__/configSchema.spec.js +9 -6
  76. package/src/constants/configSchema.js +2 -3
  77. package/src/lib/__tests__/formatters.spec.js +16 -4
  78. package/src/lib/__tests__/registry.spec.js +3 -3
  79. package/src/lib/registry.js +4 -1
  80. package/src/reducers/__tests__/entryDraft.spec.js +118 -1
  81. package/src/reducers/__tests__/mediaLibrary.spec.js +0 -1
  82. package/src/reducers/entries.ts +9 -7
  83. package/src/reducers/entryDraft.js +46 -7
  84. package/src/reducers/mediaLibrary.ts +2 -3
  85. package/src/reducers/notifications.ts +1 -2
  86. package/src/types/redux.ts +22 -5
@@ -1,9 +1,14 @@
1
- import { fromJS, List, Map } from 'immutable';
1
+ import { fromJS, List, Map, Set } from 'immutable';
2
2
  import isEqual from 'lodash/isEqual';
3
3
  import { Cursor } from 'decap-cms-lib-util';
4
4
 
5
5
  import { selectCollectionEntriesCursor } from '../reducers/cursors';
6
- import { selectFields, updateFieldByKey, selectDefaultSortField } from '../reducers/collections';
6
+ import {
7
+ selectFields,
8
+ selectField,
9
+ updateFieldByKey,
10
+ selectDefaultSortField,
11
+ } from '../reducers/collections';
7
12
  import { selectIntegration, selectPublishedSlugs } from '../reducers';
8
13
  import { getIntegrationProvider } from '../integrations';
9
14
  import { currentBackend } from '../backend';
@@ -38,7 +43,6 @@ import type {
38
43
  import type { EntryValue } from '../valueObjects/Entry';
39
44
  import type { Backend } from '../backend';
40
45
  import type AssetProxy from '../valueObjects/AssetProxy';
41
- import type { Set } from 'immutable';
42
46
 
43
47
  /*
44
48
  * Constant Declarations
@@ -740,10 +744,21 @@ function getMetaFields(fields: EntryFields) {
740
744
  export function createEmptyDraft(collection: Collection, search: string) {
741
745
  return async (dispatch: ThunkDispatch<State, {}, AnyAction>, getState: () => State) => {
742
746
  const params = new URLSearchParams(search);
743
- params.forEach((value, key) => {
744
- collection = updateFieldByKey(collection, key, field =>
745
- field.set('default', processValue(value)),
746
- );
747
+ const uniqueKeys = Set([...params.keys()]).toArray();
748
+
749
+ uniqueKeys.forEach(key => {
750
+ const field = selectField(collection, key);
751
+ const isMultiple = field?.get('multiple', false);
752
+ const values = params.getAll(key);
753
+
754
+ collection = updateFieldByKey(collection, key, field => {
755
+ if (isMultiple) {
756
+ const allValues = values.flatMap(v => v.split(',')).map(processValue);
757
+ return field.set('default', List(allValues));
758
+ } else {
759
+ return field.set('default', processValue(values[values.length - 1]));
760
+ }
761
+ });
747
762
  });
748
763
 
749
764
  const fields = collection.get('fields', List());
package/src/backend.ts CHANGED
@@ -1184,6 +1184,7 @@ export class Backend {
1184
1184
  );
1185
1185
 
1186
1186
  const collectionName = collection.get('name');
1187
+ const hasSubfolders = collection.get('nested')?.get('subfolders') !== false;
1187
1188
 
1188
1189
  const updatedOptions = { unpublished, status };
1189
1190
  const opts = {
@@ -1191,6 +1192,7 @@ export class Backend {
1191
1192
  commitMessage,
1192
1193
  collectionName,
1193
1194
  useWorkflow,
1195
+ hasSubfolders,
1194
1196
  ...updatedOptions,
1195
1197
  };
1196
1198
 
@@ -32,7 +32,6 @@ TopBarProgress.config({
32
32
  });
33
33
 
34
34
  const AppMainContainer = styled.div`
35
- min-width: 800px;
36
35
  max-width: 1440px;
37
36
  margin: 0 auto;
38
37
  `;
@@ -156,6 +155,7 @@ class App extends React.Component {
156
155
  openMediaLibrary,
157
156
  t,
158
157
  showMediaButton,
158
+ location,
159
159
  } = this.props;
160
160
 
161
161
  if (config === null) {
@@ -177,22 +177,30 @@ class App extends React.Component {
177
177
  const defaultPath = getDefaultPath(collections);
178
178
  const hasWorkflow = publishMode === EDITORIAL_WORKFLOW;
179
179
 
180
+ // Work out if this is an editor route, following the same URL matching as the router.
181
+ // - /collections/:name/entries/*
182
+ // - /collections/:name/new
183
+ const [, base, , view] = location.pathname.split('/');
184
+ const isEditorRoute = base === 'collections' && (view === 'entries' || view === 'new');
185
+
180
186
  return (
181
187
  <>
182
188
  <Notifications />
183
- <Header
184
- user={user}
185
- collections={collections}
186
- onCreateEntryClick={createNewEntry}
187
- onLogoutClick={logoutUser}
188
- openMediaLibrary={openMediaLibrary}
189
- hasWorkflow={hasWorkflow}
190
- displayUrl={config.display_url}
191
- logoUrl={config.logo_url} // Deprecated, replaced by `logo.src`
192
- logo={config.logo}
193
- isTestRepo={config.backend.name === 'test-repo'}
194
- showMediaButton={showMediaButton}
195
- />
189
+ {!isEditorRoute && (
190
+ <Header
191
+ user={user}
192
+ collections={collections}
193
+ onCreateEntryClick={createNewEntry}
194
+ onLogoutClick={logoutUser}
195
+ openMediaLibrary={openMediaLibrary}
196
+ hasWorkflow={hasWorkflow}
197
+ displayUrl={config.display_url}
198
+ logoUrl={config.logo_url} // Deprecated, replaced by `logo.src`
199
+ logo={config.logo}
200
+ isTestRepo={config.backend.name === 'test-repo'}
201
+ showMediaButton={showMediaButton}
202
+ />
203
+ )}
196
204
  <AppMainContainer>
197
205
  {isFetching && <TopBarProgress />}
198
206
  <Switch>
@@ -11,7 +11,6 @@ import {
11
11
  DropdownItem,
12
12
  StyledDropdownButton,
13
13
  colors,
14
- lengths,
15
14
  shadows,
16
15
  buttons,
17
16
  zIndex,
@@ -32,12 +31,14 @@ function AppHeader(props) {
32
31
  <header
33
32
  css={css`
34
33
  ${shadows.dropMain};
35
- position: sticky;
36
34
  width: 100%;
37
- top: 0;
38
35
  background-color: ${colors.foreground};
39
36
  z-index: ${zIndex.zIndex300};
40
- height: ${lengths.topBarHeight};
37
+
38
+ @media (min-height: 500px) {
39
+ position: sticky;
40
+ top: 0;
41
+ }
41
42
  `}
42
43
  {...props}
43
44
  />
@@ -46,11 +47,15 @@ function AppHeader(props) {
46
47
 
47
48
  const AppHeaderContent = styled.div`
48
49
  display: flex;
49
- justify-content: space-between;
50
- min-width: 800px;
51
- max-width: 1440px;
50
+ flex-direction: column-reverse;
52
51
  padding: 0 12px;
53
52
  margin: 0 auto;
53
+
54
+ @media (min-width: 800px) {
55
+ max-width: 1440px;
56
+ flex-direction: row;
57
+ justify-content: space-between;
58
+ }
54
59
  `;
55
60
 
56
61
  const AppHeaderButton = styled.button`
@@ -58,14 +63,27 @@ const AppHeaderButton = styled.button`
58
63
  background: none;
59
64
  color: #7b8290;
60
65
  font-family: inherit;
61
- font-size: 16px;
66
+ font-size: 13px;
67
+ line-height: 1;
62
68
  font-weight: 500;
63
69
  display: inline-flex;
64
- padding: 16px 20px;
70
+ flex-direction: column;
71
+ gap: 2px;
72
+ padding: 0 10px 10px;
65
73
  align-items: center;
74
+ text-align: center;
75
+
76
+ @media (min-width: 400px) {
77
+ flex-direction: row;
78
+ gap: 4px;
79
+ }
80
+
81
+ @media (min-width: 500px) {
82
+ font-size: 16px;
83
+ padding: 16px 20px;
84
+ }
66
85
 
67
86
  ${Icon} {
68
- margin-right: 4px;
69
87
  color: #b3b9c4;
70
88
  }
71
89
 
@@ -93,14 +111,16 @@ const AppHeaderButton = styled.button`
93
111
  const AppHeaderNavLink = AppHeaderButton.withComponent(NavLink);
94
112
 
95
113
  const AppHeaderActions = styled.div`
96
- display: inline-flex;
114
+ display: flex;
97
115
  align-items: center;
116
+ justify-content: space-between;
98
117
  `;
99
118
 
100
119
  const AppHeaderQuickNewButton = styled(StyledDropdownButton)`
101
120
  ${buttons.button};
102
121
  ${buttons.medium};
103
122
  ${buttons.gray};
123
+ white-space: nowrap;
104
124
  margin-right: 8px;
105
125
 
106
126
  &:after {
@@ -112,6 +132,11 @@ const AppHeaderNavList = styled.ul`
112
132
  display: flex;
113
133
  margin: 0;
114
134
  list-style: none;
135
+ justify-content: space-around;
136
+
137
+ @media (min-width: 800px) {
138
+ justify-content: flex-start;
139
+ }
115
140
  `;
116
141
 
117
142
  const AppHeaderLogo = styled.li`
@@ -26,16 +26,23 @@ import {
26
26
  } from '../../reducers/entries';
27
27
 
28
28
  const CollectionContainer = styled.div`
29
- margin: ${lengths.pageMargin};
29
+ display: flex;
30
+ flex-direction: column;
31
+ gap: 20px;
32
+ margin: ${lengths.pageMarginMobile};
33
+ @media (min-width: 500px) {
34
+ margin: ${lengths.pageMargin};
35
+ }
30
36
  `;
31
37
 
32
38
  const CollectionMain = styled.main`
33
- padding-left: 280px;
39
+ @media (min-width: 800px) {
40
+ padding-left: 280px;
41
+ }
34
42
  `;
35
43
 
36
44
  const SearchResultContainer = styled.div`
37
45
  ${components.cardTop};
38
- margin-bottom: 22px;
39
46
  `;
40
47
 
41
48
  const SearchResultHeading = styled.h1`
@@ -9,14 +9,15 @@ import GroupControl from './GroupControl';
9
9
 
10
10
  const CollectionControlsContainer = styled.div`
11
11
  display: flex;
12
+ flex-flow: row-reverse wrap;
12
13
  align-items: center;
13
- flex-direction: row-reverse;
14
+ gap: 6px 0;
14
15
  margin-top: 22px;
15
16
  width: ${lengths.topCardWidth};
16
17
  max-width: 100%;
17
18
 
18
- & > div {
19
- margin-left: 6px;
19
+ @media (min-width: 500px) {
20
+ gap: 6px;
20
21
  }
21
22
  `;
22
23
 
@@ -8,11 +8,12 @@ import { components, buttons, shadows } from 'decap-cms-ui-default';
8
8
 
9
9
  const CollectionTopContainer = styled.div`
10
10
  ${components.cardTop};
11
- margin-bottom: 22px;
12
11
  `;
13
12
 
14
13
  const CollectionTopRow = styled.div`
15
14
  display: flex;
15
+ flex-wrap: wrap;
16
+ gap: 8px;
16
17
  align-items: center;
17
18
  justify-content: space-between;
18
19
  `;
@@ -26,13 +27,13 @@ const CollectionTopNewButton = styled(Link)`
26
27
  ${shadows.dropDeep};
27
28
  ${buttons.default};
28
29
  ${buttons.gray};
30
+ white-space: nowrap;
29
31
 
30
32
  padding: 0 30px;
31
33
  `;
32
34
 
33
35
  const CollectionTopDescription = styled.p`
34
36
  ${components.cardTopDescription};
35
- margin-bottom: 0;
36
37
  `;
37
38
 
38
39
  function getCollectionProps(collection) {
@@ -8,6 +8,7 @@ const Button = styled(StyledDropdownButton)`
8
8
  ${buttons.medium};
9
9
  ${buttons.grayText};
10
10
  font-size: 14px;
11
+ white-space: nowrap;
11
12
 
12
13
  &:after {
13
14
  top: 11px;
@@ -9,6 +9,7 @@ import EntryListing from './EntryListing';
9
9
 
10
10
  const PaginationMessage = styled.div`
11
11
  width: ${lengths.topCardWidth};
12
+ max-width: 100%;
12
13
  padding: 16px;
13
14
  text-align: center;
14
15
  `;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { useEffect, useState } from 'react';
2
2
  import styled from '@emotion/styled';
3
3
  import { connect } from 'react-redux';
4
4
  import { Link } from 'react-router-dom';
@@ -86,7 +86,7 @@ const CardBody = styled.div`
86
86
  }
87
87
  `;
88
88
 
89
- const CardImage = styled.div`
89
+ const StyledImage = styled.div`
90
90
  background-image: url(${props => props.src});
91
91
  background-position: center center;
92
92
  background-size: cover;
@@ -131,6 +131,16 @@ const WorkflowBadge = styled.span`
131
131
  }};
132
132
  `;
133
133
 
134
+ function CardImage({ getAsset, value, field }) {
135
+ const [asset, setAsset] = useState(null);
136
+
137
+ useEffect(() => {
138
+ setAsset(value ? getAsset(value, field) : null);
139
+ }, [value, field, getAsset]);
140
+
141
+ return asset ? <StyledImage src={asset.toString()} /> : null;
142
+ }
143
+
134
144
  function EntryCard({
135
145
  path,
136
146
  summary,
@@ -192,7 +202,7 @@ function EntryCard({
192
202
  </TitleIcons>
193
203
  </CardHeading>
194
204
  </CardBody>
195
- {image ? <CardImage src={getAsset(image, imageField).toString()} /> : null}
205
+ {image ? <CardImage getAsset={getAsset} value={image} field={imageField} /> : null}
196
206
  </GridCardLink>
197
207
  </GridCard>
198
208
  );
@@ -67,18 +67,25 @@ const TreeNavLink = styled(NavLink)`
67
67
  `};
68
68
  `;
69
69
 
70
- function getNodeTitle(node) {
71
- const title = node.isRoot
72
- ? node.title
73
- : node.children.find(c => !c.isDir && c.title)?.title || node.title;
74
- return title;
70
+ function getNodeTitle(node, collection) {
71
+ // Backward compatibility: when `nested.subfolders` is true(default) or undefined,
72
+ // directory nodes should use the title of their index entry.
73
+ // Otherwise, use the folder name already stored in `node.title`.
74
+ const subfolders = collection.getIn(['nested', 'subfolders']) !== false;
75
+ if (!node.isRoot && node.isDir && subfolders) {
76
+ const indexChild = node.children.find(child => !child.isDir);
77
+ if (indexChild && indexChild.title) {
78
+ return indexChild.title;
79
+ }
80
+ }
81
+ return node.title;
75
82
  }
76
83
 
77
84
  function TreeNode(props) {
78
85
  const { collection, treeData, depth = 0, onToggle } = props;
79
86
  const collectionName = collection.get('name');
80
87
 
81
- const sortedData = sortBy(treeData, getNodeTitle);
88
+ const sortedData = sortBy(treeData, node => getNodeTitle(node, collection));
82
89
  const subfolders = collection.get('nested')?.get('subfolders') !== false;
83
90
  return sortedData.map(node => {
84
91
  const leaf =
@@ -93,7 +100,7 @@ function TreeNode(props) {
93
100
  if (depth > 0) {
94
101
  to = `${to}/filter${node.path}`;
95
102
  }
96
- const title = getNodeTitle(node);
103
+ const title = getNodeTitle(node, collection);
97
104
 
98
105
  const hasChildren =
99
106
  depth === 0 ||
@@ -5,7 +5,7 @@ import styled from '@emotion/styled';
5
5
  import { css } from '@emotion/react';
6
6
  import { translate } from 'react-polyglot';
7
7
  import { NavLink } from 'react-router-dom';
8
- import { Icon, components, colors } from 'decap-cms-ui-default';
8
+ import { Icon, components, colors, lengths } from 'decap-cms-ui-default';
9
9
 
10
10
  import { searchCollections } from '../../actions/collections';
11
11
  import CollectionSearch from './CollectionSearch';
@@ -21,19 +21,20 @@ const styles = {
21
21
 
22
22
  const SidebarContainer = styled.aside`
23
23
  ${components.card};
24
- width: 250px;
24
+ width: ${lengths.topCardWidth};
25
+ max-width: 100%;
25
26
  padding: 8px 0 12px;
26
- position: fixed;
27
27
  max-height: calc(100vh - 112px);
28
28
  display: flex;
29
29
  flex-direction: column;
30
+ @media (min-width: 800px) {
31
+ position: fixed;
32
+ width: 250px;
33
+ }
30
34
  `;
31
35
 
32
36
  const SidebarHeading = styled.h2`
33
- font-size: 22px;
34
- font-weight: 600;
35
- line-height: 37px;
36
- padding: 0;
37
+ ${components.cardTopHeading};
37
38
  margin: 10px 20px;
38
39
  color: ${colors.textLead};
39
40
  `;
@@ -38,7 +38,7 @@ describe('NestedCollection', () => {
38
38
  folder: 'src/pages',
39
39
  fields: [{ name: 'title', widget: 'string' }],
40
40
  nested: {
41
- subfolders: false,
41
+ subfolders: true,
42
42
  },
43
43
  });
44
44
 
@@ -3,11 +3,27 @@
3
3
  exports[`Collection should render connected component 1`] = `
4
4
  <DocumentFragment>
5
5
  .emotion-0 {
6
- margin: 28px 18px;
6
+ display: -webkit-box;
7
+ display: -webkit-flex;
8
+ display: -ms-flexbox;
9
+ display: flex;
10
+ -webkit-flex-direction: column;
11
+ -ms-flex-direction: column;
12
+ flex-direction: column;
13
+ gap: 20px;
14
+ margin: 12px 8px;
7
15
  }
8
16
 
9
- .emotion-2 {
10
- padding-left: 280px;
17
+ @media (min-width: 500px) {
18
+ .emotion-0 {
19
+ margin: 28px 18px;
20
+ }
21
+ }
22
+
23
+ @media (min-width: 800px) {
24
+ .emotion-2 {
25
+ padding-left: 280px;
26
+ }
11
27
  }
12
28
 
13
29
  <div
@@ -45,11 +61,27 @@ exports[`Collection should render connected component 1`] = `
45
61
  exports[`Collection should render with collection with create url 1`] = `
46
62
  <DocumentFragment>
47
63
  .emotion-0 {
48
- margin: 28px 18px;
64
+ display: -webkit-box;
65
+ display: -webkit-flex;
66
+ display: -ms-flexbox;
67
+ display: flex;
68
+ -webkit-flex-direction: column;
69
+ -ms-flex-direction: column;
70
+ flex-direction: column;
71
+ gap: 20px;
72
+ margin: 12px 8px;
73
+ }
74
+
75
+ @media (min-width: 500px) {
76
+ .emotion-0 {
77
+ margin: 28px 18px;
78
+ }
49
79
  }
50
80
 
51
- .emotion-2 {
52
- padding-left: 280px;
81
+ @media (min-width: 800px) {
82
+ .emotion-2 {
83
+ padding-left: 280px;
84
+ }
53
85
  }
54
86
 
55
87
  <div
@@ -78,11 +110,27 @@ exports[`Collection should render with collection with create url 1`] = `
78
110
  exports[`Collection should render with collection with create url and path 1`] = `
79
111
  <DocumentFragment>
80
112
  .emotion-0 {
81
- margin: 28px 18px;
113
+ display: -webkit-box;
114
+ display: -webkit-flex;
115
+ display: -ms-flexbox;
116
+ display: flex;
117
+ -webkit-flex-direction: column;
118
+ -ms-flex-direction: column;
119
+ flex-direction: column;
120
+ gap: 20px;
121
+ margin: 12px 8px;
82
122
  }
83
123
 
84
- .emotion-2 {
85
- padding-left: 280px;
124
+ @media (min-width: 500px) {
125
+ .emotion-0 {
126
+ margin: 28px 18px;
127
+ }
128
+ }
129
+
130
+ @media (min-width: 800px) {
131
+ .emotion-2 {
132
+ padding-left: 280px;
133
+ }
86
134
  }
87
135
 
88
136
  <div
@@ -113,11 +161,27 @@ exports[`Collection should render with collection with create url and path 1`] =
113
161
  exports[`Collection should render with collection without create url 1`] = `
114
162
  <DocumentFragment>
115
163
  .emotion-0 {
116
- margin: 28px 18px;
164
+ display: -webkit-box;
165
+ display: -webkit-flex;
166
+ display: -ms-flexbox;
167
+ display: flex;
168
+ -webkit-flex-direction: column;
169
+ -ms-flex-direction: column;
170
+ flex-direction: column;
171
+ gap: 20px;
172
+ margin: 12px 8px;
173
+ }
174
+
175
+ @media (min-width: 500px) {
176
+ .emotion-0 {
177
+ margin: 28px 18px;
178
+ }
117
179
  }
118
180
 
119
- .emotion-2 {
120
- padding-left: 280px;
181
+ @media (min-width: 800px) {
182
+ .emotion-2 {
183
+ padding-left: 280px;
184
+ }
121
185
  }
122
186
 
123
187
  <div