@hjmds/react 1.15.0 → 1.16.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 +5 -0
- package/dist/collection-rail.d.ts +24 -0
- package/dist/collection-rail.d.ts.map +1 -0
- package/dist/collection-rail.js +109 -0
- package/dist/collection-rail.js.map +1 -0
- package/dist/effect-surface.d.ts.map +1 -1
- package/dist/effect-surface.js +4 -3
- package/dist/effect-surface.js.map +1 -1
- package/dist/evidence.d.ts +1 -1
- package/dist/evidence.js +1 -1
- package/dist/evidence.js.map +1 -1
- package/dist/floating-action-button.d.ts.map +1 -1
- package/dist/floating-action-button.js +4 -1
- package/dist/floating-action-button.js.map +1 -1
- package/dist/internal.d.ts +1 -4
- package/dist/internal.d.ts.map +1 -1
- package/dist/layout.d.ts +5 -1
- package/dist/layout.d.ts.map +1 -1
- package/dist/layout.js +6 -1
- package/dist/layout.js.map +1 -1
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.js +2 -1
- package/dist/menubar.js.map +1 -1
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +3 -0
- package/dist/provider.js.map +1 -1
- package/dist/sidebar.d.ts.map +1 -1
- package/dist/sidebar.js +2 -1
- package/dist/sidebar.js.map +1 -1
- package/dist/skip-nav.d.ts.map +1 -1
- package/dist/skip-nav.js +2 -1
- package/dist/skip-nav.js.map +1 -1
- package/dist/styles.css +14 -3
- package/dist/styles.layered.css +14 -3
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +9 -1
- package/dist/theme.js.map +1 -1
- package/dist/toggle-group.d.ts.map +1 -1
- package/dist/toggle-group.js +3 -1
- package/dist/toggle-group.js.map +1 -1
- package/dist/top.d.ts.map +1 -1
- package/dist/top.js +9 -4
- package/dist/top.js.map +1 -1
- package/package.json +8 -3
package/dist/styles.css
CHANGED
|
@@ -44,6 +44,13 @@
|
|
|
44
44
|
overflow-wrap: anywhere;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
/* Family role changes the type voice, never the document level or control state. */
|
|
48
|
+
.hjm-root :where(h1, h2, h3, h4, h5, h6) { font-family: var(--hjm-font-family-display, var(--hjm-font-family-ui, inherit)); }
|
|
49
|
+
.hjm-text[data-font-role="ui"] { font-family: var(--hjm-font-family-ui, inherit); }
|
|
50
|
+
.hjm-text[data-font-role="display"] { font-family: var(--hjm-font-family-display, var(--hjm-font-family-ui, inherit)); }
|
|
51
|
+
.hjm-text[data-font-role="reading"] { font-family: var(--hjm-font-family-reading, var(--hjm-font-family-ui, inherit)); }
|
|
52
|
+
.hjm-text[data-font-role="code"] { font-family: var(--hjm-font-family-code, monospace); }
|
|
53
|
+
|
|
47
54
|
.hjm-text[data-variant="caption"] { font-size: var(--hjm-type-caption-size); line-height: var(--hjm-type-caption-line-height); }
|
|
48
55
|
.hjm-text[data-variant="label"] { font-size: var(--hjm-type-label-size); line-height: var(--hjm-type-label-line-height); }
|
|
49
56
|
.hjm-text[data-variant="body"] { font-size: var(--hjm-type-body-size); line-height: var(--hjm-type-body-line-height); }
|
|
@@ -208,6 +215,8 @@
|
|
|
208
215
|
}
|
|
209
216
|
.hjm-button,
|
|
210
217
|
.hjm-icon-button {
|
|
218
|
+
/* Controls keep ui even when placed inside a reading-font text container. */
|
|
219
|
+
font-family: var(--hjm-font-family-ui, inherit);
|
|
211
220
|
display: inline-flex;
|
|
212
221
|
align-items: center;
|
|
213
222
|
justify-content: center;
|
|
@@ -309,7 +318,8 @@
|
|
|
309
318
|
|
|
310
319
|
/* Input interiors use the theme canvas (white in light mode), not tinted
|
|
311
320
|
surfaces. Focus and selection still use blue borders and compact indicators. */
|
|
312
|
-
.hjm-field {
|
|
321
|
+
.hjm-field {
|
|
322
|
+
font-family: var(--hjm-font-family-ui, inherit); display: grid; gap: var(--hjm-space-xs); min-inline-size: 0; }
|
|
313
323
|
.hjm-field__label { color: var(--hjm-color-text-body); font-weight: var(--hjm-font-weight-semibold); }
|
|
314
324
|
.hjm-field__control {
|
|
315
325
|
display: flex;
|
|
@@ -1694,6 +1704,7 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
|
|
|
1694
1704
|
*/
|
|
1695
1705
|
.hjm-heading {
|
|
1696
1706
|
margin: 0;
|
|
1707
|
+
font-family: var(--hjm-font-family-display, var(--hjm-font-family-ui, inherit));
|
|
1697
1708
|
color: var(--hjm-color-text);
|
|
1698
1709
|
font-size: calc(var(--hjm-heading-size) * var(--hjm-text-scale, 1));
|
|
1699
1710
|
line-height: calc(var(--hjm-heading-line-height) * var(--hjm-text-scale, 1));
|
|
@@ -2516,8 +2527,8 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
|
|
|
2516
2527
|
.hjm-toast[data-tone="warning"] .hjm-toast__icon { color: var(--hjm-toast-accent-warning); background: var(--hjm-toast-badge-warning); }
|
|
2517
2528
|
.hjm-toast[data-tone="danger"] .hjm-toast__icon { color: var(--hjm-toast-accent-danger); background: var(--hjm-toast-badge-danger); }
|
|
2518
2529
|
.hjm-toast__content { grid-column: 2; grid-row: 1; align-self: center; min-inline-size: 0; display: grid; gap: var(--hjm-space-xxs); padding-block: var(--hjm-space-xxs); overflow-wrap: anywhere; word-break: keep-all; }
|
|
2519
|
-
.hjm-toast__title { font-weight: var(--hjm-font-weight-bold); line-height: 1.35; }
|
|
2520
|
-
.hjm-toast__description { color: var(--hjm-toast-description-color); line-height: 1.45; }
|
|
2530
|
+
.hjm-toast__title { font-weight: var(--hjm-font-weight-bold); line-height: var(--hjm-toast-title-line-height, 1.35); }
|
|
2531
|
+
.hjm-toast__description { color: var(--hjm-toast-description-color); line-height: var(--hjm-toast-description-line-height, 1.45); }
|
|
2521
2532
|
.hjm-toast__close { grid-column: 3; grid-row: 1; align-self: start; display: grid; place-items: center; inline-size: var(--hjm-control-min-touch-target); min-block-size: var(--hjm-control-min-touch-target); margin-block-start: calc(-1 * var(--hjm-space-xxs)); border: 0; border-radius: 50%; color: var(--hjm-color-text-muted); background: transparent; cursor: pointer; }
|
|
2522
2533
|
.hjm-toast__close:hover { color: var(--hjm-color-text); }
|
|
2523
2534
|
.hjm-toast__action { grid-column: 2 / -1; grid-row: 2; justify-self: end; margin-inline-end: var(--hjm-space-xs); min-block-size: var(--hjm-control-min-touch-target); max-inline-size: 100%; padding-inline: var(--hjm-space-md); border: 0; border-radius: 999px; color: var(--hjm-toast-action-color); background: var(--hjm-toast-action-background); font: inherit; font-weight: var(--hjm-font-weight-bold); overflow-wrap: anywhere; text-align: center; cursor: pointer; }
|
package/dist/styles.layered.css
CHANGED
|
@@ -45,6 +45,13 @@
|
|
|
45
45
|
overflow-wrap: anywhere;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
/* Family role changes the type voice, never the document level or control state. */
|
|
49
|
+
.hjm-root :where(h1, h2, h3, h4, h5, h6) { font-family: var(--hjm-font-family-display, var(--hjm-font-family-ui, inherit)); }
|
|
50
|
+
.hjm-text[data-font-role="ui"] { font-family: var(--hjm-font-family-ui, inherit); }
|
|
51
|
+
.hjm-text[data-font-role="display"] { font-family: var(--hjm-font-family-display, var(--hjm-font-family-ui, inherit)); }
|
|
52
|
+
.hjm-text[data-font-role="reading"] { font-family: var(--hjm-font-family-reading, var(--hjm-font-family-ui, inherit)); }
|
|
53
|
+
.hjm-text[data-font-role="code"] { font-family: var(--hjm-font-family-code, monospace); }
|
|
54
|
+
|
|
48
55
|
.hjm-text[data-variant="caption"] { font-size: var(--hjm-type-caption-size); line-height: var(--hjm-type-caption-line-height); }
|
|
49
56
|
.hjm-text[data-variant="label"] { font-size: var(--hjm-type-label-size); line-height: var(--hjm-type-label-line-height); }
|
|
50
57
|
.hjm-text[data-variant="body"] { font-size: var(--hjm-type-body-size); line-height: var(--hjm-type-body-line-height); }
|
|
@@ -209,6 +216,8 @@
|
|
|
209
216
|
}
|
|
210
217
|
.hjm-button,
|
|
211
218
|
.hjm-icon-button {
|
|
219
|
+
/* Controls keep ui even when placed inside a reading-font text container. */
|
|
220
|
+
font-family: var(--hjm-font-family-ui, inherit);
|
|
212
221
|
display: inline-flex;
|
|
213
222
|
align-items: center;
|
|
214
223
|
justify-content: center;
|
|
@@ -310,7 +319,8 @@
|
|
|
310
319
|
|
|
311
320
|
/* Input interiors use the theme canvas (white in light mode), not tinted
|
|
312
321
|
surfaces. Focus and selection still use blue borders and compact indicators. */
|
|
313
|
-
.hjm-field {
|
|
322
|
+
.hjm-field {
|
|
323
|
+
font-family: var(--hjm-font-family-ui, inherit); display: grid; gap: var(--hjm-space-xs); min-inline-size: 0; }
|
|
314
324
|
.hjm-field__label { color: var(--hjm-color-text-body); font-weight: var(--hjm-font-weight-semibold); }
|
|
315
325
|
.hjm-field__control {
|
|
316
326
|
display: flex;
|
|
@@ -1695,6 +1705,7 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
|
|
|
1695
1705
|
*/
|
|
1696
1706
|
.hjm-heading {
|
|
1697
1707
|
margin: 0;
|
|
1708
|
+
font-family: var(--hjm-font-family-display, var(--hjm-font-family-ui, inherit));
|
|
1698
1709
|
color: var(--hjm-color-text);
|
|
1699
1710
|
font-size: calc(var(--hjm-heading-size) * var(--hjm-text-scale, 1));
|
|
1700
1711
|
line-height: calc(var(--hjm-heading-line-height) * var(--hjm-text-scale, 1));
|
|
@@ -2517,8 +2528,8 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
|
|
|
2517
2528
|
.hjm-toast[data-tone="warning"] .hjm-toast__icon { color: var(--hjm-toast-accent-warning); background: var(--hjm-toast-badge-warning); }
|
|
2518
2529
|
.hjm-toast[data-tone="danger"] .hjm-toast__icon { color: var(--hjm-toast-accent-danger); background: var(--hjm-toast-badge-danger); }
|
|
2519
2530
|
.hjm-toast__content { grid-column: 2; grid-row: 1; align-self: center; min-inline-size: 0; display: grid; gap: var(--hjm-space-xxs); padding-block: var(--hjm-space-xxs); overflow-wrap: anywhere; word-break: keep-all; }
|
|
2520
|
-
.hjm-toast__title { font-weight: var(--hjm-font-weight-bold); line-height: 1.35; }
|
|
2521
|
-
.hjm-toast__description { color: var(--hjm-toast-description-color); line-height: 1.45; }
|
|
2531
|
+
.hjm-toast__title { font-weight: var(--hjm-font-weight-bold); line-height: var(--hjm-toast-title-line-height, 1.35); }
|
|
2532
|
+
.hjm-toast__description { color: var(--hjm-toast-description-color); line-height: var(--hjm-toast-description-line-height, 1.45); }
|
|
2522
2533
|
.hjm-toast__close { grid-column: 3; grid-row: 1; align-self: start; display: grid; place-items: center; inline-size: var(--hjm-control-min-touch-target); min-block-size: var(--hjm-control-min-touch-target); margin-block-start: calc(-1 * var(--hjm-space-xxs)); border: 0; border-radius: 50%; color: var(--hjm-color-text-muted); background: transparent; cursor: pointer; }
|
|
2523
2534
|
.hjm-toast__close:hover { color: var(--hjm-color-text); }
|
|
2524
2535
|
.hjm-toast__action { grid-column: 2 / -1; grid-row: 2; justify-self: end; margin-inline-end: var(--hjm-space-xs); min-block-size: var(--hjm-control-min-touch-target); max-inline-size: 100%; padding-inline: var(--hjm-space-md); border: 0; border-radius: 999px; color: var(--hjm-toast-action-color); background: var(--hjm-toast-action-background); font: inherit; font-weight: var(--hjm-font-weight-bold); overflow-wrap: anywhere; text-align: center; cursor: pointer; }
|
package/dist/theme.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAkBA,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,2DAA2D,CAAC;AAgBnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,MAAM,aAAa,GAAG,aAAa,GACvC,MAAM,CAAC,SAAS,MAAM,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAmB7C,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,yBAAyB,GAC/B,aAAa,CAmLf"}
|
package/dist/theme.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveSurfaceFillOpacity } from "@hjmds/design-contracts/palette-contrast";
|
|
2
|
-
import { backdrop, control, easing, fontFamily, fontWeight, motion, layer, radius, shadow, spacing, stroke, typography, } from "@hjmds/design-contracts/foundations";
|
|
2
|
+
import { backdrop, control, easing, fontFamily, resolveFontFamilyStack, fontWeight, motion, layer, radius, shadow, spacing, stroke, typography, } from "@hjmds/design-contracts/foundations";
|
|
3
3
|
import { resolveColorReference } from "@hjmds/design-contracts/color-references";
|
|
4
4
|
import { focusIndicatorContract } from "@hjmds/design-contracts/contracts";
|
|
5
5
|
import { visibleControlHeight, } from "@hjmds/design-contracts/components/design-system-provider";
|
|
@@ -60,6 +60,10 @@ export function createHjmThemeStyle(value) {
|
|
|
60
60
|
}
|
|
61
61
|
style["--hjm-font-family-ui"] = (profileTokens?.fontFamily.ui ?? fontFamily.ui).join(", ");
|
|
62
62
|
style["--hjm-font-family-code"] = (profileTokens?.fontFamily.code ?? fontFamily.code).join(", ");
|
|
63
|
+
// Roles resolve from the nearest Provider, including portal/nested reset contexts.
|
|
64
|
+
for (const role of ["display", "reading"]) {
|
|
65
|
+
style[`--hjm-font-family-${role}`] = resolveFontFamilyStack(profileTokens?.fontFamily ?? fontFamily, role).join(", ");
|
|
66
|
+
}
|
|
63
67
|
for (const [name, value] of Object.entries(stroke)) {
|
|
64
68
|
style[`--hjm-stroke-${kebab(name)}`] = `${value}px`;
|
|
65
69
|
}
|
|
@@ -118,6 +122,10 @@ export function createHjmThemeStyle(value) {
|
|
|
118
122
|
style["--hjm-bottom-cta-shadow"] = profileTokens
|
|
119
123
|
? shadowCss({ ...profileTokens.shadow.floating, offsetY: -Math.abs(profileTokens.shadow.floating.offsetY) })
|
|
120
124
|
: "none";
|
|
125
|
+
// Toast body metrics follow a selected profile; emit legacy values when no profile is selected
|
|
126
|
+
// instead of inheriting a parent profile or changing standalone presentation.
|
|
127
|
+
style["--hjm-toast-title-line-height"] = profileTokens ? "var(--hjm-type-body-line-height)" : "1.35";
|
|
128
|
+
style["--hjm-toast-description-line-height"] = profileTokens ? "var(--hjm-type-body-line-height)" : "1.45";
|
|
121
129
|
// Overlay chrome and sizes come from the recipes Native reads (1.5.0).
|
|
122
130
|
for (const [name, chrome] of [["dialog", dialogRecipe.content], ["sheet", sheetRecipe.content], ["toast", toastRecipe.surface]]) {
|
|
123
131
|
style[`--hjm-${name}-background`] = resolveColorReference(chrome.background, palette);
|
package/dist/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EACL,QAAQ,EACR,OAAO,EACP,MAAM,EACN,UAAU,EACV,UAAU,EACV,MAAM,EACN,KAAK,EACL,MAAM,EACN,MAAM,EACN,OAAO,EACP,MAAM,EACN,UAAU,GACX,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EACL,oBAAoB,GAErB,MAAM,2DAA2D,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,EACZ,WAAW,GACZ,MAAM,iCAAiC,CAAC;AAMzC,SAAS,KAAK,CAAC,KAAa;IAC1B,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AACzE,CAAC;AA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AC;IACtE,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;QACjE,2EAA2E;QAC3E,yEAAyE;QACzE,KAAK,CAAC,wBAAwB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1C,GAAG,oBAAoB,CAAC,KAAK,EAAE,WAAW,CAAC,mBAAmB,CAAC,IAAI,CAAC;IACxE,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { resolveSurfaceFillOpacity } from \"@hjmds/design-contracts/palette-contrast\";\nimport {\n backdrop,\n control,\n easing,\n fontFamily,\n fontWeight,\n motion,\n layer,\n radius,\n shadow,\n spacing,\n stroke,\n typography,\n} from \"@hjmds/design-contracts/foundations\";\nimport { resolveColorReference } from \"@hjmds/design-contracts/color-references\";\nimport { focusIndicatorContract } from \"@hjmds/design-contracts/contracts\";\nimport {\n visibleControlHeight,\n type DesignSystemProviderValue,\n} from \"@hjmds/design-contracts/components/design-system-provider\";\nimport { buttonRecipe, fieldRecipe } from \"@hjmds/design-contracts/recipes/base\";\nimport {\n bottomNavigationRecipe,\n comboboxRecipe,\n dialogRecipe,\n listRowRecipe,\n menuRecipe,\n searchFieldRecipe,\n selectRecipe,\n sheetRecipe,\n skeletonRecipe,\n tooltipRecipe,\n switchRecipe,\n toastRecipe,\n} from \"@hjmds/design-contracts/recipes\";\nimport type { CSSProperties } from \"react\";\n\nexport type HjmThemeStyle = CSSProperties &\n Record<`--hjm-${string}`, string | number>;\n\nfunction kebab(value: string): string {\n return value.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);\n}\n\ntype ShadowToken = Readonly<{ color: string; opacity: number; radius: number; offsetY: number }>;\n\n// RN shadow token -> CSS; blur = radius, as react-native-web maps it.\nfunction shadowCss(token: ShadowToken, offsetX = 0): string {\n const hex = token.color.replace(\"#\", \"\");\n const [r, g, b] = [0, 2, 4].map((start) => Number.parseInt(hex.slice(start, start + 2), 16));\n return `${offsetX}px ${token.offsetY}px ${token.radius}px rgb(${r} ${g} ${b} / ${Math.round(token.opacity * 100)}%)`;\n}\n\nfunction rem(value: number): string {\n return `${Number((value / 16).toFixed(5))}rem`;\n}\n\nexport function createHjmThemeStyle(\n value: DesignSystemProviderValue,\n): HjmThemeStyle {\n const { environment, palette } = value;\n const profileTokens = value.designProfile?.tokens;\n const style: HjmThemeStyle = {\n \"--hjm-backdrop-modal\": `color-mix(in srgb, ${backdrop.modal.color} ${backdrop.modal.opacity * 100}%, transparent)`,\n \"--hjm-text-scale\": environment.textScale,\n \"--hjm-motion-scale\": environment.reducedMotion ? 0 : 1,\n colorScheme: environment.theme,\n backgroundColor: palette.theme.bg,\n color: palette.theme.text,\n };\n\n for (const [name, color] of Object.entries(palette.theme)) {\n style[`--hjm-color-${kebab(name)}`] = color;\n }\n for (const [name, color] of Object.entries(palette.statusAccents)) {\n style[`--hjm-accent-${kebab(name)}`] = color;\n }\n for (const [name, color] of Object.entries(palette.statusAccentFills)) {\n style[`--hjm-accent-fill-${kebab(name)}`] = color;\n }\n for (const [name, value] of Object.entries(spacing)) {\n style[`--hjm-space-${kebab(name)}`] = `${value}px`;\n }\n for (const [name, value] of Object.entries(profileTokens?.radius ?? radius)) {\n style[`--hjm-radius-${kebab(name)}`] = `${value}px`;\n }\n for (const [name, value] of Object.entries(profileTokens?.typography ?? typography)) {\n style[`--hjm-type-${kebab(name)}-size`] =\n `calc(${rem(value.fontSize)} * var(--hjm-text-scale))`;\n style[`--hjm-type-${kebab(name)}-line-height`] =\n `calc(${rem(value.lineHeight)} * var(--hjm-text-scale))`;\n style[`--hjm-type-${kebab(name)}-weight`] = value.fontWeight;\n }\n for (const [name, value] of Object.entries(fontWeight)) {\n style[`--hjm-font-weight-${kebab(name)}`] = value;\n }\n for (const [name, value] of Object.entries(motion)) {\n style[`--hjm-motion-${kebab(name)}`] = environment.reducedMotion\n ? \"0ms\"\n : `${value}ms`;\n }\n\n style[\"--hjm-font-family-ui\"] = (profileTokens?.fontFamily.ui ?? fontFamily.ui).join(\", \");\n style[\"--hjm-font-family-code\"] = (profileTokens?.fontFamily.code ?? fontFamily.code).join(\", \");\n for (const [name, value] of Object.entries(stroke)) {\n style[`--hjm-stroke-${kebab(name)}`] = `${value}px`;\n }\n // Unset before 1.4.1, so focus rules were invalid and drew no ring.\n style[\"--hjm-color-focus\"] = resolveColorReference(focusIndicatorContract.color, palette);\n style[\"--hjm-focus-width\"] = `${focusIndicatorContract.width}px`;\n style[\"--hjm-focus-offset\"] = `${focusIndicatorContract.offset}px`;\n style[\"--hjm-bottom-navigation-pressed-background\"] = resolveColorReference(\n bottomNavigationRecipe.states.pressedBackground,\n palette,\n );\n // Row rhythm and the leading frame come from the recipe so the stylesheet\n // does not carry a second copy of the same numbers.\n style[\"--hjm-list-row-gap\"] = rem(listRowRecipe.gap);\n style[\"--hjm-list-row-leading-size\"] = rem(listRowRecipe.leadingSize);\n for (const [name, value] of Object.entries(switchRecipe.sizes)) {\n style[`--hjm-switch-${kebab(name)}-width`] = rem(value.width);\n style[`--hjm-switch-${kebab(name)}-height`] = rem(value.height);\n style[`--hjm-switch-${kebab(name)}-thumb`] = rem(value.thumb);\n style[`--hjm-switch-${kebab(name)}-inset`] = rem(value.inset);\n style[`--hjm-switch-${kebab(name)}-offset`] = rem(\n value.width - value.thumb - value.inset * 2,\n );\n }\n for (const [name, value] of Object.entries(listRowRecipe.density)) {\n style[`--hjm-list-row-${kebab(name)}-one-line`] = rem(value.oneLineMinHeight);\n style[`--hjm-list-row-${kebab(name)}-two-line`] = rem(value.twoLineMinHeight);\n style[`--hjm-list-row-${kebab(name)}-padding-inline`] = rem(value.paddingHorizontal);\n style[`--hjm-list-row-${kebab(name)}-padding-block`] = rem(value.paddingVertical);\n }\n // The recipe owns these; a second copy in the stylesheet drifts silently\n // because the gates read that file as text only. Block and text heights\n // already resolve through --hjm-space-*, so they are not re-emitted.\n const skeletonCurve = easing[skeletonRecipe.animation.easing];\n style[\"--hjm-skeleton-circle-size\"] =\n `${skeletonRecipe.shapes.circle.defaultHeight}px`;\n style[\"--hjm-skeleton-duration\"] = `${skeletonRecipe.animation.duration}ms`;\n style[\"--hjm-skeleton-easing\"] = `cubic-bezier(${skeletonCurve.join(\", \")})`;\n style[\"--hjm-skeleton-from-opacity\"] = skeletonRecipe.animation.fromOpacity;\n style[\"--hjm-skeleton-to-opacity\"] = skeletonRecipe.animation.toOpacity;\n // Export the shared order instead of keeping a second numeric scale in CSS.\n for (const [name, value] of Object.entries(layer)) {\n style[`--hjm-layer-${kebab(name)}`] = value;\n }\n for (const [name, token] of Object.entries(profileTokens?.shadow ?? shadow)) {\n style[`--hjm-shadow-${kebab(name)}`] = shadowCss(token);\n }\n const surfaceMaterial = value.designProfile?.material.surface;\n // Defaults are emitted on every Provider, so a nested neutral profile clears\n // inherited glass/clay. Unsupported transparency remains an opaque CSS fill.\n style[\"--hjm-surface-blur\"] = surfaceMaterial?.blurStrength ? `blur(${surfaceMaterial.blurStrength * 32}px)` : \"none\";\n style[\"--hjm-surface-fill-opacity\"] = surfaceMaterial?.blurStrength ? resolveSurfaceFillOpacity(surfaceMaterial.fillOpacity, palette.theme) : 1;\n const insetShadow = surfaceMaterial?.insetShadows.length\n ? surfaceMaterial.insetShadows.map(token => `inset ${shadowCss(token, token.offsetX)}`).join(\", \")\n : \"\";\n style[\"--hjm-surface-inset-shadow\"] = insetShadow || \"none\";\n style[\"--hjm-surface-raised-shadow\"] = shadowCss(profileTokens?.shadow.floating ?? shadow.floating) + (insetShadow ? `, ${insetShadow}` : \"\");\n // BottomCTA overlaps content above it (bottomCtaRecipe rationale). Profile\n // strength is shared, but its shadow must cast upward rather than behind the\n // footer; preserve the stylesheet-only legacy path when no profile is supplied.\n style[\"--hjm-bottom-cta-shadow\"] = profileTokens\n ? shadowCss({ ...profileTokens.shadow.floating, offsetY: -Math.abs(profileTokens.shadow.floating.offsetY) })\n : \"none\";\n // Overlay chrome and sizes come from the recipes Native reads (1.5.0).\n for (const [name, chrome] of [[\"dialog\", dialogRecipe.content], [\"sheet\", sheetRecipe.content], [\"toast\", toastRecipe.surface]] as const) {\n style[`--hjm-${name}-background`] = resolveColorReference(chrome.background, palette);\n style[`--hjm-${name}-border`] = resolveColorReference(chrome.border, palette);\n style[`--hjm-${name}-border-width`] = `${chrome.borderWidth}px`;\n style[`--hjm-${name}-radius`] = `var(--hjm-radius-${chrome.radius})`;\n // Recipes select the floating role. Resolve its value from the profile so\n // dialogs, sheets and toasts cannot retain neutral shadows after a theme switch.\n style[`--hjm-${name}-shadow`] = shadowCss(profileTokens?.shadow.floating ?? chrome.shadow);\n }\n style[\"--hjm-sheet-max-height\"] = `${sheetRecipe.content.maxHeightRatio * 100}dvh`;\n style[\"--hjm-sheet-max-width\"] = `${sheetRecipe.web.maxWidth}px`;\n style[\"--hjm-sheet-handle-width\"] = `${sheetRecipe.handle.width}px`;\n style[\"--hjm-sheet-handle-height\"] = `${sheetRecipe.handle.height}px`;\n style[\"--hjm-sheet-handle-color\"] = resolveColorReference(sheetRecipe.handle.color, palette);\n for (const [name, ratio] of Object.entries(sheetRecipe.sizes)) {\n if (ratio !== null) style[`--hjm-sheet-size-${name}`] = `${ratio * 100}dvh`;\n }\n // Toast badge/action colours resolve from the recipe so Web and Native share one tone table (1.10.0).\n for (const [tone, contract] of Object.entries(toastRecipe.tones)) {\n style[`--hjm-toast-accent-${tone}`] = resolveColorReference(contract.accent, palette);\n style[`--hjm-toast-badge-${tone}`] = resolveColorReference(contract.badge, palette);\n }\n style[\"--hjm-toast-badge-size\"] = `${toastRecipe.icon.badgeDiameter}px`;\n style[\"--hjm-toast-action-background\"] = resolveColorReference(toastRecipe.action.background, palette);\n style[\"--hjm-toast-action-color\"] = resolveColorReference(toastRecipe.action.color, palette);\n style[\"--hjm-toast-description-color\"] = resolveColorReference(toastRecipe.description.color, palette);\n const toastExit = toastRecipe.transition.web.exit;\n style[\"--hjm-toast-exit-duration\"] = environment.reducedMotion ? \"0ms\" : `${toastExit.duration}ms`;\n style[\"--hjm-toast-exit-easing\"] = `cubic-bezier(${easing[toastExit.easing].join(\", \")})`;\n // SearchField geometry comes from searchFieldRecipe (2026-10-06 follow-up). Web had drawn TextField's\n // 16px padding for both sizes and a 44px clear button even at `medium`, where the recipe and Native\n // use a 36 circle with a 4px hit slop (44 target, 36 footprint).\n for (const [name, size] of Object.entries(searchFieldRecipe.sizes)) {\n style[`--hjm-search-field-padding-${name}`] = `${size.paddingHorizontal}px`;\n style[`--hjm-search-field-gap-${name}`] = `${size.gap}px`;\n style[`--hjm-search-field-clear-${name}`] = `${size.clearDiameter}px`;\n style[`--hjm-search-field-clear-slop-${name}`] = `${size.clearHitSlop}px`;\n }\n style[\"--hjm-tooltip-max-width\"] = `${tooltipRecipe.content.maxWidth}px`;\n style[\"--hjm-tooltip-padding\"] = `${tooltipRecipe.surface.padding}px`;\n // Floating collection surfaces read their padding from the recipe (2026-10-06): the stylesheet's 4 had drifted from 8.\n style[\"--hjm-menu-padding\"] = `${menuRecipe.surface.padding}px`;\n style[\"--hjm-select-popover-padding\"] = `${selectRecipe.popover.padding}px`;\n style[\"--hjm-combobox-popover-padding\"] = `${comboboxRecipe.popover.padding}px`;\n style[\"--hjm-tooltip-collision-padding\"] = `${tooltipRecipe.positioning.collisionPadding}px`;\n style[\"--hjm-button-pressed-opacity\"] = buttonRecipe.opacity.pressed;\n style[\"--hjm-button-disabled-opacity\"] = buttonRecipe.opacity.disabled;\n style[\"--hjm-field-border-width\"] = `${fieldRecipe.borderWidth}px`;\n style[\"--hjm-field-focus-ring-width\"] = `${fieldRecipe.focusRingWidth}px`;\n style[\"--hjm-field-disabled-opacity\"] = fieldRecipe.disabledOpacity;\n style[\"--hjm-control-min-touch-target\"] = `${control.minTouchTarget}px`;\n style[\"--hjm-control-field-height\"] = `${control.fieldHeight}px`;\n style[\"--hjm-field-multiline-min-height\"] = rem(fieldRecipe.multilineMinHeight);\n style[\"--hjm-field-padding-block\"] = rem(fieldRecipe.paddingVertical);\n for (const [name, value] of Object.entries(control.buttonHeight)) {\n // The axis is applied to the emitted variables rather than to each rule so\n // that every stylesheet consumer of a control height honours it at once.\n style[`--hjm-control-button-${kebab(name)}`] =\n `${visibleControlHeight(value, environment.minimumVisualTarget)}px`;\n }\n\n return style;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EACL,QAAQ,EACR,OAAO,EACP,MAAM,EACN,UAAU,EACV,sBAAsB,EACtB,UAAU,EACV,MAAM,EACN,KAAK,EACL,MAAM,EACN,MAAM,EACN,OAAO,EACP,MAAM,EACN,UAAU,GACX,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EACL,oBAAoB,GAErB,MAAM,2DAA2D,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,EACZ,WAAW,GACZ,MAAM,iCAAiC,CAAC;AAMzC,SAAS,KAAK,CAAC,KAAa;IAC1B,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AACzE,CAAC;AAID,sEAAsE;AACtE,SAAS,SAAS,CAAC,KAAkB,EAAE,OAAO,GAAG,CAAC;IAChD,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAA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CAAC,GAAG,WAAW,CAAC,eAAe,CAAC;IACpE,KAAK,CAAC,gCAAgC,CAAC,GAAG,GAAG,OAAO,CAAC,cAAc,IAAI,CAAC;IACxE,KAAK,CAAC,4BAA4B,CAAC,GAAG,GAAG,OAAO,CAAC,WAAW,IAAI,CAAC;IACjE,KAAK,CAAC,kCAAkC,CAAC,GAAG,GAAG,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;IAChF,KAAK,CAAC,2BAA2B,CAAC,GAAG,GAAG,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;IACtE,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;QACjE,2EAA2E;QAC3E,yEAAyE;QACzE,KAAK,CAAC,wBAAwB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1C,GAAG,oBAAoB,CAAC,KAAK,EAAE,WAAW,CAAC,mBAAmB,CAAC,IAAI,CAAC;IACxE,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { resolveSurfaceFillOpacity } from \"@hjmds/design-contracts/palette-contrast\";\nimport {\n backdrop,\n control,\n easing,\n fontFamily,\n resolveFontFamilyStack,\n fontWeight,\n motion,\n layer,\n radius,\n shadow,\n spacing,\n stroke,\n typography,\n} from \"@hjmds/design-contracts/foundations\";\nimport { resolveColorReference } from \"@hjmds/design-contracts/color-references\";\nimport { focusIndicatorContract } from \"@hjmds/design-contracts/contracts\";\nimport {\n visibleControlHeight,\n type DesignSystemProviderValue,\n} from \"@hjmds/design-contracts/components/design-system-provider\";\nimport { buttonRecipe, fieldRecipe } from \"@hjmds/design-contracts/recipes/base\";\nimport {\n bottomNavigationRecipe,\n comboboxRecipe,\n dialogRecipe,\n listRowRecipe,\n menuRecipe,\n searchFieldRecipe,\n selectRecipe,\n sheetRecipe,\n skeletonRecipe,\n tooltipRecipe,\n switchRecipe,\n toastRecipe,\n} from \"@hjmds/design-contracts/recipes\";\nimport type { CSSProperties } from \"react\";\n\nexport type HjmThemeStyle = CSSProperties &\n Record<`--hjm-${string}`, string | number>;\n\nfunction kebab(value: string): string {\n return value.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);\n}\n\ntype ShadowToken = Readonly<{ color: string; opacity: number; radius: number; offsetY: number }>;\n\n// RN shadow token -> CSS; blur = radius, as react-native-web maps it.\nfunction shadowCss(token: ShadowToken, offsetX = 0): string {\n const hex = token.color.replace(\"#\", \"\");\n const [r, g, b] = [0, 2, 4].map((start) => Number.parseInt(hex.slice(start, start + 2), 16));\n return `${offsetX}px ${token.offsetY}px ${token.radius}px rgb(${r} ${g} ${b} / ${Math.round(token.opacity * 100)}%)`;\n}\n\nfunction rem(value: number): string {\n return `${Number((value / 16).toFixed(5))}rem`;\n}\n\nexport function createHjmThemeStyle(\n value: DesignSystemProviderValue,\n): HjmThemeStyle {\n const { environment, palette } = value;\n const profileTokens = value.designProfile?.tokens;\n const style: HjmThemeStyle = {\n \"--hjm-backdrop-modal\": `color-mix(in srgb, ${backdrop.modal.color} ${backdrop.modal.opacity * 100}%, transparent)`,\n \"--hjm-text-scale\": environment.textScale,\n \"--hjm-motion-scale\": environment.reducedMotion ? 0 : 1,\n colorScheme: environment.theme,\n backgroundColor: palette.theme.bg,\n color: palette.theme.text,\n };\n\n for (const [name, color] of Object.entries(palette.theme)) {\n style[`--hjm-color-${kebab(name)}`] = color;\n }\n for (const [name, color] of Object.entries(palette.statusAccents)) {\n style[`--hjm-accent-${kebab(name)}`] = color;\n }\n for (const [name, color] of Object.entries(palette.statusAccentFills)) {\n style[`--hjm-accent-fill-${kebab(name)}`] = color;\n }\n for (const [name, value] of Object.entries(spacing)) {\n style[`--hjm-space-${kebab(name)}`] = `${value}px`;\n }\n for (const [name, value] of Object.entries(profileTokens?.radius ?? radius)) {\n style[`--hjm-radius-${kebab(name)}`] = `${value}px`;\n }\n for (const [name, value] of Object.entries(profileTokens?.typography ?? typography)) {\n style[`--hjm-type-${kebab(name)}-size`] =\n `calc(${rem(value.fontSize)} * var(--hjm-text-scale))`;\n style[`--hjm-type-${kebab(name)}-line-height`] =\n `calc(${rem(value.lineHeight)} * var(--hjm-text-scale))`;\n style[`--hjm-type-${kebab(name)}-weight`] = value.fontWeight;\n }\n for (const [name, value] of Object.entries(fontWeight)) {\n style[`--hjm-font-weight-${kebab(name)}`] = value;\n }\n for (const [name, value] of Object.entries(motion)) {\n style[`--hjm-motion-${kebab(name)}`] = environment.reducedMotion\n ? \"0ms\"\n : `${value}ms`;\n }\n\n style[\"--hjm-font-family-ui\"] = (profileTokens?.fontFamily.ui ?? fontFamily.ui).join(\", \");\n style[\"--hjm-font-family-code\"] = (profileTokens?.fontFamily.code ?? fontFamily.code).join(\", \");\n // Roles resolve from the nearest Provider, including portal/nested reset contexts.\n for (const role of [\"display\", \"reading\"] as const) {\n style[`--hjm-font-family-${role}`] = resolveFontFamilyStack(profileTokens?.fontFamily ?? fontFamily, role).join(\", \");\n }\n for (const [name, value] of Object.entries(stroke)) {\n style[`--hjm-stroke-${kebab(name)}`] = `${value}px`;\n }\n // Unset before 1.4.1, so focus rules were invalid and drew no ring.\n style[\"--hjm-color-focus\"] = resolveColorReference(focusIndicatorContract.color, palette);\n style[\"--hjm-focus-width\"] = `${focusIndicatorContract.width}px`;\n style[\"--hjm-focus-offset\"] = `${focusIndicatorContract.offset}px`;\n style[\"--hjm-bottom-navigation-pressed-background\"] = resolveColorReference(\n bottomNavigationRecipe.states.pressedBackground,\n palette,\n );\n // Row rhythm and the leading frame come from the recipe so the stylesheet\n // does not carry a second copy of the same numbers.\n style[\"--hjm-list-row-gap\"] = rem(listRowRecipe.gap);\n style[\"--hjm-list-row-leading-size\"] = rem(listRowRecipe.leadingSize);\n for (const [name, value] of Object.entries(switchRecipe.sizes)) {\n style[`--hjm-switch-${kebab(name)}-width`] = rem(value.width);\n style[`--hjm-switch-${kebab(name)}-height`] = rem(value.height);\n style[`--hjm-switch-${kebab(name)}-thumb`] = rem(value.thumb);\n style[`--hjm-switch-${kebab(name)}-inset`] = rem(value.inset);\n style[`--hjm-switch-${kebab(name)}-offset`] = rem(\n value.width - value.thumb - value.inset * 2,\n );\n }\n for (const [name, value] of Object.entries(listRowRecipe.density)) {\n style[`--hjm-list-row-${kebab(name)}-one-line`] = rem(value.oneLineMinHeight);\n style[`--hjm-list-row-${kebab(name)}-two-line`] = rem(value.twoLineMinHeight);\n style[`--hjm-list-row-${kebab(name)}-padding-inline`] = rem(value.paddingHorizontal);\n style[`--hjm-list-row-${kebab(name)}-padding-block`] = rem(value.paddingVertical);\n }\n // The recipe owns these; a second copy in the stylesheet drifts silently\n // because the gates read that file as text only. Block and text heights\n // already resolve through --hjm-space-*, so they are not re-emitted.\n const skeletonCurve = easing[skeletonRecipe.animation.easing];\n style[\"--hjm-skeleton-circle-size\"] =\n `${skeletonRecipe.shapes.circle.defaultHeight}px`;\n style[\"--hjm-skeleton-duration\"] = `${skeletonRecipe.animation.duration}ms`;\n style[\"--hjm-skeleton-easing\"] = `cubic-bezier(${skeletonCurve.join(\", \")})`;\n style[\"--hjm-skeleton-from-opacity\"] = skeletonRecipe.animation.fromOpacity;\n style[\"--hjm-skeleton-to-opacity\"] = skeletonRecipe.animation.toOpacity;\n // Export the shared order instead of keeping a second numeric scale in CSS.\n for (const [name, value] of Object.entries(layer)) {\n style[`--hjm-layer-${kebab(name)}`] = value;\n }\n for (const [name, token] of Object.entries(profileTokens?.shadow ?? shadow)) {\n style[`--hjm-shadow-${kebab(name)}`] = shadowCss(token);\n }\n const surfaceMaterial = value.designProfile?.material.surface;\n // Defaults are emitted on every Provider, so a nested neutral profile clears\n // inherited glass/clay. Unsupported transparency remains an opaque CSS fill.\n style[\"--hjm-surface-blur\"] = surfaceMaterial?.blurStrength ? `blur(${surfaceMaterial.blurStrength * 32}px)` : \"none\";\n style[\"--hjm-surface-fill-opacity\"] = surfaceMaterial?.blurStrength ? resolveSurfaceFillOpacity(surfaceMaterial.fillOpacity, palette.theme) : 1;\n const insetShadow = surfaceMaterial?.insetShadows.length\n ? surfaceMaterial.insetShadows.map(token => `inset ${shadowCss(token, token.offsetX)}`).join(\", \")\n : \"\";\n style[\"--hjm-surface-inset-shadow\"] = insetShadow || \"none\";\n style[\"--hjm-surface-raised-shadow\"] = shadowCss(profileTokens?.shadow.floating ?? shadow.floating) + (insetShadow ? `, ${insetShadow}` : \"\");\n // BottomCTA overlaps content above it (bottomCtaRecipe rationale). Profile\n // strength is shared, but its shadow must cast upward rather than behind the\n // footer; preserve the stylesheet-only legacy path when no profile is supplied.\n style[\"--hjm-bottom-cta-shadow\"] = profileTokens\n ? shadowCss({ ...profileTokens.shadow.floating, offsetY: -Math.abs(profileTokens.shadow.floating.offsetY) })\n : \"none\";\n // Toast body metrics follow a selected profile; emit legacy values when no profile is selected\n // instead of inheriting a parent profile or changing standalone presentation.\n style[\"--hjm-toast-title-line-height\"] = profileTokens ? \"var(--hjm-type-body-line-height)\" : \"1.35\";\n style[\"--hjm-toast-description-line-height\"] = profileTokens ? \"var(--hjm-type-body-line-height)\" : \"1.45\";\n // Overlay chrome and sizes come from the recipes Native reads (1.5.0).\n for (const [name, chrome] of [[\"dialog\", dialogRecipe.content], [\"sheet\", sheetRecipe.content], [\"toast\", toastRecipe.surface]] as const) {\n style[`--hjm-${name}-background`] = resolveColorReference(chrome.background, palette);\n style[`--hjm-${name}-border`] = resolveColorReference(chrome.border, palette);\n style[`--hjm-${name}-border-width`] = `${chrome.borderWidth}px`;\n style[`--hjm-${name}-radius`] = `var(--hjm-radius-${chrome.radius})`;\n // Recipes select the floating role. Resolve its value from the profile so\n // dialogs, sheets and toasts cannot retain neutral shadows after a theme switch.\n style[`--hjm-${name}-shadow`] = shadowCss(profileTokens?.shadow.floating ?? chrome.shadow);\n }\n style[\"--hjm-sheet-max-height\"] = `${sheetRecipe.content.maxHeightRatio * 100}dvh`;\n style[\"--hjm-sheet-max-width\"] = `${sheetRecipe.web.maxWidth}px`;\n style[\"--hjm-sheet-handle-width\"] = `${sheetRecipe.handle.width}px`;\n style[\"--hjm-sheet-handle-height\"] = `${sheetRecipe.handle.height}px`;\n style[\"--hjm-sheet-handle-color\"] = resolveColorReference(sheetRecipe.handle.color, palette);\n for (const [name, ratio] of Object.entries(sheetRecipe.sizes)) {\n if (ratio !== null) style[`--hjm-sheet-size-${name}`] = `${ratio * 100}dvh`;\n }\n // Toast badge/action colours resolve from the recipe so Web and Native share one tone table (1.10.0).\n for (const [tone, contract] of Object.entries(toastRecipe.tones)) {\n style[`--hjm-toast-accent-${tone}`] = resolveColorReference(contract.accent, palette);\n style[`--hjm-toast-badge-${tone}`] = resolveColorReference(contract.badge, palette);\n }\n style[\"--hjm-toast-badge-size\"] = `${toastRecipe.icon.badgeDiameter}px`;\n style[\"--hjm-toast-action-background\"] = resolveColorReference(toastRecipe.action.background, palette);\n style[\"--hjm-toast-action-color\"] = resolveColorReference(toastRecipe.action.color, palette);\n style[\"--hjm-toast-description-color\"] = resolveColorReference(toastRecipe.description.color, palette);\n const toastExit = toastRecipe.transition.web.exit;\n style[\"--hjm-toast-exit-duration\"] = environment.reducedMotion ? \"0ms\" : `${toastExit.duration}ms`;\n style[\"--hjm-toast-exit-easing\"] = `cubic-bezier(${easing[toastExit.easing].join(\", \")})`;\n // SearchField geometry comes from searchFieldRecipe (2026-10-06 follow-up). Web had drawn TextField's\n // 16px padding for both sizes and a 44px clear button even at `medium`, where the recipe and Native\n // use a 36 circle with a 4px hit slop (44 target, 36 footprint).\n for (const [name, size] of Object.entries(searchFieldRecipe.sizes)) {\n style[`--hjm-search-field-padding-${name}`] = `${size.paddingHorizontal}px`;\n style[`--hjm-search-field-gap-${name}`] = `${size.gap}px`;\n style[`--hjm-search-field-clear-${name}`] = `${size.clearDiameter}px`;\n style[`--hjm-search-field-clear-slop-${name}`] = `${size.clearHitSlop}px`;\n }\n style[\"--hjm-tooltip-max-width\"] = `${tooltipRecipe.content.maxWidth}px`;\n style[\"--hjm-tooltip-padding\"] = `${tooltipRecipe.surface.padding}px`;\n // Floating collection surfaces read their padding from the recipe (2026-10-06): the stylesheet's 4 had drifted from 8.\n style[\"--hjm-menu-padding\"] = `${menuRecipe.surface.padding}px`;\n style[\"--hjm-select-popover-padding\"] = `${selectRecipe.popover.padding}px`;\n style[\"--hjm-combobox-popover-padding\"] = `${comboboxRecipe.popover.padding}px`;\n style[\"--hjm-tooltip-collision-padding\"] = `${tooltipRecipe.positioning.collisionPadding}px`;\n style[\"--hjm-button-pressed-opacity\"] = buttonRecipe.opacity.pressed;\n style[\"--hjm-button-disabled-opacity\"] = buttonRecipe.opacity.disabled;\n style[\"--hjm-field-border-width\"] = `${fieldRecipe.borderWidth}px`;\n style[\"--hjm-field-focus-ring-width\"] = `${fieldRecipe.focusRingWidth}px`;\n style[\"--hjm-field-disabled-opacity\"] = fieldRecipe.disabledOpacity;\n style[\"--hjm-control-min-touch-target\"] = `${control.minTouchTarget}px`;\n style[\"--hjm-control-field-height\"] = `${control.fieldHeight}px`;\n style[\"--hjm-field-multiline-min-height\"] = rem(fieldRecipe.multilineMinHeight);\n style[\"--hjm-field-padding-block\"] = rem(fieldRecipe.paddingVertical);\n for (const [name, value] of Object.entries(control.buttonHeight)) {\n // The axis is applied to the emitted variables rather than to each rule so\n // that every stylesheet consumer of a control height honours it at once.\n style[`--hjm-control-button-${kebab(name)}`] =\n `${visibleControlHeight(value, environment.minimumVisualTarget)}px`;\n }\n\n return style;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-group.d.ts","sourceRoot":"","sources":["../src/toggle-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACrB,MAAM,iDAAiD,CAAC;AAGzD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,MAAM,MAAM,gBAAgB,CAAC,EAAE,SAAS,MAAM,GAAG,MAAM,IAA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C,EAAE,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;CAAE,KAC9D,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC"}
|
package/dist/toggle-group.js
CHANGED
|
@@ -16,7 +16,9 @@ export const ToggleGroup = forwardRef(function ToggleGroup({ descriptor, pressed
|
|
|
16
16
|
"--hjm-toggle-min-height": `${metrics.minHeight}px`,
|
|
17
17
|
"--hjm-toggle-padding": `${metrics.paddingHorizontal}px`,
|
|
18
18
|
"--hjm-toggle-gap": `${toggleGroupRecipe.gap}px`,
|
|
19
|
-
|
|
19
|
+
// Use the closest Provider's CSS role without adding its runtime graph to
|
|
20
|
+
// this small entry. Standalone groups retain the numeric recipe fallback.
|
|
21
|
+
"--hjm-toggle-radius": `var(--hjm-radius-md, ${toggleGroupRecipe.radius}px)`,
|
|
20
22
|
}, children: descriptor.items.map((item) => (_jsx("button", { type: "button", "aria-pressed": pressed.has(item.id), "aria-disabled": item.disabled || undefined, disabled: item.disabled, className: "hjm-toggle-group__item", onClick: () => setPressed(toggleGroupSelection(descriptor, pressed, item.id)), children: item.label }, item.id))) }));
|
|
21
23
|
});
|
|
22
24
|
//# sourceMappingURL=toggle-group.js.map
|
package/dist/toggle-group.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-group.js","sourceRoot":"","sources":["../src/toggle-group.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,6BAA6B,EAC7B,iBAAiB,EACjB,oBAAoB,EACpB,6BAA6B,GAG9B,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAsB,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAcjE,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC,SAAS,WAAW,CACxD,EACE,UAAU,EACV,UAAU,EAAE,iBAAiB,EA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AyB,EAAE,GAAG,OAAO,CAAC,SAAS,IAAI;YACnD,sBAAsB,EAAE,GAAG,OAAO,CAAC,iBAAiB,IAAI;YACxD,kBAAkB,EAAE,GAAG,iBAAiB,CAAC,GAAG,IAAI;YAChD,0EAA0E;YAC1E,0EAA0E;YAC1E,qBAAqB,EAAE,wBAAwB,iBAAiB,CAAC,MAAM,KAAK;SAC5D,YAEjB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAC9B,iBAEE,IAAI,EAAC,QAAQ,kBAEC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,mBACnB,IAAI,CAAC,QAAQ,IAAI,SAAS,EACzC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,SAAS,EAAC,wBAAwB,EAClC,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,oBAAoB,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,YAE5E,IAAI,CAAC,KAAK,IATN,IAAI,CAAC,EAAE,CAUL,CACV,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAE6B,CAAC","sourcesContent":["import {\n reconcileToggleGroupSelection,\n toggleGroupRecipe,\n toggleGroupSelection,\n validateToggleGroupDescriptor,\n type ToggleGroupDescriptor,\n type ToggleGroupSize,\n} from \"@hjmds/design-contracts/components/toggle-group\";\nimport { forwardRef, useMemo, type CSSProperties } from \"react\";\nimport { classNames, useControllableState } from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type ToggleGroupProps<Id extends string = string> = Readonly<{\n descriptor: ToggleGroupDescriptor<Id>;\n pressedIds?: ReadonlySet<Id>;\n defaultPressedIds?: ReadonlySet<Id>;\n onPressedIdsChange?: (ids: ReadonlySet<Id>) => void;\n size?: ToggleGroupSize;\n className?: string;\n /** Canonical layout-only placement on the root group. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const ToggleGroup = forwardRef(function ToggleGroup<Id extends string = string>(\n {\n descriptor,\n pressedIds: controlledPressed,\n defaultPressedIds,\n onPressedIdsChange,\n size = toggleGroupRecipe.defaults.size,\n className,\n layoutStyle,\n }: ToggleGroupProps<Id>,\n forwardedRef: React.Ref<HTMLDivElement>,\n) {\n validateToggleGroupDescriptor(descriptor);\n const [rawPressed, setPressed] = useControllableState<ReadonlySet<Id>>({\n ...(controlledPressed === undefined ? {} : { value: controlledPressed }),\n defaultValue: defaultPressedIds ?? new Set<Id>(),\n ...(onPressedIdsChange === undefined ? {} : { onChange: onPressedIdsChange }),\n });\n const pressed = useMemo(\n () => reconcileToggleGroupSelection(descriptor, rawPressed),\n [descriptor, rawPressed],\n );\n const metrics = toggleGroupRecipe.sizes[size];\n return (\n <div\n ref={forwardedRef}\n role=\"group\"\n aria-label={descriptor.accessibilityLabel}\n className={classNames(\"hjm-toggle-group\", className)}\n data-size={size}\n style={{\n ...layoutStyle,\n \"--hjm-toggle-min-height\": `${metrics.minHeight}px`,\n \"--hjm-toggle-padding\": `${metrics.paddingHorizontal}px`,\n \"--hjm-toggle-gap\": `${toggleGroupRecipe.gap}px`,\n // Use the closest Provider's CSS role without adding its runtime graph to\n // this small entry. Standalone groups retain the numeric recipe fallback.\n \"--hjm-toggle-radius\": `var(--hjm-radius-md, ${toggleGroupRecipe.radius}px)`,\n } as CSSProperties}\n >\n {descriptor.items.map((item) => (\n <button\n key={item.id}\n type=\"button\"\n // The pressed state rides on aria-pressed, never on color alone.\n aria-pressed={pressed.has(item.id)}\n aria-disabled={item.disabled || undefined}\n disabled={item.disabled}\n className=\"hjm-toggle-group__item\"\n onClick={() => setPressed(toggleGroupSelection(descriptor, pressed, item.id))}\n >\n {item.label}\n </button>\n ))}\n </div>\n );\n}) as <Id extends string = string>(\n props: ToggleGroupProps<Id> & { ref?: React.Ref<HTMLDivElement> },\n) => React.ReactElement | null;\n"]}
|
package/dist/top.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"top.d.ts","sourceRoot":"","sources":["../src/top.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAiD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC;IAC9B,UAAU,EAAE,aAAa,CAAC;IAC1B,kFAAkF;IAClF,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gGAAgG;IAChG,WAAW,CAAC,EAAE,uBAAuB,CAAC;CACvC,CAAC,CAAC;AAEH,eAAO,MAAM,GAAG;gBARF,aAAa;IACzB,kFAAkF;eACvE,SAAS;gBACR,MAAM;IAClB,gGAAgG;kBAClF,uBAAuB;
|
|
1
|
+
{"version":3,"file":"top.d.ts","sourceRoot":"","sources":["../src/top.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAiD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC;IAC9B,UAAU,EAAE,aAAa,CAAC;IAC1B,kFAAkF;IAClF,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gGAAgG;IAChG,WAAW,CAAC,EAAE,uBAAuB,CAAC;CACvC,CAAC,CAAC;AAEH,eAAO,MAAM,GAAG;gBARF,aAAa;IACzB,kFAAkF;eACvE,SAAS;gBACR,MAAM;IAClB,gGAAgG;kBAClF,uBAAuB;gDAyCrC,CAAC"}
|
package/dist/top.js
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { topDefaults, topRecipe, validateTopDescriptor, } from "@hjmds/design-contracts/components/top";
|
|
3
3
|
import { forwardRef, createElement } from "react";
|
|
4
|
-
import { classNames } from "./internal.js";
|
|
4
|
+
import { classNames, useDesignProfileDefaults } from "./internal.js";
|
|
5
5
|
export const Top = forwardRef(function Top({ descriptor, trailing, className, layoutStyle }, forwardedRef) {
|
|
6
6
|
validateTopDescriptor(descriptor);
|
|
7
7
|
const size = descriptor.size ?? topDefaults.size;
|
|
8
8
|
const level = descriptor.headingLevel ?? topDefaults.headingLevel;
|
|
9
9
|
const metrics = topRecipe.sizes[size];
|
|
10
|
+
const profile = useDesignProfileDefaults();
|
|
11
|
+
// Keep the visual role independent of the semantic heading level and preserve recipe defaults.
|
|
12
|
+
const title = profile
|
|
13
|
+
? size === "large" ? profile.tokens.heading.level2 : profile.tokens.typography.titleLarge
|
|
14
|
+
: metrics.title;
|
|
10
15
|
return (_jsxs("header", { ref: forwardedRef, className: classNames("hjm-top", className), "data-size": size, style: { ...layoutStyle,
|
|
11
|
-
"--hjm-top-title-size": `${
|
|
12
|
-
"--hjm-top-title-line-height": `${
|
|
13
|
-
"--hjm-top-title-weight":
|
|
16
|
+
"--hjm-top-title-size": `${title.fontSize}px`,
|
|
17
|
+
"--hjm-top-title-line-height": `${title.lineHeight}px`,
|
|
18
|
+
"--hjm-top-title-weight": title.fontWeight,
|
|
14
19
|
"--hjm-top-padding-top": `${metrics.paddingTop}px`,
|
|
15
20
|
"--hjm-top-padding-bottom": `${metrics.paddingBottom}px`,
|
|
16
21
|
}, children: [descriptor.eyebrow ? _jsx("p", { className: "hjm-top__eyebrow", children: descriptor.eyebrow }) : null, _jsxs("div", { className: "hjm-top__row", children: [createElement(`h${level}`, { className: "hjm-top__title" }, descriptor.title), trailing ? _jsx("div", { className: "hjm-top__trailing", children: trailing }) : null] }), descriptor.description ? _jsx("p", { className: "hjm-top__description", children: descriptor.description }) : null] }));
|
package/dist/top.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"top.js","sourceRoot":"","sources":["../src/top.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,WAAW,EACX,SAAS,EACT,qBAAqB,GAEtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAsC,MAAM,OAAO,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"top.js","sourceRoot":"","sources":["../src/top.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,WAAW,EACX,SAAS,EACT,qBAAqB,GAEtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAsC,MAAM,OAAO,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAYrE,MAAM,CAAC,MAAM,GAAG,GAAG,UAAU,CAAwB,SAAS,GAAG,CAC/D,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,EAChD,YAAY;IAEZ,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAClC,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,IAAI,WAAW,CAAC,IAAI,CAAC;IACjD,MAAM,KAAK,GAAG,UAAU,CAAC,YAAY,IAAI,WAAW,CAAC,YAAY,CAAC;IAClE,MAAM,OAAO,GAAG,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,wBAAwB,EAAE,CAAC;IAC3C,+FAA+F;IAC/F,MAAM,KAAK,GAAG,OAAO;QACnB,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU;QACzF,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IAClB,OAAO,CACL,kBACE,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,SAAS,CAAC,eAChC,IAAI,EACf,KAAK,EAAE,EAAE,GAAG,WAAW;YACrB,sBAAsB,EAAE,GAAG,KAAK,CAAC,QAAQ,IAAI;YAC7C,6BAA6B,EAAE,GAAG,KAAK,CAAC,UAAU,IAAI;YACtD,wBAAwB,EAAE,KAAK,CAAC,UAAU;YAC1C,uBAAuB,EAAE,GAAG,OAAO,CAAC,UAAU,IAAI;YAClD,0BAA0B,EAAE,GAAG,OAAO,CAAC,aAAa,IAAI;SACxC,aAEjB,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,YAAG,SAAS,EAAC,kBAAkB,YAAE,UAAU,CAAC,OAAO,GAAK,CAAC,CAAC,CAAC,IAAI,EACrF,eAAK,SAAS,EAAC,cAAc,aAK1B,aAAa,CAAC,IAAI,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,UAAU,CAAC,KAAK,CAAC,EAC7E,QAAQ,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,mBAAmB,YAAE,QAAQ,GAAO,CAAC,CAAC,CAAC,IAAI,IAClE,EACL,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,YAAG,SAAS,EAAC,sBAAsB,YAAE,UAAU,CAAC,WAAW,GAAK,CAAC,CAAC,CAAC,IAAI,IAC1F,CACV,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import {\n topDefaults,\n topRecipe,\n validateTopDescriptor,\n type TopDescriptor,\n} from \"@hjmds/design-contracts/components/top\";\nimport { forwardRef, createElement, type CSSProperties, type ReactNode } from \"react\";\nimport { classNames, useDesignProfileDefaults } from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type TopProps = Readonly<{\n descriptor: TopDescriptor;\n /** Secondary action sharing the title row; drops below it when space runs out. */\n trailing?: ReactNode;\n className?: string;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const Top = forwardRef<HTMLElement, TopProps>(function Top(\n { descriptor, trailing, className, layoutStyle },\n forwardedRef,\n) {\n validateTopDescriptor(descriptor);\n const size = descriptor.size ?? topDefaults.size;\n const level = descriptor.headingLevel ?? topDefaults.headingLevel;\n const metrics = topRecipe.sizes[size];\n const profile = useDesignProfileDefaults();\n // Keep the visual role independent of the semantic heading level and preserve recipe defaults.\n const title = profile\n ? size === \"large\" ? profile.tokens.heading.level2 : profile.tokens.typography.titleLarge\n : metrics.title;\n return (\n <header\n ref={forwardedRef}\n className={classNames(\"hjm-top\", className)}\n data-size={size}\n style={{ ...layoutStyle,\n \"--hjm-top-title-size\": `${title.fontSize}px`,\n \"--hjm-top-title-line-height\": `${title.lineHeight}px`,\n \"--hjm-top-title-weight\": title.fontWeight,\n \"--hjm-top-padding-top\": `${metrics.paddingTop}px`,\n \"--hjm-top-padding-bottom\": `${metrics.paddingBottom}px`,\n } as CSSProperties}\n >\n {descriptor.eyebrow ? <p className=\"hjm-top__eyebrow\">{descriptor.eyebrow}</p> : null}\n <div className=\"hjm-top__row\">\n {/*\n A real heading element at the declared level, not styled text: this\n block is what a screen reader lands on when it skips to the content.\n */}\n {createElement(`h${level}`, { className: \"hjm-top__title\" }, descriptor.title)}\n {trailing ? <div className=\"hjm-top__trailing\">{trailing}</div> : null}\n </div>\n {descriptor.description ? <p className=\"hjm-top__description\">{descriptor.description}</p> : null}\n </header>\n );\n});\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hjmds/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"description": "Accessible React 19 renderers for HJM design contracts.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -507,6 +507,11 @@
|
|
|
507
507
|
"types": "./dist/design-profile.d.ts",
|
|
508
508
|
"import": "./dist/design-profile.js",
|
|
509
509
|
"default": "./dist/design-profile.js"
|
|
510
|
+
},
|
|
511
|
+
"./collection-rail": {
|
|
512
|
+
"types": "./dist/collection-rail.d.ts",
|
|
513
|
+
"import": "./dist/collection-rail.js",
|
|
514
|
+
"default": "./dist/collection-rail.js"
|
|
510
515
|
}
|
|
511
516
|
},
|
|
512
517
|
"files": [
|
|
@@ -516,7 +521,7 @@
|
|
|
516
521
|
"THIRD_PARTY_NOTICES.md"
|
|
517
522
|
],
|
|
518
523
|
"peerDependencies": {
|
|
519
|
-
"@hjmds/design-contracts": ">=1.
|
|
524
|
+
"@hjmds/design-contracts": ">=1.16.0 <1.17.0",
|
|
520
525
|
"react": ">=19.0.0",
|
|
521
526
|
"react-dom": ">=19.0.0",
|
|
522
527
|
"@number-flow/react": "0.6.2",
|
|
@@ -553,7 +558,7 @@
|
|
|
553
558
|
"blobatar": "2.7.0",
|
|
554
559
|
"@blobatar/react": "2.7.0",
|
|
555
560
|
"lucide-react": "1.49.0",
|
|
556
|
-
"@hjmds/design-contracts": "1.
|
|
561
|
+
"@hjmds/design-contracts": "1.16.0"
|
|
557
562
|
},
|
|
558
563
|
"peerDependenciesMeta": {
|
|
559
564
|
"@number-flow/react": {
|