@speles7172/controls 0.5.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 +101 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/ChipRow.d.ts +50 -0
- package/dist/ChipRow.d.ts.map +1 -0
- package/dist/ChipRow.js +35 -0
- package/dist/ChipRow.js.map +1 -0
- package/dist/DataTable.d.ts +123 -2
- package/dist/DataTable.d.ts.map +1 -1
- package/dist/DataTable.js +173 -36
- package/dist/DataTable.js.map +1 -1
- package/dist/DateRangeFilter.d.ts +21 -1
- package/dist/DateRangeFilter.d.ts.map +1 -1
- package/dist/DateRangeFilter.js +90 -19
- package/dist/DateRangeFilter.js.map +1 -1
- package/dist/ItemList.d.ts +54 -0
- package/dist/ItemList.d.ts.map +1 -0
- package/dist/ItemList.js +29 -0
- package/dist/ItemList.js.map +1 -0
- package/dist/Modal.d.ts +46 -1
- package/dist/Modal.d.ts.map +1 -1
- package/dist/Modal.js +155 -12
- package/dist/Modal.js.map +1 -1
- package/dist/Pagination.d.ts +25 -0
- package/dist/Pagination.d.ts.map +1 -0
- package/dist/Pagination.js +19 -0
- package/dist/Pagination.js.map +1 -0
- package/dist/SearchableMultiSelect.d.ts.map +1 -1
- package/dist/SearchableMultiSelect.js +1 -1
- package/dist/SearchableMultiSelect.js.map +1 -1
- package/dist/Toast.d.ts +36 -0
- package/dist/Toast.d.ts.map +1 -0
- package/dist/Toast.js +68 -0
- package/dist/Toast.js.map +1 -0
- package/dist/csv.d.ts +21 -0
- package/dist/csv.d.ts.map +1 -0
- package/dist/csv.js +56 -0
- package/dist/csv.js.map +1 -0
- package/dist/index.d.ts +11 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/styles.css +790 -24
- package/dist/useDensity.d.ts +24 -0
- package/dist/useDensity.d.ts.map +1 -0
- package/dist/useDensity.js +61 -0
- package/dist/useDensity.js.map +1 -0
- package/dist/usePagination.d.ts +25 -0
- package/dist/usePagination.d.ts.map +1 -0
- package/dist/usePagination.js +59 -0
- package/dist/usePagination.js.map +1 -0
- package/dist/useTableSort.d.ts +50 -0
- package/dist/useTableSort.d.ts.map +1 -0
- package/dist/useTableSort.js +73 -0
- package/dist/useTableSort.js.map +1 -0
- package/package.json +2 -2
package/dist/styles.css
CHANGED
|
@@ -101,10 +101,40 @@
|
|
|
101
101
|
color: var(--ctl-text);
|
|
102
102
|
font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
103
103
|
font-size: var(--ctl-text-base);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/*
|
|
107
|
+
* `.ctl` lays nothing out, and that is the whole of the rule.
|
|
108
|
+
*
|
|
109
|
+
* It is documented as the class a host puts on its own element to pick up the
|
|
110
|
+
* tokens — so a host writing `<form class="ctl flex flex-wrap items-end">` is
|
|
111
|
+
* writing utility classes that are also a single class: (0,1,0) against
|
|
112
|
+
* (0,1,0), settled by whichever stylesheet the bundler emitted last. A console
|
|
113
|
+
* imports its CSS from a component, so that is this one, and the form came out
|
|
114
|
+
* a column with its fields pushed to the cross-axis end — `items-end` applying
|
|
115
|
+
* while `flex-wrap` had nothing to wrap.
|
|
116
|
+
*
|
|
117
|
+
* `:where()` alone does not fix that, which is worth writing down because it
|
|
118
|
+
* looks as though it should. It makes the declaration (0,0,0), so a host wins
|
|
119
|
+
* every property it *declares* — and Tailwind's `flex` declares `display` and
|
|
120
|
+
* nothing else. `flex-direction: column` at any specificity still beats the
|
|
121
|
+
* initial `row`, so the form stayed a column until `flex-row` was written out
|
|
122
|
+
* as well. Measured in Chromium against a minified bundle, both ways.
|
|
123
|
+
*
|
|
124
|
+
* So the column moves to the three primitives that are one — `.ctl-select`,
|
|
125
|
+
* `.ctl-field` and `.ctl-kv` — and joins the ones already declaring their own
|
|
126
|
+
* box: `.ctl-page-head` a wrapping row, `.ctl-table-wrap` a block, `.ctl-tabs`
|
|
127
|
+
* a scrolling row, `.ctl-card` a column of its own. Every root is then laid out
|
|
128
|
+
* by its own class at (0,1,0) and `.ctl` is what it says it is: the tokens, the
|
|
129
|
+
* type, and nothing about the shape of somebody else's element.
|
|
130
|
+
*
|
|
131
|
+
* `position: relative` stays, at zero specificity, because it is the one part
|
|
132
|
+
* of the old default a consumer may have anchored something to. Nothing in here
|
|
133
|
+
* needs it: the popover is `position: fixed` (see below) and the one stretched
|
|
134
|
+
* `::after` sits inside `.ctl-card-clickable`, which declares its own.
|
|
135
|
+
*/
|
|
136
|
+
:where(.ctl) {
|
|
104
137
|
position: relative;
|
|
105
|
-
display: flex;
|
|
106
|
-
flex-direction: column;
|
|
107
|
-
gap: var(--ctl-space-1);
|
|
108
138
|
}
|
|
109
139
|
|
|
110
140
|
.ctl:where([data-ctl-theme="dark"]) {
|
|
@@ -176,6 +206,9 @@
|
|
|
176
206
|
* otherwise squash it to the width of the word "All".
|
|
177
207
|
*/
|
|
178
208
|
.ctl-select {
|
|
209
|
+
display: flex;
|
|
210
|
+
flex-direction: column;
|
|
211
|
+
gap: var(--ctl-space-1);
|
|
179
212
|
min-width: 160px;
|
|
180
213
|
}
|
|
181
214
|
|
|
@@ -501,6 +534,8 @@
|
|
|
501
534
|
*/
|
|
502
535
|
|
|
503
536
|
.ctl-field {
|
|
537
|
+
display: flex;
|
|
538
|
+
flex-direction: column;
|
|
504
539
|
gap: 6px;
|
|
505
540
|
}
|
|
506
541
|
|
|
@@ -569,6 +604,8 @@
|
|
|
569
604
|
*/
|
|
570
605
|
|
|
571
606
|
.ctl-kv {
|
|
607
|
+
display: flex;
|
|
608
|
+
flex-direction: column;
|
|
572
609
|
gap: 6px;
|
|
573
610
|
}
|
|
574
611
|
|
|
@@ -628,12 +665,18 @@
|
|
|
628
665
|
gap: 0;
|
|
629
666
|
align-items: center;
|
|
630
667
|
justify-content: center;
|
|
631
|
-
padding:
|
|
668
|
+
padding: var(--ctl-space-4);
|
|
632
669
|
overflow-y: auto;
|
|
633
670
|
background: var(--ctl-overlay);
|
|
671
|
+
/* A soft blur, so the page behind reads as "set aside" rather than as a
|
|
672
|
+
second thing to read. Ignored where unsupported, which costs nothing. */
|
|
673
|
+
backdrop-filter: blur(2px);
|
|
674
|
+
animation: ctl-modal-fade 140ms ease-out;
|
|
634
675
|
}
|
|
635
676
|
|
|
636
677
|
.ctl-modal {
|
|
678
|
+
/* The prompt below is laid over the panel, so the panel is its box. */
|
|
679
|
+
position: relative;
|
|
637
680
|
display: flex;
|
|
638
681
|
flex-direction: column;
|
|
639
682
|
width: 100%;
|
|
@@ -642,11 +685,13 @@
|
|
|
642
685
|
put. A dialog taller than the viewport scrolls the backdrop instead, and
|
|
643
686
|
the close button ends up somewhere nobody can reach. */
|
|
644
687
|
max-height: calc(100vh - 32px);
|
|
688
|
+
overflow: hidden;
|
|
645
689
|
background: var(--ctl-bg);
|
|
646
690
|
border: 1px solid var(--ctl-border);
|
|
647
|
-
|
|
691
|
+
/* The radius language's dialog step: a dialog is the roundest thing on screen. */
|
|
692
|
+
border-radius: var(--ctl-radius-lg);
|
|
648
693
|
box-shadow: var(--ctl-shadow);
|
|
649
|
-
animation: ctl-modal-in
|
|
694
|
+
animation: ctl-modal-in 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
650
695
|
}
|
|
651
696
|
|
|
652
697
|
.ctl-modal-wide {
|
|
@@ -661,34 +706,47 @@
|
|
|
661
706
|
.ctl-modal-head {
|
|
662
707
|
display: flex;
|
|
663
708
|
flex-shrink: 0;
|
|
664
|
-
gap:
|
|
709
|
+
gap: var(--ctl-space-3);
|
|
665
710
|
align-items: center;
|
|
666
711
|
justify-content: space-between;
|
|
667
|
-
padding:
|
|
712
|
+
padding: var(--ctl-space-4) var(--ctl-space-5);
|
|
668
713
|
border-bottom: 1px solid var(--ctl-border);
|
|
669
714
|
}
|
|
670
715
|
|
|
671
716
|
.ctl-modal-title {
|
|
672
717
|
margin: 0;
|
|
673
|
-
font-size:
|
|
718
|
+
font-size: var(--ctl-text-title);
|
|
674
719
|
font-weight: 600;
|
|
720
|
+
line-height: 1.3;
|
|
675
721
|
}
|
|
676
722
|
|
|
723
|
+
/* A round, quiet close: an icon at rest, a soft wash under the cursor. */
|
|
677
724
|
.ctl-modal-close {
|
|
678
725
|
display: flex;
|
|
726
|
+
flex-shrink: 0;
|
|
679
727
|
align-items: center;
|
|
680
728
|
justify-content: center;
|
|
681
|
-
|
|
729
|
+
width: 32px;
|
|
730
|
+
height: 32px;
|
|
731
|
+
padding: 0;
|
|
682
732
|
color: var(--ctl-muted);
|
|
683
733
|
cursor: pointer;
|
|
684
734
|
background: none;
|
|
685
735
|
border: 0;
|
|
686
|
-
border-radius:
|
|
736
|
+
border-radius: var(--ctl-radius-pill);
|
|
737
|
+
transition:
|
|
738
|
+
background 120ms ease,
|
|
739
|
+
color 120ms ease;
|
|
687
740
|
}
|
|
688
741
|
|
|
689
|
-
.ctl-modal-close:hover {
|
|
742
|
+
.ctl-modal-close:hover:not(:disabled) {
|
|
690
743
|
color: var(--ctl-text);
|
|
691
|
-
background: var(--ctl-
|
|
744
|
+
background: var(--ctl-hover);
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
.ctl-modal-close:disabled {
|
|
748
|
+
cursor: default;
|
|
749
|
+
opacity: 0.45;
|
|
692
750
|
}
|
|
693
751
|
|
|
694
752
|
.ctl-modal-close:focus-visible {
|
|
@@ -698,7 +756,7 @@
|
|
|
698
756
|
|
|
699
757
|
.ctl-modal-body {
|
|
700
758
|
flex: 1 1 auto;
|
|
701
|
-
padding:
|
|
759
|
+
padding: var(--ctl-space-5);
|
|
702
760
|
overflow-y: auto;
|
|
703
761
|
}
|
|
704
762
|
|
|
@@ -706,37 +764,186 @@
|
|
|
706
764
|
display: flex;
|
|
707
765
|
flex-shrink: 0;
|
|
708
766
|
flex-wrap: wrap;
|
|
709
|
-
gap:
|
|
767
|
+
gap: var(--ctl-space-2);
|
|
710
768
|
justify-content: flex-end;
|
|
711
|
-
padding:
|
|
769
|
+
padding: var(--ctl-space-3) var(--ctl-space-5);
|
|
770
|
+
background: var(--ctl-surface);
|
|
712
771
|
border-top: 1px solid var(--ctl-border);
|
|
713
772
|
}
|
|
714
773
|
|
|
774
|
+
/*
|
|
775
|
+
* The unsaved-changes prompt: a small card over the dialog it asks about, on a
|
|
776
|
+
* wash of the dialog itself, so it is plainly about *this* panel.
|
|
777
|
+
*/
|
|
778
|
+
.ctl-modal-confirm-scrim {
|
|
779
|
+
position: absolute;
|
|
780
|
+
inset: 0;
|
|
781
|
+
z-index: 1;
|
|
782
|
+
display: flex;
|
|
783
|
+
align-items: center;
|
|
784
|
+
justify-content: center;
|
|
785
|
+
padding: var(--ctl-space-4);
|
|
786
|
+
background: var(--ctl-overlay);
|
|
787
|
+
animation: ctl-modal-fade 120ms ease-out;
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
.ctl-modal-confirm {
|
|
791
|
+
display: flex;
|
|
792
|
+
flex-direction: column;
|
|
793
|
+
gap: var(--ctl-space-2);
|
|
794
|
+
width: 100%;
|
|
795
|
+
max-width: 380px;
|
|
796
|
+
padding: var(--ctl-space-5);
|
|
797
|
+
background: var(--ctl-bg);
|
|
798
|
+
border: 1px solid var(--ctl-border);
|
|
799
|
+
border-radius: var(--ctl-radius-lg);
|
|
800
|
+
box-shadow: var(--ctl-shadow);
|
|
801
|
+
animation: ctl-modal-in 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
.ctl-modal-confirm:focus-visible {
|
|
805
|
+
outline: 2px solid var(--ctl-accent);
|
|
806
|
+
outline-offset: 2px;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
.ctl-modal-confirm-title {
|
|
810
|
+
margin: 0;
|
|
811
|
+
font-size: var(--ctl-text-lg);
|
|
812
|
+
font-weight: 600;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
.ctl-modal-confirm-message {
|
|
816
|
+
margin: 0;
|
|
817
|
+
color: var(--ctl-muted);
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
.ctl-modal-confirm-actions {
|
|
821
|
+
display: flex;
|
|
822
|
+
flex-wrap: wrap;
|
|
823
|
+
gap: var(--ctl-space-2);
|
|
824
|
+
justify-content: flex-end;
|
|
825
|
+
margin-top: var(--ctl-space-3);
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
/*
|
|
829
|
+
* A worded button: primary (the one thing to do), danger (the one-way thing),
|
|
830
|
+
* ghost (the step back). Pill-free, 6px, the icon snug against the word.
|
|
831
|
+
*/
|
|
832
|
+
.ctl-btn {
|
|
833
|
+
display: inline-flex;
|
|
834
|
+
gap: 6px;
|
|
835
|
+
align-items: center;
|
|
836
|
+
justify-content: center;
|
|
837
|
+
min-height: 36px;
|
|
838
|
+
padding: 0 var(--ctl-space-4);
|
|
839
|
+
font: inherit;
|
|
840
|
+
font-weight: 500;
|
|
841
|
+
color: var(--ctl-text);
|
|
842
|
+
cursor: pointer;
|
|
843
|
+
background: var(--ctl-bg);
|
|
844
|
+
border: 1px solid var(--ctl-border);
|
|
845
|
+
border-radius: var(--ctl-radius-sm);
|
|
846
|
+
transition:
|
|
847
|
+
background 120ms ease,
|
|
848
|
+
border-color 120ms ease,
|
|
849
|
+
color 120ms ease;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
.ctl-btn:focus-visible {
|
|
853
|
+
outline: 2px solid var(--ctl-accent);
|
|
854
|
+
outline-offset: 2px;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
.ctl-btn-primary {
|
|
858
|
+
color: var(--ctl-accent-text);
|
|
859
|
+
background: var(--ctl-accent);
|
|
860
|
+
border-color: var(--ctl-accent);
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
.ctl-btn-primary:hover {
|
|
864
|
+
background: var(--ctl-accent-strong);
|
|
865
|
+
border-color: var(--ctl-accent-strong);
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
.ctl-btn-danger {
|
|
869
|
+
color: var(--ctl-danger);
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
.ctl-btn-danger:hover {
|
|
873
|
+
background: var(--ctl-danger-soft);
|
|
874
|
+
border-color: var(--ctl-danger);
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
.ctl-btn-ghost {
|
|
878
|
+
background: none;
|
|
879
|
+
border-color: transparent;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
.ctl-btn-ghost:hover {
|
|
883
|
+
background: var(--ctl-hover);
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
@keyframes ctl-modal-up {
|
|
887
|
+
from {
|
|
888
|
+
opacity: 0;
|
|
889
|
+
transform: translateY(24px);
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
to {
|
|
893
|
+
opacity: 1;
|
|
894
|
+
transform: none;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
|
|
715
898
|
@keyframes ctl-modal-in {
|
|
716
899
|
from {
|
|
717
900
|
opacity: 0;
|
|
718
|
-
transform: translateY(
|
|
901
|
+
transform: translateY(8px) scale(0.98);
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
@keyframes ctl-modal-fade {
|
|
906
|
+
from {
|
|
907
|
+
opacity: 0;
|
|
719
908
|
}
|
|
720
909
|
}
|
|
721
910
|
|
|
722
911
|
@media (prefers-reduced-motion: reduce) {
|
|
723
|
-
.ctl-modal
|
|
912
|
+
.ctl-modal,
|
|
913
|
+
.ctl-modal-overlay,
|
|
914
|
+
.ctl-modal-confirm,
|
|
915
|
+
.ctl-modal-confirm-scrim {
|
|
724
916
|
animation: none;
|
|
725
917
|
}
|
|
726
918
|
}
|
|
727
919
|
|
|
728
|
-
/* Below this the panel is
|
|
729
|
-
|
|
920
|
+
/* Below this the panel is a bottom sheet: it rises from the foot of the
|
|
921
|
+
screen, as tall as its content (at most nearly the whole screen), with the
|
|
922
|
+
page still visible above it — the phone shape every dialog takes, rather
|
|
923
|
+
than a full-screen page that loses where the operator was. Side padding
|
|
924
|
+
buys nothing here and costs width the content needs. */
|
|
730
925
|
@media (max-width: 480px) {
|
|
731
926
|
.ctl-modal-overlay {
|
|
927
|
+
align-items: flex-end;
|
|
732
928
|
padding: 0;
|
|
733
929
|
}
|
|
734
930
|
|
|
735
931
|
.ctl-modal {
|
|
736
932
|
max-width: none;
|
|
737
|
-
|
|
933
|
+
max-height: 96vh;
|
|
934
|
+
padding-bottom: env(safe-area-inset-bottom, 0px);
|
|
738
935
|
border: 0;
|
|
739
|
-
border-radius: 0;
|
|
936
|
+
border-radius: var(--ctl-radius-lg) var(--ctl-radius-lg) 0 0;
|
|
937
|
+
animation: ctl-modal-up 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
.ctl-modal-head,
|
|
941
|
+
.ctl-modal-body {
|
|
942
|
+
padding-inline: var(--ctl-space-4);
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
.ctl-modal-title {
|
|
946
|
+
font-size: var(--ctl-text-lg);
|
|
740
947
|
}
|
|
741
948
|
}
|
|
742
949
|
|
|
@@ -1104,12 +1311,20 @@
|
|
|
1104
1311
|
.ctl-table-wrap {
|
|
1105
1312
|
display: block;
|
|
1106
1313
|
width: 100%;
|
|
1107
|
-
|
|
1314
|
+
/* `hidden` clips the table's square corners to the rounded border; the table
|
|
1315
|
+
scrolls in `.ctl-table-scroll` inside, so the footer beneath it stays put. */
|
|
1316
|
+
overflow: hidden;
|
|
1108
1317
|
background: var(--ctl-bg);
|
|
1109
1318
|
border: 1px solid var(--ctl-border);
|
|
1110
1319
|
border-radius: var(--ctl-radius);
|
|
1111
1320
|
}
|
|
1112
1321
|
|
|
1322
|
+
/* The table scrolls sideways here, not on the wrap — so the pagination footer
|
|
1323
|
+
below it does not slide off with a wide table. */
|
|
1324
|
+
.ctl-table-scroll {
|
|
1325
|
+
overflow-x: auto;
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1113
1328
|
.ctl-table {
|
|
1114
1329
|
width: 100%;
|
|
1115
1330
|
border-collapse: collapse;
|
|
@@ -1164,9 +1379,21 @@
|
|
|
1164
1379
|
color: var(--ctl-accent);
|
|
1165
1380
|
}
|
|
1166
1381
|
|
|
1382
|
+
/*
|
|
1383
|
+
* `text-align: start` is stated rather than left to the browser, because a
|
|
1384
|
+
* `rowHeader` column renders `<th scope="row">` — which is what a screen reader
|
|
1385
|
+
* needs to announce a row by the thing that names it — and a `th` defaults to
|
|
1386
|
+
* `center`. `.ctl-th` says `start` and this did not, so the one column naming
|
|
1387
|
+
* each row was the one column not lining up with its own heading, while every
|
|
1388
|
+
* `<td>` beside it started at the edge. It stays above `.ctl-align-*`: those are
|
|
1389
|
+
* a single class too, so a column asking to be end-aligned wins here on source
|
|
1390
|
+
* order — which is why this is a bare `.ctl-td` and not `th.ctl-td`, since
|
|
1391
|
+
* (0,1,1) would outrank them and pin every row header to the start edge.
|
|
1392
|
+
*/
|
|
1167
1393
|
.ctl-td {
|
|
1168
1394
|
padding: var(--ctl-space-3);
|
|
1169
1395
|
font-size: var(--ctl-text-base);
|
|
1396
|
+
text-align: start;
|
|
1170
1397
|
vertical-align: top;
|
|
1171
1398
|
border-top: 1px solid var(--ctl-border);
|
|
1172
1399
|
}
|
|
@@ -1175,6 +1402,62 @@
|
|
|
1175
1402
|
border-top: 0;
|
|
1176
1403
|
}
|
|
1177
1404
|
|
|
1405
|
+
/* A view control strip above the rows (the density toggle), when a table offers
|
|
1406
|
+
one. Above the table rather than in the pagination footer, which a short list
|
|
1407
|
+
never shows. */
|
|
1408
|
+
.ctl-table-toolbar {
|
|
1409
|
+
display: flex;
|
|
1410
|
+
justify-content: flex-end;
|
|
1411
|
+
gap: var(--ctl-space-2);
|
|
1412
|
+
padding: var(--ctl-space-2) var(--ctl-space-3);
|
|
1413
|
+
background: var(--ctl-surface);
|
|
1414
|
+
border-bottom: 1px solid var(--ctl-border);
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
.ctl-density-toggle {
|
|
1418
|
+
padding: var(--ctl-space-1) var(--ctl-space-3);
|
|
1419
|
+
font: inherit;
|
|
1420
|
+
font-size: var(--ctl-text-xs);
|
|
1421
|
+
font-weight: 600;
|
|
1422
|
+
color: var(--ctl-text);
|
|
1423
|
+
cursor: pointer;
|
|
1424
|
+
background: var(--ctl-bg);
|
|
1425
|
+
border: 1px solid var(--ctl-border);
|
|
1426
|
+
border-radius: var(--ctl-radius-sm);
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
.ctl-density-toggle:hover {
|
|
1430
|
+
background: var(--ctl-hover);
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
/* Export CSV shares the toggle's look; nothing to export reads as unavailable, not pressed. */
|
|
1434
|
+
.ctl-table-export:disabled {
|
|
1435
|
+
cursor: default;
|
|
1436
|
+
opacity: 0.55;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
.ctl-density-toggle:focus-visible {
|
|
1440
|
+
outline: 2px solid var(--ctl-accent);
|
|
1441
|
+
outline-offset: 1px;
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
/* The pressed state reads as chosen, not just hovered. */
|
|
1445
|
+
.ctl-density-toggle[aria-pressed='true'] {
|
|
1446
|
+
color: var(--ctl-accent);
|
|
1447
|
+
background: var(--ctl-hover);
|
|
1448
|
+
border-color: var(--ctl-accent);
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
/* Compact: the same table, tighter — more rows on the screen at once for a
|
|
1452
|
+
reviewer who wants them (CRM.md §18.6). Only the row padding changes. */
|
|
1453
|
+
.ctl-table-compact .ctl-td {
|
|
1454
|
+
padding: var(--ctl-space-2) var(--ctl-space-3);
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
.ctl-table-compact .ctl-th {
|
|
1458
|
+
padding: var(--ctl-space-1) var(--ctl-space-3);
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1178
1461
|
/*
|
|
1179
1462
|
* Alignment is logical, so a table reads correctly in both directions.
|
|
1180
1463
|
*
|
|
@@ -1247,6 +1530,97 @@
|
|
|
1247
1530
|
text-align: center;
|
|
1248
1531
|
}
|
|
1249
1532
|
|
|
1533
|
+
/*
|
|
1534
|
+
* A column totals row (ColumnDef.footer): one <tfoot> row, its cells aligned to
|
|
1535
|
+
* the columns above. A stronger top rule and medium weight set it apart from the
|
|
1536
|
+
* body without shouting; numbers stay tabular so a total lines up under its
|
|
1537
|
+
* column. Empty footer cells (columns with no total) are kept for alignment in
|
|
1538
|
+
* the table layout — and hidden in the stacked card layout below, where an empty
|
|
1539
|
+
* labelled cell would just be noise.
|
|
1540
|
+
*/
|
|
1541
|
+
.ctl-td-foot {
|
|
1542
|
+
border-top: 2px solid var(--ctl-border);
|
|
1543
|
+
font-weight: 600;
|
|
1544
|
+
color: var(--ctl-text);
|
|
1545
|
+
font-variant-numeric: tabular-nums;
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
/*
|
|
1549
|
+
* The list's footer: page size, where in the list this page sits, and the way
|
|
1550
|
+
* to the next one. It sits inside the table's bordered card, a top border
|
|
1551
|
+
* dividing it from the rows. A row that wraps on a narrow screen keeps its three
|
|
1552
|
+
* parts legible rather than clipping any of them.
|
|
1553
|
+
*/
|
|
1554
|
+
.ctl-pagination {
|
|
1555
|
+
display: flex;
|
|
1556
|
+
flex-wrap: wrap;
|
|
1557
|
+
gap: var(--ctl-space-2) var(--ctl-space-4);
|
|
1558
|
+
align-items: center;
|
|
1559
|
+
justify-content: space-between;
|
|
1560
|
+
padding: var(--ctl-space-2) var(--ctl-space-3);
|
|
1561
|
+
background: var(--ctl-surface);
|
|
1562
|
+
border-top: 1px solid var(--ctl-border);
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
.ctl-pagination-size {
|
|
1566
|
+
display: inline-flex;
|
|
1567
|
+
gap: var(--ctl-space-2);
|
|
1568
|
+
align-items: center;
|
|
1569
|
+
font-size: var(--ctl-text-xs);
|
|
1570
|
+
color: var(--ctl-muted);
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
.ctl-pagination-select {
|
|
1574
|
+
padding: var(--ctl-space-1) var(--ctl-space-2);
|
|
1575
|
+
font: inherit;
|
|
1576
|
+
color: var(--ctl-text);
|
|
1577
|
+
background: var(--ctl-bg);
|
|
1578
|
+
border: 1px solid var(--ctl-border);
|
|
1579
|
+
border-radius: var(--ctl-radius-sm);
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
.ctl-pagination-select:focus-visible {
|
|
1583
|
+
outline: 2px solid var(--ctl-accent);
|
|
1584
|
+
outline-offset: 1px;
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
.ctl-pagination-info {
|
|
1588
|
+
font-size: var(--ctl-text-xs);
|
|
1589
|
+
color: var(--ctl-muted);
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
.ctl-pagination-nav {
|
|
1593
|
+
display: inline-flex;
|
|
1594
|
+
gap: var(--ctl-space-1);
|
|
1595
|
+
align-items: center;
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
.ctl-pagination-button {
|
|
1599
|
+
padding: var(--ctl-space-1) var(--ctl-space-3);
|
|
1600
|
+
font: inherit;
|
|
1601
|
+
font-size: var(--ctl-text-xs);
|
|
1602
|
+
font-weight: 600;
|
|
1603
|
+
color: var(--ctl-text);
|
|
1604
|
+
cursor: pointer;
|
|
1605
|
+
background: var(--ctl-bg);
|
|
1606
|
+
border: 1px solid var(--ctl-border);
|
|
1607
|
+
border-radius: var(--ctl-radius-sm);
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
.ctl-pagination-button:hover:not(:disabled) {
|
|
1611
|
+
background: var(--ctl-hover);
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
.ctl-pagination-button:focus-visible {
|
|
1615
|
+
outline: 2px solid var(--ctl-accent);
|
|
1616
|
+
outline-offset: 1px;
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
.ctl-pagination-button:disabled {
|
|
1620
|
+
color: var(--ctl-faint);
|
|
1621
|
+
cursor: default;
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1250
1624
|
/*
|
|
1251
1625
|
* Every state is designed, not just the happy one. An empty list rendering as
|
|
1252
1626
|
* blank space is a bug: it says what this place is for and offers the action
|
|
@@ -1305,6 +1679,10 @@
|
|
|
1305
1679
|
.ctl-skeleton-table {
|
|
1306
1680
|
display: flex;
|
|
1307
1681
|
flex-direction: column;
|
|
1682
|
+
/* Stated, not inherited from `.ctl`, which no longer lays anything out. It
|
|
1683
|
+
was 4px before that and the rows closed up by 8px without it — the one
|
|
1684
|
+
thing in this stylesheet that was taking its gap from the root. */
|
|
1685
|
+
gap: var(--ctl-space-1);
|
|
1308
1686
|
overflow: hidden;
|
|
1309
1687
|
border: 1px solid var(--ctl-border);
|
|
1310
1688
|
border-radius: var(--ctl-radius);
|
|
@@ -1412,6 +1790,18 @@
|
|
|
1412
1790
|
display: block;
|
|
1413
1791
|
}
|
|
1414
1792
|
|
|
1793
|
+
/* The totals footer stacks like the body; a column with no total renders an
|
|
1794
|
+
empty footer cell, which would show as a bare label here, so drop the empties. */
|
|
1795
|
+
.ctl-table-stacks .ctl-table tfoot {
|
|
1796
|
+
display: block;
|
|
1797
|
+
}
|
|
1798
|
+
/* `.ctl-table` in the selector lifts this above the sibling
|
|
1799
|
+
`.ctl-table-stacks .ctl-td:not(.ctl-table-empty){display:flex}` rule, which
|
|
1800
|
+
has equal specificity and would otherwise win by order and re-show these. */
|
|
1801
|
+
.ctl-table-stacks .ctl-table .ctl-td-foot:empty {
|
|
1802
|
+
display: none;
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1415
1805
|
.ctl-table-stacks .ctl-table thead {
|
|
1416
1806
|
/* Not `display: none`: a screen reader still reads the head as the name of
|
|
1417
1807
|
each cell, and hiding it outright takes that away as well as the layout. */
|
|
@@ -1508,9 +1898,15 @@
|
|
|
1508
1898
|
* list of presets beside it. `max-width` in view units rather than a second
|
|
1509
1899
|
* fixed number: `useAnchoredPopover` caps the width to the room there is, and
|
|
1510
1900
|
* this keeps the two panels side by side until there is not room for them.
|
|
1901
|
+
*
|
|
1902
|
+
* The minimum is what the two panels need side by side, not 280px:
|
|
1903
|
+
* `useAnchoredPopover` sets the popover's `width` to the anchor's, which for a
|
|
1904
|
+
* date range in a filter bar is far narrower than presets plus a calendar, so
|
|
1905
|
+
* without it the panels overflow into a sideways scrollbar. The hook lifts this
|
|
1906
|
+
* minimum in a window narrower than it, and under 480px the panels stack.
|
|
1511
1907
|
*/
|
|
1512
1908
|
.ctl-daterange-popover {
|
|
1513
|
-
min-width:
|
|
1909
|
+
min-width: min(540px, calc(100vw - 16px));
|
|
1514
1910
|
max-width: min(560px, 96vw);
|
|
1515
1911
|
}
|
|
1516
1912
|
|
|
@@ -1618,6 +2014,11 @@
|
|
|
1618
2014
|
min-width: 120px;
|
|
1619
2015
|
}
|
|
1620
2016
|
|
|
2017
|
+
.ctl-daterange-field.ctl-daterange-time {
|
|
2018
|
+
flex: 0 0 auto;
|
|
2019
|
+
min-width: 112px;
|
|
2020
|
+
}
|
|
2021
|
+
|
|
1621
2022
|
.ctl-daterange-amount {
|
|
1622
2023
|
width: 72px;
|
|
1623
2024
|
flex-shrink: 0;
|
|
@@ -1759,3 +2160,368 @@
|
|
|
1759
2160
|
border-radius: var(--ctl-radius-pill);
|
|
1760
2161
|
}
|
|
1761
2162
|
}
|
|
2163
|
+
|
|
2164
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
2165
|
+
* Chips: a row of one-tap filters above a list (<ChipRow>).
|
|
2166
|
+
*
|
|
2167
|
+
* Pills, so they read as choices rather than buttons; the pressed one takes
|
|
2168
|
+
* the soft accent — the same mark the selected tab and the active menu item
|
|
2169
|
+
* carry, so "chosen" looks the same everywhere. The row scrolls sideways with
|
|
2170
|
+
* the scrollbar hidden rather than wrapping into a wall on a phone.
|
|
2171
|
+
*/
|
|
2172
|
+
.ctl-chiprow {
|
|
2173
|
+
display: flex;
|
|
2174
|
+
gap: var(--ctl-space-1);
|
|
2175
|
+
padding: 2px 0;
|
|
2176
|
+
overflow-x: auto;
|
|
2177
|
+
scrollbar-width: none;
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
.ctl-chiprow::-webkit-scrollbar {
|
|
2181
|
+
display: none;
|
|
2182
|
+
}
|
|
2183
|
+
|
|
2184
|
+
.ctl-chiprow-chip {
|
|
2185
|
+
display: inline-flex;
|
|
2186
|
+
flex: 0 0 auto;
|
|
2187
|
+
gap: var(--ctl-space-1);
|
|
2188
|
+
align-items: center;
|
|
2189
|
+
padding: 3px var(--ctl-space-3);
|
|
2190
|
+
font: inherit;
|
|
2191
|
+
font-size: var(--ctl-text-sm);
|
|
2192
|
+
font-weight: 500;
|
|
2193
|
+
line-height: 1.5;
|
|
2194
|
+
color: var(--ctl-muted);
|
|
2195
|
+
white-space: nowrap;
|
|
2196
|
+
cursor: pointer;
|
|
2197
|
+
background: var(--ctl-bg);
|
|
2198
|
+
border: 1px solid var(--ctl-border);
|
|
2199
|
+
border-radius: var(--ctl-radius-pill);
|
|
2200
|
+
}
|
|
2201
|
+
|
|
2202
|
+
.ctl-chiprow-chip:hover:not(:disabled) {
|
|
2203
|
+
color: var(--ctl-text);
|
|
2204
|
+
border-color: var(--ctl-accent);
|
|
2205
|
+
}
|
|
2206
|
+
|
|
2207
|
+
.ctl-chiprow-chip[aria-pressed='true'] {
|
|
2208
|
+
color: var(--ctl-text);
|
|
2209
|
+
background: var(--ctl-accent-soft);
|
|
2210
|
+
border-color: var(--ctl-accent-soft);
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
.ctl-chiprow-chip:focus-visible {
|
|
2214
|
+
outline: 2px solid var(--ctl-accent);
|
|
2215
|
+
outline-offset: 1px;
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
.ctl-chiprow-chip:disabled {
|
|
2219
|
+
cursor: default;
|
|
2220
|
+
opacity: 0.5;
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
.ctl-chiprow-count {
|
|
2224
|
+
font-weight: 400;
|
|
2225
|
+
color: var(--ctl-faint);
|
|
2226
|
+
}
|
|
2227
|
+
|
|
2228
|
+
.ctl-chiprow-chip[aria-pressed='true'] .ctl-chiprow-count {
|
|
2229
|
+
color: var(--ctl-muted);
|
|
2230
|
+
}
|
|
2231
|
+
|
|
2232
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
2233
|
+
* Toasts: the acknowledgement a save deserves (<ToastProvider>, useToast).
|
|
2234
|
+
*
|
|
2235
|
+
* Ink on the page's surface colour, bottom-centre (both inline edges pinned
|
|
2236
|
+
* and the inline margins auto, so it centres without a physical `left`),
|
|
2237
|
+
* above everything but a dialog's prompt; a tone shows as a rule on the
|
|
2238
|
+
* leading edge rather than a whole colour, so the strip stays readable and
|
|
2239
|
+
* one meaning per colour holds.
|
|
2240
|
+
*/
|
|
2241
|
+
.ctl-toaster {
|
|
2242
|
+
position: fixed;
|
|
2243
|
+
inset-inline: 0;
|
|
2244
|
+
bottom: calc(20px + env(safe-area-inset-bottom, 0px));
|
|
2245
|
+
z-index: 60;
|
|
2246
|
+
display: flex;
|
|
2247
|
+
flex-direction: column;
|
|
2248
|
+
gap: var(--ctl-space-2);
|
|
2249
|
+
align-items: center;
|
|
2250
|
+
width: max-content;
|
|
2251
|
+
max-width: min(480px, calc(100vw - 32px));
|
|
2252
|
+
margin-inline: auto;
|
|
2253
|
+
pointer-events: none;
|
|
2254
|
+
}
|
|
2255
|
+
|
|
2256
|
+
.ctl-toast {
|
|
2257
|
+
display: flex;
|
|
2258
|
+
gap: var(--ctl-space-3);
|
|
2259
|
+
align-items: center;
|
|
2260
|
+
max-width: 100%;
|
|
2261
|
+
padding-block: var(--ctl-space-2);
|
|
2262
|
+
padding-inline: var(--ctl-space-3) var(--ctl-space-2);
|
|
2263
|
+
font-size: var(--ctl-text-base);
|
|
2264
|
+
color: var(--ctl-bg);
|
|
2265
|
+
pointer-events: auto;
|
|
2266
|
+
background: var(--ctl-text);
|
|
2267
|
+
border-radius: var(--ctl-radius);
|
|
2268
|
+
box-shadow: var(--ctl-shadow);
|
|
2269
|
+
animation: ctl-toast-in 160ms ease-out;
|
|
2270
|
+
}
|
|
2271
|
+
|
|
2272
|
+
.ctl-toast-ok {
|
|
2273
|
+
border-inline-start: 3px solid var(--ctl-ok);
|
|
2274
|
+
}
|
|
2275
|
+
|
|
2276
|
+
.ctl-toast-warn {
|
|
2277
|
+
border-inline-start: 3px solid var(--ctl-warn);
|
|
2278
|
+
}
|
|
2279
|
+
|
|
2280
|
+
.ctl-toast-danger {
|
|
2281
|
+
border-inline-start: 3px solid var(--ctl-danger);
|
|
2282
|
+
}
|
|
2283
|
+
|
|
2284
|
+
.ctl-toast-message {
|
|
2285
|
+
min-width: 0;
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
.ctl-toast-dismiss {
|
|
2289
|
+
display: inline-flex;
|
|
2290
|
+
align-items: center;
|
|
2291
|
+
justify-content: center;
|
|
2292
|
+
width: 24px;
|
|
2293
|
+
height: 24px;
|
|
2294
|
+
padding: 0;
|
|
2295
|
+
font: inherit;
|
|
2296
|
+
font-size: var(--ctl-text-lg);
|
|
2297
|
+
line-height: 1;
|
|
2298
|
+
color: inherit;
|
|
2299
|
+
cursor: pointer;
|
|
2300
|
+
background: none;
|
|
2301
|
+
border: 0;
|
|
2302
|
+
border-radius: var(--ctl-radius-pill);
|
|
2303
|
+
opacity: 0.7;
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
.ctl-toast-dismiss:hover {
|
|
2307
|
+
opacity: 1;
|
|
2308
|
+
}
|
|
2309
|
+
|
|
2310
|
+
.ctl-toast-dismiss:focus-visible {
|
|
2311
|
+
outline: 2px solid var(--ctl-bg);
|
|
2312
|
+
outline-offset: 1px;
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
@keyframes ctl-toast-in {
|
|
2316
|
+
from {
|
|
2317
|
+
opacity: 0;
|
|
2318
|
+
transform: translateY(6px);
|
|
2319
|
+
}
|
|
2320
|
+
|
|
2321
|
+
to {
|
|
2322
|
+
opacity: 1;
|
|
2323
|
+
transform: none;
|
|
2324
|
+
}
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2327
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2328
|
+
.ctl-toast {
|
|
2329
|
+
animation: none;
|
|
2330
|
+
}
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
2334
|
+
* Item rows: the to-do shape (<ItemList>) — a checkbox, the line, its meta,
|
|
2335
|
+
* a date at the end and the row's small actions, under optional group
|
|
2336
|
+
* headings. Hairline rows, no card chrome: the list is the card.
|
|
2337
|
+
*/
|
|
2338
|
+
.ctl-items {
|
|
2339
|
+
display: flex;
|
|
2340
|
+
flex-direction: column;
|
|
2341
|
+
gap: var(--ctl-space-4);
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
.ctl-items-group {
|
|
2345
|
+
min-width: 0;
|
|
2346
|
+
}
|
|
2347
|
+
|
|
2348
|
+
.ctl-items-heading {
|
|
2349
|
+
display: flex;
|
|
2350
|
+
gap: var(--ctl-space-1);
|
|
2351
|
+
align-items: baseline;
|
|
2352
|
+
margin: 0 0 var(--ctl-space-1);
|
|
2353
|
+
font-size: var(--ctl-text-sm);
|
|
2354
|
+
font-weight: 500;
|
|
2355
|
+
color: var(--ctl-faint);
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2358
|
+
.ctl-items-count {
|
|
2359
|
+
font-weight: 400;
|
|
2360
|
+
color: var(--ctl-faint);
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
.ctl-items-list {
|
|
2364
|
+
padding: 0;
|
|
2365
|
+
margin: 0;
|
|
2366
|
+
list-style: none;
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2369
|
+
.ctl-items-empty {
|
|
2370
|
+
margin: 0;
|
|
2371
|
+
color: var(--ctl-muted);
|
|
2372
|
+
}
|
|
2373
|
+
|
|
2374
|
+
.ctl-item {
|
|
2375
|
+
display: flex;
|
|
2376
|
+
gap: var(--ctl-space-3);
|
|
2377
|
+
align-items: flex-start;
|
|
2378
|
+
padding: var(--ctl-space-2) 0;
|
|
2379
|
+
border-bottom: 1px solid var(--ctl-border);
|
|
2380
|
+
}
|
|
2381
|
+
|
|
2382
|
+
.ctl-item:last-child {
|
|
2383
|
+
border-bottom: 0;
|
|
2384
|
+
}
|
|
2385
|
+
|
|
2386
|
+
.ctl-item-check {
|
|
2387
|
+
flex: 0 0 auto;
|
|
2388
|
+
width: 16px;
|
|
2389
|
+
height: 16px;
|
|
2390
|
+
margin: 3px 0 0;
|
|
2391
|
+
accent-color: var(--ctl-accent);
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
.ctl-item-body {
|
|
2395
|
+
flex: 1 1 auto;
|
|
2396
|
+
min-width: 0;
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
.ctl-item-title {
|
|
2400
|
+
color: var(--ctl-text);
|
|
2401
|
+
overflow-wrap: anywhere;
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
.ctl-item-done .ctl-item-title {
|
|
2405
|
+
color: var(--ctl-faint);
|
|
2406
|
+
text-decoration: line-through;
|
|
2407
|
+
}
|
|
2408
|
+
|
|
2409
|
+
.ctl-item-meta {
|
|
2410
|
+
font-size: var(--ctl-text-sm);
|
|
2411
|
+
color: var(--ctl-muted);
|
|
2412
|
+
overflow-wrap: anywhere;
|
|
2413
|
+
}
|
|
2414
|
+
|
|
2415
|
+
.ctl-item-date {
|
|
2416
|
+
flex: 0 0 auto;
|
|
2417
|
+
font-size: var(--ctl-text-sm);
|
|
2418
|
+
font-variant-numeric: tabular-nums;
|
|
2419
|
+
color: var(--ctl-faint);
|
|
2420
|
+
white-space: nowrap;
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
.ctl-item-date-due {
|
|
2424
|
+
color: var(--ctl-warn);
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
.ctl-item-date-overdue {
|
|
2428
|
+
color: var(--ctl-danger);
|
|
2429
|
+
}
|
|
2430
|
+
|
|
2431
|
+
.ctl-item-actions {
|
|
2432
|
+
display: flex;
|
|
2433
|
+
flex: 0 0 auto;
|
|
2434
|
+
gap: 2px;
|
|
2435
|
+
opacity: 0.6;
|
|
2436
|
+
}
|
|
2437
|
+
|
|
2438
|
+
.ctl-item:hover .ctl-item-actions,
|
|
2439
|
+
.ctl-item:focus-within .ctl-item-actions {
|
|
2440
|
+
opacity: 1;
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
@media (pointer: coarse) {
|
|
2444
|
+
.ctl-item-actions {
|
|
2445
|
+
opacity: 1;
|
|
2446
|
+
}
|
|
2447
|
+
}
|
|
2448
|
+
|
|
2449
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
2450
|
+
* Row cards: the <DataTable> as a list of cards (`rowCard`), the shape a
|
|
2451
|
+
* master pane and a phone list take — each row one card with whatever the
|
|
2452
|
+
* caller draws inside it, selected and clickable like a table row.
|
|
2453
|
+
*/
|
|
2454
|
+
.ctl-cards {
|
|
2455
|
+
display: flex;
|
|
2456
|
+
flex-direction: column;
|
|
2457
|
+
gap: var(--ctl-space-2);
|
|
2458
|
+
padding: 0;
|
|
2459
|
+
margin: 0;
|
|
2460
|
+
list-style: none;
|
|
2461
|
+
}
|
|
2462
|
+
|
|
2463
|
+
.ctl-card-row {
|
|
2464
|
+
display: flex;
|
|
2465
|
+
gap: var(--ctl-space-3);
|
|
2466
|
+
align-items: center;
|
|
2467
|
+
padding: var(--ctl-space-3);
|
|
2468
|
+
background: var(--ctl-bg);
|
|
2469
|
+
border: 1px solid var(--ctl-border);
|
|
2470
|
+
border-radius: var(--ctl-radius-lg);
|
|
2471
|
+
}
|
|
2472
|
+
|
|
2473
|
+
.ctl-card-row-clickable {
|
|
2474
|
+
cursor: pointer;
|
|
2475
|
+
}
|
|
2476
|
+
|
|
2477
|
+
.ctl-card-row-clickable:hover {
|
|
2478
|
+
border-color: var(--ctl-accent);
|
|
2479
|
+
}
|
|
2480
|
+
|
|
2481
|
+
.ctl-card-row:focus-visible {
|
|
2482
|
+
outline: 2px solid var(--ctl-accent);
|
|
2483
|
+
outline-offset: 1px;
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2486
|
+
.ctl-card-row-selected {
|
|
2487
|
+
background: var(--ctl-accent-soft);
|
|
2488
|
+
border-color: var(--ctl-accent);
|
|
2489
|
+
}
|
|
2490
|
+
|
|
2491
|
+
.ctl-card-body {
|
|
2492
|
+
flex: 1 1 auto;
|
|
2493
|
+
min-width: 0;
|
|
2494
|
+
}
|
|
2495
|
+
|
|
2496
|
+
.ctl-card-empty {
|
|
2497
|
+
padding: var(--ctl-space-4);
|
|
2498
|
+
color: var(--ctl-muted);
|
|
2499
|
+
text-align: center;
|
|
2500
|
+
list-style: none;
|
|
2501
|
+
}
|
|
2502
|
+
|
|
2503
|
+
/* Touch targets (PR #226 review): a chip and the toast's dismiss are 44px on a
|
|
2504
|
+
coarse pointer, keeping their desktop sizes elsewhere. The dismiss grows
|
|
2505
|
+
outward (negative margin) so the strip's visual size does not change. */
|
|
2506
|
+
@media (pointer: coarse) {
|
|
2507
|
+
.ctl-chiprow-chip {
|
|
2508
|
+
min-height: 44px;
|
|
2509
|
+
padding: 6px var(--ctl-space-4);
|
|
2510
|
+
}
|
|
2511
|
+
|
|
2512
|
+
.ctl-toast-dismiss {
|
|
2513
|
+
width: 44px;
|
|
2514
|
+
height: 44px;
|
|
2515
|
+
margin: -10px;
|
|
2516
|
+
}
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2519
|
+
/* Reduced motion, restated last (PR #226 review): the phone bottom sheet's
|
|
2520
|
+
rise and the toast's fade are declared after the earlier reduced-motion
|
|
2521
|
+
rule, so this one must come after both to win. */
|
|
2522
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2523
|
+
.ctl-modal,
|
|
2524
|
+
.ctl-toast {
|
|
2525
|
+
animation: none;
|
|
2526
|
+
}
|
|
2527
|
+
}
|