wings-plugin-sdk 0.4.0 → 0.6.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.
- package/README.md +9 -181
- package/build.d.ts +1 -1
- package/build.mjs +5 -5
- package/package.json +3 -12
- package/shell.d.ts +1 -1
- package/shell.js +1 -14
- package/ui-css.d.ts +0 -4
- package/ui-css.js +0 -709
- package/ui.d.ts +0 -230
- package/ui.js +0 -593
package/ui-css.js
DELETED
|
@@ -1,709 +0,0 @@
|
|
|
1
|
-
// The wings-plugin-sdk/ui styles, for Wings versions whose plugin-ui.css doesn't have them yet. Wings' own copy
|
|
2
|
-
// in plugin-ui.css wins whenever it's there, so a Wings update restyles every plugin. Keep both the same.
|
|
3
|
-
|
|
4
|
-
/** The version of the classes this package renders. Wings' plugin-ui.css sets it as `--wings-ui`. */
|
|
5
|
-
export const UI_VERSION = 2;
|
|
6
|
-
|
|
7
|
-
export const fallbackCss = `/* wings-ui 2 start
|
|
8
|
-
The classes wings-plugin-sdk/ui renders, a public contract: the names and data attributes stay, and Wings may
|
|
9
|
-
restyle them. wings-plugin-sdk carries a copy of this block for older Wings without --wings-ui, so keep the
|
|
10
|
-
two the same (apps/desktop/src/lib/plugin-ui.test.ts checks). Bump --wings-ui when a class is added, and only add
|
|
11
|
-
rules: on an older Wings the SDK's copy loads before Wings' own, so a changed rule would lose to the old one. */
|
|
12
|
-
|
|
13
|
-
/* Raised layers, like a list of suggestions or a menu, as Wings' own menus draw them. */
|
|
14
|
-
:root {
|
|
15
|
-
--wings-menu-bg: rgb(32 29 35);
|
|
16
|
-
--wings-menu-ring: rgb(236 233 228 / 0.1);
|
|
17
|
-
--wings-menu-active: rgb(255 255 255 / 0.08);
|
|
18
|
-
--wings-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/* The page's place: a sidebar, popover, view (modal, window or tab) or settings page. */
|
|
22
|
-
.w-shell {
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
gap: 10px;
|
|
26
|
-
padding: 14px;
|
|
27
|
-
}
|
|
28
|
-
.w-shell[data-place="popover"] {
|
|
29
|
-
gap: 12px;
|
|
30
|
-
padding: 12px 14px 14px;
|
|
31
|
-
}
|
|
32
|
-
.w-shell[data-place="settings"] {
|
|
33
|
-
gap: 12px;
|
|
34
|
-
}
|
|
35
|
-
/* A page that lays itself out edge to edge, like a canvas, fills the frame and scrolls on its own. */
|
|
36
|
-
.w-shell[data-fill] {
|
|
37
|
-
height: 100vh;
|
|
38
|
-
gap: 0;
|
|
39
|
-
padding: 0;
|
|
40
|
-
overflow: hidden;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/* Layout. */
|
|
44
|
-
.w-row {
|
|
45
|
-
display: flex;
|
|
46
|
-
align-items: center;
|
|
47
|
-
gap: 8px;
|
|
48
|
-
min-width: 0;
|
|
49
|
-
}
|
|
50
|
-
.w-stack {
|
|
51
|
-
display: flex;
|
|
52
|
-
flex-direction: column;
|
|
53
|
-
gap: 8px;
|
|
54
|
-
min-width: 0;
|
|
55
|
-
}
|
|
56
|
-
:is(ul, ol):is(.w-row, .w-stack, .w-card) {
|
|
57
|
-
margin: 0;
|
|
58
|
-
list-style: none;
|
|
59
|
-
}
|
|
60
|
-
:is(ul, ol):is(.w-row, .w-stack) {
|
|
61
|
-
padding: 0;
|
|
62
|
-
}
|
|
63
|
-
:is(.w-row, .w-stack)[data-gap="none"] {
|
|
64
|
-
gap: 0;
|
|
65
|
-
}
|
|
66
|
-
:is(.w-row, .w-stack)[data-gap="xs"] {
|
|
67
|
-
gap: 2px;
|
|
68
|
-
}
|
|
69
|
-
:is(.w-row, .w-stack)[data-gap="s"] {
|
|
70
|
-
gap: 4px;
|
|
71
|
-
}
|
|
72
|
-
:is(.w-row, .w-stack)[data-gap="l"] {
|
|
73
|
-
gap: 12px;
|
|
74
|
-
}
|
|
75
|
-
.w-row[data-align="start"] {
|
|
76
|
-
align-items: flex-start;
|
|
77
|
-
}
|
|
78
|
-
.w-row[data-align="baseline"] {
|
|
79
|
-
align-items: baseline;
|
|
80
|
-
}
|
|
81
|
-
.w-row[data-justify="end"] {
|
|
82
|
-
justify-content: flex-end;
|
|
83
|
-
}
|
|
84
|
-
.w-row[data-justify="between"] {
|
|
85
|
-
justify-content: space-between;
|
|
86
|
-
}
|
|
87
|
-
.w-row[data-wrap] {
|
|
88
|
-
flex-wrap: wrap;
|
|
89
|
-
}
|
|
90
|
-
:is(.w-row, .w-stack, .w-text)[data-grow] {
|
|
91
|
-
flex: 1;
|
|
92
|
-
min-width: 0;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/* Text. */
|
|
96
|
-
.w-text[data-tone="muted"] {
|
|
97
|
-
color: var(--wings-muted);
|
|
98
|
-
}
|
|
99
|
-
.w-text[data-tone="info"] {
|
|
100
|
-
color: var(--wings-info);
|
|
101
|
-
}
|
|
102
|
-
.w-text[data-tone="success"] {
|
|
103
|
-
color: var(--wings-success);
|
|
104
|
-
}
|
|
105
|
-
.w-text[data-tone="warn"] {
|
|
106
|
-
color: var(--wings-warning);
|
|
107
|
-
}
|
|
108
|
-
.w-text[data-tone="danger"] {
|
|
109
|
-
color: var(--wings-danger);
|
|
110
|
-
}
|
|
111
|
-
.w-text[data-size="small"] {
|
|
112
|
-
font-size: 12px;
|
|
113
|
-
}
|
|
114
|
-
.w-text[data-size="tiny"] {
|
|
115
|
-
font-size: 11px;
|
|
116
|
-
}
|
|
117
|
-
.w-text[data-weight="medium"] {
|
|
118
|
-
font-weight: 500;
|
|
119
|
-
}
|
|
120
|
-
.w-text[data-weight="strong"] {
|
|
121
|
-
font-weight: 600;
|
|
122
|
-
}
|
|
123
|
-
.w-text[data-mono] {
|
|
124
|
-
font-family: var(--wings-mono);
|
|
125
|
-
}
|
|
126
|
-
.w-text[data-numeric] {
|
|
127
|
-
font-variant-numeric: tabular-nums;
|
|
128
|
-
}
|
|
129
|
-
.w-text[data-truncate] {
|
|
130
|
-
display: block;
|
|
131
|
-
overflow: hidden;
|
|
132
|
-
text-overflow: ellipsis;
|
|
133
|
-
white-space: nowrap;
|
|
134
|
-
}
|
|
135
|
-
.w-text[data-clamp] {
|
|
136
|
-
display: -webkit-box;
|
|
137
|
-
-webkit-line-clamp: 3;
|
|
138
|
-
-webkit-box-orient: vertical;
|
|
139
|
-
overflow: hidden;
|
|
140
|
-
}
|
|
141
|
-
:is(.w-row, .w-list-item, .w-list-button) > .w-text[data-truncate] {
|
|
142
|
-
min-width: 0;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/* A page's or a card's title. */
|
|
146
|
-
.w-title {
|
|
147
|
-
font-size: 14px;
|
|
148
|
-
font-weight: 600;
|
|
149
|
-
line-height: 1.35;
|
|
150
|
-
overflow-wrap: anywhere;
|
|
151
|
-
}
|
|
152
|
-
.w-title[data-size="large"] {
|
|
153
|
-
font-size: 15px;
|
|
154
|
-
}
|
|
155
|
-
/* A title cut to one line with an ellipsis, like Text truncate. */
|
|
156
|
-
.w-title[data-truncate] {
|
|
157
|
-
overflow: hidden;
|
|
158
|
-
text-overflow: ellipsis;
|
|
159
|
-
white-space: nowrap;
|
|
160
|
-
}
|
|
161
|
-
:is(.w-row, .w-list-item, .w-list-button) > .w-title[data-truncate] {
|
|
162
|
-
min-width: 0;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/* A section heading, with its controls on the right. */
|
|
166
|
-
.w-heading {
|
|
167
|
-
margin-top: 6px;
|
|
168
|
-
font-size: 12px;
|
|
169
|
-
font-weight: 500;
|
|
170
|
-
color: var(--wings-muted);
|
|
171
|
-
}
|
|
172
|
-
.w-heading-row {
|
|
173
|
-
display: flex;
|
|
174
|
-
align-items: center;
|
|
175
|
-
gap: 8px;
|
|
176
|
-
min-width: 0;
|
|
177
|
-
}
|
|
178
|
-
.w-heading-row > .w-heading {
|
|
179
|
-
flex: 1;
|
|
180
|
-
min-width: 0;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/* A card, and the quieter one for a summary line. */
|
|
184
|
-
.w-card {
|
|
185
|
-
display: flex;
|
|
186
|
-
flex-direction: column;
|
|
187
|
-
gap: 10px;
|
|
188
|
-
min-width: 0;
|
|
189
|
-
padding: 10px 12px;
|
|
190
|
-
border: 1px solid var(--wings-hairline);
|
|
191
|
-
border-radius: var(--wings-radius);
|
|
192
|
-
background: var(--wings-surface);
|
|
193
|
-
}
|
|
194
|
-
.w-card[data-size="compact"] {
|
|
195
|
-
gap: 6px;
|
|
196
|
-
padding: 8px 10px;
|
|
197
|
-
font-size: 12px;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/* A labelled bar, and the bar on its own. --w-value is how full it is. */
|
|
201
|
-
.w-gauge {
|
|
202
|
-
display: grid;
|
|
203
|
-
grid-template-columns: 1fr auto;
|
|
204
|
-
gap: 4px 8px;
|
|
205
|
-
font-size: 12px;
|
|
206
|
-
}
|
|
207
|
-
.w-gauge-value {
|
|
208
|
-
font-variant-numeric: tabular-nums;
|
|
209
|
-
font-weight: 500;
|
|
210
|
-
}
|
|
211
|
-
.w-gauge-note {
|
|
212
|
-
grid-column: 1 / -1;
|
|
213
|
-
color: var(--wings-muted);
|
|
214
|
-
}
|
|
215
|
-
.w-meter {
|
|
216
|
-
grid-column: 1 / -1;
|
|
217
|
-
height: 4px;
|
|
218
|
-
border-radius: 2px;
|
|
219
|
-
background: var(--wings-hairline-strong);
|
|
220
|
-
overflow: hidden;
|
|
221
|
-
}
|
|
222
|
-
.w-meter-fill {
|
|
223
|
-
display: block;
|
|
224
|
-
width: var(--w-value, 0%);
|
|
225
|
-
height: 100%;
|
|
226
|
-
border-radius: 2px;
|
|
227
|
-
background: var(--wings-info);
|
|
228
|
-
}
|
|
229
|
-
.w-meter[data-tone="warn"] > .w-meter-fill {
|
|
230
|
-
background: var(--wings-warning);
|
|
231
|
-
}
|
|
232
|
-
.w-meter[data-tone="danger"] > .w-meter-fill {
|
|
233
|
-
background: var(--wings-danger);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/* A row of small figures, label over value. */
|
|
237
|
-
.w-stats {
|
|
238
|
-
display: grid;
|
|
239
|
-
grid-auto-flow: column;
|
|
240
|
-
grid-auto-columns: minmax(0, 1fr);
|
|
241
|
-
gap: 8px;
|
|
242
|
-
margin: 0;
|
|
243
|
-
padding: 10px 12px;
|
|
244
|
-
border: 1px solid var(--wings-hairline);
|
|
245
|
-
border-radius: var(--wings-radius);
|
|
246
|
-
background: var(--wings-surface);
|
|
247
|
-
}
|
|
248
|
-
.w-stat-label {
|
|
249
|
-
font-size: 11px;
|
|
250
|
-
color: var(--wings-muted);
|
|
251
|
-
}
|
|
252
|
-
.w-stat-value {
|
|
253
|
-
margin: 2px 0 0;
|
|
254
|
-
font-weight: 500;
|
|
255
|
-
overflow: hidden;
|
|
256
|
-
text-overflow: ellipsis;
|
|
257
|
-
white-space: nowrap;
|
|
258
|
-
}
|
|
259
|
-
.w-stat-value[data-tone="warn"] {
|
|
260
|
-
color: var(--wings-warning);
|
|
261
|
-
}
|
|
262
|
-
.w-stat-value[data-tone="danger"] {
|
|
263
|
-
color: var(--wings-danger);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
/* Label and value pairs, like a work item's fields. */
|
|
267
|
-
.w-props {
|
|
268
|
-
display: flex;
|
|
269
|
-
flex-direction: column;
|
|
270
|
-
gap: 6px;
|
|
271
|
-
margin: 0;
|
|
272
|
-
}
|
|
273
|
-
.w-prop {
|
|
274
|
-
display: grid;
|
|
275
|
-
grid-template-columns: 92px minmax(0, 1fr);
|
|
276
|
-
gap: 8px;
|
|
277
|
-
align-items: start;
|
|
278
|
-
font-size: 12px;
|
|
279
|
-
line-height: 22px;
|
|
280
|
-
}
|
|
281
|
-
.w-prop-label {
|
|
282
|
-
color: var(--wings-muted);
|
|
283
|
-
}
|
|
284
|
-
.w-prop-value {
|
|
285
|
-
min-width: 0;
|
|
286
|
-
margin: 0;
|
|
287
|
-
overflow-wrap: anywhere;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
/* Lists: rows that light up under the pointer, or rows that are a button. */
|
|
291
|
-
.w-list {
|
|
292
|
-
display: flex;
|
|
293
|
-
flex-direction: column;
|
|
294
|
-
margin: 0;
|
|
295
|
-
padding: 0;
|
|
296
|
-
list-style: none;
|
|
297
|
-
font-size: 12px;
|
|
298
|
-
}
|
|
299
|
-
.w-list-item {
|
|
300
|
-
display: flex;
|
|
301
|
-
align-items: center;
|
|
302
|
-
gap: 8px;
|
|
303
|
-
min-width: 0;
|
|
304
|
-
padding: 4px 6px;
|
|
305
|
-
border-radius: 6px;
|
|
306
|
-
}
|
|
307
|
-
.w-list[data-density="compact"] > .w-list-item {
|
|
308
|
-
padding: 0 6px;
|
|
309
|
-
}
|
|
310
|
-
.w-list-item[data-align="start"] {
|
|
311
|
-
align-items: flex-start;
|
|
312
|
-
}
|
|
313
|
-
.w-list-item:hover {
|
|
314
|
-
background: var(--wings-hover);
|
|
315
|
-
}
|
|
316
|
-
.w-list-item:has(> .w-list-button) {
|
|
317
|
-
display: block;
|
|
318
|
-
padding: 0;
|
|
319
|
-
}
|
|
320
|
-
.w-list-item:has(> .w-list-button):hover {
|
|
321
|
-
background: none;
|
|
322
|
-
}
|
|
323
|
-
.w-list-button {
|
|
324
|
-
display: flex;
|
|
325
|
-
align-items: center;
|
|
326
|
-
justify-content: flex-start;
|
|
327
|
-
gap: 8px;
|
|
328
|
-
width: 100%;
|
|
329
|
-
min-width: 0;
|
|
330
|
-
height: auto;
|
|
331
|
-
padding: 5px 6px;
|
|
332
|
-
border: 0;
|
|
333
|
-
border-radius: 6px;
|
|
334
|
-
background: none;
|
|
335
|
-
font-size: inherit;
|
|
336
|
-
font-weight: inherit;
|
|
337
|
-
text-align: left;
|
|
338
|
-
}
|
|
339
|
-
.w-list-button[data-align="baseline"] {
|
|
340
|
-
align-items: baseline;
|
|
341
|
-
}
|
|
342
|
-
.w-list-button:hover {
|
|
343
|
-
background: var(--wings-hover);
|
|
344
|
-
}
|
|
345
|
-
.w-list-button:active {
|
|
346
|
-
transform: none;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
/* Status: a dot, a spinner, a filled pill and an outlined tag. */
|
|
350
|
-
.w-dot {
|
|
351
|
-
flex: none;
|
|
352
|
-
width: 6px;
|
|
353
|
-
height: 6px;
|
|
354
|
-
border-radius: 50%;
|
|
355
|
-
background: var(--wings-success);
|
|
356
|
-
}
|
|
357
|
-
.w-dot[data-tone="muted"] {
|
|
358
|
-
background: var(--wings-muted);
|
|
359
|
-
}
|
|
360
|
-
.w-dot[data-tone="info"] {
|
|
361
|
-
background: var(--wings-info);
|
|
362
|
-
}
|
|
363
|
-
.w-dot[data-tone="warn"] {
|
|
364
|
-
background: var(--wings-warning);
|
|
365
|
-
}
|
|
366
|
-
.w-dot[data-tone="danger"] {
|
|
367
|
-
background: var(--wings-danger);
|
|
368
|
-
}
|
|
369
|
-
/* A colour from the plugin's data, like a work item type's, in --w-color. */
|
|
370
|
-
.w-dot[data-color] {
|
|
371
|
-
background: var(--w-color);
|
|
372
|
-
}
|
|
373
|
-
.w-spinner {
|
|
374
|
-
flex: none;
|
|
375
|
-
width: 10px;
|
|
376
|
-
height: 10px;
|
|
377
|
-
border: 2px solid var(--wings-hairline-strong);
|
|
378
|
-
border-top-color: var(--wings-fg);
|
|
379
|
-
border-radius: 50%;
|
|
380
|
-
animation: w-spin 0.8s linear infinite;
|
|
381
|
-
}
|
|
382
|
-
.w-spinner[data-size="large"] {
|
|
383
|
-
width: 14px;
|
|
384
|
-
height: 14px;
|
|
385
|
-
}
|
|
386
|
-
@keyframes w-spin {
|
|
387
|
-
to {
|
|
388
|
-
transform: rotate(360deg);
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
.w-pill {
|
|
392
|
-
flex: none;
|
|
393
|
-
padding: 0 6px;
|
|
394
|
-
border-radius: 999px;
|
|
395
|
-
background: var(--wings-hover);
|
|
396
|
-
font-size: 11px;
|
|
397
|
-
font-weight: 600;
|
|
398
|
-
line-height: 18px;
|
|
399
|
-
white-space: nowrap;
|
|
400
|
-
}
|
|
401
|
-
.w-pill[data-tone="info"] {
|
|
402
|
-
color: var(--wings-info);
|
|
403
|
-
background: color-mix(in srgb, var(--wings-info) 14%, transparent);
|
|
404
|
-
}
|
|
405
|
-
.w-pill[data-tone="success"] {
|
|
406
|
-
color: var(--wings-success);
|
|
407
|
-
background: color-mix(in srgb, var(--wings-success) 14%, transparent);
|
|
408
|
-
}
|
|
409
|
-
.w-pill[data-tone="warn"] {
|
|
410
|
-
color: var(--wings-warning);
|
|
411
|
-
background: color-mix(in srgb, var(--wings-warning) 14%, transparent);
|
|
412
|
-
}
|
|
413
|
-
.w-pill[data-tone="danger"] {
|
|
414
|
-
color: var(--wings-danger);
|
|
415
|
-
background: color-mix(in srgb, var(--wings-danger) 14%, transparent);
|
|
416
|
-
}
|
|
417
|
-
.w-tag {
|
|
418
|
-
flex: none;
|
|
419
|
-
max-width: 100%;
|
|
420
|
-
overflow: hidden;
|
|
421
|
-
text-overflow: ellipsis;
|
|
422
|
-
white-space: nowrap;
|
|
423
|
-
padding: 0 5px;
|
|
424
|
-
border: 1px solid var(--wings-hairline-strong);
|
|
425
|
-
border-radius: 5px;
|
|
426
|
-
font-size: 10.5px;
|
|
427
|
-
line-height: 15px;
|
|
428
|
-
color: var(--wings-muted);
|
|
429
|
-
}
|
|
430
|
-
.w-tag[data-tone="info"] {
|
|
431
|
-
border-color: color-mix(in srgb, var(--wings-info) 45%, transparent);
|
|
432
|
-
color: var(--wings-info);
|
|
433
|
-
}
|
|
434
|
-
.w-tag[data-tone="success"] {
|
|
435
|
-
border-color: color-mix(in srgb, var(--wings-success) 45%, transparent);
|
|
436
|
-
color: var(--wings-success);
|
|
437
|
-
}
|
|
438
|
-
.w-tag[data-tone="warn"] {
|
|
439
|
-
border-color: color-mix(in srgb, var(--wings-warning) 45%, transparent);
|
|
440
|
-
color: var(--wings-warning);
|
|
441
|
-
}
|
|
442
|
-
.w-tag[data-tone="danger"] {
|
|
443
|
-
border-color: color-mix(in srgb, var(--wings-danger) 45%, transparent);
|
|
444
|
-
color: var(--wings-danger);
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
/* Nothing to show yet, or nothing at all. */
|
|
448
|
-
.w-loading {
|
|
449
|
-
color: var(--wings-muted);
|
|
450
|
-
}
|
|
451
|
-
.w-empty {
|
|
452
|
-
display: flex;
|
|
453
|
-
flex-direction: column;
|
|
454
|
-
gap: 4px;
|
|
455
|
-
padding: 24px 4px;
|
|
456
|
-
text-align: center;
|
|
457
|
-
}
|
|
458
|
-
.w-empty-detail {
|
|
459
|
-
color: var(--wings-muted);
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
/* Buttons. Plain buttons already look like Wings; these add the variants and sizes. */
|
|
463
|
-
.w-button[data-variant="primary"] {
|
|
464
|
-
border-color: transparent;
|
|
465
|
-
background: var(--wings-primary);
|
|
466
|
-
color: var(--wings-primary-fg);
|
|
467
|
-
}
|
|
468
|
-
.w-button[data-variant="primary"]:hover {
|
|
469
|
-
background: color-mix(in srgb, var(--wings-primary) 85%, transparent);
|
|
470
|
-
}
|
|
471
|
-
.w-button[data-variant="danger"] {
|
|
472
|
-
border-color: transparent;
|
|
473
|
-
background: color-mix(in srgb, var(--wings-danger) 85%, transparent);
|
|
474
|
-
color: #1b0f0d;
|
|
475
|
-
}
|
|
476
|
-
.w-button[data-variant="ghost"] {
|
|
477
|
-
border-color: transparent;
|
|
478
|
-
background: transparent;
|
|
479
|
-
}
|
|
480
|
-
.w-button[data-variant="ghost"]:hover {
|
|
481
|
-
background: var(--wings-hover);
|
|
482
|
-
}
|
|
483
|
-
/* Busy: it keeps focus, unlike a disabled button, and looks like one. */
|
|
484
|
-
.w-button[aria-disabled="true"] {
|
|
485
|
-
opacity: 0.5;
|
|
486
|
-
cursor: default;
|
|
487
|
-
}
|
|
488
|
-
.w-button[aria-disabled="true"]:active {
|
|
489
|
-
transform: none;
|
|
490
|
-
}
|
|
491
|
-
.w-button[data-size="small"] {
|
|
492
|
-
height: 24px;
|
|
493
|
-
padding: 0 8px;
|
|
494
|
-
font-size: 12px;
|
|
495
|
-
}
|
|
496
|
-
/* A busy button's spinner takes the button's text colour, so it shows on primary, danger, ghost and default alike. */
|
|
497
|
-
.w-button .w-spinner {
|
|
498
|
-
border-color: color-mix(in srgb, currentColor 25%, transparent);
|
|
499
|
-
border-top-color: currentColor;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
/* Chips: small quiet buttons, and a group of them that filters what shows. */
|
|
503
|
-
.w-chips {
|
|
504
|
-
display: flex;
|
|
505
|
-
align-items: center;
|
|
506
|
-
gap: 2px;
|
|
507
|
-
min-width: 0;
|
|
508
|
-
}
|
|
509
|
-
.w-chip {
|
|
510
|
-
height: 22px;
|
|
511
|
-
padding: 0 8px;
|
|
512
|
-
border: 0;
|
|
513
|
-
border-radius: 6px;
|
|
514
|
-
background: none;
|
|
515
|
-
font-size: 11px;
|
|
516
|
-
color: var(--wings-muted);
|
|
517
|
-
}
|
|
518
|
-
.w-chip:hover,
|
|
519
|
-
.w-chip[aria-pressed="true"] {
|
|
520
|
-
background: var(--wings-pressed);
|
|
521
|
-
}
|
|
522
|
-
.w-chip[aria-pressed="true"] {
|
|
523
|
-
color: var(--wings-fg);
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
/* Tabs over a panel. */
|
|
527
|
-
.w-tabs {
|
|
528
|
-
display: flex;
|
|
529
|
-
gap: 2px;
|
|
530
|
-
border-bottom: 1px solid var(--wings-hairline);
|
|
531
|
-
}
|
|
532
|
-
.w-tab {
|
|
533
|
-
height: 28px;
|
|
534
|
-
padding: 0 10px;
|
|
535
|
-
border: 0;
|
|
536
|
-
border-bottom: 2px solid transparent;
|
|
537
|
-
border-radius: 0;
|
|
538
|
-
background: none;
|
|
539
|
-
font-size: 12px;
|
|
540
|
-
color: var(--wings-muted);
|
|
541
|
-
}
|
|
542
|
-
.w-tab:hover {
|
|
543
|
-
background: none;
|
|
544
|
-
color: var(--wings-fg);
|
|
545
|
-
}
|
|
546
|
-
.w-tab:active {
|
|
547
|
-
transform: none;
|
|
548
|
-
}
|
|
549
|
-
.w-tab[aria-selected="true"] {
|
|
550
|
-
border-bottom-color: var(--wings-fg);
|
|
551
|
-
color: var(--wings-fg);
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
/* Form fields. Inputs, selects and text areas already look like Wings. */
|
|
555
|
-
.w-field {
|
|
556
|
-
display: flex;
|
|
557
|
-
flex-direction: column;
|
|
558
|
-
gap: 4px;
|
|
559
|
-
}
|
|
560
|
-
.w-field-label {
|
|
561
|
-
font-size: 12px;
|
|
562
|
-
font-weight: 500;
|
|
563
|
-
}
|
|
564
|
-
.w-field[data-layout="inline"] > .w-field-row {
|
|
565
|
-
display: flex;
|
|
566
|
-
align-items: center;
|
|
567
|
-
gap: 8px;
|
|
568
|
-
min-width: 0;
|
|
569
|
-
}
|
|
570
|
-
.w-field-row > .w-field-label {
|
|
571
|
-
flex: none;
|
|
572
|
-
}
|
|
573
|
-
.w-field-group {
|
|
574
|
-
display: flex;
|
|
575
|
-
flex-direction: column;
|
|
576
|
-
gap: 4px;
|
|
577
|
-
min-width: 0;
|
|
578
|
-
margin: 0;
|
|
579
|
-
padding: 0;
|
|
580
|
-
border: 0;
|
|
581
|
-
}
|
|
582
|
-
.w-field-group > legend {
|
|
583
|
-
margin-bottom: 4px;
|
|
584
|
-
padding: 0;
|
|
585
|
-
}
|
|
586
|
-
.w-field-hint {
|
|
587
|
-
font-size: 12px;
|
|
588
|
-
color: var(--wings-muted);
|
|
589
|
-
}
|
|
590
|
-
.w-field-hint[data-tone="danger"] {
|
|
591
|
-
color: var(--wings-danger);
|
|
592
|
-
}
|
|
593
|
-
.w-check {
|
|
594
|
-
display: flex;
|
|
595
|
-
align-items: center;
|
|
596
|
-
gap: 6px;
|
|
597
|
-
min-width: 0;
|
|
598
|
-
font-size: 12px;
|
|
599
|
-
cursor: pointer;
|
|
600
|
-
}
|
|
601
|
-
.w-check > input {
|
|
602
|
-
flex: none;
|
|
603
|
-
width: auto;
|
|
604
|
-
height: auto;
|
|
605
|
-
margin: 0;
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
/* A field with suggestions under it, and a menu under a button: raised lists of options. */
|
|
609
|
-
.w-combobox,
|
|
610
|
-
.w-menu-root {
|
|
611
|
-
position: relative;
|
|
612
|
-
min-width: 0;
|
|
613
|
-
}
|
|
614
|
-
.w-menu-root {
|
|
615
|
-
display: inline-block;
|
|
616
|
-
}
|
|
617
|
-
.w-listbox,
|
|
618
|
-
.w-menu {
|
|
619
|
-
position: absolute;
|
|
620
|
-
z-index: 10;
|
|
621
|
-
top: calc(100% + 4px);
|
|
622
|
-
left: 0;
|
|
623
|
-
max-height: 240px;
|
|
624
|
-
margin: 0;
|
|
625
|
-
padding: 4px;
|
|
626
|
-
overflow: auto;
|
|
627
|
-
list-style: none;
|
|
628
|
-
border-radius: var(--wings-radius);
|
|
629
|
-
background: var(--wings-menu-bg);
|
|
630
|
-
box-shadow:
|
|
631
|
-
0 0 0 1px var(--wings-menu-ring),
|
|
632
|
-
var(--wings-shadow);
|
|
633
|
-
}
|
|
634
|
-
.w-listbox {
|
|
635
|
-
right: 0;
|
|
636
|
-
}
|
|
637
|
-
.w-listbox > ul {
|
|
638
|
-
margin: 0;
|
|
639
|
-
padding: 0;
|
|
640
|
-
list-style: none;
|
|
641
|
-
}
|
|
642
|
-
.w-menu {
|
|
643
|
-
min-width: 100%;
|
|
644
|
-
width: max-content;
|
|
645
|
-
}
|
|
646
|
-
.w-menu[data-align="end"] {
|
|
647
|
-
left: auto;
|
|
648
|
-
right: 0;
|
|
649
|
-
}
|
|
650
|
-
.w-listbox[hidden],
|
|
651
|
-
.w-menu[hidden] {
|
|
652
|
-
display: none;
|
|
653
|
-
}
|
|
654
|
-
.w-option,
|
|
655
|
-
.w-menu-item {
|
|
656
|
-
display: flex;
|
|
657
|
-
align-items: baseline;
|
|
658
|
-
gap: 8px;
|
|
659
|
-
padding: 4px 6px;
|
|
660
|
-
border-radius: 8px;
|
|
661
|
-
cursor: default;
|
|
662
|
-
}
|
|
663
|
-
.w-option[aria-selected="true"],
|
|
664
|
-
.w-menu-item:focus {
|
|
665
|
-
background: var(--wings-menu-active);
|
|
666
|
-
}
|
|
667
|
-
/* Like Wings' own menus, the highlight shows where focus is. */
|
|
668
|
-
.w-menu-item:focus-visible {
|
|
669
|
-
outline: none;
|
|
670
|
-
}
|
|
671
|
-
.w-menu-item[data-tone="danger"] {
|
|
672
|
-
color: var(--wings-danger);
|
|
673
|
-
}
|
|
674
|
-
.w-option-label {
|
|
675
|
-
flex: 1;
|
|
676
|
-
min-width: 0;
|
|
677
|
-
overflow: hidden;
|
|
678
|
-
text-overflow: ellipsis;
|
|
679
|
-
white-space: nowrap;
|
|
680
|
-
}
|
|
681
|
-
.w-option-detail {
|
|
682
|
-
flex: none;
|
|
683
|
-
max-width: 45%;
|
|
684
|
-
overflow: hidden;
|
|
685
|
-
text-overflow: ellipsis;
|
|
686
|
-
white-space: nowrap;
|
|
687
|
-
font-size: 12px;
|
|
688
|
-
color: var(--wings-muted);
|
|
689
|
-
}
|
|
690
|
-
.w-option-empty {
|
|
691
|
-
padding: 4px 6px;
|
|
692
|
-
color: var(--wings-muted);
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
/* More behind a summary line. */
|
|
696
|
-
.w-disclosure > summary {
|
|
697
|
-
padding: 4px 6px;
|
|
698
|
-
font-size: 12px;
|
|
699
|
-
color: var(--wings-muted);
|
|
700
|
-
cursor: pointer;
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
@media (prefers-reduced-motion: reduce) {
|
|
704
|
-
.w-spinner {
|
|
705
|
-
animation: none;
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
/* wings-ui 2 end */
|
|
709
|
-
`;
|