@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,286 @@
|
|
|
1
|
+
import { Meta, Canvas, Controls } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as ButtonStories from './Button.stories';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
<Meta of={ButtonStories} tags={['autodocs']} />
|
|
6
|
+
|
|
7
|
+
# Button
|
|
8
|
+
|
|
9
|
+
## Metadata
|
|
10
|
+
|
|
11
|
+
- **Layer:** atom
|
|
12
|
+
- **Status:** stable
|
|
13
|
+
- **Tokens used:** `--bg-active`, `--bg-hover`, `--bg-primary`, `--border-width-100`, `--border-width-200`, `--disabled-control`, `--disabled-foreground`, `--font-body`, `--font-size-base`, `--font-size-lg`, `--font-size-md`, `--font-size-sm`, `--font-size-xs`, `--font-weight-semibold`, `--leading-loose`, `--leading-relaxed`, `--outline-default`, `--outline-focus`, `--primary-active`, `--primary-foreground`, `--primary-hover`, `--primary-solid`, `--radius-200`, `--radius-300`, `--secondary`, `--secondary-active`, `--secondary-foreground`, `--secondary-hover`, `--secondary-solid`, `--size-icon`, `--size-icon-large`, `--size-icon-small`, `--size-icon-xsmall`, `--space-1000`, `--space-200`, `--space-300`, `--space-400`, `--space-500`, `--space-600`, `--space-700`, `--space-900`, `--status-danger`, `--status-danger-active`, `--status-danger-foreground`, `--status-danger-hover`, `--status-danger-solid`, `--status-success-active`, `--status-success-foreground`, `--status-success-hover`, `--status-success-solid`, `--status-success-tint-foreground`
|
|
14
|
+
- **Manifest version:** `2.2.1`
|
|
15
|
+
|
|
16
|
+
## Overview
|
|
17
|
+
|
|
18
|
+
The primary interactive control for triggering an action — submit, save, cancel, mark-as-paid, delete. One component: **8 colour/intent families × 5 sizes × states**, with decorative leading/trailing icons (passed as props — a leading icon by default, see [Icon rule](#icon-rule)) and a loading spinner. It shares the exact families, sizes, states and token contract with its square sibling [`IconButton`](?path=/docs/design-system-atoms-iconbutton--docs); the difference is a **mandatory text label**.
|
|
19
|
+
|
|
20
|
+
Pick the **family** by intent (see Variants), the **size** by density/prominence, and let **state** follow interaction. For an icon-only action (toolbar, dense row) use the dedicated **IconButton**, not a label-less Button. For navigation that looks like text, use a text-link or `tertiary`, not a filled family.
|
|
21
|
+
|
|
22
|
+
## Rationale
|
|
23
|
+
|
|
24
|
+
The button set is built on the canonical 9-token colour contract and a clean property model: **family** (intent) × **size** × **state**, with **content** (icons, loading) as separate props. The result is fewer, token-driven variants that re-theme automatically and map cleanly to a code `<Button variant size>` API. The variant token classes are taken 1:1 from `IconButton` (already approved in review), so the two stay visually locked.
|
|
25
|
+
|
|
26
|
+
**Two primaries by design.** *Both* a blue and an orange filled button serve as top-level CTAs, kept as distinct families — **primary** (blue) and **brand** (orange) — rather than collapsed into one.
|
|
27
|
+
|
|
28
|
+
**Primary vs Brand — the rule:**
|
|
29
|
+
|
|
30
|
+
- **`primary` (blue)** — the default filled CTA for **any in-app action**: page and section primaries, form commits, modal commits. If in doubt, it's `primary`.
|
|
31
|
+
- **`brand` (orange)** — reserved for the product's signature slots, and only these: ① the **global header call to action**, ② the **commit of the main document form's footer bar**, ③ the **sales funnel**, ④ **marketing surfaces**. Every other launcher — lists, dashboards, empty states — stays `primary`.
|
|
32
|
+
- **Region law — one filled button per region.** A region (global header · page section · sticky bar · banner · modal) carries at most **one** filled button of any family; its neighbours are `secondary` / `tertiary`. Corollary: **`primary` and `brand` never sit side by side.**
|
|
33
|
+
|
|
34
|
+
The user-facing pattern: *orange = a signature act of the product, or the product selling to me; blue = a normal action.*
|
|
35
|
+
|
|
36
|
+
## Anatomy
|
|
37
|
+
|
|
38
|
+
A horizontal flex row, centered, hug-width, fixed min-height per size:
|
|
39
|
+
|
|
40
|
+
- **Container** — fill / border / radius per family + state. Radius `--radius-200` (XL steps up one to `--radius-300`). Side padding + gap per size (see Sizes). Every family carries a `border` (transparent on `tertiary`) so filled and outline edges stay geometrically identical — the **border law**: an outline edge is neutral structure (`--outline-default`), the family colour lives in the label.
|
|
41
|
+
- **Surface** (optional, borderless families only) — an opaque `--bg-primary` layer behind the content, switched on with the `showSurface` prop. Absent from the filled families and from `disabled`, so the prop is inert there. See [Surface](#surface).
|
|
42
|
+
- **Leading icon** — expected by default ([Icon rule](#icon-rule)); passed via the `leadingIcon` prop, rendered before the label in an `aria-hidden` span, sized per size from the manifest `sizes[].icon` (`[&_.icon]:size-icon-<step>`, width and height; it also sizes the loading spinner). Decorative — inherits the family foreground. The Figma set shows a `check` glyph on every variant because `Show leading icon` defaults to `true` there; that default is a **variant-set artefact, not a code default** (manifest 1.10.0 says so on the property itself). In code both `leadingIcon` and `trailingIcon` are optional and absent unless passed — the rule is a usage contract the consumer fulfils, not a code default.
|
|
43
|
+
- **Label** — `children`, token-linked `Body/*/Semibold` per size, colour = family foreground. **Always expected** — a Button is never meant to be label-less (for no-label use IconButton). Single line: the base emits `whitespace-nowrap` per the manifest `text.label`, because the button hugs its content and a wrap would break the fixed height. The label box is only rendered when there are `children`, and only in the native-button branch — with `asChild` the slotted element is the root and gets no wrapper, so a consumer composing its own content owns the ellipsis behaviour too.
|
|
44
|
+
- **Trailing icon** (optional) — same as leading, via `trailingIcon`, after the label.
|
|
45
|
+
- **Spinner** — in the `loading` state the leading slot is replaced by `<Icon name="spinner" />` with `animate-spin`; `aria-busy="true"`, clicks suppressed. The spinner is intrinsic to the state — not swappable.
|
|
46
|
+
|
|
47
|
+
### Icon rule
|
|
48
|
+
|
|
49
|
+
A Button carries a **leading icon that names the action** (manifest 2.2.0, owner rule): the glyph matches the verb — save → `floppy-disk`, edit → `pencil-simple`, note → `notepad`, delete → `trash` — and is never a placeholder left on an unrelated action. The one exception is **space**: where the host is too tight for icon + label — a compact popover or an inline confirm beside a field (e.g. a date popover's „Změnit“ / „Uložit“) — the Button goes text-only. A missing fitting glyph is not an exception; pick one from the icon set by its use. Docs-only: no prop, default or token changed.
|
|
50
|
+
|
|
51
|
+
### Optical icon padding
|
|
52
|
+
|
|
53
|
+
A leading/trailing icon carries built-in whitespace, so symmetric padding looks unbalanced. **The icon-side padding is reduced by one step of the spacing scale; the text side keeps the size's base padding.** This is encoded via the `hasLeading` / `hasTrailing` boolean variants combined with per-size compoundVariants, so the padding is always emitted as an explicit `pl-*` / `pr-*` pair (no fragile override merging). Applies only in the native-button branch — `asChild` lets the consumer compose its own content. (Figma keeps symmetric padding; the optical adjustment is the code's source of truth for it.)
|
|
54
|
+
|
|
55
|
+
## Variants
|
|
56
|
+
|
|
57
|
+
<Canvas of={ButtonStories.Variants} />
|
|
58
|
+
|
|
59
|
+
Eight families. Compared with the legacy `Button`: **added** `brand` + `success`, **removed** `warning` + `link`; `danger-outline` + `success-outline` were added on real demand from the Button Group „Smazat“ case; they are in the manifest baseline, which predates its changelog.
|
|
60
|
+
|
|
61
|
+
<table>
|
|
62
|
+
<thead>
|
|
63
|
+
<tr><th>Varianta</th><th>Kdy</th><th>Tokeny (kód)</th></tr>
|
|
64
|
+
</thead>
|
|
65
|
+
<tbody>
|
|
66
|
+
<tr><td><code>brand</code></td><td>Orange filled — marketing / brand-tied CTA</td><td>bg <code>--primary-solid</code>, hover <code>--primary-hover</code>, active <code>--primary-active</code>, label <code>--primary-foreground</code></td></tr>
|
|
67
|
+
<tr><td><code>primary</code> (default)</td><td>Blue filled — in-product default CTA (one per screen)</td><td>bg <code>--secondary-solid</code>, hover <code>--secondary-hover</code>, active <code>--secondary-active</code>, label <code>--secondary-foreground</code></td></tr>
|
|
68
|
+
<tr><td><code>secondary</code></td><td>Neutral outline — Cancel next to Save</td><td>transparent + border <code>--outline-default</code>, label <code>--secondary</code> → hover <strong>and</strong> active <code>--secondary-active</code>; hover/active wash <code>--bg-hover</code>/<code>--bg-active</code></td></tr>
|
|
69
|
+
<tr><td><code>tertiary</code></td><td>Ghost — least important action, dense UI</td><td>transparent, border transparent, label <code>--secondary</code> → hover <strong>and</strong> active <code>--secondary-active</code>; hover/active wash <code>--bg-hover</code>/<code>--bg-active</code></td></tr>
|
|
70
|
+
<tr><td><code>danger</code></td><td>Red filled — destructive (delete, irreversible)</td><td>bg <code>--status-danger-solid</code>, hover <code>--status-danger-hover</code>, active <code>--status-danger-active</code>, label <code>--status-danger-foreground</code></td></tr>
|
|
71
|
+
<tr><td><code>danger-outline</code></td><td>Quiet destructive — table-row delete, dense confirm</td><td>transparent + border <code>--outline-default</code>, label <code>--status-danger</code> → hover <code>--status-danger-hover</code>, active <code>--status-danger-active</code>; hover/active wash <code>--bg-hover</code>/<code>--bg-active</code></td></tr>
|
|
72
|
+
<tr><td><code>success</code></td><td>Green filled — confirmation / success</td><td>bg <code>--status-success-solid</code>, hover <code>--status-success-hover</code>, active <code>--status-success-active</code>, label <code>--status-success-foreground</code></td></tr>
|
|
73
|
+
<tr><td><code>success-outline</code></td><td>Quiet success/confirm</td><td>transparent + border <code>--outline-default</code>, label <code>--status-success-tint-foreground</code> (AA-safe) → hover <code>--status-success-hover</code>, active <code>--status-success-active</code>; hover/active wash <code>--bg-hover</code>/<code>--bg-active</code></td></tr>
|
|
74
|
+
</tbody>
|
|
75
|
+
</table>
|
|
76
|
+
|
|
77
|
+
> Intent note: the blue family is `primary` (in-product default), the orange family is `brand`. Which goes where is **not** an open question — the rule is in [Rationale](#rationale) above (`button.md` § Primary vs Brand): `brand` only in the signature slots, everything else in-app is `primary`, and never both in one region.
|
|
78
|
+
>
|
|
79
|
+
> Per the manifest binding settled 2026-07-31 (changelog), the blue borderless families (`secondary`, `tertiary`) bind **the same `--secondary-active` ink in hover and active** — the wash depth (`--bg-hover` vs `--bg-active`) is what separates the two states, and `--secondary-hover` is left to blue fills. The status outline families keep their own `-hover` → `-active` ink ladder.
|
|
80
|
+
>
|
|
81
|
+
> Outline families follow the **border law**: a neutral `--outline-default` edge (like `secondary`), the status colour lives in the label/icon. Resting labels use the **AA-safe** token, not the bright accent — `danger-outline` → `--status-danger` (4.61:1), `success-outline` → `--status-success-tint-foreground` (5.1:1; the bright `--status-success` is only 2.4:1 and fails AA).
|
|
82
|
+
>
|
|
83
|
+
> **`success-outline` has no hover ink of its own, by construction** — confirmed upstream in manifest 1.10.0 `notes[5]`, raised from here. `--status-success-tint-foreground` and `--status-success-hover` are the same primitive (green/700), because the ladder law (hover = resting-solid + one step) lands back on the resting AA ink for a family whose resting ink already *is* that solid step. So Hover differs from Default only by the `--bg-hover` wash underneath an identical label colour; there is no second green to look for, and a runtime pass has no colour delta to measure on that cell. Same shape as the `--secondary-active` note above.
|
|
84
|
+
|
|
85
|
+
### Matrix
|
|
86
|
+
|
|
87
|
+
The full variant × size grid, mirroring the Figma labelled grid — a quick side-by-side of every family
|
|
88
|
+
at every size.
|
|
89
|
+
|
|
90
|
+
<Canvas of={ButtonStories.Matrix} />
|
|
91
|
+
|
|
92
|
+
## Sizes
|
|
93
|
+
|
|
94
|
+
<Canvas of={ButtonStories.Sizes} />
|
|
95
|
+
|
|
96
|
+
The shared code scale `xs · sm · md · lg · xl` (COMPONENT-CODE-CONVENTIONS §1.1) — the Figma
|
|
97
|
+
`XS · S · M · L · XL` casing never reaches the code. Heights are unchanged. Radius `--radius-200`, except `xl` which steps up to `--radius-300`. Font, icon and gap scale per size. Padding-X is the **base** (text side); subtract one step on the icon side per the optical rule above.
|
|
98
|
+
|
|
99
|
+
<table>
|
|
100
|
+
<thead>
|
|
101
|
+
<tr><th>Size</th><th style={{ textAlign: 'right' }}>Min height</th><th>Font (Semibold)</th><th style={{ textAlign: 'right' }}>Icon</th><th>Padding-X (base)</th><th>Gap</th></tr>
|
|
102
|
+
</thead>
|
|
103
|
+
<tbody>
|
|
104
|
+
<tr><td><code>xs</code></td><td style={{ textAlign: 'right' }}>28 px</td><td><code>Body/XS</code> (13)</td><td style={{ textAlign: 'right' }}>16 px (<code>--size-icon-xsmall</code>)</td><td><code>--space-400</code> (8)</td><td><code>--space-200</code> (4)</td></tr>
|
|
105
|
+
<tr><td><code>sm</code></td><td style={{ textAlign: 'right' }}>32 px</td><td><code>Body/S</code> (14)</td><td style={{ textAlign: 'right' }}>20 px (<code>--size-icon-small</code>)</td><td><code>--space-500</code> (12)</td><td><code>--space-300</code> (6)</td></tr>
|
|
106
|
+
<tr><td><code>md</code> (default)</td><td style={{ textAlign: 'right' }}>40 px</td><td><code>Body/M</code> (16)</td><td style={{ textAlign: 'right' }}>24 px (<code>--size-icon</code>)</td><td><code>--space-500</code> (12)</td><td><code>--space-400</code> (8)</td></tr>
|
|
107
|
+
<tr><td><code>lg</code></td><td style={{ textAlign: 'right' }}>44 px</td><td><code>Body/L</code> (18)</td><td style={{ textAlign: 'right' }}>24 px (<code>--size-icon</code>)</td><td><code>--space-600</code> (16)</td><td><code>--space-400</code> (8)</td></tr>
|
|
108
|
+
<tr><td><code>xl</code></td><td style={{ textAlign: 'right' }}>56 px</td><td><code>Body/XL</code> (20)</td><td style={{ textAlign: 'right' }}>32 px (<code>--size-icon-large</code>)</td><td><code>--space-700</code> (20)</td><td><code>--space-500</code> (12)</td></tr>
|
|
109
|
+
</tbody>
|
|
110
|
+
</table>
|
|
111
|
+
|
|
112
|
+
## States
|
|
113
|
+
|
|
114
|
+
<Canvas of={ButtonStories.States} />
|
|
115
|
+
|
|
116
|
+
- **Default** — family base (see Variants).
|
|
117
|
+
- **Hover** — filled families shift the fill to the `-hover` step; borderless families (`secondary`, `tertiary`, `danger-outline`, `success-outline`) add a neutral `--bg-hover` wash surface. The label moves to `--secondary-active` on the blue borderless families `secondary` / `tertiary` (same ink as active) and to its own `-hover` colour on the status outline families; filled `primary` keeps its `--secondary-foreground` label and only shifts the fill — on `success-outline` that `-hover` token resolves to the same green as the resting one, so the wash is the whole difference (see Variants).
|
|
118
|
+
- **Active** — filled families use the `-active` fill; borderless families use the deeper `--bg-active` wash with the `-active` label colour.
|
|
119
|
+
- **Focus** — additive `--outline-focus` outline via `focus-visible:outline-200` with `outline-offset-2` (native `outline`, per `focus-ring.md`), uniform across all eight families. The offset gap makes the outline read against any fill — including blue `primary`, whose fill and outline share the blue. Never removed.
|
|
120
|
+
- **Disabled** — filled families → `--disabled-control` surface + `--disabled-foreground` label; outline families (`secondary`, `danger-outline`, `success-outline`) → transparent + `--disabled-control` border + dimmed label; `tertiary` → dims the label only. Sets the native `disabled` attribute plus `aria-disabled`, `pointer-events: none`.
|
|
121
|
+
- **Loading** — leading slot → `spinner` (`animate-spin`), `aria-busy="true"`, clicks suppressed; family styling preserved (not the disabled look); label kept for context. The busy node carries **no `aria-disabled`** and keeps its tab stop: two announcements on one node („unavailable“ × „working“) contradict, and „working“ is the one to announce, so a click guard — never the native `disabled` attribute, never `aria-disabled` here — is what suppresses the click (manifest 1.10.0 `loading.aria`). `aria-disabled` is legitimate only on a *sibling* control that is not itself busy — see [`SplitButton`](?path=/docs/design-system-molecules-splitbutton--docs), whose trigger half takes it while the action half is loading.
|
|
122
|
+
- **Motion** (manifest 2.2.1 `motion`) — hover eases the fill, border and ink over `--duration-hover`, press over `--duration-press`, both on `--easing-standard` (`transition-[background-color,border-color,color] duration-hover ease-standard active:duration-press`; the focus ring is not in the list, so it never animates); colour is not movement, so no reduced-motion guard. The loading spinner (`motion.loop`) turns once per `--duration-spin` (900 ms) on `--easing-linear`, forever — `animate-spin`, which the package theme (`styles/theme.generated.css`) binds to those tokens, so every spinner in the system turns at one speed. Under reduced motion it keeps turning — a loader is essential motion, and nothing stops it. Known gap: a host stylesheet may declare a global `a:not(.button) { transition: color … }` rule outside every `@layer`; on an `asChild` anchor that rule overrides the whole transition, so there only the ink eases and the fill switches at once — it closes when that global rule moves into a layer.
|
|
123
|
+
|
|
124
|
+
**How the grid above shows them.** `state` is **not a prop** — Hover and Active are CSS pseudo-classes, `Disabled` and `Loading` are the only two states a consumer sets. The matrix therefore forces Hover and Active *statically*: every cell carries the bare (unprefixed) twin of the recipe's own `hover:` / `active:` class, passed through `className` so tailwind-merge drops the resting fill/border/label class. `parameters.pseudo` is deliberately not used — Tailwind v4 wraps every `hover:` utility in `@media (hover: hover)` and the addon does not rewrite rules nested in a media query, so the row would render identically to Default. Focus is not part of the state axis and stays reachable with <kbd>Tab</kbd>.
|
|
125
|
+
|
|
126
|
+
Both states need a real `<button>`: with `asChild` the disabled treatment cannot render (it rides `disabled:` variants that only match a `:disabled` element) and an anchor has no busy state — see [asChild](#do--dont).
|
|
127
|
+
|
|
128
|
+
## Surface
|
|
129
|
+
|
|
130
|
+
<Canvas of={ButtonStories.Surface} />
|
|
131
|
+
|
|
132
|
+
The four borderless families (`secondary`, `tertiary`, `danger-outline`, `success-outline`) are transparent and take their background from whatever they sit on. The **`showSurface`** prop (default `false`) paints an opaque `--bg-primary` layer behind the label, so the control keeps its own background on a tinted section, card or banner.
|
|
133
|
+
|
|
134
|
+
- Because the washes are translucent, hover/active are emitted as a `background-image` layer over the surface — a `background-color` would replace the white instead of compositing over it.
|
|
135
|
+
- Switching it on changes what the wash is relative to: off, `--bg-hover` reads one step darker than *the page*; on, one step darker than *the button's own white*. The feedback is therefore quieter against white than against a tint — the two settings are not interchangeable.
|
|
136
|
+
- The prop is **inert** on the filled families and in `disabled` (the layer does not exist there).
|
|
137
|
+
- On a white page a surfaced ghost is indistinguishable from a plain one and an outline family starts reading as a light filled control — leave it off unless the background behind the button is tinted.
|
|
138
|
+
|
|
139
|
+
## Icons & compositions
|
|
140
|
+
|
|
141
|
+
<Canvas of={ButtonStories.Icons} />
|
|
142
|
+
|
|
143
|
+
<Canvas of={ButtonStories.Compositions} />
|
|
144
|
+
|
|
145
|
+
## API
|
|
146
|
+
|
|
147
|
+
<Controls />
|
|
148
|
+
|
|
149
|
+
## Do / Don't
|
|
150
|
+
|
|
151
|
+
- ✅ One filled primary (blue `primary` or orange `brand`) per primary action on a screen
|
|
152
|
+
- ✅ Use `secondary` for Cancel next to Save (`primary`)
|
|
153
|
+
- ✅ Use `danger` only for destructive actions (delete, irreversible)
|
|
154
|
+
- ✅ Give every Button a leading icon that names the action; go text-only only where the host has no room for icon + label (compact popover, inline confirm)
|
|
155
|
+
- ✅ Pass icons via `leadingIcon` / `trailingIcon` — they are decorative; the label is the accessible name
|
|
156
|
+
- ✅ Use `asChild` for a React Router `<Link>` (Radix Slot pattern)
|
|
157
|
+
- ✅ Reserve `brand` for the signature slots (global header, invoice-form footer, funnel, marketing) — everything else in-app is `primary`
|
|
158
|
+
- ✅ Turn `showSurface` on only when a borderless button sits on a tinted background
|
|
159
|
+
- ✅ On a DARK plaque (`PromoSurface` `solid` / `inverse`, a `Hero` on either) ship exactly ONE filled `brand` CTA
|
|
160
|
+
- ❌ Don't leave the leading icon off by habit, or put a glyph on an action it does not name (a stray `check` on „Smazat“)
|
|
161
|
+
- ❌ Don't stack two filled CTAs of equal weight side by side
|
|
162
|
+
- ❌ Don't put `primary` and `brand` in the same region — one filled button per region
|
|
163
|
+
- ❌ Don't use `danger` as a generic emphasis colour
|
|
164
|
+
- ❌ Don't pass icons as `children` — use the `leadingIcon` / `trailingIcon` props
|
|
165
|
+
- ❌ Don't fake an icon-only square button by dropping the label — use [`IconButton`](?path=/docs/design-system-atoms-iconbutton--docs)
|
|
166
|
+
- ❌ Don't remove the focus ring for "cleanliness"
|
|
167
|
+
- ❌ Don't put a `secondary` or `tertiary` button beside a CTA on a dark plaque — their `--secondary` label measures 1.33:1 / 1.59:1 there and all that survives is the border (see Accessibility → Dark grounds)
|
|
168
|
+
- ❌ Don't combine `asChild` with `disabled` / `loading` — an anchor has no disabled and no busy state, and the disabled ink needs a real `:disabled` element (spec `button-open-questions.md` Q1). The component keeps such a button inoperable either way — `pointer-events-none`, a capture-phase click guard and the child's own click handlers stripped — and warns in dev, but it will not look disabled. The two states differ in the a11y tree: `disabled` also sets `aria-disabled` and `tabIndex={-1}`, `loading` sets only `aria-busy` and **keeps the tab stop**. Render the native `<button>` branch instead.
|
|
169
|
+
|
|
170
|
+
## Accessibility
|
|
171
|
+
|
|
172
|
+
- **Keyboard** — native `<button>`: Tab focuses, Enter / Space activates. Disabled buttons are skipped by Tab. In the `asChild` branch the native `disabled` attribute does not exist, so `tabIndex={-1}` takes over that job.
|
|
173
|
+
- **ARIA** — icons passed via `leadingIcon` / `trailingIcon` are decorative and wrapped in `aria-hidden` spans; the visible `children` label is the accessible name and owns the announcement. `loading` sets `aria-busy="true"`; `disabled` sets the native `disabled` attribute plus `aria-disabled="true"` and removes pointer events. With `asChild` (unsupported for these two states) only the ARIA state, `pointer-events-none` and the click guard are applied — never the disabled treatment; `tabIndex={-1}` comes with `disabled` alone, so a slotted `loading` button stays in the tab order.
|
|
174
|
+
- **Screen reader** — the label is announced as the button name. While `loading`, SR reports the button as busy; keep a meaningful label ("Ukládám…") for context. For an icon-only action use [`IconButton`](?path=/docs/design-system-atoms-iconbutton--docs), which enforces an `aria-label`.
|
|
175
|
+
- **Focus outline** — `focus-visible:outline-200 focus-visible:outline-outline-focus` with `outline-offset-2` (native `outline`); a visible outline against any fill. Never override with `outline: none` without an equal replacement.
|
|
176
|
+
- **Touch target** — ≥ 44×44 is met by `lg` / `xl`; `xs` / `sm` / `md` need extra hit area when used as a standalone tap target on mobile (pad the hit area, not the visual box).
|
|
177
|
+
- **Contrast** — filled families pair their `-foreground` token, and three of them sit **below AA-Normal** on purpose: `primary` 4.45:1 (0.05 under the bar, clears AA-Large / 3:1 non-text), `success` 3.35:1 and `brand` 2.37:1 (the signature-slot exception). These are accepted, owner-signed exceptions recorded upstream in `01-foundations/accessibility.md` (`button.md` § Contrast), with the always-Semibold label as the mitigation — axe reports the `brand` cells as a `color-contrast` violation and that is expected, not a defect. `danger` clears AA at 6.22:1 (red/700 + white, per upstream `02-tokens/color-tokens.md`); every borderless family rests on an AA-safe ink (see Variants).
|
|
178
|
+
- **Dark grounds** — **no Button family is built for one, and none is coming.** The `--secondary` ink that `secondary` and `tertiary` put on their labels is measured on light surfaces; on the two dark promo fills it drops to **1.33:1** on `--secondary-solid` and **1.59:1** on `--bg-inverse`, which leaves the border as the only legible part of the control. The stance is **compose, not recolour**: one filled `brand` CTA, no secondary action beside it — the rule `Banner` already holds and `Hero` now states in its own `intent.rules`. A quieter action next to it exists only on `--bg-inverse` chrome, and it is a [`TextLink`](?path=/docs/design-system-atoms-textlink--docs) on the inverse recipe, never a button; on a `--secondary-solid` panel no quiet text action passes AA at all. Anything focusable placed on either ground binds `--outline-focus-inverse`. The full dark-surface contract for the interactive atoms is `spec/06-patterns/inverse-surface.md`, where this stance is recorded as canon; if a real consumer ever needs an outlined-white family, that is a new proposal against the pattern, not a silent extension.
|
|
179
|
+
- **Motion** — only colour eases (`--duration-hover` / `--duration-press`), which is not movement and needs no reduced-motion opt-out. The loading spinner keeps turning under `prefers-reduced-motion` on purpose: a loader is essential motion (manifest `motion.loop.reducedMotion`), so do not add `motion-reduce:*` to it.
|
|
180
|
+
|
|
181
|
+
Accessibility floor for every FODS component: `spec/01-foundations/accessibility.md`.
|
|
182
|
+
|
|
183
|
+
## Copy
|
|
184
|
+
|
|
185
|
+
Voice: the shared in-app voice — impersonal, clear over clever, concise, consistent terminology. These action-label rules are canonical for the whole button family (`DropdownButton`, `SplitButton`, `ButtonGroup`) and for any control that fires an action.
|
|
186
|
+
|
|
187
|
+
- **Label** (`children`) — names **one action**, so the user can predict what happens before clicking. Verb-first in the infinitive (`Uložit`, not the user-addressing `Uložte`), never a bare noun (`Faktura`) or an abstract `OK`; one action per button (`Uložit a odeslat` → two buttons, or a [`SplitButton`](?path=/docs/design-system-molecules-splitbutton--docs)); the shortest label that is still specific, 1–3 words; sentence case; name the object where it removes doubt; one verb per concept across the app. Always present. Single line, no wrap; the button grows to fit, and the label is cut with an ellipsis only when the consumer constrains the width (e.g. a full-width button). Max 24 characters — content guidance, not an input `maxlength`; a label's length varies by language.
|
|
188
|
+
- **Destructive actions** name the object and the act — `Smazat fakturu` (the `danger` family), never a soft `OK` / `Pokračovat`.
|
|
189
|
+
- **Loading** swaps the label to the present-progressive of the same verb — `Ukládám…` while `Uložit` runs — so the control still says what is happening.
|
|
190
|
+
- **Icon-only** controls have no visible label; the same verb-first rule applies to the [`IconButton`](?path=/docs/design-system-atoms-iconbutton--docs)'s `aria-label`.
|
|
191
|
+
|
|
192
|
+
<table>
|
|
193
|
+
<thead>
|
|
194
|
+
<tr><th>Run</th><th>Write</th><th>✅</th><th>❌</th></tr>
|
|
195
|
+
</thead>
|
|
196
|
+
<tbody>
|
|
197
|
+
<tr><td>Label</td><td>verb-first infinitive, one action, sentence case, 1–3 words; always present</td><td><code>Vystavit fakturu</code> · <code>Uložit</code> · <code>Stáhnout PDF</code></td><td><code>OK</code> · <code>Odeslat formulář</code> · <code>Vystavit Fakturu</code></td></tr>
|
|
198
|
+
</tbody>
|
|
199
|
+
</table>
|
|
200
|
+
|
|
201
|
+
## Usage
|
|
202
|
+
|
|
203
|
+
```tsx
|
|
204
|
+
import { Button, Icon } from '@invoiceonline/ui-react';
|
|
205
|
+
|
|
206
|
+
// Good — in-product default CTA (blue primary), leading icon names the action
|
|
207
|
+
<Button variant="primary" size="md" leadingIcon={<Icon name="invoice-new" />} onClick={onIssue}>
|
|
208
|
+
Vystavit fakturu
|
|
209
|
+
</Button>
|
|
210
|
+
|
|
211
|
+
// Good — secondary / cancel next to a primary save
|
|
212
|
+
<Button variant="secondary" leadingIcon={<Icon name="x" />} onClick={onCancel}>
|
|
213
|
+
Zrušit
|
|
214
|
+
</Button>
|
|
215
|
+
<Button variant="primary" leadingIcon={<Icon name="floppy-disk" />} onClick={onSave}>
|
|
216
|
+
Uložit
|
|
217
|
+
</Button>
|
|
218
|
+
|
|
219
|
+
// Good — leading icon via prop (decorative, aria-hidden)
|
|
220
|
+
<Button variant="tertiary" size="sm" leadingIcon={<Icon name="pencil-simple" />} onClick={onEdit}>
|
|
221
|
+
Upravit
|
|
222
|
+
</Button>
|
|
223
|
+
|
|
224
|
+
// Good — destructive action
|
|
225
|
+
<Button variant="danger" leadingIcon={<Icon name="trash" />} onClick={onDelete}>
|
|
226
|
+
Smazat fakturu
|
|
227
|
+
</Button>
|
|
228
|
+
|
|
229
|
+
// Good — loading: spinner replaces the leading slot, clicks suppressed
|
|
230
|
+
<Button variant="primary" loading>
|
|
231
|
+
Ukládám…
|
|
232
|
+
</Button>
|
|
233
|
+
|
|
234
|
+
// Good — React Router link via asChild (icons/loading composed by the consumer)
|
|
235
|
+
<Button asChild variant="tertiary">
|
|
236
|
+
<Link to="/">
|
|
237
|
+
<Icon name="file-text" />
|
|
238
|
+
Faktury
|
|
239
|
+
</Link>
|
|
240
|
+
</Button>
|
|
241
|
+
|
|
242
|
+
// Good — text-only, the exception: a compact popover with no room for icon + label
|
|
243
|
+
<Button variant="primary" size="sm" onClick={onApply}>
|
|
244
|
+
Změnit
|
|
245
|
+
</Button>
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
```tsx
|
|
249
|
+
// Don't — icon as children; use the leadingIcon prop instead
|
|
250
|
+
<Button>
|
|
251
|
+
<Icon name="invoice-new" /> Nová faktura
|
|
252
|
+
</Button>
|
|
253
|
+
|
|
254
|
+
// Don't — a standalone action without its icon (the host has room), or the
|
|
255
|
+
// placeholder glyph left on an action it does not name
|
|
256
|
+
<Button variant="primary" onClick={onSave}>Uložit</Button>
|
|
257
|
+
<Button variant="danger" leadingIcon={<Icon name="check" />}>Smazat</Button>
|
|
258
|
+
|
|
259
|
+
// Don't — two filled primaries of equal weight side by side
|
|
260
|
+
<Button variant="primary">Uložit</Button>
|
|
261
|
+
<Button variant="primary">Zrušit</Button>
|
|
262
|
+
|
|
263
|
+
// Don't — fake an icon-only square button by dropping the label (use IconButton)
|
|
264
|
+
<Button variant="tertiary" className="aspect-square !px-0" leadingIcon={<Icon name="trash" />}>
|
|
265
|
+
{''}
|
|
266
|
+
</Button>
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
## Related
|
|
270
|
+
|
|
271
|
+
- [`IconButton`](?path=/docs/design-system-atoms-iconbutton--docs) — square, icon-only sibling (same families / sizes / states / tokens)
|
|
272
|
+
- [`Icon`](?path=/docs/design-system-atoms-icon--docs) — the DS icon set the `leadingIcon` / `trailingIcon` props draw from
|
|
273
|
+
- [Radix UI Slot](https://www.radix-ui.com/primitives/docs/utilities/slot) — pattern behind `asChild`
|
|
274
|
+
- `spec/03-atoms/button.md` — upstream design spec
|
|
275
|
+
|
|
276
|
+
## Migration notes
|
|
277
|
+
|
|
278
|
+
**2.2.1 — motion audit (2026-11-03).** The motion block names hover, press and the spinner loop. The spinner moved from Tailwind's stock `spin 1s linear` to `--duration-spin` + `--easing-linear` (ui-system 0.17.0, one shared `animate-spin`); no component change.
|
|
279
|
+
|
|
280
|
+
**2.2.0 — icon rule (docs-only).** A Button now carries a leading icon that names the action by default; text-only only where the host has no room. No prop, default or token changed — call sites without `leadingIcon` keep rendering, but are audit targets (see [Icon rule](#icon-rule)).
|
|
281
|
+
|
|
282
|
+
**2.0.0 — `surface` → `showSurface` (breaking).** The `Show surface` boolean's code prop is renamed to match [`IconButton`](?path=/docs/design-system-atoms-iconbutton--docs) (2.0.0) and [`DropdownButton`](?path=/docs/design-system-atoms-dropdownbutton--docs) (2.0.0): the three siblings share one property and one token stack, so they share one prop name. No alias is kept — replace `surface` with `showSurface` at the call site. No token, binding or measurement changed.
|
|
283
|
+
|
|
284
|
+
**1.11.0 — disabled paint.** The disabled fill (filled families) and border (outline families) rebind `--disabled` → `--disabled-control` (claudy/100, was gray/100). `--disabled` is deprecated in `@invoiceonline/ui-system` 0.13.0; its removal is planned for 0.14.0.
|
|
285
|
+
|
|
286
|
+
**Legacy Figma `Colour` → family mapping** (from the upstream spec): `Primary` (orange) → `brand`, `Primary Blue` → `primary`, `Primary Green` → `success`, `Danger` → `danger`, `Secondary` (outline) → `secondary`, `Tertiary` (ghost) → `tertiary`; legacy `Content = Icon` (icon-only) → the separate [`IconButton`](?path=/docs/design-system-atoms-iconbutton--docs).
|