@still-void/ui 3.1.0 → 3.3.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/dist/style.css CHANGED
@@ -1029,6 +1029,60 @@ body.sv-body {
1029
1029
  line-height: 1.625;
1030
1030
  }
1031
1031
 
1032
+ /* Semantic variants (T1, R5-09) */
1033
+ .sv-alert--info {
1034
+ --sv-alert-color: var(--sv-info-ink);
1035
+
1036
+ border-color: var(--sv-alert-color);
1037
+ }
1038
+ .sv-alert--info > svg {
1039
+ color: var(--sv-alert-color);
1040
+ }
1041
+ .sv-alert--info .sv-alert__title {
1042
+ color: var(--sv-alert-color);
1043
+ }
1044
+
1045
+ .sv-alert--success {
1046
+ --sv-alert-color: var(--sv-success-ink);
1047
+
1048
+ border-color: var(--sv-alert-color);
1049
+ }
1050
+ .sv-alert--success > svg {
1051
+ color: var(--sv-alert-color);
1052
+ }
1053
+ .sv-alert--success .sv-alert__title {
1054
+ color: var(--sv-alert-color);
1055
+ }
1056
+
1057
+ .sv-alert--warning {
1058
+ --sv-alert-color: var(--sv-warning-ink);
1059
+
1060
+ border-color: var(--sv-alert-color);
1061
+ }
1062
+ .sv-alert--warning > svg {
1063
+ color: var(--sv-alert-color);
1064
+ }
1065
+ .sv-alert--warning .sv-alert__title {
1066
+ color: var(--sv-alert-color);
1067
+ }
1068
+
1069
+ .sv-alert--danger {
1070
+ --sv-alert-color: var(--sv-danger-ink);
1071
+
1072
+ border-color: var(--sv-alert-color);
1073
+ }
1074
+ .sv-alert--danger > svg {
1075
+ color: var(--sv-alert-color);
1076
+ }
1077
+ .sv-alert--danger .sv-alert__title {
1078
+ color: var(--sv-alert-color);
1079
+ }
1080
+
1081
+ /* Action slot (T2, R5-10) */
1082
+ .sv-alert__action {
1083
+ margin-top: var(--sv-space-3);
1084
+ }
1085
+
1032
1086
  /* ---------- Badge ---------- */
1033
1087
  /* Default variant uses var(--sv-accent) rather than a fixed hue, so the
1034
1088
  badge follows [data-accent] instead of locking to cyan (One-Accent Rule —
@@ -1442,6 +1496,432 @@ body.sv-body {
1442
1496
  outline-offset: 2px;
1443
1497
  }
1444
1498
 
1499
+ /* ---------- Separator ---------- */
1500
+ /* A hairline in the flat sense (Elevation section, DESIGN.md): a 1px slab of
1501
+ the same border color the rest of the system uses, never a shadow. Sizing
1502
+ is opposite on each axis by design — horizontal fills the inline
1503
+ direction and is a fixed 1px tall; vertical fills the block direction
1504
+ (the parent must give it a height) and is a fixed 1px wide. */
1505
+ .sv-separator {
1506
+ flex-shrink: 0;
1507
+ background: var(--sv-border);
1508
+ height: 1px;
1509
+ width: 100%;
1510
+ }
1511
+ .sv-separator--vertical {
1512
+ height: 100%;
1513
+ width: 1px;
1514
+ }
1515
+
1516
+ /* ---------- Progress ---------- */
1517
+ /* A track and a fill, same tonal pair the rest of the system uses for a
1518
+ surface-on-surface relationship: Surface 2 (one step up from Void) under
1519
+ the accent fill, never a shadow to suggest depth. The indicator's width is
1520
+ the one value in this component that cannot come from a token — it is
1521
+ `value`/`max` at render time — so it is the sole inline `style` in the
1522
+ server-safe catalog. */
1523
+ .sv-progress {
1524
+ position: relative;
1525
+ overflow: hidden;
1526
+ width: 100%;
1527
+ height: var(--sv-space-2);
1528
+ border-radius: var(--sv-radius-full);
1529
+ background: var(--sv-surface-2);
1530
+ }
1531
+ .sv-progress__indicator {
1532
+ height: 100%;
1533
+ background: var(--sv-accent);
1534
+ border-radius: var(--sv-radius-full);
1535
+ transition: width var(--sv-duration-fast) var(--sv-ease-hover);
1536
+ }
1537
+
1538
+ /* ---------- Pagination ---------- */
1539
+ /* A row of pill-shaped controls, same border/radius/surface vocabulary as
1540
+ the rest of the catalog — no shadow, one active state (Accent), one hover
1541
+ state (Surface 2). PaginationLink is deliberately NOT built on `.sv-btn`:
1542
+ it needs the active/current styling `.sv-btn` has no variant for, and
1543
+ reusing it would drag button-specific states (disabled opacity, size
1544
+ scale) into a control this system's own doc doesn't ask for. */
1545
+ .sv-pagination {
1546
+ display: flex;
1547
+ width: 100%;
1548
+ justify-content: center;
1549
+ }
1550
+ .sv-pagination__content {
1551
+ display: flex;
1552
+ flex-direction: row;
1553
+ align-items: center;
1554
+ gap: var(--sv-space-1);
1555
+ list-style: none;
1556
+ margin: 0;
1557
+ padding: 0;
1558
+ }
1559
+ .sv-pagination__item {
1560
+ display: flex;
1561
+ }
1562
+ .sv-pagination__link {
1563
+ display: inline-flex;
1564
+ align-items: center;
1565
+ justify-content: center;
1566
+ gap: var(--sv-space-1);
1567
+ min-width: var(--sv-space-10);
1568
+ height: var(--sv-space-10);
1569
+ padding: 0 var(--sv-space-3);
1570
+ border: 1px solid transparent;
1571
+ border-radius: var(--sv-radius-sm);
1572
+ background: transparent;
1573
+ color: var(--sv-text-2);
1574
+ font-family: var(--sv-font-body);
1575
+ font-size: var(--sv-text-base);
1576
+ text-decoration: none;
1577
+ cursor: pointer;
1578
+ transition:
1579
+ background var(--sv-duration-fast) var(--sv-ease-hover),
1580
+ color var(--sv-duration-fast) var(--sv-ease-hover),
1581
+ border-color var(--sv-duration-fast) var(--sv-ease-hover);
1582
+ }
1583
+ .sv-pagination__link:hover {
1584
+ background: var(--sv-surface-2);
1585
+ color: var(--sv-text);
1586
+ }
1587
+ .sv-pagination__link:focus-visible {
1588
+ outline: 2px solid var(--sv-accent-ink);
1589
+ outline-offset: 2px;
1590
+ }
1591
+ .sv-pagination__link--active {
1592
+ border-color: var(--sv-border);
1593
+ background: var(--sv-surface);
1594
+ color: var(--sv-text);
1595
+ }
1596
+ .sv-pagination__link--previous,
1597
+ .sv-pagination__link--next {
1598
+ padding: 0 var(--sv-space-4);
1599
+ }
1600
+
1601
+ .sv-pagination__ellipsis {
1602
+ display: inline-flex;
1603
+ align-items: center;
1604
+ justify-content: center;
1605
+ min-width: var(--sv-space-10);
1606
+ height: var(--sv-space-10);
1607
+ color: var(--sv-text-3);
1608
+ }
1609
+
1610
+ /* ---------- Chart ---------- */
1611
+ /* Visual geometry only — no scale engine, see design.md. `overflow: visible`
1612
+ is the one non-default here: an axis label sitting exactly at the SVG's
1613
+ own edge (a common case — the last tick on a bottom axis) must not be
1614
+ clipped by the viewBox the way an ordinary <svg> would clip it. Series
1615
+ color (line stroke, bar fill) is a caller prop, not a class, because the
1616
+ three series tokens (--sv-accent-ink/--sv-info-ink/--sv-warning-ink) are
1617
+ assigned per-series by the consumer, not fixed by the primitive. */
1618
+ .sv-chart {
1619
+ overflow: visible;
1620
+ font-family: var(--sv-font-mono);
1621
+ }
1622
+ .sv-chart__grid-line {
1623
+ stroke: var(--sv-border);
1624
+ stroke-width: 1;
1625
+ }
1626
+ .sv-chart__axis {
1627
+ stroke: var(--sv-text-2);
1628
+ stroke-width: 1;
1629
+ }
1630
+ .sv-chart__axis-label {
1631
+ fill: var(--sv-text-2);
1632
+ font-size: var(--sv-text-xs);
1633
+ }
1634
+ .sv-chart__line {
1635
+ stroke-linecap: round;
1636
+ stroke-linejoin: round;
1637
+ }
1638
+ .sv-chart__bar {
1639
+ shape-rendering: crispEdges;
1640
+ }
1641
+
1642
+ /* ---------- App Sidebar ---------- */
1643
+ /* R5-02, R5-03, R5-04: Sidebar de aplicação responsiva.
1644
+ The wrapper (.sv-app-shell) carries data-state (open/closed), data-collapsible
1645
+ (offcanvas/icon/none), and data-mobile (true/false). The panel (.sv-app-sidebar)
1646
+ is static in-flow above the breakpoint, drawer in portal below. No box-shadow
1647
+ per Flat-By-Default Rule. Focus is outline (AD-005). Fade animation is driven
1648
+ by data-state with var(--sv-duration-fast) and var(--sv-ease-hover).
1649
+
1650
+ .sv-app-shell is the flex container that lays SidebarPanel (the <aside>)
1651
+ and SidebarInset (the <main>) side by side above the breakpoint — both are
1652
+ rendered as direct children of it (SidebarProvider wraps `children` in this
1653
+ one div). Below the breakpoint SidebarPanel renders into a portal instead
1654
+ (it's not a flex child at all in that mode), so the inset alone fills the
1655
+ row — AC R5-04.3 ("full width below the breakpoint") falls out of the flex
1656
+ layout for free, no separate rule needed. */
1657
+ .sv-app-shell {
1658
+ display: flex;
1659
+ align-items: stretch;
1660
+ }
1661
+
1662
+ .sv-app-sidebar {
1663
+ flex-shrink: 0;
1664
+ background: var(--sv-surface);
1665
+ color: var(--sv-text);
1666
+ border-right: 1px solid var(--sv-border);
1667
+ }
1668
+
1669
+ .sv-app-sidebar__drawer {
1670
+ position: fixed;
1671
+ inset: 0;
1672
+ z-index: var(--sv-z-modal);
1673
+ }
1674
+
1675
+ /* Dialog.Content animates via data-state=[open|closed] */
1676
+ .sv-app-sidebar[data-state='open'] {
1677
+ animation: sv-fade-in var(--sv-duration-fast) var(--sv-ease-hover);
1678
+ }
1679
+
1680
+ .sv-app-sidebar[data-state='closed'] {
1681
+ animation: sv-fade-out var(--sv-duration-fast) var(--sv-ease-hover);
1682
+ }
1683
+
1684
+ .sv-app-sidebar__body {
1685
+ display: flex;
1686
+ flex-direction: column;
1687
+ gap: var(--sv-space-6);
1688
+ padding: var(--sv-space-6);
1689
+ max-height: 100vh;
1690
+ overflow-y: auto;
1691
+ }
1692
+
1693
+ .sv-app-sidebar__label {
1694
+ font-family: var(--sv-font-display);
1695
+ font-size: var(--sv-text-lg);
1696
+ font-weight: 600;
1697
+ color: var(--sv-text);
1698
+ }
1699
+
1700
+ .sv-app-sidebar-inset {
1701
+ flex: 1;
1702
+ /* Without this a flex item's default `min-width: auto` lets its content
1703
+ (e.g. a wide table) push it wider than the row, shrinking the sidebar
1704
+ instead of scrolling internally. */
1705
+ min-width: 0;
1706
+ overflow: auto;
1707
+ }
1708
+
1709
+ .sv-app-sidebar-trigger {
1710
+ display: inline-flex;
1711
+ align-items: center;
1712
+ justify-content: center;
1713
+ padding: var(--sv-space-2);
1714
+ border: 1px solid transparent;
1715
+ border-radius: var(--sv-radius-sm);
1716
+ background: none;
1717
+ color: var(--sv-text-2);
1718
+ cursor: pointer;
1719
+ transition: background var(--sv-duration-fast) var(--sv-ease-hover),
1720
+ color var(--sv-duration-fast) var(--sv-ease-hover);
1721
+ }
1722
+
1723
+ .sv-app-sidebar-trigger:hover {
1724
+ background: var(--sv-surface-2);
1725
+ color: var(--sv-text);
1726
+ }
1727
+
1728
+ .sv-app-sidebar-trigger:focus-visible {
1729
+ outline: 2px solid var(--sv-accent-ink);
1730
+ outline-offset: 2px;
1731
+ }
1732
+
1733
+ /* R5-03: collapsible="icon" mode — `open` toggles rail width vs. full width,
1734
+ the same way `offcanvas` toggles visible vs. hidden. Both rules below key
1735
+ off data-state="closed" *together with* data-collapsible="icon" — without
1736
+ that, a collapsed-width rail would also apply while `open` (the expanded,
1737
+ labels-visible state), which is the opposite of what "collapsible" means
1738
+ here. .sv-app-shell carries data-state from SidebarProvider's own `open`. */
1739
+ .sv-app-shell[data-collapsible='icon'][data-state='closed'] .sv-app-sidebar:not(.sv-app-sidebar__drawer) {
1740
+ width: var(--sv-space-14);
1741
+ }
1742
+
1743
+ /* Hide text labels only in the collapsed (closed) state; keep them
1744
+ accessible to screen readers via the sr-only pattern rather than
1745
+ removing them, since the icon alone is not a reliable label. */
1746
+ .sv-app-shell[data-collapsible='icon'][data-state='closed'] .sv-app-sidebar__label {
1747
+ position: absolute;
1748
+ width: 1px;
1749
+ height: 1px;
1750
+ overflow: hidden;
1751
+ clip-path: inset(50%);
1752
+ white-space: nowrap;
1753
+ }
1754
+
1755
+ /* ---------- Toast ---------- */
1756
+ /* Toast viewport container (region role). The Radix primitive renders the
1757
+ list here; our wrapper manages the queue. */
1758
+ .sv-toast__viewport {
1759
+ position: fixed;
1760
+ bottom: var(--sv-space-4);
1761
+ right: var(--sv-space-4);
1762
+ display: flex;
1763
+ flex-direction: column;
1764
+ gap: var(--sv-space-3);
1765
+ pointer-events: none;
1766
+ z-index: var(--sv-z-toast);
1767
+ max-width: calc(100vw - var(--sv-space-8));
1768
+ }
1769
+
1770
+ /* Individual toast item */
1771
+ .sv-toast {
1772
+ display: flex;
1773
+ align-items: flex-start;
1774
+ gap: var(--sv-space-3);
1775
+ padding: var(--sv-space-3) var(--sv-space-4);
1776
+ border: 1px solid var(--sv-border);
1777
+ border-radius: var(--sv-radius-md);
1778
+ background: var(--sv-surface);
1779
+ color: var(--sv-text);
1780
+ pointer-events: auto;
1781
+ animation: sv-toast-enter var(--sv-duration-fast) var(--sv-ease-hover);
1782
+ }
1783
+ .sv-toast[data-state="closed"] {
1784
+ animation: sv-toast-exit var(--sv-duration-fast) var(--sv-ease-hover);
1785
+ }
1786
+
1787
+ @keyframes sv-toast-enter {
1788
+ from {
1789
+ opacity: 0;
1790
+ }
1791
+ to {
1792
+ opacity: 1;
1793
+ }
1794
+ }
1795
+
1796
+ @keyframes sv-toast-exit {
1797
+ from {
1798
+ opacity: 1;
1799
+ }
1800
+ to {
1801
+ opacity: 0;
1802
+ }
1803
+ }
1804
+
1805
+ /* Icon */
1806
+ .sv-toast__icon {
1807
+ flex-shrink: 0;
1808
+ margin-top: 2px;
1809
+ }
1810
+
1811
+ /* Content wrapper */
1812
+ .sv-toast__content {
1813
+ flex: 1;
1814
+ min-width: 0;
1815
+ }
1816
+
1817
+ /* Title */
1818
+ .sv-toast__title {
1819
+ margin: 0 0 var(--sv-space-1);
1820
+ font-weight: 500;
1821
+ line-height: 1.25;
1822
+ letter-spacing: -0.025em;
1823
+ color: var(--sv-text);
1824
+ }
1825
+
1826
+ /* Description */
1827
+ .sv-toast__description {
1828
+ font-size: var(--sv-text-sm);
1829
+ color: var(--sv-text-2);
1830
+ line-height: 1.5;
1831
+ }
1832
+
1833
+ /* Variant colors (info, success, warning, danger) */
1834
+ .sv-toast--info .sv-toast__icon {
1835
+ color: var(--sv-info-ink);
1836
+ }
1837
+ .sv-toast--info .sv-toast__title {
1838
+ color: var(--sv-info-ink);
1839
+ }
1840
+ .sv-toast--info {
1841
+ border-color: var(--sv-info-ink);
1842
+ }
1843
+
1844
+ .sv-toast--success .sv-toast__icon {
1845
+ color: var(--sv-success-ink);
1846
+ }
1847
+ .sv-toast--success .sv-toast__title {
1848
+ color: var(--sv-success-ink);
1849
+ }
1850
+ .sv-toast--success {
1851
+ border-color: var(--sv-success-ink);
1852
+ }
1853
+
1854
+ .sv-toast--warning .sv-toast__icon {
1855
+ color: var(--sv-warning-ink);
1856
+ }
1857
+ .sv-toast--warning .sv-toast__title {
1858
+ color: var(--sv-warning-ink);
1859
+ }
1860
+ .sv-toast--warning {
1861
+ border-color: var(--sv-warning-ink);
1862
+ }
1863
+
1864
+ .sv-toast--danger .sv-toast__icon {
1865
+ color: var(--sv-danger-ink);
1866
+ }
1867
+ .sv-toast--danger .sv-toast__title {
1868
+ color: var(--sv-danger-ink);
1869
+ }
1870
+ .sv-toast--danger {
1871
+ border-color: var(--sv-danger-ink);
1872
+ }
1873
+
1874
+ /* Actions container */
1875
+ .sv-toast__actions {
1876
+ display: flex;
1877
+ gap: var(--sv-space-2);
1878
+ flex-shrink: 0;
1879
+ align-items: center;
1880
+ }
1881
+
1882
+ /* Action button */
1883
+ .sv-toast__action {
1884
+ padding: var(--sv-space-2) var(--sv-space-3);
1885
+ border: 1px solid var(--sv-border);
1886
+ border-radius: var(--sv-radius-md);
1887
+ background: var(--sv-surface-2);
1888
+ color: var(--sv-text);
1889
+ font-size: var(--sv-text-sm);
1890
+ font-weight: 500;
1891
+ cursor: pointer;
1892
+ transition: background var(--sv-duration-fast) var(--sv-ease-hover);
1893
+ }
1894
+ .sv-toast__action:hover {
1895
+ /* --sv-surface-3 does not exist (2-tier system only). Same base/hover
1896
+ pair as .sv-btn--secondary, which shares this button's surface-2 base. */
1897
+ background: var(--sv-surface);
1898
+ }
1899
+ .sv-toast__action:focus-visible {
1900
+ outline: 2px solid var(--sv-accent-ink);
1901
+ outline-offset: 2px;
1902
+ }
1903
+
1904
+ /* Close button */
1905
+ .sv-toast__close {
1906
+ padding: 0;
1907
+ border: none;
1908
+ background: transparent;
1909
+ color: var(--sv-text-2);
1910
+ cursor: pointer;
1911
+ display: flex;
1912
+ align-items: center;
1913
+ justify-content: center;
1914
+ flex-shrink: 0;
1915
+ transition: color var(--sv-duration-fast) var(--sv-ease-hover);
1916
+ }
1917
+ .sv-toast__close:hover {
1918
+ color: var(--sv-text);
1919
+ }
1920
+ .sv-toast__close:focus-visible {
1921
+ outline: 2px solid var(--sv-accent-ink);
1922
+ outline-offset: 2px;
1923
+ }
1924
+
1445
1925
  /* ---------- Reduced motion ---------- */
1446
1926
  /* This block lives here, at the end of style.css, and not in theme.css, for a
1447
1927
  cascade reason: `@media` adds no specificity, and README documents the
@@ -1467,7 +1947,9 @@ body.sv-body {
1467
1947
  .sv-badge,
1468
1948
  .sv-dialog__close,
1469
1949
  .sv-menu-item,
1470
- .sv-tabs__trigger {
1950
+ .sv-tabs__trigger,
1951
+ .sv-progress__indicator,
1952
+ .sv-pagination__link {
1471
1953
  transition: none;
1472
1954
  }
1473
1955
  /* AD-009 lets the portal family fade because open/closed carries state, but
@@ -1479,7 +1961,12 @@ body.sv-body {
1479
1961
  all — the closed panel never has a chance to snap into view. */
1480
1962
  .sv-overlay,
1481
1963
  .sv-dialog,
1482
- .sv-pop {
1964
+ .sv-pop,
1965
+ .sv-app-sidebar,
1966
+ .sv-toast {
1483
1967
  animation: none;
1484
1968
  }
1969
+ .sv-app-sidebar-trigger {
1970
+ transition: none;
1971
+ }
1485
1972
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@still-void/ui",
3
- "version": "3.1.0",
3
+ "version": "3.3.0",
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",
@@ -133,6 +133,7 @@
133
133
  "@radix-ui/react-primitive": "^2.1.10",
134
134
  "@radix-ui/react-select": "^2.3.7",
135
135
  "@radix-ui/react-tabs": "^1.1.21",
136
+ "@radix-ui/react-toast": "^1.2.23",
136
137
  "@radix-ui/react-tooltip": "^1.2.16",
137
138
  "clsx": "^2.1.1",
138
139
  "tailwind-merge": "^3.6.0"