@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,305 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { tv, type VariantProps } from '../../internal/tailwind-variants';
|
|
4
|
+
import { cn } from '../../internal/utils';
|
|
5
|
+
/*
|
|
6
|
+
* REUSE, do not re-export from Figma. `chrome.pattern.asset` says explicitly:
|
|
7
|
+
* "REUSE the tile already in the frontend assets — it is the same artwork that
|
|
8
|
+
* ships today on the homepage hero and the banners there." In this package that tile
|
|
9
|
+
* is `styles/assets/pattern-dark.svg`, and `styles/promo-surface.css` paints it through
|
|
10
|
+
* `background-image` on `.fods-promo-surface-pattern` — no asset is imported in
|
|
11
|
+
* JavaScript. The tile is never re-cut or recoloured per surface — only its opacity moves.
|
|
12
|
+
*
|
|
13
|
+
* It IS fully opaque, which the same block requires: "A tile carrying its own alpha
|
|
14
|
+
* multiplies into every one of the four values at once, so a consumer cannot correct it
|
|
15
|
+
* per surface without breaking the parity the values exist to hold."
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* PromoSurface — the promo plaque (`promo-surface.manifest.json`, atom, v1.5.0).
|
|
20
|
+
*
|
|
21
|
+
* The BOTTOM layer of a promotional panel on a public page: it paints the fill, the
|
|
22
|
+
* tiled pattern and the veil that keeps the reading area clear. Consumed by Hero and
|
|
23
|
+
* Banner through an instance swap, so choosing a tone here never multiplies either
|
|
24
|
+
* consumer's own variant matrix.
|
|
25
|
+
*
|
|
26
|
+
* It is chrome only. Per `delivery.react` it is "a presentational element with no
|
|
27
|
+
* children and no ARIA role" — the consumer composes its text column and visual as a
|
|
28
|
+
* SIBLING layer ABOVE the surface, never inside it. Hence `children` and `role` are
|
|
29
|
+
* omitted from the props type: the contract is enforced by the compiler, not by a
|
|
30
|
+
* comment.
|
|
31
|
+
*
|
|
32
|
+
* Two equally-ranked axes, 12 cells (`intent.variants`):
|
|
33
|
+
* - `layout` — Vertical / Side / Top. Sets the veil geometry, i.e. WHERE the plaque
|
|
34
|
+
* stays clear of the pattern. Picked from where the copy sits, never from the
|
|
35
|
+
* breakpoint (`intent.rules[0]`).
|
|
36
|
+
* - `surface` — Brand / Utility / Solid / Inverse. Sets the fill, and with it the ink
|
|
37
|
+
* the consumer must use on top (`chrome.ink`): Brand and Utility take
|
|
38
|
+
* `--text-primary`, Solid `--secondary-foreground`, Inverse `--text-inverted`.
|
|
39
|
+
*
|
|
40
|
+
* No `size` axis (`intent.sizing`) and no states (`intent.states`) — a background
|
|
41
|
+
* plaque has no interaction and no lifecycle. No motion of its own, so this file
|
|
42
|
+
* declares no animation class. (`tailwindcss-animate` is not installed in this repo,
|
|
43
|
+
* so `animate-in` / `fade-in-*` would generate zero CSS anyway.)
|
|
44
|
+
*
|
|
45
|
+
* The component takes NO width or height of its own (`delivery.react`: "Both painted
|
|
46
|
+
* layers fill the panel on both axes; the component takes no width or height of its
|
|
47
|
+
* own"). The consumer positions it — typically `className="absolute inset-0"` inside a
|
|
48
|
+
* `relative` panel. A fixed-height surface is the canonical breakage (`intent.sizing`).
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
/*
|
|
52
|
+
* Painted pattern tile size — 149.33px x 156px, from `chrome.pattern.tile-size`:
|
|
53
|
+
* "1280 x 669 px natural, painted at scalingFactor 0.7 (so 896 x 468 px on the
|
|
54
|
+
* plaque)". That 896 x 468 image is a PRE-COMPOSED sheet of 6 x 3 repeats of the same
|
|
55
|
+
* motif, so one tile is 896 / 6 = 149.33 and 468 / 3 = 156. The check: 149.33 / 156 =
|
|
56
|
+
* 0.9573, and the `pattern-dark.svg` viewBox is 220 x 229.9 = 0.9569 — the same
|
|
57
|
+
* aspect ratio, which is what confirms the 6 x 3 reading. Rotation 0, tiled on both
|
|
58
|
+
* axes. The value itself lives in `styles/promo-surface.css` (raw px belong in CSS,
|
|
59
|
+
* not in a Tailwind arbitrary class).
|
|
60
|
+
*/
|
|
61
|
+
|
|
62
|
+
const promoSurfaceVariants = tv({
|
|
63
|
+
slots: {
|
|
64
|
+
/*
|
|
65
|
+
* `relative` so the pattern layer has a positioned ancestor even when the consumer
|
|
66
|
+
* hands the root a `size-full` rather than an `absolute inset-0` (both are in the
|
|
67
|
+
* same tailwind-merge `position` group, so a consumer `absolute` wins cleanly).
|
|
68
|
+
* `overflow-hidden` clips the tile to the radius. `pointer-events-none`: see the
|
|
69
|
+
* a11y note on the root element below. Deliberately NO width, height or inset —
|
|
70
|
+
* `delivery.react` gives those to the consumer.
|
|
71
|
+
*/
|
|
72
|
+
root: 'pointer-events-none relative overflow-hidden rounded-800',
|
|
73
|
+
/*
|
|
74
|
+
* `fods-promo-surface-pattern` carries the tile (`background-image`), the veil mask,
|
|
75
|
+
* the tile size and `background-repeat` (see `styles/promo-surface.css`). Only the
|
|
76
|
+
* six veil custom properties are handed over inline, because they are per-instance
|
|
77
|
+
* values a stylesheet cannot know: the geometry and the edge alpha.
|
|
78
|
+
*/
|
|
79
|
+
pattern: 'fods-promo-surface-pattern absolute inset-0',
|
|
80
|
+
},
|
|
81
|
+
variants: {
|
|
82
|
+
/*
|
|
83
|
+
* Fill from `chrome.fill`, pattern opacity from `chrome.pattern.opacity`. Classes
|
|
84
|
+
* resolved through the theme mapping, where the mapping is NOT
|
|
85
|
+
* identity: `--bg-secondary` is the key `background-secondary`, hence
|
|
86
|
+
* `bg-background-secondary` — `bg-secondary` would be a different token, and
|
|
87
|
+
* `bg-primary` is the brand ORANGE.
|
|
88
|
+
*
|
|
89
|
+
* Pattern strength is a per-surface constant, never an instance control
|
|
90
|
+
* (`intent.rules[2]`): the four values are tuned so all four plaques read at one
|
|
91
|
+
* weight by eye, so there is no `opacity` prop to retune it locally.
|
|
92
|
+
*
|
|
93
|
+
* The opacities below are the manifest numbers VERBATIM. They used to be doubled:
|
|
94
|
+
* `chrome.pattern.opacity` is measured against a fully opaque tile, and the repo tile
|
|
95
|
+
* drew its #226FA1 strokes at `fill-opacity: 0.5`, so painting this layer at the
|
|
96
|
+
* manifest number composited at half the specified strength (~1.9x too faint,
|
|
97
|
+
* near-invisible on Brand and Utility). 1.2.0 resolved that on the asset side rather
|
|
98
|
+
* than in the number — `chrome.pattern.asset` now REQUIRES an opaque tile, "opacity
|
|
99
|
+
* stays the only dial" — and the tile was re-cut without
|
|
100
|
+
* the built-in alpha.
|
|
101
|
+
*
|
|
102
|
+
* These values are measured BEFORE the veil: what reaches the eye is the value
|
|
103
|
+
* multiplied by `chrome.veil.stops.edge` (0.70 / 0.50 / 1 / 1).
|
|
104
|
+
*
|
|
105
|
+
* 1.3.0 RETUNED the four numbers in Figma — Brand 0.06 -> 0.03, Utility 0.06 ->
|
|
106
|
+
* 0.03, Solid 0.29 -> 0.20, Inverse 0.22 -> 0.20, so the two dark surfaces now
|
|
107
|
+
* share one value. The veil stops, the geometry, the tile asset and the scale are
|
|
108
|
+
* all unchanged; only the strength moved, and it is still a per-surface constant
|
|
109
|
+
* read at the tile.
|
|
110
|
+
*
|
|
111
|
+
* 1.4.0 STRENGTHENED all four — Brand and Utility 0.03 -> 0.08, Solid and Inverse
|
|
112
|
+
* 0.20 -> 0.25; the light pair and the dark pair each still share one value. Veil,
|
|
113
|
+
* geometry, tile and scale unchanged. 0.08 matches --opacity-08 in the ui-system
|
|
114
|
+
* scale, but the manifest states it as a bare number and the theme has no opacity
|
|
115
|
+
* utility for it, so all four stay arbitrary values.
|
|
116
|
+
*/
|
|
117
|
+
surface: {
|
|
118
|
+
/* --secondary-subtle, chrome.pattern.opacity.Brand */
|
|
119
|
+
brand: { root: 'bg-secondary-subtle', pattern: 'opacity-[0.08]' },
|
|
120
|
+
/* --bg-secondary, chrome.pattern.opacity.Utility */
|
|
121
|
+
utility: { root: 'bg-background-secondary', pattern: 'opacity-[0.08]' },
|
|
122
|
+
/* --secondary-solid (blue/600, the bright brand fill), chrome.pattern.opacity.Solid */
|
|
123
|
+
solid: { root: 'bg-secondary-solid', pattern: 'opacity-[0.25]' },
|
|
124
|
+
/* --bg-inverse (blue/900, the deep one), chrome.pattern.opacity.Inverse */
|
|
125
|
+
inverse: { root: 'bg-background-inverse', pattern: 'opacity-[0.25]' },
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
defaultVariants: {
|
|
129
|
+
/* `properties[].default` = Brand */
|
|
130
|
+
surface: 'brand',
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Layout — the veil geometry axis (`axes.variant`, default Vertical).
|
|
136
|
+
*
|
|
137
|
+
* Recorded under `axes.variant` only because the manifest schema's axis keys are
|
|
138
|
+
* fixed; `properties[].maps` overrides that and is explicit: this is NOT the generic
|
|
139
|
+
* `variant` prop, because "the component has two equally-ranked tone axes and neither
|
|
140
|
+
* is 'the' variant". Values are lowercase-kebab; the Figma casing never reaches code.
|
|
141
|
+
*/
|
|
142
|
+
export type PromoSurfaceLayout = 'vertical' | 'side' | 'top';
|
|
143
|
+
|
|
144
|
+
/** Surface — the fill / tone axis (`axes.surface`, default Brand). */
|
|
145
|
+
export type PromoSurfaceSurface = 'brand' | 'utility' | 'solid' | 'inverse';
|
|
146
|
+
|
|
147
|
+
/*
|
|
148
|
+
* Veil geometry per Layout, verbatim from `chrome.veil.geometry`.
|
|
149
|
+
*
|
|
150
|
+
* `chrome.veil.css.shape` maps it onto CSS one-to-one: the shape is an ellipse, the
|
|
151
|
+
* "reach" IS the gradient's RADIUS (not its diameter), and the two reach numbers are
|
|
152
|
+
* the x and y radii as percentages of the panel's own width and height. `cx` / `cy`
|
|
153
|
+
* are the gradient centre; `mid` is the position of the 0.18 stop as a percentage of
|
|
154
|
+
* that radius (`chrome.veil.stops.mid`).
|
|
155
|
+
*
|
|
156
|
+
* A reach above 100% runs past the panel edge, so the outermost stop is never reached
|
|
157
|
+
* inside the visible area — deliberate on Side and Top, which fade rather than
|
|
158
|
+
* complete (`chrome.veil.css.note`).
|
|
159
|
+
*
|
|
160
|
+
* On `top`: the sign of `cy` is NOT flipped. The Layout=Top variant in the Figma
|
|
161
|
+
* variant set renders mirrored against its own gradientTransform, but the manifest
|
|
162
|
+
* numbers AND both real consumers (Hero MD, Hero Mobile) put the clear band at the
|
|
163
|
+
* TOP with the pattern building DOWNWARD. In the order of authority (manifest, then
|
|
164
|
+
* the prose spec, then a render), `chrome.veil.geometry` outranks a Figma render,
|
|
165
|
+
* so the manifest wins: core at 22% of the height, pattern strengthening below it.
|
|
166
|
+
*/
|
|
167
|
+
const VEIL_GEOMETRY: Record<
|
|
168
|
+
PromoSurfaceLayout,
|
|
169
|
+
{ cx: string; cy: string; rx: string; ry: string; mid: string }
|
|
170
|
+
> = {
|
|
171
|
+
/* Clear band down the middle, pattern strongest along the left and right edges. */
|
|
172
|
+
vertical: { cx: '50%', cy: '50%', rx: '50%', ry: '83%', mid: '57%' },
|
|
173
|
+
/* Clear at the left, pattern building toward the right edge. */
|
|
174
|
+
side: { cx: '9%', cy: '50%', rx: '91%', ry: '159%', mid: '45%' },
|
|
175
|
+
/* Clear band across the top, pattern building downward from around mid-height. */
|
|
176
|
+
top: { cx: '50%', cy: '22%', rx: '250%', ry: '38%', mid: '45%' },
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
/*
|
|
180
|
+
* Outermost veil stop per Surface, from `chrome.veil.stops.edge` (0.7 / 0.5 / 1 / 1),
|
|
181
|
+
* written as a percentage because the mask is built with `color-mix`, which takes a
|
|
182
|
+
* percentage — see `styles/promo-surface.css`.
|
|
183
|
+
*
|
|
184
|
+
* This carries the second half of the per-surface strength tuning (`chrome.veil.note`):
|
|
185
|
+
* the two light plaques hold the pattern back, the two dark ones reveal it fully and
|
|
186
|
+
* are dialled at the tile's opacity instead.
|
|
187
|
+
*/
|
|
188
|
+
const VEIL_EDGE_ALPHA: Record<PromoSurfaceSurface, string> = {
|
|
189
|
+
brand: '70%',
|
|
190
|
+
utility: '50%',
|
|
191
|
+
solid: '100%',
|
|
192
|
+
inverse: '100%',
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
export interface PromoSurfaceProps
|
|
196
|
+
extends Omit<React.HTMLAttributes<HTMLDivElement>, 'role' | 'children'>,
|
|
197
|
+
VariantProps<typeof promoSurfaceVariants> {
|
|
198
|
+
/**
|
|
199
|
+
* Which part of the plaque the veil keeps clear of the pattern. Pick it from where
|
|
200
|
+
* the copy sits, never from the breakpoint (`intent.rules[0]`).
|
|
201
|
+
* - `vertical` — clears a band down the middle; a wide panel with centred copy.
|
|
202
|
+
* - `side` — clears the left; copy in a left-hand column with a visual opposite.
|
|
203
|
+
* - `top` — clears a band across the top; a tall stacked panel, copy above the visual.
|
|
204
|
+
*/
|
|
205
|
+
layout?: PromoSurfaceLayout;
|
|
206
|
+
/**
|
|
207
|
+
* The plaque's fill, and with it the ink the consumer must use on top
|
|
208
|
+
* (`chrome.ink`). Mixing one surface's fill with another's ink is the failure this
|
|
209
|
+
* axis exists to prevent (`intent.rules[1]`).
|
|
210
|
+
* - `brand` / `utility` — light plaques; content takes `--text-primary`.
|
|
211
|
+
* - `solid` — the bright brand fill; content takes `--secondary-foreground`.
|
|
212
|
+
* - `inverse` — the deep fill; content takes `--text-inverted`.
|
|
213
|
+
*
|
|
214
|
+
* On both dark plaques the default focus ring is invisible or under the 3:1
|
|
215
|
+
* non-text floor, so anything focusable the consumer composes on top must swap to
|
|
216
|
+
* `--outline-focus-inverse` (manifest `gaps[0]`, resolved). That obligation belongs
|
|
217
|
+
* to the consumer — this atom holds no focus itself.
|
|
218
|
+
*/
|
|
219
|
+
surface?: PromoSurfaceSurface;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
const PromoSurface = React.forwardRef<HTMLDivElement, PromoSurfaceProps>(
|
|
223
|
+
({ className, layout = 'vertical', surface = 'brand', ...props }, ref) => {
|
|
224
|
+
const slots = promoSurfaceVariants({ surface });
|
|
225
|
+
const geometry = VEIL_GEOMETRY[layout];
|
|
226
|
+
|
|
227
|
+
/*
|
|
228
|
+
* Built in a variable rather than inline in JSX, and deliberately colour-free:
|
|
229
|
+
* five percentages and one percentage alpha (the tile's url() lives in the
|
|
230
|
+
* stylesheet). The mask's own black is an alpha channel with no token, and lives in
|
|
231
|
+
* the stylesheet.
|
|
232
|
+
*/
|
|
233
|
+
const patternStyle = {
|
|
234
|
+
'--promo-veil-cx': geometry.cx,
|
|
235
|
+
'--promo-veil-cy': geometry.cy,
|
|
236
|
+
'--promo-veil-rx': geometry.rx,
|
|
237
|
+
'--promo-veil-ry': geometry.ry,
|
|
238
|
+
'--promo-veil-mid': geometry.mid,
|
|
239
|
+
'--promo-veil-edge': VEIL_EDGE_ALPHA[surface],
|
|
240
|
+
} as React.CSSProperties;
|
|
241
|
+
|
|
242
|
+
/*
|
|
243
|
+
* The accessibility floor of FODS components, walked row by row.
|
|
244
|
+
*
|
|
245
|
+
* ROWS THAT APPLY:
|
|
246
|
+
*
|
|
247
|
+
* 1. "Dekorativní ikony — aria-hidden='true'; přístupné jméno nese label/text."
|
|
248
|
+
* The whole component is decorative: `chrome.pattern` and `chrome.veil` are
|
|
249
|
+
* ornament, the spec's `## Accessibility` says "The pattern tile and veil are
|
|
250
|
+
* decorative", and the element renders no text at all. So `aria-hidden="true"`
|
|
251
|
+
* on the root removes both painted layers from the a11y tree. There is no
|
|
252
|
+
* accessible name to carry, because there is nothing to name — the consumer's
|
|
253
|
+
* sibling content above the surface owns all of it.
|
|
254
|
+
*
|
|
255
|
+
* 2. "Jakákoli role bez viditelného textu → přístupné jméno vynucené
|
|
256
|
+
* v TypeScriptu." Handled by NOT having a role: `delivery.react` says "no
|
|
257
|
+
* children and no ARIA role", so no `role` is set and `'role'` is `Omit`ted from
|
|
258
|
+
* the props type, which makes an accidental `role="group"` (which axe would NOT
|
|
259
|
+
* report — see the same row) a compile error. That is why the row is satisfied
|
|
260
|
+
* by construction rather than by a name union.
|
|
261
|
+
*
|
|
262
|
+
* 3. "Focus je vidět / Vše interaktivní — focus ring". The spec's
|
|
263
|
+
* `## Accessibility` says "Not part of the tab order", and there is no
|
|
264
|
+
* focusable element here: no tabindex, no interactive child, and `aria-hidden`
|
|
265
|
+
* would make one a violation. The related obligation is real but belongs to the
|
|
266
|
+
* consumer, and is documented on the `surface` prop above (`gaps[0]`:
|
|
267
|
+
* `--outline-focus-inverse` on the two dark fills).
|
|
268
|
+
*
|
|
269
|
+
* 4. A QA-checklist row, generalised from "Disabled kompozit — nic nesmí zůstat
|
|
270
|
+
* operovatelné": `pointer-events-none` on the root (see `slots.root`). An
|
|
271
|
+
* `aria-hidden` layer that still swallows clicks is the same class of defect as
|
|
272
|
+
* a disabled control that stays clickable — here the surface is positioned OVER
|
|
273
|
+
* the panel and UNDER the consumer's content, so without it the plaque could
|
|
274
|
+
* intercept clicks meant for the copy and CTA composed above it.
|
|
275
|
+
*
|
|
276
|
+
* ROWS THAT DO NOT APPLY — all for one reason: this component is not interactive
|
|
277
|
+
* and renders no text. No icon-only control, no loading state, no `disabled` (and
|
|
278
|
+
* so nothing to propagate: there is not a single nested `<button>`, `<input>`,
|
|
279
|
+
* `<a>` or Radix trigger in this file), no text field, no error state, no
|
|
280
|
+
* checkbox / radio / radiogroup, no deletable chip, no counter or status text, no
|
|
281
|
+
* `aria-expanded`, no `aria-live`, and no overridden library subcomponent.
|
|
282
|
+
*/
|
|
283
|
+
return (
|
|
284
|
+
<div
|
|
285
|
+
ref={ref}
|
|
286
|
+
aria-hidden="true"
|
|
287
|
+
data-fods-component="promo-surface"
|
|
288
|
+
data-fods-part="root"
|
|
289
|
+
className={cn(slots.root(), className)}
|
|
290
|
+
{...props}
|
|
291
|
+
>
|
|
292
|
+
{/*
|
|
293
|
+
* Layer order, from `chrome.layers`: "panel fill, then pattern tile, then veil
|
|
294
|
+
* mask on top of the pattern". Three layers, two DOM nodes — the fill is the
|
|
295
|
+
* root's own background, and the veil is this node's `mask-image`, which by
|
|
296
|
+
* definition sits above the `background-image` it masks.
|
|
297
|
+
*/}
|
|
298
|
+
<span data-fods-part="pattern" className={slots.pattern()} style={patternStyle} />
|
|
299
|
+
</div>
|
|
300
|
+
);
|
|
301
|
+
},
|
|
302
|
+
);
|
|
303
|
+
PromoSurface.displayName = 'PromoSurface';
|
|
304
|
+
|
|
305
|
+
export { PromoSurface, promoSurfaceVariants };
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { Meta, Canvas, Controls } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as RadioStories from './Radio.stories';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
<Meta of={RadioStories} tags={['autodocs']} />
|
|
6
|
+
|
|
7
|
+
# Radio
|
|
8
|
+
|
|
9
|
+
## Metadata
|
|
10
|
+
|
|
11
|
+
- **Layer:** atom
|
|
12
|
+
- **Status:** stable
|
|
13
|
+
- **Tokens used:** `--bg-primary`, `--border-width-100`, `--border-width-200`, `--disabled-control`, `--disabled-foreground`, `--font-size-base`, `--font-size-sm`, `--font-size-xs`, `--leading-loose`, `--leading-relaxed`, `--outline-default`, `--outline-focus`, `--outline-strong`, `--radius-full`, `--secondary`, `--secondary-foreground`, `--secondary-hover`, `--secondary-solid`, `--space-100`, `--space-300`, `--space-400`, `--space-600`, `--space-700`, `--space-900`, `--status-danger`, `--text-primary`, `--text-secondary`
|
|
14
|
+
- **Manifest version:** `1.7.1`
|
|
15
|
+
|
|
16
|
+
## Overview
|
|
17
|
+
|
|
18
|
+
A selection control for choosing **exactly one** option within a group. Use a Radio group for a small, fixed set of **mutually exclusive** options the user picks one of: billing period ("Měsíčně" / "Ročně"), rounding mode, or a yes/no that benefits from showing both choices. One option is selected at a time — selecting another deselects the previous.
|
|
19
|
+
|
|
20
|
+
Do **not** use it for independent on/off choices or multi-select (→ [Checkbox](?path=/docs/design-system-atoms-checkbox--docs)), for more than ~5–7 options (→ Select, future), or for a single binary best shown as one control (→ Checkbox or Toggle). A **lone radio is a modelling bug** — a single exclusive control should be a Checkbox.
|
|
21
|
+
|
|
22
|
+
## Rationale
|
|
23
|
+
|
|
24
|
+
A radio is the [Checkbox](?path=/docs/design-system-atoms-checkbox--docs)'s exclusive twin, so it inherits the same **filled-blue selection language** (selected = `--secondary-solid` fill + white centre dot) for one consistent control family — the only shape difference is the circle. Promoting it as a named atom codifies three things:
|
|
25
|
+
|
|
26
|
+
1. **One selection family with Checkbox** — selected reads as `--secondary-solid` + a white centre mark, so a radio and a checkbox never look like two unrelated controls.
|
|
27
|
+
2. **The focus ring, disabled, and group-level error treatments.**
|
|
28
|
+
3. **A radio only ever exists in a group.** The rule is encoded: a lone radio is a bug — use a Checkbox. Composition happens via [RadioGroup](?path=/docs/design-system-atoms-radiogroup--docs), which owns the shared `name` and the value — and gets the group's one-tab-stop keyboard behaviour from that shared `name`, not from a key handler.
|
|
29
|
+
|
|
30
|
+
## Anatomy
|
|
31
|
+
|
|
32
|
+
A horizontal row: **control slot** + (gap `--space-400`) + **text block** (optional).
|
|
33
|
+
|
|
34
|
+
- **Control slot** — the circle's carrier, a fixed height equal to the label's line-height for that size (S 22.4 / M 24 — 22 is the rounded design figure the spec quotes; the build binds the type tokens, so `Body/S` 14 × `--leading-loose` resolves to 22.4), with the circle centred inside it and the dot riding along as an absolute child. That is what puts the circle's centre on the label's centre line, and — once Support text is on — keeps it on the **label's** line rather than the middle of the block. The row itself is top-aligned, not centred, because the label wraps and a centred control against a two-line label reads as broken. Consequence: a label-less instance measures 16×22 / 20×24 rather than 16×16 / 20×20; the extra is transparent padding and the visual circle does not move, because a bare control sits in a centre-aligned parent.
|
|
35
|
+
|
|
36
|
+
- **Circle** — round frame, radius `--radius-full`. Unselected = `--bg-primary` fill + `--outline-strong` border at `--border-width-100` (1px). Selected = `--secondary-solid` fill, no border.
|
|
37
|
+
- **Centre dot** — a **drawn** inner circle (~40% of the box), `--secondary-foreground` (white); present only when Selected. It is not an Icon instance — the dot is drawn as a sibling `<span>`.
|
|
38
|
+
- **Label** — the option's clickable label (`--text-primary`); rendered only when the `label` prop is set. Clicking it selects the radio.
|
|
39
|
+
- **Support text** — an optional second line under the label (`supportText`), `--text-secondary` at `Body/XS` in **both** sizes — only the label steps with the size. Off by default and inert without a label. It stays `--text-secondary` in Error: validation ink belongs to the host `RadioGroup`, not to the control. This is what the deprecated radio set carried as a full `Description` axis.
|
|
40
|
+
- **Focus ring** — additive `--outline-focus` offset ring, 2px wide, 2px outside the circle, radius `--radius-full`. The control owns it; the circle border is never swapped.
|
|
41
|
+
|
|
42
|
+
## Variants
|
|
43
|
+
|
|
44
|
+
The variant axes are **Selection** (Unselected · Selected) and **State** (Default · Hover · Disabled · Error). Selection drives the fill + centre dot; State drives the border / interaction treatment. There is **no indeterminate** — a `radiogroup` always resolves to 0-or-1 selected. The grid below is at the default `md` size — see [Sizes](#sizes) for the same axes across S and M.
|
|
45
|
+
|
|
46
|
+
<Canvas of={RadioStories.Variants} />
|
|
47
|
+
|
|
48
|
+
<table>
|
|
49
|
+
<thead>
|
|
50
|
+
<tr><th>Selection</th><th>When</th><th>Tokens</th></tr>
|
|
51
|
+
</thead>
|
|
52
|
+
<tbody>
|
|
53
|
+
<tr>
|
|
54
|
+
<td><code>Unselected</code></td>
|
|
55
|
+
<td>Option is not chosen (default)</td>
|
|
56
|
+
<td>fill <code>--bg-primary</code>, border <code>--outline-strong</code></td>
|
|
57
|
+
</tr>
|
|
58
|
+
<tr>
|
|
59
|
+
<td><code>Selected</code> (<code>checked</code> / <code>defaultChecked</code>)</td>
|
|
60
|
+
<td>The one chosen option in the group</td>
|
|
61
|
+
<td>fill <code>--secondary-solid</code>, drawn centre dot <code>--secondary-foreground</code></td>
|
|
62
|
+
</tr>
|
|
63
|
+
</tbody>
|
|
64
|
+
</table>
|
|
65
|
+
|
|
66
|
+
## Sizes
|
|
67
|
+
|
|
68
|
+
Two sizes, locked to the field / list size system (not the button S/M/L scale) — the same scale as [Checkbox](?path=/docs/design-system-atoms-checkbox--docs). Never scale one up to fake the other — both ship a crisp 1px border. The `md` size is the default.
|
|
69
|
+
|
|
70
|
+
<Canvas of={RadioStories.Matrix} />
|
|
71
|
+
|
|
72
|
+
<table>
|
|
73
|
+
<thead>
|
|
74
|
+
<tr>
|
|
75
|
+
<th>Size</th>
|
|
76
|
+
<th style={{ textAlign: 'right' }}>Box</th>
|
|
77
|
+
<th style={{ textAlign: 'right' }}>Dot</th>
|
|
78
|
+
<th>Radius</th>
|
|
79
|
+
<th>Label</th>
|
|
80
|
+
</tr>
|
|
81
|
+
</thead>
|
|
82
|
+
<tbody>
|
|
83
|
+
<tr>
|
|
84
|
+
<td><code>sm</code> (spec S)</td>
|
|
85
|
+
<td style={{ textAlign: 'right' }}>16</td>
|
|
86
|
+
<td style={{ textAlign: 'right' }}>6</td>
|
|
87
|
+
<td><code>--radius-full</code></td>
|
|
88
|
+
<td><code>Body/S</code> (14)</td>
|
|
89
|
+
</tr>
|
|
90
|
+
<tr>
|
|
91
|
+
<td><code>md</code> (spec M, default)</td>
|
|
92
|
+
<td style={{ textAlign: 'right' }}>20</td>
|
|
93
|
+
<td style={{ textAlign: 'right' }}>8</td>
|
|
94
|
+
<td><code>--radius-full</code></td>
|
|
95
|
+
<td><code>Body/M</code> (16)</td>
|
|
96
|
+
</tr>
|
|
97
|
+
</tbody>
|
|
98
|
+
</table>
|
|
99
|
+
|
|
100
|
+
## States
|
|
101
|
+
|
|
102
|
+
<Canvas of={RadioStories.Unselected} />
|
|
103
|
+
<Canvas of={RadioStories.Selected} />
|
|
104
|
+
<Canvas of={RadioStories.Disabled} />
|
|
105
|
+
<Canvas of={RadioStories.Error} />
|
|
106
|
+
|
|
107
|
+
<table>
|
|
108
|
+
<thead>
|
|
109
|
+
<tr><th>State</th><th>Treatment</th></tr>
|
|
110
|
+
</thead>
|
|
111
|
+
<tbody>
|
|
112
|
+
<tr>
|
|
113
|
+
<td><strong>Default</strong></td>
|
|
114
|
+
<td>Per Selection (above).</td>
|
|
115
|
+
</tr>
|
|
116
|
+
<tr>
|
|
117
|
+
<td><strong>Hover</strong></td>
|
|
118
|
+
<td>Unselected border → <code>--secondary</code>; selected fill → <code>--secondary-hover</code>. <strong>Triggered by the whole hit-target, painted on the control only</strong> — see below.</td>
|
|
119
|
+
</tr>
|
|
120
|
+
<tr>
|
|
121
|
+
<td><strong>Focus</strong></td>
|
|
122
|
+
<td>Not a variant — an additive <code>--outline-focus</code> offset ring on <code>:focus-visible</code>. The circle is unchanged, never a border-swap. Inside a group the ring lands on one member at a time: the group is one tab stop and arrows move selection, natively via the shared <code>name</code>.</td>
|
|
123
|
+
</tr>
|
|
124
|
+
<tr>
|
|
125
|
+
<td><strong>Disabled</strong></td>
|
|
126
|
+
<td><code>--disabled-control</code> fill + <code>--outline-default</code> border at <code>--border-width-100</code> in both Selections, <code>--disabled-foreground</code> dot / label; <code>not-allowed</code> cursor, not selectable.</td>
|
|
127
|
+
</tr>
|
|
128
|
+
<tr>
|
|
129
|
+
<td><strong>Error</strong></td>
|
|
130
|
+
<td>Unselected border → <code>--status-danger</code> — a <em>group-level</em> invalid cue (nothing chosen in a required group), never an individually invalid radio: the member paints the border, <code>aria-invalid</code> stays on the group. A selected radio is never in error — the fill overrides the danger border.</td>
|
|
131
|
+
</tr>
|
|
132
|
+
</tbody>
|
|
133
|
+
</table>
|
|
134
|
+
|
|
135
|
+
**What hover responds to, and what it paints.** The same rule as the Checkbox, single-sourced in
|
|
136
|
+
`spec/03-atoms/checkbox.md` § States:
|
|
137
|
+
the trigger is the **whole hit-target** — the wrapping `<label>` in code (`group-hover`), never the
|
|
138
|
+
input alone (`peer-hover`) — and the paint stays **on the control**; the row takes no wash. Radio
|
|
139
|
+
adds one rule of its own: **hover is per-radio, never group-wide** — pointing at one option never
|
|
140
|
+
lights its siblings.
|
|
141
|
+
|
|
142
|
+
**Motion** (manifest 1.7.1 `motion.states`). The Checkbox recipe: the circle's `border-color` /
|
|
143
|
+
`background-color` ease on `--easing-standard` — hover over `--duration-hover` (150ms), the selection
|
|
144
|
+
flip over `--duration-toggle` (100ms) — and the dot appears with the fill (no transition of its own).
|
|
145
|
+
The property list is explicit, so the focus ring is never eased. CSS takes a transition's duration
|
|
146
|
+
from the state it lands in: a **pointer** flip lands in the hovered state and runs on
|
|
147
|
+
`--duration-hover`; a **keyboard** flip (arrow keys move focus and selection together) lands under
|
|
148
|
+
`:focus-visible` on `--duration-toggle`, while the radio it leaves clears on `--duration-hover`.
|
|
149
|
+
Colour only, so there is no reduced-motion override.
|
|
150
|
+
|
|
151
|
+
### Without label
|
|
152
|
+
|
|
153
|
+
A bare control (no `label`) — e.g. a leading slot in a custom row. The consumer **must** supply an
|
|
154
|
+
`aria-label` so the control keeps an accessible name (see Accessibility).
|
|
155
|
+
|
|
156
|
+
Figma's **Show label** boolean maps to the **presence of the `label` prop** — there is no `showLabel`
|
|
157
|
+
boolean on the component (manifest 1.5.0). Same rule as [Checkbox](?path=/docs/design-system-atoms-checkbox--docs),
|
|
158
|
+
and the opposite of the field family, where the `<label>` stays in the DOM and `Field`'s `hideLabel`
|
|
159
|
+
hides it visually.
|
|
160
|
+
|
|
161
|
+
<Canvas of={RadioStories.WithoutLabel} />
|
|
162
|
+
|
|
163
|
+
## API
|
|
164
|
+
|
|
165
|
+
<Controls />
|
|
166
|
+
|
|
167
|
+
## Do / Don't
|
|
168
|
+
|
|
169
|
+
- ✅ Always render radios as a group via [RadioGroup](?path=/docs/design-system-atoms-radiogroup--docs) (`role="radiogroup"`) with a group label.
|
|
170
|
+
- ✅ Show all choices when there are only 2–3 and seeing them aids the decision.
|
|
171
|
+
- ✅ Prefer the `label` prop over an external `<label>` — it wires `htmlFor`/`id` and makes the whole row clickable.
|
|
172
|
+
- ✅ Phrase each label as a short noun / phrase parallel across the group ("Měsíčně" / "Ročně", not "Měsíčně" / "Platit jednou za rok").
|
|
173
|
+
- ❌ Don't ship a single radio — a lone exclusive control should be a [Checkbox](?path=/docs/design-system-atoms-checkbox--docs).
|
|
174
|
+
- ❌ Don't use radios for long lists — past ~5–7 options use a Select.
|
|
175
|
+
- ❌ Don't rely on the error colour alone — pair it with a group helper / error text (colour is a second, non-text cue).
|
|
176
|
+
- ❌ Don't render a bare control (no `label`) without an `aria-label` on the consumer side.
|
|
177
|
+
- ❌ Don't put `aria-invalid` on an individual radio — no single option is ever "the invalid one"; the attribute belongs to the group.
|
|
178
|
+
|
|
179
|
+
## Accessibility
|
|
180
|
+
|
|
181
|
+
- **Keyboard** — the group is **one tab stop**, arrows move selection, Space selects the focused option. That behaviour comes **natively from the shared `name`** — [RadioGroup](?path=/docs/design-system-atoms-radiogroup--docs) passes one `name` to its children and writes no key handler. A hand-written roving `tabIndex` is only for groups whose members are *not* native inputs (CardSelect-style tiles); re-implementing it over real radios is a documented source of regressions, so don't (manifest 1.5.0 states the behaviour, not the technique).
|
|
182
|
+
- **ARIA** — native `<input type="radio">` sharing one `name` per group; the group is `role="radiogroup"` with an accessible group name. There is **no indeterminate**. **Error** is a group-level cue: `aria-invalid` goes on the **group** — `RadioGroup` sets it on the `role="radiogroup"` element — and **never on a member input**, which only paints the danger border. Announce the message on the group via helper / error text, never colour alone.
|
|
183
|
+
- **Screen reader** — the `label` prop is the accessible name and stays associated via `htmlFor`/`id`. A bare control (no `label`) **must** get an `aria-label` from the consumer.
|
|
184
|
+
- **Support text is a description, not the name** — `supportText` carries its own `id` and the input points at it with `aria-describedby`, while `aria-labelledby` narrows the name back to the label line. Left unqualified inside the wrapping `<label>` the two ran together into one name with no description at all.
|
|
185
|
+
- **Focus** — the additive `--outline-focus` offset ring appears on `:focus-visible`; it is never removed and the circle is not recoloured.
|
|
186
|
+
- **Contrast exception (accepted)** — the resting, unselected `--outline-strong` border is **1.73:1** on white and is the control's only boundary, below the 3:1 non-text minimum (WCAG 1.4.11). Recorded as an accepted exception, not an oversight: the circle is never the sole cue (the label carries the meaning), it sits inside a ≥32×32 target, it takes the 2px offset focus ring — and no darker neutral outline token exists. Mirrored in `radio.manifest.json` 1.5.0 and `spec/02-tokens/color-tokens.md`.
|
|
187
|
+
- **Target** — with a `label`, the whole row is one hit-target. A bare control (no `label`) still exposes a **≥ 32×32px** hit area: the hidden input is enlarged and centred over the 16/20px visual circle, so the box size never limits the tap target (clears WCAG 2.5.8 · 24×24). This is the selection-control minimum; general tap targets aim for 44×44 (see `spec/01-foundations/accessibility.md` § Touch targets).
|
|
188
|
+
|
|
189
|
+
Accessibility floor for every FODS component: `spec/01-foundations/accessibility.md`.
|
|
190
|
+
|
|
191
|
+
## Copy
|
|
192
|
+
|
|
193
|
+
Voice: the product tone of voice, impersonal and in-app. Each radio's label names **one choice**.
|
|
194
|
+
|
|
195
|
+
- **Label** (`label`): a short **noun or phrase** naming the option, parallel in form across the
|
|
196
|
+
group: "Měsíčně" / "Ročně", not "Měsíčně" / "Platit jednou za rok". **Sentence case, no terminal
|
|
197
|
+
period.** Single line that wraps if long, never truncated; max 60 characters.
|
|
198
|
+
- **Support text** (`supportText`), when on, says what *choosing this option* means: the
|
|
199
|
+
consequence, never a restatement of the label, and parallel in form across the group exactly as
|
|
200
|
+
the labels are. Use it where the options need more than their names to be told apart; leave it
|
|
201
|
+
off for a plain pair like "Měsíčně" / "Ročně", where a description only pads. One line that wraps
|
|
202
|
+
to 2; max 90 characters.
|
|
203
|
+
|
|
204
|
+
The **group** gets its own label (the question being answered); the radios are the answers, so
|
|
205
|
+
don't repeat the question in each option.
|
|
206
|
+
|
|
207
|
+
## Usage
|
|
208
|
+
|
|
209
|
+
```tsx
|
|
210
|
+
import { Radio, RadioGroup } from '@invoiceonline/ui-react';
|
|
211
|
+
|
|
212
|
+
// Good — a group owns the selection, shares name / value, handles keyboard focus
|
|
213
|
+
<RadioGroup name="billing" defaultValue="monthly" aria-label="Fakturační období">
|
|
214
|
+
<Radio value="monthly" label="Měsíčně" />
|
|
215
|
+
<Radio value="yearly" label="Ročně" />
|
|
216
|
+
</RadioGroup>
|
|
217
|
+
|
|
218
|
+
// Good — required-but-unselected group validation (error is group-level)
|
|
219
|
+
<RadioGroup name="rounding" error aria-label="Zaokrouhlení">
|
|
220
|
+
<Radio value="up" label="Nahoru" />
|
|
221
|
+
<Radio value="down" label="Dolů" />
|
|
222
|
+
</RadioGroup>
|
|
223
|
+
|
|
224
|
+
// Don't — a lone exclusive control is a Checkbox, not a single radio
|
|
225
|
+
<Radio label="Jsem plátce DPH" />
|
|
226
|
+
|
|
227
|
+
// Don't — mutually-exclusive options wired by hand instead of a RadioGroup
|
|
228
|
+
<Radio name="billing" value="monthly" label="Měsíčně" />
|
|
229
|
+
<Radio name="billing" value="yearly" label="Ročně" />
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
## Related
|
|
233
|
+
|
|
234
|
+
- [Checkbox](?path=/docs/design-system-atoms-checkbox--docs) — sibling selection control for choosing zero or more options (shared filled-blue language).
|
|
235
|
+
- [RadioGroup](?path=/docs/design-system-atoms-radiogroup--docs) — the container that owns the shared `name` / value and the group `error`; the one-tab-stop keyboard behaviour follows from that shared `name`. Radios are always shipped inside it.
|
|
236
|
+
- **Field** — wraps a radio group with label / helper / error text in forms.
|
|
237
|
+
- Spec: `spec/03-atoms/radio.md`
|
|
238
|
+
|
|
239
|
+
## Migration notes
|
|
240
|
+
|
|
241
|
+
**Manifest 1.5.0 → 1.6.0 (ui-system 0.13.0).** Disabled now draws a `--outline-default` border at `--border-width-100` on a `--disabled-control` fill (was a borderless `--disabled` fill), in both Selections.
|
|
242
|
+
|
|
243
|
+
**Manifest 1.7.0 → 1.7.1 (motion audit, 2026-11-03).** The manifest gains a `motion` block (`states.hover`, `states.toggle`). The circle's untokenised `transition-colors` (Tailwind's 150ms default) became `--duration-hover` / `--duration-toggle` on `--easing-standard` over an explicit property list — see [States](#states) → Motion.
|