@invoiceonline/ui-react 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +99 -0
- package/CHANGELOG.md +131 -0
- package/LICENSE +9 -0
- package/README.md +78 -2
- package/dist/assets/label-brush-1.svg +6 -0
- package/dist/assets/pattern-dark.svg +113 -0
- package/dist/components/action-row/ActionRow.d.ts +178 -0
- package/dist/components/action-row/ActionRow.js +340 -0
- package/dist/components/action-row/index.d.ts +2 -0
- package/dist/components/action-row/index.js +1 -0
- package/dist/components/alert/Alert.d.ts +314 -0
- package/dist/components/alert/Alert.js +446 -0
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/alert/index.js +1 -0
- package/dist/components/anchored-panel/AnchoredPanel.d.ts +41 -0
- package/dist/components/anchored-panel/AnchoredPanel.js +72 -0
- package/dist/components/anchored-panel/index.d.ts +3 -0
- package/dist/components/anchored-panel/index.js +3 -0
- package/dist/components/badge/Badge.d.ts +146 -0
- package/dist/components/badge/Badge.js +258 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/badge/index.js +1 -0
- package/dist/components/banner/Banner.d.ts +209 -0
- package/dist/components/banner/Banner.js +339 -0
- package/dist/components/banner/index.d.ts +2 -0
- package/dist/components/banner/index.js +1 -0
- package/dist/components/button/Button.d.ts +54 -0
- package/dist/components/button/Button.js +312 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/index.js +1 -0
- package/dist/components/button-group/ButtonGroup.d.ts +187 -0
- package/dist/components/button-group/ButtonGroup.js +217 -0
- package/dist/components/button-group/index.d.ts +2 -0
- package/dist/components/button-group/index.js +1 -0
- package/dist/components/card-select/CardSelect.d.ts +274 -0
- package/dist/components/card-select/CardSelect.js +561 -0
- package/dist/components/card-select/CardSelectGroup.d.ts +92 -0
- package/dist/components/card-select/CardSelectGroup.js +72 -0
- package/dist/components/card-select/index.d.ts +3 -0
- package/dist/components/card-select/index.js +3 -0
- package/dist/components/checkbox/Checkbox.d.ts +104 -0
- package/dist/components/checkbox/Checkbox.js +194 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox/index.js +1 -0
- package/dist/components/chip/Chip.d.ts +250 -0
- package/dist/components/chip/Chip.js +441 -0
- package/dist/components/chip/index.d.ts +2 -0
- package/dist/components/chip/index.js +1 -0
- package/dist/components/column-header/ColumnHeader.d.ts +144 -0
- package/dist/components/column-header/ColumnHeader.js +209 -0
- package/dist/components/column-header/index.d.ts +2 -0
- package/dist/components/column-header/index.js +1 -0
- package/dist/components/combobox-field/Combobox.d.ts +104 -0
- package/dist/components/combobox-field/Combobox.js +355 -0
- package/dist/components/combobox-field/ComboboxField.d.ts +76 -0
- package/dist/components/combobox-field/ComboboxField.js +98 -0
- package/dist/components/combobox-field/index.d.ts +3 -0
- package/dist/components/combobox-field/index.js +3 -0
- package/dist/components/date-field/DateField.d.ts +52 -0
- package/dist/components/date-field/DateField.js +45 -0
- package/dist/components/date-field/index.d.ts +2 -0
- package/dist/components/date-field/index.js +1 -0
- package/dist/components/date-picker/DatePicker.d.ts +53 -0
- package/dist/components/date-picker/DatePicker.js +329 -0
- package/dist/components/date-picker/index.d.ts +2 -0
- package/dist/components/date-picker/index.js +1 -0
- package/dist/components/divider/Divider.d.ts +81 -0
- package/dist/components/divider/Divider.js +93 -0
- package/dist/components/divider/index.d.ts +2 -0
- package/dist/components/divider/index.js +1 -0
- package/dist/components/drawer/Drawer.d.ts +128 -0
- package/dist/components/drawer/Drawer.js +367 -0
- package/dist/components/drawer/index.d.ts +2 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/dropdown-button/DropdownButton.d.ts +72 -0
- package/dist/components/dropdown-button/DropdownButton.js +122 -0
- package/dist/components/dropdown-button/index.d.ts +2 -0
- package/dist/components/dropdown-button/index.js +1 -0
- package/dist/components/faq/FAQ.d.ts +135 -0
- package/dist/components/faq/FAQ.js +258 -0
- package/dist/components/faq/index.d.ts +2 -0
- package/dist/components/faq/index.js +1 -0
- package/dist/components/field/Field.d.ts +118 -0
- package/dist/components/field/Field.js +327 -0
- package/dist/components/field/index.d.ts +2 -0
- package/dist/components/field/index.js +1 -0
- package/dist/components/field-pair/FieldPair.d.ts +194 -0
- package/dist/components/field-pair/FieldPair.js +321 -0
- package/dist/components/field-pair/index.d.ts +2 -0
- package/dist/components/field-pair/index.js +1 -0
- package/dist/components/file-upload/FileUpload.d.ts +137 -0
- package/dist/components/file-upload/FileUpload.js +434 -0
- package/dist/components/file-upload/index.d.ts +2 -0
- package/dist/components/file-upload/index.js +1 -0
- package/dist/components/filter-chip/FilterChip.d.ts +373 -0
- package/dist/components/filter-chip/FilterChip.js +517 -0
- package/dist/components/filter-chip/index.d.ts +2 -0
- package/dist/components/filter-chip/index.js +1 -0
- package/dist/components/filter-facet/FilterFacet.d.ts +116 -0
- package/dist/components/filter-facet/FilterFacet.js +632 -0
- package/dist/components/filter-facet/index.d.ts +2 -0
- package/dist/components/filter-facet/index.js +1 -0
- package/dist/components/firm-avatar/FirmAvatar.d.ts +75 -0
- package/dist/components/firm-avatar/FirmAvatar.js +119 -0
- package/dist/components/firm-avatar/index.d.ts +2 -0
- package/dist/components/firm-avatar/index.js +1 -0
- package/dist/components/form-actions/FormActions.d.ts +123 -0
- package/dist/components/form-actions/FormActions.js +195 -0
- package/dist/components/form-actions/index.d.ts +2 -0
- package/dist/components/form-actions/index.js +1 -0
- package/dist/components/form-block/FormBlock.d.ts +252 -0
- package/dist/components/form-block/FormBlock.js +420 -0
- package/dist/components/form-block/index.d.ts +3 -0
- package/dist/components/form-block/index.js +3 -0
- package/dist/components/form-section/FormSection.d.ts +130 -0
- package/dist/components/form-section/FormSection.js +206 -0
- package/dist/components/form-section/index.d.ts +2 -0
- package/dist/components/form-section/index.js +1 -0
- package/dist/components/heading/Heading.d.ts +69 -0
- package/dist/components/heading/Heading.js +79 -0
- package/dist/components/heading/index.d.ts +2 -0
- package/dist/components/heading/index.js +1 -0
- package/dist/components/heading-group/HeadingGroup.d.ts +258 -0
- package/dist/components/heading-group/HeadingGroup.js +255 -0
- package/dist/components/heading-group/index.d.ts +2 -0
- package/dist/components/heading-group/index.js +1 -0
- package/dist/components/hero/Hero.d.ts +268 -0
- package/dist/components/hero/Hero.js +316 -0
- package/dist/components/hero/index.d.ts +2 -0
- package/dist/components/hero/index.js +1 -0
- package/dist/components/icon/Icon.d.ts +27 -0
- package/dist/components/icon/Icon.js +30 -0
- package/dist/components/icon/index.d.ts +3 -0
- package/dist/components/icon/index.js +3 -0
- package/dist/components/icon-button/IconButton.d.ts +75 -0
- package/dist/components/icon-button/IconButton.js +151 -0
- package/dist/components/icon-button/index.d.ts +2 -0
- package/dist/components/icon-button/index.js +1 -0
- package/dist/components/item-row/ItemRow.d.ts +253 -0
- package/dist/components/item-row/ItemRow.js +496 -0
- package/dist/components/item-row/index.d.ts +2 -0
- package/dist/components/item-row/index.js +1 -0
- package/dist/components/list-row/ListRow.d.ts +165 -0
- package/dist/components/list-row/ListRow.js +233 -0
- package/dist/components/list-row/index.d.ts +2 -0
- package/dist/components/list-row/index.js +1 -0
- package/dist/components/menu/Menu.d.ts +64 -0
- package/dist/components/menu/Menu.js +186 -0
- package/dist/components/menu/index.d.ts +2 -0
- package/dist/components/menu/index.js +1 -0
- package/dist/components/modal/Modal.d.ts +272 -0
- package/dist/components/modal/Modal.js +788 -0
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/modal/index.js +1 -0
- package/dist/components/nav-link/NavLink.d.ts +123 -0
- package/dist/components/nav-link/NavLink.js +157 -0
- package/dist/components/nav-link/index.d.ts +2 -0
- package/dist/components/nav-link/index.js +1 -0
- package/dist/components/number-field/NumberField.d.ts +62 -0
- package/dist/components/number-field/NumberField.js +210 -0
- package/dist/components/number-field/index.d.ts +2 -0
- package/dist/components/number-field/index.js +1 -0
- package/dist/components/pagination/Pagination.d.ts +133 -0
- package/dist/components/pagination/Pagination.js +217 -0
- package/dist/components/pagination/index.d.ts +3 -0
- package/dist/components/pagination/index.js +3 -0
- package/dist/components/popover-surface/index.d.ts +2 -0
- package/dist/components/popover-surface/index.js +1 -0
- package/dist/components/progress-bar/ProgressBar.d.ts +260 -0
- package/dist/components/progress-bar/ProgressBar.js +470 -0
- package/dist/components/progress-bar/index.d.ts +2 -0
- package/dist/components/progress-bar/index.js +1 -0
- package/dist/components/promo-sticker/PromoSticker.d.ts +204 -0
- package/dist/components/promo-sticker/PromoSticker.js +177 -0
- package/dist/components/promo-sticker/index.d.ts +2 -0
- package/dist/components/promo-sticker/index.js +1 -0
- package/dist/components/promo-surface/PromoSurface.d.ts +94 -0
- package/dist/components/promo-surface/PromoSurface.js +119 -0
- package/dist/components/promo-surface/index.d.ts +2 -0
- package/dist/components/promo-surface/index.js +1 -0
- package/dist/components/radio/Radio.d.ts +92 -0
- package/dist/components/radio/Radio.js +171 -0
- package/dist/components/radio/index.d.ts +2 -0
- package/dist/components/radio/index.js +1 -0
- package/dist/components/radio-group/RadioGroup.d.ts +61 -0
- package/dist/components/radio-group/RadioGroup.js +51 -0
- package/dist/components/radio-group/index.d.ts +2 -0
- package/dist/components/radio-group/index.js +1 -0
- package/dist/components/select/Select.d.ts +65 -0
- package/dist/components/select/Select.js +176 -0
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/index.js +1 -0
- package/dist/components/select-field/SelectField.d.ts +16 -0
- package/dist/components/select-field/SelectField.js +55 -0
- package/dist/components/select-field/index.d.ts +2 -0
- package/dist/components/select-field/index.js +1 -0
- package/dist/components/skeleton/Skeleton.d.ts +64 -0
- package/dist/components/skeleton/Skeleton.js +65 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/index.js +1 -0
- package/dist/components/split-button/SplitButton.d.ts +80 -0
- package/dist/components/split-button/SplitButton.js +182 -0
- package/dist/components/split-button/index.d.ts +2 -0
- package/dist/components/split-button/index.js +1 -0
- package/dist/components/status-summary-bar/StatusSummaryBar.d.ts +118 -0
- package/dist/components/status-summary-bar/StatusSummaryBar.js +278 -0
- package/dist/components/status-summary-bar/index.d.ts +2 -0
- package/dist/components/status-summary-bar/index.js +1 -0
- package/dist/components/subject-lookup-field/SubjectLookupField.d.ts +157 -0
- package/dist/components/subject-lookup-field/SubjectLookupField.js +663 -0
- package/dist/components/subject-lookup-field/index.d.ts +2 -0
- package/dist/components/subject-lookup-field/index.js +1 -0
- package/dist/components/switch/Switch.d.ts +152 -0
- package/dist/components/switch/Switch.js +307 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/index.js +1 -0
- package/dist/components/table/Table.d.ts +5 -0
- package/dist/components/table/Table.js +601 -0
- package/dist/components/table/index.d.ts +6 -0
- package/dist/components/table/index.js +6 -0
- package/dist/components/text-field/TextField.d.ts +65 -0
- package/dist/components/text-field/TextField.js +173 -0
- package/dist/components/text-field/index.d.ts +2 -0
- package/dist/components/text-field/index.js +1 -0
- package/dist/components/text-link/TextLink.d.ts +260 -0
- package/dist/components/text-link/TextLink.js +303 -0
- package/dist/components/text-link/index.d.ts +2 -0
- package/dist/components/text-link/index.js +1 -0
- package/dist/components/textarea/Textarea.d.ts +93 -0
- package/dist/components/textarea/Textarea.js +256 -0
- package/dist/components/textarea/index.d.ts +2 -0
- package/dist/components/textarea/index.js +1 -0
- package/dist/components/tooltip/Tooltip.d.ts +129 -0
- package/dist/components/tooltip/Tooltip.js +457 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/components/unit-field/UnitField.d.ts +46 -0
- package/dist/components/unit-field/UnitField.js +133 -0
- package/dist/components/unit-field/index.d.ts +2 -0
- package/dist/components/unit-field/index.js +1 -0
- package/dist/icons/icon-registry.generated.js +500 -0
- package/dist/icons/icon-types.generated.d.ts +2 -0
- package/dist/icons/icon-types.generated.js +126 -0
- package/dist/index.d.ts +132 -0
- package/dist/index.js +75 -0
- package/dist/internal/BottomSheet.js +496 -0
- package/dist/internal/FodsProvider.d.ts +25 -0
- package/dist/internal/FodsProvider.js +32 -0
- package/dist/internal/MotionCaret.js +35 -0
- package/dist/internal/NumberFormatInput.d.ts +21 -0
- package/dist/internal/NumberFormatInput.js +126 -0
- package/dist/internal/SummaryDonut.d.ts +3 -0
- package/dist/internal/SummaryDonut.js +300 -0
- package/dist/internal/buttonSegment.d.ts +44 -0
- package/dist/internal/buttonSegment.js +126 -0
- package/dist/internal/collapseRoom.js +128 -0
- package/dist/internal/comboboxKeys.js +44 -0
- package/dist/internal/contentPresence.js +46 -0
- package/dist/internal/dayCell.js +95 -0
- package/dist/internal/dialogPortal.d.ts +2 -0
- package/dist/internal/dialogPortal.js +21 -0
- package/dist/internal/donutSweeps.js +65 -0
- package/dist/internal/enterOnViewGeometry.js +46 -0
- package/dist/internal/faqItem.js +80 -0
- package/dist/internal/floatingLabelMotion.js +68 -0
- package/dist/internal/formBlockContext.d.ts +22 -0
- package/dist/internal/formBlockContext.js +20 -0
- package/dist/internal/heightRoom.js +87 -0
- package/dist/internal/numberSeparators.js +62 -0
- package/dist/internal/overlayMotion.js +48 -0
- package/dist/internal/paginationItem.d.ts +8 -0
- package/dist/internal/paginationItem.js +22 -0
- package/dist/internal/popoverSurface.d.ts +8 -0
- package/dist/internal/popoverSurface.js +23 -0
- package/dist/internal/portalContainer.d.ts +1 -0
- package/dist/internal/portalContainer.js +6 -0
- package/dist/internal/progressBarItem.d.ts +207 -0
- package/dist/internal/progressBarItem.js +264 -0
- package/dist/internal/selectionControlText.js +12 -0
- package/dist/internal/statusSummaryParts.js +371 -0
- package/dist/internal/summaryMotion.js +75 -0
- package/dist/internal/table/ChildConnector.js +62 -0
- package/dist/internal/table/ChildRowPrefix.d.ts +9 -0
- package/dist/internal/table/ChildRowPrefix.js +27 -0
- package/dist/internal/table/ColumnSettings.js +135 -0
- package/dist/internal/table/ScrollRegion.js +114 -0
- package/dist/internal/table/TableEmpty.js +93 -0
- package/dist/internal/table/TableLayout.d.ts +17 -0
- package/dist/internal/table/TableLayout.js +29 -0
- package/dist/internal/table/TableLoadStatus.js +56 -0
- package/dist/internal/table/TableMobile.js +488 -0
- package/dist/internal/table/TruncatedCell.js +33 -0
- package/dist/internal/table/emptyValue.js +10 -0
- package/dist/internal/table/features.d.ts +41 -0
- package/dist/internal/table/features.js +31 -0
- package/dist/internal/table/recipes.js +227 -0
- package/dist/internal/table/rowClick.js +9 -0
- package/dist/internal/table/types.d.ts +325 -0
- package/dist/internal/table/types.js +13 -0
- package/dist/internal/tailwind-variants.d.ts +3 -0
- package/dist/internal/tailwind-variants.js +37 -0
- package/dist/internal/tooltipContext.js +5 -0
- package/dist/internal/tw-merge-config.generated.js +314 -0
- package/dist/internal/useAnchoredPanel.d.ts +87 -0
- package/dist/internal/useAnchoredPanel.js +108 -0
- package/dist/internal/useCountUp.js +53 -0
- package/dist/internal/useDateFieldTrigger.js +183 -0
- package/dist/internal/useEChart.js +59 -0
- package/dist/internal/useEnterOnView.js +42 -0
- package/dist/internal/useFloatingBar.js +100 -0
- package/dist/internal/useFormReset.js +37 -0
- package/dist/internal/useIsMobile.js +44 -0
- package/dist/internal/useOneRowOverflow.js +88 -0
- package/dist/internal/usePrefersReducedMotion.js +25 -0
- package/dist/internal/useReturnFocus.js +26 -0
- package/dist/internal/utils.d.ts +7 -0
- package/dist/internal/utils.js +58 -0
- package/dist/node_modules/@tanstack/store/dist/store.d.ts +29 -0
- package/dist/node_modules/@tanstack/store/dist/types.d.ts +38 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/cells/coreCellsFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/cells/coreCellsFeature.types.d.ts +53 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/columns/coreColumnsFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/columns/coreColumnsFeature.types.d.ts +90 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/coreFeatures.d.ts +17 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/headers/coreHeadersFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/headers/coreHeadersFeature.types.d.ts +114 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/reactivity/coreReactivityFeature.types.d.ts +51 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/row-models/coreRowModelsFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/row-models/coreRowModelsFeature.types.d.ts +29 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/rows/coreRowsFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/rows/coreRowsFeature.types.d.ts +129 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/table/coreTablesFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/table/coreTablesFeature.types.d.ts +203 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/cell-selection/cellSelectionFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/cell-selection/cellSelectionFeature.types.d.ts +294 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/cell-spanning/cellSpanningFeature.d.ts +11 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/cell-spanning/cellSpanningFeature.types.d.ts +148 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-faceting/columnFacetingFeature.d.ts +12 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-faceting/columnFacetingFeature.types.d.ts +63 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-filtering/columnFilteringFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-filtering/columnFilteringFeature.types.d.ts +209 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-filtering/filterFns.d.ts +35 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-grouping/columnGroupingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-grouping/columnGroupingFeature.types.d.ts +128 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-ordering/columnOrderingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-ordering/columnOrderingFeature.types.d.ts +82 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-pinning/columnPinningFeature.d.ts +11 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-pinning/columnPinningFeature.types.d.ts +195 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-resizing/columnResizingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-resizing/columnResizingFeature.types.d.ts +73 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-sizing/columnSizingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-sizing/columnSizingFeature.types.d.ts +134 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-visibility/columnVisibilityFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-visibility/columnVisibilityFeature.types.d.ts +92 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/global-filtering/globalFilteringFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/global-filtering/globalFilteringFeature.types.d.ts +67 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-aggregation/aggregationFns.d.ts +23 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-aggregation/rowAggregationFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-aggregation/rowAggregationFeature.types.d.ts +183 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-aggregation/rowAggregationFeature.utils.d.ts +18 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-expanding/rowExpandingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-expanding/rowExpandingFeature.types.d.ts +125 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-pagination/rowPaginationFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-pagination/rowPaginationFeature.types.d.ts +135 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-pinning/rowPinningFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-pinning/rowPinningFeature.types.d.ts +76 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-selection/rowSelectionFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-selection/rowSelectionFeature.types.d.ts +187 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-sorting/rowSortingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-sorting/rowSortingFeature.types.d.ts +236 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-sorting/sortFns.d.ts +23 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/stockFeatures.d.ts +37 -0
- package/dist/node_modules/@tanstack/table-core/dist/helpers/columnHelper.d.ts +47 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/Cell.d.ts +16 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/Column.d.ts +30 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/ColumnDef.d.ts +123 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/Header.d.ts +12 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/HeaderGroup.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/Row.d.ts +24 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/RowModel.d.ts +19 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/RowModelFns.d.ts +11 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/Table.d.ts +53 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/TableFeatures.d.ts +416 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/TableOptions.d.ts +78 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/TableState.d.ts +46 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/type-utils.d.ts +25 -0
- package/dist/shared.css +179 -0
- package/dist/styles.css +5467 -0
- package/dist/theme.css +314 -0
- package/dist/theme.map.json +278 -0
- package/dist/tokens/index.d.ts +2 -0
- package/dist/tokens/index.js +1 -0
- package/dist/tokens/tokens.generated.d.ts +2040 -0
- package/dist/tokens/tokens.generated.js +2053 -0
- package/dist/tokens.css +484 -0
- package/dist/tokens.flat.json +429 -0
- package/docs/Consuming.mdx +379 -0
- package/docs/Contributing.mdx +78 -0
- package/docs/ForAgents.mdx +53 -0
- package/docs/Introduction.mdx +54 -0
- package/llms.txt +556 -0
- package/package.json +357 -4
- package/src/components/action-row/ActionRow.mdx +686 -0
- package/src/components/action-row/ActionRow.stories.tsx +669 -0
- package/src/components/action-row/ActionRow.tsx +632 -0
- package/src/components/action-row/index.ts +9 -0
- package/src/components/alert/Alert.mdx +377 -0
- package/src/components/alert/Alert.stories.tsx +674 -0
- package/src/components/alert/Alert.tsx +579 -0
- package/src/components/alert/index.ts +13 -0
- package/src/components/anchored-panel/AnchoredPanel.mdx +381 -0
- package/src/components/anchored-panel/AnchoredPanel.stories.tsx +593 -0
- package/src/components/anchored-panel/AnchoredPanel.tsx +176 -0
- package/src/components/anchored-panel/index.ts +15 -0
- package/src/components/badge/Badge.mdx +487 -0
- package/src/components/badge/Badge.stories.tsx +375 -0
- package/src/components/badge/Badge.tsx +360 -0
- package/src/components/badge/index.ts +10 -0
- package/src/components/banner/Banner.mdx +704 -0
- package/src/components/banner/Banner.stories.tsx +448 -0
- package/src/components/banner/Banner.tsx +602 -0
- package/src/components/banner/index.ts +14 -0
- package/src/components/button/Button.mdx +286 -0
- package/src/components/button/Button.stories.tsx +381 -0
- package/src/components/button/Button.tsx +384 -0
- package/src/components/button/index.ts +1 -0
- package/src/components/button-group/ButtonGroup.mdx +512 -0
- package/src/components/button-group/ButtonGroup.stories.tsx +714 -0
- package/src/components/button-group/ButtonGroup.tsx +491 -0
- package/src/components/button-group/index.ts +10 -0
- package/src/components/card-select/CardSelect.mdx +662 -0
- package/src/components/card-select/CardSelect.stories.tsx +784 -0
- package/src/components/card-select/CardSelect.tsx +783 -0
- package/src/components/card-select/CardSelectGroup.tsx +169 -0
- package/src/components/card-select/index.ts +18 -0
- package/src/components/checkbox/Checkbox.mdx +269 -0
- package/src/components/checkbox/Checkbox.stories.tsx +306 -0
- package/src/components/checkbox/Checkbox.tsx +343 -0
- package/src/components/checkbox/index.ts +1 -0
- package/src/components/chip/Chip.mdx +683 -0
- package/src/components/chip/Chip.stories.tsx +734 -0
- package/src/components/chip/Chip.tsx +732 -0
- package/src/components/chip/index.ts +9 -0
- package/src/components/column-header/ColumnHeader.mdx +301 -0
- package/src/components/column-header/ColumnHeader.stories.tsx +319 -0
- package/src/components/column-header/ColumnHeader.tsx +287 -0
- package/src/components/column-header/index.ts +7 -0
- package/src/components/combobox-field/Combobox.tsx +693 -0
- package/src/components/combobox-field/ComboboxField.mdx +525 -0
- package/src/components/combobox-field/ComboboxField.stories.tsx +502 -0
- package/src/components/combobox-field/ComboboxField.tsx +259 -0
- package/src/components/combobox-field/index.ts +12 -0
- package/src/components/date-field/DateField.mdx +340 -0
- package/src/components/date-field/DateField.stories.tsx +221 -0
- package/src/components/date-field/DateField.tsx +176 -0
- package/src/components/date-field/index.ts +1 -0
- package/src/components/date-picker/DatePicker.mdx +436 -0
- package/src/components/date-picker/DatePicker.stories.tsx +458 -0
- package/src/components/date-picker/DatePicker.tsx +688 -0
- package/src/components/date-picker/index.ts +9 -0
- package/src/components/divider/Divider.mdx +256 -0
- package/src/components/divider/Divider.stories.tsx +177 -0
- package/src/components/divider/Divider.tsx +193 -0
- package/src/components/divider/index.ts +1 -0
- package/src/components/drawer/Drawer.mdx +518 -0
- package/src/components/drawer/Drawer.stories.tsx +392 -0
- package/src/components/drawer/Drawer.tsx +683 -0
- package/src/components/drawer/index.ts +1 -0
- package/src/components/dropdown-button/DropdownButton.mdx +285 -0
- package/src/components/dropdown-button/DropdownButton.stories.tsx +398 -0
- package/src/components/dropdown-button/DropdownButton.tsx +198 -0
- package/src/components/dropdown-button/index.ts +7 -0
- package/src/components/faq/FAQ.mdx +364 -0
- package/src/components/faq/FAQ.stories.tsx +343 -0
- package/src/components/faq/FAQ.tsx +337 -0
- package/src/components/faq/index.ts +1 -0
- package/src/components/field/Field.mdx +129 -0
- package/src/components/field/Field.stories.tsx +461 -0
- package/src/components/field/Field.tsx +765 -0
- package/src/components/field/index.ts +20 -0
- package/src/components/field-pair/FieldPair.mdx +308 -0
- package/src/components/field-pair/FieldPair.stories.tsx +530 -0
- package/src/components/field-pair/FieldPair.tsx +796 -0
- package/src/components/field-pair/index.ts +9 -0
- package/src/components/file-upload/FileUpload.mdx +345 -0
- package/src/components/file-upload/FileUpload.stories.tsx +698 -0
- package/src/components/file-upload/FileUpload.tsx +802 -0
- package/src/components/file-upload/index.ts +6 -0
- package/src/components/filter-chip/FilterChip.mdx +778 -0
- package/src/components/filter-chip/FilterChip.stories.tsx +827 -0
- package/src/components/filter-chip/FilterChip.tsx +881 -0
- package/src/components/filter-chip/index.ts +11 -0
- package/src/components/filter-facet/FilterFacet.mdx +536 -0
- package/src/components/filter-facet/FilterFacet.stories.tsx +506 -0
- package/src/components/filter-facet/FilterFacet.tsx +1160 -0
- package/src/components/filter-facet/index.ts +7 -0
- package/src/components/firm-avatar/FirmAvatar.mdx +280 -0
- package/src/components/firm-avatar/FirmAvatar.stories.tsx +147 -0
- package/src/components/firm-avatar/FirmAvatar.tsx +172 -0
- package/src/components/firm-avatar/index.ts +7 -0
- package/src/components/form-actions/FormActions.mdx +518 -0
- package/src/components/form-actions/FormActions.stories.tsx +621 -0
- package/src/components/form-actions/FormActions.tsx +273 -0
- package/src/components/form-actions/index.ts +6 -0
- package/src/components/form-block/FormBlock.mdx +728 -0
- package/src/components/form-block/FormBlock.stories.tsx +813 -0
- package/src/components/form-block/FormBlock.tsx +679 -0
- package/src/components/form-block/index.ts +13 -0
- package/src/components/form-section/FormSection.mdx +436 -0
- package/src/components/form-section/FormSection.stories.tsx +407 -0
- package/src/components/form-section/FormSection.tsx +290 -0
- package/src/components/form-section/index.ts +17 -0
- package/src/components/heading/Heading.mdx +206 -0
- package/src/components/heading/Heading.stories.tsx +169 -0
- package/src/components/heading/Heading.tsx +124 -0
- package/src/components/heading/index.ts +8 -0
- package/src/components/heading-group/HeadingGroup.mdx +521 -0
- package/src/components/heading-group/HeadingGroup.stories.tsx +353 -0
- package/src/components/heading-group/HeadingGroup.tsx +396 -0
- package/src/components/heading-group/index.ts +7 -0
- package/src/components/hero/Hero.mdx +742 -0
- package/src/components/hero/Hero.stories.tsx +527 -0
- package/src/components/hero/Hero.tsx +807 -0
- package/src/components/hero/index.ts +1 -0
- package/src/components/icon/Icon.mdx +329 -0
- package/src/components/icon/Icon.stories.tsx +398 -0
- package/src/components/icon/Icon.tsx +97 -0
- package/src/components/icon/index.ts +2 -0
- package/src/components/icon-button/IconButton.mdx +206 -0
- package/src/components/icon-button/IconButton.stories.tsx +341 -0
- package/src/components/icon-button/IconButton.tsx +273 -0
- package/src/components/icon-button/index.ts +1 -0
- package/src/components/item-row/ItemRow.mdx +533 -0
- package/src/components/item-row/ItemRow.stories.tsx +434 -0
- package/src/components/item-row/ItemRow.tsx +676 -0
- package/src/components/item-row/index.ts +9 -0
- package/src/components/list-row/ListRow.mdx +404 -0
- package/src/components/list-row/ListRow.stories.tsx +404 -0
- package/src/components/list-row/ListRow.tsx +424 -0
- package/src/components/list-row/index.ts +1 -0
- package/src/components/menu/Menu.mdx +268 -0
- package/src/components/menu/Menu.stories.tsx +455 -0
- package/src/components/menu/Menu.tsx +452 -0
- package/src/components/menu/index.ts +1 -0
- package/src/components/modal/Modal.mdx +854 -0
- package/src/components/modal/Modal.stories.tsx +881 -0
- package/src/components/modal/Modal.tsx +1434 -0
- package/src/components/modal/index.ts +1 -0
- package/src/components/nav-link/NavLink.mdx +196 -0
- package/src/components/nav-link/NavLink.stories.tsx +243 -0
- package/src/components/nav-link/NavLink.tsx +222 -0
- package/src/components/nav-link/index.ts +1 -0
- package/src/components/number-field/NumberField.mdx +223 -0
- package/src/components/number-field/NumberField.stories.tsx +291 -0
- package/src/components/number-field/NumberField.tsx +388 -0
- package/src/components/number-field/index.ts +6 -0
- package/src/components/pagination/Pagination.mdx +305 -0
- package/src/components/pagination/Pagination.stories.tsx +333 -0
- package/src/components/pagination/Pagination.tsx +343 -0
- package/src/components/pagination/index.ts +8 -0
- package/src/components/popover-surface/PopoverSurface.mdx +158 -0
- package/src/components/popover-surface/PopoverSurface.stories.tsx +421 -0
- package/src/components/popover-surface/index.ts +1 -0
- package/src/components/progress-bar/ProgressBar.mdx +802 -0
- package/src/components/progress-bar/ProgressBar.stories.tsx +533 -0
- package/src/components/progress-bar/ProgressBar.tsx +654 -0
- package/src/components/progress-bar/index.ts +9 -0
- package/src/components/promo-sticker/PromoSticker.mdx +436 -0
- package/src/components/promo-sticker/PromoSticker.stories.tsx +363 -0
- package/src/components/promo-sticker/PromoSticker.tsx +313 -0
- package/src/components/promo-sticker/index.ts +7 -0
- package/src/components/promo-surface/PromoSurface.mdx +399 -0
- package/src/components/promo-surface/PromoSurface.stories.tsx +270 -0
- package/src/components/promo-surface/PromoSurface.tsx +305 -0
- package/src/components/promo-surface/index.ts +7 -0
- package/src/components/radio/Radio.mdx +243 -0
- package/src/components/radio/Radio.stories.tsx +307 -0
- package/src/components/radio/Radio.tsx +288 -0
- package/src/components/radio/index.ts +1 -0
- package/src/components/radio-group/RadioGroup.mdx +119 -0
- package/src/components/radio-group/RadioGroup.stories.tsx +225 -0
- package/src/components/radio-group/RadioGroup.tsx +139 -0
- package/src/components/radio-group/index.ts +1 -0
- package/src/components/select/Select.mdx +241 -0
- package/src/components/select/Select.stories.tsx +404 -0
- package/src/components/select/Select.tsx +381 -0
- package/src/components/select/index.ts +1 -0
- package/src/components/select-field/SelectField.mdx +324 -0
- package/src/components/select-field/SelectField.stories.tsx +460 -0
- package/src/components/select-field/SelectField.tsx +138 -0
- package/src/components/select-field/index.ts +1 -0
- package/src/components/skeleton/Skeleton.mdx +194 -0
- package/src/components/skeleton/Skeleton.stories.tsx +260 -0
- package/src/components/skeleton/Skeleton.tsx +107 -0
- package/src/components/skeleton/index.ts +1 -0
- package/src/components/split-button/SplitButton.mdx +445 -0
- package/src/components/split-button/SplitButton.stories.tsx +465 -0
- package/src/components/split-button/SplitButton.tsx +361 -0
- package/src/components/split-button/index.ts +7 -0
- package/src/components/status-summary-bar/StatusSummaryBar.mdx +338 -0
- package/src/components/status-summary-bar/StatusSummaryBar.stories.tsx +408 -0
- package/src/components/status-summary-bar/StatusSummaryBar.tsx +428 -0
- package/src/components/status-summary-bar/index.ts +8 -0
- package/src/components/subject-lookup-field/SubjectLookupField.mdx +378 -0
- package/src/components/subject-lookup-field/SubjectLookupField.stories.tsx +393 -0
- package/src/components/subject-lookup-field/SubjectLookupField.tsx +1079 -0
- package/src/components/subject-lookup-field/index.ts +11 -0
- package/src/components/switch/Switch.mdx +376 -0
- package/src/components/switch/Switch.stories.tsx +296 -0
- package/src/components/switch/Switch.tsx +483 -0
- package/src/components/switch/index.ts +1 -0
- package/src/components/table/Table.mdx +575 -0
- package/src/components/table/Table.stories.tsx +1049 -0
- package/src/components/table/Table.tsx +745 -0
- package/src/components/table/TableConsumers.stories.tsx +195 -0
- package/src/components/table/_tableFixtures.ts +1189 -0
- package/src/components/table/index.ts +22 -0
- package/src/components/text-field/TextField.mdx +479 -0
- package/src/components/text-field/TextField.stories.tsx +366 -0
- package/src/components/text-field/TextField.tsx +391 -0
- package/src/components/text-field/index.ts +8 -0
- package/src/components/text-link/TextLink.mdx +353 -0
- package/src/components/text-link/TextLink.stories.tsx +458 -0
- package/src/components/text-link/TextLink.tsx +504 -0
- package/src/components/text-link/index.ts +10 -0
- package/src/components/textarea/Textarea.mdx +244 -0
- package/src/components/textarea/Textarea.stories.tsx +371 -0
- package/src/components/textarea/Textarea.tsx +489 -0
- package/src/components/textarea/index.ts +9 -0
- package/src/components/tooltip/Tooltip.mdx +462 -0
- package/src/components/tooltip/Tooltip.stories.tsx +500 -0
- package/src/components/tooltip/Tooltip.tsx +756 -0
- package/src/components/tooltip/index.ts +13 -0
- package/src/components/unit-field/UnitField.mdx +215 -0
- package/src/components/unit-field/UnitField.stories.tsx +291 -0
- package/src/components/unit-field/UnitField.tsx +255 -0
- package/src/components/unit-field/index.ts +7 -0
- package/src/icons/icon-registry.generated.ts +510 -0
- package/src/icons/icon-types.generated.ts +256 -0
- package/src/index.ts +71 -0
- package/src/internal/BottomSheet.tsx +714 -0
- package/src/internal/FodsProvider.tsx +36 -0
- package/src/internal/MotionCaret.tsx +53 -0
- package/src/internal/NumberFormatInput.tsx +276 -0
- package/src/internal/SummaryDonut.tsx +359 -0
- package/src/internal/buttonSegment.ts +241 -0
- package/src/internal/collapseRoom.ts +130 -0
- package/src/internal/comboboxKeys.ts +90 -0
- package/src/internal/contentPresence.ts +46 -0
- package/src/internal/dayCell.ts +274 -0
- package/src/internal/dialogPortal.ts +50 -0
- package/src/internal/donutSweeps.ts +77 -0
- package/src/internal/enterOnViewGeometry.ts +53 -0
- package/src/internal/faqItem.ts +104 -0
- package/src/internal/floatingLabelMotion.tsx +109 -0
- package/src/internal/formBlockContext.ts +27 -0
- package/src/internal/heightRoom.ts +135 -0
- package/src/internal/numberSeparators.ts +93 -0
- package/src/internal/overlayMotion.tsx +32 -0
- package/src/internal/paginationItem.ts +106 -0
- package/src/internal/popoverSurface.ts +78 -0
- package/src/internal/portalContainer.ts +11 -0
- package/src/internal/progressBarItem.ts +356 -0
- package/src/internal/selectionControlText.ts +42 -0
- package/src/internal/statusSummaryParts.tsx +475 -0
- package/src/internal/summaryMotion.ts +111 -0
- package/src/internal/table/ChildConnector.tsx +57 -0
- package/src/internal/table/ChildRowPrefix.tsx +21 -0
- package/src/internal/table/ColumnSettings.tsx +194 -0
- package/src/internal/table/ScrollRegion.tsx +176 -0
- package/src/internal/table/TableEmpty.tsx +99 -0
- package/src/internal/table/TableLayout.tsx +29 -0
- package/src/internal/table/TableLoadStatus.tsx +60 -0
- package/src/internal/table/TableMobile.tsx +582 -0
- package/src/internal/table/TruncatedCell.tsx +35 -0
- package/src/internal/table/emptyValue.ts +11 -0
- package/src/internal/table/features.ts +44 -0
- package/src/internal/table/recipes.ts +263 -0
- package/src/internal/table/rowClick.ts +8 -0
- package/src/internal/table/types.ts +342 -0
- package/src/internal/tailwind-variants.ts +65 -0
- package/src/internal/tooltipContext.ts +15 -0
- package/src/internal/tw-merge-config.generated.ts +275 -0
- package/src/internal/useAnchoredPanel.ts +340 -0
- package/src/internal/useCountUp.ts +65 -0
- package/src/internal/useDateFieldTrigger.tsx +357 -0
- package/src/internal/useEChart.ts +88 -0
- package/src/internal/useEnterOnView.ts +80 -0
- package/src/internal/useFloatingBar.ts +125 -0
- package/src/internal/useFormReset.ts +47 -0
- package/src/internal/useIsMobile.ts +64 -0
- package/src/internal/useNoImplicitSubmit.ts +41 -0
- package/src/internal/useOneRowOverflow.ts +103 -0
- package/src/internal/usePrefersReducedMotion.ts +27 -0
- package/src/internal/useReturnFocus.ts +34 -0
- package/src/internal/utils.ts +58 -0
- package/src/recipes/EmptyState.stories.tsx +105 -0
- package/src/recipes/Form.stories.tsx +355 -0
- package/src/recipes/ModalWithForm.stories.tsx +219 -0
- package/src/recipes/Recipes.mdx +61 -0
- package/src/recipes/TableWithFilters.stories.tsx +278 -0
- package/src/storybook/FodsFamily.tsx +39 -0
- package/src/storybook/Section.tsx +36 -0
- package/src/storybook/a11y.ts +24 -0
- package/src/storybook/assets/banner-character-bartender.webp +0 -0
- package/src/storybook/assets/banner-invoice-sheet-left.webp +0 -0
- package/src/storybook/assets/banner-invoice-sheet-right.webp +0 -0
- package/src/storybook/assets/invoice-hero.webp +0 -0
- package/src/storybook/assets/invoice.webp +0 -0
- package/src/storybook/assets/section-document-info.svg +21 -0
- package/src/storybook/assets/section-gear-checklist.svg +11 -0
- package/src/storybook/assets/section-person-arrow-in.svg +15 -0
- package/src/storybook/assets/section-person-arrow-out.svg +22 -0
- package/src/storybook/assets/section-receipt-dollar.svg +23 -0
- package/src/storybook/assets/table-empty-folder-empty.png +0 -0
- package/src/storybook/assets/table-empty-folder-magnifying-glass.png +0 -0
- package/src/storybook/assets/table-empty-funnel.png +0 -0
- package/src/storybook/assets/table-empty-load-failed.png +0 -0
- package/src/storybook/assets/wallet-spot.png +0 -0
- package/src/storybook/assets.d.ts +17 -0
- package/src/storybook/componentDoc.ts +41 -0
- package/src/storybook/fitFrame.tsx +70 -0
- package/src/storybook/forceStates.tsx +647 -0
- package/src/storybook/illustrations.tsx +66 -0
- package/src/storybook/viewportFrame.tsx +58 -0
- package/src/styles/assets/label-brush-1.svg +6 -0
- package/src/styles/assets/pattern-dark.svg +113 -0
- package/src/styles/base.css +106 -0
- package/src/styles/index.css +15 -0
- package/src/styles/motion.css +157 -0
- package/src/styles/promo-sticker.css +27 -0
- package/src/styles/promo-surface.css +49 -0
- package/src/styles/shared.css +11 -0
- package/src/styles/theme.generated.css +314 -0
- package/src/styles/theme.map.json +278 -0
- package/src/styles/tracking.generated.css +12 -0
- package/src/tokens/index.ts +4 -0
- package/src/tokens/tokens.generated.ts +542 -0
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
import { Meta, Canvas, Controls } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as DrawerStories from './Drawer.stories';
|
|
3
|
+
|
|
4
|
+
<Meta of={DrawerStories} tags={['autodocs']} />
|
|
5
|
+
|
|
6
|
+
# Drawer
|
|
7
|
+
|
|
8
|
+
## Metadata
|
|
9
|
+
|
|
10
|
+
- **Layer:** organism
|
|
11
|
+
- **Kind:** region (manifest `kind`) — a chrome shell with slots, not an inked component
|
|
12
|
+
- **Status:** draft — the design acceptance of the Storybook DoD is not yet recorded in the story header
|
|
13
|
+
- **Tokens used:** `--bg-overlay`, `--bg-primary`, `--border-width-100`, `--font-heading`, `--font-size-heading-h5`, `--font-weight-semibold`, `--leading-relaxed`, `--outline-default`, `--radius-0`, `--shadow-modal`, `--space-400`, `--space-500`, `--space-600`, `--space-800`, `--space-900`, `--space-1000`, `--text-primary`, `--z-index-modal`, `--z-index-modal-backdrop`
|
|
14
|
+
- **Manifest version:** `1.0.5`
|
|
15
|
+
|
|
16
|
+
The component is built against `drawer.manifest.json` 1.0.5. 1.0.0 is the bump that moves code:
|
|
17
|
+
Level becomes a Figma axis and the Placement=Right header is re-specced as the open state of the Nav
|
|
18
|
+
Bar's Menu button. 1.0.1 – 1.0.5 are PATCHes: wording of the header rule and the slot notes, swipe
|
|
19
|
+
ruled out as a gesture (1.0.4), Placement=Left recorded as parked (1.0.5). The motion tokens the
|
|
20
|
+
panel, scrim and Body levels run on are listed under [Motion](#motion); they are Motion props, not
|
|
21
|
+
classes.
|
|
22
|
+
|
|
23
|
+
## Overview
|
|
24
|
+
|
|
25
|
+
**Drawer** is the **Drawer Surface** — the mobile menu chrome, the full-screen open state of the
|
|
26
|
+
Nav Bar's Menu button: a header, a scrollable **Body** slot and an optional pinned **Footer** slot.
|
|
27
|
+
It is **chrome only**: the account card, the agenda rows and the navigation rows are all consumer
|
|
28
|
+
content mounted into the slots (`intent.whenToUse`). The shell owns exactly one text run of its
|
|
29
|
+
own — the header title.
|
|
30
|
+
|
|
31
|
+
Use it for the mobile menu — the panel the Menu button opens — and for the drill-in levels inside
|
|
32
|
+
it. `placement="right"` is that menu; `placement="left"` is the **parked** agenda-panel model, which
|
|
33
|
+
keeps its earlier header and has no Nested level (`intent.variants`). A drill-in is Level=Nested,
|
|
34
|
+
the `nested` prop, on the same surface.
|
|
35
|
+
|
|
36
|
+
**Do not** use it for list pickers, selects or filters — on mobile those open as a bottom sheet —
|
|
37
|
+
and do not put the page's primary CTA inside it: that action lives in the Sticky Context Bar,
|
|
38
|
+
outside the scrim, so the drawer never duplicates it (`intent.rules[0]`).
|
|
39
|
+
|
|
40
|
+
## Rationale
|
|
41
|
+
|
|
42
|
+
The menu covers the whole viewport, Nav Bar included, so its header takes over the bar's place and
|
|
43
|
+
the close button sits at the end where the Menu button was: the way out is where the way in was. At
|
|
44
|
+
Root a single close button is enough, so the header shows no title — the panel's name exists only
|
|
45
|
+
for assistive technology. A Nested level needs three things one control cannot carry: a way back one
|
|
46
|
+
level, a name for where the user now is, and a way out of the whole menu — so Nested shows back, a
|
|
47
|
+
centred title and close. Every drill-in reuses the same shell, so every consumer gets the same
|
|
48
|
+
dialog semantics, elevation and dismissal for free.
|
|
49
|
+
|
|
50
|
+
It is built directly on **Radix `Dialog` primitives** (`delivery.react`), not on a hand-rolled
|
|
51
|
+
`role="dialog"` div: `Dialog.Root` / `Dialog.Portal` supply the focus trap, the scroll lock, the Esc
|
|
52
|
+
handling and the portal mount. `Dialog.Overlay` (scrim) and `Dialog.Content` (panel) are **siblings**
|
|
53
|
+
inside the portal — never the panel nested in the scrim with a manual `stopPropagation()`, the
|
|
54
|
+
pattern that silently breaks outside-click dismissal once the panel is as large as the overlay.
|
|
55
|
+
|
|
56
|
+
## Anatomy
|
|
57
|
+
|
|
58
|
+
Each part carries a `data-fods-part` marker. Which parts the header holds depends on Placement and
|
|
59
|
+
Level. Only the panel, the scrim, the header and the title bind tokens of their own; the rest is
|
|
60
|
+
layout, a hosted Icon Button or slotted content.
|
|
61
|
+
|
|
62
|
+
- **Scrim** (`data-fods-part="scrim"`) — Radix `Dialog.Overlay`. `fixed inset-0`, fill
|
|
63
|
+
`--bg-overlay` (`bg-background-overlay`) at `--z-index-modal-backdrop` (`z-modal-backdrop`). It is
|
|
64
|
+
a **sibling** of the panel inside the portal, so it carries `data-fods-component="drawer"` itself —
|
|
65
|
+
the runtime probe resolves a part's owner through the closest `data-fods-component` ancestor and
|
|
66
|
+
would otherwise find none for it.
|
|
67
|
+
- **Panel** (`data-fods-part="root"`) — Radix `Dialog.Content`. `fixed inset-y-0 w-full`, a flex
|
|
68
|
+
column, fill `--bg-primary` (`bg-background-primary`), radius `--radius-0` (`rounded-0`,
|
|
69
|
+
deliberately unrounded — the panel is bled to the viewport edge), elevation `--shadow-modal`
|
|
70
|
+
(`shadow-modal`, the blocking-surface shadow, **not** `--shadow-overlay`), stacked at
|
|
71
|
+
`--z-index-modal` (`z-modal`). `w-full` is the whole width story — see [Sizes](#sizes).
|
|
72
|
+
- **Header** (`data-fods-part="header"`) — `flex shrink-0 items-center`, `gap-400`
|
|
73
|
+
(`--space-400`) and a bottom rule `border-b-100 border-b-outline-default` (`--border-width-100` /
|
|
74
|
+
`--outline-default`). The rule is a plain token border — the same recipe Modal uses — **not** a
|
|
75
|
+
mounted Divider instance. The box depends on Placement:
|
|
76
|
+
- **Placement=Right** — a fixed-height bar (`h-[60px]`, the height `regions[header].note` gives,
|
|
77
|
+
with no vertical padding), fill `--bg-primary` (`bg-background-primary`), and side padding that
|
|
78
|
+
follows the page's side padding per breakpoint: `px-600 sm:px-800 md:px-900 lg:px-1000`
|
|
79
|
+
(`--space-600` · `--space-800` · `--space-900` · `--space-1000`). The height has no token, which
|
|
80
|
+
is why it is the one arbitrary length in the recipe.
|
|
81
|
+
- **Placement=Left** (parked) — no explicit height; `py-500` (`--space-500`) and the asymmetric
|
|
82
|
+
inline pair `pl-400` / `pr-500` (hinge side smaller), with the Size lg arrow, produce the height
|
|
83
|
+
the manifest states for it.
|
|
84
|
+
- **Close** (`data-fods-part="close"`, Placement=Right) — a hosted `IconButton variant="secondary"
|
|
85
|
+
size="md"` with the `x` glyph, at the right end on **both** levels (`ml-auto shrink-0`). It closes
|
|
86
|
+
the drawer. It is the same node on Root and Nested, so a level change never re-mounts it.
|
|
87
|
+
- **Back** (`data-fods-part="back"`, Placement=Right, Level=Nested only) — a hosted
|
|
88
|
+
`IconButton variant="tertiary" size="md"` with the `arrow-left` glyph, at the left end. It calls
|
|
89
|
+
`onBack`.
|
|
90
|
+
- **Dismiss-or-back** (`data-fods-part="dismiss-or-back"`, Placement=Left only) — a hosted
|
|
91
|
+
`IconButton variant="tertiary" size="lg"` with `arrow-left` at the left end-cap. Despite the
|
|
92
|
+
part's name it only **closes** the panel: Placement=Left has no Nested level.
|
|
93
|
+
- **Spacer** (`data-fods-part="spacer"`, Placement=Left only) — a `span` at the opposite end-cap,
|
|
94
|
+
`size-[44px] shrink-0`, `aria-hidden="true"`. No fill, no border, no ink, not focusable — it
|
|
95
|
+
exists only so the title stays centred against the arrow. Its box matches Icon Button Size lg,
|
|
96
|
+
which has no spacing-token alias, so it carries an off-grid suppression rather than a token class.
|
|
97
|
+
- **Title** (`data-fods-part="title"`) — Radix `Dialog.Title`, the shell's **only** inked text.
|
|
98
|
+
`font-poppins text-heading-h5 font-semibold text-text-primary` = `--font-heading`,
|
|
99
|
+
`--font-size-heading-h5` (with `--leading-relaxed` riding along on the type step),
|
|
100
|
+
`--font-weight-semibold`, `--text-primary`. Where it is shown (Placement=Left, and Level=Nested)
|
|
101
|
+
`min-w-0 flex-1 truncate text-center` centres it between the end boxes and truncates it on one
|
|
102
|
+
line — the clip sits on the title, never on the header, or the buttons' focus rings get cut. On
|
|
103
|
+
Placement=Right, Level=Root it is `sr-only`: visually hidden, still the dialog's name.
|
|
104
|
+
- **Body** (`data-fods-part="body"`) — a **slot**: `relative min-h-0 flex-1 overflow-y-auto
|
|
105
|
+
overflow-x-hidden`. The single scroll region, filling everything between header and footer.
|
|
106
|
+
`min-h-0` is what lets it shrink inside the flex column, `overflow-x-hidden` clips the level
|
|
107
|
+
transition, `relative` is the containing block the outgoing level is positioned against. Every
|
|
108
|
+
colour inside belongs to the atom the consumer mounted.
|
|
109
|
+
- **Footer** (`data-fods-part="footer"`) — a **slot**: `shrink-0`, hugging its content, pinned under
|
|
110
|
+
the Body, and rendered only when `showFooter` is on and `footer` content is passed. It has no top
|
|
111
|
+
rule (`slots.footer`).
|
|
112
|
+
|
|
113
|
+
## Variants
|
|
114
|
+
|
|
115
|
+
Two Figma axes (`axes.placement`, `axes.level`), **three** variants: Level=Nested exists on
|
|
116
|
+
Placement=Right only, so the matrix is three cells, not a 2 × 2 grid.
|
|
117
|
+
|
|
118
|
+
<Canvas of={DrawerStories.Matrix} />
|
|
119
|
+
|
|
120
|
+
The Matrix is a grid of **preview frames**, not cells on one canvas. That is forced by the
|
|
121
|
+
component: the panel is a `position: fixed` full-viewport blocking surface, so two instances on one
|
|
122
|
+
canvas would cover each other completely, and two simultaneous modal dialogs would `aria-hidden` one
|
|
123
|
+
another. Each frame loads the matching Placement story at the 390 × 720 reference canvas.
|
|
124
|
+
|
|
125
|
+
<table>
|
|
126
|
+
<thead>
|
|
127
|
+
<tr><th>Variant</th><th>Code</th><th>Header</th></tr>
|
|
128
|
+
</thead>
|
|
129
|
+
<tbody>
|
|
130
|
+
<tr>
|
|
131
|
+
<td>Placement=Right · Level=Root</td>
|
|
132
|
+
<td><code>placement="right"</code></td>
|
|
133
|
+
<td>The menu the Nav Bar's Menu button opens. Close (Secondary, md, <code>x</code>) alone at the right end; the title is visually hidden. Panel <code>right-0</code>, enters from the right edge.</td>
|
|
134
|
+
</tr>
|
|
135
|
+
<tr>
|
|
136
|
+
<td>Placement=Right · Level=Nested</td>
|
|
137
|
+
<td><code>placement="right"</code> <code>nested</code> + <code>onBack</code> + <code>backLabel</code></td>
|
|
138
|
+
<td>A drill-in inside the same surface: back (Tertiary, md, <code>arrow-left</code>) · the centred, truncating title · the same close.</td>
|
|
139
|
+
</tr>
|
|
140
|
+
<tr>
|
|
141
|
+
<td>Placement=Left · Level=Root (parked)</td>
|
|
142
|
+
<td><code>placement="left"</code> (the default)</td>
|
|
143
|
+
<td>The parked agenda-panel model, unchanged: one arrow (Tertiary, lg, <code>arrow-left</code>) at the left end-cap that closes, the visible title, a hidden spacer opposite. Panel <code>left-0</code>, enters from the left edge. No Nested level.</td>
|
|
144
|
+
</tr>
|
|
145
|
+
</tbody>
|
|
146
|
+
</table>
|
|
147
|
+
|
|
148
|
+
<Canvas of={DrawerStories.PlacementRight} story={{ inline: false, height: '720px' }} />
|
|
149
|
+
|
|
150
|
+
<Canvas of={DrawerStories.PlacementRightNested} story={{ inline: false, height: '720px' }} />
|
|
151
|
+
|
|
152
|
+
<Canvas of={DrawerStories.PlacementLeft} story={{ inline: false, height: '720px' }} />
|
|
153
|
+
|
|
154
|
+
### Level is tied to Placement
|
|
155
|
+
|
|
156
|
+
Level maps to the code prop `nested` (`properties[Level].maps`): `false` = Root, `true` = Nested.
|
|
157
|
+
In code it is a TypeScript union, so a Nested level cannot lose its back handler or its label, and
|
|
158
|
+
cannot be asked of Placement=Left:
|
|
159
|
+
|
|
160
|
+
```tsx
|
|
161
|
+
type DrawerLevelProps =
|
|
162
|
+
| { placement?: 'left' | 'right'; nested?: false; onBack?: never; backLabel?: never }
|
|
163
|
+
| { placement: 'right'; nested: true; onBack: () => void; backLabel: string };
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
A nested level without a back handler or a translated label would render a back button that does
|
|
167
|
+
nothing or announces nothing; the union makes that unrepresentable. A JavaScript caller that passes
|
|
168
|
+
`nested` with `placement="left"` anyway keeps the parked header.
|
|
169
|
+
|
|
170
|
+
## Sizes
|
|
171
|
+
|
|
172
|
+
**One size — Mobile — and no Size axis at all.** Unlike Modal's fixed S/M/L/XL widths, this shell
|
|
173
|
+
has no measurement to choose between: the panel spans the full viewport width and height.
|
|
174
|
+
|
|
175
|
+
`sizes[0].width = 390` in the manifest is **not a width to implement**. It is the FODS Mobile
|
|
176
|
+
breakpoint's own reference canvas — the width the shell is designed and previewed at — and the
|
|
177
|
+
manifest says so (`sizes[0].note`). The component implements `w-full`, and there is no `w-[390px]`
|
|
178
|
+
anywhere in it. The number appears in the stories only to give the Matrix frames a phone-shaped
|
|
179
|
+
viewport to render inside.
|
|
180
|
+
|
|
181
|
+
The Placement=Right header has one shape at every width; only its side padding follows the
|
|
182
|
+
breakpoint (see [Anatomy](#anatomy)).
|
|
183
|
+
|
|
184
|
+
There is no `Sizes` story for the same reason: with one fluid size there is nothing to line up side
|
|
185
|
+
by side. The single row of the [Matrix](#variants) is the size coverage.
|
|
186
|
+
|
|
187
|
+
Rows mounted into the Body and Footer slots bring their own `size="mobile"` — the shell sets no row
|
|
188
|
+
density itself. `slots.body` accepts List Row, Action Row and Divider; `slots.footer` takes List Row
|
|
189
|
+
only. List Row is a role-free `div`, so the consumer wraps each one in the real control — an
|
|
190
|
+
`<a href>` for a destination, a `<button>` for an action — and that control carries List Row's inset
|
|
191
|
+
focus ring (`list-row.manifest.json` → `focus`). A link wrapper also needs `no-underline`, otherwise
|
|
192
|
+
a global link hover underlines the whole row. The stories do exactly that.
|
|
193
|
+
|
|
194
|
+
## States
|
|
195
|
+
|
|
196
|
+
**The shell has no interaction states of its own.** `drawer.manifest.json` carries no `axes.state`
|
|
197
|
+
and no `focus` block, so the Definition of Done's five-interaction-states box **does not apply
|
|
198
|
+
here**. It is chrome: the focusable elements it owns are hosted Icon Buttons, whose states are
|
|
199
|
+
graded in `icon-button`'s own manifest, and every other colour inside belongs to the atom the
|
|
200
|
+
consumer mounted. There is consequently no `States` story.
|
|
201
|
+
|
|
202
|
+
What the surface does have is a **lifecycle** (`intent.states`):
|
|
203
|
+
|
|
204
|
+
- **Default (open)** — the panel sits over the `--bg-overlay` scrim; the page behind is inert.
|
|
205
|
+
- **Scrolling body** — header and footer stay pinned; the Body is the only scroll region
|
|
206
|
+
(`overflow-y-auto` on the Body, `shrink-0` on both the header and the footer).
|
|
207
|
+
- **Level change (Root ↔ Nested)** — only the Body's content moves. The panel does not move and the
|
|
208
|
+
header updates **instantly**: back and the visible title appear on Nested, close keeps its node and
|
|
209
|
+
its place at the right end. The outgoing level stays mounted for the transition as an
|
|
210
|
+
`absolute inset-0` layer marked `inert` and `aria-hidden="true"`, then unmounts once the incoming
|
|
211
|
+
layer's animation completes. Keeping it alive is the shell's own concern — the consumer only ever
|
|
212
|
+
passes the current level's children.
|
|
213
|
+
- **Dismiss** — the close button (on Placement=Left, the arrow) or Esc, from any level. The back
|
|
214
|
+
button steps one level up from Nested. There is no swipe gesture. A scrim tap is **not reachable
|
|
215
|
+
today** — see below.
|
|
216
|
+
|
|
217
|
+
**Known limitation.** `nested` is a boolean, so the shell only sees a level change when it flips.
|
|
218
|
+
Going from one Nested level to a deeper Nested level — only `title` and `children` change — plays
|
|
219
|
+
no Body transition and moves no focus, and the shell keeps one opener record, not one per level.
|
|
220
|
+
|
|
221
|
+
<Canvas of={DrawerStories.NestedLevel} story={{ inline: false, height: '720px' }} />
|
|
222
|
+
|
|
223
|
+
Playground, Placement Right and Nested Level are wired the same way: on Root, **Nastavení agendy**
|
|
224
|
+
is a real `<button>` that opens the nested level, so Enter on it steps in. On Placement Left the same
|
|
225
|
+
row is a plain link, because Left has no Nested level.
|
|
226
|
+
|
|
227
|
+
### Motion
|
|
228
|
+
|
|
229
|
+
<Canvas of={DrawerStories.Motion} story={{ inline: false, height: '720px' }} />
|
|
230
|
+
|
|
231
|
+
Manifest `motion` (unchanged since 0.10.1) — enter, exit and the level change are **Motion props**,
|
|
232
|
+
not CSS keyframes. Radix keeps the portal mounted through the exit (`forceMount` under
|
|
233
|
+
`AnimatePresence`), so the focus trap, scroll lock, `aria-*` and focus return are unchanged. While
|
|
234
|
+
the exit plays the panel is `inert`, so its controls take no further focus, click or Enter.
|
|
235
|
+
|
|
236
|
+
The level direction is **placement-relative**: the deeper level arrives from the panel's own **far**
|
|
237
|
+
edge — the one away from its hinge — so a right-hinged panel takes it from the left; back reverses
|
|
238
|
+
it. The component resolves the sign from `placement` and the direction of the change
|
|
239
|
+
(`useDrawerMotion`).
|
|
240
|
+
|
|
241
|
+
<table>
|
|
242
|
+
<thead>
|
|
243
|
+
<tr><th>Transition</th><th>How</th><th>Reduced motion</th></tr>
|
|
244
|
+
</thead>
|
|
245
|
+
<tbody>
|
|
246
|
+
<tr>
|
|
247
|
+
<td>Panel enter / exit</td>
|
|
248
|
+
<td>A full-panel-width translate (<code>x: ±100%</code>) from and back to its own edge on <code>--spring-gentle</code>. Closing while it is still opening reverses from where it is (<code>interrupt</code>).</td>
|
|
249
|
+
<td rowSpan={3}>No slide and no shift anywhere — opacity only, at <code>--duration-instant</code> (<code>motion.reducedMotion</code>).</td>
|
|
250
|
+
</tr>
|
|
251
|
+
<tr>
|
|
252
|
+
<td>Scrim fade</td>
|
|
253
|
+
<td>Opacity 0 → full <code>--bg-overlay</code> on <code>--duration-slow</code> + <code>--easing-enter</code>; out on <code>--easing-exit</code>. A curve, not the panel's spring.</td>
|
|
254
|
+
</tr>
|
|
255
|
+
<tr>
|
|
256
|
+
<td>Level change</td>
|
|
257
|
+
<td>Outgoing level: fades out on <code>--duration-fast</code> + <code>--easing-exit</code> while shifting <code>--space-900</code> away. Incoming level: starts <code>--duration-instant</code> later, fades in on <code>--duration-slow</code> + <code>--easing-enter</code> and settles <code>--space-900</code> into place on <code>--spring-gentle</code>. It never slides across the panel.</td>
|
|
258
|
+
</tr>
|
|
259
|
+
</tbody>
|
|
260
|
+
</table>
|
|
261
|
+
|
|
262
|
+
### The scrim is inert by geometry, not by mistake
|
|
263
|
+
|
|
264
|
+
The scrim renders, dims the page and carries `Dialog.Overlay`'s own semantics — but at the only
|
|
265
|
+
shipped size the panel covers its entire rect, so **there is no pointer-reachable scrim area and
|
|
266
|
+
tapping it cannot dismiss anything**. Radix's outside-click handling is deliberately left wired: it
|
|
267
|
+
starts working by itself the day a narrower-than-viewport breakpoint exists. Dismissal today is the
|
|
268
|
+
close button and Esc (manifest `overlay.note`).
|
|
269
|
+
|
|
270
|
+
<Canvas of={DrawerStories.WithoutFooter} story={{ inline: false, height: '720px' }} />
|
|
271
|
+
|
|
272
|
+
`showFooter` defaults to `true`, and the Footer region renders only when `footer` content is
|
|
273
|
+
actually supplied — so turning it on without content leaves no empty box in the layout. The story
|
|
274
|
+
above keeps passing `footer` and switches the region off, which is the point of the prop: one
|
|
275
|
+
config, one toggle per surface.
|
|
276
|
+
|
|
277
|
+
## API
|
|
278
|
+
|
|
279
|
+
<Controls />
|
|
280
|
+
|
|
281
|
+
- **Always controlled.** The drawer has no trigger of its own: the consumer owns `open` and closes
|
|
282
|
+
through `onClose`. `onClose` is called by the close button (on Placement=Left, the arrow) on every
|
|
283
|
+
level, and **always** by Esc.
|
|
284
|
+
- **`placement`** defaults to `'left'` (`properties[Placement].default`), the parked model. The menu
|
|
285
|
+
the Menu button opens passes `placement="right"`.
|
|
286
|
+
- **`title` is required** — it is always the dialog's accessible name. On Placement=Right, Root it is
|
|
287
|
+
rendered visually hidden (`sr-only`), so pass the panel name (cs «Menu»); on Nested pass the
|
|
288
|
+
destination's name from the row that opened it; Placement=Left shows it.
|
|
289
|
+
- **`closeLabel`** names the close button (on Placement=Left, the arrow). **`backLabel`** names the
|
|
290
|
+
back button and is required on a nested level. Both come from the consumer's i18n layer; nine
|
|
291
|
+
markets ship this chrome, so a hardcoded string is a defect, not a placeholder.
|
|
292
|
+
- **`placement="right"`, `nested`, `onBack` and `backLabel` move together** through the union above.
|
|
293
|
+
The Controls table flattens the union, so they appear as independent props there — in TypeScript
|
|
294
|
+
they are not. `onBack` is called by the back button only, never by Esc.
|
|
295
|
+
- **`children` is the current level's Body content only**, never a second level.
|
|
296
|
+
- **`className`** is merged onto the panel (`Dialog.Content`) through `cn`, not onto the scrim.
|
|
297
|
+
|
|
298
|
+
## Do / Don't
|
|
299
|
+
|
|
300
|
+
- ✅ Use `placement="right"` for the menu the Nav Bar's Menu button opens.
|
|
301
|
+
- ✅ Pass the panel name as `title` at Root even though it is not shown — it names the dialog.
|
|
302
|
+
- ✅ Use `nested` with `onBack` and `backLabel` for a drill-in **inside the same surface**.
|
|
303
|
+
- ✅ Mount the account card, the agenda list and the navigation rows as **Body content** — the
|
|
304
|
+
header carries only its buttons and the title.
|
|
305
|
+
- ✅ Keep the primary page CTA (Vystavit fakturu) in the Sticky Context Bar, outside the drawer.
|
|
306
|
+
- ✅ Supply `closeLabel` / `backLabel` from the consumer's i18n layer.
|
|
307
|
+
- ✅ Use List Row `size="mobile"` for every row inside the Body and Footer.
|
|
308
|
+
- ✅ Keep the title short — a noun phrase naming the panel (`Menu`, `Nastavení agendy`,
|
|
309
|
+
`Agenda a účet`).
|
|
310
|
+
- ❌ Pass `nested` with `placement="left"` — Left has no Nested level, and the types reject it.
|
|
311
|
+
- ❌ Put a logo, bell or CTA in the header, or bake the account card into it (`intent.rules[1]`).
|
|
312
|
+
- ❌ Open a second floating panel for a drill-in.
|
|
313
|
+
- ❌ Make Esc step back a level — Esc always closes the whole drawer.
|
|
314
|
+
- ❌ Give the panel a fixed width (`390px`) — it is fluid at 100% of the viewport.
|
|
315
|
+
- ❌ Pass both levels' children and manage the outgoing one yourself.
|
|
316
|
+
- ❌ Reach for it for a select, list picker or filter on mobile — those open as a bottom sheet.
|
|
317
|
+
- ❌ Expose inline edit on an Action Row mounted inside the drawer (`intent.rules[5]`).
|
|
318
|
+
|
|
319
|
+
## Accessibility
|
|
320
|
+
|
|
321
|
+
- **Roles and accessible name** — Radix `Dialog.Content` supplies `role="dialog"` and points
|
|
322
|
+
`aria-labelledby` at `Dialog.Title`, which is rendered from the **required** `title` prop — visibly
|
|
323
|
+
on Placement=Left and on Nested, `sr-only` on Placement=Right, Root, where it still names the
|
|
324
|
+
dialog. The component passes `aria-describedby={undefined}` explicitly: the shell has no
|
|
325
|
+
description run of its own. Radix sets no `aria-modal` of its own, so the component puts
|
|
326
|
+
`aria-modal="true"` on `Dialog.Content` itself — the same contract as Modal. While the dialog is
|
|
327
|
+
open Radix takes the rest of the page out of the accessibility tree and locks page scroll.
|
|
328
|
+
- **Heading level** — `Dialog.Title` renders Radix's default `h2`. *Heading/H5* is a **type style**,
|
|
329
|
+
not a heading level.
|
|
330
|
+
- **Keyboard** — Esc always fully closes, at any level, through `Dialog.Root`'s `onOpenChange`. This
|
|
331
|
+
is a deliberate divergence from `overlay-behavior.md` § Submenu (where Esc steps back one level in
|
|
332
|
+
a non-blocking anchored flyout): Nested is a level inside a **blocking** dialog, so
|
|
333
|
+
`accessibility.md`'s global *"Esc closes any modal, drawer, or popover"* governs instead
|
|
334
|
+
(`intent.rules`). **Back is reachable only through the back button.** Tab cycles inside Radix's
|
|
335
|
+
focus trap. When a floating panel opened inside the drawer is open, Esc closes that panel and the
|
|
336
|
+
drawer stays.
|
|
337
|
+
- **Focus**
|
|
338
|
+
- **On open** `onOpenAutoFocus` is prevented and focus moves to the close button (on
|
|
339
|
+
Placement=Left, the arrow).
|
|
340
|
+
- **On drill-in** focus moves to the back button of the new level — never to the dialog container:
|
|
341
|
+
the row that opened the level leaves with the outgoing Body content, so focus is set explicitly.
|
|
342
|
+
- **On stepping back** focus returns to the row that opened the level. That row remounts, so the
|
|
343
|
+
shell keeps an **identification** of it rather than the node: its region (Body or Footer), its
|
|
344
|
+
position among that region's focusable elements, and a fingerprint (its `id`, else its `href`,
|
|
345
|
+
else its tag and accessible name). It focuses the element at that position if the fingerprint
|
|
346
|
+
still matches, else the first element in the same region that matches, else the close button —
|
|
347
|
+
which is also where focus goes when nothing was recorded or the opener is now disabled.
|
|
348
|
+
- **On close** focus returns to the element that had it when the drawer opened (the Menu button) —
|
|
349
|
+
a controlled drawer has no `Dialog.Trigger` for Radix to return to.
|
|
350
|
+
- **The buttons have no visible text**, so each `aria-label` is the whole announcement —
|
|
351
|
+
`closeLabel` (cs Zavřít) and `backLabel` (cs Zpět), both translated by the caller. On
|
|
352
|
+
Placement=Right both are Icon Button **Size md** and stay square — the Nav Bar's header-chrome
|
|
353
|
+
tier (`delivery.react`); the parked Left arrow is Size lg. Their focus rings are Icon Button's own.
|
|
354
|
+
- **Screen reader** — on Placement=Right, Root the header holds one button; the panel's name is
|
|
355
|
+
announced as the dialog's name. On Placement=Left the end-cap spacer is `aria-hidden="true"` and
|
|
356
|
+
not focusable. During a level change the outgoing layer is marked `inert` **and**
|
|
357
|
+
`aria-hidden="true"`, so the two levels are never both readable. A truncated title is cut visually
|
|
358
|
+
only — the full string stays in the DOM.
|
|
359
|
+
- **Dismissal** — the close button and Esc. Scrolling the Body never dismisses, and a scrim tap is
|
|
360
|
+
not pointer-reachable at the current size (see [States](#states)).
|
|
361
|
+
- **Contrast** — the shell inks exactly one run: the title, `--text-primary` on `--bg-primary`. The
|
|
362
|
+
buttons' own states are graded in `icon-button`'s manifest; the ink of every row inside the Body
|
|
363
|
+
and Footer belongs to the atom the consumer mounted.
|
|
364
|
+
- **Motion** — under `prefers-reduced-motion` (Motion's `useReducedMotion`) the panel, the scrim
|
|
365
|
+
and both level layers collapse to an opacity-only fade at `--duration-instant` ([Motion](#motion)).
|
|
366
|
+
- **In Storybook** — the meta sets `a11y: { context: 'body' }` because Radix portals both the scrim
|
|
367
|
+
and the panel outside `#storybook-root`. The Matrix story disables the addon (it cannot reach into
|
|
368
|
+
nested frames), so axe coverage for this component lives on **Playground** and the **Placement**
|
|
369
|
+
stories.
|
|
370
|
+
|
|
371
|
+
Accessibility floor for every FODS component: `spec/01-foundations/accessibility.md`.
|
|
372
|
+
|
|
373
|
+
## Copy
|
|
374
|
+
|
|
375
|
+
Voice: impersonal, clear, concise. The shell renders **one text run of its own**, the header
|
|
376
|
+
title; everything else is slotted content whose copy belongs to the rows mounted in it.
|
|
377
|
+
|
|
378
|
+
- **Title** (`title`) — a noun phrase naming the panel: sentence case, short, no verbs. One line,
|
|
379
|
+
max 24 characters; a longer title truncates. On Placement=Right, Root, the panel name is `Menu`;
|
|
380
|
+
it is visually hidden and serves as the dialog's accessible name. Placement=Left keeps its
|
|
381
|
+
visible `Agenda a účet` title. A Nested title is the destination's name verbatim from the row
|
|
382
|
+
that opened it. The title never carries the agenda's own name: the account card at the top of
|
|
383
|
+
the Body names it.
|
|
384
|
+
|
|
385
|
+
The button labels `Zavřít` and `Zpět` are `aria-label`s passed as `closeLabel` and `backLabel`
|
|
386
|
+
from the consumer's i18n layer, never hardcoded strings.
|
|
387
|
+
|
|
388
|
+
<table>
|
|
389
|
+
<thead>
|
|
390
|
+
<tr><th>Run</th><th>✅ Write</th><th>❌ Don't write</th></tr>
|
|
391
|
+
</thead>
|
|
392
|
+
<tbody>
|
|
393
|
+
<tr>
|
|
394
|
+
<td>Title</td>
|
|
395
|
+
<td><code>Menu</code> (Right, Root, hidden) · <code>Nastavení agendy</code> · <code>Agenda a účet</code></td>
|
|
396
|
+
<td><code>Vaše nastavení agendy</code> · <code>Zavřít menu</code></td>
|
|
397
|
+
</tr>
|
|
398
|
+
</tbody>
|
|
399
|
+
</table>
|
|
400
|
+
|
|
401
|
+
## Usage
|
|
402
|
+
|
|
403
|
+
<Canvas of={DrawerStories.Playground} story={{ inline: false, height: '720px' }} />
|
|
404
|
+
|
|
405
|
+
```tsx
|
|
406
|
+
// Good — Root: controlled, labels from i18n, rows mounted as Body content inside real controls.
|
|
407
|
+
// The title is not shown at Root, but it names the dialog.
|
|
408
|
+
const [menuOpen, setMenuOpen] = useState(false);
|
|
409
|
+
// rowControl = `block w-full` + List Row's inset focus ring (see Sizes)
|
|
410
|
+
|
|
411
|
+
<Drawer
|
|
412
|
+
open={menuOpen}
|
|
413
|
+
onClose={() => setMenuOpen(false)}
|
|
414
|
+
placement="right"
|
|
415
|
+
title="Menu"
|
|
416
|
+
closeLabel={t('drawer.close')}
|
|
417
|
+
footer={
|
|
418
|
+
<button type="button" className={rowControl} onClick={signOut}>
|
|
419
|
+
<ListRow size="mobile" variant="danger" leading={<Icon name="trash" />}>
|
|
420
|
+
{t('account.signOut')}
|
|
421
|
+
</ListRow>
|
|
422
|
+
</button>
|
|
423
|
+
}
|
|
424
|
+
>
|
|
425
|
+
<a href="#" className={`${rowControl} no-underline`}>
|
|
426
|
+
<ListRow size="mobile" variant="nav" trailing={<Icon name="caret-right-small" />}>
|
|
427
|
+
Kontakty
|
|
428
|
+
</ListRow>
|
|
429
|
+
</a>
|
|
430
|
+
<button type="button" className={rowControl} onClick={() => setLevel('agenda')}>
|
|
431
|
+
<ListRow size="mobile" variant="nav" trailing={<Icon name="caret-right-small" />}>
|
|
432
|
+
Nastavení agendy
|
|
433
|
+
</ListRow>
|
|
434
|
+
</button>
|
|
435
|
+
</Drawer>
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
```tsx
|
|
439
|
+
// Good — a drill-in: the SAME surface, one level deeper. Nested needs placement="right",
|
|
440
|
+
// and onBack + backLabel come with it.
|
|
441
|
+
<Drawer
|
|
442
|
+
open={menuOpen}
|
|
443
|
+
onClose={() => setMenuOpen(false)}
|
|
444
|
+
placement="right"
|
|
445
|
+
nested
|
|
446
|
+
title="Nastavení agendy"
|
|
447
|
+
closeLabel={t('drawer.close')}
|
|
448
|
+
onBack={() => setLevel('root')}
|
|
449
|
+
backLabel={t('drawer.back')}
|
|
450
|
+
>
|
|
451
|
+
<a href="#" className={`${rowControl} no-underline`}>
|
|
452
|
+
<ListRow size="mobile" variant="nav">Fakturační údaje</ListRow>
|
|
453
|
+
</a>
|
|
454
|
+
</Drawer>
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
```tsx
|
|
458
|
+
// Don't — nested on Placement=Left: a type error, Left has no Nested level.
|
|
459
|
+
<Drawer placement="left" nested onBack={back} backLabel={t('drawer.back')} … />
|
|
460
|
+
|
|
461
|
+
// Don't — hardcoded label: nine markets ship this chrome
|
|
462
|
+
<Drawer open={menuOpen} onClose={close} placement="right" title="Menu" closeLabel="Zavřít">…</Drawer>
|
|
463
|
+
|
|
464
|
+
// Don't — a fixed 390px panel. 390 is the reference canvas, the panel is fluid.
|
|
465
|
+
<Drawer className="w-[390px]" … />
|
|
466
|
+
|
|
467
|
+
// Don't — passing the outgoing level alongside the current one.
|
|
468
|
+
// The shell keeps the previous children mounted for the transition by itself.
|
|
469
|
+
<Drawer … >
|
|
470
|
+
{previousLevelRows}
|
|
471
|
+
{currentLevelRows}
|
|
472
|
+
</Drawer>
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
## Related
|
|
476
|
+
|
|
477
|
+
- **Mounted inside it** — [`ListRow`](?path=/docs/design-system-atoms-listrow--docs) and
|
|
478
|
+
`ActionRow` (Body and Footer rows, `size="mobile"`),
|
|
479
|
+
[`IconButton`](?path=/docs/design-system-atoms-iconbutton--docs) (the hosted close and back
|
|
480
|
+
buttons, and the parked Left arrow), [`Divider`](?path=/docs/design-system-atoms-divider--docs) as
|
|
481
|
+
consumer content inside the Body. The header's own rule is a plain border, not a Divider instance.
|
|
482
|
+
- **Sibling surfaces** — [`Modal`](?path=/docs/design-system-organisms-modal--docs) (the same
|
|
483
|
+
Radix foundation for a centred blocking surface),
|
|
484
|
+
[`AnchoredPanel`](?path=/docs/design-system-patterns-anchored-panel--docs) and
|
|
485
|
+
[`PopoverSurface`](?path=/docs/design-system-patterns-popover-surface--docs) for the
|
|
486
|
+
**non**-blocking, trigger-anchored half of the overlay family.
|
|
487
|
+
- **Nav Bar** — `spec/05-organisms/nav-bar.md`: the bar whose Menu button opens this drawer.
|
|
488
|
+
- **Radix** — [Dialog primitive](https://www.radix-ui.com/primitives/docs/components/dialog)
|
|
489
|
+
(`Root` / `Portal` / `Overlay` / `Content` / `Title`).
|
|
490
|
+
- **Spec:** `spec/05-organisms/drawer.md`
|
|
491
|
+
and `drawer.manifest.json` (axes, regions, slots, motion, migration).
|
|
492
|
+
|
|
493
|
+
## Migration notes
|
|
494
|
+
|
|
495
|
+
**1.0.5 (from 0.10.1).** On `placement="right"` the header is the open state of the Nav Bar's Menu
|
|
496
|
+
button. Root shows one close IconButton (secondary, md, `x`) at the right end and renders `title`
|
|
497
|
+
visually hidden as the dialog's name; Nested shows back (tertiary, md, `arrow-left`) · the centred
|
|
498
|
+
title · the same close. The header is a fixed-height bar with the page's side padding per breakpoint
|
|
499
|
+
(`regions[header].note`). Focus lands on the close button on open, on the back button after a
|
|
500
|
+
drill-in, and on the opening row after stepping back. `placement="left"` (the parked model) keeps
|
|
501
|
+
its header unchanged. Breaking changes:
|
|
502
|
+
|
|
503
|
+
- `nested` now requires `placement="right"`: Placement=Left has no Nested level, and the types
|
|
504
|
+
reject `nested` without it. Add `placement="right"` wherever you pass `nested`.
|
|
505
|
+
- On Placement=Right, Root, the title is no longer shown. Pass the panel's name (cs «Menu») as
|
|
506
|
+
`title`; it stays the dialog's accessible name.
|
|
507
|
+
- On Placement=Right the single arrow control (`data-fods-part="dismiss-or-back"`, IconButton
|
|
508
|
+
tertiary lg) and the end-cap spacer are gone. `closeLabel` now names the close button, `backLabel`
|
|
509
|
+
the back button. Selectors and tests that targeted `dismiss-or-back` on Placement=Right target
|
|
510
|
+
`close` or `back`.
|
|
511
|
+
- On Placement=Left the arrow only closes the panel.
|
|
512
|
+
|
|
513
|
+
**0.10.1 (from 0.9.4).** The `animate-drawer-*` keyframes (panel slide on `--duration-normal`,
|
|
514
|
+
scrim, level slide, reduced-motion fade) are replaced by Motion: the panel on `--spring-gentle`,
|
|
515
|
+
interruptible; the scrim on `--duration-slow`; the level change a fade + `--space-900` shift instead
|
|
516
|
+
of a slide; reduced motion fades everything on `--duration-instant`. No API change. The drawer now
|
|
517
|
+
stays in the DOM until its exit settles — a spec that asserts it is gone right after a close needs
|
|
518
|
+
`waitFor`.
|