@hjmds/react 0.9.4 → 0.9.5
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/actions.d.ts +14 -1
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +2 -2
- package/dist/actions.js.map +1 -1
- package/dist/advanced-display.d.ts +3 -0
- package/dist/advanced-display.d.ts.map +1 -1
- package/dist/advanced-display.js +2 -1
- package/dist/advanced-display.js.map +1 -1
- package/dist/display.d.ts +5 -1
- package/dist/display.d.ts.map +1 -1
- package/dist/display.js +7 -2
- package/dist/display.js.map +1 -1
- package/dist/evidence.d.ts +1 -1
- package/dist/evidence.js +1 -1
- package/dist/evidence.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/layout.d.ts.map +1 -1
- package/dist/layout.js +1 -0
- package/dist/layout.js.map +1 -1
- package/dist/provider.d.ts +14 -0
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +3 -2
- package/dist/provider.js.map +1 -1
- package/dist/selection.d.ts +6 -2
- package/dist/selection.d.ts.map +1 -1
- package/dist/selection.js +3 -3
- package/dist/selection.js.map +1 -1
- package/dist/styles.css +46 -8
- package/dist/theme.d.ts +1 -1
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +23 -1
- package/dist/theme.js.map +1 -1
- package/package.json +2 -2
package/dist/evidence.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidence.js","sourceRoot":"","sources":["../src/evidence.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAU,CAAC;AA6B7D,SAAS,YAAY,CACnB,WAAmB,EACnB,WAA8B,EAC9B,OAAsB;IAEtB,MAAM,SAAS,GAAG;QAChB,SAAS;QACT,MAAM;QACN,WAAW;QACX,YAAY;QACZ,KAAK;QACL,gBAAgB;QAChB,eAAe;KACP,CAAC;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BAAiB,EAAE,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC;QAC/D,YAAY,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;KAC7C;CAC+C,CAAC","sourcesContent":["import type { ShowcaseScenarioId } from \"@hjmds/design-contracts/showcase\";\n\nexport const reactRendererEvidenceSchemaVersion = 2 as const;\n\nexport type ReactRendererEvidenceScenario = Exclude<ShowcaseScenarioId, \"contract\">;\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\nfunction defaultClaim(\n componentId: string,\n exportNames: readonly string[],\n subpath: `./${string}`,\n): ReactRendererEvidenceComponent {\n const scenarios = [\n \"default\",\n \"dark\",\n \"long-copy\",\n \"large-text\",\n \"rtl\",\n \"reduced-motion\",\n \"accessibility\",\n ] as const;\n return {\n componentId,\n exportNames,\n subpath,\n scenarios,\n proofs: [{\n scenarios,\n file: \"test/default-render.ssr.test.tsx\",\n caseId: componentId,\n }],\n };\n}\n\nfunction stableFieldClaim(\n exportNames: readonly string[],\n subpath: `./${string}`,\n): ReactRendererEvidenceComponent {\n const base = defaultClaim(\"field\", exportNames, subpath);\n return {\n ...base,\n scenarios: [...base.scenarios, \"keyboard\"],\n proofs: [\n ...base.proofs,\n {\n scenarios: [\"keyboard\"],\n file: \"test/stable-core.browser.test.tsx\",\n caseId: \"field\",\n },\n ],\n };\n}\n\n/**\n * First-party Web renderer claims. Scenario axes remain fail-closed: this\n * manifest claims a table-driven environment/accessibility smoke matrix.\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: \"0.9.4\",\n surface: \"web\",\n components: [\n defaultClaim(\"design-system-provider\", [\"HjmProvider\", \"useHjmTheme\"], \"./provider\"),\n defaultClaim(\"text\", [\"Text\"], \"./layout\"),\n defaultClaim(\"surface\", [\"Surface\"], \"./layout\"),\n defaultClaim(\"icon\", [\"Icon\"], \"./display\"),\n defaultClaim(\"stack\", [\"Stack\"], \"./layout\"),\n defaultClaim(\"container\", [\"Container\"], \"./layout\"),\n defaultClaim(\"aspect-ratio\", [\"AspectRatio\"], \"./layout\"),\n defaultClaim(\"grid\", [\"Grid\"], \"./layout\"),\n defaultClaim(\"layout\", [\"Layout\"], \"./layout\"),\n defaultClaim(\"button\", [\"Button\"], \"./actions\"),\n defaultClaim(\"icon-button\", [\"IconButton\"], \"./actions\"),\n defaultClaim(\"link\", [\"Link\"], \"./actions\"),\n stableFieldClaim([\"Field\", \"TextField\"], \"./forms\"),\n defaultClaim(\"search-field\", [\"SearchField\"], \"./forms\"),\n defaultClaim(\"text-area\", [\"TextArea\"], \"./forms\"),\n defaultClaim(\"password-field\", [\"PasswordField\"], \"./password-field\"),\n defaultClaim(\"otp-field\", [\"OtpField\"], \"./otp-field\"),\n defaultClaim(\"number-field\", [\"NumberField\"], \"./number-field\"),\n defaultClaim(\"slider\", [\"Slider\"], \"./slider\"),\n defaultClaim(\"form\", [\"Form\"], \"./forms\"),\n defaultClaim(\"date-picker\", [\"DatePicker\"], \"./date-picker\"),\n defaultClaim(\"file-picker\", [\"FilePicker\"], \"./file-picker\"),\n defaultClaim(\"checkbox\", [\"Checkbox\"], \"./selection\"),\n defaultClaim(\"radio\", [\"Radio\"], \"./selection\"),\n defaultClaim(\"checkbox-group\", [\"CheckboxGroup\"], \"./selection\"),\n defaultClaim(\"radio-group\", [\"RadioGroup\"], \"./selection\"),\n defaultClaim(\"switch\", [\"Switch\"], \"./selection\"),\n defaultClaim(\"segmented-control\", [\"SegmentedControl\"], \"./selection\"),\n defaultClaim(\"chip\", [\"Chip\"], \"./selection\"),\n defaultClaim(\"tabs\", [\"Tabs\"], \"./navigation\"),\n defaultClaim(\"bottom-navigation\", [\"BottomNavigation\"], \"./navigation\"),\n defaultClaim(\"load-more\", [\"LoadMore\"], \"./navigation\"),\n defaultClaim(\"steps\", [\"Steps\"], \"./steps\"),\n defaultClaim(\"badge\", [\"Badge\"], \"./display\"),\n defaultClaim(\"avatar\", [\"Avatar\"], \"./display\"),\n defaultClaim(\"counter-badge\", [\"CounterBadge\"], \"./display\"),\n defaultClaim(\"card\", [\"Card\"], \"./display\"),\n defaultClaim(\"list\", [\"List\"], \"./display\"),\n defaultClaim(\"list-row\", [\"ListRow\"], \"./display\"),\n defaultClaim(\"tag\", [\"Tag\"], \"./display\"),\n defaultClaim(\"accordion\", [\"Accordion\"], \"./display\"),\n defaultClaim(\"divider\", [\"Divider\"], \"./display\"),\n defaultClaim(\"statistic\", [\"Statistic\", \"StatisticGroup\"], \"./display\"),\n defaultClaim(\"section\", [\"Section\"], \"./layout\"),\n defaultClaim(\"upload-item\", [\"UploadItem\"], \"./upload-item\"),\n defaultClaim(\"timeline\", [\"Timeline\"], \"./display\"),\n defaultClaim(\"description-list\", [\"DescriptionList\"], \"./display\"),\n defaultClaim(\"image\", [\"Image\"], \"./display\"),\n defaultClaim(\"empty-state\", [\"EmptyState\"], \"./feedback\"),\n defaultClaim(\"notice\", [\"Notice\"], \"./feedback\"),\n defaultClaim(\"progress\", [\"Progress\"], \"./feedback\"),\n defaultClaim(\"spinner\", [\"Spinner\"], \"./feedback\"),\n defaultClaim(\"skeleton\", [\"Skeleton\"], \"./feedback\"),\n defaultClaim(\"result\", [\"Result\"], \"./feedback\"),\n defaultClaim(\"toast\", [\"Toast\", \"ToastProvider\", \"useToast\"], \"./toast\"),\n defaultClaim(\"select\", [\"Select\"], \"./forms\"),\n defaultClaim(\"combobox\", [\"Combobox\"], \"./forms\"),\n defaultClaim(\"dialog\", [\"Dialog\"], \"./overlays\"),\n defaultClaim(\"alert-dialog\", [\"AlertDialog\"], \"./overlays\"),\n defaultClaim(\"sheet\", [\"Sheet\"], \"./overlays\"),\n defaultClaim(\"tooltip\", [\"Tooltip\"], \"./overlays\"),\n defaultClaim(\"visually-hidden\", [\"VisuallyHidden\"], \"./layout\"),\n defaultClaim(\"menu\", [\"Menu\"], \"./overlays\"),\n ],\n} as const satisfies ReactRendererEvidenceManifest;\n"]}
|
|
1
|
+
{"version":3,"file":"evidence.js","sourceRoot":"","sources":["../src/evidence.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAU,CAAC;AA6B7D,SAAS,YAAY,CACnB,WAAmB,EACnB,WAA8B,EAC9B,OAAsB;IAEtB,MAAM,SAAS,GAAG;QAChB,SAAS;QACT,MAAM;QACN,WAAW;QACX,YAAY;QACZ,KAAK;QACL,gBAAgB;QAChB,eAAe;KACP,CAAC;IACX,OAAO;QACL,WAAW;QACX,WAAW;QACX,OAAO;QACP,SAAS;QACT,MAAM,EAAE,CAAC;gBACP,SAAS;gBACT,IAAI,EAAE,kCAAkC;gBACxC,MAAM,EAAE,WAAW;aACpB,CAAC;KACH,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CACvB,WAA8B,EAC9B,OAAsB;IAEtB,MAAM,IAAI,GAAG,YAAY,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IACzD,OAAO;QACL,GAAG,IAAI;QACP,SAAS,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;QAC1C,MAA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EAAE,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;QAChD,YAAY,CAAC,UAAU,EAAE,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC;QACpD,YAAY,CAAC,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,YAAY,CAAC;QAClD,YAAY,CAAC,UAAU,EAAE,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC;QACpD,YAAY,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;QAChD,YAAY,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,UAAU,CAAC,EAAE,SAAS,CAAC;QACxE,YAAY,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;QAC7C,YAAY,CAAC,UAAU,EAAE,CAAC,UAAU,CAAC,EAAE,SAAS,CAAC;QACjD,YAAY,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;QAChD,YAAY,CAAC,cAAc,EAAE,CAAC,aAAa,CAAC,EAAE,YAAY,CAAC;QAC3D,YAAY,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC;QAC9C,YAAY,CAAC,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,YAAY,CAAC;QAClD,YAAY,CAAC,iBAAiB,EAAE,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC;QAC/D,YAAY,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;KAC7C;CAC+C,CAAC","sourcesContent":["import type { ShowcaseScenarioId } from \"@hjmds/design-contracts/showcase\";\n\nexport const reactRendererEvidenceSchemaVersion = 2 as const;\n\nexport type ReactRendererEvidenceScenario = Exclude<ShowcaseScenarioId, \"contract\">;\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\nfunction defaultClaim(\n componentId: string,\n exportNames: readonly string[],\n subpath: `./${string}`,\n): ReactRendererEvidenceComponent {\n const scenarios = [\n \"default\",\n \"dark\",\n \"long-copy\",\n \"large-text\",\n \"rtl\",\n \"reduced-motion\",\n \"accessibility\",\n ] as const;\n return {\n componentId,\n exportNames,\n subpath,\n scenarios,\n proofs: [{\n scenarios,\n file: \"test/default-render.ssr.test.tsx\",\n caseId: componentId,\n }],\n };\n}\n\nfunction stableFieldClaim(\n exportNames: readonly string[],\n subpath: `./${string}`,\n): ReactRendererEvidenceComponent {\n const base = defaultClaim(\"field\", exportNames, subpath);\n return {\n ...base,\n scenarios: [...base.scenarios, \"keyboard\"],\n proofs: [\n ...base.proofs,\n {\n scenarios: [\"keyboard\"],\n file: \"test/stable-core.browser.test.tsx\",\n caseId: \"field\",\n },\n ],\n };\n}\n\n/**\n * First-party Web renderer claims. Scenario axes remain fail-closed: this\n * manifest claims a table-driven environment/accessibility smoke matrix.\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: \"0.9.5\",\n surface: \"web\",\n components: [\n defaultClaim(\"design-system-provider\", [\"HjmProvider\", \"useHjmTheme\"], \"./provider\"),\n defaultClaim(\"text\", [\"Text\"], \"./layout\"),\n defaultClaim(\"surface\", [\"Surface\"], \"./layout\"),\n defaultClaim(\"icon\", [\"Icon\"], \"./display\"),\n defaultClaim(\"stack\", [\"Stack\"], \"./layout\"),\n defaultClaim(\"container\", [\"Container\"], \"./layout\"),\n defaultClaim(\"aspect-ratio\", [\"AspectRatio\"], \"./layout\"),\n defaultClaim(\"grid\", [\"Grid\"], \"./layout\"),\n defaultClaim(\"layout\", [\"Layout\"], \"./layout\"),\n defaultClaim(\"button\", [\"Button\"], \"./actions\"),\n defaultClaim(\"icon-button\", [\"IconButton\"], \"./actions\"),\n defaultClaim(\"link\", [\"Link\"], \"./actions\"),\n stableFieldClaim([\"Field\", \"TextField\"], \"./forms\"),\n defaultClaim(\"search-field\", [\"SearchField\"], \"./forms\"),\n defaultClaim(\"text-area\", [\"TextArea\"], \"./forms\"),\n defaultClaim(\"password-field\", [\"PasswordField\"], \"./password-field\"),\n defaultClaim(\"otp-field\", [\"OtpField\"], \"./otp-field\"),\n defaultClaim(\"number-field\", [\"NumberField\"], \"./number-field\"),\n defaultClaim(\"slider\", [\"Slider\"], \"./slider\"),\n defaultClaim(\"form\", [\"Form\"], \"./forms\"),\n defaultClaim(\"date-picker\", [\"DatePicker\"], \"./date-picker\"),\n defaultClaim(\"file-picker\", [\"FilePicker\"], \"./file-picker\"),\n defaultClaim(\"checkbox\", [\"Checkbox\"], \"./selection\"),\n defaultClaim(\"radio\", [\"Radio\"], \"./selection\"),\n defaultClaim(\"checkbox-group\", [\"CheckboxGroup\"], \"./selection\"),\n defaultClaim(\"radio-group\", [\"RadioGroup\"], \"./selection\"),\n defaultClaim(\"switch\", [\"Switch\"], \"./selection\"),\n defaultClaim(\"segmented-control\", [\"SegmentedControl\"], \"./selection\"),\n defaultClaim(\"chip\", [\"Chip\"], \"./selection\"),\n defaultClaim(\"tabs\", [\"Tabs\"], \"./navigation\"),\n defaultClaim(\"bottom-navigation\", [\"BottomNavigation\"], \"./navigation\"),\n defaultClaim(\"load-more\", [\"LoadMore\"], \"./navigation\"),\n defaultClaim(\"steps\", [\"Steps\"], \"./steps\"),\n defaultClaim(\"badge\", [\"Badge\"], \"./display\"),\n defaultClaim(\"avatar\", [\"Avatar\"], \"./display\"),\n defaultClaim(\"counter-badge\", [\"CounterBadge\"], \"./display\"),\n defaultClaim(\"card\", [\"Card\"], \"./display\"),\n defaultClaim(\"list\", [\"List\"], \"./display\"),\n defaultClaim(\"list-row\", [\"ListRow\"], \"./display\"),\n defaultClaim(\"tag\", [\"Tag\"], \"./display\"),\n defaultClaim(\"accordion\", [\"Accordion\"], \"./display\"),\n defaultClaim(\"divider\", [\"Divider\"], \"./display\"),\n defaultClaim(\"statistic\", [\"Statistic\", \"StatisticGroup\"], \"./display\"),\n defaultClaim(\"section\", [\"Section\"], \"./layout\"),\n defaultClaim(\"upload-item\", [\"UploadItem\"], \"./upload-item\"),\n defaultClaim(\"timeline\", [\"Timeline\"], \"./display\"),\n defaultClaim(\"description-list\", [\"DescriptionList\"], \"./display\"),\n defaultClaim(\"image\", [\"Image\"], \"./display\"),\n defaultClaim(\"empty-state\", [\"EmptyState\"], \"./feedback\"),\n defaultClaim(\"notice\", [\"Notice\"], \"./feedback\"),\n defaultClaim(\"progress\", [\"Progress\"], \"./feedback\"),\n defaultClaim(\"spinner\", [\"Spinner\"], \"./feedback\"),\n defaultClaim(\"skeleton\", [\"Skeleton\"], \"./feedback\"),\n defaultClaim(\"result\", [\"Result\"], \"./feedback\"),\n defaultClaim(\"toast\", [\"Toast\", \"ToastProvider\", \"useToast\"], \"./toast\"),\n defaultClaim(\"select\", [\"Select\"], \"./forms\"),\n defaultClaim(\"combobox\", [\"Combobox\"], \"./forms\"),\n defaultClaim(\"dialog\", [\"Dialog\"], \"./overlays\"),\n defaultClaim(\"alert-dialog\", [\"AlertDialog\"], \"./overlays\"),\n defaultClaim(\"sheet\", [\"Sheet\"], \"./overlays\"),\n defaultClaim(\"tooltip\", [\"Tooltip\"], \"./overlays\"),\n defaultClaim(\"visually-hidden\", [\"VisuallyHidden\"], \"./layout\"),\n defaultClaim(\"menu\", [\"Menu\"], \"./overlays\"),\n ],\n} as const satisfies ReactRendererEvidenceManifest;\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { HjmProvider, useHjmTheme, type HjmProviderProps, } from "./provider.js";
|
|
1
|
+
export { HjmProvider, useHjmTheme, type HjmProviderHost, type HjmProviderProps, } from "./provider.js";
|
|
2
2
|
export { hjmCompositionStyleKeys, type HjmCompositionStyle, type HjmCompositionStyleKey, type HjmCompositionStyleProp, } from "./composition-style.js";
|
|
3
3
|
export { AspectRatio, Container, Grid, Layout, Section, Stack, Surface, Text, VisuallyHidden, type AspectRatioProps, type AspectRatioValue, type ContainerGutter, type ContainerProps, type ContainerSize, type GridGap, type GridProps, type LayoutProps, type LayoutSidebar, type SectionProps, type StackAlign, type StackAxis, type StackGap, type StackJustify, type StackProps, type SurfacePadding, type SurfaceProps, type SurfaceRadius, type SurfaceTone, type TextEmphasis, type TextProps, type TextTone, type VisuallyHiddenProps, } from "./layout.js";
|
|
4
|
-
export { Button, IconButton, Link, type ButtonProps, type ButtonSize, type ButtonTone, type IconButtonProps, type IconButtonShape, type IconButtonSize, type IconButtonTone, type LinkRenderProps, type LinkProps, } from "./actions.js";
|
|
4
|
+
export { Button, IconButton, Link, type ButtonAlign, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonTone, type IconButtonProps, type IconButtonShape, type IconButtonSize, type IconButtonTone, type LinkRenderProps, type LinkProps, } from "./actions.js";
|
|
5
5
|
export { Field, OtpField, PasswordField, SearchField, TextArea, TextField, type FieldControlProps, type FieldProps, type OtpFieldProps, type PasswordFieldProps, type PasswordFieldToggleRenderProps, type SearchFieldProps, type SearchFieldIconRenderProps, type TextAreaProps, type TextFieldProps, } from "./forms.js";
|
|
6
6
|
export { Combobox, Form, type ComboboxItem, type ComboboxOpenChangeReason, type ComboboxProps, type FormProps, type FormSubmitHandler, NativeSelect, type NativeSelectProps, type SelectOption, } from "./advanced-forms.js";
|
|
7
7
|
export { Select, type SelectItem, type SelectLeadingRenderProps, type SelectOptionLeadingRenderProps, type SelectProps, type SelectSection, } from "./select.js";
|
|
@@ -9,7 +9,7 @@ export { NumberField, type NumberFieldProps, } from "./number-field.js";
|
|
|
9
9
|
export { Slider, type SliderProps, } from "./slider.js";
|
|
10
10
|
export { DatePicker, type DatePickerMonthAction, type DatePickerProps, } from "./date-picker.js";
|
|
11
11
|
export { FilePicker, type FilePickerProps, } from "./file-picker.js";
|
|
12
|
-
export { Checkbox, CheckboxGroup, Chip, Radio, RadioGroup, SegmentedControl, Switch, type CheckboxProps, type CheckboxGroupItem, type CheckboxGroupProps, type ChipProps, type ChoiceLeadingRenderProps, type RadioProps, type RadioGroupItem, type RadioGroupProps, type SegmentedControlItem, type SegmentedControlProps, type SwitchProps, } from "./selection.js";
|
|
12
|
+
export { Checkbox, CheckboxGroup, Chip, Radio, RadioGroup, SegmentedControl, Switch, type CheckboxProps, type CheckboxGroupItem, type CheckboxGroupProps, type ChipProps, type ChoiceLeadingRenderProps, type RadioProps, type RadioGroupItem, type RadioGroupProps, type SegmentedControlItem, type SegmentedControlProps, type SwitchProps, type SwitchSize, } from "./selection.js";
|
|
13
13
|
export { TabPanel, Tabs, getDynamicTabPanelId, getTabId, getTabPanelId, type TabLeadingRenderProps, type TabItem, type TabPanelProps, type TabsProps, } from "./navigation.js";
|
|
14
14
|
export { Breadcrumb, Pagination, type BreadcrumbProps, type PaginationProps, } from "./advanced-navigation.js";
|
|
15
15
|
export { LoadMore, type LoadMoreProps, } from "./supplemental-navigation.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAA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,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,YAAY,GAClB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,MAAM,EACN,KAAK,UAAU,EACf,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EACnC,KAAK,WAAW,EAChB,KAAK,aAAa,GACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,MAAM,EACN,KAAK,WAAW,GACjB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,UAAU,EACV,KAAK,qBAAqB,EAC1B,KAAK,eAAe,GACrB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,UAAU,EACV,KAAK,eAAe,GACrB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,QAAQ,EACR,aAAa,EACb,IAAI,EACJ,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,MAAM,EACN,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACd,KAAK,wBAAwB,EAC7B,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,WAAW,EACX,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,EACvB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,GAC7B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,WAAW,EACX,SAAS,EACT,IAAI,EACJ,MAAM,EACN,OAAO,EACP,KAAK,EACL,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,EACR,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,kBAAkB,GACxB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,WAAW,EACX,MAAM,EACN,IAAI,EACJ,KAAK,EACL,OAAO,EACP,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,YAAY,GAClB,MAAM,eAAe,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,WAAW,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,WAAW,GAGZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,GAIxB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,WAAW,EACX,SAAS,EACT,IAAI,EACJ,MAAM,EACN,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,EACJ,cAAc,GAwBf,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,MAAM,EACN,UAAU,EACV,IAAI,GAYL,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,KAAK,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,QAAQ,EACR,SAAS,GAUV,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,QAAQ,EACR,IAAI,EAMJ,YAAY,GAGb,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,MAAM,GAMP,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,WAAW,GAEZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,MAAM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\n HjmProvider,\n useHjmTheme,\n type HjmProviderHost,\n type HjmProviderProps,\n} from \"./provider.js\";\n\nexport {\n hjmCompositionStyleKeys,\n type HjmCompositionStyle,\n type HjmCompositionStyleKey,\n type HjmCompositionStyleProp,\n} from \"./composition-style.js\";\n\nexport {\n AspectRatio,\n Container,\n Grid,\n Layout,\n Section,\n Stack,\n Surface,\n Text,\n VisuallyHidden,\n type AspectRatioProps,\n type AspectRatioValue,\n type ContainerGutter,\n type ContainerProps,\n type ContainerSize,\n type GridGap,\n type GridProps,\n type LayoutProps,\n type LayoutSidebar,\n type SectionProps,\n type StackAlign,\n type StackAxis,\n type StackGap,\n type StackJustify,\n type StackProps,\n type SurfacePadding,\n type SurfaceProps,\n type SurfaceRadius,\n type SurfaceTone,\n type TextEmphasis,\n type TextProps,\n type TextTone,\n type VisuallyHiddenProps,\n} from \"./layout.js\";\n\nexport {\n Button,\n IconButton,\n Link,\n type ButtonAlign,\n type ButtonProps,\n type ButtonShape,\n type ButtonSize,\n type ButtonTone,\n type IconButtonProps,\n type IconButtonShape,\n type IconButtonSize,\n type IconButtonTone,\n type LinkRenderProps,\n type LinkProps,\n} from \"./actions.js\";\n\nexport {\n Field,\n OtpField,\n PasswordField,\n SearchField,\n TextArea,\n TextField,\n type FieldControlProps,\n type FieldProps,\n type OtpFieldProps,\n type PasswordFieldProps,\n type PasswordFieldToggleRenderProps,\n type SearchFieldProps,\n type SearchFieldIconRenderProps,\n type TextAreaProps,\n type TextFieldProps,\n} from \"./forms.js\";\n\nexport {\n Combobox,\n Form,\n type ComboboxItem,\n type ComboboxOpenChangeReason,\n type ComboboxProps,\n type FormProps,\n type FormSubmitHandler,\n NativeSelect,\n type NativeSelectProps,\n type SelectOption,\n} from \"./advanced-forms.js\";\n\nexport {\n Select,\n type SelectItem,\n type SelectLeadingRenderProps,\n type SelectOptionLeadingRenderProps,\n type SelectProps,\n type SelectSection,\n} from \"./select.js\";\n\nexport {\n NumberField,\n type NumberFieldProps,\n} from \"./number-field.js\";\n\nexport {\n Slider,\n type SliderProps,\n} from \"./slider.js\";\n\nexport {\n DatePicker,\n type DatePickerMonthAction,\n type DatePickerProps,\n} from \"./date-picker.js\";\n\nexport {\n FilePicker,\n type FilePickerProps,\n} from \"./file-picker.js\";\n\nexport {\n Checkbox,\n CheckboxGroup,\n Chip,\n Radio,\n RadioGroup,\n SegmentedControl,\n Switch,\n type CheckboxProps,\n type CheckboxGroupItem,\n type CheckboxGroupProps,\n type ChipProps,\n type ChoiceLeadingRenderProps,\n type RadioProps,\n type RadioGroupItem,\n type RadioGroupProps,\n type SegmentedControlItem,\n type SegmentedControlProps,\n type SwitchProps,\n type SwitchSize,\n} from \"./selection.js\";\n\nexport {\n TabPanel,\n Tabs,\n getDynamicTabPanelId,\n getTabId,\n getTabPanelId,\n type TabLeadingRenderProps,\n type TabItem,\n type TabPanelProps,\n type TabsProps,\n} from \"./navigation.js\";\n\nexport {\n Breadcrumb,\n Pagination,\n type BreadcrumbProps,\n type PaginationProps,\n} from \"./advanced-navigation.js\";\n\nexport {\n LoadMore,\n type LoadMoreProps,\n} from \"./supplemental-navigation.js\";\n\nexport {\n Steps,\n type StepsProps,\n} from \"./steps.js\";\n\nexport {\n BottomNavigation,\n getBottomNavigationGridColumn,\n isUnmodifiedPrimaryBottomNavigationClick,\n shouldHideBottomNavigationForKeyboard,\n type BottomNavigationIconRenderProps,\n type BottomNavigationLinkRenderProps,\n type BottomNavigationProps,\n} from \"./bottom-navigation.js\";\n\nexport {\n Badge,\n Card,\n ListRow,\n Tag,\n type BadgeProps,\n type BadgeVariant,\n type CardHeadingLevel,\n type CardProps,\n type ListRowProps,\n type TagProps,\n type TagTone,\n} from \"./display.js\";\n\nexport {\n CounterBadge,\n Icon,\n Image,\n type CounterBadgeProps,\n type IconProps,\n type ImageAdapterProps,\n type ImageProps,\n} from \"./supplemental-display.js\";\n\nexport {\n Accordion,\n Avatar,\n DescriptionList,\n Divider,\n List,\n Statistic,\n StatisticGroup,\n Table,\n Timeline,\n type AccordionItem,\n type AccordionProps,\n type AvatarProps,\n type DescriptionListProps,\n type DividerInset,\n type DividerOrientation,\n type DividerProps,\n type ListAppearance,\n type ListProps,\n type StatisticProps,\n type StatisticGroupProps,\n type StatisticTrendMarkRenderProps,\n type ComposeStatisticAccessibilityLabel,\n type TableColumn,\n type TableProps,\n type TableSortDirection,\n type TimelineProps,\n} from \"./advanced-display.js\";\n\nexport {\n UploadItem,\n type UploadItemProps,\n} from \"./upload-item.js\";\n\nexport {\n EmptyState,\n Notice,\n Progress,\n Result,\n Skeleton,\n Spinner,\n type EmptyStateProps,\n type NoticeProps,\n type ProgressProps,\n type ResultProps,\n type SkeletonProps,\n type SpinnerProps,\n} from \"./feedback.js\";\n\nexport {\n Toast,\n ToastProvider,\n useToast,\n type ToastApi,\n type ToastProps,\n type ToastProviderProps,\n} from \"./toast.js\";\n\nexport {\n AlertDialog,\n Dialog,\n Menu,\n Sheet,\n Tooltip,\n type AlertDialogProps,\n type DialogOpenChangeReason,\n type DialogProps,\n type MenuItem,\n type MenuAsyncState,\n type MenuOpenChangeReason,\n type MenuProps,\n type MenuSection,\n type OverlayTrigger,\n type SheetPlacement,\n type SheetProps,\n type TooltipProps,\n} from \"./overlays.js\";\n"]}
|
package/dist/layout.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../src/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,OAAO,EACb,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,aAAa,EACnB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,WAAW,EACj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AAC;IACrB,gFAAgF;IAChF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2EAA2E;IAC3E,cAAc,CAAC,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC9E,WAAW,CAAC,EAAE,uBAAuB,CAAC;CACzC,CAAC,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;eATF,SAAS;IACpB,gFAAgF;kBAClE,MAAM;IACpB,2EAA2E;qBAC1D,MAAM;IACrB,4EAA4E;kBAChE,uBAAuB;mDAyDvC,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,GAChF,QAAQ,CAAC;IACP,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CAClC,CAAC,CAAC;AAEL,+EAA+E;AAC/E,eAAO,MAAM,OAAO;YARR,SAAS;kBACH,SAAS;aACd,SAAS;cACR,SAAS;mBACJ,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC;gDAqClC,CAAC;AAEH,YAAY,EAAE,OAAO,EAAE,CAAC;AACxB,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/layout.js
CHANGED
|
@@ -110,6 +110,7 @@ export const Surface = forwardRef(function Surface({ as = "div", tone = surfaceD
|
|
|
110
110
|
"data-tone": tone,
|
|
111
111
|
"data-bordered": bordered || contract.borderAlways,
|
|
112
112
|
"data-elevated": contract.elevated,
|
|
113
|
+
"data-clips": contract.clipsContent,
|
|
113
114
|
"data-padding": padding,
|
|
114
115
|
"data-radius": radius,
|
|
115
116
|
style: {
|
package/dist/layout.js.map
CHANG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AS,EAAE,MAAM,CAAC,SAAS;YAC3B,GAAG,KAAK;YACR,GAAG,WAAW;SACf,GACD,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAWH,+EAA+E;AAC/E,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAA4B,SAAS,OAAO,CAC3E,EACE,KAAK,EACL,WAAW,EACX,MAAM,EACN,QAAQ,EACR,YAAY,GAAG,CAAC,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EACD,GAAG;IAEH,MAAM,SAAS,GAAG,KAAK,KAAK,SAAS,IAAI,WAAW,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,CAAC;IAC3F,OAAO,CACL,sBAAa,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC,aAC1E,SAAS,CAAC,CAAC,CAAC,CACX,kBAAQ,SAAS,EAAC,qBAAqB,aACrC,eAAK,SAAS,EAAC,mBAAmB,aAC/B,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,CACzC,IAAI,YAAY,EAAE,EAClB,EAAE,SAAS,EAAE,oBAAoB,EAAE,EACnC,KAAK,CACN,EACA,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAClC,cAAK,SAAS,EAAC,0BAA0B,YAAE,WAAW,GAAO,CAC9D,IACG,EACL,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,qBAAqB,YAAE,MAAM,GAAO,IAC3E,CACV,CAAC,CAAC,CAAC,IAAI,EACR,cAAK,SAAS,EAAC,sBAAsB,YAAE,QAAQ,GAAO,IAC9C,CACX,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import {\n resolveGridLayout,\n type GridDescriptor,\n type GridGap,\n} from \"@hjmds/design-contracts/grid\";\nimport {\n resolveAspectRatioDescriptor,\n type AspectRatioValue,\n} from \"@hjmds/design-contracts/components/aspect-ratio\";\nimport {\n resolveContainerDescriptor,\n type ContainerGutter,\n type ContainerSize,\n} from \"@hjmds/design-contracts/components/container\";\nimport {\n layoutRecipe,\n validateLayoutWebDescriptor,\n type LayoutSidebarDescriptor,\n type LayoutSidebarRole,\n} from \"@hjmds/design-contracts/components/layout\";\nimport {\n surfaceDefaults,\n surfaceGeometry,\n surfaceRecipe,\n type SurfacePadding,\n type SurfaceRadius,\n type SurfaceTone,\n} from \"@hjmds/design-contracts/recipes/base\";\nimport {\n stackRecipe,\n textRecipe,\n type StackAlign,\n type StackAxis,\n type StackGap,\n type StackJustify,\n type TextEmphasis,\n type TextTone,\n} from \"@hjmds/design-contracts/recipes\";\nimport type { TextVariant } from \"@hjmds/design-contracts/foundations\";\nimport {\n createElement,\n forwardRef,\n useId,\n useRef,\n type AnchorHTMLAttributes,\n type HTMLAttributes,\n type MouseEvent,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport {\n classNames,\n composeRefs,\n useElementWidth,\n useWindowWidth,\n} from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type {\n SurfacePadding,\n SurfaceRadius,\n SurfaceTone,\n} from \"@hjmds/design-contracts/recipes/base\";\nexport type {\n StackAlign,\n StackAxis,\n StackGap,\n StackJustify,\n TextEmphasis,\n TextTone,\n} from \"@hjmds/design-contracts/recipes\";\n\ntype LayoutRegionProps = Omit<\n HTMLAttributes<HTMLElement>,\n \"children\" | \"role\"\n>;\n\ntype LayoutSidebarBase = Readonly<{\n children: ReactNode;\n role: LayoutSidebarRole;\n label: string;\n landmarkProps?: Omit<LayoutRegionProps, \"aria-label\">;\n landmarkRef?: Ref<HTMLElement>;\n}>;\n\n/**\n * A persistent sidebar is rendered in the shell grid. An overlay sidebar is\n * deliberately handed to the product's SidePanel (or equivalent) through\n * `renderOverlay`; Layout never owns a second open/dismiss lifecycle.\n */\nexport type LayoutSidebar =\n | (LayoutSidebarBase &\n Readonly<{\n mode: \"persistent\";\n renderOverlay?: never;\n }>)\n | (LayoutSidebarBase &\n Readonly<{\n mode: \"overlay\";\n renderOverlay(sidebarLandmark: ReactElement): ReactNode;\n }>);\n\nexport type LayoutProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> &\n Readonly<{\n children: ReactNode;\n header?: ReactNode;\n footer?: ReactNode;\n sidebar?: LayoutSidebar;\n skipLinkLabel?: string;\n /** Stable product id for deep links; a hydration-safe id is generated when omitted. */\n mainId?: string;\n mainRef?: Ref<HTMLElement>;\n headerProps?: LayoutRegionProps;\n mainProps?: Omit<LayoutRegionProps, \"id\" | \"tabIndex\">;\n footerProps?: LayoutRegionProps;\n skipLinkProps?: Omit<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n \"children\" | \"href\"\n >;\n }>;\n\nfunction hasRegionContent(content: ReactNode | undefined): boolean {\n return content !== undefined && content !== null && content !== false;\n}\n\nfunction assertMainId(id: string): void {\n if (id.trim().length === 0) {\n throw new TypeError(\"Layout mainId must not be empty\");\n }\n if (/\\s/u.test(id)) {\n throw new TypeError(\"Layout mainId must not contain whitespace\");\n }\n}\n\n/** Accessible Web app shell with real landmarks and bypass navigation. */\nexport const Layout = forwardRef<HTMLDivElement, LayoutProps>(function Layout(\n {\n children,\n header,\n footer,\n sidebar,\n skipLinkLabel,\n mainId: mainIdProp,\n mainRef: forwardedMainRef,\n headerProps,\n mainProps,\n footerProps,\n skipLinkProps,\n className,\n ...props\n },\n ref,\n) {\n const generatedId = `hjm-main-${useId().replaceAll(\":\", \"\")}`;\n const internalMainRef = useRef<HTMLElement>(null);\n const mainId = mainIdProp ?? generatedId;\n assertMainId(mainId);\n\n const hasHeader = hasRegionContent(header);\n const hasFooter = hasRegionContent(footer);\n const descriptor = {\n ...(hasHeader ? { hasHeader: true } : {}),\n ...(hasFooter ? { hasFooter: true } : {}),\n ...(sidebar === undefined\n ? {}\n : {\n sidebar: {\n role: sidebar.role,\n mode: sidebar.mode,\n label: sidebar.label,\n } satisfies LayoutSidebarDescriptor,\n }),\n ...(skipLinkLabel === undefined ? {} : { skipLinkLabel }),\n };\n validateLayoutWebDescriptor(descriptor);\n\n if (\n sidebar?.mode === \"overlay\" &&\n typeof sidebar.renderOverlay !== \"function\"\n ) {\n throw new TypeError(\n \"Layout overlay sidebar requires renderOverlay so SidePanel owns its lifecycle\",\n );\n }\n\n const {\n className: headerClassName,\n ...restHeaderProps\n } = headerProps ?? {};\n const {\n className: mainClassName,\n style: mainStyle,\n ...restMainProps\n } = mainProps ?? {};\n const {\n className: footerClassName,\n ...restFooterProps\n } = footerProps ?? {};\n const {\n className: skipLinkClassName,\n onClick: onSkipLinkClick,\n ...restSkipLinkProps\n } = skipLinkProps ?? {};\n\n let sidebarNode: ReactNode;\n if (sidebar !== undefined) {\n const {\n className: sidebarClassName,\n style: sidebarStyle,\n ...restSidebarProps\n } = sidebar.landmarkProps ?? {};\n const sidebarLandmark = createElement(\n sidebar.role === \"navigation\" ? \"nav\" : \"aside\",\n {\n ...restSidebarProps,\n ref: sidebar.landmarkRef,\n className: classNames(\"hjm-layout__sidebar\", sidebarClassName),\n \"aria-label\": sidebar.label,\n \"data-mode\": sidebar.mode,\n style: {\n ...(sidebar.mode === \"persistent\"\n ? { inlineSize: layoutRecipe.sidebar.width }\n : {}),\n ...sidebarStyle,\n },\n },\n sidebar.children,\n );\n sidebarNode = sidebar.mode === \"overlay\"\n ? sidebar.renderOverlay(sidebarLandmark)\n : sidebarLandmark;\n }\n\n const moveFocusToMain = (event: MouseEvent<HTMLAnchorElement>) => {\n onSkipLinkClick?.(event);\n if (event.defaultPrevented) return;\n const main = internalMainRef.current;\n if (main === null) return;\n event.preventDefault();\n const url = new URL(window.location.href);\n url.hash = mainId;\n window.history.replaceState(window.history.state, \"\", url);\n main.focus({ preventScroll: true });\n main.scrollIntoView?.({ block: \"start\" });\n };\n\n return (\n <div\n {...props}\n ref={ref}\n className={classNames(\"hjm-layout\", className)}\n data-hjm-component=\"Layout\"\n data-sidebar-mode={sidebar?.mode ?? \"none\"}\n >\n {skipLinkLabel === undefined ? null : (\n <a\n {...restSkipLinkProps}\n href={`#${mainId}`}\n className={classNames(\n \"hjm-layout__skip-link\",\n skipLinkClassName,\n )}\n onClick={moveFocusToMain}\n >\n {skipLinkLabel}\n </a>\n )}\n {hasHeader ? (\n <header\n {...restHeaderProps}\n className={classNames(\"hjm-layout__header\", headerClassName)}\n >\n {header}\n </header>\n ) : null}\n {sidebarNode}\n <main\n {...restMainProps}\n ref={composeRefs(internalMainRef, forwardedMainRef)}\n id={mainId}\n className={classNames(\"hjm-layout__main\", mainClassName)}\n tabIndex={-1}\n style={{\n maxInlineSize: layoutRecipe.main.maxWidth,\n paddingInline: layoutRecipe.main.paddingHorizontal,\n ...mainStyle,\n }}\n >\n {children}\n </main>\n {hasFooter ? (\n <footer\n {...restFooterProps}\n className={classNames(\"hjm-layout__footer\", footerClassName)}\n >\n {footer}\n </footer>\n ) : null}\n </div>\n );\n});\n\nexport type TextProps = Omit<HTMLAttributes<HTMLElement>, \"children\"> &\n Readonly<{\n children: ReactNode;\n as?: \"span\" | \"p\" | \"div\" | \"strong\" | \"small\";\n variant?: TextVariant;\n tone?: TextTone;\n emphasis?: TextEmphasis;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const Text = forwardRef<HTMLElement, TextProps>(function Text(\n {\n as = \"span\",\n variant = textRecipe.defaults.variant,\n tone = textRecipe.defaults.tone,\n emphasis = textRecipe.defaults.emphasis,\n className,\n layoutStyle,\n style,\n ...props\n },\n ref,\n) {\n return createElement(as, {\n ...props,\n ref,\n className: classNames(\"hjm-text\", className),\n \"data-variant\": variant,\n \"data-tone\": tone,\n \"data-emphasis\": emphasis,\n // Placement wins over the legacy `style`, matching Surface's ordering.\n style: { ...style, ...layoutStyle },\n });\n});\n\nexport type SurfaceProps = HTMLAttributes<HTMLElement> &\n Readonly<{\n as?: \"div\" | \"section\" | \"article\";\n tone?: SurfaceTone;\n bordered?: boolean;\n padding?: SurfacePadding;\n radius?: SurfaceRadius;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const Surface = forwardRef<HTMLElement, SurfaceProps>(function Surface(\n {\n as = \"div\",\n tone = surfaceDefaults.tone,\n bordered = surfaceDefaults.bordered,\n padding = surfaceDefaults.padding,\n radius = surfaceDefaults.radius,\n className,\n layoutStyle,\n style,\n ...props\n },\n ref,\n) {\n const contract = surfaceRecipe[tone];\n return createElement(as, {\n ...props,\n ref,\n className: classNames(\"hjm-surface\", className),\n \"data-tone\": tone,\n \"data-bordered\": bordered || contract.borderAlways,\n \"data-elevated\": contract.elevated,\n \"data-padding\": padding,\n \"data-radius\": radius,\n style: {\n padding: surfaceGeometry.paddings[padding],\n borderRadius: surfaceGeometry.radii[radius],\n ...style,\n ...layoutStyle,\n },\n });\n});\n\nexport type StackProps = HTMLAttributes<HTMLDivElement> &\n Readonly<{\n axis?: StackAxis;\n gap?: StackGap;\n align?: StackAlign;\n justify?: StackJustify;\n wrap?: boolean;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nconst justifyValues = {\n start: \"flex-start\",\n center: \"center\",\n end: \"flex-end\",\n between: \"space-between\",\n} as const;\n\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(function Stack(\n {\n axis = stackRecipe.defaults.axis,\n gap = stackRecipe.defaults.gap,\n align = stackRecipe.defaults.align,\n justify = stackRecipe.defaults.justify,\n wrap = stackRecipe.defaults.wrap,\n className,\n layoutStyle,\n style,\n ...props\n },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={classNames(\"hjm-stack\", className)}\n data-axis={axis}\n data-gap={gap}\n style={{\n display: \"flex\",\n flexDirection: stackRecipe.axes[axis],\n gap: stackRecipe.gaps[gap],\n alignItems: align === \"start\" || align === \"end\" ? `flex-${align}` : align,\n justifyContent: justifyValues[justify],\n flexWrap: wrap ? \"wrap\" : \"nowrap\",\n ...style,\n ...layoutStyle,\n }}\n />\n );\n});\n\nexport type ContainerProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> &\n Readonly<{\n children?: ReactNode;\n size?: ContainerSize;\n gutter?: ContainerGutter;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\n/** A centered, token-guttered content boundary shared with Native large screens. */\nexport const Container = forwardRef<HTMLDivElement, ContainerProps>(function Container(\n { size, gutter, className, layoutStyle, style, ...props },\n ref,\n) {\n const resolved = resolveContainerDescriptor({\n ...(size === undefined ? {} : { size }),\n ...(gutter === undefined ? {} : { gutter }),\n });\n return (\n <div\n {...props}\n ref={ref}\n className={classNames(\"hjm-container\", className)}\n data-size={resolved.size}\n data-gutter={resolved.gutter}\n style={{\n maxInlineSize: resolved.maxWidth ?? undefined,\n paddingInline: resolved.paddingInline,\n ...style,\n ...layoutStyle,\n }}\n />\n );\n});\n\nexport type AspectRatioProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> &\n Readonly<{\n children?: ReactNode;\n ratio?: AspectRatioValue;\n }>;\n\n/** Responsive media frame. Products retain object-fit, crop, and content semantics. */\nexport const AspectRatio = forwardRef<HTMLDivElement, AspectRatioProps>(function AspectRatio(\n { ratio, className, style, ...props },\n ref,\n) {\n const resolved = resolveAspectRatioDescriptor(\n ratio === undefined ? {} : { ratio },\n );\n return (\n <div\n {...props}\n ref={ref}\n className={classNames(\"hjm-aspect-ratio\", className)}\n data-ratio={resolved.source}\n style={{ aspectRatio: resolved.ratio, ...style }}\n />\n );\n});\n\nexport type VisuallyHiddenProps = HTMLAttributes<HTMLSpanElement> &\n Readonly<{ children: ReactNode }>;\n\n/** Keeps meaningful copy available to assistive technology without visible layout. */\nexport const VisuallyHidden = forwardRef<HTMLSpanElement, VisuallyHiddenProps>(\n function VisuallyHidden({ className, ...props }, ref) {\n return (\n <span\n {...props}\n ref={ref}\n className={classNames(\"hjm-visually-hidden\", className)}\n />\n );\n },\n);\n\nexport type GridProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> &\n Pick<GridDescriptor, \"columns\" | \"gap\" | \"minColumnWidth\"> &\n Readonly<{\n children?: ReactNode;\n /** Test/SSR override. Browser renderers otherwise observe window.innerWidth. */\n windowWidth?: number;\n /** Container measurement override; ResizeObserver is used when omitted. */\n availableWidth?: number;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const Grid = forwardRef<HTMLDivElement, GridProps>(function Grid(\n {\n columns,\n gap,\n minColumnWidth,\n windowWidth,\n availableWidth,\n className,\n layoutStyle,\n style,\n ...props\n },\n forwardedRef,\n) {\n const browserWindowWidth = useWindowWidth();\n const [measuredWidth, gridRef] = useElementWidth(forwardedRef);\n const compactSsrWidth = 320;\n const effectiveWindowWidth =\n windowWidth ??\n (browserWindowWidth > 0 ? browserWindowWidth : compactSsrWidth);\n const effectiveAvailableWidth =\n availableWidth ??\n (measuredWidth !== undefined && measuredWidth > 0\n ? measuredWidth\n : effectiveWindowWidth);\n const descriptor: GridDescriptor = {\n columns,\n ...(gap === undefined ? {} : { gap }),\n ...(minColumnWidth === undefined ? {} : { minColumnWidth }),\n };\n const layout = resolveGridLayout(descriptor, {\n windowWidth: effectiveWindowWidth,\n availableWidth: effectiveAvailableWidth,\n });\n\n return (\n <div\n {...props}\n ref={gridRef}\n className={classNames(\"hjm-grid\", className)}\n data-window-class={layout.windowClass}\n data-columns={layout.columns}\n data-requested-columns={layout.requestedColumns}\n data-state={layout.columns < layout.requestedColumns ? \"collapsed\" : \"resolved\"}\n style={{\n display: \"grid\",\n gridTemplateColumns: `repeat(${layout.columns}, minmax(0, 1fr))`,\n rowGap: layout.rowGap,\n columnGap: layout.columnGap,\n ...style,\n ...layoutStyle,\n }}\n />\n );\n});\n\nexport type SectionProps = Omit<HTMLAttributes<HTMLElement>, \"children\" | \"title\"> &\n Readonly<{\n title?: ReactNode;\n description?: ReactNode;\n action?: ReactNode;\n children: ReactNode;\n headingLevel?: 2 | 3 | 4 | 5 | 6;\n }>;\n\n/** Large-text-safe semantic content section with an optional header action. */\nexport const Section = forwardRef<HTMLElement, SectionProps>(function Section(\n {\n title,\n description,\n action,\n children,\n headingLevel = 2,\n className,\n ...props\n },\n ref,\n) {\n const hasHeader = title !== undefined || description !== undefined || action !== undefined;\n return (\n <section {...props} ref={ref} className={classNames(\"hjm-section\", className)}>\n {hasHeader ? (\n <header className=\"hjm-section__header\">\n <div className=\"hjm-section__copy\">\n {title === undefined ? null : createElement(\n `h${headingLevel}`,\n { className: \"hjm-section__title\" },\n title,\n )}\n {description === undefined ? null : (\n <div className=\"hjm-section__description\">{description}</div>\n )}\n </div>\n {action === undefined ? null : <div className=\"hjm-section__action\">{action}</div>}\n </header>\n ) : null}\n <div className=\"hjm-section__content\">{children}</div>\n </section>\n );\n});\n\nexport type { GridGap };\nexport type { AspectRatioValue, ContainerGutter, ContainerSize };\n"]}
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../src/layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,iBAAiB,GAGlB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,4BAA4B,GAE7B,MAAM,iDAAiD,CAAC;AACzD,OAAO,EACL,0BAA0B,GAG3B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,YAAY,EACZ,2BAA2B,GAG5B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,eAAe,EACf,eAAe,EACf,aAAa,GAId,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,WAAW,EACX,UAAU,GAOX,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,aAAa,EACb,UAAU,EACV,KAAK,EACL,MAAM,GAOP,MAAM,OAAO,CAAC;AACf,OAAO,EACL,UAAU,EACV,WAAW,EACX,eAAe,EACf,cA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ACX,kBAAQ,SAAS,EAAC,qBAAqB,aACrC,eAAK,SAAS,EAAC,mBAAmB,aAC/B,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,CACzC,IAAI,YAAY,EAAE,EAClB,EAAE,SAAS,EAAE,oBAAoB,EAAE,EACnC,KAAK,CACN,EACA,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAClC,cAAK,SAAS,EAAC,0BAA0B,YAAE,WAAW,GAAO,CAC9D,IACG,EACL,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,qBAAqB,YAAE,MAAM,GAAO,IAC3E,CACV,CAAC,CAAC,CAAC,IAAI,EACR,cAAK,SAAS,EAAC,sBAAsB,YAAE,QAAQ,GAAO,IAC9C,CACX,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import {\n resolveGridLayout,\n type GridDescriptor,\n type GridGap,\n} from \"@hjmds/design-contracts/grid\";\nimport {\n resolveAspectRatioDescriptor,\n type AspectRatioValue,\n} from \"@hjmds/design-contracts/components/aspect-ratio\";\nimport {\n resolveContainerDescriptor,\n type ContainerGutter,\n type ContainerSize,\n} from \"@hjmds/design-contracts/components/container\";\nimport {\n layoutRecipe,\n validateLayoutWebDescriptor,\n type LayoutSidebarDescriptor,\n type LayoutSidebarRole,\n} from \"@hjmds/design-contracts/components/layout\";\nimport {\n surfaceDefaults,\n surfaceGeometry,\n surfaceRecipe,\n type SurfacePadding,\n type SurfaceRadius,\n type SurfaceTone,\n} from \"@hjmds/design-contracts/recipes/base\";\nimport {\n stackRecipe,\n textRecipe,\n type StackAlign,\n type StackAxis,\n type StackGap,\n type StackJustify,\n type TextEmphasis,\n type TextTone,\n} from \"@hjmds/design-contracts/recipes\";\nimport type { TextVariant } from \"@hjmds/design-contracts/foundations\";\nimport {\n createElement,\n forwardRef,\n useId,\n useRef,\n type AnchorHTMLAttributes,\n type HTMLAttributes,\n type MouseEvent,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport {\n classNames,\n composeRefs,\n useElementWidth,\n useWindowWidth,\n} from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type {\n SurfacePadding,\n SurfaceRadius,\n SurfaceTone,\n} from \"@hjmds/design-contracts/recipes/base\";\nexport type {\n StackAlign,\n StackAxis,\n StackGap,\n StackJustify,\n TextEmphasis,\n TextTone,\n} from \"@hjmds/design-contracts/recipes\";\n\ntype LayoutRegionProps = Omit<\n HTMLAttributes<HTMLElement>,\n \"children\" | \"role\"\n>;\n\ntype LayoutSidebarBase = Readonly<{\n children: ReactNode;\n role: LayoutSidebarRole;\n label: string;\n landmarkProps?: Omit<LayoutRegionProps, \"aria-label\">;\n landmarkRef?: Ref<HTMLElement>;\n}>;\n\n/**\n * A persistent sidebar is rendered in the shell grid. An overlay sidebar is\n * deliberately handed to the product's SidePanel (or equivalent) through\n * `renderOverlay`; Layout never owns a second open/dismiss lifecycle.\n */\nexport type LayoutSidebar =\n | (LayoutSidebarBase &\n Readonly<{\n mode: \"persistent\";\n renderOverlay?: never;\n }>)\n | (LayoutSidebarBase &\n Readonly<{\n mode: \"overlay\";\n renderOverlay(sidebarLandmark: ReactElement): ReactNode;\n }>);\n\nexport type LayoutProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> &\n Readonly<{\n children: ReactNode;\n header?: ReactNode;\n footer?: ReactNode;\n sidebar?: LayoutSidebar;\n skipLinkLabel?: string;\n /** Stable product id for deep links; a hydration-safe id is generated when omitted. */\n mainId?: string;\n mainRef?: Ref<HTMLElement>;\n headerProps?: LayoutRegionProps;\n mainProps?: Omit<LayoutRegionProps, \"id\" | \"tabIndex\">;\n footerProps?: LayoutRegionProps;\n skipLinkProps?: Omit<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n \"children\" | \"href\"\n >;\n }>;\n\nfunction hasRegionContent(content: ReactNode | undefined): boolean {\n return content !== undefined && content !== null && content !== false;\n}\n\nfunction assertMainId(id: string): void {\n if (id.trim().length === 0) {\n throw new TypeError(\"Layout mainId must not be empty\");\n }\n if (/\\s/u.test(id)) {\n throw new TypeError(\"Layout mainId must not contain whitespace\");\n }\n}\n\n/** Accessible Web app shell with real landmarks and bypass navigation. */\nexport const Layout = forwardRef<HTMLDivElement, LayoutProps>(function Layout(\n {\n children,\n header,\n footer,\n sidebar,\n skipLinkLabel,\n mainId: mainIdProp,\n mainRef: forwardedMainRef,\n headerProps,\n mainProps,\n footerProps,\n skipLinkProps,\n className,\n ...props\n },\n ref,\n) {\n const generatedId = `hjm-main-${useId().replaceAll(\":\", \"\")}`;\n const internalMainRef = useRef<HTMLElement>(null);\n const mainId = mainIdProp ?? generatedId;\n assertMainId(mainId);\n\n const hasHeader = hasRegionContent(header);\n const hasFooter = hasRegionContent(footer);\n const descriptor = {\n ...(hasHeader ? { hasHeader: true } : {}),\n ...(hasFooter ? { hasFooter: true } : {}),\n ...(sidebar === undefined\n ? {}\n : {\n sidebar: {\n role: sidebar.role,\n mode: sidebar.mode,\n label: sidebar.label,\n } satisfies LayoutSidebarDescriptor,\n }),\n ...(skipLinkLabel === undefined ? {} : { skipLinkLabel }),\n };\n validateLayoutWebDescriptor(descriptor);\n\n if (\n sidebar?.mode === \"overlay\" &&\n typeof sidebar.renderOverlay !== \"function\"\n ) {\n throw new TypeError(\n \"Layout overlay sidebar requires renderOverlay so SidePanel owns its lifecycle\",\n );\n }\n\n const {\n className: headerClassName,\n ...restHeaderProps\n } = headerProps ?? {};\n const {\n className: mainClassName,\n style: mainStyle,\n ...restMainProps\n } = mainProps ?? {};\n const {\n className: footerClassName,\n ...restFooterProps\n } = footerProps ?? {};\n const {\n className: skipLinkClassName,\n onClick: onSkipLinkClick,\n ...restSkipLinkProps\n } = skipLinkProps ?? {};\n\n let sidebarNode: ReactNode;\n if (sidebar !== undefined) {\n const {\n className: sidebarClassName,\n style: sidebarStyle,\n ...restSidebarProps\n } = sidebar.landmarkProps ?? {};\n const sidebarLandmark = createElement(\n sidebar.role === \"navigation\" ? \"nav\" : \"aside\",\n {\n ...restSidebarProps,\n ref: sidebar.landmarkRef,\n className: classNames(\"hjm-layout__sidebar\", sidebarClassName),\n \"aria-label\": sidebar.label,\n \"data-mode\": sidebar.mode,\n style: {\n ...(sidebar.mode === \"persistent\"\n ? { inlineSize: layoutRecipe.sidebar.width }\n : {}),\n ...sidebarStyle,\n },\n },\n sidebar.children,\n );\n sidebarNode = sidebar.mode === \"overlay\"\n ? sidebar.renderOverlay(sidebarLandmark)\n : sidebarLandmark;\n }\n\n const moveFocusToMain = (event: MouseEvent<HTMLAnchorElement>) => {\n onSkipLinkClick?.(event);\n if (event.defaultPrevented) return;\n const main = internalMainRef.current;\n if (main === null) return;\n event.preventDefault();\n const url = new URL(window.location.href);\n url.hash = mainId;\n window.history.replaceState(window.history.state, \"\", url);\n main.focus({ preventScroll: true });\n main.scrollIntoView?.({ block: \"start\" });\n };\n\n return (\n <div\n {...props}\n ref={ref}\n className={classNames(\"hjm-layout\", className)}\n data-hjm-component=\"Layout\"\n data-sidebar-mode={sidebar?.mode ?? \"none\"}\n >\n {skipLinkLabel === undefined ? null : (\n <a\n {...restSkipLinkProps}\n href={`#${mainId}`}\n className={classNames(\n \"hjm-layout__skip-link\",\n skipLinkClassName,\n )}\n onClick={moveFocusToMain}\n >\n {skipLinkLabel}\n </a>\n )}\n {hasHeader ? (\n <header\n {...restHeaderProps}\n className={classNames(\"hjm-layout__header\", headerClassName)}\n >\n {header}\n </header>\n ) : null}\n {sidebarNode}\n <main\n {...restMainProps}\n ref={composeRefs(internalMainRef, forwardedMainRef)}\n id={mainId}\n className={classNames(\"hjm-layout__main\", mainClassName)}\n tabIndex={-1}\n style={{\n maxInlineSize: layoutRecipe.main.maxWidth,\n paddingInline: layoutRecipe.main.paddingHorizontal,\n ...mainStyle,\n }}\n >\n {children}\n </main>\n {hasFooter ? (\n <footer\n {...restFooterProps}\n className={classNames(\"hjm-layout__footer\", footerClassName)}\n >\n {footer}\n </footer>\n ) : null}\n </div>\n );\n});\n\nexport type TextProps = Omit<HTMLAttributes<HTMLElement>, \"children\"> &\n Readonly<{\n children: ReactNode;\n as?: \"span\" | \"p\" | \"div\" | \"strong\" | \"small\";\n variant?: TextVariant;\n tone?: TextTone;\n emphasis?: TextEmphasis;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const Text = forwardRef<HTMLElement, TextProps>(function Text(\n {\n as = \"span\",\n variant = textRecipe.defaults.variant,\n tone = textRecipe.defaults.tone,\n emphasis = textRecipe.defaults.emphasis,\n className,\n layoutStyle,\n style,\n ...props\n },\n ref,\n) {\n return createElement(as, {\n ...props,\n ref,\n className: classNames(\"hjm-text\", className),\n \"data-variant\": variant,\n \"data-tone\": tone,\n \"data-emphasis\": emphasis,\n // Placement wins over the legacy `style`, matching Surface's ordering.\n style: { ...style, ...layoutStyle },\n });\n});\n\nexport type SurfaceProps = HTMLAttributes<HTMLElement> &\n Readonly<{\n as?: \"div\" | \"section\" | \"article\";\n tone?: SurfaceTone;\n bordered?: boolean;\n padding?: SurfacePadding;\n radius?: SurfaceRadius;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const Surface = forwardRef<HTMLElement, SurfaceProps>(function Surface(\n {\n as = \"div\",\n tone = surfaceDefaults.tone,\n bordered = surfaceDefaults.bordered,\n padding = surfaceDefaults.padding,\n radius = surfaceDefaults.radius,\n className,\n layoutStyle,\n style,\n ...props\n },\n ref,\n) {\n const contract = surfaceRecipe[tone];\n return createElement(as, {\n ...props,\n ref,\n className: classNames(\"hjm-surface\", className),\n \"data-tone\": tone,\n \"data-bordered\": bordered || contract.borderAlways,\n \"data-elevated\": contract.elevated,\n \"data-clips\": contract.clipsContent,\n \"data-padding\": padding,\n \"data-radius\": radius,\n style: {\n padding: surfaceGeometry.paddings[padding],\n borderRadius: surfaceGeometry.radii[radius],\n ...style,\n ...layoutStyle,\n },\n });\n});\n\nexport type StackProps = HTMLAttributes<HTMLDivElement> &\n Readonly<{\n axis?: StackAxis;\n gap?: StackGap;\n align?: StackAlign;\n justify?: StackJustify;\n wrap?: boolean;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nconst justifyValues = {\n start: \"flex-start\",\n center: \"center\",\n end: \"flex-end\",\n between: \"space-between\",\n} as const;\n\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(function Stack(\n {\n axis = stackRecipe.defaults.axis,\n gap = stackRecipe.defaults.gap,\n align = stackRecipe.defaults.align,\n justify = stackRecipe.defaults.justify,\n wrap = stackRecipe.defaults.wrap,\n className,\n layoutStyle,\n style,\n ...props\n },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={classNames(\"hjm-stack\", className)}\n data-axis={axis}\n data-gap={gap}\n style={{\n display: \"flex\",\n flexDirection: stackRecipe.axes[axis],\n gap: stackRecipe.gaps[gap],\n alignItems: align === \"start\" || align === \"end\" ? `flex-${align}` : align,\n justifyContent: justifyValues[justify],\n flexWrap: wrap ? \"wrap\" : \"nowrap\",\n ...style,\n ...layoutStyle,\n }}\n />\n );\n});\n\nexport type ContainerProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> &\n Readonly<{\n children?: ReactNode;\n size?: ContainerSize;\n gutter?: ContainerGutter;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\n/** A centered, token-guttered content boundary shared with Native large screens. */\nexport const Container = forwardRef<HTMLDivElement, ContainerProps>(function Container(\n { size, gutter, className, layoutStyle, style, ...props },\n ref,\n) {\n const resolved = resolveContainerDescriptor({\n ...(size === undefined ? {} : { size }),\n ...(gutter === undefined ? {} : { gutter }),\n });\n return (\n <div\n {...props}\n ref={ref}\n className={classNames(\"hjm-container\", className)}\n data-size={resolved.size}\n data-gutter={resolved.gutter}\n style={{\n maxInlineSize: resolved.maxWidth ?? undefined,\n paddingInline: resolved.paddingInline,\n ...style,\n ...layoutStyle,\n }}\n />\n );\n});\n\nexport type AspectRatioProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> &\n Readonly<{\n children?: ReactNode;\n ratio?: AspectRatioValue;\n }>;\n\n/** Responsive media frame. Products retain object-fit, crop, and content semantics. */\nexport const AspectRatio = forwardRef<HTMLDivElement, AspectRatioProps>(function AspectRatio(\n { ratio, className, style, ...props },\n ref,\n) {\n const resolved = resolveAspectRatioDescriptor(\n ratio === undefined ? {} : { ratio },\n );\n return (\n <div\n {...props}\n ref={ref}\n className={classNames(\"hjm-aspect-ratio\", className)}\n data-ratio={resolved.source}\n style={{ aspectRatio: resolved.ratio, ...style }}\n />\n );\n});\n\nexport type VisuallyHiddenProps = HTMLAttributes<HTMLSpanElement> &\n Readonly<{ children: ReactNode }>;\n\n/** Keeps meaningful copy available to assistive technology without visible layout. */\nexport const VisuallyHidden = forwardRef<HTMLSpanElement, VisuallyHiddenProps>(\n function VisuallyHidden({ className, ...props }, ref) {\n return (\n <span\n {...props}\n ref={ref}\n className={classNames(\"hjm-visually-hidden\", className)}\n />\n );\n },\n);\n\nexport type GridProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> &\n Pick<GridDescriptor, \"columns\" | \"gap\" | \"minColumnWidth\"> &\n Readonly<{\n children?: ReactNode;\n /** Test/SSR override. Browser renderers otherwise observe window.innerWidth. */\n windowWidth?: number;\n /** Container measurement override; ResizeObserver is used when omitted. */\n availableWidth?: number;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const Grid = forwardRef<HTMLDivElement, GridProps>(function Grid(\n {\n columns,\n gap,\n minColumnWidth,\n windowWidth,\n availableWidth,\n className,\n layoutStyle,\n style,\n ...props\n },\n forwardedRef,\n) {\n const browserWindowWidth = useWindowWidth();\n const [measuredWidth, gridRef] = useElementWidth(forwardedRef);\n const compactSsrWidth = 320;\n const effectiveWindowWidth =\n windowWidth ??\n (browserWindowWidth > 0 ? browserWindowWidth : compactSsrWidth);\n const effectiveAvailableWidth =\n availableWidth ??\n (measuredWidth !== undefined && measuredWidth > 0\n ? measuredWidth\n : effectiveWindowWidth);\n const descriptor: GridDescriptor = {\n columns,\n ...(gap === undefined ? {} : { gap }),\n ...(minColumnWidth === undefined ? {} : { minColumnWidth }),\n };\n const layout = resolveGridLayout(descriptor, {\n windowWidth: effectiveWindowWidth,\n availableWidth: effectiveAvailableWidth,\n });\n\n return (\n <div\n {...props}\n ref={gridRef}\n className={classNames(\"hjm-grid\", className)}\n data-window-class={layout.windowClass}\n data-columns={layout.columns}\n data-requested-columns={layout.requestedColumns}\n data-state={layout.columns < layout.requestedColumns ? \"collapsed\" : \"resolved\"}\n style={{\n display: \"grid\",\n gridTemplateColumns: `repeat(${layout.columns}, minmax(0, 1fr))`,\n rowGap: layout.rowGap,\n columnGap: layout.columnGap,\n ...style,\n ...layoutStyle,\n }}\n />\n );\n});\n\nexport type SectionProps = Omit<HTMLAttributes<HTMLElement>, \"children\" | \"title\"> &\n Readonly<{\n title?: ReactNode;\n description?: ReactNode;\n action?: ReactNode;\n children: ReactNode;\n headingLevel?: 2 | 3 | 4 | 5 | 6;\n }>;\n\n/** Large-text-safe semantic content section with an optional header action. */\nexport const Section = forwardRef<HTMLElement, SectionProps>(function Section(\n {\n title,\n description,\n action,\n children,\n headingLevel = 2,\n className,\n ...props\n },\n ref,\n) {\n const hasHeader = title !== undefined || description !== undefined || action !== undefined;\n return (\n <section {...props} ref={ref} className={classNames(\"hjm-section\", className)}>\n {hasHeader ? (\n <header className=\"hjm-section__header\">\n <div className=\"hjm-section__copy\">\n {title === undefined ? null : createElement(\n `h${headingLevel}`,\n { className: \"hjm-section__title\" },\n title,\n )}\n {description === undefined ? null : (\n <div className=\"hjm-section__description\">{description}</div>\n )}\n </div>\n {action === undefined ? null : <div className=\"hjm-section__action\">{action}</div>}\n </header>\n ) : null}\n <div className=\"hjm-section__content\">{children}</div>\n </section>\n );\n});\n\nexport type { GridGap };\nexport type { AspectRatioValue, ContainerGutter, ContainerSize };\n"]}
|
package/dist/provider.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ type HjmProviderEnvironmentProps = Readonly<{
|
|
|
13
13
|
direction?: DesignSystemDirection;
|
|
14
14
|
textScale?: DesignSystemTextScale;
|
|
15
15
|
reducedMotion?: boolean;
|
|
16
|
+
minimumVisualTarget?: boolean;
|
|
16
17
|
/** Deterministic SSR/test override; otherwise prefers-color-scheme is observed. */
|
|
17
18
|
systemTheme?: ResolvedTheme;
|
|
18
19
|
}>;
|
|
@@ -23,10 +24,23 @@ type HjmProviderValueProps = Readonly<{
|
|
|
23
24
|
direction?: never;
|
|
24
25
|
textScale?: never;
|
|
25
26
|
reducedMotion?: never;
|
|
27
|
+
minimumVisualTarget?: never;
|
|
26
28
|
systemTheme?: never;
|
|
27
29
|
}>;
|
|
30
|
+
/**
|
|
31
|
+
* How the provider's own host element participates in layout and painting.
|
|
32
|
+
*
|
|
33
|
+
* `surface` (default) paints the HJM background, text color and UI typography,
|
|
34
|
+
* which is what a page whose root *is* the provider needs. A product whose
|
|
35
|
+
* document root already paints its surface previously had to neutralise the
|
|
36
|
+
* host with an inline `display: contents` style, re-entering product code into
|
|
37
|
+
* the renderer boundary; `contents` is that intent as a supported axis — the
|
|
38
|
+
* element still carries the CSS variables, `dir` and data attributes.
|
|
39
|
+
*/
|
|
40
|
+
export type HjmProviderHost = "surface" | "contents";
|
|
28
41
|
export type HjmProviderProps = Omit<HTMLAttributes<HTMLDivElement>, "children" | "dir"> & Readonly<{
|
|
29
42
|
children: ReactNode;
|
|
43
|
+
host?: HjmProviderHost;
|
|
30
44
|
}> & (HjmProviderEnvironmentProps | HjmProviderValueProps);
|
|
31
45
|
export declare const HjmProvider: import("react").ForwardRefExoticComponent<HjmProviderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
32
46
|
export declare function useHjmTheme(): DesignSystemProviderValue;
|
package/dist/provider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC3B,MAAM,2DAA2D,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAErF,OAAO,EAQL,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAMf,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACxC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,IAAI,OAAO,CAAC;CAC5B,CAAC,CAAC;AAkBH,KAAK,2BAA2B,GAAG,QAAQ,CAAC;IAC1C,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mFAAmF;IACnF,WAAW,CAAC,EAAE,aAAa,CAAC;CAC7B,CAAC,CAAC;AAEH,KAAK,qBAAqB,GAAG,QAAQ,CAAC;IACpC,oEAAoE;IACpE,KAAK,EAAE,yBAAyB,CAAC;IACjC,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,WAAW,CAAC,EAAE,K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K,CAAC;IAClB,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,mBAAmB,CAAC,EAAE,KAAK,CAAC;IAC5B,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,UAAU,CAAC;AAErD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,cAAc,CAAC,cAAc,CAAC,EAC9B,UAAU,GAAG,KAAK,CACnB,GACC,QAAQ,CAAC;IACP,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB,CAAC,GAAG,CAAC,2BAA2B,GAAG,qBAAqB,CAAC,CAAC;AAE7D,eAAO,MAAM,WAAW,6GAiGvB,CAAC;AAEF,wBAAgB,WAAW,IAAI,yBAAyB,CAMvD;AAED,yFAAyF;AACzF,wBAAgB,mBAAmB,IAAI,yBAAyB,GAAG,IAAI,CAEtE;AAED,uEAAuE;AACvE,wBAAgB,qBAAqB,IAAI,kBAAkB,GAAG,IAAI,CAEjE"}
|
package/dist/provider.js
CHANGED
|
@@ -14,7 +14,7 @@ function subscribeMedia(query, callback) {
|
|
|
14
14
|
function useMediaQuery(query, observe = true) {
|
|
15
15
|
return useSyncExternalStore((callback) => observe ? subscribeMedia(query, callback) : () => undefined, () => observe && window.matchMedia(query).matches, () => false);
|
|
16
16
|
}
|
|
17
|
-
export const HjmProvider = forwardRef(function HjmProvider({ children, theme, direction, textScale, reducedMotion, systemTheme, value: suppliedValue, className, style, ...rest }, ref) {
|
|
17
|
+
export const HjmProvider = forwardRef(function HjmProvider({ children, theme, direction, textScale, reducedMotion, minimumVisualTarget, systemTheme, host = "surface", value: suppliedValue, className, style, ...rest }, ref) {
|
|
18
18
|
const parent = useContext(HjmThemeContext);
|
|
19
19
|
const observesSystem = suppliedValue === undefined;
|
|
20
20
|
const prefersDark = useMediaQuery("(prefers-color-scheme: dark)", observesSystem);
|
|
@@ -25,6 +25,7 @@ export const HjmProvider = forwardRef(function HjmProvider({ children, theme, di
|
|
|
25
25
|
...(direction === undefined ? {} : { direction }),
|
|
26
26
|
...(textScale === undefined ? {} : { textScale }),
|
|
27
27
|
...(reducedMotion === undefined ? {} : { reducedMotion }),
|
|
28
|
+
...(minimumVisualTarget === undefined ? {} : { minimumVisualTarget }),
|
|
28
29
|
};
|
|
29
30
|
const value = suppliedValue ?? resolveDesignSystemProviderValue(input, {
|
|
30
31
|
systemTheme: resolvedSystemTheme,
|
|
@@ -67,7 +68,7 @@ export const HjmProvider = forwardRef(function HjmProvider({ children, theme, di
|
|
|
67
68
|
deactivate: deactivateTooltip,
|
|
68
69
|
shouldSkipDelay: shouldSkipTooltipDelay,
|
|
69
70
|
};
|
|
70
|
-
return (_jsx(HjmThemeContext.Provider, { value: value, children: _jsx(TooltipCoordinatorContext.Provider, { value: tooltipCoordinator, children: _jsx("div", { ...rest, ref: ref, className: classNames("hjm-root", className), "data-hjm-provider": "", "data-motion": environment.reducedMotion ? "reduced" : "full", "data-theme": environment.theme, "data-text-scale": environment.textScale, dir: environment.direction, style: { ...createHjmThemeStyle(value), ...style }, children: children }) }) }));
|
|
71
|
+
return (_jsx(HjmThemeContext.Provider, { value: value, children: _jsx(TooltipCoordinatorContext.Provider, { value: tooltipCoordinator, children: _jsx("div", { ...rest, ref: ref, className: classNames("hjm-root", className), "data-hjm-provider": "", "data-host": host, "data-motion": environment.reducedMotion ? "reduced" : "full", "data-theme": environment.theme, "data-text-scale": environment.textScale, dir: environment.direction, style: { ...createHjmThemeStyle(value), ...style }, children: children }) }) }));
|
|
71
72
|
});
|
|
72
73
|
export function useHjmTheme() {
|
|
73
74
|
const value = useContext(HjmThemeContext);
|
package/dist/provider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":";AAAA,OAAO,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CAAC,WAAW,EACvC,EAAE,CACH,CAAC;IACF,MAAM,kBAAkB,GAAuB;QAC7C,QAAQ,EAAE,eAAe;QACzB,QAAQ,EAAE,eAAe;QACzB,UAAU,EAAE,iBAAiB;QAC7B,eAAe,EAAE,sBAAsB;KACxC,CAAC;IAEF,OAAO,CACL,KAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACpC,KAAC,yBAAyB,CAAC,QAAQ,IAAC,KAAK,EAAE,kBAAkB,YAC3D,iBACM,IAAI,EACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,UAAU,CAAC,UAAU,EAAE,SAAS,CAAC,uBAC1B,EAAE,iBACP,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,gBAC/C,WAAW,CAAC,KAAK,qBACZ,WAAW,CAAC,SAAS,EACtC,GAAG,EAAE,WAAW,CAAC,SAAS,EAC1B,KAAK,EAAE,EAAE,GAAG,mBAAmB,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,EAAE,YAEjD,QAAQ,GACL,GAC6B,GACZ,CAC5B,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,UAAU,WAAW;IACzB,MAAM,KAAK,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;IAC1C,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,yFAAyF;AACzF,MAAM,UAAU,mBAAmB;IACjC,OAAO,UAAU,CAAC,eAAe,CAAC,CAAC;AACrC,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,qBAAqB;IACnC,OAAO,UAAU,CAAC,yBAAyB,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["import {\n resolveDesignSystemProviderValue,\n validateDesignSystemProviderValue,\n type DesignSystemDirection,\n type DesignSystemProviderValue,\n type DesignSystemTextScale,\n} from \"@hjmds/design-contracts/components/design-system-provider\";\nimport type { ResolvedTheme, ThemePreference } from \"@hjmds/design-contracts/colors\";\nimport { tooltipBehaviorDefaults } from \"@hjmds/design-contracts/components/tooltip\";\nimport {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useRef,\n useState,\n useSyncExternalStore,\n type HTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { classNames } from \"./internal.js\";\nimport { createHjmThemeStyle } from \"./theme.js\";\n\nconst HjmThemeContext = createContext<DesignSystemProviderValue | null>(null);\n\nexport type TooltipCoordinator = Readonly<{\n activeId: string | null;\n activate(id: string): void;\n deactivate(id: string): void;\n shouldSkipDelay(): boolean;\n}>;\n\nconst TooltipCoordinatorContext = createContext<TooltipCoordinator | null>(null);\n\nfunction subscribeMedia(query: string, callback: () => void): () => void {\n const media = window.matchMedia(query);\n media.addEventListener(\"change\", callback);\n return () => media.removeEventListener(\"change\", callback);\n}\n\nfunction useMediaQuery(query: string, observe = true): boolean {\n return useSyncExternalStore(\n (callback) => observe ? subscribeMedia(query, callback) : () => undefined,\n () => observe && window.matchMedia(query).matches,\n () => false,\n );\n}\n\ntype HjmProviderEnvironmentProps = Readonly<{\n value?: never;\n theme?: ThemePreference;\n direction?: DesignSystemDirection;\n textScale?: DesignSystemTextScale;\n reducedMotion?: boolean;\n /** Deterministic SSR/test override; otherwise prefers-color-scheme is observed. */\n systemTheme?: ResolvedTheme;\n}>;\n\ntype HjmProviderValueProps = Readonly<{\n /** Complete, validated environment and semantic product palette. */\n value: DesignSystemProviderValue;\n theme?: never;\n direction?: never;\n textScale?: never;\n reducedMotion?: never;\n systemTheme?: never;\n}>;\n\nexport type HjmProviderProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n \"children\" | \"dir\"\n> &\n Readonly<{\n children: ReactNode;\n }> & (HjmProviderEnvironmentProps | HjmProviderValueProps);\n\nexport const HjmProvider = forwardRef<HTMLDivElement, HjmProviderProps>(\n function HjmProvider(\n {\n children,\n theme,\n direction,\n textScale,\n reducedMotion,\n systemTheme,\n value: suppliedValue,\n className,\n style,\n ...rest\n },\n ref,\n ) {\n const parent = useContext(HjmThemeContext);\n const observesSystem = suppliedValue === undefined;\n const prefersDark = useMediaQuery(\"(prefers-color-scheme: dark)\", observesSystem);\n const prefersReducedMotion = useMediaQuery(\n \"(prefers-reduced-motion: reduce)\",\n observesSystem,\n );\n const resolvedSystemTheme = systemTheme ?? (prefersDark ? \"dark\" : \"light\");\n const input = {\n ...(theme === undefined ? {} : { theme }),\n ...(direction === undefined ? {} : { direction }),\n ...(textScale === undefined ? {} : { textScale }),\n ...(reducedMotion === undefined ? {} : { reducedMotion }),\n };\n const value = suppliedValue ?? resolveDesignSystemProviderValue(input, {\n systemTheme: resolvedSystemTheme,\n ...(parent === null ? {} : { parent: parent.environment }),\n ...(reducedMotion === undefined && parent === null\n ? { systemReducedMotion: prefersReducedMotion }\n : {}),\n });\n validateDesignSystemProviderValue(value);\n const environment = value.environment;\n const [activeTooltipId, setActiveTooltipId] = useState<string | null>(null);\n const activeTooltipIdRef = useRef<string | null>(null);\n const lastTooltipTransitionAtRef = useRef(Number.NEGATIVE_INFINITY);\n activeTooltipIdRef.current = activeTooltipId;\n const activateTooltip = useCallback((id: string) => {\n setActiveTooltipId((current) => {\n if (current === id) return current;\n if (current !== null) lastTooltipTransitionAtRef.current = Date.now();\n activeTooltipIdRef.current = id;\n return id;\n });\n }, []);\n const deactivateTooltip = useCallback((id: string) => {\n setActiveTooltipId((current) => {\n if (current !== id) return current;\n lastTooltipTransitionAtRef.current = Date.now();\n activeTooltipIdRef.current = null;\n return null;\n });\n }, []);\n const shouldSkipTooltipDelay = useCallback(\n () =>\n activeTooltipIdRef.current !== null ||\n Date.now() - lastTooltipTransitionAtRef.current <\n tooltipBehaviorDefaults.skipDelayMs,\n [],\n );\n const tooltipCoordinator: TooltipCoordinator = {\n activeId: activeTooltipId,\n activate: activateTooltip,\n deactivate: deactivateTooltip,\n shouldSkipDelay: shouldSkipTooltipDelay,\n };\n\n return (\n <HjmThemeContext.Provider value={value}>\n <TooltipCoordinatorContext.Provider value={tooltipCoordinator}>\n <div\n {...rest}\n ref={ref}\n className={classNames(\"hjm-root\", className)}\n data-hjm-provider=\"\"\n data-motion={environment.reducedMotion ? \"reduced\" : \"full\"}\n data-theme={environment.theme}\n data-text-scale={environment.textScale}\n dir={environment.direction}\n style={{ ...createHjmThemeStyle(value), ...style }}\n >\n {children}\n </div>\n </TooltipCoordinatorContext.Provider>\n </HjmThemeContext.Provider>\n );\n },\n);\n\nexport function useHjmTheme(): DesignSystemProviderValue {\n const value = useContext(HjmThemeContext);\n if (value === null) {\n throw new Error(\"useHjmTheme must be used inside HjmProvider\");\n }\n return value;\n}\n\n/** Renderer components use the browser default direction when no provider is present. */\nexport function useOptionalHjmTheme(): DesignSystemProviderValue | null {\n return useContext(HjmThemeContext);\n}\n\n/** Internal provider-scoped coordination used by Tooltip renderers. */\nexport function useTooltipCoordinator(): TooltipCoordinator | null {\n return useContext(TooltipCoordinatorContext);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,gCAAgC,EAChC,iCAAiC,GAIlC,MAAM,2DAA2D,CAAC;AAEnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EACL,aAAa,EACb,UAAU,EACV,WAAW,EACX,UAAU,EACV,MAAM,EACN,QAAQ,EACR,oBAAoB,GAGrB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,eAAe,GAAG,aAAa,CAAmC,IAAI,CAAC,CAAC;AAS9E,MAAM,yBAAyB,GAAG,aAAa,CAA4B,IAAI,CAAC,CAAC;AAEjF,SAAS,cAAc,CAAC,KAAa,EAAE,QAAoB;IACzD,MAAM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,SAAS,EAAE,UAAU,CAAC,UAAU,EAAE,SAAS,CAAC,uBAC1B,EAAE,eACT,IAAI,iBACF,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,gBAC/C,WAAW,CAAC,KAAK,qBACZ,WAAW,CAAC,SAAS,EACtC,GAAG,EAAE,WAAW,CAAC,SAAS,EAC1B,KAAK,EAAE,EAAE,GAAG,mBAAmB,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,EAAE,YAEjD,QAAQ,GACL,GAC6B,GACZ,CAC5B,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,UAAU,WAAW;IACzB,MAAM,KAAK,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;IAC1C,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,yFAAyF;AACzF,MAAM,UAAU,mBAAmB;IACjC,OAAO,UAAU,CAAC,eAAe,CAAC,CAAC;AACrC,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,qBAAqB;IACnC,OAAO,UAAU,CAAC,yBAAyB,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["import {\n resolveDesignSystemProviderValue,\n validateDesignSystemProviderValue,\n type DesignSystemDirection,\n type DesignSystemProviderValue,\n type DesignSystemTextScale,\n} from \"@hjmds/design-contracts/components/design-system-provider\";\nimport type { ResolvedTheme, ThemePreference } from \"@hjmds/design-contracts/colors\";\nimport { tooltipBehaviorDefaults } from \"@hjmds/design-contracts/components/tooltip\";\nimport {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useRef,\n useState,\n useSyncExternalStore,\n type HTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { classNames } from \"./internal.js\";\nimport { createHjmThemeStyle } from \"./theme.js\";\n\nconst HjmThemeContext = createContext<DesignSystemProviderValue | null>(null);\n\nexport type TooltipCoordinator = Readonly<{\n activeId: string | null;\n activate(id: string): void;\n deactivate(id: string): void;\n shouldSkipDelay(): boolean;\n}>;\n\nconst TooltipCoordinatorContext = createContext<TooltipCoordinator | null>(null);\n\nfunction subscribeMedia(query: string, callback: () => void): () => void {\n const media = window.matchMedia(query);\n media.addEventListener(\"change\", callback);\n return () => media.removeEventListener(\"change\", callback);\n}\n\nfunction useMediaQuery(query: string, observe = true): boolean {\n return useSyncExternalStore(\n (callback) => observe ? subscribeMedia(query, callback) : () => undefined,\n () => observe && window.matchMedia(query).matches,\n () => false,\n );\n}\n\ntype HjmProviderEnvironmentProps = Readonly<{\n value?: never;\n theme?: ThemePreference;\n direction?: DesignSystemDirection;\n textScale?: DesignSystemTextScale;\n reducedMotion?: boolean;\n minimumVisualTarget?: boolean;\n /** Deterministic SSR/test override; otherwise prefers-color-scheme is observed. */\n systemTheme?: ResolvedTheme;\n}>;\n\ntype HjmProviderValueProps = Readonly<{\n /** Complete, validated environment and semantic product palette. */\n value: DesignSystemProviderValue;\n theme?: never;\n direction?: never;\n textScale?: never;\n reducedMotion?: never;\n minimumVisualTarget?: never;\n systemTheme?: never;\n}>;\n\n/**\n * How the provider's own host element participates in layout and painting.\n *\n * `surface` (default) paints the HJM background, text color and UI typography,\n * which is what a page whose root *is* the provider needs. A product whose\n * document root already paints its surface previously had to neutralise the\n * host with an inline `display: contents` style, re-entering product code into\n * the renderer boundary; `contents` is that intent as a supported axis — the\n * element still carries the CSS variables, `dir` and data attributes.\n */\nexport type HjmProviderHost = \"surface\" | \"contents\";\n\nexport type HjmProviderProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n \"children\" | \"dir\"\n> &\n Readonly<{\n children: ReactNode;\n host?: HjmProviderHost;\n }> & (HjmProviderEnvironmentProps | HjmProviderValueProps);\n\nexport const HjmProvider = forwardRef<HTMLDivElement, HjmProviderProps>(\n function HjmProvider(\n {\n children,\n theme,\n direction,\n textScale,\n reducedMotion,\n minimumVisualTarget,\n systemTheme,\n host = \"surface\",\n value: suppliedValue,\n className,\n style,\n ...rest\n },\n ref,\n ) {\n const parent = useContext(HjmThemeContext);\n const observesSystem = suppliedValue === undefined;\n const prefersDark = useMediaQuery(\"(prefers-color-scheme: dark)\", observesSystem);\n const prefersReducedMotion = useMediaQuery(\n \"(prefers-reduced-motion: reduce)\",\n observesSystem,\n );\n const resolvedSystemTheme = systemTheme ?? (prefersDark ? \"dark\" : \"light\");\n const input = {\n ...(theme === undefined ? {} : { theme }),\n ...(direction === undefined ? {} : { direction }),\n ...(textScale === undefined ? {} : { textScale }),\n ...(reducedMotion === undefined ? {} : { reducedMotion }),\n ...(minimumVisualTarget === undefined ? {} : { minimumVisualTarget }),\n };\n const value = suppliedValue ?? resolveDesignSystemProviderValue(input, {\n systemTheme: resolvedSystemTheme,\n ...(parent === null ? {} : { parent: parent.environment }),\n ...(reducedMotion === undefined && parent === null\n ? { systemReducedMotion: prefersReducedMotion }\n : {}),\n });\n validateDesignSystemProviderValue(value);\n const environment = value.environment;\n const [activeTooltipId, setActiveTooltipId] = useState<string | null>(null);\n const activeTooltipIdRef = useRef<string | null>(null);\n const lastTooltipTransitionAtRef = useRef(Number.NEGATIVE_INFINITY);\n activeTooltipIdRef.current = activeTooltipId;\n const activateTooltip = useCallback((id: string) => {\n setActiveTooltipId((current) => {\n if (current === id) return current;\n if (current !== null) lastTooltipTransitionAtRef.current = Date.now();\n activeTooltipIdRef.current = id;\n return id;\n });\n }, []);\n const deactivateTooltip = useCallback((id: string) => {\n setActiveTooltipId((current) => {\n if (current !== id) return current;\n lastTooltipTransitionAtRef.current = Date.now();\n activeTooltipIdRef.current = null;\n return null;\n });\n }, []);\n const shouldSkipTooltipDelay = useCallback(\n () =>\n activeTooltipIdRef.current !== null ||\n Date.now() - lastTooltipTransitionAtRef.current <\n tooltipBehaviorDefaults.skipDelayMs,\n [],\n );\n const tooltipCoordinator: TooltipCoordinator = {\n activeId: activeTooltipId,\n activate: activateTooltip,\n deactivate: deactivateTooltip,\n shouldSkipDelay: shouldSkipTooltipDelay,\n };\n\n return (\n <HjmThemeContext.Provider value={value}>\n <TooltipCoordinatorContext.Provider value={tooltipCoordinator}>\n <div\n {...rest}\n ref={ref}\n className={classNames(\"hjm-root\", className)}\n data-hjm-provider=\"\"\n data-host={host}\n data-motion={environment.reducedMotion ? \"reduced\" : \"full\"}\n data-theme={environment.theme}\n data-text-scale={environment.textScale}\n dir={environment.direction}\n style={{ ...createHjmThemeStyle(value), ...style }}\n >\n {children}\n </div>\n </TooltipCoordinatorContext.Provider>\n </HjmThemeContext.Provider>\n );\n },\n);\n\nexport function useHjmTheme(): DesignSystemProviderValue {\n const value = useContext(HjmThemeContext);\n if (value === null) {\n throw new Error(\"useHjmTheme must be used inside HjmProvider\");\n }\n return value;\n}\n\n/** Renderer components use the browser default direction when no provider is present. */\nexport function useOptionalHjmTheme(): DesignSystemProviderValue | null {\n return useContext(HjmThemeContext);\n}\n\n/** Internal provider-scoped coordination used by Tooltip renderers. */\nexport function useTooltipCoordinator(): TooltipCoordinator | null {\n return useContext(TooltipCoordinatorContext);\n}\n"]}
|
package/dist/selection.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { chipRecipe, type SegmentedControlSize, type SelectionControlPresentation, type SelectionControlSize, type SelectionGroupOrientation, type SelectionGroupPresentation } from "@hjmds/design-contracts/recipes";
|
|
1
|
+
import { chipRecipe, type SegmentedControlSize, type SelectionControlPresentation, type SelectionControlSize, type SelectionGroupOrientation, type SelectionGroupPresentation, type SwitchSize } from "@hjmds/design-contracts/recipes";
|
|
2
|
+
export type { SwitchSize };
|
|
2
3
|
import { type CheckboxGroupSelection, type SelectionItemDescriptor } from "@hjmds/design-contracts/behaviors";
|
|
3
4
|
import { type ButtonHTMLAttributes, type ChangeEvent, type FieldsetHTMLAttributes, type InputHTMLAttributes, type MouseEvent, type ReactElement, type ReactNode, type RefAttributes } from "react";
|
|
4
5
|
import type { HjmCompositionStyleProp } from "./composition-style.js";
|
|
@@ -126,6 +127,8 @@ export type SwitchProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "role" |
|
|
|
126
127
|
label: ReactNode;
|
|
127
128
|
checked?: boolean;
|
|
128
129
|
defaultChecked?: boolean;
|
|
130
|
+
/** Track and thumb geometry from `switchRecipe.sizes`. */
|
|
131
|
+
size?: SwitchSize;
|
|
129
132
|
onCheckedChange?: (checked: boolean) => void;
|
|
130
133
|
/** Canonical layout-only placement. Controlled visual keys are excluded. */
|
|
131
134
|
layoutStyle?: HjmCompositionStyleProp;
|
|
@@ -134,6 +137,8 @@ export declare const Switch: import("react").ForwardRefExoticComponent<Omit<Butt
|
|
|
134
137
|
label: ReactNode;
|
|
135
138
|
checked?: boolean;
|
|
136
139
|
defaultChecked?: boolean;
|
|
140
|
+
/** Track and thumb geometry from `switchRecipe.sizes`. */
|
|
141
|
+
size?: SwitchSize;
|
|
137
142
|
onCheckedChange?: (checked: boolean) => void;
|
|
138
143
|
/** Canonical layout-only placement. Controlled visual keys are excluded. */
|
|
139
144
|
layoutStyle?: HjmCompositionStyleProp;
|
|
@@ -161,5 +166,4 @@ export declare const SegmentedControl: import("react").ForwardRefExoticComponent
|
|
|
161
166
|
size?: SegmentedControlSize;
|
|
162
167
|
name?: string;
|
|
163
168
|
}> & RefAttributes<HTMLFieldSetElement>>;
|
|
164
|
-
export {};
|
|
165
169
|
//# sourceMappingURL=selection.d.ts.map
|
package/dist/selection.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../src/selection.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,
|
|
1
|
+
{"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../src/selection.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAMV,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EACjC,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B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"react/jsx-runtime";
|
|
2
|
-
import { chipRecipe, iconRecipe, segmentedControlRecipe, selectionControlRecipe, selectionGroupRecipe, } from "@hjmds/design-contracts/recipes";
|
|
2
|
+
import { chipRecipe, iconRecipe, segmentedControlRecipe, selectionControlRecipe, selectionGroupRecipe, switchRecipe, } from "@hjmds/design-contracts/recipes";
|
|
3
3
|
import { resolveControlAccessibleName, reconcileCheckboxSelection, reconcileRadioSelection, resolveInitialRadioValue, toggleCheckboxSelection, validateCheckboxSelection, validateRadioSelection, } from "@hjmds/design-contracts/behaviors";
|
|
4
4
|
import { forwardRef, useEffect, useId, useRef, } from "react";
|
|
5
5
|
import { classNames, composeRefs, useControllableState } from "./internal.js";
|
|
@@ -175,13 +175,13 @@ export const RadioGroup = forwardRef(function RadioGroup({ label, accessibilityL
|
|
|
175
175
|
}) })) : null, _jsxs("span", { className: "hjm-choice__copy", children: [_jsx("span", { children: item.label }), item.description ? (_jsx("span", { className: "hjm-choice__description", children: item.description })) : null] })] }, item.value));
|
|
176
176
|
}) }), error ? _jsx("div", { id: errorId, className: "hjm-field__error", children: error }) : null] }));
|
|
177
177
|
});
|
|
178
|
-
export const Switch = forwardRef(function Switch({ label, checked: checkedProp, defaultChecked = false, onCheckedChange, disabled, type = "button", className, onClick, layoutStyle, style, ...props }, ref) {
|
|
178
|
+
export const Switch = forwardRef(function Switch({ label, checked: checkedProp, defaultChecked = false, size = switchRecipe.defaults.size, onCheckedChange, disabled, type = "button", className, onClick, layoutStyle, style, ...props }, ref) {
|
|
179
179
|
const [checked, setChecked] = useControllableState({
|
|
180
180
|
...(checkedProp === undefined ? {} : { value: checkedProp }),
|
|
181
181
|
defaultValue: defaultChecked,
|
|
182
182
|
...(onCheckedChange === undefined ? {} : { onChange: onCheckedChange }),
|
|
183
183
|
});
|
|
184
|
-
return (_jsxs("button", { ...props, style: { ...style, ...layoutStyle }, ref: ref, type: type, role: "switch", className: classNames("hjm-switch", className), "data-state": checked ? "checked" : "unchecked", "aria-checked": checked, disabled: disabled, onClick: (event) => {
|
|
184
|
+
return (_jsxs("button", { ...props, style: { ...style, ...layoutStyle }, ref: ref, type: type, role: "switch", className: classNames("hjm-switch", className), "data-size": size, "data-state": checked ? "checked" : "unchecked", "aria-checked": checked, disabled: disabled, onClick: (event) => {
|
|
185
185
|
setChecked((current) => !current);
|
|
186
186
|
onClick?.(event);
|
|
187
187
|
}, children: [_jsx("span", { className: "hjm-switch__track", "aria-hidden": "true", children: _jsx("span", { className: "hjm-switch__thumb" }) }), _jsx("span", { children: label })] }));
|