@clarusjs/ui 0.3.0 → 0.5.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/package.json +4 -4
- package/src/ui.css +693 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clarusjs/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "A styled set for @clarusjs/ui-primitives: design tokens and thin, accessible styles over the parts' data-part and state attributes, light and dark.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@clarusjs/ui-primitives": "^0.
|
|
20
|
+
"@clarusjs/ui-primitives": "^0.4.0"
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"url": "https://github.com/forinda/clarusjs/issues"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@clarusjs/ui-primitives": "^0.
|
|
39
|
-
"vitest": "^5.1.
|
|
38
|
+
"@clarusjs/ui-primitives": "^0.4.0",
|
|
39
|
+
"vitest": "^5.1.2"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"test": "vitest run"
|
package/src/ui.css
CHANGED
|
@@ -183,6 +183,10 @@
|
|
|
183
183
|
box-shadow: var(--ui-shadow);
|
|
184
184
|
font: calc(var(--ui-font-size) + 1px)/1.5 var(--ui-font);
|
|
185
185
|
}
|
|
186
|
+
/* A modal one centres above the on-screen keyboard (--ui-keyboard-inset, from virtual-keyboard.js; 0 without it). */
|
|
187
|
+
:where([data-part='dialog']:modal) {
|
|
188
|
+
bottom: var(--ui-keyboard-inset, 0px);
|
|
189
|
+
}
|
|
186
190
|
/* The backdrop: a black scrim, dimmed by --ui-backdrop-opacity and blurred by --ui-backdrop-blur (it reads them from
|
|
187
191
|
its dialog). data-backdrop on the dialog picks a variant; set the knobs on :root for a site-wide default. */
|
|
188
192
|
:where([data-part='dialog'])::backdrop {
|
|
@@ -220,7 +224,7 @@
|
|
|
220
224
|
:where([data-part='dialog'][data-side='left']),
|
|
221
225
|
:where([data-part='dialog'][data-side='right']) {
|
|
222
226
|
width: min(24rem, 100%);
|
|
223
|
-
height: 100dvh;
|
|
227
|
+
height: calc(100dvh - var(--ui-keyboard-inset, 0px));
|
|
224
228
|
}
|
|
225
229
|
:where([data-part='dialog'][data-side='top']),
|
|
226
230
|
:where([data-part='dialog'][data-side='bottom']) {
|
|
@@ -240,7 +244,7 @@
|
|
|
240
244
|
animation: ui-sheet-top 0.2s ease-out;
|
|
241
245
|
}
|
|
242
246
|
:where([data-part='dialog'][data-side='bottom']) {
|
|
243
|
-
inset: auto 0
|
|
247
|
+
inset: auto 0 var(--ui-keyboard-inset, 0px) 0;
|
|
244
248
|
animation: ui-sheet-bottom 0.2s ease-out;
|
|
245
249
|
}
|
|
246
250
|
@keyframes ui-sheet-left { from { transform: translateX(-100%); } }
|
|
@@ -283,6 +287,26 @@
|
|
|
283
287
|
}
|
|
284
288
|
/* end part */
|
|
285
289
|
|
|
290
|
+
/* part: preview-card */
|
|
291
|
+
/* Preview card: a popover card beside its link, which is underlined dotted to say there's more on hover. */
|
|
292
|
+
:where([data-part='preview-card']) {
|
|
293
|
+
width: max-content;
|
|
294
|
+
max-width: 320px;
|
|
295
|
+
margin: var(--ui-space-2);
|
|
296
|
+
padding: var(--ui-space-3);
|
|
297
|
+
border: 1px solid var(--ui-border);
|
|
298
|
+
border-radius: var(--ui-radius);
|
|
299
|
+
background: var(--ui-popover);
|
|
300
|
+
color: var(--ui-popover-fg);
|
|
301
|
+
box-shadow: var(--ui-shadow);
|
|
302
|
+
font: var(--ui-font-size) var(--ui-font);
|
|
303
|
+
}
|
|
304
|
+
:where([data-part='preview-card-trigger']) {
|
|
305
|
+
text-decoration-line: underline;
|
|
306
|
+
text-decoration-style: dotted;
|
|
307
|
+
text-underline-offset: 0.2em;
|
|
308
|
+
}
|
|
309
|
+
/* end part */
|
|
286
310
|
/* part: menu */
|
|
287
311
|
/* Menu: the list below its trigger, items as full-width rows; the focused one is tinted. */
|
|
288
312
|
:where([data-part='menu']) {
|
|
@@ -320,6 +344,92 @@
|
|
|
320
344
|
}
|
|
321
345
|
/* end part */
|
|
322
346
|
|
|
347
|
+
/* part: menubar */
|
|
348
|
+
/* Menubar: its menus' triggers in a row, quiet until hovered or open. */
|
|
349
|
+
:where([data-part='menubar']) {
|
|
350
|
+
display: flex;
|
|
351
|
+
flex-wrap: wrap;
|
|
352
|
+
gap: var(--ui-space-1);
|
|
353
|
+
padding: var(--ui-space-1);
|
|
354
|
+
border: 1px solid var(--ui-border);
|
|
355
|
+
border-radius: var(--ui-radius);
|
|
356
|
+
background: var(--ui-bg);
|
|
357
|
+
}
|
|
358
|
+
:where([data-part='menubar']) :where([data-part='trigger']) {
|
|
359
|
+
padding: var(--ui-space-1) var(--ui-space-3);
|
|
360
|
+
border: 0;
|
|
361
|
+
background: transparent;
|
|
362
|
+
color: var(--ui-fg);
|
|
363
|
+
font-weight: 500;
|
|
364
|
+
}
|
|
365
|
+
:where([data-part='menubar']) :where([data-part='trigger']):is(:hover, [aria-expanded='true']) {
|
|
366
|
+
background: var(--ui-muted-bg);
|
|
367
|
+
}
|
|
368
|
+
/* end part */
|
|
369
|
+
/* part: nav-menu */
|
|
370
|
+
/* Navigation menu: links and triggers in a row; a line under the open trigger, moving to the next one (the island
|
|
371
|
+
sets --ui-nav-indicator-x and --ui-nav-indicator-width); the panels open under the whole bar. */
|
|
372
|
+
:where([data-part='nav-menu']) {
|
|
373
|
+
position: relative;
|
|
374
|
+
font: var(--ui-font-size) var(--ui-font);
|
|
375
|
+
color: var(--ui-fg);
|
|
376
|
+
}
|
|
377
|
+
:where([data-part='nav-menu']) > :where([data-part='nav-list']) {
|
|
378
|
+
display: flex;
|
|
379
|
+
flex-wrap: wrap;
|
|
380
|
+
gap: var(--ui-space-1);
|
|
381
|
+
margin: 0;
|
|
382
|
+
padding: var(--ui-space-1);
|
|
383
|
+
list-style: none;
|
|
384
|
+
}
|
|
385
|
+
:where([data-part='nav-list']) :where([data-part='nav-trigger'], a) {
|
|
386
|
+
display: inline-flex;
|
|
387
|
+
padding: var(--ui-space-2) var(--ui-space-3);
|
|
388
|
+
border: 0;
|
|
389
|
+
border-radius: calc(var(--ui-radius) - 2px);
|
|
390
|
+
background: transparent;
|
|
391
|
+
color: inherit;
|
|
392
|
+
font-family: inherit;
|
|
393
|
+
font-size: inherit;
|
|
394
|
+
line-height: inherit;
|
|
395
|
+
font-weight: 500;
|
|
396
|
+
text-decoration: none;
|
|
397
|
+
cursor: pointer;
|
|
398
|
+
}
|
|
399
|
+
:where([data-part='nav-list']) :where([data-part='nav-trigger'], a):hover {
|
|
400
|
+
background: var(--ui-muted-bg);
|
|
401
|
+
}
|
|
402
|
+
:where([data-part='nav-indicator']) {
|
|
403
|
+
position: absolute;
|
|
404
|
+
bottom: 0;
|
|
405
|
+
left: 0;
|
|
406
|
+
width: var(--ui-nav-indicator-width, 0);
|
|
407
|
+
height: 2px;
|
|
408
|
+
background: var(--ui-accent);
|
|
409
|
+
opacity: 0;
|
|
410
|
+
transform: translateX(var(--ui-nav-indicator-x, 0));
|
|
411
|
+
transition: transform 200ms ease, width 200ms ease, opacity 150ms;
|
|
412
|
+
}
|
|
413
|
+
:where([data-part='nav-menu'][data-open]) > :where([data-part='nav-indicator']) {
|
|
414
|
+
opacity: 1;
|
|
415
|
+
}
|
|
416
|
+
:where([data-part='nav-panel']) {
|
|
417
|
+
margin: var(--ui-space-1) 0 0;
|
|
418
|
+
padding: var(--ui-space-4);
|
|
419
|
+
border: 1px solid var(--ui-border);
|
|
420
|
+
border-radius: var(--ui-radius);
|
|
421
|
+
background: var(--ui-popover);
|
|
422
|
+
color: var(--ui-popover-fg);
|
|
423
|
+
box-shadow: var(--ui-shadow);
|
|
424
|
+
}
|
|
425
|
+
/* end part */
|
|
426
|
+
/* part: context-menu */
|
|
427
|
+
/* Context menu: what it holds keeps the browser from showing its own long-press callout (iOS), so a long press opens
|
|
428
|
+
the menu; the menu itself is the menu's own list. */
|
|
429
|
+
:where([data-part='context-menu']) {
|
|
430
|
+
-webkit-touch-callout: none;
|
|
431
|
+
}
|
|
432
|
+
/* end part */
|
|
323
433
|
/* part: accordion */
|
|
324
434
|
/* Accordion. */
|
|
325
435
|
:where([data-part='accordion-item']) {
|
|
@@ -421,13 +531,13 @@
|
|
|
421
531
|
display: inline-flex;
|
|
422
532
|
}
|
|
423
533
|
:where([data-part='toggle-group']) > :where([data-part='toggle-item']):not(:first-child) {
|
|
424
|
-
margin-
|
|
425
|
-
border-
|
|
426
|
-
border-
|
|
534
|
+
margin-inline-start: calc(var(--ui-space) * -0.25);
|
|
535
|
+
border-start-start-radius: 0;
|
|
536
|
+
border-end-start-radius: 0;
|
|
427
537
|
}
|
|
428
538
|
:where([data-part='toggle-group']) > :where([data-part='toggle-item']):not(:last-child) {
|
|
429
|
-
border-
|
|
430
|
-
border-
|
|
539
|
+
border-start-end-radius: 0;
|
|
540
|
+
border-end-end-radius: 0;
|
|
431
541
|
}
|
|
432
542
|
:where([data-part='toggle-group']) > :where([data-part='toggle-item']):focus-visible {
|
|
433
543
|
position: relative;
|
|
@@ -435,6 +545,50 @@
|
|
|
435
545
|
}
|
|
436
546
|
/* end part */
|
|
437
547
|
|
|
548
|
+
/* part: toolbar */
|
|
549
|
+
/* Toolbar: its controls in a row (a column when vertical), separators between groups; its own buttons and links are
|
|
550
|
+
quiet until hovered. */
|
|
551
|
+
:where([data-part='toolbar']) {
|
|
552
|
+
display: flex;
|
|
553
|
+
flex-wrap: wrap;
|
|
554
|
+
align-items: center;
|
|
555
|
+
gap: var(--ui-space-1);
|
|
556
|
+
padding: var(--ui-space-1);
|
|
557
|
+
border: 1px solid var(--ui-border);
|
|
558
|
+
border-radius: var(--ui-radius);
|
|
559
|
+
background: var(--ui-bg);
|
|
560
|
+
color: var(--ui-fg);
|
|
561
|
+
font: var(--ui-font-size) var(--ui-font);
|
|
562
|
+
}
|
|
563
|
+
:where([data-part='toolbar'][data-orientation='vertical']) {
|
|
564
|
+
flex-direction: column;
|
|
565
|
+
align-items: stretch;
|
|
566
|
+
}
|
|
567
|
+
:where([data-part='toolbar']) > :where(button:not([data-part]), a[href]) {
|
|
568
|
+
padding: var(--ui-space-1) var(--ui-space-2);
|
|
569
|
+
border: 0;
|
|
570
|
+
border-radius: calc(var(--ui-radius) - 2px);
|
|
571
|
+
background: transparent;
|
|
572
|
+
color: inherit;
|
|
573
|
+
font: inherit;
|
|
574
|
+
text-decoration: none;
|
|
575
|
+
cursor: pointer;
|
|
576
|
+
}
|
|
577
|
+
:where([data-part='toolbar']) > :where(button:not([data-part]), a[href]):hover {
|
|
578
|
+
background: var(--ui-muted-bg);
|
|
579
|
+
}
|
|
580
|
+
:where([data-part='toolbar']) > :where([data-part='toolbar-separator']) {
|
|
581
|
+
align-self: stretch;
|
|
582
|
+
width: 1px;
|
|
583
|
+
margin: 0 var(--ui-space-1);
|
|
584
|
+
background: var(--ui-border);
|
|
585
|
+
}
|
|
586
|
+
:where([data-part='toolbar'][data-orientation='vertical']) > :where([data-part='toolbar-separator']) {
|
|
587
|
+
width: auto;
|
|
588
|
+
height: 1px;
|
|
589
|
+
margin: var(--ui-space-1) 0;
|
|
590
|
+
}
|
|
591
|
+
/* end part */
|
|
438
592
|
/* part: switch-checkbox */
|
|
439
593
|
/* Switch and checkbox: the native input, tinted; the label next to it. */
|
|
440
594
|
:where([data-part='switch'], [data-part='checkbox']) {
|
|
@@ -464,18 +618,18 @@
|
|
|
464
618
|
content: '';
|
|
465
619
|
position: absolute;
|
|
466
620
|
top: 2px;
|
|
467
|
-
|
|
621
|
+
inset-inline-start: 2px;
|
|
468
622
|
width: 16px;
|
|
469
623
|
height: 16px;
|
|
470
624
|
border-radius: 999px;
|
|
471
625
|
background: var(--ui-bg);
|
|
472
|
-
transition:
|
|
626
|
+
transition: inset-inline-start 150ms;
|
|
473
627
|
}
|
|
474
628
|
:where([data-part='switch']) input:checked {
|
|
475
629
|
background: var(--ui-accent);
|
|
476
630
|
}
|
|
477
631
|
:where([data-part='switch']) input:checked::after {
|
|
478
|
-
|
|
632
|
+
inset-inline-start: calc(100% - 18px);
|
|
479
633
|
}
|
|
480
634
|
:where([data-part='switch'], [data-part='checkbox'])[data-disabled] {
|
|
481
635
|
opacity: 0.55;
|
|
@@ -517,6 +671,53 @@
|
|
|
517
671
|
}
|
|
518
672
|
/* end part */
|
|
519
673
|
|
|
674
|
+
/* part: checkbox-group */
|
|
675
|
+
/* Checkbox group: a fieldset with its legend; the boxes are the checkbox's own (the browser draws the mixed state's
|
|
676
|
+
dash). The "all" box comes first, set off from the others by a rule. */
|
|
677
|
+
:where([data-part='checkbox-group']) {
|
|
678
|
+
display: grid;
|
|
679
|
+
gap: var(--ui-space-2);
|
|
680
|
+
margin: 0;
|
|
681
|
+
padding: 0;
|
|
682
|
+
border: 0;
|
|
683
|
+
font: var(--ui-font-size) var(--ui-font);
|
|
684
|
+
color: var(--ui-fg);
|
|
685
|
+
}
|
|
686
|
+
:where([data-part='checkbox-group']) > :where([data-part='legend']) {
|
|
687
|
+
padding: 0;
|
|
688
|
+
margin-bottom: var(--ui-space-1);
|
|
689
|
+
font-weight: 600;
|
|
690
|
+
}
|
|
691
|
+
:where([data-part='checkbox-group']) > :where([data-all]) {
|
|
692
|
+
padding-bottom: var(--ui-space-2);
|
|
693
|
+
border-bottom: 1px solid var(--ui-border);
|
|
694
|
+
}
|
|
695
|
+
/* end part */
|
|
696
|
+
/* part: fieldset */
|
|
697
|
+
/* Fieldset: related fields in a bordered group, the legend on its border and a description under it. The border
|
|
698
|
+
takes the error colour when a field inside is invalid (each <field> marks itself), and the group dims when
|
|
699
|
+
disabled. */
|
|
700
|
+
:where([data-part='fieldset']) {
|
|
701
|
+
display: grid;
|
|
702
|
+
gap: var(--ui-space-3);
|
|
703
|
+
margin: 0;
|
|
704
|
+
padding: var(--ui-space-3) var(--ui-space-4) var(--ui-space-4);
|
|
705
|
+
border: 1px solid var(--ui-border);
|
|
706
|
+
border-radius: var(--ui-radius);
|
|
707
|
+
font: var(--ui-font-size) var(--ui-font);
|
|
708
|
+
color: var(--ui-fg);
|
|
709
|
+
}
|
|
710
|
+
:where([data-part='fieldset']) > :where([data-part='legend']) {
|
|
711
|
+
padding: 0 var(--ui-space-1);
|
|
712
|
+
font-weight: 600;
|
|
713
|
+
}
|
|
714
|
+
:where([data-part='fieldset']:has([data-invalid])) {
|
|
715
|
+
border-color: var(--ui-danger);
|
|
716
|
+
}
|
|
717
|
+
:where([data-part='fieldset'][data-disabled]) {
|
|
718
|
+
opacity: 0.6;
|
|
719
|
+
}
|
|
720
|
+
/* end part */
|
|
520
721
|
/* part: field-select */
|
|
521
722
|
/* Field and select: label, control, description, error. */
|
|
522
723
|
:where([data-part='field'], [data-part='select']) {
|
|
@@ -585,6 +786,55 @@
|
|
|
585
786
|
}
|
|
586
787
|
/* end part */
|
|
587
788
|
|
|
789
|
+
/* part: date-time-field */
|
|
790
|
+
/* Date and time fields: the segments in one bordered control, like a text field; the focused segment is highlighted
|
|
791
|
+
and empty ones show their placeholder, muted. */
|
|
792
|
+
:where([data-part='date-field'], [data-part='time-field']) {
|
|
793
|
+
display: grid;
|
|
794
|
+
gap: var(--ui-space-1);
|
|
795
|
+
max-width: 360px;
|
|
796
|
+
font: var(--ui-font-size) var(--ui-font);
|
|
797
|
+
color: var(--ui-fg);
|
|
798
|
+
}
|
|
799
|
+
:where([data-part='date-field'], [data-part='time-field']) > :where([data-part='segments']) {
|
|
800
|
+
display: inline-flex;
|
|
801
|
+
align-items: center;
|
|
802
|
+
width: fit-content;
|
|
803
|
+
min-height: var(--ui-control-h, var(--ui-control-md));
|
|
804
|
+
padding: 0 var(--ui-space-2);
|
|
805
|
+
border: 1px solid var(--ui-input);
|
|
806
|
+
border-radius: var(--ui-radius);
|
|
807
|
+
background: var(--ui-bg);
|
|
808
|
+
font-variant-numeric: tabular-nums;
|
|
809
|
+
}
|
|
810
|
+
:where([data-part='date-field'], [data-part='time-field']) > :where([data-part='segments']):focus-within {
|
|
811
|
+
border-color: var(--ui-ring);
|
|
812
|
+
box-shadow: 0 0 0 3px var(--ui-accent-soft);
|
|
813
|
+
}
|
|
814
|
+
:where([data-part='date-field'], [data-part='time-field']) :where([data-part='segment']) {
|
|
815
|
+
display: inline-flex;
|
|
816
|
+
align-items: center;
|
|
817
|
+
justify-content: center;
|
|
818
|
+
min-width: calc(var(--ui-space) * 6);
|
|
819
|
+
min-height: calc(var(--ui-space) * 6);
|
|
820
|
+
padding: 0 calc(var(--ui-space) * 0.5);
|
|
821
|
+
border-radius: 4px;
|
|
822
|
+
}
|
|
823
|
+
:where([data-part='date-field'], [data-part='time-field']) :where([data-part='segment']):focus-visible {
|
|
824
|
+
outline: none;
|
|
825
|
+
background: var(--ui-accent);
|
|
826
|
+
color: var(--ui-accent-fg);
|
|
827
|
+
}
|
|
828
|
+
:where([data-part='date-field'], [data-part='time-field']) :where([data-part='segment'][data-placeholder]:not(:focus-visible), [data-part='literal']) {
|
|
829
|
+
color: var(--ui-muted);
|
|
830
|
+
}
|
|
831
|
+
:where([data-part='date-field'][data-invalid]) > :where([data-part='segments']) {
|
|
832
|
+
border-color: var(--ui-danger);
|
|
833
|
+
}
|
|
834
|
+
:where([data-part='date-field'][data-disabled], [data-part='time-field'][data-disabled]) > :where([data-part='segments']) {
|
|
835
|
+
opacity: 0.5;
|
|
836
|
+
}
|
|
837
|
+
/* end part */
|
|
588
838
|
/* part: chips */
|
|
589
839
|
/* Chips in a control, beside the field you type in (combobox, chip input). */
|
|
590
840
|
:where([data-part='input']) {
|
|
@@ -602,7 +852,8 @@
|
|
|
602
852
|
display: inline-flex;
|
|
603
853
|
align-items: center;
|
|
604
854
|
gap: calc(var(--ui-space) * 0.5);
|
|
605
|
-
padding: 0
|
|
855
|
+
padding-block: 0;
|
|
856
|
+
padding-inline: var(--ui-space-2) calc(var(--ui-space) * 0.5);
|
|
606
857
|
border-radius: 999px;
|
|
607
858
|
background: var(--ui-accent-soft);
|
|
608
859
|
font-size: calc(var(--ui-font-size) - 1px);
|
|
@@ -680,6 +931,24 @@
|
|
|
680
931
|
}
|
|
681
932
|
/* end part */
|
|
682
933
|
|
|
934
|
+
/* part: autocomplete */
|
|
935
|
+
/* Autocomplete: a text field (the field's control) with its suggestions below (the combobox's list and options). */
|
|
936
|
+
:where([data-part='autocomplete']) {
|
|
937
|
+
display: grid;
|
|
938
|
+
gap: var(--ui-space-1);
|
|
939
|
+
max-width: 360px;
|
|
940
|
+
font: var(--ui-font-size) var(--ui-font);
|
|
941
|
+
color: var(--ui-fg);
|
|
942
|
+
}
|
|
943
|
+
:where([data-part='autocomplete']) > :where([data-part='listbox']) {
|
|
944
|
+
margin: 0;
|
|
945
|
+
list-style: none;
|
|
946
|
+
}
|
|
947
|
+
:where([data-part='autocomplete']) :where([data-part='option']) {
|
|
948
|
+
padding: var(--ui-space-1) var(--ui-space-2);
|
|
949
|
+
border-radius: calc(var(--ui-radius) - 2px);
|
|
950
|
+
}
|
|
951
|
+
/* end part */
|
|
683
952
|
/* part: chip-input */
|
|
684
953
|
/* Chip input: what's typed becomes a chip in the control; a hint below. */
|
|
685
954
|
:where([data-part='chip-input']) {
|
|
@@ -707,6 +976,229 @@
|
|
|
707
976
|
}
|
|
708
977
|
/* end part */
|
|
709
978
|
|
|
979
|
+
/* part: number-field */
|
|
980
|
+
/* Number field: − and + around the native input, one bordered control (its focus ring is the group's); the formatted
|
|
981
|
+
value below. The browser's own spin buttons are hidden: − and + replace them. */
|
|
982
|
+
:where([data-part='number-field']) {
|
|
983
|
+
display: grid;
|
|
984
|
+
gap: var(--ui-space-1);
|
|
985
|
+
max-width: 240px;
|
|
986
|
+
font: var(--ui-font-size) var(--ui-font);
|
|
987
|
+
color: var(--ui-fg);
|
|
988
|
+
}
|
|
989
|
+
:where([data-part='number-field']) > :where([data-part='group']) {
|
|
990
|
+
display: flex;
|
|
991
|
+
min-height: var(--ui-control-h, var(--ui-control-md));
|
|
992
|
+
border: 1px solid var(--ui-input);
|
|
993
|
+
border-radius: var(--ui-radius);
|
|
994
|
+
background: var(--ui-bg);
|
|
995
|
+
overflow: hidden;
|
|
996
|
+
}
|
|
997
|
+
:where([data-part='number-field']) > :where([data-part='group']):focus-within {
|
|
998
|
+
border-color: var(--ui-ring);
|
|
999
|
+
box-shadow: 0 0 0 3px var(--ui-accent-soft);
|
|
1000
|
+
}
|
|
1001
|
+
:where([data-part='number-field']) :where([data-part='input']) {
|
|
1002
|
+
flex: 1;
|
|
1003
|
+
min-width: 0;
|
|
1004
|
+
padding: 0 var(--ui-space-2);
|
|
1005
|
+
border: 0;
|
|
1006
|
+
background: transparent;
|
|
1007
|
+
color: var(--ui-fg);
|
|
1008
|
+
font: inherit;
|
|
1009
|
+
text-align: center;
|
|
1010
|
+
appearance: textfield;
|
|
1011
|
+
}
|
|
1012
|
+
:where([data-part='number-field']) :where([data-part='input']):focus-visible {
|
|
1013
|
+
outline: none;
|
|
1014
|
+
}
|
|
1015
|
+
:where([data-part='number-field']) :where([data-part='input'])::-webkit-inner-spin-button,
|
|
1016
|
+
:where([data-part='number-field']) :where([data-part='input'])::-webkit-outer-spin-button {
|
|
1017
|
+
appearance: none;
|
|
1018
|
+
margin: 0;
|
|
1019
|
+
}
|
|
1020
|
+
:where([data-part='number-field']) :where([data-part='decrement'], [data-part='increment']) {
|
|
1021
|
+
min-width: var(--ui-control-h, var(--ui-control-md));
|
|
1022
|
+
border: 0;
|
|
1023
|
+
background: var(--ui-muted-bg);
|
|
1024
|
+
color: var(--ui-fg);
|
|
1025
|
+
font: inherit;
|
|
1026
|
+
cursor: pointer;
|
|
1027
|
+
}
|
|
1028
|
+
:where([data-part='number-field']) :where([data-part='decrement'], [data-part='increment']):hover {
|
|
1029
|
+
background: var(--ui-accent-soft);
|
|
1030
|
+
}
|
|
1031
|
+
:where([data-part='number-field']) :where([data-part='decrement'], [data-part='increment']):disabled {
|
|
1032
|
+
opacity: 0.5;
|
|
1033
|
+
cursor: not-allowed;
|
|
1034
|
+
}
|
|
1035
|
+
:where([data-part='number-field'][data-disabled]) > :where([data-part='group']) {
|
|
1036
|
+
opacity: 0.5;
|
|
1037
|
+
}
|
|
1038
|
+
:where([data-part='number-field']) > :where([data-part='value']) {
|
|
1039
|
+
color: var(--ui-muted);
|
|
1040
|
+
font-size: calc(var(--ui-font-size) - 1px);
|
|
1041
|
+
font-variant-numeric: tabular-nums;
|
|
1042
|
+
}
|
|
1043
|
+
/* end part */
|
|
1044
|
+
/* part: drag-drop */
|
|
1045
|
+
/* Drag and drop: items show they can be grabbed (and keep a touch drag from scrolling the page); the grabbed one
|
|
1046
|
+
lifts; the zone under it is outlined, and a line marks where it would land. */
|
|
1047
|
+
:where([data-drag]) {
|
|
1048
|
+
cursor: grab;
|
|
1049
|
+
touch-action: none;
|
|
1050
|
+
}
|
|
1051
|
+
:where([data-drag]):focus-visible {
|
|
1052
|
+
outline: 2px solid var(--ui-ring);
|
|
1053
|
+
outline-offset: 2px;
|
|
1054
|
+
}
|
|
1055
|
+
:where([data-drag][data-grabbed]) {
|
|
1056
|
+
position: relative;
|
|
1057
|
+
z-index: 1;
|
|
1058
|
+
cursor: grabbing;
|
|
1059
|
+
box-shadow: var(--ui-shadow);
|
|
1060
|
+
}
|
|
1061
|
+
:where([data-drop][data-over]) {
|
|
1062
|
+
outline: 2px dashed var(--ui-ring);
|
|
1063
|
+
outline-offset: 2px;
|
|
1064
|
+
}
|
|
1065
|
+
:where([data-drop-before]) {
|
|
1066
|
+
box-shadow: inset 0 2px 0 var(--ui-accent);
|
|
1067
|
+
}
|
|
1068
|
+
/* end part */
|
|
1069
|
+
/* part: sortable-list */
|
|
1070
|
+
/* Sortable list: rows in a column, each a handle-less card to drag; the drag-drop rules mark the grabbed row and
|
|
1071
|
+
where it would land. */
|
|
1072
|
+
:where([data-part='sortable-list']) {
|
|
1073
|
+
max-width: 100%;
|
|
1074
|
+
}
|
|
1075
|
+
:where([data-part='sortable-items']) {
|
|
1076
|
+
display: grid;
|
|
1077
|
+
gap: var(--ui-space-2);
|
|
1078
|
+
margin: 0;
|
|
1079
|
+
padding: 0;
|
|
1080
|
+
list-style: none;
|
|
1081
|
+
}
|
|
1082
|
+
:where([data-part='sortable-item']) {
|
|
1083
|
+
padding: var(--ui-space-2) var(--ui-space-3);
|
|
1084
|
+
border: 1px solid var(--ui-border);
|
|
1085
|
+
border-radius: calc(var(--ui-radius) - 2px);
|
|
1086
|
+
background: var(--ui-bg);
|
|
1087
|
+
color: var(--ui-fg);
|
|
1088
|
+
font: var(--ui-font-size) var(--ui-font);
|
|
1089
|
+
}
|
|
1090
|
+
/* end part */
|
|
1091
|
+
/* part: swipe */
|
|
1092
|
+
/* Swipe: an element dragged along one axis keeps the page scrolling along the other, follows the finger while
|
|
1093
|
+
swiped, and slides back when let go short. */
|
|
1094
|
+
:where([data-swipe='x']) {
|
|
1095
|
+
touch-action: pan-y;
|
|
1096
|
+
}
|
|
1097
|
+
:where([data-swipe='y']) {
|
|
1098
|
+
touch-action: pan-x;
|
|
1099
|
+
}
|
|
1100
|
+
:where([data-swipe]:not([data-swiping])) {
|
|
1101
|
+
transition: transform 200ms ease;
|
|
1102
|
+
}
|
|
1103
|
+
:where([data-swiping]) {
|
|
1104
|
+
cursor: grabbing;
|
|
1105
|
+
user-select: none;
|
|
1106
|
+
}
|
|
1107
|
+
/* end part */
|
|
1108
|
+
/* part: virtual-list */
|
|
1109
|
+
/* Virtual list: a scrolling box (its scroll stays its own) of rows, divided by lines; a focused row is outlined
|
|
1110
|
+
inside the box, where it isn't clipped. */
|
|
1111
|
+
:where([data-part='virtual-list']) {
|
|
1112
|
+
max-height: 24rem;
|
|
1113
|
+
overflow: auto;
|
|
1114
|
+
overscroll-behavior: contain;
|
|
1115
|
+
border: 1px solid var(--ui-border);
|
|
1116
|
+
border-radius: var(--ui-radius);
|
|
1117
|
+
background: var(--ui-bg);
|
|
1118
|
+
color: var(--ui-fg);
|
|
1119
|
+
font: var(--ui-font-size) var(--ui-font);
|
|
1120
|
+
}
|
|
1121
|
+
:where([data-part='virtual-list']) :where([data-index]) {
|
|
1122
|
+
padding: var(--ui-space-2) var(--ui-space-3);
|
|
1123
|
+
border-bottom: 1px solid var(--ui-border);
|
|
1124
|
+
}
|
|
1125
|
+
:where([data-part='virtual-list']) :where([data-index]:focus-visible) {
|
|
1126
|
+
outline: 2px solid var(--ui-ring);
|
|
1127
|
+
outline-offset: -2px;
|
|
1128
|
+
}
|
|
1129
|
+
/* end part */
|
|
1130
|
+
/* part: virtual-grid */
|
|
1131
|
+
/* Virtual grid: a scrolling box of rows of cells, one height (36px: the behaviour's rowSize); the header row
|
|
1132
|
+
stays at the top; a focused cell is outlined inside itself. */
|
|
1133
|
+
:where([data-part='virtual-grid']) {
|
|
1134
|
+
max-height: 24rem;
|
|
1135
|
+
overflow: auto;
|
|
1136
|
+
overscroll-behavior: contain;
|
|
1137
|
+
border: 1px solid var(--ui-border);
|
|
1138
|
+
border-radius: var(--ui-radius);
|
|
1139
|
+
background: var(--ui-bg);
|
|
1140
|
+
color: var(--ui-fg);
|
|
1141
|
+
font: var(--ui-font-size) var(--ui-font);
|
|
1142
|
+
font-variant-numeric: tabular-nums;
|
|
1143
|
+
}
|
|
1144
|
+
:where([data-part='virtual-grid']) :where([role='row']) {
|
|
1145
|
+
display: flex;
|
|
1146
|
+
width: max-content;
|
|
1147
|
+
}
|
|
1148
|
+
:where([data-part='virtual-grid']) :where([role='gridcell'], [role='columnheader']) {
|
|
1149
|
+
box-sizing: border-box;
|
|
1150
|
+
display: flex;
|
|
1151
|
+
flex: none;
|
|
1152
|
+
align-items: center;
|
|
1153
|
+
height: 36px;
|
|
1154
|
+
padding: 0 var(--ui-space-2);
|
|
1155
|
+
border-inline-end: 1px solid var(--ui-border);
|
|
1156
|
+
border-bottom: 1px solid var(--ui-border);
|
|
1157
|
+
overflow: hidden;
|
|
1158
|
+
white-space: nowrap;
|
|
1159
|
+
}
|
|
1160
|
+
:where([data-part='grid-header']) {
|
|
1161
|
+
position: sticky;
|
|
1162
|
+
top: 0;
|
|
1163
|
+
z-index: 1;
|
|
1164
|
+
background: var(--ui-muted-bg);
|
|
1165
|
+
font-weight: 600;
|
|
1166
|
+
}
|
|
1167
|
+
:where([data-part='virtual-grid']) :where([role='gridcell']:focus-visible) {
|
|
1168
|
+
outline: 2px solid var(--ui-ring);
|
|
1169
|
+
outline-offset: -2px;
|
|
1170
|
+
}
|
|
1171
|
+
/* end part */
|
|
1172
|
+
/* part: form-errors */
|
|
1173
|
+
/* Form errors: the summary after a failed submit, edged in the danger colour; each message a link to its field. */
|
|
1174
|
+
:where([data-part='form-errors']) {
|
|
1175
|
+
display: grid;
|
|
1176
|
+
gap: var(--ui-space-2);
|
|
1177
|
+
padding: var(--ui-space-3) var(--ui-space-4);
|
|
1178
|
+
border: 1px solid var(--ui-danger);
|
|
1179
|
+
border-inline-start-width: 4px;
|
|
1180
|
+
border-radius: var(--ui-radius);
|
|
1181
|
+
background: var(--ui-bg);
|
|
1182
|
+
color: var(--ui-fg);
|
|
1183
|
+
font: var(--ui-font-size) var(--ui-font);
|
|
1184
|
+
}
|
|
1185
|
+
:where([data-part='form-errors'][hidden]) {
|
|
1186
|
+
display: none;
|
|
1187
|
+
}
|
|
1188
|
+
:where([data-part='form-errors-title']) {
|
|
1189
|
+
margin: 0;
|
|
1190
|
+
font-weight: 600;
|
|
1191
|
+
}
|
|
1192
|
+
:where([data-part='form-errors']) :where(ul) {
|
|
1193
|
+
margin: 0;
|
|
1194
|
+
padding-inline-start: 1.25em;
|
|
1195
|
+
}
|
|
1196
|
+
:where([data-part='form-errors']) :where(a) {
|
|
1197
|
+
color: inherit;
|
|
1198
|
+
text-decoration-color: var(--ui-danger);
|
|
1199
|
+
text-underline-offset: 2px;
|
|
1200
|
+
}
|
|
1201
|
+
/* end part */
|
|
710
1202
|
/* part: sidebar */
|
|
711
1203
|
/* Sidebar: inline beside the page on wide screens (hidden when collapsed: its data-state, or data-sidebar on <html>
|
|
712
1204
|
from the remembered choice); on phones a popover panel from the left. */
|
|
@@ -749,7 +1241,7 @@
|
|
|
749
1241
|
inset: auto;
|
|
750
1242
|
width: 240px;
|
|
751
1243
|
height: auto;
|
|
752
|
-
border-
|
|
1244
|
+
border-inline-end: 1px solid var(--ui-sidebar-border);
|
|
753
1245
|
}
|
|
754
1246
|
:where([data-part='sidebar'][data-state='collapsed']),
|
|
755
1247
|
:where(:root[data-sidebar='collapsed'] [data-part='sidebar']) {
|
|
@@ -762,20 +1254,23 @@
|
|
|
762
1254
|
@media (max-width: 767px) {
|
|
763
1255
|
:where([data-part='sidebar']):popover-open {
|
|
764
1256
|
display: flex;
|
|
765
|
-
inset: 0
|
|
1257
|
+
inset-block: 0;
|
|
1258
|
+
inset-inline: 0 auto;
|
|
766
1259
|
width: min(18rem, 85vw);
|
|
767
1260
|
height: 100dvh;
|
|
768
|
-
border-
|
|
1261
|
+
border-inline-end: 1px solid var(--ui-sidebar-border);
|
|
769
1262
|
box-shadow: var(--ui-shadow);
|
|
770
1263
|
}
|
|
771
1264
|
}
|
|
772
1265
|
/* end part */
|
|
773
1266
|
|
|
774
1267
|
/* part: toast */
|
|
775
|
-
/* Toast: messages stacked
|
|
1268
|
+
/* Toast: messages stacked in the bottom corner on the end side (right; left, right to left), above the page; each a
|
|
1269
|
+
card with its action and a close. */
|
|
776
1270
|
:where([data-part='toast-region']) {
|
|
777
1271
|
position: fixed;
|
|
778
|
-
inset: auto 16px
|
|
1272
|
+
inset-block: auto calc(16px + var(--ui-keyboard-inset, 0px));
|
|
1273
|
+
inset-inline: auto 16px;
|
|
779
1274
|
z-index: 50;
|
|
780
1275
|
width: min(22rem, calc(100vw - 32px));
|
|
781
1276
|
}
|
|
@@ -822,25 +1317,25 @@
|
|
|
822
1317
|
border-color: transparent;
|
|
823
1318
|
}
|
|
824
1319
|
:where([data-part='toast'])[data-type='success'] {
|
|
825
|
-
border-
|
|
1320
|
+
border-inline-start: 4px solid var(--ui-success);
|
|
826
1321
|
}
|
|
827
1322
|
:where([data-part='toast'])[data-type='success'] :where([data-part='toast-icon']) {
|
|
828
1323
|
color: var(--ui-success);
|
|
829
1324
|
}
|
|
830
1325
|
:where([data-part='toast'])[data-type='error'] {
|
|
831
|
-
border-
|
|
1326
|
+
border-inline-start: 4px solid var(--ui-danger);
|
|
832
1327
|
}
|
|
833
1328
|
:where([data-part='toast'])[data-type='error'] :where([data-part='toast-icon']) {
|
|
834
1329
|
color: var(--ui-danger);
|
|
835
1330
|
}
|
|
836
1331
|
:where([data-part='toast'])[data-type='warning'] {
|
|
837
|
-
border-
|
|
1332
|
+
border-inline-start: 4px solid var(--ui-warning);
|
|
838
1333
|
}
|
|
839
1334
|
:where([data-part='toast'])[data-type='warning'] :where([data-part='toast-icon']) {
|
|
840
1335
|
color: var(--ui-warning);
|
|
841
1336
|
}
|
|
842
1337
|
:where([data-part='toast'])[data-type='info'] {
|
|
843
|
-
border-
|
|
1338
|
+
border-inline-start: 4px solid var(--ui-accent);
|
|
844
1339
|
}
|
|
845
1340
|
:where([data-part='toast'])[data-type='info'] :where([data-part='toast-icon']) {
|
|
846
1341
|
color: var(--ui-accent);
|
|
@@ -864,6 +1359,184 @@
|
|
|
864
1359
|
}
|
|
865
1360
|
/* end part */
|
|
866
1361
|
|
|
1362
|
+
/* part: editor */
|
|
1363
|
+
/* @clarusjs/editor's parts, each on its own: the field (a textarea before the editor loads, the editable after: the
|
|
1364
|
+
same box), the toolbar and its tools, the count, Send, the attach button, and the suggestion lists by the caret.
|
|
1365
|
+
How they sit together (a chat composer's frame, a comment box's buttons) is the page's: see the blocks. */
|
|
1366
|
+
/* The box is the field's top-level element (the textarea, then the editor's div), so a page restyles it with a class
|
|
1367
|
+
on <editor-field>; the editable inside has the room and the scrolling. */
|
|
1368
|
+
:where([data-part='editor']) {
|
|
1369
|
+
box-sizing: border-box;
|
|
1370
|
+
display: block;
|
|
1371
|
+
width: 100%;
|
|
1372
|
+
min-width: 0; /* in a grid or flex row, long content wraps instead of widening it */
|
|
1373
|
+
border: 1px solid var(--ui-input);
|
|
1374
|
+
border-radius: var(--ui-radius);
|
|
1375
|
+
background: var(--ui-bg);
|
|
1376
|
+
color: var(--ui-fg);
|
|
1377
|
+
font-family: var(--ui-font);
|
|
1378
|
+
font-size: var(--ui-font-size);
|
|
1379
|
+
line-height: 1.5;
|
|
1380
|
+
}
|
|
1381
|
+
:where(textarea[data-part='editor']):focus-visible,
|
|
1382
|
+
:where(div[data-part='editor']):focus-within {
|
|
1383
|
+
outline: none;
|
|
1384
|
+
border-color: var(--ui-ring);
|
|
1385
|
+
box-shadow: 0 0 0 3px var(--ui-accent-soft);
|
|
1386
|
+
}
|
|
1387
|
+
:where(textarea[data-part='editor'], [data-part='editor'] > [role='textbox']) {
|
|
1388
|
+
position: relative;
|
|
1389
|
+
box-sizing: border-box;
|
|
1390
|
+
width: 100%;
|
|
1391
|
+
min-height: calc(var(--ui-space) * 16);
|
|
1392
|
+
max-height: 40vh;
|
|
1393
|
+
overflow-y: auto;
|
|
1394
|
+
margin: 0;
|
|
1395
|
+
padding: var(--ui-space-2) var(--ui-space-3);
|
|
1396
|
+
color: inherit;
|
|
1397
|
+
font-family: inherit;
|
|
1398
|
+
font-size: inherit;
|
|
1399
|
+
line-height: inherit;
|
|
1400
|
+
resize: vertical;
|
|
1401
|
+
white-space: pre-wrap;
|
|
1402
|
+
overflow-wrap: anywhere;
|
|
1403
|
+
}
|
|
1404
|
+
:where([data-part='editor'] > [role='textbox']) {
|
|
1405
|
+
outline: none; /* the box shows focus */
|
|
1406
|
+
}
|
|
1407
|
+
:where(textarea[data-part='editor'])::placeholder {
|
|
1408
|
+
color: var(--ui-muted);
|
|
1409
|
+
}
|
|
1410
|
+
:where([data-part='editor'] > [role='textbox'][data-empty])::before {
|
|
1411
|
+
content: attr(data-placeholder);
|
|
1412
|
+
position: absolute;
|
|
1413
|
+
inset: var(--ui-space-2) var(--ui-space-3) auto;
|
|
1414
|
+
color: var(--ui-muted);
|
|
1415
|
+
pointer-events: none;
|
|
1416
|
+
}
|
|
1417
|
+
:where([data-part='editor'] > [role='textbox']) :where(p) {
|
|
1418
|
+
margin: 0;
|
|
1419
|
+
}
|
|
1420
|
+
:where([data-part='editor'] > [role='textbox']) :where(code) {
|
|
1421
|
+
padding: 0 0.25em;
|
|
1422
|
+
border-radius: calc(var(--ui-radius) / 2);
|
|
1423
|
+
background: var(--ui-muted-bg);
|
|
1424
|
+
font-family: var(--ui-font-mono);
|
|
1425
|
+
font-size: calc(var(--ui-font-size) - 1px);
|
|
1426
|
+
}
|
|
1427
|
+
:where([data-part='editor'] > [role='textbox']) :where(pre) {
|
|
1428
|
+
margin: var(--ui-space-1) 0;
|
|
1429
|
+
padding: var(--ui-space-2);
|
|
1430
|
+
border-radius: calc(var(--ui-radius) / 2);
|
|
1431
|
+
background: var(--ui-muted-bg);
|
|
1432
|
+
font-family: var(--ui-font-mono);
|
|
1433
|
+
font-size: calc(var(--ui-font-size) - 1px);
|
|
1434
|
+
white-space: pre-wrap; /* long lines wrap (a pre would set the editor's width) */
|
|
1435
|
+
overflow-wrap: anywhere;
|
|
1436
|
+
}
|
|
1437
|
+
:where([data-part='editor'] > [role='textbox']) :where(pre code) {
|
|
1438
|
+
padding: 0;
|
|
1439
|
+
background: none;
|
|
1440
|
+
}
|
|
1441
|
+
:where([data-part='editor'] > [role='textbox']) :where(a) {
|
|
1442
|
+
color: var(--ui-accent);
|
|
1443
|
+
text-decoration: underline;
|
|
1444
|
+
}
|
|
1445
|
+
:where([data-mention]) {
|
|
1446
|
+
padding: 0 0.2em;
|
|
1447
|
+
border-radius: calc(var(--ui-radius) / 2);
|
|
1448
|
+
background: var(--ui-accent-soft);
|
|
1449
|
+
color: var(--ui-accent-soft-fg);
|
|
1450
|
+
font-weight: 600;
|
|
1451
|
+
}
|
|
1452
|
+
:where([data-part='toolbar']) {
|
|
1453
|
+
display: flex;
|
|
1454
|
+
flex-wrap: wrap;
|
|
1455
|
+
gap: var(--ui-space-1);
|
|
1456
|
+
}
|
|
1457
|
+
:where([data-part='tool'], [data-part='attach']) {
|
|
1458
|
+
min-width: var(--ui-control-sm);
|
|
1459
|
+
height: var(--ui-control-sm);
|
|
1460
|
+
padding: 0 var(--ui-space-1);
|
|
1461
|
+
border: 0;
|
|
1462
|
+
border-radius: calc(var(--ui-radius) - 2px);
|
|
1463
|
+
background: transparent;
|
|
1464
|
+
color: var(--ui-muted);
|
|
1465
|
+
font-family: var(--ui-font);
|
|
1466
|
+
font-size: var(--ui-font-size);
|
|
1467
|
+
font-weight: 600;
|
|
1468
|
+
cursor: pointer;
|
|
1469
|
+
}
|
|
1470
|
+
:where([data-part='tool'], [data-part='attach']):hover {
|
|
1471
|
+
background: var(--ui-muted-bg);
|
|
1472
|
+
color: var(--ui-fg);
|
|
1473
|
+
}
|
|
1474
|
+
:where([data-part='tool'])[aria-pressed='true'] {
|
|
1475
|
+
background: var(--ui-accent-soft);
|
|
1476
|
+
color: var(--ui-accent-soft-fg);
|
|
1477
|
+
box-shadow: inset 0 -2px 0 var(--ui-accent); /* not by colour alone */
|
|
1478
|
+
}
|
|
1479
|
+
:where([data-part='tool']):disabled {
|
|
1480
|
+
opacity: 0.4;
|
|
1481
|
+
cursor: not-allowed;
|
|
1482
|
+
}
|
|
1483
|
+
:where([data-part='files'])[hidden] {
|
|
1484
|
+
display: none;
|
|
1485
|
+
}
|
|
1486
|
+
:where([data-part='count']) {
|
|
1487
|
+
color: var(--ui-muted);
|
|
1488
|
+
font-size: calc(var(--ui-font-size) - 1px);
|
|
1489
|
+
font-variant-numeric: tabular-nums;
|
|
1490
|
+
}
|
|
1491
|
+
:where([data-part='count'])[data-over] {
|
|
1492
|
+
color: var(--ui-danger);
|
|
1493
|
+
font-weight: 600;
|
|
1494
|
+
}
|
|
1495
|
+
:where([data-part='send']) {
|
|
1496
|
+
height: var(--ui-control-sm);
|
|
1497
|
+
padding: 0 var(--ui-space-3);
|
|
1498
|
+
border: 0;
|
|
1499
|
+
border-radius: calc(var(--ui-radius) - 2px);
|
|
1500
|
+
background: var(--ui-accent);
|
|
1501
|
+
color: var(--ui-accent-fg);
|
|
1502
|
+
font-family: var(--ui-font);
|
|
1503
|
+
font-size: var(--ui-font-size);
|
|
1504
|
+
font-weight: 600;
|
|
1505
|
+
cursor: pointer;
|
|
1506
|
+
}
|
|
1507
|
+
:where([data-part='send']):disabled {
|
|
1508
|
+
opacity: 0.55;
|
|
1509
|
+
cursor: not-allowed;
|
|
1510
|
+
}
|
|
1511
|
+
/* No display here: the behaviour shows and hides the list with the hidden attribute. */
|
|
1512
|
+
:where([data-part='suggestions']) {
|
|
1513
|
+
z-index: 50;
|
|
1514
|
+
min-width: 200px;
|
|
1515
|
+
max-width: calc(100vw - var(--ui-space-8));
|
|
1516
|
+
max-height: 240px;
|
|
1517
|
+
overflow-y: auto;
|
|
1518
|
+
margin: 0;
|
|
1519
|
+
padding: var(--ui-space-1);
|
|
1520
|
+
list-style: none;
|
|
1521
|
+
border: 1px solid var(--ui-border);
|
|
1522
|
+
border-radius: var(--ui-radius);
|
|
1523
|
+
background: var(--ui-popover);
|
|
1524
|
+
color: var(--ui-popover-fg);
|
|
1525
|
+
box-shadow: var(--ui-shadow);
|
|
1526
|
+
font-family: var(--ui-font);
|
|
1527
|
+
font-size: var(--ui-font-size);
|
|
1528
|
+
}
|
|
1529
|
+
:where([data-part='suggestion']) {
|
|
1530
|
+
padding: var(--ui-space-1) var(--ui-space-2);
|
|
1531
|
+
border-radius: calc(var(--ui-radius) - 2px);
|
|
1532
|
+
cursor: pointer;
|
|
1533
|
+
}
|
|
1534
|
+
:where([data-part='suggestion'])[aria-selected='true'] {
|
|
1535
|
+
background: var(--ui-accent-soft);
|
|
1536
|
+
color: var(--ui-accent-soft-fg);
|
|
1537
|
+
}
|
|
1538
|
+
/* end part */
|
|
1539
|
+
|
|
867
1540
|
/* part: motion */
|
|
868
1541
|
@media (prefers-reduced-motion: reduce) {
|
|
869
1542
|
:where([data-part]),
|