@still-void/ui 3.4.1 → 3.5.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
@@ -667,7 +667,7 @@ body.sv-body {
667
667
  width: 100%;
668
668
  height: var(--sv-space-10);
669
669
  padding: var(--sv-space-2) var(--sv-space-3);
670
- border: 1px solid var(--sv-border);
670
+ border: 1px solid var(--sv-control-border);
671
671
  border-radius: var(--sv-radius-sm);
672
672
  background: var(--sv-surface);
673
673
  color: var(--sv-text);
@@ -1024,9 +1024,10 @@ body.sv-body {
1024
1024
  }
1025
1025
 
1026
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) {
1027
+ /* Below 64rem (tablet) or on a coarse primary pointer every button and field
1028
+ reaches 44x44px (WCAG 2.5.5). A fine pointer on a wide window keeps the
1029
+ heights above. */
1030
+ @media (width < 64rem), (pointer: coarse) {
1030
1031
  .sv-btn,
1031
1032
  .sv-field {
1032
1033
  min-height: calc(var(--sv-space-10) + var(--sv-space-1));
@@ -1036,9 +1037,27 @@ body.sv-body {
1036
1037
  }
1037
1038
  /* A checkbox stays its drawn size; the label wrapping it is the target, since
1038
1039
  tapping the label toggles the input. */
1039
- label:has(> .sv-check) {
1040
+ label:has(> .sv-check),
1041
+ label:has(> .sv-radio),
1042
+ .sv-choice {
1040
1043
  min-height: calc(var(--sv-space-10) + var(--sv-space-1));
1041
1044
  }
1045
+ /* Bare icon controls keep their drawn size; an invisible 44x44px pseudo-element
1046
+ centred on the control extends the hit area without moving the icon. */
1047
+ .sv-dialog__close::after,
1048
+ .sv-toast__close::after,
1049
+ .sv-app-sidebar-trigger::after {
1050
+ content: '';
1051
+ position: absolute;
1052
+ top: 50%;
1053
+ left: 50%;
1054
+ width: calc(var(--sv-space-10) + var(--sv-space-1));
1055
+ height: calc(var(--sv-space-10) + var(--sv-space-1));
1056
+ transform: translate(-50%, -50%);
1057
+ }
1058
+ .sv-toast__close {
1059
+ position: relative;
1060
+ }
1042
1061
  }
1043
1062
 
1044
1063
  /* ---------- Card ---------- */
@@ -1347,6 +1366,98 @@ body.sv-body {
1347
1366
  outline-offset: 2px;
1348
1367
  }
1349
1368
 
1369
+ /* ---------- Bottom sheet ---------- */
1370
+ /* The mobile counterpart of Dialog: anchored to the bottom edge, full width,
1371
+ rounded only on top. Same surface/border language as .sv-dialog -- no shadow.
1372
+ Height is capped at 90dvh so the overlay stays visible and tappable; the
1373
+ content scrolls inside .sv-sheet__body. The bottom padding adds the device
1374
+ safe area so actions never sit under the home indicator. */
1375
+ .sv-sheet {
1376
+ position: fixed;
1377
+ left: 0;
1378
+ right: 0;
1379
+ bottom: 0;
1380
+ z-index: var(--sv-z-modal);
1381
+ display: flex;
1382
+ flex-direction: column;
1383
+ gap: var(--sv-space-4);
1384
+ max-height: 90dvh;
1385
+ padding: var(--sv-space-2) var(--sv-space-4) calc(var(--sv-space-4) + env(safe-area-inset-bottom, 0px));
1386
+ border: 1px solid var(--sv-border);
1387
+ border-bottom: none;
1388
+ border-radius: var(--sv-radius-xl) var(--sv-radius-xl) 0 0;
1389
+ background: var(--sv-surface);
1390
+ color: var(--sv-text);
1391
+ transform: translateY(var(--sv-sheet-drag, 0px));
1392
+ }
1393
+ .sv-sheet[data-state='open'] {
1394
+ animation: sv-sheet-in var(--sv-duration-base) var(--sv-ease-hover);
1395
+ }
1396
+ .sv-sheet[data-state='closed'] {
1397
+ animation: sv-sheet-out var(--sv-duration-base) var(--sv-ease-hover);
1398
+ }
1399
+ .sv-sheet[data-dragging='true'] {
1400
+ animation: none;
1401
+ user-select: none;
1402
+ }
1403
+ /* The grab area is 24px tall (WCAG 2.5.8 minimum target); the visible bar is the
1404
+ pseudo-element. touch-action: none keeps the page from scrolling mid-drag. */
1405
+ .sv-sheet__handle {
1406
+ display: flex;
1407
+ align-items: center;
1408
+ justify-content: center;
1409
+ align-self: stretch;
1410
+ flex: none;
1411
+ height: var(--sv-space-6);
1412
+ margin-inline: calc(var(--sv-space-4) * -1);
1413
+ }
1414
+ .sv-sheet__handle[data-draggable='true'] {
1415
+ touch-action: none;
1416
+ cursor: grab;
1417
+ }
1418
+ .sv-sheet__handle::before {
1419
+ content: '';
1420
+ width: var(--sv-space-10);
1421
+ height: var(--sv-space-1);
1422
+ border-radius: var(--sv-radius-full);
1423
+ background: var(--sv-control-border);
1424
+ }
1425
+ .sv-sheet__close {
1426
+ position: absolute;
1427
+ top: var(--sv-space-2);
1428
+ right: var(--sv-space-2);
1429
+ }
1430
+ .sv-sheet__header {
1431
+ display: flex;
1432
+ flex-direction: column;
1433
+ gap: var(--sv-space-1);
1434
+ padding-right: var(--sv-space-18);
1435
+ }
1436
+ .sv-sheet__body {
1437
+ flex: 1 1 auto;
1438
+ min-height: 0;
1439
+ overflow-y: auto;
1440
+ overscroll-behavior: contain;
1441
+ }
1442
+ .sv-sheet__footer {
1443
+ display: flex;
1444
+ flex-direction: row;
1445
+ justify-content: flex-end;
1446
+ gap: var(--sv-space-2);
1447
+ }
1448
+ .sv-sheet__title {
1449
+ font-family: var(--sv-font-display);
1450
+ font-size: var(--sv-text-lg);
1451
+ font-weight: 600;
1452
+ line-height: 1.2;
1453
+ color: var(--sv-text);
1454
+ }
1455
+ .sv-sheet__description {
1456
+ font-size: var(--sv-text-sm);
1457
+ line-height: 1.5;
1458
+ color: var(--sv-text-2);
1459
+ }
1460
+
1350
1461
  /* ---------- Popovers ---------- */
1351
1462
  /* One floating surface for the SelectContent, the DropdownMenuContent and the
1352
1463
  TooltipContent. They were three near-identical utility strings before, which
@@ -1584,7 +1695,7 @@ body.sv-body {
1584
1695
  /* Triggers reach 44px and a strip wider than the viewport scrolls inside
1585
1696
  itself instead of widening the page. Declared after the base rules above so
1586
1697
  the list's height override wins at equal specificity. */
1587
- @media (width < 40rem), (pointer: coarse) {
1698
+ @media (width < 64rem), (pointer: coarse) {
1588
1699
  .sv-tabs__list {
1589
1700
  height: auto;
1590
1701
  max-width: 100%;
@@ -1712,7 +1823,7 @@ body.sv-body {
1712
1823
 
1713
1824
  /* ---------- Pagination touch ---------- */
1714
1825
  /* Page links and "load more" reach 44x44px on narrow or touch viewports. */
1715
- @media (width < 40rem), (pointer: coarse) {
1826
+ @media (width < 64rem), (pointer: coarse) {
1716
1827
  .sv-pagination__link {
1717
1828
  min-height: calc(var(--sv-space-10) + var(--sv-space-1));
1718
1829
  min-width: calc(var(--sv-space-10) + var(--sv-space-1));
@@ -1820,6 +1931,7 @@ body.sv-body {
1820
1931
  }
1821
1932
 
1822
1933
  .sv-app-sidebar-trigger {
1934
+ position: relative;
1823
1935
  display: inline-flex;
1824
1936
  align-items: center;
1825
1937
  justify-content: center;
@@ -2074,6 +2186,7 @@ body.sv-body {
2074
2186
  all — the closed panel never has a chance to snap into view. */
2075
2187
  .sv-overlay,
2076
2188
  .sv-dialog,
2189
+ .sv-sheet,
2077
2190
  .sv-pop,
2078
2191
  .sv-app-sidebar,
2079
2192
  .sv-toast {
package/dist/tailwind.css CHANGED
@@ -39,6 +39,7 @@
39
39
  --color-sv-surface-2: var(--sv-surface-2);
40
40
  --color-sv-border: var(--sv-border);
41
41
  --color-sv-border-strong: var(--sv-border-strong);
42
+ --color-sv-control-border: var(--sv-control-border);
42
43
  --color-sv-text: var(--sv-text);
43
44
  --color-sv-text-2: var(--sv-text-2);
44
45
  --color-sv-text-3: var(--sv-text-3);
package/dist/theme.css CHANGED
@@ -22,6 +22,8 @@
22
22
  --sv-surface-2: #1c1c22;
23
23
  --sv-border: rgba(255, 255, 255, 0.08);
24
24
  --sv-border-strong: rgba(255, 255, 255, 0.14);
25
+ /* WCAG 1.4.11: ≥3:1 on every surface, for the edge of form controls. */
26
+ --sv-control-border: #6b6b76;
25
27
  --sv-text: #ededf0;
26
28
  --sv-text-2: #8b8b96;
27
29
  /* WCAG AA fix: was #5a5a66 (~2.6:1 on surface) — text3 carries real copy, not decoration. */
@@ -114,6 +116,7 @@
114
116
  --sv-surface-2: #f2f2ef;
115
117
  --sv-border: rgba(0, 0, 0, 0.08);
116
118
  --sv-border-strong: rgba(0, 0, 0, 0.14);
119
+ --sv-control-border: #85858e;
117
120
  --sv-text: #16161b;
118
121
  --sv-text-2: #5a5a66;
119
122
  /* WCAG AA fix: was #8b8b96 (~3.1:1 on white). #6f6f78 (a first fix) cleared
@@ -236,6 +239,24 @@
236
239
  a flat, non-recursive selector-body regex in the CSS contract tests, which
237
240
  cannot handle a rule with nested braces — the same reason
238
241
  `sv-skeleton-shimmer` above lives here instead of next to `.sv-skeleton`. */
242
+ /* Bottom sheet slide. `from`/`to` honour --sv-sheet-drag so a sheet released
243
+ mid-drag leaves from where the finger let go instead of snapping back. */
244
+ @keyframes sv-sheet-in {
245
+ from {
246
+ transform: translateY(100%);
247
+ }
248
+ to {
249
+ transform: translateY(var(--sv-sheet-drag, 0px));
250
+ }
251
+ }
252
+ @keyframes sv-sheet-out {
253
+ from {
254
+ transform: translateY(var(--sv-sheet-drag, 0px));
255
+ }
256
+ to {
257
+ transform: translateY(100%);
258
+ }
259
+ }
239
260
  @keyframes sv-fade-in {
240
261
  from {
241
262
  opacity: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@still-void/ui",
3
- "version": "3.4.1",
3
+ "version": "3.5.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",