@still-void/ui 3.2.0 → 3.3.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
@@ -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 —
@@ -1585,6 +1639,290 @@ body.sv-body {
1585
1639
  shape-rendering: crispEdges;
1586
1640
  }
1587
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` carries no typography of its own — it's a bare
1694
+ hook for the collapsed-state hiding rule below, and content it wraps is
1695
+ always something else's text (a nav link, a heading) that already owns
1696
+ its own font. A Sora/text-lg/600 default shipped here in v3.3.0 fought
1697
+ whatever it wrapped and broke the Sparse-Display Rule (DESIGN.md §3:
1698
+ Sora never sets label text) the moment a consumer used it on ordinary
1699
+ nav-item copy, as the App Sidebar story did. */
1700
+
1701
+ .sv-app-sidebar-inset {
1702
+ flex: 1;
1703
+ /* Without this a flex item's default `min-width: auto` lets its content
1704
+ (e.g. a wide table) push it wider than the row, shrinking the sidebar
1705
+ instead of scrolling internally. */
1706
+ min-width: 0;
1707
+ overflow: auto;
1708
+ }
1709
+
1710
+ .sv-app-sidebar-trigger {
1711
+ display: inline-flex;
1712
+ align-items: center;
1713
+ justify-content: center;
1714
+ padding: var(--sv-space-2);
1715
+ border: 1px solid transparent;
1716
+ border-radius: var(--sv-radius-sm);
1717
+ background: none;
1718
+ color: var(--sv-text-2);
1719
+ cursor: pointer;
1720
+ transition: background var(--sv-duration-fast) var(--sv-ease-hover),
1721
+ color var(--sv-duration-fast) var(--sv-ease-hover);
1722
+ }
1723
+
1724
+ .sv-app-sidebar-trigger:hover {
1725
+ background: var(--sv-surface-2);
1726
+ color: var(--sv-text);
1727
+ }
1728
+
1729
+ .sv-app-sidebar-trigger:focus-visible {
1730
+ outline: 2px solid var(--sv-accent-ink);
1731
+ outline-offset: 2px;
1732
+ }
1733
+
1734
+ /* R5-03: collapsible="icon" mode — `open` toggles rail width vs. full width,
1735
+ the same way `offcanvas` toggles visible vs. hidden. Both rules below key
1736
+ off data-state="closed" *together with* data-collapsible="icon" — without
1737
+ that, a collapsed-width rail would also apply while `open` (the expanded,
1738
+ labels-visible state), which is the opposite of what "collapsible" means
1739
+ here. .sv-app-shell carries data-state from SidebarProvider's own `open`. */
1740
+ .sv-app-shell[data-collapsible='icon'][data-state='closed'] .sv-app-sidebar:not(.sv-app-sidebar__drawer) {
1741
+ width: var(--sv-space-14);
1742
+ }
1743
+
1744
+ /* Hide text labels only in the collapsed (closed) state; keep them
1745
+ accessible to screen readers via the sr-only pattern rather than
1746
+ removing them, since the icon alone is not a reliable label. */
1747
+ .sv-app-shell[data-collapsible='icon'][data-state='closed'] .sv-app-sidebar__label {
1748
+ position: absolute;
1749
+ width: 1px;
1750
+ height: 1px;
1751
+ overflow: hidden;
1752
+ clip-path: inset(50%);
1753
+ white-space: nowrap;
1754
+ }
1755
+
1756
+ /* ---------- Toast ---------- */
1757
+ /* Toast viewport container (region role). The Radix primitive renders the
1758
+ list here; our wrapper manages the queue. */
1759
+ .sv-toast__viewport {
1760
+ position: fixed;
1761
+ bottom: var(--sv-space-4);
1762
+ right: var(--sv-space-4);
1763
+ display: flex;
1764
+ flex-direction: column;
1765
+ gap: var(--sv-space-3);
1766
+ pointer-events: none;
1767
+ z-index: var(--sv-z-toast);
1768
+ max-width: calc(100vw - var(--sv-space-8));
1769
+ }
1770
+
1771
+ /* Individual toast item */
1772
+ .sv-toast {
1773
+ display: flex;
1774
+ align-items: flex-start;
1775
+ gap: var(--sv-space-3);
1776
+ padding: var(--sv-space-3) var(--sv-space-4);
1777
+ border: 1px solid var(--sv-border);
1778
+ border-radius: var(--sv-radius-md);
1779
+ background: var(--sv-surface);
1780
+ color: var(--sv-text);
1781
+ pointer-events: auto;
1782
+ animation: sv-toast-enter var(--sv-duration-fast) var(--sv-ease-hover);
1783
+ }
1784
+ .sv-toast[data-state="closed"] {
1785
+ animation: sv-toast-exit var(--sv-duration-fast) var(--sv-ease-hover);
1786
+ }
1787
+
1788
+ @keyframes sv-toast-enter {
1789
+ from {
1790
+ opacity: 0;
1791
+ }
1792
+ to {
1793
+ opacity: 1;
1794
+ }
1795
+ }
1796
+
1797
+ @keyframes sv-toast-exit {
1798
+ from {
1799
+ opacity: 1;
1800
+ }
1801
+ to {
1802
+ opacity: 0;
1803
+ }
1804
+ }
1805
+
1806
+ /* Icon */
1807
+ .sv-toast__icon {
1808
+ flex-shrink: 0;
1809
+ margin-top: 2px;
1810
+ }
1811
+
1812
+ /* Content wrapper */
1813
+ .sv-toast__content {
1814
+ flex: 1;
1815
+ min-width: 0;
1816
+ }
1817
+
1818
+ /* Title */
1819
+ .sv-toast__title {
1820
+ margin: 0 0 var(--sv-space-1);
1821
+ font-weight: 500;
1822
+ line-height: 1.25;
1823
+ letter-spacing: -0.025em;
1824
+ color: var(--sv-text);
1825
+ }
1826
+
1827
+ /* Description */
1828
+ .sv-toast__description {
1829
+ font-size: var(--sv-text-sm);
1830
+ color: var(--sv-text-2);
1831
+ line-height: 1.5;
1832
+ }
1833
+
1834
+ /* Variant colors (info, success, warning, danger) */
1835
+ .sv-toast--info .sv-toast__icon {
1836
+ color: var(--sv-info-ink);
1837
+ }
1838
+ .sv-toast--info .sv-toast__title {
1839
+ color: var(--sv-info-ink);
1840
+ }
1841
+ .sv-toast--info {
1842
+ border-color: var(--sv-info-ink);
1843
+ }
1844
+
1845
+ .sv-toast--success .sv-toast__icon {
1846
+ color: var(--sv-success-ink);
1847
+ }
1848
+ .sv-toast--success .sv-toast__title {
1849
+ color: var(--sv-success-ink);
1850
+ }
1851
+ .sv-toast--success {
1852
+ border-color: var(--sv-success-ink);
1853
+ }
1854
+
1855
+ .sv-toast--warning .sv-toast__icon {
1856
+ color: var(--sv-warning-ink);
1857
+ }
1858
+ .sv-toast--warning .sv-toast__title {
1859
+ color: var(--sv-warning-ink);
1860
+ }
1861
+ .sv-toast--warning {
1862
+ border-color: var(--sv-warning-ink);
1863
+ }
1864
+
1865
+ .sv-toast--danger .sv-toast__icon {
1866
+ color: var(--sv-danger-ink);
1867
+ }
1868
+ .sv-toast--danger .sv-toast__title {
1869
+ color: var(--sv-danger-ink);
1870
+ }
1871
+ .sv-toast--danger {
1872
+ border-color: var(--sv-danger-ink);
1873
+ }
1874
+
1875
+ /* Actions container */
1876
+ .sv-toast__actions {
1877
+ display: flex;
1878
+ gap: var(--sv-space-2);
1879
+ flex-shrink: 0;
1880
+ align-items: center;
1881
+ }
1882
+
1883
+ /* Action button */
1884
+ .sv-toast__action {
1885
+ padding: var(--sv-space-2) var(--sv-space-3);
1886
+ border: 1px solid var(--sv-border);
1887
+ border-radius: var(--sv-radius-md);
1888
+ background: var(--sv-surface-2);
1889
+ color: var(--sv-text);
1890
+ font-size: var(--sv-text-sm);
1891
+ font-weight: 500;
1892
+ cursor: pointer;
1893
+ transition: background var(--sv-duration-fast) var(--sv-ease-hover);
1894
+ }
1895
+ .sv-toast__action:hover {
1896
+ /* --sv-surface-3 does not exist (2-tier system only). Same base/hover
1897
+ pair as .sv-btn--secondary, which shares this button's surface-2 base. */
1898
+ background: var(--sv-surface);
1899
+ }
1900
+ .sv-toast__action:focus-visible {
1901
+ outline: 2px solid var(--sv-accent-ink);
1902
+ outline-offset: 2px;
1903
+ }
1904
+
1905
+ /* Close button */
1906
+ .sv-toast__close {
1907
+ padding: 0;
1908
+ border: none;
1909
+ background: transparent;
1910
+ color: var(--sv-text-2);
1911
+ cursor: pointer;
1912
+ display: flex;
1913
+ align-items: center;
1914
+ justify-content: center;
1915
+ flex-shrink: 0;
1916
+ transition: color var(--sv-duration-fast) var(--sv-ease-hover);
1917
+ }
1918
+ .sv-toast__close:hover {
1919
+ color: var(--sv-text);
1920
+ }
1921
+ .sv-toast__close:focus-visible {
1922
+ outline: 2px solid var(--sv-accent-ink);
1923
+ outline-offset: 2px;
1924
+ }
1925
+
1588
1926
  /* ---------- Reduced motion ---------- */
1589
1927
  /* This block lives here, at the end of style.css, and not in theme.css, for a
1590
1928
  cascade reason: `@media` adds no specificity, and README documents the
@@ -1624,7 +1962,12 @@ body.sv-body {
1624
1962
  all — the closed panel never has a chance to snap into view. */
1625
1963
  .sv-overlay,
1626
1964
  .sv-dialog,
1627
- .sv-pop {
1965
+ .sv-pop,
1966
+ .sv-app-sidebar,
1967
+ .sv-toast {
1628
1968
  animation: none;
1629
1969
  }
1970
+ .sv-app-sidebar-trigger {
1971
+ transition: none;
1972
+ }
1630
1973
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@still-void/ui",
3
- "version": "3.2.0",
3
+ "version": "3.3.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",
@@ -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"