@hirobius/design-system 0.15.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.
- package/README.md +26 -70
- package/dist/chunks/LanguageContext-CH_bwzCq.js +83 -0
- package/dist/chunks/TokenDisplayContext-evZi_214.js +18 -0
- package/dist/chunks/activity-feed-C8_e-Btq.js +19955 -0
- package/dist/contexts.js +17 -16
- package/dist/hirobius-ui.js +3590 -21800
- package/dist/manifest.js +11 -11
- package/dist/patterns.js +423 -0
- package/dist/static.css +4 -4
- package/dist/styles.css +1 -1
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +74 -35
- package/dist/types/src/app/components/activity-feed.d.ts +6 -4
- package/dist/types/src/app/components/app-shell.d.ts +6 -4
- package/dist/types/src/app/components/asset-img.d.ts +3 -1
- package/dist/types/src/app/components/avatar-group.d.ts +3 -3
- package/dist/types/src/app/components/avatar.d.ts +3 -3
- package/dist/types/src/app/components/badge.d.ts +3 -3
- package/dist/types/src/app/components/blockquote.d.ts +3 -3
- package/dist/types/src/app/components/breadcrumb.d.ts +3 -3
- package/dist/types/src/app/components/button-group.d.ts +3 -3
- package/dist/types/src/app/components/button.d.ts +6 -6
- package/dist/types/src/app/components/calendar.d.ts +3 -1
- package/dist/types/src/app/components/callout.d.ts +4 -4
- package/dist/types/src/app/components/card.d.ts +5 -5
- package/dist/types/src/app/components/carousel.d.ts +6 -4
- package/dist/types/src/app/components/checkbox.d.ts +3 -3
- package/dist/types/src/app/components/cinematic-link.d.ts +7 -1
- package/dist/types/src/app/components/circular-progress.d.ts +3 -3
- package/dist/types/src/app/components/code-block.d.ts +20 -18
- package/dist/types/src/app/components/command-palette.d.ts +9 -9
- package/dist/types/src/app/components/component-instance-matrix.d.ts +8 -2
- package/dist/types/src/app/components/disclosure.d.ts +3 -3
- package/dist/types/src/app/components/divider.d.ts +4 -4
- package/dist/types/src/app/components/doc-link-card.d.ts +6 -4
- package/dist/types/src/app/components/error-pattern.d.ts +3 -1
- package/dist/types/src/app/components/field.d.ts +4 -4
- package/dist/types/src/app/components/file-input.d.ts +7 -5
- package/dist/types/src/app/components/foundation-swatch.d.ts +6 -0
- package/dist/types/src/app/components/hds-tooltip.d.ts +11 -11
- package/dist/types/src/app/components/heading-stack.d.ts +6 -6
- package/dist/types/src/app/components/hover-card.d.ts +1 -1
- package/dist/types/src/app/components/image-lightbox.d.ts +2 -0
- package/dist/types/src/app/components/inline-code.d.ts +3 -3
- package/dist/types/src/app/components/input-group.d.ts +3 -3
- package/dist/types/src/app/components/input.d.ts +5 -5
- package/dist/types/src/app/components/kbd.d.ts +3 -3
- package/dist/types/src/app/components/metadata-list.d.ts +3 -3
- package/dist/types/src/app/components/nav-group.d.ts +3 -3
- package/dist/types/src/app/components/nav-item.d.ts +10 -8
- package/dist/types/src/app/components/overflow-list.d.ts +3 -1
- package/dist/types/src/app/components/page.d.ts +3 -1
- package/dist/types/src/app/components/progress.d.ts +3 -3
- package/dist/types/src/app/components/radio.d.ts +3 -3
- package/dist/types/src/app/components/reveal.d.ts +3 -1
- package/dist/types/src/app/components/segmented-control.d.ts +31 -31
- package/dist/types/src/app/components/select.d.ts +29 -0
- package/dist/types/src/app/components/selectable-card.d.ts +3 -3
- package/dist/types/src/app/components/side-nav.d.ts +6 -4
- package/dist/types/src/app/components/skeleton.d.ts +3 -3
- package/dist/types/src/app/components/sketch.d.ts +6 -0
- package/dist/types/src/app/components/slider.d.ts +3 -3
- package/dist/types/src/app/components/spinner.d.ts +3 -3
- package/dist/types/src/app/components/stacked-card-rail.d.ts +32 -0
- package/dist/types/src/app/components/stat.d.ts +3 -3
- package/dist/types/src/app/components/status-dot.d.ts +4 -4
- package/dist/types/src/app/components/status-list-item.d.ts +3 -3
- package/dist/types/src/app/components/stepper.d.ts +6 -4
- package/dist/types/src/app/components/surface.d.ts +4 -4
- package/dist/types/src/app/components/table.d.ts +22 -11
- package/dist/types/src/app/components/tag.d.ts +4 -4
- package/dist/types/src/app/components/text.d.ts +3 -3
- package/dist/types/src/app/components/textarea.d.ts +4 -4
- package/dist/types/src/app/components/time-input.d.ts +3 -3
- package/dist/types/src/app/components/toast.d.ts +3 -3
- package/dist/types/src/app/components/toggle-button.d.ts +4 -4
- package/dist/types/src/app/components/toggle.d.ts +3 -3
- package/dist/types/src/app/components/token.d.ts +23 -17
- package/dist/types/src/app/components/toolbar.d.ts +1 -1
- package/dist/types/src/app/components/tooltip.d.ts +2 -2
- package/dist/types/src/app/components/top-nav.d.ts +3 -1
- package/dist/types/src/app/components/tree-list.d.ts +3 -1
- package/dist/types/src/app/design-system/generated-token-refs.d.ts +39 -6
- package/dist/types/src/app/design-system/generated-token-values.d.ts +12 -16
- package/dist/types/src/app/design-system/tokens.d.ts +16 -5
- package/dist/types/src/app/layouts/DocLayout.d.ts +0 -2
- package/dist/types/src/app/layouts/HdsDocsShell.d.ts +72 -0
- package/dist/types/src/app/layouts/HdsSystemDocLayout.d.ts +8 -1
- package/dist/types/src/index.d.ts +216 -39
- package/dist/types/src/patterns.d.ts +37 -0
- package/dist/variables.css +100 -28
- package/hirobius.tokens.json +199 -88
- package/package.json +43 -28
- package/public/hds-manifest.json +1916 -601
- package/dist/chunks/TokenDisplayContext-B3gxyQN7.js +0 -96
- /package/dist/types/src/app/components/{lab/tokenUtils.d.ts → tokenUtils.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
# Hirobius Design System
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://github.com/hirobius/hds/actions/workflows/ci.yml) [](https://www.npmjs.com/package/@hirobius/design-system) [](https://hirobius-design-system.vercel.app)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
+
[](https://hirobius-design-system.vercel.app)
|
|
12
12
|
|
|
13
13
|
<!-- auto:start:front-door-counts -->
|
|
14
14
|
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
15
|
+
- **109** public component modules, exported from `src/index.ts`
|
|
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
|
|
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
|
-
|
|
151
|
-
|
|
152
|
-
##
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
**
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
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,
|
|
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
|
+
};
|