@invoiceonline/ui-react 0.0.0 → 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 +77 -1
- 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 +351 -3
- 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,17 @@
|
|
|
1
|
+
export {
|
|
2
|
+
FormSection,
|
|
3
|
+
FormSectionCell,
|
|
4
|
+
FormSectionTrio,
|
|
5
|
+
FormSectionPair,
|
|
6
|
+
formSectionVariants,
|
|
7
|
+
resolveCellSpanClasses,
|
|
8
|
+
type FormSectionProps,
|
|
9
|
+
type FormSectionHeader,
|
|
10
|
+
type FormSectionHeadingLevel,
|
|
11
|
+
type FormSectionBreakpoint,
|
|
12
|
+
type FormSectionCellProps,
|
|
13
|
+
type FormSectionCellSpan,
|
|
14
|
+
type FormSectionCellSpanValue,
|
|
15
|
+
type FormSectionTrioProps,
|
|
16
|
+
type FormSectionPairProps,
|
|
17
|
+
} from './FormSection';
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { Meta, Canvas, Controls } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as HeadingStories from './Heading.stories';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
<Meta of={HeadingStories} tags={['autodocs']} />
|
|
6
|
+
|
|
7
|
+
# Heading
|
|
8
|
+
|
|
9
|
+
## Metadata
|
|
10
|
+
|
|
11
|
+
- **Layer:** atom
|
|
12
|
+
- **Status:** draft
|
|
13
|
+
- **Tokens used:** `--font-heading`, `--font-size-display-d1`, `--font-size-display-d2`, `--font-size-display-d3`, `--font-size-heading-h1`, `--font-size-heading-h2`, `--font-size-heading-h3`, `--font-size-heading-h4`, `--font-size-heading-h5`, `--font-weight-bold`, `--font-weight-semibold`, `--leading-compact`, `--leading-relaxed`, `--leading-tight`, `--text-primary`, `--text-wrap-heading`
|
|
14
|
+
- **Manifest version:** `1.2.0`
|
|
15
|
+
- **Approved deviation:** `size-vocabulary-type-ramp` (`COMPONENT-CODE-CONVENTIONS.md` §7) — `size` takes the type-ramp steps `d1 · d2 · d3 · h1 · h2 · h3 · h4 · h5` (the Figma `D1`–`H5` names, lowercased) instead of the `xs · sm · md · lg · xl` vocabulary; `level` stays a number 1–6.
|
|
16
|
+
|
|
17
|
+
## Overview
|
|
18
|
+
|
|
19
|
+
Heading is the typed heading run — a page title, a section opener, a card title. Reach for it whenever a surface needs the styled type ramp rather than a plain body run. Its visual weight is picked by `size`, independent of the semantic `level` it renders as.
|
|
20
|
+
|
|
21
|
+
Do **not** use it for a marketing hero on an in-app screen (Display sizes `d1`–`d3` are marketing / hero surfaces only — never an in-app screen heading), for a form field label (that is the field's own label), or for a link that happens to look bold (→ TextLink). A heading with a supporting description line underneath is a HeadingGroup, not a Heading plus a loose paragraph.
|
|
22
|
+
|
|
23
|
+
## Rationale
|
|
24
|
+
|
|
25
|
+
The visual weight of a title and its place in the document outline are two different decisions that do not always match — a card title may be an `h3` in the DOM yet need H1 visual weight, or the other way round. Bundling both into one prop would force every consumer into whatever weight matches its heading depth. So the component splits them: `level` is the HTML tag and the outline, `size` is the only visual axis, and neither implies the other.
|
|
26
|
+
|
|
27
|
+
It replaced the former Heading component, whose size ladder mixed the two concerns and carried its own breakpoint classes and `loading` branch (see Migration notes).
|
|
28
|
+
|
|
29
|
+
## Anatomy
|
|
30
|
+
|
|
31
|
+
A single **run** — the heading element itself. No container chrome, no icon slots, no interactive parts.
|
|
32
|
+
|
|
33
|
+
- **Run** — rendered as `<h1>`–`<h6>` from `level`. Font family <code>--font-heading</code> (Poppins), ink <code>--text-primary</code> (flat at every size), `text-wrap` from <code>--text-wrap-heading</code> (balance) on every size. Size, weight and leading come from the `size` step (see Sizes).
|
|
34
|
+
|
|
35
|
+
The element carries `data-fods-component="heading"` and `data-fods-part="root"`.
|
|
36
|
+
|
|
37
|
+
## Variants
|
|
38
|
+
|
|
39
|
+
<Canvas of={HeadingStories.LevelVsSize} />
|
|
40
|
+
|
|
41
|
+
Heading has **no variant axis** — there is no type, chrome or tone to pick. `size` is the only visual dimension (see Sizes); `level` is a code-only prop that changes the tag and never what renders.
|
|
42
|
+
|
|
43
|
+
<table>
|
|
44
|
+
<thead>
|
|
45
|
+
<tr><th>Prop</th><th>Decides</th><th>Values</th></tr>
|
|
46
|
+
</thead>
|
|
47
|
+
<tbody>
|
|
48
|
+
<tr><td><code>level</code></td><td>The HTML tag and the document outline</td><td><code>1</code>–<code>6</code> → <code>{'<h1>'}</code>–<code>{'<h6>'}</code> (required)</td></tr>
|
|
49
|
+
<tr><td><code>size</code></td><td>The visual weight on the type ramp</td><td><code>d1</code> · <code>d2</code> · <code>d3</code> · <code>h1</code> · <code>h2</code> · <code>h3</code> · <code>h4</code> · <code>h5</code> (optional)</td></tr>
|
|
50
|
+
</tbody>
|
|
51
|
+
</table>
|
|
52
|
+
|
|
53
|
+
When `size` is not set it follows `level`: 1→`h1`, 2→`h2`, 3→`h3`, 4→`h4`, 5→`h5`, and 6→`h5` — the ramp has five product steps, so `h5` and `h6` share the last one. That default is a convenience, not a rule; the story above shows both the default column and the decoupled one.
|
|
54
|
+
|
|
55
|
+
## Sizes
|
|
56
|
+
|
|
57
|
+
<Canvas of={HeadingStories.Matrix} />
|
|
58
|
+
|
|
59
|
+
Eight steps on one axis. Font size is desktop → mobile; the line box is the manifest `sizes[].height` (font size × leading, rounded) — informational, for sizing a Skeleton placeholder, never a CSS line-height.
|
|
60
|
+
|
|
61
|
+
<table>
|
|
62
|
+
<thead>
|
|
63
|
+
<tr><th>Size</th><th>Font size</th><th>Weight</th><th>Leading</th><th style={{ textAlign: 'right' }}>Line box (px)</th><th>Role</th></tr>
|
|
64
|
+
</thead>
|
|
65
|
+
<tbody>
|
|
66
|
+
<tr><td><code>d1</code></td><td><code>--font-size-display-d1</code> (48 → 40)</td><td><code>--font-weight-bold</code></td><td><code>--leading-compact</code></td><td style={{ textAlign: 'right' }}>62</td><td>Marketing hero only — never in-app</td></tr>
|
|
67
|
+
<tr><td><code>d2</code></td><td><code>--font-size-display-d2</code> (40 → 32)</td><td><code>--font-weight-bold</code></td><td><code>--leading-compact</code></td><td style={{ textAlign: 'right' }}>52</td><td>Sub-hero blocks, marketing only</td></tr>
|
|
68
|
+
<tr><td><code>d3</code></td><td><code>--font-size-display-d3</code> (32 → 26)</td><td><code>--font-weight-bold</code></td><td><code>--leading-compact</code></td><td style={{ textAlign: 'right' }}>42</td><td>Section heroes in long marketing pages, marketing only</td></tr>
|
|
69
|
+
<tr><td><code>h1</code></td><td><code>--font-size-heading-h1</code> (26 → 24)</td><td><code>--font-weight-bold</code></td><td><code>--leading-tight</code></td><td style={{ textAlign: 'right' }}>36</td><td>Page title — one per page</td></tr>
|
|
70
|
+
<tr><td><code>h2</code></td><td><code>--font-size-heading-h2</code> (24 → 22)</td><td><code>--font-weight-semibold</code></td><td><code>--leading-tight</code></td><td style={{ textAlign: 'right' }}>34</td><td>Major section opener</td></tr>
|
|
71
|
+
<tr><td><code>h3</code></td><td><code>--font-size-heading-h3</code> (22 → 18)</td><td><code>--font-weight-semibold</code></td><td><code>--leading-tight</code></td><td style={{ textAlign: 'right' }}>31</td><td>In-section grouping</td></tr>
|
|
72
|
+
<tr><td><code>h4</code></td><td><code>--font-size-heading-h4</code> (18 → 16)</td><td><code>--font-weight-semibold</code></td><td><code>--leading-tight</code></td><td style={{ textAlign: 'right' }}>25</td><td>Sub-grouping, card headers</td></tr>
|
|
73
|
+
<tr><td><code>h5</code></td><td><code>--font-size-heading-h5</code> (16 → 14)</td><td><code>--font-weight-semibold</code></td><td><code>--leading-relaxed</code></td><td style={{ textAlign: 'right' }}>24</td><td>Small group titles, eyebrow prefixes</td></tr>
|
|
74
|
+
</tbody>
|
|
75
|
+
</table>
|
|
76
|
+
|
|
77
|
+
### Responsive step-down is token-driven
|
|
78
|
+
|
|
79
|
+
<Canvas of={HeadingStories.Mobile} />
|
|
80
|
+
|
|
81
|
+
Every size steps down below 768px. The step comes entirely from the token layer: `tokens.css` overrides the font-size primitives inside `@media (max-width: 767px)` and the semantic aliases the component consumes follow. The leading is a ratio riding in each `text-display-*` / `text-heading-*` font-size tuple, so it follows the step too. **The component emits no breakpoint class** — do not re-implement the step-down in a consumer. The Docs canvas above is not resized; open the story to see the mobile step.
|
|
82
|
+
|
|
83
|
+
## States
|
|
84
|
+
|
|
85
|
+
There is no States story: Heading is **static** text with no interactive states — no hover, focus, disabled or loading. Ink is a flat <code>--text-primary</code> at every size and never changes.
|
|
86
|
+
|
|
87
|
+
**Motion: none.** The manifest declares the run static (1.1.1 `motion.none`: „static text“). It carries no transition or animation and inherits none, so there is nothing for `prefers-reduced-motion` to switch off.
|
|
88
|
+
|
|
89
|
+
- **Loading** — not a Heading prop or variant. Compose a <code>Skeleton</code> sized to the step's line box (the Line box column in Sizes) in place of the heading while the text is pending.
|
|
90
|
+
|
|
91
|
+
## API
|
|
92
|
+
|
|
93
|
+
<Controls />
|
|
94
|
+
|
|
95
|
+
- `level` — **required**, `1 | 2 | 3 | 4 | 5 | 6`; picks the tag `<h1>`–`<h6>`. The outline is a decision, never a default.
|
|
96
|
+
- `size` — optional, `'d1' | 'd2' | 'd3' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5'`; defaults to the `level` mapping (1→`h1` … 5→`h5`, 6→`h5`). The lowercase type-ramp vocabulary is the approved deviation `size-vocabulary-type-ramp`.
|
|
97
|
+
- `children` — the heading text; the Figma TEXT property `Text` (manifest 1.2.0), which a host instance can expose as its own text property.
|
|
98
|
+
- `className` and every other HTML attribute of a heading element pass through to the rendered tag; `className` is merged through tailwind-merge.
|
|
99
|
+
- The `ref` is forwarded to the heading element (`forwardRef`).
|
|
100
|
+
- There is **no `loading` prop** — see States.
|
|
101
|
+
|
|
102
|
+
## Do / Don't
|
|
103
|
+
|
|
104
|
+
- ✅ Pick `size` by the visual weight the spot needs, and `level` by the outline
|
|
105
|
+
- ✅ Keep one `level={1}` per page
|
|
106
|
+
- ✅ Let `size` follow `level` when the two agree — leave `size` unset
|
|
107
|
+
- ✅ Use Display sizes (`d1`–`d3`) only on marketing / hero surfaces
|
|
108
|
+
- ✅ Compose a Skeleton sized to the line box for loading
|
|
109
|
+
- ✅ Keep a heading to 1–3 lines
|
|
110
|
+
- ❌ Don't skip a `level` to reach a visual size — change `size` instead
|
|
111
|
+
- ❌ Don't use a Display size for an in-app screen heading
|
|
112
|
+
- ❌ Don't add breakpoint classes (`sm:` / `md:`) for the mobile step — the tokens already do it
|
|
113
|
+
- ❌ Don't fake a heading with a styled `div` / `span`
|
|
114
|
+
- ❌ Don't pair a Heading with a hand-spaced description paragraph — use HeadingGroup
|
|
115
|
+
- ❌ Don't rely on `text-wrap: balance` for long, many-line runs — Chromium / Edge stop balancing at 6 lines (Firefox at 10)
|
|
116
|
+
|
|
117
|
+
## Accessibility
|
|
118
|
+
|
|
119
|
+
- **Keyboard** — none. Heading renders a plain heading element with no `tabIndex` and no handlers; it never enters the tab order.
|
|
120
|
+
- **ARIA** — the semantics come from the real tag: `level` renders `<h1>`–`<h6>`, so the element has the native heading role and level. The component sets no ARIA attributes of its own; any passed in reach the element.
|
|
121
|
+
- **Screen reader** — announced as a heading at the `level` it renders, independent of `size`. That decoupling is the failure mode to watch: a spot styled at `h1` size does not make its `level` 1. The page outline — one `level={1}`, no skipped levels — is checked separately from the visuals, at review time (the Storybook a11y addon, axe `heading-order` / `page-has-heading-one`, is the intended enforcement point).
|
|
122
|
+
- **Contrast & motion** — ink is <code>--text-primary</code> at every size; no motion (manifest `motion.none`, see States). The run is plain text, so it follows the user's font-size and zoom settings.
|
|
123
|
+
|
|
124
|
+
Accessibility floor for every FODS component: `spec/01-foundations/accessibility.md`.
|
|
125
|
+
|
|
126
|
+
## Usage
|
|
127
|
+
|
|
128
|
+
```tsx
|
|
129
|
+
import { Heading, Skeleton } from '@invoiceonline/ui-react';
|
|
130
|
+
|
|
131
|
+
// Good — page title; size follows level (h1)
|
|
132
|
+
<Heading level={1}>Faktury</Heading>
|
|
133
|
+
|
|
134
|
+
// Good — a card title: <h3> in the outline, H4 visual weight
|
|
135
|
+
<Heading level={3} size="h4">
|
|
136
|
+
Poslední faktury
|
|
137
|
+
</Heading>
|
|
138
|
+
|
|
139
|
+
// Good — loading: a Skeleton sized to the H2 line box (34px), not a prop
|
|
140
|
+
{loading ? (
|
|
141
|
+
<Skeleton className="h-[34px] w-2/3" />
|
|
142
|
+
) : (
|
|
143
|
+
<Heading level={2}>Přehled za říjen</Heading>
|
|
144
|
+
)}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
```tsx
|
|
148
|
+
// Don't — skipping a level to get a smaller look
|
|
149
|
+
<Heading level={1}>Faktury</Heading>
|
|
150
|
+
<Heading level={4}>Poslední faktury</Heading>
|
|
151
|
+
|
|
152
|
+
// Don't — Display size on an in-app screen
|
|
153
|
+
<Heading level={1} size="d1">Nastavení účtu</Heading>
|
|
154
|
+
|
|
155
|
+
// Don't — re-implementing the mobile step
|
|
156
|
+
<Heading level={2} className="text-heading-h3 md:text-heading-h2">Přehled</Heading>
|
|
157
|
+
|
|
158
|
+
// Don't — heading + description assembled by hand; use HeadingGroup
|
|
159
|
+
<div className="space-y-200">
|
|
160
|
+
<Heading level={2}>Fakturační údaje</Heading>
|
|
161
|
+
<p>Acme s.r.o., IČO 12345678</p>
|
|
162
|
+
</div>
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Related
|
|
166
|
+
|
|
167
|
+
- [HeadingGroup](?path=/docs/design-system-molecules-headinggroup--docs) — a heading plus a supporting description line; composes this atom's ramp (same `size` steps).
|
|
168
|
+
- [Skeleton](?path=/docs/design-system-atoms-skeleton--docs) — the loading placeholder; size it to the heading's line box.
|
|
169
|
+
- [Hero](?path=/docs/design-system-organisms-hero--docs) — the marketing surface where Display sizes belong.
|
|
170
|
+
- Spec: `spec/03-atoms/heading.md`
|
|
171
|
+
|
|
172
|
+
## Migration notes
|
|
173
|
+
|
|
174
|
+
**Figma Text property (manifest 1.2.0, 2026-11-09) — documentation only.** The Figma set gains a TEXT property `Text` that drives the heading text, so a host (Heading Group, Hero …) can expose it on its own instance. In code it has always been `children`; the rendered component does not change. No code change. **Figma not verified** (MCP unavailable during the 2026-11-09 sync).
|
|
175
|
+
|
|
176
|
+
**Stable + motion (manifest 1.1.0 / 1.1.1, 2026-11-03) — documentation only.** 1.1.0 marks the atom ready (status draft → stable; the remaining backlog entries are notes on possible future changes); 1.1.1 records the motion audit — the run is static (`motion.none`). No code change. **Figma not verified** (MCP unavailable during the 2026-11-09 sync). **Local status stays `draft`** (decided 2026-11-10): the upstream status is information only; the docs page marks a component stable by its own criterion, not by the manifest.
|
|
177
|
+
|
|
178
|
+
This atom replaced the former Heading component (`size` = `xxl | xl | 1–6`). Its size ladder maps 1:1 onto the new ramp:
|
|
179
|
+
|
|
180
|
+
<table>
|
|
181
|
+
<thead>
|
|
182
|
+
<tr><th>Deprecated <code>size</code></th><th>New <code>size</code></th></tr>
|
|
183
|
+
</thead>
|
|
184
|
+
<tbody>
|
|
185
|
+
<tr><td><code>xxl</code></td><td><code>d2</code></td></tr>
|
|
186
|
+
<tr><td><code>xl</code></td><td><code>d3</code></td></tr>
|
|
187
|
+
<tr><td><code>1</code></td><td><code>h1</code></td></tr>
|
|
188
|
+
<tr><td><code>2</code></td><td><code>h2</code></td></tr>
|
|
189
|
+
<tr><td><code>3</code></td><td><code>h3</code></td></tr>
|
|
190
|
+
<tr><td><code>4</code></td><td><code>h4</code></td></tr>
|
|
191
|
+
<tr><td><code>5</code></td><td><code>h5</code></td></tr>
|
|
192
|
+
<tr><td><code>6</code></td><td><code>h5</code> (duplicate of <code>5</code> — drops on migration)</td></tr>
|
|
193
|
+
</tbody>
|
|
194
|
+
</table>
|
|
195
|
+
|
|
196
|
+
Three behaviour changes to expect when migrating a consumer:
|
|
197
|
+
|
|
198
|
+
1. **Line-heights tighten.** The deprecated component rendered sizes `1`–`6` at a flat `1.6`; canon is `1.4` (`h5` at `1.5`), and `d3` is `1.3` versus the deprecated `xl` at `1.5`. A heading→content pairing directly below a migrated heading tightens by 2–3px. This is expected, not a regression.
|
|
199
|
+
2. **The responsive breakpoint moves.** The deprecated component switched at Tailwind `sm:` (≥640px); this one switches at the token cutoff (≤767px). Between 640px and 767px, sizes that used to render at the desktop step now render at the mobile step.
|
|
200
|
+
3. **The weight flip on size `1` disappears.** The deprecated component flipped `1` from semibold to bold at `sm:`; `h1` is bold at every width.
|
|
201
|
+
|
|
202
|
+
Also:
|
|
203
|
+
|
|
204
|
+
- The deprecated `loading` prop is **removed** — compose a Skeleton sized to the line box instead (see States). `className` passthrough is unchanged.
|
|
205
|
+
- Hero blocks built ad hoc from a heading plus a lede paragraph migrate to **HeadingGroup**, not to a bare Heading.
|
|
206
|
+
- All consumers were moved over and the former component was deleted; its `loading` call sites became Skeletons sized to the D2 / H1 line box.
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
3
|
+
import { Heading } from './Heading';
|
|
4
|
+
import { Section, Showcase } from '../../storybook/Section';
|
|
5
|
+
import { componentDoc } from '../../storybook/componentDoc';
|
|
6
|
+
|
|
7
|
+
const SIZES = ['d1', 'd2', 'd3', 'h1', 'h2', 'h3', 'h4', 'h5'] as const;
|
|
8
|
+
const LEVELS = [1, 2, 3, 4, 5, 6] as const;
|
|
9
|
+
|
|
10
|
+
/** Desktop → Mobile (≤767px) font size per step, from the spec § Sizes table. */
|
|
11
|
+
const SIZE_PX: Record<(typeof SIZES)[number], string> = {
|
|
12
|
+
d1: '48 → 40',
|
|
13
|
+
d2: '40 → 32',
|
|
14
|
+
d3: '32 → 26',
|
|
15
|
+
h1: '26 → 24',
|
|
16
|
+
h2: '24 → 22',
|
|
17
|
+
h3: '22 → 18',
|
|
18
|
+
h4: '18 → 16',
|
|
19
|
+
h5: '16 → 14',
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const SAMPLE = 'Všechno, co potřebujete k fakturaci';
|
|
23
|
+
|
|
24
|
+
const meta = {
|
|
25
|
+
title: 'Design System/Atoms/Heading',
|
|
26
|
+
component: Heading,
|
|
27
|
+
parameters: {
|
|
28
|
+
layout: 'padded',
|
|
29
|
+
docs: {
|
|
30
|
+
description: {
|
|
31
|
+
component: componentDoc({
|
|
32
|
+
summary:
|
|
33
|
+
'The typed heading run. `level` (1–6) is the HTML tag and the document outline; `size` is the only visual axis and steps the type ramp D1 · D2 · D3 (Display, Poppins Bold) · H1 (Bold) · H2–H5 (SemiBold). The two are independent — an h2 may render at H1 size. Ink is a flat --text-primary, text-wrap: balance on every size.',
|
|
34
|
+
useCases: [
|
|
35
|
+
'`h1` — page title, one per page',
|
|
36
|
+
'`h2` — major section opener; `h3` — in-section grouping; `h4` — sub-grouping, card headers; `h5` — small group titles',
|
|
37
|
+
'`d1`–`d3` — marketing / hero surfaces only, never an in-app screen heading',
|
|
38
|
+
'Heading + a supporting description line → use HeadingGroup instead',
|
|
39
|
+
],
|
|
40
|
+
bestPractices: [
|
|
41
|
+
'Pick `size` by the visual weight the spot needs, `level` by the outline — neither implies the other',
|
|
42
|
+
'Keep one `level={1}` per page and never skip a level to hit a size; change `size` instead',
|
|
43
|
+
'Let `size` follow `level` when the two agree (default mapping 1→h1 … 5→h5, 6→h5)',
|
|
44
|
+
'Compose a Skeleton sized to the line box for loading — Heading has no `loading` prop',
|
|
45
|
+
],
|
|
46
|
+
knownIssues: [
|
|
47
|
+
'The mobile step-down comes from the token layer (the tokens.css mobile block), not from breakpoint classes — it switches at the `md` breakpoint, not at Tailwind `sm:` like the former Heading component did.',
|
|
48
|
+
'text-wrap: balance gives up after 6 lines in Chromium / Edge (10 in Firefox). Headings run 1–3 lines by the type-ramp rule, so it never applies in practice.',
|
|
49
|
+
],
|
|
50
|
+
}),
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
} satisfies Meta<typeof Heading>;
|
|
55
|
+
|
|
56
|
+
export default meta;
|
|
57
|
+
type Story = StoryObj<typeof meta>;
|
|
58
|
+
|
|
59
|
+
export const Playground: Story = {
|
|
60
|
+
args: {
|
|
61
|
+
level: 2,
|
|
62
|
+
size: 'h2',
|
|
63
|
+
children: SAMPLE,
|
|
64
|
+
},
|
|
65
|
+
argTypes: {
|
|
66
|
+
level: { control: 'inline-radio', options: LEVELS },
|
|
67
|
+
size: { control: 'select', options: SIZES },
|
|
68
|
+
children: { control: 'text' },
|
|
69
|
+
className: { control: 'text' },
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The whole Size axis. Every row renders as an `<h2>` so the comparison is the pure
|
|
75
|
+
* style — the tag never changes what renders.
|
|
76
|
+
*/
|
|
77
|
+
export const Matrix: Story = {
|
|
78
|
+
args: { level: 2, children: SAMPLE },
|
|
79
|
+
parameters: {
|
|
80
|
+
docs: {
|
|
81
|
+
description: {
|
|
82
|
+
story:
|
|
83
|
+
'All eight sizes, each labelled with its font size desktop → mobile. Display (d1–d3) is Poppins Bold at --leading-compact; h1 Bold and h2–h4 SemiBold at --leading-tight; h5 SemiBold at --leading-relaxed.',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
render: () => (
|
|
88
|
+
<div className="grid grid-cols-[auto_1fr] items-baseline gap-x-800 gap-y-600">
|
|
89
|
+
{SIZES.map(size => (
|
|
90
|
+
<React.Fragment key={size}>
|
|
91
|
+
<span className="text-body-sm font-medium text-text-secondary">
|
|
92
|
+
{size} · {SIZE_PX[size]} px
|
|
93
|
+
</span>
|
|
94
|
+
<Heading level={2} size={size}>
|
|
95
|
+
{SAMPLE}
|
|
96
|
+
</Heading>
|
|
97
|
+
</React.Fragment>
|
|
98
|
+
))}
|
|
99
|
+
</div>
|
|
100
|
+
),
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export const LevelVsSize: Story = {
|
|
104
|
+
args: { level: 2, children: SAMPLE },
|
|
105
|
+
parameters: {
|
|
106
|
+
docs: {
|
|
107
|
+
description: {
|
|
108
|
+
story:
|
|
109
|
+
'`level` and `size` are two decisions. Left: the default — `size` follows `level` (h6 shares the h5 step). Right: decoupled — the tag stays what the outline needs while the visual weight is picked for the spot.',
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
render: () => (
|
|
114
|
+
<Showcase>
|
|
115
|
+
<Section title="Default — size follows level" layout="column">
|
|
116
|
+
{LEVELS.map(level => (
|
|
117
|
+
<Heading key={level} level={level}>
|
|
118
|
+
{`<h${level}>`} — výchozí velikost
|
|
119
|
+
</Heading>
|
|
120
|
+
))}
|
|
121
|
+
</Section>
|
|
122
|
+
{/* Ordered h1 → h2 → h3 so the exhibit itself keeps a valid outline (each level
|
|
123
|
+
steps down by one): the sizes are what is decoupled here, not the order. */}
|
|
124
|
+
<Section title="Decoupled — tag from the outline, size from the spot" layout="column">
|
|
125
|
+
<Heading level={1} size="h4">
|
|
126
|
+
{'<h1>'} vykreslený ve velikosti h4
|
|
127
|
+
</Heading>
|
|
128
|
+
<Heading level={2} size="h1">
|
|
129
|
+
{'<h2>'} vykreslený ve velikosti h1
|
|
130
|
+
</Heading>
|
|
131
|
+
<Heading level={3} size="h4">
|
|
132
|
+
Poslední faktury — {'<h3>'} jako titulek karty (h4)
|
|
133
|
+
</Heading>
|
|
134
|
+
</Section>
|
|
135
|
+
</Showcase>
|
|
136
|
+
),
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* The step-down is token-driven: tokens.css overrides the font-size primitives below
|
|
141
|
+
* the md breakpoint, so the same classes render one step smaller here with no breakpoint logic in
|
|
142
|
+
* the component.
|
|
143
|
+
*/
|
|
144
|
+
export const Mobile: Story = {
|
|
145
|
+
args: { level: 2, children: SAMPLE },
|
|
146
|
+
globals: { viewport: { value: 'mobile' } },
|
|
147
|
+
parameters: {
|
|
148
|
+
docs: {
|
|
149
|
+
description: {
|
|
150
|
+
story:
|
|
151
|
+
'Mobile viewport. Every size steps down from the token layer (D1 48→40 … H5 16→14); the component emits no breakpoint class. In the Docs tab the canvas is not resized — open the story to see the mobile step.',
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
render: () => (
|
|
156
|
+
<div className="flex flex-col gap-600">
|
|
157
|
+
{SIZES.map(size => (
|
|
158
|
+
<div key={size} className="flex flex-col gap-100">
|
|
159
|
+
<span className="text-body-xs text-text-secondary">
|
|
160
|
+
{size} · {SIZE_PX[size].split(' → ')[1]} px
|
|
161
|
+
</span>
|
|
162
|
+
<Heading level={2} size={size}>
|
|
163
|
+
{SAMPLE}
|
|
164
|
+
</Heading>
|
|
165
|
+
</div>
|
|
166
|
+
))}
|
|
167
|
+
</div>
|
|
168
|
+
),
|
|
169
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { tv } from '../../internal/tailwind-variants';
|
|
4
|
+
import { cn } from '../../internal/utils';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Heading — the typed heading run (`heading.manifest.json`, atom, v1.2.0).
|
|
8
|
+
*
|
|
9
|
+
* ## Two decisions, two props
|
|
10
|
+
*
|
|
11
|
+
* `level` and `size` are independent (`intent.rules[0]`): `level` (1–6) is the HTML
|
|
12
|
+
* tag and carries the document outline, `size` is the only visual axis and steps the
|
|
13
|
+
* type ramp D1 · D2 · D3 · H1 · H2 · H3 · H4 · H5. An `<h2>` may render at H1 size and
|
|
14
|
+
* vice versa. `level` is code-only — it never changes what renders, only the tag.
|
|
15
|
+
*
|
|
16
|
+
* When `size` is not set it follows `level` (manifest `notes[1]`): 1→h1 … 5→h5, and
|
|
17
|
+
* 6→h5 because the ramp has five product steps. That default is a convenience, not a
|
|
18
|
+
* rule — pick `size` by the visual weight the spot needs.
|
|
19
|
+
*
|
|
20
|
+
* Size values are the Figma `D1`–`H5` names lowercased (casing rule), not the
|
|
21
|
+
* `xs · sm · md · lg · xl` vocabulary: the axis is a type ramp of two roles, not a
|
|
22
|
+
* density scale — the approved deviation `size-vocabulary-type-ramp`.
|
|
23
|
+
*
|
|
24
|
+
* ## No breakpoint logic
|
|
25
|
+
*
|
|
26
|
+
* Every size steps down below 768px (D1 48→40 … H5 16→14), entirely from the token
|
|
27
|
+
* layer: tokens.css overrides the font-size primitives inside
|
|
28
|
+
* `@media (max-width: 767px)` and the semantic aliases follow. The leading is a ratio
|
|
29
|
+
* riding in each `text-heading-*` / `text-display-*` fontSize tuple, so it follows the
|
|
30
|
+
* step too. No `sm:` / `md:` class here on purpose (spec § Sizes → "Responsive
|
|
31
|
+
* step-down is token-driven").
|
|
32
|
+
*
|
|
33
|
+
* ## No states, no loading
|
|
34
|
+
*
|
|
35
|
+
* Static text: no hover / focus / disabled, flat `--text-primary` ink. There is no
|
|
36
|
+
* `loading` prop (`intent.rules[2]`) — compose a Skeleton sized to the line box
|
|
37
|
+
* (`sizes[].height`) instead.
|
|
38
|
+
*/
|
|
39
|
+
const headingVariants = tv({
|
|
40
|
+
base: [
|
|
41
|
+
// --font-heading (Poppins) + chrome.ink --text-primary, flat on every size.
|
|
42
|
+
'font-poppins text-text-primary',
|
|
43
|
+
// chrome.text-wrap: balance on every size. Bound to the token, not the bare
|
|
44
|
+
// `text-balance` utility, so the token lint can grade the binding (no Tailwind key
|
|
45
|
+
// exists for --text-wrap-heading — same spelling as Hero / PromoSticker / Modal).
|
|
46
|
+
'[text-wrap:var(--text-wrap-heading)]',
|
|
47
|
+
],
|
|
48
|
+
variants: {
|
|
49
|
+
// sizes[].font → spec/02-tokens/text-styles.json. Each fontSize key carries the
|
|
50
|
+
// style's leading (Display --leading-compact, H1–H4 --leading-tight, H5
|
|
51
|
+
// --leading-relaxed) and its tracking (styles/theme.generated.css), so no
|
|
52
|
+
// separate `leading-*` class is emitted. Weight is the only thing the style table
|
|
53
|
+
// does not carry: Display + H1 Bold, H2–H5 SemiBold (spec § Sizes).
|
|
54
|
+
size: {
|
|
55
|
+
d1: 'text-display-d1 font-bold',
|
|
56
|
+
d2: 'text-display-d2 font-bold',
|
|
57
|
+
d3: 'text-display-d3 font-bold',
|
|
58
|
+
h1: 'text-heading-h1 font-bold',
|
|
59
|
+
h2: 'text-heading-h2 font-semibold',
|
|
60
|
+
h3: 'text-heading-h3 font-semibold',
|
|
61
|
+
h4: 'text-heading-h4 font-semibold',
|
|
62
|
+
h5: 'text-heading-h5 font-semibold',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
defaultVariants: {
|
|
66
|
+
size: 'h2',
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
71
|
+
export type HeadingSize = 'd1' | 'd2' | 'd3' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5';
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The default `size` for each `level` when the consumer sets none (manifest
|
|
75
|
+
* `notes[1]`). h6 shares the last step with h5.
|
|
76
|
+
*/
|
|
77
|
+
export const HEADING_SIZE_BY_LEVEL: Record<HeadingLevel, HeadingSize> = {
|
|
78
|
+
1: 'h1',
|
|
79
|
+
2: 'h2',
|
|
80
|
+
3: 'h3',
|
|
81
|
+
4: 'h4',
|
|
82
|
+
5: 'h5',
|
|
83
|
+
6: 'h5',
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
87
|
+
/**
|
|
88
|
+
* Semantic level — the rendered tag (`<h1>`–`<h6>`) and the document outline.
|
|
89
|
+
* Required: the outline is a decision, never a default. Keep one `h1` per page and
|
|
90
|
+
* do not skip levels to hit a visual size — set `size` for that.
|
|
91
|
+
*/
|
|
92
|
+
level: HeadingLevel;
|
|
93
|
+
/**
|
|
94
|
+
* Visual size on the type ramp. Defaults to the `level` mapping (1→h1 … 5→h5,
|
|
95
|
+
* 6→h5). Display sizes (`d1`–`d3`) are marketing / hero surfaces only — never an
|
|
96
|
+
* in-app screen heading.
|
|
97
|
+
*/
|
|
98
|
+
size?: HeadingSize;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const Heading = React.forwardRef<HTMLHeadingElement, HeadingProps>(
|
|
102
|
+
({ level, size, className, children, ...props }, ref) => {
|
|
103
|
+
const Tag = `h${level}` as const;
|
|
104
|
+
const resolvedSize = size ?? HEADING_SIZE_BY_LEVEL[level];
|
|
105
|
+
|
|
106
|
+
return (
|
|
107
|
+
<Tag
|
|
108
|
+
ref={ref}
|
|
109
|
+
className={cn(headingVariants({ size: resolvedSize }), className)}
|
|
110
|
+
// data-fods-* before the spread: a host that composes this atom (Section
|
|
111
|
+
// Header) renames the marker to its own part name — the FODS marker
|
|
112
|
+
// convention.
|
|
113
|
+
data-fods-component="heading"
|
|
114
|
+
data-fods-part="root"
|
|
115
|
+
{...props}
|
|
116
|
+
>
|
|
117
|
+
{children}
|
|
118
|
+
</Tag>
|
|
119
|
+
);
|
|
120
|
+
},
|
|
121
|
+
);
|
|
122
|
+
Heading.displayName = 'Heading';
|
|
123
|
+
|
|
124
|
+
export { Heading, headingVariants };
|