@invoiceonline/ui-react 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +99 -0
- package/CHANGELOG.md +131 -0
- package/LICENSE +9 -0
- package/README.md +77 -1
- package/dist/assets/label-brush-1.svg +6 -0
- package/dist/assets/pattern-dark.svg +113 -0
- package/dist/components/action-row/ActionRow.d.ts +178 -0
- package/dist/components/action-row/ActionRow.js +340 -0
- package/dist/components/action-row/index.d.ts +2 -0
- package/dist/components/action-row/index.js +1 -0
- package/dist/components/alert/Alert.d.ts +314 -0
- package/dist/components/alert/Alert.js +446 -0
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/alert/index.js +1 -0
- package/dist/components/anchored-panel/AnchoredPanel.d.ts +41 -0
- package/dist/components/anchored-panel/AnchoredPanel.js +72 -0
- package/dist/components/anchored-panel/index.d.ts +3 -0
- package/dist/components/anchored-panel/index.js +3 -0
- package/dist/components/badge/Badge.d.ts +146 -0
- package/dist/components/badge/Badge.js +258 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/badge/index.js +1 -0
- package/dist/components/banner/Banner.d.ts +209 -0
- package/dist/components/banner/Banner.js +339 -0
- package/dist/components/banner/index.d.ts +2 -0
- package/dist/components/banner/index.js +1 -0
- package/dist/components/button/Button.d.ts +54 -0
- package/dist/components/button/Button.js +312 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/index.js +1 -0
- package/dist/components/button-group/ButtonGroup.d.ts +187 -0
- package/dist/components/button-group/ButtonGroup.js +217 -0
- package/dist/components/button-group/index.d.ts +2 -0
- package/dist/components/button-group/index.js +1 -0
- package/dist/components/card-select/CardSelect.d.ts +274 -0
- package/dist/components/card-select/CardSelect.js +561 -0
- package/dist/components/card-select/CardSelectGroup.d.ts +92 -0
- package/dist/components/card-select/CardSelectGroup.js +72 -0
- package/dist/components/card-select/index.d.ts +3 -0
- package/dist/components/card-select/index.js +3 -0
- package/dist/components/checkbox/Checkbox.d.ts +104 -0
- package/dist/components/checkbox/Checkbox.js +194 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox/index.js +1 -0
- package/dist/components/chip/Chip.d.ts +250 -0
- package/dist/components/chip/Chip.js +441 -0
- package/dist/components/chip/index.d.ts +2 -0
- package/dist/components/chip/index.js +1 -0
- package/dist/components/column-header/ColumnHeader.d.ts +144 -0
- package/dist/components/column-header/ColumnHeader.js +209 -0
- package/dist/components/column-header/index.d.ts +2 -0
- package/dist/components/column-header/index.js +1 -0
- package/dist/components/combobox-field/Combobox.d.ts +104 -0
- package/dist/components/combobox-field/Combobox.js +355 -0
- package/dist/components/combobox-field/ComboboxField.d.ts +76 -0
- package/dist/components/combobox-field/ComboboxField.js +98 -0
- package/dist/components/combobox-field/index.d.ts +3 -0
- package/dist/components/combobox-field/index.js +3 -0
- package/dist/components/date-field/DateField.d.ts +52 -0
- package/dist/components/date-field/DateField.js +45 -0
- package/dist/components/date-field/index.d.ts +2 -0
- package/dist/components/date-field/index.js +1 -0
- package/dist/components/date-picker/DatePicker.d.ts +53 -0
- package/dist/components/date-picker/DatePicker.js +329 -0
- package/dist/components/date-picker/index.d.ts +2 -0
- package/dist/components/date-picker/index.js +1 -0
- package/dist/components/divider/Divider.d.ts +81 -0
- package/dist/components/divider/Divider.js +93 -0
- package/dist/components/divider/index.d.ts +2 -0
- package/dist/components/divider/index.js +1 -0
- package/dist/components/drawer/Drawer.d.ts +128 -0
- package/dist/components/drawer/Drawer.js +367 -0
- package/dist/components/drawer/index.d.ts +2 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/dropdown-button/DropdownButton.d.ts +72 -0
- package/dist/components/dropdown-button/DropdownButton.js +122 -0
- package/dist/components/dropdown-button/index.d.ts +2 -0
- package/dist/components/dropdown-button/index.js +1 -0
- package/dist/components/faq/FAQ.d.ts +135 -0
- package/dist/components/faq/FAQ.js +258 -0
- package/dist/components/faq/index.d.ts +2 -0
- package/dist/components/faq/index.js +1 -0
- package/dist/components/field/Field.d.ts +118 -0
- package/dist/components/field/Field.js +327 -0
- package/dist/components/field/index.d.ts +2 -0
- package/dist/components/field/index.js +1 -0
- package/dist/components/field-pair/FieldPair.d.ts +194 -0
- package/dist/components/field-pair/FieldPair.js +321 -0
- package/dist/components/field-pair/index.d.ts +2 -0
- package/dist/components/field-pair/index.js +1 -0
- package/dist/components/file-upload/FileUpload.d.ts +137 -0
- package/dist/components/file-upload/FileUpload.js +434 -0
- package/dist/components/file-upload/index.d.ts +2 -0
- package/dist/components/file-upload/index.js +1 -0
- package/dist/components/filter-chip/FilterChip.d.ts +373 -0
- package/dist/components/filter-chip/FilterChip.js +517 -0
- package/dist/components/filter-chip/index.d.ts +2 -0
- package/dist/components/filter-chip/index.js +1 -0
- package/dist/components/filter-facet/FilterFacet.d.ts +116 -0
- package/dist/components/filter-facet/FilterFacet.js +632 -0
- package/dist/components/filter-facet/index.d.ts +2 -0
- package/dist/components/filter-facet/index.js +1 -0
- package/dist/components/firm-avatar/FirmAvatar.d.ts +75 -0
- package/dist/components/firm-avatar/FirmAvatar.js +119 -0
- package/dist/components/firm-avatar/index.d.ts +2 -0
- package/dist/components/firm-avatar/index.js +1 -0
- package/dist/components/form-actions/FormActions.d.ts +123 -0
- package/dist/components/form-actions/FormActions.js +195 -0
- package/dist/components/form-actions/index.d.ts +2 -0
- package/dist/components/form-actions/index.js +1 -0
- package/dist/components/form-block/FormBlock.d.ts +252 -0
- package/dist/components/form-block/FormBlock.js +420 -0
- package/dist/components/form-block/index.d.ts +3 -0
- package/dist/components/form-block/index.js +3 -0
- package/dist/components/form-section/FormSection.d.ts +130 -0
- package/dist/components/form-section/FormSection.js +206 -0
- package/dist/components/form-section/index.d.ts +2 -0
- package/dist/components/form-section/index.js +1 -0
- package/dist/components/heading/Heading.d.ts +69 -0
- package/dist/components/heading/Heading.js +79 -0
- package/dist/components/heading/index.d.ts +2 -0
- package/dist/components/heading/index.js +1 -0
- package/dist/components/heading-group/HeadingGroup.d.ts +258 -0
- package/dist/components/heading-group/HeadingGroup.js +255 -0
- package/dist/components/heading-group/index.d.ts +2 -0
- package/dist/components/heading-group/index.js +1 -0
- package/dist/components/hero/Hero.d.ts +268 -0
- package/dist/components/hero/Hero.js +316 -0
- package/dist/components/hero/index.d.ts +2 -0
- package/dist/components/hero/index.js +1 -0
- package/dist/components/icon/Icon.d.ts +27 -0
- package/dist/components/icon/Icon.js +30 -0
- package/dist/components/icon/index.d.ts +3 -0
- package/dist/components/icon/index.js +3 -0
- package/dist/components/icon-button/IconButton.d.ts +75 -0
- package/dist/components/icon-button/IconButton.js +151 -0
- package/dist/components/icon-button/index.d.ts +2 -0
- package/dist/components/icon-button/index.js +1 -0
- package/dist/components/item-row/ItemRow.d.ts +253 -0
- package/dist/components/item-row/ItemRow.js +496 -0
- package/dist/components/item-row/index.d.ts +2 -0
- package/dist/components/item-row/index.js +1 -0
- package/dist/components/list-row/ListRow.d.ts +165 -0
- package/dist/components/list-row/ListRow.js +233 -0
- package/dist/components/list-row/index.d.ts +2 -0
- package/dist/components/list-row/index.js +1 -0
- package/dist/components/menu/Menu.d.ts +64 -0
- package/dist/components/menu/Menu.js +186 -0
- package/dist/components/menu/index.d.ts +2 -0
- package/dist/components/menu/index.js +1 -0
- package/dist/components/modal/Modal.d.ts +272 -0
- package/dist/components/modal/Modal.js +788 -0
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/modal/index.js +1 -0
- package/dist/components/nav-link/NavLink.d.ts +123 -0
- package/dist/components/nav-link/NavLink.js +157 -0
- package/dist/components/nav-link/index.d.ts +2 -0
- package/dist/components/nav-link/index.js +1 -0
- package/dist/components/number-field/NumberField.d.ts +62 -0
- package/dist/components/number-field/NumberField.js +210 -0
- package/dist/components/number-field/index.d.ts +2 -0
- package/dist/components/number-field/index.js +1 -0
- package/dist/components/pagination/Pagination.d.ts +133 -0
- package/dist/components/pagination/Pagination.js +217 -0
- package/dist/components/pagination/index.d.ts +3 -0
- package/dist/components/pagination/index.js +3 -0
- package/dist/components/popover-surface/index.d.ts +2 -0
- package/dist/components/popover-surface/index.js +1 -0
- package/dist/components/progress-bar/ProgressBar.d.ts +260 -0
- package/dist/components/progress-bar/ProgressBar.js +470 -0
- package/dist/components/progress-bar/index.d.ts +2 -0
- package/dist/components/progress-bar/index.js +1 -0
- package/dist/components/promo-sticker/PromoSticker.d.ts +204 -0
- package/dist/components/promo-sticker/PromoSticker.js +177 -0
- package/dist/components/promo-sticker/index.d.ts +2 -0
- package/dist/components/promo-sticker/index.js +1 -0
- package/dist/components/promo-surface/PromoSurface.d.ts +94 -0
- package/dist/components/promo-surface/PromoSurface.js +119 -0
- package/dist/components/promo-surface/index.d.ts +2 -0
- package/dist/components/promo-surface/index.js +1 -0
- package/dist/components/radio/Radio.d.ts +92 -0
- package/dist/components/radio/Radio.js +171 -0
- package/dist/components/radio/index.d.ts +2 -0
- package/dist/components/radio/index.js +1 -0
- package/dist/components/radio-group/RadioGroup.d.ts +61 -0
- package/dist/components/radio-group/RadioGroup.js +51 -0
- package/dist/components/radio-group/index.d.ts +2 -0
- package/dist/components/radio-group/index.js +1 -0
- package/dist/components/select/Select.d.ts +65 -0
- package/dist/components/select/Select.js +176 -0
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/index.js +1 -0
- package/dist/components/select-field/SelectField.d.ts +16 -0
- package/dist/components/select-field/SelectField.js +55 -0
- package/dist/components/select-field/index.d.ts +2 -0
- package/dist/components/select-field/index.js +1 -0
- package/dist/components/skeleton/Skeleton.d.ts +64 -0
- package/dist/components/skeleton/Skeleton.js +65 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/index.js +1 -0
- package/dist/components/split-button/SplitButton.d.ts +80 -0
- package/dist/components/split-button/SplitButton.js +182 -0
- package/dist/components/split-button/index.d.ts +2 -0
- package/dist/components/split-button/index.js +1 -0
- package/dist/components/status-summary-bar/StatusSummaryBar.d.ts +118 -0
- package/dist/components/status-summary-bar/StatusSummaryBar.js +278 -0
- package/dist/components/status-summary-bar/index.d.ts +2 -0
- package/dist/components/status-summary-bar/index.js +1 -0
- package/dist/components/subject-lookup-field/SubjectLookupField.d.ts +157 -0
- package/dist/components/subject-lookup-field/SubjectLookupField.js +663 -0
- package/dist/components/subject-lookup-field/index.d.ts +2 -0
- package/dist/components/subject-lookup-field/index.js +1 -0
- package/dist/components/switch/Switch.d.ts +152 -0
- package/dist/components/switch/Switch.js +307 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/index.js +1 -0
- package/dist/components/table/Table.d.ts +5 -0
- package/dist/components/table/Table.js +601 -0
- package/dist/components/table/index.d.ts +6 -0
- package/dist/components/table/index.js +6 -0
- package/dist/components/text-field/TextField.d.ts +65 -0
- package/dist/components/text-field/TextField.js +173 -0
- package/dist/components/text-field/index.d.ts +2 -0
- package/dist/components/text-field/index.js +1 -0
- package/dist/components/text-link/TextLink.d.ts +260 -0
- package/dist/components/text-link/TextLink.js +303 -0
- package/dist/components/text-link/index.d.ts +2 -0
- package/dist/components/text-link/index.js +1 -0
- package/dist/components/textarea/Textarea.d.ts +93 -0
- package/dist/components/textarea/Textarea.js +256 -0
- package/dist/components/textarea/index.d.ts +2 -0
- package/dist/components/textarea/index.js +1 -0
- package/dist/components/tooltip/Tooltip.d.ts +129 -0
- package/dist/components/tooltip/Tooltip.js +457 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/components/unit-field/UnitField.d.ts +46 -0
- package/dist/components/unit-field/UnitField.js +133 -0
- package/dist/components/unit-field/index.d.ts +2 -0
- package/dist/components/unit-field/index.js +1 -0
- package/dist/icons/icon-registry.generated.js +500 -0
- package/dist/icons/icon-types.generated.d.ts +2 -0
- package/dist/icons/icon-types.generated.js +126 -0
- package/dist/index.d.ts +132 -0
- package/dist/index.js +75 -0
- package/dist/internal/BottomSheet.js +496 -0
- package/dist/internal/FodsProvider.d.ts +25 -0
- package/dist/internal/FodsProvider.js +32 -0
- package/dist/internal/MotionCaret.js +35 -0
- package/dist/internal/NumberFormatInput.d.ts +21 -0
- package/dist/internal/NumberFormatInput.js +126 -0
- package/dist/internal/SummaryDonut.d.ts +3 -0
- package/dist/internal/SummaryDonut.js +300 -0
- package/dist/internal/buttonSegment.d.ts +44 -0
- package/dist/internal/buttonSegment.js +126 -0
- package/dist/internal/collapseRoom.js +128 -0
- package/dist/internal/comboboxKeys.js +44 -0
- package/dist/internal/contentPresence.js +46 -0
- package/dist/internal/dayCell.js +95 -0
- package/dist/internal/dialogPortal.d.ts +2 -0
- package/dist/internal/dialogPortal.js +21 -0
- package/dist/internal/donutSweeps.js +65 -0
- package/dist/internal/enterOnViewGeometry.js +46 -0
- package/dist/internal/faqItem.js +80 -0
- package/dist/internal/floatingLabelMotion.js +68 -0
- package/dist/internal/formBlockContext.d.ts +22 -0
- package/dist/internal/formBlockContext.js +20 -0
- package/dist/internal/heightRoom.js +87 -0
- package/dist/internal/numberSeparators.js +62 -0
- package/dist/internal/overlayMotion.js +48 -0
- package/dist/internal/paginationItem.d.ts +8 -0
- package/dist/internal/paginationItem.js +22 -0
- package/dist/internal/popoverSurface.d.ts +8 -0
- package/dist/internal/popoverSurface.js +23 -0
- package/dist/internal/portalContainer.d.ts +1 -0
- package/dist/internal/portalContainer.js +6 -0
- package/dist/internal/progressBarItem.d.ts +207 -0
- package/dist/internal/progressBarItem.js +264 -0
- package/dist/internal/selectionControlText.js +12 -0
- package/dist/internal/statusSummaryParts.js +371 -0
- package/dist/internal/summaryMotion.js +75 -0
- package/dist/internal/table/ChildConnector.js +62 -0
- package/dist/internal/table/ChildRowPrefix.d.ts +9 -0
- package/dist/internal/table/ChildRowPrefix.js +27 -0
- package/dist/internal/table/ColumnSettings.js +135 -0
- package/dist/internal/table/ScrollRegion.js +114 -0
- package/dist/internal/table/TableEmpty.js +93 -0
- package/dist/internal/table/TableLayout.d.ts +17 -0
- package/dist/internal/table/TableLayout.js +29 -0
- package/dist/internal/table/TableLoadStatus.js +56 -0
- package/dist/internal/table/TableMobile.js +488 -0
- package/dist/internal/table/TruncatedCell.js +33 -0
- package/dist/internal/table/emptyValue.js +10 -0
- package/dist/internal/table/features.d.ts +41 -0
- package/dist/internal/table/features.js +31 -0
- package/dist/internal/table/recipes.js +227 -0
- package/dist/internal/table/rowClick.js +9 -0
- package/dist/internal/table/types.d.ts +325 -0
- package/dist/internal/table/types.js +13 -0
- package/dist/internal/tailwind-variants.d.ts +3 -0
- package/dist/internal/tailwind-variants.js +37 -0
- package/dist/internal/tooltipContext.js +5 -0
- package/dist/internal/tw-merge-config.generated.js +314 -0
- package/dist/internal/useAnchoredPanel.d.ts +87 -0
- package/dist/internal/useAnchoredPanel.js +108 -0
- package/dist/internal/useCountUp.js +53 -0
- package/dist/internal/useDateFieldTrigger.js +183 -0
- package/dist/internal/useEChart.js +59 -0
- package/dist/internal/useEnterOnView.js +42 -0
- package/dist/internal/useFloatingBar.js +100 -0
- package/dist/internal/useFormReset.js +37 -0
- package/dist/internal/useIsMobile.js +44 -0
- package/dist/internal/useOneRowOverflow.js +88 -0
- package/dist/internal/usePrefersReducedMotion.js +25 -0
- package/dist/internal/useReturnFocus.js +26 -0
- package/dist/internal/utils.d.ts +7 -0
- package/dist/internal/utils.js +58 -0
- package/dist/node_modules/@tanstack/store/dist/store.d.ts +29 -0
- package/dist/node_modules/@tanstack/store/dist/types.d.ts +38 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/cells/coreCellsFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/cells/coreCellsFeature.types.d.ts +53 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/columns/coreColumnsFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/columns/coreColumnsFeature.types.d.ts +90 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/coreFeatures.d.ts +17 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/headers/coreHeadersFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/headers/coreHeadersFeature.types.d.ts +114 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/reactivity/coreReactivityFeature.types.d.ts +51 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/row-models/coreRowModelsFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/row-models/coreRowModelsFeature.types.d.ts +29 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/rows/coreRowsFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/rows/coreRowsFeature.types.d.ts +129 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/table/coreTablesFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/table/coreTablesFeature.types.d.ts +203 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/cell-selection/cellSelectionFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/cell-selection/cellSelectionFeature.types.d.ts +294 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/cell-spanning/cellSpanningFeature.d.ts +11 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/cell-spanning/cellSpanningFeature.types.d.ts +148 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-faceting/columnFacetingFeature.d.ts +12 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-faceting/columnFacetingFeature.types.d.ts +63 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-filtering/columnFilteringFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-filtering/columnFilteringFeature.types.d.ts +209 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-filtering/filterFns.d.ts +35 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-grouping/columnGroupingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-grouping/columnGroupingFeature.types.d.ts +128 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-ordering/columnOrderingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-ordering/columnOrderingFeature.types.d.ts +82 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-pinning/columnPinningFeature.d.ts +11 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-pinning/columnPinningFeature.types.d.ts +195 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-resizing/columnResizingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-resizing/columnResizingFeature.types.d.ts +73 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-sizing/columnSizingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-sizing/columnSizingFeature.types.d.ts +134 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-visibility/columnVisibilityFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-visibility/columnVisibilityFeature.types.d.ts +92 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/global-filtering/globalFilteringFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/global-filtering/globalFilteringFeature.types.d.ts +67 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-aggregation/aggregationFns.d.ts +23 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-aggregation/rowAggregationFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-aggregation/rowAggregationFeature.types.d.ts +183 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-aggregation/rowAggregationFeature.utils.d.ts +18 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-expanding/rowExpandingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-expanding/rowExpandingFeature.types.d.ts +125 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-pagination/rowPaginationFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-pagination/rowPaginationFeature.types.d.ts +135 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-pinning/rowPinningFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-pinning/rowPinningFeature.types.d.ts +76 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-selection/rowSelectionFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-selection/rowSelectionFeature.types.d.ts +187 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-sorting/rowSortingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-sorting/rowSortingFeature.types.d.ts +236 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-sorting/sortFns.d.ts +23 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/stockFeatures.d.ts +37 -0
- package/dist/node_modules/@tanstack/table-core/dist/helpers/columnHelper.d.ts +47 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/Cell.d.ts +16 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/Column.d.ts +30 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/ColumnDef.d.ts +123 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/Header.d.ts +12 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/HeaderGroup.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/Row.d.ts +24 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/RowModel.d.ts +19 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/RowModelFns.d.ts +11 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/Table.d.ts +53 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/TableFeatures.d.ts +416 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/TableOptions.d.ts +78 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/TableState.d.ts +46 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/type-utils.d.ts +25 -0
- package/dist/shared.css +179 -0
- package/dist/styles.css +5467 -0
- package/dist/theme.css +314 -0
- package/dist/theme.map.json +278 -0
- package/dist/tokens/index.d.ts +2 -0
- package/dist/tokens/index.js +1 -0
- package/dist/tokens/tokens.generated.d.ts +2040 -0
- package/dist/tokens/tokens.generated.js +2053 -0
- package/dist/tokens.css +484 -0
- package/dist/tokens.flat.json +429 -0
- package/docs/Consuming.mdx +379 -0
- package/docs/Contributing.mdx +78 -0
- package/docs/ForAgents.mdx +53 -0
- package/docs/Introduction.mdx +54 -0
- package/llms.txt +556 -0
- package/package.json +351 -3
- package/src/components/action-row/ActionRow.mdx +686 -0
- package/src/components/action-row/ActionRow.stories.tsx +669 -0
- package/src/components/action-row/ActionRow.tsx +632 -0
- package/src/components/action-row/index.ts +9 -0
- package/src/components/alert/Alert.mdx +377 -0
- package/src/components/alert/Alert.stories.tsx +674 -0
- package/src/components/alert/Alert.tsx +579 -0
- package/src/components/alert/index.ts +13 -0
- package/src/components/anchored-panel/AnchoredPanel.mdx +381 -0
- package/src/components/anchored-panel/AnchoredPanel.stories.tsx +593 -0
- package/src/components/anchored-panel/AnchoredPanel.tsx +176 -0
- package/src/components/anchored-panel/index.ts +15 -0
- package/src/components/badge/Badge.mdx +487 -0
- package/src/components/badge/Badge.stories.tsx +375 -0
- package/src/components/badge/Badge.tsx +360 -0
- package/src/components/badge/index.ts +10 -0
- package/src/components/banner/Banner.mdx +704 -0
- package/src/components/banner/Banner.stories.tsx +448 -0
- package/src/components/banner/Banner.tsx +602 -0
- package/src/components/banner/index.ts +14 -0
- package/src/components/button/Button.mdx +286 -0
- package/src/components/button/Button.stories.tsx +381 -0
- package/src/components/button/Button.tsx +384 -0
- package/src/components/button/index.ts +1 -0
- package/src/components/button-group/ButtonGroup.mdx +512 -0
- package/src/components/button-group/ButtonGroup.stories.tsx +714 -0
- package/src/components/button-group/ButtonGroup.tsx +491 -0
- package/src/components/button-group/index.ts +10 -0
- package/src/components/card-select/CardSelect.mdx +662 -0
- package/src/components/card-select/CardSelect.stories.tsx +784 -0
- package/src/components/card-select/CardSelect.tsx +783 -0
- package/src/components/card-select/CardSelectGroup.tsx +169 -0
- package/src/components/card-select/index.ts +18 -0
- package/src/components/checkbox/Checkbox.mdx +269 -0
- package/src/components/checkbox/Checkbox.stories.tsx +306 -0
- package/src/components/checkbox/Checkbox.tsx +343 -0
- package/src/components/checkbox/index.ts +1 -0
- package/src/components/chip/Chip.mdx +683 -0
- package/src/components/chip/Chip.stories.tsx +734 -0
- package/src/components/chip/Chip.tsx +732 -0
- package/src/components/chip/index.ts +9 -0
- package/src/components/column-header/ColumnHeader.mdx +301 -0
- package/src/components/column-header/ColumnHeader.stories.tsx +319 -0
- package/src/components/column-header/ColumnHeader.tsx +287 -0
- package/src/components/column-header/index.ts +7 -0
- package/src/components/combobox-field/Combobox.tsx +693 -0
- package/src/components/combobox-field/ComboboxField.mdx +525 -0
- package/src/components/combobox-field/ComboboxField.stories.tsx +502 -0
- package/src/components/combobox-field/ComboboxField.tsx +259 -0
- package/src/components/combobox-field/index.ts +12 -0
- package/src/components/date-field/DateField.mdx +340 -0
- package/src/components/date-field/DateField.stories.tsx +221 -0
- package/src/components/date-field/DateField.tsx +176 -0
- package/src/components/date-field/index.ts +1 -0
- package/src/components/date-picker/DatePicker.mdx +436 -0
- package/src/components/date-picker/DatePicker.stories.tsx +458 -0
- package/src/components/date-picker/DatePicker.tsx +688 -0
- package/src/components/date-picker/index.ts +9 -0
- package/src/components/divider/Divider.mdx +256 -0
- package/src/components/divider/Divider.stories.tsx +177 -0
- package/src/components/divider/Divider.tsx +193 -0
- package/src/components/divider/index.ts +1 -0
- package/src/components/drawer/Drawer.mdx +518 -0
- package/src/components/drawer/Drawer.stories.tsx +392 -0
- package/src/components/drawer/Drawer.tsx +683 -0
- package/src/components/drawer/index.ts +1 -0
- package/src/components/dropdown-button/DropdownButton.mdx +285 -0
- package/src/components/dropdown-button/DropdownButton.stories.tsx +398 -0
- package/src/components/dropdown-button/DropdownButton.tsx +198 -0
- package/src/components/dropdown-button/index.ts +7 -0
- package/src/components/faq/FAQ.mdx +364 -0
- package/src/components/faq/FAQ.stories.tsx +343 -0
- package/src/components/faq/FAQ.tsx +337 -0
- package/src/components/faq/index.ts +1 -0
- package/src/components/field/Field.mdx +129 -0
- package/src/components/field/Field.stories.tsx +461 -0
- package/src/components/field/Field.tsx +765 -0
- package/src/components/field/index.ts +20 -0
- package/src/components/field-pair/FieldPair.mdx +308 -0
- package/src/components/field-pair/FieldPair.stories.tsx +530 -0
- package/src/components/field-pair/FieldPair.tsx +796 -0
- package/src/components/field-pair/index.ts +9 -0
- package/src/components/file-upload/FileUpload.mdx +345 -0
- package/src/components/file-upload/FileUpload.stories.tsx +698 -0
- package/src/components/file-upload/FileUpload.tsx +802 -0
- package/src/components/file-upload/index.ts +6 -0
- package/src/components/filter-chip/FilterChip.mdx +778 -0
- package/src/components/filter-chip/FilterChip.stories.tsx +827 -0
- package/src/components/filter-chip/FilterChip.tsx +881 -0
- package/src/components/filter-chip/index.ts +11 -0
- package/src/components/filter-facet/FilterFacet.mdx +536 -0
- package/src/components/filter-facet/FilterFacet.stories.tsx +506 -0
- package/src/components/filter-facet/FilterFacet.tsx +1160 -0
- package/src/components/filter-facet/index.ts +7 -0
- package/src/components/firm-avatar/FirmAvatar.mdx +280 -0
- package/src/components/firm-avatar/FirmAvatar.stories.tsx +147 -0
- package/src/components/firm-avatar/FirmAvatar.tsx +172 -0
- package/src/components/firm-avatar/index.ts +7 -0
- package/src/components/form-actions/FormActions.mdx +518 -0
- package/src/components/form-actions/FormActions.stories.tsx +621 -0
- package/src/components/form-actions/FormActions.tsx +273 -0
- package/src/components/form-actions/index.ts +6 -0
- package/src/components/form-block/FormBlock.mdx +728 -0
- package/src/components/form-block/FormBlock.stories.tsx +813 -0
- package/src/components/form-block/FormBlock.tsx +679 -0
- package/src/components/form-block/index.ts +13 -0
- package/src/components/form-section/FormSection.mdx +436 -0
- package/src/components/form-section/FormSection.stories.tsx +407 -0
- package/src/components/form-section/FormSection.tsx +290 -0
- package/src/components/form-section/index.ts +17 -0
- package/src/components/heading/Heading.mdx +206 -0
- package/src/components/heading/Heading.stories.tsx +169 -0
- package/src/components/heading/Heading.tsx +124 -0
- package/src/components/heading/index.ts +8 -0
- package/src/components/heading-group/HeadingGroup.mdx +521 -0
- package/src/components/heading-group/HeadingGroup.stories.tsx +353 -0
- package/src/components/heading-group/HeadingGroup.tsx +396 -0
- package/src/components/heading-group/index.ts +7 -0
- package/src/components/hero/Hero.mdx +742 -0
- package/src/components/hero/Hero.stories.tsx +527 -0
- package/src/components/hero/Hero.tsx +807 -0
- package/src/components/hero/index.ts +1 -0
- package/src/components/icon/Icon.mdx +329 -0
- package/src/components/icon/Icon.stories.tsx +398 -0
- package/src/components/icon/Icon.tsx +97 -0
- package/src/components/icon/index.ts +2 -0
- package/src/components/icon-button/IconButton.mdx +206 -0
- package/src/components/icon-button/IconButton.stories.tsx +341 -0
- package/src/components/icon-button/IconButton.tsx +273 -0
- package/src/components/icon-button/index.ts +1 -0
- package/src/components/item-row/ItemRow.mdx +533 -0
- package/src/components/item-row/ItemRow.stories.tsx +434 -0
- package/src/components/item-row/ItemRow.tsx +676 -0
- package/src/components/item-row/index.ts +9 -0
- package/src/components/list-row/ListRow.mdx +404 -0
- package/src/components/list-row/ListRow.stories.tsx +404 -0
- package/src/components/list-row/ListRow.tsx +424 -0
- package/src/components/list-row/index.ts +1 -0
- package/src/components/menu/Menu.mdx +268 -0
- package/src/components/menu/Menu.stories.tsx +455 -0
- package/src/components/menu/Menu.tsx +452 -0
- package/src/components/menu/index.ts +1 -0
- package/src/components/modal/Modal.mdx +854 -0
- package/src/components/modal/Modal.stories.tsx +881 -0
- package/src/components/modal/Modal.tsx +1434 -0
- package/src/components/modal/index.ts +1 -0
- package/src/components/nav-link/NavLink.mdx +196 -0
- package/src/components/nav-link/NavLink.stories.tsx +243 -0
- package/src/components/nav-link/NavLink.tsx +222 -0
- package/src/components/nav-link/index.ts +1 -0
- package/src/components/number-field/NumberField.mdx +223 -0
- package/src/components/number-field/NumberField.stories.tsx +291 -0
- package/src/components/number-field/NumberField.tsx +388 -0
- package/src/components/number-field/index.ts +6 -0
- package/src/components/pagination/Pagination.mdx +305 -0
- package/src/components/pagination/Pagination.stories.tsx +333 -0
- package/src/components/pagination/Pagination.tsx +343 -0
- package/src/components/pagination/index.ts +8 -0
- package/src/components/popover-surface/PopoverSurface.mdx +158 -0
- package/src/components/popover-surface/PopoverSurface.stories.tsx +421 -0
- package/src/components/popover-surface/index.ts +1 -0
- package/src/components/progress-bar/ProgressBar.mdx +802 -0
- package/src/components/progress-bar/ProgressBar.stories.tsx +533 -0
- package/src/components/progress-bar/ProgressBar.tsx +654 -0
- package/src/components/progress-bar/index.ts +9 -0
- package/src/components/promo-sticker/PromoSticker.mdx +436 -0
- package/src/components/promo-sticker/PromoSticker.stories.tsx +363 -0
- package/src/components/promo-sticker/PromoSticker.tsx +313 -0
- package/src/components/promo-sticker/index.ts +7 -0
- package/src/components/promo-surface/PromoSurface.mdx +399 -0
- package/src/components/promo-surface/PromoSurface.stories.tsx +270 -0
- package/src/components/promo-surface/PromoSurface.tsx +305 -0
- package/src/components/promo-surface/index.ts +7 -0
- package/src/components/radio/Radio.mdx +243 -0
- package/src/components/radio/Radio.stories.tsx +307 -0
- package/src/components/radio/Radio.tsx +288 -0
- package/src/components/radio/index.ts +1 -0
- package/src/components/radio-group/RadioGroup.mdx +119 -0
- package/src/components/radio-group/RadioGroup.stories.tsx +225 -0
- package/src/components/radio-group/RadioGroup.tsx +139 -0
- package/src/components/radio-group/index.ts +1 -0
- package/src/components/select/Select.mdx +241 -0
- package/src/components/select/Select.stories.tsx +404 -0
- package/src/components/select/Select.tsx +381 -0
- package/src/components/select/index.ts +1 -0
- package/src/components/select-field/SelectField.mdx +324 -0
- package/src/components/select-field/SelectField.stories.tsx +460 -0
- package/src/components/select-field/SelectField.tsx +138 -0
- package/src/components/select-field/index.ts +1 -0
- package/src/components/skeleton/Skeleton.mdx +194 -0
- package/src/components/skeleton/Skeleton.stories.tsx +260 -0
- package/src/components/skeleton/Skeleton.tsx +107 -0
- package/src/components/skeleton/index.ts +1 -0
- package/src/components/split-button/SplitButton.mdx +445 -0
- package/src/components/split-button/SplitButton.stories.tsx +465 -0
- package/src/components/split-button/SplitButton.tsx +361 -0
- package/src/components/split-button/index.ts +7 -0
- package/src/components/status-summary-bar/StatusSummaryBar.mdx +338 -0
- package/src/components/status-summary-bar/StatusSummaryBar.stories.tsx +408 -0
- package/src/components/status-summary-bar/StatusSummaryBar.tsx +428 -0
- package/src/components/status-summary-bar/index.ts +8 -0
- package/src/components/subject-lookup-field/SubjectLookupField.mdx +378 -0
- package/src/components/subject-lookup-field/SubjectLookupField.stories.tsx +393 -0
- package/src/components/subject-lookup-field/SubjectLookupField.tsx +1079 -0
- package/src/components/subject-lookup-field/index.ts +11 -0
- package/src/components/switch/Switch.mdx +376 -0
- package/src/components/switch/Switch.stories.tsx +296 -0
- package/src/components/switch/Switch.tsx +483 -0
- package/src/components/switch/index.ts +1 -0
- package/src/components/table/Table.mdx +575 -0
- package/src/components/table/Table.stories.tsx +1049 -0
- package/src/components/table/Table.tsx +745 -0
- package/src/components/table/TableConsumers.stories.tsx +195 -0
- package/src/components/table/_tableFixtures.ts +1189 -0
- package/src/components/table/index.ts +22 -0
- package/src/components/text-field/TextField.mdx +479 -0
- package/src/components/text-field/TextField.stories.tsx +366 -0
- package/src/components/text-field/TextField.tsx +391 -0
- package/src/components/text-field/index.ts +8 -0
- package/src/components/text-link/TextLink.mdx +353 -0
- package/src/components/text-link/TextLink.stories.tsx +458 -0
- package/src/components/text-link/TextLink.tsx +504 -0
- package/src/components/text-link/index.ts +10 -0
- package/src/components/textarea/Textarea.mdx +244 -0
- package/src/components/textarea/Textarea.stories.tsx +371 -0
- package/src/components/textarea/Textarea.tsx +489 -0
- package/src/components/textarea/index.ts +9 -0
- package/src/components/tooltip/Tooltip.mdx +462 -0
- package/src/components/tooltip/Tooltip.stories.tsx +500 -0
- package/src/components/tooltip/Tooltip.tsx +756 -0
- package/src/components/tooltip/index.ts +13 -0
- package/src/components/unit-field/UnitField.mdx +215 -0
- package/src/components/unit-field/UnitField.stories.tsx +291 -0
- package/src/components/unit-field/UnitField.tsx +255 -0
- package/src/components/unit-field/index.ts +7 -0
- package/src/icons/icon-registry.generated.ts +510 -0
- package/src/icons/icon-types.generated.ts +256 -0
- package/src/index.ts +71 -0
- package/src/internal/BottomSheet.tsx +714 -0
- package/src/internal/FodsProvider.tsx +36 -0
- package/src/internal/MotionCaret.tsx +53 -0
- package/src/internal/NumberFormatInput.tsx +276 -0
- package/src/internal/SummaryDonut.tsx +359 -0
- package/src/internal/buttonSegment.ts +241 -0
- package/src/internal/collapseRoom.ts +130 -0
- package/src/internal/comboboxKeys.ts +90 -0
- package/src/internal/contentPresence.ts +46 -0
- package/src/internal/dayCell.ts +274 -0
- package/src/internal/dialogPortal.ts +50 -0
- package/src/internal/donutSweeps.ts +77 -0
- package/src/internal/enterOnViewGeometry.ts +53 -0
- package/src/internal/faqItem.ts +104 -0
- package/src/internal/floatingLabelMotion.tsx +109 -0
- package/src/internal/formBlockContext.ts +27 -0
- package/src/internal/heightRoom.ts +135 -0
- package/src/internal/numberSeparators.ts +93 -0
- package/src/internal/overlayMotion.tsx +32 -0
- package/src/internal/paginationItem.ts +106 -0
- package/src/internal/popoverSurface.ts +78 -0
- package/src/internal/portalContainer.ts +11 -0
- package/src/internal/progressBarItem.ts +356 -0
- package/src/internal/selectionControlText.ts +42 -0
- package/src/internal/statusSummaryParts.tsx +475 -0
- package/src/internal/summaryMotion.ts +111 -0
- package/src/internal/table/ChildConnector.tsx +57 -0
- package/src/internal/table/ChildRowPrefix.tsx +21 -0
- package/src/internal/table/ColumnSettings.tsx +194 -0
- package/src/internal/table/ScrollRegion.tsx +176 -0
- package/src/internal/table/TableEmpty.tsx +99 -0
- package/src/internal/table/TableLayout.tsx +29 -0
- package/src/internal/table/TableLoadStatus.tsx +60 -0
- package/src/internal/table/TableMobile.tsx +582 -0
- package/src/internal/table/TruncatedCell.tsx +35 -0
- package/src/internal/table/emptyValue.ts +11 -0
- package/src/internal/table/features.ts +44 -0
- package/src/internal/table/recipes.ts +263 -0
- package/src/internal/table/rowClick.ts +8 -0
- package/src/internal/table/types.ts +342 -0
- package/src/internal/tailwind-variants.ts +65 -0
- package/src/internal/tooltipContext.ts +15 -0
- package/src/internal/tw-merge-config.generated.ts +275 -0
- package/src/internal/useAnchoredPanel.ts +340 -0
- package/src/internal/useCountUp.ts +65 -0
- package/src/internal/useDateFieldTrigger.tsx +357 -0
- package/src/internal/useEChart.ts +88 -0
- package/src/internal/useEnterOnView.ts +80 -0
- package/src/internal/useFloatingBar.ts +125 -0
- package/src/internal/useFormReset.ts +47 -0
- package/src/internal/useIsMobile.ts +64 -0
- package/src/internal/useNoImplicitSubmit.ts +41 -0
- package/src/internal/useOneRowOverflow.ts +103 -0
- package/src/internal/usePrefersReducedMotion.ts +27 -0
- package/src/internal/useReturnFocus.ts +34 -0
- package/src/internal/utils.ts +58 -0
- package/src/recipes/EmptyState.stories.tsx +105 -0
- package/src/recipes/Form.stories.tsx +355 -0
- package/src/recipes/ModalWithForm.stories.tsx +219 -0
- package/src/recipes/Recipes.mdx +61 -0
- package/src/recipes/TableWithFilters.stories.tsx +278 -0
- package/src/storybook/FodsFamily.tsx +39 -0
- package/src/storybook/Section.tsx +36 -0
- package/src/storybook/a11y.ts +24 -0
- package/src/storybook/assets/banner-character-bartender.webp +0 -0
- package/src/storybook/assets/banner-invoice-sheet-left.webp +0 -0
- package/src/storybook/assets/banner-invoice-sheet-right.webp +0 -0
- package/src/storybook/assets/invoice-hero.webp +0 -0
- package/src/storybook/assets/invoice.webp +0 -0
- package/src/storybook/assets/section-document-info.svg +21 -0
- package/src/storybook/assets/section-gear-checklist.svg +11 -0
- package/src/storybook/assets/section-person-arrow-in.svg +15 -0
- package/src/storybook/assets/section-person-arrow-out.svg +22 -0
- package/src/storybook/assets/section-receipt-dollar.svg +23 -0
- package/src/storybook/assets/table-empty-folder-empty.png +0 -0
- package/src/storybook/assets/table-empty-folder-magnifying-glass.png +0 -0
- package/src/storybook/assets/table-empty-funnel.png +0 -0
- package/src/storybook/assets/table-empty-load-failed.png +0 -0
- package/src/storybook/assets/wallet-spot.png +0 -0
- package/src/storybook/assets.d.ts +17 -0
- package/src/storybook/componentDoc.ts +41 -0
- package/src/storybook/fitFrame.tsx +70 -0
- package/src/storybook/forceStates.tsx +647 -0
- package/src/storybook/illustrations.tsx +66 -0
- package/src/storybook/viewportFrame.tsx +58 -0
- package/src/styles/assets/label-brush-1.svg +6 -0
- package/src/styles/assets/pattern-dark.svg +113 -0
- package/src/styles/base.css +106 -0
- package/src/styles/index.css +15 -0
- package/src/styles/motion.css +157 -0
- package/src/styles/promo-sticker.css +27 -0
- package/src/styles/promo-surface.css +49 -0
- package/src/styles/shared.css +11 -0
- package/src/styles/theme.generated.css +314 -0
- package/src/styles/theme.map.json +278 -0
- package/src/styles/tracking.generated.css +12 -0
- package/src/tokens/index.ts +4 -0
- package/src/tokens/tokens.generated.ts +542 -0
|
@@ -0,0 +1,881 @@
|
|
|
1
|
+
import React, { type ComponentType } from 'react';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
3
|
+
import { fn } from 'storybook/test';
|
|
4
|
+
import { Modal, type ModalSize, type ModalType } from './Modal';
|
|
5
|
+
import { Button } from '../button/Button';
|
|
6
|
+
import { Field } from '../field/Field';
|
|
7
|
+
import { ProgressBar } from '../progress-bar/ProgressBar';
|
|
8
|
+
import { TextField } from '../text-field/TextField';
|
|
9
|
+
import { TextLink } from '../text-link/TextLink';
|
|
10
|
+
import { Icon } from '../icon/Icon';
|
|
11
|
+
import { useIsMobile } from '../../internal/useIsMobile';
|
|
12
|
+
import { Section, Showcase } from '../../storybook/Section';
|
|
13
|
+
import { componentDoc } from '../../storybook/componentDoc';
|
|
14
|
+
import invoiceImage from '../../storybook/assets/invoice.webp';
|
|
15
|
+
|
|
16
|
+
// manifest `axes.variant` — the chrome archetype, called `type` in code because it
|
|
17
|
+
// decides which regions exist, not a colour family.
|
|
18
|
+
const TYPES = ['compact', 'marketing', 'center', 'wizard', 'corner'] as const;
|
|
19
|
+
|
|
20
|
+
// manifest `axes.size` in full. Mobile is not a prop: the
|
|
21
|
+
// Modal renders it below md whatever `size` says, so it cannot sit in a docs-width Matrix —
|
|
22
|
+
// the `* — mobile` stories render it, one per Type.
|
|
23
|
+
const SIZE_AXIS = ['sm', 'md', 'lg', 'xl', 'mobile'] as const;
|
|
24
|
+
|
|
25
|
+
// The desktop Sizes sm 480 / md 640 / lg 834 / xl 1238 — the values of the `size` prop.
|
|
26
|
+
const SIZES = SIZE_AXIS.filter(
|
|
27
|
+
(size): size is Exclude<(typeof SIZE_AXIS)[number], 'mobile'> => size !== 'mobile',
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
// xl (1238) is wider than the docs column, so there it shrinks to the column like lg —
|
|
31
|
+
// the Matrix leaves it out; Playground still offers it.
|
|
32
|
+
const MATRIX_SIZES = SIZES.filter(size => size !== 'xl');
|
|
33
|
+
|
|
34
|
+
// manifest `axes.has-close` — a real variant axis (the cells differ structurally).
|
|
35
|
+
// Spelled as the manifest's own values because the axis check reads string literals.
|
|
36
|
+
const HAS_CLOSE = ['True', 'False'] as const;
|
|
37
|
+
|
|
38
|
+
// Scrim left visible above and below each in-page preview card.
|
|
39
|
+
const PREVIEW_GUTTER = 48;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Flat story args. The component's props are a discriminated union on `type`, and
|
|
43
|
+
* Storybook controls cannot drive a union — so the stories take these, and
|
|
44
|
+
* `ModalDemo` assembles the right branch per Type with representative content.
|
|
45
|
+
*/
|
|
46
|
+
interface ModalStoryArgs {
|
|
47
|
+
open: boolean;
|
|
48
|
+
onClose: () => void;
|
|
49
|
+
type: ModalType;
|
|
50
|
+
size: ModalSize;
|
|
51
|
+
hasClose?: boolean;
|
|
52
|
+
dismissOnBackdrop?: boolean;
|
|
53
|
+
pinnedFooter?: boolean;
|
|
54
|
+
role: 'dialog' | 'alertdialog';
|
|
55
|
+
title: string;
|
|
56
|
+
description?: string;
|
|
57
|
+
closeLabel?: string;
|
|
58
|
+
/** Wizard only — which step the demo starts on (0-based). */
|
|
59
|
+
step?: number;
|
|
60
|
+
/** Compact/Marketing only — a full-bleed image instead of the inset icon. */
|
|
61
|
+
withBanner?: boolean;
|
|
62
|
+
/** Wizard only — extra body fields, to make the body overflow on a phone. */
|
|
63
|
+
extraFields?: number;
|
|
64
|
+
/** Wizard only — passes `stepKey`, and gives each step its own body height. */
|
|
65
|
+
stepMotion?: boolean;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const WIZARD_STEPS = [
|
|
69
|
+
{ title: 'Firma' },
|
|
70
|
+
{ title: 'Certifikát' },
|
|
71
|
+
{ title: 'Ověření' },
|
|
72
|
+
{ title: 'Hotovo' },
|
|
73
|
+
];
|
|
74
|
+
const WIZARD_STEP_LABELS = ['Krok 1', 'Krok 2', 'Krok 3', 'Krok 4'];
|
|
75
|
+
// Extra fields per step in the step-motion demo, so every step change resizes the card.
|
|
76
|
+
const WIZARD_MOTION_FIELDS = [0, 3, 1, 0];
|
|
77
|
+
// Step-specific lead copy. No "Krok 2 z 4" counter: the stepper band already says
|
|
78
|
+
// where the user is, and the mobile wizard spec drops the textual counter.
|
|
79
|
+
const WIZARD_STEP_INTROS = [
|
|
80
|
+
'K\u00a0nastavení jsou potřeba údaje o\u00a0firmě, která faktury odesílá.',
|
|
81
|
+
'Firma se do KSeF přihlašuje certifikátem.',
|
|
82
|
+
'Certifikát se ověří proti zadané firmě.',
|
|
83
|
+
'Nastavení je hotové, faktury lze odesílat do KSeF.',
|
|
84
|
+
];
|
|
85
|
+
|
|
86
|
+
// Visual slot level ICON (spec § Visual slot): a bare glyph at --size-icon-display,
|
|
87
|
+
// no disc. The ink follows the intent — the Figma showcase paints a confirmation
|
|
88
|
+
// secondary/solid (= --status-info-solid) and a destructive one status/danger/solid,
|
|
89
|
+
// the same inks as the CTA that commits it.
|
|
90
|
+
const INTENT_INK = { info: 'text-status-info-solid', danger: 'text-status-danger-solid' } as const;
|
|
91
|
+
const ConfirmIcon = ({ intent }: { intent: keyof typeof INTENT_INK }) => (
|
|
92
|
+
<Icon name="info" size="display" className={INTENT_INK[intent]} />
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
const Banner = () => <img src={invoiceImage} alt="" />;
|
|
96
|
+
|
|
97
|
+
const InvoiceTable = () => (
|
|
98
|
+
<table className="w-full border-collapse text-left text-body-sm">
|
|
99
|
+
<thead>
|
|
100
|
+
<tr className="border-b-100 border-b-outline-default">
|
|
101
|
+
<th className="py-400 font-semibold">Číslo</th>
|
|
102
|
+
<th className="py-400 font-semibold">Odběratel</th>
|
|
103
|
+
<th className="py-400 font-semibold">Splatnost</th>
|
|
104
|
+
<th className="py-400 text-right font-semibold">Částka</th>
|
|
105
|
+
</tr>
|
|
106
|
+
</thead>
|
|
107
|
+
<tbody>
|
|
108
|
+
{['2026-0142', '2026-0143', '2026-0144'].map((number, index) => (
|
|
109
|
+
<tr key={number} className="border-b-100 border-b-outline-default">
|
|
110
|
+
<td className="py-400">{number}</td>
|
|
111
|
+
<td className="py-400">Beta s.r.o.</td>
|
|
112
|
+
<td className="py-400">{`${index + 10}. 10. 2026`}</td>
|
|
113
|
+
<td className="py-400 text-right">{`${(index + 1) * 12100}\u00a0Kč`}</td>
|
|
114
|
+
</tr>
|
|
115
|
+
))}
|
|
116
|
+
</tbody>
|
|
117
|
+
</table>
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
/** Assembles the correct union branch for the chosen Type, with Czech demo content. */
|
|
121
|
+
function ModalDemo({
|
|
122
|
+
step: initialStep = 0,
|
|
123
|
+
withBanner = false,
|
|
124
|
+
previewContainer,
|
|
125
|
+
...args
|
|
126
|
+
}: ModalStoryArgs & { previewContainer?: HTMLElement }) {
|
|
127
|
+
const [step, setStep] = React.useState(initialStep);
|
|
128
|
+
// `chrome.mobile.footer`: the Mobile column takes Size=lg Buttons. The Modal cannot
|
|
129
|
+
// resize a consumer's Button, so the composer picks the size from the same viewport axis.
|
|
130
|
+
const ctaSize = useIsMobile('md') ? 'lg' : 'md';
|
|
131
|
+
const common = {
|
|
132
|
+
previewContainer,
|
|
133
|
+
open: args.open,
|
|
134
|
+
onClose: args.onClose,
|
|
135
|
+
size: args.size,
|
|
136
|
+
hasClose: args.hasClose,
|
|
137
|
+
dismissOnBackdrop: args.dismissOnBackdrop,
|
|
138
|
+
pinnedFooter: args.pinnedFooter,
|
|
139
|
+
role: args.role,
|
|
140
|
+
title: args.title,
|
|
141
|
+
closeLabel: args.closeLabel,
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
// An `alertdialog` is the irreversible confirm: the Danger CTA replaces the primary
|
|
145
|
+
// and the intent icon turns red with it (Figma showcase: "icon turns red").
|
|
146
|
+
const destructive = args.role === 'alertdialog';
|
|
147
|
+
|
|
148
|
+
switch (args.type) {
|
|
149
|
+
case 'compact':
|
|
150
|
+
return (
|
|
151
|
+
<Modal
|
|
152
|
+
{...common}
|
|
153
|
+
type="compact"
|
|
154
|
+
{...(withBanner ? { banner: <Banner /> } : { visual: <ConfirmIcon intent={destructive ? 'danger' : 'info'} /> })}
|
|
155
|
+
actions={
|
|
156
|
+
<>
|
|
157
|
+
<Button variant="tertiary" size={ctaSize} onClick={args.onClose}>
|
|
158
|
+
Zrušit
|
|
159
|
+
</Button>
|
|
160
|
+
<Button variant={destructive ? 'danger' : 'primary'} size={ctaSize}>
|
|
161
|
+
{destructive ? 'Smazat fakturu' : 'Odeslat'}
|
|
162
|
+
</Button>
|
|
163
|
+
</>
|
|
164
|
+
}
|
|
165
|
+
>
|
|
166
|
+
<p>
|
|
167
|
+
{destructive
|
|
168
|
+
? 'Faktura bude trvale odstraněna. Tuto akci nelze vrátit zpět.'
|
|
169
|
+
: 'Faktura bude odeslána příjemci na uvedený e‑mail spolu s\u00a0odkazem na platbu.'}
|
|
170
|
+
</p>
|
|
171
|
+
</Modal>
|
|
172
|
+
);
|
|
173
|
+
case 'marketing':
|
|
174
|
+
return (
|
|
175
|
+
<Modal
|
|
176
|
+
{...common}
|
|
177
|
+
type="marketing"
|
|
178
|
+
{...(withBanner ? { banner: <Banner /> } : { visual: <ConfirmIcon intent="info" /> })}
|
|
179
|
+
actions={
|
|
180
|
+
<>
|
|
181
|
+
<Button variant="secondary" size={ctaSize}>Více informací</Button>
|
|
182
|
+
<Button variant="brand" size={ctaSize}>Propojit banku</Button>
|
|
183
|
+
</>
|
|
184
|
+
}
|
|
185
|
+
declineLink={
|
|
186
|
+
<TextLink variant="quiet" size={ctaSize === 'lg' ? 'md' : 'sm'} onClick={args.onClose}>
|
|
187
|
+
Ne, děkuji
|
|
188
|
+
</TextLink>
|
|
189
|
+
}
|
|
190
|
+
>
|
|
191
|
+
<p>Automaticky párujte platby s fakturami a ušetřete čas každý měsíc.</p>
|
|
192
|
+
</Modal>
|
|
193
|
+
);
|
|
194
|
+
case 'wizard': {
|
|
195
|
+
const last = step === WIZARD_STEPS.length - 1;
|
|
196
|
+
const stepIndicator = (
|
|
197
|
+
<ProgressBar
|
|
198
|
+
steps={WIZARD_STEPS}
|
|
199
|
+
currentStep={step}
|
|
200
|
+
size="sm"
|
|
201
|
+
layout="row"
|
|
202
|
+
variant="blue"
|
|
203
|
+
showTitle={false}
|
|
204
|
+
showDetail={false}
|
|
205
|
+
stepLabels={WIZARD_STEP_LABELS}
|
|
206
|
+
onStepClick={setStep}
|
|
207
|
+
/>
|
|
208
|
+
);
|
|
209
|
+
const footerActions = (
|
|
210
|
+
<>
|
|
211
|
+
<Button variant="tertiary" onClick={args.onClose}>
|
|
212
|
+
Zrušit
|
|
213
|
+
</Button>
|
|
214
|
+
<Button
|
|
215
|
+
variant="primary"
|
|
216
|
+
onClick={() => (last ? args.onClose() : setStep(current => current + 1))}
|
|
217
|
+
>
|
|
218
|
+
{last ? 'Dokončit' : 'Další'}
|
|
219
|
+
</Button>
|
|
220
|
+
</>
|
|
221
|
+
);
|
|
222
|
+
// Below md: the single advance Button, Size lg — the exit is the header close.
|
|
223
|
+
const mobileAction = (
|
|
224
|
+
<Button
|
|
225
|
+
variant="primary"
|
|
226
|
+
size="lg"
|
|
227
|
+
onClick={() => (last ? args.onClose() : setStep(current => current + 1))}
|
|
228
|
+
>
|
|
229
|
+
{last ? 'Dokončit' : 'Další'}
|
|
230
|
+
</Button>
|
|
231
|
+
);
|
|
232
|
+
const body = (
|
|
233
|
+
<>
|
|
234
|
+
<p>{WIZARD_STEP_INTROS[step]}</p>
|
|
235
|
+
<Field label="Identifikátor firmy (NIP)">
|
|
236
|
+
<TextField id="modal-nip" />
|
|
237
|
+
</Field>
|
|
238
|
+
{Array.from({ length: (args.extraFields ?? 0) + (args.stepMotion ? WIZARD_MOTION_FIELDS[step] : 0) }, (_, index) => (
|
|
239
|
+
<Field key={index} label={`Poznámka ${index + 1}`}>
|
|
240
|
+
<TextField id={`modal-note-${index}`} />
|
|
241
|
+
</Field>
|
|
242
|
+
))}
|
|
243
|
+
</>
|
|
244
|
+
);
|
|
245
|
+
const wizardCommon = {
|
|
246
|
+
...common,
|
|
247
|
+
type: 'wizard' as const,
|
|
248
|
+
description: args.description,
|
|
249
|
+
stepIndicator,
|
|
250
|
+
actions: footerActions,
|
|
251
|
+
mobileAction,
|
|
252
|
+
stepKey: args.stepMotion ? step : undefined,
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
return step === 0 ? (
|
|
256
|
+
<Modal {...wizardCommon}>{body}</Modal>
|
|
257
|
+
) : (
|
|
258
|
+
<Modal
|
|
259
|
+
{...wizardCommon}
|
|
260
|
+
onBack={() => setStep(current => current - 1)}
|
|
261
|
+
backLabel="Zpět"
|
|
262
|
+
declineLink={
|
|
263
|
+
<TextLink variant="quiet" size="md" onClick={args.onClose}>
|
|
264
|
+
Nastavit později
|
|
265
|
+
</TextLink>
|
|
266
|
+
}
|
|
267
|
+
>
|
|
268
|
+
{body}
|
|
269
|
+
</Modal>
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
case 'corner':
|
|
273
|
+
return (
|
|
274
|
+
<Modal
|
|
275
|
+
{...common}
|
|
276
|
+
type="corner"
|
|
277
|
+
description={args.description}
|
|
278
|
+
actions={
|
|
279
|
+
<>
|
|
280
|
+
<Button variant="tertiary" size={ctaSize} onClick={args.onClose}>
|
|
281
|
+
Zavřít
|
|
282
|
+
</Button>
|
|
283
|
+
<Button variant="primary" size={ctaSize}>Exportovat</Button>
|
|
284
|
+
</>
|
|
285
|
+
}
|
|
286
|
+
>
|
|
287
|
+
<InvoiceTable />
|
|
288
|
+
</Modal>
|
|
289
|
+
);
|
|
290
|
+
case 'center':
|
|
291
|
+
default:
|
|
292
|
+
return (
|
|
293
|
+
<Modal
|
|
294
|
+
{...common}
|
|
295
|
+
type="center"
|
|
296
|
+
description={args.description}
|
|
297
|
+
actions={
|
|
298
|
+
<>
|
|
299
|
+
<Button variant="tertiary" size={ctaSize} onClick={args.onClose}>
|
|
300
|
+
Zrušit
|
|
301
|
+
</Button>
|
|
302
|
+
<Button variant="primary" size={ctaSize}>Odeslat</Button>
|
|
303
|
+
</>
|
|
304
|
+
}
|
|
305
|
+
>
|
|
306
|
+
<Field label="E-mail příjemce">
|
|
307
|
+
<TextField id="modal-recipient" defaultValue="ucetni@beta.cz" />
|
|
308
|
+
</Field>
|
|
309
|
+
<Field label="Předmět">
|
|
310
|
+
<TextField id="modal-subject" defaultValue="Faktura 2026-0142" />
|
|
311
|
+
</Field>
|
|
312
|
+
</Modal>
|
|
313
|
+
);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/** Representative title per Type, so every Matrix cell reads like a real dialog. */
|
|
318
|
+
const TITLE_FOR: Record<ModalType, string> = {
|
|
319
|
+
compact: 'Odeslat fakturu?',
|
|
320
|
+
marketing: 'Propojte účet s bankou',
|
|
321
|
+
center: 'Odeslat fakturu e‑mailem',
|
|
322
|
+
wizard: 'Nastavení KSeF',
|
|
323
|
+
corner: 'Neuhrazené faktury',
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
const DESCRIPTION_FOR: Record<ModalType, string | undefined> = {
|
|
327
|
+
compact: undefined,
|
|
328
|
+
marketing: undefined,
|
|
329
|
+
center: 'Beta s.r.o.',
|
|
330
|
+
wizard: undefined,
|
|
331
|
+
corner: 'Beta s.r.o.',
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* An in-page preview: the Modal portals into this box and renders non-modally, and the
|
|
336
|
+
* box's `transform` makes it the containing block of the card's and scrim's
|
|
337
|
+
* `position: fixed`. Many previews on one docs page then cost one document instead of
|
|
338
|
+
* one Storybook iframe each. The box follows the card's height.
|
|
339
|
+
*/
|
|
340
|
+
function PreviewCell({
|
|
341
|
+
label,
|
|
342
|
+
children,
|
|
343
|
+
}: {
|
|
344
|
+
label?: string;
|
|
345
|
+
children: (container: HTMLElement) => React.ReactNode;
|
|
346
|
+
}) {
|
|
347
|
+
const [container, setContainer] = React.useState<HTMLDivElement | null>(null);
|
|
348
|
+
const [height, setHeight] = React.useState(480);
|
|
349
|
+
|
|
350
|
+
React.useLayoutEffect(() => {
|
|
351
|
+
const card = container?.querySelector<HTMLElement>('[data-fods-component="modal"][data-fods-part="root"]');
|
|
352
|
+
if (!card) return undefined;
|
|
353
|
+
const observer = new ResizeObserver(() => setHeight(card.offsetHeight + PREVIEW_GUTTER * 2));
|
|
354
|
+
observer.observe(card);
|
|
355
|
+
return () => observer.disconnect();
|
|
356
|
+
}, [container]);
|
|
357
|
+
|
|
358
|
+
return (
|
|
359
|
+
<div className="flex w-full flex-col gap-300">
|
|
360
|
+
{label && <span className="text-body-sm font-semibold text-text-secondary">{label}</span>}
|
|
361
|
+
<div
|
|
362
|
+
ref={setContainer}
|
|
363
|
+
className="relative w-full overflow-hidden rounded-200 border-100 border-outline-default"
|
|
364
|
+
style={{ height, transform: 'translateZ(0)' }}
|
|
365
|
+
>
|
|
366
|
+
{container && children(container)}
|
|
367
|
+
</div>
|
|
368
|
+
</div>
|
|
369
|
+
);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
const meta = {
|
|
373
|
+
title: 'Design System/Organisms/Modal',
|
|
374
|
+
// Storybook 10 types `component` against the story args; the `type` union of ModalProps
|
|
375
|
+
// does not overlap the flat ModalStoryArgs, so cast through unknown.
|
|
376
|
+
component: Modal as unknown as ComponentType<ModalStoryArgs>,
|
|
377
|
+
parameters: {
|
|
378
|
+
layout: 'fullscreen',
|
|
379
|
+
// Radix portals the scrim and the card to <body>; the a11y addon has to scan the
|
|
380
|
+
// whole body to see role="dialog" at all.
|
|
381
|
+
a11y: { context: 'body' },
|
|
382
|
+
docs: {
|
|
383
|
+
description: {
|
|
384
|
+
component: componentDoc({
|
|
385
|
+
summary:
|
|
386
|
+
'The blocking dialog: one component, five chrome archetypes. Compact and Marketing carry no header or footer — visual, title, copy and the CTA row sit centred in the body and the close control floats in the corner. Center, Corner and Wizard have a pinned Heading Group header and a pinned footer Actions row — only the body scrolls; Center centres the title and the actions, Corner puts them in opposite corners, Wizard adds the stepper band. Below md every Type renders its Size=Mobile cell. Built on Radix Dialog, so focus trap, scroll lock, Esc and the portal come from the primitive.',
|
|
387
|
+
useCases: [
|
|
388
|
+
'`type` is chosen from the content pattern first (Confirmation → Compact, promo → Marketing, short form or notice with a header → Center, table / picker / dense form → Corner, multi-step → Wizard).',
|
|
389
|
+
'`size` is the desktop width sm 480 / md 640 / lg 834 / xl 1238, chosen once for the widest content. Recommended pairing: Compact→sm, Marketing→md, Center→lg, Corner→lg (xl for wide tables), Wizard→xl. Below md the Modal renders Size=Mobile instead.',
|
|
390
|
+
'`hasClose` is a real axis. It defaults on, except on Wizard, which forces a terminal choice.',
|
|
391
|
+
'`dismissOnBackdrop` gates Esc and scrim clicks. It defaults off for Wizard and for `role="alertdialog"` (the destructive Confirmation).',
|
|
392
|
+
],
|
|
393
|
+
bestPractices: [
|
|
394
|
+
'Pass Buttons in `actions` secondary first, primary last — the primary lands right-most in the cluster; the Mobile column reverses them so the primary comes first.',
|
|
395
|
+
'Give the Buttons `size="lg"` below md — the Mobile column wants Size=lg and the Modal does not resize them.',
|
|
396
|
+
'Use `role="alertdialog"` together with a `danger` Button for an irreversible confirm; never a blue primary and a destructive button in the same row.',
|
|
397
|
+
'Omit `onBack` on the first wizard step — the back Button is hidden, and the markers stay centred.',
|
|
398
|
+
'`closeLabel` defaults to «Zavřít»; supply it from the consumer\'s i18n layer on other markets, or when a surface needs a more specific name.',
|
|
399
|
+
],
|
|
400
|
+
knownIssues: [
|
|
401
|
+
'The body copy size (Body/Base) is a local value — the manifest leaves it unpublished.',
|
|
402
|
+
'Mobile switches on the viewport WIDTH (`useIsMobile(\'md\')`); the manifest says the viewport\'s SHORT side, so a landscape phone still gets the desktop cell.',
|
|
403
|
+
],
|
|
404
|
+
docsLink: { label: 'spec/05-organisms/modal.md' },
|
|
405
|
+
}),
|
|
406
|
+
},
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
argTypes: {
|
|
410
|
+
type: {
|
|
411
|
+
control: 'inline-radio',
|
|
412
|
+
options: TYPES,
|
|
413
|
+
description: 'Chrome archetype — decides which regions exist and where the CTA sits.',
|
|
414
|
+
},
|
|
415
|
+
size: {
|
|
416
|
+
control: 'inline-radio',
|
|
417
|
+
options: SIZES,
|
|
418
|
+
description: 'Desktop card width sm 480 / md 640 / lg 834 / xl 1238. Below md the Modal renders Size=Mobile.',
|
|
419
|
+
},
|
|
420
|
+
hasClose: { control: 'boolean', description: 'Shows the close control. Default true, Wizard false.' },
|
|
421
|
+
dismissOnBackdrop: {
|
|
422
|
+
control: 'boolean',
|
|
423
|
+
description: 'Esc / scrim click closes. Default true, Wizard and alertdialog false.',
|
|
424
|
+
},
|
|
425
|
+
pinnedFooter: {
|
|
426
|
+
control: 'boolean',
|
|
427
|
+
description: 'Code-only. Default true: the footer stays pinned and only the body scrolls. False: the footer scrolls with the body, reached at the end of the content.',
|
|
428
|
+
},
|
|
429
|
+
role: { control: 'inline-radio', options: ['dialog', 'alertdialog'] },
|
|
430
|
+
title: { control: 'text', description: 'Dialog title — also the accessible name.' },
|
|
431
|
+
description: { control: 'text', description: 'Scope line (Center / Corner / Wizard).' },
|
|
432
|
+
closeLabel: { control: 'text', description: 'Accessible name of the close control.' },
|
|
433
|
+
stepMotion: {
|
|
434
|
+
control: 'boolean',
|
|
435
|
+
description: 'Demo only (Wizard): passes the step as `stepKey`, so a step change animates the body and the card height.',
|
|
436
|
+
},
|
|
437
|
+
open: { control: 'boolean' },
|
|
438
|
+
},
|
|
439
|
+
args: {
|
|
440
|
+
open: true,
|
|
441
|
+
onClose: fn(),
|
|
442
|
+
type: 'compact',
|
|
443
|
+
size: 'sm',
|
|
444
|
+
role: 'dialog',
|
|
445
|
+
title: 'Odeslat fakturu?',
|
|
446
|
+
},
|
|
447
|
+
// On the docs page every story renders as an in-page preview; its own story page keeps
|
|
448
|
+
// the real modal (scroll lock, focus trap), which the runtime FODS pass measures.
|
|
449
|
+
render: (args, context) =>
|
|
450
|
+
context.viewMode === 'docs' ? (
|
|
451
|
+
<PreviewCell>{container => <ModalDemo {...args} previewContainer={container} />}</PreviewCell>
|
|
452
|
+
) : (
|
|
453
|
+
<ModalDemo {...args} />
|
|
454
|
+
),
|
|
455
|
+
} satisfies Meta<ModalStoryArgs>;
|
|
456
|
+
|
|
457
|
+
export default meta;
|
|
458
|
+
type Story = StoryObj<typeof meta>;
|
|
459
|
+
|
|
460
|
+
export const Playground: Story = {
|
|
461
|
+
parameters: {
|
|
462
|
+
docs: {
|
|
463
|
+
description: {
|
|
464
|
+
story:
|
|
465
|
+
'Every prop on controls, rendered open. Switching `type` swaps the representative content, because each Type accepts a different set of slots.',
|
|
466
|
+
},
|
|
467
|
+
},
|
|
468
|
+
},
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
export const Matrix: Story = {
|
|
472
|
+
parameters: {
|
|
473
|
+
layout: 'padded',
|
|
474
|
+
// Fifteen open dialogs in one document; a11y coverage lives on the single-instance stories.
|
|
475
|
+
a11y: { disable: true },
|
|
476
|
+
docs: {
|
|
477
|
+
description: {
|
|
478
|
+
story:
|
|
479
|
+
'Rows = Type, columns = Size sm–lg (xl is wider than the docs column and would shrink to it like lg; Mobile is viewport-driven — see the mobile stories) — each the LIVE component at its real width in a full-width preview box, at its own default Has close. The previews render non-modally (`previewContainer`), so fifteen instances can share one page without covering or `aria-hide`-ing each other.',
|
|
480
|
+
},
|
|
481
|
+
},
|
|
482
|
+
},
|
|
483
|
+
render: args => (
|
|
484
|
+
<Showcase>
|
|
485
|
+
{TYPES.map(type => (
|
|
486
|
+
<Section key={type} title={`Type = ${type}`} layout="column">
|
|
487
|
+
<div className="flex w-full flex-col gap-600">
|
|
488
|
+
{MATRIX_SIZES.map(size => (
|
|
489
|
+
<PreviewCell key={size} label={`${type} · ${size}`}>
|
|
490
|
+
{container => (
|
|
491
|
+
<ModalDemo
|
|
492
|
+
{...args}
|
|
493
|
+
type={type}
|
|
494
|
+
size={size}
|
|
495
|
+
title={TITLE_FOR[type]}
|
|
496
|
+
description={DESCRIPTION_FOR[type]}
|
|
497
|
+
previewContainer={container}
|
|
498
|
+
/>
|
|
499
|
+
)}
|
|
500
|
+
</PreviewCell>
|
|
501
|
+
))}
|
|
502
|
+
</div>
|
|
503
|
+
</Section>
|
|
504
|
+
))}
|
|
505
|
+
</Showcase>
|
|
506
|
+
),
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
export const HasClose: Story = {
|
|
510
|
+
name: 'Has close',
|
|
511
|
+
parameters: {
|
|
512
|
+
layout: 'padded',
|
|
513
|
+
a11y: { disable: true },
|
|
514
|
+
docs: {
|
|
515
|
+
description: {
|
|
516
|
+
story:
|
|
517
|
+
'The `Has close` axis, both values side by side, for the header Types (Center lg — the header padding switches between --space-1300 on both sides and the lg --space-900, the header height does not move; Corner lg — the reservation is on the end side only) and the body-only Types (Compact sm, Marketing md — the floating corner close).',
|
|
518
|
+
},
|
|
519
|
+
},
|
|
520
|
+
},
|
|
521
|
+
render: args => (
|
|
522
|
+
<Showcase>
|
|
523
|
+
{(['center', 'corner', 'compact', 'marketing'] as const).map(type => (
|
|
524
|
+
<Section key={type} title={`Type = ${type}`} layout="column">
|
|
525
|
+
<div className="flex w-full flex-col gap-600">
|
|
526
|
+
{HAS_CLOSE.map((value) => {
|
|
527
|
+
const size = ({ center: 'lg', corner: 'lg', compact: 'sm', marketing: 'md' } as const satisfies Record<typeof type, ModalSize>)[type];
|
|
528
|
+
return (
|
|
529
|
+
<PreviewCell key={value} label={`Has close = ${value}`}>
|
|
530
|
+
{container => (
|
|
531
|
+
<ModalDemo
|
|
532
|
+
{...args}
|
|
533
|
+
type={type}
|
|
534
|
+
size={size}
|
|
535
|
+
hasClose={value === 'True'}
|
|
536
|
+
title={TITLE_FOR[type]}
|
|
537
|
+
description={DESCRIPTION_FOR[type]}
|
|
538
|
+
previewContainer={container}
|
|
539
|
+
/>
|
|
540
|
+
)}
|
|
541
|
+
</PreviewCell>
|
|
542
|
+
);
|
|
543
|
+
})}
|
|
544
|
+
</div>
|
|
545
|
+
</Section>
|
|
546
|
+
))}
|
|
547
|
+
</Showcase>
|
|
548
|
+
),
|
|
549
|
+
};
|
|
550
|
+
|
|
551
|
+
export const Wizard: Story = {
|
|
552
|
+
args: {
|
|
553
|
+
type: 'wizard',
|
|
554
|
+
size: 'xl',
|
|
555
|
+
title: 'Nastavení KSeF',
|
|
556
|
+
},
|
|
557
|
+
parameters: {
|
|
558
|
+
docs: {
|
|
559
|
+
description: {
|
|
560
|
+
story:
|
|
561
|
+
'Step 1 has no «Zpět» and no decline link; «Další» moves to step 2, which shows the back Button with its arrow on the content edge and the decline link at the footer start. The title is left-aligned at every Size. Has close and Dismiss on backdrop both default off — «Zrušit» is the deliberate way out.',
|
|
562
|
+
},
|
|
563
|
+
},
|
|
564
|
+
},
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
export const WizardMotion: Story = {
|
|
568
|
+
name: 'Wizard — step motion',
|
|
569
|
+
args: { ...Wizard.args, stepMotion: true },
|
|
570
|
+
parameters: {
|
|
571
|
+
docs: {
|
|
572
|
+
description: {
|
|
573
|
+
story:
|
|
574
|
+
'Step change motion (manifest 6.4.1 `motion.layout`, `stepKey`) — press «Další» / «Zpět» or a Done marker. The outgoing step fades out on `--duration-fast` + `--easing-exit`, the card\'s height then follows the new step on `--spring-gentle`, and only then does the new step fade in on `--duration-slow` + `--easing-enter`; no slide, no scale. Clicking again mid-change retargets the height from where it is. Under reduced motion the height switches at once and the fades run on `--duration-instant`.',
|
|
575
|
+
},
|
|
576
|
+
},
|
|
577
|
+
},
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
export const WizardStepTwo: Story = {
|
|
581
|
+
name: 'Wizard — step 2',
|
|
582
|
+
args: { ...Wizard.args, step: 1 },
|
|
583
|
+
};
|
|
584
|
+
|
|
585
|
+
export const WizardWithClose: Story = {
|
|
586
|
+
name: 'Wizard — has close',
|
|
587
|
+
args: { ...Wizard.args, hasClose: true },
|
|
588
|
+
parameters: {
|
|
589
|
+
docs: {
|
|
590
|
+
description: {
|
|
591
|
+
story:
|
|
592
|
+
'Has close = True on the desktop Wizard: the close sits at the end of the header row, ahead of the step band in DOM and tab order. Dismiss on backdrop stays off — the close is an explicit choice, not a backdrop click.',
|
|
593
|
+
},
|
|
594
|
+
},
|
|
595
|
+
},
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
/*
|
|
599
|
+
* `chrome.mobile` — the Wizard below md. JS-switched on the viewport width
|
|
600
|
+
* (`useIsMobile('md')`), so the docs-page preview, which renders at the docs column's
|
|
601
|
+
* window width, shows the desktop band; open the story page.
|
|
602
|
+
*/
|
|
603
|
+
export const WizardMobile: Story = {
|
|
604
|
+
name: 'Wizard — mobile',
|
|
605
|
+
args: { ...Wizard.args, step: 1, extraFields: 6 },
|
|
606
|
+
globals: { viewport: { value: 'mobile' } },
|
|
607
|
+
parameters: {
|
|
608
|
+
docs: {
|
|
609
|
+
description: {
|
|
610
|
+
story:
|
|
611
|
+
'Below md (`chrome.mobile`): the Size=Mobile card fluid to the viewport at --space-400 / --space-700 margins, --space-700 region padding; the back arrow and the close are Icon Buttons in the header (the band «Zpět» is gone); the band holds only the bare markers across its full width; the footer is one column — the decline link over a single full-width primary Button, Size lg, no exit Button — pinned below the body. The body overflows here, so its cut edge carries the Edge mask, directly above the footer divider. Open the story page: the switch reads the viewport, not the preview box.',
|
|
612
|
+
},
|
|
613
|
+
},
|
|
614
|
+
},
|
|
615
|
+
};
|
|
616
|
+
|
|
617
|
+
export const WizardMobileStepOne: Story = {
|
|
618
|
+
name: 'Wizard — mobile, step 1',
|
|
619
|
+
args: { ...Wizard.args, step: 0 },
|
|
620
|
+
globals: { viewport: { value: 'mobile' } },
|
|
621
|
+
parameters: {
|
|
622
|
+
docs: {
|
|
623
|
+
description: {
|
|
624
|
+
story:
|
|
625
|
+
'Step 1 below md: no back arrow — the title starts at the header padding — and the close stays at the end of the row. The body fits, so there is no Edge mask.',
|
|
626
|
+
},
|
|
627
|
+
},
|
|
628
|
+
},
|
|
629
|
+
};
|
|
630
|
+
|
|
631
|
+
export const WizardMobileUnpinned: Story = {
|
|
632
|
+
name: 'Wizard — mobile, unpinned',
|
|
633
|
+
args: { ...Wizard.args, step: 1, extraFields: 6 },
|
|
634
|
+
globals: { viewport: { value: 'mobileShort' } },
|
|
635
|
+
parameters: {
|
|
636
|
+
viewport: {
|
|
637
|
+
options: {
|
|
638
|
+
// fods-lint-disable-next-line Storybook viewport preset (device size), dev-only chrome, not a runtime token
|
|
639
|
+
mobileShort: { name: 'Mobile — short (keyboard / landscape)', styles: { width: '375px', height: '480px' } },
|
|
640
|
+
},
|
|
641
|
+
},
|
|
642
|
+
docs: {
|
|
643
|
+
description: {
|
|
644
|
+
story:
|
|
645
|
+
'A short viewport (an open keyboard, a landscape phone): header, band and footer together take more than half of the dialog\'s height, so they unpin and the whole card scrolls in document order — header · band · body · footer. No Edge mask while unpinned: the scroll region no longer overflows on its own.',
|
|
646
|
+
},
|
|
647
|
+
},
|
|
648
|
+
},
|
|
649
|
+
};
|
|
650
|
+
|
|
651
|
+
export const Marketing: Story = {
|
|
652
|
+
args: {
|
|
653
|
+
type: 'marketing',
|
|
654
|
+
size: 'md',
|
|
655
|
+
title: 'Propojte účet s bankou',
|
|
656
|
+
withBanner: true,
|
|
657
|
+
},
|
|
658
|
+
parameters: {
|
|
659
|
+
docs: {
|
|
660
|
+
description: {
|
|
661
|
+
story:
|
|
662
|
+
'Full-bleed banner at the Promo visuals crop-zone ratio for the Size (md 631 : 380), Heading/H2 title, the brand CTA with a Secondary action beside it and the «Ne, děkuji» decline link beneath. The floating close keeps its surface over the image.',
|
|
663
|
+
},
|
|
664
|
+
},
|
|
665
|
+
},
|
|
666
|
+
};
|
|
667
|
+
|
|
668
|
+
export const CompactWithBanner: Story = {
|
|
669
|
+
name: 'Compact with banner',
|
|
670
|
+
args: {
|
|
671
|
+
type: 'compact',
|
|
672
|
+
size: 'sm',
|
|
673
|
+
title: 'Odeslat fakturu?',
|
|
674
|
+
withBanner: true,
|
|
675
|
+
},
|
|
676
|
+
parameters: {
|
|
677
|
+
docs: {
|
|
678
|
+
description: {
|
|
679
|
+
story:
|
|
680
|
+
'Compact takes the banner in place of the visual: the image runs full-bleed at the top of the card at the sm crop ratio, and the floating close keeps its surface over it.',
|
|
681
|
+
},
|
|
682
|
+
},
|
|
683
|
+
},
|
|
684
|
+
};
|
|
685
|
+
|
|
686
|
+
export const DestructiveConfirmation: Story = {
|
|
687
|
+
name: 'Destructive confirmation',
|
|
688
|
+
args: {
|
|
689
|
+
type: 'compact',
|
|
690
|
+
size: 'sm',
|
|
691
|
+
role: 'alertdialog',
|
|
692
|
+
dismissOnBackdrop: false,
|
|
693
|
+
title: 'Smazat fakturu?',
|
|
694
|
+
},
|
|
695
|
+
parameters: {
|
|
696
|
+
docs: {
|
|
697
|
+
description: {
|
|
698
|
+
story:
|
|
699
|
+
'`role="alertdialog"` with a `danger` action replacing the primary. Esc and the scrim do nothing — the user has to pick «Zrušit», «Smazat» or the close control.',
|
|
700
|
+
},
|
|
701
|
+
},
|
|
702
|
+
},
|
|
703
|
+
};
|
|
704
|
+
|
|
705
|
+
export const LongTitle: Story = {
|
|
706
|
+
name: 'Long title',
|
|
707
|
+
args: {
|
|
708
|
+
type: 'compact',
|
|
709
|
+
size: 'md',
|
|
710
|
+
title: 'Gemini_Generated_Image_n1c9vln1c9vln1c9vln1c9vln1c9.png',
|
|
711
|
+
},
|
|
712
|
+
parameters: {
|
|
713
|
+
docs: {
|
|
714
|
+
description: {
|
|
715
|
+
story:
|
|
716
|
+
'A user-supplied title such as a filename has no spaces: `wrap-anywhere` lets it wrap inside the word, so it never overflows the card. Manifest 6.5.0 `text.title`: the title wraps and is never truncated or clamped — copy keeps it within 2 lines (spec § Copy M3), so a longer string simply takes more lines. With no visual above it the title shares the row with the floating close, so it also takes the close footprint as symmetric padding (`px-1000`, `px-1100` on Mobile) and ends before the X.',
|
|
717
|
+
},
|
|
718
|
+
},
|
|
719
|
+
},
|
|
720
|
+
};
|
|
721
|
+
|
|
722
|
+
export const ScrollingBody: Story = {
|
|
723
|
+
name: 'Scrolling body',
|
|
724
|
+
args: {
|
|
725
|
+
type: 'center',
|
|
726
|
+
size: 'md',
|
|
727
|
+
title: 'Obchodní podmínky',
|
|
728
|
+
},
|
|
729
|
+
render: args => (
|
|
730
|
+
<Modal
|
|
731
|
+
open={args.open}
|
|
732
|
+
onClose={args.onClose}
|
|
733
|
+
type="center"
|
|
734
|
+
size={args.size}
|
|
735
|
+
title={args.title}
|
|
736
|
+
pinnedFooter={args.pinnedFooter}
|
|
737
|
+
actions={
|
|
738
|
+
<>
|
|
739
|
+
<Button variant="tertiary" onClick={args.onClose}>
|
|
740
|
+
Zrušit
|
|
741
|
+
</Button>
|
|
742
|
+
<Button variant="primary">Souhlasím</Button>
|
|
743
|
+
</>
|
|
744
|
+
}
|
|
745
|
+
>
|
|
746
|
+
{Array.from({ length: 24 }, (_, index) => (
|
|
747
|
+
<p key={index}>
|
|
748
|
+
{`${index + 1}. Faktura bude vystavena do 15 dnů od uskutečnění zdanitelného plnění a odeslána na e‑mail uvedený v objednávce.`}
|
|
749
|
+
</p>
|
|
750
|
+
))}
|
|
751
|
+
</Modal>
|
|
752
|
+
),
|
|
753
|
+
parameters: {
|
|
754
|
+
docs: {
|
|
755
|
+
description: {
|
|
756
|
+
story:
|
|
757
|
+
'Content taller than the viewport: the card caps at the viewport minus the frame margins and only the body scrolls — the header and the footer with its actions stay pinned (6.2.0). While the body overflows and is not scrolled to its end, the Edge mask sits directly above the footer divider. Scroll down: a second Edge mask appears directly under the header divider once the body leaves its start (6.3.0).',
|
|
758
|
+
},
|
|
759
|
+
},
|
|
760
|
+
},
|
|
761
|
+
};
|
|
762
|
+
|
|
763
|
+
export const ScrollingFooter: Story = {
|
|
764
|
+
...ScrollingBody,
|
|
765
|
+
name: 'Scrolling body — footer not pinned',
|
|
766
|
+
args: { ...ScrollingBody.args, pinnedFooter: false },
|
|
767
|
+
parameters: {
|
|
768
|
+
docs: {
|
|
769
|
+
description: {
|
|
770
|
+
story:
|
|
771
|
+
'`pinnedFooter={false}`: the footer joins the scroll region and is reached at the end of the content. The Edge mask then sits at the card\'s bottom edge and disappears at the end of the scroll, so it never lies over the actions.',
|
|
772
|
+
},
|
|
773
|
+
},
|
|
774
|
+
},
|
|
775
|
+
};
|
|
776
|
+
|
|
777
|
+
export const Mobile: Story = {
|
|
778
|
+
args: {
|
|
779
|
+
type: 'compact',
|
|
780
|
+
size: 'sm',
|
|
781
|
+
role: 'alertdialog',
|
|
782
|
+
title: 'Smazat fakturu?',
|
|
783
|
+
},
|
|
784
|
+
globals: { viewport: { value: 'mobile' } },
|
|
785
|
+
parameters: {
|
|
786
|
+
docs: {
|
|
787
|
+
description: {
|
|
788
|
+
story:
|
|
789
|
+
'Size=Mobile on Compact: the card keeps --space-400 side margins to the viewport, the body pads --space-700, the close sits 20 from the corner with a 44 hit area, and the CTA pair is a full-width column of Size=lg Buttons with the primary first in DOM order.',
|
|
790
|
+
},
|
|
791
|
+
},
|
|
792
|
+
},
|
|
793
|
+
};
|
|
794
|
+
|
|
795
|
+
export const CenterMobile: Story = {
|
|
796
|
+
name: 'Center — mobile',
|
|
797
|
+
args: {
|
|
798
|
+
type: 'center',
|
|
799
|
+
size: 'md',
|
|
800
|
+
title: TITLE_FOR.center,
|
|
801
|
+
description: DESCRIPTION_FOR.center,
|
|
802
|
+
},
|
|
803
|
+
globals: { viewport: { value: 'mobile' } },
|
|
804
|
+
parameters: {
|
|
805
|
+
docs: {
|
|
806
|
+
description: {
|
|
807
|
+
story:
|
|
808
|
+
'Size=Mobile on Center, whatever its desktop Size (md here): --space-700 region padding, the header reserving --space-1200 for the close, which sits 20 from the card corner; the centred title keeps its alignment and the footer Actions become a full-width column, primary first.',
|
|
809
|
+
},
|
|
810
|
+
},
|
|
811
|
+
},
|
|
812
|
+
};
|
|
813
|
+
|
|
814
|
+
export const MarketingMobile: Story = {
|
|
815
|
+
name: 'Marketing — mobile',
|
|
816
|
+
args: {
|
|
817
|
+
type: 'marketing',
|
|
818
|
+
size: 'md',
|
|
819
|
+
title: TITLE_FOR.marketing,
|
|
820
|
+
withBanner: true,
|
|
821
|
+
},
|
|
822
|
+
globals: { viewport: { value: 'mobile' } },
|
|
823
|
+
parameters: {
|
|
824
|
+
docs: {
|
|
825
|
+
description: {
|
|
826
|
+
story:
|
|
827
|
+
'Size=Mobile on Marketing: the full-bleed banner takes the Promo visuals mobile crop ratio 358 : 246, the body pads --space-700 and the CTAs stack in a full-width column, primary first.',
|
|
828
|
+
},
|
|
829
|
+
},
|
|
830
|
+
},
|
|
831
|
+
};
|
|
832
|
+
|
|
833
|
+
export const CornerMobile: Story = {
|
|
834
|
+
name: 'Corner — mobile',
|
|
835
|
+
args: {
|
|
836
|
+
type: 'corner',
|
|
837
|
+
size: 'lg',
|
|
838
|
+
title: 'Neuhrazené faktury',
|
|
839
|
+
description: 'Beta s.r.o.',
|
|
840
|
+
},
|
|
841
|
+
globals: { viewport: { value: 'mobile' } },
|
|
842
|
+
parameters: {
|
|
843
|
+
docs: {
|
|
844
|
+
description: {
|
|
845
|
+
story:
|
|
846
|
+
'Size=Mobile on a header Type, whatever its desktop Size (lg here): --space-700 region padding, the header reserving --space-1200 for the close, which sits 20 from the card corner; the footer Actions become a full-width column, primary first, pinned below the body.',
|
|
847
|
+
},
|
|
848
|
+
},
|
|
849
|
+
},
|
|
850
|
+
};
|
|
851
|
+
|
|
852
|
+
/** Opens and closes the card on demand, so its enter and exit can be watched. */
|
|
853
|
+
function MotionDemo({ previewContainer, ...args }: ModalStoryArgs & { previewContainer?: HTMLElement }) {
|
|
854
|
+
const [open, setOpen] = React.useState(false);
|
|
855
|
+
return (
|
|
856
|
+
<div className="flex justify-center p-600">
|
|
857
|
+
<Button variant="secondary" onClick={() => setOpen(true)}>
|
|
858
|
+
Otevřít modal
|
|
859
|
+
</Button>
|
|
860
|
+
<ModalDemo {...args} previewContainer={previewContainer} open={open} onClose={() => setOpen(false)} />
|
|
861
|
+
</div>
|
|
862
|
+
);
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
export const Motion: Story = {
|
|
866
|
+
args: { open: false },
|
|
867
|
+
parameters: {
|
|
868
|
+
docs: {
|
|
869
|
+
description: {
|
|
870
|
+
story:
|
|
871
|
+
'Enter / exit motion (manifest 6.4.1 `motion`) — press «Otevřít modal», then close with Esc, the scrim or the close control. On desktop sizes the card fades in and grows from `scale(0.98)` on `--spring-gentle` and shrinks back on exit; below md (switch the viewport to Mobile) it rises from below the bottom edge, fully opaque, and falls back the same way. The scrim fades on `--duration-slow`. Closing while it is still opening reverses from where it is. Under `prefers-reduced-motion: reduce` (emulate it in DevTools → Rendering) the card and the scrim only fade, on `--duration-instant`.',
|
|
872
|
+
},
|
|
873
|
+
},
|
|
874
|
+
},
|
|
875
|
+
render: (args, context) =>
|
|
876
|
+
context.viewMode === 'docs' ? (
|
|
877
|
+
<PreviewCell>{container => <MotionDemo {...args} previewContainer={container} />}</PreviewCell>
|
|
878
|
+
) : (
|
|
879
|
+
<MotionDemo {...args} />
|
|
880
|
+
),
|
|
881
|
+
};
|