@invoiceonline/ui-react 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +99 -0
- package/CHANGELOG.md +131 -0
- package/LICENSE +9 -0
- package/README.md +78 -2
- package/dist/assets/label-brush-1.svg +6 -0
- package/dist/assets/pattern-dark.svg +113 -0
- package/dist/components/action-row/ActionRow.d.ts +178 -0
- package/dist/components/action-row/ActionRow.js +340 -0
- package/dist/components/action-row/index.d.ts +2 -0
- package/dist/components/action-row/index.js +1 -0
- package/dist/components/alert/Alert.d.ts +314 -0
- package/dist/components/alert/Alert.js +446 -0
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/alert/index.js +1 -0
- package/dist/components/anchored-panel/AnchoredPanel.d.ts +41 -0
- package/dist/components/anchored-panel/AnchoredPanel.js +72 -0
- package/dist/components/anchored-panel/index.d.ts +3 -0
- package/dist/components/anchored-panel/index.js +3 -0
- package/dist/components/badge/Badge.d.ts +146 -0
- package/dist/components/badge/Badge.js +258 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/badge/index.js +1 -0
- package/dist/components/banner/Banner.d.ts +209 -0
- package/dist/components/banner/Banner.js +339 -0
- package/dist/components/banner/index.d.ts +2 -0
- package/dist/components/banner/index.js +1 -0
- package/dist/components/button/Button.d.ts +54 -0
- package/dist/components/button/Button.js +312 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/index.js +1 -0
- package/dist/components/button-group/ButtonGroup.d.ts +187 -0
- package/dist/components/button-group/ButtonGroup.js +217 -0
- package/dist/components/button-group/index.d.ts +2 -0
- package/dist/components/button-group/index.js +1 -0
- package/dist/components/card-select/CardSelect.d.ts +274 -0
- package/dist/components/card-select/CardSelect.js +561 -0
- package/dist/components/card-select/CardSelectGroup.d.ts +92 -0
- package/dist/components/card-select/CardSelectGroup.js +72 -0
- package/dist/components/card-select/index.d.ts +3 -0
- package/dist/components/card-select/index.js +3 -0
- package/dist/components/checkbox/Checkbox.d.ts +104 -0
- package/dist/components/checkbox/Checkbox.js +194 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox/index.js +1 -0
- package/dist/components/chip/Chip.d.ts +250 -0
- package/dist/components/chip/Chip.js +441 -0
- package/dist/components/chip/index.d.ts +2 -0
- package/dist/components/chip/index.js +1 -0
- package/dist/components/column-header/ColumnHeader.d.ts +144 -0
- package/dist/components/column-header/ColumnHeader.js +209 -0
- package/dist/components/column-header/index.d.ts +2 -0
- package/dist/components/column-header/index.js +1 -0
- package/dist/components/combobox-field/Combobox.d.ts +104 -0
- package/dist/components/combobox-field/Combobox.js +355 -0
- package/dist/components/combobox-field/ComboboxField.d.ts +76 -0
- package/dist/components/combobox-field/ComboboxField.js +98 -0
- package/dist/components/combobox-field/index.d.ts +3 -0
- package/dist/components/combobox-field/index.js +3 -0
- package/dist/components/date-field/DateField.d.ts +52 -0
- package/dist/components/date-field/DateField.js +45 -0
- package/dist/components/date-field/index.d.ts +2 -0
- package/dist/components/date-field/index.js +1 -0
- package/dist/components/date-picker/DatePicker.d.ts +53 -0
- package/dist/components/date-picker/DatePicker.js +329 -0
- package/dist/components/date-picker/index.d.ts +2 -0
- package/dist/components/date-picker/index.js +1 -0
- package/dist/components/divider/Divider.d.ts +81 -0
- package/dist/components/divider/Divider.js +93 -0
- package/dist/components/divider/index.d.ts +2 -0
- package/dist/components/divider/index.js +1 -0
- package/dist/components/drawer/Drawer.d.ts +128 -0
- package/dist/components/drawer/Drawer.js +367 -0
- package/dist/components/drawer/index.d.ts +2 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/dropdown-button/DropdownButton.d.ts +72 -0
- package/dist/components/dropdown-button/DropdownButton.js +122 -0
- package/dist/components/dropdown-button/index.d.ts +2 -0
- package/dist/components/dropdown-button/index.js +1 -0
- package/dist/components/faq/FAQ.d.ts +135 -0
- package/dist/components/faq/FAQ.js +258 -0
- package/dist/components/faq/index.d.ts +2 -0
- package/dist/components/faq/index.js +1 -0
- package/dist/components/field/Field.d.ts +118 -0
- package/dist/components/field/Field.js +327 -0
- package/dist/components/field/index.d.ts +2 -0
- package/dist/components/field/index.js +1 -0
- package/dist/components/field-pair/FieldPair.d.ts +194 -0
- package/dist/components/field-pair/FieldPair.js +321 -0
- package/dist/components/field-pair/index.d.ts +2 -0
- package/dist/components/field-pair/index.js +1 -0
- package/dist/components/file-upload/FileUpload.d.ts +137 -0
- package/dist/components/file-upload/FileUpload.js +434 -0
- package/dist/components/file-upload/index.d.ts +2 -0
- package/dist/components/file-upload/index.js +1 -0
- package/dist/components/filter-chip/FilterChip.d.ts +373 -0
- package/dist/components/filter-chip/FilterChip.js +517 -0
- package/dist/components/filter-chip/index.d.ts +2 -0
- package/dist/components/filter-chip/index.js +1 -0
- package/dist/components/filter-facet/FilterFacet.d.ts +116 -0
- package/dist/components/filter-facet/FilterFacet.js +632 -0
- package/dist/components/filter-facet/index.d.ts +2 -0
- package/dist/components/filter-facet/index.js +1 -0
- package/dist/components/firm-avatar/FirmAvatar.d.ts +75 -0
- package/dist/components/firm-avatar/FirmAvatar.js +119 -0
- package/dist/components/firm-avatar/index.d.ts +2 -0
- package/dist/components/firm-avatar/index.js +1 -0
- package/dist/components/form-actions/FormActions.d.ts +123 -0
- package/dist/components/form-actions/FormActions.js +195 -0
- package/dist/components/form-actions/index.d.ts +2 -0
- package/dist/components/form-actions/index.js +1 -0
- package/dist/components/form-block/FormBlock.d.ts +252 -0
- package/dist/components/form-block/FormBlock.js +420 -0
- package/dist/components/form-block/index.d.ts +3 -0
- package/dist/components/form-block/index.js +3 -0
- package/dist/components/form-section/FormSection.d.ts +130 -0
- package/dist/components/form-section/FormSection.js +206 -0
- package/dist/components/form-section/index.d.ts +2 -0
- package/dist/components/form-section/index.js +1 -0
- package/dist/components/heading/Heading.d.ts +69 -0
- package/dist/components/heading/Heading.js +79 -0
- package/dist/components/heading/index.d.ts +2 -0
- package/dist/components/heading/index.js +1 -0
- package/dist/components/heading-group/HeadingGroup.d.ts +258 -0
- package/dist/components/heading-group/HeadingGroup.js +255 -0
- package/dist/components/heading-group/index.d.ts +2 -0
- package/dist/components/heading-group/index.js +1 -0
- package/dist/components/hero/Hero.d.ts +268 -0
- package/dist/components/hero/Hero.js +316 -0
- package/dist/components/hero/index.d.ts +2 -0
- package/dist/components/hero/index.js +1 -0
- package/dist/components/icon/Icon.d.ts +27 -0
- package/dist/components/icon/Icon.js +30 -0
- package/dist/components/icon/index.d.ts +3 -0
- package/dist/components/icon/index.js +3 -0
- package/dist/components/icon-button/IconButton.d.ts +75 -0
- package/dist/components/icon-button/IconButton.js +151 -0
- package/dist/components/icon-button/index.d.ts +2 -0
- package/dist/components/icon-button/index.js +1 -0
- package/dist/components/item-row/ItemRow.d.ts +253 -0
- package/dist/components/item-row/ItemRow.js +496 -0
- package/dist/components/item-row/index.d.ts +2 -0
- package/dist/components/item-row/index.js +1 -0
- package/dist/components/list-row/ListRow.d.ts +165 -0
- package/dist/components/list-row/ListRow.js +233 -0
- package/dist/components/list-row/index.d.ts +2 -0
- package/dist/components/list-row/index.js +1 -0
- package/dist/components/menu/Menu.d.ts +64 -0
- package/dist/components/menu/Menu.js +186 -0
- package/dist/components/menu/index.d.ts +2 -0
- package/dist/components/menu/index.js +1 -0
- package/dist/components/modal/Modal.d.ts +272 -0
- package/dist/components/modal/Modal.js +788 -0
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/modal/index.js +1 -0
- package/dist/components/nav-link/NavLink.d.ts +123 -0
- package/dist/components/nav-link/NavLink.js +157 -0
- package/dist/components/nav-link/index.d.ts +2 -0
- package/dist/components/nav-link/index.js +1 -0
- package/dist/components/number-field/NumberField.d.ts +62 -0
- package/dist/components/number-field/NumberField.js +210 -0
- package/dist/components/number-field/index.d.ts +2 -0
- package/dist/components/number-field/index.js +1 -0
- package/dist/components/pagination/Pagination.d.ts +133 -0
- package/dist/components/pagination/Pagination.js +217 -0
- package/dist/components/pagination/index.d.ts +3 -0
- package/dist/components/pagination/index.js +3 -0
- package/dist/components/popover-surface/index.d.ts +2 -0
- package/dist/components/popover-surface/index.js +1 -0
- package/dist/components/progress-bar/ProgressBar.d.ts +260 -0
- package/dist/components/progress-bar/ProgressBar.js +470 -0
- package/dist/components/progress-bar/index.d.ts +2 -0
- package/dist/components/progress-bar/index.js +1 -0
- package/dist/components/promo-sticker/PromoSticker.d.ts +204 -0
- package/dist/components/promo-sticker/PromoSticker.js +177 -0
- package/dist/components/promo-sticker/index.d.ts +2 -0
- package/dist/components/promo-sticker/index.js +1 -0
- package/dist/components/promo-surface/PromoSurface.d.ts +94 -0
- package/dist/components/promo-surface/PromoSurface.js +119 -0
- package/dist/components/promo-surface/index.d.ts +2 -0
- package/dist/components/promo-surface/index.js +1 -0
- package/dist/components/radio/Radio.d.ts +92 -0
- package/dist/components/radio/Radio.js +171 -0
- package/dist/components/radio/index.d.ts +2 -0
- package/dist/components/radio/index.js +1 -0
- package/dist/components/radio-group/RadioGroup.d.ts +61 -0
- package/dist/components/radio-group/RadioGroup.js +51 -0
- package/dist/components/radio-group/index.d.ts +2 -0
- package/dist/components/radio-group/index.js +1 -0
- package/dist/components/select/Select.d.ts +65 -0
- package/dist/components/select/Select.js +176 -0
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/index.js +1 -0
- package/dist/components/select-field/SelectField.d.ts +16 -0
- package/dist/components/select-field/SelectField.js +55 -0
- package/dist/components/select-field/index.d.ts +2 -0
- package/dist/components/select-field/index.js +1 -0
- package/dist/components/skeleton/Skeleton.d.ts +64 -0
- package/dist/components/skeleton/Skeleton.js +65 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/index.js +1 -0
- package/dist/components/split-button/SplitButton.d.ts +80 -0
- package/dist/components/split-button/SplitButton.js +182 -0
- package/dist/components/split-button/index.d.ts +2 -0
- package/dist/components/split-button/index.js +1 -0
- package/dist/components/status-summary-bar/StatusSummaryBar.d.ts +118 -0
- package/dist/components/status-summary-bar/StatusSummaryBar.js +278 -0
- package/dist/components/status-summary-bar/index.d.ts +2 -0
- package/dist/components/status-summary-bar/index.js +1 -0
- package/dist/components/subject-lookup-field/SubjectLookupField.d.ts +157 -0
- package/dist/components/subject-lookup-field/SubjectLookupField.js +663 -0
- package/dist/components/subject-lookup-field/index.d.ts +2 -0
- package/dist/components/subject-lookup-field/index.js +1 -0
- package/dist/components/switch/Switch.d.ts +152 -0
- package/dist/components/switch/Switch.js +307 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/index.js +1 -0
- package/dist/components/table/Table.d.ts +5 -0
- package/dist/components/table/Table.js +601 -0
- package/dist/components/table/index.d.ts +6 -0
- package/dist/components/table/index.js +6 -0
- package/dist/components/text-field/TextField.d.ts +65 -0
- package/dist/components/text-field/TextField.js +173 -0
- package/dist/components/text-field/index.d.ts +2 -0
- package/dist/components/text-field/index.js +1 -0
- package/dist/components/text-link/TextLink.d.ts +260 -0
- package/dist/components/text-link/TextLink.js +303 -0
- package/dist/components/text-link/index.d.ts +2 -0
- package/dist/components/text-link/index.js +1 -0
- package/dist/components/textarea/Textarea.d.ts +93 -0
- package/dist/components/textarea/Textarea.js +256 -0
- package/dist/components/textarea/index.d.ts +2 -0
- package/dist/components/textarea/index.js +1 -0
- package/dist/components/tooltip/Tooltip.d.ts +129 -0
- package/dist/components/tooltip/Tooltip.js +457 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/components/unit-field/UnitField.d.ts +46 -0
- package/dist/components/unit-field/UnitField.js +133 -0
- package/dist/components/unit-field/index.d.ts +2 -0
- package/dist/components/unit-field/index.js +1 -0
- package/dist/icons/icon-registry.generated.js +500 -0
- package/dist/icons/icon-types.generated.d.ts +2 -0
- package/dist/icons/icon-types.generated.js +126 -0
- package/dist/index.d.ts +132 -0
- package/dist/index.js +75 -0
- package/dist/internal/BottomSheet.js +496 -0
- package/dist/internal/FodsProvider.d.ts +25 -0
- package/dist/internal/FodsProvider.js +32 -0
- package/dist/internal/MotionCaret.js +35 -0
- package/dist/internal/NumberFormatInput.d.ts +21 -0
- package/dist/internal/NumberFormatInput.js +126 -0
- package/dist/internal/SummaryDonut.d.ts +3 -0
- package/dist/internal/SummaryDonut.js +300 -0
- package/dist/internal/buttonSegment.d.ts +44 -0
- package/dist/internal/buttonSegment.js +126 -0
- package/dist/internal/collapseRoom.js +128 -0
- package/dist/internal/comboboxKeys.js +44 -0
- package/dist/internal/contentPresence.js +46 -0
- package/dist/internal/dayCell.js +95 -0
- package/dist/internal/dialogPortal.d.ts +2 -0
- package/dist/internal/dialogPortal.js +21 -0
- package/dist/internal/donutSweeps.js +65 -0
- package/dist/internal/enterOnViewGeometry.js +46 -0
- package/dist/internal/faqItem.js +80 -0
- package/dist/internal/floatingLabelMotion.js +68 -0
- package/dist/internal/formBlockContext.d.ts +22 -0
- package/dist/internal/formBlockContext.js +20 -0
- package/dist/internal/heightRoom.js +87 -0
- package/dist/internal/numberSeparators.js +62 -0
- package/dist/internal/overlayMotion.js +48 -0
- package/dist/internal/paginationItem.d.ts +8 -0
- package/dist/internal/paginationItem.js +22 -0
- package/dist/internal/popoverSurface.d.ts +8 -0
- package/dist/internal/popoverSurface.js +23 -0
- package/dist/internal/portalContainer.d.ts +1 -0
- package/dist/internal/portalContainer.js +6 -0
- package/dist/internal/progressBarItem.d.ts +207 -0
- package/dist/internal/progressBarItem.js +264 -0
- package/dist/internal/selectionControlText.js +12 -0
- package/dist/internal/statusSummaryParts.js +371 -0
- package/dist/internal/summaryMotion.js +75 -0
- package/dist/internal/table/ChildConnector.js +62 -0
- package/dist/internal/table/ChildRowPrefix.d.ts +9 -0
- package/dist/internal/table/ChildRowPrefix.js +27 -0
- package/dist/internal/table/ColumnSettings.js +135 -0
- package/dist/internal/table/ScrollRegion.js +114 -0
- package/dist/internal/table/TableEmpty.js +93 -0
- package/dist/internal/table/TableLayout.d.ts +17 -0
- package/dist/internal/table/TableLayout.js +29 -0
- package/dist/internal/table/TableLoadStatus.js +56 -0
- package/dist/internal/table/TableMobile.js +488 -0
- package/dist/internal/table/TruncatedCell.js +33 -0
- package/dist/internal/table/emptyValue.js +10 -0
- package/dist/internal/table/features.d.ts +41 -0
- package/dist/internal/table/features.js +31 -0
- package/dist/internal/table/recipes.js +227 -0
- package/dist/internal/table/rowClick.js +9 -0
- package/dist/internal/table/types.d.ts +325 -0
- package/dist/internal/table/types.js +13 -0
- package/dist/internal/tailwind-variants.d.ts +3 -0
- package/dist/internal/tailwind-variants.js +37 -0
- package/dist/internal/tooltipContext.js +5 -0
- package/dist/internal/tw-merge-config.generated.js +314 -0
- package/dist/internal/useAnchoredPanel.d.ts +87 -0
- package/dist/internal/useAnchoredPanel.js +108 -0
- package/dist/internal/useCountUp.js +53 -0
- package/dist/internal/useDateFieldTrigger.js +183 -0
- package/dist/internal/useEChart.js +59 -0
- package/dist/internal/useEnterOnView.js +42 -0
- package/dist/internal/useFloatingBar.js +100 -0
- package/dist/internal/useFormReset.js +37 -0
- package/dist/internal/useIsMobile.js +44 -0
- package/dist/internal/useOneRowOverflow.js +88 -0
- package/dist/internal/usePrefersReducedMotion.js +25 -0
- package/dist/internal/useReturnFocus.js +26 -0
- package/dist/internal/utils.d.ts +7 -0
- package/dist/internal/utils.js +58 -0
- package/dist/node_modules/@tanstack/store/dist/store.d.ts +29 -0
- package/dist/node_modules/@tanstack/store/dist/types.d.ts +38 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/cells/coreCellsFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/cells/coreCellsFeature.types.d.ts +53 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/columns/coreColumnsFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/columns/coreColumnsFeature.types.d.ts +90 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/coreFeatures.d.ts +17 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/headers/coreHeadersFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/headers/coreHeadersFeature.types.d.ts +114 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/reactivity/coreReactivityFeature.types.d.ts +51 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/row-models/coreRowModelsFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/row-models/coreRowModelsFeature.types.d.ts +29 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/rows/coreRowsFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/rows/coreRowsFeature.types.d.ts +129 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/table/coreTablesFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/table/coreTablesFeature.types.d.ts +203 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/cell-selection/cellSelectionFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/cell-selection/cellSelectionFeature.types.d.ts +294 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/cell-spanning/cellSpanningFeature.d.ts +11 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/cell-spanning/cellSpanningFeature.types.d.ts +148 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-faceting/columnFacetingFeature.d.ts +12 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-faceting/columnFacetingFeature.types.d.ts +63 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-filtering/columnFilteringFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-filtering/columnFilteringFeature.types.d.ts +209 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-filtering/filterFns.d.ts +35 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-grouping/columnGroupingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-grouping/columnGroupingFeature.types.d.ts +128 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-ordering/columnOrderingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-ordering/columnOrderingFeature.types.d.ts +82 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-pinning/columnPinningFeature.d.ts +11 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-pinning/columnPinningFeature.types.d.ts +195 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-resizing/columnResizingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-resizing/columnResizingFeature.types.d.ts +73 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-sizing/columnSizingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-sizing/columnSizingFeature.types.d.ts +134 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-visibility/columnVisibilityFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-visibility/columnVisibilityFeature.types.d.ts +92 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/global-filtering/globalFilteringFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/global-filtering/globalFilteringFeature.types.d.ts +67 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-aggregation/aggregationFns.d.ts +23 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-aggregation/rowAggregationFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-aggregation/rowAggregationFeature.types.d.ts +183 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-aggregation/rowAggregationFeature.utils.d.ts +18 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-expanding/rowExpandingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-expanding/rowExpandingFeature.types.d.ts +125 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-pagination/rowPaginationFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-pagination/rowPaginationFeature.types.d.ts +135 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-pinning/rowPinningFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-pinning/rowPinningFeature.types.d.ts +76 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-selection/rowSelectionFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-selection/rowSelectionFeature.types.d.ts +187 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-sorting/rowSortingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-sorting/rowSortingFeature.types.d.ts +236 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-sorting/sortFns.d.ts +23 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/stockFeatures.d.ts +37 -0
- package/dist/node_modules/@tanstack/table-core/dist/helpers/columnHelper.d.ts +47 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/Cell.d.ts +16 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/Column.d.ts +30 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/ColumnDef.d.ts +123 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/Header.d.ts +12 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/HeaderGroup.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/Row.d.ts +24 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/RowModel.d.ts +19 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/RowModelFns.d.ts +11 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/Table.d.ts +53 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/TableFeatures.d.ts +416 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/TableOptions.d.ts +78 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/TableState.d.ts +46 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/type-utils.d.ts +25 -0
- package/dist/shared.css +179 -0
- package/dist/styles.css +5467 -0
- package/dist/theme.css +314 -0
- package/dist/theme.map.json +278 -0
- package/dist/tokens/index.d.ts +2 -0
- package/dist/tokens/index.js +1 -0
- package/dist/tokens/tokens.generated.d.ts +2040 -0
- package/dist/tokens/tokens.generated.js +2053 -0
- package/dist/tokens.css +484 -0
- package/dist/tokens.flat.json +429 -0
- package/docs/Consuming.mdx +379 -0
- package/docs/Contributing.mdx +78 -0
- package/docs/ForAgents.mdx +53 -0
- package/docs/Introduction.mdx +54 -0
- package/llms.txt +556 -0
- package/package.json +357 -4
- package/src/components/action-row/ActionRow.mdx +686 -0
- package/src/components/action-row/ActionRow.stories.tsx +669 -0
- package/src/components/action-row/ActionRow.tsx +632 -0
- package/src/components/action-row/index.ts +9 -0
- package/src/components/alert/Alert.mdx +377 -0
- package/src/components/alert/Alert.stories.tsx +674 -0
- package/src/components/alert/Alert.tsx +579 -0
- package/src/components/alert/index.ts +13 -0
- package/src/components/anchored-panel/AnchoredPanel.mdx +381 -0
- package/src/components/anchored-panel/AnchoredPanel.stories.tsx +593 -0
- package/src/components/anchored-panel/AnchoredPanel.tsx +176 -0
- package/src/components/anchored-panel/index.ts +15 -0
- package/src/components/badge/Badge.mdx +487 -0
- package/src/components/badge/Badge.stories.tsx +375 -0
- package/src/components/badge/Badge.tsx +360 -0
- package/src/components/badge/index.ts +10 -0
- package/src/components/banner/Banner.mdx +704 -0
- package/src/components/banner/Banner.stories.tsx +448 -0
- package/src/components/banner/Banner.tsx +602 -0
- package/src/components/banner/index.ts +14 -0
- package/src/components/button/Button.mdx +286 -0
- package/src/components/button/Button.stories.tsx +381 -0
- package/src/components/button/Button.tsx +384 -0
- package/src/components/button/index.ts +1 -0
- package/src/components/button-group/ButtonGroup.mdx +512 -0
- package/src/components/button-group/ButtonGroup.stories.tsx +714 -0
- package/src/components/button-group/ButtonGroup.tsx +491 -0
- package/src/components/button-group/index.ts +10 -0
- package/src/components/card-select/CardSelect.mdx +662 -0
- package/src/components/card-select/CardSelect.stories.tsx +784 -0
- package/src/components/card-select/CardSelect.tsx +783 -0
- package/src/components/card-select/CardSelectGroup.tsx +169 -0
- package/src/components/card-select/index.ts +18 -0
- package/src/components/checkbox/Checkbox.mdx +269 -0
- package/src/components/checkbox/Checkbox.stories.tsx +306 -0
- package/src/components/checkbox/Checkbox.tsx +343 -0
- package/src/components/checkbox/index.ts +1 -0
- package/src/components/chip/Chip.mdx +683 -0
- package/src/components/chip/Chip.stories.tsx +734 -0
- package/src/components/chip/Chip.tsx +732 -0
- package/src/components/chip/index.ts +9 -0
- package/src/components/column-header/ColumnHeader.mdx +301 -0
- package/src/components/column-header/ColumnHeader.stories.tsx +319 -0
- package/src/components/column-header/ColumnHeader.tsx +287 -0
- package/src/components/column-header/index.ts +7 -0
- package/src/components/combobox-field/Combobox.tsx +693 -0
- package/src/components/combobox-field/ComboboxField.mdx +525 -0
- package/src/components/combobox-field/ComboboxField.stories.tsx +502 -0
- package/src/components/combobox-field/ComboboxField.tsx +259 -0
- package/src/components/combobox-field/index.ts +12 -0
- package/src/components/date-field/DateField.mdx +340 -0
- package/src/components/date-field/DateField.stories.tsx +221 -0
- package/src/components/date-field/DateField.tsx +176 -0
- package/src/components/date-field/index.ts +1 -0
- package/src/components/date-picker/DatePicker.mdx +436 -0
- package/src/components/date-picker/DatePicker.stories.tsx +458 -0
- package/src/components/date-picker/DatePicker.tsx +688 -0
- package/src/components/date-picker/index.ts +9 -0
- package/src/components/divider/Divider.mdx +256 -0
- package/src/components/divider/Divider.stories.tsx +177 -0
- package/src/components/divider/Divider.tsx +193 -0
- package/src/components/divider/index.ts +1 -0
- package/src/components/drawer/Drawer.mdx +518 -0
- package/src/components/drawer/Drawer.stories.tsx +392 -0
- package/src/components/drawer/Drawer.tsx +683 -0
- package/src/components/drawer/index.ts +1 -0
- package/src/components/dropdown-button/DropdownButton.mdx +285 -0
- package/src/components/dropdown-button/DropdownButton.stories.tsx +398 -0
- package/src/components/dropdown-button/DropdownButton.tsx +198 -0
- package/src/components/dropdown-button/index.ts +7 -0
- package/src/components/faq/FAQ.mdx +364 -0
- package/src/components/faq/FAQ.stories.tsx +343 -0
- package/src/components/faq/FAQ.tsx +337 -0
- package/src/components/faq/index.ts +1 -0
- package/src/components/field/Field.mdx +129 -0
- package/src/components/field/Field.stories.tsx +461 -0
- package/src/components/field/Field.tsx +765 -0
- package/src/components/field/index.ts +20 -0
- package/src/components/field-pair/FieldPair.mdx +308 -0
- package/src/components/field-pair/FieldPair.stories.tsx +530 -0
- package/src/components/field-pair/FieldPair.tsx +796 -0
- package/src/components/field-pair/index.ts +9 -0
- package/src/components/file-upload/FileUpload.mdx +345 -0
- package/src/components/file-upload/FileUpload.stories.tsx +698 -0
- package/src/components/file-upload/FileUpload.tsx +802 -0
- package/src/components/file-upload/index.ts +6 -0
- package/src/components/filter-chip/FilterChip.mdx +778 -0
- package/src/components/filter-chip/FilterChip.stories.tsx +827 -0
- package/src/components/filter-chip/FilterChip.tsx +881 -0
- package/src/components/filter-chip/index.ts +11 -0
- package/src/components/filter-facet/FilterFacet.mdx +536 -0
- package/src/components/filter-facet/FilterFacet.stories.tsx +506 -0
- package/src/components/filter-facet/FilterFacet.tsx +1160 -0
- package/src/components/filter-facet/index.ts +7 -0
- package/src/components/firm-avatar/FirmAvatar.mdx +280 -0
- package/src/components/firm-avatar/FirmAvatar.stories.tsx +147 -0
- package/src/components/firm-avatar/FirmAvatar.tsx +172 -0
- package/src/components/firm-avatar/index.ts +7 -0
- package/src/components/form-actions/FormActions.mdx +518 -0
- package/src/components/form-actions/FormActions.stories.tsx +621 -0
- package/src/components/form-actions/FormActions.tsx +273 -0
- package/src/components/form-actions/index.ts +6 -0
- package/src/components/form-block/FormBlock.mdx +728 -0
- package/src/components/form-block/FormBlock.stories.tsx +813 -0
- package/src/components/form-block/FormBlock.tsx +679 -0
- package/src/components/form-block/index.ts +13 -0
- package/src/components/form-section/FormSection.mdx +436 -0
- package/src/components/form-section/FormSection.stories.tsx +407 -0
- package/src/components/form-section/FormSection.tsx +290 -0
- package/src/components/form-section/index.ts +17 -0
- package/src/components/heading/Heading.mdx +206 -0
- package/src/components/heading/Heading.stories.tsx +169 -0
- package/src/components/heading/Heading.tsx +124 -0
- package/src/components/heading/index.ts +8 -0
- package/src/components/heading-group/HeadingGroup.mdx +521 -0
- package/src/components/heading-group/HeadingGroup.stories.tsx +353 -0
- package/src/components/heading-group/HeadingGroup.tsx +396 -0
- package/src/components/heading-group/index.ts +7 -0
- package/src/components/hero/Hero.mdx +742 -0
- package/src/components/hero/Hero.stories.tsx +527 -0
- package/src/components/hero/Hero.tsx +807 -0
- package/src/components/hero/index.ts +1 -0
- package/src/components/icon/Icon.mdx +329 -0
- package/src/components/icon/Icon.stories.tsx +398 -0
- package/src/components/icon/Icon.tsx +97 -0
- package/src/components/icon/index.ts +2 -0
- package/src/components/icon-button/IconButton.mdx +206 -0
- package/src/components/icon-button/IconButton.stories.tsx +341 -0
- package/src/components/icon-button/IconButton.tsx +273 -0
- package/src/components/icon-button/index.ts +1 -0
- package/src/components/item-row/ItemRow.mdx +533 -0
- package/src/components/item-row/ItemRow.stories.tsx +434 -0
- package/src/components/item-row/ItemRow.tsx +676 -0
- package/src/components/item-row/index.ts +9 -0
- package/src/components/list-row/ListRow.mdx +404 -0
- package/src/components/list-row/ListRow.stories.tsx +404 -0
- package/src/components/list-row/ListRow.tsx +424 -0
- package/src/components/list-row/index.ts +1 -0
- package/src/components/menu/Menu.mdx +268 -0
- package/src/components/menu/Menu.stories.tsx +455 -0
- package/src/components/menu/Menu.tsx +452 -0
- package/src/components/menu/index.ts +1 -0
- package/src/components/modal/Modal.mdx +854 -0
- package/src/components/modal/Modal.stories.tsx +881 -0
- package/src/components/modal/Modal.tsx +1434 -0
- package/src/components/modal/index.ts +1 -0
- package/src/components/nav-link/NavLink.mdx +196 -0
- package/src/components/nav-link/NavLink.stories.tsx +243 -0
- package/src/components/nav-link/NavLink.tsx +222 -0
- package/src/components/nav-link/index.ts +1 -0
- package/src/components/number-field/NumberField.mdx +223 -0
- package/src/components/number-field/NumberField.stories.tsx +291 -0
- package/src/components/number-field/NumberField.tsx +388 -0
- package/src/components/number-field/index.ts +6 -0
- package/src/components/pagination/Pagination.mdx +305 -0
- package/src/components/pagination/Pagination.stories.tsx +333 -0
- package/src/components/pagination/Pagination.tsx +343 -0
- package/src/components/pagination/index.ts +8 -0
- package/src/components/popover-surface/PopoverSurface.mdx +158 -0
- package/src/components/popover-surface/PopoverSurface.stories.tsx +421 -0
- package/src/components/popover-surface/index.ts +1 -0
- package/src/components/progress-bar/ProgressBar.mdx +802 -0
- package/src/components/progress-bar/ProgressBar.stories.tsx +533 -0
- package/src/components/progress-bar/ProgressBar.tsx +654 -0
- package/src/components/progress-bar/index.ts +9 -0
- package/src/components/promo-sticker/PromoSticker.mdx +436 -0
- package/src/components/promo-sticker/PromoSticker.stories.tsx +363 -0
- package/src/components/promo-sticker/PromoSticker.tsx +313 -0
- package/src/components/promo-sticker/index.ts +7 -0
- package/src/components/promo-surface/PromoSurface.mdx +399 -0
- package/src/components/promo-surface/PromoSurface.stories.tsx +270 -0
- package/src/components/promo-surface/PromoSurface.tsx +305 -0
- package/src/components/promo-surface/index.ts +7 -0
- package/src/components/radio/Radio.mdx +243 -0
- package/src/components/radio/Radio.stories.tsx +307 -0
- package/src/components/radio/Radio.tsx +288 -0
- package/src/components/radio/index.ts +1 -0
- package/src/components/radio-group/RadioGroup.mdx +119 -0
- package/src/components/radio-group/RadioGroup.stories.tsx +225 -0
- package/src/components/radio-group/RadioGroup.tsx +139 -0
- package/src/components/radio-group/index.ts +1 -0
- package/src/components/select/Select.mdx +241 -0
- package/src/components/select/Select.stories.tsx +404 -0
- package/src/components/select/Select.tsx +381 -0
- package/src/components/select/index.ts +1 -0
- package/src/components/select-field/SelectField.mdx +324 -0
- package/src/components/select-field/SelectField.stories.tsx +460 -0
- package/src/components/select-field/SelectField.tsx +138 -0
- package/src/components/select-field/index.ts +1 -0
- package/src/components/skeleton/Skeleton.mdx +194 -0
- package/src/components/skeleton/Skeleton.stories.tsx +260 -0
- package/src/components/skeleton/Skeleton.tsx +107 -0
- package/src/components/skeleton/index.ts +1 -0
- package/src/components/split-button/SplitButton.mdx +445 -0
- package/src/components/split-button/SplitButton.stories.tsx +465 -0
- package/src/components/split-button/SplitButton.tsx +361 -0
- package/src/components/split-button/index.ts +7 -0
- package/src/components/status-summary-bar/StatusSummaryBar.mdx +338 -0
- package/src/components/status-summary-bar/StatusSummaryBar.stories.tsx +408 -0
- package/src/components/status-summary-bar/StatusSummaryBar.tsx +428 -0
- package/src/components/status-summary-bar/index.ts +8 -0
- package/src/components/subject-lookup-field/SubjectLookupField.mdx +378 -0
- package/src/components/subject-lookup-field/SubjectLookupField.stories.tsx +393 -0
- package/src/components/subject-lookup-field/SubjectLookupField.tsx +1079 -0
- package/src/components/subject-lookup-field/index.ts +11 -0
- package/src/components/switch/Switch.mdx +376 -0
- package/src/components/switch/Switch.stories.tsx +296 -0
- package/src/components/switch/Switch.tsx +483 -0
- package/src/components/switch/index.ts +1 -0
- package/src/components/table/Table.mdx +575 -0
- package/src/components/table/Table.stories.tsx +1049 -0
- package/src/components/table/Table.tsx +745 -0
- package/src/components/table/TableConsumers.stories.tsx +195 -0
- package/src/components/table/_tableFixtures.ts +1189 -0
- package/src/components/table/index.ts +22 -0
- package/src/components/text-field/TextField.mdx +479 -0
- package/src/components/text-field/TextField.stories.tsx +366 -0
- package/src/components/text-field/TextField.tsx +391 -0
- package/src/components/text-field/index.ts +8 -0
- package/src/components/text-link/TextLink.mdx +353 -0
- package/src/components/text-link/TextLink.stories.tsx +458 -0
- package/src/components/text-link/TextLink.tsx +504 -0
- package/src/components/text-link/index.ts +10 -0
- package/src/components/textarea/Textarea.mdx +244 -0
- package/src/components/textarea/Textarea.stories.tsx +371 -0
- package/src/components/textarea/Textarea.tsx +489 -0
- package/src/components/textarea/index.ts +9 -0
- package/src/components/tooltip/Tooltip.mdx +462 -0
- package/src/components/tooltip/Tooltip.stories.tsx +500 -0
- package/src/components/tooltip/Tooltip.tsx +756 -0
- package/src/components/tooltip/index.ts +13 -0
- package/src/components/unit-field/UnitField.mdx +215 -0
- package/src/components/unit-field/UnitField.stories.tsx +291 -0
- package/src/components/unit-field/UnitField.tsx +255 -0
- package/src/components/unit-field/index.ts +7 -0
- package/src/icons/icon-registry.generated.ts +510 -0
- package/src/icons/icon-types.generated.ts +256 -0
- package/src/index.ts +71 -0
- package/src/internal/BottomSheet.tsx +714 -0
- package/src/internal/FodsProvider.tsx +36 -0
- package/src/internal/MotionCaret.tsx +53 -0
- package/src/internal/NumberFormatInput.tsx +276 -0
- package/src/internal/SummaryDonut.tsx +359 -0
- package/src/internal/buttonSegment.ts +241 -0
- package/src/internal/collapseRoom.ts +130 -0
- package/src/internal/comboboxKeys.ts +90 -0
- package/src/internal/contentPresence.ts +46 -0
- package/src/internal/dayCell.ts +274 -0
- package/src/internal/dialogPortal.ts +50 -0
- package/src/internal/donutSweeps.ts +77 -0
- package/src/internal/enterOnViewGeometry.ts +53 -0
- package/src/internal/faqItem.ts +104 -0
- package/src/internal/floatingLabelMotion.tsx +109 -0
- package/src/internal/formBlockContext.ts +27 -0
- package/src/internal/heightRoom.ts +135 -0
- package/src/internal/numberSeparators.ts +93 -0
- package/src/internal/overlayMotion.tsx +32 -0
- package/src/internal/paginationItem.ts +106 -0
- package/src/internal/popoverSurface.ts +78 -0
- package/src/internal/portalContainer.ts +11 -0
- package/src/internal/progressBarItem.ts +356 -0
- package/src/internal/selectionControlText.ts +42 -0
- package/src/internal/statusSummaryParts.tsx +475 -0
- package/src/internal/summaryMotion.ts +111 -0
- package/src/internal/table/ChildConnector.tsx +57 -0
- package/src/internal/table/ChildRowPrefix.tsx +21 -0
- package/src/internal/table/ColumnSettings.tsx +194 -0
- package/src/internal/table/ScrollRegion.tsx +176 -0
- package/src/internal/table/TableEmpty.tsx +99 -0
- package/src/internal/table/TableLayout.tsx +29 -0
- package/src/internal/table/TableLoadStatus.tsx +60 -0
- package/src/internal/table/TableMobile.tsx +582 -0
- package/src/internal/table/TruncatedCell.tsx +35 -0
- package/src/internal/table/emptyValue.ts +11 -0
- package/src/internal/table/features.ts +44 -0
- package/src/internal/table/recipes.ts +263 -0
- package/src/internal/table/rowClick.ts +8 -0
- package/src/internal/table/types.ts +342 -0
- package/src/internal/tailwind-variants.ts +65 -0
- package/src/internal/tooltipContext.ts +15 -0
- package/src/internal/tw-merge-config.generated.ts +275 -0
- package/src/internal/useAnchoredPanel.ts +340 -0
- package/src/internal/useCountUp.ts +65 -0
- package/src/internal/useDateFieldTrigger.tsx +357 -0
- package/src/internal/useEChart.ts +88 -0
- package/src/internal/useEnterOnView.ts +80 -0
- package/src/internal/useFloatingBar.ts +125 -0
- package/src/internal/useFormReset.ts +47 -0
- package/src/internal/useIsMobile.ts +64 -0
- package/src/internal/useNoImplicitSubmit.ts +41 -0
- package/src/internal/useOneRowOverflow.ts +103 -0
- package/src/internal/usePrefersReducedMotion.ts +27 -0
- package/src/internal/useReturnFocus.ts +34 -0
- package/src/internal/utils.ts +58 -0
- package/src/recipes/EmptyState.stories.tsx +105 -0
- package/src/recipes/Form.stories.tsx +355 -0
- package/src/recipes/ModalWithForm.stories.tsx +219 -0
- package/src/recipes/Recipes.mdx +61 -0
- package/src/recipes/TableWithFilters.stories.tsx +278 -0
- package/src/storybook/FodsFamily.tsx +39 -0
- package/src/storybook/Section.tsx +36 -0
- package/src/storybook/a11y.ts +24 -0
- package/src/storybook/assets/banner-character-bartender.webp +0 -0
- package/src/storybook/assets/banner-invoice-sheet-left.webp +0 -0
- package/src/storybook/assets/banner-invoice-sheet-right.webp +0 -0
- package/src/storybook/assets/invoice-hero.webp +0 -0
- package/src/storybook/assets/invoice.webp +0 -0
- package/src/storybook/assets/section-document-info.svg +21 -0
- package/src/storybook/assets/section-gear-checklist.svg +11 -0
- package/src/storybook/assets/section-person-arrow-in.svg +15 -0
- package/src/storybook/assets/section-person-arrow-out.svg +22 -0
- package/src/storybook/assets/section-receipt-dollar.svg +23 -0
- package/src/storybook/assets/table-empty-folder-empty.png +0 -0
- package/src/storybook/assets/table-empty-folder-magnifying-glass.png +0 -0
- package/src/storybook/assets/table-empty-funnel.png +0 -0
- package/src/storybook/assets/table-empty-load-failed.png +0 -0
- package/src/storybook/assets/wallet-spot.png +0 -0
- package/src/storybook/assets.d.ts +17 -0
- package/src/storybook/componentDoc.ts +41 -0
- package/src/storybook/fitFrame.tsx +70 -0
- package/src/storybook/forceStates.tsx +647 -0
- package/src/storybook/illustrations.tsx +66 -0
- package/src/storybook/viewportFrame.tsx +58 -0
- package/src/styles/assets/label-brush-1.svg +6 -0
- package/src/styles/assets/pattern-dark.svg +113 -0
- package/src/styles/base.css +106 -0
- package/src/styles/index.css +15 -0
- package/src/styles/motion.css +157 -0
- package/src/styles/promo-sticker.css +27 -0
- package/src/styles/promo-surface.css +49 -0
- package/src/styles/shared.css +11 -0
- package/src/styles/theme.generated.css +314 -0
- package/src/styles/theme.map.json +278 -0
- package/src/styles/tracking.generated.css +12 -0
- package/src/tokens/index.ts +4 -0
- package/src/tokens/tokens.generated.ts +542 -0
|
@@ -0,0 +1,742 @@
|
|
|
1
|
+
import { Meta, Canvas, Controls } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as HeroStories from './Hero.stories';
|
|
3
|
+
import { ViewportFrame } from '../../storybook/viewportFrame';
|
|
4
|
+
|
|
5
|
+
<Meta of={HeroStories} tags={['autodocs']} />
|
|
6
|
+
|
|
7
|
+
# Hero
|
|
8
|
+
|
|
9
|
+
## Metadata
|
|
10
|
+
|
|
11
|
+
- **Layer:** organism
|
|
12
|
+
- **Kind:** region
|
|
13
|
+
- **Status:** draft
|
|
14
|
+
- **Tokens used:** `--font-body`, `--font-decorative`, `--font-heading`, `--font-size-4xl`, `--font-size-display-d2`, `--font-size-lg`, `--font-weight-bold`, `--leading-compact`, `--leading-relaxed`, `--radius-800`, `--secondary-foreground`, `--secondary-tint-foreground`, `--size-illustration-spot`, `--space-1000`, `--space-1200`, `--space-400`, `--space-600`, `--space-800`, `--space-900`, `--text-inverted`, `--text-primary`, `--text-wrap-body`, `--text-wrap-heading`
|
|
15
|
+
- **Manifest version:** `1.5.4`
|
|
16
|
+
- **Storybook:** [design-system-organisms-hero](?path=/docs/design-system-organisms-hero--docs)
|
|
17
|
+
|
|
18
|
+
## Overview
|
|
19
|
+
|
|
20
|
+
**Hero** is the first-screen panel of a public page — a promo plaque carrying the page's single
|
|
21
|
+
claim, at most two actions, and (where the page has one) one image. Place it at the top of a
|
|
22
|
+
landing page, the homepage, the news index, or the register search.
|
|
23
|
+
|
|
24
|
+
**Do not** use it for in-app cards, sections or callouts. The plaque comes from
|
|
25
|
+
[PromoSurface](?path=/docs/design-system-atoms-promosurface--docs), a public-page-only atom, and
|
|
26
|
+
Hero inherits that restriction. `visual="off"` is **not** a fallback for a missing image; it is the
|
|
27
|
+
deliberate centred-hero composition for pages that never had one.
|
|
28
|
+
|
|
29
|
+
## Rationale
|
|
30
|
+
|
|
31
|
+
Hero exists so that every public page gets one first-screen plaque instead of each page
|
|
32
|
+
hand-building its own promo panel — while the shared chrome (fill, tiled pattern, veil) stays out
|
|
33
|
+
of Hero's own variant matrix, because it is delegated whole to PromoSurface. Hero paints nothing:
|
|
34
|
+
the root carries no fill and no border, and the surface renders as an absolutely positioned sibling
|
|
35
|
+
behind the content.
|
|
36
|
+
|
|
37
|
+
The **Breakpoint** axis carries the sizing because the anatomy genuinely reflows per breakpoint
|
|
38
|
+
(side-by-side above `lg`, stacked below). **Visual** is a second, independent axis, because it
|
|
39
|
+
changes the composition itself rather than toggling one element on an otherwise-identical layout.
|
|
40
|
+
|
|
41
|
+
## Anatomy
|
|
42
|
+
|
|
43
|
+
Twelve parts, each tagged with `data-fods-part`. PromoSurface is **not** a wrapper — it is an
|
|
44
|
+
absolutely positioned sibling *behind* the content, which is why `panel`, `text-column` and `image`
|
|
45
|
+
are `relative` (an absolutely positioned sibling would otherwise paint over static in-flow
|
|
46
|
+
siblings; no `z-index` needed).
|
|
47
|
+
|
|
48
|
+
<table>
|
|
49
|
+
<thead>
|
|
50
|
+
<tr><th><code>data-fods-part</code></th><th>Element</th><th>Role</th><th>Chrome / tokens</th></tr>
|
|
51
|
+
</thead>
|
|
52
|
+
<tbody>
|
|
53
|
+
<tr>
|
|
54
|
+
<td><code>root</code></td><td><code><section></code></td>
|
|
55
|
+
<td>The region. Full width of the page container it is dropped into; holds the panel and the optional sub strip.</td>
|
|
56
|
+
<td>No fill, no border. Vertical padding <code>--space-600</code> → <code>--space-800</code> (the side gutter is the container's, see Sizes), gap <code>--space-800</code> / <code>--space-900</code></td>
|
|
57
|
+
</tr>
|
|
58
|
+
<tr>
|
|
59
|
+
<td><code>panel</code></td><td><code><div></code></td>
|
|
60
|
+
<td>The plaque. Column below <code>lg</code>; a row at <code>lg</code> and up when <code>visual="on"</code>.</td>
|
|
61
|
+
<td><code>--radius-800</code> (matches PromoSurface); ink per <code>surface</code>. Vertical padding <code>--space-1200</code> (64) below <code>lg</code> — top always, bottom at <code>visual="off"</code> only — and none from <code>lg</code> up (see Sizes)</td>
|
|
62
|
+
</tr>
|
|
63
|
+
<tr>
|
|
64
|
+
<td><code>text-column</code></td><td><code><div></code></td>
|
|
65
|
+
<td>Format icon + copy block + actions.</td>
|
|
66
|
+
<td>Gap <code>--space-900</code> (copy → actions); padding per breakpoint (see Sizes)</td>
|
|
67
|
+
</tr>
|
|
68
|
+
<tr>
|
|
69
|
+
<td><code>format-icon</code></td><td><code><span aria-hidden></code></td>
|
|
70
|
+
<td>Optional document-format ARTWORK — the format's own mark, not an icon glyph. Never stretched; the artwork is fitted whole (<code>object-fit: contain</code>), never cropped.</td>
|
|
71
|
+
<td>Square 48×48 (<code>--size-illustration-spot</code>) at every breakpoint. From <code>lg</code> hangs left of the text column, top-aligned with the copy block (level with the kicker), and bleeds <code>--space-700</code> past the panel edge at <code>lg</code>, 19px at <code>xl</code></td>
|
|
72
|
+
</tr>
|
|
73
|
+
<tr>
|
|
74
|
+
<td><code>copy</code></td><td><code><div></code></td>
|
|
75
|
+
<td>Title group + body, capped at the <code>--ds-content-narrow</code> measure (580).</td>
|
|
76
|
+
<td>Gap <code>--space-600</code></td>
|
|
77
|
+
</tr>
|
|
78
|
+
<tr>
|
|
79
|
+
<td><code>title-group</code></td><td><code><div></code></td>
|
|
80
|
+
<td>Kicker + heading. The inner tier of the two-tier copy block.</td>
|
|
81
|
+
<td>Gap <code>--space-400</code></td>
|
|
82
|
+
</tr>
|
|
83
|
+
<tr>
|
|
84
|
+
<td><code>kicker</code></td><td><code><p></code></td>
|
|
85
|
+
<td>The line above the heading. A plain paragraph — never a heading.</td>
|
|
86
|
+
<td>Caveat, <code>--font-size-lg</code> → <code>--font-size-4xl</code> from <code>md</code>; leading in <strong>px</strong> — 26 / 40 (see Sizes); ink <code>--secondary-tint-foreground</code> on <code>brand</code> / <code>utility</code>, inherited from the panel on <code>solid</code> / <code>inverse</code></td>
|
|
87
|
+
</tr>
|
|
88
|
+
<tr>
|
|
89
|
+
<td><code>heading</code></td><td><code><h1></code></td>
|
|
90
|
+
<td>The page claim. Exactly one per page.</td>
|
|
91
|
+
<td>Poppins, <code>--font-weight-bold</code>, <code>--font-size-display-d2</code>, <code>--leading-compact</code>, balanced wrapping</td>
|
|
92
|
+
</tr>
|
|
93
|
+
<tr>
|
|
94
|
+
<td><code>body</code></td><td><code><p></code> / <code><div></code></td>
|
|
95
|
+
<td>The paragraph under the heading. <code><p></code> for the <code>body</code> prop, <code><div></code> for <code>bodyHtml</code> — see API.</td>
|
|
96
|
+
<td>Inter, Body/XL — <code>--font-size-lg</code> (20) at every breakpoint, <code>--leading-relaxed</code>; ink <code>--secondary-tint-foreground</code> on <code>brand</code> / <code>utility</code>, inherited from the panel on <code>solid</code> / <code>inverse</code></td>
|
|
97
|
+
</tr>
|
|
98
|
+
<tr>
|
|
99
|
+
<td><code>actions</code></td><td><code><div></code></td>
|
|
100
|
+
<td>ONE block — a button group, a search field or featured content. Up to 2 children. Accepts <code>Button</code> (one filled CTA, optionally a second Tertiary one) and <code>TextField</code> (<code>type="search"</code>, the register-search hero); featured content is composed content, not a component (1.5.4).</td>
|
|
101
|
+
<td>Gap <code>--space-400</code>; capped at <code>--ds-content-narrow</code> (580) or <code>--ds-content-medium</code> (786) per <code>actionsWidth</code></td>
|
|
102
|
+
</tr>
|
|
103
|
+
<tr>
|
|
104
|
+
<td><code>image</code></td><td><code><div></code></td>
|
|
105
|
+
<td>The visual. Present only when <code>visual="on"</code> — at <code>off</code> the panel has no image child at all.</td>
|
|
106
|
+
<td><code>overflow-hidden</code> + <code>--radius-800</code> on the bottom corners (right corners from <code>lg</code>)</td>
|
|
107
|
+
</tr>
|
|
108
|
+
<tr>
|
|
109
|
+
<td><code>sub</code></td><td><code><div></code></td>
|
|
110
|
+
<td>Optional strip under the plaque. Column below <code>md</code>, row from <code>md</code> up.</td>
|
|
111
|
+
<td>None — it sits OUTSIDE the plaque fill, so no radius, no background, no plaque ink</td>
|
|
112
|
+
</tr>
|
|
113
|
+
</tbody>
|
|
114
|
+
</table>
|
|
115
|
+
|
|
116
|
+
### Six implementation details worth knowing
|
|
117
|
+
|
|
118
|
+
1. **`visual="on"` renders two PromoSurface instances**, one `lg:hidden` and one `hidden lg:block`.
|
|
119
|
+
PromoSurface turns its `layout` prop into per-instance inline CSS custom properties for the veil
|
|
120
|
+
geometry, and an inline style cannot carry a media query — so a single instance can never be
|
|
121
|
+
responsive. `visual="off"` needs only one instance, because its layout is the same at every
|
|
122
|
+
breakpoint.
|
|
123
|
+
2. **`overflow-hidden` sits on the image slot, not on the panel.** The panel must let the format
|
|
124
|
+
icon bleed past its edge (a signature bleed, not a bug), while the image must be clipped. One
|
|
125
|
+
clip on the shared ancestor cannot do both — which is why the radius is repeated on the image
|
|
126
|
+
slot.
|
|
127
|
+
3. **The copy block is two-tier, and the three gaps are a ladder.** `title-group` (kicker →
|
|
128
|
+
heading) at `--space-400`, `copy` (title-group → body) at `--space-600`, `text-column`
|
|
129
|
+
(copy → actions) at `--space-900`. It was a single flat `--space-500` across all three runs
|
|
130
|
+
until the manifest adopted the Heading Group D2 gap ladder; the break before Actions has to
|
|
131
|
+
read as visibly larger than either gap inside the copy.
|
|
132
|
+
4. **The body is Body/XL (20) at every breakpoint**, one class with no `md:` pair — the Typography
|
|
133
|
+
collection does not step Body styles. It is the promo-plaque carve-out: a plaque's body is a
|
|
134
|
+
lead paragraph, so it does *not* take the Heading Group ladder's D2 → Body/L default. Banner
|
|
135
|
+
holds the same Body/XL under the same rule.
|
|
136
|
+
5. **The kicker's leading is written in px, and that is sanctioned.** `text-styles.json` sets
|
|
137
|
+
`lineHeight` to `null` on both Caveat styles: *"Caveat binds px leading on purpose — its sizes
|
|
138
|
+
are not responsive, so px cannot drift, and a ratio token for one decorative style would widen
|
|
139
|
+
the scale for nothing."* `--leading-compact` is 1.3 and would render Caveat/32 at 41.6 against
|
|
140
|
+
the drawn 40.
|
|
141
|
+
6. **The heading is a single `text-display-d2` class, not a pair with an `md:` step.** The
|
|
142
|
+
`--font-size-display-d2` token carries the responsive 40 → 32 step itself, via an override in
|
|
143
|
+
`@media (max-width: 767px)`. Adding `md:text-display-d3` is a trap: `d3` has its own override
|
|
144
|
+
down to 26px, so the mobile heading would come out too small. (This was a real review finding
|
|
145
|
+
on this component.)
|
|
146
|
+
|
|
147
|
+
## Variants
|
|
148
|
+
|
|
149
|
+
Twelve variants — **Breakpoint** (XL · LG · MD · SM · Mobile) × **Visual** (On · Off), plus the sparse **Actions width** axis (Narrow · Medium) documented below. Only one of the
|
|
150
|
+
two axes is a prop: **Breakpoint is not a prop**, it is pure CSS responsiveness (`intent.sizing`:
|
|
151
|
+
"No size axis — Breakpoint IS the sizing"). Figma breakpoint → Tailwind prefix: Mobile = unprefixed,
|
|
152
|
+
SM = `sm:`, MD = `md:`, LG = `lg:`, XL = `xl:`.
|
|
153
|
+
|
|
154
|
+
The Matrix story shows the compositional cells at one viewport — Visual (rows) × `surface`
|
|
155
|
+
(columns). The Breakpoint axis cannot be shown in a grid at all, because Tailwind's responsive
|
|
156
|
+
prefixes key off the viewport rather than a wrapper's width; that is what the per-breakpoint stories
|
|
157
|
+
under **Sizes** are for.
|
|
158
|
+
|
|
159
|
+
{/* Docs canvases render inline at the column width, where no breakpoint applies — so the
|
|
160
|
+
responsive stories are framed at their real viewport and scaled to fit. */}
|
|
161
|
+
<ViewportFrame storyId="design-system-organisms-hero--matrix" width={1280} label="Matrix · XL — viewport 1280, cap 1270" />
|
|
162
|
+
|
|
163
|
+
<table>
|
|
164
|
+
<thead>
|
|
165
|
+
<tr><th><code>visual</code></th><th>When</th><th>Composition</th></tr>
|
|
166
|
+
</thead>
|
|
167
|
+
<tbody>
|
|
168
|
+
<tr>
|
|
169
|
+
<td><code>on</code></td>
|
|
170
|
+
<td>The page has an image.</td>
|
|
171
|
+
<td>Panel becomes a row at <code>lg</code>: text column beside the image. Below <code>lg</code> the image stacks under the copy at full panel width.</td>
|
|
172
|
+
</tr>
|
|
173
|
+
<tr>
|
|
174
|
+
<td><code>off</code></td>
|
|
175
|
+
<td>The page has no image — deliberately, not as a fallback.</td>
|
|
176
|
+
<td>Panel is centred and text-centred, the text column is full width, and copy + actions are centred at <strong>every</strong> breakpoint. No image child exists.</td>
|
|
177
|
+
</tr>
|
|
178
|
+
</tbody>
|
|
179
|
+
</table>
|
|
180
|
+
|
|
181
|
+
<Canvas of={HeroStories.CentredNoVisual} />
|
|
182
|
+
|
|
183
|
+
### Text alignment follows the composition, not the variant
|
|
184
|
+
|
|
185
|
+
`regions.text-column.align`: stacked is centred, side-by-side is left. That is the **same** `lg`
|
|
186
|
+
seam the PromoSurface layout swap below uses, and for the same reason — below it the copy sits
|
|
187
|
+
*above* the image, so centring is what balances the column; from `lg` up it sits *beside* the image
|
|
188
|
+
and centring would push the text away from the edge it should align to.
|
|
189
|
+
|
|
190
|
+
<table>
|
|
191
|
+
<thead>
|
|
192
|
+
<tr><th>Cell</th><th>Composition</th><th>Alignment</th></tr>
|
|
193
|
+
</thead>
|
|
194
|
+
<tbody>
|
|
195
|
+
<tr><td>XL / LG · <code>visual="on"</code></td><td>side-by-side</td><td>flush left</td></tr>
|
|
196
|
+
<tr><td>MD / SM / Mobile · <code>visual="on"</code></td><td>stacked</td><td>centred</td></tr>
|
|
197
|
+
<tr><td>Every <code>visual="off"</code> cell</td><td>stacked</td><td>centred</td></tr>
|
|
198
|
+
</tbody>
|
|
199
|
+
</table>
|
|
200
|
+
|
|
201
|
+
The manifest closes that key with the trap this component was first built into: *"Reading
|
|
202
|
+
'Visual=On is the left-aligned composition' from intent.rules and applying it at every breakpoint
|
|
203
|
+
is the wrong result."*
|
|
204
|
+
|
|
205
|
+
### Which PromoSurface layout applies where
|
|
206
|
+
|
|
207
|
+
Hero picks the PromoSurface `layout` for you, per cell — the veil has to clear the area where the
|
|
208
|
+
copy actually sits (`regions.panel.note`).
|
|
209
|
+
|
|
210
|
+
<table>
|
|
211
|
+
<thead>
|
|
212
|
+
<tr><th>Cell</th><th>PromoSurface <code>layout</code></th><th>How it is selected</th></tr>
|
|
213
|
+
</thead>
|
|
214
|
+
<tbody>
|
|
215
|
+
<tr><td>XL / LG · Visual=On</td><td><code>side</code></td><td>Instance with <code>hidden lg:block</code></td></tr>
|
|
216
|
+
<tr><td>MD / SM / Mobile · Visual=On</td><td><code>top</code></td><td>Instance with <code>lg:hidden</code></td></tr>
|
|
217
|
+
<tr><td>Every Visual=Off cell</td><td><code>vertical</code></td><td>One instance, all breakpoints</td></tr>
|
|
218
|
+
</tbody>
|
|
219
|
+
</table>
|
|
220
|
+
|
|
221
|
+
### Surface tone
|
|
222
|
+
|
|
223
|
+
`surface` is passed straight through to PromoSurface, which owns the fill; Hero pairs the matching
|
|
224
|
+
ink with it. The panel ink is not the whole story, though: on the two **light** plaques the copy
|
|
225
|
+
carries **two** inks, and the heading is only one of them.
|
|
226
|
+
|
|
227
|
+
<table>
|
|
228
|
+
<thead>
|
|
229
|
+
<tr>
|
|
230
|
+
<th><code>surface</code></th><th>Panel ink (heading)</th><th><code>kicker</code> + <code>body</code></th>
|
|
231
|
+
</tr>
|
|
232
|
+
</thead>
|
|
233
|
+
<tbody>
|
|
234
|
+
<tr><td><code>brand</code> (default)</td><td><code>--text-primary</code></td><td><code>--secondary-tint-foreground</code></td></tr>
|
|
235
|
+
<tr><td><code>utility</code></td><td><code>--text-primary</code></td><td><code>--secondary-tint-foreground</code></td></tr>
|
|
236
|
+
<tr><td><code>solid</code></td><td><code>--secondary-foreground</code></td><td>inherits the panel ink</td></tr>
|
|
237
|
+
<tr><td><code>inverse</code></td><td><code>--text-inverted</code></td><td>inherits the panel ink</td></tr>
|
|
238
|
+
</tbody>
|
|
239
|
+
</table>
|
|
240
|
+
|
|
241
|
+
The second ink is measured in Figma on both light plaques — FODS Hero on Brand
|
|
242
|
+
(kicker and body against the heading on `--text-primary`) and
|
|
243
|
+
a featured-content hero on Utility. The token says the same
|
|
244
|
+
from the other end: `--secondary-subtle` lists *"AVOID: text (use `--secondary-tint-foreground`)"*
|
|
245
|
+
and pairs itself with it, and `--secondary-tint-foreground` is *"text inside blue-tinted badges,
|
|
246
|
+
banners, tinted sections"*, AAA on both tints.
|
|
247
|
+
|
|
248
|
+
It is **not** in `promo-surface.manifest.json` `chrome.ink`, because that records the panel's
|
|
249
|
+
primary ink alone. Banner — this plaque's sibling — hit the same wall and wrote it down: its
|
|
250
|
+
`backlog` entry of 2026-08-22 is `status: blocked`, *"Record the per-part ink for the heading and
|
|
251
|
+
body runs in parts. Blocked on SHAPE, not on the decision … the body's second ink has no home until
|
|
252
|
+
the shape is revised"*, and its changelog of 2026-08-23 then unified that ink on `Surface=Brand`.
|
|
253
|
+
The decision exists upstream; the schema has nowhere to put it.
|
|
254
|
+
|
|
255
|
+
The dark plaques are deliberately left out. `--secondary-tint-foreground` is blue/900, which is
|
|
256
|
+
unreadable on `--secondary-solid` (blue/600) and on `--bg-inverse`; Hero's Figma set has no Surface
|
|
257
|
+
axis to measure against there, and `chrome.ink` is unambiguous for those two.
|
|
258
|
+
|
|
259
|
+
<ViewportFrame storyId="design-system-organisms-hero--ink-pairing" width={1024} label="Ink pairing · LG — viewport 1024, cap 960" />
|
|
260
|
+
|
|
261
|
+
## Sizes
|
|
262
|
+
|
|
263
|
+
There is no `size` prop — the breakpoint *is* the size. `container − 2 × side gutter` gives the
|
|
264
|
+
panel width exactly, at every breakpoint.
|
|
265
|
+
|
|
266
|
+
Both numbers on the left of that subtraction belong to the **page container**, not to Hero. The
|
|
267
|
+
component root carries only its vertical band (`py-600 sm:py-800`) and stretches to whatever width
|
|
268
|
+
it is given: the width ladder and the side gutter are the layout layer
|
|
269
|
+
(`spec/01-foundations/layout-system.md`),
|
|
270
|
+
which `container.note` itself hands the code side. The consuming page supplies that container; in these
|
|
271
|
+
stories a decorator models it, which is why the measurements below still hold here.
|
|
272
|
+
|
|
273
|
+
<table>
|
|
274
|
+
<thead>
|
|
275
|
+
<tr>
|
|
276
|
+
<th>Breakpoint</th><th>Prefix</th>
|
|
277
|
+
<th style={{ textAlign: 'right' }}>Container</th>
|
|
278
|
+
<th>Container side gutter</th>
|
|
279
|
+
<th style={{ textAlign: 'right' }}>Panel</th>
|
|
280
|
+
<th style={{ textAlign: 'right' }}>Text column (Visual=On)</th>
|
|
281
|
+
</tr>
|
|
282
|
+
</thead>
|
|
283
|
+
<tbody>
|
|
284
|
+
<tr><td>XL</td><td><code>xl:</code></td><td style={{ textAlign: 'right' }}>1270</td><td><code>--space-1000</code> (40)</td><td style={{ textAlign: 'right' }}>1190</td><td style={{ textAlign: 'right' }}>639</td></tr>
|
|
285
|
+
<tr><td>LG</td><td><code>lg:</code></td><td style={{ textAlign: 'right' }}>960</td><td><code>--space-1000</code> (40)</td><td style={{ textAlign: 'right' }}>880</td><td style={{ textAlign: 'right' }}>480</td></tr>
|
|
286
|
+
<tr><td>MD</td><td><code>md:</code></td><td style={{ textAlign: 'right' }}>720</td><td><code>--space-900</code> (32)</td><td style={{ textAlign: 'right' }}>656</td><td style={{ textAlign: 'right' }}>full panel (stacked)</td></tr>
|
|
287
|
+
<tr><td>SM</td><td><code>sm:</code></td><td style={{ textAlign: 'right' }}>600</td><td><code>--space-800</code> (24)</td><td style={{ textAlign: 'right' }}>552</td><td style={{ textAlign: 'right' }}>full panel (stacked)</td></tr>
|
|
288
|
+
<tr><td>Mobile</td><td>—</td><td style={{ textAlign: 'right' }}>390</td><td><code>--space-600</code> (16)</td><td style={{ textAlign: 'right' }}>358</td><td style={{ textAlign: 'right' }}>full panel (stacked)</td></tr>
|
|
289
|
+
</tbody>
|
|
290
|
+
</table>
|
|
291
|
+
|
|
292
|
+
The Format icon is the one part that does not scale with the breakpoint: a square 48×48 box
|
|
293
|
+
(`--size-illustration-spot`) everywhere, with the artwork fitted into it (`object-fit: contain`) — 1.5.0,
|
|
294
|
+
token since 1.5.1.
|
|
295
|
+
|
|
296
|
+
The Figma set draws that gutter on all four sides at SM and Mobile and on the horizontal axis only
|
|
297
|
+
from `md` up, which is why the root's own vertical band is `--space-600` (16) on Mobile and
|
|
298
|
+
`--space-800` (24) from `sm` up — that half is the component's and stays on the root. The
|
|
299
|
+
root-to-sub gap is `--space-800` (24) up to MD and `--space-900` (32) from `lg` up.
|
|
300
|
+
|
|
301
|
+
### Vertical padding lives in two places
|
|
302
|
+
|
|
303
|
+
The air above the kicker is **not** one padding. Below `lg` the panel carries a
|
|
304
|
+
`--space-1200` (64) band of its own and the text column adds its own 16 / 24 on top; from
|
|
305
|
+
`lg` up the panel drops to zero and the text column carries the whole rhythm. Reading only
|
|
306
|
+
one of the two tables gives the wrong number, so the effective total is spelled out below
|
|
307
|
+
both.
|
|
308
|
+
|
|
309
|
+
Panel padding — the plaque's own band:
|
|
310
|
+
|
|
311
|
+
<table>
|
|
312
|
+
<thead>
|
|
313
|
+
<tr><th>Breakpoint</th><th>Top</th><th>Bottom, <code>visual="off"</code></th><th>Bottom, <code>visual="on"</code></th></tr>
|
|
314
|
+
</thead>
|
|
315
|
+
<tbody>
|
|
316
|
+
<tr><td>XL / LG</td><td>0</td><td>0</td><td>0</td></tr>
|
|
317
|
+
<tr><td>MD / SM / Mobile</td><td><code>--space-1200</code> (64)</td><td><code>--space-1200</code> (64)</td><td>0 — the image is flush with the plaque's rounded bottom edge</td></tr>
|
|
318
|
+
</tbody>
|
|
319
|
+
</table>
|
|
320
|
+
|
|
321
|
+
Text column padding, per breakpoint:
|
|
322
|
+
|
|
323
|
+
<table>
|
|
324
|
+
<thead>
|
|
325
|
+
<tr><th>Breakpoint</th><th>Left / right</th><th>Top / bottom</th></tr>
|
|
326
|
+
</thead>
|
|
327
|
+
<tbody>
|
|
328
|
+
<tr><td>XL, <code>visual="on"</code></td><td>left <code>--space-1200</code> (64), right <code>--space-800</code> (24) — the one asymmetric case, opening toward the image</td><td><code>--space-1200</code> (64)</td></tr>
|
|
329
|
+
<tr><td>XL, <code>visual="off"</code></td><td><code>--space-1000</code> (40) — symmetric: there is no image to open toward, and the asymmetry would push the centred copy 20px off the panel's axis</td><td><code>--space-1200</code> (64)</td></tr>
|
|
330
|
+
<tr><td>LG</td><td><code>--space-1000</code> (40)</td><td><code>--space-1000</code> (40)</td></tr>
|
|
331
|
+
<tr><td>MD / SM</td><td><code>--space-900</code> (32)</td><td><code>--space-800</code> (24)</td></tr>
|
|
332
|
+
<tr><td>Mobile</td><td><code>--space-800</code> (24)</td><td><code>--space-600</code> (16)</td></tr>
|
|
333
|
+
</tbody>
|
|
334
|
+
</table>
|
|
335
|
+
|
|
336
|
+
The Mobile top/bottom used to be written as the Layout-collection side-padding var, whose value is
|
|
337
|
+
also 16. The manifest replaced it with `--space-600` — the side-padding var is the container's
|
|
338
|
+
**horizontal** token and was being read off its own axis, which would have looked like a real
|
|
339
|
+
dependency at the next remeasure.
|
|
340
|
+
|
|
341
|
+
Which adds up to this, measured from the plaque edge to the first (and last) line of copy:
|
|
342
|
+
|
|
343
|
+
<table>
|
|
344
|
+
<thead>
|
|
345
|
+
<tr><th>Breakpoint</th><th>Above the kicker</th><th>Below the actions, <code>visual="off"</code></th></tr>
|
|
346
|
+
</thead>
|
|
347
|
+
<tbody>
|
|
348
|
+
<tr><td>XL</td><td>0 + 64 = <strong>64</strong></td><td><strong>64</strong></td></tr>
|
|
349
|
+
<tr><td>LG</td><td>0 + 40 = <strong>40</strong></td><td><strong>40</strong></td></tr>
|
|
350
|
+
<tr><td>MD</td><td>64 + 24 = <strong>88</strong></td><td><strong>88</strong></td></tr>
|
|
351
|
+
<tr><td>SM</td><td>64 + 24 = <strong>88</strong></td><td><strong>88</strong></td></tr>
|
|
352
|
+
<tr><td>Mobile</td><td>64 + 16 = <strong>80</strong></td><td><strong>80</strong></td></tr>
|
|
353
|
+
</tbody>
|
|
354
|
+
</table>
|
|
355
|
+
|
|
356
|
+
That ladder is **not monotonic**, and the manifest now says so in as many words:
|
|
357
|
+
*"The resulting distance from the plaque edge to the kicker (XL 64 · LG 40 · MD 88 · SM 88 ·
|
|
358
|
+
Mobile 80) is deliberately non-monotonic: the stacked composition gets more air above the kicker
|
|
359
|
+
than XL does."* It was built from the renders (`7308:123130`, `7252:122581`) while
|
|
360
|
+
`regions.panel` was still silent on padding; `regions.panel.padding` records it as intent now,
|
|
361
|
+
so this is no longer a deviation to justify.
|
|
362
|
+
|
|
363
|
+
The image follows the **composition** (manifest 1.4.0 `intent.sizing`). Its ratio is never
|
|
364
|
+
distorted and its bottom edge always sits on the slot's bottom edge. Stacked (MD, SM, Mobile) it is
|
|
365
|
+
width-driven and in flow (`w-full h-auto`), nothing clipped. Side by side (XL **and** LG) it is
|
|
366
|
+
height-driven and out of flow (`absolute bottom-0 left-0 h-full w-auto max-w-none`): the slot's
|
|
367
|
+
height comes from the text column alone, the graphic's width follows the 4:3 ratio, and whatever
|
|
368
|
+
overruns the slot is cut on the **right** by the slot's `overflow-hidden`; a graphic narrower than
|
|
369
|
+
the slot leaves the remainder empty. `max-w-none` is load-bearing — preflight's `max-width: 100%`
|
|
370
|
+
would squeeze the width and distort the ratio. 1.3.x had an `object-contain` letterbox rule that
|
|
371
|
+
no drawn instance followed; 1.4.0 replaced it.
|
|
372
|
+
|
|
373
|
+
One story per breakpoint, each pinned to its own viewport. The viewport widths are the **band
|
|
374
|
+
minimums** (XL 1280 · LG 1024 · MD 768 · SM 640 · Mobile 0), not the Figma artboard widths: a
|
|
375
|
+
viewport of exactly 600px is below Tailwind's `sm:` (640) and would quietly render the Mobile
|
|
376
|
+
composition. At the band minimum the root's own cap does the rest, so each story reproduces its
|
|
377
|
+
artboard exactly.
|
|
378
|
+
|
|
379
|
+
<ViewportFrame storyId="design-system-organisms-hero--breakpoint-xl" width={1280} label="XL — viewport 1280, cap 1270" />
|
|
380
|
+
<ViewportFrame storyId="design-system-organisms-hero--breakpoint-lg" width={1024} label="LG — viewport 1024, cap 960" />
|
|
381
|
+
<ViewportFrame storyId="design-system-organisms-hero--breakpoint-md" width={768} label="MD — viewport 768, cap 720" />
|
|
382
|
+
<ViewportFrame storyId="design-system-organisms-hero--breakpoint-sm" width={640} label="SM — viewport 640, cap 600" />
|
|
383
|
+
<ViewportFrame storyId="design-system-organisms-hero--breakpoint-mobile" width={390} label="Mobile — viewport 390, fluid" />
|
|
384
|
+
|
|
385
|
+
## States
|
|
386
|
+
|
|
387
|
+
**The shell has no interaction states** (`intent.states`) — no hover, no active, no focus, no
|
|
388
|
+
disabled, no loading. Its one motion is the entrance below. Whatever lands in `actions`, `formatIcon` or `sub`
|
|
389
|
+
keeps its own hover / focus / active / disabled behaviour; Hero neither defines nor overrides it.
|
|
390
|
+
There is therefore no `States` story, and never a `state` prop.
|
|
391
|
+
|
|
392
|
+
What varies at the organism level is compositional, not interactive:
|
|
393
|
+
|
|
394
|
+
- **`visual`** — image present (`on`) or the centred composition (`off`).
|
|
395
|
+
- **Slot presence** — `kicker`, `body`, `actions`, `formatIcon` and `sub` each render only when
|
|
396
|
+
passed. An undefined slot renders no element at all.
|
|
397
|
+
|
|
398
|
+
<Canvas of={HeroStories.WithFormatIcon} />
|
|
399
|
+
<Canvas of={HeroStories.WithSub} />
|
|
400
|
+
|
|
401
|
+
### Motion — the entrance
|
|
402
|
+
|
|
403
|
+
`motion.enter` (manifest 1.5.2): **kicker → heading → body → CTA** fade in one after another over
|
|
404
|
+
`--duration-slow` (300ms) with `--easing-enter`, each settling `--space-200` (4px) **up** into place —
|
|
405
|
+
the calm-motion exception kept small on purpose (`motion-system.md` § Calm motion; the owner picked it
|
|
406
|
+
over a `--space-500` / `--space-800` fade-up and a plain fade). At `visual="on"` the **image follows the
|
|
407
|
+
text and only fades** — it never slides. The Format icon and `sub` are not in the sequence and never move.
|
|
408
|
+
Nothing scales.
|
|
409
|
+
|
|
410
|
+
<table>
|
|
411
|
+
<thead>
|
|
412
|
+
<tr><th>Key</th><th>Code</th></tr>
|
|
413
|
+
</thead>
|
|
414
|
+
<tbody>
|
|
415
|
+
<tr><td><code>enter.duration</code> / <code>easing</code></td><td><code>--duration-slow</code> / <code>--easing-enter</code> — keyframes <code>hero-enter-rise</code> (opacity + <code>translateY(var(--space-200))</code> → none) and the shared <code>fade-in</code> for the image</td></tr>
|
|
416
|
+
<tr><td>stagger</td><td>60ms per piece, as <code>calc(var(--duration-instant) * 0.6 * var(--hero-step))</code>. The manifest records the stagger as a <strong>deferred gap</strong> (no token, "60ms" in <code>gaps[]</code>). Steps count only the pieces that render — no kicker, no gap.</td></tr>
|
|
417
|
+
<tr><td><code>enter.note</code> — once, first viewport entry (IO 0.3)</td><td><code>useEnterOnView</code> (<code>internal/useEnterOnView.ts</code>) puts <code>data-hero-motion</code> on the root: <code>armed</code> (pieces at <code>opacity: 0</code>) → <code>play</code> once 30 % of the hero is in view (or 60 % of the viewport for a very tall one), then the observer disconnects. A hero first seen already scrolled past shows as is. Inside an iframe the visible share is measured across the frame boundary, and a hero already scrolled past there waits and plays when it is scrolled back to.</td></tr>
|
|
418
|
+
<tr><td><code>reducedMotion</code> — at once, no fade-up</td><td>Every gating class is <code>motion-safe:</code>, so under <code>prefers-reduced-motion: reduce</code> there is no hidden start pose and no animation in any state; the hook does not even arm.</td></tr>
|
|
419
|
+
</tbody>
|
|
420
|
+
</table>
|
|
421
|
+
|
|
422
|
+
**No flash of hidden content.** A client-only mount (route change, Storybook) arms in a layout effect —
|
|
423
|
+
before the first paint — so the content is never painted and then hidden. A **server-rendered** page
|
|
424
|
+
already paints its markup before React hydrates, so it must not be hidden afterwards: the server
|
|
425
|
+
render therefore starts in `play`, the CSS runs the entrance on first paint without any JavaScript, and
|
|
426
|
+
hydration keeps it. Consequence: on an SSR page the entrance plays at load even if the hero sits below
|
|
427
|
+
the fold. Without IntersectionObserver (old browsers, jsdom) a client mount shows the final pose.
|
|
428
|
+
|
|
429
|
+
<Canvas of={HeroStories.Entrance} />
|
|
430
|
+
|
|
431
|
+
## API
|
|
432
|
+
|
|
433
|
+
<Controls />
|
|
434
|
+
|
|
435
|
+
`visual` is a **discriminated union with no default**:
|
|
436
|
+
|
|
437
|
+
```ts
|
|
438
|
+
type HeroProps = HeroBase &
|
|
439
|
+
({ visual: 'on'; image: React.ReactNode } | { visual: 'off'; image?: undefined });
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
`image?: undefined`, **not** `image?: never`. Both forbid passing a node on the Off branch, but
|
|
443
|
+
`never` also rejects an explicit `image={undefined}` — which a caller spreading props legitimately
|
|
444
|
+
produces, and which `tsc` caught on the `CentredNoVisual` story.
|
|
445
|
+
|
|
446
|
+
The manifest says the same thing three times (`intent.rules[1]`, `regions.image.note`,
|
|
447
|
+
`intent.variants`): *"An empty Image slot is not a centred hero — Visual=Off is the centred
|
|
448
|
+
composition, built centred from the start, not an image slot left empty beside a full-width text
|
|
449
|
+
column."* So the page has to make the compositional choice consciously, and the union makes
|
|
450
|
+
TypeScript enforce it — no runtime guard, no default, and no way to pass `image` alongside
|
|
451
|
+
`visual="off"`.
|
|
452
|
+
|
|
453
|
+
The remaining props: `heading` (required, rendered as the page `<h1>`), `kicker`, `body` /
|
|
454
|
+
`bodyHtml`, `actions`, `actionsWidth` (defaults to `narrow`), `formatIcon`, `sub`, `surface`
|
|
455
|
+
(defaults to `brand`), plus `className` and the usual `HTMLAttributes` on the `<section>`. There is
|
|
456
|
+
no `imageAlt` prop — see Accessibility.
|
|
457
|
+
|
|
458
|
+
### `body` / `bodyHtml` — one part, two elements
|
|
459
|
+
|
|
460
|
+
The lead is a **second union**, built the same way and for the same reason as `visual` / `image`:
|
|
461
|
+
the compiler rejects passing both instead of the component picking a winner at runtime.
|
|
462
|
+
|
|
463
|
+
`body` is the normal arm — a node inside the component's own `<p>`. `bodyHtml` exists for one case,
|
|
464
|
+
a lead that arrives as **rich text from a CMS**. Such a CMS wraps every `perex` in its own `<p>`, and a
|
|
465
|
+
`<p>` cannot nest: the HTML parser splits it into siblings, so on a server-rendered page
|
|
466
|
+
(`renderToString` on the server, `hydrateRoot` on the client) the parsed tree stops matching what
|
|
467
|
+
React expects and the whole SSR tree is thrown away and repainted. That arm therefore renders the
|
|
468
|
+
part as a `<div>` and lets the CMS supply the paragraph one level in.
|
|
469
|
+
|
|
470
|
+
`<p>` is not a contract here, which is what makes this legal. `delivery.react` is the one place the
|
|
471
|
+
manifest names elements, and it names `<h1>` for the heading and `<img>` for the image — `body` is
|
|
472
|
+
absent from it. `text.body` records only `overflow`, `lines` and `maxChars`, and
|
|
473
|
+
`typography.runs.body` calls the lead a *"lead paragraph"* as a typographic reading, justifying
|
|
474
|
+
Body/XL over Body/L, not as markup.
|
|
475
|
+
|
|
476
|
+
Both arms carry the **same** `data-fods-part="body"` and the **same** recipe slot, so the parts map,
|
|
477
|
+
the S7c/d markup pairing and every typography binding keep measuring one thing.
|
|
478
|
+
|
|
479
|
+
<Canvas of={HeroStories.BodyFromCms} />
|
|
480
|
+
|
|
481
|
+
### `actionsWidth` — which band the actions block is capped to
|
|
482
|
+
|
|
483
|
+
`axes.actions-width` gives the slot two caps. The default is **580** — `--ds-content-narrow`,
|
|
484
|
+
*the measure* — which is right for two of the three legal fillings: a row of buttons under a 580
|
|
485
|
+
claim should not run wider than the claim.
|
|
486
|
+
|
|
487
|
+
Featured content is the case it does not fit. A featured-content hero fills
|
|
488
|
+
the slot with a bordered card **786** wide, centred in the 1190 panel (`x=202`,
|
|
489
|
+
`1190 − 2·202 = 786`) — and 786 is not a loose number either: it is `--ds-content-medium`, whose
|
|
490
|
+
own token doc names exactly this job (*"Content column for non-prose — result lists, row and card
|
|
491
|
+
stacks … NOT a measure"*). At 580 that card clamps and re-centres, which is not the design.
|
|
492
|
+
|
|
493
|
+
So the two values are the two readings of the slot, not a size axis:
|
|
494
|
+
|
|
495
|
+
<table>
|
|
496
|
+
<thead>
|
|
497
|
+
<tr><th><code>actionsWidth</code></th><th>Token</th><th style={{ textAlign: 'right' }}>Cap</th><th>For</th></tr>
|
|
498
|
+
</thead>
|
|
499
|
+
<tbody>
|
|
500
|
+
<tr><td><code>narrow</code> (default)</td><td><code>--ds-content-narrow</code></td><td style={{ textAlign: 'right' }}>580</td><td>button group, search field — prose-scale fillings</td></tr>
|
|
501
|
+
<tr><td><code>medium</code></td><td><code>--ds-content-medium</code></td><td style={{ textAlign: 'right' }}>786</td><td>featured content — a bordered card</td></tr>
|
|
502
|
+
</tbody>
|
|
503
|
+
</table>
|
|
504
|
+
|
|
505
|
+
The axis is **sparse upstream**: `Medium` exists only at **XL·Off and LG·Off**, *"the two cells
|
|
506
|
+
whose text column fits 786"*. Every other cell's column is narrower than the Narrow cap already, so
|
|
507
|
+
`medium` has nothing to buy there. The copy block keeps its 580 prose measure on both values — only
|
|
508
|
+
this slot swaps.
|
|
509
|
+
|
|
510
|
+
## Do / Don't
|
|
511
|
+
|
|
512
|
+
- ✅ Use `visual="off"` when the page genuinely has no image.
|
|
513
|
+
- ✅ Reach for Hero only on a public page: a landing page, the homepage, the news index, the
|
|
514
|
+
register search.
|
|
515
|
+
- ✅ Keep exactly one Hero per page; its heading is the page `<h1>`.
|
|
516
|
+
- ✅ Let the format icon overflow the panel edge at LG/XL — it is a signature bleed.
|
|
517
|
+
- ✅ Fill the Format icon slot with the format's own mark artwork (Word / Excel / PDF / Sheets /
|
|
518
|
+
Docs), in the authored square
|
|
519
|
+
48×48 box.
|
|
520
|
+
- ✅ Fit the Format icon artwork whole inside its box (`object-fit: contain`) — the slot does it for
|
|
521
|
+
you; pass a bare `<img alt="">`.
|
|
522
|
+
- ✅ On a light plaque, pair the filled CTA with a `tertiary` second action (`showSurface` off) —
|
|
523
|
+
`slots.actions` (1.4.0).
|
|
524
|
+
- ✅ Ship exactly ONE filled `brand` CTA in `actions` on `surface="solid"` / `"inverse"`.
|
|
525
|
+
- ✅ Reach for `actionsWidth="medium"` only when `actions` carries a featured-content CARD; buttons
|
|
526
|
+
and search fields stay on the 580 measure.
|
|
527
|
+
- ✅ Pass `actions` as ONE block (a button group, a search field, featured content), up to two
|
|
528
|
+
children.
|
|
529
|
+
- ✅ Turn `sub` on only when the page needs the strip under the plaque.
|
|
530
|
+
- ❌ Don't leave the image slot empty beside a full-width text column to fake a centred hero — that
|
|
531
|
+
combination does not even typecheck.
|
|
532
|
+
- ❌ Don't use it for an in-app card, section or callout — the plaque is a public-page atom.
|
|
533
|
+
- ❌ Don't pass a heading element (or `role="heading"`) as the `kicker` — it is a plain line above
|
|
534
|
+
the heading.
|
|
535
|
+
- ❌ Don't "fix" that overflow by shrinking, containing or equalizing it: the 20px (LG) / 19px (XL)
|
|
536
|
+
difference is called intentional variation in `notes[1]`.
|
|
537
|
+
- ❌ Don't reach for an icon glyph instead of the format's artwork. Sheets and Docs are
|
|
538
|
+
deliberately NOT being added to the icon set; the slot was never a glyph slot.
|
|
539
|
+
- ❌ Don't cover-fill the box (`object-cover`) — it cuts the sides off a square mark.
|
|
540
|
+
- ❌ Don't drop arbitrary artwork into `formatIcon` either, and don't stretch it like the rest of
|
|
541
|
+
the auto-layout anatomy. Figma stopped enforcing the vocabulary in 1.0.0; the intent did not change.
|
|
542
|
+
- ❌ Don't give the second action an outline (`secondary`) on a light plaque — it is `tertiary`.
|
|
543
|
+
- ❌ Don't put a `secondary` or `tertiary` Button beside the CTA on a dark plaque — their
|
|
544
|
+
`--secondary` label measures 1.33:1 on `--secondary-solid` and 1.59:1 on `--bg-inverse`, so all
|
|
545
|
+
that survives is the border. No Button family is built for a dark ground and none is coming.
|
|
546
|
+
- ❌ Don't reach into `actions` to fix its spacing — the block owns its own internal rhythm.
|
|
547
|
+
- ❌ Don't style `sub` as part of the plaque: it sits outside the fill and does not inherit the
|
|
548
|
+
panel's radius, background or ink.
|
|
549
|
+
|
|
550
|
+
## Accessibility
|
|
551
|
+
|
|
552
|
+
**Keyboard.** Hero owns no focusable element of its own and adds no focus trap or focus override —
|
|
553
|
+
tab order is entirely whatever `actions`, `formatIcon` and `sub` contribute, in DOM order.
|
|
554
|
+
|
|
555
|
+
**ARIA / semantics.**
|
|
556
|
+
|
|
557
|
+
- The heading renders as a real `<h1>`, so there must be exactly one Hero per page.
|
|
558
|
+
- The kicker renders as a `<p>`. It must never be marked up as a heading itself — that breaks the
|
|
559
|
+
page's heading order for screen-reader users.
|
|
560
|
+
- The format icon wrapper carries `aria-hidden="true"`. That is deliberate: the format is always
|
|
561
|
+
named in the copy, so the mark never carries its own accessible name. Never let the icon be the
|
|
562
|
+
only carrier of the page's document type.
|
|
563
|
+
- The lead renders as a `<p>` through `body` and as a `<div>` through `bodyHtml`. The `<div>` is not
|
|
564
|
+
a loss of semantics: `bodyHtml` only ever carries CMS rich text, which brings its own `<p>` — the
|
|
565
|
+
paragraph simply moves one level in. What it must never carry is markup with a heading in it,
|
|
566
|
+
which would break the page's heading order the same way a heading kicker would.
|
|
567
|
+
|
|
568
|
+
**Untrusted input.** `bodyHtml` is the design system's only `dangerouslySetInnerHTML`. It takes
|
|
569
|
+
**editorial HTML only** — a string from a CMS the team controls, never anything a visitor can write
|
|
570
|
+
— and sanitising it is the caller's job. Hero cannot tell the two apart. Anything user-generated
|
|
571
|
+
belongs in `body`, where React escapes it.
|
|
572
|
+
|
|
573
|
+
**Screen reader / alternative text.** The `image` node is the consumer's own `<img>` (or visual
|
|
574
|
+
component), so the alt text is the **consumer's responsibility** — and it is required. Give it real
|
|
575
|
+
alt text describing the page claim, not the file name and not `alt=""`. Hero cannot supply it, which
|
|
576
|
+
is why there is no `imageAlt` prop.
|
|
577
|
+
|
|
578
|
+
**Contrast.** Hero binds the panel ink from `surface` itself rather than leaving it to the page,
|
|
579
|
+
because mixing one surface's fill with another's ink is the one way this composition fails contrast
|
|
580
|
+
with no code defect.
|
|
581
|
+
|
|
582
|
+
**Dark plaques carry two obligations, and they belong to the consumer** (`intent.rules`):
|
|
583
|
+
|
|
584
|
+
1. **One filled `brand` CTA, no secondary action.** `Secondary` and `Tertiary` both ink their label
|
|
585
|
+
with `--secondary`, which measures **1.33:1** on `--secondary-solid` and **1.59:1** on
|
|
586
|
+
`--bg-inverse` — the label disappears and only the border survives. No Button family is built for
|
|
587
|
+
a dark ground and none is coming: the stance is *compose, not recolour*
|
|
588
|
+
(`spec/06-patterns/inverse-surface.md`).
|
|
589
|
+
A quieter action beside it exists only on `--bg-inverse` chrome and is a `TextLink` on the inverse
|
|
590
|
+
recipe; on `--secondary-solid` no quiet text action passes AA at all. It is the rule `Banner`
|
|
591
|
+
already holds on its own dark surface.
|
|
592
|
+
2. **The focus ring swaps.** `--outline-focus` is the same hex as `--secondary-solid` (1.00:1) and
|
|
593
|
+
2.12:1 on `--bg-inverse`, both under the 3:1 non-text floor. Anything focusable composed into
|
|
594
|
+
`actions` **must** bind `--outline-focus-inverse` — as
|
|
595
|
+
`focus-visible:outline-outline-focus-inverse`, never `ring-*`: the floor wants an additive
|
|
596
|
+
offset **outline**, and a ring is a box-shadow that would sit alongside the real one instead of
|
|
597
|
+
replacing it. Hero does not supply it, because it owns no focusable element and never overrides
|
|
598
|
+
the focus behaviour of its slot content; `ActionsBlock` in the stories shows the shape. The
|
|
599
|
+
obligation is **Actions-only** — `regions.sub.note` puts `sub` outside the plaque fill, where a
|
|
600
|
+
white inverse ring would be the wrong call.
|
|
601
|
+
|
|
602
|
+
**Motion.** One entrance, once (see [States](#states) → Motion). It is decorative, and under
|
|
603
|
+
`prefers-reduced-motion: reduce` it is gone entirely: the content is there at once, no fade-up. No
|
|
604
|
+
focusable element moves after the entrance, and the transform is a 4px settle, never a scale.
|
|
605
|
+
|
|
606
|
+
Accessibility floor for every FODS component: `spec/01-foundations/accessibility.md`.
|
|
607
|
+
|
|
608
|
+
## Copy
|
|
609
|
+
|
|
610
|
+
Voice: Hero is public-facing, so its copy can be warmer and more direct than an in-app control's,
|
|
611
|
+
but it stays a claim, not an exclamation.
|
|
612
|
+
|
|
613
|
+
- **Kicker** (`kicker`, optional) — one short line above the heading, never itself a heading. A
|
|
614
|
+
plain statement of benefit, no exclamation mark. Wraps, at most 2 lines and 60 characters.
|
|
615
|
+
- **Heading** (`heading`, required) — the page's single claim, rendered as the `<h1>`. Direct and
|
|
616
|
+
concrete, not a slogan stacked with adjectives. Wraps, at most 70 characters.
|
|
617
|
+
- **Body** (`body`, or `bodyHtml`; see [API](#api)) — one to three lines under the heading,
|
|
618
|
+
expanding the claim with what the reader will see or do next, not a repeat of the heading.
|
|
619
|
+
Wraps, at most 3 lines and 120 characters.
|
|
620
|
+
|
|
621
|
+
Canonical texts (CZ):
|
|
622
|
+
|
|
623
|
+
<table>
|
|
624
|
+
<thead>
|
|
625
|
+
<tr><th>Run</th><th>Text</th></tr>
|
|
626
|
+
</thead>
|
|
627
|
+
<tbody>
|
|
628
|
+
<tr><td>Kicker</td><td>Rychle. Jednoduše. Zdarma.</td></tr>
|
|
629
|
+
<tr><td>Heading</td><td>Faktura online za 30 sekund</td></tr>
|
|
630
|
+
<tr><td>Body</td><td>Tady vidíte, jak má správná faktura vypadat.</td></tr>
|
|
631
|
+
</tbody>
|
|
632
|
+
</table>
|
|
633
|
+
|
|
634
|
+
## Usage
|
|
635
|
+
|
|
636
|
+
```tsx
|
|
637
|
+
import { Button, Hero } from '@invoiceonline/ui-react';
|
|
638
|
+
|
|
639
|
+
// Good — the standard composition: image beside the copy at lg+, stacked below it under lg.
|
|
640
|
+
<Hero
|
|
641
|
+
visual="on"
|
|
642
|
+
kicker="Rychle. Jednoduše. Zdarma."
|
|
643
|
+
heading="Faktura online za 30 sekund"
|
|
644
|
+
body="Tady vidíte, jak má správná faktura vypadat."
|
|
645
|
+
actions={
|
|
646
|
+
<>
|
|
647
|
+
<Button variant="brand" size="lg">Vytvořit fakturu</Button>
|
|
648
|
+
<Button variant="tertiary" size="lg">Prohlédnout vzor</Button>
|
|
649
|
+
</>
|
|
650
|
+
}
|
|
651
|
+
image={<img src={invoiceImage} alt="Vzor vyplněné faktury s rozpisem položek a součtem" />}
|
|
652
|
+
/>
|
|
653
|
+
```
|
|
654
|
+
|
|
655
|
+
```tsx
|
|
656
|
+
// Good — the centred composition for a page that has no image.
|
|
657
|
+
<Hero
|
|
658
|
+
visual="off"
|
|
659
|
+
kicker="Rychle. Jednoduše. Zdarma."
|
|
660
|
+
heading="Faktura online za 30 sekund"
|
|
661
|
+
body="Tady vidíte, jak má správná faktura vypadat."
|
|
662
|
+
actions={<Button variant="brand" size="lg">Vytvořit fakturu</Button>}
|
|
663
|
+
/>
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
```tsx
|
|
667
|
+
import { Button, Hero } from '@invoiceonline/ui-react';
|
|
668
|
+
import invoiceImage from './assets/invoice-hero.webp';
|
|
669
|
+
// The format's own mark ARTWORK — never an icon glyph (see Do / Don't).
|
|
670
|
+
import pdfMark from './assets/pdf-mark.png';
|
|
671
|
+
|
|
672
|
+
// Good — a document-format landing page: the format mark plus the Sub strip.
|
|
673
|
+
<Hero
|
|
674
|
+
visual="on"
|
|
675
|
+
surface="inverse"
|
|
676
|
+
kicker="Rychle. Jednoduše. Zdarma."
|
|
677
|
+
heading="Faktura ve formátu PDF"
|
|
678
|
+
body="Vzor ke stažení i k vyplnění online."
|
|
679
|
+
formatIcon={<img src={pdfMark} alt="" />}
|
|
680
|
+
actions={<Button variant="brand" size="lg">Stáhnout vzor</Button>}
|
|
681
|
+
image={<img src={invoiceImage} alt="Vzor faktury ve formátu PDF" />}
|
|
682
|
+
sub={
|
|
683
|
+
<div className="flex w-full flex-wrap items-center gap-400">
|
|
684
|
+
<Button variant="tertiary" size="md">PDF</Button>
|
|
685
|
+
<Button variant="tertiary" size="md">Word</Button>
|
|
686
|
+
</div>
|
|
687
|
+
}
|
|
688
|
+
/>
|
|
689
|
+
```
|
|
690
|
+
|
|
691
|
+
```tsx
|
|
692
|
+
// Don't — visual has no default, and image cannot be paired with visual="off".
|
|
693
|
+
<Hero heading="Faktura online za 30 sekund" />
|
|
694
|
+
<Hero visual="off" image={<img src={invoiceImage} alt="Vzor faktury" />} />
|
|
695
|
+
|
|
696
|
+
// Don't — the kicker is a plain line, never a heading.
|
|
697
|
+
<Hero visual="off" kicker={<h2>Rychle. Jednoduše. Zdarma.</h2>} heading="Faktura online za 30 sekund" />
|
|
698
|
+
```
|
|
699
|
+
|
|
700
|
+
## Related
|
|
701
|
+
|
|
702
|
+
- [PromoSurface](?path=/docs/design-system-atoms-promosurface--docs) — the plaque's fill, pattern
|
|
703
|
+
and veil. Hero composes its text column and image above this atom and swaps its `layout` per
|
|
704
|
+
breakpoint × `visual`.
|
|
705
|
+
- [Button](?path=/docs/design-system-atoms-button--docs) — the usual occupant of `actions` and
|
|
706
|
+
`sub`.
|
|
707
|
+
- `spec/07-web/hero.md` — upstream design spec.
|
|
708
|
+
- `spec/05-organisms/nav-bar.md` — the other `region`-kind organism with a Breakpoint axis and no size axis.
|
|
709
|
+
|
|
710
|
+
## Migration notes
|
|
711
|
+
|
|
712
|
+
Not applicable. Hero is a new component with no prior spec, no legacy class names, and no earlier
|
|
713
|
+
variant scheme to rebind.
|
|
714
|
+
|
|
715
|
+
**1.3.5 → 1.4.0** (no API change). The image fit changed at XL: it is now height-driven and
|
|
716
|
+
clipped on the right like LG, instead of width-driven (see Sizes) — a visible change on every
|
|
717
|
+
`visual="on"` page at ≥1280. The LG split (480 / 400) and the top-aligned Format icon were already
|
|
718
|
+
built that way and are now what the manifest says; the stories' second action moved from
|
|
719
|
+
`secondary` to `tertiary`.
|
|
720
|
+
|
|
721
|
+
**1.4.0 → 1.4.1** (no change). The manifest now records the kicker ladder the component already
|
|
722
|
+
built: Decorative/Caveat/32 (32 / 40) from `md` (≥ 768), Decorative/Caveat/20 (20 / 26) below it.
|
|
723
|
+
|
|
724
|
+
**1.4.1 → 1.5.0** (no API change). The Format icon box is now a square 48×48 (`--space-1100`) at
|
|
725
|
+
every breakpoint — it was 53×73 at LG/XL and 40×54 below — and the slot fits the artwork into it
|
|
726
|
+
(`object-fit: contain`) instead of letting the consumer cover-crop it, which cut the sides off the
|
|
727
|
+
square Word / Excel marks. Pass a bare `<img alt="">`: drop any
|
|
728
|
+
sizing or `object-cover` classes, the slot owns geometry and fit. Position and the panel-edge bleed
|
|
729
|
+
are unchanged.
|
|
730
|
+
|
|
731
|
+
**1.5.0 → 1.5.1** (no API change). The Format icon box binds the semantic size token
|
|
732
|
+
`--size-illustration-spot` instead of the spacing primitive `--space-1100`; the box is the same 48×48.
|
|
733
|
+
|
|
734
|
+
**1.5.1 → 1.5.3** (no API change). 1.5.2 (motion audit) adds `motion.enter`, `reducedMotion` and
|
|
735
|
+
`inherits [button]`: the hero now has an entrance — kicker → heading → body → CTA fade in one after
|
|
736
|
+
another and settle `--space-200` up, the image follows with a fade only, once on first viewport entry,
|
|
737
|
+
and nothing under reduced motion (see [States](#states) → Motion). Consumers change nothing (none of them
|
|
738
|
+
runs an entrance of its own). 1.5.3 moves the spec to `spec/07-web/` (no structural
|
|
739
|
+
change).
|
|
740
|
+
|
|
741
|
+
**1.5.3 → 1.5.4** (no change). `slots.actions` names its children — `accepts` = Button · Text Field
|
|
742
|
+
(`type=search`); featured content is composed, not a component. Nothing to rebuild.
|