@hjmds/react 1.39.0 → 1.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chart.js +1 -4
- package/dist/chart.js.map +1 -1
- package/dist/choice-row.d.ts +22 -0
- package/dist/choice-row.d.ts.map +1 -0
- package/dist/choice-row.js +31 -0
- package/dist/choice-row.js.map +1 -0
- package/dist/evidence.d.ts +1 -1
- package/dist/evidence.js +1 -1
- package/dist/evidence.js.map +1 -1
- package/dist/floating-action-button.d.ts +2 -0
- package/dist/floating-action-button.d.ts.map +1 -1
- package/dist/floating-action-button.js +4 -4
- package/dist/floating-action-button.js.map +1 -1
- package/dist/image-viewer.d.ts +25 -0
- package/dist/image-viewer.d.ts.map +1 -0
- package/dist/image-viewer.js +82 -0
- package/dist/image-viewer.js.map +1 -0
- package/dist/public-exports.generated.d.ts +2 -0
- package/dist/public-exports.generated.d.ts.map +1 -1
- package/dist/public-exports.generated.js +6 -0
- package/dist/public-exports.generated.js.map +1 -1
- package/dist/reaction-picker.d.ts.map +1 -1
- package/dist/reaction-picker.js +2 -4
- package/dist/reaction-picker.js.map +1 -1
- package/dist/styles.css +54 -30
- package/dist/styles.layered.css +54 -30
- package/dist/time-picker.d.ts.map +1 -1
- package/dist/time-picker.js +96 -32
- package/dist/time-picker.js.map +1 -1
- package/package.json +13 -3
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { resolveChoiceRow } from "@hjmds/design-contracts/choice-row";
|
|
4
|
+
import { ListRow } from "./display.js";
|
|
5
|
+
import { Sheet } from "./overlays.js";
|
|
6
|
+
import { RadioGroup } from "./selection.js";
|
|
7
|
+
export function ChoiceRow({ title, items, value, onValueChange, closeLabel, errorLabel, sheetTitle, sheetDescription, placeholder, leading, trailing, disabled = false, loading = false }) {
|
|
8
|
+
const { valueLabel } = resolveChoiceRow({ title, items, value, ...(placeholder === undefined ? {} : { placeholder }) });
|
|
9
|
+
if (!closeLabel.trim() || !errorLabel.trim())
|
|
10
|
+
throw new TypeError("ChoiceRow text must not be empty");
|
|
11
|
+
const [open, setOpen] = useState(false);
|
|
12
|
+
const [pending, setPending] = useState(false);
|
|
13
|
+
const [failed, setFailed] = useState(false);
|
|
14
|
+
const choose = (raw) => {
|
|
15
|
+
// RadioGroup only offers the values passed in `items`, so the string is one of `Value`.
|
|
16
|
+
const next = raw;
|
|
17
|
+
if (next === value || pending)
|
|
18
|
+
return;
|
|
19
|
+
setFailed(false);
|
|
20
|
+
const result = onValueChange(next);
|
|
21
|
+
if (!result) {
|
|
22
|
+
setOpen(false);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
setPending(true);
|
|
26
|
+
result.then(() => { setPending(false); setOpen(false); }, () => { setPending(false); setFailed(true); });
|
|
27
|
+
};
|
|
28
|
+
return _jsxs(_Fragment, { children: [_jsx(ListRow, { title: title, description: valueLabel, ...(leading === undefined ? {} : { leading }), ...(trailing === undefined ? {} : { trailing }), disabled: disabled, loading: loading, onClick: () => { setFailed(false); setOpen(true); } }), _jsx(Sheet, { open: open, onOpenChange: (next) => { if (!pending)
|
|
29
|
+
setOpen(next); }, title: sheetTitle ?? title, closeLabel: closeLabel, busy: pending, ...(sheetDescription === undefined ? {} : { description: sheetDescription }), children: _jsx(RadioGroup, { accessibilityLabel: sheetTitle ?? title, orientation: "vertical", value: value, items: items, disabled: pending, ...(failed ? { error: errorLabel } : {}), onValueChange: choose }) })] });
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=choice-row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"choice-row.js","sourceRoot":"","sources":["../src/choice-row.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAsB,MAAM,oCAA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W,EAAC,UAAU,EAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,KACnH,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,aAAa,EAAE,MAAM,GAAI,GAChE,IACP,CAAC;AACN,CAAC","sourcesContent":["import { useState, type ReactNode } from \"react\";\nimport { resolveChoiceRow, type ChoiceRowItem } from \"@hjmds/design-contracts/choice-row\";\nimport { ListRow } from \"./display.js\";\nimport { Sheet } from \"./overlays.js\";\nimport { RadioGroup } from \"./selection.js\";\n\nexport type { ChoiceRowItem } from \"@hjmds/design-contracts/choice-row\";\nexport type ChoiceRowProps<Value extends string = string> = Readonly<{\n title: string;\n items: readonly ChoiceRowItem<Value>[];\n /** The product-confirmed value; update it only after the save succeeds. */\n value: Value | null;\n /** A returned promise keeps the sheet open and busy; rejection keeps it open with `errorLabel`. */\n onValueChange: (value: Value) => void | Promise<void>;\n closeLabel: string;\n errorLabel: string;\n sheetTitle?: string;\n sheetDescription?: string;\n placeholder?: string;\n leading?: ReactNode;\n trailing?: ReactNode;\n disabled?: boolean;\n loading?: boolean;\n}>;\n\nexport function ChoiceRow<Value extends string = string>({ title, items, value, onValueChange, closeLabel, errorLabel, sheetTitle, sheetDescription, placeholder, leading, trailing, disabled = false, loading = false }: ChoiceRowProps<Value>) {\n const { valueLabel } = resolveChoiceRow({ title, items, value, ...(placeholder === undefined ? {} : { placeholder }) });\n if (!closeLabel.trim() || !errorLabel.trim()) throw new TypeError(\"ChoiceRow text must not be empty\");\n const [open, setOpen] = useState(false);\n const [pending, setPending] = useState(false);\n const [failed, setFailed] = useState(false);\n const choose = (raw: string) => {\n // RadioGroup only offers the values passed in `items`, so the string is one of `Value`.\n const next = raw as Value;\n if (next === value || pending) return;\n setFailed(false);\n const result = onValueChange(next);\n if (!result) { setOpen(false); return; }\n setPending(true);\n result.then(() => { setPending(false); setOpen(false); }, () => { setPending(false); setFailed(true); });\n };\n return <>\n <ListRow title={title} description={valueLabel} {...(leading === undefined ? {} : { leading })} {...(trailing === undefined ? {} : { trailing })} disabled={disabled} loading={loading}\n onClick={() => { setFailed(false); setOpen(true); }} />\n <Sheet open={open} onOpenChange={(next) => { if (!pending) setOpen(next); }} title={sheetTitle ?? title} closeLabel={closeLabel} busy={pending}\n {...(sheetDescription === undefined ? {} : { description: sheetDescription })}>\n <RadioGroup accessibilityLabel={sheetTitle ?? title} orientation=\"vertical\" value={value} items={items} disabled={pending}\n {...(failed ? { error: errorLabel } : {})} onValueChange={choose} />\n </Sheet>\n </>;\n}\n"]}
|
package/dist/evidence.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export type ReactRendererEvidenceManifest = Readonly<{
|
|
|
34
34
|
export declare const reactRendererEvidence: {
|
|
35
35
|
readonly schemaVersion: 2;
|
|
36
36
|
readonly packageName: "@hjmds/react";
|
|
37
|
-
readonly packageVersion: "1.
|
|
37
|
+
readonly packageVersion: "1.41.0";
|
|
38
38
|
readonly surface: "web";
|
|
39
39
|
readonly components: Readonly<{
|
|
40
40
|
/** Canonical component id from the design-contracts catalog. */
|
package/dist/evidence.js
CHANGED
|
@@ -135,7 +135,7 @@ const activeWebEntries = componentCatalog.filter((entry) => {
|
|
|
135
135
|
export const reactRendererEvidence = {
|
|
136
136
|
schemaVersion: reactRendererEvidenceSchemaVersion,
|
|
137
137
|
packageName: "@hjmds/react",
|
|
138
|
-
packageVersion: "1.
|
|
138
|
+
packageVersion: "1.41.0",
|
|
139
139
|
surface: "web",
|
|
140
140
|
components: activeWebEntries.map(derivedClaim),
|
|
141
141
|
};
|
package/dist/evidence.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidence.js","sourceRoot":"","sources":["../src/evidence.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,gBAAgB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AM,qBAAqB,GAAG;IACnC,aAAa,EAAE,kCAAkC;IACjD,WAAW,EAAE,cAAc;IAC3B,cAAc,EAAE,QAAQ;IACxB,OAAO,EAAE,KAAK;IACd,UAAU,EAAE,gBAAgB,CAAC,GAAG,CAAC,YAAY,CAAC;CACE,CAAC","sourcesContent":["import type { ShowcaseScenarioId } from \"@hjmds/design-contracts/showcase\";\nimport { getRequiredShowcaseEvidence } from \"@hjmds/design-contracts/showcase\";\nimport { componentCatalog, componentIdOf, getComponentSurfaceStatus, type ComponentCatalogEntry } from \"@hjmds/design-contracts/catalog\";\nimport { publicExportEntries } from \"./public-exports.generated.js\";\n\nexport const reactRendererEvidenceSchemaVersion = 2 as const;\n\nexport type ReactRendererEvidenceScenario = Exclude<ShowcaseScenarioId, \"contract\" | \"native-actions\">;\n\nexport type ReactRendererEvidenceComponent = Readonly<{\n /** Canonical component id from the design-contracts catalog. */\n componentId: string;\n /** Public symbols that implement this contract on the declared subpath. */\n exportNames: readonly string[];\n /** Granular @hjmds/react export used by consumers. */\n subpath: `./${string}`;\n /** Scenarios supported by automated first-party renderer evidence. */\n scenarios: readonly ReactRendererEvidenceScenario[];\n /** Repository-local executable proof for every claimed scenario. */\n proofs: readonly Readonly<{\n scenarios: readonly ReactRendererEvidenceScenario[];\n file: `test/${string}.test.tsx`;\n caseId: string;\n }>[];\n}>;\n\nexport type ReactRendererEvidenceManifest = Readonly<{\n schemaVersion: typeof reactRendererEvidenceSchemaVersion;\n packageName: \"@hjmds/react\";\n packageVersion: string;\n surface: \"web\";\n components: readonly ReactRendererEvidenceComponent[];\n}>;\n\nconst defaultProofFile = \"test/default-render.ssr.test.tsx\" as const;\nconst matrixProofFile = \"test/scenario-matrix.browser.test.tsx\" as const;\nconst stableCoreProofFile = \"test/stable-core.browser.test.tsx\" as const;\n\ntype ProofFile = `test/${string}.test.tsx`;\n\n/**\n * Scenarios a component does not pass yet. Each entry is promotion debt that\n * the generated evidence projection reports; remove it when the component is\n * fixed and the matrix case passes. Stable surfaces cannot carry a gap\n * (scripts/check-workspace-sync.mjs).\n */\nconst webScenarioGaps: Readonly<Record<string, readonly ReactRendererEvidenceScenario[]>> = {};\n\n/**\n * Proofs that live outside the shared default/matrix files: keyboard behavior in a dedicated browser test,\n * long copy proven inside a portal by the component's own test, or a whole matrix run in a component file.\n * Everything else about a claim derives from the catalog row (2026-10-18 registration input).\n */\ntype ClaimExtras = Readonly<{\n /** Extra proofs; their scenarios are removed from the shared matrix proof. */\n proofs?: readonly Readonly<{ scenarios: readonly ReactRendererEvidenceScenario[]; file: ProofFile }>[];\n /** Hooks or helpers published beside the component symbols on the same subpath. */\n exportNames?: readonly string[];\n}>;\n\nconst keyboard = (file: ProofFile = stableCoreProofFile): ClaimExtras => ({ proofs: [{ scenarios: [\"keyboard\"], file }] });\nconst keyboardAndLongCopy = (file: ProofFile): ClaimExtras => ({ proofs: [{ scenarios: [\"keyboard\", \"long-copy\"], file }] });\n\nconst claimExtras: Readonly<Record<string, ClaimExtras>> = {\n \"time-picker\": keyboard(\"test/time-picker.browser.test.tsx\"),\n \"design-system-provider\": { exportNames: [\"useHjmTheme\"] },\n layout: keyboard(),\n link: keyboard(),\n field: keyboard(),\n \"search-field\": keyboard(),\n \"password-field\": keyboard(),\n \"otp-field\": keyboard(),\n \"number-field\": keyboard(),\n slider: keyboard(),\n form: keyboard(\"test/form.keyboard.browser.test.tsx\"),\n \"date-picker\": keyboard(),\n calendar: keyboard(\"test/calendar.browser.test.tsx\"),\n \"file-picker\": keyboard(\"test/file-picker.keyboard.browser.test.tsx\"),\n checkbox: keyboard(),\n \"checkbox-group\": keyboard(),\n \"radio-group\": keyboard(),\n switch: keyboard(),\n \"segmented-control\": keyboard(),\n chip: keyboard(),\n tabs: keyboard(\"test/tabs.keyboard.browser.test.tsx\"),\n breadcrumb: keyboard(\"test/page-navigation.browser.test.tsx\"),\n pagination: keyboard(\"test/pagination.keyboard.browser.test.tsx\"),\n popover: keyboardAndLongCopy(\"test/popover.browser.test.tsx\"),\n \"side-panel\": keyboardAndLongCopy(\"test/side-panel.browser.test.tsx\"),\n splitter: keyboard(\"test/splitter.browser.test.tsx\"),\n tour: keyboardAndLongCopy(\"test/tour.browser.test.tsx\"),\n tree: keyboard(\"test/tree.browser.test.tsx\"),\n \"transfer-list\": keyboard(\"test/transfer-list.browser.test.tsx\"),\n mentions: keyboard(\"test/mentions.browser.test.tsx\"),\n \"command-palette\": keyboardAndLongCopy(\"test/command-palette.browser.test.tsx\"),\n agreement: keyboard(\"test/agreement.keyboard.browser.test.tsx\"),\n \"toggle-group\": keyboard(),\n \"tags-input\": keyboard(),\n \"skip-nav\": keyboardAndLongCopy(\"test/skip-nav.browser.test.tsx\"),\n sidebar: keyboard(\"test/sidebar.browser.test.tsx\"),\n \"date-range-picker\": keyboard(\"test/date-range.keyboard.browser.test.tsx\"),\n \"auth-provider-button\": keyboard(),\n \"data-table\": keyboard(\"test/data-table.keyboard.browser.test.tsx\"),\n collapsible: keyboard(\"test/collapsible.keyboard.browser.test.tsx\"),\n \"context-menu\": keyboardAndLongCopy(\"test/context-menu.interactions.browser.test.tsx\"),\n menubar: keyboard(\"test/menubar.keyboard.browser.test.tsx\"),\n anchor: keyboard(\"test/anchor.browser.test.tsx\"),\n \"bottom-navigation\": keyboard(\"test/bottom-navigation.keyboard.browser.test.tsx\"),\n \"load-more\": keyboard(\"test/load-more.interactions.browser.test.tsx\"),\n carousel: keyboard(\"test/carousel.browser.test.tsx\"),\n \"floating-action-button\": keyboard(),\n accordion: keyboard(\"test/accordion.keyboard.browser.test.tsx\"),\n \"upload-item\": keyboard(\"test/upload-item.browser.test.tsx\"),\n // ThinkingOrb runs its whole environment matrix in its own file (canvas timing), not in scenario-matrix.\n \"thinking-orb\": { proofs: [{ scenarios: [\"dark\", \"large-text\", \"rtl\", \"reduced-motion\", \"accessibility\"], file: \"test/thinking-orb.browser.test.tsx\" }] },\n \"color-picker\": keyboard(\"test/web-additions.browser.test.tsx\"),\n // SSR proves semantics but cannot catch the close-only row seen in BurnTok.\n // Keep real geometry evidence attached without promoting catalog maturity.\n toast: {\n exportNames: [\"useToast\"],\n proofs: [\n { scenarios: [\"keyboard\"], file: stableCoreProofFile },\n { scenarios: [\"dark\", \"long-copy\", \"large-text\", \"rtl\"], file: \"test/toast-layout.browser.test.tsx\" },\n ],\n },\n select: keyboard(),\n combobox: keyboard(),\n dialog: keyboard(\"test/advanced.browser.test.tsx\"),\n \"alert-dialog\": keyboardAndLongCopy(\"test/alert-dialog.keyboard.browser.test.tsx\"),\n sheet: keyboardAndLongCopy(\"test/sheet-layout.browser.test.tsx\"),\n tooltip: keyboard(\"test/tooltip.browser.test.tsx\"),\n menu: keyboardAndLongCopy(\"test/menu.keyboard.browser.test.tsx\"),\n};\n\nconst exportEntries: Readonly<Record<string, readonly `./${string}`[] | undefined>> = publicExportEntries;\n\n/**\n * One claim per active Web row of the catalog. The subpath is the symbol's canonical granular entry, the export\n * names are the row's own symbol plus the companions published on that entry, and the scenarios are the row's\n * required Web evidence minus recorded gaps. Keyboard is never implied: it comes only from a dedicated proof.\n */\nfunction derivedClaim(entry: ComponentCatalogEntry): ReactRendererEvidenceComponent {\n const componentId = componentIdOf(entry);\n const extras = claimExtras[componentId] ?? {};\n const symbols = entry.name === \"DesignSystemProvider\" ? [\"HjmProvider\"] : [entry.name, ...(entry.companions ?? [])];\n // A row whose own name is not a symbol (Chart) claims through its first published companion.\n const subpath = symbols.map((symbol) => exportEntries[symbol]?.[0]).find((entry) => entry !== undefined);\n if (!subpath) throw new Error(`${entry.name} has no granular @hjmds/react export to claim evidence on`);\n const exportNames = [\n ...symbols.filter((symbol) => exportEntries[symbol]?.includes(subpath)),\n ...(extras.exportNames ?? []),\n ];\n const required = getRequiredShowcaseEvidence(entry).find((evidence) => evidence.surface === \"web\")?.scenarios ?? [];\n const gaps = webScenarioGaps[componentId] ?? [];\n const extraProofs = extras.proofs ?? [];\n const proven = new Set(extraProofs.flatMap((proof) => proof.scenarios));\n const matrix = required.filter((scenario): scenario is ReactRendererEvidenceScenario =>\n scenario !== \"default\" && scenario !== \"keyboard\" && scenario !== \"native-actions\" && scenario !== \"contract\"\n && !gaps.includes(scenario as ReactRendererEvidenceScenario) && !proven.has(scenario as ReactRendererEvidenceScenario));\n const proofs = [\n { scenarios: [\"default\" as const], file: defaultProofFile, caseId: componentId },\n ...(matrix.length === 0 ? [] : [{ scenarios: matrix, file: matrixProofFile, caseId: componentId }]),\n ...extraProofs.map((proof) => ({ ...proof, caseId: componentId })),\n ];\n return {\n componentId,\n exportNames,\n subpath,\n scenarios: proofs.flatMap((proof) => proof.scenarios),\n proofs,\n };\n}\n\nconst activeWebEntries: readonly ComponentCatalogEntry[] = componentCatalog.filter((entry) => {\n const status = getComponentSurfaceStatus(entry, \"web\");\n return status === \"stable\" || status === \"beta\";\n});\n\n/**\n * First-party Web renderer claims. Scenario axes remain fail-closed: the\n * default scenario is an SSR render, the environment and accessibility\n * scenarios are computed-style assertions in scenario-matrix.browser.\n * Keyboard and cross-platform parity remain fail-closed until dedicated\n * interaction or paired-renderer proofs are mapped one-to-one.\n */\nexport const reactRendererEvidence = {\n schemaVersion: reactRendererEvidenceSchemaVersion,\n packageName: \"@hjmds/react\",\n packageVersion: \"1.39.0\",\n surface: \"web\",\n components: activeWebEntries.map(derivedClaim),\n} as const satisfies ReactRendererEvidenceManifest;\n"]}
|
|
1
|
+
{"version":3,"file":"evidence.js","sourceRoot":"","sources":["../src/evidence.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,yBAAyB,EAA8B,MAAM,iCAAiC,CAAC;AACzI,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAU,CAAC;AA6B7D,MAAM,gBAAgB,GAAG,kCAA2C,CAAC;AACrE,MAAM,eAAe,GAAG,uCAAgD,CA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nimport { getRequiredShowcaseEvidence } from \"@hjmds/design-contracts/showcase\";\nimport { componentCatalog, componentIdOf, getComponentSurfaceStatus, type ComponentCatalogEntry } from \"@hjmds/design-contracts/catalog\";\nimport { publicExportEntries } from \"./public-exports.generated.js\";\n\nexport const reactRendererEvidenceSchemaVersion = 2 as const;\n\nexport type ReactRendererEvidenceScenario = Exclude<ShowcaseScenarioId, \"contract\" | \"native-actions\">;\n\nexport type ReactRendererEvidenceComponent = Readonly<{\n /** Canonical component id from the design-contracts catalog. */\n componentId: string;\n /** Public symbols that implement this contract on the declared subpath. */\n exportNames: readonly string[];\n /** Granular @hjmds/react export used by consumers. */\n subpath: `./${string}`;\n /** Scenarios supported by automated first-party renderer evidence. */\n scenarios: readonly ReactRendererEvidenceScenario[];\n /** Repository-local executable proof for every claimed scenario. */\n proofs: readonly Readonly<{\n scenarios: readonly ReactRendererEvidenceScenario[];\n file: `test/${string}.test.tsx`;\n caseId: string;\n }>[];\n}>;\n\nexport type ReactRendererEvidenceManifest = Readonly<{\n schemaVersion: typeof reactRendererEvidenceSchemaVersion;\n packageName: \"@hjmds/react\";\n packageVersion: string;\n surface: \"web\";\n components: readonly ReactRendererEvidenceComponent[];\n}>;\n\nconst defaultProofFile = \"test/default-render.ssr.test.tsx\" as const;\nconst matrixProofFile = \"test/scenario-matrix.browser.test.tsx\" as const;\nconst stableCoreProofFile = \"test/stable-core.browser.test.tsx\" as const;\n\ntype ProofFile = `test/${string}.test.tsx`;\n\n/**\n * Scenarios a component does not pass yet. Each entry is promotion debt that\n * the generated evidence projection reports; remove it when the component is\n * fixed and the matrix case passes. Stable surfaces cannot carry a gap\n * (scripts/check-workspace-sync.mjs).\n */\nconst webScenarioGaps: Readonly<Record<string, readonly ReactRendererEvidenceScenario[]>> = {};\n\n/**\n * Proofs that live outside the shared default/matrix files: keyboard behavior in a dedicated browser test,\n * long copy proven inside a portal by the component's own test, or a whole matrix run in a component file.\n * Everything else about a claim derives from the catalog row (2026-10-18 registration input).\n */\ntype ClaimExtras = Readonly<{\n /** Extra proofs; their scenarios are removed from the shared matrix proof. */\n proofs?: readonly Readonly<{ scenarios: readonly ReactRendererEvidenceScenario[]; file: ProofFile }>[];\n /** Hooks or helpers published beside the component symbols on the same subpath. */\n exportNames?: readonly string[];\n}>;\n\nconst keyboard = (file: ProofFile = stableCoreProofFile): ClaimExtras => ({ proofs: [{ scenarios: [\"keyboard\"], file }] });\nconst keyboardAndLongCopy = (file: ProofFile): ClaimExtras => ({ proofs: [{ scenarios: [\"keyboard\", \"long-copy\"], file }] });\n\nconst claimExtras: Readonly<Record<string, ClaimExtras>> = {\n \"time-picker\": keyboard(\"test/time-picker.browser.test.tsx\"),\n \"design-system-provider\": { exportNames: [\"useHjmTheme\"] },\n layout: keyboard(),\n link: keyboard(),\n field: keyboard(),\n \"search-field\": keyboard(),\n \"password-field\": keyboard(),\n \"otp-field\": keyboard(),\n \"number-field\": keyboard(),\n slider: keyboard(),\n form: keyboard(\"test/form.keyboard.browser.test.tsx\"),\n \"date-picker\": keyboard(),\n calendar: keyboard(\"test/calendar.browser.test.tsx\"),\n \"file-picker\": keyboard(\"test/file-picker.keyboard.browser.test.tsx\"),\n checkbox: keyboard(),\n \"checkbox-group\": keyboard(),\n \"radio-group\": keyboard(),\n switch: keyboard(),\n \"segmented-control\": keyboard(),\n chip: keyboard(),\n tabs: keyboard(\"test/tabs.keyboard.browser.test.tsx\"),\n breadcrumb: keyboard(\"test/page-navigation.browser.test.tsx\"),\n pagination: keyboard(\"test/pagination.keyboard.browser.test.tsx\"),\n popover: keyboardAndLongCopy(\"test/popover.browser.test.tsx\"),\n \"side-panel\": keyboardAndLongCopy(\"test/side-panel.browser.test.tsx\"),\n splitter: keyboard(\"test/splitter.browser.test.tsx\"),\n tour: keyboardAndLongCopy(\"test/tour.browser.test.tsx\"),\n tree: keyboard(\"test/tree.browser.test.tsx\"),\n \"transfer-list\": keyboard(\"test/transfer-list.browser.test.tsx\"),\n mentions: keyboard(\"test/mentions.browser.test.tsx\"),\n \"command-palette\": keyboardAndLongCopy(\"test/command-palette.browser.test.tsx\"),\n agreement: keyboard(\"test/agreement.keyboard.browser.test.tsx\"),\n \"toggle-group\": keyboard(),\n \"tags-input\": keyboard(),\n \"skip-nav\": keyboardAndLongCopy(\"test/skip-nav.browser.test.tsx\"),\n sidebar: keyboard(\"test/sidebar.browser.test.tsx\"),\n \"date-range-picker\": keyboard(\"test/date-range.keyboard.browser.test.tsx\"),\n \"auth-provider-button\": keyboard(),\n \"data-table\": keyboard(\"test/data-table.keyboard.browser.test.tsx\"),\n collapsible: keyboard(\"test/collapsible.keyboard.browser.test.tsx\"),\n \"context-menu\": keyboardAndLongCopy(\"test/context-menu.interactions.browser.test.tsx\"),\n menubar: keyboard(\"test/menubar.keyboard.browser.test.tsx\"),\n anchor: keyboard(\"test/anchor.browser.test.tsx\"),\n \"bottom-navigation\": keyboard(\"test/bottom-navigation.keyboard.browser.test.tsx\"),\n \"load-more\": keyboard(\"test/load-more.interactions.browser.test.tsx\"),\n carousel: keyboard(\"test/carousel.browser.test.tsx\"),\n \"floating-action-button\": keyboard(),\n accordion: keyboard(\"test/accordion.keyboard.browser.test.tsx\"),\n \"upload-item\": keyboard(\"test/upload-item.browser.test.tsx\"),\n // ThinkingOrb runs its whole environment matrix in its own file (canvas timing), not in scenario-matrix.\n \"thinking-orb\": { proofs: [{ scenarios: [\"dark\", \"large-text\", \"rtl\", \"reduced-motion\", \"accessibility\"], file: \"test/thinking-orb.browser.test.tsx\" }] },\n \"color-picker\": keyboard(\"test/web-additions.browser.test.tsx\"),\n // SSR proves semantics but cannot catch the close-only row seen in BurnTok.\n // Keep real geometry evidence attached without promoting catalog maturity.\n toast: {\n exportNames: [\"useToast\"],\n proofs: [\n { scenarios: [\"keyboard\"], file: stableCoreProofFile },\n { scenarios: [\"dark\", \"long-copy\", \"large-text\", \"rtl\"], file: \"test/toast-layout.browser.test.tsx\" },\n ],\n },\n select: keyboard(),\n combobox: keyboard(),\n dialog: keyboard(\"test/advanced.browser.test.tsx\"),\n \"alert-dialog\": keyboardAndLongCopy(\"test/alert-dialog.keyboard.browser.test.tsx\"),\n sheet: keyboardAndLongCopy(\"test/sheet-layout.browser.test.tsx\"),\n tooltip: keyboard(\"test/tooltip.browser.test.tsx\"),\n menu: keyboardAndLongCopy(\"test/menu.keyboard.browser.test.tsx\"),\n};\n\nconst exportEntries: Readonly<Record<string, readonly `./${string}`[] | undefined>> = publicExportEntries;\n\n/**\n * One claim per active Web row of the catalog. The subpath is the symbol's canonical granular entry, the export\n * names are the row's own symbol plus the companions published on that entry, and the scenarios are the row's\n * required Web evidence minus recorded gaps. Keyboard is never implied: it comes only from a dedicated proof.\n */\nfunction derivedClaim(entry: ComponentCatalogEntry): ReactRendererEvidenceComponent {\n const componentId = componentIdOf(entry);\n const extras = claimExtras[componentId] ?? {};\n const symbols = entry.name === \"DesignSystemProvider\" ? [\"HjmProvider\"] : [entry.name, ...(entry.companions ?? [])];\n // A row whose own name is not a symbol (Chart) claims through its first published companion.\n const subpath = symbols.map((symbol) => exportEntries[symbol]?.[0]).find((entry) => entry !== undefined);\n if (!subpath) throw new Error(`${entry.name} has no granular @hjmds/react export to claim evidence on`);\n const exportNames = [\n ...symbols.filter((symbol) => exportEntries[symbol]?.includes(subpath)),\n ...(extras.exportNames ?? []),\n ];\n const required = getRequiredShowcaseEvidence(entry).find((evidence) => evidence.surface === \"web\")?.scenarios ?? [];\n const gaps = webScenarioGaps[componentId] ?? [];\n const extraProofs = extras.proofs ?? [];\n const proven = new Set(extraProofs.flatMap((proof) => proof.scenarios));\n const matrix = required.filter((scenario): scenario is ReactRendererEvidenceScenario =>\n scenario !== \"default\" && scenario !== \"keyboard\" && scenario !== \"native-actions\" && scenario !== \"contract\"\n && !gaps.includes(scenario as ReactRendererEvidenceScenario) && !proven.has(scenario as ReactRendererEvidenceScenario));\n const proofs = [\n { scenarios: [\"default\" as const], file: defaultProofFile, caseId: componentId },\n ...(matrix.length === 0 ? [] : [{ scenarios: matrix, file: matrixProofFile, caseId: componentId }]),\n ...extraProofs.map((proof) => ({ ...proof, caseId: componentId })),\n ];\n return {\n componentId,\n exportNames,\n subpath,\n scenarios: proofs.flatMap((proof) => proof.scenarios),\n proofs,\n };\n}\n\nconst activeWebEntries: readonly ComponentCatalogEntry[] = componentCatalog.filter((entry) => {\n const status = getComponentSurfaceStatus(entry, \"web\");\n return status === \"stable\" || status === \"beta\";\n});\n\n/**\n * First-party Web renderer claims. Scenario axes remain fail-closed: the\n * default scenario is an SSR render, the environment and accessibility\n * scenarios are computed-style assertions in scenario-matrix.browser.\n * Keyboard and cross-platform parity remain fail-closed until dedicated\n * interaction or paired-renderer proofs are mapped one-to-one.\n */\nexport const reactRendererEvidence = {\n schemaVersion: reactRendererEvidenceSchemaVersion,\n packageName: \"@hjmds/react\",\n packageVersion: \"1.41.0\",\n surface: \"web\",\n components: activeWebEntries.map(derivedClaim),\n} as const satisfies ReactRendererEvidenceManifest;\n"]}
|
|
@@ -4,6 +4,7 @@ import { type ButtonProps } from "./actions.js";
|
|
|
4
4
|
export { resolveFloatingActionButtonContentClearance };
|
|
5
5
|
export type FloatingActionButtonProps = Pick<ButtonProps, "onClick" | "onFocus" | "onBlur" | "id" | "className"> & Readonly<{
|
|
6
6
|
descriptor: FloatingActionButtonDescriptor;
|
|
7
|
+
size?: "medium" | "large";
|
|
7
8
|
renderIcon: (icon: Readonly<{
|
|
8
9
|
name: string;
|
|
9
10
|
size: number;
|
|
@@ -17,6 +18,7 @@ export type FloatingActionButtonProps = Pick<ButtonProps, "onClick" | "onFocus"
|
|
|
17
18
|
/** One persistent button preserves focus while its label collapses. */
|
|
18
19
|
export declare const FloatingActionButton: import("react").ForwardRefExoticComponent<Pick<ButtonProps, "id" | "className" | "onFocus" | "onBlur" | "onClick"> & Readonly<{
|
|
19
20
|
descriptor: FloatingActionButtonDescriptor;
|
|
21
|
+
size?: "medium" | "large";
|
|
20
22
|
renderIcon: (icon: Readonly<{
|
|
21
23
|
name: string;
|
|
22
24
|
size: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"floating-action-button.d.ts","sourceRoot":"","sources":["../src/floating-action-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACpG,OAAO,EAEkC,2CAA2C,EAClF,KAAK,8BAA8B,EAAE,KAAK,8BAA8B,EACzE,MAAM,2DAA2D,CAAC;AAEnE,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAIxD,OAAO,EAAE,2CAA2C,EAAE,CAAC;AAEvD,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,IAAI,GAAG,WAAW,CAAC,GAAG,QAAQ,CAAC;IAC1H,UAAU,EAAE,8BAA8B,CAAC;IAC3C,UAAU,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,IAAI,CAAA;KAAE,CAAC,KAAK,SAAS,CAAC;IAC3G,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,qFAAqF;IACrF,wBAAwB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACvD,CAAC,CAAC;AAEH,uEAAuE;AACvE,eAAO,MAAM,oBAAoB;
|
|
1
|
+
{"version":3,"file":"floating-action-button.d.ts","sourceRoot":"","sources":["../src/floating-action-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACpG,OAAO,EAEkC,2CAA2C,EAClF,KAAK,8BAA8B,EAAE,KAAK,8BAA8B,EACzE,MAAM,2DAA2D,CAAC;AAEnE,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAIxD,OAAO,EAAE,2CAA2C,EAAE,CAAC;AAEvD,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,IAAI,GAAG,WAAW,CAAC,GAAG,QAAQ,CAAC;IAC1H,UAAU,EAAE,8BAA8B,CAAC;IAC3C,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC1B,UAAU,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,IAAI,CAAA;KAAE,CAAC,KAAK,SAAS,CAAC;IAC3G,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,qFAAqF;IACrF,wBAAwB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACvD,CAAC,CAAC;AAEH,uEAAuE;AACvE,eAAO,MAAM,oBAAoB;gBATnB,8BAA8B;WACnC,QAAQ,GAAG,OAAO;gBACb,CAAC,IAAI,EAAE,QAAQ,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,IAAI,CAAA;KAAE,CAAC,KAAK,SAAS;0BACpF,MAAM;IAC5B,qFAAqF;8BAC3D,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI;sDAoCrD,CAAC;AAEH,yFAAyF;AACzF,wBAAgB,6BAA6B,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG,8BAA8B,CAmBzG"}
|
|
@@ -7,10 +7,10 @@ import { assignRef, classNames } from "./internal.js";
|
|
|
7
7
|
import { useOptionalHjmTheme } from "./provider.js";
|
|
8
8
|
export { resolveFloatingActionButtonContentClearance };
|
|
9
9
|
/** One persistent button preserves focus while its label collapses. */
|
|
10
|
-
export const FloatingActionButton = forwardRef(function FloatingActionButton({ descriptor, renderIcon, safeAreaBottomInset = 0, onContentClearanceChange, className, ...props }, forwardedRef) {
|
|
10
|
+
export const FloatingActionButton = forwardRef(function FloatingActionButton({ descriptor, size = "large", renderIcon, safeAreaBottomInset = 0, onContentClearanceChange, className, ...props }, forwardedRef) {
|
|
11
11
|
const resolved = resolveFloatingActionButtonDescriptor(descriptor);
|
|
12
12
|
const theme = useOptionalHjmTheme();
|
|
13
|
-
const minimumClearance = resolveFloatingActionButtonContentClearance(safeAreaBottomInset);
|
|
13
|
+
const minimumClearance = resolveFloatingActionButtonContentClearance(safeAreaBottomInset, size);
|
|
14
14
|
const buttonRef = useRef(null);
|
|
15
15
|
useEffect(() => {
|
|
16
16
|
const button = buttonRef.current;
|
|
@@ -27,13 +27,13 @@ export const FloatingActionButton = forwardRef(function FloatingActionButton({ d
|
|
|
27
27
|
window.addEventListener("resize", measure);
|
|
28
28
|
return () => { observer.disconnect(); window.removeEventListener("resize", measure); };
|
|
29
29
|
}, [minimumClearance, safeAreaBottomInset, onContentClearanceChange]);
|
|
30
|
-
return _jsx(Button, { ...props, appearance: "flat", ref: (node) => { buttonRef.current = node; assignRef(forwardedRef, node); }, className: classNames("hjm-fab", className), size:
|
|
30
|
+
return _jsx(Button, { ...props, appearance: "flat", ref: (node) => { buttonRef.current = node; assignRef(forwardedRef, node); }, className: classNames("hjm-fab", className), size: size, tone: "primary", shape: "pill", "data-mode": resolved.layoutMode, "data-direction": theme?.environment.direction ?? "ltr", "data-reduced-motion": theme?.environment.reducedMotion ?? false, "aria-label": resolved.resolvedAccessibilityLabel, style: { "--hjm-fab-diameter": `${recipe.sizes[size].diameter}px`, "--hjm-fab-margin": `${recipe.margin}px`,
|
|
31
31
|
"--hjm-fab-safe-area": `${safeAreaBottomInset}px`, "--hjm-fab-duration": `${recipe.transition.duration}ms`,
|
|
32
32
|
"--hjm-fab-easing": `cubic-bezier(${easing[recipe.transition.easing].join(",")})`,
|
|
33
33
|
// Match other floating chrome under a profile; keep the stylesheet-only
|
|
34
34
|
// legacy path rather than requiring a Provider for existing consumers.
|
|
35
35
|
boxShadow: theme?.designProfile ? "var(--hjm-shadow-floating)"
|
|
36
|
-
: `0 ${recipe.shadow.offsetY}px ${recipe.shadow.radius}px color-mix(in srgb, ${recipe.shadow.color} ${recipe.shadow.opacity * 100}%, transparent)` }, leading: _jsx("span", { "aria-hidden": "true", className: "hjm-fab__icon", children: renderIcon({ name: resolved.icon.name, size: glyph[recipe.
|
|
36
|
+
: `0 ${recipe.shadow.offsetY}px ${recipe.shadow.radius}px color-mix(in srgb, ${recipe.shadow.color} ${recipe.shadow.opacity * 100}%, transparent)` }, leading: _jsx("span", { "aria-hidden": "true", className: "hjm-fab__icon", children: renderIcon({ name: resolved.icon.name, size: glyph[recipe.sizes[size].glyph], color: "currentColor", decorative: true }) }), children: resolved.label });
|
|
37
37
|
});
|
|
38
38
|
/** Omit target for window scrolling; null waits for a custom scroll element to mount. */
|
|
39
39
|
export function useFloatingActionButtonScroll(target) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"floating-action-button.js","sourceRoot":"","sources":["../src/floating-action-button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAsC,MAAM,OAAO,CAAC;AACpG,OAAO,EACL,0BAA0B,IAAI,MAAM,EAAE,qCAAqC,EAC3E,qCAAqC,EAAE,2CAA2C,GAEnF,MAAM,2DAA2D,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAoB,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,2CAA2C,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"floating-action-button.js","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CAAC,OAAO,CAAC;QACjD,MAAM,QAAQ,GAAG,GAAG,EAAE;YACpB,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;YAChE,MAAM,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;YAC9B,4EAA4E;YAC5E,uEAAuE;YACvE,IAAI,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC;gBAAE,OAAO;YAC9D,MAAM,GAAG,MAAM,CAAC;YAChB,aAAa,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,qCAAqC,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC,CAAC;QACvI,CAAC,CAAC;QACF,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QAC/D,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC9D,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACb,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import { forwardRef, useEffect, useRef, useState, type CSSProperties, type ReactNode } from \"react\";\nimport {\n floatingActionButtonRecipe as recipe, resolveFloatingActionButtonDescriptor,\n resolveFloatingActionButtonLayoutMode, resolveFloatingActionButtonContentClearance,\n type FloatingActionButtonDescriptor, type FloatingActionButtonLayoutMode,\n} from \"@hjmds/design-contracts/components/floating-action-button\";\nimport { glyph, easing } from \"@hjmds/design-contracts/foundations\";\nimport { Button, type ButtonProps } from \"./actions.js\";\nimport { assignRef, classNames } from \"./internal.js\";\nimport { useOptionalHjmTheme } from \"./provider.js\";\n\nexport { resolveFloatingActionButtonContentClearance };\n// No `layoutStyle`: fixed to the viewport corner with safe-area and content-clearance math the recipe owns; margins would desync `onContentClearanceChange`.\nexport type FloatingActionButtonProps = Pick<ButtonProps, \"onClick\" | \"onFocus\" | \"onBlur\" | \"id\" | \"className\"> & Readonly<{\n descriptor: FloatingActionButtonDescriptor;\n size?: \"medium\" | \"large\";\n renderIcon: (icon: Readonly<{ name: string; size: number; color: string; decorative: true }>) => ReactNode;\n safeAreaBottomInset?: number;\n /** Apply this to the scroll content's bottom padding, including multiline labels. */\n onContentClearanceChange: (clearance: number) => void;\n}>;\n\n/** One persistent button preserves focus while its label collapses. */\nexport const FloatingActionButton = forwardRef<HTMLButtonElement, FloatingActionButtonProps>(function FloatingActionButton({\n descriptor, size = \"large\", renderIcon, safeAreaBottomInset = 0, onContentClearanceChange, className, ...props\n}, forwardedRef) {\n const resolved = resolveFloatingActionButtonDescriptor(descriptor);\n const theme = useOptionalHjmTheme();\n const minimumClearance = resolveFloatingActionButtonContentClearance(safeAreaBottomInset, size);\n const buttonRef = useRef<HTMLButtonElement | null>(null);\n useEffect(() => {\n const button = buttonRef.current;\n if (!button) return;\n const measure = () => {\n const bottom = parseFloat(getComputedStyle(button).bottom);\n onContentClearanceChange(Math.max(minimumClearance, button.getBoundingClientRect().height\n + (Number.isFinite(bottom) ? bottom : recipe.margin + safeAreaBottomInset) + recipe.margin));\n };\n measure(); const observer = new ResizeObserver(measure); observer.observe(button);\n window.addEventListener(\"resize\", measure);\n return () => { observer.disconnect(); window.removeEventListener(\"resize\", measure); };\n }, [minimumClearance, safeAreaBottomInset, onContentClearanceChange]);\n return <Button {...props} appearance=\"flat\" ref={(node) => { buttonRef.current = node; assignRef(forwardedRef, node); }}\n className={classNames(\"hjm-fab\", className)} size={size} tone=\"primary\" shape=\"pill\"\n data-mode={resolved.layoutMode} data-direction={theme?.environment.direction ?? \"ltr\"} data-reduced-motion={theme?.environment.reducedMotion ?? false} aria-label={resolved.resolvedAccessibilityLabel}\n style={{ \"--hjm-fab-diameter\": `${recipe.sizes[size].diameter}px`, \"--hjm-fab-margin\": `${recipe.margin}px`,\n \"--hjm-fab-safe-area\": `${safeAreaBottomInset}px`, \"--hjm-fab-duration\": `${recipe.transition.duration}ms`,\n \"--hjm-fab-easing\": `cubic-bezier(${easing[recipe.transition.easing].join(\",\")})`,\n // Match other floating chrome under a profile; keep the stylesheet-only\n // legacy path rather than requiring a Provider for existing consumers.\n boxShadow: theme?.designProfile ? \"var(--hjm-shadow-floating)\"\n : `0 ${recipe.shadow.offsetY}px ${recipe.shadow.radius}px color-mix(in srgb, ${recipe.shadow.color} ${recipe.shadow.opacity * 100}%, transparent)` } as CSSProperties}\n leading={<span aria-hidden=\"true\" className=\"hjm-fab__icon\">{renderIcon({ name: resolved.icon.name, size: glyph[recipe.sizes[size].glyph], color: \"currentColor\", decorative: true })}</span>}>\n {resolved.label}\n </Button>;\n});\n\n/** Omit target for window scrolling; null waits for a custom scroll element to mount. */\nexport function useFloatingActionButtonScroll(target?: HTMLElement | null): FloatingActionButtonLayoutMode {\n const [layoutMode, setLayoutMode] = useState<FloatingActionButtonLayoutMode>(\"expanded\");\n useEffect(() => {\n if (target === null) return;\n const source = target ?? window;\n let anchor = target?.scrollTop ?? window.scrollY;\n const onScroll = () => {\n const offset = Math.max(0, target?.scrollTop ?? window.scrollY);\n const delta = offset - anchor;\n // Half the edge margin ignores tiny trackpad tremors, but accumulates small\n // deltas until direction is clear instead of resetting on every frame.\n if (offset > 0 && Math.abs(delta) < recipe.margin / 2) return;\n anchor = offset;\n setLayoutMode((mode) => resolveFloatingActionButtonLayoutMode(offset === 0 || delta < 0 ? \"toward-start\" : \"away-from-start\", mode));\n };\n source.addEventListener(\"scroll\", onScroll, { passive: true });\n return () => source.removeEventListener(\"scroll\", onScroll);\n }, [target]);\n return layoutMode;\n}\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export type ImageViewerItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
uri: string;
|
|
5
|
+
label: string;
|
|
6
|
+
};
|
|
7
|
+
export type ImageViewerProps = {
|
|
8
|
+
actions?: ReactNode;
|
|
9
|
+
open: boolean;
|
|
10
|
+
items: readonly ImageViewerItem[];
|
|
11
|
+
initialIndex?: number;
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
onIndexChange?: (index: number) => void;
|
|
14
|
+
closeLabel: string;
|
|
15
|
+
previousLabel: string;
|
|
16
|
+
nextLabel: string;
|
|
17
|
+
loadingLabel: string;
|
|
18
|
+
errorLabel: string;
|
|
19
|
+
retryLabel: string;
|
|
20
|
+
/** Authorized image hosts keep their fetching, loading and retry policy. Only the selected item mounts. */
|
|
21
|
+
renderImage?: (item: ImageViewerItem) => ReactNode;
|
|
22
|
+
};
|
|
23
|
+
/** Full viewport photo presentation; shares modal isolation, focus return and Escape with Dialog. */
|
|
24
|
+
export declare function ImageViewer(props: ImageViewerProps): import("react").JSX.Element | null;
|
|
25
|
+
//# sourceMappingURL=image-viewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-viewer.d.ts","sourceRoot":"","sources":["../src/image-viewer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAI5E,MAAM,MAAM,eAAe,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AACzE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,SAAS,eAAe,EAAE,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IACxE,OAAO,EAAE,MAAM,IAAI,CAAC;IAAC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,UAAU,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAC7D,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAC7D,2GAA2G;IAC3G,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,SAAS,CAAC;CACpD,CAAC;AAEF,qGAAqG;AACrG,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,sCAQlD"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useState } from "react";
|
|
3
|
+
import { HjmPortal, getModalLayer, useModalFocus } from "./modal.js";
|
|
4
|
+
import { IconButton } from "./actions.js";
|
|
5
|
+
/** Full viewport photo presentation; shares modal isolation, focus return and Escape with Dialog. */
|
|
6
|
+
export function ImageViewer(props) {
|
|
7
|
+
if (!props.open)
|
|
8
|
+
return null;
|
|
9
|
+
if (!props.items.length || new Set(props.items.map(item => item.id)).size !== props.items.length ||
|
|
10
|
+
props.items.some(item => !item.id.trim() || !item.uri.trim() || !item.label.trim()) ||
|
|
11
|
+
[props.closeLabel, props.previousLabel, props.nextLabel, props.loadingLabel, props.errorLabel, props.retryLabel].some(label => !label.trim()) ||
|
|
12
|
+
!Number.isInteger(props.initialIndex ?? 0) || (props.initialIndex ?? 0) < 0 || (props.initialIndex ?? 0) >= props.items.length)
|
|
13
|
+
throw new TypeError("ImageViewer needs named images, localized controls and a valid index");
|
|
14
|
+
return _jsx(ViewerSession, { ...props }, JSON.stringify(props.items.map(item => [item.id, item.uri])));
|
|
15
|
+
}
|
|
16
|
+
function ViewerSession(props) {
|
|
17
|
+
const contentRef = useRef(null), closeRef = useRef(null);
|
|
18
|
+
const [index, setIndex] = useState(props.initialIndex ?? 0);
|
|
19
|
+
const [view, setView] = useState({ scale: 1, x: 0, y: 0 });
|
|
20
|
+
const pointers = useRef(new Map());
|
|
21
|
+
const item = props.items[index];
|
|
22
|
+
useModalFocus({ active: true, contentRef, initialFocusRef: closeRef, onEscape: props.onClose });
|
|
23
|
+
const move = (next) => { pointers.current.clear(); setView({ scale: 1, x: 0, y: 0 }); setIndex(next); props.onIndexChange?.(next); };
|
|
24
|
+
const clamp = (scale, x = view.x, y = view.y) => {
|
|
25
|
+
const bounds = contentRef.current?.querySelector(".hjm-image-viewer__stage")?.getBoundingClientRect();
|
|
26
|
+
const image = contentRef.current?.querySelector('img');
|
|
27
|
+
const fit = image?.naturalWidth && bounds ? Math.min(bounds.width / image.naturalWidth, bounds.height / image.naturalHeight) : 1;
|
|
28
|
+
const imageWidth = image?.naturalWidth ? image.naturalWidth * fit : bounds?.width ?? 0;
|
|
29
|
+
const imageHeight = image?.naturalHeight ? image.naturalHeight * fit : bounds?.height ?? 0;
|
|
30
|
+
const limitX = Math.max(0, imageWidth * scale - (bounds?.width ?? 0)) / 2;
|
|
31
|
+
const limitY = Math.max(0, imageHeight * scale - (bounds?.height ?? 0)) / 2;
|
|
32
|
+
setView({ scale, x: Math.max(-limitX, Math.min(limitX, x)), y: Math.max(-limitY, Math.min(limitY, y)) });
|
|
33
|
+
};
|
|
34
|
+
const pointerMove = (event) => {
|
|
35
|
+
const old = pointers.current.get(event.pointerId);
|
|
36
|
+
if (!old)
|
|
37
|
+
return;
|
|
38
|
+
const other = [...pointers.current.entries()].find(([id]) => id !== event.pointerId)?.[1];
|
|
39
|
+
pointers.current.set(event.pointerId, { x: event.clientX, y: event.clientY });
|
|
40
|
+
if (other) {
|
|
41
|
+
const before = Math.hypot(old.x - other.x, old.y - other.y);
|
|
42
|
+
if (before > 0)
|
|
43
|
+
clamp(Math.max(1, Math.min(4, view.scale * Math.hypot(event.clientX - other.x, event.clientY - other.y) / before)));
|
|
44
|
+
}
|
|
45
|
+
else if (view.scale > 1)
|
|
46
|
+
clamp(view.scale, view.x + event.clientX - old.x, view.y + event.clientY - old.y);
|
|
47
|
+
};
|
|
48
|
+
return _jsx(HjmPortal, { children: _jsxs("div", { className: "hjm-image-viewer", style: { zIndex: getModalLayer(0) }, ref: contentRef, role: "dialog", "aria-modal": "true", "aria-label": item.label, "data-hjm-modal-content": "", tabIndex: -1, children: [_jsxs("div", { className: "hjm-image-viewer__header", children: [_jsx(IconButton, { ref: closeRef, label: props.closeLabel, tone: "ghost", onClick: props.onClose, children: "\u00D7" }), props.actions ? _jsx("div", { className: "hjm-image-viewer__actions", children: props.actions }) : null] }), _jsx("div", { className: "hjm-image-viewer__stage", onDoubleClick: () => clamp(view.scale === 1 ? 2 : 1, 0, 0), onPointerDown: event => {
|
|
49
|
+
if (event.target.closest("button"))
|
|
50
|
+
return;
|
|
51
|
+
pointers.current.set(event.pointerId, { x: event.clientX, y: event.clientY });
|
|
52
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
53
|
+
}, onPointerMove: pointerMove, onPointerUp: event => pointers.current.delete(event.pointerId), onPointerCancel: event => pointers.current.delete(event.pointerId), onKeyDown: event => {
|
|
54
|
+
if (event.key === "+" || event.key === "=") {
|
|
55
|
+
event.preventDefault();
|
|
56
|
+
clamp(Math.min(4, view.scale + 1));
|
|
57
|
+
}
|
|
58
|
+
if (event.key === "-") {
|
|
59
|
+
event.preventDefault();
|
|
60
|
+
clamp(Math.max(1, view.scale - 1));
|
|
61
|
+
}
|
|
62
|
+
if (event.key.startsWith('Arrow')) {
|
|
63
|
+
event.preventDefault();
|
|
64
|
+
if (view.scale > 1)
|
|
65
|
+
clamp(view.scale, view.x + (event.key === 'ArrowLeft' ? 40 : event.key === 'ArrowRight' ? -40 : 0), view.y + (event.key === 'ArrowUp' ? 40 : event.key === 'ArrowDown' ? -40 : 0));
|
|
66
|
+
else if (event.key === 'ArrowLeft' && index > 0)
|
|
67
|
+
move(index - 1);
|
|
68
|
+
else if (event.key === 'ArrowRight' && index + 1 < props.items.length)
|
|
69
|
+
move(index + 1);
|
|
70
|
+
}
|
|
71
|
+
}, tabIndex: 0, "aria-label": item.label, children: _jsx("div", { className: "hjm-image-viewer__image", style: { transform: `translate(${view.x}px, ${view.y}px) scale(${view.scale})` }, children: props.renderImage ? props.renderImage(item) : _jsx(ViewerImage, { item: item, ...props }, item.uri) }) }), _jsxs("div", { className: "hjm-image-viewer__footer", children: [props.items.length > 1 ? _jsx(IconButton, { label: props.previousLabel, tone: "ghost", disabled: index === 0, onClick: () => move(index - 1), children: "\u2039" }) : null, _jsxs("span", { "aria-live": "polite", children: [item.label, props.items.length > 1 ? ` · ${index + 1}/${props.items.length}` : ""] }), props.items.length > 1 ? _jsx(IconButton, { label: props.nextLabel, tone: "ghost", disabled: index === props.items.length - 1, onClick: () => move(index + 1), children: "\u203A" }) : null] })] }) });
|
|
72
|
+
}
|
|
73
|
+
function ViewerImage({ item, loadingLabel, errorLabel, retryLabel }) {
|
|
74
|
+
const [attempt, setAttempt] = useState(0);
|
|
75
|
+
// A retry retires the whole host, so an old image callback cannot mark a new attempt ready.
|
|
76
|
+
return _jsx(ImageAttempt, { item: item, loadingLabel: loadingLabel, errorLabel: errorLabel, retryLabel: retryLabel, onRetry: () => setAttempt(n => n + 1) }, attempt);
|
|
77
|
+
}
|
|
78
|
+
function ImageAttempt({ item, loadingLabel, errorLabel, retryLabel, onRetry }) {
|
|
79
|
+
const [status, setStatus] = useState("loading");
|
|
80
|
+
return _jsxs(_Fragment, { children: [_jsx("img", { src: item.uri, alt: item.label, draggable: false, onLoad: () => setStatus(current => current === 'error' ? current : 'ready'), onError: () => setStatus("error") }), status === "loading" ? _jsx("span", { role: "status", children: loadingLabel }) : status === "error" ? _jsxs("div", { role: "alert", children: [errorLabel, _jsx("button", { type: "button", onClick: onRetry, children: retryLabel })] }) : null] });
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=image-viewer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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AE,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,GAAI,EAC/K,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,eAAM,IAAI,EAAC,QAAQ,YAAE,YAAY,GAAQ,CAAC,CAAC,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,eAAK,IAAI,EAAC,OAAO,aAAE,UAAU,EAAC,iBAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,YAAG,UAAU,GAAU,IAAM,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;AAC1M,CAAC","sourcesContent":["import { useRef, useState, type ReactNode, type PointerEvent } from \"react\";\nimport { HjmPortal, getModalLayer, useModalFocus } from \"./modal.js\";\nimport { IconButton } from \"./actions.js\";\n\nexport type ImageViewerItem = { id: string; uri: string; label: string };\nexport type ImageViewerProps = {\n actions?: ReactNode;\n open: boolean; items: readonly ImageViewerItem[]; initialIndex?: number;\n onClose: () => void; onIndexChange?: (index: number) => void;\n closeLabel: string; previousLabel: string; nextLabel: string;\n loadingLabel: string; errorLabel: string; retryLabel: string;\n /** Authorized image hosts keep their fetching, loading and retry policy. Only the selected item mounts. */\n renderImage?: (item: ImageViewerItem) => ReactNode;\n};\n\n/** Full viewport photo presentation; shares modal isolation, focus return and Escape with Dialog. */\nexport function ImageViewer(props: ImageViewerProps) {\n if (!props.open) return null;\n if (!props.items.length || new Set(props.items.map(item => item.id)).size !== props.items.length ||\n props.items.some(item => !item.id.trim() || !item.uri.trim() || !item.label.trim()) ||\n [props.closeLabel, props.previousLabel, props.nextLabel, props.loadingLabel, props.errorLabel, props.retryLabel].some(label => !label.trim()) ||\n !Number.isInteger(props.initialIndex ?? 0) || (props.initialIndex ?? 0) < 0 || (props.initialIndex ?? 0) >= props.items.length)\n throw new TypeError(\"ImageViewer needs named images, localized controls and a valid index\");\n return <ViewerSession key={JSON.stringify(props.items.map(item => [item.id, item.uri]))} {...props} />;\n}\nfunction ViewerSession(props: ImageViewerProps) {\n const contentRef = useRef<HTMLDivElement>(null), closeRef = useRef<HTMLButtonElement>(null);\n const [index, setIndex] = useState(props.initialIndex ?? 0);\n const [view, setView] = useState({ scale: 1, x: 0, y: 0 });\n const pointers = useRef(new Map<number, { x: number; y: number }>());\n const item = props.items[index]!;\n useModalFocus({ active: true, contentRef, initialFocusRef: closeRef, onEscape: props.onClose });\n const move = (next: number) => { pointers.current.clear(); setView({ scale: 1, x: 0, y: 0 }); setIndex(next); props.onIndexChange?.(next); };\n const clamp = (scale: number, x = view.x, y = view.y) => {\n const bounds = contentRef.current?.querySelector(\".hjm-image-viewer__stage\")?.getBoundingClientRect();\n const image = contentRef.current?.querySelector('img');\n const fit = image?.naturalWidth && bounds ? Math.min(bounds.width / image.naturalWidth, bounds.height / image.naturalHeight) : 1;\n const imageWidth = image?.naturalWidth ? image.naturalWidth * fit : bounds?.width ?? 0;\n const imageHeight = image?.naturalHeight ? image.naturalHeight * fit : bounds?.height ?? 0;\n const limitX = Math.max(0, imageWidth * scale - (bounds?.width ?? 0)) / 2;\n const limitY = Math.max(0, imageHeight * scale - (bounds?.height ?? 0)) / 2;\n setView({ scale, x: Math.max(-limitX, Math.min(limitX, x)), y: Math.max(-limitY, Math.min(limitY, y)) });\n };\n const pointerMove = (event: PointerEvent<HTMLDivElement>) => {\n const old = pointers.current.get(event.pointerId);\n if (!old) return;\n const other = [...pointers.current.entries()].find(([id]) => id !== event.pointerId)?.[1];\n pointers.current.set(event.pointerId, { x: event.clientX, y: event.clientY });\n if (other) {\n const before = Math.hypot(old.x - other.x, old.y - other.y);\n if (before > 0) clamp(Math.max(1, Math.min(4, view.scale * Math.hypot(event.clientX - other.x, event.clientY - other.y) / before)));\n } else if (view.scale > 1) clamp(view.scale, view.x + event.clientX - old.x, view.y + event.clientY - old.y);\n };\n return <HjmPortal><div className=\"hjm-image-viewer\" style={{ zIndex: getModalLayer(0) }} ref={contentRef}\n role=\"dialog\" aria-modal=\"true\" aria-label={item.label} data-hjm-modal-content=\"\" tabIndex={-1}>\n <div className=\"hjm-image-viewer__header\"><IconButton ref={closeRef} label={props.closeLabel} tone=\"ghost\" onClick={props.onClose}>×</IconButton>{props.actions ? <div className=\"hjm-image-viewer__actions\">{props.actions}</div> : null}</div>\n <div className=\"hjm-image-viewer__stage\" onDoubleClick={() => clamp(view.scale === 1 ? 2 : 1, 0, 0)}\n onPointerDown={event => {\n if ((event.target as HTMLElement).closest(\"button\")) return;\n pointers.current.set(event.pointerId, { x: event.clientX, y: event.clientY }); event.currentTarget.setPointerCapture(event.pointerId);\n }} onPointerMove={pointerMove} onPointerUp={event => pointers.current.delete(event.pointerId)} onPointerCancel={event => pointers.current.delete(event.pointerId)}\n onKeyDown={event => {\n if (event.key === \"+\" || event.key === \"=\") { event.preventDefault(); clamp(Math.min(4, view.scale + 1)); }\n if (event.key === \"-\") { event.preventDefault(); clamp(Math.max(1, view.scale - 1)); }\n if (event.key.startsWith('Arrow')) {\n event.preventDefault();\n if (view.scale > 1) clamp(view.scale, view.x + (event.key === 'ArrowLeft' ? 40 : event.key === 'ArrowRight' ? -40 : 0), view.y + (event.key === 'ArrowUp' ? 40 : event.key === 'ArrowDown' ? -40 : 0));\n else if (event.key === 'ArrowLeft' && index > 0) move(index - 1);\n else if (event.key === 'ArrowRight' && index + 1 < props.items.length) move(index + 1);\n }\n }} tabIndex={0} aria-label={item.label}>\n <div className=\"hjm-image-viewer__image\" style={{ transform: `translate(${view.x}px, ${view.y}px) scale(${view.scale})` }}>\n {props.renderImage ? props.renderImage(item) : <ViewerImage key={item.uri} item={item} {...props} />}\n </div>\n </div>\n <div className=\"hjm-image-viewer__footer\">\n {props.items.length > 1 ? <IconButton label={props.previousLabel} tone=\"ghost\" disabled={index === 0} onClick={() => move(index - 1)}>‹</IconButton> : null}\n <span aria-live=\"polite\">{item.label}{props.items.length > 1 ? ` · ${index + 1}/${props.items.length}` : \"\"}</span>\n {props.items.length > 1 ? <IconButton label={props.nextLabel} tone=\"ghost\" disabled={index === props.items.length - 1} onClick={() => move(index + 1)}>›</IconButton> : null}\n </div>\n </div></HjmPortal>;\n}\nfunction ViewerImage({ item, loadingLabel, errorLabel, retryLabel }: ImageViewerProps & { item: ImageViewerItem }) {\n const [attempt, setAttempt] = useState(0);\n // A retry retires the whole host, so an old image callback cannot mark a new attempt ready.\n return <ImageAttempt key={attempt} item={item} loadingLabel={loadingLabel} errorLabel={errorLabel} retryLabel={retryLabel} onRetry={() => setAttempt(n => n + 1)} />;\n}\nfunction ImageAttempt({ item, loadingLabel, errorLabel, retryLabel, onRetry }: Pick<ImageViewerProps, 'loadingLabel' | 'errorLabel' | 'retryLabel'> & { item: ImageViewerItem; onRetry: () => void }) {\n const [status, setStatus] = useState<\"loading\" | \"ready\" | \"error\">(\"loading\");\n return <><img src={item.uri} alt={item.label} draggable={false} onLoad={() => setStatus(current => current === 'error' ? current : 'ready')} onError={() => setStatus(\"error\")} />\n {status === \"loading\" ? <span role=\"status\">{loadingLabel}</span> : status === \"error\" ? <div role=\"alert\">{errorLabel}<button type=\"button\" onClick={onRetry}>{retryLabel}</button></div> : null}</>;\n}\n"]}
|
|
@@ -39,6 +39,7 @@ export declare const publicExportEntries: {
|
|
|
39
39
|
readonly Checkbox: readonly ["./selection"];
|
|
40
40
|
readonly CheckboxGroup: readonly ["./selection"];
|
|
41
41
|
readonly Chip: readonly ["./selection"];
|
|
42
|
+
readonly ChoiceRow: readonly ["./choice-row"];
|
|
42
43
|
readonly ClipboardButton: readonly ["./clipboard"];
|
|
43
44
|
readonly ClipboardIconButton: readonly ["./clipboard"];
|
|
44
45
|
readonly CodeBlock: readonly ["./code-block"];
|
|
@@ -94,6 +95,7 @@ export declare const publicExportEntries: {
|
|
|
94
95
|
readonly Image: readonly ["./display"];
|
|
95
96
|
readonly ImageChoiceGroup: readonly ["./image-choice"];
|
|
96
97
|
readonly ImageComparison: readonly ["./image-comparison"];
|
|
98
|
+
readonly ImageViewer: readonly ["./image-viewer"];
|
|
97
99
|
readonly ImmersiveOverlay: readonly ["./overlays"];
|
|
98
100
|
readonly ImportFieldMapping: readonly ["./data-workflows"];
|
|
99
101
|
readonly InlineConfirm: readonly ["./inline-confirm"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-exports.generated.d.ts","sourceRoot":"","sources":["../src/public-exports.generated.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"public-exports.generated.d.ts","sourceRoot":"","sources":["../src/public-exports.generated.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqrBuC,CAAC"}
|
|
@@ -123,6 +123,9 @@ export const publicExportEntries = {
|
|
|
123
123
|
Chip: [
|
|
124
124
|
"./selection"
|
|
125
125
|
],
|
|
126
|
+
ChoiceRow: [
|
|
127
|
+
"./choice-row"
|
|
128
|
+
],
|
|
126
129
|
ClipboardButton: [
|
|
127
130
|
"./clipboard"
|
|
128
131
|
],
|
|
@@ -290,6 +293,9 @@ export const publicExportEntries = {
|
|
|
290
293
|
ImageComparison: [
|
|
291
294
|
"./image-comparison"
|
|
292
295
|
],
|
|
296
|
+
ImageViewer: [
|
|
297
|
+
"./image-viewer"
|
|
298
|
+
],
|
|
293
299
|
ImmersiveOverlay: [
|
|
294
300
|
"./overlays"
|
|
295
301
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-exports.generated.js","sourceRoot":"","sources":["../src/public-exports.generated.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,+FAA+F;AAC/F,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,SAAS,EAAE;QACT,WAAW;KACZ;IACD,eAAe,EAAE;QACf,iBAAiB;KAClB;IACD,YAAY,EAAE;QACZ,iBAAiB;QACjB,YAAY;KACb;IACD,eAAe,EAAE;QACf,oBAAoB;KACrB;IACD,KAAK,EAAE;QACL,SAAS;KACV;IACD,SAAS,EAAE;QACT,aAAa;KACd;IACD,WAAW,EAAE;QACX,YAAY;KACb;IACD,MAAM,EAAE;QACN,UAAU;KACX;IACD,iBAAiB,EAAE;QACjB,oBAAoB;KACrB;IACD,WAAW,EAAE;QACX,UAAU;KACX;IACD,KAAK,EAAE;QACL,SAAS;KACV;IACD,UAAU,EAAE;QACV,SAAS;KACV;IACD,kBAAkB,EAAE;QAClB,mBAAmB;KACpB;IACD,gBAAgB,EAAE;QAChB,eAAe;KAChB;IACD,cAAc,EAAE;QACd,eAAe;KAChB;IACD,gBAAgB,EAAE;QAChB,eAAe;KAChB;IACD,MAAM,EAAE;QACN,WAAW;KACZ;IACD,WAAW,EAAE;QACX,WAAW;KACZ;IACD,KAAK,EAAE;QACL,WAAW;KACZ;IACD,QAAQ,EAAE;QACR,SAAS;KACV;IACD,YAAY,EAAE;QACZ,mBAAmB;KACpB;IACD,SAAS,EAAE;QACT,cAAc;KACf;IACD,UAAU,EAAE;QACV,eAAe;KAChB;IACD,gBAAgB,EAAE;QAChB,cAAc;KACf;IACD,6BAA6B,EAAE;QAC7B,cAAc;KACf;IACD,UAAU,EAAE;QACV,cAAc;QACd,cAAc;KACf;IACD,MAAM,EAAE;QACN,WAAW;KACZ;IACD,UAAU,EAAE;QACV,WAAW;KACZ;IACD,QAAQ,EAAE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,EAAE;QACR,SAAS;KACV;IACD,SAAS,EAAE;QACT,SAAS;KACV;IACD,UAAU,EAAE;QACV,gBAAgB;KACjB;IACD,cAAc,EAAE;QACd,sBAAsB;KACvB;IACD,WAAW,EAAE;QACX,gBAAgB;KACjB;IACD,QAAQ,EAAE;QACR,WAAW;KACZ;IACD,UAAU,EAAE;QACV,eAAe;KAChB;IACD,KAAK,EAAE;QACL,SAAS;KACV;IACD,aAAa,EAAE;QACb,SAAS;KACV;IACD,oBAAoB,EAAE;QACpB,mBAAmB;KACpB;IACD,WAAW,EAAE;QACX,gBAAgB;KACjB;IACD,OAAO,EAAE;QACP,YAAY;KACb;IACD,GAAG,EAAE;QACH,OAAO;KACR;IACD,MAAM,EAAE;QACN,WAAW;KACZ;IACD,IAAI,EAAE;QACJ,QAAQ;KACT;IACD,YAAY,EAAE;QACZ,iBAAiB;KAClB;IACD,YAAY,EAAE;QACZ,iBAAiB;KAClB;IACD,IAAI,EAAE;QACJ,QAAQ;KACT;IACD,eAAe,EAAE;QACf,WAAW;KACZ;IACD,UAAU,EAAE;QACV,eAAe;QACf,WAAW;KACZ;IACD,WAAW,EAAE;QACX,gBAAgB;KACjB;IACD,cAAc,EAAE;QACd,UAAU;KACX;IACD,SAAS,EAAE;QACT,cAAc;KACf;IACD,SAAS,EAAE;QACT,aAAa;KACd;CACoE,CAAC","sourcesContent":["// Generated by scripts/sync-public-component-map.mjs --write. Do not edit by hand.\n// Public value exports per symbol, canonical granular entry first (the root entry is omitted).\nexport const publicExportEntries = {\n Accordion: [\n \"./display\"\n ],\n AccountSwitcher: [\n \"./task-controls\"\n ],\n ActivityChip: [\n \"./activity-chip\",\n \"./feedback\"\n ],\n ActivityHeatmap: [\n \"./activity-heatmap\"\n ],\n Affix: [\n \"./affix\"\n ],\n Agreement: [\n \"./agreement\"\n ],\n AlertDialog: [\n \"./overlays\"\n ],\n Anchor: [\n \"./anchor\"\n ],\n AnimatedStatistic: [\n \"./statistic-motion\"\n ],\n AspectRatio: [\n \"./layout\"\n ],\n Asset: [\n \"./asset\"\n ],\n AssetGroup: [\n \"./asset\"\n ],\n AuthProviderButton: [\n \"./provider-button\"\n ],\n AuthScreenFooter: [\n \"./auth-screen\"\n ],\n AuthScreenHero: [\n \"./auth-screen\"\n ],\n AuthScreenLayout: [\n \"./auth-screen\"\n ],\n Avatar: [\n \"./display\"\n ],\n AvatarGroup: [\n \"./display\"\n ],\n Badge: [\n \"./display\"\n ],\n BarChart: [\n \"./chart\"\n ],\n BezierEditor: [\n \"./authoring-tools\"\n ],\n BottomCTA: [\n \"./bottom-cta\"\n ],\n BottomInfo: [\n \"./bottom-info\"\n ],\n BottomNavigation: [\n \"./navigation\"\n ],\n BottomNavigationInsetProvider: [\n \"./navigation\"\n ],\n Breadcrumb: [\n \"./breadcrumb\",\n \"./navigation\"\n ],\n Button: [\n \"./actions\"\n ],\n ButtonLink: [\n \"./actions\"\n ],\n Calendar: [\n \"./calendar\"\n ],\n Card: [\n \"./display\"\n ],\n Carousel: [\n \"./carousel\"\n ],\n CarouselMotion: [\n \"./carousel-motion\"\n ],\n Celebration: [\n \"./celebration\"\n ],\n ChartLegend: [\n \"./chart\"\n ],\n ChatDateSeparator: [\n \"./screens\"\n ],\n ChatMessage: [\n \"./screens\"\n ],\n ChatScreen: [\n \"./screens\"\n ],\n Checkbox: [\n \"./selection\"\n ],\n CheckboxGroup: [\n \"./selection\"\n ],\n Chip: [\n \"./selection\"\n ],\n ClipboardButton: [\n \"./clipboard\"\n ],\n ClipboardIconButton: [\n \"./clipboard\"\n ],\n CodeBlock: [\n \"./code-block\"\n ],\n CohortRetentionTable: [\n \"./data-workflows\"\n ],\n Collapsible: [\n \"./collapsible\"\n ],\n CollapsibleMarker: [\n \"./collapsible\"\n ],\n CollectionRail: [\n \"./collection-rail\"\n ],\n ColorPicker: [\n \"./color-picker\"\n ],\n Combobox: [\n \"./forms\"\n ],\n CommandPalette: [\n \"./command-palette\"\n ],\n CommentThreadRow: [\n \"./screen-flows\"\n ],\n CommentThreadScreen: [\n \"./screen-flows\"\n ],\n ComparisonTable: [\n \"./data-table\"\n ],\n CompositionLayout: [\n \"./screens\"\n ],\n Container: [\n \"./layout\"\n ],\n ContentTransition: [\n \"./content-transition\"\n ],\n ContextMenu: [\n \"./context-menu\"\n ],\n ConversationRow: [\n \"./conversation-row\"\n ],\n ConversionFunnel: [\n \"./data-workflows\"\n ],\n CorrelationMatrix: [\n \"./data-workflows\"\n ],\n CounterBadge: [\n \"./display\"\n ],\n DataTable: [\n \"./data-table\"\n ],\n DateEntry: [\n \"./date-entry\"\n ],\n DatePicker: [\n \"./date-picker\",\n \"./forms\"\n ],\n DateRangePicker: [\n \"./date-range\"\n ],\n DescriptionList: [\n \"./display\"\n ],\n Dialog: [\n \"./overlays\"\n ],\n Divider: [\n \"./display\"\n ],\n DocumentResource: [\n \"./document-resource\"\n ],\n DurationField: [\n \"./duration-field\"\n ],\n EditorScreen: [\n \"./screen-flows\"\n ],\n EffectSurface: [\n \"./effect-surface\"\n ],\n EmptyState: [\n \"./feedback\"\n ],\n EventAttendanceCard: [\n \"./social-compositions\"\n ],\n ExpandableSearch: [\n \"./communication\"\n ],\n Field: [\n \"./forms\"\n ],\n FieldGroup: [\n \"./field-group\"\n ],\n FilePicker: [\n \"./file-picker\",\n \"./forms\"\n ],\n FilterRecovery: [\n \"./collection-editing\"\n ],\n FloatingActionButton: [\n \"./floating-action-button\"\n ],\n FolderPreview: [\n \"./folder-preview\"\n ],\n FollowProfileCard: [\n \"./social-compositions\"\n ],\n Form: [\n \"./forms\"\n ],\n GravityLetters: [\n \"./gravity-letters\"\n ],\n Grid: [\n \"./layout\"\n ],\n GridReveal: [\n \"./grid-reveal\"\n ],\n Heading: [\n \"./heading\"\n ],\n HistogramExplorer: [\n \"./data-workflows\"\n ],\n HjmProvider: [\n \"./provider\"\n ],\n Icon: [\n \"./display\"\n ],\n IconButton: [\n \"./actions\"\n ],\n IconTile: [\n \"./screens\"\n ],\n Image: [\n \"./display\"\n ],\n ImageChoiceGroup: [\n \"./image-choice\"\n ],\n ImageComparison: [\n \"./image-comparison\"\n ],\n ImmersiveOverlay: [\n \"./overlays\"\n ],\n ImportFieldMapping: [\n \"./data-workflows\"\n ],\n InlineConfirm: [\n \"./inline-confirm\"\n ],\n InlineEdit: [\n \"./collection-editing\"\n ],\n Layout: [\n \"./layout\"\n ],\n LineChart: [\n \"./chart\"\n ],\n LineScore: [\n \"./data-table\"\n ],\n Link: [\n \"./actions\"\n ],\n List: [\n \"./display\"\n ],\n ListDetailScreen: [\n \"./screen-flows\"\n ],\n ListRow: [\n \"./display\"\n ],\n ListSeparator: [\n \"./display\"\n ],\n LoadMore: [\n \"./navigation\"\n ],\n Masonry: [\n \"./masonry\"\n ],\n MatrixTable: [\n \"./data-table\"\n ],\n MediaAlbumPageStatus: [\n \"./screens\"\n ],\n MediaSelectionCell: [\n \"./screen-flows\"\n ],\n MediaSelectionScreen: [\n \"./screen-flows\"\n ],\n MediaTransport: [\n \"./media-transport\"\n ],\n Mentions: [\n \"./mentions\"\n ],\n Menu: [\n \"./overlays\"\n ],\n Menubar: [\n \"./menubar\"\n ],\n MessageComposer: [\n \"./screens\"\n ],\n ModerationForm: [\n \"./screen-flows\"\n ],\n ModerationScreen: [\n \"./screen-flows\"\n ],\n MorphingMenu: [\n \"./menu-morph\"\n ],\n NativeSelect: [\n \"./forms\"\n ],\n NavigationBar: [\n \"./navigation-bar\"\n ],\n Notice: [\n \"./feedback\"\n ],\n NotificationBell: [\n \"./notification-bell\"\n ],\n NotificationInboxScreen: [\n \"./screens\"\n ],\n NotificationItem: [\n \"./screens\"\n ],\n NotificationRow: [\n \"./screens\"\n ],\n NumberField: [\n \"./number-field\",\n \"./forms\"\n ],\n OnboardingScreen: [\n \"./screen-flows\"\n ],\n OtpField: [\n \"./otp-field\",\n \"./forms\"\n ],\n OverlayStackProvider: [\n \"./overlay-stack\"\n ],\n OverviewScreen: [\n \"./design-profile\"\n ],\n PageIndicator: [\n \"./carousel\"\n ],\n Pagination: [\n \"./pagination\",\n \"./navigation\"\n ],\n PasswordField: [\n \"./password-field\",\n \"./forms\"\n ],\n PasswordRulesField: [\n \"./task-controls\"\n ],\n PendingContent: [\n \"./feedback\"\n ],\n PermissionScreen: [\n \"./screen-flows\"\n ],\n PhotoSourceSheet: [\n \"./screen-flows\"\n ],\n PieChart: [\n \"./chart\"\n ],\n Popover: [\n \"./popover\"\n ],\n PricingChoice: [\n \"./task-controls\"\n ],\n ProfileScreen: [\n \"./screen-flows\"\n ],\n ProfileSummary: [\n \"./screen-flows\"\n ],\n Progress: [\n \"./feedback\"\n ],\n ProgressiveBlur: [\n \"./progressive-blur\"\n ],\n QRCode: [\n \"./qr-code\"\n ],\n QuoteCard: [\n \"./display\"\n ],\n RadarChart: [\n \"./chart\"\n ],\n Radio: [\n \"./selection\"\n ],\n RadioGroup: [\n \"./selection\"\n ],\n Rating: [\n \"./rating\"\n ],\n ReactionPicker: [\n \"./reaction-picker\"\n ],\n RepeatableFieldGroup: [\n \"./collection-editing\"\n ],\n ReplyComposer: [\n \"./communication\"\n ],\n ReplyMessage: [\n \"./communication\"\n ],\n Result: [\n \"./feedback\"\n ],\n SavedItemsScreen: [\n \"./saved-items\"\n ],\n ScatterChart: [\n \"./chart\"\n ],\n ScreenLayout: [\n \"./screens\"\n ],\n ScrollProgress: [\n \"./scroll-progress\"\n ],\n SearchField: [\n \"./forms\"\n ],\n SearchScreen: [\n \"./screen-flows\"\n ],\n Section: [\n \"./layout\"\n ],\n SegmentedControl: [\n \"./selection\"\n ],\n Select: [\n \"./forms\"\n ],\n SelectionActionBar: [\n \"./collection-editing\"\n ],\n SettingsScreen: [\n \"./screens\"\n ],\n Sheet: [\n \"./overlays\"\n ],\n ShortcutRail: [\n \"./shortcut-rail\"\n ],\n ShortcutRecorder: [\n \"./authoring-tools\"\n ],\n Sidebar: [\n \"./sidebar\"\n ],\n SidePanel: [\n \"./side-panel\"\n ],\n Skeleton: [\n \"./feedback\"\n ],\n SkipNav: [\n \"./skip-nav\"\n ],\n Slider: [\n \"./slider\",\n \"./forms\"\n ],\n SortableCollection: [\n \"./sortable\"\n ],\n Sparkline: [\n \"./chart\"\n ],\n Spinner: [\n \"./feedback\"\n ],\n SplitAction: [\n \"./task-controls\"\n ],\n Splitter: [\n \"./splitter\"\n ],\n Stack: [\n \"./layout\"\n ],\n Statistic: [\n \"./display\"\n ],\n StatisticGroup: [\n \"./display\"\n ],\n StatusText: [\n \"./status-text\"\n ],\n StepPlayer: [\n \"./step-player\"\n ],\n Steps: [\n \"./steps\",\n \"./navigation\"\n ],\n StreamingAnswer: [\n \"./streaming-answer\"\n ],\n Surface: [\n \"./layout\"\n ],\n SwipeActions: [\n \"./swipe-actions\"\n ],\n Switch: [\n \"./selection\"\n ],\n Table: [\n \"./display\"\n ],\n TableColumnSettings: [\n \"./collection-editing\"\n ],\n TabPanel: [\n \"./navigation\"\n ],\n Tabs: [\n \"./navigation\"\n ],\n Tag: [\n \"./display\"\n ],\n TagsInput: [\n \"./tags-input\"\n ],\n TargetSummary: [\n \"./data-workflows\"\n ],\n TaskList: [\n \"./task-list\"\n ],\n Text: [\n \"./layout\"\n ],\n TextArea: [\n \"./forms\"\n ],\n TextField: [\n \"./forms\"\n ],\n TextFormat: [\n \"./text-formats\"\n ],\n TextTransition: [\n \"./content-transition\"\n ],\n ThinkingOrb: [\n \"./thinking-orb\"\n ],\n Timeline: [\n \"./display\"\n ],\n TimePicker: [\n \"./time-picker\"\n ],\n Toast: [\n \"./toast\"\n ],\n ToastProvider: [\n \"./toast\"\n ],\n ToggleFeedbackButton: [\n \"./toggle-feedback\"\n ],\n ToggleGroup: [\n \"./toggle-group\"\n ],\n Tooltip: [\n \"./overlays\"\n ],\n Top: [\n \"./top\"\n ],\n TopBar: [\n \"./top-bar\"\n ],\n Tour: [\n \"./tour\"\n ],\n TransferList: [\n \"./transfer-list\"\n ],\n TransferTask: [\n \"./transfer-task\"\n ],\n Tree: [\n \"./tree\"\n ],\n TypingIndicator: [\n \"./screens\"\n ],\n UploadItem: [\n \"./upload-item\",\n \"./display\"\n ],\n VirtualList: [\n \"./virtual-list\"\n ],\n VisuallyHidden: [\n \"./layout\"\n ],\n VoiceNote: [\n \"./voice-note\"\n ],\n Watermark: [\n \"./watermark\"\n ]\n} as const satisfies Readonly<Record<string, readonly `./${string}`[]>>;\n"]}
|
|
1
|
+
{"version":3,"file":"public-exports.generated.js","sourceRoot":"","sources":["../src/public-exports.generated.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,+FAA+F;AAC/F,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,SAAS,EAAE;QACT,WAAW;KACZ;IACD,eAAe,EAAE;QACf,iBAAiB;KAClB;IACD,YAAY,EAAE;QACZ,iBAAiB;QACjB,YAAY;KACb;IACD,eAAe,EAAE;QACf,oBAAoB;KACrB;IACD,KAAK,EAAE;QACL,SAAS;KACV;IACD,SAAS,EAAE;QACT,aAAa;KACd;IACD,WAAW,EAAE;QACX,YAAY;KACb;IACD,MAAM,EAAE;QACN,UAAU;KACX;IACD,iBAAiB,EAAE;QACjB,oBAAoB;KACrB;IACD,WAAW,EAAE;QACX,UAAU;KACX;IACD,KAAK,EAAE;QACL,SAAS;KACV;IACD,UAAU,EAAE;QACV,SAAS;KACV;IACD,kBAAkB,EAAE;QAClB,mBAAmB;KACpB;IACD,gBAAgB,EAAE;QAChB,eAAe;KAChB;IACD,cAAc,EAAE;QACd,eAAe;KAChB;IACD,gBAAgB,EAAE;QAChB,eAAe;KAChB;IACD,MAAM,EAAE;QACN,WAAW;KACZ;IACD,WAAW,EAAE;QACX,WAAW;KACZ;IACD,KAAK,EAAE;QACL,WAAW;KACZ;IACD,QAAQ,EAAE;QACR,SAAS;KACV;IACD,YAAY,EAAE;QACZ,mBAAmB;KACpB;IACD,SAAS,EAAE;QACT,cAAc;KACf;IACD,UAAU,EAAE;QACV,eAAe;KAChB;IACD,gBAAgB,EAAE;QAChB,cAAc;KACf;IACD,6BAA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cAAc;KACf;IACD,IAAI,EAAE;QACJ,cAAc;KACf;IACD,GAAG,EAAE;QACH,WAAW;KACZ;IACD,SAAS,EAAE;QACT,cAAc;KACf;IACD,aAAa,EAAE;QACb,kBAAkB;KACnB;IACD,QAAQ,EAAE;QACR,aAAa;KACd;IACD,IAAI,EAAE;QACJ,UAAU;KACX;IACD,QAAQ,EAAE;QACR,SAAS;KACV;IACD,SAAS,EAAE;QACT,SAAS;KACV;IACD,UAAU,EAAE;QACV,gBAAgB;KACjB;IACD,cAAc,EAAE;QACd,sBAAsB;KACvB;IACD,WAAW,EAAE;QACX,gBAAgB;KACjB;IACD,QAAQ,EAAE;QACR,WAAW;KACZ;IACD,UAAU,EAAE;QACV,eAAe;KAChB;IACD,KAAK,EAAE;QACL,SAAS;KACV;IACD,aAAa,EAAE;QACb,SAAS;KACV;IACD,oBAAoB,EAAE;QACpB,mBAAmB;KACpB;IACD,WAAW,EAAE;QACX,gBAAgB;KACjB;IACD,OAAO,EAAE;QACP,YAAY;KACb;IACD,GAAG,EAAE;QACH,OAAO;KACR;IACD,MAAM,EAAE;QACN,WAAW;KACZ;IACD,IAAI,EAAE;QACJ,QAAQ;KACT;IACD,YAAY,EAAE;QACZ,iBAAiB;KAClB;IACD,YAAY,EAAE;QACZ,iBAAiB;KAClB;IACD,IAAI,EAAE;QACJ,QAAQ;KACT;IACD,eAAe,EAAE;QACf,WAAW;KACZ;IACD,UAAU,EAAE;QACV,eAAe;QACf,WAAW;KACZ;IACD,WAAW,EAAE;QACX,gBAAgB;KACjB;IACD,cAAc,EAAE;QACd,UAAU;KACX;IACD,SAAS,EAAE;QACT,cAAc;KACf;IACD,SAAS,EAAE;QACT,aAAa;KACd;CACoE,CAAC","sourcesContent":["// Generated by scripts/sync-public-component-map.mjs --write. Do not edit by hand.\n// Public value exports per symbol, canonical granular entry first (the root entry is omitted).\nexport const publicExportEntries = {\n Accordion: [\n \"./display\"\n ],\n AccountSwitcher: [\n \"./task-controls\"\n ],\n ActivityChip: [\n \"./activity-chip\",\n \"./feedback\"\n ],\n ActivityHeatmap: [\n \"./activity-heatmap\"\n ],\n Affix: [\n \"./affix\"\n ],\n Agreement: [\n \"./agreement\"\n ],\n AlertDialog: [\n \"./overlays\"\n ],\n Anchor: [\n \"./anchor\"\n ],\n AnimatedStatistic: [\n \"./statistic-motion\"\n ],\n AspectRatio: [\n \"./layout\"\n ],\n Asset: [\n \"./asset\"\n ],\n AssetGroup: [\n \"./asset\"\n ],\n AuthProviderButton: [\n \"./provider-button\"\n ],\n AuthScreenFooter: [\n \"./auth-screen\"\n ],\n AuthScreenHero: [\n \"./auth-screen\"\n ],\n AuthScreenLayout: [\n \"./auth-screen\"\n ],\n Avatar: [\n \"./display\"\n ],\n AvatarGroup: [\n \"./display\"\n ],\n Badge: [\n \"./display\"\n ],\n BarChart: [\n \"./chart\"\n ],\n BezierEditor: [\n \"./authoring-tools\"\n ],\n BottomCTA: [\n \"./bottom-cta\"\n ],\n BottomInfo: [\n \"./bottom-info\"\n ],\n BottomNavigation: [\n \"./navigation\"\n ],\n BottomNavigationInsetProvider: [\n \"./navigation\"\n ],\n Breadcrumb: [\n \"./breadcrumb\",\n \"./navigation\"\n ],\n Button: [\n \"./actions\"\n ],\n ButtonLink: [\n \"./actions\"\n ],\n Calendar: [\n \"./calendar\"\n ],\n Card: [\n \"./display\"\n ],\n Carousel: [\n \"./carousel\"\n ],\n CarouselMotion: [\n \"./carousel-motion\"\n ],\n Celebration: [\n \"./celebration\"\n ],\n ChartLegend: [\n \"./chart\"\n ],\n ChatDateSeparator: [\n \"./screens\"\n ],\n ChatMessage: [\n \"./screens\"\n ],\n ChatScreen: [\n \"./screens\"\n ],\n Checkbox: [\n \"./selection\"\n ],\n CheckboxGroup: [\n \"./selection\"\n ],\n Chip: [\n \"./selection\"\n ],\n ChoiceRow: [\n \"./choice-row\"\n ],\n ClipboardButton: [\n \"./clipboard\"\n ],\n ClipboardIconButton: [\n \"./clipboard\"\n ],\n CodeBlock: [\n \"./code-block\"\n ],\n CohortRetentionTable: [\n \"./data-workflows\"\n ],\n Collapsible: [\n \"./collapsible\"\n ],\n CollapsibleMarker: [\n \"./collapsible\"\n ],\n CollectionRail: [\n \"./collection-rail\"\n ],\n ColorPicker: [\n \"./color-picker\"\n ],\n Combobox: [\n \"./forms\"\n ],\n CommandPalette: [\n \"./command-palette\"\n ],\n CommentThreadRow: [\n \"./screen-flows\"\n ],\n CommentThreadScreen: [\n \"./screen-flows\"\n ],\n ComparisonTable: [\n \"./data-table\"\n ],\n CompositionLayout: [\n \"./screens\"\n ],\n Container: [\n \"./layout\"\n ],\n ContentTransition: [\n \"./content-transition\"\n ],\n ContextMenu: [\n \"./context-menu\"\n ],\n ConversationRow: [\n \"./conversation-row\"\n ],\n ConversionFunnel: [\n \"./data-workflows\"\n ],\n CorrelationMatrix: [\n \"./data-workflows\"\n ],\n CounterBadge: [\n \"./display\"\n ],\n DataTable: [\n \"./data-table\"\n ],\n DateEntry: [\n \"./date-entry\"\n ],\n DatePicker: [\n \"./date-picker\",\n \"./forms\"\n ],\n DateRangePicker: [\n \"./date-range\"\n ],\n DescriptionList: [\n \"./display\"\n ],\n Dialog: [\n \"./overlays\"\n ],\n Divider: [\n \"./display\"\n ],\n DocumentResource: [\n \"./document-resource\"\n ],\n DurationField: [\n \"./duration-field\"\n ],\n EditorScreen: [\n \"./screen-flows\"\n ],\n EffectSurface: [\n \"./effect-surface\"\n ],\n EmptyState: [\n \"./feedback\"\n ],\n EventAttendanceCard: [\n \"./social-compositions\"\n ],\n ExpandableSearch: [\n \"./communication\"\n ],\n Field: [\n \"./forms\"\n ],\n FieldGroup: [\n \"./field-group\"\n ],\n FilePicker: [\n \"./file-picker\",\n \"./forms\"\n ],\n FilterRecovery: [\n \"./collection-editing\"\n ],\n FloatingActionButton: [\n \"./floating-action-button\"\n ],\n FolderPreview: [\n \"./folder-preview\"\n ],\n FollowProfileCard: [\n \"./social-compositions\"\n ],\n Form: [\n \"./forms\"\n ],\n GravityLetters: [\n \"./gravity-letters\"\n ],\n Grid: [\n \"./layout\"\n ],\n GridReveal: [\n \"./grid-reveal\"\n ],\n Heading: [\n \"./heading\"\n ],\n HistogramExplorer: [\n \"./data-workflows\"\n ],\n HjmProvider: [\n \"./provider\"\n ],\n Icon: [\n \"./display\"\n ],\n IconButton: [\n \"./actions\"\n ],\n IconTile: [\n \"./screens\"\n ],\n Image: [\n \"./display\"\n ],\n ImageChoiceGroup: [\n \"./image-choice\"\n ],\n ImageComparison: [\n \"./image-comparison\"\n ],\n ImageViewer: [\n \"./image-viewer\"\n ],\n ImmersiveOverlay: [\n \"./overlays\"\n ],\n ImportFieldMapping: [\n \"./data-workflows\"\n ],\n InlineConfirm: [\n \"./inline-confirm\"\n ],\n InlineEdit: [\n \"./collection-editing\"\n ],\n Layout: [\n \"./layout\"\n ],\n LineChart: [\n \"./chart\"\n ],\n LineScore: [\n \"./data-table\"\n ],\n Link: [\n \"./actions\"\n ],\n List: [\n \"./display\"\n ],\n ListDetailScreen: [\n \"./screen-flows\"\n ],\n ListRow: [\n \"./display\"\n ],\n ListSeparator: [\n \"./display\"\n ],\n LoadMore: [\n \"./navigation\"\n ],\n Masonry: [\n \"./masonry\"\n ],\n MatrixTable: [\n \"./data-table\"\n ],\n MediaAlbumPageStatus: [\n \"./screens\"\n ],\n MediaSelectionCell: [\n \"./screen-flows\"\n ],\n MediaSelectionScreen: [\n \"./screen-flows\"\n ],\n MediaTransport: [\n \"./media-transport\"\n ],\n Mentions: [\n \"./mentions\"\n ],\n Menu: [\n \"./overlays\"\n ],\n Menubar: [\n \"./menubar\"\n ],\n MessageComposer: [\n \"./screens\"\n ],\n ModerationForm: [\n \"./screen-flows\"\n ],\n ModerationScreen: [\n \"./screen-flows\"\n ],\n MorphingMenu: [\n \"./menu-morph\"\n ],\n NativeSelect: [\n \"./forms\"\n ],\n NavigationBar: [\n \"./navigation-bar\"\n ],\n Notice: [\n \"./feedback\"\n ],\n NotificationBell: [\n \"./notification-bell\"\n ],\n NotificationInboxScreen: [\n \"./screens\"\n ],\n NotificationItem: [\n \"./screens\"\n ],\n NotificationRow: [\n \"./screens\"\n ],\n NumberField: [\n \"./number-field\",\n \"./forms\"\n ],\n OnboardingScreen: [\n \"./screen-flows\"\n ],\n OtpField: [\n \"./otp-field\",\n \"./forms\"\n ],\n OverlayStackProvider: [\n \"./overlay-stack\"\n ],\n OverviewScreen: [\n \"./design-profile\"\n ],\n PageIndicator: [\n \"./carousel\"\n ],\n Pagination: [\n \"./pagination\",\n \"./navigation\"\n ],\n PasswordField: [\n \"./password-field\",\n \"./forms\"\n ],\n PasswordRulesField: [\n \"./task-controls\"\n ],\n PendingContent: [\n \"./feedback\"\n ],\n PermissionScreen: [\n \"./screen-flows\"\n ],\n PhotoSourceSheet: [\n \"./screen-flows\"\n ],\n PieChart: [\n \"./chart\"\n ],\n Popover: [\n \"./popover\"\n ],\n PricingChoice: [\n \"./task-controls\"\n ],\n ProfileScreen: [\n \"./screen-flows\"\n ],\n ProfileSummary: [\n \"./screen-flows\"\n ],\n Progress: [\n \"./feedback\"\n ],\n ProgressiveBlur: [\n \"./progressive-blur\"\n ],\n QRCode: [\n \"./qr-code\"\n ],\n QuoteCard: [\n \"./display\"\n ],\n RadarChart: [\n \"./chart\"\n ],\n Radio: [\n \"./selection\"\n ],\n RadioGroup: [\n \"./selection\"\n ],\n Rating: [\n \"./rating\"\n ],\n ReactionPicker: [\n \"./reaction-picker\"\n ],\n RepeatableFieldGroup: [\n \"./collection-editing\"\n ],\n ReplyComposer: [\n \"./communication\"\n ],\n ReplyMessage: [\n \"./communication\"\n ],\n Result: [\n \"./feedback\"\n ],\n SavedItemsScreen: [\n \"./saved-items\"\n ],\n ScatterChart: [\n \"./chart\"\n ],\n ScreenLayout: [\n \"./screens\"\n ],\n ScrollProgress: [\n \"./scroll-progress\"\n ],\n SearchField: [\n \"./forms\"\n ],\n SearchScreen: [\n \"./screen-flows\"\n ],\n Section: [\n \"./layout\"\n ],\n SegmentedControl: [\n \"./selection\"\n ],\n Select: [\n \"./forms\"\n ],\n SelectionActionBar: [\n \"./collection-editing\"\n ],\n SettingsScreen: [\n \"./screens\"\n ],\n Sheet: [\n \"./overlays\"\n ],\n ShortcutRail: [\n \"./shortcut-rail\"\n ],\n ShortcutRecorder: [\n \"./authoring-tools\"\n ],\n Sidebar: [\n \"./sidebar\"\n ],\n SidePanel: [\n \"./side-panel\"\n ],\n Skeleton: [\n \"./feedback\"\n ],\n SkipNav: [\n \"./skip-nav\"\n ],\n Slider: [\n \"./slider\",\n \"./forms\"\n ],\n SortableCollection: [\n \"./sortable\"\n ],\n Sparkline: [\n \"./chart\"\n ],\n Spinner: [\n \"./feedback\"\n ],\n SplitAction: [\n \"./task-controls\"\n ],\n Splitter: [\n \"./splitter\"\n ],\n Stack: [\n \"./layout\"\n ],\n Statistic: [\n \"./display\"\n ],\n StatisticGroup: [\n \"./display\"\n ],\n StatusText: [\n \"./status-text\"\n ],\n StepPlayer: [\n \"./step-player\"\n ],\n Steps: [\n \"./steps\",\n \"./navigation\"\n ],\n StreamingAnswer: [\n \"./streaming-answer\"\n ],\n Surface: [\n \"./layout\"\n ],\n SwipeActions: [\n \"./swipe-actions\"\n ],\n Switch: [\n \"./selection\"\n ],\n Table: [\n \"./display\"\n ],\n TableColumnSettings: [\n \"./collection-editing\"\n ],\n TabPanel: [\n \"./navigation\"\n ],\n Tabs: [\n \"./navigation\"\n ],\n Tag: [\n \"./display\"\n ],\n TagsInput: [\n \"./tags-input\"\n ],\n TargetSummary: [\n \"./data-workflows\"\n ],\n TaskList: [\n \"./task-list\"\n ],\n Text: [\n \"./layout\"\n ],\n TextArea: [\n \"./forms\"\n ],\n TextField: [\n \"./forms\"\n ],\n TextFormat: [\n \"./text-formats\"\n ],\n TextTransition: [\n \"./content-transition\"\n ],\n ThinkingOrb: [\n \"./thinking-orb\"\n ],\n Timeline: [\n \"./display\"\n ],\n TimePicker: [\n \"./time-picker\"\n ],\n Toast: [\n \"./toast\"\n ],\n ToastProvider: [\n \"./toast\"\n ],\n ToggleFeedbackButton: [\n \"./toggle-feedback\"\n ],\n ToggleGroup: [\n \"./toggle-group\"\n ],\n Tooltip: [\n \"./overlays\"\n ],\n Top: [\n \"./top\"\n ],\n TopBar: [\n \"./top-bar\"\n ],\n Tour: [\n \"./tour\"\n ],\n TransferList: [\n \"./transfer-list\"\n ],\n TransferTask: [\n \"./transfer-task\"\n ],\n Tree: [\n \"./tree\"\n ],\n TypingIndicator: [\n \"./screens\"\n ],\n UploadItem: [\n \"./upload-item\",\n \"./display\"\n ],\n VirtualList: [\n \"./virtual-list\"\n ],\n VisuallyHidden: [\n \"./layout\"\n ],\n VoiceNote: [\n \"./voice-note\"\n ],\n Watermark: [\n \"./watermark\"\n ]\n} as const satisfies Readonly<Record<string, readonly `./${string}`[]>>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reaction-picker.d.ts","sourceRoot":"","sources":["../src/reaction-picker.tsx"],"names":[],"mappings":"AACA,OAAO,EAA2D,KAAK,mBAAmB,EAAE,KAAK,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAE3J,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,uBAAuB,CAAC;IAAC,IAAI,CAAC,EAAE,mBAAmB,CAAA;CAAE,CAAC,CAAC;AACzR,gFAAgF;AAChF,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,QAAgB,EAAE,MAAe,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,mBAAmB,+
|
|
1
|
+
{"version":3,"file":"reaction-picker.d.ts","sourceRoot":"","sources":["../src/reaction-picker.tsx"],"names":[],"mappings":"AACA,OAAO,EAA2D,KAAK,mBAAmB,EAAE,KAAK,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAE3J,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,uBAAuB,CAAC;IAAC,IAAI,CAAC,EAAE,mBAAmB,CAAA;CAAE,CAAC,CAAC;AACzR,gFAAgF;AAChF,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,QAAgB,EAAE,MAAe,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,mBAAmB,+BA6BjJ"}
|
package/dist/reaction-picker.js
CHANGED
|
@@ -11,10 +11,8 @@ export function ReactionPicker({ label, options, value, onValueChange, disabled
|
|
|
11
11
|
const all = resolveReactionOptions(options, more);
|
|
12
12
|
validateReactions(all, value);
|
|
13
13
|
const showingAll = expanded && !!more;
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
// border and accent fill when chosen — with toggle-button semantics (aria-pressed), matching Native. The strip
|
|
17
|
-
// layout keeps ghost Buttons because the message bubble supplies its surface (2026-10-17 review).
|
|
14
|
+
// Wrap reactions keep Chip's compact frame for counted emoji; strip reactions use ghost Buttons.
|
|
15
|
+
// Both resolve the same neutral selected surface because emoji cannot communicate a text-color change.
|
|
18
16
|
const chips = layout === "wrap";
|
|
19
17
|
const visible = showingAll ? all : options;
|
|
20
18
|
const choose = (id) => { if (!disabled) {
|