@hjmds/react 1.27.1 → 1.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/actions.d.ts +26 -4
  2. package/dist/actions.d.ts.map +1 -1
  3. package/dist/actions.js +4 -4
  4. package/dist/actions.js.map +1 -1
  5. package/dist/auth-screen.d.ts +32 -2
  6. package/dist/auth-screen.d.ts.map +1 -1
  7. package/dist/auth-screen.js +52 -4
  8. package/dist/auth-screen.js.map +1 -1
  9. package/dist/chart.d.ts +1 -1
  10. package/dist/chart.js.map +1 -1
  11. package/dist/collection-editing.d.ts.map +1 -1
  12. package/dist/collection-editing.js +5 -4
  13. package/dist/collection-editing.js.map +1 -1
  14. package/dist/communication.js +1 -1
  15. package/dist/communication.js.map +1 -1
  16. package/dist/data-table.d.ts +2 -2
  17. package/dist/data-table.d.ts.map +1 -1
  18. package/dist/data-table.js.map +1 -1
  19. package/dist/display.d.ts.map +1 -1
  20. package/dist/display.js +9 -3
  21. package/dist/display.js.map +1 -1
  22. package/dist/evidence.d.ts +1 -1
  23. package/dist/evidence.js +2 -2
  24. package/dist/evidence.js.map +1 -1
  25. package/dist/feedback.d.ts +10 -0
  26. package/dist/feedback.d.ts.map +1 -1
  27. package/dist/feedback.js +6 -1
  28. package/dist/feedback.js.map +1 -1
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +1 -1
  32. package/dist/index.js.map +1 -1
  33. package/dist/internal/list-row-scroll-room.d.ts +16 -0
  34. package/dist/internal/list-row-scroll-room.d.ts.map +1 -0
  35. package/dist/internal/list-row-scroll-room.js +17 -0
  36. package/dist/internal/list-row-scroll-room.js.map +1 -0
  37. package/dist/internal/screen-exit.d.ts.map +1 -1
  38. package/dist/internal/screen-exit.js +2 -1
  39. package/dist/internal/screen-exit.js.map +1 -1
  40. package/dist/notification-bell.d.ts +4 -1
  41. package/dist/notification-bell.d.ts.map +1 -1
  42. package/dist/notification-bell.js +5 -2
  43. package/dist/notification-bell.js.map +1 -1
  44. package/dist/overlays.js +2 -2
  45. package/dist/overlays.js.map +1 -1
  46. package/dist/saved-items.js +1 -1
  47. package/dist/saved-items.js.map +1 -1
  48. package/dist/screen-flows.d.ts +2 -2
  49. package/dist/screen-flows.d.ts.map +1 -1
  50. package/dist/screen-flows.js +14 -13
  51. package/dist/screen-flows.js.map +1 -1
  52. package/dist/screens.d.ts +1 -1
  53. package/dist/screens.d.ts.map +1 -1
  54. package/dist/screens.js +2 -2
  55. package/dist/screens.js.map +1 -1
  56. package/dist/selection.d.ts.map +1 -1
  57. package/dist/selection.js +2 -2
  58. package/dist/selection.js.map +1 -1
  59. package/dist/styles.css +271 -125
  60. package/dist/styles.layered.css +271 -125
  61. package/dist/theme.d.ts.map +1 -1
  62. package/dist/theme.js +40 -4
  63. package/dist/theme.js.map +1 -1
  64. package/dist/toast.d.ts.map +1 -1
  65. package/dist/toast.js +4 -1
  66. package/dist/toast.js.map +1 -1
  67. package/dist/top.js +1 -1
  68. package/dist/top.js.map +1 -1
  69. package/dist/upload-item.d.ts.map +1 -1
  70. package/dist/upload-item.js +1 -1
  71. package/dist/upload-item.js.map +1 -1
  72. package/dist/virtual-list.d.ts.map +1 -1
  73. package/dist/virtual-list.js +5 -1
  74. package/dist/virtual-list.js.map +1 -1
  75. package/package.json +3 -3
@@ -1 +1 @@
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,CAkMf"}
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAkBA,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,2DAA2D,CAAC;AAoBnE,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,CAoOf"}
package/dist/theme.js CHANGED
@@ -3,8 +3,8 @@ import { backdrop, control, easing, fontFamily, resolveFontFamilyStack, fontWeig
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";
6
- import { buttonRecipe, fieldRecipe } from "@hjmds/design-contracts/recipes/base";
7
- import { bottomNavigationRecipe, comboboxRecipe, dialogRecipe, listRowRecipe, menuRecipe, searchFieldRecipe, selectRecipe, sheetRecipe, skeletonRecipe, tooltipRecipe, switchRecipe, toastRecipe, } from "@hjmds/design-contracts/recipes";
6
+ import { buttonRecipe, fieldRecipe, resolveButtonEdgeOverhang } from "@hjmds/design-contracts/recipes/base";
7
+ import { bottomNavigationRecipe, iconButtonRecipe, resolveIconButtonEdgeOverhang, comboboxRecipe, dialogRecipe, listRecipe, listRowRecipe, menuRecipe, searchFieldRecipe, selectRecipe, sheetRecipe, skeletonRecipe, tooltipRecipe, switchRecipe, toastRecipe, textRecipe, } from "@hjmds/design-contracts/recipes";
8
8
  function kebab(value) {
9
9
  return value.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
10
10
  }
@@ -76,9 +76,21 @@ export function createHjmThemeStyle(value) {
76
76
  // does not carry a second copy of the same numbers.
77
77
  style["--hjm-list-row-gap"] = rem(listRowRecipe.gap);
78
78
  style["--hjm-list-row-leading-size"] = rem(listRowRecipe.leadingSize);
79
- // Native already pins a described switch to the two-line list-row height; Web
80
- // let content decide (~48), so neighbouring settings rows differed by platform.
79
+ // Row text sits on the container content edge; the surface bleeds by this much (2026-10-17 user decision).
80
+ style["--hjm-list-row-surface-bleed"] = rem(listRowRecipe.surfaceBleed);
81
+ style["--hjm-list-grouped-padding-inline"] = rem(listRecipe.grouped.paddingInline);
82
+ for (const [name, value] of Object.entries(listRecipe.separators)) {
83
+ if (value === null)
84
+ continue;
85
+ style[`--hjm-list-separator-${kebab(name)}-start`] = rem(value.insetStart);
86
+ // Start when the row above has a leading element (its text column), as Native's List reads it per row.
87
+ style[`--hjm-list-separator-${kebab(name)}-leading-start`] = rem(value.leadingInsetStart);
88
+ style[`--hjm-list-separator-${kebab(name)}-end`] = rem(value.insetEnd);
89
+ }
90
+ // A described switch row has the same padding and minimum height as Native (switchRecipe.rowPaddingVertical,
91
+ // rowTwoLineMinHeight); Web used to let content decide, so neighbouring settings rows differed by platform.
81
92
  style["--hjm-switch-row-min-height"] = rem(switchRecipe.rowMinHeight);
93
+ style["--hjm-switch-row-padding-vertical"] = rem(switchRecipe.rowPaddingVertical);
82
94
  style["--hjm-switch-row-two-line-min-height"] = rem(switchRecipe.rowTwoLineMinHeight);
83
95
  for (const [name, value] of Object.entries(switchRecipe.sizes)) {
84
96
  style[`--hjm-switch-${kebab(name)}-width`] = rem(value.width);
@@ -99,6 +111,11 @@ export function createHjmThemeStyle(value) {
99
111
  const skeletonCurve = easing[skeletonRecipe.animation.easing];
100
112
  style["--hjm-skeleton-circle-size"] =
101
113
  `${skeletonRecipe.shapes.circle.defaultHeight}px`;
114
+ style["--hjm-skeleton-background"] = resolveColorReference(skeletonRecipe.background, palette);
115
+ style["--hjm-skeleton-button-height"] = `${skeletonRecipe.shapes.button.defaultHeight}px`;
116
+ style["--hjm-skeleton-media-aspect"] = skeletonRecipe.shapes.media.aspectRatio;
117
+ style["--hjm-skeleton-lines-gap"] = `${skeletonRecipe.lines.gap}px`;
118
+ style["--hjm-skeleton-last-line-width"] = `${skeletonRecipe.lines.lastLineWidthPercent}%`;
102
119
  style["--hjm-skeleton-duration"] = `${skeletonRecipe.animation.duration}ms`;
103
120
  style["--hjm-skeleton-easing"] = `cubic-bezier(${skeletonCurve.join(", ")})`;
104
121
  style["--hjm-skeleton-from-opacity"] = skeletonRecipe.animation.fromOpacity;
@@ -154,7 +171,17 @@ export function createHjmThemeStyle(value) {
154
171
  style[`--hjm-toast-accent-${tone}`] = resolveColorReference(contract.accent, palette);
155
172
  style[`--hjm-toast-badge-${tone}`] = resolveColorReference(contract.badge, palette);
156
173
  }
174
+ // Text emphasis steps come from textRecipe so Web and Native share one scale (400/500/500 since the 2026-10-17 lighter scale).
175
+ for (const [step, weight] of Object.entries(textRecipe.emphasis))
176
+ style[`--hjm-text-emphasis-${step}`] = weight;
157
177
  style["--hjm-toast-badge-size"] = `${toastRecipe.icon.badgeDiameter}px`;
178
+ // First-line anchor geometry (2026-10-17): the same padding, anchor and close overhang Native reads.
179
+ style["--hjm-toast-padding-block"] = `${toastRecipe.surface.padding.block}px`;
180
+ style["--hjm-toast-padding-inline"] = `${toastRecipe.surface.padding.inline}px`;
181
+ style["--hjm-toast-anchor-size"] = `${toastRecipe.anchor.blockSize}px`;
182
+ style["--hjm-toast-close-size"] = `${toastRecipe.close.diameter}px`;
183
+ style["--hjm-toast-close-block-overhang"] = `${toastRecipe.close.blockOverhang}px`;
184
+ style["--hjm-toast-close-inline-overhang"] = `${toastRecipe.close.inlineOverhang}px`;
158
185
  style["--hjm-toast-action-background"] = resolveColorReference(toastRecipe.action.background, palette);
159
186
  style["--hjm-toast-action-color"] = resolveColorReference(toastRecipe.action.color, palette);
160
187
  style["--hjm-toast-description-color"] = resolveColorReference(toastRecipe.description.color, palette);
@@ -203,6 +230,15 @@ export function createHjmThemeStyle(value) {
203
230
  style[`--hjm-control-button-${kebab(name)}`] =
204
231
  `${visibleControlHeight(value, environment.minimumVisualTarget)}px`;
205
232
  }
233
+ // Edge alignment (2026-10-17 measured audit): how far a ghost IconButton / Button with `edge` overhangs the
234
+ // container edge, from the same contract helpers Native reads (glyph slot or label on the inset, hit area kept).
235
+ for (const size of Object.keys(iconButtonRecipe.sizes)) {
236
+ const visible = visibleControlHeight(iconButtonRecipe.sizes[size].diameter, environment.minimumVisualTarget);
237
+ style[`--hjm-icon-button-edge-${size}`] = `${resolveIconButtonEdgeOverhang("ghost", size, visible)}px`;
238
+ }
239
+ for (const size of Object.keys(buttonRecipe.sizes)) {
240
+ style[`--hjm-button-edge-${size}`] = `${resolveButtonEdgeOverhang("ghost", size)}px`;
241
+ }
206
242
  return style;
207
243
  }
208
244
  //# sourceMappingURL=theme.js.map
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,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,SA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GAAG,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC;IACvE,KAAK,CAAC,0BAA0B,CAAC,GAAG,GAAG,WAAW,CAAC,WAAW,IAAI,CAAC;IACnE,KAAK,CAAC,8BAA8B,CAAC,GAAG,GAAG,WAAW,CAAC,cAAc,IAAI,CAAC;IAC1E,KAAK,CAAC,8BAA8B,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 // Native already pins a described switch to the two-line list-row height; Web\n // let content decide (~48), so neighbouring settings rows differed by platform.\n style[\"--hjm-switch-row-min-height\"] = rem(switchRecipe.rowMinHeight);\n style[\"--hjm-switch-row-two-line-min-height\"] = rem(switchRecipe.rowTwoLineMinHeight);\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 // Panel toast (2026-10-10): media column, step progress and action alignment come from the same recipe Native reads.\n style[\"--hjm-toast-media-size\"] = `${toastRecipe.media.size}px`;\n style[\"--hjm-toast-action-align\"] = toastRecipe.action.align;\n style[\"--hjm-toast-pressed-opacity\"] = toastRecipe.states.pressedOpacity;\n style[\"--hjm-toast-progress-gap\"] = `${toastRecipe.progress.gap}px`;\n style[\"--hjm-toast-progress-dot\"] = `${toastRecipe.progress.dotSize}px`;\n style[\"--hjm-toast-progress-current-scale\"] = String(toastRecipe.progress.currentScale);\n style[\"--hjm-toast-progress-done\"] = resolveColorReference(toastRecipe.progress.doneColor, palette);\n style[\"--hjm-toast-progress-upcoming\"] = resolveColorReference(toastRecipe.progress.upcomingColor, palette);\n style[\"--hjm-toast-progress-label\"] = resolveColorReference(toastRecipe.progress.labelColor, palette);\n style[\"--hjm-toast-progress-current-label\"] = resolveColorReference(toastRecipe.progress.currentLabelColor, 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,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAC5G,OAAO,EACL,sBAAsB,EACtB,gBAAgB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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, resolveButtonEdgeOverhang } from \"@hjmds/design-contracts/recipes/base\";\nimport {\n bottomNavigationRecipe,\n iconButtonRecipe,\n resolveIconButtonEdgeOverhang,\n comboboxRecipe,\n dialogRecipe,\n listRecipe,\n listRowRecipe,\n menuRecipe,\n searchFieldRecipe,\n selectRecipe,\n sheetRecipe,\n skeletonRecipe,\n tooltipRecipe,\n switchRecipe,\n toastRecipe,\n textRecipe,\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 // Row text sits on the container content edge; the surface bleeds by this much (2026-10-17 user decision).\n style[\"--hjm-list-row-surface-bleed\"] = rem(listRowRecipe.surfaceBleed);\n style[\"--hjm-list-grouped-padding-inline\"] = rem(listRecipe.grouped.paddingInline);\n for (const [name, value] of Object.entries(listRecipe.separators)) {\n if (value === null) continue;\n style[`--hjm-list-separator-${kebab(name)}-start`] = rem(value.insetStart);\n // Start when the row above has a leading element (its text column), as Native's List reads it per row.\n style[`--hjm-list-separator-${kebab(name)}-leading-start`] = rem(value.leadingInsetStart);\n style[`--hjm-list-separator-${kebab(name)}-end`] = rem(value.insetEnd);\n }\n // A described switch row has the same padding and minimum height as Native (switchRecipe.rowPaddingVertical,\n // rowTwoLineMinHeight); Web used to let content decide, so neighbouring settings rows differed by platform.\n style[\"--hjm-switch-row-min-height\"] = rem(switchRecipe.rowMinHeight);\n style[\"--hjm-switch-row-padding-vertical\"] = rem(switchRecipe.rowPaddingVertical);\n style[\"--hjm-switch-row-two-line-min-height\"] = rem(switchRecipe.rowTwoLineMinHeight);\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-background\"] = resolveColorReference(skeletonRecipe.background, palette);\n style[\"--hjm-skeleton-button-height\"] = `${skeletonRecipe.shapes.button.defaultHeight}px`;\n style[\"--hjm-skeleton-media-aspect\"] = skeletonRecipe.shapes.media.aspectRatio;\n style[\"--hjm-skeleton-lines-gap\"] = `${skeletonRecipe.lines.gap}px`;\n style[\"--hjm-skeleton-last-line-width\"] = `${skeletonRecipe.lines.lastLineWidthPercent}%`;\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 // Text emphasis steps come from textRecipe so Web and Native share one scale (400/500/500 since the 2026-10-17 lighter scale).\n for (const [step, weight] of Object.entries(textRecipe.emphasis)) style[`--hjm-text-emphasis-${step}`] = weight;\n style[\"--hjm-toast-badge-size\"] = `${toastRecipe.icon.badgeDiameter}px`;\n // First-line anchor geometry (2026-10-17): the same padding, anchor and close overhang Native reads.\n style[\"--hjm-toast-padding-block\"] = `${toastRecipe.surface.padding.block}px`;\n style[\"--hjm-toast-padding-inline\"] = `${toastRecipe.surface.padding.inline}px`;\n style[\"--hjm-toast-anchor-size\"] = `${toastRecipe.anchor.blockSize}px`;\n style[\"--hjm-toast-close-size\"] = `${toastRecipe.close.diameter}px`;\n style[\"--hjm-toast-close-block-overhang\"] = `${toastRecipe.close.blockOverhang}px`;\n style[\"--hjm-toast-close-inline-overhang\"] = `${toastRecipe.close.inlineOverhang}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 // Panel toast (2026-10-10): media column, step progress and action alignment come from the same recipe Native reads.\n style[\"--hjm-toast-media-size\"] = `${toastRecipe.media.size}px`;\n style[\"--hjm-toast-action-align\"] = toastRecipe.action.align;\n style[\"--hjm-toast-pressed-opacity\"] = toastRecipe.states.pressedOpacity;\n style[\"--hjm-toast-progress-gap\"] = `${toastRecipe.progress.gap}px`;\n style[\"--hjm-toast-progress-dot\"] = `${toastRecipe.progress.dotSize}px`;\n style[\"--hjm-toast-progress-current-scale\"] = String(toastRecipe.progress.currentScale);\n style[\"--hjm-toast-progress-done\"] = resolveColorReference(toastRecipe.progress.doneColor, palette);\n style[\"--hjm-toast-progress-upcoming\"] = resolveColorReference(toastRecipe.progress.upcomingColor, palette);\n style[\"--hjm-toast-progress-label\"] = resolveColorReference(toastRecipe.progress.labelColor, palette);\n style[\"--hjm-toast-progress-current-label\"] = resolveColorReference(toastRecipe.progress.currentLabelColor, 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 // Edge alignment (2026-10-17 measured audit): how far a ghost IconButton / Button with `edge` overhangs the\n // container edge, from the same contract helpers Native reads (glyph slot or label on the inset, hit area kept).\n for (const size of Object.keys(iconButtonRecipe.sizes) as (keyof typeof iconButtonRecipe.sizes)[]) {\n const visible = visibleControlHeight(iconButtonRecipe.sizes[size].diameter, environment.minimumVisualTarget);\n style[`--hjm-icon-button-edge-${size}`] = `${resolveIconButtonEdgeOverhang(\"ghost\", size, visible)}px`;\n }\n for (const size of Object.keys(buttonRecipe.sizes) as (keyof typeof buttonRecipe.sizes)[]) {\n style[`--hjm-button-edge-${size}`] = `${resolveButtonEdgeOverhang(\"ghost\", size)}px`;\n }\n\n return style;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../src/toast.tsx"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,OAAO,EACZ,KAAK,mBAAmB,EAExB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EAEvB,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC5B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAYL,KAAK,cAAc,EAEnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAwLf,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,GACjF,QAAQ,CAAC;IACP,UAAU,EAAE,eAAe,CAAC;IAC5B,gBAAgB,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;CACxD,CAAC,CAAC;AAEL,wFAAwF;AACxF,eAAO,MAAM,KAAK;gBALF,eAAe;sBACT,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI;mDA2CxD,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC;IAC9B,OAAO,CAAC,UAAU,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,kBAAkB,CAAC;IACxF,OAAO,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,kBAAkB,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AC,EAAE,oBAAoB,CAAC;IACvC,iBAAiB,CAAC,EAAE,sBAAsB,CAAC;IAC3C,cAAc,CAAC,EAAE,mBAAmB,CAAC;IACrC,eAAe,CAAC,EAAE,WAAW,CAAC;IAC9B,qFAAqF;IACrF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,iEAAiE;IACjE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iFAAiF;IACjF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC,CAAC;AAuDH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,KAAK,EACL,SAA0C,EAC1C,KAAK,EACL,aAAkB,EAClB,UAAU,EACV,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,MAAM,EACN,YAAgB,EAChB,MAAM,EACN,UAAU,GACX,EAAE,kBAAkB,+BA8NpB"}
package/dist/toast.js CHANGED
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { isLargeTextScale } from "@hjmds/design-contracts/components/design-system-provider";
3
3
  import { createToastStore, createToastSession, resolveToastDescriptor, } from "@hjmds/design-contracts/components/toast";
4
4
  import { toastRecipe, } from "@hjmds/design-contracts/recipes";
5
+ import { glyph } from "@hjmds/design-contracts/foundations";
5
6
  import { createContext, forwardRef, useContext, useEffect, useId, useMemo, useRef, useState, useSyncExternalStore, } from "react";
6
7
  import { createPortal } from "react-dom";
7
8
  import { classNames } from "./internal.js";
@@ -9,6 +10,8 @@ import { useOptionalHjmTheme } from "./provider.js";
9
10
  import { createHjmThemeStyle } from "./theme.js";
10
11
  // 1.10.0: stroked SVG glyphs inside a tinted badge (toastRecipe.icon). Text glyphs ("●", "i", "!") rendered at
11
12
  // font metrics, so neutral read as a stray grey dot and info/danger looked like typos. currentColor = tone accent.
13
+ // The close glyph box is the size toastRecipe.close.inlineOverhang is derived from (2026-10-17 alignment fix).
14
+ const closeGlyphSize = glyph[toastRecipe.close.glyph];
12
15
  const toneGlyphPaths = {
13
16
  notifications: "M6 8a6 6 0 1 1 12 0c0 7 3 9 3 9H3s3-2 3-9M10.3 21a1.94 1.94 0 0 0 3.4 0",
14
17
  info: "M12 16v-4M12 8h.01M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0Z",
@@ -46,7 +49,7 @@ const ToastCard = forwardRef(function ToastCard({ descriptor, phase, onAction, o
46
49
  // A sibling button covers the card without nesting action/close buttons in a button.
47
50
  _jsx("button", { type: "button", className: "hjm-toast__press", "aria-label": descriptor.press.accessibilityLabel, "aria-describedby": descriptionId, disabled: phase !== "visible", onClick: onPress })) : null, _jsx("span", { className: "hjm-toast__tone-mark", "aria-hidden": "true" }), descriptor.media === null ? (_jsx("span", { className: "hjm-toast__icon", "aria-hidden": "true", children: _jsx(ToneGlyph, { tone: descriptor.tone }) })) : (
48
51
  // Product media (mascot, avatar) takes the badge column; it is decorative, the copy carries meaning.
49
- _jsx("span", { className: "hjm-toast__media", "aria-hidden": "true", children: descriptor.media })), _jsxs("span", { className: "hjm-toast__content", children: [descriptor.title ? (_jsx("strong", { id: titleId, className: "hjm-toast__title", children: descriptor.title })) : null, _jsx("span", { id: descriptionId, className: "hjm-toast__description", children: descriptor.description }), descriptor.progress ? _jsx(ToastProgress, { progress: descriptor.progress }) : null] }), descriptor.action ? (_jsx("button", { type: "button", className: "hjm-toast__action", "aria-label": descriptor.action.accessibilityLabel, onClick: onAction, children: descriptor.action.label })) : null, _jsx("button", { type: "button", className: "hjm-toast__close", "aria-label": descriptor.closeLabel, onClick: () => onDismiss("close-action"), children: _jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", focusable: "false", children: _jsx("path", { d: "M18 6 6 18M6 6l12 12" }) }) })] }));
52
+ _jsx("span", { className: "hjm-toast__media", "aria-hidden": "true", children: descriptor.media })), _jsxs("span", { className: "hjm-toast__content", children: [descriptor.title ? (_jsx("strong", { id: titleId, className: "hjm-toast__title", children: descriptor.title })) : null, _jsx("span", { id: descriptionId, className: "hjm-toast__description", children: descriptor.description }), descriptor.progress ? _jsx(ToastProgress, { progress: descriptor.progress }) : null] }), descriptor.action ? (_jsx("button", { type: "button", className: "hjm-toast__action", "aria-label": descriptor.action.accessibilityLabel, onClick: onAction, children: descriptor.action.label })) : null, _jsx("button", { type: "button", className: "hjm-toast__close", "aria-label": descriptor.closeLabel, onClick: () => onDismiss("close-action"), children: _jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", width: closeGlyphSize, height: closeGlyphSize, fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", focusable: "false", children: _jsx("path", { d: "M18 6 6 18M6 6l12 12" }) }) })] }));
50
53
  });
51
54
  /** Controlled single-toast renderer; ToastProvider supplies the full FIFO lifecycle. */
52
55
  export const Toast = forwardRef(function Toast(
package/dist/toast.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"toast.js","sourceRoot":"","sources":["../src/toast.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAC7F,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,GAavB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,WAAW,GAEZ,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,aAAa,EACb,UAAU,EACV,UAAU,EACV,SAAS,EACT,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,EACR,oBAAoB,GAMrB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAA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CAAC,CAAC,CAC7B,KAAC,WAAW,OAAK,CAAC,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,YACpF,eACE,GAAG,EAAE,WAAW,EAChB,SAAS,EAAC,oBAAoB,oBACd,SAAS,EACzB,IAAI,EAAC,QAAQ,gBACD,KAAK,sBACC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,uBAClD,MAAM,EACzB,QAAQ,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,EAC/C,cAAc,EAAE,mBAAmB,EACnC,aAAa,EAAE,kBAAkB,EACjC,KAAK,EAAE,aAAa,aAEnB,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACjC,eAAM,EAAE,EAAE,YAAY,EAAE,SAAS,EAAC,qBAAqB,YAAE,UAAU,GAAQ,CAC5E,EACA,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAC9B,gBAAgB,CACd,KAAK,EACL,WAAW,EACX,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,CAC/C,CAAC,IACA,GACM,CACf,CAAC,CAAC,CAAC,IAAI,IACc,CACzB,CAAC;AACJ,CAAC","sourcesContent":["import { isLargeTextScale } from \"@hjmds/design-contracts/components/design-system-provider\";\nimport {\n createToastStore,\n createToastSession,\n resolveToastDescriptor,\n type ResolvedToastDescriptor,\n type ToastDescriptor,\n type ToastDismissReason,\n type ToastDuplicatePolicy,\n type ToastId,\n type ToastOverflowPolicy,\n type ToastProgressDescriptor,\n type ToastPublishOptions,\n type ToastPublishResult,\n type ToastSessionSnapshot,\n type ToastStore,\n type ToastTimerUpdatePolicy,\n} from \"@hjmds/design-contracts/components/toast\";\nimport {\n toastRecipe,\n type ToastPlacement,\n} from \"@hjmds/design-contracts/recipes\";\nimport {\n createContext,\n forwardRef,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n useSyncExternalStore,\n type CSSProperties,\n type FocusEvent,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n} from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { classNames } from \"./internal.js\";\nimport { useOptionalHjmTheme } from \"./provider.js\";\nimport { createHjmThemeStyle } from \"./theme.js\";\n\n// 1.10.0: stroked SVG glyphs inside a tinted badge (toastRecipe.icon). Text glyphs (\"●\", \"i\", \"!\") rendered at\n// font metrics, so neutral read as a stray grey dot and info/danger looked like typos. currentColor = tone accent.\nconst toneGlyphPaths = {\n notifications: \"M6 8a6 6 0 1 1 12 0c0 7 3 9 3 9H3s3-2 3-9M10.3 21a1.94 1.94 0 0 0 3.4 0\",\n info: \"M12 16v-4M12 8h.01M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0Z\",\n success: \"M20 6 9 17l-5-5\",\n warning: \"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0ZM12 9v4M12 17h.01\",\n alert: \"M12 8v4M12 16h.01M7.86 2h8.28L22 7.86v8.28L16.14 22H7.86L2 16.14V7.86Z\",\n} as const;\n\nfunction ToneGlyph({ tone }: { tone: keyof typeof toastRecipe.tones }) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n width=\"18\"\n height=\"18\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n focusable=\"false\"\n >\n <path d={toneGlyphPaths[toastRecipe.tones[tone].mark]} />\n </svg>\n );\n}\n\n// Steps read as an ordered list with `aria-current=\"step\"`; the dots are decoration beside each label,\n// so state never depends on colour alone (WCAG 1.4.1).\nfunction ToastProgress({ progress }: { progress: ToastProgressDescriptor }) {\n return (\n <ol className=\"hjm-toast__progress\">\n {progress.steps.map((step, index) => {\n const state = index < progress.current ? \"done\" : index === progress.current ? \"current\" : \"upcoming\";\n return (\n <li\n key={`${index}-${step}`}\n className=\"hjm-toast__progress-step\"\n data-state={state}\n aria-current={state === \"current\" ? \"step\" : undefined}\n >\n <span className=\"hjm-toast__progress-dot\" aria-hidden=\"true\" />\n <span className=\"hjm-toast__progress-label\">{step}</span>\n </li>\n );\n })}\n </ol>\n );\n}\n\ntype ToastCardProps = Readonly<{\n descriptor: ResolvedToastDescriptor;\n phase: \"visible\" | \"closing\";\n onAction(): void;\n onPress(): void;\n onDismiss(reason: ToastDismissReason): void;\n onPointerPause?(): void;\n onPointerResume?(): void;\n onFocusPause?(): void;\n onFocusResume?(): void;\n locale?: string;\n className?: string;\n /**\n * Remaining HTML attributes of the public controlled `Toast` (id, data-*, style, handlers).\n * Spread first so the card's role, labelling, tone and state attributes always win;\n * handlers the card also needs are composed rather than replaced.\n */\n htmlProps?: Omit<HTMLAttributes<HTMLDivElement>, \"children\" | \"title\" | \"className\">;\n}>;\n\nconst ToastCard = forwardRef<HTMLDivElement, ToastCardProps>(function ToastCard(\n {\n descriptor,\n phase,\n onAction,\n onPress,\n onDismiss,\n onPointerPause,\n onPointerResume,\n onFocusPause,\n onFocusResume,\n locale,\n className,\n htmlProps,\n },\n ref,\n) {\n const baseId = useId().replaceAll(\":\", \"\");\n const titleId = `${baseId}-toast-title`;\n const descriptionId = `${baseId}-toast-description`;\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n htmlProps?.onKeyDown?.(event);\n if (event.key === \"Escape\") {\n event.preventDefault();\n onDismiss(\"escape\");\n }\n };\n return (\n <div\n {...htmlProps}\n ref={ref}\n className={classNames(\"hjm-toast\", className)}\n data-tone={descriptor.tone}\n data-state={phase}\n lang={locale ?? htmlProps?.lang}\n role=\"group\"\n aria-labelledby={descriptor.title ? titleId : undefined}\n aria-describedby={descriptionId}\n onPointerEnter={(event) => { htmlProps?.onPointerEnter?.(event); onPointerPause?.(); }}\n onPointerLeave={(event) => { htmlProps?.onPointerLeave?.(event); onPointerResume?.(); }}\n onFocusCapture={(event) => { htmlProps?.onFocusCapture?.(event); onFocusPause?.(); }}\n onBlurCapture={(event) => {\n htmlProps?.onBlurCapture?.(event);\n if (!event.currentTarget.contains(event.relatedTarget)) onFocusResume?.();\n }}\n onKeyDown={handleKeyDown}\n >\n <span\n className=\"hjm-visually-hidden\"\n role={descriptor.priority === \"high\" ? \"alert\" : \"status\"}\n >\n {descriptor.announcement}\n </span>\n {descriptor.press ? (\n // A sibling button covers the card without nesting action/close buttons in a button.\n <button\n type=\"button\"\n className=\"hjm-toast__press\"\n aria-label={descriptor.press.accessibilityLabel}\n aria-describedby={descriptionId}\n disabled={phase !== \"visible\"}\n onClick={onPress}\n />\n ) : null}\n <span className=\"hjm-toast__tone-mark\" aria-hidden=\"true\" />\n {descriptor.media === null ? (\n <span className=\"hjm-toast__icon\" aria-hidden=\"true\">\n <ToneGlyph tone={descriptor.tone} />\n </span>\n ) : (\n // Product media (mascot, avatar) takes the badge column; it is decorative, the copy carries meaning.\n <span className=\"hjm-toast__media\" aria-hidden=\"true\">{descriptor.media as ReactNode}</span>\n )}\n <span className=\"hjm-toast__content\">\n {descriptor.title ? (\n <strong id={titleId} className=\"hjm-toast__title\">{descriptor.title}</strong>\n ) : null}\n <span id={descriptionId} className=\"hjm-toast__description\">\n {descriptor.description}\n </span>\n {descriptor.progress ? <ToastProgress progress={descriptor.progress} /> : null}\n </span>\n {descriptor.action ? (\n <button\n type=\"button\"\n className=\"hjm-toast__action\"\n aria-label={descriptor.action.accessibilityLabel}\n onClick={onAction}\n >\n {descriptor.action.label}\n </button>\n ) : null}\n <button\n type=\"button\"\n className=\"hjm-toast__close\"\n aria-label={descriptor.closeLabel}\n onClick={() => onDismiss(\"close-action\")}\n >\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" focusable=\"false\">\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </svg>\n </button>\n </div>\n );\n});\n\n// No `layoutStyle`: toasts are stacked inside the provider's fixed region, which owns their position.\nexport type ToastProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\" | \"title\"> &\n Readonly<{\n descriptor: ToastDescriptor;\n onDismissRequest: (reason: ToastDismissReason) => void;\n }>;\n\n/** Controlled single-toast renderer; ToastProvider supplies the full FIFO lifecycle. */\nexport const Toast = forwardRef<HTMLDivElement, ToastProps>(function Toast(\n // Until 2026-10-06 only `className` reached the DOM although the type accepts every div attribute,\n // so `id`, `data-*` and handlers were dropped silently. Narrowing the type instead would break\n // consumers that already pass them, so the rest is forwarded (the card keeps its own role/labelling).\n { descriptor, onDismissRequest, className, ...htmlProps },\n ref,\n) {\n const resolved = resolveToastDescriptor(descriptor);\n // Controlled rendering leaves timing/removal to the host, but shares the store's\n // once-per-revision invocation and callback-then-dismiss semantics.\n const session = useMemo(() => {\n const next = createToastSession(descriptor);\n next.show();\n return next;\n }, [descriptor]);\n const invoke = (kind: \"action\" | \"press\") => {\n if (session.getSnapshot().phase !== \"visible\") return;\n try {\n if (kind === \"press\") session.invokePress();\n else session.invokeAction();\n } finally {\n const snapshot = session.getSnapshot();\n if (snapshot.phase === \"closing\" && snapshot.dismissReason) {\n onDismissRequest(snapshot.dismissReason);\n }\n }\n };\n return (\n <ToastCard\n ref={ref}\n descriptor={resolved}\n phase=\"visible\"\n {...(className === undefined ? {} : { className })}\n htmlProps={htmlProps}\n onDismiss={(reason) => { session.dismiss(reason); onDismissRequest(reason); }}\n onAction={() => invoke(\"action\")}\n onPress={() => invoke(\"press\")}\n />\n );\n});\n\nexport type ToastApi = Readonly<{\n publish(descriptor: ToastDescriptor, options?: ToastPublishOptions): ToastPublishResult;\n dismiss(id: ToastId, reason: ToastDismissReason): boolean;\n close(id: ToastId): boolean;\n}>;\n\nconst ToastContext = createContext<ToastApi | null>(null);\n\nexport function useToast(): ToastApi {\n const value = useContext(ToastContext);\n if (value === null) throw new Error(\"useToast must be used inside ToastProvider\");\n return value;\n}\n\n// No `layoutStyle`: the toast region is a fixed viewport layer owned by the provider recipe.\nexport type ToastProviderProps = Readonly<{\n children: ReactNode;\n label: string;\n placement?: ToastPlacement;\n store?: ToastStore;\n initialToasts?: readonly ToastDescriptor[];\n maxVisible?: number;\n maxQueued?: number;\n duplicatePolicy?: ToastDuplicatePolicy;\n timerUpdatePolicy?: ToastTimerUpdatePolicy;\n overflowPolicy?: ToastOverflowPolicy;\n portalContainer?: HTMLElement;\n /** Captured per publication so already-visible localized copy keeps its language. */\n locale?: string;\n /** Extra space above a fixed product dock, in pixels or any CSS length. */\n bottomOffset?: number | string;\n /** Optional discoverable keyboard shortcut, for example `F8`. */\n hotkey?: string;\n /** Screen-reader help associated with the viewport when `hotkey` is supplied. */\n hotkeyHelp?: string;\n}>;\n\ntype ToastPortalProps = Readonly<{\n children: ReactNode;\n container?: HTMLElement;\n}>;\n\nfunction ToastPortal({ children, container }: ToastPortalProps) {\n const [mounted, setMounted] = useState(false);\n const theme = useOptionalHjmTheme();\n useEffect(() => setMounted(true), []);\n if (!mounted) return null;\n return createPortal(\n theme ? (\n <div\n className=\"hjm-root hjm-portal\"\n data-hjm-portal=\"toast\"\n data-motion={theme.environment.reducedMotion ? \"reduced\" : \"full\"}\n data-theme={theme.environment.theme}\n data-text-scale={theme.environment.textScale}\n data-large-text={isLargeTextScale(theme.environment.textScale) ? \"true\" : undefined}\n dir={theme.environment.direction}\n style={createHjmThemeStyle(theme)}\n >\n {children}\n </div>\n ) : children,\n container ?? document.body,\n );\n}\n\nfunction renderStoreToast(\n snapshot: ToastSessionSnapshot,\n store: ToastStore,\n locale?: string,\n): ReactNode {\n if (snapshot.phase !== \"visible\" && snapshot.phase !== \"closing\") return null;\n const id = snapshot.descriptor.id;\n return (\n <ToastCard\n key={id}\n descriptor={snapshot.descriptor}\n phase={snapshot.phase}\n {...(locale === undefined ? {} : { locale })}\n onAction={() => store.invokeAction(id)}\n onPress={() => store.invokePress(id)}\n onDismiss={(reason) => store.dismiss(id, reason)}\n onPointerPause={() => store.pause(id, \"pointer\")}\n onPointerResume={() => store.resume(id, \"pointer\")}\n onFocusPause={() => store.pause(id, \"focus\")}\n onFocusResume={() => store.resume(id, \"focus\")}\n />\n );\n}\n\nexport function ToastProvider({\n children,\n label,\n placement = toastRecipe.defaults.placement,\n store,\n initialToasts = [],\n maxVisible,\n maxQueued,\n duplicatePolicy,\n timerUpdatePolicy,\n overflowPolicy,\n portalContainer,\n locale,\n bottomOffset = 0,\n hotkey,\n hotkeyHelp,\n}: ToastProviderProps) {\n if (label.trim().length === 0) throw new TypeError(\"ToastProvider label must not be empty\");\n if ((hotkey === undefined) !== (hotkeyHelp === undefined)) {\n throw new TypeError(\"ToastProvider hotkey and hotkeyHelp must be supplied together\");\n }\n if (hotkey !== undefined && !hotkey.trim()) {\n throw new TypeError(\"ToastProvider hotkey must not be empty\");\n }\n if (hotkeyHelp !== undefined && !hotkeyHelp.trim()) {\n throw new TypeError(\"ToastProvider hotkeyHelp must not be empty\");\n }\n if (typeof bottomOffset === \"number\" && (!Number.isFinite(bottomOffset) || bottomOffset < 0)) {\n throw new RangeError(\"ToastProvider bottomOffset must be a non-negative finite number\");\n }\n if (typeof bottomOffset === \"string\" && !bottomOffset.trim()) {\n throw new TypeError(\"ToastProvider bottomOffset must not be empty\");\n }\n const internalStoreRef = useRef<ToastStore | null>(null);\n const localeByIdRef = useRef(new Map<ToastId, string>());\n if (store === undefined && internalStoreRef.current === null) {\n internalStoreRef.current = createToastStore({\n ...(maxVisible === undefined ? {} : { maxVisible }),\n ...(maxQueued === undefined ? {} : { maxQueued }),\n ...(duplicatePolicy === undefined ? {} : { duplicatePolicy }),\n ...(timerUpdatePolicy === undefined ? {} : { timerUpdatePolicy }),\n ...(overflowPolicy === undefined ? {} : { overflowPolicy }),\n });\n for (const descriptor of initialToasts) {\n const result = internalStoreRef.current.publish(descriptor);\n if (\n locale !== undefined &&\n (result.outcome === \"added\" || result.outcome === \"updated\")\n ) {\n localeByIdRef.current.set(descriptor.id, locale);\n }\n }\n }\n const activeStore = store ?? internalStoreRef.current;\n if (activeStore === null) throw new Error(\"ToastProvider could not create a store\");\n const snapshot = useSyncExternalStore(\n activeStore.subscribe,\n activeStore.getSnapshot,\n activeStore.getSnapshot,\n );\n const theme = useOptionalHjmTheme();\n const viewportRef = useRef<HTMLDivElement>(null);\n const previousFocusRef = useRef<HTMLElement | null>(null);\n const viewportFocusedRef = useRef(false);\n const hotkeyHelpId = useId().replaceAll(\":\", \"\");\n const api = useMemo<ToastApi>(\n () => ({\n publish: (descriptor, options) => {\n const previousLocale = localeByIdRef.current.get(descriptor.id);\n if (locale === undefined) localeByIdRef.current.delete(descriptor.id);\n else localeByIdRef.current.set(descriptor.id, locale);\n try {\n const result = activeStore.publish(descriptor, options);\n if (result.outcome === \"ignored\" || result.outcome === \"discarded\") {\n if (previousLocale === undefined) localeByIdRef.current.delete(descriptor.id);\n else localeByIdRef.current.set(descriptor.id, previousLocale);\n }\n return result;\n } catch (error) {\n if (previousLocale === undefined) localeByIdRef.current.delete(descriptor.id);\n else localeByIdRef.current.set(descriptor.id, previousLocale);\n throw error;\n }\n },\n dismiss: (id, reason) => activeStore.dismiss(id, reason),\n close: (id) => activeStore.close(id),\n }),\n [activeStore, locale],\n );\n\n const disposalTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n useEffect(() => {\n if (disposalTimerRef.current !== null) {\n clearTimeout(disposalTimerRef.current);\n disposalTimerRef.current = null;\n }\n const ownedStore = internalStoreRef.current;\n return () => {\n if (ownedStore) {\n disposalTimerRef.current = setTimeout(() => ownedStore.dispose(), 0);\n }\n };\n }, []);\n\n useEffect(() => {\n const activeIds = new Set(\n [...snapshot.visible, ...snapshot.queued].map((entry) => entry.descriptor.id),\n );\n for (const id of localeByIdRef.current.keys()) {\n if (!activeIds.has(id)) localeByIdRef.current.delete(id);\n }\n }, [snapshot]);\n\n const hasRunningTimer = snapshot.visible.some(\n (entry) => entry.timer.status === \"running\",\n );\n useEffect(() => {\n if (!hasRunningTimer) return;\n let previousTime = performance.now();\n const timer = setInterval(() => {\n const currentTime = performance.now();\n activeStore.advanceTime(currentTime - previousTime);\n previousTime = currentTime;\n }, 100);\n return () => clearInterval(timer);\n }, [activeStore, hasRunningTimer]);\n\n const closingIds = snapshot.visible\n .filter((entry) => entry.phase === \"closing\")\n .map((entry) => entry.descriptor.id)\n .join(\"\\u0000\");\n useEffect(() => {\n if (closingIds.length === 0) return;\n const ids = closingIds.split(\"\\u0000\");\n const timer = setTimeout(\n () => ids.forEach((id) => activeStore.completeExit(id)),\n theme?.environment.reducedMotion ? 0 : 160,\n );\n return () => clearTimeout(timer);\n }, [activeStore, closingIds, theme?.environment.reducedMotion]);\n\n useEffect(() => {\n const pause = () => activeStore.pauseAll(\"window\");\n const resume = () => {\n if (!document.hidden) activeStore.resumeAll(\"window\");\n };\n const handleVisibility = () => (document.hidden ? pause() : resume());\n window.addEventListener(\"blur\", pause);\n window.addEventListener(\"focus\", resume);\n window.addEventListener(\"pagehide\", pause);\n window.addEventListener(\"pageshow\", resume);\n document.addEventListener(\"visibilitychange\", handleVisibility);\n // A provider may mount while its tab is already hidden, before any change event.\n handleVisibility();\n return () => {\n window.removeEventListener(\"blur\", pause);\n window.removeEventListener(\"focus\", resume);\n window.removeEventListener(\"pagehide\", pause);\n window.removeEventListener(\"pageshow\", resume);\n document.removeEventListener(\"visibilitychange\", handleVisibility);\n };\n }, [activeStore]);\n\n useEffect(() => {\n if (hotkey === undefined || snapshot.visible.length === 0) return;\n const handleKeyDown = (event: globalThis.KeyboardEvent) => {\n if (event.key !== hotkey) return;\n const viewport = viewportRef.current;\n if (!viewport) return;\n if (!viewport.contains(document.activeElement)) {\n previousFocusRef.current = document.activeElement as HTMLElement | null;\n }\n event.preventDefault();\n viewport.focus();\n };\n document.addEventListener(\"keydown\", handleKeyDown);\n return () => document.removeEventListener(\"keydown\", handleKeyDown);\n }, [hotkey, snapshot.visible.length]);\n\n useEffect(() => {\n if (snapshot.visible.length > 0 || !viewportFocusedRef.current) return;\n viewportFocusedRef.current = false;\n previousFocusRef.current?.focus();\n previousFocusRef.current = null;\n }, [snapshot.visible.length]);\n\n const handleViewportFocus = (event: FocusEvent<HTMLDivElement>) => {\n const previous = event.relatedTarget;\n if (previous instanceof HTMLElement && !event.currentTarget.contains(previous)) {\n previousFocusRef.current = previous;\n }\n viewportFocusedRef.current = true;\n activeStore.pauseAll(\"focus\");\n };\n const handleViewportBlur = (event: FocusEvent<HTMLDivElement>) => {\n const next = event.relatedTarget;\n if (!(next instanceof Node) || !event.currentTarget.contains(next)) {\n viewportFocusedRef.current = false;\n activeStore.resumeAll(\"focus\");\n }\n };\n const viewportStyle = {\n \"--hjm-toast-bottom-offset\":\n typeof bottomOffset === \"number\" ? `${bottomOffset}px` : bottomOffset,\n } as CSSProperties;\n\n return (\n <ToastContext.Provider value={api}>\n {children}\n {snapshot.visible.length > 0 ? (\n <ToastPortal {...(portalContainer === undefined ? {} : { container: portalContainer })}>\n <div\n ref={viewportRef}\n className=\"hjm-toast-viewport\"\n data-placement={placement}\n role=\"region\"\n aria-label={label}\n aria-describedby={hotkeyHelp === undefined ? undefined : hotkeyHelpId}\n aria-keyshortcuts={hotkey}\n tabIndex={hotkey === undefined ? undefined : -1}\n onFocusCapture={handleViewportFocus}\n onBlurCapture={handleViewportBlur}\n style={viewportStyle}\n >\n {hotkeyHelp === undefined ? null : (\n <span id={hotkeyHelpId} className=\"hjm-visually-hidden\">{hotkeyHelp}</span>\n )}\n {snapshot.visible.map((entry) =>\n renderStoreToast(\n entry,\n activeStore,\n localeByIdRef.current.get(entry.descriptor.id),\n ))}\n </div>\n </ToastPortal>\n ) : null}\n </ToastContext.Provider>\n );\n}\n"]}
1
+ {"version":3,"file":"toast.js","sourceRoot":"","sources":["../src/toast.tsx"],"names":[],"mappings":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EAAE,EAAE,YAAY,EAAE,SAAS,EAAC,qBAAqB,YAAE,UAAU,GAAQ,CAC5E,EACA,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAC9B,gBAAgB,CACd,KAAK,EACL,WAAW,EACX,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,CAC/C,CAAC,IACA,GACM,CACf,CAAC,CAAC,CAAC,IAAI,IACc,CACzB,CAAC;AACJ,CAAC","sourcesContent":["import { isLargeTextScale } from \"@hjmds/design-contracts/components/design-system-provider\";\nimport {\n createToastStore,\n createToastSession,\n resolveToastDescriptor,\n type ResolvedToastDescriptor,\n type ToastDescriptor,\n type ToastDismissReason,\n type ToastDuplicatePolicy,\n type ToastId,\n type ToastOverflowPolicy,\n type ToastProgressDescriptor,\n type ToastPublishOptions,\n type ToastPublishResult,\n type ToastSessionSnapshot,\n type ToastStore,\n type ToastTimerUpdatePolicy,\n} from \"@hjmds/design-contracts/components/toast\";\nimport {\n toastRecipe,\n type ToastPlacement,\n} from \"@hjmds/design-contracts/recipes\";\nimport { glyph } from \"@hjmds/design-contracts/foundations\";\nimport {\n createContext,\n forwardRef,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n useSyncExternalStore,\n type CSSProperties,\n type FocusEvent,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n} from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { classNames } from \"./internal.js\";\nimport { useOptionalHjmTheme } from \"./provider.js\";\nimport { createHjmThemeStyle } from \"./theme.js\";\n\n// 1.10.0: stroked SVG glyphs inside a tinted badge (toastRecipe.icon). Text glyphs (\"●\", \"i\", \"!\") rendered at\n// font metrics, so neutral read as a stray grey dot and info/danger looked like typos. currentColor = tone accent.\n// The close glyph box is the size toastRecipe.close.inlineOverhang is derived from (2026-10-17 alignment fix).\nconst closeGlyphSize = glyph[toastRecipe.close.glyph];\n\nconst toneGlyphPaths = {\n notifications: \"M6 8a6 6 0 1 1 12 0c0 7 3 9 3 9H3s3-2 3-9M10.3 21a1.94 1.94 0 0 0 3.4 0\",\n info: \"M12 16v-4M12 8h.01M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0Z\",\n success: \"M20 6 9 17l-5-5\",\n warning: \"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0ZM12 9v4M12 17h.01\",\n alert: \"M12 8v4M12 16h.01M7.86 2h8.28L22 7.86v8.28L16.14 22H7.86L2 16.14V7.86Z\",\n} as const;\n\nfunction ToneGlyph({ tone }: { tone: keyof typeof toastRecipe.tones }) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n width=\"18\"\n height=\"18\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n focusable=\"false\"\n >\n <path d={toneGlyphPaths[toastRecipe.tones[tone].mark]} />\n </svg>\n );\n}\n\n// Steps read as an ordered list with `aria-current=\"step\"`; the dots are decoration beside each label,\n// so state never depends on colour alone (WCAG 1.4.1).\nfunction ToastProgress({ progress }: { progress: ToastProgressDescriptor }) {\n return (\n <ol className=\"hjm-toast__progress\">\n {progress.steps.map((step, index) => {\n const state = index < progress.current ? \"done\" : index === progress.current ? \"current\" : \"upcoming\";\n return (\n <li\n key={`${index}-${step}`}\n className=\"hjm-toast__progress-step\"\n data-state={state}\n aria-current={state === \"current\" ? \"step\" : undefined}\n >\n <span className=\"hjm-toast__progress-dot\" aria-hidden=\"true\" />\n <span className=\"hjm-toast__progress-label\">{step}</span>\n </li>\n );\n })}\n </ol>\n );\n}\n\ntype ToastCardProps = Readonly<{\n descriptor: ResolvedToastDescriptor;\n phase: \"visible\" | \"closing\";\n onAction(): void;\n onPress(): void;\n onDismiss(reason: ToastDismissReason): void;\n onPointerPause?(): void;\n onPointerResume?(): void;\n onFocusPause?(): void;\n onFocusResume?(): void;\n locale?: string;\n className?: string;\n /**\n * Remaining HTML attributes of the public controlled `Toast` (id, data-*, style, handlers).\n * Spread first so the card's role, labelling, tone and state attributes always win;\n * handlers the card also needs are composed rather than replaced.\n */\n htmlProps?: Omit<HTMLAttributes<HTMLDivElement>, \"children\" | \"title\" | \"className\">;\n}>;\n\nconst ToastCard = forwardRef<HTMLDivElement, ToastCardProps>(function ToastCard(\n {\n descriptor,\n phase,\n onAction,\n onPress,\n onDismiss,\n onPointerPause,\n onPointerResume,\n onFocusPause,\n onFocusResume,\n locale,\n className,\n htmlProps,\n },\n ref,\n) {\n const baseId = useId().replaceAll(\":\", \"\");\n const titleId = `${baseId}-toast-title`;\n const descriptionId = `${baseId}-toast-description`;\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n htmlProps?.onKeyDown?.(event);\n if (event.key === \"Escape\") {\n event.preventDefault();\n onDismiss(\"escape\");\n }\n };\n return (\n <div\n {...htmlProps}\n ref={ref}\n className={classNames(\"hjm-toast\", className)}\n data-tone={descriptor.tone}\n data-state={phase}\n lang={locale ?? htmlProps?.lang}\n role=\"group\"\n aria-labelledby={descriptor.title ? titleId : undefined}\n aria-describedby={descriptionId}\n onPointerEnter={(event) => { htmlProps?.onPointerEnter?.(event); onPointerPause?.(); }}\n onPointerLeave={(event) => { htmlProps?.onPointerLeave?.(event); onPointerResume?.(); }}\n onFocusCapture={(event) => { htmlProps?.onFocusCapture?.(event); onFocusPause?.(); }}\n onBlurCapture={(event) => {\n htmlProps?.onBlurCapture?.(event);\n if (!event.currentTarget.contains(event.relatedTarget)) onFocusResume?.();\n }}\n onKeyDown={handleKeyDown}\n >\n <span\n className=\"hjm-visually-hidden\"\n role={descriptor.priority === \"high\" ? \"alert\" : \"status\"}\n >\n {descriptor.announcement}\n </span>\n {descriptor.press ? (\n // A sibling button covers the card without nesting action/close buttons in a button.\n <button\n type=\"button\"\n className=\"hjm-toast__press\"\n aria-label={descriptor.press.accessibilityLabel}\n aria-describedby={descriptionId}\n disabled={phase !== \"visible\"}\n onClick={onPress}\n />\n ) : null}\n <span className=\"hjm-toast__tone-mark\" aria-hidden=\"true\" />\n {descriptor.media === null ? (\n <span className=\"hjm-toast__icon\" aria-hidden=\"true\">\n <ToneGlyph tone={descriptor.tone} />\n </span>\n ) : (\n // Product media (mascot, avatar) takes the badge column; it is decorative, the copy carries meaning.\n <span className=\"hjm-toast__media\" aria-hidden=\"true\">{descriptor.media as ReactNode}</span>\n )}\n <span className=\"hjm-toast__content\">\n {descriptor.title ? (\n <strong id={titleId} className=\"hjm-toast__title\">{descriptor.title}</strong>\n ) : null}\n <span id={descriptionId} className=\"hjm-toast__description\">\n {descriptor.description}\n </span>\n {descriptor.progress ? <ToastProgress progress={descriptor.progress} /> : null}\n </span>\n {descriptor.action ? (\n <button\n type=\"button\"\n className=\"hjm-toast__action\"\n aria-label={descriptor.action.accessibilityLabel}\n onClick={onAction}\n >\n {descriptor.action.label}\n </button>\n ) : null}\n <button\n type=\"button\"\n className=\"hjm-toast__close\"\n aria-label={descriptor.closeLabel}\n onClick={() => onDismiss(\"close-action\")}\n >\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" width={closeGlyphSize} height={closeGlyphSize} fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" focusable=\"false\">\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </svg>\n </button>\n </div>\n );\n});\n\n// No `layoutStyle`: toasts are stacked inside the provider's fixed region, which owns their position.\nexport type ToastProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\" | \"title\"> &\n Readonly<{\n descriptor: ToastDescriptor;\n onDismissRequest: (reason: ToastDismissReason) => void;\n }>;\n\n/** Controlled single-toast renderer; ToastProvider supplies the full FIFO lifecycle. */\nexport const Toast = forwardRef<HTMLDivElement, ToastProps>(function Toast(\n // Until 2026-10-06 only `className` reached the DOM although the type accepts every div attribute,\n // so `id`, `data-*` and handlers were dropped silently. Narrowing the type instead would break\n // consumers that already pass them, so the rest is forwarded (the card keeps its own role/labelling).\n { descriptor, onDismissRequest, className, ...htmlProps },\n ref,\n) {\n const resolved = resolveToastDescriptor(descriptor);\n // Controlled rendering leaves timing/removal to the host, but shares the store's\n // once-per-revision invocation and callback-then-dismiss semantics.\n const session = useMemo(() => {\n const next = createToastSession(descriptor);\n next.show();\n return next;\n }, [descriptor]);\n const invoke = (kind: \"action\" | \"press\") => {\n if (session.getSnapshot().phase !== \"visible\") return;\n try {\n if (kind === \"press\") session.invokePress();\n else session.invokeAction();\n } finally {\n const snapshot = session.getSnapshot();\n if (snapshot.phase === \"closing\" && snapshot.dismissReason) {\n onDismissRequest(snapshot.dismissReason);\n }\n }\n };\n return (\n <ToastCard\n ref={ref}\n descriptor={resolved}\n phase=\"visible\"\n {...(className === undefined ? {} : { className })}\n htmlProps={htmlProps}\n onDismiss={(reason) => { session.dismiss(reason); onDismissRequest(reason); }}\n onAction={() => invoke(\"action\")}\n onPress={() => invoke(\"press\")}\n />\n );\n});\n\nexport type ToastApi = Readonly<{\n publish(descriptor: ToastDescriptor, options?: ToastPublishOptions): ToastPublishResult;\n dismiss(id: ToastId, reason: ToastDismissReason): boolean;\n close(id: ToastId): boolean;\n}>;\n\nconst ToastContext = createContext<ToastApi | null>(null);\n\nexport function useToast(): ToastApi {\n const value = useContext(ToastContext);\n if (value === null) throw new Error(\"useToast must be used inside ToastProvider\");\n return value;\n}\n\n// No `layoutStyle`: the toast region is a fixed viewport layer owned by the provider recipe.\nexport type ToastProviderProps = Readonly<{\n children: ReactNode;\n label: string;\n placement?: ToastPlacement;\n store?: ToastStore;\n initialToasts?: readonly ToastDescriptor[];\n maxVisible?: number;\n maxQueued?: number;\n duplicatePolicy?: ToastDuplicatePolicy;\n timerUpdatePolicy?: ToastTimerUpdatePolicy;\n overflowPolicy?: ToastOverflowPolicy;\n portalContainer?: HTMLElement;\n /** Captured per publication so already-visible localized copy keeps its language. */\n locale?: string;\n /** Extra space above a fixed product dock, in pixels or any CSS length. */\n bottomOffset?: number | string;\n /** Optional discoverable keyboard shortcut, for example `F8`. */\n hotkey?: string;\n /** Screen-reader help associated with the viewport when `hotkey` is supplied. */\n hotkeyHelp?: string;\n}>;\n\ntype ToastPortalProps = Readonly<{\n children: ReactNode;\n container?: HTMLElement;\n}>;\n\nfunction ToastPortal({ children, container }: ToastPortalProps) {\n const [mounted, setMounted] = useState(false);\n const theme = useOptionalHjmTheme();\n useEffect(() => setMounted(true), []);\n if (!mounted) return null;\n return createPortal(\n theme ? (\n <div\n className=\"hjm-root hjm-portal\"\n data-hjm-portal=\"toast\"\n data-motion={theme.environment.reducedMotion ? \"reduced\" : \"full\"}\n data-theme={theme.environment.theme}\n data-text-scale={theme.environment.textScale}\n data-large-text={isLargeTextScale(theme.environment.textScale) ? \"true\" : undefined}\n dir={theme.environment.direction}\n style={createHjmThemeStyle(theme)}\n >\n {children}\n </div>\n ) : children,\n container ?? document.body,\n );\n}\n\nfunction renderStoreToast(\n snapshot: ToastSessionSnapshot,\n store: ToastStore,\n locale?: string,\n): ReactNode {\n if (snapshot.phase !== \"visible\" && snapshot.phase !== \"closing\") return null;\n const id = snapshot.descriptor.id;\n return (\n <ToastCard\n key={id}\n descriptor={snapshot.descriptor}\n phase={snapshot.phase}\n {...(locale === undefined ? {} : { locale })}\n onAction={() => store.invokeAction(id)}\n onPress={() => store.invokePress(id)}\n onDismiss={(reason) => store.dismiss(id, reason)}\n onPointerPause={() => store.pause(id, \"pointer\")}\n onPointerResume={() => store.resume(id, \"pointer\")}\n onFocusPause={() => store.pause(id, \"focus\")}\n onFocusResume={() => store.resume(id, \"focus\")}\n />\n );\n}\n\nexport function ToastProvider({\n children,\n label,\n placement = toastRecipe.defaults.placement,\n store,\n initialToasts = [],\n maxVisible,\n maxQueued,\n duplicatePolicy,\n timerUpdatePolicy,\n overflowPolicy,\n portalContainer,\n locale,\n bottomOffset = 0,\n hotkey,\n hotkeyHelp,\n}: ToastProviderProps) {\n if (label.trim().length === 0) throw new TypeError(\"ToastProvider label must not be empty\");\n if ((hotkey === undefined) !== (hotkeyHelp === undefined)) {\n throw new TypeError(\"ToastProvider hotkey and hotkeyHelp must be supplied together\");\n }\n if (hotkey !== undefined && !hotkey.trim()) {\n throw new TypeError(\"ToastProvider hotkey must not be empty\");\n }\n if (hotkeyHelp !== undefined && !hotkeyHelp.trim()) {\n throw new TypeError(\"ToastProvider hotkeyHelp must not be empty\");\n }\n if (typeof bottomOffset === \"number\" && (!Number.isFinite(bottomOffset) || bottomOffset < 0)) {\n throw new RangeError(\"ToastProvider bottomOffset must be a non-negative finite number\");\n }\n if (typeof bottomOffset === \"string\" && !bottomOffset.trim()) {\n throw new TypeError(\"ToastProvider bottomOffset must not be empty\");\n }\n const internalStoreRef = useRef<ToastStore | null>(null);\n const localeByIdRef = useRef(new Map<ToastId, string>());\n if (store === undefined && internalStoreRef.current === null) {\n internalStoreRef.current = createToastStore({\n ...(maxVisible === undefined ? {} : { maxVisible }),\n ...(maxQueued === undefined ? {} : { maxQueued }),\n ...(duplicatePolicy === undefined ? {} : { duplicatePolicy }),\n ...(timerUpdatePolicy === undefined ? {} : { timerUpdatePolicy }),\n ...(overflowPolicy === undefined ? {} : { overflowPolicy }),\n });\n for (const descriptor of initialToasts) {\n const result = internalStoreRef.current.publish(descriptor);\n if (\n locale !== undefined &&\n (result.outcome === \"added\" || result.outcome === \"updated\")\n ) {\n localeByIdRef.current.set(descriptor.id, locale);\n }\n }\n }\n const activeStore = store ?? internalStoreRef.current;\n if (activeStore === null) throw new Error(\"ToastProvider could not create a store\");\n const snapshot = useSyncExternalStore(\n activeStore.subscribe,\n activeStore.getSnapshot,\n activeStore.getSnapshot,\n );\n const theme = useOptionalHjmTheme();\n const viewportRef = useRef<HTMLDivElement>(null);\n const previousFocusRef = useRef<HTMLElement | null>(null);\n const viewportFocusedRef = useRef(false);\n const hotkeyHelpId = useId().replaceAll(\":\", \"\");\n const api = useMemo<ToastApi>(\n () => ({\n publish: (descriptor, options) => {\n const previousLocale = localeByIdRef.current.get(descriptor.id);\n if (locale === undefined) localeByIdRef.current.delete(descriptor.id);\n else localeByIdRef.current.set(descriptor.id, locale);\n try {\n const result = activeStore.publish(descriptor, options);\n if (result.outcome === \"ignored\" || result.outcome === \"discarded\") {\n if (previousLocale === undefined) localeByIdRef.current.delete(descriptor.id);\n else localeByIdRef.current.set(descriptor.id, previousLocale);\n }\n return result;\n } catch (error) {\n if (previousLocale === undefined) localeByIdRef.current.delete(descriptor.id);\n else localeByIdRef.current.set(descriptor.id, previousLocale);\n throw error;\n }\n },\n dismiss: (id, reason) => activeStore.dismiss(id, reason),\n close: (id) => activeStore.close(id),\n }),\n [activeStore, locale],\n );\n\n const disposalTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n useEffect(() => {\n if (disposalTimerRef.current !== null) {\n clearTimeout(disposalTimerRef.current);\n disposalTimerRef.current = null;\n }\n const ownedStore = internalStoreRef.current;\n return () => {\n if (ownedStore) {\n disposalTimerRef.current = setTimeout(() => ownedStore.dispose(), 0);\n }\n };\n }, []);\n\n useEffect(() => {\n const activeIds = new Set(\n [...snapshot.visible, ...snapshot.queued].map((entry) => entry.descriptor.id),\n );\n for (const id of localeByIdRef.current.keys()) {\n if (!activeIds.has(id)) localeByIdRef.current.delete(id);\n }\n }, [snapshot]);\n\n const hasRunningTimer = snapshot.visible.some(\n (entry) => entry.timer.status === \"running\",\n );\n useEffect(() => {\n if (!hasRunningTimer) return;\n let previousTime = performance.now();\n const timer = setInterval(() => {\n const currentTime = performance.now();\n activeStore.advanceTime(currentTime - previousTime);\n previousTime = currentTime;\n }, 100);\n return () => clearInterval(timer);\n }, [activeStore, hasRunningTimer]);\n\n const closingIds = snapshot.visible\n .filter((entry) => entry.phase === \"closing\")\n .map((entry) => entry.descriptor.id)\n .join(\"\\u0000\");\n useEffect(() => {\n if (closingIds.length === 0) return;\n const ids = closingIds.split(\"\\u0000\");\n const timer = setTimeout(\n () => ids.forEach((id) => activeStore.completeExit(id)),\n theme?.environment.reducedMotion ? 0 : 160,\n );\n return () => clearTimeout(timer);\n }, [activeStore, closingIds, theme?.environment.reducedMotion]);\n\n useEffect(() => {\n const pause = () => activeStore.pauseAll(\"window\");\n const resume = () => {\n if (!document.hidden) activeStore.resumeAll(\"window\");\n };\n const handleVisibility = () => (document.hidden ? pause() : resume());\n window.addEventListener(\"blur\", pause);\n window.addEventListener(\"focus\", resume);\n window.addEventListener(\"pagehide\", pause);\n window.addEventListener(\"pageshow\", resume);\n document.addEventListener(\"visibilitychange\", handleVisibility);\n // A provider may mount while its tab is already hidden, before any change event.\n handleVisibility();\n return () => {\n window.removeEventListener(\"blur\", pause);\n window.removeEventListener(\"focus\", resume);\n window.removeEventListener(\"pagehide\", pause);\n window.removeEventListener(\"pageshow\", resume);\n document.removeEventListener(\"visibilitychange\", handleVisibility);\n };\n }, [activeStore]);\n\n useEffect(() => {\n if (hotkey === undefined || snapshot.visible.length === 0) return;\n const handleKeyDown = (event: globalThis.KeyboardEvent) => {\n if (event.key !== hotkey) return;\n const viewport = viewportRef.current;\n if (!viewport) return;\n if (!viewport.contains(document.activeElement)) {\n previousFocusRef.current = document.activeElement as HTMLElement | null;\n }\n event.preventDefault();\n viewport.focus();\n };\n document.addEventListener(\"keydown\", handleKeyDown);\n return () => document.removeEventListener(\"keydown\", handleKeyDown);\n }, [hotkey, snapshot.visible.length]);\n\n useEffect(() => {\n if (snapshot.visible.length > 0 || !viewportFocusedRef.current) return;\n viewportFocusedRef.current = false;\n previousFocusRef.current?.focus();\n previousFocusRef.current = null;\n }, [snapshot.visible.length]);\n\n const handleViewportFocus = (event: FocusEvent<HTMLDivElement>) => {\n const previous = event.relatedTarget;\n if (previous instanceof HTMLElement && !event.currentTarget.contains(previous)) {\n previousFocusRef.current = previous;\n }\n viewportFocusedRef.current = true;\n activeStore.pauseAll(\"focus\");\n };\n const handleViewportBlur = (event: FocusEvent<HTMLDivElement>) => {\n const next = event.relatedTarget;\n if (!(next instanceof Node) || !event.currentTarget.contains(next)) {\n viewportFocusedRef.current = false;\n activeStore.resumeAll(\"focus\");\n }\n };\n const viewportStyle = {\n \"--hjm-toast-bottom-offset\":\n typeof bottomOffset === \"number\" ? `${bottomOffset}px` : bottomOffset,\n } as CSSProperties;\n\n return (\n <ToastContext.Provider value={api}>\n {children}\n {snapshot.visible.length > 0 ? (\n <ToastPortal {...(portalContainer === undefined ? {} : { container: portalContainer })}>\n <div\n ref={viewportRef}\n className=\"hjm-toast-viewport\"\n data-placement={placement}\n role=\"region\"\n aria-label={label}\n aria-describedby={hotkeyHelp === undefined ? undefined : hotkeyHelpId}\n aria-keyshortcuts={hotkey}\n tabIndex={hotkey === undefined ? undefined : -1}\n onFocusCapture={handleViewportFocus}\n onBlurCapture={handleViewportBlur}\n style={viewportStyle}\n >\n {hotkeyHelp === undefined ? null : (\n <span id={hotkeyHelpId} className=\"hjm-visually-hidden\">{hotkeyHelp}</span>\n )}\n {snapshot.visible.map((entry) =>\n renderStoreToast(\n entry,\n activeStore,\n localeByIdRef.current.get(entry.descriptor.id),\n ))}\n </div>\n </ToastPortal>\n ) : null}\n </ToastContext.Provider>\n );\n}\n"]}
package/dist/top.js CHANGED
@@ -10,7 +10,7 @@ export const Top = forwardRef(function Top({ descriptor, trailing, className, la
10
10
  const profile = useDesignProfileDefaults();
11
11
  // Keep the visual role independent of the semantic heading level and preserve recipe defaults.
12
12
  const title = profile
13
- ? size === "large" ? profile.tokens.heading.level2 : profile.tokens.typography.titleLarge
13
+ ? size === "large" ? profile.tokens.heading.level3 : profile.tokens.typography.titleLarge
14
14
  : metrics.title;
15
15
  return (_jsxs("header", { ref: forwardedRef, className: classNames("hjm-top", className), "data-size": size, style: { ...layoutStyle,
16
16
  "--hjm-top-title-size": `${title.fontSize}px`,
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,SA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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"]}
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,MA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ecipe,\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.level3 : 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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"upload-item.d.ts","sourceRoot":"","sources":["../src/upload-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACtB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAMxE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC;IACxF,UAAU,EAAE,oBAAoB,CAAC;IACjC,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,gGAAgG;IAChG,WAAW,CAAC,EAAE,uBAAuB,CAAC;CACvC,CAAC,CAAC;AAEH,6EAA6E;AAC7E,eAAO,MAAM,UAAU;gBAVT,oBAAoB;YACxB,gBAAgB;eACb,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI;cACrB,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI;cACpB,SAAS;IACnB,gGAAgG;kBAClF,uBAAuB;mDAiErC,CAAC"}
1
+ {"version":3,"file":"upload-item.d.ts","sourceRoot":"","sources":["../src/upload-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACtB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAMxE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC;IACxF,UAAU,EAAE,oBAAoB,CAAC;IACjC,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,gGAAgG;IAChG,WAAW,CAAC,EAAE,uBAAuB,CAAC;CACvC,CAAC,CAAC;AAEH,6EAA6E;AAC7E,eAAO,MAAM,UAAU;gBAVT,oBAAoB;YACxB,gBAAgB;eACb,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI;cACrB,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI;cACpB,SAAS;IACnB,gGAAgG;kBAClF,uBAAuB;mDAkErC,CAAC"}
@@ -20,6 +20,6 @@ export const UploadItem = forwardRef(function UploadItem({ descriptor, labels, o
20
20
  const progressValueText = isUploading && announcement.description !== labels.uploading
21
21
  ? announcement.description
22
22
  : undefined;
23
- return (_jsxs("div", { ...props, style: { ...props.style, ...layoutStyle }, ref: ref, "aria-label": announcement.label, className: classNames("hjm-upload-item", className), "data-status": descriptor.state.status, role: "group", children: [leading === undefined ? null : _jsx("span", { "aria-hidden": "true", className: "hjm-upload-item__leading", children: leading }), _jsxs("div", { className: "hjm-upload-item__body", children: [_jsx("span", { className: "hjm-upload-item__name", children: descriptor.name }), descriptor.sizeLabel === undefined ? null : _jsx("span", { className: "hjm-upload-item__meta", children: descriptor.sizeLabel }), isUploading ? (_jsxs(_Fragment, { children: [_jsx("span", { "aria-atomic": "true", "aria-live": "polite", className: "hjm-upload-item__status hjm-visually-hidden", children: labels.uploading }), _jsx(Progress, { "aria-label": labels.uploading, label: labels.uploading, ...(progress === null || progress === undefined ? {} : { value: progress * 100 }), ...(progressValueText === undefined ? {} : { valueText: progressValueText }) })] })) : (_jsx("span", { className: "hjm-upload-item__status", "aria-live": "polite", children: announcement.description }))] }), action === "cancel" ? (_jsx(IconButton, { className: "hjm-upload-item__action", "data-action": "cancel", label: labels.cancel, onClick: () => onCancel?.(descriptor.id), tone: "ghost", children: _jsx(Icon, { name: "close" }) })) : action === "retry" ? (_jsx(IconButton, { className: "hjm-upload-item__action", "data-action": "retry", label: labels.retry, onClick: () => onRetry?.(descriptor.id), tone: "ghost", children: _jsx(Icon, { name: "refresh" }) })) : null] }));
23
+ return (_jsxs("div", { ...props, style: { ...props.style, ...layoutStyle }, ref: ref, "aria-label": announcement.label, className: classNames("hjm-upload-item", className), "data-status": descriptor.state.status, role: "group", children: [leading === undefined ? null : _jsx("span", { "aria-hidden": "true", className: "hjm-upload-item__leading", children: leading }), _jsxs("div", { className: "hjm-upload-item__body", children: [_jsx("span", { className: "hjm-upload-item__name", children: descriptor.name }), descriptor.sizeLabel === undefined ? null : _jsx("span", { className: "hjm-upload-item__meta", children: descriptor.sizeLabel }), isUploading ? (_jsxs(_Fragment, { children: [_jsx("span", { "aria-atomic": "true", "aria-live": "polite", className: "hjm-upload-item__status hjm-visually-hidden", children: labels.uploading }), _jsx(Progress, { "aria-label": labels.uploading, label: labels.uploading, ...(progress === null || progress === undefined ? {} : { value: progress * 100 }), ...(progressValueText === undefined ? {} : { valueText: progressValueText }) })] })) : (_jsx("span", { className: "hjm-upload-item__status", "aria-live": "polite", children: announcement.description }))] }), action === "cancel" ? (_jsx(IconButton, { className: "hjm-upload-item__action", edge: "end", "data-action": "cancel", label: labels.cancel, onClick: () => onCancel?.(descriptor.id), tone: "ghost", children: _jsx(Icon, { name: "close" }) })) : action === "retry" ? (_jsx(IconButton, { className: "hjm-upload-item__action", edge: "end", "data-action": "retry", label: labels.retry, onClick: () => onRetry?.(descriptor.id), tone: "ghost", children: _jsx(Icon, { name: "refresh" }) })) : null] }));
24
24
  });
25
25
  //# sourceMappingURL=upload-item.js.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,CACF,eAAM,SAAS,EAAC,yBAAyB,eAAW,QAAQ,YAAE,YAAY,CAAC,WAAW,GAAQ,CAC/F,IACG,EAGL,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,CACrB,KAAC,UAAU,IAAC,SAAS,EAAC,yBAAyB,iBAAa,QAAQ,EAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,IAAI,EAAC,OAAO,YAAC,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAG,GAAa,CACrL,CAAC,CAAC,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,CACvB,KAAC,UAAU,IAAC,SAAS,EAAC,yBAAyB,iBAAa,OAAO,EAAC,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,IAAI,EAAC,OAAO,YAAC,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,GAAG,GAAa,CACpL,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import {\n getUploadItemAvailableAction,\n resolveUploadItemAnnouncement,\n type UploadItemDescriptor,\n type UploadItemLabels,\n} from \"@hjmds/design-contracts/components/upload-item\";\nimport { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\n\nimport { IconButton } from \"./actions.js\";\nimport { Progress } from \"./feedback.js\";\nimport { Icon } from \"./supplemental-display.js\";\nimport { classNames } from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type UploadItemProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> & Readonly<{\n descriptor: UploadItemDescriptor;\n labels: UploadItemLabels;\n onCancel?: (id: string) => void;\n onRetry?: (id: string) => void;\n leading?: ReactNode;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\n/** One upload row whose available action is derived entirely from status. */\nexport const UploadItem = forwardRef<HTMLDivElement, UploadItemProps>(function UploadItem(\n { descriptor, labels, onCancel, onRetry, leading, className, layoutStyle, ...props },\n ref,\n) {\n const announcement = resolveUploadItemAnnouncement(descriptor, labels);\n const action = getUploadItemAvailableAction(descriptor.state);\n if (action === \"cancel\" && onCancel === undefined) {\n throw new TypeError(\"UploadItem requires onCancel while status is uploading\");\n }\n if (action === \"retry\" && onRetry === undefined) {\n throw new TypeError(\"UploadItem requires onRetry while status is error\");\n }\n const isUploading = descriptor.state.status === \"uploading\";\n const progress = isUploading ? descriptor.state.progress : undefined;\n const progressValueText =\n isUploading && announcement.description !== labels.uploading\n ? announcement.description\n : undefined;\n return (\n <div\n {...props}\n style={{ ...props.style, ...layoutStyle }}\n ref={ref}\n aria-label={announcement.label}\n className={classNames(\"hjm-upload-item\", className)}\n data-status={descriptor.state.status}\n role=\"group\"\n >\n {leading === undefined ? null : <span aria-hidden=\"true\" className=\"hjm-upload-item__leading\">{leading}</span>}\n <div className=\"hjm-upload-item__body\">\n <span className=\"hjm-upload-item__name\">{descriptor.name}</span>\n {descriptor.sizeLabel === undefined ? null : <span className=\"hjm-upload-item__meta\">{descriptor.sizeLabel}</span>}\n {isUploading ? (\n <>\n <span\n aria-atomic=\"true\"\n aria-live=\"polite\"\n className=\"hjm-upload-item__status hjm-visually-hidden\"\n >\n {labels.uploading}\n </span>\n <Progress\n aria-label={labels.uploading}\n label={labels.uploading}\n {...(progress === null || progress === undefined ? {} : { value: progress * 100 })}\n {...(progressValueText === undefined ? {} : { valueText: progressValueText })}\n />\n </>\n ) : (\n <span className=\"hjm-upload-item__status\" aria-live=\"polite\">{announcement.description}</span>\n )}\n </div>\n {/* Row tool actions are icon buttons named by the localized label. Cancelling an upload is not destructive, so\n it stays neutral instead of the danger text it used to be (2026-10-17 review). */}\n {action === \"cancel\" ? (\n <IconButton className=\"hjm-upload-item__action\" data-action=\"cancel\" label={labels.cancel} onClick={() => onCancel?.(descriptor.id)} tone=\"ghost\"><Icon name=\"close\" /></IconButton>\n ) : action === \"retry\" ? (\n <IconButton className=\"hjm-upload-item__action\" data-action=\"retry\" label={labels.retry} onClick={() => onRetry?.(descriptor.id)} tone=\"ghost\"><Icon name=\"refresh\" /></IconButton>\n ) : null}\n </div>\n );\n});\n"]}
1
+ {"version":3,"file":"upload-item.js","sourceRoot":"","sources":["../src/upload-item.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,GAG9B,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,UAAU,EAAuC,MAAM,OAAO,CAAC;AAExE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAa3C,6EAA6E;AAC7E,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAkC,SAAS,UAAU,CACvF,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,EACpF,GAAG;IAEH,MAAM,YAAY,GAAG,6BAA6B,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IACvE,MAAM,MAAM,GAAG,4BAA4B,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAC9D,IAAI,MAAM,KAAK,QAAQ,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAClD,MAAM,IAAI,SAAS,CAAC,wDAAwD,CAAC,CAAC;IAChF,CAAC;IACD,IAAI,MAAM,KAAK,OAAO,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAChD,MAAM,IAAI,SAAS,CAAC,mDAAmD,CAA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K,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,GAAG,GAAG,EAAE,CAAC,KAC9E,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC,GAC7E,IACD,CACJ,CAAC,CAAC,CAAC,CACF,eAAM,SAAS,EAAC,yBAAyB,eAAW,QAAQ,YAAE,YAAY,CAAC,WAAW,GAAQ,CAC/F,IACG,EAIL,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,CACrB,KAAC,UAAU,IAAC,SAAS,EAAC,yBAAyB,EAAC,IAAI,EAAC,KAAK,iBAAa,QAAQ,EAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,IAAI,EAAC,OAAO,YAAC,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAG,GAAa,CAChM,CAAC,CAAC,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,CACvB,KAAC,UAAU,IAAC,SAAS,EAAC,yBAAyB,EAAC,IAAI,EAAC,KAAK,iBAAa,OAAO,EAAC,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,IAAI,EAAC,OAAO,YAAC,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,GAAG,GAAa,CAC/L,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import {\n getUploadItemAvailableAction,\n resolveUploadItemAnnouncement,\n type UploadItemDescriptor,\n type UploadItemLabels,\n} from \"@hjmds/design-contracts/components/upload-item\";\nimport { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\n\nimport { IconButton } from \"./actions.js\";\nimport { Progress } from \"./feedback.js\";\nimport { Icon } from \"./supplemental-display.js\";\nimport { classNames } from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type UploadItemProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> & Readonly<{\n descriptor: UploadItemDescriptor;\n labels: UploadItemLabels;\n onCancel?: (id: string) => void;\n onRetry?: (id: string) => void;\n leading?: ReactNode;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\n/** One upload row whose available action is derived entirely from status. */\nexport const UploadItem = forwardRef<HTMLDivElement, UploadItemProps>(function UploadItem(\n { descriptor, labels, onCancel, onRetry, leading, className, layoutStyle, ...props },\n ref,\n) {\n const announcement = resolveUploadItemAnnouncement(descriptor, labels);\n const action = getUploadItemAvailableAction(descriptor.state);\n if (action === \"cancel\" && onCancel === undefined) {\n throw new TypeError(\"UploadItem requires onCancel while status is uploading\");\n }\n if (action === \"retry\" && onRetry === undefined) {\n throw new TypeError(\"UploadItem requires onRetry while status is error\");\n }\n const isUploading = descriptor.state.status === \"uploading\";\n const progress = isUploading ? descriptor.state.progress : undefined;\n const progressValueText =\n isUploading && announcement.description !== labels.uploading\n ? announcement.description\n : undefined;\n return (\n <div\n {...props}\n style={{ ...props.style, ...layoutStyle }}\n ref={ref}\n aria-label={announcement.label}\n className={classNames(\"hjm-upload-item\", className)}\n data-status={descriptor.state.status}\n role=\"group\"\n >\n {leading === undefined ? null : <span aria-hidden=\"true\" className=\"hjm-upload-item__leading\">{leading}</span>}\n <div className=\"hjm-upload-item__body\">\n <span className=\"hjm-upload-item__name\">{descriptor.name}</span>\n {descriptor.sizeLabel === undefined ? null : <span className=\"hjm-upload-item__meta\">{descriptor.sizeLabel}</span>}\n {isUploading ? (\n <>\n <span\n aria-atomic=\"true\"\n aria-live=\"polite\"\n className=\"hjm-upload-item__status hjm-visually-hidden\"\n >\n {labels.uploading}\n </span>\n <Progress\n aria-label={labels.uploading}\n label={labels.uploading}\n {...(progress === null || progress === undefined ? {} : { value: progress * 100 })}\n {...(progressValueText === undefined ? {} : { valueText: progressValueText })}\n />\n </>\n ) : (\n <span className=\"hjm-upload-item__status\" aria-live=\"polite\">{announcement.description}</span>\n )}\n </div>\n {/* Row tool actions are icon buttons named by the localized label. Cancelling an upload is not destructive, so\n it stays neutral instead of the danger text it used to be (2026-10-17 review). edge=\"end\" ends the glyph slot on\n the row's md inset, mirroring the file text's start inset (2026-10-17 measured audit: 26 vs 16). */}\n {action === \"cancel\" ? (\n <IconButton className=\"hjm-upload-item__action\" edge=\"end\" data-action=\"cancel\" label={labels.cancel} onClick={() => onCancel?.(descriptor.id)} tone=\"ghost\"><Icon name=\"close\" /></IconButton>\n ) : action === \"retry\" ? (\n <IconButton className=\"hjm-upload-item__action\" edge=\"end\" data-action=\"retry\" label={labels.retry} onClick={() => onRetry?.(descriptor.id)} tone=\"ghost\"><Icon name=\"refresh\" /></IconButton>\n ) : null}\n </div>\n );\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"virtual-list.d.ts","sourceRoot":"","sources":["../src/virtual-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtE,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAAE,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;IAAC,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAAC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC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