@invoiceonline/ui-react 0.0.0 → 0.2.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 +100 -0
- package/CHANGELOG.md +149 -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-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 +119 -0
- package/dist/components/field/Field.js +332 -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 +210 -0
- package/dist/components/field-pair/FieldPair.js +335 -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 +160 -0
- package/dist/components/text-field/TextField.js +244 -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 +130 -0
- package/dist/index.js +74 -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.d.ts +60 -0
- package/dist/internal/useDateFieldTrigger.js +235 -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 +44 -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 +396 -0
- package/docs/Contributing.mdx +78 -0
- package/docs/ForAgents.mdx +53 -0
- package/docs/Introduction.mdx +54 -0
- package/llms.txt +550 -0
- package/package.json +347 -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-picker/DatePicker.mdx +440 -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 +787 -0
- package/src/components/field/index.ts +20 -0
- package/src/components/field-pair/FieldPair.mdx +312 -0
- package/src/components/field-pair/FieldPair.stories.tsx +539 -0
- package/src/components/field-pair/FieldPair.tsx +845 -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 +699 -0
- package/src/components/text-field/TextField.stories.tsx +674 -0
- package/src/components/text-field/TextField.tsx +645 -0
- package/src/components/text-field/index.ts +11 -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 +70 -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 +497 -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 +57 -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 +360 -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,575 @@
|
|
|
1
|
+
import { Meta, Canvas, Controls } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as TableStories from './Table.stories';
|
|
3
|
+
import { ViewportFrame } from '../../storybook/viewportFrame';
|
|
4
|
+
|
|
5
|
+
<Meta of={TableStories} tags={['autodocs']} />
|
|
6
|
+
|
|
7
|
+
# Table
|
|
8
|
+
|
|
9
|
+
## Metadata
|
|
10
|
+
|
|
11
|
+
- **Layer:** organism
|
|
12
|
+
- **Status:** draft
|
|
13
|
+
- **Manifest version:** `2.0.1`
|
|
14
|
+
- **Sub-component manifests:** `_table-child-connector` version `1.1.4` (the parent → child branch glyph)
|
|
15
|
+
- **Tokens used:** `--bg-edge-shadow`, `--bg-hover`, `--bg-primary`, `--bg-secondary`, `--border-width-100`, `--border-width-200`, `--font-body`, `--font-size-base`, `--font-size-sm`, `--font-size-xs`, `--font-size-xxs`, `--font-weight-normal`, `--font-weight-semibold`, `--icon-muted`, `--leading-loose`, `--leading-relaxed`, `--outline-default`, `--outline-focus`, `--radius-0`, `--size-illustration-empty`, `--space-100`, `--space-1000`, `--space-1200`, `--space-1300`, `--space-200`, `--space-300`, `--space-400`, `--space-500`, `--space-600`, `--space-800`, `--status-danger-solid`, `--status-info-solid`, `--status-success-solid`, `--status-violet-solid`, `--status-warning-solid`, `--text-placeholder`, `--text-primary`, `--text-secondary`, `--z-index-base`
|
|
16
|
+
|
|
17
|
+
The manifests are `spec/05-organisms/table.manifest.json` (`kind: structure`, `axes` empty) and `spec/05-organisms/_table-child-connector.manifest.json`; a bump of either re-opens the component per Definition of Done (e). The `Tokens used` line is traced by hand from the classes of `Table.tsx` and `internal/table/*`; the composed atoms (Column Header, Checkbox, Icon Button, Pagination, Select, Chip, Button, Menu) list their own tokens on their own pages.
|
|
18
|
+
|
|
19
|
+
## Overview
|
|
20
|
+
|
|
21
|
+
Table is the **record-list organism**: a real `<table>` whose columns hold comparable, typed values across many records — invoices, expenses, contacts. A person scans down a column (Splatnost, Stav, Celkem s DPH) at least as often as along a row, so the organism governs the column grid, the row and cell padding, the dividers and the status edge, and fills every cell with an existing atom.
|
|
22
|
+
|
|
23
|
+
**Use it** for any record list that reads as columns (manifest `intent.whenToUse`). **Do not use it** for a free-flowing list of dissimilar items — that is `List Row` in a popover or page list — or for card-style record summaries.
|
|
24
|
+
|
|
25
|
+
Behaviour the component owns:
|
|
26
|
+
|
|
27
|
+
- **Controlled state.** Sorting, selection, column visibility and pagination all come in through props and go out through callbacks. Sorting is `manualSorting` — the server orders, the organism only reports the `SortingState` the user asked for — and bi-state: a fresh column starts ascending, a sorted one flips, it is never removed.
|
|
28
|
+
- **Width.** Every column declares `meta.width`; exactly the name / e-mail columns are `meta.flex` and share the leftover width. When the container is narrower than the grid, the grid scrolls inside its own region and the identity and actions columns pin (see Variants → Horizontal scroll).
|
|
29
|
+
- **Below `md`** the organism renders a separate expandable-row layout — still a `<table>` — when the consumer passes `mobile` (see Variants → Mobile). Without `mobile`, the desktop table renders at every width.
|
|
30
|
+
|
|
31
|
+
## Rationale
|
|
32
|
+
|
|
33
|
+
Table is **chrome + filling rules, not a componentized row** (spec § Rationale): the organism owns the column budget, the padding, the divider and the status-edge recipes, and each row is an assembly of atoms dropped into that structure, so row content can vary while padding, alignment and density stay governed. `List Row` is fenced out — a table row is a real `<tr>` with typed columns, and List Row's persistent Selected fill would add a second selection language beside the checkbox. The one new piece the organism needed is the parent → child branch marker, `_Table Child Connector`.
|
|
34
|
+
|
|
35
|
+
Implementation decisions recorded here:
|
|
36
|
+
|
|
37
|
+
- **Built on TanStack Table v9.** `internal/table/features.ts` defines the feature set once at module scope (sorting, selection, column visibility, row expanding, column pinning, typed `columnMeta`), and `createTableColumnHelper<T>()` binds a column helper to it. The organism owns the `useTable()` instance; the mobile layout receives the same instance.
|
|
38
|
+
- **Column facts live in `columnDef.meta`** (`TableColumnMeta`): width, alignment, flex floor, locked / optional, description, tooltip, identity, sortable. The manifest attributes widths and the alignment law to the organism, not to Column Header, so a consumer declares each column once.
|
|
39
|
+
- **The row has no padding of its own.** A `<tr>` can carry neither padding nor gap, so the row inset `--space-500` and the cell gap `--space-100` are folded into the cells (first cell: inset, every other cell: gap, last cell: trailing inset) and each `<col>` is widened by the same amount — the grid still closes on the manifest budget.
|
|
40
|
+
- **Chrome columns are display columns.** The select column and the actions column are added by the organism around the consumer's columns and rendered by the organism, not through `cell` renderers.
|
|
41
|
+
|
|
42
|
+
## Anatomy
|
|
43
|
+
|
|
44
|
+
The desktop root is a `<div>` (`data-fods-component="table"`, `data-fods-part="root"`), fill `--bg-primary`, radius `--radius-0`. Your `className` lands here.
|
|
45
|
+
|
|
46
|
+
- **Scroll frame** — non-scrolling positioning box with the table's top hairline (`--outline-default` at `--border-width-100`), from which the edge signals hang.
|
|
47
|
+
- **Scroll region** (`data-fods-part="scroll-region"`) — `role="region"` named by `scrollRegionLabel` (falls back to `caption`), `overflow-x: auto`, vertical overflow hidden (the page scrolls vertically).
|
|
48
|
+
- **Edge shadow** (`data-fods-part="edge-shadow"`, decorative) — a `--space-1000` (40px) band of `--bg-edge-shadow` fading to transparent, laid over the content passing under a pinned zone.
|
|
49
|
+
- **Edge mask** (`data-fods-part="edge-mask"`, decorative) — a `--space-1000` fade into `--bg-primary` at a cut right edge nothing pins.
|
|
50
|
+
- **`<table>`** — `table-layout: fixed`, `border-collapse: separate` with zero spacing (a collapsed border would belong to the grid and scroll away from a sticky cell), Body/S Regular in `--text-primary`. Its `min-width` is the sum of the column floors.
|
|
51
|
+
- **Caption** — the `caption` prop; visually hidden unless `captionHidden={false}`, then Body/S Semibold above the table.
|
|
52
|
+
- **`<colgroup>`** — one `<col>` per visible column, width from `meta.width` + the folded inset / gap; a flexible column is `auto`.
|
|
53
|
+
- **Header row** (`data-fods-part="header"`) — one Column Header per data column (it owns its own `--space-500` inline padding; the host adds only the inset / gap), closed by a `--outline-default` hairline. The header never takes the row hover.
|
|
54
|
+
- **Select-all** — Checkbox S in the select column (40px).
|
|
55
|
+
- **Column settings** — Icon Button Tertiary S with the `table` glyph in the actions column, when `columnVisibility` is passed. Without it the actions header is an empty `<td>`.
|
|
56
|
+
- **Row** (`data-fods-part="row"`) — min-height 44px (`h-[44px]` on every cell), no fill at rest, `--bg-hover` over the full row on hover, a `--outline-default` hairline at the bottom. With `onRowClick` the row also takes a pointer cursor (`cursor-pointer`); the hover wash is the same either way.
|
|
57
|
+
- **Cell** (`data-fods-part="cell"`) — `--space-500` own left padding; right-aligned cells also `--space-500` on the right. The first cell of the row folds in the row inset: `pl-800` when it is a data cell, `pl-500` when it is the select cell (the identity cell then keeps its gap + padding `pl-[calc(var(--space-100)+var(--space-500))]`).
|
|
58
|
+
- **Status edge** (`data-fods-part="status-edge"`, decorative) — a `--space-200` (4px) strip at the row's left edge in the status-solid colour of `statusEdge(row)`: `--status-danger-solid`, `--status-warning-solid`, `--status-success-solid`, `--status-info-solid`, `--status-violet-solid`. It lives in the first cell, so it pins with the identity zone.
|
|
59
|
+
- **Identity cell** — the `meta.identity` column. A child row opens it with a 24px connector slot (`w-800`, gap `--space-200`) before the value; a parent row has no slot, so its value starts where the child's connector does. The column width budgets the slot on every row (`intent.rules[0]`), the cell content does not.
|
|
60
|
+
- **Child connector** (`data-fods-part="child-connector"`) — inline SVG, 24×44 box, a 1px rail and a 12×1 tick in `--outline-default`; ├─ for a middle child (rail the full 44), └─ for the last (rail 22, down to the tick). The rail starts at the row's top edge and touches the parent row above it.
|
|
61
|
+
- **Empty value** — an accessor cell whose value is `null`, `undefined` or `''` renders an em dash in `--text-placeholder` (`chrome.empty-cell`) instead of calling the cell renderer. The desktop grid and the mobile identity and status lines share the same test (`isEmptyValue`) and the same dash (see Variants → Mobile).
|
|
62
|
+
- **Flexible cell** — a `meta.flex` cell truncates on one line; while it is clipped, hover or focus opens a Tooltip with the full string or number.
|
|
63
|
+
- **Row actions** — Icon Buttons Tertiary XS (28px), flush, right-aligned in the trailing column. The column width is 12 + n × 28 + 12 for the widest action set on the page, never narrower than the 32px settings button.
|
|
64
|
+
- **Footer** (`data-fods-part="footer"`) — a `<div>` after the scroll region: Pagination, a spacer, the static page-size label in `--text-secondary`, and the page-size Select S, FIXED 88px (`--space-1300` + `--space-400`, `slots.footer-page-size` — at 80 the option 100 truncated). Padding top `--space-600`, bottom / x / gap `--space-500`; no divider above it. Rendered only when `pagination` is passed, not while loading and not under an empty state. When the row does not fit, Pagination keeps its one line and the page-size label + Select wrap below it, right-aligned.
|
|
65
|
+
|
|
66
|
+
<Canvas of={TableStories.Matrix} />
|
|
67
|
+
|
|
68
|
+
## Variants
|
|
69
|
+
|
|
70
|
+
Table has **no variant axis** (`axes` is empty, `kind: structure`). Every story is a configuration of the organism, switched on by the props it receives:
|
|
71
|
+
|
|
72
|
+
<table>
|
|
73
|
+
<thead>
|
|
74
|
+
<tr><th>Configuration</th><th>Prop</th><th>What renders</th><th>Tokens</th></tr>
|
|
75
|
+
</thead>
|
|
76
|
+
<tbody>
|
|
77
|
+
<tr>
|
|
78
|
+
<td>Selection</td>
|
|
79
|
+
<td><code>selection</code></td>
|
|
80
|
+
<td>Leading 40px column: page-scoped tri-state select-all + a row Checkbox S. Absent = no column at all (the contact list)</td>
|
|
81
|
+
<td>Checkbox's own</td>
|
|
82
|
+
</tr>
|
|
83
|
+
<tr>
|
|
84
|
+
<td>Column settings</td>
|
|
85
|
+
<td><code>columnVisibility</code></td>
|
|
86
|
+
<td>Trailing header Icon Button opening the visibility checklist</td>
|
|
87
|
+
<td>Icon Button / List Row / Text Link own</td>
|
|
88
|
+
</tr>
|
|
89
|
+
<tr>
|
|
90
|
+
<td>Row actions</td>
|
|
91
|
+
<td><code>rowActions</code></td>
|
|
92
|
+
<td>Trailing pinned column of Icon Buttons Tertiary XS, flush</td>
|
|
93
|
+
<td>Icon Button's own</td>
|
|
94
|
+
</tr>
|
|
95
|
+
<tr>
|
|
96
|
+
<td>Status edge</td>
|
|
97
|
+
<td><code>statusEdge</code></td>
|
|
98
|
+
<td>4px strip at the row's left edge (the invoice list only; the other lists omit it)</td>
|
|
99
|
+
<td><code>--space-200</code>, <code>--status-*-solid</code></td>
|
|
100
|
+
</tr>
|
|
101
|
+
<tr>
|
|
102
|
+
<td>Child rows</td>
|
|
103
|
+
<td><code>getSubRows</code>, <code>childRowPrefix</code></td>
|
|
104
|
+
<td>Parent + credit-note clusters, always expanded, no hairline inside a cluster</td>
|
|
105
|
+
<td><code>--outline-default</code></td>
|
|
106
|
+
</tr>
|
|
107
|
+
<tr>
|
|
108
|
+
<td>Footer</td>
|
|
109
|
+
<td><code>pagination</code></td>
|
|
110
|
+
<td>Pagination + page-size Select (options 10 / 20 / 30 / 40 / 50 / 100 by default)</td>
|
|
111
|
+
<td><code>--space-600</code>, <code>--space-500</code>, <code>--space-1300</code>, <code>--text-secondary</code></td>
|
|
112
|
+
</tr>
|
|
113
|
+
<tr>
|
|
114
|
+
<td>Mobile</td>
|
|
115
|
+
<td><code>mobile</code></td>
|
|
116
|
+
<td>Below <code>md</code>: the expandable-row layout</td>
|
|
117
|
+
<td><code>--bg-secondary</code>, <code>--outline-default</code>, <code>--icon-muted</code></td>
|
|
118
|
+
</tr>
|
|
119
|
+
<tr>
|
|
120
|
+
<td>Row click</td>
|
|
121
|
+
<td><code>onRowClick</code></td>
|
|
122
|
+
<td>A click on a desktop body row (parent or child) calls the handler; the rows take a pointer cursor</td>
|
|
123
|
+
<td>—</td>
|
|
124
|
+
</tr>
|
|
125
|
+
</tbody>
|
|
126
|
+
</table>
|
|
127
|
+
|
|
128
|
+
### Child rows
|
|
129
|
+
|
|
130
|
+
<Canvas of={TableStories.ChildRows} />
|
|
131
|
+
|
|
132
|
+
A child (credit note) is a full peer row — its own checkbox, status edge and actions — distinguished only by the connector in its identity cell and a visually hidden prefix from `childRowPrefix` (e.g. „Dobropis k faktuře 2024-0146“). The prefix is part of the child's **link name**: the identity cell renderer puts `<TableChildRowPrefix />` first inside its Text Link, so the prefix is announced with the link when tabbing (`_table-child-connector` 1.1.3). The organism cannot reach into the consumer's link — without `<TableChildRowPrefix />` the prefix is not rendered at all. The divider follows the last row of the cluster.
|
|
133
|
+
|
|
134
|
+
### Column settings
|
|
135
|
+
|
|
136
|
+
<Canvas of={TableStories.ColumnSettings} />
|
|
137
|
+
|
|
138
|
+
The checklist is one flat group of List Rows S with a leading Checkbox S, under the same anchored-panel wiring as the multi-select filter facet. A `meta.locked` column stays in the list as a disabled + checked row and is never hidden, whatever the stored state says; a `meta.defaultVisible: false` column is off until switched on. The footer Text Link restores the consumer's default set and the panel stays open; toggling never closes it. While `loading`, the trigger opens nothing: it is `aria-disabled="true"` rather than natively disabled, keeps its tab stop and takes the Icon Button's Disabled ink, and a panel open when `loading` starts closes (see Accessibility → Column settings).
|
|
139
|
+
|
|
140
|
+
Without `columnVisibility` there is no trigger and no internal state: the table always shows the default set (every `meta.locked` column plus every column whose `meta.defaultVisible` is not `false`), so an optional column cannot be switched on at all.
|
|
141
|
+
|
|
142
|
+
### Row click
|
|
143
|
+
|
|
144
|
+
<Canvas of={TableStories.RowClick} />
|
|
145
|
+
|
|
146
|
+
`onRowClick(row, event)` makes the whole desktop row a pointer target (manifest `intent.rules`: the whole row is clickable, pointer convenience only), usually opening the record the identity link points at. It is called for parent and child rows alike, with the TanStack row and the mouse event. The row gets no `tabIndex`, no role and no key handler, so the identity link stays the only keyboard and screen-reader path into the record (`delivery.react`). A row whose identity value is empty (a Budoucí invoice) has no identity link — the organism draws the em dash and never calls the cell renderer (`isEmptyValue`, desktop and the mobile identity line) — so for such a row the consumer must offer the same destination through a keyboard control in the row, a row action; the spec does not cover this row yet (pending design decision).
|
|
147
|
+
|
|
148
|
+
The handler is **not** called (guard `isRowClickTarget` in `Table.tsx`) when:
|
|
149
|
+
|
|
150
|
+
- the event is already `defaultPrevented` — a cell handled it;
|
|
151
|
+
- the target is outside the row — React bubbles clicks from a cell's portalled popover or tooltip through the row;
|
|
152
|
+
- the target is inside `a`, `button`, `input`, `select`, `textarea`, `label`, `[role="button"]`, `[role="checkbox"]` or `[role="menuitem"]`;
|
|
153
|
+
- the target is inside the cell that holds the selection checkbox (`data-fods-part="row-select"`) or the row actions (`data-fods-part="row-actions"`) — a click on their padding is a missed control, not a row click.
|
|
154
|
+
|
|
155
|
+
Skeleton rows, the empty state and the mobile layout never call it; on mobile a row tap toggles its panel.
|
|
156
|
+
|
|
157
|
+
### Horizontal scroll
|
|
158
|
+
|
|
159
|
+
<Canvas of={TableStories.Scroll} />
|
|
160
|
+
|
|
161
|
+
When the grid is wider than its container:
|
|
162
|
+
|
|
163
|
+
- The **identity zone** (select column + the `meta.identity` column, the status edge with it) pins to the left; the **actions column** pins to the right. Both are `position: sticky` cells that stay in the row — DOM and tab order do not change. A pinned cell paints `--bg-primary` and keeps the row's `--bg-hover` wash over it.
|
|
164
|
+
- Each zone gets its `--outline-default` rule on its scrolling side. The 1px border is always present (transparent) so it never shifts the grid when it turns on.
|
|
165
|
+
- The rule and the edge-shadow band appear together, and only while content is actually passing under that zone (`edge-visibility`): the **leading** zone once you have scrolled away from the start (`scrollLeft > 0`), the **trailing** zone until you reach the end of the scroll. At rest against its edge a zone shows neither — at the start only the trailing zone is marked, at the end only the leading one.
|
|
166
|
+
- **Empty state:** no edge shadow or edge mask — no rows pass under the pinned zones, so there is nothing to signal; the header still scrolls. The empty content is `sticky` at the visible width of the region (`@container`, `100cqw`), so it centres in view rather than under a pinned zone.
|
|
167
|
+
- **Degradation:** when the middle between the zones would be narrower than the two widest unpinned columns of this consumer, the **trailing** pin drops — the actions scroll with the row and the cut edge takes the edge-mask fade instead. The identity zone never unpins.
|
|
168
|
+
|
|
169
|
+
### Mobile
|
|
170
|
+
|
|
171
|
+
<ViewportFrame storyId="design-system-organisms-table--mobile" width={390} label="Below md — viewport 390, with credit-note clusters" />
|
|
172
|
+
|
|
173
|
+
Below `md` (and only when `mobile` is passed) the organism renders `TableMobile` — a `<table>` with three columns: a 24px caret column, the identity column and the status column, both under real Column Headers. No selection, no column settings, no pagination.
|
|
174
|
+
|
|
175
|
+
- **Row** (`data-fods-part="mobile-row"`) — min-height 68px; identity stack (identity value, each child's identity as an extra line, then the `secondaryColumnId` value in Body/XXS `--text-secondary`), status stack (status value, then the `amountColumnId` value in Body/XXS `--text-secondary`). The caret (in a 44px box — one record's stack) and both stacks anchor to the top, so in a credit-note cluster they stay level with the numbers. Every row closes with a `--outline-default` hairline, expanded or not.
|
|
176
|
+
- **Expand** — the caret button toggles; a click anywhere else on the row also toggles, unless it lands on a link, button or form control inside the row. Several rows can be open. Expansion is shown by the caret rotating 180°, not by a row fill.
|
|
177
|
+
- **Panel** (`data-fods-part="mobile-panel"`) — `--bg-secondary`, runs into the next row without a hairline (only the last row's panel closes the table with one); opening, its room opens on `--spring-gentle` while it fades in over `--duration-slow` + `--easing-enter`; closing, it fades out over `--duration-fast` + `--easing-exit` first and only then does the room close — it stays mounted and `inert` until then (Motion, see Mobile motion below). One block per record (parent first, then each child, separated by a hairline). Each block lists label → value pairs (label column at least 100px, growing to the longest label up to half the row). The list is built from all leaf columns by `meta.mobilePanel`: the columns visible on desktop (`'auto'`, the default), plus every `'always'` column even while the desktop settings hide it, minus every `'never'` column; the identity / status / amount columns are always left out. Empty values are omitted; a display column gets its pair unless its cell renders nothing (the empty `dd` hides the row via `has-[>dd:empty]:hidden`). Then the action pair: the „Více“ Dropdown Button Tertiary S with the `moreActions` menu on the left, the `primaryAction` Button Primary S on the right (with its optional leading `icon`, `disabled` when `primaryAction` returns `disabled: true`). The menu is an Action menu: an action marked `danger` (Smazat) renders in the `danger` tone, in its own group behind a separator.
|
|
178
|
+
- **Empty values** — an empty accessor value in the identity or status position renders the same em dash in `--text-placeholder` as the desktop cell (a Budoucí row without a number). The secondary and amount lines and the panel fields are omitted instead.
|
|
179
|
+
- **Load more** (`data-fods-part="load-more"`, a `<tfoot>`) — a Secondary M „Načíst další“ button above the „Zobrazeno N z M“ counter; it fades out (`--duration-fast` + `--easing-exit`) once `hasMore` is false. The rows it appends fade in over `--duration-slow` + `--easing-enter`. While `loadMore.loading` is true the button stays in place in its loading state (`<Button loading>`, `aria-busy`) and does not call `onLoadMore` again. The table-level `loading` is a different wait: the whole page is a skeleton and the load-more row is not rendered.
|
|
180
|
+
- **Layout-aware cells** — both layouts call the same `columnDef.cell`. A cell that looks different on mobile reads `useTableLayout()` instead of measuring the viewport: the identity link is Text Link Strong + Underline On on mobile and Default + Underline Off on desktop (`chrome.link-cells`), and the Stav Chip drops its Info on mobile. In the stories the identity cell (`IdentityLink` in `Table.stories.tsx`) does this; in `_tableFixtures.ts`, `RowLink` switches the identity link, `CounterpartyCell` is plain text on desktop and a Text Link on mobile, and `StatusCell` passes the Chip `info` on desktop only. Outside a Table, and in a Table without `mobile`, the hook returns `'desktop'`.
|
|
181
|
+
- **Gutter** — `--space-600` under `sm`, `--space-800` from `sm`, on the caption, the caret and status columns and the load-more row.
|
|
182
|
+
- **Mobile motion** (manifest 1.40.1 `motion`, run by Motion) — the caret is one `caret-down-small` turning 180° on `--spring-standard` from the tap; a quick re-toggle reverses the caret, the panel's fade and its room from where they are. Under `prefers-reduced-motion` the caret jumps, the room switches at once and the fades shorten to `--duration-instant`; `aria-expanded` still flips.
|
|
183
|
+
|
|
184
|
+
<ViewportFrame storyId="design-system-organisms-table--mobile-motion" width={390} label="Mobile motion — tap a row, tap „Načíst další“" />
|
|
185
|
+
|
|
186
|
+
## Sizes
|
|
187
|
+
|
|
188
|
+
No size axis — a table runs at **one row density** (manifest `intent.sizing`).
|
|
189
|
+
|
|
190
|
+
<table>
|
|
191
|
+
<thead>
|
|
192
|
+
<tr><th>Element</th><th style={{ textAlign: 'right' }}>Height</th><th>Tokens / rule</th></tr>
|
|
193
|
+
</thead>
|
|
194
|
+
<tbody>
|
|
195
|
+
<tr>
|
|
196
|
+
<td>Body row (desktop)</td>
|
|
197
|
+
<td style={{ textAlign: 'right' }}>44px min</td>
|
|
198
|
+
<td><code>h-[44px]</code> on every cell (a cell reads <code>height</code> as a minimum); inset <code>--space-500</code>, gap <code>--space-100</code>, cell left padding <code>--space-500</code></td>
|
|
199
|
+
</tr>
|
|
200
|
+
<tr>
|
|
201
|
+
<td>Header row</td>
|
|
202
|
+
<td style={{ textAlign: 'right' }}>hugs</td>
|
|
203
|
+
<td>44, or 56 when a column carries a <code>description</code> — never 60: a label is one line (Column Header truncates it, the full term in a Tooltip; <code>chrome.column-widths-follow-content</code>)</td>
|
|
204
|
+
</tr>
|
|
205
|
+
<tr>
|
|
206
|
+
<td>Footer</td>
|
|
207
|
+
<td style={{ textAlign: 'right' }}>hugs</td>
|
|
208
|
+
<td>pt <code>--space-600</code>, pb / px / gap <code>--space-500</code>; manifest gives 68 (16 + Select 40 + 12)</td>
|
|
209
|
+
</tr>
|
|
210
|
+
<tr>
|
|
211
|
+
<td>Mobile row</td>
|
|
212
|
+
<td style={{ textAlign: 'right' }}>68px min</td>
|
|
213
|
+
<td><code>--space-1200</code> + <code>--space-200</code>; cell vertical padding <code>--space-500</code></td>
|
|
214
|
+
</tr>
|
|
215
|
+
<tr>
|
|
216
|
+
<td>Empty state</td>
|
|
217
|
+
<td style={{ textAlign: 'right' }}>hugs</td>
|
|
218
|
+
<td>padding-y <code>--space-1200</code> (64), gap <code>--space-600</code>, illustration 140×140</td>
|
|
219
|
+
</tr>
|
|
220
|
+
</tbody>
|
|
221
|
+
</table>
|
|
222
|
+
|
|
223
|
+
**Width** is the consumer's grid. Fixed columns take `meta.width`; flexible columns (`meta.flex`) are `auto` under `table-layout: fixed` and share the leftover width, each down to max(96, `flex.min`). Below the sum of those floors the region scrolls. The 1270 app-shell cap is the width the consumer grids are budgeted for.
|
|
224
|
+
|
|
225
|
+
The 44px row floor is not on the spacing-token grid, so it ships as an arbitrary `h-[44px]` under a `fods-lint` suppression.
|
|
226
|
+
|
|
227
|
+
## States
|
|
228
|
+
|
|
229
|
+
<Canvas of={TableStories.States} />
|
|
230
|
+
|
|
231
|
+
There is **no organism-level state axis**. States live on the rows and on the composed atoms:
|
|
232
|
+
|
|
233
|
+
<table>
|
|
234
|
+
<thead>
|
|
235
|
+
<tr><th>State</th><th>Driven by</th><th>Rendering</th></tr>
|
|
236
|
+
</thead>
|
|
237
|
+
<tbody>
|
|
238
|
+
<tr>
|
|
239
|
+
<td>Default row</td>
|
|
240
|
+
<td>—</td>
|
|
241
|
+
<td>No fill (the <code>--bg-primary</code> surface), <code>--outline-default</code> hairline at the bottom</td>
|
|
242
|
+
</tr>
|
|
243
|
+
<tr>
|
|
244
|
+
<td>Hover row</td>
|
|
245
|
+
<td><code>:hover</code> on the <code><tr></code></td>
|
|
246
|
+
<td><code>--bg-hover</code> over the full row, pinned cells included (as an image layer over their opaque fill); the row's wash fades on <code>--duration-hover</code> / <code>--easing-standard</code> (<code>motion.states.hover</code>), the pinned cells' image layer switches without a fade</td>
|
|
247
|
+
</tr>
|
|
248
|
+
<tr>
|
|
249
|
+
<td>Selected row</td>
|
|
250
|
+
<td><code>selection.state</code></td>
|
|
251
|
+
<td>The Checkbox's own Checked visual only — no row fill (<code>chrome.row.selected-fill: null</code>)</td>
|
|
252
|
+
</tr>
|
|
253
|
+
<tr>
|
|
254
|
+
<td>Sorted column</td>
|
|
255
|
+
<td><code>sorting</code></td>
|
|
256
|
+
<td><code>aria-sort</code> on that column's Column Header; Table adds nothing of its own</td>
|
|
257
|
+
</tr>
|
|
258
|
+
<tr>
|
|
259
|
+
<td>Child cluster</td>
|
|
260
|
+
<td><code>getSubRows</code></td>
|
|
261
|
+
<td>Connector in the identity cell, no hairline between parent and children</td>
|
|
262
|
+
</tr>
|
|
263
|
+
<tr>
|
|
264
|
+
<td>Empty cell</td>
|
|
265
|
+
<td>empty accessor value</td>
|
|
266
|
+
<td>Em dash in <code>--text-placeholder</code></td>
|
|
267
|
+
</tr>
|
|
268
|
+
<tr>
|
|
269
|
+
<td>Disabled action</td>
|
|
270
|
+
<td><code>TableRowAction.disabled</code></td>
|
|
271
|
+
<td>That Icon Button's own disabled state</td>
|
|
272
|
+
</tr>
|
|
273
|
+
<tr>
|
|
274
|
+
<td>Loading</td>
|
|
275
|
+
<td><code>loading</code></td>
|
|
276
|
+
<td><code>skeletonRows</code> rows of 12px Skeleton under the real header (default: the page size — <code>pagination.pageSize</code>, else 20), no footer, <code>aria-busy</code> on the table, the end announced by a sibling <code>role="status"</code>; the Column Headers sort nothing (desktop and mobile), select-all disabled, the column-settings trigger <code>aria-disabled</code> (keeps its tab stop, opens nothing)</td>
|
|
277
|
+
</tr>
|
|
278
|
+
<tr>
|
|
279
|
+
<td>Empty</td>
|
|
280
|
+
<td><code>emptyState</code></td>
|
|
281
|
+
<td>Table / Empty sibling body under the kept header, no footer</td>
|
|
282
|
+
</tr>
|
|
283
|
+
<tr>
|
|
284
|
+
<td>Load failed</td>
|
|
285
|
+
<td><code>emptyState.kind: 'load-failed'</code></td>
|
|
286
|
+
<td>The same sibling body with the <code>load-failed</code> picture and a Secondary „Zkusit znovu“; announced by a sibling <code>role="alert"</code>, never as „Načteno“</td>
|
|
287
|
+
</tr>
|
|
288
|
+
</tbody>
|
|
289
|
+
</table>
|
|
290
|
+
|
|
291
|
+
In the States story Hover is forced with the bare twin of the recipe classes (`storybook/forceStates.tsx`), not `parameters.pseudo` — Tailwind wraps `hover:` in `@media (hover: hover)`, which the pseudo-states addon does not rewrite.
|
|
292
|
+
|
|
293
|
+
### Loading
|
|
294
|
+
|
|
295
|
+
<Canvas of={TableStories.Loading} />
|
|
296
|
+
|
|
297
|
+
Manifest `chrome.loading`: one Skeleton Text per data cell, the identity and Stav cells included — **12px** tall (`--space-500`; the atom's own default is 16), `--radius-200`, `--bg-skeleton` — and **shorter than the cell**: the width of a typical value, set per column with `meta.skeletonWidth` (px), else 60 % of the cell. A bar filling the cell would read as a field. The manifest's loading widths (`chrome.loading.width.vydaje`) are Číslo 78, Příloha 54, Kontakt 61, Datum splatnosti 98, Celkem s DPH 84, Stav 84; the expense fixture in `_tableFixtures.ts` carries them as `meta.skeletonWidth`, while the story above renders the invoice demo columns. The select and actions columns stay empty — a skeleton replaces content, not a control — and a loading row takes no hover. Nothing in the header acts meanwhile: each Column Header keeps its look and its tab stop but is `disabled` and sorts nothing (on the desktop and the mobile header alike), the select-all is disabled, and the column-settings trigger keeps its tab stop but is `aria-disabled` and opens nothing; the story's play function checks the `aria-disabled` of the sort header and of the settings button, and that clicking the settings button leaves it `aria-expanded="false"`. Below `md` the identity stack shows two bars (120 and 80) and the status stack one (90).
|
|
298
|
+
|
|
299
|
+
The skeleton stands in for the page about to arrive, so it takes as many rows as the page: `pagination.pageSize` (the consumer's persisted choice), else the manifest default of 20 (`chrome.footer.page-size.default`, `TABLE_DEFAULT_PAGE_SIZE`); `skeletonRows` overrides it.
|
|
300
|
+
|
|
301
|
+
### Empty
|
|
302
|
+
|
|
303
|
+
<Canvas of={TableStories.Empty} />
|
|
304
|
+
|
|
305
|
+
`emptyState` replaces the rows with the Table / Empty sibling (`data-fods-part="empty"`): a `<tbody>` with one full-span cell under the **kept** header (the active sort stays visible to the user about to clear a filter); the footer is dropped. Content is centred, padding-y `--space-1200`, gap `--space-600`: a 140×140 illustration, the title (Body/M Regular, `--text-secondary`; it wraps and is never clamped — `text.empty-copy` is `overflow: "wrap"`), an optional description (Body/S Regular, `--text-secondary`) and an optional M Button with a leading icon (`x` unless `action.icon` says otherwise). The `kind` picks the action's variant (`chrome.empty-state.action`); the picture is the app's `emptyState.illustration`, one `Illustration / Big` picture per kind (`chrome.empty-state.illustration.note`):
|
|
306
|
+
|
|
307
|
+
- `empty` (first use, nothing created yet) — `folder-empty`, the **Primary** create action, labelled with the consumer's create verb + entity and led by the entity's glyph („Vytvořit výdaj“ + `expense`, „Vytvořit fakturu“ + `invoice-new`). Primary, not Brand: orange stays on its four signature slots. The page header then has no create action of its own.
|
|
308
|
+
- `no-results` (a search) — `folder-magnifying-glass`, the **Secondary** reset „Zrušit vyhledávání“.
|
|
309
|
+
- `no-results-filters` (filters) — `funnel`, the **Secondary** reset „Zrušit filtry“.
|
|
310
|
+
- `load-failed` (the list did not load) — `load-failed`, the **Secondary** retry „Zkusit znovu“ led by `arrow-clockwise` (the default icon of this kind). See Load failed below.
|
|
311
|
+
|
|
312
|
+
The package ships no picture (manifest 1.42.0 `delivery.react`): `emptyState.illustration` is a required React element the app supplies — an `<img src={…} alt="" />` of its own copy of the picture for the kind. The Table draws it in the `aria-hidden` `--size-illustration-empty` (140) box (`data-fods-part="empty-illustration"`) and stretches it to fill the box. Which picture fits which kind is in the manifest note above and `spec/03-atoms/illustrations.md`; how an app supplies pictures: [Consuming → Assets](?path=/docs/getting-started-consuming--docs#assets).
|
|
313
|
+
|
|
314
|
+
### Load failed
|
|
315
|
+
|
|
316
|
+
<Canvas of={TableStories.LoadFailed} />
|
|
317
|
+
|
|
318
|
+
Manifest `chrome.empty-state.action.load-failed` (1.41.0), `table.md` § States row 7 and the pattern page `spec/06-patterns/empty-states.md`. The region state for a list whose data did not load: header kept, no footer, the `load-failed` picture, a title that names what did not load — „Výdaje se nepodařilo načíst“, **never** the empty-list text, which would tell the user their data is gone — and one Secondary M „Zkusit znovu“ with `arrow-clockwise`. `action.onClick` is the consumer's refetch; while it runs the consumer passes `loading` and the skeleton replaces the body.
|
|
319
|
+
|
|
320
|
+
- The failure is announced once through a visually hidden `role="alert"`, a sibling of the table like the `role="status"` of Loading; the „Načteno“ status stays silent for that load.
|
|
321
|
+
- After a retry that fails again, the new „Zkusit znovu“ takes focus back, so a keyboard user can try again without searching for it. A load that succeeds ends that loop.
|
|
322
|
+
- An error over rows that are already on screen is a Toast Danger, not this state — the rows stay.
|
|
323
|
+
|
|
324
|
+
## API
|
|
325
|
+
|
|
326
|
+
<Controls />
|
|
327
|
+
|
|
328
|
+
The Controls above drive the story wrapper (`TableDemo`: toggles for selection, settings, footer, actions, status edge, child rows, loading, row click), not `Table` itself. The `Table` props (`TableProps<TData>`, exported from `@invoiceonline/ui-react` with every sub-type):
|
|
329
|
+
|
|
330
|
+
- `caption` — required accessible name; a visually hidden `<caption>` unless `captionHidden={false}`.
|
|
331
|
+
- `columns` — `createTableColumnHelper<TData>()` definitions, each with `meta: TableColumnMeta`. **Must be referentially stable** (module scope or `useMemo`).
|
|
332
|
+
- `data`, `getRowId` — records and their stable ids (selection is keyed by them).
|
|
333
|
+
- `sorting` / `onSortingChange` — controlled TanStack `SortingState`, single column, bi-state.
|
|
334
|
+
- `selection` — `state`, `onChange`, `selectAllLabel` and `rowLabel(row)`. Omit it and the column does not render.
|
|
335
|
+
- `columnVisibility` — `state`, `onChange` and `labels` (`settings`, `group`, `reset`). With it the consumer owns visibility: `state` decides what shows (a locked column shows regardless), the header gets the settings trigger, and „Obnovit výchozí“ calls `onChange` with the defaults derived from `meta.locked` / `meta.defaultVisible`. Without it the default set always applies and an optional column cannot be switched on.
|
|
336
|
+
- `pagination` — `page`, `totalPages`, `totalCount`, `pageSize`, `pageSizeOptions?`, `onPageChange`, `onPageSizeChange`, `pageHref?` and `labels` (forwarded to Pagination, plus the page-size label and Select name).
|
|
337
|
+
- `statusEdge(row)` — a Chip emotion; `neutral` and `undefined` render no edge.
|
|
338
|
+
- `rowActions(row)` — `TableRowAction[]` (`label`, `icon`, `onClick`, `disabled?`, `tooltip?` — desktop hover / focus Tooltip, `danger?` — mobile „Více“ menu only). The organism brings its own `TooltipProvider`.
|
|
339
|
+
- `onRowClick(row, event)` — `row` is the TanStack row (`row.original` is the record), `event` the row's mouse event. Desktop body rows only, parent and child; pointer-only, and skipped for clicks on controls, the selection and row-actions cells, portalled content and already-handled events (see Variants → Row click). Setting it gives the rows `cursor-pointer`.
|
|
340
|
+
- `getSubRows`, `childRowPrefix(child, parent)` — credit-note clusters and their visually hidden prefix, which the identity cell renderer places inside its link with `<TableChildRowPrefix />` (exported from `@invoiceonline/ui-react`; renders nothing on a parent row).
|
|
341
|
+
- `loading`, `skeletonRows` (default `pagination.pageSize`, else `TABLE_DEFAULT_PAGE_SIZE` = 20), `emptyState` (`kind` — `empty` · `no-results` · `no-results-filters` · `load-failed`, `illustration` — the required picture for the kind as a React element (`<img src={folderEmpty} alt="" />`), `title`, `description?`, `action?` — Primary for `empty`, Secondary otherwise; the leading icon defaults to `x`, for `load-failed` to `arrow-clockwise`). For `load-failed`, `action.onClick` is the retry. While `loading`, sorting (desktop and mobile headers) does nothing, the select-all is disabled, the column-settings trigger is `aria-disabled` and opens nothing, and pagination and the mobile load-more row are not rendered. `loadedLabel` — the end-of-load status text (default „Načteno“); a failed load speaks the `load-failed` title through `role="alert"` instead.
|
|
342
|
+
- `mobile` — `TableMobileConfig`: `identityColumnId`, `secondaryColumnId?`, `statusColumnId`, `amountColumnId?`, `primaryAction?(row)` → `{ label, icon?, onClick, disabled? }`, `moreActions?`, `moreLabel?` (default „Více“), `expandLabel(row)`, `loadMore?` (`shown`, `total`, `hasMore`, `onLoadMore`, `loading?` — the busy button while the next page is fetched, `labels`).
|
|
343
|
+
- `useTableLayout()` — a hook, exported from `@invoiceonline/ui-react` next to `TableChildRowPrefix`, returning `'desktop' | 'mobile'` (type `TableLayout`): the layout the calling cell renderer is drawn in. It returns `'desktop'` outside a Table and in a Table without `mobile`. Use it in a cell for the mobile identity link (Strong + Underline On, `chrome.link-cells`) and for the Stav Chip without Info (see Variants → Mobile).
|
|
344
|
+
- `loadedLabel` and `mobile.moreLabel` default to Czech: an app with more than one language version passes both from its translations on every use. The full list of such props: [Consuming → Texts and locale](?path=/docs/getting-started-consuming--docs#texts-and-locale).
|
|
345
|
+
- `scrollRegionLabel` — name of the scroll region; falls back to `caption`.
|
|
346
|
+
|
|
347
|
+
`TableColumnMeta`: `width` (required, px at the 1270 container), `align` (`left` · `right` · `center`), `flex.min`, `locked`, `defaultVisible`, `description`, `tooltip`, `identity`, `sortable`, `mobilePanel` (`'auto'` · `'always'` · `'never'`, default `'auto'`: listed in the mobile panel while the column is visible on desktop; `'always'` lists it even while hidden on desktop; `'never'` omits it), `skeletonWidth` (px of the loading bar).
|
|
348
|
+
|
|
349
|
+
## Do / Don't
|
|
350
|
+
|
|
351
|
+
- ✅ Keep `columns` at module scope (or memoised) and give every column a `meta.width` from the consumer grid
|
|
352
|
+
- ✅ Make only name / e-mail columns `meta.flex`; right-align numeric and money columns (`align: 'right'`)
|
|
353
|
+
- ✅ Mark exactly one column `meta.identity` and render its value as a real link (Text Link Default S, Underline Off) — it is the keyboard path into the record
|
|
354
|
+
- ✅ Name every per-row control with its record: „Upravit fakturu 2024-0142“, „Vybrat fakturu 2024-0142“, never a bare „Upravit“
|
|
355
|
+
- ✅ Model a presence column (Příloha) as a **display** column — absence is the value there, and an accessor would get the em dash
|
|
356
|
+
- ✅ Omit `selection` on a list without bulk actions instead of shipping an empty leading column
|
|
357
|
+
- ✅ Pass the copy of the empty state that actually happened — `empty`, `no-results`, `no-results-filters` or `load-failed`
|
|
358
|
+
- ✅ Put `<TableChildRowPrefix />` first inside the identity link when the table has child rows
|
|
359
|
+
- ✅ Give every data column a `meta.skeletonWidth` of a typical value when the consumer grid has an exhibit
|
|
360
|
+
- ✅ Lead the page's create action with the entity glyph (`expense`, `invoice-new`), never `plus`
|
|
361
|
+
- ✅ Pass `onRowClick` so the whole row opens the record for a pointer, and keep the identity link: it stays the only keyboard and screen-reader path into the record
|
|
362
|
+
- ✅ Read `useTableLayout()` in a cell that looks different on mobile, instead of measuring the viewport
|
|
363
|
+
- ❌ Recreate `columns` per render
|
|
364
|
+
- ❌ Show the empty-list text („Zatím tu nejsou žádné výdaje“) when the list failed to load — use `load-failed`
|
|
365
|
+
- ❌ Replace rows already on screen with `load-failed` when a later action fails — that is a Toast
|
|
366
|
+
- ❌ Add a row fill for Selected, or a hover wash to the header
|
|
367
|
+
- ❌ Let a header label wrap — abbreviate it with a `meta.tooltip` holding the full term, or widen the column
|
|
368
|
+
- ❌ Centre a text or numeric column — `align: 'center'` is only for a presence / icon column (Příloha); it centres the body cells and the Column Header together
|
|
369
|
+
- ❌ Split a credit-note cluster across a page boundary — page on top-level rows
|
|
370
|
+
|
|
371
|
+
## Accessibility
|
|
372
|
+
|
|
373
|
+
- **Semantics** — a real `<table>` with `<caption>`, `<thead>` and `<tbody>`, not `role="grid"`; there is no 2D arrow-key navigation. Header cells are `<th scope="col">` (Column Header, plus the select-all and column-settings cells). The desktop footer is a `<div>` outside the table.
|
|
374
|
+
- **Accessible name** — `caption` is always rendered, visually hidden by default.
|
|
375
|
+
- **Keyboard** — Tab order follows the DOM: the scroll region (only while it overflows) → select-all → each sortable header button → column settings → per row: checkbox → the controls the cell renderers put in (identity link, chip controls) → row actions → footer Pagination → page-size Select. Pinning is `position: sticky`, so tab order never changes. No focus lands on a row, divider, status edge or connector.
|
|
376
|
+
- **Row click** — `onRowClick` is pointer-only: the row gets no `tabIndex`, no role and no key handler and never takes focus, so it adds no tab stop and no accessible action. The identity link is the keyboard and screen-reader path into the record; keep it whenever `onRowClick` is set.
|
|
377
|
+
- A row with an empty identity value gets the em dash, not a link, so `onRowClick` would be its only way in: give that row the same destination through a keyboard control in the row (a row action). The spec does not cover this row yet (pending design decision).
|
|
378
|
+
- **Scroll region** — `role="region"` with an accessible name, and `tabindex="0"` while the grid overflows, so it can be scrolled from the keyboard. `scroll-padding-inline` reserves the pinned zone plus the 40px band (`--space-1000`) on each pinned side, so a focused cell scrolls clear of both; the end value drops to 0 once the trailing pin degrades. Focus ring: `--outline-focus` at `--border-width-200`, 2px offset.
|
|
379
|
+
- **Sort** — `aria-sort` sits on the sorted column's `<th>` (Column Header); the table never repeats it. While `loading` each sort header keeps its `aria-sort` and its tab stop but is `aria-disabled="true"` and sorts nothing (desktop and mobile).
|
|
380
|
+
- **Selection** — row checkboxes are named by `selection.rowLabel(row)`; select-all by `selectAllLabel`, it is indeterminate while part of the page is selected, page-scoped (`toggleAllPageRowsSelected`) and disabled while loading or when the page has no rows.
|
|
381
|
+
- **Row actions** — each Icon Button carries `aria-label` = `action.label`; an optional `action.tooltip` is a visible hover / focus Tooltip (`aria-describedby`), never the name. They are XS (28×28) and flush, covered by the owner-signed interim exception named in manifest `chrome.a11y` (returns to Size S with 8px separation once any action moves behind an overflow).
|
|
382
|
+
- **Column settings** — the trigger carries `aria-haspopup="dialog"`, `aria-expanded` and `aria-controls`, and shows `labels.settings` as a Tooltip (held shut while the panel is open); the panel is `role="group"` named by `labels.group`; each row is a native checkbox labelled by its column name; locked columns are disabled + checked. While `loading` the trigger is `aria-disabled="true"`, not natively disabled: it keeps its tab stop, every open request (click, Enter, Space) is refused in the one `handleOpenChange` gate, its Tooltip is held shut, and it takes the Icon Button's Disabled ink keyed off `aria-disabled`. A panel open when `loading` starts closes through its own close path, so focus that was in the panel or on the trigger returns to the trigger; focus elsewhere is left alone. A natively disabled trigger would drop focus to `<body>` when `loading` starts under it. Whether the header controls should look or act disabled while loading is a pending design decision (Column Header has no Disabled state yet).
|
|
383
|
+
- **Child rows** — the connector SVG is `aria-hidden`; the hierarchy reaches AT through the visually hidden `childRowPrefix` text INSIDE the child's identity link name (`<TableChildRowPrefix />`), so it is announced with the link when tabbing — on desktop, in the collapsed mobile row and in the mobile panel block alike. Never beside the link or as a label on the row (`_table-child-connector` notes[5]).
|
|
384
|
+
- **Decorative parts** — status edge, edge shadows and edge mask are `aria-hidden`; the empty-state illustration box is `aria-hidden`, so the app's `<img>` in it takes `alt=""` and the title carries the message. Status is never carried by the edge alone — the Stav Chip pairs colour with a label.
|
|
385
|
+
- **Truncation** — a flexible cell keeps its full value in the DOM and, while clipped, shows it in a Tooltip on hover or focus.
|
|
386
|
+
- **Loading** — `aria-busy` on the `<table>` while `loading` (desktop and mobile); the skeletons are `aria-hidden`. The end of the wait is announced once through a visually hidden `role="status"` that is a SIBLING of the busy table (an `aria-busy` subtree holds its announcements back); its text is cleared when the next load starts. The text is `loadedLabel` (default „Načteno“); on a page in another language the consumer passes it, and `mobile.moreLabel` with it. A load that ends in `load-failed` speaks its title through a sibling `role="alert"` instead, and after a failed retry the retry button gets focus back.
|
|
387
|
+
- **Mobile** — the caret is a `<button>` with `aria-expanded`, `aria-controls` (the panel row — set only while expanded, since the row is mounted only then) and `aria-label` from `expandLabel(row)`; the whole-row click is pointer sugar on top of it. „Načíst další“ is described by the counter (`aria-describedby`), which is `aria-live="polite"`; while `loadMore.loading` the button is busy (`aria-busy`), not disabled.
|
|
388
|
+
- **Mobile „Více“** — the Dropdown Button is the trigger of `Menu`, so below `sm` the `moreActions` menu opens as a bottom sheet (`overlay-behavior.md` § Mobile): the trigger announces `aria-haspopup="dialog"` + `aria-expanded`, the sheet is a modal `dialog` titled „Více“, the commands are `menuitem` rows with roving focus, and Esc or a command returns focus to „Více“. Between `sm` and `md` it stays the anchored menu.
|
|
389
|
+
- **Contrast & motion** — the em dash in `--text-placeholder` is below AA; manifest `chrome.empty-cell.accessibility` accepts it as decorative-duplicated (an unreadable dash reads as the same empty cell). The organism's own motion is the desktop row hover fade (a colour change, not movement), the mobile caret turn, the panel opening / closing and the appended rows' fade — under `prefers-reduced-motion` the caret jumps, the room switches at once and the fades shorten to `--duration-instant`; the Loading state inherits the Skeleton atom's pulse, which that atom tones down under the same query.
|
|
390
|
+
|
|
391
|
+
Accessibility floor for every FODS component: `spec/01-foundations/accessibility.md`.
|
|
392
|
+
|
|
393
|
+
### Known limitations
|
|
394
|
+
|
|
395
|
+
- **Header tooltip on a non-sortable column is pointer-only** — inherited from Column Header.
|
|
396
|
+
|
|
397
|
+
## Copy
|
|
398
|
+
|
|
399
|
+
Voice: impersonal, in-app; the Table overrides nothing in it. Column labels follow Column Header's own Copy section (short nouns, about 24 characters at most, no terminal period: „Číslo“, „Dodavatel“, „Splatnost“, „Částka“); the Table owns only the column widths those labels sit in.
|
|
400
|
+
|
|
401
|
+
- **Empty-state message** (`emptyState.title`) — says which empty state happened and names the entity being listed, never a generic "No results"; no terminal period. Wraps, 2 lines, max 90 characters. Kind `load-failed` names what did not load, never the empty-list text.
|
|
402
|
+
- **Empty-state action** (`emptyState.action.label`) — an imperative verb phrase; Button family copy rules apply. One line, truncates, max 24 characters.
|
|
403
|
+
- **Row control name** (`rowActions(row)[].label`, `selection.rowLabel(row)`, `selection.selectAllLabel`, `columnVisibility.labels.settings`) — not rendered text: the accessible name of an icon-only control. Row-scoped, never bare: name the action *and* the record („Upravit fakturu 2024-0142“, not „Upravit“ repeated down the column). Select-all is page-scoped and its name says so. One line, max 60 characters.
|
|
404
|
+
- **Flexible cell** (a column with `meta.flex`: the counterparty name or e-mail) — the only truncating data cells. One line, ending ellipsis, max 24 characters; the untruncated value stays reachable, because a half-read counterparty name is a real ambiguity.
|
|
405
|
+
- **Mobile panel actions** (`mobile.primaryAction(row).label`, `mobile.moreLabel`) — the primary is the entity's one most-used verb („Odeslat“, „Upravit“, „Vytvořit fakturu“); the second is always „Více“, never an ellipsis alone. Short imperative verb phrases, sentence case, no terminal period.
|
|
406
|
+
- **Mobile load-more row** (`mobile.loadMore.labels`) — the button says „Načíst další“ (verb first, no terminal period); the counter says „Zobrazeno N z M“ (digits, no period). Both are entity-neutral, so every consumer reuses them as they are.
|
|
407
|
+
|
|
408
|
+
Canonical empty-state texts, by cause:
|
|
409
|
+
|
|
410
|
+
<table>
|
|
411
|
+
<thead>
|
|
412
|
+
<tr><th>Cause</th><th><code>kind</code></th><th>Message</th><th>Action</th></tr>
|
|
413
|
+
</thead>
|
|
414
|
+
<tbody>
|
|
415
|
+
<tr><td>Search term, no match</td><td><code>no-results</code></td><td>Pro výraz „xyzxyz“ nebyly nalezeny žádné odpovídající faktury</td><td>Zrušit vyhledávání (Secondary)</td></tr>
|
|
416
|
+
<tr><td>Filters active, no search term</td><td><code>no-results-filters</code></td><td>Žádné výdaje neodpovídají zvoleným filtrům</td><td>Zrušit filtry (Secondary)</td></tr>
|
|
417
|
+
<tr><td>Search term and filters active</td><td><code>no-results-filters</code></td><td>Žádné výdaje neodpovídají hledání ani filtrům</td><td>Zrušit vše (Secondary)</td></tr>
|
|
418
|
+
<tr><td>First use, no record yet</td><td><code>empty</code></td><td>Zatím tu nejsou žádné faktury · Zatím tu nejsou žádné výdaje</td><td>Vytvořit fakturu · Vytvořit výdaj (Primary)</td></tr>
|
|
419
|
+
<tr><td>The list did not load</td><td><code>load-failed</code></td><td>Výdaje se nepodařilo načíst</td><td>Zkusit znovu (Secondary)</td></tr>
|
|
420
|
+
</tbody>
|
|
421
|
+
</table>
|
|
422
|
+
|
|
423
|
+
Canonical row-scoped names (substitute the entity: fakturu / výdaj / kontakt):
|
|
424
|
+
|
|
425
|
+
<table>
|
|
426
|
+
<thead>
|
|
427
|
+
<tr><th>Control</th><th>Name</th></tr>
|
|
428
|
+
</thead>
|
|
429
|
+
<tbody>
|
|
430
|
+
<tr><td>Row actions</td><td>Upravit fakturu 2024-0142 · Duplikovat fakturu 2024-0142 · Odeslat fakturu 2024-0142 · Stáhnout fakturu 2024-0142 · Smazat fakturu 2024-0142</td></tr>
|
|
431
|
+
<tr><td>Row checkbox</td><td>Vybrat fakturu 2024-0142</td></tr>
|
|
432
|
+
<tr><td>Select-all</td><td>Vybrat všechny faktury na této stránce</td></tr>
|
|
433
|
+
<tr><td>Column settings</td><td>Nastavení sloupců</td></tr>
|
|
434
|
+
<tr><td>Action naming a second entity</td><td>Vytvořit fakturu pro kontakt Acme s.r.o. · Vytvořit výdaj pro kontakt Acme s.r.o.</td></tr>
|
|
435
|
+
</tbody>
|
|
436
|
+
</table>
|
|
437
|
+
|
|
438
|
+
The Stav chip's own control has no canonical name yet: it cannot simply repeat the status label.
|
|
439
|
+
|
|
440
|
+
## Usage
|
|
441
|
+
|
|
442
|
+
<Canvas of={TableStories.Playground} />
|
|
443
|
+
|
|
444
|
+
The state types (`SortingState`, `RowSelectionState`, `ColumnVisibilityState`) come from `@tanstack/react-table`, which the package does not re-export: it is a peer dependency (`^9.3.1`), so the app installs it next to `@invoiceonline/ui-react` (npm 7 and later does that itself) and imports the types from there.
|
|
445
|
+
|
|
446
|
+
```tsx
|
|
447
|
+
import { useState } from 'react';
|
|
448
|
+
import type { RowSelectionState, SortingState } from '@tanstack/react-table';
|
|
449
|
+
import { Icon, Table, TextLink, createTableColumnHelper } from '@invoiceonline/ui-react';
|
|
450
|
+
|
|
451
|
+
// Good — module-scope columns, controlled state, row-scoped names.
|
|
452
|
+
const col = createTableColumnHelper<Invoice>();
|
|
453
|
+
|
|
454
|
+
const COLUMNS = col.columns([
|
|
455
|
+
col.accessor('number', {
|
|
456
|
+
header: 'Číslo',
|
|
457
|
+
meta: { width: 150, identity: true, locked: true },
|
|
458
|
+
cell: info => (
|
|
459
|
+
<TextLink href="#" size="sm" underline="off">
|
|
460
|
+
{info.getValue()}
|
|
461
|
+
</TextLink>
|
|
462
|
+
),
|
|
463
|
+
}),
|
|
464
|
+
col.accessor('customer', { header: 'Odběratel', meta: { width: 200, flex: { min: 120 } } }),
|
|
465
|
+
col.accessor('duzp', {
|
|
466
|
+
header: 'DUZP',
|
|
467
|
+
meta: { width: 120, defaultVisible: false, tooltip: 'Datum zdanitelného plnění' },
|
|
468
|
+
}),
|
|
469
|
+
// Presence column: a display column, so "no attachment" renders nothing, not an em dash.
|
|
470
|
+
col.display({
|
|
471
|
+
id: 'attachment',
|
|
472
|
+
header: 'Příloha',
|
|
473
|
+
meta: { width: 80, align: 'center', sortable: false },
|
|
474
|
+
// `Icon` is always `aria-hidden` — the presence reaches AT through the sr-only text
|
|
475
|
+
cell: info =>
|
|
476
|
+
info.row.original.hasAttachment ? (
|
|
477
|
+
<span className="inline-flex text-icon-muted">
|
|
478
|
+
<Icon name="paperclip" size="xsmall" />
|
|
479
|
+
<span className="sr-only">Má přílohu</span>
|
|
480
|
+
</span>
|
|
481
|
+
) : null,
|
|
482
|
+
}),
|
|
483
|
+
col.accessor('total', {
|
|
484
|
+
header: 'Celkem s DPH',
|
|
485
|
+
meta: { width: 150, align: 'right', locked: true, description: '(Celková cena)' },
|
|
486
|
+
}),
|
|
487
|
+
]);
|
|
488
|
+
|
|
489
|
+
function InvoiceList({ invoices }: { invoices: Invoice[] }) {
|
|
490
|
+
const [sorting, setSorting] = useState<SortingState>([{ id: 'issued', desc: true }]);
|
|
491
|
+
const [selected, setSelected] = useState<RowSelectionState>({});
|
|
492
|
+
|
|
493
|
+
return (
|
|
494
|
+
<Table<Invoice>
|
|
495
|
+
caption="Vystavené faktury"
|
|
496
|
+
columns={COLUMNS}
|
|
497
|
+
data={invoices}
|
|
498
|
+
getRowId={row => row.id}
|
|
499
|
+
sorting={sorting}
|
|
500
|
+
onSortingChange={setSorting}
|
|
501
|
+
selection={{
|
|
502
|
+
state: selected,
|
|
503
|
+
onChange: setSelected,
|
|
504
|
+
selectAllLabel: 'Vybrat všechny faktury na této stránce',
|
|
505
|
+
rowLabel: row => `Vybrat fakturu ${row.number}`,
|
|
506
|
+
}}
|
|
507
|
+
rowActions={row => [
|
|
508
|
+
{ label: `Upravit fakturu ${row.number}`, icon: 'pencil-simple', onClick: () => edit(row) },
|
|
509
|
+
]}
|
|
510
|
+
// Pointer convenience on top of the Číslo link, which stays the keyboard path.
|
|
511
|
+
onRowClick={row => open(row.original)}
|
|
512
|
+
/>
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
```tsx
|
|
518
|
+
import { Table } from '@invoiceonline/ui-react';
|
|
519
|
+
// `col` is the column helper from the example above.
|
|
520
|
+
|
|
521
|
+
// Don't — columns rebuilt on every render; TanStack v9 needs a stable reference.
|
|
522
|
+
<Table columns={col.columns([col.accessor('number', { header: 'Číslo', meta: { width: 150 } })])} />
|
|
523
|
+
|
|
524
|
+
// Don't — a bare action name: every row announces the same "Upravit".
|
|
525
|
+
rowActions={() => [{ label: 'Upravit', icon: 'pencil-simple', onClick }]}
|
|
526
|
+
|
|
527
|
+
// Don't — a presence column as an accessor: rows without an attachment get an em dash.
|
|
528
|
+
col.accessor('hasAttachment', { header: 'Příloha', meta: { width: 80 } })
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
### Page header
|
|
532
|
+
|
|
533
|
+
Not part of the component — the list page's own header above the table, which manifest `chrome.page-header` (1.39.x) describes because every Table page has one:
|
|
534
|
+
|
|
535
|
+
- **Every breakpoint:** the H1 [Heading Group](?path=/docs/design-system-molecules-headinggroup--docs) with its illustration.
|
|
536
|
+
- **md and up:** the title group — the Heading Group, then the page's create action (Button Primary M led by the **entity glyph**: `expense` for an expense list, `invoice-new` for an invoice list, never `plus`) — on the left, the search Text Field on the right, the filter row below.
|
|
537
|
+
- **Below md:** one block, page header > [Heading Group, actions]; actions = the create action first, then the search, filter and clear-filter Icon Buttons, gap `--space-400`. SM keeps both in one row (heading left, actions right, centred); only Mobile stacks the actions under the heading.
|
|
538
|
+
- **First use** (`emptyState.kind: 'empty'`): no header create action — the empty state carries it.
|
|
539
|
+
|
|
540
|
+
## Related
|
|
541
|
+
|
|
542
|
+
- [`ColumnHeader`](?path=/docs/design-system-atoms-columnheader--docs) — every header cell; owns `aria-sort`, the sort glyph, description and tooltip.
|
|
543
|
+
- [`Pagination`](?path=/docs/design-system-molecules-pagination--docs) — the footer's page navigation.
|
|
544
|
+
- Composed atoms: `Checkbox`, `IconButton`, `Select`, `Skeleton`, `Button`, `DropdownButton` + `Menu` (mobile „Více“), `ListRow` + `TextLink` (column settings), `Chip` (Stav cells), `Badge` (boolean columns).
|
|
545
|
+
- [`StatusSummaryBar`](?path=/docs/design-system-organisms-status-summary-bar--docs) — the filter strip above a status-bearing table.
|
|
546
|
+
- TanStack Table v9 — [tanstack.com/table](https://tanstack.com/table/latest).
|
|
547
|
+
- Spec: `spec/05-organisms/table.md`.
|
|
548
|
+
|
|
549
|
+
## Migration notes
|
|
550
|
+
|
|
551
|
+
Not a restyle (spec § „Not a restyle“): the whole row opens the record, per-row actions are an always-visible row of Icon Buttons on desktop and a labelled primary + „Více“ pair in the expanded mobile panel, the mobile layout is picked by width, empty cells get an em dash instead of a blank, the Ano / Ne columns of the expense list are both Badges, count columns are right-aligned, desktop links have no rest underline, and the mobile row is the expand target. Column sort honesty is inherited from Column Header.
|
|
552
|
+
|
|
553
|
+
### Manifest 2.0.0 — the same change, recorded as a major
|
|
554
|
+
|
|
555
|
+
- **2.0.0** (2026-11-17) — The manifest now records this change as a major: it breaks the implementation already built against 1.x in the existing Storybook, and `delivery.migration` lists the steps. The code here already takes the element; nothing else changes.
|
|
556
|
+
|
|
557
|
+
### Manifest 1.42.0 — the app supplies the empty-state picture
|
|
558
|
+
|
|
559
|
+
- **1.42.0** (2026-11-13) — `delivery.react`: the illustration is a React element the consumer supplies; the component ships no picture and owns only its box. Code: the picture was a CSS background the `kind` picked; `emptyState.illustration` (`React.ReactElement`) is now required. Every `emptyState` adds it, e.g. `illustration: <img src={funnel} alt="" />` for `no-results-filters`, `funnel` being the app's own copy.
|
|
560
|
+
|
|
561
|
+
### Manifest 1.40.1 / 1.41.0 — adopted
|
|
562
|
+
|
|
563
|
+
- **1.41.0** — `emptyState.kind: 'load-failed'` (LoadFailed story), the `load-failed` PNG from the FODS illustration export, Secondary „Zkusit znovu“ with `arrow-clockwise`, the `role="alert"` announcement and the retry focus return from `empty-states.md` § Accessibility.
|
|
564
|
+
- **1.40.1 `motion.states.hover`** — the desktop row wash fades on `--duration-hover` / `--easing-standard` (`duration-hover ease-standard`). A pinned cell repaints the wash as a background-image layer, which CSS cannot interpolate, so the pinned zones switch without the fade — the same limit the Button hover layer has.
|
|
565
|
+
- **1.40.1 mobile motion** (with `@invoiceonline/ui-system` 0.17.0 and Motion) — replaces the pre-1.40.1 build (caret on a `--duration-slow` CSS transition, the panel's grid-rows room and fade running together on `table-panel-expand` / `-collapse` keyframes, closing not waiting for the fade, no motion on appended rows, everything off under reduced motion): `motion.states.open` (caret on `--spring-standard`), `motion.enter` / `motion.exit` (panel and appended rows fade in on `--duration-slow` / `--easing-enter`; the panel and the load-more row fade out on `--duration-fast` / `--easing-exit` first, then the panel's room closes), `motion.layout` for the panel, `motion.interrupt`, and `motion.reducedMotion` (fades shorten to `--duration-instant`).
|
|
566
|
+
|
|
567
|
+
### Deviations from the manifest / spec in this build
|
|
568
|
+
|
|
569
|
+
- **The panel's room is its height, not a transform** (`motion.layout` says Motion's layout, never height): a transform would stretch the panel's content and the hairlines, and the page under the table would jump; the panel's `height` runs on `--spring-gentle` instead, and everything below follows it. Rows appended by „Načíst další“ get their fade but no room animation — a table row has no animatable height — so the load-more row moves down at once.
|
|
570
|
+
|
|
571
|
+
- **New glyph.** `caret-up-down-small` was added to the icon set for Column Header's unsorted state.
|
|
572
|
+
- **Footer is a `<div>`**, not a `<tfoot>` (the spec's `chrome.a11y.semantics` names `tfoot`): the footer must not scroll sideways with the grid.
|
|
573
|
+
- **Widths from `meta.width` + `table-layout: fixed`**, not the `max-content` / `flex: 1` measurement of `chrome.localization.delivery`. Localized label lengths are not measured; the consumer's px widths are the CZ build.
|
|
574
|
+
- **Scroll region is a tab stop only while it overflows**, and **edge-shadow bands show only while content is clipped** under the zone (not permanently while the grid overflows).
|
|
575
|
+
- **Presence columns must be display columns** — the organism renders an em dash for any empty accessor value, on desktop and in the mobile identity and status positions alike, so the Příloha carve-out of `chrome.empty-cell.scope` is the consumer's job.
|