@hirobius/design-system 0.21.0 → 0.23.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 +13 -1
- package/CHANGELOG.md +1043 -0
- package/CONSUMING.md +25 -11
- package/DESIGN.md +24 -24
- package/MIGRATIONS.md +603 -0
- package/NOTICE.md +1 -1
- package/README.md +22 -12
- package/UPGRADING.md +243 -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 → empty-state-ChC_xZfg.js} +109 -92
- package/dist/chunks/{form-By82qZcC.js → form-zCZ_B83I.js} +16 -16
- package/dist/css-contract.json +1 -0
- package/dist/fonts/ibm-plex-mono-400.woff2 +0 -0
- package/dist/fonts.css +5 -5
- package/dist/form.js +1 -1
- package/dist/hirobius-ui.js +1254 -1181
- package/dist/manifest.js +6 -5
- package/dist/patterns.js +164 -162
- package/dist/styles.css +1 -1
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +14 -1
- package/dist/types/src/app/components/alert-dialog.d.ts +1 -1
- package/dist/types/src/app/components/alert.d.ts +1 -1
- package/dist/types/src/app/components/asset-img.d.ts +2 -1
- package/dist/types/src/app/components/avatar-group.d.ts +1 -1
- package/dist/types/src/app/components/avatar.d.ts +1 -1
- package/dist/types/src/app/components/badge.d.ts +1 -1
- package/dist/types/src/app/components/blockquote.d.ts +1 -1
- package/dist/types/src/app/components/breadcrumb.d.ts +1 -1
- package/dist/types/src/app/components/button.d.ts +2 -2
- package/dist/types/src/app/components/callout.d.ts +3 -2
- package/dist/types/src/app/components/card.d.ts +6 -4
- package/dist/types/src/app/components/checkbox.d.ts +1 -1
- package/dist/types/src/app/components/code-block.d.ts +2 -1
- package/dist/types/src/app/components/combobox.d.ts +2 -2
- package/dist/types/src/app/components/data-table-section.d.ts +2 -1
- package/dist/types/src/app/components/destructive-section.d.ts +2 -1
- package/dist/types/src/app/components/dialog.d.ts +1 -1
- package/dist/types/src/app/components/disclosure.d.ts +1 -1
- package/dist/types/src/app/components/divider.d.ts +2 -2
- package/dist/types/src/app/components/empty-state.d.ts +1 -1
- package/dist/types/src/app/components/field.d.ts +1 -1
- package/dist/types/src/app/components/form-actions.d.ts +2 -1
- package/dist/types/src/app/components/form.d.ts +2 -1
- package/dist/types/src/app/components/grid.d.ts +1 -1
- package/dist/types/src/app/components/hds-tooltip.d.ts +1 -1
- package/dist/types/src/app/components/icon.d.ts +2 -2
- 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 -1
- package/dist/types/src/app/components/menu.d.ts +1 -1
- package/dist/types/src/app/components/metadata-list.d.ts +1 -1
- package/dist/types/src/app/components/metric-tiles.d.ts +3 -1
- package/dist/types/src/app/components/page-header.d.ts +1 -0
- package/dist/types/src/app/components/page.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 +1 -1
- package/dist/types/src/app/components/radio.d.ts +1 -1
- package/dist/types/src/app/components/reveal.d.ts +1 -0
- package/dist/types/src/app/components/select.d.ts +1 -1
- package/dist/types/src/app/components/skeleton.d.ts +1 -1
- 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/stack.d.ts +1 -1
- package/dist/types/src/app/components/stat.d.ts +1 -1
- package/dist/types/src/app/components/status-list-item.d.ts +1 -1
- package/dist/types/src/app/components/status-tile.d.ts +1 -1
- package/dist/types/src/app/components/table.d.ts +1 -1
- package/dist/types/src/app/components/tabs.d.ts +4 -2
- package/dist/types/src/app/components/tag.d.ts +1 -1
- package/dist/types/src/app/components/text.d.ts +1 -1
- package/dist/types/src/app/components/textarea.d.ts +1 -1
- package/dist/types/src/app/components/timestamp.d.ts +1 -1
- 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/context/hds-theme.d.ts +1 -1
- package/dist/types/src/app/design-system/generated-token-refs.d.ts +13 -0
- package/dist/types/src/app/design-system/generated-token-values.d.ts +14 -1
- package/dist/types/src/app/hooks/useInteractionState.d.ts +7 -1
- package/dist/types/src/index.d.ts +126 -32
- package/dist/variables.css +33 -22
- package/docs/CONSUMING.md +2 -2
- package/hirobius.tokens.json +173 -79
- package/llms.txt +29 -7
- package/mcp/catalog.mjs +10 -7
- package/mcp/core-set.mjs +66 -0
- package/mcp/guide.mjs +9 -52
- package/package.json +28 -11
- package/public/hds-manifest.json +365 -207
- package/public/llms/components.txt +1 -1
- package/public/llms-full.txt +54 -32
- package/public/llms.txt +29 -7
- package/src/app/data/component-api.json +104 -71
- package/upgrade/index.json +215 -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/releases/0.23.0.json +259 -0
- package/upgrade/schema.json +1102 -0
- package/dist/fonts/geist-mono-400.woff2 +0 -0
package/hirobius.tokens.json
CHANGED
|
@@ -149,6 +149,53 @@
|
|
|
149
149
|
},
|
|
150
150
|
"$description": "Discrete values within the green range at defined lightness steps."
|
|
151
151
|
},
|
|
152
|
+
"apple": {
|
|
153
|
+
"50": {
|
|
154
|
+
"$value": "#f2faeb",
|
|
155
|
+
"$description": "Apple-green accent tint — faintest step."
|
|
156
|
+
},
|
|
157
|
+
"100": {
|
|
158
|
+
"$value": "#e2f3cf",
|
|
159
|
+
"$description": "Apple-green accent — very light tint."
|
|
160
|
+
},
|
|
161
|
+
"200": {
|
|
162
|
+
"$value": "#c7e7a4",
|
|
163
|
+
"$description": "Apple-green accent — light tint."
|
|
164
|
+
},
|
|
165
|
+
"300": {
|
|
166
|
+
"$value": "#a6d873",
|
|
167
|
+
"$description": "Apple-green accent — soft mid-light step."
|
|
168
|
+
},
|
|
169
|
+
"400": {
|
|
170
|
+
"$value": "#85c84c",
|
|
171
|
+
"$description": "Apple-green accent — bright step; dark-mode rest accent."
|
|
172
|
+
},
|
|
173
|
+
"500": {
|
|
174
|
+
"$value": "#66b239",
|
|
175
|
+
"$description": "Apple-green accent rest — bright, rich apple green; AA for dark (neutral.900) text as a fill."
|
|
176
|
+
},
|
|
177
|
+
"600": {
|
|
178
|
+
"$value": "#54922d",
|
|
179
|
+
"$description": "Apple-green accent — hover / border step."
|
|
180
|
+
},
|
|
181
|
+
"700": {
|
|
182
|
+
"$value": "#416f20",
|
|
183
|
+
"$description": "Apple-green accent — pressed and accent-intent text (AA for text on page and card surfaces)."
|
|
184
|
+
},
|
|
185
|
+
"800": {
|
|
186
|
+
"$value": "#34571b",
|
|
187
|
+
"$description": "Apple-green accent — deep step."
|
|
188
|
+
},
|
|
189
|
+
"900": {
|
|
190
|
+
"$value": "#2b4518",
|
|
191
|
+
"$description": "Apple-green accent — darkest usable step."
|
|
192
|
+
},
|
|
193
|
+
"950": {
|
|
194
|
+
"$value": "#16250c",
|
|
195
|
+
"$description": "Apple-green accent — near-black green substrate."
|
|
196
|
+
},
|
|
197
|
+
"$description": "Discrete values within the apple-green (brand accent) range at defined lightness steps. Distinct from the emerald `green` feedback/success scale."
|
|
198
|
+
},
|
|
152
199
|
"violet": {
|
|
153
200
|
"50": {
|
|
154
201
|
"$value": "#f5f3ff",
|
|
@@ -489,8 +536,8 @@
|
|
|
489
536
|
"$description": "Display face: Satoshi Bold (ITF), bound to the display and title composites."
|
|
490
537
|
},
|
|
491
538
|
"mono": {
|
|
492
|
-
"$value": ["
|
|
493
|
-
"$description": "Monospace face:
|
|
539
|
+
"$value": ["IBM Plex Mono", "Courier New", "monospace"],
|
|
540
|
+
"$description": "Monospace face: IBM Plex Mono. Falls back to Courier New, monospace."
|
|
494
541
|
}
|
|
495
542
|
},
|
|
496
543
|
"size": {
|
|
@@ -685,14 +732,20 @@
|
|
|
685
732
|
"$description": "Cubic bezier with restrained initial gain and steep terminal velocity."
|
|
686
733
|
},
|
|
687
734
|
"elastic": {
|
|
688
|
-
"$
|
|
689
|
-
"$
|
|
690
|
-
|
|
691
|
-
"
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
735
|
+
"$value": [0.34, 1.56, 0.64, 1],
|
|
736
|
+
"$description": "Spring response defined by stiffness, damping, and mass parameters.",
|
|
737
|
+
"$extensions": {
|
|
738
|
+
"com.hirobius.hds": {
|
|
739
|
+
"$type": "spring",
|
|
740
|
+
"$value": {
|
|
741
|
+
"type": "spring",
|
|
742
|
+
"stiffness": 300,
|
|
743
|
+
"damping": 20,
|
|
744
|
+
"mass": 1
|
|
745
|
+
},
|
|
746
|
+
"bezierSource": "The cubicBezier is easeOutBack (easings.net), chosen as a stand-in for the spring, not fitted to it: both overshoot once, the curve by about 10% and spring(300, 20, 1) by about 11%."
|
|
747
|
+
}
|
|
748
|
+
}
|
|
696
749
|
}
|
|
697
750
|
},
|
|
698
751
|
"shadow": {
|
|
@@ -972,32 +1025,53 @@
|
|
|
972
1025
|
},
|
|
973
1026
|
"semantic": {
|
|
974
1027
|
"motion": {
|
|
975
|
-
"$type": "
|
|
1028
|
+
"$type": "transition",
|
|
1029
|
+
"$extensions": {
|
|
1030
|
+
"com.hirobius.hds": {
|
|
1031
|
+
"$type": "motion"
|
|
1032
|
+
}
|
|
1033
|
+
},
|
|
976
1034
|
"productive": {
|
|
977
1035
|
"$value": {
|
|
978
1036
|
"duration": "{primitive.duration.short}",
|
|
979
|
-
"
|
|
1037
|
+
"delay": {
|
|
1038
|
+
"value": 0,
|
|
1039
|
+
"unit": "ms"
|
|
1040
|
+
},
|
|
1041
|
+
"timingFunction": "{primitive.easing.decelerate}"
|
|
980
1042
|
},
|
|
981
1043
|
"$description": "For micro-interactions and status changes. No deformation."
|
|
982
1044
|
},
|
|
983
1045
|
"expressive": {
|
|
984
1046
|
"$value": {
|
|
985
1047
|
"duration": "{primitive.duration.medium}",
|
|
986
|
-
"
|
|
1048
|
+
"delay": {
|
|
1049
|
+
"value": 0,
|
|
1050
|
+
"unit": "ms"
|
|
1051
|
+
},
|
|
1052
|
+
"timingFunction": "{primitive.easing.elastic}"
|
|
987
1053
|
},
|
|
988
1054
|
"$description": "For teaching moments and significant UI entries. Includes physics-based squish."
|
|
989
1055
|
},
|
|
990
1056
|
"spatial": {
|
|
991
1057
|
"$value": {
|
|
992
1058
|
"duration": "{primitive.duration.long}",
|
|
993
|
-
"
|
|
1059
|
+
"delay": {
|
|
1060
|
+
"value": 0,
|
|
1061
|
+
"unit": "ms"
|
|
1062
|
+
},
|
|
1063
|
+
"timingFunction": "{primitive.easing.emphasized}"
|
|
994
1064
|
},
|
|
995
1065
|
"$description": "For elements traveling long distances across the viewport."
|
|
996
1066
|
},
|
|
997
1067
|
"exit": {
|
|
998
1068
|
"$value": {
|
|
999
1069
|
"duration": "{primitive.duration.instant}",
|
|
1000
|
-
"
|
|
1070
|
+
"delay": {
|
|
1071
|
+
"value": 0,
|
|
1072
|
+
"unit": "ms"
|
|
1073
|
+
},
|
|
1074
|
+
"timingFunction": "{primitive.easing.accelerate}"
|
|
1001
1075
|
},
|
|
1002
1076
|
"$description": "For elements being removed from the DOM."
|
|
1003
1077
|
},
|
|
@@ -1071,25 +1145,25 @@
|
|
|
1071
1145
|
}
|
|
1072
1146
|
},
|
|
1073
1147
|
"accent": {
|
|
1074
|
-
"$value": "{primitive.color.
|
|
1075
|
-
"$description": "Accent-colored background
|
|
1148
|
+
"$value": "{primitive.color.apple.500}",
|
|
1149
|
+
"$description": "Accent-colored background — bright apple green (stays green on dark surfaces; pair with content.onAccent dark text).",
|
|
1076
1150
|
"$extensions": {
|
|
1077
1151
|
"com.figma.variables": {
|
|
1078
1152
|
"modes": {
|
|
1079
|
-
"Light": "{primitive.color.
|
|
1080
|
-
"Dark": "{primitive.color.
|
|
1153
|
+
"Light": "{primitive.color.apple.500}",
|
|
1154
|
+
"Dark": "{primitive.color.apple.400}"
|
|
1081
1155
|
}
|
|
1082
1156
|
}
|
|
1083
1157
|
}
|
|
1084
1158
|
},
|
|
1085
1159
|
"accentSubtle": {
|
|
1086
|
-
"$value": "{primitive.color.
|
|
1160
|
+
"$value": "{primitive.color.apple.50}",
|
|
1087
1161
|
"$description": "Faint accent tint for hover states or highlights",
|
|
1088
1162
|
"$extensions": {
|
|
1089
1163
|
"com.figma.variables": {
|
|
1090
1164
|
"modes": {
|
|
1091
|
-
"Light": "{primitive.color.
|
|
1092
|
-
"Dark": "{primitive.color.
|
|
1165
|
+
"Light": "{primitive.color.apple.50}",
|
|
1166
|
+
"Dark": "{primitive.color.apple.900}"
|
|
1093
1167
|
}
|
|
1094
1168
|
}
|
|
1095
1169
|
}
|
|
@@ -1201,24 +1275,24 @@
|
|
|
1201
1275
|
}
|
|
1202
1276
|
},
|
|
1203
1277
|
"accent": {
|
|
1204
|
-
"$value": "{primitive.color.
|
|
1205
|
-
"$description": "Accent-intent text/icon color
|
|
1278
|
+
"$value": "{primitive.color.apple.700}",
|
|
1279
|
+
"$description": "Accent-intent text/icon color — a dark apple green legible on page and card surfaces. Pair with underline/weight for link affordance.",
|
|
1206
1280
|
"$extensions": {
|
|
1207
1281
|
"com.figma.variables": {
|
|
1208
1282
|
"modes": {
|
|
1209
|
-
"Light": "{primitive.color.
|
|
1210
|
-
"Dark": "{primitive.color.
|
|
1283
|
+
"Light": "{primitive.color.apple.700}",
|
|
1284
|
+
"Dark": "{primitive.color.apple.400}"
|
|
1211
1285
|
}
|
|
1212
1286
|
}
|
|
1213
1287
|
}
|
|
1214
1288
|
},
|
|
1215
1289
|
"onAccent": {
|
|
1216
|
-
"$value": "{primitive.color.neutral.
|
|
1217
|
-
"$description": "Text/icon color on accent fills
|
|
1290
|
+
"$value": "{primitive.color.neutral.900}",
|
|
1291
|
+
"$description": "Text/icon color on accent fills — a dark neutral, since the brand accent fill is a bright apple green in both light and dark mode.",
|
|
1218
1292
|
"$extensions": {
|
|
1219
1293
|
"com.figma.variables": {
|
|
1220
1294
|
"modes": {
|
|
1221
|
-
"Light": "{primitive.color.neutral.
|
|
1295
|
+
"Light": "{primitive.color.neutral.900}",
|
|
1222
1296
|
"Dark": "{primitive.color.neutral.900}"
|
|
1223
1297
|
}
|
|
1224
1298
|
}
|
|
@@ -1320,13 +1394,13 @@
|
|
|
1320
1394
|
}
|
|
1321
1395
|
},
|
|
1322
1396
|
"accent": {
|
|
1323
|
-
"$value": "{primitive.color.
|
|
1324
|
-
"$description": "Accent border
|
|
1397
|
+
"$value": "{primitive.color.apple.600}",
|
|
1398
|
+
"$description": "Accent border — apple green, dark enough to read as a boundary on page and card surfaces.",
|
|
1325
1399
|
"$extensions": {
|
|
1326
1400
|
"com.figma.variables": {
|
|
1327
1401
|
"modes": {
|
|
1328
|
-
"Light": "{primitive.color.
|
|
1329
|
-
"Dark": "{primitive.color.
|
|
1402
|
+
"Light": "{primitive.color.apple.600}",
|
|
1403
|
+
"Dark": "{primitive.color.apple.400}"
|
|
1330
1404
|
}
|
|
1331
1405
|
}
|
|
1332
1406
|
}
|
|
@@ -1838,37 +1912,37 @@
|
|
|
1838
1912
|
"accent": {
|
|
1839
1913
|
"$type": "color",
|
|
1840
1914
|
"rest": {
|
|
1841
|
-
"$value": "{primitive.color.
|
|
1842
|
-
"$description": "Default accent fill for interactive elements at rest
|
|
1915
|
+
"$value": "{primitive.color.apple.500}",
|
|
1916
|
+
"$description": "Default accent fill for interactive elements at rest — bright apple green. Pair with content.onAccent (a dark neutral).",
|
|
1843
1917
|
"$extensions": {
|
|
1844
1918
|
"com.figma.variables": {
|
|
1845
1919
|
"modes": {
|
|
1846
|
-
"Light": "{primitive.color.
|
|
1847
|
-
"Dark": "{primitive.color.
|
|
1920
|
+
"Light": "{primitive.color.apple.500}",
|
|
1921
|
+
"Dark": "{primitive.color.apple.400}"
|
|
1848
1922
|
}
|
|
1849
1923
|
}
|
|
1850
1924
|
}
|
|
1851
1925
|
},
|
|
1852
1926
|
"hover": {
|
|
1853
|
-
"$value": "{primitive.color.
|
|
1927
|
+
"$value": "{primitive.color.apple.600}",
|
|
1854
1928
|
"$description": "Accent fill on pointer hover.",
|
|
1855
1929
|
"$extensions": {
|
|
1856
1930
|
"com.figma.variables": {
|
|
1857
1931
|
"modes": {
|
|
1858
|
-
"Light": "{primitive.color.
|
|
1859
|
-
"Dark": "{primitive.color.
|
|
1932
|
+
"Light": "{primitive.color.apple.600}",
|
|
1933
|
+
"Dark": "{primitive.color.apple.500}"
|
|
1860
1934
|
}
|
|
1861
1935
|
}
|
|
1862
1936
|
}
|
|
1863
1937
|
},
|
|
1864
1938
|
"pressed": {
|
|
1865
|
-
"$value": "{primitive.color.
|
|
1939
|
+
"$value": "{primitive.color.apple.700}",
|
|
1866
1940
|
"$description": "Accent fill during active press.",
|
|
1867
1941
|
"$extensions": {
|
|
1868
1942
|
"com.figma.variables": {
|
|
1869
1943
|
"modes": {
|
|
1870
|
-
"Light": "{primitive.color.
|
|
1871
|
-
"Dark": "{primitive.color.
|
|
1944
|
+
"Light": "{primitive.color.apple.700}",
|
|
1945
|
+
"Dark": "{primitive.color.apple.600}"
|
|
1872
1946
|
}
|
|
1873
1947
|
}
|
|
1874
1948
|
}
|
|
@@ -1898,37 +1972,37 @@
|
|
|
1898
1972
|
}
|
|
1899
1973
|
},
|
|
1900
1974
|
"content": {
|
|
1901
|
-
"$value": "{primitive.color.
|
|
1902
|
-
"$description": "
|
|
1975
|
+
"$value": "{primitive.color.apple.700}",
|
|
1976
|
+
"$description": "Accent-intent text/icon color on neutral surfaces (a dark apple green) — pair with underline/weight for link affordance.",
|
|
1903
1977
|
"$extensions": {
|
|
1904
1978
|
"com.figma.variables": {
|
|
1905
1979
|
"modes": {
|
|
1906
|
-
"Light": "{primitive.color.
|
|
1907
|
-
"Dark": "{primitive.color.
|
|
1980
|
+
"Light": "{primitive.color.apple.700}",
|
|
1981
|
+
"Dark": "{primitive.color.apple.400}"
|
|
1908
1982
|
}
|
|
1909
1983
|
}
|
|
1910
1984
|
}
|
|
1911
1985
|
},
|
|
1912
1986
|
"contentHover": {
|
|
1913
|
-
"$value": "{primitive.color.
|
|
1987
|
+
"$value": "{primitive.color.apple.800}",
|
|
1914
1988
|
"$description": "Accent content color on pointer hover.",
|
|
1915
1989
|
"$extensions": {
|
|
1916
1990
|
"com.figma.variables": {
|
|
1917
1991
|
"modes": {
|
|
1918
|
-
"Light": "{primitive.color.
|
|
1919
|
-
"Dark": "{primitive.color.
|
|
1992
|
+
"Light": "{primitive.color.apple.800}",
|
|
1993
|
+
"Dark": "{primitive.color.apple.300}"
|
|
1920
1994
|
}
|
|
1921
1995
|
}
|
|
1922
1996
|
}
|
|
1923
1997
|
},
|
|
1924
1998
|
"subtle": {
|
|
1925
|
-
"$value": "{primitive.color.
|
|
1999
|
+
"$value": "{primitive.color.apple.50}",
|
|
1926
2000
|
"$description": "Low-emphasis accent tint for hover backgrounds and selection highlights.",
|
|
1927
2001
|
"$extensions": {
|
|
1928
2002
|
"com.figma.variables": {
|
|
1929
2003
|
"modes": {
|
|
1930
|
-
"Light": "{primitive.color.
|
|
1931
|
-
"Dark": "{primitive.color.
|
|
2004
|
+
"Light": "{primitive.color.apple.50}",
|
|
2005
|
+
"Dark": "{primitive.color.apple.900}"
|
|
1932
2006
|
}
|
|
1933
2007
|
}
|
|
1934
2008
|
}
|
|
@@ -1974,38 +2048,58 @@
|
|
|
1974
2048
|
}
|
|
1975
2049
|
},
|
|
1976
2050
|
"elevation": {
|
|
1977
|
-
"$
|
|
2051
|
+
"$extensions": {
|
|
2052
|
+
"com.hirobius.hds": {
|
|
2053
|
+
"$type": "elevation"
|
|
2054
|
+
}
|
|
2055
|
+
},
|
|
1978
2056
|
"flat": {
|
|
1979
|
-
"$
|
|
1980
|
-
|
|
1981
|
-
"
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
2057
|
+
"$description": "Flat surface (no shadow, hairline border) for embedded panels.",
|
|
2058
|
+
"$extensions": {
|
|
2059
|
+
"com.hirobius.hds": {
|
|
2060
|
+
"$value": {
|
|
2061
|
+
"surface": "{semantic.color.surface.page}",
|
|
2062
|
+
"shadow": null,
|
|
2063
|
+
"border": "{semantic.color.border.subtle}"
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
}
|
|
1985
2067
|
},
|
|
1986
2068
|
"raised": {
|
|
1987
|
-
"$
|
|
1988
|
-
|
|
1989
|
-
"
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
2069
|
+
"$description": "Resting card / panel elevation.",
|
|
2070
|
+
"$extensions": {
|
|
2071
|
+
"com.hirobius.hds": {
|
|
2072
|
+
"$value": {
|
|
2073
|
+
"surface": "{semantic.color.surface.raised}",
|
|
2074
|
+
"shadow": "{semantic.shadow.subtle}",
|
|
2075
|
+
"border": null
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
}
|
|
1993
2079
|
},
|
|
1994
2080
|
"floating": {
|
|
1995
|
-
"$
|
|
1996
|
-
|
|
1997
|
-
"
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2081
|
+
"$description": "Hover, menu, and popover elevation.",
|
|
2082
|
+
"$extensions": {
|
|
2083
|
+
"com.hirobius.hds": {
|
|
2084
|
+
"$value": {
|
|
2085
|
+
"surface": "{semantic.color.surface.raised}",
|
|
2086
|
+
"shadow": "{semantic.shadow.floating}",
|
|
2087
|
+
"border": null
|
|
2088
|
+
}
|
|
2089
|
+
}
|
|
2090
|
+
}
|
|
2001
2091
|
},
|
|
2002
2092
|
"overlay": {
|
|
2003
|
-
"$
|
|
2004
|
-
|
|
2005
|
-
"
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2093
|
+
"$description": "Modal, dialog, and drawer elevation.",
|
|
2094
|
+
"$extensions": {
|
|
2095
|
+
"com.hirobius.hds": {
|
|
2096
|
+
"$value": {
|
|
2097
|
+
"surface": "{semantic.color.surface.overlay}",
|
|
2098
|
+
"shadow": "{semantic.shadow.overlay}",
|
|
2099
|
+
"border": null
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
}
|
|
2009
2103
|
}
|
|
2010
2104
|
},
|
|
2011
2105
|
"size": {
|
|
@@ -2149,7 +2243,7 @@
|
|
|
2149
2243
|
"$description": "Tag label weight."
|
|
2150
2244
|
},
|
|
2151
2245
|
"lineHeight": {
|
|
2152
|
-
"$type": "
|
|
2246
|
+
"$type": "number",
|
|
2153
2247
|
"$value": "{primitive.typography.lineHeight.normal}",
|
|
2154
2248
|
"$description": "Readable label rhythm for tags."
|
|
2155
2249
|
},
|
package/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Hirobius Design System
|
|
2
2
|
|
|
3
|
-
Generated: 2026-10-
|
|
3
|
+
Generated: 2026-10-09T13:43:23.079Z
|
|
4
4
|
Primary sources: `public/hds-manifest.json`, `src/app/data/component-api.json`, `hirobius.tokens.json`
|
|
5
5
|
|
|
6
6
|
## Agents Using The Package: Start Here
|
|
@@ -9,6 +9,16 @@ Primary sources: `public/hds-manifest.json`, `src/app/data/component-api.json`,
|
|
|
9
9
|
- MCP server `hds` ships in the package: run `npx hds-mcp` (stdio). Tools: `list_core`, `search_components`, `get_component`, `search_tokens`; each answer is under 2 KB.
|
|
10
10
|
- Lint before you finish: `import hds from '@hirobius/design-system/eslint-plugin'` and spread `hds.configs.recommended` into `eslint.config.mjs`.
|
|
11
11
|
|
|
12
|
+
## Voice
|
|
13
|
+
|
|
14
|
+
How these docs speak. Every page, and every agent writing for HDS, follows it. Source: `content/docs/voice.mdx` (published at `/docs/voice`).
|
|
15
|
+
|
|
16
|
+
- Use plain words a reader already knows. Name a thing by what it does, not by how it is built.
|
|
17
|
+
- Keep sentences short, one idea each.
|
|
18
|
+
- Tell the reader what to do. Leave out brand adjectives.
|
|
19
|
+
- Keep maintainer references off public pages: issue and ADR numbers, script names, internal counts.
|
|
20
|
+
- Don't use: "systems-first".
|
|
21
|
+
|
|
12
22
|
## Pick By Need
|
|
13
23
|
|
|
14
24
|
One answer per need. Use the components after the arrow; what follows "Not:" is what agents reached for instead, which is the wrong answer for that need even where it has a purpose of its own. Generated from `mcp/guide.mjs`, the same list as `AGENTS.md`.
|
|
@@ -149,42 +159,54 @@ One line per component that declares when to use it (`@usage` / `@useInstead` in
|
|
|
149
159
|
|
|
150
160
|
Alert: [core] Show a persistent inline message with a severity, next to the content it concerns. Use instead: ToastProvider, Badge
|
|
151
161
|
AlertDialog: Confirm a destructive or irreversible action (delete, archive, remove) before it runs, with Cancel and Action buttons. Use instead: Dialog, ToastProvider
|
|
162
|
+
AssetImg: Show an image that scales to its frame, with a placeholder if it fails to load.
|
|
152
163
|
Avatar: [core] Show a person or entity as an image with an initials fallback. Use instead: Icon, Badge
|
|
153
164
|
Badge: [core] Label a status, state or count with a compact neutral or semantic chip, or a dot. Use instead: Tag, Alert
|
|
154
165
|
Box: [core] Build one-off layout that no named layout primitive covers, using token keys through `sx`. Use instead: Stack, Grid, Container
|
|
155
166
|
Breadcrumb: [core] Show where the current page sits in a hierarchy and link back up it. Use instead: Tabs, Pagination
|
|
156
|
-
Button: [core]
|
|
167
|
+
Button: [core] Run an action, such as submit, save or open a dialog. For an icon-only control pass iconOnly, iconLeft and label; for an on/off toggle pass pressed. Use instead: InlineLink
|
|
157
168
|
Card: [core] Group related content on a raised surface with header, body, footer and metric slots, or as one selectable option. Use instead: Surface, Card.Metric
|
|
158
169
|
CardMetric: Show one headline figure (a KPI, a count, a total) with its label inside a Card. Use instead: MetricTiles
|
|
159
170
|
Checkbox: [core] Let people tick one or more independent options, or a parent choice that is partly selected. Use instead: Toggle, Radio
|
|
171
|
+
CodeBlock: Show a code sample with a copy button, optionally collapsed.
|
|
160
172
|
Combobox: [core] Pick one value, or several with `multiple`, from a long list of options, with a search field that filters as you type. Use instead: Select, Menu
|
|
161
173
|
Container: [core] Constrain a page region to the content or maximum width and centre it. Use instead: Stack, Grid, Box
|
|
174
|
+
DataTableSection: Put a heading and toolbar above a Table.
|
|
175
|
+
DestructiveSection: Put a dangerous action, such as delete, in its own section with a warning and a confirm step.
|
|
162
176
|
Dialog: [core] Interrupt the page with a modal that needs a decision or focused input before people continue. Use instead: Tooltip, Alert, ToastProvider, AlertDialog
|
|
163
177
|
Disclosure: [core] Hide optional explanatory content behind a heading that people can expand. Use instead: Tabs
|
|
164
|
-
Divider: [core] Separate two
|
|
178
|
+
Divider: [core] Separate two blocks of content with a thin line. Use instead: Stack, Surface
|
|
165
179
|
EmptyState: [core] Say that a list, grid or section has no data yet, with a title and an optional description. Use instead: Skeleton, Alert
|
|
180
|
+
ErrorPattern: Show an error with a short message and a Back button, in place or as a full page.
|
|
166
181
|
Field: [core] Show a labelled read-only value, such as a name and its value in a detail view. Use instead: Input, Card.Metric
|
|
167
|
-
|
|
182
|
+
Form: Wrap form fields so they stack with even spacing.
|
|
183
|
+
FormActions: Lay out a form's buttons in a fixed order: danger on the left, then secondary, then primary on the right.
|
|
184
|
+
Grid: [core] Lay out content in columns that adapt to the screen width, or line up nested content with subgrid. Use instead: Stack, Box
|
|
168
185
|
HdsRouterProvider: [core] Wrap the app root once so HDS links and navigation use your client router; with no provider they stay plain anchors.
|
|
169
186
|
HdsThemeProvider: [core] Wrap an app or region once to set theme, density and other root attributes for everything inside it. Use instead: Surface
|
|
170
|
-
Icon: [core]
|
|
187
|
+
Icon: [core] Show a Lucide icon at a set size and color. Use instead: Button, Avatar
|
|
171
188
|
InlineLink: [core] Link to a route or external URL from inside body copy. Use instead: Button, Text
|
|
172
189
|
Input: [core] Collect a single line of text, a number, an email, a password, a date or a time, with label, helper and error slots. Use instead: Textarea, Select, Combobox
|
|
173
190
|
Kbd: [core] Show a keyboard key or shortcut hint inline, as a native kbd element. Use instead: Text
|
|
174
191
|
Menu: [core] Offer a list of actions from a trigger, closed until opened. Use instead: Select
|
|
192
|
+
MetricTile: Show one key number with its label, inside a MetricTiles row.
|
|
193
|
+
MetricTiles: Show a row of key numbers, one tile each.
|
|
194
|
+
Page: Wrap a screen in the standard width and padding.
|
|
195
|
+
PageHeader: Open a screen with its title, plus optional breadcrumb, status and actions.
|
|
175
196
|
Pagination: [core] Move between pages of a long result set, with truncated page numbers. Use instead: Breadcrumb
|
|
176
197
|
Popover: [core] Anchor interactive content, such as a short form, a filter set or a picker, to a trigger people click to open. Use instead: Tooltip, Menu, Dialog
|
|
177
198
|
Progress: [core] Show how far a task has got, as a bar or ring that is determinate or indeterminate. Use instead: Spinner, Skeleton
|
|
178
199
|
Radio: [core] Choose exactly one option from a small set that should stay visible together. Use instead: Checkbox, Select, SegmentedControl
|
|
200
|
+
Reveal: Fade content in as it scrolls into view.
|
|
179
201
|
SegmentedControl: [core] Switch between two to five mutually exclusive views or modes in a compact row. Use instead: Radio, Tabs, Select
|
|
180
202
|
Select: [core] Choose one value from a short list of options in a form field. Use instead: Menu, Combobox
|
|
181
203
|
Skeleton: [core] Reserve the shape of content that is still loading, so the layout does not jump. Use instead: Progress, Spinner
|
|
182
204
|
Slider: [core] Pick a number within a known range by dragging, when the exact value matters less than the position. Use instead: Input
|
|
183
205
|
Spinner: [core] Show that something is loading when the wait is short or has no measurable end. Use instead: Progress, Skeleton
|
|
184
|
-
Stack: [core] Space a row or column
|
|
206
|
+
Stack: [core] Space items in a row or column with even gaps. Use instead: Grid, Surface
|
|
185
207
|
Stat: Show one headline figure inline, inside prose or a dense list, with its label and an optional sub-line. Use instead: MetricTiles, Card.Metric, StatusTile
|
|
186
208
|
StatusTile: Show a titled status block with optional notes and a trailing badge or affordance. Use instead: MetricTiles, Card.Metric, StatusListItem
|
|
187
|
-
Surface: [core]
|
|
209
|
+
Surface: [core] Give a block of content a background and padding, with no header or footer. Use instead: Card, Stack
|
|
188
210
|
Table: [core] Show rows of structured data in aligned columns, with optional sorting. Use instead: Field, Stack
|
|
189
211
|
Tabs: [core] Switch between panels of related content in the same place, one visible at a time. Use instead: SegmentedControl, Disclosure
|
|
190
212
|
Tag: [core] Show an interactive filter or category chip that people can toggle. Use instead: Badge
|
package/mcp/catalog.mjs
CHANGED
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { readFileSync } from 'node:fs';
|
|
18
18
|
import { join } from 'node:path';
|
|
19
|
-
import {
|
|
19
|
+
import { CORE_COMPONENTS } from './core-set.mjs';
|
|
20
|
+
import { HOOKS, INTENTS, recommendedComponents } from './guide.mjs';
|
|
20
21
|
|
|
21
22
|
export const RESULT_BUDGET = 1900;
|
|
22
23
|
|
|
@@ -75,7 +76,7 @@ export function loadCatalog(root) {
|
|
|
75
76
|
|
|
76
77
|
/**
|
|
77
78
|
* The flags both search_components and get_component put on a component:
|
|
78
|
-
* `core`
|
|
79
|
+
* `core` for the ratified core set, `recommended` for the rest of what the guide prefers, `insteadFor` for each need it is the
|
|
79
80
|
* wrong answer to (the guide names `use` instead).
|
|
80
81
|
*/
|
|
81
82
|
const steer = (name) => {
|
|
@@ -84,11 +85,12 @@ export function loadCatalog(root) {
|
|
|
84
85
|
use: i.use[0],
|
|
85
86
|
}));
|
|
86
87
|
return {
|
|
87
|
-
...(
|
|
88
|
+
...(ratified.has(name) ? { core: true } : recommended.has(name) ? { recommended: true } : {}),
|
|
88
89
|
...(insteadFor.length ? { insteadFor } : {}),
|
|
89
90
|
};
|
|
90
91
|
};
|
|
91
|
-
const
|
|
92
|
+
const ratified = new Set(CORE_COMPONENTS);
|
|
93
|
+
const recommended = new Set(recommendedComponents());
|
|
92
94
|
const components = Object.keys(api)
|
|
93
95
|
.filter((name) => !api[name].hidden)
|
|
94
96
|
.sort();
|
|
@@ -126,14 +128,14 @@ export function loadCatalog(root) {
|
|
|
126
128
|
for (const name of components) {
|
|
127
129
|
const lower = name.toLowerCase();
|
|
128
130
|
if (lower === compact) add(name, 100);
|
|
129
|
-
else if (partAliases.has(name) && !
|
|
131
|
+
else if (partAliases.has(name) && !recommended.has(name)) continue;
|
|
130
132
|
else if (qWords.some((w) => w.length > 2 && (lower.includes(w) || w.includes(lower))))
|
|
131
133
|
add(name, 20);
|
|
132
134
|
const entry = api[name];
|
|
133
135
|
const text = words(`${entry.description} ${entry.usage?.when ?? ''}`);
|
|
134
136
|
add(name, 2 * qWords.filter((w) => text.includes(w)).length);
|
|
135
137
|
if (scores.get(name) > 0) {
|
|
136
|
-
if (
|
|
138
|
+
if (recommended.has(name)) add(name, 1);
|
|
137
139
|
}
|
|
138
140
|
}
|
|
139
141
|
const ranked = components
|
|
@@ -289,11 +291,12 @@ export function loadCatalog(root) {
|
|
|
289
291
|
|
|
290
292
|
// ── list_core ───────────────────────────────────────────────────────────
|
|
291
293
|
function listCore() {
|
|
292
|
-
const names = [...
|
|
294
|
+
const names = [...recommended].filter((n) => api[n]);
|
|
293
295
|
// `id → use`: short enough that every need fits; search_components takes the id.
|
|
294
296
|
const needs = INTENTS.map((i) => `${i.id} → ${i.use.join(', ')}`);
|
|
295
297
|
// Needs are ordered most common first; what does not fit is one search_components away.
|
|
296
298
|
return fitList(needs, (shown, dropped) => ({
|
|
299
|
+
set: 'recommended: the ratified core plus what the needs name',
|
|
297
300
|
root: names.filter((n) => !patternNames.has(n)),
|
|
298
301
|
patterns: names.filter((n) => patternNames.has(n)),
|
|
299
302
|
hooks: Object.keys(HOOKS),
|
package/mcp/core-set.mjs
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `core` rows of the hds#254 right-sizing table in
|
|
3
|
+
* docs/hds-architecture-2026-09-18.html (ratified 2026-09-26, #297), with the
|
|
4
|
+
* hds#315 renames applied: HdsCheckbox → Checkbox, HdsRadio → Radio,
|
|
5
|
+
* HdsSelect → Select, HdsSlider → Slider, HdsToggle → Toggle. The table has 42
|
|
6
|
+
* rows; ButtonGroup, ContextMenu and HoverCard were removed from the package in
|
|
7
|
+
* 0.20.0 (hds#394), which leaves 39. hds#393 adds Menu, Popover, Tooltip and
|
|
8
|
+
* HdsRouterProvider, each with a usage contract (and Menu, Popover and Tooltip
|
|
9
|
+
* a keyboard contract), which makes 43.
|
|
10
|
+
*
|
|
11
|
+
* THE ONLY FILE THAT LISTS THE CORE SET. It lives in mcp/ because mcp/ ships in
|
|
12
|
+
* the package and scripts/ does not; scripts/lib/core-components.mjs re-exports it,
|
|
13
|
+
* mcp/guide.mjs builds the recommended set on it, and the manifest `core` flag,
|
|
14
|
+
* llms.txt, SKILL.md and the README are generated from it
|
|
15
|
+
* (scripts/__tests__/core-set-sources.test.mjs fails on any disagreement).
|
|
16
|
+
*
|
|
17
|
+
* This is not the manifest `tier` field: 5 core components are `tier: pattern`
|
|
18
|
+
* and most `tier: primitive` components are not core. Read by
|
|
19
|
+
* scripts/check-contract-coverage.mjs.
|
|
20
|
+
*/
|
|
21
|
+
export const CORE_COMPONENTS = [
|
|
22
|
+
'Combobox',
|
|
23
|
+
'Checkbox',
|
|
24
|
+
'Radio',
|
|
25
|
+
'Select',
|
|
26
|
+
'Slider',
|
|
27
|
+
'Toggle',
|
|
28
|
+
'Input',
|
|
29
|
+
'SegmentedControl',
|
|
30
|
+
'Tag',
|
|
31
|
+
'Textarea',
|
|
32
|
+
'Box',
|
|
33
|
+
'Container',
|
|
34
|
+
'Disclosure',
|
|
35
|
+
'Divider',
|
|
36
|
+
'Grid',
|
|
37
|
+
'Stack',
|
|
38
|
+
'Surface',
|
|
39
|
+
'Avatar',
|
|
40
|
+
'Card',
|
|
41
|
+
'EmptyState',
|
|
42
|
+
'Field',
|
|
43
|
+
'Icon',
|
|
44
|
+
'Kbd',
|
|
45
|
+
'Table',
|
|
46
|
+
'Breadcrumb',
|
|
47
|
+
'InlineLink',
|
|
48
|
+
'Pagination',
|
|
49
|
+
'Tabs',
|
|
50
|
+
'Alert',
|
|
51
|
+
'Badge',
|
|
52
|
+
'Progress',
|
|
53
|
+
'Skeleton',
|
|
54
|
+
'Spinner',
|
|
55
|
+
'ToastProvider',
|
|
56
|
+
'Button',
|
|
57
|
+
'Dialog',
|
|
58
|
+
'Text',
|
|
59
|
+
'HdsThemeProvider',
|
|
60
|
+
'VisuallyHidden',
|
|
61
|
+
// hds#393 step 7
|
|
62
|
+
'Menu',
|
|
63
|
+
'Popover',
|
|
64
|
+
'Tooltip',
|
|
65
|
+
'HdsRouterProvider',
|
|
66
|
+
];
|