@hirobius/design-system 0.16.0 → 0.17.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.
Files changed (89) hide show
  1. package/README.md +25 -69
  2. package/dist/chunks/LanguageContext-CH_bwzCq.js +83 -0
  3. package/dist/chunks/TokenDisplayContext-evZi_214.js +18 -0
  4. package/dist/chunks/activity-feed-C8_e-Btq.js +19955 -0
  5. package/dist/contexts.js +17 -16
  6. package/dist/hirobius-ui.js +3652 -23311
  7. package/dist/manifest.js +5 -5
  8. package/dist/patterns.js +423 -0
  9. package/dist/static.css +4 -4
  10. package/dist/styles.css +1 -1
  11. package/dist/tokens.css +1 -1
  12. package/dist/tokens.js +34 -13
  13. package/dist/types/src/app/components/activity-feed.d.ts +6 -4
  14. package/dist/types/src/app/components/app-shell.d.ts +6 -4
  15. package/dist/types/src/app/components/asset-img.d.ts +3 -1
  16. package/dist/types/src/app/components/avatar-group.d.ts +3 -3
  17. package/dist/types/src/app/components/avatar.d.ts +3 -3
  18. package/dist/types/src/app/components/badge.d.ts +3 -3
  19. package/dist/types/src/app/components/blockquote.d.ts +3 -3
  20. package/dist/types/src/app/components/breadcrumb.d.ts +3 -3
  21. package/dist/types/src/app/components/button-group.d.ts +3 -3
  22. package/dist/types/src/app/components/button.d.ts +6 -6
  23. package/dist/types/src/app/components/calendar.d.ts +3 -1
  24. package/dist/types/src/app/components/callout.d.ts +4 -4
  25. package/dist/types/src/app/components/card.d.ts +5 -5
  26. package/dist/types/src/app/components/carousel.d.ts +6 -4
  27. package/dist/types/src/app/components/checkbox.d.ts +3 -3
  28. package/dist/types/src/app/components/circular-progress.d.ts +3 -3
  29. package/dist/types/src/app/components/code-block.d.ts +20 -18
  30. package/dist/types/src/app/components/command-palette.d.ts +9 -9
  31. package/dist/types/src/app/components/component-instance-matrix.d.ts +1 -1
  32. package/dist/types/src/app/components/disclosure.d.ts +3 -3
  33. package/dist/types/src/app/components/divider.d.ts +4 -4
  34. package/dist/types/src/app/components/doc-link-card.d.ts +6 -4
  35. package/dist/types/src/app/components/error-pattern.d.ts +3 -1
  36. package/dist/types/src/app/components/field.d.ts +4 -4
  37. package/dist/types/src/app/components/file-input.d.ts +7 -5
  38. package/dist/types/src/app/components/hds-tooltip.d.ts +11 -11
  39. package/dist/types/src/app/components/heading-stack.d.ts +6 -6
  40. package/dist/types/src/app/components/hover-card.d.ts +1 -1
  41. package/dist/types/src/app/components/image-lightbox.d.ts +2 -0
  42. package/dist/types/src/app/components/inline-code.d.ts +3 -3
  43. package/dist/types/src/app/components/input-group.d.ts +3 -3
  44. package/dist/types/src/app/components/input.d.ts +5 -5
  45. package/dist/types/src/app/components/kbd.d.ts +3 -3
  46. package/dist/types/src/app/components/metadata-list.d.ts +3 -3
  47. package/dist/types/src/app/components/nav-group.d.ts +3 -3
  48. package/dist/types/src/app/components/nav-item.d.ts +10 -8
  49. package/dist/types/src/app/components/overflow-list.d.ts +3 -1
  50. package/dist/types/src/app/components/page.d.ts +3 -1
  51. package/dist/types/src/app/components/progress.d.ts +3 -3
  52. package/dist/types/src/app/components/radio.d.ts +3 -3
  53. package/dist/types/src/app/components/reveal.d.ts +3 -1
  54. package/dist/types/src/app/components/segmented-control.d.ts +31 -31
  55. package/dist/types/src/app/components/select.d.ts +3 -3
  56. package/dist/types/src/app/components/selectable-card.d.ts +3 -3
  57. package/dist/types/src/app/components/side-nav.d.ts +6 -4
  58. package/dist/types/src/app/components/skeleton.d.ts +3 -3
  59. package/dist/types/src/app/components/slider.d.ts +3 -3
  60. package/dist/types/src/app/components/spinner.d.ts +3 -3
  61. package/dist/types/src/app/components/stacked-card-rail.d.ts +32 -0
  62. package/dist/types/src/app/components/stat.d.ts +3 -3
  63. package/dist/types/src/app/components/status-dot.d.ts +4 -4
  64. package/dist/types/src/app/components/status-list-item.d.ts +3 -3
  65. package/dist/types/src/app/components/stepper.d.ts +6 -4
  66. package/dist/types/src/app/components/surface.d.ts +4 -4
  67. package/dist/types/src/app/components/table.d.ts +22 -11
  68. package/dist/types/src/app/components/tag.d.ts +4 -4
  69. package/dist/types/src/app/components/text.d.ts +3 -3
  70. package/dist/types/src/app/components/textarea.d.ts +4 -4
  71. package/dist/types/src/app/components/time-input.d.ts +3 -3
  72. package/dist/types/src/app/components/toast.d.ts +3 -3
  73. package/dist/types/src/app/components/toggle-button.d.ts +4 -4
  74. package/dist/types/src/app/components/toggle.d.ts +3 -3
  75. package/dist/types/src/app/components/token.d.ts +16 -16
  76. package/dist/types/src/app/components/toolbar.d.ts +1 -1
  77. package/dist/types/src/app/components/tooltip.d.ts +2 -2
  78. package/dist/types/src/app/components/top-nav.d.ts +3 -1
  79. package/dist/types/src/app/components/tree-list.d.ts +3 -1
  80. package/dist/types/src/app/design-system/generated-token-refs.d.ts +36 -0
  81. package/dist/types/src/app/design-system/generated-token-values.d.ts +10 -10
  82. package/dist/types/src/app/design-system/tokens.d.ts +16 -0
  83. package/dist/types/src/index.d.ts +193 -8
  84. package/dist/types/src/patterns.d.ts +37 -0
  85. package/dist/variables.css +42 -22
  86. package/hirobius.tokens.json +178 -57
  87. package/package.json +12 -9
  88. package/public/hds-manifest.json +473 -445
  89. package/dist/chunks/TokenDisplayContext-B3gxyQN7.js +0 -96
package/README.md CHANGED
@@ -1,20 +1,20 @@
1
1
  # Hirobius Design System
2
2
 
3
- A publishable React + TypeScript component library backed by a governed design-token pipeline, published to npm as `@hirobius/design-system`.
3
+ [![CI](https://github.com/hirobius/hds/actions/workflows/ci.yml/badge.svg)](https://github.com/hirobius/hds/actions/workflows/ci.yml) [![npm](https://img.shields.io/npm/v/@hirobius/design-system)](https://www.npmjs.com/package/@hirobius/design-system) [![Storybook](https://img.shields.io/badge/Storybook-live-ff4785)](https://hirobius-design-system.vercel.app)
4
4
 
5
- <!--
6
- PLACEHOLDER — ADRIAN TO WRITE (hds front-door PR).
7
- If you want the README to mention the July–September 2026 pause, put one or
8
- two sentences here in your own words, then delete this comment. Leaving the
9
- comment in place publishes nothing. Do not restore the old status line this
10
- PR removed: CI, release, and Chromatic triggers were restored in #204.
11
- -->
5
+ React + TypeScript component library on a governed design-token pipeline. Live Storybook: **<https://hirobius-design-system.vercel.app>**
6
+
7
+ ```bash
8
+ pnpm add @hirobius/design-system
9
+ ```
10
+
11
+ [![Buttons under the Brand and Theme dials: base and accent-lilac, light and dark](docs/images/storybook-brand-theme-dials.png)](https://hirobius-design-system.vercel.app)
12
12
 
13
13
  <!-- auto:start:front-door-counts -->
14
14
 
15
15
  - **109** public component modules, exported from `src/index.ts`
16
- - **359** DTCG tokens in `hirobius.tokens.json`, compiled to CSS variables and TypeScript constants
17
- - **454** Storybook stories in **115** story files, reviewed visually in Chromatic
16
+ - **379** DTCG tokens in `hirobius.tokens.json`, compiled to CSS variables and TypeScript constants
17
+ - **455** Storybook stories in **115** story files
18
18
 
19
19
  <!-- auto:end:front-door-counts -->
20
20
 
@@ -125,7 +125,7 @@ Core verification commands:
125
125
  ```bash
126
126
  pnpm typecheck
127
127
  pnpm lint
128
- pnpm exec vitest run # unit + contract tests, as the pre-push hook and CI run them
128
+ pnpm test # pretest gates + unit + contract tests, exactly as the pre-push hook and CI run them
129
129
  pnpm tokens:verify
130
130
  pnpm check:size
131
131
  pnpm build-storybook
@@ -147,62 +147,18 @@ Source-of-truth files:
147
147
  - `DESIGN.md` — lean visual spec for agents and engineers.
148
148
  - `DESIGN-HANDOFF.md` — verbose visual mirror for handoff and review.
149
149
 
150
- <!-- design-links:start (generated by `pnpm figma:links`; edit the @figma JSDoc tag, not this section) -->
151
-
152
- ## Design ↔ Code links
153
-
154
- Each component has one Figma source: `figmaUrl` in `public/hds-manifest.json`, which `pnpm manifest:generate` sets from the `@figma` tag in the component JSDoc. `pnpm figma:links` keeps this table current and Storybook reads the same field (`parameters.design`). The Figma-side links (dev resources and component descriptions) exist only once someone runs their steps in [`figma/README.md`](figma/README.md).
155
-
156
- **44 of 140** components link a Figma node.
157
-
158
- | Component | Figma node | Story | Source |
159
- | ------------------ | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | ----------------------------------------------------------------- |
160
- | `Alert` | [33:34](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=33-34) | [alert.stories.tsx](src/stories/alert.stories.tsx) | [alert.tsx](src/app/components/alert.tsx) |
161
- | `Avatar` | [34:18](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=34-18) | [avatar.stories.tsx](src/stories/avatar.stories.tsx) | [avatar.tsx](src/app/components/avatar.tsx) |
162
- | `Badge` | [31:15](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=31-15) | [badge.stories.tsx](src/stories/badge.stories.tsx) | [badge.tsx](src/app/components/badge.tsx) |
163
- | `Breadcrumb` | [86:159](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=86-159) | [breadcrumb.stories.tsx](src/stories/breadcrumb.stories.tsx) | [breadcrumb.tsx](src/app/components/breadcrumb.tsx) |
164
- | `Button` | [28:138](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=28-138) | [button.stories.tsx](src/stories/button.stories.tsx) | [button.tsx](src/app/components/button.tsx) |
165
- | `Callout` | [88:85](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=88-85) | [callout.stories.tsx](src/stories/callout.stories.tsx) | [callout.tsx](src/app/components/callout.tsx) |
166
- | `Card` | [39:11](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=39-11) | [card.stories.tsx](src/stories/card.stories.tsx) | [card.tsx](src/app/components/card.tsx) |
167
- | `CodeBlock` | [89:154](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=89-154) | [code-block.stories.tsx](src/stories/code-block.stories.tsx) | [code-block.tsx](src/app/components/code-block.tsx) |
168
- | `Combobox` | [82:237](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=82-237) | [combobox.stories.tsx](src/stories/combobox.stories.tsx) | [combobox.tsx](src/app/components/combobox.tsx) |
169
- | `Dialog` | [93:27](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=93-27) | [dialog.stories.tsx](src/stories/dialog.stories.tsx) | [dialog.tsx](src/app/components/dialog.tsx) |
170
- | `Disclosure` | [88:453](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=88-453) | [disclosure.stories.tsx](src/stories/disclosure.stories.tsx) | [disclosure.tsx](src/app/components/disclosure.tsx) |
171
- | `Divider` | [89:26](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=89-26) | [divider.stories.tsx](src/stories/divider.stories.tsx) | [divider.tsx](src/app/components/divider.tsx) |
172
- | `EmptyState` | [88:352](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=88-352) | [empty-state.stories.tsx](src/stories/empty-state.stories.tsx) | [empty-state.tsx](src/app/components/empty-state.tsx) |
173
- | `Field` | [85:81](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=85-81) | [field.stories.tsx](src/stories/field.stories.tsx) | [field.tsx](src/app/components/field.tsx) |
174
- | `Form` | [85:94](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=85-94) | [form.stories.tsx](src/stories/form.stories.tsx) | [form.tsx](src/app/components/form.tsx) |
175
- | `HdsCheckbox` | [35:29](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=35-29) | [checkbox.stories.tsx](src/stories/checkbox.stories.tsx) | [checkbox.tsx](src/app/components/checkbox.tsx) |
176
- | `HdsRadio` | [36:17](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=36-17) | [radio.stories.tsx](src/stories/radio.stories.tsx) | [radio.tsx](src/app/components/radio.tsx) |
177
- | `HdsSelect` | [82:49](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=82-49) | [select.stories.tsx](src/stories/select.stories.tsx) | [select.tsx](src/app/components/select.tsx) |
178
- | `HdsSlider` | [82:265](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=82-265) | [slider.stories.tsx](src/stories/slider.stories.tsx) | [slider.tsx](src/app/components/slider.tsx) |
179
- | `HdsToggle` | [37:19](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=37-19) | [toggle.stories.tsx](src/stories/toggle.stories.tsx) | [toggle.tsx](src/app/components/toggle.tsx) |
180
- | `IconButton` | [40:39](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=40-39) | [icon-button.stories.tsx](src/stories/icon-button.stories.tsx) | [icon-button.tsx](src/app/components/icon-button.tsx) |
181
- | `InlineCode` | [89:155](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=89-155) | [inline-code.stories.tsx](src/stories/inline-code.stories.tsx) | [inline-code.tsx](src/app/components/inline-code.tsx) |
182
- | `InlineLink` | [89:161](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=89-161) | [inline-link.stories.tsx](src/stories/inline-link.stories.tsx) | [inline-link.tsx](src/app/components/inline-link.tsx) |
183
- | `Input` | [38:20](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=38-20) | [input.stories.tsx](src/stories/input.stories.tsx) | [input.tsx](src/app/components/input.tsx) |
184
- | `Menu` | [93:59](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=93-59) | [menu.stories.tsx](src/stories/menu.stories.tsx) | [menu.tsx](src/app/components/menu.tsx) |
185
- | `NavGroup` | [86:304](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=86-304) | [nav-group.stories.tsx](src/stories/nav-group.stories.tsx) | [nav-group.tsx](src/app/components/nav-group.tsx) |
186
- | `NavItem` | [86:258](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=86-258) | [nav-item.stories.tsx](src/stories/nav-item.stories.tsx) | [nav-item.tsx](src/app/components/nav-item.tsx) |
187
- | `Pagination` | [86:194](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=86-194) | [pagination.stories.tsx](src/stories/pagination.stories.tsx) | [pagination.tsx](src/app/components/pagination.tsx) |
188
- | `Popover` | [93:32](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=93-32) | [popover.stories.tsx](src/stories/popover.stories.tsx) | [popover.tsx](src/app/components/popover.tsx) |
189
- | `Progress` | [88:91](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=88-91) | [progress.stories.tsx](src/stories/progress.stories.tsx) | [progress.tsx](src/app/components/progress.tsx) |
190
- | `SegmentedControl` | [82:334](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=82-334) | [segmented-control.stories.tsx](src/stories/segmented-control.stories.tsx) | [segmented-control.tsx](src/app/components/segmented-control.tsx) |
191
- | `SideNav` | [86:332](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=86-332) | [side-nav.stories.tsx](src/stories/side-nav.stories.tsx) | [side-nav.tsx](src/app/components/side-nav.tsx) |
192
- | `Skeleton` | [88:95](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=88-95) | [skeleton.stories.tsx](src/stories/skeleton.stories.tsx) | [skeleton.tsx](src/app/components/skeleton.tsx) |
193
- | `Spinner` | [88:106](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=88-106) | [spinner.stories.tsx](src/stories/spinner.stories.tsx) | [spinner.tsx](src/app/components/spinner.tsx) |
194
- | `Stat` | [88:247](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=88-247) | [stat.stories.tsx](src/stories/stat.stories.tsx) | [stat.tsx](src/app/components/stat.tsx) |
195
- | `StatusListItem` | [88:350](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=88-350) | [status-list-item.stories.tsx](src/stories/status-list-item.stories.tsx) | [status-list-item.tsx](src/app/components/status-list-item.tsx) |
196
- | `StatusTile` | [88:292](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=88-292) | [status-tile.stories.tsx](src/stories/status-tile.stories.tsx) | [status-tile.tsx](src/app/components/status-tile.tsx) |
197
- | `StepperField` | [82:425](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=82-425) | [stepper-field.stories.tsx](src/stories/stepper-field.stories.tsx) | [stepper-field.tsx](src/app/components/stepper-field.tsx) |
198
- | `Surface` | [89:27](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=89-27) | [surface.stories.tsx](src/stories/surface.stories.tsx) | [surface.tsx](src/app/components/surface.tsx) |
199
- | `Table` | [89:300](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=89-300) | [table.stories.tsx](src/stories/table.stories.tsx) | [table.tsx](src/app/components/table.tsx) |
200
- | `Tabs` | [86:89](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=86-89) | [tabs.stories.tsx](src/stories/tabs.stories.tsx) | [tabs.tsx](src/app/components/tabs.tsx) |
201
- | `Tag` | [32:11](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=32-11) | [tag.stories.tsx](src/stories/tag.stories.tsx) | [tag.tsx](src/app/components/tag.tsx) |
202
- | `Textarea` | [85:14](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=85-14) | [textarea.stories.tsx](src/stories/textarea.stories.tsx) | [textarea.tsx](src/app/components/textarea.tsx) |
203
- | `ToastProvider` | [93:367](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=93-367) | [toast.stories.tsx](src/stories/toast.stories.tsx) | [toast.tsx](src/app/components/toast.tsx) |
204
-
205
- <!-- design-links:end -->
150
+ Component-by-component Figma links live in [docs/DESIGN_LINKS.md](docs/DESIGN_LINKS.md), generated by `pnpm figma:links`.
151
+
152
+ ## Accessibility
153
+
154
+ What CI and the hooks check today, and nothing more:
155
+
156
+ - **Contrast:** `scripts/check-contrast.mjs` enforces WCAG AA contrast on the core token pairs, in light and dark. It runs in CI and the pre-commit hook.
157
+ - **Lint:** `jsx-a11y` rules run inside ESLint with zero warnings allowed.
158
+ - **Focus:** `scripts/check-focus-states.mjs` (`pnpm check:focus`) audits focus styles on interactive components. It runs in the agent gate and on demand, not in the main CI workflow, and currently reports 1 violation (`src/app/components/asset-img.tsx`).
159
+ - **Storybook:** the `addon-a11y` panel shows axe results for each story while you review it. It reports; it does not gate.
160
+
161
+ There is no automated screen-reader testing.
206
162
 
207
163
  ## Visual direction: Editorial Enterprise
208
164
 
@@ -218,9 +174,9 @@ The governing direction is "Editorial Enterprise" — enterprise rigor with edit
218
174
  The gates are deterministic and need no browser or live site:
219
175
 
220
176
  - **pre-commit** (`.husky/pre-commit`): secrets scan, Prettier on staged files, typecheck, zero-warning ESLint, and token validity and contrast.
221
- - **pre-push** (`.husky/pre-push`): Vitest unit and contract tests, then the consumer smoke build (library build, subpath resolution, publint, consumer typecheck).
177
+ - **pre-push** (`.husky/pre-push`): `pnpm test` (the pretest gates, then Vitest unit and contract tests), then the consumer smoke build (library build, subpath resolution, publint, consumer typecheck).
222
178
  - **CI** (`.github/workflows/ci.yml`): typecheck, zero-warning ESLint, token validity and contrast, Vitest, and the consumer smoke build, plus bundle budgets and a Storybook build.
223
- - **Visual review:** Storybook is the visual verification surface, and Chromatic (`.github/workflows/chromatic.yml`) runs it on pull requests. The earlier browser test suite drove a docs site that no longer exists; it is archived in `tests-archive/`.
179
+ - **Visual review:** Storybook is the visual verification surface, reviewed by hand. The earlier browser test suite drove a docs site that no longer exists and was removed (ADR-018).
224
180
 
225
181
  `CLAUDE.md` is the operating contract for agents working in this repo.
226
182
 
@@ -0,0 +1,83 @@
1
+ 'use client';
2
+ import { jsx as r } from "react/jsx-runtime";
3
+ import { useContext as c, createContext as s, forwardRef as p, useState as v, useEffect as w, useCallback as u } from "react";
4
+ const l = s(null);
5
+ function E({ state: e, children: t }) {
6
+ return /* @__PURE__ */ r(l.Provider, { value: e, children: t });
7
+ }
8
+ function S() {
9
+ return c(l);
10
+ }
11
+ const x = p(
12
+ function({ to: t, children: n, ...i }, a) {
13
+ return /* @__PURE__ */ r("a", { ref: a, href: t, ...i, children: n });
14
+ }
15
+ ), d = s(null);
16
+ function A({ adapter: e, children: t }) {
17
+ return /* @__PURE__ */ r(d.Provider, { value: e, children: t });
18
+ }
19
+ function P() {
20
+ const e = c(d);
21
+ return e || {
22
+ navigate: (t) => {
23
+ typeof window < "u" && window.location.assign(t);
24
+ },
25
+ currentPath: typeof window < "u" ? window.location.pathname : "/",
26
+ LinkComponent: x
27
+ };
28
+ }
29
+ const g = {
30
+ en: {
31
+ language: "en",
32
+ dir: "ltr",
33
+ label: "English",
34
+ nativeLabel: "English"
35
+ }
36
+ }, f = s({
37
+ language: "en",
38
+ direction: "ltr",
39
+ isRtl: !1,
40
+ setLanguage: () => {
41
+ },
42
+ setDirection: () => {
43
+ },
44
+ toggleDirection: () => {
45
+ },
46
+ options: g
47
+ });
48
+ function b() {
49
+ try {
50
+ const e = localStorage.getItem("hds-direction");
51
+ if (e === "ltr" || e === "rtl") return e;
52
+ } catch {
53
+ }
54
+ return "ltr";
55
+ }
56
+ function R({ children: e }) {
57
+ const [t, n] = v(b), i = "en", a = t === "rtl";
58
+ w(() => {
59
+ try {
60
+ localStorage.setItem("hds-direction", t);
61
+ } catch {
62
+ }
63
+ document.documentElement.setAttribute("lang", "en"), document.documentElement.setAttribute("data-language", "en"), document.documentElement.setAttribute("dir", t), document.documentElement.setAttribute("data-reading-direction", t);
64
+ }, [t]);
65
+ const m = u((o) => {
66
+ }, []), L = u((o) => {
67
+ n(o);
68
+ }, []), h = u(() => {
69
+ n((o) => o === "ltr" ? "rtl" : "ltr");
70
+ }, []);
71
+ return /* @__PURE__ */ r(f.Provider, { value: { language: i, direction: t, isRtl: a, setLanguage: m, setDirection: L, toggleDirection: h, options: g }, children: e });
72
+ }
73
+ function H() {
74
+ return c(f);
75
+ }
76
+ export {
77
+ E as F,
78
+ A as H,
79
+ R as L,
80
+ P as a,
81
+ H as b,
82
+ S as u
83
+ };
@@ -0,0 +1,18 @@
1
+ 'use client';
2
+ import { jsx as r } from "react/jsx-runtime";
3
+ import { useState as i, useContext as a, createContext as u } from "react";
4
+ const o = u(void 0);
5
+ function c({ children: s }) {
6
+ const [t, e] = i(!1);
7
+ return /* @__PURE__ */ r(o.Provider, { value: { showCss: t, setShowCss: e, toggleCss: () => e((n) => !n) }, children: s });
8
+ }
9
+ function f() {
10
+ const s = a(o);
11
+ return s || { showCss: !1, setShowCss: () => {
12
+ }, toggleCss: () => {
13
+ } };
14
+ }
15
+ export {
16
+ c as T,
17
+ f as u
18
+ };