@nextbridgehq/payload-block-builder 0.1.9 → 0.2.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.
@@ -1,367 +1,456 @@
1
- /* ── Block Data Field — Payload-native styles ────────────────────────────── */
2
-
3
- /* Container — mirrors Payload's group/array field outer wrapper */
4
- .bdf-wrap {
5
- border: 1px solid var(--theme-elevation-200);
6
- border-radius: 4px;
7
- overflow: hidden;
8
- /* Space between this component and the next native Payload field below */
9
- margin-bottom: calc(var(--base, 16px) * 0.5);
10
- }
11
-
12
- /* Header bar — like Payload's array-field header */
13
- .bdf-heading {
14
- display: flex;
15
- align-items: center;
16
- padding: 8px 16px;
17
- background: var(--theme-elevation-50);
18
- border-bottom: 1px solid var(--theme-elevation-150);
19
- font-size: 11px;
20
- font-weight: 600;
21
- letter-spacing: 0.08em;
22
- text-transform: uppercase;
23
- color: var(--theme-elevation-600);
24
- font-family: var(--font-body);
25
- user-select: none;
26
- }
27
-
28
- /* Body */
29
- .bdf-body {
30
- background: var(--theme-elevation-0);
31
- padding: var(--base, 16px);
32
- display: flex;
33
- flex-direction: column;
34
- gap: calc(var(--base, 16px) * 0.75);
35
- }
36
-
37
- /* Per-field wrapper */
38
- .bdf-field {
39
- display: flex;
40
- flex-direction: column;
41
- }
42
-
43
- /* Label — exact Payload .field-label */
44
- .bdf-label {
45
- display: flex;
46
- align-items: center;
47
- padding-bottom: 5px;
48
- color: var(--theme-elevation-800);
49
- font-family: var(--font-body);
50
- font-size: 13px;
51
- line-height: 20px;
52
- font-weight: 400;
53
- }
54
-
55
- .bdf-required {
56
- color: var(--theme-error-500, #ef4444);
57
- margin-left: 3px;
58
- }
59
-
60
- /* Input — exact .sbf-input mirror */
61
- .bdf-input {
62
- box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
63
- font-family: var(--font-body);
64
- width: 100%;
65
- border: 1px solid var(--theme-elevation-150);
66
- border-radius: var(--style-radius-s, 4px);
67
- background: var(--theme-input-bg, var(--theme-elevation-0));
68
- color: var(--theme-elevation-800);
69
- font-size: 1rem;
70
- height: 40px;
71
- line-height: 20px;
72
- padding: 8px 15px;
73
- -webkit-appearance: none;
74
- transition-property: border, box-shadow, background-color;
75
- transition-duration: 0.1s, 0.1s, 0.5s;
76
- transition-timing-function: cubic-bezier(0, 0.2, 0.2, 1);
77
- box-sizing: border-box;
78
- }
79
- .bdf-input:hover:not(:disabled) {
80
- box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.2);
81
- border-color: var(--theme-elevation-250);
82
- }
83
- .bdf-input:focus {
84
- border-color: var(--theme-elevation-400);
85
- outline: 0;
86
- }
87
- .bdf-input::placeholder {
88
- color: var(--theme-elevation-400);
89
- font-size: 1rem;
90
- }
91
-
92
- /* Textarea extends input, auto height */
93
- .bdf-textarea {
94
- height: auto;
95
- min-height: 80px;
96
- resize: vertical;
97
- line-height: 1.5;
98
- }
99
-
100
- /* Select with caret */
101
- .bdf-select {
102
- cursor: pointer;
103
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
104
- background-repeat: no-repeat;
105
- background-position: right 12px center;
106
- padding-right: 32px;
107
- }
108
-
109
- /* Monospace (JSON) */
110
- .bdf-mono {
111
- font-family: var(--font-mono, 'Courier New', monospace);
112
- font-size: 0.875rem;
113
- }
114
-
115
- /* Checkbox row */
116
- .bdf-checkbox-row {
117
- display: flex;
118
- align-items: center;
119
- gap: 10px;
120
- cursor: pointer;
121
- padding: 4px 0;
122
- }
123
- .bdf-checkbox-row input[type='checkbox'] {
124
- width: 16px;
125
- height: 16px;
126
- flex-shrink: 0;
127
- cursor: pointer;
128
- accent-color: var(--theme-success-500, #22c55e);
129
- border: 1px solid var(--theme-elevation-300);
130
- border-radius: 2px;
131
- }
132
- .bdf-checkbox-label {
133
- font-size: 13px;
134
- line-height: 20px;
135
- color: var(--theme-elevation-800);
136
- font-family: var(--font-body);
137
- }
138
-
139
- /* Multiselect / array / group fieldset */
140
- .bdf-fieldset {
141
- border: 1px solid var(--theme-elevation-150);
142
- border-radius: 4px;
143
- overflow: hidden;
144
- margin: 0;
145
- padding: 0;
146
- }
147
- .bdf-fieldset__header {
148
- display: flex;
149
- align-items: center;
150
- padding: 6px 12px;
151
- background: var(--theme-elevation-50);
152
- border-bottom: 1px solid var(--theme-elevation-100);
153
- font-size: 13px;
154
- font-weight: 400;
155
- color: var(--theme-elevation-800);
156
- font-family: var(--font-body);
157
- line-height: 20px;
158
- }
159
- .bdf-fieldset__body {
160
- padding: 12px;
161
- background: var(--theme-elevation-0);
162
- display: flex;
163
- flex-direction: column;
164
- gap: calc(var(--base, 16px) * 0.75);
165
- }
166
-
167
- /* Multiselect option */
168
- .bdf-multiselect-opt {
169
- display: flex;
170
- align-items: center;
171
- gap: 8px;
172
- cursor: pointer;
173
- padding: 3px 0;
174
- font-size: 13px;
175
- color: var(--theme-elevation-800);
176
- font-family: var(--font-body);
177
- }
178
- .bdf-multiselect-opt input[type='checkbox'] {
179
- width: 15px;
180
- height: 15px;
181
- flex-shrink: 0;
182
- accent-color: var(--theme-success-500, #22c55e);
183
- cursor: pointer;
184
- }
185
-
186
- /* Array row */
187
- .bdf-array-row {
188
- border: 1px solid var(--theme-elevation-150);
189
- border-radius: 4px;
190
- padding: 12px;
191
- background: var(--theme-elevation-0);
192
- display: flex;
193
- flex-direction: column;
194
- gap: calc(var(--base, 16px) * 0.75);
195
- }
196
-
197
- /* Remove row button */
198
- .bdf-remove-btn {
199
- display: inline-flex;
200
- align-items: center;
201
- gap: 5px;
202
- padding: 0;
203
- font-size: 12px;
204
- color: var(--theme-error-500, #ef4444);
205
- background: none;
206
- border: none;
207
- cursor: pointer;
208
- font-family: var(--font-body);
209
- line-height: 20px;
210
- opacity: 0.8;
211
- transition: opacity 0.1s;
212
- }
213
- .bdf-remove-btn:hover {
214
- opacity: 1;
215
- }
216
-
217
- /* Add row / add item button — mirrors .sbf-add-btn */
218
- .bdf-add-btn {
219
- display: inline-flex;
220
- align-items: center;
221
- gap: 6px;
222
- padding: 0;
223
- background: none;
224
- border: none;
225
- cursor: pointer;
226
- color: var(--theme-elevation-400);
227
- font-size: 13px;
228
- font-family: var(--font-body);
229
- line-height: 24px;
230
- transition: color 0.1s;
231
- }
232
- .bdf-add-btn:hover {
233
- color: var(--theme-elevation-800);
234
- }
235
- .bdf-add-btn__icon {
236
- display: flex;
237
- align-items: center;
238
- justify-content: center;
239
- width: 22px;
240
- height: 22px;
241
- border: 1px solid currentColor;
242
- border-radius: 50%;
243
- font-size: 14px;
244
- font-weight: 600;
245
- flex-shrink: 0;
246
- line-height: 1;
247
- }
248
-
249
- /* ── Media / Upload picker ───────────────────────────────────────────────── */
250
-
251
- .bdf-upload-area {
252
- display: flex;
253
- flex-direction: column;
254
- gap: 8px;
255
- }
256
-
257
- /* When media is already selected */
258
- .bdf-upload-selected {
259
- display: flex;
260
- align-items: center;
261
- gap: 10px;
262
- padding: 6px 8px 6px 6px;
263
- background: var(--theme-elevation-50);
264
- border: 1px solid var(--theme-elevation-150);
265
- border-radius: 4px;
266
- }
267
-
268
- .bdf-thumb {
269
- width: 44px;
270
- height: 44px;
271
- object-fit: cover;
272
- border-radius: 3px;
273
- background: var(--theme-elevation-100);
274
- flex-shrink: 0;
275
- border: 1px solid var(--theme-elevation-150);
276
- display: block;
277
- }
278
-
279
- .bdf-thumb-placeholder {
280
- width: 44px;
281
- height: 44px;
282
- border-radius: 3px;
283
- background: var(--theme-elevation-100);
284
- flex-shrink: 0;
285
- border: 1px solid var(--theme-elevation-150);
286
- display: flex;
287
- align-items: center;
288
- justify-content: center;
289
- font-size: 18px;
290
- color: var(--theme-elevation-400);
291
- }
292
-
293
- .bdf-upload-name {
294
- flex: 1;
295
- font-size: 13px;
296
- color: var(--theme-elevation-800);
297
- font-family: var(--font-body);
298
- white-space: nowrap;
299
- overflow: hidden;
300
- text-overflow: ellipsis;
301
- min-width: 0;
302
- }
303
-
304
- .bdf-upload-actions {
305
- display: flex;
306
- align-items: center;
307
- gap: 4px;
308
- flex-shrink: 0;
309
- }
310
-
311
- /* Browse / choose button */
312
- .bdf-upload-btn {
313
- display: inline-flex;
314
- align-items: center;
315
- gap: 6px;
316
- height: 40px;
317
- padding: 0 14px;
318
- background: var(--theme-elevation-100);
319
- border: 1px solid var(--theme-elevation-150);
320
- border-radius: var(--style-radius-s, 4px);
321
- color: var(--theme-elevation-800);
322
- font-size: 13px;
323
- font-family: var(--font-body);
324
- cursor: pointer;
325
- transition: background 0.1s, border-color 0.1s;
326
- white-space: nowrap;
327
- box-sizing: border-box;
328
- line-height: 1;
329
- }
330
- .bdf-upload-btn:hover {
331
- background: var(--theme-elevation-150);
332
- border-color: var(--theme-elevation-250);
333
- }
334
-
335
- /* Icon-only button (remove / swap) */
336
- .bdf-icon-btn {
337
- display: flex;
338
- align-items: center;
339
- justify-content: center;
340
- width: 26px;
341
- height: 26px;
342
- background: transparent;
343
- border: none;
344
- border-radius: 4px;
345
- cursor: pointer;
346
- color: var(--theme-elevation-500);
347
- font-size: 12px;
348
- padding: 0;
349
- flex-shrink: 0;
350
- font-family: var(--font-body);
351
- transition: background 0.1s, color 0.1s;
352
- line-height: 1;
353
- }
354
- .bdf-icon-btn:hover {
355
- background: var(--theme-elevation-150);
356
- color: var(--theme-elevation-900);
357
- }
358
- .bdf-icon-btn--danger:hover {
359
- background: var(--theme-error-50, rgba(239, 68, 68, 0.08));
360
- color: var(--theme-error-500, #ef4444);
361
- }
362
-
363
- /* ── States ──────────────────────────────────────────────────────────────── */
364
-
1
+ /* ── Block Data Field Payload-native styles ────────────────────────────── */
2
+
3
+ /* Container mirrors Payload's group/array field outer wrapper */
4
+ .bdf-wrap {
5
+ border: 1px solid var(--theme-elevation-200);
6
+ border-radius: 4px;
7
+ overflow: hidden;
8
+ /* Space between this component and the next native Payload field below */
9
+ margin-bottom: calc(var(--base, 16px) * 0.5);
10
+ }
11
+
12
+ /* Header bar like Payload's array-field header */
13
+ .bdf-heading {
14
+ display: flex;
15
+ align-items: center;
16
+ padding: 8px 16px;
17
+ background: var(--theme-elevation-50);
18
+ border-bottom: 1px solid var(--theme-elevation-150);
19
+ font-size: 11px;
20
+ font-weight: 600;
21
+ letter-spacing: 0.08em;
22
+ text-transform: uppercase;
23
+ color: var(--theme-elevation-600);
24
+ font-family: var(--font-body);
25
+ user-select: none;
26
+ }
27
+
28
+ /* Body */
29
+ .bdf-body {
30
+ background: var(--theme-elevation-0);
31
+ padding: var(--base, 16px);
32
+ display: flex;
33
+ flex-direction: column;
34
+ gap: calc(var(--base, 16px) * 0.75);
35
+ }
36
+
37
+ /* Per-field wrapper */
38
+ .bdf-field {
39
+ display: flex;
40
+ flex-direction: column;
41
+ }
42
+
43
+ /* Label exact Payload .field-label */
44
+ .bdf-label {
45
+ display: flex;
46
+ align-items: center;
47
+ padding-bottom: 5px;
48
+ color: var(--theme-elevation-800);
49
+ font-family: var(--font-body);
50
+ font-size: 13px;
51
+ line-height: 20px;
52
+ font-weight: 400;
53
+ }
54
+
55
+ .bdf-required {
56
+ color: var(--theme-error-500, #ef4444);
57
+ margin-left: 3px;
58
+ }
59
+
60
+ /* Input exact .sbf-input mirror */
61
+ .bdf-input {
62
+ box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
63
+ font-family: var(--font-body);
64
+ width: 100%;
65
+ border: 1px solid var(--theme-elevation-150);
66
+ border-radius: var(--style-radius-s, 4px);
67
+ background: var(--theme-input-bg, var(--theme-elevation-0));
68
+ color: var(--theme-elevation-800);
69
+ font-size: 1rem;
70
+ height: 40px;
71
+ line-height: 20px;
72
+ padding: 8px 15px;
73
+ -webkit-appearance: none;
74
+ transition-property: border, box-shadow, background-color;
75
+ transition-duration: 0.1s, 0.1s, 0.5s;
76
+ transition-timing-function: cubic-bezier(0, 0.2, 0.2, 1);
77
+ box-sizing: border-box;
78
+ }
79
+ .bdf-input:hover:not(:disabled) {
80
+ box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.2);
81
+ border-color: var(--theme-elevation-250);
82
+ }
83
+ .bdf-input:focus {
84
+ border-color: var(--theme-elevation-400);
85
+ outline: 0;
86
+ }
87
+ .bdf-input::placeholder {
88
+ color: var(--theme-elevation-400);
89
+ font-size: 1rem;
90
+ }
91
+
92
+ /* Textarea extends input, auto height */
93
+ .bdf-textarea {
94
+ height: auto;
95
+ min-height: 80px;
96
+ resize: vertical;
97
+ line-height: 1.5;
98
+ }
99
+
100
+ /* Select with caret */
101
+ .bdf-select {
102
+ cursor: pointer;
103
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
104
+ background-repeat: no-repeat;
105
+ background-position: right 12px center;
106
+ padding-right: 32px;
107
+ }
108
+
109
+ /* Monospace (JSON) */
110
+ .bdf-mono {
111
+ font-family: var(--font-mono, 'Courier New', monospace);
112
+ font-size: 0.875rem;
113
+ }
114
+
115
+ /* Checkbox row */
116
+ .bdf-checkbox-row {
117
+ display: flex;
118
+ align-items: center;
119
+ gap: 10px;
120
+ cursor: pointer;
121
+ padding: 4px 0;
122
+ }
123
+ .bdf-checkbox-row input[type='checkbox'] {
124
+ width: 16px;
125
+ height: 16px;
126
+ flex-shrink: 0;
127
+ cursor: pointer;
128
+ accent-color: var(--theme-success-500, #22c55e);
129
+ border: 1px solid var(--theme-elevation-300);
130
+ border-radius: 2px;
131
+ }
132
+ .bdf-checkbox-label {
133
+ font-size: 13px;
134
+ line-height: 20px;
135
+ color: var(--theme-elevation-800);
136
+ font-family: var(--font-body);
137
+ }
138
+
139
+ /* Multiselect / array / group fieldset */
140
+ .bdf-fieldset {
141
+ border: 1px solid var(--theme-elevation-150);
142
+ border-radius: 4px;
143
+ overflow: hidden;
144
+ margin: 0;
145
+ padding: 0;
146
+ }
147
+ .bdf-fieldset__header {
148
+ display: flex;
149
+ align-items: center;
150
+ padding: 6px 12px;
151
+ background: var(--theme-elevation-50);
152
+ border-bottom: 1px solid var(--theme-elevation-100);
153
+ font-size: 13px;
154
+ font-weight: 400;
155
+ color: var(--theme-elevation-800);
156
+ font-family: var(--font-body);
157
+ line-height: 20px;
158
+ }
159
+ .bdf-fieldset__body {
160
+ padding: 12px;
161
+ background: var(--theme-elevation-0);
162
+ display: flex;
163
+ flex-direction: column;
164
+ gap: calc(var(--base, 16px) * 0.75);
165
+ }
166
+
167
+ /* Row layout -- fields side by side, flat into parent data */
168
+ .bdf-row {
169
+ display: flex;
170
+ align-items: flex-start;
171
+ gap: calc(var(--base, 16px) * 0.75);
172
+ }
173
+ .bdf-row > * {
174
+ flex: 1;
175
+ min-width: 0;
176
+ }
177
+
178
+ /* Collapsible section -- flat into parent data */
179
+ .bdf-collapsible {
180
+ border: 1px solid var(--theme-elevation-150);
181
+ border-radius: 4px;
182
+ overflow: hidden;
183
+ }
184
+ .bdf-collapsible__header {
185
+ display: flex;
186
+ align-items: center;
187
+ gap: 6px;
188
+ width: 100%;
189
+ padding: 6px 12px;
190
+ background: var(--theme-elevation-50);
191
+ border: none;
192
+ border-bottom: 1px solid var(--theme-elevation-100);
193
+ font-size: 13px;
194
+ font-weight: 400;
195
+ color: var(--theme-elevation-800);
196
+ font-family: var(--font-body);
197
+ line-height: 20px;
198
+ cursor: pointer;
199
+ text-align: left;
200
+ }
201
+ .bdf-collapsible__caret {
202
+ display: inline-block;
203
+ transition: transform 0.1s;
204
+ color: var(--theme-elevation-400);
205
+ }
206
+ .bdf-collapsible__caret--open {
207
+ transform: rotate(90deg);
208
+ }
209
+ .bdf-collapsible__body {
210
+ padding: 12px;
211
+ background: var(--theme-elevation-0);
212
+ display: flex;
213
+ flex-direction: column;
214
+ gap: calc(var(--base, 16px) * 0.75);
215
+ }
216
+
217
+ /* Tabs -- named tabs nest data, unnamed tabs are flat */
218
+ .bdf-tabs {
219
+ border: 1px solid var(--theme-elevation-150);
220
+ border-radius: 4px;
221
+ overflow: hidden;
222
+ }
223
+ .bdf-tabs__list {
224
+ display: flex;
225
+ background: var(--theme-elevation-50);
226
+ border-bottom: 1px solid var(--theme-elevation-100);
227
+ overflow-x: auto;
228
+ }
229
+ .bdf-tabs__tab {
230
+ padding: 8px 14px;
231
+ background: none;
232
+ border: none;
233
+ border-bottom: 2px solid transparent;
234
+ font-size: 13px;
235
+ font-family: var(--font-body);
236
+ color: var(--theme-elevation-500);
237
+ cursor: pointer;
238
+ white-space: nowrap;
239
+ }
240
+ .bdf-tabs__tab:hover {
241
+ color: var(--theme-elevation-800);
242
+ }
243
+ .bdf-tabs__tab--active {
244
+ color: var(--theme-elevation-1000);
245
+ border-bottom-color: var(--theme-success-500, #22c55e);
246
+ font-weight: 500;
247
+ }
248
+ .bdf-tabs__panel {
249
+ padding: 12px;
250
+ background: var(--theme-elevation-0);
251
+ display: flex;
252
+ flex-direction: column;
253
+ gap: calc(var(--base, 16px) * 0.75);
254
+ }
255
+
256
+ /* Multiselect option */
257
+ .bdf-multiselect-opt {
258
+ display: flex;
259
+ align-items: center;
260
+ gap: 8px;
261
+ cursor: pointer;
262
+ padding: 3px 0;
263
+ font-size: 13px;
264
+ color: var(--theme-elevation-800);
265
+ font-family: var(--font-body);
266
+ }
267
+ .bdf-multiselect-opt input[type='checkbox'] {
268
+ width: 15px;
269
+ height: 15px;
270
+ flex-shrink: 0;
271
+ accent-color: var(--theme-success-500, #22c55e);
272
+ cursor: pointer;
273
+ }
274
+
275
+ /* Array row */
276
+ .bdf-array-row {
277
+ border: 1px solid var(--theme-elevation-150);
278
+ border-radius: 4px;
279
+ padding: 12px;
280
+ background: var(--theme-elevation-0);
281
+ display: flex;
282
+ flex-direction: column;
283
+ gap: calc(var(--base, 16px) * 0.75);
284
+ }
285
+
286
+ /* Remove row button */
287
+ .bdf-remove-btn {
288
+ display: inline-flex;
289
+ align-items: center;
290
+ gap: 5px;
291
+ padding: 0;
292
+ font-size: 12px;
293
+ color: var(--theme-error-500, #ef4444);
294
+ background: none;
295
+ border: none;
296
+ cursor: pointer;
297
+ font-family: var(--font-body);
298
+ line-height: 20px;
299
+ opacity: 0.8;
300
+ transition: opacity 0.1s;
301
+ }
302
+ .bdf-remove-btn:hover {
303
+ opacity: 1;
304
+ }
305
+
306
+ /* Add row / add item button — mirrors .sbf-add-btn */
307
+ .bdf-add-btn {
308
+ display: inline-flex;
309
+ align-items: center;
310
+ gap: 6px;
311
+ padding: 0;
312
+ background: none;
313
+ border: none;
314
+ cursor: pointer;
315
+ color: var(--theme-elevation-400);
316
+ font-size: 13px;
317
+ font-family: var(--font-body);
318
+ line-height: 24px;
319
+ transition: color 0.1s;
320
+ }
321
+ .bdf-add-btn:hover {
322
+ color: var(--theme-elevation-800);
323
+ }
324
+ .bdf-add-btn__icon {
325
+ display: flex;
326
+ align-items: center;
327
+ justify-content: center;
328
+ width: 22px;
329
+ height: 22px;
330
+ border: 1px solid currentColor;
331
+ border-radius: 50%;
332
+ font-size: 14px;
333
+ font-weight: 600;
334
+ flex-shrink: 0;
335
+ line-height: 1;
336
+ }
337
+
338
+ /* ── Media / Upload picker ───────────────────────────────────────────────── */
339
+
340
+ .bdf-upload-area {
341
+ display: flex;
342
+ flex-direction: column;
343
+ gap: 8px;
344
+ }
345
+
346
+ /* When media is already selected */
347
+ .bdf-upload-selected {
348
+ display: flex;
349
+ align-items: center;
350
+ gap: 10px;
351
+ padding: 6px 8px 6px 6px;
352
+ background: var(--theme-elevation-50);
353
+ border: 1px solid var(--theme-elevation-150);
354
+ border-radius: 4px;
355
+ }
356
+
357
+ .bdf-thumb {
358
+ width: 44px;
359
+ height: 44px;
360
+ object-fit: cover;
361
+ border-radius: 3px;
362
+ background: var(--theme-elevation-100);
363
+ flex-shrink: 0;
364
+ border: 1px solid var(--theme-elevation-150);
365
+ display: block;
366
+ }
367
+
368
+ .bdf-thumb-placeholder {
369
+ width: 44px;
370
+ height: 44px;
371
+ border-radius: 3px;
372
+ background: var(--theme-elevation-100);
373
+ flex-shrink: 0;
374
+ border: 1px solid var(--theme-elevation-150);
375
+ display: flex;
376
+ align-items: center;
377
+ justify-content: center;
378
+ font-size: 18px;
379
+ color: var(--theme-elevation-400);
380
+ }
381
+
382
+ .bdf-upload-name {
383
+ flex: 1;
384
+ font-size: 13px;
385
+ color: var(--theme-elevation-800);
386
+ font-family: var(--font-body);
387
+ white-space: nowrap;
388
+ overflow: hidden;
389
+ text-overflow: ellipsis;
390
+ min-width: 0;
391
+ }
392
+
393
+ .bdf-upload-actions {
394
+ display: flex;
395
+ align-items: center;
396
+ gap: 4px;
397
+ flex-shrink: 0;
398
+ }
399
+
400
+ /* Browse / choose button */
401
+ .bdf-upload-btn {
402
+ display: inline-flex;
403
+ align-items: center;
404
+ gap: 6px;
405
+ height: 40px;
406
+ padding: 0 14px;
407
+ background: var(--theme-elevation-100);
408
+ border: 1px solid var(--theme-elevation-150);
409
+ border-radius: var(--style-radius-s, 4px);
410
+ color: var(--theme-elevation-800);
411
+ font-size: 13px;
412
+ font-family: var(--font-body);
413
+ cursor: pointer;
414
+ transition: background 0.1s, border-color 0.1s;
415
+ white-space: nowrap;
416
+ box-sizing: border-box;
417
+ line-height: 1;
418
+ }
419
+ .bdf-upload-btn:hover {
420
+ background: var(--theme-elevation-150);
421
+ border-color: var(--theme-elevation-250);
422
+ }
423
+
424
+ /* Icon-only button (remove / swap) */
425
+ .bdf-icon-btn {
426
+ display: flex;
427
+ align-items: center;
428
+ justify-content: center;
429
+ width: 26px;
430
+ height: 26px;
431
+ background: transparent;
432
+ border: none;
433
+ border-radius: 4px;
434
+ cursor: pointer;
435
+ color: var(--theme-elevation-500);
436
+ font-size: 12px;
437
+ padding: 0;
438
+ flex-shrink: 0;
439
+ font-family: var(--font-body);
440
+ transition: background 0.1s, color 0.1s;
441
+ line-height: 1;
442
+ }
443
+ .bdf-icon-btn:hover {
444
+ background: var(--theme-elevation-150);
445
+ color: var(--theme-elevation-900);
446
+ }
447
+ .bdf-icon-btn--danger:hover {
448
+ background: var(--theme-error-50, rgba(239, 68, 68, 0.08));
449
+ color: var(--theme-error-500, #ef4444);
450
+ }
451
+
452
+ /* ── States ──────────────────────────────────────────────────────────────── */
453
+
365
454
  /* Relationship Picker */
366
455
 
367
456
  .bdf-rel {
@@ -532,32 +621,32 @@
532
621
  font-family: var(--font-body);
533
622
  }
534
623
 
535
- .bdf-empty {
536
- padding: calc(var(--base, 16px) * 1.5) var(--base, 16px);
537
- border: 1px dashed var(--theme-elevation-200);
538
- border-radius: 4px;
539
- text-align: center;
540
- color: var(--theme-elevation-400);
541
- font-size: 13px;
542
- font-family: var(--font-body);
543
- line-height: 20px;
544
- }
545
-
546
- .bdf-loading {
547
- padding: 12px var(--base, 16px);
548
- color: var(--theme-elevation-400);
549
- font-size: 13px;
550
- font-family: var(--font-body);
551
- }
552
-
553
- .bdf-error {
554
- padding: 10px 14px;
555
- color: var(--theme-error-500, #ef4444);
556
- font-size: 13px;
557
- font-family: var(--font-body);
558
- background: var(--theme-error-50, rgba(239, 68, 68, 0.05));
559
- border: 1px solid var(--theme-error-100, rgba(239, 68, 68, 0.15));
560
- border-radius: 4px;
561
- }
562
-
563
-
624
+ .bdf-empty {
625
+ padding: calc(var(--base, 16px) * 1.5) var(--base, 16px);
626
+ border: 1px dashed var(--theme-elevation-200);
627
+ border-radius: 4px;
628
+ text-align: center;
629
+ color: var(--theme-elevation-400);
630
+ font-size: 13px;
631
+ font-family: var(--font-body);
632
+ line-height: 20px;
633
+ }
634
+
635
+ .bdf-loading {
636
+ padding: 12px var(--base, 16px);
637
+ color: var(--theme-elevation-400);
638
+ font-size: 13px;
639
+ font-family: var(--font-body);
640
+ }
641
+
642
+ .bdf-error {
643
+ padding: 10px 14px;
644
+ color: var(--theme-error-500, #ef4444);
645
+ font-size: 13px;
646
+ font-family: var(--font-body);
647
+ background: var(--theme-error-50, rgba(239, 68, 68, 0.05));
648
+ border: 1px solid var(--theme-error-100, rgba(239, 68, 68, 0.15));
649
+ border-radius: 4px;
650
+ }
651
+
652
+