payload-canvas 0.6.3 → 0.6.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/LICENSE +21 -21
- package/README.md +6 -5
- package/dist/admin/aiKeyField.scss +58 -58
- package/dist/admin/diff/layoutDiff.scss +181 -181
- package/dist/admin/editor/assistant/assistant.scss +944 -944
- package/dist/admin/editor/classes/manager.scss +262 -262
- package/dist/admin/editor/comments/comments.scss +539 -539
- package/dist/admin/editor/dnd/dnd.scss +261 -261
- package/dist/admin/editor/editor.scss +2629 -2629
- package/dist/admin/editor/empty/empty.scss +92 -92
- package/dist/admin/editor/fields/fields.scss +778 -778
- package/dist/admin/editor/generate/generate.scss +276 -276
- package/dist/admin/editor/layout/layout.scss +240 -240
- package/dist/admin/editor/live/presence.scss +24 -24
- package/dist/admin/editor/locale/locale.scss +154 -154
- package/dist/admin/editor/media/media.scss +233 -233
- package/dist/admin/editor/menu/menu.scss +132 -132
- package/dist/admin/editor/motion/motion.scss +84 -84
- package/dist/admin/editor/sections/components.scss +238 -238
- package/dist/admin/editor/sections/variants.scss +90 -90
- package/dist/admin/editor/styles/ClassCss.js +3 -3
- package/dist/admin/editor/styles/classes.scss +381 -381
- package/dist/admin/editor/styles/styles.scss +1123 -1123
- package/dist/admin/editor/styles/tokens.js +2 -1
- package/dist/admin/editor/templates/templates.scss +654 -654
- package/dist/admin/editor/tooltip/tooltip.scss +39 -39
- package/dist/admin/editor/topbar/DocumentActions.js +1 -1
- package/dist/admin/editor/topbar/contentMode.scss +26 -26
- package/dist/admin/editor/topbar/screens/screens.scss +134 -134
- package/dist/admin/editor/topbar/settingsDrawer.scss +32 -32
- package/dist/admin/editor/topbar/topbar.scss +645 -645
- package/dist/admin/editor/ui/controls.scss +320 -320
- package/dist/admin/forms/submissions.scss +197 -197
- package/dist/admin/layoutField.scss +69 -69
- package/dist/admin/templateConditions.scss +24 -24
- package/dist/ai/prompt.js +40 -40
- package/dist/blocks/client/marquee.js +14 -14
- package/dist/blocks/payload.js +13 -3
- package/dist/core/responseError.d.ts +5 -0
- package/dist/core/responseError.js +8 -0
- package/dist/css/index.d.ts +6 -0
- package/dist/css/index.js +40 -1
- package/dist/css/shared.js +2 -2
- package/dist/live/session.js +18 -0
- package/dist/live/storage.d.ts +5 -0
- package/dist/live/storage.js +20 -0
- package/dist/mcp/shared.js +16 -16
- package/dist/plugin/index.d.ts +14 -1
- package/dist/plugin/index.js +46 -8
- package/dist/react/canvas/BuilderCanvas.js +4 -3
- package/dist/react/canvas/thumbnail/ThumbnailCanvas.js +2 -1
- package/dist/theme/admin/fields.scss +363 -363
- package/package.json +1 -1
|
@@ -1,197 +1,197 @@
|
|
|
1
|
-
// The form submissions admin: the detail view (SubmissionView.tsx) and the list cells
|
|
2
|
-
// (SubmissionCells.tsx). Payload CSS variables only, no Tailwind (it would leak into the admin).
|
|
3
|
-
|
|
4
|
-
@layer payload-default {
|
|
5
|
-
.form-submission {
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
gap: calc(var(--base) * 1.25);
|
|
9
|
-
margin-bottom: calc(var(--base) * 1.5);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.form-submission__head {
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-wrap: wrap;
|
|
15
|
-
align-items: flex-start;
|
|
16
|
-
justify-content: space-between;
|
|
17
|
-
gap: var(--base);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.form-submission__heading {
|
|
21
|
-
min-width: 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.form-submission__form {
|
|
25
|
-
margin: 0 0 calc(var(--base) * 0.25);
|
|
26
|
-
color: var(--theme-elevation-500);
|
|
27
|
-
font-size: 0.8125rem;
|
|
28
|
-
font-weight: 500;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.form-submission__title {
|
|
32
|
-
margin: 0;
|
|
33
|
-
overflow-wrap: anywhere;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.form-submission__meta {
|
|
37
|
-
margin: calc(var(--base) * 0.25) 0 0;
|
|
38
|
-
color: var(--theme-elevation-600);
|
|
39
|
-
|
|
40
|
-
a {
|
|
41
|
-
color: inherit;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.form-submission__answers {
|
|
46
|
-
width: 100%;
|
|
47
|
-
border-collapse: collapse;
|
|
48
|
-
border: 1px solid var(--theme-elevation-150);
|
|
49
|
-
border-radius: var(--style-radius-m);
|
|
50
|
-
overflow: hidden;
|
|
51
|
-
|
|
52
|
-
th,
|
|
53
|
-
td {
|
|
54
|
-
padding: calc(var(--base) * 0.6) calc(var(--base) * 0.75);
|
|
55
|
-
border-bottom: 1px solid var(--theme-elevation-100);
|
|
56
|
-
text-align: left;
|
|
57
|
-
vertical-align: top;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
tr:last-child th,
|
|
61
|
-
tr:last-child td {
|
|
62
|
-
border-bottom: 0;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
th {
|
|
66
|
-
width: 32%;
|
|
67
|
-
color: var(--theme-elevation-600);
|
|
68
|
-
font-weight: 500;
|
|
69
|
-
background: var(--theme-elevation-50);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
td {
|
|
73
|
-
color: var(--theme-elevation-1000);
|
|
74
|
-
overflow-wrap: anywhere;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.form-submission__text {
|
|
79
|
-
white-space: pre-wrap;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.form-submission__empty {
|
|
83
|
-
margin: 0;
|
|
84
|
-
color: var(--theme-elevation-400);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.form-submission__subtitle {
|
|
88
|
-
margin: 0 0 calc(var(--base) * 0.5);
|
|
89
|
-
font-size: 1rem;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.form-submission__files {
|
|
93
|
-
display: grid;
|
|
94
|
-
grid-template-columns: repeat(auto-fill, minmax(calc(var(--base) * 14), 1fr));
|
|
95
|
-
gap: calc(var(--base) * 0.5);
|
|
96
|
-
margin: 0;
|
|
97
|
-
padding: 0;
|
|
98
|
-
list-style: none;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.form-submission__file {
|
|
102
|
-
display: flex;
|
|
103
|
-
align-items: center;
|
|
104
|
-
gap: calc(var(--base) * 0.6);
|
|
105
|
-
padding: calc(var(--base) * 0.4);
|
|
106
|
-
border: 1px solid var(--theme-elevation-150);
|
|
107
|
-
border-radius: var(--style-radius-m);
|
|
108
|
-
color: inherit;
|
|
109
|
-
text-decoration: none;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
a.form-submission__file:hover {
|
|
113
|
-
border-color: var(--theme-elevation-300);
|
|
114
|
-
background: var(--theme-elevation-50);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.form-submission__thumb {
|
|
118
|
-
display: grid;
|
|
119
|
-
flex: none;
|
|
120
|
-
place-items: center;
|
|
121
|
-
width: calc(var(--base) * 2.75);
|
|
122
|
-
height: calc(var(--base) * 2.75);
|
|
123
|
-
overflow: hidden;
|
|
124
|
-
border-radius: var(--style-radius-s);
|
|
125
|
-
background: var(--theme-elevation-100);
|
|
126
|
-
color: var(--theme-elevation-600);
|
|
127
|
-
font-size: 0.6875rem;
|
|
128
|
-
font-weight: 600;
|
|
129
|
-
|
|
130
|
-
img {
|
|
131
|
-
width: 100%;
|
|
132
|
-
height: 100%;
|
|
133
|
-
object-fit: cover;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.form-submission__file-text {
|
|
138
|
-
display: flex;
|
|
139
|
-
flex-direction: column;
|
|
140
|
-
min-width: 0;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.form-submission__file-name {
|
|
144
|
-
overflow: hidden;
|
|
145
|
-
text-overflow: ellipsis;
|
|
146
|
-
white-space: nowrap;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.form-submission__file-meta {
|
|
150
|
-
color: var(--theme-elevation-500);
|
|
151
|
-
font-size: 0.75rem;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
// List cells.
|
|
155
|
-
.form-submission-cell {
|
|
156
|
-
display: flex;
|
|
157
|
-
flex-direction: column;
|
|
158
|
-
min-width: 0;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.form-submission-cell__line {
|
|
162
|
-
font-weight: 500;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.form-submission-cell__text,
|
|
166
|
-
.form-submission-cell__opened {
|
|
167
|
-
color: var(--theme-elevation-500);
|
|
168
|
-
font-size: 0.8125rem;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
// Same size as the starter's Status badges (Draft, Published): 12px text, a dot, 2px 8px padding.
|
|
172
|
-
// Payload flips these scales in dark mode, so the same steps work in both themes.
|
|
173
|
-
.form-submission-badge {
|
|
174
|
-
display: inline-flex;
|
|
175
|
-
align-items: center;
|
|
176
|
-
gap: 6px;
|
|
177
|
-
// List cells make their children block boxes: keep the badge as wide as its text.
|
|
178
|
-
width: fit-content;
|
|
179
|
-
padding: 2px 8px;
|
|
180
|
-
border-radius: 999px;
|
|
181
|
-
background: var(--theme-success-100);
|
|
182
|
-
color: var(--theme-success-750);
|
|
183
|
-
font-size: 12px;
|
|
184
|
-
font-weight: 500;
|
|
185
|
-
line-height: 18px;
|
|
186
|
-
white-space: nowrap;
|
|
187
|
-
|
|
188
|
-
&::before {
|
|
189
|
-
content: '';
|
|
190
|
-
width: 6px;
|
|
191
|
-
height: 6px;
|
|
192
|
-
border-radius: 50%;
|
|
193
|
-
background: currentColor;
|
|
194
|
-
opacity: 0.8;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
1
|
+
// The form submissions admin: the detail view (SubmissionView.tsx) and the list cells
|
|
2
|
+
// (SubmissionCells.tsx). Payload CSS variables only, no Tailwind (it would leak into the admin).
|
|
3
|
+
|
|
4
|
+
@layer payload-default {
|
|
5
|
+
.form-submission {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: calc(var(--base) * 1.25);
|
|
9
|
+
margin-bottom: calc(var(--base) * 1.5);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.form-submission__head {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-wrap: wrap;
|
|
15
|
+
align-items: flex-start;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
gap: var(--base);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.form-submission__heading {
|
|
21
|
+
min-width: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.form-submission__form {
|
|
25
|
+
margin: 0 0 calc(var(--base) * 0.25);
|
|
26
|
+
color: var(--theme-elevation-500);
|
|
27
|
+
font-size: 0.8125rem;
|
|
28
|
+
font-weight: 500;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.form-submission__title {
|
|
32
|
+
margin: 0;
|
|
33
|
+
overflow-wrap: anywhere;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.form-submission__meta {
|
|
37
|
+
margin: calc(var(--base) * 0.25) 0 0;
|
|
38
|
+
color: var(--theme-elevation-600);
|
|
39
|
+
|
|
40
|
+
a {
|
|
41
|
+
color: inherit;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.form-submission__answers {
|
|
46
|
+
width: 100%;
|
|
47
|
+
border-collapse: collapse;
|
|
48
|
+
border: 1px solid var(--theme-elevation-150);
|
|
49
|
+
border-radius: var(--style-radius-m);
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
|
|
52
|
+
th,
|
|
53
|
+
td {
|
|
54
|
+
padding: calc(var(--base) * 0.6) calc(var(--base) * 0.75);
|
|
55
|
+
border-bottom: 1px solid var(--theme-elevation-100);
|
|
56
|
+
text-align: left;
|
|
57
|
+
vertical-align: top;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
tr:last-child th,
|
|
61
|
+
tr:last-child td {
|
|
62
|
+
border-bottom: 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
th {
|
|
66
|
+
width: 32%;
|
|
67
|
+
color: var(--theme-elevation-600);
|
|
68
|
+
font-weight: 500;
|
|
69
|
+
background: var(--theme-elevation-50);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
td {
|
|
73
|
+
color: var(--theme-elevation-1000);
|
|
74
|
+
overflow-wrap: anywhere;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.form-submission__text {
|
|
79
|
+
white-space: pre-wrap;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.form-submission__empty {
|
|
83
|
+
margin: 0;
|
|
84
|
+
color: var(--theme-elevation-400);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.form-submission__subtitle {
|
|
88
|
+
margin: 0 0 calc(var(--base) * 0.5);
|
|
89
|
+
font-size: 1rem;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.form-submission__files {
|
|
93
|
+
display: grid;
|
|
94
|
+
grid-template-columns: repeat(auto-fill, minmax(calc(var(--base) * 14), 1fr));
|
|
95
|
+
gap: calc(var(--base) * 0.5);
|
|
96
|
+
margin: 0;
|
|
97
|
+
padding: 0;
|
|
98
|
+
list-style: none;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.form-submission__file {
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
gap: calc(var(--base) * 0.6);
|
|
105
|
+
padding: calc(var(--base) * 0.4);
|
|
106
|
+
border: 1px solid var(--theme-elevation-150);
|
|
107
|
+
border-radius: var(--style-radius-m);
|
|
108
|
+
color: inherit;
|
|
109
|
+
text-decoration: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
a.form-submission__file:hover {
|
|
113
|
+
border-color: var(--theme-elevation-300);
|
|
114
|
+
background: var(--theme-elevation-50);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.form-submission__thumb {
|
|
118
|
+
display: grid;
|
|
119
|
+
flex: none;
|
|
120
|
+
place-items: center;
|
|
121
|
+
width: calc(var(--base) * 2.75);
|
|
122
|
+
height: calc(var(--base) * 2.75);
|
|
123
|
+
overflow: hidden;
|
|
124
|
+
border-radius: var(--style-radius-s);
|
|
125
|
+
background: var(--theme-elevation-100);
|
|
126
|
+
color: var(--theme-elevation-600);
|
|
127
|
+
font-size: 0.6875rem;
|
|
128
|
+
font-weight: 600;
|
|
129
|
+
|
|
130
|
+
img {
|
|
131
|
+
width: 100%;
|
|
132
|
+
height: 100%;
|
|
133
|
+
object-fit: cover;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.form-submission__file-text {
|
|
138
|
+
display: flex;
|
|
139
|
+
flex-direction: column;
|
|
140
|
+
min-width: 0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.form-submission__file-name {
|
|
144
|
+
overflow: hidden;
|
|
145
|
+
text-overflow: ellipsis;
|
|
146
|
+
white-space: nowrap;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.form-submission__file-meta {
|
|
150
|
+
color: var(--theme-elevation-500);
|
|
151
|
+
font-size: 0.75rem;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// List cells.
|
|
155
|
+
.form-submission-cell {
|
|
156
|
+
display: flex;
|
|
157
|
+
flex-direction: column;
|
|
158
|
+
min-width: 0;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.form-submission-cell__line {
|
|
162
|
+
font-weight: 500;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.form-submission-cell__text,
|
|
166
|
+
.form-submission-cell__opened {
|
|
167
|
+
color: var(--theme-elevation-500);
|
|
168
|
+
font-size: 0.8125rem;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// Same size as the starter's Status badges (Draft, Published): 12px text, a dot, 2px 8px padding.
|
|
172
|
+
// Payload flips these scales in dark mode, so the same steps work in both themes.
|
|
173
|
+
.form-submission-badge {
|
|
174
|
+
display: inline-flex;
|
|
175
|
+
align-items: center;
|
|
176
|
+
gap: 6px;
|
|
177
|
+
// List cells make their children block boxes: keep the badge as wide as its text.
|
|
178
|
+
width: fit-content;
|
|
179
|
+
padding: 2px 8px;
|
|
180
|
+
border-radius: 999px;
|
|
181
|
+
background: var(--theme-success-100);
|
|
182
|
+
color: var(--theme-success-750);
|
|
183
|
+
font-size: 12px;
|
|
184
|
+
font-weight: 500;
|
|
185
|
+
line-height: 18px;
|
|
186
|
+
white-space: nowrap;
|
|
187
|
+
|
|
188
|
+
&::before {
|
|
189
|
+
content: '';
|
|
190
|
+
width: 6px;
|
|
191
|
+
height: 6px;
|
|
192
|
+
border-radius: 50%;
|
|
193
|
+
background: currentColor;
|
|
194
|
+
opacity: 0.8;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
// The layout field in Payload's edit view (LayoutField.tsx) and the note while the edit view opens
|
|
2
|
-
// the builder (DocumentEditView.tsx). Payload CSS variables only, no Tailwind (it would leak into
|
|
3
|
-
// the admin).
|
|
4
|
-
|
|
5
|
-
@layer payload-default {
|
|
6
|
-
.builder-summary__box {
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
border: 1px solid var(--theme-elevation-150);
|
|
9
|
-
border-radius: var(--style-radius-m);
|
|
10
|
-
background: var(--theme-input-bg, var(--theme-elevation-0));
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.builder-summary__head {
|
|
14
|
-
display: flex;
|
|
15
|
-
align-items: center;
|
|
16
|
-
justify-content: space-between;
|
|
17
|
-
gap: var(--base);
|
|
18
|
-
min-height: calc(var(--base) * 2.5);
|
|
19
|
-
padding: calc(var(--base) * 0.5) calc(var(--base) * 0.5) calc(var(--base) * 0.5) calc(var(--base) * 0.75);
|
|
20
|
-
|
|
21
|
-
.btn {
|
|
22
|
-
flex: none;
|
|
23
|
-
margin: 0;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.builder-summary__count {
|
|
28
|
-
margin: 0;
|
|
29
|
-
color: var(--theme-elevation-800);
|
|
30
|
-
font-weight: 500;
|
|
31
|
-
font-variant-numeric: tabular-nums;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// The first sections, numbered like the page order.
|
|
35
|
-
.builder-summary__list {
|
|
36
|
-
margin: 0;
|
|
37
|
-
padding: calc(var(--base) * 0.5) calc(var(--base) * 0.75) calc(var(--base) * 0.5) calc(var(--base) * 2);
|
|
38
|
-
border-top: 1px solid var(--theme-elevation-100);
|
|
39
|
-
color: var(--theme-elevation-800);
|
|
40
|
-
|
|
41
|
-
li {
|
|
42
|
-
overflow: hidden;
|
|
43
|
-
padding: 2px 0;
|
|
44
|
-
text-overflow: ellipsis;
|
|
45
|
-
white-space: nowrap;
|
|
46
|
-
|
|
47
|
-
&::marker {
|
|
48
|
-
color: var(--theme-elevation-400);
|
|
49
|
-
font-variant-numeric: tabular-nums;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.builder-summary__more {
|
|
55
|
-
margin: 0;
|
|
56
|
-
padding: 0 calc(var(--base) * 0.75) calc(var(--base) * 0.5) calc(var(--base) * 2);
|
|
57
|
-
color: var(--theme-elevation-500);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.builder-summary__error {
|
|
61
|
-
color: var(--theme-error-500);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.builder-open-note {
|
|
65
|
-
display: block;
|
|
66
|
-
margin: calc(var(--base) * 2) var(--gutter-h, calc(var(--base) * 2));
|
|
67
|
-
color: var(--theme-elevation-500);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
1
|
+
// The layout field in Payload's edit view (LayoutField.tsx) and the note while the edit view opens
|
|
2
|
+
// the builder (DocumentEditView.tsx). Payload CSS variables only, no Tailwind (it would leak into
|
|
3
|
+
// the admin).
|
|
4
|
+
|
|
5
|
+
@layer payload-default {
|
|
6
|
+
.builder-summary__box {
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
border: 1px solid var(--theme-elevation-150);
|
|
9
|
+
border-radius: var(--style-radius-m);
|
|
10
|
+
background: var(--theme-input-bg, var(--theme-elevation-0));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.builder-summary__head {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
gap: var(--base);
|
|
18
|
+
min-height: calc(var(--base) * 2.5);
|
|
19
|
+
padding: calc(var(--base) * 0.5) calc(var(--base) * 0.5) calc(var(--base) * 0.5) calc(var(--base) * 0.75);
|
|
20
|
+
|
|
21
|
+
.btn {
|
|
22
|
+
flex: none;
|
|
23
|
+
margin: 0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.builder-summary__count {
|
|
28
|
+
margin: 0;
|
|
29
|
+
color: var(--theme-elevation-800);
|
|
30
|
+
font-weight: 500;
|
|
31
|
+
font-variant-numeric: tabular-nums;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// The first sections, numbered like the page order.
|
|
35
|
+
.builder-summary__list {
|
|
36
|
+
margin: 0;
|
|
37
|
+
padding: calc(var(--base) * 0.5) calc(var(--base) * 0.75) calc(var(--base) * 0.5) calc(var(--base) * 2);
|
|
38
|
+
border-top: 1px solid var(--theme-elevation-100);
|
|
39
|
+
color: var(--theme-elevation-800);
|
|
40
|
+
|
|
41
|
+
li {
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
padding: 2px 0;
|
|
44
|
+
text-overflow: ellipsis;
|
|
45
|
+
white-space: nowrap;
|
|
46
|
+
|
|
47
|
+
&::marker {
|
|
48
|
+
color: var(--theme-elevation-400);
|
|
49
|
+
font-variant-numeric: tabular-nums;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.builder-summary__more {
|
|
55
|
+
margin: 0;
|
|
56
|
+
padding: 0 calc(var(--base) * 0.75) calc(var(--base) * 0.5) calc(var(--base) * 2);
|
|
57
|
+
color: var(--theme-elevation-500);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.builder-summary__error {
|
|
61
|
+
color: var(--theme-error-500);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.builder-open-note {
|
|
65
|
+
display: block;
|
|
66
|
+
margin: calc(var(--base) * 2) var(--gutter-h, calc(var(--base) * 2));
|
|
67
|
+
color: var(--theme-elevation-500);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
// The template conditions field in Payload's document form, outside the builder editor. The
|
|
2
|
-
// condition rows and their selects read the editor's color variables, which the editor sets on
|
|
3
|
-
// `.builder-editor`. Here they are set on the page body (the select lists render in a portal
|
|
4
|
-
// there) while the field is on the page. The values match editor.scss.
|
|
5
|
-
|
|
6
|
-
@layer payload-default {
|
|
7
|
-
body:has(.builder-template-conditions) {
|
|
8
|
-
--be-accent: var(--theme-success-500);
|
|
9
|
-
--be-border: var(--theme-elevation-150);
|
|
10
|
-
--be-border-soft: var(--theme-elevation-100);
|
|
11
|
-
--be-muted: var(--theme-elevation-600);
|
|
12
|
-
--be-subtle: var(--theme-elevation-400);
|
|
13
|
-
--be-hover: var(--theme-elevation-100);
|
|
14
|
-
--be-radius-m: var(--style-radius-m, 6px);
|
|
15
|
-
--be-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
16
|
-
--be-text-s: calc(1rem - 2px);
|
|
17
|
-
--be-text-m: 1rem;
|
|
18
|
-
--be-weight-strong: 600;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.builder-template-conditions {
|
|
22
|
-
margin-bottom: var(--spacing-field, calc(var(--base) * 1.5));
|
|
23
|
-
}
|
|
24
|
-
}
|
|
1
|
+
// The template conditions field in Payload's document form, outside the builder editor. The
|
|
2
|
+
// condition rows and their selects read the editor's color variables, which the editor sets on
|
|
3
|
+
// `.builder-editor`. Here they are set on the page body (the select lists render in a portal
|
|
4
|
+
// there) while the field is on the page. The values match editor.scss.
|
|
5
|
+
|
|
6
|
+
@layer payload-default {
|
|
7
|
+
body:has(.builder-template-conditions) {
|
|
8
|
+
--be-accent: var(--theme-success-500);
|
|
9
|
+
--be-border: var(--theme-elevation-150);
|
|
10
|
+
--be-border-soft: var(--theme-elevation-100);
|
|
11
|
+
--be-muted: var(--theme-elevation-600);
|
|
12
|
+
--be-subtle: var(--theme-elevation-400);
|
|
13
|
+
--be-hover: var(--theme-elevation-100);
|
|
14
|
+
--be-radius-m: var(--style-radius-m, 6px);
|
|
15
|
+
--be-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
16
|
+
--be-text-s: calc(1rem - 2px);
|
|
17
|
+
--be-text-m: 1rem;
|
|
18
|
+
--be-weight-strong: 600;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.builder-template-conditions {
|
|
22
|
+
margin-bottom: var(--spacing-field, calc(var(--base) * 1.5));
|
|
23
|
+
}
|
|
24
|
+
}
|