@snap-rail/ui 0.1.0 → 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.
- package/lib/charts.js +6 -29
- package/lib/contract.js +119 -78
- package/lib/fallback.js +11 -1
- package/lib/index.js +2466 -735
- package/lib/runtime.js +1552 -490
- package/lib/settings.js +1162 -244
- package/lib/skins.js +163 -189
- package/lib/types/charts.d.ts +1 -1
- package/lib/types/charts.js +5 -5
- package/lib/types/components/alert.d.ts +57 -0
- package/lib/types/components/alert.js +46 -0
- package/lib/types/components/controls.d.ts +74 -11
- package/lib/types/components/controls.js +60 -17
- package/lib/types/components/dialog.d.ts +5 -5
- package/lib/types/components/dialog.js +2 -2
- package/lib/types/components/form-rhf.d.ts +56 -0
- package/lib/types/components/form-rhf.js +74 -0
- package/lib/types/components/form.d.ts +33 -5
- package/lib/types/components/form.js +22 -6
- package/lib/types/components/index.d.ts +7 -0
- package/lib/types/components/index.js +7 -0
- package/lib/types/components/input.d.ts +16 -7
- package/lib/types/components/input.js +39 -9
- package/lib/types/components/layout.d.ts +32 -7
- package/lib/types/components/layout.js +88 -15
- package/lib/types/components/overlay.d.ts +95 -0
- package/lib/types/components/overlay.js +138 -0
- package/lib/types/components/schema-form.d.ts +16 -4
- package/lib/types/components/schema-form.js +69 -40
- package/lib/types/components/slider.d.ts +18 -0
- package/lib/types/components/slider.js +15 -0
- package/lib/types/contract.d.ts +49 -37
- package/lib/types/contract.js +49 -33
- package/lib/types/fallback.js +1 -1
- package/lib/types/runtime.d.ts +23 -1
- package/lib/types/runtime.js +77 -20
- package/lib/types/settings-pages/appearance.d.ts +6 -4
- package/lib/types/settings-pages/appearance.js +33 -36
- package/lib/types/settings-pages/plugin-feed.d.ts +17 -0
- package/lib/types/settings-pages/plugin-feed.js +66 -0
- package/lib/types/settings-pages/plugins.d.ts +10 -5
- package/lib/types/settings-pages/plugins.js +284 -21
- package/lib/types/settings.d.ts +1 -0
- package/lib/types/settings.js +14 -8
- package/lib/types/skins.d.ts +38 -44
- package/lib/types/skins.js +172 -169
- package/package.json +16 -9
- package/src/styles/base.css +251 -5
- package/src/styles/default.css +315 -136
package/src/styles/base.css
CHANGED
|
@@ -92,7 +92,9 @@
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
[data-snap-component='select'] {
|
|
95
|
-
display:
|
|
95
|
+
display: flex;
|
|
96
|
+
width: 100%;
|
|
97
|
+
min-width: 0;
|
|
96
98
|
}
|
|
97
99
|
|
|
98
100
|
[data-snap-part='select.trigger'] {
|
|
@@ -121,6 +123,13 @@
|
|
|
121
123
|
cursor: pointer;
|
|
122
124
|
}
|
|
123
125
|
|
|
126
|
+
/* The switch thumb travels by the skin's translateX along the track, which
|
|
127
|
+
* measures from the content edge: centering would strand the off-state
|
|
128
|
+
* thumb mid-track and shove the on-state thumb past the track edge. */
|
|
129
|
+
[data-snap-part='switch.root'] {
|
|
130
|
+
justify-content: flex-start;
|
|
131
|
+
}
|
|
132
|
+
|
|
124
133
|
.snap-switch-label,
|
|
125
134
|
.snap-checkbox-label {
|
|
126
135
|
display: inline-flex;
|
|
@@ -139,6 +148,7 @@
|
|
|
139
148
|
|
|
140
149
|
[data-snap-part='tabs.list'] {
|
|
141
150
|
display: inline-flex;
|
|
151
|
+
flex-wrap: wrap;
|
|
142
152
|
align-items: center;
|
|
143
153
|
gap: var(--snap-space-xs);
|
|
144
154
|
}
|
|
@@ -202,13 +212,49 @@
|
|
|
202
212
|
min-width: 0;
|
|
203
213
|
}
|
|
204
214
|
|
|
205
|
-
|
|
206
|
-
|
|
215
|
+
/* Horizontal fields put the label beside the control; help/error drop
|
|
216
|
+
* under the control column. */
|
|
217
|
+
[data-snap-part='field.root'][data-orientation='horizontal'] {
|
|
218
|
+
flex-direction: row;
|
|
219
|
+
align-items: flex-start;
|
|
220
|
+
flex-wrap: wrap;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
[data-snap-part='field.root'][data-orientation='horizontal'] > [data-snap-part='field.label'] {
|
|
224
|
+
line-height: var(--snap-control-height-md);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
[data-snap-part='field.root'][data-orientation='horizontal'] > [data-snap-part='field.control'] {
|
|
228
|
+
flex: 1;
|
|
229
|
+
min-width: 0;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
[data-snap-part='field.root'][data-orientation='horizontal'] > [data-snap-part='field.help'],
|
|
233
|
+
[data-snap-part='field.root'][data-orientation='horizontal'] > [data-snap-part='field.error'] {
|
|
234
|
+
flex-basis: 100%;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
[data-snap-part='form.root'] {
|
|
207
238
|
display: flex;
|
|
208
239
|
flex-direction: column;
|
|
209
240
|
gap: var(--snap-space-md);
|
|
210
241
|
}
|
|
211
242
|
|
|
243
|
+
[data-snap-part='form.root'][data-orientation='inline'] {
|
|
244
|
+
flex-direction: row;
|
|
245
|
+
flex-wrap: wrap;
|
|
246
|
+
align-items: flex-end;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
[data-snap-part='form.root'][data-orientation='inline'] > [data-snap-part='form.fields'] {
|
|
250
|
+
flex: 1;
|
|
251
|
+
min-width: 0;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
[data-snap-part='form.root'][data-orientation='inline'] > [data-snap-part='form.actions'] {
|
|
255
|
+
flex-shrink: 0;
|
|
256
|
+
}
|
|
257
|
+
|
|
212
258
|
[data-snap-part='form.actions'] {
|
|
213
259
|
display: flex;
|
|
214
260
|
align-items: center;
|
|
@@ -249,7 +295,6 @@
|
|
|
249
295
|
text-align: center;
|
|
250
296
|
}
|
|
251
297
|
|
|
252
|
-
[data-snap-part='visualization.root'],
|
|
253
298
|
[data-snap-part='chart-frame.root'] {
|
|
254
299
|
display: flex;
|
|
255
300
|
flex-direction: column;
|
|
@@ -302,12 +347,213 @@
|
|
|
302
347
|
text-align: left;
|
|
303
348
|
}
|
|
304
349
|
|
|
305
|
-
[data-snap-part='visualization.body'],
|
|
306
350
|
[data-snap-part='chart-frame.body'] {
|
|
307
351
|
flex: 1;
|
|
308
352
|
min-height: 0;
|
|
309
353
|
}
|
|
310
354
|
|
|
355
|
+
[data-snap-component='touch-select'] {
|
|
356
|
+
display: inline-flex;
|
|
357
|
+
max-width: 100%;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
[data-snap-part='radio-group.block'] {
|
|
361
|
+
display: flex;
|
|
362
|
+
flex-direction: column;
|
|
363
|
+
gap: var(--snap-space-xs);
|
|
364
|
+
min-width: 0;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.snap-number-input-steps {
|
|
368
|
+
display: flex;
|
|
369
|
+
flex-direction: column;
|
|
370
|
+
flex-shrink: 0;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
[data-snap-part='number-input.step-up'],
|
|
374
|
+
[data-snap-part='number-input.step-down'] {
|
|
375
|
+
display: inline-flex;
|
|
376
|
+
align-items: center;
|
|
377
|
+
justify-content: center;
|
|
378
|
+
border: 0;
|
|
379
|
+
background: transparent;
|
|
380
|
+
cursor: pointer;
|
|
381
|
+
padding: 0 var(--snap-space-xs);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
[data-snap-part='number-input.step-up']:disabled,
|
|
385
|
+
[data-snap-part='number-input.step-down']:disabled {
|
|
386
|
+
cursor: default;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
[data-snap-part='drag-scroll.root'] {
|
|
390
|
+
cursor: grab;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
[data-snap-part='drag-scroll.root'][data-dragging='true'] {
|
|
394
|
+
cursor: grabbing;
|
|
395
|
+
user-select: none;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
[data-snap-part='tooltip.content'],
|
|
399
|
+
[data-snap-part='popover.content'],
|
|
400
|
+
[data-snap-part='menu.content'] {
|
|
401
|
+
z-index: var(--snap-z-overlay);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
[data-snap-part='menu.item'],
|
|
405
|
+
[data-snap-part='menu.checkbox-item'] {
|
|
406
|
+
display: flex;
|
|
407
|
+
align-items: center;
|
|
408
|
+
gap: var(--snap-space-sm);
|
|
409
|
+
cursor: pointer;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
[data-snap-part='menu.separator'] {
|
|
413
|
+
height: var(--snap-border-width);
|
|
414
|
+
background: var(--snap-color-border);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
[data-snap-part='toast.viewport'] {
|
|
418
|
+
position: fixed;
|
|
419
|
+
right: 0;
|
|
420
|
+
bottom: 0;
|
|
421
|
+
z-index: var(--snap-z-modal);
|
|
422
|
+
display: flex;
|
|
423
|
+
flex-direction: column;
|
|
424
|
+
gap: var(--snap-space-sm);
|
|
425
|
+
margin: 0;
|
|
426
|
+
padding: var(--snap-space-md);
|
|
427
|
+
list-style: none;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
[data-snap-part='toast.root'] {
|
|
431
|
+
display: flex;
|
|
432
|
+
flex-direction: column;
|
|
433
|
+
gap: var(--snap-space-xs);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
[data-snap-part='alert.root'] {
|
|
437
|
+
display: flex;
|
|
438
|
+
flex-direction: column;
|
|
439
|
+
gap: var(--snap-space-xs);
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
[data-snap-part='separator.root'] {
|
|
443
|
+
flex-shrink: 0;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
[data-snap-part='skeleton.root'] {
|
|
447
|
+
border-radius: var(--snap-radius-sm);
|
|
448
|
+
background: var(--snap-color-surface);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
[data-snap-part='skeleton.root'][data-variant='text'] {
|
|
452
|
+
height: 1em;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
[data-snap-part='skeleton.root'][data-variant='circle'] {
|
|
456
|
+
border-radius: var(--snap-radius-full);
|
|
457
|
+
aspect-ratio: 1;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
[data-snap-part='list.root'] {
|
|
461
|
+
display: flex;
|
|
462
|
+
flex-direction: column;
|
|
463
|
+
margin: 0;
|
|
464
|
+
padding: 0;
|
|
465
|
+
list-style: none;
|
|
466
|
+
min-width: 0;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
[data-snap-part='list.root'][data-divided] > [data-snap-part='list.item'] {
|
|
470
|
+
border-bottom: var(--snap-border-width) solid var(--snap-color-border);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
[data-snap-part='list.root'][data-divided] > [data-snap-part='list.item']:last-child {
|
|
474
|
+
border-bottom: 0;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
[data-snap-part='list.item'] {
|
|
478
|
+
display: flex;
|
|
479
|
+
align-items: center;
|
|
480
|
+
gap: var(--snap-space-sm);
|
|
481
|
+
min-height: var(--snap-control-height-md);
|
|
482
|
+
min-width: 0;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
[data-snap-part='list.item'][data-interactive] {
|
|
486
|
+
cursor: pointer;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
[data-snap-part='list.item'][data-disabled] {
|
|
490
|
+
color: var(--snap-color-muted);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
[data-snap-part='slider.root'] {
|
|
494
|
+
display: flex;
|
|
495
|
+
align-items: center;
|
|
496
|
+
touch-action: none;
|
|
497
|
+
user-select: none;
|
|
498
|
+
min-height: var(--snap-control-height-lg);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
[data-snap-part='slider.track'] {
|
|
502
|
+
position: relative;
|
|
503
|
+
flex: 1;
|
|
504
|
+
min-width: 0;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
[data-snap-part='slider.thumb'] {
|
|
508
|
+
display: block;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
[data-snap-part='slider.thumb']:focus-visible {
|
|
512
|
+
outline: 2px solid var(--snap-color-focus);
|
|
513
|
+
outline-offset: 2px;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
[data-snap-component='scroll-area'] {
|
|
517
|
+
display: flex;
|
|
518
|
+
flex-direction: column;
|
|
519
|
+
min-height: 0;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
[data-snap-part='scroll-area.viewport'] {
|
|
523
|
+
width: 100%;
|
|
524
|
+
flex: 1;
|
|
525
|
+
min-height: 0;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
[data-snap-part='scroll-area.scrollbar'] {
|
|
529
|
+
display: flex;
|
|
530
|
+
touch-action: none;
|
|
531
|
+
user-select: none;
|
|
532
|
+
padding: 2px;
|
|
533
|
+
background: transparent;
|
|
534
|
+
transition: background 160ms ease-out;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
[data-snap-part='scroll-area.scrollbar'][data-orientation='vertical'] {
|
|
538
|
+
width: 10px;
|
|
539
|
+
flex-direction: column;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
[data-snap-part='scroll-area.scrollbar'][data-orientation='horizontal'] {
|
|
543
|
+
flex-direction: row;
|
|
544
|
+
height: 10px;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
[data-snap-part='scroll-area.thumb'] {
|
|
548
|
+
flex: 1;
|
|
549
|
+
border-radius: var(--snap-radius-full);
|
|
550
|
+
background: var(--snap-color-border);
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
[data-snap-part='scroll-area.thumb']:hover {
|
|
554
|
+
background: var(--snap-color-muted);
|
|
555
|
+
}
|
|
556
|
+
|
|
311
557
|
[data-snap-component='button']:focus-visible,
|
|
312
558
|
[data-snap-component='icon-button']:focus-visible,
|
|
313
559
|
[data-snap-part='select.trigger']:focus-visible,
|