@hirobius/design-system 0.20.0 → 0.22.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/AGENTS.md +125 -0
- package/CHANGELOG.md +969 -0
- package/CONSUMING.md +27 -11
- package/DESIGN.md +28 -17
- package/MIGRATIONS.md +603 -0
- package/NOTICE.md +1 -1
- package/README.md +39 -5
- package/UPGRADING.md +222 -0
- package/codemods/hds-prefix.mjs +28 -13
- package/codemods/jsx-fold.mjs +28 -13
- package/codemods/lib/atomic-write.mjs +28 -0
- package/codemods/lib/installed-version.mjs +354 -0
- package/codemods/lib/project.mjs +395 -0
- package/codemods/lib/record.mjs +110 -0
- package/codemods/lib/scan.mjs +323 -0
- package/codemods/lib/semver.mjs +57 -0
- package/codemods/not-found-pattern.mjs +3 -3
- package/codemods/patterns-subpath.mjs +28 -12
- package/codemods/registry.mjs +67 -0
- package/codemods/tile-grid.mjs +3 -3
- package/codemods/upgrade.mjs +909 -0
- package/dist/chunks/empty-state-DNoThgfV.js +1227 -0
- package/dist/chunks/form-By82qZcC.js +66 -0
- package/dist/fonts/geist-mono-400.woff2 +0 -0
- package/dist/fonts/satoshi-400.woff2 +0 -0
- package/dist/fonts/satoshi-500.woff2 +0 -0
- package/dist/fonts/satoshi-700.woff2 +0 -0
- package/dist/fonts.css +53 -0
- package/dist/form.js +1 -1
- package/dist/hirobius-ui.js +876 -877
- package/dist/manifest.js +3 -3
- package/dist/patterns.js +189 -170
- package/dist/styles.css +2 -2
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +136 -57
- package/dist/types/src/app/components/alert-dialog.d.ts +5 -0
- package/dist/types/src/app/components/alert.d.ts +1 -1
- package/dist/types/src/app/components/asset-img.d.ts +1 -0
- package/dist/types/src/app/components/avatar-group.d.ts +1 -0
- package/dist/types/src/app/components/avatar.d.ts +1 -1
- package/dist/types/src/app/components/badge.d.ts +2 -2
- package/dist/types/src/app/components/blockquote.d.ts +1 -0
- package/dist/types/src/app/components/breadcrumb.d.ts +1 -1
- package/dist/types/src/app/components/button.d.ts +3 -1
- package/dist/types/src/app/components/callout.d.ts +1 -1
- package/dist/types/src/app/components/card.d.ts +4 -3
- package/dist/types/src/app/components/checkbox.d.ts +1 -1
- package/dist/types/src/app/components/code-block.d.ts +1 -1
- package/dist/types/src/app/components/combobox.d.ts +1 -1
- package/dist/types/src/app/components/data-table-section.d.ts +1 -0
- package/dist/types/src/app/components/destructive-section.d.ts +1 -0
- package/dist/types/src/app/components/dialog.d.ts +2 -1
- package/dist/types/src/app/components/disclosure.d.ts +1 -1
- package/dist/types/src/app/components/divider.d.ts +1 -1
- package/dist/types/src/app/components/empty-state.d.ts +1 -1
- package/dist/types/src/app/components/error-pattern.d.ts +6 -1
- package/dist/types/src/app/components/field.d.ts +1 -1
- package/dist/types/src/app/components/form-actions.d.ts +1 -0
- package/dist/types/src/app/components/form-control.d.ts +10 -0
- package/dist/types/src/app/components/form.d.ts +1 -1
- package/dist/types/src/app/components/grid.d.ts +5 -0
- package/dist/types/src/app/components/hds-tooltip.d.ts +1 -1
- package/dist/types/src/app/components/icon.d.ts +1 -0
- package/dist/types/src/app/components/inline-link.d.ts +1 -1
- package/dist/types/src/app/components/input.d.ts +1 -1
- package/dist/types/src/app/components/kbd.d.ts +1 -0
- package/dist/types/src/app/components/menu.d.ts +1 -1
- package/dist/types/src/app/components/metadata-list.d.ts +1 -0
- package/dist/types/src/app/components/metric-tiles.d.ts +1 -0
- package/dist/types/src/app/components/pagination.d.ts +1 -1
- package/dist/types/src/app/components/popover.d.ts +1 -1
- package/dist/types/src/app/components/progress.d.ts +2 -2
- package/dist/types/src/app/components/radio.d.ts +1 -1
- package/dist/types/src/app/components/select.d.ts +1 -1
- package/dist/types/src/app/components/skeleton.d.ts +2 -2
- package/dist/types/src/app/components/slider.d.ts +1 -1
- package/dist/types/src/app/components/spinner.d.ts +1 -1
- package/dist/types/src/app/components/stat.d.ts +5 -4
- package/dist/types/src/app/components/status-list-item.d.ts +1 -1
- package/dist/types/src/app/components/status-tile.d.ts +4 -3
- package/dist/types/src/app/components/table.d.ts +6 -1
- package/dist/types/src/app/components/tabs.d.ts +1 -1
- package/dist/types/src/app/components/tag.d.ts +1 -1
- package/dist/types/src/app/components/text.d.ts +53 -6
- package/dist/types/src/app/components/textarea.d.ts +1 -1
- package/dist/types/src/app/components/timestamp.d.ts +1 -0
- package/dist/types/src/app/components/toast.d.ts +1 -1
- package/dist/types/src/app/components/toggle.d.ts +1 -1
- package/dist/types/src/app/data/manifest-types.d.ts +4 -0
- package/dist/types/src/app/design-system/generated-token-refs.d.ts +37 -28
- package/dist/types/src/app/design-system/generated-token-values.d.ts +3 -0
- package/dist/types/src/app/design-system/tokens.d.ts +117 -15
- package/dist/types/src/index.d.ts +122 -72
- package/dist/variables.css +41 -33
- package/docs/CONSUMING.md +63 -39
- package/hirobius.tokens.json +163 -112
- package/llms.txt +158 -50
- package/mcp/catalog.mjs +369 -0
- package/mcp/core-set.mjs +66 -0
- package/mcp/guide.mjs +272 -0
- package/mcp/hds-mcp.mjs +49 -0
- package/mcp/server.mjs +94 -0
- package/package.json +53 -11
- package/public/hds-manifest.json +430 -336
- package/public/llms/components.txt +4 -3
- package/public/llms/layout.txt +1 -1
- package/public/llms-full.txt +190 -70
- package/public/llms.txt +158 -50
- package/scripts/eslint-plugin-hds/index.d.mts +29 -0
- package/scripts/eslint-plugin-hds/index.mjs +55 -0
- package/scripts/eslint-plugin-hds/package.json +30 -0
- package/scripts/eslint-plugin-hds/rules/no-raw-controls.mjs +47 -0
- package/scripts/eslint-plugin-hds/rules/no-raw-hex.mjs +70 -0
- package/scripts/eslint-plugin-hds/rules/no-raw-px-spacing.mjs +125 -0
- package/scripts/eslint-plugin-hds/rules/prefer-hds-layout-primitive.mjs +54 -0
- package/scripts/eslint-plugin-hds/rules/sx-token-first.mjs +111 -0
- package/scripts/eslint-plugin-hds/rules/utils.mjs +66 -0
- package/src/app/data/component-api.json +154 -93
- package/upgrade/index.json +208 -0
- package/upgrade/releases/0.17.0.json +962 -0
- package/upgrade/releases/0.18.0.json +8 -0
- package/upgrade/releases/0.19.0.json +233 -0
- package/upgrade/releases/0.19.1.json +8 -0
- package/upgrade/releases/0.20.0.json +5108 -0
- package/upgrade/releases/0.21.0.json +538 -0
- package/upgrade/releases/0.22.0.json +94 -0
- package/upgrade/schema.json +989 -0
- package/dist/chunks/empty-state-BBqhCx0S.js +0 -1217
- package/dist/chunks/form-COP3vK9_.js +0 -66
- package/dist/types/src/app/components/status-dot.d.ts +0 -39
|
@@ -35,7 +35,6 @@ export * from './app/components/table.js';
|
|
|
35
35
|
export * from './app/components/tag.js';
|
|
36
36
|
export * from './app/components/text.js';
|
|
37
37
|
export * from './app/components/kbd.js';
|
|
38
|
-
export * from './app/components/status-dot.js';
|
|
39
38
|
export * from './app/components/timestamp.js';
|
|
40
39
|
export * from './app/components/blockquote.js';
|
|
41
40
|
export * from './app/components/visually-hidden.js';
|
|
@@ -607,6 +606,13 @@ export declare const tokens: {
|
|
|
607
606
|
};
|
|
608
607
|
$description: string;
|
|
609
608
|
};
|
|
609
|
+
code: {
|
|
610
|
+
$value: {
|
|
611
|
+
value: number;
|
|
612
|
+
unit: string;
|
|
613
|
+
};
|
|
614
|
+
$description: string;
|
|
615
|
+
};
|
|
610
616
|
};
|
|
611
617
|
weight: {
|
|
612
618
|
$type: string;
|
|
@@ -642,6 +648,14 @@ export declare const tokens: {
|
|
|
642
648
|
$value: number;
|
|
643
649
|
$description: string;
|
|
644
650
|
};
|
|
651
|
+
display: {
|
|
652
|
+
$value: number;
|
|
653
|
+
$description: string;
|
|
654
|
+
};
|
|
655
|
+
body: {
|
|
656
|
+
$value: number;
|
|
657
|
+
$description: string;
|
|
658
|
+
};
|
|
645
659
|
};
|
|
646
660
|
letterSpacing: {
|
|
647
661
|
$type: string;
|
|
@@ -712,14 +726,20 @@ export declare const tokens: {
|
|
|
712
726
|
$description: string;
|
|
713
727
|
};
|
|
714
728
|
elastic: {
|
|
715
|
-
$
|
|
716
|
-
$value: {
|
|
717
|
-
type: string;
|
|
718
|
-
stiffness: number;
|
|
719
|
-
damping: number;
|
|
720
|
-
mass: number;
|
|
721
|
-
};
|
|
729
|
+
$value: number[];
|
|
722
730
|
$description: string;
|
|
731
|
+
$extensions: {
|
|
732
|
+
"com.hirobius.hds": {
|
|
733
|
+
$type: string;
|
|
734
|
+
$value: {
|
|
735
|
+
type: string;
|
|
736
|
+
stiffness: number;
|
|
737
|
+
damping: number;
|
|
738
|
+
mass: number;
|
|
739
|
+
};
|
|
740
|
+
bezierSource: string;
|
|
741
|
+
};
|
|
742
|
+
};
|
|
723
743
|
};
|
|
724
744
|
};
|
|
725
745
|
shadow: {
|
|
@@ -1000,31 +1020,52 @@ export declare const tokens: {
|
|
|
1000
1020
|
semantic: {
|
|
1001
1021
|
motion: {
|
|
1002
1022
|
$type: string;
|
|
1023
|
+
$extensions: {
|
|
1024
|
+
"com.hirobius.hds": {
|
|
1025
|
+
$type: string;
|
|
1026
|
+
};
|
|
1027
|
+
};
|
|
1003
1028
|
productive: {
|
|
1004
1029
|
$value: {
|
|
1005
1030
|
duration: string;
|
|
1006
|
-
|
|
1031
|
+
delay: {
|
|
1032
|
+
value: number;
|
|
1033
|
+
unit: string;
|
|
1034
|
+
};
|
|
1035
|
+
timingFunction: string;
|
|
1007
1036
|
};
|
|
1008
1037
|
$description: string;
|
|
1009
1038
|
};
|
|
1010
1039
|
expressive: {
|
|
1011
1040
|
$value: {
|
|
1012
1041
|
duration: string;
|
|
1013
|
-
|
|
1042
|
+
delay: {
|
|
1043
|
+
value: number;
|
|
1044
|
+
unit: string;
|
|
1045
|
+
};
|
|
1046
|
+
timingFunction: string;
|
|
1014
1047
|
};
|
|
1015
1048
|
$description: string;
|
|
1016
1049
|
};
|
|
1017
1050
|
spatial: {
|
|
1018
1051
|
$value: {
|
|
1019
1052
|
duration: string;
|
|
1020
|
-
|
|
1053
|
+
delay: {
|
|
1054
|
+
value: number;
|
|
1055
|
+
unit: string;
|
|
1056
|
+
};
|
|
1057
|
+
timingFunction: string;
|
|
1021
1058
|
};
|
|
1022
1059
|
$description: string;
|
|
1023
1060
|
};
|
|
1024
1061
|
exit: {
|
|
1025
1062
|
$value: {
|
|
1026
1063
|
duration: string;
|
|
1027
|
-
|
|
1064
|
+
delay: {
|
|
1065
|
+
value: number;
|
|
1066
|
+
unit: string;
|
|
1067
|
+
};
|
|
1068
|
+
timingFunction: string;
|
|
1028
1069
|
};
|
|
1029
1070
|
$description: string;
|
|
1030
1071
|
};
|
|
@@ -1729,14 +1770,8 @@ export declare const tokens: {
|
|
|
1729
1770
|
lineHeight: string;
|
|
1730
1771
|
};
|
|
1731
1772
|
$description: string;
|
|
1732
|
-
$extensions: {
|
|
1733
|
-
"com.figma.variables": {
|
|
1734
|
-
fontSize: string;
|
|
1735
|
-
note: string;
|
|
1736
|
-
};
|
|
1737
|
-
};
|
|
1738
1773
|
};
|
|
1739
|
-
|
|
1774
|
+
title: {
|
|
1740
1775
|
$value: {
|
|
1741
1776
|
fontFamily: string;
|
|
1742
1777
|
fontSize: string;
|
|
@@ -1745,30 +1780,36 @@ export declare const tokens: {
|
|
|
1745
1780
|
lineHeight: string;
|
|
1746
1781
|
};
|
|
1747
1782
|
$description: string;
|
|
1748
|
-
$extensions: {
|
|
1749
|
-
"com.figma.variables": {
|
|
1750
|
-
fontSize: string;
|
|
1751
|
-
note: string;
|
|
1752
|
-
};
|
|
1753
|
-
};
|
|
1754
1783
|
};
|
|
1755
|
-
|
|
1784
|
+
body: {
|
|
1756
1785
|
$value: {
|
|
1757
1786
|
fontFamily: string;
|
|
1758
1787
|
fontSize: string;
|
|
1759
1788
|
fontWeight: string;
|
|
1760
1789
|
letterSpacing: string;
|
|
1761
1790
|
lineHeight: string;
|
|
1791
|
+
maxWidth: {
|
|
1792
|
+
value: number;
|
|
1793
|
+
unit: string;
|
|
1794
|
+
};
|
|
1762
1795
|
};
|
|
1763
1796
|
$description: string;
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1797
|
+
};
|
|
1798
|
+
ui: {
|
|
1799
|
+
$value: {
|
|
1800
|
+
fontFamily: string;
|
|
1801
|
+
fontSize: string;
|
|
1802
|
+
fontWeight: string;
|
|
1803
|
+
letterSpacing: string;
|
|
1804
|
+
lineHeight: string;
|
|
1805
|
+
maxWidth: {
|
|
1806
|
+
value: number;
|
|
1807
|
+
unit: string;
|
|
1768
1808
|
};
|
|
1769
1809
|
};
|
|
1810
|
+
$description: string;
|
|
1770
1811
|
};
|
|
1771
|
-
|
|
1812
|
+
caption: {
|
|
1772
1813
|
$value: {
|
|
1773
1814
|
fontFamily: string;
|
|
1774
1815
|
fontSize: string;
|
|
@@ -1777,14 +1818,8 @@ export declare const tokens: {
|
|
|
1777
1818
|
lineHeight: string;
|
|
1778
1819
|
};
|
|
1779
1820
|
$description: string;
|
|
1780
|
-
$extensions: {
|
|
1781
|
-
"com.figma.variables": {
|
|
1782
|
-
fontSize: string;
|
|
1783
|
-
note: string;
|
|
1784
|
-
};
|
|
1785
|
-
};
|
|
1786
1821
|
};
|
|
1787
|
-
|
|
1822
|
+
mono: {
|
|
1788
1823
|
$value: {
|
|
1789
1824
|
fontFamily: string;
|
|
1790
1825
|
fontSize: string;
|
|
@@ -1798,21 +1833,18 @@ export declare const tokens: {
|
|
|
1798
1833
|
};
|
|
1799
1834
|
$description: string;
|
|
1800
1835
|
};
|
|
1801
|
-
|
|
1836
|
+
h1: {
|
|
1802
1837
|
$value: {
|
|
1803
1838
|
fontFamily: string;
|
|
1804
1839
|
fontSize: string;
|
|
1805
1840
|
fontWeight: string;
|
|
1806
1841
|
letterSpacing: string;
|
|
1807
1842
|
lineHeight: string;
|
|
1808
|
-
maxWidth: {
|
|
1809
|
-
value: number;
|
|
1810
|
-
unit: string;
|
|
1811
|
-
};
|
|
1812
1843
|
};
|
|
1813
1844
|
$description: string;
|
|
1845
|
+
$deprecated: string;
|
|
1814
1846
|
};
|
|
1815
|
-
|
|
1847
|
+
h2: {
|
|
1816
1848
|
$value: {
|
|
1817
1849
|
fontFamily: string;
|
|
1818
1850
|
fontSize: string;
|
|
@@ -1821,31 +1853,29 @@ export declare const tokens: {
|
|
|
1821
1853
|
lineHeight: string;
|
|
1822
1854
|
};
|
|
1823
1855
|
$description: string;
|
|
1856
|
+
$deprecated: string;
|
|
1824
1857
|
};
|
|
1825
|
-
|
|
1858
|
+
h3: {
|
|
1826
1859
|
$value: {
|
|
1827
1860
|
fontFamily: string;
|
|
1828
1861
|
fontSize: string;
|
|
1829
1862
|
fontWeight: string;
|
|
1830
1863
|
letterSpacing: string;
|
|
1831
1864
|
lineHeight: string;
|
|
1832
|
-
textTransform: string;
|
|
1833
1865
|
};
|
|
1834
1866
|
$description: string;
|
|
1867
|
+
$deprecated: string;
|
|
1835
1868
|
};
|
|
1836
|
-
|
|
1869
|
+
eyebrow: {
|
|
1837
1870
|
$value: {
|
|
1838
1871
|
fontFamily: string;
|
|
1839
1872
|
fontSize: string;
|
|
1840
1873
|
fontWeight: string;
|
|
1841
1874
|
letterSpacing: string;
|
|
1842
1875
|
lineHeight: string;
|
|
1843
|
-
maxWidth: {
|
|
1844
|
-
value: number;
|
|
1845
|
-
unit: string;
|
|
1846
|
-
};
|
|
1847
1876
|
};
|
|
1848
1877
|
$description: string;
|
|
1878
|
+
$deprecated: string;
|
|
1849
1879
|
};
|
|
1850
1880
|
lineHeight: {
|
|
1851
1881
|
none: {
|
|
@@ -2012,38 +2042,58 @@ export declare const tokens: {
|
|
|
2012
2042
|
};
|
|
2013
2043
|
};
|
|
2014
2044
|
elevation: {
|
|
2015
|
-
$
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
surface: string;
|
|
2019
|
-
shadow: null;
|
|
2020
|
-
border: string;
|
|
2045
|
+
$extensions: {
|
|
2046
|
+
"com.hirobius.hds": {
|
|
2047
|
+
$type: string;
|
|
2021
2048
|
};
|
|
2049
|
+
};
|
|
2050
|
+
flat: {
|
|
2022
2051
|
$description: string;
|
|
2052
|
+
$extensions: {
|
|
2053
|
+
"com.hirobius.hds": {
|
|
2054
|
+
$value: {
|
|
2055
|
+
surface: string;
|
|
2056
|
+
shadow: null;
|
|
2057
|
+
border: string;
|
|
2058
|
+
};
|
|
2059
|
+
};
|
|
2060
|
+
};
|
|
2023
2061
|
};
|
|
2024
2062
|
raised: {
|
|
2025
|
-
$value: {
|
|
2026
|
-
surface: string;
|
|
2027
|
-
shadow: string;
|
|
2028
|
-
border: null;
|
|
2029
|
-
};
|
|
2030
2063
|
$description: string;
|
|
2064
|
+
$extensions: {
|
|
2065
|
+
"com.hirobius.hds": {
|
|
2066
|
+
$value: {
|
|
2067
|
+
surface: string;
|
|
2068
|
+
shadow: string;
|
|
2069
|
+
border: null;
|
|
2070
|
+
};
|
|
2071
|
+
};
|
|
2072
|
+
};
|
|
2031
2073
|
};
|
|
2032
2074
|
floating: {
|
|
2033
|
-
$value: {
|
|
2034
|
-
surface: string;
|
|
2035
|
-
shadow: string;
|
|
2036
|
-
border: null;
|
|
2037
|
-
};
|
|
2038
2075
|
$description: string;
|
|
2076
|
+
$extensions: {
|
|
2077
|
+
"com.hirobius.hds": {
|
|
2078
|
+
$value: {
|
|
2079
|
+
surface: string;
|
|
2080
|
+
shadow: string;
|
|
2081
|
+
border: null;
|
|
2082
|
+
};
|
|
2083
|
+
};
|
|
2084
|
+
};
|
|
2039
2085
|
};
|
|
2040
2086
|
overlay: {
|
|
2041
|
-
$value: {
|
|
2042
|
-
surface: string;
|
|
2043
|
-
shadow: string;
|
|
2044
|
-
border: null;
|
|
2045
|
-
};
|
|
2046
2087
|
$description: string;
|
|
2088
|
+
$extensions: {
|
|
2089
|
+
"com.hirobius.hds": {
|
|
2090
|
+
$value: {
|
|
2091
|
+
surface: string;
|
|
2092
|
+
shadow: string;
|
|
2093
|
+
border: null;
|
|
2094
|
+
};
|
|
2095
|
+
};
|
|
2096
|
+
};
|
|
2047
2097
|
};
|
|
2048
2098
|
};
|
|
2049
2099
|
size: {
|
package/dist/variables.css
CHANGED
|
@@ -118,6 +118,7 @@
|
|
|
118
118
|
--primitive-typography-size-4xl: 36px;
|
|
119
119
|
--primitive-typography-size-5xl: 48px;
|
|
120
120
|
--primitive-typography-size-6xl: 60px;
|
|
121
|
+
--primitive-typography-size-code: 13px;
|
|
121
122
|
--primitive-typography-weight-regular: 400;
|
|
122
123
|
--primitive-typography-weight-medium: 500;
|
|
123
124
|
--primitive-typography-weight-bold: 700;
|
|
@@ -127,6 +128,8 @@
|
|
|
127
128
|
--primitive-typography-lineHeight-snug: 1.375;
|
|
128
129
|
--primitive-typography-lineHeight-normal: 1.5;
|
|
129
130
|
--primitive-typography-lineHeight-relaxed: 1.625;
|
|
131
|
+
--primitive-typography-lineHeight-display: 1.05;
|
|
132
|
+
--primitive-typography-lineHeight-body: 1.6;
|
|
130
133
|
--primitive-typography-letterSpacing-tight: -0.01em;
|
|
131
134
|
--primitive-typography-letterSpacing-normal: 0em;
|
|
132
135
|
--primitive-typography-letterSpacing-caps: 0.06em;
|
|
@@ -267,62 +270,67 @@
|
|
|
267
270
|
--semantic-layout-grid-columns-desktop: var(--primitive-grid-columns-3);
|
|
268
271
|
/* semantic.typography.display */
|
|
269
272
|
--semantic-typography-display-font-family: var(--primitive-typography-family-display);
|
|
270
|
-
--semantic-typography-display-font-size: var(--primitive-typography-size-
|
|
273
|
+
--semantic-typography-display-font-size: var(--primitive-typography-size-5xl);
|
|
271
274
|
--semantic-typography-display-font-weight: var(--primitive-typography-weight-bold);
|
|
272
275
|
--semantic-typography-display-letter-spacing: var(--primitive-typography-letterSpacing-tight);
|
|
273
|
-
--semantic-typography-display-line-height: var(--primitive-typography-lineHeight-
|
|
274
|
-
/* semantic.typography.
|
|
275
|
-
--semantic-typography-
|
|
276
|
-
--semantic-typography-
|
|
277
|
-
--semantic-typography-
|
|
278
|
-
--semantic-typography-
|
|
279
|
-
--semantic-typography-
|
|
280
|
-
/* semantic.typography.h2 */
|
|
281
|
-
--semantic-typography-h2-font-family: var(--primitive-typography-family-display);
|
|
282
|
-
--semantic-typography-h2-font-size: var(--primitive-typography-size-3xl);
|
|
283
|
-
--semantic-typography-h2-font-weight: var(--primitive-typography-weight-bold);
|
|
284
|
-
--semantic-typography-h2-letter-spacing: var(--primitive-typography-letterSpacing-tight);
|
|
285
|
-
--semantic-typography-h2-line-height: 40px;
|
|
286
|
-
/* semantic.typography.h3 */
|
|
287
|
-
--semantic-typography-h3-font-family: var(--primitive-typography-family-display);
|
|
288
|
-
--semantic-typography-h3-font-size: var(--primitive-typography-size-xl);
|
|
289
|
-
--semantic-typography-h3-font-weight: var(--primitive-typography-weight-bold);
|
|
290
|
-
--semantic-typography-h3-letter-spacing: var(--primitive-typography-letterSpacing-normal);
|
|
291
|
-
--semantic-typography-h3-line-height: 28px;
|
|
276
|
+
--semantic-typography-display-line-height: var(--primitive-typography-lineHeight-display);
|
|
277
|
+
/* semantic.typography.title */
|
|
278
|
+
--semantic-typography-title-font-family: var(--primitive-typography-family-display);
|
|
279
|
+
--semantic-typography-title-font-size: var(--primitive-typography-size-2xl);
|
|
280
|
+
--semantic-typography-title-font-weight: var(--primitive-typography-weight-bold);
|
|
281
|
+
--semantic-typography-title-letter-spacing: var(--primitive-typography-letterSpacing-tight);
|
|
282
|
+
--semantic-typography-title-line-height: var(--primitive-typography-lineHeight-tight);
|
|
292
283
|
/* semantic.typography.body */
|
|
293
284
|
--semantic-typography-body-font-family: var(--primitive-typography-family-primary);
|
|
294
285
|
--semantic-typography-body-font-size: var(--primitive-typography-size-base);
|
|
295
|
-
--semantic-typography-body-font-weight: var(--primitive-typography-weight-
|
|
286
|
+
--semantic-typography-body-font-weight: var(--primitive-typography-weight-regular);
|
|
296
287
|
--semantic-typography-body-letter-spacing: var(--primitive-typography-letterSpacing-normal);
|
|
297
|
-
--semantic-typography-body-line-height:
|
|
288
|
+
--semantic-typography-body-line-height: var(--primitive-typography-lineHeight-body);
|
|
298
289
|
--semantic-typography-body-max-width: 60ch;
|
|
299
290
|
/* semantic.typography.ui */
|
|
300
291
|
--semantic-typography-ui-font-family: var(--primitive-typography-family-primary);
|
|
301
292
|
--semantic-typography-ui-font-size: var(--primitive-typography-size-sm);
|
|
302
293
|
--semantic-typography-ui-font-weight: var(--primitive-typography-weight-medium);
|
|
303
294
|
--semantic-typography-ui-letter-spacing: var(--primitive-typography-letterSpacing-normal);
|
|
304
|
-
--semantic-typography-ui-line-height:
|
|
295
|
+
--semantic-typography-ui-line-height: var(--primitive-typography-lineHeight-normal);
|
|
305
296
|
--semantic-typography-ui-max-width: 60ch;
|
|
306
297
|
/* semantic.typography.caption */
|
|
307
298
|
--semantic-typography-caption-font-family: var(--primitive-typography-family-primary);
|
|
308
299
|
--semantic-typography-caption-font-size: var(--primitive-typography-size-xs);
|
|
309
300
|
--semantic-typography-caption-font-weight: var(--primitive-typography-weight-medium);
|
|
310
301
|
--semantic-typography-caption-letter-spacing: var(--primitive-typography-letterSpacing-normal);
|
|
311
|
-
--semantic-typography-caption-line-height:
|
|
312
|
-
/* semantic.typography.eyebrow */
|
|
313
|
-
--semantic-typography-eyebrow-font-family: var(--primitive-typography-family-primary);
|
|
314
|
-
--semantic-typography-eyebrow-font-size: var(--primitive-typography-size-xs);
|
|
315
|
-
--semantic-typography-eyebrow-font-weight: var(--primitive-typography-weight-medium);
|
|
316
|
-
--semantic-typography-eyebrow-letter-spacing: var(--primitive-typography-letterSpacing-caps);
|
|
317
|
-
--semantic-typography-eyebrow-line-height: 16px;
|
|
318
|
-
--semantic-typography-eyebrow-text-transform: uppercase;
|
|
302
|
+
--semantic-typography-caption-line-height: var(--primitive-typography-lineHeight-normal);
|
|
319
303
|
/* semantic.typography.mono */
|
|
320
304
|
--semantic-typography-mono-font-family: var(--primitive-typography-family-mono);
|
|
321
|
-
--semantic-typography-mono-font-size: var(--primitive-typography-size-
|
|
305
|
+
--semantic-typography-mono-font-size: var(--primitive-typography-size-code);
|
|
322
306
|
--semantic-typography-mono-font-weight: var(--primitive-typography-weight-regular);
|
|
323
307
|
--semantic-typography-mono-letter-spacing: var(--primitive-typography-letterSpacing-normal);
|
|
324
|
-
--semantic-typography-mono-line-height:
|
|
308
|
+
--semantic-typography-mono-line-height: var(--primitive-typography-lineHeight-normal);
|
|
325
309
|
--semantic-typography-mono-max-width: 60ch;
|
|
310
|
+
/* semantic.typography.h1 */
|
|
311
|
+
--semantic-typography-h1-font-family: var(--primitive-typography-family-display);
|
|
312
|
+
--semantic-typography-h1-font-size: var(--primitive-typography-size-2xl);
|
|
313
|
+
--semantic-typography-h1-font-weight: var(--primitive-typography-weight-bold);
|
|
314
|
+
--semantic-typography-h1-letter-spacing: var(--primitive-typography-letterSpacing-tight);
|
|
315
|
+
--semantic-typography-h1-line-height: var(--primitive-typography-lineHeight-tight);
|
|
316
|
+
/* semantic.typography.h2 */
|
|
317
|
+
--semantic-typography-h2-font-family: var(--primitive-typography-family-display);
|
|
318
|
+
--semantic-typography-h2-font-size: var(--primitive-typography-size-2xl);
|
|
319
|
+
--semantic-typography-h2-font-weight: var(--primitive-typography-weight-bold);
|
|
320
|
+
--semantic-typography-h2-letter-spacing: var(--primitive-typography-letterSpacing-tight);
|
|
321
|
+
--semantic-typography-h2-line-height: var(--primitive-typography-lineHeight-tight);
|
|
322
|
+
/* semantic.typography.h3 */
|
|
323
|
+
--semantic-typography-h3-font-family: var(--primitive-typography-family-display);
|
|
324
|
+
--semantic-typography-h3-font-size: var(--primitive-typography-size-2xl);
|
|
325
|
+
--semantic-typography-h3-font-weight: var(--primitive-typography-weight-bold);
|
|
326
|
+
--semantic-typography-h3-letter-spacing: var(--primitive-typography-letterSpacing-tight);
|
|
327
|
+
--semantic-typography-h3-line-height: var(--primitive-typography-lineHeight-tight);
|
|
328
|
+
/* semantic.typography.eyebrow */
|
|
329
|
+
--semantic-typography-eyebrow-font-family: var(--primitive-typography-family-primary);
|
|
330
|
+
--semantic-typography-eyebrow-font-size: var(--primitive-typography-size-xs);
|
|
331
|
+
--semantic-typography-eyebrow-font-weight: var(--primitive-typography-weight-medium);
|
|
332
|
+
--semantic-typography-eyebrow-letter-spacing: var(--primitive-typography-letterSpacing-normal);
|
|
333
|
+
--semantic-typography-eyebrow-line-height: var(--primitive-typography-lineHeight-normal);
|
|
326
334
|
--semantic-typography-lineHeight-none: var(--primitive-typography-lineHeight-none);
|
|
327
335
|
--semantic-docs-space-section: var(--primitive-space-12);
|
|
328
336
|
--semantic-docs-space-paragraph: var(--primitive-space-6);
|
package/docs/CONSUMING.md
CHANGED
|
@@ -15,7 +15,7 @@ is the canonical consumption guide — point other teams here.
|
|
|
15
15
|
>
|
|
16
16
|
> 1. **`react-router` is now optional** — components route through an adapter and
|
|
17
17
|
> fall back to plain anchors when no router is provided (§5).
|
|
18
|
-
> 2. **Fonts are
|
|
18
|
+
> 2. **Fonts are opt-in** — `import '@hirobius/design-system/fonts.css'` for the brand typefaces; the woff2 ship in the package, nothing to copy (§3).
|
|
19
19
|
> 3. **Base styles are scoped to `[data-hds]`** — add that attribute to your root
|
|
20
20
|
> or section so HDS doesn't fight a host app's resets/fonts (§4, §6).
|
|
21
21
|
|
|
@@ -43,7 +43,7 @@ HDS ships **three** stylesheets. Pick one by how much you want HDS to own:
|
|
|
43
43
|
|
|
44
44
|
```ts
|
|
45
45
|
// RECOMMENDED for embedding in an existing app (e.g. MUI): tokens + component
|
|
46
|
-
// styles + utilities
|
|
46
|
+
// styles + utilities, with NO global reset. Styles every HDS
|
|
47
47
|
// component and changes ZERO host-element styles.
|
|
48
48
|
import '@hirobius/design-system/styles.css';
|
|
49
49
|
|
|
@@ -56,17 +56,31 @@ import '@hirobius/design-system/tokens.css';
|
|
|
56
56
|
import '@hirobius/design-system/variables.css';
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
| Stylesheet | Tokens | Components + utilities |
|
|
60
|
-
| ------------------- | :----: | :--------------------: |
|
|
61
|
-
| **`styles.css`** | ✅ | ✅ |
|
|
62
|
-
| **`tokens.css`** | ✅ | ✅ |
|
|
63
|
-
| **`variables.css`** | ✅ | ❌ |
|
|
59
|
+
| Stylesheet | Tokens | Components + utilities | Global reset |
|
|
60
|
+
| ------------------- | :----: | :--------------------: | :-------------------: |
|
|
61
|
+
| **`styles.css`** | ✅ | ✅ | ❌ none |
|
|
62
|
+
| **`tokens.css`** | ✅ | ✅ | ⚠️ Tailwind preflight |
|
|
63
|
+
| **`variables.css`** | ✅ | ❌ | ❌ none |
|
|
64
64
|
|
|
65
65
|
All three:
|
|
66
66
|
|
|
67
67
|
- **Need no Tailwind config** in the consumer — utilities ship compiled.
|
|
68
|
-
- **
|
|
69
|
-
|
|
68
|
+
- **Carry no font files.** Fonts are a separate, optional import (below).
|
|
69
|
+
|
|
70
|
+
### Brand fonts (optional)
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
import '@hirobius/design-system/fonts.css'; // Satoshi 400/500/700 + Geist Mono 400
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
`fonts.css` declares the four `@font-face` blocks with `font-display: swap`. Its
|
|
77
|
+
URLs are relative (`./fonts/satoshi-400.woff2`), and the woff2 files ship in the
|
|
78
|
+
package, so Vite, Next and webpack resolve and hash them; there is nothing to
|
|
79
|
+
copy. Import it alongside one of the stylesheets above to keep the HDS fonts.
|
|
80
|
+
Skip it to bring your own: `tokens.css` and `styles.css` keep the
|
|
81
|
+
`--hds-font-family*` variables, so text falls back to the family stack
|
|
82
|
+
(`"Satoshi", system-ui, …`) and uses your font if you declare that family
|
|
83
|
+
yourself.
|
|
70
84
|
|
|
71
85
|
HDS's own base styles (type baseline, resets) are scoped to the `[data-hds]`
|
|
72
86
|
subtree (§4) in **all** bundles, so they never touch host elements. The only
|
|
@@ -155,7 +169,7 @@ If your app runs MUI `<CssBaseline>` + Emotion (or any opinionated global CSS),
|
|
|
155
169
|
resets will fight if both target `body`.
|
|
156
170
|
- **Styled path (recommended for MUI/host embedding):** import
|
|
157
171
|
`@hirobius/design-system/styles.css` instead of `tokens.css`. It ships the full
|
|
158
|
-
component styling (tokens + utilities
|
|
172
|
+
component styling (tokens + utilities) but **no global reset** — HDS's
|
|
159
173
|
own base is scoped to `[data-hds]`, so it styles every HDS component and
|
|
160
174
|
**cannot** restyle your host's `*`, `body`, headings, `button`, `a`, or form
|
|
161
175
|
controls. This is the clean way to run HDS next to `<CssBaseline>`: no reset
|
|
@@ -211,23 +225,25 @@ export function Example() {
|
|
|
211
225
|
|
|
212
226
|
### Subpath exports
|
|
213
227
|
|
|
214
|
-
| Import | What you get
|
|
215
|
-
| --------------------------------------- |
|
|
216
|
-
| `@hirobius/design-system` | The core
|
|
217
|
-
| `@hirobius/design-system/styles.css` | Components + utilities + tokens
|
|
218
|
-
| `@hirobius/design-system/
|
|
219
|
-
| `@hirobius/design-system/
|
|
220
|
-
| `@hirobius/design-system/
|
|
221
|
-
| `@hirobius/design-system/
|
|
222
|
-
| `@hirobius/design-system/
|
|
223
|
-
| `@hirobius/design-system/
|
|
224
|
-
| `@hirobius/design-system/
|
|
225
|
-
| `@hirobius/design-system/
|
|
226
|
-
| `@hirobius/design-system/
|
|
227
|
-
| `@hirobius/design-system/
|
|
228
|
-
| `@hirobius/design-system/
|
|
229
|
-
| `@hirobius/design-system/
|
|
230
|
-
| `@hirobius/design-system/
|
|
228
|
+
| Import | What you get |
|
|
229
|
+
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
230
|
+
| `@hirobius/design-system` | The 43-component core set ([README → What belongs in the system](../README.md#what-belongs-in-the-system)), the rest of the allow-list, and the router seam (`HdsRouterProvider`, `useHdsRouter`); the `pattern` tier is in `/patterns` |
|
|
231
|
+
| `@hirobius/design-system/styles.css` | Components + utilities + tokens, NO global reset (host-safe; recommended for embedding) |
|
|
232
|
+
| `@hirobius/design-system/fonts.css` | Optional brand fonts: Satoshi 400/500/700 + Geist Mono 400 (`@font-face`, relative woff2 URLs) |
|
|
233
|
+
| `@hirobius/design-system/tokens.css` | The complete stylesheet — styles.css PLUS a global Tailwind-preflight reset |
|
|
234
|
+
| `@hirobius/design-system/variables.css` | Design tokens as CSS custom properties ONLY — no reset/preflight (host-safe) |
|
|
235
|
+
| `@hirobius/design-system/tokens` | Design-token values as typed TS |
|
|
236
|
+
| `@hirobius/design-system/cn` | The `cn()` className-merge helper |
|
|
237
|
+
| `@hirobius/design-system/manifest` | Machine-readable component inventory (`hds-manifest.json`) |
|
|
238
|
+
| `@hirobius/design-system/contexts` | React context providers, incl. the router seam (see below) |
|
|
239
|
+
| `@hirobius/design-system/form` | Optional React Hook Form + Zod form adapter (see §8.5) |
|
|
240
|
+
| `@hirobius/design-system/mui` | Optional Material UI theme preset — maps HDS tokens to an MUI palette (see §6) |
|
|
241
|
+
| `@hirobius/design-system/brand` | Framework-free palette → HDS-semantic overlay bridge for static/SSR targets (see §12) |
|
|
242
|
+
| `@hirobius/design-system/scroll` | Opt-in scroll-motion: `SmoothScroll` (Lenis) + `useScrollProgress` (Motion). Optional peer `lenis` (see §13) |
|
|
243
|
+
| `@hirobius/design-system/static.css` | CSS-only static-primitive layer — `.hds-badge`/`.hds-card`/`.hds-alert`/`.hds-divider`/`.hds-tag` classes, no React (see §14) |
|
|
244
|
+
| `@hirobius/design-system/patterns` | The 12 pattern modules (`Page`, `PageHeader`, `Form`, `FormField`, `CodeBlock`, …); root copies removed in 0.20.0 |
|
|
245
|
+
| `@hirobius/design-system/icons` | Curated Lucide icon set for `Icon` and `Button iconOnly` (see §15) |
|
|
246
|
+
| `@hirobius/design-system/eslint-plugin` | The consumer ESLint plugin; spread `configs.recommended` into `eslint.config.mjs` (see §11) |
|
|
231
247
|
|
|
232
248
|
### Semantic feedback / status tokens
|
|
233
249
|
|
|
@@ -432,16 +448,15 @@ by `scripts/check-hardcoded-colors.mjs`, `scripts/check-hardcoded-spacing.mjs`,
|
|
|
432
448
|
and `scripts/check-layout-discipline.mjs` — internal scripts that only run
|
|
433
449
|
here. `@hirobius/eslint-plugin-hds` (`scripts/eslint-plugin-hds/`) ships the
|
|
434
450
|
same discipline as an installable ESLint plugin for consumer apps, flagging
|
|
435
|
-
raw hex/px values in `style`, `className`, and `Box` `sx` props
|
|
436
|
-
reach code review.
|
|
451
|
+
raw hex/px values in `style`, `className`, and `Box` `sx` props, and raw HTML
|
|
452
|
+
form controls, before they reach code review.
|
|
437
453
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
```
|
|
454
|
+
It ships inside this package as the `@hirobius/design-system/eslint-plugin`
|
|
455
|
+
subpath, so an app that has the design system installed needs only `eslint`:
|
|
441
456
|
|
|
442
457
|
```js
|
|
443
458
|
// eslint.config.mjs
|
|
444
|
-
import hds from '@hirobius/eslint-plugin
|
|
459
|
+
import hds from '@hirobius/design-system/eslint-plugin';
|
|
445
460
|
|
|
446
461
|
export default [
|
|
447
462
|
{
|
|
@@ -452,12 +467,21 @@ export default [
|
|
|
452
467
|
];
|
|
453
468
|
```
|
|
454
469
|
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
470
|
+
Without the package (for example in a repo that only lints), install the same
|
|
471
|
+
plugin from git:
|
|
472
|
+
|
|
473
|
+
```bash
|
|
474
|
+
pnpm add -D "@hirobius/eslint-plugin-hds@github:hirobius/hds#path:/scripts/eslint-plugin-hds"
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
and import it as `@hirobius/eslint-plugin-hds`.
|
|
478
|
+
|
|
479
|
+
Five rules ship in `recommended`: `no-raw-hex` (error), `no-raw-px-spacing`
|
|
480
|
+
(error), `no-raw-controls` (error — raw `<button>`, `<input>`, `<select>`,
|
|
481
|
+
`<textarea>` or `<form>` where an HDS component exists), `sx-token-first`
|
|
482
|
+
(error — raw hex/px inside `Box` `sx`, where token keys are mandatory), and
|
|
483
|
+
`prefer-hds-layout-primitive` (warn — ad-hoc `display: flex`/`grid` where
|
|
484
|
+
Stack/Grid likely fits). Full rule docs and examples live in
|
|
461
485
|
[`scripts/eslint-plugin-hds/README.md`](../scripts/eslint-plugin-hds/README.md).
|
|
462
486
|
|
|
463
487
|
### Agent skill
|