@still-void/ui 3.3.1 → 3.4.1

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/dist/style.css CHANGED
@@ -333,7 +333,9 @@ body.sv-body {
333
333
  }
334
334
  .sv-layout {
335
335
  display: grid;
336
- grid-template-columns: 1fr;
336
+ /* minmax(0, 1fr), not 1fr: a bare 1fr is minmax(auto, 1fr), so the column
337
+ grew to its content's min-content and pushed narrow pages sideways. */
338
+ grid-template-columns: minmax(0, 1fr);
337
339
  gap: var(--sv-space-10);
338
340
  max-width: 1120px;
339
341
  margin: 0 auto;
@@ -389,6 +391,13 @@ body.sv-body {
389
391
  max-width: 60ch;
390
392
  margin: 0;
391
393
  }
394
+ /* Narrow viewports: the display step (2.75rem) pushes the page's content below
395
+ the fold on a phone, so the title drops to the headline step (1.75rem). */
396
+ @media (width < 40rem) {
397
+ .sv-hero__title {
398
+ font-size: var(--sv-text-2xl);
399
+ }
400
+ }
392
401
 
393
402
  /* ---------- Skeleton ---------- */
394
403
  .sv-skeleton-line {
@@ -853,6 +862,60 @@ body.sv-body {
853
862
  color: var(--sv-text-2);
854
863
  font-size: var(--sv-text-sm);
855
864
  }
865
+ /* Stacked mode (<Table stack>): below 40rem each row becomes a block and each
866
+ cell a label/value pair, the label read from data-label (<TableCell label>).
867
+ The head is hidden visually but stays in the accessibility tree. At 40rem and
868
+ up nothing here applies and the table renders exactly as above. */
869
+ @media (width < 40rem) {
870
+ .sv-table--stack .sv-table__head {
871
+ position: absolute;
872
+ width: 1px;
873
+ height: 1px;
874
+ overflow: hidden;
875
+ clip-path: inset(50%);
876
+ white-space: nowrap;
877
+ }
878
+ .sv-table--stack,
879
+ .sv-table--stack .sv-table__body,
880
+ .sv-table--stack .sv-table__foot {
881
+ display: block;
882
+ }
883
+ .sv-table--stack .sv-table__row {
884
+ display: block;
885
+ padding: var(--sv-space-2) 0;
886
+ }
887
+ /* A labelled cell is a two-column grid: the label (::before) in the first
888
+ column, every child of the cell in the second, one per row. The label is
889
+ in flow, so a label that wraps grows the cell instead of overlapping the
890
+ next one. !important on the geometry only: consumers put padding and
891
+ text-align utilities on cells for the desktop table, and utilities outrank
892
+ this package's layer. */
893
+ .sv-table--stack .sv-table__td {
894
+ display: block;
895
+ padding: var(--sv-space-1) var(--sv-space-3) !important;
896
+ text-align: start !important;
897
+ overflow-wrap: anywhere;
898
+ }
899
+ .sv-table--stack .sv-table__td[data-label] {
900
+ display: grid;
901
+ grid-template-columns: minmax(0, 35%) minmax(0, 1fr);
902
+ column-gap: var(--sv-space-3);
903
+ align-items: baseline;
904
+ }
905
+ .sv-table--stack .sv-table__td[data-label] > * {
906
+ grid-column: 2;
907
+ }
908
+ .sv-table--stack .sv-table__td[data-label]::before {
909
+ content: attr(data-label);
910
+ grid-column: 1;
911
+ grid-row: 1;
912
+ font-size: var(--sv-text-xs);
913
+ text-transform: uppercase;
914
+ letter-spacing: 0.04em;
915
+ font-weight: 600;
916
+ color: var(--sv-text-3);
917
+ }
918
+ }
856
919
 
857
920
  /* ---------- Button ---------- */
858
921
  /* Default variant/size need no modifier class — .sv-btn alone is a complete,
@@ -960,6 +1023,24 @@ body.sv-body {
960
1023
  padding: 0;
961
1024
  }
962
1025
 
1026
+ /* ---------- Touch targets ---------- */
1027
+ /* On a narrow or touch viewport every button and field reaches
1028
+ 44x44px (WCAG 2.5.5). Pointer-fine desktop keeps the heights above. */
1029
+ @media (width < 40rem), (pointer: coarse) {
1030
+ .sv-btn,
1031
+ .sv-field {
1032
+ min-height: calc(var(--sv-space-10) + var(--sv-space-1));
1033
+ }
1034
+ .sv-btn {
1035
+ min-width: calc(var(--sv-space-10) + var(--sv-space-1));
1036
+ }
1037
+ /* A checkbox stays its drawn size; the label wrapping it is the target, since
1038
+ tapping the label toggles the input. */
1039
+ label:has(> .sv-check) {
1040
+ min-height: calc(var(--sv-space-10) + var(--sv-space-1));
1041
+ }
1042
+ }
1043
+
963
1044
  /* ---------- Card ---------- */
964
1045
  .sv-card {
965
1046
  border: 1px solid var(--sv-border);
@@ -1490,12 +1571,34 @@ body.sv-body {
1490
1571
  }
1491
1572
  .sv-tabs__content {
1492
1573
  margin-top: var(--sv-space-2);
1574
+ /* The root aligns flex-start so the list keeps its content width; the panel
1575
+ must still fill the container, or a form inside it shrinks to min-content. */
1576
+ align-self: stretch;
1493
1577
  }
1494
1578
  .sv-tabs__content:focus-visible {
1495
1579
  outline: 2px solid var(--sv-accent-ink);
1496
1580
  outline-offset: 2px;
1497
1581
  }
1498
1582
 
1583
+ /* ---------- Tabs touch ---------- */
1584
+ /* Triggers reach 44px and a strip wider than the viewport scrolls inside
1585
+ itself instead of widening the page. Declared after the base rules above so
1586
+ the list's height override wins at equal specificity. */
1587
+ @media (width < 40rem), (pointer: coarse) {
1588
+ .sv-tabs__list {
1589
+ height: auto;
1590
+ max-width: 100%;
1591
+ overflow-x: auto;
1592
+ /* Centered content that overflows spills to the left, where it cannot be
1593
+ scrolled to; start-aligned keeps the first trigger reachable. */
1594
+ justify-content: flex-start;
1595
+ }
1596
+ .sv-tabs__trigger {
1597
+ min-height: calc(var(--sv-space-10) + var(--sv-space-1));
1598
+ min-width: calc(var(--sv-space-10) + var(--sv-space-1));
1599
+ }
1600
+ }
1601
+
1499
1602
  /* ---------- Separator ---------- */
1500
1603
  /* A hairline in the flat sense (Elevation section, DESIGN.md): a 1px slab of
1501
1604
  the same border color the rest of the system uses, never a shadow. Sizing
@@ -1607,6 +1710,15 @@ body.sv-body {
1607
1710
  color: var(--sv-text-3);
1608
1711
  }
1609
1712
 
1713
+ /* ---------- Pagination touch ---------- */
1714
+ /* Page links and "load more" reach 44x44px on narrow or touch viewports. */
1715
+ @media (width < 40rem), (pointer: coarse) {
1716
+ .sv-pagination__link {
1717
+ min-height: calc(var(--sv-space-10) + var(--sv-space-1));
1718
+ min-width: calc(var(--sv-space-10) + var(--sv-space-1));
1719
+ }
1720
+ }
1721
+
1610
1722
  /* ---------- Chart ---------- */
1611
1723
  /* Visual geometry only — no scale engine, see design.md. `overflow: visible`
1612
1724
  is the one non-default here: an axis label sitting exactly at the SVG's
package/dist/theme.css CHANGED
@@ -124,16 +124,16 @@
124
124
  /* WCAG AA fix: the dark-mode accent hues read 1.8–2.6:1 as text on light
125
125
  surfaces. Darkened per-hue steps restore ≥4.5:1 without touching the
126
126
  canonical (dark-mode, surface-use) accent values above. */
127
- --sv-accent-cyan-ink: oklch(0.525 0.09 210);
128
- --sv-accent-violet-ink: oklch(0.545 0.14 295);
129
- --sv-accent-mint-ink: oklch(0.52 0.1 160);
130
- --sv-accent-amber-ink: oklch(0.535 0.11 75);
127
+ --sv-accent-cyan-ink: oklch(0.515 0.09 210);
128
+ --sv-accent-violet-ink: oklch(0.535 0.14 295);
129
+ --sv-accent-mint-ink: oklch(0.515 0.1 160);
130
+ --sv-accent-amber-ink: oklch(0.53 0.11 75);
131
131
 
132
132
  /* Same WCAG AA fix, applied to the semantic state colors. */
133
- --sv-danger-ink: oklch(0.555 0.19 25);
134
- --sv-success-ink: oklch(0.515 0.14 150);
135
- --sv-info-ink: oklch(0.525 0.09 210);
136
- --sv-warning-ink: oklch(0.535 0.11 75);
133
+ --sv-danger-ink: oklch(0.535 0.19 25);
134
+ --sv-success-ink: oklch(0.51 0.14 150);
135
+ --sv-info-ink: oklch(0.515 0.09 210);
136
+ --sv-warning-ink: oklch(0.53 0.11 75);
137
137
  }
138
138
 
139
139
  /* Accent switching is pure CSS — works in Server Components. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@still-void/ui",
3
- "version": "3.3.1",
3
+ "version": "3.4.1",
4
4
  "description": "Still Void design system — React/Next.js design system with a server-safe entry and a client-only entry, built on shadcn/ui.",
5
5
  "license": "MIT",
6
6
  "author": "Kalleo Pinheiro",