@hirobius/design-system 0.23.0 → 0.23.2
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 +1 -1
- package/CHANGELOG.md +45 -0
- package/CONSUMING.md +3 -3
- package/DESIGN.md +2 -2
- package/NOTICE.md +3 -3
- package/README.md +16 -17
- package/UPGRADING.md +23 -1
- package/codemods/hds-prefix.mjs +0 -1
- package/codemods/jsx-fold.mjs +0 -1
- package/codemods/lib/scan.mjs +0 -1
- package/codemods/patterns-subpath.mjs +0 -1
- package/dist/chunks/{empty-state-ChC_xZfg.js → empty-state-BQ1v7ZIx.js} +15 -15
- package/dist/css-contract.json +1 -1
- package/dist/fonts/ibm-plex-mono-LICENSE.txt +93 -0
- package/dist/fonts/plus-jakarta-sans-400.woff2 +0 -0
- package/dist/fonts/plus-jakarta-sans-500.woff2 +0 -0
- package/dist/fonts/plus-jakarta-sans-700.woff2 +0 -0
- package/dist/fonts/plus-jakarta-sans-LICENSE.txt +22 -0
- package/dist/fonts.css +14 -14
- package/dist/hirobius-ui.js +86 -86
- package/dist/manifest.js +9 -9
- package/dist/patterns.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +2 -2
- package/dist/types/src/app/components/error-pattern.d.ts +1 -0
- package/dist/types/src/app/components/metric-tiles.d.ts +1 -0
- package/dist/types/src/app/components/page-header.d.ts +1 -0
- package/dist/types/src/app/context/hds-theme.d.ts +1 -1
- package/dist/types/src/app/design-system/generated-token-values.d.ts +2 -2
- package/dist/types/src/index.d.ts +0 -8
- package/dist/types/src/lib/deprecation.d.ts +1 -1
- package/dist/variables.css +6 -6
- package/docs/CONSUMING.md +5 -5
- package/hirobius.tokens.json +6 -14
- package/llms.txt +3 -3
- package/package.json +7 -25
- package/public/hds-manifest.json +192 -1251
- package/public/llms/scroll.txt +1 -1
- package/public/llms-full.txt +5 -5
- package/public/llms.txt +3 -3
- package/src/app/data/component-api.json +3 -1
- package/upgrade/index.json +15 -1
- package/upgrade/releases/0.23.1.json +108 -0
- package/upgrade/releases/0.23.2.json +47 -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/AGENTS.md
CHANGED
|
@@ -110,7 +110,7 @@ the full engineering protocol; this section is the home for autonomous-loop rule
|
|
|
110
110
|
## Ralph quality bar
|
|
111
111
|
|
|
112
112
|
REPO_TYPE: library
|
|
113
|
-
QUALITY BAR: Public npm package. Backward compatibility matters. Tests
|
|
113
|
+
QUALITY BAR: Public npm package. Backward compatibility matters. Tests required, and a live demo on the docs site (docs-site/components/component-demos.tsx) for a core component or pattern.
|
|
114
114
|
|
|
115
115
|
Rules for any autonomous loop in this repo:
|
|
116
116
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.23.2
|
|
4
|
+
|
|
5
|
+
### Upgrade
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npx @hirobius/design-system@latest upgrade
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
- Looks different: The disabled primary Button fill is now the muted surface instead of the accent-subtle surface.
|
|
12
|
+
- Looks different: The disabled primary Button text is now the disabled content colour instead of the on-accent colour.
|
|
13
|
+
- Every step is also in [UPGRADING.md](https://github.com/hirobius/hds/blob/main/UPGRADING.md#0232).
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- b2ebd7d: A disabled primary Button now reads as a neutral muted button in light and dark: `component.button.primary.bgDisabled` points at `semantic.color.surface.muted` and `textDisabled` at `semantic.color.content.disabled` (they were `accentSubtle` and `onAccent`, which assumed a coloured accent), and Button binds those tokens. The small Button's icon is 12px, as its `component.button.size.sm.iconSize` token says (it was 14px); medium and large are unchanged at 16px and 20px.
|
|
18
|
+
- 4626131: Storybook is gone from the repo (retirement, step 3): the `storybook` package keyword, the story files, the Storybook config and the Storybook-only scripts are removed. The docs site is the visual verification surface. Nothing for a consumer to change.
|
|
19
|
+
- 9f1acfc: The manifest (`public/hds-manifest.json`) points each core component and pattern at its docs-site page with `docsPage` (for example `/docs/components/button`), replacing `storyFiles` and `storyIds`. `AGENTS.md` and the llms files now point agents at the docs site instead of the Storybook stories.
|
|
20
|
+
|
|
21
|
+
## 0.23.1
|
|
22
|
+
|
|
23
|
+
### Upgrade
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
npx @hirobius/design-system@latest upgrade
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
- Looks different: The scoped HDS font variable now names Plus Jakarta Sans first instead of Satoshi.
|
|
30
|
+
- Looks different: Display and title text now renders in Plus Jakarta Sans instead of Satoshi.
|
|
31
|
+
- Looks different: Body, UI and caption text now renders in Plus Jakarta Sans instead of Satoshi.
|
|
32
|
+
- Looks different: fonts.css no longer declares Satoshi 400; it declares Plus Jakarta Sans 400 instead, so drop any font-family: Satoshi of your own.
|
|
33
|
+
- And 2 more: see [UPGRADING.md](https://github.com/hirobius/hds/blob/main/UPGRADING.md#0231).
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- d907e73: CONSUMING.md points agents at the docs site (https://hirobius-hds-components.vercel.app/llms.txt), which now serves the llms files, the manifest, DESIGN.md and component-api.json.
|
|
38
|
+
- 29af78f: feat(brand): the primary and display typeface is now Plus Jakarta Sans.
|
|
39
|
+
|
|
40
|
+
Satoshi's license (the Fontshare FF EULA) does not allow the font files to be redistributed, so HDS could not keep shipping them in the package or a public repo. Plus Jakarta Sans (Tokotype, SIL Open Font License 1.1) replaces it in the same three weights: 400 body, 500 UI and captions, 700 display and titles.
|
|
41
|
+
- `primitive.typography.family.primary` and `.display` now start with `"Plus Jakarta Sans"`, with the same system fallback stack.
|
|
42
|
+
- `@hirobius/design-system/fonts.css` now declares Plus Jakarta Sans 400/500/700, as Latin-subset woff2 files of about 15 KB each (Satoshi's were about 26 KB). The OFL license text ships beside the fonts in `dist/fonts/`.
|
|
43
|
+
- `package.json` `license` is now `MIT AND OFL-1.1`, since every bundled font is OFL.
|
|
44
|
+
- `ch`-based widths read a little wider in Figma, because the "0" advance is 0.732em instead of 0.683em.
|
|
45
|
+
|
|
46
|
+
Visual-only, with no API changes. If you import `fonts.css`, the new face loads with nothing else to do.
|
|
47
|
+
|
|
3
48
|
## 0.23.0
|
|
4
49
|
|
|
5
50
|
### Upgrade
|
package/CONSUMING.md
CHANGED
|
@@ -29,7 +29,7 @@ version keeps the `LucideIcon` type identical).
|
|
|
29
29
|
```tsx
|
|
30
30
|
import { Button, Card, Dialog } from '@hirobius/design-system';
|
|
31
31
|
import '@hirobius/design-system/tokens.css'; // required — design tokens as CSS vars
|
|
32
|
-
import '@hirobius/design-system/fonts.css'; // optional — the HDS brand fonts (
|
|
32
|
+
import '@hirobius/design-system/fonts.css'; // optional — the HDS brand fonts (Plus Jakarta Sans, IBM Plex Mono)
|
|
33
33
|
|
|
34
34
|
export function Example() {
|
|
35
35
|
return (
|
|
@@ -45,7 +45,7 @@ Available subpaths:
|
|
|
45
45
|
| Import | What |
|
|
46
46
|
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
47
47
|
| `@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 templates; the `pattern` tier is only in `/patterns` |
|
|
48
|
-
| `@hirobius/design-system/fonts.css` | Optional brand fonts (
|
|
48
|
+
| `@hirobius/design-system/fonts.css` | Optional brand fonts (Plus Jakarta Sans, IBM Plex Mono); woff2 files ship in the package, relative URLs, `font-display: swap` |
|
|
49
49
|
| `@hirobius/design-system/tokens.css` | Token CSS variables (import once at app root) |
|
|
50
50
|
| `@hirobius/design-system/tokens` | Token values as TS constants |
|
|
51
51
|
| `@hirobius/design-system/cn` | `cn()` class-merge helper |
|
|
@@ -103,7 +103,7 @@ them without network access. Under `node_modules/@hirobius/design-system/`:
|
|
|
103
103
|
- `DESIGN.md` - the lean visual spec
|
|
104
104
|
- `src/app/data/component-api.json` - full prop reference
|
|
105
105
|
|
|
106
|
-
The same files are served at <https://hirobius-
|
|
106
|
+
The same files are served at <https://hirobius-hds-components.vercel.app/llms.txt>
|
|
107
107
|
(and `/llms-full.txt`, `/llms/components.txt`, `/DESIGN.md`, `/component-api.json`).
|
|
108
108
|
|
|
109
109
|
## 3. Receiving updates
|
package/DESIGN.md
CHANGED
|
@@ -28,8 +28,8 @@ Feedback hues are never decorative; do not use them as accents. Light and dark m
|
|
|
28
28
|
<!-- auto:start:typography -->
|
|
29
29
|
HDS ships three typefaces — each with a distinct and exclusive role:
|
|
30
30
|
|
|
31
|
-
- **Display / Heading font**:
|
|
32
|
-
- **Body / UI font**:
|
|
31
|
+
- **Display / Heading font**: Plus Jakarta Sans. Bound exclusively to the `display` and `title` styles. Never used for body copy or UI labels.
|
|
32
|
+
- **Body / UI font**: Plus Jakarta Sans. All prose, labels, small text, captions, and UI copy.
|
|
33
33
|
- **Mono font**: IBM Plex Mono. Reserved for tokens, code, technical callouts, and metric readouts.
|
|
34
34
|
|
|
35
35
|
Weights declared: `400` regular, `500` medium, `700` bold. Heading styles (display · title) use `700` bold; body, UI, and caption use `400` regular / `500` medium.
|
package/NOTICE.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# License notice
|
|
2
2
|
|
|
3
|
-
`@hirobius/design-system` is
|
|
3
|
+
`@hirobius/design-system` is under two licenses: MIT for the code, and the SIL Open Font License 1.1 for the bundled fonts.
|
|
4
4
|
|
|
5
5
|
- **HDS code** (components, compiled JavaScript, types, CSS, and token files): MIT. See [LICENSE](LICENSE).
|
|
6
|
-
- **
|
|
6
|
+
- **Plus Jakarta Sans** (weights 400, 500 and 700, by Tokotype, [source](https://github.com/tokotype/PlusJakartaSans), Latin subset): SIL Open Font License 1.1.
|
|
7
7
|
- **IBM Plex Mono** (weight 400, by IBM, [source](https://github.com/IBM/plex)): SIL Open Font License 1.1.
|
|
8
8
|
|
|
9
|
-
Both fonts
|
|
9
|
+
Both fonts ship as woff2 files in `dist/fonts/`, declared by the opt-in `dist/fonts.css`; each font's license text ships beside it as `dist/fonts/<family>-LICENSE.txt`. The MIT license does not cover the fonts. `dist/tokens.css`, `dist/styles.css` and `dist/variables.css` embed no fonts.
|
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Hirobius Design System
|
|
2
2
|
|
|
3
|
-
[](https://github.com/hirobius/hds/actions/workflows/ci.yml) [](https://www.npmjs.com/package/@hirobius/design-system) [](https://github.com/hirobius/hds/actions/workflows/ci.yml) [](https://www.npmjs.com/package/@hirobius/design-system) [](https://hirobius-hds-components.vercel.app)
|
|
4
4
|
|
|
5
5
|
**A governed, token-first React design system.** Components plus the system
|
|
6
6
|
around them: a DTCG token pipeline (CSS variables + TypeScript constants),
|
|
7
7
|
quality gates in git hooks and CI, one-way Figma sync, and WCAG-checked contrast
|
|
8
|
-
and focus. Live
|
|
8
|
+
and focus. Live docs: **<https://hirobius-hds-components.vercel.app>**
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
11
|
pnpm add @hirobius/design-system
|
|
@@ -13,20 +13,19 @@ pnpm add @hirobius/design-system
|
|
|
13
13
|
|
|
14
14
|
Upgrading: [UPGRADING.md](UPGRADING.md) lists what each release asks of you. From 0.22.0, `npx @hirobius/design-system@latest upgrade` does it for you.
|
|
15
15
|
|
|
16
|
-
[](https://hirobius-hds-components.vercel.app)
|
|
17
17
|
|
|
18
18
|
<!-- auto:start:front-door-counts -->
|
|
19
19
|
|
|
20
20
|
- **53** public component modules, exported from `src/index.ts`
|
|
21
21
|
- **400** DTCG tokens in `hirobius.tokens.json`, compiled to CSS variables and TypeScript constants
|
|
22
|
-
- **341** Storybook stories in **71** story files
|
|
23
22
|
|
|
24
23
|
<!-- auto:end:front-door-counts -->
|
|
25
24
|
|
|
26
25
|
What the system includes:
|
|
27
26
|
|
|
28
27
|
- **Token pipeline.** DTCG tokens in `hirobius.tokens.json` compile to CSS variables and TypeScript constants through a validated alias chain, with AA-contrast gates in light and dark.
|
|
29
|
-
- **Gates with proof-of-firing.** Typecheck, zero-warning ESLint, token validity and contrast, Vitest unit and contract tests, bundle budgets, a consumer smoke build, and a
|
|
28
|
+
- **Gates with proof-of-firing.** Typecheck, zero-warning ESLint, token validity and contrast, Vitest unit and contract tests, bundle budgets, a consumer smoke build, and a docs-site build with an axe gate — run in git hooks and CI. Many gates carry a passing and a violating fixture that demonstrate the gate catches what it describes.
|
|
30
29
|
- **Upgrade path.** A release ledger and one consumer command: `npx @hirobius/design-system@latest upgrade`.
|
|
31
30
|
- **One-way Figma sync.** Code is the source of truth; tokens project into Figma, and `pnpm check:figma-drift` compares a committed snapshot against the model.
|
|
32
31
|
- **Theming without JavaScript.** Four root attributes — theme, density, brand, font — re-skin HDS descendants through CSS variables.
|
|
@@ -128,12 +127,12 @@ HDS theming is driven by root attributes + CSS variables, so it works with **zer
|
|
|
128
127
|
JavaScript** — set them on any element (React, Astro, plain HTML) and every HDS
|
|
129
128
|
descendant re-skins:
|
|
130
129
|
|
|
131
|
-
| Dial | Attribute / var | Values | Default
|
|
132
|
-
| ------- | ---------------------------------------------- | --------------- |
|
|
133
|
-
| theme | `data-theme` | `dark` | light (unset)
|
|
134
|
-
| density | `data-density` | `compact` | comfortable (unset)
|
|
135
|
-
| brand | `data-brand` (+ `data-tenant` alias) | overlay slug | base (unset)
|
|
136
|
-
| font | `--hds-font-family` / `--hds-font-family-mono` | any font-family |
|
|
130
|
+
| Dial | Attribute / var | Values | Default |
|
|
131
|
+
| ------- | ---------------------------------------------- | --------------- | --------------------------------- |
|
|
132
|
+
| theme | `data-theme` | `dark` | light (unset) |
|
|
133
|
+
| density | `data-density` | `compact` | comfortable (unset) |
|
|
134
|
+
| brand | `data-brand` (+ `data-tenant` alias) | overlay slug | base (unset) |
|
|
135
|
+
| font | `--hds-font-family` / `--hds-font-family-mono` | any font-family | Plus Jakarta Sans / IBM Plex Mono |
|
|
137
136
|
|
|
138
137
|
```html
|
|
139
138
|
<!-- zero-JS: static markup (e.g. an Astro layout) -->
|
|
@@ -178,7 +177,7 @@ What each Figma plan allows, and the Pro-plan architecture this follows, are in
|
|
|
178
177
|
pnpm install
|
|
179
178
|
# Generated data files are gitignored; create them once (the same step CI runs):
|
|
180
179
|
node scripts/generate-manifest.mjs && node scripts/generate-component-api.mjs && node scripts/enrich-manifest.mjs && node scripts/sync-icons.mjs && node scripts/audit-tokens.mjs --full
|
|
181
|
-
pnpm
|
|
180
|
+
pnpm docs:dev # docs site (component pages with live demos)
|
|
182
181
|
```
|
|
183
182
|
|
|
184
183
|
Core verification commands:
|
|
@@ -189,7 +188,7 @@ pnpm lint
|
|
|
189
188
|
pnpm test # pretest gates + unit + contract tests, exactly as the pre-push hook and CI run them
|
|
190
189
|
pnpm tokens:verify
|
|
191
190
|
pnpm check:size
|
|
192
|
-
pnpm build-
|
|
191
|
+
pnpm docs:publish # docs-site build, then: node scripts/check-docs-axe.mjs
|
|
193
192
|
```
|
|
194
193
|
|
|
195
194
|
## Architecture
|
|
@@ -219,7 +218,7 @@ What CI and the hooks check today, and nothing more:
|
|
|
219
218
|
- **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.
|
|
220
219
|
- **Lint:** `jsx-a11y` rules run inside ESLint with zero warnings allowed.
|
|
221
220
|
- **Focus:** `scripts/check-focus-states.mjs` (`pnpm check:focus`) audits focus styles on interactive components. It runs in `pretest` under `pnpm test`, so in the pre-push hook and in CI, and passes with 0 violations.
|
|
222
|
-
- **
|
|
221
|
+
- **Docs site:** `scripts/check-docs-axe.mjs` (`pnpm check:docs-axe`, after `pnpm docs:publish`) scans the live demo of every `/docs/components/*` and `/docs/patterns/*` page of the built docs site in light and dark with the same axe rules, scoped to the demo frame so the Fumadocs chrome does not count. CI runs it and fails on serious or critical violations outside `scripts/docs-axe-allowlist.json`, which is empty.
|
|
223
222
|
|
|
224
223
|
Screen-reader output is checked by `tests/primitive-contracts/screen-reader.contract.test.tsx`, which runs in `pnpm test` and walks Dialog, Menu, Select, Combobox, Table and Alert with a virtual screen-reader (`@guidepup/virtual-screen-reader`) under jsdom, asserting the role, name and state phrases it reads and the alert's live-region announcement; it reads the jsdom accessibility tree, not what a desktop or mobile screen-reader says.
|
|
225
224
|
|
|
@@ -238,8 +237,8 @@ The gates are deterministic and need no browser or live site:
|
|
|
238
237
|
|
|
239
238
|
- **pre-commit** (`.husky/pre-commit`): secrets scan, Prettier on staged files, typecheck, zero-warning ESLint, and token validity and contrast.
|
|
240
239
|
- **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).
|
|
241
|
-
- **CI** (`.github/workflows/ci.yml`): typecheck, zero-warning ESLint, token validity and contrast, Vitest, and the consumer smoke build, plus bundle budgets and
|
|
242
|
-
- **Visual review:**
|
|
240
|
+
- **CI** (`.github/workflows/ci.yml`): typecheck, zero-warning ESLint, token validity and contrast, Vitest, and the consumer smoke build, plus bundle budgets and the docs-site build with its axe gate.
|
|
241
|
+
- **Visual review:** the docs site (`docs-site/`) is the visual verification surface: every core component and pattern has a page with a live demo, `check-docs-axe` gates its accessibility.
|
|
243
242
|
|
|
244
243
|
### Agent consistency
|
|
245
244
|
|
|
@@ -284,4 +283,4 @@ public/
|
|
|
284
283
|
|
|
285
284
|
## License
|
|
286
285
|
|
|
287
|
-
The HDS code is MIT ([LICENSE](LICENSE)). The package CSS also embeds the
|
|
286
|
+
The HDS code is MIT ([LICENSE](LICENSE)). The package CSS also embeds the Plus Jakarta Sans and IBM Plex Mono fonts, which keep their own licenses and are not covered by MIT. See [NOTICE.md](NOTICE.md).
|
package/UPGRADING.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Upgrading @hirobius/design-system
|
|
2
2
|
|
|
3
|
-
This file only knows the releases up to the version you have installed, 0.23.
|
|
3
|
+
This file only knows the releases up to the version you have installed, 0.23.2. For newer releases, run `npx @hirobius/design-system@latest upgrade`: it always fetches the newest steps.
|
|
4
4
|
|
|
5
5
|
## How to upgrade
|
|
6
6
|
|
|
@@ -10,6 +10,28 @@ npx @hirobius/design-system@latest upgrade
|
|
|
10
10
|
|
|
11
11
|
It finds the version you have, moves you to the newest release, runs each release's codemods (Fixed for you) and lists what is left for you (Do by hand). It works from 0.16.0 on; from an older version, first reach 0.16.0 with the notes in CHANGELOG.md. MIGRATIONS.md has longer guides for the big releases.
|
|
12
12
|
|
|
13
|
+
## 0.23.2
|
|
14
|
+
|
|
15
|
+
Released 2026-10-11 (patch). 2 that look different.
|
|
16
|
+
|
|
17
|
+
### Looks different
|
|
18
|
+
|
|
19
|
+
- The disabled primary Button fill is now the muted surface instead of the accent-subtle surface.
|
|
20
|
+
- The disabled primary Button text is now the disabled content colour instead of the on-accent colour.
|
|
21
|
+
|
|
22
|
+
## 0.23.1
|
|
23
|
+
|
|
24
|
+
Released 2026-10-11 (patch). 6 that look different.
|
|
25
|
+
|
|
26
|
+
### Looks different
|
|
27
|
+
|
|
28
|
+
- The scoped HDS font variable now names Plus Jakarta Sans first instead of Satoshi.
|
|
29
|
+
- Display and title text now renders in Plus Jakarta Sans instead of Satoshi.
|
|
30
|
+
- Body, UI and caption text now renders in Plus Jakarta Sans instead of Satoshi.
|
|
31
|
+
- fonts.css no longer declares Satoshi 400; it declares Plus Jakarta Sans 400 instead, so drop any font-family: Satoshi of your own.
|
|
32
|
+
- fonts.css no longer declares Satoshi 500; it declares Plus Jakarta Sans 500 instead, so drop any font-family: Satoshi of your own.
|
|
33
|
+
- fonts.css no longer declares Satoshi 700; it declares Plus Jakarta Sans 700 instead, so drop any font-family: Satoshi of your own.
|
|
34
|
+
|
|
13
35
|
## 0.23.0
|
|
14
36
|
|
|
15
37
|
Released 2026-10-10 (minor). 14 that look different.
|
package/codemods/hds-prefix.mjs
CHANGED
package/codemods/jsx-fold.mjs
CHANGED
package/codemods/lib/scan.mjs
CHANGED
|
@@ -128,7 +128,7 @@ const Ne = {
|
|
|
128
128
|
spacious: "var(--semantic-space-layout-spacious)"
|
|
129
129
|
},
|
|
130
130
|
numbers: "units"
|
|
131
|
-
},
|
|
131
|
+
}, z = (t, e) => Object.prototype.hasOwnProperty.call(t, e) ? t[e] : void 0, _e = {
|
|
132
132
|
tight: "sm",
|
|
133
133
|
normal: "md",
|
|
134
134
|
inset: "lg",
|
|
@@ -153,7 +153,7 @@ const Ne = {
|
|
|
153
153
|
columnGap: ["column-gap"]
|
|
154
154
|
};
|
|
155
155
|
function $(t, e) {
|
|
156
|
-
return "closed" in e ? typeof t == "string" ?
|
|
156
|
+
return "closed" in e ? typeof t == "string" ? z(e.names, t) : void 0 : typeof t == "number" ? e.numbers === "raw" ? t : Re.has(t) ? `var(--primitive-space-${t})` : `calc(var(--primitive-space-1) * ${t})` : z(e.names, t) ?? t;
|
|
157
157
|
}
|
|
158
158
|
const Oe = {
|
|
159
159
|
color: "color",
|
|
@@ -161,7 +161,7 @@ const Oe = {
|
|
|
161
161
|
borderColor: "border-color",
|
|
162
162
|
fill: "fill",
|
|
163
163
|
stroke: "stroke"
|
|
164
|
-
}, $e = /* @__PURE__ */ new Set(["primary", "secondary", "disabled", "inverse", "accent"]), Ie = /* @__PURE__ */ new Set(["page", "raised", "overlay", "accent"]), Le = /* @__PURE__ */ new Set(["default", "subtle", "subdued", "strong", "accent"]),
|
|
164
|
+
}, $e = /* @__PURE__ */ new Set(["primary", "secondary", "disabled", "inverse", "accent"]), Ie = /* @__PURE__ */ new Set(["page", "raised", "overlay", "accent"]), Le = /* @__PURE__ */ new Set(["default", "subtle", "subdued", "strong", "accent"]), ze = /* @__PURE__ */ new Set(["success", "warning", "error", "info"]), je = /* @__PURE__ */ new Set(["hover", "pressed", "subtle", "content"]);
|
|
165
165
|
function Me(t) {
|
|
166
166
|
if (t === "accent") return "var(--semantic-accent-rest)";
|
|
167
167
|
const e = t.indexOf(".");
|
|
@@ -170,8 +170,8 @@ function Me(t) {
|
|
|
170
170
|
if (r === "content" && $e.has(n)) return `var(--semantic-color-content-${n})`;
|
|
171
171
|
if (r === "surface" && Ie.has(n)) return `var(--semantic-color-surface-${n})`;
|
|
172
172
|
if (r === "border" && Le.has(n)) return `var(--semantic-color-border-${n})`;
|
|
173
|
-
if (r === "feedback" &&
|
|
174
|
-
if (r === "accent" &&
|
|
173
|
+
if (r === "feedback" && ze.has(n)) return `var(--semantic-color-feedback-${n})`;
|
|
174
|
+
if (r === "accent" && je.has(n)) return `var(--semantic-accent-${n})`;
|
|
175
175
|
}
|
|
176
176
|
function Be(t) {
|
|
177
177
|
return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
@@ -179,7 +179,7 @@ function Be(t) {
|
|
|
179
179
|
function W(t, e) {
|
|
180
180
|
const r = Pe[t];
|
|
181
181
|
if (r) {
|
|
182
|
-
const c = typeof e == "string" ?
|
|
182
|
+
const c = typeof e == "string" ? z(_e, e) : void 0;
|
|
183
183
|
c && Ae(
|
|
184
184
|
`box-sx-spacing-${e}`,
|
|
185
185
|
`Box sx spacing name '${e}' is deprecated (hds#206) and is removed in 1.0.0. Use '${c}': same pixels at the default density, tighter under compact (MIGRATIONS.md).`
|
|
@@ -237,8 +237,8 @@ function Ge(t, e) {
|
|
|
237
237
|
}
|
|
238
238
|
return d;
|
|
239
239
|
}
|
|
240
|
-
function
|
|
241
|
-
return t === void 0 ? "undefined" : t === null || typeof t != "object" ? JSON.stringify(t) : Array.isArray(t) ? `[${t.map(
|
|
240
|
+
function j(t) {
|
|
241
|
+
return t === void 0 ? "undefined" : t === null || typeof t != "object" ? JSON.stringify(t) : Array.isArray(t) ? `[${t.map(j).join(",")}]` : `{${Object.keys(t).sort().map((r) => `${JSON.stringify(r)}:${j(t[r])}`).join(",")}}`;
|
|
242
242
|
}
|
|
243
243
|
function He(t) {
|
|
244
244
|
let e = 5381;
|
|
@@ -247,7 +247,7 @@ function He(t) {
|
|
|
247
247
|
return (e >>> 0).toString(36);
|
|
248
248
|
}
|
|
249
249
|
function Ke(t) {
|
|
250
|
-
return `hds-sx-${He(
|
|
250
|
+
return `hds-sx-${He(j(t))}`;
|
|
251
251
|
}
|
|
252
252
|
const U = /* @__PURE__ */ new Set();
|
|
253
253
|
let T = null;
|
|
@@ -273,7 +273,7 @@ function Xt(t) {
|
|
|
273
273
|
return e;
|
|
274
274
|
}
|
|
275
275
|
const Ue = /* @__PURE__ */ E(
|
|
276
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md transition-[colors,filter] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:bg-
|
|
276
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md transition-[colors,filter] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:bg-[var(--component-button-primary-bgDisabled)] disabled:text-[var(--component-button-primary-textDisabled)] active:inset-shadow-[0_0_0_9999px] active:inset-shadow-pressed-overlay/5 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
277
277
|
{
|
|
278
278
|
variants: {
|
|
279
279
|
variant: {
|
|
@@ -307,9 +307,9 @@ const Ue = /* @__PURE__ */ E(
|
|
|
307
307
|
info: "border-transparent bg-feedback-bg-info text-feedback-info hover:bg-feedback-bg-info hover:border-transparent hover:brightness-95 dark:hover:brightness-110"
|
|
308
308
|
},
|
|
309
309
|
size: {
|
|
310
|
-
sm: "h-8 px-3 hds-type-caption [&_svg]:size-
|
|
311
|
-
md: "h-10 px-4 py-2 hds-type-ui [&_svg]:size-
|
|
312
|
-
lg: "h-12 px-6 hds-type-ui [&_svg]:size-
|
|
310
|
+
sm: "h-8 px-3 hds-type-caption [&_svg]:size-[var(--component-button-size-sm-iconSize)]",
|
|
311
|
+
md: "h-10 px-4 py-2 hds-type-ui [&_svg]:size-[var(--component-button-size-md-iconSize)]",
|
|
312
|
+
lg: "h-12 px-6 hds-type-ui [&_svg]:size-[var(--component-button-size-lg-iconSize)]"
|
|
313
313
|
},
|
|
314
314
|
iconOnly: {
|
|
315
315
|
true: "p-0",
|
|
@@ -1171,7 +1171,7 @@ const Tt = A.Trigger, ie = /* @__PURE__ */ se(A.Portal), _t = A.Action, Pt = A.C
|
|
|
1171
1171
|
);
|
|
1172
1172
|
}), Lt = /* @__PURE__ */ h.forwardRef(function({ className: e, children: r, ...n }, a) {
|
|
1173
1173
|
return /* @__PURE__ */ s(A.Title, { asChild: !0, children: /* @__PURE__ */ s(I, { ref: a, as: "h2", variant: "title", className: e, ...n, children: r }) });
|
|
1174
|
-
}),
|
|
1174
|
+
}), zt = /* @__PURE__ */ h.forwardRef(function({ className: e, children: r, ...n }, a) {
|
|
1175
1175
|
return /* @__PURE__ */ s(A.Description, { asChild: !0, children: /* @__PURE__ */ s(
|
|
1176
1176
|
I,
|
|
1177
1177
|
{
|
|
@@ -1191,7 +1191,7 @@ const Tt = A.Trigger, ie = /* @__PURE__ */ se(A.Portal), _t = A.Action, Pt = A.C
|
|
|
1191
1191
|
Header: $t,
|
|
1192
1192
|
Footer: It,
|
|
1193
1193
|
Title: Lt,
|
|
1194
|
-
Description:
|
|
1194
|
+
Description: zt,
|
|
1195
1195
|
Action: _t,
|
|
1196
1196
|
Cancel: Pt,
|
|
1197
1197
|
// Set here, not by a later `AlertDialog.displayName = …` write: a top-level
|