@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,854 @@
|
|
|
1
|
+
import { Meta, Canvas, Controls } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as ModalStories from './Modal.stories';
|
|
3
|
+
|
|
4
|
+
<Meta of={ModalStories} tags={['autodocs']} />
|
|
5
|
+
|
|
6
|
+
# Modal
|
|
7
|
+
|
|
8
|
+
## Metadata
|
|
9
|
+
|
|
10
|
+
- **Layer:** organism
|
|
11
|
+
- **Kind:** region (manifest `kind`) — a chrome shell with slots; what goes inside is a content pattern, not a variant
|
|
12
|
+
- **Status:** draft (upstream spec front-matter)
|
|
13
|
+
- **Tokens used:** `--bg-overlay`, `--bg-primary`, `--border-width-100`, `--font-body`, `--font-heading`, `--font-size-base`, `--font-size-heading-h2`, `--font-size-heading-h4`, `--font-size-sm`, `--font-weight-normal`, `--font-weight-semibold`, `--leading-loose`, `--leading-relaxed`, `--leading-tight`, `--outline-default`, `--radius-600`, `--shadow-modal`, `--space-100`, `--space-1000`, `--space-1200`, `--space-1300`, `--space-200`, `--space-400`, `--space-500`, `--space-600`, `--space-700`, `--space-800`, `--space-900`, `--text-primary`, `--text-secondary`, `--text-wrap-heading`, `--z-index-modal`, `--z-index-modal-backdrop`
|
|
14
|
+
- **Manifest version:** `6.5.0`
|
|
15
|
+
|
|
16
|
+
The component is built against `modal.manifest.json` 6.5.0. Since 4.3.3 upstream: the content cap
|
|
17
|
+
is gone and L/XL are 834 / 1238 (5.0.0), Standard / Table are renamed **Center / Corner** and pair
|
|
18
|
+
title and footer alignment (5.0.0), region padding steps up with Size — the density ladder — and the
|
|
19
|
+
footer scrolls with the body (5.2.0), every Type gains a platform-driven **Size=Mobile** (6.0.0), and
|
|
20
|
+
the Marketing banner takes the Promo-visuals crop ratio of its Size (6.1.0); 6.1.1 is prose only —
|
|
21
|
+
the list-picker boundary now points a plain value pick at a popover (a bottom sheet below sm); 6.1.3
|
|
22
|
+
hides the Edge mask at the end of the scroll; and 6.2.0 **pins the footer** again on every Type and
|
|
23
|
+
Size — only the body scrolls — with the code-only `pinnedFooter={false}` for the old behaviour;
|
|
24
|
+
6.2.1 brings the body and footer region notes in line with it (prose only); 6.3.0 adds the top Edge
|
|
25
|
+
mask, the in-word title wrap clamped at 2 lines with the Compact/Marketing close reservation, and the
|
|
26
|
+
Form Block `surface="none"` pattern in the body — all three already in the code; 6.3.1 aligns the prose with the structured fields (prose only); 6.4.0 / 6.4.1 add the `motion` block — panel on `--spring-gentle`, scrim on `--duration-slow` (see [States → Motion](#motion)); 6.5.0 adds the Copy rules M1–M22 and
|
|
27
|
+
drops the title's 2-line clamp — the title wraps and is never truncated, copy keeps it short. The
|
|
28
|
+
4.3.4 intent-icon
|
|
29
|
+
box (`--size-icon-display`, 64) is wired since tokens 0.14.0 (now shipped in this package's tokens) — see
|
|
30
|
+
[Known discrepancies](#known-discrepancies).
|
|
31
|
+
|
|
32
|
+
## Overview
|
|
33
|
+
|
|
34
|
+
**Modal** is the blocking dialog: one focus-trapping card over a dimmed scrim, for an
|
|
35
|
+
**interruptive, focus-demanding** task that has to be resolved before the page is usable again —
|
|
36
|
+
confirm an irreversible action, complete a short focused form, pick from a list when the user must
|
|
37
|
+
see and compare the options, read an important notice, or step through a short wizard
|
|
38
|
+
(`intent.whenToUse`).
|
|
39
|
+
|
|
40
|
+
**Do not** use it for inline field validation (it belongs next to the field), transient feedback
|
|
41
|
+
(a toast), easily reversible one-click actions, a bare value pick with nothing to compare (a
|
|
42
|
+
popover — Select/Combobox, a bottom sheet below sm) or a persistent page-adjacent drawer (the menu family, see
|
|
43
|
+
[`Drawer`](?path=/docs/design-system-organisms-drawer--docs)).
|
|
44
|
+
|
|
45
|
+
**Pick the content first, the chrome second.** Decide what the dialog has to say and do
|
|
46
|
+
(Confirmation, Info, Form, List-picker, Marketing, Wizard steps — the spec's `## Patterns`); the
|
|
47
|
+
`type` follows from that job.
|
|
48
|
+
|
|
49
|
+
## Rationale
|
|
50
|
+
|
|
51
|
+
The product carried three parallel dialog systems, each on its own stack, which grew independently and drifted into
|
|
52
|
+
inconsistent chrome and inverted button semantics. This organism collapses them into one shell
|
|
53
|
+
(upstream `## Rationale`):
|
|
54
|
+
|
|
55
|
+
- **Chrome and content are two decisions.** The component set is only the shell —
|
|
56
|
+
**Type × Size × Has close**. The content patterns ride the shell as documentation, not as variants
|
|
57
|
+
(manifest `notes[4]`).
|
|
58
|
+
- **Five chrome archetypes.** Compact, Marketing, Center, Corner and Wizard. Center and Corner are
|
|
59
|
+
peers with the same regions and widths; they differ only in the alignment pair — title and footer
|
|
60
|
+
actions centred (Center) or in opposite corners (Corner) (`intent.rules[0]`, `rules[5]`).
|
|
61
|
+
- **Fixed button semantics.** The primary CTA is blue everywhere it commits, confirms or advances;
|
|
62
|
+
warning-orange is never the default; a destructive confirm replaces the primary; Marketing's CTA is
|
|
63
|
+
the only legal Brand button inside a modal (`notes[0]`).
|
|
64
|
+
- **Accessibility by construction.** Built on Radix `Dialog` (`delivery.react`): focus trap, scroll
|
|
65
|
+
lock, Esc and the portal come from the primitive. `Dialog.Overlay` and the frame holding
|
|
66
|
+
`Dialog.Content` are **siblings** in the portal, never the card nested in the scrim.
|
|
67
|
+
- **Composition by reference.** The close control is an `IconButton`, the wizard's back control a
|
|
68
|
+
`Button`, and every CTA is a consumer-supplied `Button` — a button change reaches every modal.
|
|
69
|
+
|
|
70
|
+
## Anatomy
|
|
71
|
+
|
|
72
|
+
Every part carries a `data-fods-part` marker. Which parts render depends on `type` — see
|
|
73
|
+
[Variants](#variants).
|
|
74
|
+
|
|
75
|
+
- **Scrim** (`scrim`) — Radix `Dialog.Overlay`: `fixed inset-0`, fill `--bg-overlay`
|
|
76
|
+
(`bg-background-overlay`) at `--z-index-modal-backdrop` (`z-modal-backdrop`), opacity-only motion
|
|
77
|
+
(`--duration-slow`, [Motion](#motion)). It is a sibling of the card, outside its subtree, so it
|
|
78
|
+
carries `data-fods-component="modal"` itself.
|
|
79
|
+
- **Container** (`root`) — Radix `Dialog.Content`: fill `--bg-primary`, a `--border-width-100`
|
|
80
|
+
`--outline-default` border, radius `--radius-600`, elevation `--shadow-modal`, stacked at
|
|
81
|
+
`--z-index-modal`, and `overflow-hidden` (manifest `container.clipsContent`). It is a flex column
|
|
82
|
+
(`relative w-full max-h-full`) centred by a fixed, non-transformed flex frame (`inset-0`,
|
|
83
|
+
`p-900 lg:p-1000` on desktop, `px-400 py-700` on [Size=Mobile](#mobile)), so it is capped at the
|
|
84
|
+
viewport minus the frame's padding. No `translate` — a transformed ancestor would be a containing
|
|
85
|
+
block and clip the panels portalled into the dialog — and no `fit-content`, because WebKit counts
|
|
86
|
+
the scrollable region as zero in a fit-content height and the card collapses. Width is set per
|
|
87
|
+
Size — see [Sizes](#sizes).
|
|
88
|
+
- **Header** (`header`) — Center, Corner and Wizard only. A row with gap `--space-400` and a bottom
|
|
89
|
+
rule `border-b-100 border-b-outline-default` (a plain border, not a Divider instance). Padding
|
|
90
|
+
follows the [density ladder](#density-ladder); the bottom padding gives the divider's width back
|
|
91
|
+
(`chrome.header`: border-box). Its min-height is the padded close row — vertical padding × 2 +
|
|
92
|
+
`--space-1000` (72 on sm · md, 80 on lg and Mobile, 88 on xl) — so turning Has close off never
|
|
93
|
+
moves the title's baseline (`regions[0].note`).
|
|
94
|
+
- **Title** (`title`) — Radix `Dialog.Title`, rendered from the `title` prop.
|
|
95
|
+
`font-poppins font-semibold text-text-primary`, Heading/H4 (`text-heading-h4`) on every Type except
|
|
96
|
+
Marketing, which steps up to Heading/H2 — the size, never the ink (`parts.title.note`).
|
|
97
|
+
`text.title` (6.5.0): the title wraps and is never truncated or clamped — copy keeps it within
|
|
98
|
+
2 lines (spec § Copy M3); the heading's `--text-wrap-heading` applies. An unbroken run (a filename as the
|
|
99
|
+
title) wraps inside the word through `wrap-anywhere` (`overflow-wrap: anywhere`, as `text.title`
|
|
100
|
+
names it).
|
|
101
|
+
On Compact/Marketing with a close and nothing above the title, the title takes the close
|
|
102
|
+
footprint as symmetric padding (`px-1000`; `px-1100` on Mobile) so it ends before the floating
|
|
103
|
+
X and stays on the card's axis (`text.title`, 6.3.0) — the header types reserve it on the header
|
|
104
|
+
instead (`regions[0].note`).
|
|
105
|
+
Centred on Center, at the start on Corner and Wizard.
|
|
106
|
+
- **Description** (`description`) — the optional scope line under the header title: the bare
|
|
107
|
+
company name or account e-mail (`Beta s.r.o.`), never with an entity prefix such as `Firma · `
|
|
108
|
+
(4.1.1). A Radix `Dialog.Description`: Body/S Regular in `--text-secondary`,
|
|
109
|
+
`--space-200` below the title. Center, Corner and Wizard only.
|
|
110
|
+
- **Close control** (`close-button`) — a hosted `IconButton variant="tertiary" size="md"
|
|
111
|
+
showSurface` with the `x` glyph, wrapped in `Dialog.Close`. On header Types it is absolutely
|
|
112
|
+
positioned over the header and vertically centred, its glyph on the content edge: `right-800` on
|
|
113
|
+
sm · md · lg, `right-900` on xl (paddingX − 8), `right-700` on Mobile. On Compact and Marketing it
|
|
114
|
+
floats in the card's top-right corner at `top-600 right-600` (`top-700 right-700` on Mobile),
|
|
115
|
+
rendered **last** in DOM order. On Mobile a `--space-100` `::before` pads its hit area to 44. Its
|
|
116
|
+
states are graded in `icon-button`'s own manifest.
|
|
117
|
+
- **Back icon control** (`back-icon-button`) — [mobile Wizard](#mobile-wizard) only: a
|
|
118
|
+
hosted `IconButton variant="tertiary" size="md" showSurface` with `arrow-left`, the first item
|
|
119
|
+
of the header row and **in its flow** (4.2.3), `aria-label` = `backLabel`. Rendered only when
|
|
120
|
+
`onBack` is passed; a `--space-100` `::before` on every side pads the 40 box to a 44 hit area.
|
|
121
|
+
- **Stepper** (`stepper`) — Wizard only, and only when a step indicator or (on desktop) a back
|
|
122
|
+
handler is passed. `min-h-1200` (64), `pb-400`, gap `--space-400`; paddingX and paddingTop follow
|
|
123
|
+
the density ladder. It spans the full track — no cap (`regions[2]`, 5.0.0).
|
|
124
|
+
- **Back control** (`back-link`) — a hosted `Button variant="tertiary" size="md"` with a leading
|
|
125
|
+
`arrow-left`, out of flow so the markers centre on the band. Its arrow glyph sits on the content
|
|
126
|
+
edge (x = paddingX − 12) and the Button centres on the 24 marker row (y = paddingTop − 8):
|
|
127
|
+
`left-500 top-400` on sm · md, `left-700 top-600` on lg, `--space-1000` − `--space-500` /
|
|
128
|
+
`top-800` on xl. Rendered only when `onBack` is passed, and never on the mobile Wizard.
|
|
129
|
+
- **Step indicator** (`step-indicator`) — the consumer's slot, centred in the stepper. Width per
|
|
130
|
+
Size under the corridor rule, min(Size width, track − 2 × `--space-1300`): 272 / 432 / 600 / 786;
|
|
131
|
+
the full band width on Mobile. The stories fill it with `ProgressBar size="sm" layout="row"
|
|
132
|
+
variant="blue"` and wire its Done-step return there (`onStepClick`) — the Modal does not.
|
|
133
|
+
- **Scroll region** (unmarked) — the body alone (`regions[1].note`, 6.2.1): `flex-1 min-h-0
|
|
134
|
+
overflow-y-auto`, between the pinned header and stepper above and the pinned footer below. With
|
|
135
|
+
`pinnedFooter={false}` the footer moves into it and is reached at the end of the content. It sits
|
|
136
|
+
in an unmarked positioning frame (`bodyFrame`) so both Edge masks can lie over it without
|
|
137
|
+
scrolling away; the frame starts under the header's (or the stepper band's) divider and ends at
|
|
138
|
+
the footer's top divider.
|
|
139
|
+
- **Body** (`body`) — Body/Base copy in `--text-primary`. Padding and gaps are set per Type and Size.
|
|
140
|
+
On Compact and Marketing it hosts, in order: banner or visual · title · container · CTA row.
|
|
141
|
+
- **Edge mask** (`edge-mask`) — on every Type, while the scroll region overflows: Fade Overlay
|
|
142
|
+
`Kind=Edge mask` on its bottom edge, 40 (`h-1000`) of `--bg-primary` at alpha 0 → 1
|
|
143
|
+
(`rgb(from var(--bg-primary) r g b / 0)` → `var(--bg-primary)`), `pointer-events-none`,
|
|
144
|
+
`aria-hidden`, inset from the right by a classic scrollbar's measured gutter. It sits directly
|
|
145
|
+
above the pinned footer's divider (at the card's bottom edge with `pinnedFooter={false}`). Never
|
|
146
|
+
while unpinned, and gone once the region is scrolled to its end (6.1.3), so it never lies over the
|
|
147
|
+
last row — or, with the footer scrolling, over the CTAs.
|
|
148
|
+
- **Top Edge mask** (`edge-mask-top`) — the same mask mirrored onto the scroll region's top edge,
|
|
149
|
+
directly under the header's divider (on the Wizard under the stepper band): `to top` gradient,
|
|
150
|
+
40 (`h-1000`), the same gutter inset. Shown while the region overflows and is scrolled away from
|
|
151
|
+
its start; never while unpinned (`chrome.mobile.body.edge-mask-top`, 6.3.0).
|
|
152
|
+
- **Banner** (`banner`) — Compact/Marketing, instead of a visual. Full-bleed: negative margins
|
|
153
|
+
cancel the body padding so the image reaches the card's left, right and top edges, cropped by the
|
|
154
|
+
card's `overflow-hidden`. The aspect ratio is the Promo-visuals crop zone of the Size
|
|
155
|
+
(`chrome.marketing-banner`, 6.1.0) — see [Sizes](#sizes) — with no max-height cap; a child `img`
|
|
156
|
+
is `object-cover`.
|
|
157
|
+
- **Visual** (`visual`) — Compact/Marketing, instead of a banner: an inset, centred slot for an
|
|
158
|
+
enlarged icon or an illustration. The **Icon** level (spec § Visual slot, the default Compact
|
|
159
|
+
confirmation) is a bare status-tinted glyph at `--size-icon-display` (64) with no disc behind it:
|
|
160
|
+
`info` by default; the ink follows the intent — `--status-info-solid` (Figma `secondary/solid`, the
|
|
161
|
+
Primary CTA blue) on a confirmation, `--status-danger-solid` (the Danger CTA red) on a destructive one.
|
|
162
|
+
- **Container** (`container`) — the insertable content column (`children`). No max-width on any
|
|
163
|
+
Type (5.0.0): it fills the track.
|
|
164
|
+
- **Actions** (`actions`) — the consumer's Buttons. A centred body row with gap `--space-400` on
|
|
165
|
+
Compact/Marketing; the footer's Actions slot on Center, Corner and Wizard. On Mobile it is one
|
|
166
|
+
column of full-width Buttons with the primary first — see [Mobile](#mobile).
|
|
167
|
+
- **Decline link** (`decline-link`) — Marketing (beneath the CTA row) and Wizard (the start of the
|
|
168
|
+
footer row; on the mobile Wizard the first, start-aligned item of the Actions column). On Mobile
|
|
169
|
+
its hit area is padded to 44 high. The consumer passes a `TextLink` once — it never renders in
|
|
170
|
+
both places.
|
|
171
|
+
- **Footer** (`footer`) — Center, Corner and Wizard, rendered only when there are actions (or, on
|
|
172
|
+
Wizard, a decline link). Top rule `border-t-100 border-t-outline-default`, padding per the
|
|
173
|
+
density ladder with the divider's width given back on top. Its content column fills the track;
|
|
174
|
+
actions are centred on Center, end-aligned on Corner, start/end on Wizard. Pinned below the body
|
|
175
|
+
by default (6.2.0); `pinnedFooter={false}` makes it the last block of the scroll region.
|
|
176
|
+
|
|
177
|
+
## Variants
|
|
178
|
+
|
|
179
|
+
Three Figma axes: **Type** (`axes.variant`, the prop is `type`), **Size** (`axes.size`) and
|
|
180
|
+
**Has close** (`axes.has-close`). The Matrix below is Type × Size sm–lg — 15 combinations (xl,
|
|
181
|
+
1238, is wider than this column and would render as lg, only wider; see it in Playground; Mobile is
|
|
182
|
+
viewport-driven — see [Mobile](#mobile)), each at its own default Has close.
|
|
183
|
+
|
|
184
|
+
<Canvas of={ModalStories.Matrix} />
|
|
185
|
+
|
|
186
|
+
Each cell is the live component at its real width in a full-width preview box. On this page every
|
|
187
|
+
Modal renders through `previewContainer` — portalled into its box and **non-modal** (no scroll
|
|
188
|
+
lock, focus trap or outside `aria-hidden`), so fifteen instances can share one document. Open a
|
|
189
|
+
story on its own page for the real modal behaviour.
|
|
190
|
+
|
|
191
|
+
<table>
|
|
192
|
+
<thead>
|
|
193
|
+
<tr><th>Type</th><th>Regions</th><th>When</th><th>Body padding · outer gap · inner gap</th></tr>
|
|
194
|
+
</thead>
|
|
195
|
+
<tbody>
|
|
196
|
+
<tr>
|
|
197
|
+
<td><code>compact</code> (default)</td>
|
|
198
|
+
<td>Body only; floating close</td>
|
|
199
|
+
<td>A short Confirmation or Info notice — the commonest real case (<code>properties[Type].maps</code>).</td>
|
|
200
|
+
<td><code>--space-800</code> · <code>--space-700</code> · <code>--space-500</code>; everything centred, title Heading/H4</td>
|
|
201
|
+
</tr>
|
|
202
|
+
<tr>
|
|
203
|
+
<td><code>marketing</code></td>
|
|
204
|
+
<td>Body only; floating close</td>
|
|
205
|
+
<td>Only inside a sales funnel (upsell, paywall, thank-you) or for a major feature launch (spec § Variants).</td>
|
|
206
|
+
<td><code>--space-900</code> · <code>--space-800</code> · <code>--space-600</code>; title and copy form one text block, title Heading/H2</td>
|
|
207
|
+
</tr>
|
|
208
|
+
<tr>
|
|
209
|
+
<td><code>center</code></td>
|
|
210
|
+
<td>Header · body · footer</td>
|
|
211
|
+
<td>Short forms, notices, confirmations that need a header.</td>
|
|
212
|
+
<td>Density ladder · flat <code>--space-700</code>; title centred, footer actions centred</td>
|
|
213
|
+
</tr>
|
|
214
|
+
<tr>
|
|
215
|
+
<td><code>corner</code></td>
|
|
216
|
+
<td>Header · body · footer</td>
|
|
217
|
+
<td>Content that reads from the left edge — data tables, list-pickers, dense forms (<code>intent.rules[5]</code>).</td>
|
|
218
|
+
<td>Density ladder · flat <code>--space-700</code>; title at the start, footer actions at the end</td>
|
|
219
|
+
</tr>
|
|
220
|
+
<tr>
|
|
221
|
+
<td><code>wizard</code></td>
|
|
222
|
+
<td>Header · stepper · body · footer</td>
|
|
223
|
+
<td>A short multi-step flow.</td>
|
|
224
|
+
<td>Density ladder · flat <code>--space-700</code>; title at the start at every Size; footer start/end — decline link at the start, actions pushed to the end</td>
|
|
225
|
+
</tr>
|
|
226
|
+
</tbody>
|
|
227
|
+
</table>
|
|
228
|
+
|
|
229
|
+
Title and footer actions **align as a pair** at every Size (`intent.rules[0]`). Center's title is
|
|
230
|
+
centred, so with the close control the header reserves `--space-1300` on **both** sides
|
|
231
|
+
(`pl-1300 pr-1300`) and the title stays on the card's axis; Corner and Wizard reserve it on the
|
|
232
|
+
right only.
|
|
233
|
+
|
|
234
|
+
### Density ladder
|
|
235
|
+
|
|
236
|
+
On Center, Corner and Wizard the region padding steps up with Size (5.2.0, `regions[0].note`):
|
|
237
|
+
|
|
238
|
+
<table>
|
|
239
|
+
<thead>
|
|
240
|
+
<tr><th>Size</th><th>paddingX (all regions)</th><th>Header top/bottom</th><th>Band top</th><th>Body</th><th>Footer top/bottom</th></tr>
|
|
241
|
+
</thead>
|
|
242
|
+
<tbody>
|
|
243
|
+
<tr><td><code>sm</code> · <code>md</code></td><td><code>--space-800</code></td><td><code>--space-600</code></td><td><code>--space-600</code></td><td><code>--space-800</code></td><td><code>--space-800</code></td></tr>
|
|
244
|
+
<tr><td><code>lg</code></td><td><code>--space-900</code></td><td><code>--space-700</code></td><td><code>--space-800</code></td><td><code>--space-900</code></td><td><code>--space-800</code></td></tr>
|
|
245
|
+
<tr><td><code>xl</code></td><td><code>--space-1000</code></td><td><code>--space-800</code></td><td><code>--space-900</code></td><td><code>--space-1000</code></td><td><code>--space-900</code></td></tr>
|
|
246
|
+
<tr><td>Mobile</td><td><code>--space-700</code></td><td><code>--space-700</code></td><td><code>--space-600</code></td><td><code>--space-700</code></td><td><code>--space-700</code></td></tr>
|
|
247
|
+
</tbody>
|
|
248
|
+
</table>
|
|
249
|
+
|
|
250
|
+
The bottom header padding and the top footer padding each give `--border-width-100` back, so the
|
|
251
|
+
divider sits inside the band. Compact and Marketing keep their own flat body padding
|
|
252
|
+
(`--space-800` / `--space-900`; `--space-700` on Mobile).
|
|
253
|
+
|
|
254
|
+
### Has close
|
|
255
|
+
|
|
256
|
+
<Canvas of={ModalStories.HasClose} />
|
|
257
|
+
|
|
258
|
+
`Has close` is a real variant axis — the cells differ structurally. With the close control, the
|
|
259
|
+
header's right padding reserves its out-of-flow footprint at `--space-1300` on every desktop Size
|
|
260
|
+
(`pr-1300`, 80 = 24 edge + 40 button + 16 air) and `--space-1200` on Mobile (64 = 20 inset + 40
|
|
261
|
+
close + 4); without it, the ladder's paddingX. The header height does not move either way. The prop
|
|
262
|
+
defaults to `true`, except on Wizard, which defaults to `false` to force a terminal choice.
|
|
263
|
+
|
|
264
|
+
### Wizard
|
|
265
|
+
|
|
266
|
+
<Canvas of={ModalStories.Wizard} />
|
|
267
|
+
|
|
268
|
+
<Canvas of={ModalStories.WizardStepTwo} />
|
|
269
|
+
|
|
270
|
+
Step 1 passes no `onBack` and no decline link, so the stepper shows the indicator alone, centred.
|
|
271
|
+
From step 2 the back Button sits at the band's start, its glyph on the content edge, and the decline
|
|
272
|
+
link at the footer start.
|
|
273
|
+
The footer's secondary action is an **exit** (Zrušit), never a step back — step-back lives in the
|
|
274
|
+
stepper band (`regions[3].role`), and the wizard has two ways back. The back Button goes one step
|
|
275
|
+
back. Every Done marker returns the flow straight to that completed step, so the user can jump back
|
|
276
|
+
further than one step. The Modal takes the step indicator by reference and does not wire that
|
|
277
|
+
return itself: the composer passes `onStepClick` on the `ProgressBar` it puts into `stepIndicator`
|
|
278
|
+
(the stories pass `onStepClick={setStep}`), and `ProgressBar` renders a Done marker as a `<button>`
|
|
279
|
+
only when `onStepClick` is set. Current and Upcoming stay inert — nobody skips ahead.
|
|
280
|
+
|
|
281
|
+
### Mobile Wizard
|
|
282
|
+
|
|
283
|
+
<Canvas of={ModalStories.WizardMobile} story={{ inline: false, height: '700px' }} />
|
|
284
|
+
|
|
285
|
+
Below `md` the Wizard renders its [Size=Mobile](#mobile) cell, plus five Wizard-only differences
|
|
286
|
+
(`chrome.mobile`):
|
|
287
|
+
|
|
288
|
+
1. **Step indicator** — the band holds only the bare markers (`ProgressBar size="sm" layout="row"
|
|
289
|
+
showTitle={false} showDetail={false}` plus `stepLabels`), stretched across the band; no
|
|
290
|
+
«Krok 2 z 4» text. The slot is consumer content, so the bare markers come from what the
|
|
291
|
+
consumer passes — the stories pass them at every width; the Modal only stretches the slot.
|
|
292
|
+
2. **Step-back** — the arrow-left Icon Button at the start of the header (`back-icon-button`),
|
|
293
|
+
hidden on step 1; the band's «Zpět» Button is not rendered. The Done markers stay buttons
|
|
294
|
+
(the same `onStepClick` on the slotted `ProgressBar`).
|
|
295
|
+
3. **Exit** — the header close. It is always rendered here — an explicit `hasClose={false}` is
|
|
296
|
+
ignored — and the footer carries no exit Button.
|
|
297
|
+
4. **Footer** — one column inside `Actions`, gap `--space-600`: the start-aligned decline link (when
|
|
298
|
+
passed — `Has decline link` decides on every breakpoint), then `mobileAction`, the single primary
|
|
299
|
+
Button at `size="lg"`, stretched to the footer's width.
|
|
300
|
+
5. **Unpinning** — header, band and footer stay pinned while together they take at most half of
|
|
301
|
+
the dialog's height; past that they unpin together and the card itself scrolls, in document
|
|
302
|
+
order, the footer last. With `pinnedFooter={false}` the footer already scrolls and only header
|
|
303
|
+
and band count. Desktop never unpins (`chrome.desktop.pinned`).
|
|
304
|
+
|
|
305
|
+
<Canvas of={ModalStories.WizardMobileUnpinned} story={{ inline: false, height: '480px' }} />
|
|
306
|
+
|
|
307
|
+
### Marketing
|
|
308
|
+
|
|
309
|
+
<Canvas of={ModalStories.Marketing} />
|
|
310
|
+
|
|
311
|
+
The full-bleed banner, the Heading/H2 title, the Brand CTA with a Secondary Button beside it, and
|
|
312
|
+
the decline link beneath the row. The floating close keeps its opaque surface over the image
|
|
313
|
+
(`intent.rules[3]`).
|
|
314
|
+
|
|
315
|
+
Compact takes the same full-bleed `banner` in place of its `visual`, here at `size="sm"`:
|
|
316
|
+
|
|
317
|
+
<Canvas of={ModalStories.CompactWithBanner} />
|
|
318
|
+
|
|
319
|
+
## Sizes
|
|
320
|
+
|
|
321
|
+
Four desktop widths (`sizes[]`), applied as the container's `max-w`, plus the platform-driven
|
|
322
|
+
Mobile cell. The widths are raw values with no token behind them, so each is an off-grid class under
|
|
323
|
+
a `fods-lint` suppression. There is no separate Sizes story — the Matrix columns above cover sm–lg,
|
|
324
|
+
xl is reachable in Playground and Mobile in the mobile stories.
|
|
325
|
+
|
|
326
|
+
<table>
|
|
327
|
+
<thead>
|
|
328
|
+
<tr><th>Size</th><th style={{ textAlign: 'right' }}>Width</th><th style={{ textAlign: 'right' }}>Track</th><th style={{ textAlign: 'right' }}>Step indicator</th><th>Banner ratio</th><th>Recommended for</th></tr>
|
|
329
|
+
</thead>
|
|
330
|
+
<tbody>
|
|
331
|
+
<tr><td>Mobile (viewport-driven)</td><td style={{ textAlign: 'right' }}>viewport − 2 × 8</td><td style={{ textAlign: 'right' }}>card − 40</td><td style={{ textAlign: 'right' }}>band</td><td>358 : 246</td><td>every Type below md</td></tr>
|
|
332
|
+
<tr><td><code>sm</code> (default)</td><td style={{ textAlign: 'right' }}>480</td><td style={{ textAlign: 'right' }}>432</td><td style={{ textAlign: 'right' }}>272</td><td>455 : 380</td><td>Compact</td></tr>
|
|
333
|
+
<tr><td><code>md</code></td><td style={{ textAlign: 'right' }}>640</td><td style={{ textAlign: 'right' }}>592</td><td style={{ textAlign: 'right' }}>432</td><td>631 : 380</td><td>Marketing</td></tr>
|
|
334
|
+
<tr><td><code>lg</code></td><td style={{ textAlign: 'right' }}>834</td><td style={{ textAlign: 'right' }}>770</td><td style={{ textAlign: 'right' }}>600</td><td>750 : 380</td><td>Center, Corner</td></tr>
|
|
335
|
+
<tr><td><code>xl</code></td><td style={{ textAlign: 'right' }}>1238</td><td style={{ textAlign: 'right' }}>1158</td><td style={{ textAlign: 'right' }}>786</td><td>904 : 380</td><td>Wizard, wide content (Corner with a wide table)</td></tr>
|
|
336
|
+
</tbody>
|
|
337
|
+
</table>
|
|
338
|
+
|
|
339
|
+
The track column is for Center, Corner and Wizard (card minus 2 × paddingX); Compact and Marketing
|
|
340
|
+
subtract their own flat body padding. The Type → Size pairing is **guidance, not a lock**
|
|
341
|
+
(`notes[3]`): deviating is a deliberate call, stated where it happens. sm is the default because it
|
|
342
|
+
is the widest-used rung, not because it suits every screen (`properties[Size].maps`).
|
|
343
|
+
|
|
344
|
+
Content fills the track on every Type — no node carries a max-width (`intent.rules[2]`). Running
|
|
345
|
+
prose inside a track still caps at `--ds-content-narrow`, which is the content's job, not the
|
|
346
|
+
Modal's. Content wider than the track scrolls inside; the card never grows. The step indicator
|
|
347
|
+
width is min(Size width, track − 160), safe for 2–6 steps (`regions[2].note`).
|
|
348
|
+
|
|
349
|
+
## States
|
|
350
|
+
|
|
351
|
+
**The shell has no interaction states of its own.** The manifest carries no `axes.state` and no
|
|
352
|
+
`focus` block; the only focusable elements the Modal owns are the hosted close `IconButton`, the
|
|
353
|
+
back `Button` and, on the mobile Wizard, the back `IconButton` (`back-icon-button`), whose states
|
|
354
|
+
are graded in their own manifests. The Done markers belong to the slotted `ProgressBar`. There is consequently no `States`
|
|
355
|
+
story. What it has is a **lifecycle** (`intent.states`):
|
|
356
|
+
|
|
357
|
+
- **Default (open)** — the card sits over the `--bg-overlay` scrim, focus-trapped and centred. The
|
|
358
|
+
card enters on `--spring-gentle`, the scrim fades in on `--duration-slow` ([Motion](#motion)).
|
|
359
|
+
- **Scrolling body** — past the viewport-bound max-height only the body scrolls; the header, the
|
|
360
|
+
band and the footer stay put (6.2.0), and the cut edge directly above the footer divider carries
|
|
361
|
+
the Edge mask until the body is scrolled to its end, where the mask disappears. Once the body
|
|
362
|
+
leaves its start, the cut edge directly under the header divider carries the top Edge mask too
|
|
363
|
+
(6.3.0); scrolled back to the start, it disappears.
|
|
364
|
+
|
|
365
|
+
<Canvas of={ModalStories.ScrollingBody} story={{ inline: false, height: '720px' }} />
|
|
366
|
+
|
|
367
|
+
With `pinnedFooter={false}` the footer scrolls with the body and is reached at the end of the
|
|
368
|
+
content; the Edge mask then sits at the card's bottom edge and is gone at the end of the scroll,
|
|
369
|
+
so it never lies over the actions.
|
|
370
|
+
|
|
371
|
+
<Canvas of={ModalStories.ScrollingFooter} story={{ inline: false, height: '720px' }} />
|
|
372
|
+
|
|
373
|
+
- **Dismiss** — the close control always closes. Esc and a scrim click close only when
|
|
374
|
+
`dismissOnBackdrop` is on; it defaults off on Wizard and on `role="alertdialog"`, where
|
|
375
|
+
`onEscapeKeyDown` and `onInteractOutside` are prevented.
|
|
376
|
+
|
|
377
|
+
<Canvas of={ModalStories.DestructiveConfirmation} />
|
|
378
|
+
|
|
379
|
+
- **Loading** — not a Modal state. The manifest assigns it to the primary action's own `Button`
|
|
380
|
+
loading state; the dialog simply stays open.
|
|
381
|
+
|
|
382
|
+
### Mobile
|
|
383
|
+
|
|
384
|
+
<Canvas of={ModalStories.Mobile} story={{ inline: false, height: '720px' }} />
|
|
385
|
+
|
|
386
|
+
<Canvas of={ModalStories.CenterMobile} story={{ inline: false, height: '720px' }} />
|
|
387
|
+
|
|
388
|
+
<Canvas of={ModalStories.CornerMobile} story={{ inline: false, height: '720px' }} />
|
|
389
|
+
|
|
390
|
+
<Canvas of={ModalStories.MarketingMobile} story={{ inline: false, height: '720px' }} />
|
|
391
|
+
|
|
392
|
+
Size=Mobile (6.0.0, `chrome.mobile`) applies to **every Type** below `md`, whatever `size` the
|
|
393
|
+
consumer passed; there is no fullscreen swap (`notes[7]`). The role, ARIA, focus trap and focus
|
|
394
|
+
return stay the same, and crossing `md` while open re-lays out in place — but it is not presentation
|
|
395
|
+
only: the actions swap their DOM order (below), and the mobile Wizard swaps its controls (the header
|
|
396
|
+
back icon replaces the band's «Zpět», the close is forced, `mobileAction` replaces the footer pair —
|
|
397
|
+
[Mobile Wizard](#mobile-wizard)), and a `role="alertdialog"` opens with the dialog itself focused
|
|
398
|
+
instead of its first control ([Accessibility](#accessibility)). The manifest words it as
|
|
399
|
+
presentation only; see [Known discrepancies](#known-discrepancies).
|
|
400
|
+
|
|
401
|
+
- **Surface** — the card is the viewport minus `--space-400` on each side, with `--space-700` above
|
|
402
|
+
and below (the frame's `px-400 py-700`); no max-width.
|
|
403
|
+
- **Padding** — `--space-700` on every region and side; the header reserves `--space-1200` for the
|
|
404
|
+
close, the close sits 20 from the card's corner and pads its hit area to 44.
|
|
405
|
+
- **Actions** — one column of full-width Buttons, the primary **first**. Consumers pass the actions
|
|
406
|
+
secondary first, primary last (the desktop row order); the Modal reverses them in the DOM, never
|
|
407
|
+
with CSS `order` or `flex-direction: *-reverse`, so the DOM order is the visual and the tab order.
|
|
408
|
+
The column wants `size="lg"` Buttons — the Modal cannot enforce that; the consumer passes them.
|
|
409
|
+
- **Banner** — the mobile crop ratio 358 : 246.
|
|
410
|
+
|
|
411
|
+
The switch is `useIsMobile('md')` — the **viewport width**, an exact complement of the Tailwind
|
|
412
|
+
`md:` prefix — because it decides which controls exist, not only their geometry. The manifest words
|
|
413
|
+
the rule on the viewport's *short side*; see [Known discrepancies](#known-discrepancies). The two
|
|
414
|
+
runtime conditions (unpin, overflow) are measured on the open card with a `ResizeObserver` — the
|
|
415
|
+
pinned chrome is header + band + footer (header + band with `pinnedFooter={false}`); the chrome
|
|
416
|
+
heights do not depend on pinning, so the verdict cannot oscillate. On this docs page the
|
|
417
|
+
previews render at the docs window's width and therefore show the desktop layout — open the story
|
|
418
|
+
page with the Mobile viewport.
|
|
419
|
+
|
|
420
|
+
### Motion
|
|
421
|
+
|
|
422
|
+
<Canvas of={ModalStories.Motion} />
|
|
423
|
+
|
|
424
|
+
Manifest 6.4.1 `motion` — enter and exit are **Motion props** on the card and the scrim, not CSS
|
|
425
|
+
keyframes. Radix keeps the portal mounted through the exit (`forceMount` under `AnimatePresence`), so
|
|
426
|
+
the focus trap, scroll lock, `aria-*` and focus return are unchanged; the dialog unmounts once the
|
|
427
|
+
exit settles. While the exit plays the card is `inert`, so a second click or Enter cannot fire an
|
|
428
|
+
action twice.
|
|
429
|
+
|
|
430
|
+
<table>
|
|
431
|
+
<thead>
|
|
432
|
+
<tr><th>What</th><th>How</th><th>Reduced motion</th></tr>
|
|
433
|
+
</thead>
|
|
434
|
+
<tbody>
|
|
435
|
+
<tr>
|
|
436
|
+
<td>Card, desktop sizes (sm–xl)</td>
|
|
437
|
+
<td>Fades in and grows from <code>scale(0.98)</code> about its centre on <code>--spring-gentle</code>; exit is the reverse. Content inside never scales on its own.</td>
|
|
438
|
+
<td rowSpan={3}>Fade only — no scale, no rise; card and scrim fade on <code>--duration-instant</code>.</td>
|
|
439
|
+
</tr>
|
|
440
|
+
<tr>
|
|
441
|
+
<td>Card, Size=Mobile</td>
|
|
442
|
+
<td>Rises from just below the viewport's bottom edge — <code>translateY</code> from (viewport height − resting top) to 0, i.e. <code>calc(50dvh + 50%)</code> for the centred card — on <code>--spring-gentle</code>, fully opaque, no scale; exit falls back the same distance.</td>
|
|
443
|
+
</tr>
|
|
444
|
+
<tr>
|
|
445
|
+
<td>Scrim</td>
|
|
446
|
+
<td>Opacity 0 → full <code>--bg-overlay</code> on <code>--duration-slow</code> + <code>--easing-enter</code>; out on <code>--easing-exit</code>.</td>
|
|
447
|
+
</tr>
|
|
448
|
+
<tr>
|
|
449
|
+
<td>Wizard step change (<code>stepKey</code>)</td>
|
|
450
|
+
<td>The outgoing step fades out on <code>--duration-fast</code> + <code>--easing-exit</code> (<code>inert</code> meanwhile), the card's <code>height</code> then follows the new step on <code>--spring-gentle</code> — capped by the card's max-height, the body scrolls past it — and the new step fades in on <code>--duration-slow</code> + <code>--easing-enter</code>. No slide, no scale.</td>
|
|
451
|
+
<td>The height switches at once; both fades on <code>--duration-instant</code>.</td>
|
|
452
|
+
</tr>
|
|
453
|
+
</tbody>
|
|
454
|
+
</table>
|
|
455
|
+
|
|
456
|
+
Esc, a scrim click or the close control while the card is still opening reverses it from where it is
|
|
457
|
+
(`interrupt`); reopening a closing card does the same, and a step change during a resize retargets
|
|
458
|
+
the height from where it is.
|
|
459
|
+
|
|
460
|
+
<Canvas of={ModalStories.WizardMotion} />
|
|
461
|
+
|
|
462
|
+
## API
|
|
463
|
+
|
|
464
|
+
<Controls />
|
|
465
|
+
|
|
466
|
+
- **Always controlled.** The Modal has no trigger of its own: `open` and `onClose` are required.
|
|
467
|
+
`onClose` is called by the close control and — when dismissal is allowed — by Esc and a scrim
|
|
468
|
+
click.
|
|
469
|
+
- **`title`** renders as `Dialog.Title` and is the accessible name. It may be omitted only when
|
|
470
|
+
the body renders its own heading through `ModalTitle` — a header Type then keeps its header region
|
|
471
|
+
(height and bottom divider) with no title, only the close control in its usual place; with
|
|
472
|
+
`hasClose={false}` as well the header is dropped. `description` renders only next to a `title`.
|
|
473
|
+
Without `asChild`, `ModalTitle` renders
|
|
474
|
+
Radix's default `<h2>` and takes the heading's classes; with `asChild` it wraps the body's own heading element and keeps its level
|
|
475
|
+
(`<ModalTitle asChild><h3>…</h3></ModalTitle>`). Without either, Radix logs a missing-title error.
|
|
476
|
+
A header Type without a `title` is code-only: `slots.title` fixes the Heading Group in every
|
|
477
|
+
header, and no record approves the omission yet. The close-footprint padding on a bare Compact/Marketing title and
|
|
478
|
+
the top Edge mask under the header are specified since 6.3.0 (`text.title`,
|
|
479
|
+
`chrome.mobile.body.edge-mask-top`).
|
|
480
|
+
- **`type`** defaults to `compact`, **`size`** to `sm` (the manifest defaults Compact / sm).
|
|
481
|
+
`size` is the desktop Size; below `md` the Modal renders Size=Mobile whatever it says, so
|
|
482
|
+
`ModalSize` has no `mobile` value.
|
|
483
|
+
- **`hasClose`** defaults to `type !== 'wizard'`. On a Wizard below `md` the header close is the
|
|
484
|
+
only exit, so it is always shown there and an explicit `hasClose={false}` is ignored.
|
|
485
|
+
- **`dismissOnBackdrop`** defaults to `true`, except for `type="wizard"` and
|
|
486
|
+
`role="alertdialog"`, where it defaults to `false`.
|
|
487
|
+
- **`pinnedFooter`** (`properties[Pinned footer]`, code-only, 6.2.0) defaults to `true`: the footer
|
|
488
|
+
stays pinned below the body and only the body scrolls. `false` puts the footer back into the
|
|
489
|
+
scroll region, reached at the end of the content. No effect on Compact and Marketing, which have
|
|
490
|
+
no footer.
|
|
491
|
+
- **`role`** is `'dialog'` (default) or `'alertdialog'` for a destructive Confirmation. It is passed
|
|
492
|
+
straight to `Dialog.Content` — not a second AlertDialog tree with a different API.
|
|
493
|
+
- **`closeLabel`** is optional and defaults to «Zavřít»; an empty string falls back to it too. An
|
|
494
|
+
app with more than one language version passes it from its
|
|
495
|
+
translations on every use — the full list of such props is in
|
|
496
|
+
[Consuming → Texts and locale](?path=/docs/getting-started-consuming--docs#texts-and-locale).
|
|
497
|
+
- **`previewContainer`** is for docs previews only: the Modal portals into that element and renders
|
|
498
|
+
non-modally (no scroll lock, focus trap, outside `aria-hidden` or open auto-focus). Never pass it
|
|
499
|
+
in product code.
|
|
500
|
+
- **The Modal draws no CTA of its own.** The consumer passes `Button`s in `actions`, secondary first
|
|
501
|
+
and primary last; on Mobile the Modal reverses them (a fragment is unwrapped, keys are kept, so a
|
|
502
|
+
focused Button survives a resize across `md`). The rule: the primary is `variant="primary"` (blue), Marketing's is
|
|
503
|
+
`variant="brand"`, and a destructive confirm is `variant="danger"`, **replacing** the primary.
|
|
504
|
+
The Figma booleans `Has secondary action` and `Has decline link` have no props — they are simply
|
|
505
|
+
whether a second Button is in `actions` and whether `declineLink` is passed.
|
|
506
|
+
- **Props are a union on `type`**, so a slot that a Type does not render cannot be passed:
|
|
507
|
+
`description` only on Center, Corner and Wizard; `declineLink` only on Marketing and Wizard;
|
|
508
|
+
`stepIndicator`, `onBack`, `backLabel`, `mobileAction` and `stepKey` only on Wizard, where `onBack` and
|
|
509
|
+
`backLabel` come together or not at all; `visual` **or** `banner` (never both) only on Compact and Marketing. The
|
|
510
|
+
Controls table flattens the union, and the stories take flat args that a `ModalDemo` wrapper maps
|
|
511
|
+
onto the right branch.
|
|
512
|
+
- **`stepKey`** (Wizard, optional) is the current step's identity — pass the step index or id.
|
|
513
|
+
When it changes, the body plays `motion.layout` (see [Motion](#motion)). Without it the body
|
|
514
|
+
swaps in place, unanimated, exactly as before.
|
|
515
|
+
- **`mobileAction`** (Wizard) is the footer below `md`: the single advance / finish
|
|
516
|
+
`Button size="lg"`, stretched by the Modal. Pass it next to `actions`; without it the mobile
|
|
517
|
+
column falls back to `actions`, exit Button included, which the spec does not want.
|
|
518
|
+
- **`className`** is merged onto the card (`Dialog.Content`), not the scrim. The ref forwards to
|
|
519
|
+
the card as well.
|
|
520
|
+
|
|
521
|
+
## Do / Don't
|
|
522
|
+
|
|
523
|
+
- ✅ Pick the content pattern first, then the `type` that rides it.
|
|
524
|
+
- ✅ Make the primary CTA `variant="primary"` (blue) on every Type except Marketing, whose CTA is
|
|
525
|
+
`variant="brand"`.
|
|
526
|
+
- ✅ Use `role="alertdialog"` with a `danger` Button for an irreversible confirm — the danger
|
|
527
|
+
Button replaces the primary.
|
|
528
|
+
- ✅ Keep dismissal off (the defaults) for destructive confirms and wizards, so a stray scrim click
|
|
529
|
+
never discards a half-finished flow.
|
|
530
|
+
- ✅ Omit `onBack` on the first wizard step; keep the exit action (Zrušit) on every step.
|
|
531
|
+
- ✅ Ask the decision in the title (`Smazat fakturu?`) and name the consequence in the body; label
|
|
532
|
+
the primary with a verb (`Smazat`, `Odeslat`), not `OK` (spec § Copy).
|
|
533
|
+
- ✅ Keep the title within 2 lines and `text.title.maxChars` (60); a long or variable name goes to
|
|
534
|
+
the scope line or the body — the title wraps, it is never clamped (spec § Copy M3).
|
|
535
|
+
- ✅ Supply `closeLabel` from the consumer's i18n layer; the «Zavřít» default is Czech.
|
|
536
|
+
- ✅ Pick Corner when the content reads from the left edge (tables, pickers, dense forms), Center
|
|
537
|
+
for short forms and notices that need a header.
|
|
538
|
+
- ✅ Pass `size="lg"` Buttons when the Modal can render on a phone — the Mobile column expects them.
|
|
539
|
+
- ❌ Use warning-orange as a CTA, or Brand orange on any Type but Marketing.
|
|
540
|
+
- ❌ Show a blue primary **and** a danger Button in the same row.
|
|
541
|
+
- ❌ Mix the alignment pair — a centred title with end-aligned actions, or the reverse.
|
|
542
|
+
- ❌ Reorder the mobile column with CSS (`flex-col-reverse`, `order`) — the Modal already puts the
|
|
543
|
+
primary first in the DOM.
|
|
544
|
+
- ❌ Use a Modal for a bare single-value pick — that is a popover (a bottom sheet below sm).
|
|
545
|
+
- ❌ Gate an easily undoable one-click action behind a confirmation.
|
|
546
|
+
- ❌ Leave the Czech default of the close label on another market.
|
|
547
|
+
|
|
548
|
+
## Accessibility
|
|
549
|
+
|
|
550
|
+
- **Roles and name** — `Dialog.Content` carries `role="dialog"` or, for a destructive
|
|
551
|
+
Confirmation, the consumer's `role="alertdialog"`. The component sets `aria-modal="true"` itself:
|
|
552
|
+
Radix sets none of its own and manifest `notes[8]` requires it. `Dialog.Title` is rendered from
|
|
553
|
+
`title` — or, without one, from the consumer's `ModalTitle`. The types do not enforce either
|
|
554
|
+
(`title` is optional), so a Modal is named only when the consumer passes one of the two.
|
|
555
|
+
- **Description** — on header Types with a `description`, `aria-describedby` points at the scope
|
|
556
|
+
line; otherwise (always on Compact and Marketing) the body's content column is the
|
|
557
|
+
`Dialog.Description`. A header Type without a `title` describes nothing: its body carries the
|
|
558
|
+
name and is usually a whole form, which must not be read out as the description. With nothing
|
|
559
|
+
to point at, the component passes `aria-describedby={undefined}` explicitly — Radix's documented
|
|
560
|
+
opt-out.
|
|
561
|
+
- **Keyboard** — Tab cycles inside Radix's focus trap. Esc closes only when dismissible (see
|
|
562
|
+
[States](#states)); a non-dismissible modal has to be answered with one of its controls. On
|
|
563
|
+
Compact and Marketing the floating close is last in DOM order, so Tab runs through the content and
|
|
564
|
+
the CTAs first. While the body overflows and holds no focusable child, its scroll region is a
|
|
565
|
+
tab stop of its own (inset `--outline-focus` ring), so the arrow keys and Page Up / Page Down
|
|
566
|
+
scroll it (`scrollbar.md` § Accessibility). A body with a field or a button is not: Tab
|
|
567
|
+
scrolls it as focus moves, with no extra stop.
|
|
568
|
+
- **Initial focus** — Radix moves focus to the first tabbable element on open: the header close on
|
|
569
|
+
Center/Corner/Wizard (the back icon on the mobile Wizard), a field when the body leads with one,
|
|
570
|
+
otherwise the first action. On Compact and Marketing below `md` that action is the primary leading
|
|
571
|
+
the column, so a `role="alertdialog"` focuses the dialog itself below `md`, on every Type
|
|
572
|
+
(`modal.md` § States: "the first interactive element (or the dialog)") — Enter must not confirm
|
|
573
|
+
a destructive action the moment it opens; Tab then enters the content. A plain `role="dialog"`
|
|
574
|
+
keeps the primary focused, so Enter submits it. On desktop the secondary action leads the row and
|
|
575
|
+
keeps the focus. When the scroll region is a tab stop it never takes the initial focus, even on
|
|
576
|
+
Compact and Marketing, where it comes first in tab order: it is not an interactive element, so
|
|
577
|
+
focus goes to the first tabbable element after it (the floating close), or to the dialog when
|
|
578
|
+
there is none. Hidden elements (`hidden`, `display: none`, `visibility: hidden`) are skipped.
|
|
579
|
+
- **Focus return** — the element focused at open is captured in a layout effect, before Radix's
|
|
580
|
+
focus scope moves focus in, and focus returns to it on close. Radix alone would return focus to a
|
|
581
|
+
`Dialog.Trigger`, which a controlled Modal never has, so focus would otherwise fall to the
|
|
582
|
+
document body.
|
|
583
|
+
- **Close control** — no visible text, so its `aria-label` (`closeLabel`, default
|
|
584
|
+
«Zavřít») is the whole announcement. Icon Button Size M, a 40 × 40 box (`slots.close-button`
|
|
585
|
+
— M chosen over L on purpose; the AA target-size minimum passes with margin). `showSurface` keeps
|
|
586
|
+
the glyph legible over a banner.
|
|
587
|
+
- **Back control** — a text Button (`backLabel`, e.g. `Zpět`), not an icon-only caret; the union
|
|
588
|
+
makes a back handler without a label unrepresentable. On the mobile Wizard the same `backLabel`
|
|
589
|
+
is the arrow Icon Button's `aria-label`, so it is translated by construction.
|
|
590
|
+
- **Mobile** — every Type's close pads its hit area to 44 and the decline link pads its own to 44
|
|
591
|
+
high; the actions column is in DOM order with the primary first, so the visual, tab and reading
|
|
592
|
+
orders agree.
|
|
593
|
+
- **Mobile Wizard** — Tab order is back → close → Done markers → step content → decline link →
|
|
594
|
+
primary, which is DOM order (header, stepper band, body, footer); the Done markers are tab stops
|
|
595
|
+
only when the slotted `ProgressBar` has `onStepClick`. The back and close keep the 40 visual box and pad the hit area to 44; the footer link
|
|
596
|
+
pads its hit area to 44 high. Unpinned, no chrome is sticky, so a focused field is never covered.
|
|
597
|
+
- **Edge masks** (bottom and top) — `aria-hidden` and `pointer-events-none` on every Type.
|
|
598
|
+
- **Contrast** — title and body ink `--text-primary`, the scope line `--text-secondary`, all on
|
|
599
|
+
`--bg-primary`. Button and Icon Button states are graded in their own manifests.
|
|
600
|
+
- **Motion** — the scrim only fades. Under `prefers-reduced-motion` (Motion's `useReducedMotion`)
|
|
601
|
+
the card drops its scale and rise and, with the scrim, fades on `--duration-instant`
|
|
602
|
+
([Motion](#motion)).
|
|
603
|
+
- **In Storybook** — the meta sets `a11y: { context: 'body' }` because Radix portals the scrim and
|
|
604
|
+
the card outside the story root. Matrix and Has close disable the addon (fifteen open dialogs
|
|
605
|
+
in one document), so axe coverage lives on the single-instance stories.
|
|
606
|
+
|
|
607
|
+
Accessibility floor for every FODS component: `spec/01-foundations/accessibility.md`.
|
|
608
|
+
|
|
609
|
+
## Copy
|
|
610
|
+
|
|
611
|
+
Voice: the product tone of voice. It is impersonal, written for use inside the app, and Czech
|
|
612
|
+
first. The dialog says *what* happens and *why*; the buttons name the *action*. The tone stays
|
|
613
|
+
calm, direct and neutral, including on danger dialogs: no jokes, no exclamation marks, and no
|
|
614
|
+
playing down what is really at stake.
|
|
615
|
+
|
|
616
|
+
- **Title** (`title`): names the decision or the situation in one line. A dialog that asks for a
|
|
617
|
+
commitment (Confirmation, destructive Confirmation, Card choice) asks a verb + object question
|
|
618
|
+
(`Smazat fakturu?`). Info, Form, Settings, Marketing and Wizard use a noun phrase or a
|
|
619
|
+
statement. Never a vague label (`Upozornění`, `Chyba`, `Varování!`), and never "Are you sure"
|
|
620
|
+
(`Opravdu chcete…?`). Sentence case: a question ends with `?`, a statement has no period. At
|
|
621
|
+
most 60 characters and 2 lines. The title wraps and is never truncated or clamped. A long or
|
|
622
|
+
variable name goes in the scope line (`description`) or the body instead. The scope line names
|
|
623
|
+
the object the dialog acts on (`Beta s.r.o.`, `3 faktury`) as a fragment, not a sentence, and
|
|
624
|
+
is left out when the title already names the object. An unbroken string (a file name) breaks
|
|
625
|
+
inside the word.
|
|
626
|
+
- **Body** (`children`): one or two sentences, consequence first. Say what happens and, where it
|
|
627
|
+
matters, what does not (`Faktura bude trvale odstraněna. Platby zůstanou v přehledu.`). Say so
|
|
628
|
+
when the action cannot be undone. Keep it impersonal, with the thing as the subject
|
|
629
|
+
(`Faktura bude odeslána…`), and never repeat the title or explain the buttons. At most 400
|
|
630
|
+
characters. The body wraps, is never clipped, and its region scrolls if it overflows. A
|
|
631
|
+
Confirmation body never scrolls. Marketing body copy states the user's benefit, and price,
|
|
632
|
+
trial and commitment facts appear before the click.
|
|
633
|
+
|
|
634
|
+
Canonical action labels (`actions`, `declineLink`):
|
|
635
|
+
|
|
636
|
+
<table>
|
|
637
|
+
<thead>
|
|
638
|
+
<tr><th>Role</th><th>Text</th><th>When</th></tr>
|
|
639
|
+
</thead>
|
|
640
|
+
<tbody>
|
|
641
|
+
<tr><td>Primary</td><td><code>Smazat fakturu</code></td><td>The title's verb plus the object where the verb alone is ambiguous (<code>Smazat fakturu?</code>). After a noun-phrase title, the verb of the act (<code>Nová faktura</code> → <code>Vytvořit fakturu</code>). Infinitive, 1–3 words.</td></tr>
|
|
642
|
+
<tr><td>Destructive</td><td><code>Smazat fakturu</code>, <code>Zrušit e-fakturaci</code></td><td>Names the act and the object. It replaces the primary and is never added beside it.</td></tr>
|
|
643
|
+
<tr><td>Secondary</td><td><code>Zrušit</code></td><td>Dismisses a pending action or form.</td></tr>
|
|
644
|
+
<tr><td>Secondary</td><td><code>Zavřít</code></td><td>Info dialogs only.</td></tr>
|
|
645
|
+
<tr><td>Secondary</td><td><code>Ponechat</code> + the object</td><td>When the primary verb is itself a cancel verb (zrušit, storno), so the dialog never shows two <code>Zrušit</code> buttons.</td></tr>
|
|
646
|
+
<tr><td>Acknowledgement</td><td><code>Rozumím</code>, <code>Zavřít</code></td><td>Only on a pure Info dialog.</td></tr>
|
|
647
|
+
<tr><td>Wizard advance</td><td><code>Další</code></td><td>Intermediate steps. The last step names the finish (<code>Dokončit</code>, or the act itself, e.g. <code>Odeslat</code>).</td></tr>
|
|
648
|
+
<tr><td>Marketing CTA</td><td><code>Vyzkoušet zdarma</code>, <code>Vybrat tarif</code></td><td>Names what the click does. Never <code>OK</code> or a bare <code>Koupit</code>.</td></tr>
|
|
649
|
+
<tr><td>Decline link</td><td><code>Ne, děkuji</code>, <code>Teď ne</code>, <code>Nastavit později</code></td><td>Neutral and states the outcome. No guilt and no value judgement.</td></tr>
|
|
650
|
+
<tr><td>Never</td><td><code>Ano</code>, <code>Ne</code>, <code>OK</code>, <code>Pokračovat</code></td><td>For any action with consequences.</td></tr>
|
|
651
|
+
</tbody>
|
|
652
|
+
</table>
|
|
653
|
+
|
|
654
|
+
There are at most two actions in the action row (Wizard and Marketing follow their own slots), and `Zjistit více` is never one of them. Do not
|
|
655
|
+
ask for confirmation of routine or easily undone actions. The full rules and per-pattern checklists
|
|
656
|
+
are in `spec/05-organisms/modal.md` → Copy.
|
|
657
|
+
|
|
658
|
+
## Usage
|
|
659
|
+
|
|
660
|
+
<Canvas of={ModalStories.Playground} />
|
|
661
|
+
|
|
662
|
+
```tsx
|
|
663
|
+
// Good — a destructive Confirmation: Compact, alertdialog, danger replaces the primary
|
|
664
|
+
const [open, setOpen] = useState(false);
|
|
665
|
+
|
|
666
|
+
<Modal
|
|
667
|
+
open={open}
|
|
668
|
+
onClose={() => setOpen(false)}
|
|
669
|
+
role="alertdialog"
|
|
670
|
+
title="Smazat fakturu?"
|
|
671
|
+
visual={<Icon name="info" size="display" className="text-status-danger-solid" />}
|
|
672
|
+
actions={
|
|
673
|
+
<>
|
|
674
|
+
<Button variant="tertiary" onClick={() => setOpen(false)}>Zrušit</Button>
|
|
675
|
+
<Button variant="danger" onClick={deleteInvoice}>Smazat</Button>
|
|
676
|
+
</>
|
|
677
|
+
}
|
|
678
|
+
>
|
|
679
|
+
<p>Faktura bude trvale odstraněna. Tuto akci nelze vrátit zpět.</p>
|
|
680
|
+
</Modal>
|
|
681
|
+
```
|
|
682
|
+
|
|
683
|
+
```tsx
|
|
684
|
+
// Good — a Form: Center lg with a scope line, CTAs in the footer (lg Buttons for Mobile)
|
|
685
|
+
<Modal
|
|
686
|
+
open={open}
|
|
687
|
+
onClose={close}
|
|
688
|
+
type="center"
|
|
689
|
+
size="lg"
|
|
690
|
+
title="Odeslat fakturu e-mailem"
|
|
691
|
+
description="Acme s.r.o."
|
|
692
|
+
actions={
|
|
693
|
+
<>
|
|
694
|
+
<Button variant="tertiary" onClick={close}>Zrušit</Button>
|
|
695
|
+
<Button variant="primary" onClick={send}>Odeslat</Button>
|
|
696
|
+
</>
|
|
697
|
+
}
|
|
698
|
+
>
|
|
699
|
+
<Field label="E-mail příjemce">
|
|
700
|
+
<TextField id="recipient" defaultValue="firma@priklad.cz" />
|
|
701
|
+
</Field>
|
|
702
|
+
</Modal>
|
|
703
|
+
```
|
|
704
|
+
|
|
705
|
+
```tsx
|
|
706
|
+
// Good — a Wizard step 2: back handler and its label travel together
|
|
707
|
+
<Modal
|
|
708
|
+
open={open}
|
|
709
|
+
onClose={close}
|
|
710
|
+
type="wizard"
|
|
711
|
+
size="xl"
|
|
712
|
+
title="Nastavení KSeF"
|
|
713
|
+
stepIndicator={
|
|
714
|
+
<ProgressBar
|
|
715
|
+
steps={steps}
|
|
716
|
+
currentStep={1}
|
|
717
|
+
size="sm"
|
|
718
|
+
showTitle={false}
|
|
719
|
+
showDetail={false}
|
|
720
|
+
stepLabels={stepLabels}
|
|
721
|
+
// Done markers return to their step; the Modal does not wire this itself.
|
|
722
|
+
onStepClick={setStep}
|
|
723
|
+
/>
|
|
724
|
+
}
|
|
725
|
+
onBack={() => setStep(0)}
|
|
726
|
+
backLabel={t('common.back')}
|
|
727
|
+
declineLink={<TextLink variant="quiet" size="md" onClick={close}>Nastavit později</TextLink>}
|
|
728
|
+
actions={
|
|
729
|
+
<>
|
|
730
|
+
<Button variant="tertiary" onClick={close}>Zrušit</Button>
|
|
731
|
+
<Button variant="primary" onClick={next}>Další</Button>
|
|
732
|
+
</>
|
|
733
|
+
}
|
|
734
|
+
// Below md: the single full-width primary; the exit is the header close.
|
|
735
|
+
mobileAction={<Button variant="primary" size="lg" onClick={next}>Další</Button>}
|
|
736
|
+
>
|
|
737
|
+
…
|
|
738
|
+
</Modal>
|
|
739
|
+
```
|
|
740
|
+
|
|
741
|
+
```tsx
|
|
742
|
+
// Don't — a blue primary next to a destructive action; the danger Button replaces the primary
|
|
743
|
+
actions={<><Button variant="primary">Uložit</Button><Button variant="danger">Smazat</Button></>}
|
|
744
|
+
|
|
745
|
+
// Don't — Brand orange outside Marketing
|
|
746
|
+
<Modal type="center" actions={<Button variant="brand">Odeslat</Button>} … />
|
|
747
|
+
|
|
748
|
+
// Don't — reversing the mobile column with CSS; the Modal orders the DOM itself
|
|
749
|
+
<Modal type="corner" className="max-md:[&_[data-fods-part=actions]]:flex-col-reverse" … />
|
|
750
|
+
|
|
751
|
+
// Don't — a banner and a visual together (the union rejects it)
|
|
752
|
+
<Modal type="compact" banner={<img … />} visual={<Icon name="trash" />} … />
|
|
753
|
+
```
|
|
754
|
+
|
|
755
|
+
## Related
|
|
756
|
+
|
|
757
|
+
- **Hosted inside it** — [`IconButton`](?path=/docs/design-system-atoms-iconbutton--docs) (the
|
|
758
|
+
close control and the mobile Wizard's back arrow), [`Button`](?path=/docs/design-system-atoms-button--docs) (the wizard back control
|
|
759
|
+
and every consumer CTA), [`TextLink`](?path=/docs/design-system-atoms-textlink--docs) (the
|
|
760
|
+
decline link), [`ProgressBar`](?path=/docs/design-system-molecules-progressbar--docs) (the step
|
|
761
|
+
indicator). The header draws the Heading Group H4 layout itself (`slots.title` → `heading-group` since
|
|
762
|
+
4.3.2) instead of mounting [`HeadingGroup`](?path=/docs/design-system-molecules-headinggroup--docs) — the
|
|
763
|
+
remaining migration candidate named in that molecule's docs.
|
|
764
|
+
- **Sibling surfaces** — [`Drawer`](?path=/docs/design-system-organisms-drawer--docs) (the same
|
|
765
|
+
Radix foundation and scrim for the mobile menu family).
|
|
766
|
+
- **Radix** — [Dialog primitive](https://www.radix-ui.com/primitives/docs/components/dialog)
|
|
767
|
+
(`Root` / `Portal` / `Overlay` / `Content` / `Title` / `Description` / `Close`).
|
|
768
|
+
- **Spec:** `spec/05-organisms/modal.md`
|
|
769
|
+
(Patterns, Visual slot, Copy) and `modal.manifest.json` (axes, regions, slots, token bindings).
|
|
770
|
+
|
|
771
|
+
## Migration notes
|
|
772
|
+
|
|
773
|
+
**6.1.0 (from 4.3.3).** The prop values `standard` / `table` are renamed `center` / `corner` with no
|
|
774
|
+
alias (`standard` → `center`, `table` → `corner`). Visible changes for consumers: lg / xl are 834 / 1238 with no content cap, Corner
|
|
775
|
+
end-aligns its footer actions (Table centred them), the footer scrolled with the body (pinned again
|
|
776
|
+
since 6.2.0, see below), and below
|
|
777
|
+
`md` every Type renders Size=Mobile — the Compact CTA column switches on the viewport in JS instead
|
|
778
|
+
of `max-sm:flex-col-reverse`.
|
|
779
|
+
|
|
780
|
+
**6.2.0 (from 6.1.1).** The footer is pinned again on every Type and Size: only the body scrolls, the
|
|
781
|
+
Edge mask sits above the footer divider, and below `md` header, band and footer unpin together past
|
|
782
|
+
half the dialog's height. No consumer change is needed; a dialog that wants its actions read only
|
|
783
|
+
after the content passes `pinnedFooter={false}`.
|
|
784
|
+
|
|
785
|
+
**6.3.0 (from 6.2.0).** Specifies what the code already rendered: the top Edge mask, the title's
|
|
786
|
+
in-word wrap clamped at 2 lines with the Compact/Marketing close reservation (`--space-1000`,
|
|
787
|
+
`--space-1100` on Mobile), and Form Blocks at `surface="none"`, `--space-1000` apart, in the body
|
|
788
|
+
(form-block 1.5.0). No consumer change.
|
|
789
|
+
|
|
790
|
+
**6.3.1 (from 6.3.0).** Prose only: `modal.md` now says what the structured fields already did. No consumer change.
|
|
791
|
+
|
|
792
|
+
**6.4.1 (from 6.3.1, ui-system 0.17.0).** The `animate-dialog-in` / `-out` and
|
|
793
|
+
`animate-dialog-overlay-in` / `-out` keyframes are replaced by Motion: the card on `--spring-gentle`
|
|
794
|
+
(desktop: fade + scale from 0.98; Size=Mobile: rise from below the viewport), the scrim on
|
|
795
|
+
`--duration-slow`, interruptible; reduced motion fades both on `--duration-instant`. No API change. The
|
|
796
|
+
dialog now stays in the DOM until its exit settles — a spec that asserts it is gone right after a
|
|
797
|
+
close needs `waitFor`.
|
|
798
|
+
|
|
799
|
+
**6.5.0 (from 6.4.1, 2026-11-09).** Copy rules M1–M22 with per-pattern checklists land in the spec
|
|
800
|
+
(§ Copy). `text.title` goes from «truncate, 2 lines» to «wrap»: the title is never truncated or
|
|
801
|
+
clamped, so `line-clamp-2` is gone and a title longer than 2 lines now takes more lines. No API change;
|
|
802
|
+
a consumer whose title can run long (a user-supplied file name) now shows it
|
|
803
|
+
whole.
|
|
804
|
+
|
|
805
|
+
**`stepKey` (6.4.1 `motion.layout`, 2026-11-10).** New optional Wizard prop: pass the step identity
|
|
806
|
+
and a step change fades the body out, moves the card height on `--spring-gentle`, then fades the new
|
|
807
|
+
step in. Opt-in — a Wizard without it renders as before.
|
|
808
|
+
|
|
809
|
+
### Known discrepancies
|
|
810
|
+
|
|
811
|
+
Recorded here rather than silently reconciled. In each case the code follows the named source.
|
|
812
|
+
|
|
813
|
+
<table>
|
|
814
|
+
<thead>
|
|
815
|
+
<tr><th>Topic</th><th>The two sources</th><th>The code</th></tr>
|
|
816
|
+
</thead>
|
|
817
|
+
<tbody>
|
|
818
|
+
<tr>
|
|
819
|
+
<td>Default size</td>
|
|
820
|
+
<td>Manifest <code>properties[Size].default</code> = S; <code>COMPONENT-CODE-CONVENTIONS.md</code> §1.1 lists <code>lg</code> as Modal's default.</td>
|
|
821
|
+
<td><code>sm</code> — the manifest wins.</td>
|
|
822
|
+
</tr>
|
|
823
|
+
<tr>
|
|
824
|
+
<td>Mobile trigger</td>
|
|
825
|
+
<td><code>chrome.mobile.rule</code>: the viewport's <strong>short side</strong> below 768 — which would also make a 1280 × 600 desktop window Mobile, against the 700 desktop design budget and the Figma showcase.</td>
|
|
826
|
+
<td>The viewport <strong>width</strong> below <code>md</code> (<code>useIsMobile('md')</code>). Asked upstream.</td>
|
|
827
|
+
</tr>
|
|
828
|
+
<tr>
|
|
829
|
+
<td>Center body alignment</td>
|
|
830
|
+
<td><code>intent.rules[0]</code>: Center centres the body content too. The body is a consumer Container SLOT, usually a form.</td>
|
|
831
|
+
<td>Only the title and the footer actions are centred; the Container stays start-aligned so forms are not shrunk. Asked upstream.</td>
|
|
832
|
+
</tr>
|
|
833
|
+
<tr>
|
|
834
|
+
<td>Step return</td>
|
|
835
|
+
<td><code>regions[2].note</code>: the Modal wires the Progress Bar's step return (<code>onStepClick</code>).</td>
|
|
836
|
+
<td>The step indicator is a consumer slot; the consumer wires <code>onStepClick</code> on the ProgressBar it passes. Asked upstream.</td>
|
|
837
|
+
</tr>
|
|
838
|
+
<tr>
|
|
839
|
+
<td>Mobile is presentation only</td>
|
|
840
|
+
<td><code>sizes[Mobile].note</code>: "Presentation only: same DOM".</td>
|
|
841
|
+
<td>The actions swap DOM order and the mobile Wizard swaps controls (<code>chrome.mobile</code> itself requires both); an alertdialog opens with the dialog focused, not its first control. Reported upstream as a spec fix.</td>
|
|
842
|
+
</tr>
|
|
843
|
+
<tr>
|
|
844
|
+
<td>Mobile actions row</td>
|
|
845
|
+
<td><code>chrome.mobile.footer.layout</code>: a row (Tertiary HUG · Primary FILL) is allowed when both labels fit, with a container-query fallback to the column.</td>
|
|
846
|
+
<td>Always the column; there is no prop to opt into the row.</td>
|
|
847
|
+
</tr>
|
|
848
|
+
<tr>
|
|
849
|
+
<td>Intent icon size</td>
|
|
850
|
+
<td><code>chrome.intent-icon</code> (4.3.4): <code>--size-icon-display</code>.</td>
|
|
851
|
+
<td>The <code>visual</code> slot is consumer content and sizes nothing (it also hosts illustrations); the intent icon passed into it carries the box — the stories pass a bare <code>info</code> glyph at <code>size="display"</code> (<code>--size-icon-display</code>, 64), no disc, inked by intent — <code>--status-info-solid</code> on a confirmation, <code>--status-danger-solid</code> on a destructive one — as the spec's Icon level draws it.</td>
|
|
852
|
+
</tr>
|
|
853
|
+
</tbody>
|
|
854
|
+
</table>
|