@invoiceonline/ui-react 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +99 -0
- package/CHANGELOG.md +131 -0
- package/LICENSE +9 -0
- package/README.md +78 -2
- package/dist/assets/label-brush-1.svg +6 -0
- package/dist/assets/pattern-dark.svg +113 -0
- package/dist/components/action-row/ActionRow.d.ts +178 -0
- package/dist/components/action-row/ActionRow.js +340 -0
- package/dist/components/action-row/index.d.ts +2 -0
- package/dist/components/action-row/index.js +1 -0
- package/dist/components/alert/Alert.d.ts +314 -0
- package/dist/components/alert/Alert.js +446 -0
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/alert/index.js +1 -0
- package/dist/components/anchored-panel/AnchoredPanel.d.ts +41 -0
- package/dist/components/anchored-panel/AnchoredPanel.js +72 -0
- package/dist/components/anchored-panel/index.d.ts +3 -0
- package/dist/components/anchored-panel/index.js +3 -0
- package/dist/components/badge/Badge.d.ts +146 -0
- package/dist/components/badge/Badge.js +258 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/badge/index.js +1 -0
- package/dist/components/banner/Banner.d.ts +209 -0
- package/dist/components/banner/Banner.js +339 -0
- package/dist/components/banner/index.d.ts +2 -0
- package/dist/components/banner/index.js +1 -0
- package/dist/components/button/Button.d.ts +54 -0
- package/dist/components/button/Button.js +312 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/index.js +1 -0
- package/dist/components/button-group/ButtonGroup.d.ts +187 -0
- package/dist/components/button-group/ButtonGroup.js +217 -0
- package/dist/components/button-group/index.d.ts +2 -0
- package/dist/components/button-group/index.js +1 -0
- package/dist/components/card-select/CardSelect.d.ts +274 -0
- package/dist/components/card-select/CardSelect.js +561 -0
- package/dist/components/card-select/CardSelectGroup.d.ts +92 -0
- package/dist/components/card-select/CardSelectGroup.js +72 -0
- package/dist/components/card-select/index.d.ts +3 -0
- package/dist/components/card-select/index.js +3 -0
- package/dist/components/checkbox/Checkbox.d.ts +104 -0
- package/dist/components/checkbox/Checkbox.js +194 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox/index.js +1 -0
- package/dist/components/chip/Chip.d.ts +250 -0
- package/dist/components/chip/Chip.js +441 -0
- package/dist/components/chip/index.d.ts +2 -0
- package/dist/components/chip/index.js +1 -0
- package/dist/components/column-header/ColumnHeader.d.ts +144 -0
- package/dist/components/column-header/ColumnHeader.js +209 -0
- package/dist/components/column-header/index.d.ts +2 -0
- package/dist/components/column-header/index.js +1 -0
- package/dist/components/combobox-field/Combobox.d.ts +104 -0
- package/dist/components/combobox-field/Combobox.js +355 -0
- package/dist/components/combobox-field/ComboboxField.d.ts +76 -0
- package/dist/components/combobox-field/ComboboxField.js +98 -0
- package/dist/components/combobox-field/index.d.ts +3 -0
- package/dist/components/combobox-field/index.js +3 -0
- package/dist/components/date-field/DateField.d.ts +52 -0
- package/dist/components/date-field/DateField.js +45 -0
- package/dist/components/date-field/index.d.ts +2 -0
- package/dist/components/date-field/index.js +1 -0
- package/dist/components/date-picker/DatePicker.d.ts +53 -0
- package/dist/components/date-picker/DatePicker.js +329 -0
- package/dist/components/date-picker/index.d.ts +2 -0
- package/dist/components/date-picker/index.js +1 -0
- package/dist/components/divider/Divider.d.ts +81 -0
- package/dist/components/divider/Divider.js +93 -0
- package/dist/components/divider/index.d.ts +2 -0
- package/dist/components/divider/index.js +1 -0
- package/dist/components/drawer/Drawer.d.ts +128 -0
- package/dist/components/drawer/Drawer.js +367 -0
- package/dist/components/drawer/index.d.ts +2 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/dropdown-button/DropdownButton.d.ts +72 -0
- package/dist/components/dropdown-button/DropdownButton.js +122 -0
- package/dist/components/dropdown-button/index.d.ts +2 -0
- package/dist/components/dropdown-button/index.js +1 -0
- package/dist/components/faq/FAQ.d.ts +135 -0
- package/dist/components/faq/FAQ.js +258 -0
- package/dist/components/faq/index.d.ts +2 -0
- package/dist/components/faq/index.js +1 -0
- package/dist/components/field/Field.d.ts +118 -0
- package/dist/components/field/Field.js +327 -0
- package/dist/components/field/index.d.ts +2 -0
- package/dist/components/field/index.js +1 -0
- package/dist/components/field-pair/FieldPair.d.ts +194 -0
- package/dist/components/field-pair/FieldPair.js +321 -0
- package/dist/components/field-pair/index.d.ts +2 -0
- package/dist/components/field-pair/index.js +1 -0
- package/dist/components/file-upload/FileUpload.d.ts +137 -0
- package/dist/components/file-upload/FileUpload.js +434 -0
- package/dist/components/file-upload/index.d.ts +2 -0
- package/dist/components/file-upload/index.js +1 -0
- package/dist/components/filter-chip/FilterChip.d.ts +373 -0
- package/dist/components/filter-chip/FilterChip.js +517 -0
- package/dist/components/filter-chip/index.d.ts +2 -0
- package/dist/components/filter-chip/index.js +1 -0
- package/dist/components/filter-facet/FilterFacet.d.ts +116 -0
- package/dist/components/filter-facet/FilterFacet.js +632 -0
- package/dist/components/filter-facet/index.d.ts +2 -0
- package/dist/components/filter-facet/index.js +1 -0
- package/dist/components/firm-avatar/FirmAvatar.d.ts +75 -0
- package/dist/components/firm-avatar/FirmAvatar.js +119 -0
- package/dist/components/firm-avatar/index.d.ts +2 -0
- package/dist/components/firm-avatar/index.js +1 -0
- package/dist/components/form-actions/FormActions.d.ts +123 -0
- package/dist/components/form-actions/FormActions.js +195 -0
- package/dist/components/form-actions/index.d.ts +2 -0
- package/dist/components/form-actions/index.js +1 -0
- package/dist/components/form-block/FormBlock.d.ts +252 -0
- package/dist/components/form-block/FormBlock.js +420 -0
- package/dist/components/form-block/index.d.ts +3 -0
- package/dist/components/form-block/index.js +3 -0
- package/dist/components/form-section/FormSection.d.ts +130 -0
- package/dist/components/form-section/FormSection.js +206 -0
- package/dist/components/form-section/index.d.ts +2 -0
- package/dist/components/form-section/index.js +1 -0
- package/dist/components/heading/Heading.d.ts +69 -0
- package/dist/components/heading/Heading.js +79 -0
- package/dist/components/heading/index.d.ts +2 -0
- package/dist/components/heading/index.js +1 -0
- package/dist/components/heading-group/HeadingGroup.d.ts +258 -0
- package/dist/components/heading-group/HeadingGroup.js +255 -0
- package/dist/components/heading-group/index.d.ts +2 -0
- package/dist/components/heading-group/index.js +1 -0
- package/dist/components/hero/Hero.d.ts +268 -0
- package/dist/components/hero/Hero.js +316 -0
- package/dist/components/hero/index.d.ts +2 -0
- package/dist/components/hero/index.js +1 -0
- package/dist/components/icon/Icon.d.ts +27 -0
- package/dist/components/icon/Icon.js +30 -0
- package/dist/components/icon/index.d.ts +3 -0
- package/dist/components/icon/index.js +3 -0
- package/dist/components/icon-button/IconButton.d.ts +75 -0
- package/dist/components/icon-button/IconButton.js +151 -0
- package/dist/components/icon-button/index.d.ts +2 -0
- package/dist/components/icon-button/index.js +1 -0
- package/dist/components/item-row/ItemRow.d.ts +253 -0
- package/dist/components/item-row/ItemRow.js +496 -0
- package/dist/components/item-row/index.d.ts +2 -0
- package/dist/components/item-row/index.js +1 -0
- package/dist/components/list-row/ListRow.d.ts +165 -0
- package/dist/components/list-row/ListRow.js +233 -0
- package/dist/components/list-row/index.d.ts +2 -0
- package/dist/components/list-row/index.js +1 -0
- package/dist/components/menu/Menu.d.ts +64 -0
- package/dist/components/menu/Menu.js +186 -0
- package/dist/components/menu/index.d.ts +2 -0
- package/dist/components/menu/index.js +1 -0
- package/dist/components/modal/Modal.d.ts +272 -0
- package/dist/components/modal/Modal.js +788 -0
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/modal/index.js +1 -0
- package/dist/components/nav-link/NavLink.d.ts +123 -0
- package/dist/components/nav-link/NavLink.js +157 -0
- package/dist/components/nav-link/index.d.ts +2 -0
- package/dist/components/nav-link/index.js +1 -0
- package/dist/components/number-field/NumberField.d.ts +62 -0
- package/dist/components/number-field/NumberField.js +210 -0
- package/dist/components/number-field/index.d.ts +2 -0
- package/dist/components/number-field/index.js +1 -0
- package/dist/components/pagination/Pagination.d.ts +133 -0
- package/dist/components/pagination/Pagination.js +217 -0
- package/dist/components/pagination/index.d.ts +3 -0
- package/dist/components/pagination/index.js +3 -0
- package/dist/components/popover-surface/index.d.ts +2 -0
- package/dist/components/popover-surface/index.js +1 -0
- package/dist/components/progress-bar/ProgressBar.d.ts +260 -0
- package/dist/components/progress-bar/ProgressBar.js +470 -0
- package/dist/components/progress-bar/index.d.ts +2 -0
- package/dist/components/progress-bar/index.js +1 -0
- package/dist/components/promo-sticker/PromoSticker.d.ts +204 -0
- package/dist/components/promo-sticker/PromoSticker.js +177 -0
- package/dist/components/promo-sticker/index.d.ts +2 -0
- package/dist/components/promo-sticker/index.js +1 -0
- package/dist/components/promo-surface/PromoSurface.d.ts +94 -0
- package/dist/components/promo-surface/PromoSurface.js +119 -0
- package/dist/components/promo-surface/index.d.ts +2 -0
- package/dist/components/promo-surface/index.js +1 -0
- package/dist/components/radio/Radio.d.ts +92 -0
- package/dist/components/radio/Radio.js +171 -0
- package/dist/components/radio/index.d.ts +2 -0
- package/dist/components/radio/index.js +1 -0
- package/dist/components/radio-group/RadioGroup.d.ts +61 -0
- package/dist/components/radio-group/RadioGroup.js +51 -0
- package/dist/components/radio-group/index.d.ts +2 -0
- package/dist/components/radio-group/index.js +1 -0
- package/dist/components/select/Select.d.ts +65 -0
- package/dist/components/select/Select.js +176 -0
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/index.js +1 -0
- package/dist/components/select-field/SelectField.d.ts +16 -0
- package/dist/components/select-field/SelectField.js +55 -0
- package/dist/components/select-field/index.d.ts +2 -0
- package/dist/components/select-field/index.js +1 -0
- package/dist/components/skeleton/Skeleton.d.ts +64 -0
- package/dist/components/skeleton/Skeleton.js +65 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/index.js +1 -0
- package/dist/components/split-button/SplitButton.d.ts +80 -0
- package/dist/components/split-button/SplitButton.js +182 -0
- package/dist/components/split-button/index.d.ts +2 -0
- package/dist/components/split-button/index.js +1 -0
- package/dist/components/status-summary-bar/StatusSummaryBar.d.ts +118 -0
- package/dist/components/status-summary-bar/StatusSummaryBar.js +278 -0
- package/dist/components/status-summary-bar/index.d.ts +2 -0
- package/dist/components/status-summary-bar/index.js +1 -0
- package/dist/components/subject-lookup-field/SubjectLookupField.d.ts +157 -0
- package/dist/components/subject-lookup-field/SubjectLookupField.js +663 -0
- package/dist/components/subject-lookup-field/index.d.ts +2 -0
- package/dist/components/subject-lookup-field/index.js +1 -0
- package/dist/components/switch/Switch.d.ts +152 -0
- package/dist/components/switch/Switch.js +307 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/index.js +1 -0
- package/dist/components/table/Table.d.ts +5 -0
- package/dist/components/table/Table.js +601 -0
- package/dist/components/table/index.d.ts +6 -0
- package/dist/components/table/index.js +6 -0
- package/dist/components/text-field/TextField.d.ts +65 -0
- package/dist/components/text-field/TextField.js +173 -0
- package/dist/components/text-field/index.d.ts +2 -0
- package/dist/components/text-field/index.js +1 -0
- package/dist/components/text-link/TextLink.d.ts +260 -0
- package/dist/components/text-link/TextLink.js +303 -0
- package/dist/components/text-link/index.d.ts +2 -0
- package/dist/components/text-link/index.js +1 -0
- package/dist/components/textarea/Textarea.d.ts +93 -0
- package/dist/components/textarea/Textarea.js +256 -0
- package/dist/components/textarea/index.d.ts +2 -0
- package/dist/components/textarea/index.js +1 -0
- package/dist/components/tooltip/Tooltip.d.ts +129 -0
- package/dist/components/tooltip/Tooltip.js +457 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/components/unit-field/UnitField.d.ts +46 -0
- package/dist/components/unit-field/UnitField.js +133 -0
- package/dist/components/unit-field/index.d.ts +2 -0
- package/dist/components/unit-field/index.js +1 -0
- package/dist/icons/icon-registry.generated.js +500 -0
- package/dist/icons/icon-types.generated.d.ts +2 -0
- package/dist/icons/icon-types.generated.js +126 -0
- package/dist/index.d.ts +132 -0
- package/dist/index.js +75 -0
- package/dist/internal/BottomSheet.js +496 -0
- package/dist/internal/FodsProvider.d.ts +25 -0
- package/dist/internal/FodsProvider.js +32 -0
- package/dist/internal/MotionCaret.js +35 -0
- package/dist/internal/NumberFormatInput.d.ts +21 -0
- package/dist/internal/NumberFormatInput.js +126 -0
- package/dist/internal/SummaryDonut.d.ts +3 -0
- package/dist/internal/SummaryDonut.js +300 -0
- package/dist/internal/buttonSegment.d.ts +44 -0
- package/dist/internal/buttonSegment.js +126 -0
- package/dist/internal/collapseRoom.js +128 -0
- package/dist/internal/comboboxKeys.js +44 -0
- package/dist/internal/contentPresence.js +46 -0
- package/dist/internal/dayCell.js +95 -0
- package/dist/internal/dialogPortal.d.ts +2 -0
- package/dist/internal/dialogPortal.js +21 -0
- package/dist/internal/donutSweeps.js +65 -0
- package/dist/internal/enterOnViewGeometry.js +46 -0
- package/dist/internal/faqItem.js +80 -0
- package/dist/internal/floatingLabelMotion.js +68 -0
- package/dist/internal/formBlockContext.d.ts +22 -0
- package/dist/internal/formBlockContext.js +20 -0
- package/dist/internal/heightRoom.js +87 -0
- package/dist/internal/numberSeparators.js +62 -0
- package/dist/internal/overlayMotion.js +48 -0
- package/dist/internal/paginationItem.d.ts +8 -0
- package/dist/internal/paginationItem.js +22 -0
- package/dist/internal/popoverSurface.d.ts +8 -0
- package/dist/internal/popoverSurface.js +23 -0
- package/dist/internal/portalContainer.d.ts +1 -0
- package/dist/internal/portalContainer.js +6 -0
- package/dist/internal/progressBarItem.d.ts +207 -0
- package/dist/internal/progressBarItem.js +264 -0
- package/dist/internal/selectionControlText.js +12 -0
- package/dist/internal/statusSummaryParts.js +371 -0
- package/dist/internal/summaryMotion.js +75 -0
- package/dist/internal/table/ChildConnector.js +62 -0
- package/dist/internal/table/ChildRowPrefix.d.ts +9 -0
- package/dist/internal/table/ChildRowPrefix.js +27 -0
- package/dist/internal/table/ColumnSettings.js +135 -0
- package/dist/internal/table/ScrollRegion.js +114 -0
- package/dist/internal/table/TableEmpty.js +93 -0
- package/dist/internal/table/TableLayout.d.ts +17 -0
- package/dist/internal/table/TableLayout.js +29 -0
- package/dist/internal/table/TableLoadStatus.js +56 -0
- package/dist/internal/table/TableMobile.js +488 -0
- package/dist/internal/table/TruncatedCell.js +33 -0
- package/dist/internal/table/emptyValue.js +10 -0
- package/dist/internal/table/features.d.ts +41 -0
- package/dist/internal/table/features.js +31 -0
- package/dist/internal/table/recipes.js +227 -0
- package/dist/internal/table/rowClick.js +9 -0
- package/dist/internal/table/types.d.ts +325 -0
- package/dist/internal/table/types.js +13 -0
- package/dist/internal/tailwind-variants.d.ts +3 -0
- package/dist/internal/tailwind-variants.js +37 -0
- package/dist/internal/tooltipContext.js +5 -0
- package/dist/internal/tw-merge-config.generated.js +314 -0
- package/dist/internal/useAnchoredPanel.d.ts +87 -0
- package/dist/internal/useAnchoredPanel.js +108 -0
- package/dist/internal/useCountUp.js +53 -0
- package/dist/internal/useDateFieldTrigger.js +183 -0
- package/dist/internal/useEChart.js +59 -0
- package/dist/internal/useEnterOnView.js +42 -0
- package/dist/internal/useFloatingBar.js +100 -0
- package/dist/internal/useFormReset.js +37 -0
- package/dist/internal/useIsMobile.js +44 -0
- package/dist/internal/useOneRowOverflow.js +88 -0
- package/dist/internal/usePrefersReducedMotion.js +25 -0
- package/dist/internal/useReturnFocus.js +26 -0
- package/dist/internal/utils.d.ts +7 -0
- package/dist/internal/utils.js +58 -0
- package/dist/node_modules/@tanstack/store/dist/store.d.ts +29 -0
- package/dist/node_modules/@tanstack/store/dist/types.d.ts +38 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/cells/coreCellsFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/cells/coreCellsFeature.types.d.ts +53 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/columns/coreColumnsFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/columns/coreColumnsFeature.types.d.ts +90 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/coreFeatures.d.ts +17 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/headers/coreHeadersFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/headers/coreHeadersFeature.types.d.ts +114 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/reactivity/coreReactivityFeature.types.d.ts +51 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/row-models/coreRowModelsFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/row-models/coreRowModelsFeature.types.d.ts +29 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/rows/coreRowsFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/rows/coreRowsFeature.types.d.ts +129 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/table/coreTablesFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/core/table/coreTablesFeature.types.d.ts +203 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/cell-selection/cellSelectionFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/cell-selection/cellSelectionFeature.types.d.ts +294 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/cell-spanning/cellSpanningFeature.d.ts +11 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/cell-spanning/cellSpanningFeature.types.d.ts +148 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-faceting/columnFacetingFeature.d.ts +12 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-faceting/columnFacetingFeature.types.d.ts +63 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-filtering/columnFilteringFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-filtering/columnFilteringFeature.types.d.ts +209 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-filtering/filterFns.d.ts +35 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-grouping/columnGroupingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-grouping/columnGroupingFeature.types.d.ts +128 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-ordering/columnOrderingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-ordering/columnOrderingFeature.types.d.ts +82 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-pinning/columnPinningFeature.d.ts +11 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-pinning/columnPinningFeature.types.d.ts +195 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-resizing/columnResizingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-resizing/columnResizingFeature.types.d.ts +73 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-sizing/columnSizingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-sizing/columnSizingFeature.types.d.ts +134 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-visibility/columnVisibilityFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/column-visibility/columnVisibilityFeature.types.d.ts +92 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/global-filtering/globalFilteringFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/global-filtering/globalFilteringFeature.types.d.ts +67 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-aggregation/aggregationFns.d.ts +23 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-aggregation/rowAggregationFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-aggregation/rowAggregationFeature.types.d.ts +183 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-aggregation/rowAggregationFeature.utils.d.ts +18 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-expanding/rowExpandingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-expanding/rowExpandingFeature.types.d.ts +125 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-pagination/rowPaginationFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-pagination/rowPaginationFeature.types.d.ts +135 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-pinning/rowPinningFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-pinning/rowPinningFeature.types.d.ts +76 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-selection/rowSelectionFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-selection/rowSelectionFeature.types.d.ts +187 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-sorting/rowSortingFeature.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-sorting/rowSortingFeature.types.d.ts +236 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/row-sorting/sortFns.d.ts +23 -0
- package/dist/node_modules/@tanstack/table-core/dist/features/stockFeatures.d.ts +37 -0
- package/dist/node_modules/@tanstack/table-core/dist/helpers/columnHelper.d.ts +47 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/Cell.d.ts +16 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/Column.d.ts +30 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/ColumnDef.d.ts +123 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/Header.d.ts +12 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/HeaderGroup.d.ts +6 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/Row.d.ts +24 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/RowModel.d.ts +19 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/RowModelFns.d.ts +11 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/Table.d.ts +53 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/TableFeatures.d.ts +416 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/TableOptions.d.ts +78 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/TableState.d.ts +46 -0
- package/dist/node_modules/@tanstack/table-core/dist/types/type-utils.d.ts +25 -0
- package/dist/shared.css +179 -0
- package/dist/styles.css +5467 -0
- package/dist/theme.css +314 -0
- package/dist/theme.map.json +278 -0
- package/dist/tokens/index.d.ts +2 -0
- package/dist/tokens/index.js +1 -0
- package/dist/tokens/tokens.generated.d.ts +2040 -0
- package/dist/tokens/tokens.generated.js +2053 -0
- package/dist/tokens.css +484 -0
- package/dist/tokens.flat.json +429 -0
- package/docs/Consuming.mdx +379 -0
- package/docs/Contributing.mdx +78 -0
- package/docs/ForAgents.mdx +53 -0
- package/docs/Introduction.mdx +54 -0
- package/llms.txt +556 -0
- package/package.json +357 -4
- package/src/components/action-row/ActionRow.mdx +686 -0
- package/src/components/action-row/ActionRow.stories.tsx +669 -0
- package/src/components/action-row/ActionRow.tsx +632 -0
- package/src/components/action-row/index.ts +9 -0
- package/src/components/alert/Alert.mdx +377 -0
- package/src/components/alert/Alert.stories.tsx +674 -0
- package/src/components/alert/Alert.tsx +579 -0
- package/src/components/alert/index.ts +13 -0
- package/src/components/anchored-panel/AnchoredPanel.mdx +381 -0
- package/src/components/anchored-panel/AnchoredPanel.stories.tsx +593 -0
- package/src/components/anchored-panel/AnchoredPanel.tsx +176 -0
- package/src/components/anchored-panel/index.ts +15 -0
- package/src/components/badge/Badge.mdx +487 -0
- package/src/components/badge/Badge.stories.tsx +375 -0
- package/src/components/badge/Badge.tsx +360 -0
- package/src/components/badge/index.ts +10 -0
- package/src/components/banner/Banner.mdx +704 -0
- package/src/components/banner/Banner.stories.tsx +448 -0
- package/src/components/banner/Banner.tsx +602 -0
- package/src/components/banner/index.ts +14 -0
- package/src/components/button/Button.mdx +286 -0
- package/src/components/button/Button.stories.tsx +381 -0
- package/src/components/button/Button.tsx +384 -0
- package/src/components/button/index.ts +1 -0
- package/src/components/button-group/ButtonGroup.mdx +512 -0
- package/src/components/button-group/ButtonGroup.stories.tsx +714 -0
- package/src/components/button-group/ButtonGroup.tsx +491 -0
- package/src/components/button-group/index.ts +10 -0
- package/src/components/card-select/CardSelect.mdx +662 -0
- package/src/components/card-select/CardSelect.stories.tsx +784 -0
- package/src/components/card-select/CardSelect.tsx +783 -0
- package/src/components/card-select/CardSelectGroup.tsx +169 -0
- package/src/components/card-select/index.ts +18 -0
- package/src/components/checkbox/Checkbox.mdx +269 -0
- package/src/components/checkbox/Checkbox.stories.tsx +306 -0
- package/src/components/checkbox/Checkbox.tsx +343 -0
- package/src/components/checkbox/index.ts +1 -0
- package/src/components/chip/Chip.mdx +683 -0
- package/src/components/chip/Chip.stories.tsx +734 -0
- package/src/components/chip/Chip.tsx +732 -0
- package/src/components/chip/index.ts +9 -0
- package/src/components/column-header/ColumnHeader.mdx +301 -0
- package/src/components/column-header/ColumnHeader.stories.tsx +319 -0
- package/src/components/column-header/ColumnHeader.tsx +287 -0
- package/src/components/column-header/index.ts +7 -0
- package/src/components/combobox-field/Combobox.tsx +693 -0
- package/src/components/combobox-field/ComboboxField.mdx +525 -0
- package/src/components/combobox-field/ComboboxField.stories.tsx +502 -0
- package/src/components/combobox-field/ComboboxField.tsx +259 -0
- package/src/components/combobox-field/index.ts +12 -0
- package/src/components/date-field/DateField.mdx +340 -0
- package/src/components/date-field/DateField.stories.tsx +221 -0
- package/src/components/date-field/DateField.tsx +176 -0
- package/src/components/date-field/index.ts +1 -0
- package/src/components/date-picker/DatePicker.mdx +436 -0
- package/src/components/date-picker/DatePicker.stories.tsx +458 -0
- package/src/components/date-picker/DatePicker.tsx +688 -0
- package/src/components/date-picker/index.ts +9 -0
- package/src/components/divider/Divider.mdx +256 -0
- package/src/components/divider/Divider.stories.tsx +177 -0
- package/src/components/divider/Divider.tsx +193 -0
- package/src/components/divider/index.ts +1 -0
- package/src/components/drawer/Drawer.mdx +518 -0
- package/src/components/drawer/Drawer.stories.tsx +392 -0
- package/src/components/drawer/Drawer.tsx +683 -0
- package/src/components/drawer/index.ts +1 -0
- package/src/components/dropdown-button/DropdownButton.mdx +285 -0
- package/src/components/dropdown-button/DropdownButton.stories.tsx +398 -0
- package/src/components/dropdown-button/DropdownButton.tsx +198 -0
- package/src/components/dropdown-button/index.ts +7 -0
- package/src/components/faq/FAQ.mdx +364 -0
- package/src/components/faq/FAQ.stories.tsx +343 -0
- package/src/components/faq/FAQ.tsx +337 -0
- package/src/components/faq/index.ts +1 -0
- package/src/components/field/Field.mdx +129 -0
- package/src/components/field/Field.stories.tsx +461 -0
- package/src/components/field/Field.tsx +765 -0
- package/src/components/field/index.ts +20 -0
- package/src/components/field-pair/FieldPair.mdx +308 -0
- package/src/components/field-pair/FieldPair.stories.tsx +530 -0
- package/src/components/field-pair/FieldPair.tsx +796 -0
- package/src/components/field-pair/index.ts +9 -0
- package/src/components/file-upload/FileUpload.mdx +345 -0
- package/src/components/file-upload/FileUpload.stories.tsx +698 -0
- package/src/components/file-upload/FileUpload.tsx +802 -0
- package/src/components/file-upload/index.ts +6 -0
- package/src/components/filter-chip/FilterChip.mdx +778 -0
- package/src/components/filter-chip/FilterChip.stories.tsx +827 -0
- package/src/components/filter-chip/FilterChip.tsx +881 -0
- package/src/components/filter-chip/index.ts +11 -0
- package/src/components/filter-facet/FilterFacet.mdx +536 -0
- package/src/components/filter-facet/FilterFacet.stories.tsx +506 -0
- package/src/components/filter-facet/FilterFacet.tsx +1160 -0
- package/src/components/filter-facet/index.ts +7 -0
- package/src/components/firm-avatar/FirmAvatar.mdx +280 -0
- package/src/components/firm-avatar/FirmAvatar.stories.tsx +147 -0
- package/src/components/firm-avatar/FirmAvatar.tsx +172 -0
- package/src/components/firm-avatar/index.ts +7 -0
- package/src/components/form-actions/FormActions.mdx +518 -0
- package/src/components/form-actions/FormActions.stories.tsx +621 -0
- package/src/components/form-actions/FormActions.tsx +273 -0
- package/src/components/form-actions/index.ts +6 -0
- package/src/components/form-block/FormBlock.mdx +728 -0
- package/src/components/form-block/FormBlock.stories.tsx +813 -0
- package/src/components/form-block/FormBlock.tsx +679 -0
- package/src/components/form-block/index.ts +13 -0
- package/src/components/form-section/FormSection.mdx +436 -0
- package/src/components/form-section/FormSection.stories.tsx +407 -0
- package/src/components/form-section/FormSection.tsx +290 -0
- package/src/components/form-section/index.ts +17 -0
- package/src/components/heading/Heading.mdx +206 -0
- package/src/components/heading/Heading.stories.tsx +169 -0
- package/src/components/heading/Heading.tsx +124 -0
- package/src/components/heading/index.ts +8 -0
- package/src/components/heading-group/HeadingGroup.mdx +521 -0
- package/src/components/heading-group/HeadingGroup.stories.tsx +353 -0
- package/src/components/heading-group/HeadingGroup.tsx +396 -0
- package/src/components/heading-group/index.ts +7 -0
- package/src/components/hero/Hero.mdx +742 -0
- package/src/components/hero/Hero.stories.tsx +527 -0
- package/src/components/hero/Hero.tsx +807 -0
- package/src/components/hero/index.ts +1 -0
- package/src/components/icon/Icon.mdx +329 -0
- package/src/components/icon/Icon.stories.tsx +398 -0
- package/src/components/icon/Icon.tsx +97 -0
- package/src/components/icon/index.ts +2 -0
- package/src/components/icon-button/IconButton.mdx +206 -0
- package/src/components/icon-button/IconButton.stories.tsx +341 -0
- package/src/components/icon-button/IconButton.tsx +273 -0
- package/src/components/icon-button/index.ts +1 -0
- package/src/components/item-row/ItemRow.mdx +533 -0
- package/src/components/item-row/ItemRow.stories.tsx +434 -0
- package/src/components/item-row/ItemRow.tsx +676 -0
- package/src/components/item-row/index.ts +9 -0
- package/src/components/list-row/ListRow.mdx +404 -0
- package/src/components/list-row/ListRow.stories.tsx +404 -0
- package/src/components/list-row/ListRow.tsx +424 -0
- package/src/components/list-row/index.ts +1 -0
- package/src/components/menu/Menu.mdx +268 -0
- package/src/components/menu/Menu.stories.tsx +455 -0
- package/src/components/menu/Menu.tsx +452 -0
- package/src/components/menu/index.ts +1 -0
- package/src/components/modal/Modal.mdx +854 -0
- package/src/components/modal/Modal.stories.tsx +881 -0
- package/src/components/modal/Modal.tsx +1434 -0
- package/src/components/modal/index.ts +1 -0
- package/src/components/nav-link/NavLink.mdx +196 -0
- package/src/components/nav-link/NavLink.stories.tsx +243 -0
- package/src/components/nav-link/NavLink.tsx +222 -0
- package/src/components/nav-link/index.ts +1 -0
- package/src/components/number-field/NumberField.mdx +223 -0
- package/src/components/number-field/NumberField.stories.tsx +291 -0
- package/src/components/number-field/NumberField.tsx +388 -0
- package/src/components/number-field/index.ts +6 -0
- package/src/components/pagination/Pagination.mdx +305 -0
- package/src/components/pagination/Pagination.stories.tsx +333 -0
- package/src/components/pagination/Pagination.tsx +343 -0
- package/src/components/pagination/index.ts +8 -0
- package/src/components/popover-surface/PopoverSurface.mdx +158 -0
- package/src/components/popover-surface/PopoverSurface.stories.tsx +421 -0
- package/src/components/popover-surface/index.ts +1 -0
- package/src/components/progress-bar/ProgressBar.mdx +802 -0
- package/src/components/progress-bar/ProgressBar.stories.tsx +533 -0
- package/src/components/progress-bar/ProgressBar.tsx +654 -0
- package/src/components/progress-bar/index.ts +9 -0
- package/src/components/promo-sticker/PromoSticker.mdx +436 -0
- package/src/components/promo-sticker/PromoSticker.stories.tsx +363 -0
- package/src/components/promo-sticker/PromoSticker.tsx +313 -0
- package/src/components/promo-sticker/index.ts +7 -0
- package/src/components/promo-surface/PromoSurface.mdx +399 -0
- package/src/components/promo-surface/PromoSurface.stories.tsx +270 -0
- package/src/components/promo-surface/PromoSurface.tsx +305 -0
- package/src/components/promo-surface/index.ts +7 -0
- package/src/components/radio/Radio.mdx +243 -0
- package/src/components/radio/Radio.stories.tsx +307 -0
- package/src/components/radio/Radio.tsx +288 -0
- package/src/components/radio/index.ts +1 -0
- package/src/components/radio-group/RadioGroup.mdx +119 -0
- package/src/components/radio-group/RadioGroup.stories.tsx +225 -0
- package/src/components/radio-group/RadioGroup.tsx +139 -0
- package/src/components/radio-group/index.ts +1 -0
- package/src/components/select/Select.mdx +241 -0
- package/src/components/select/Select.stories.tsx +404 -0
- package/src/components/select/Select.tsx +381 -0
- package/src/components/select/index.ts +1 -0
- package/src/components/select-field/SelectField.mdx +324 -0
- package/src/components/select-field/SelectField.stories.tsx +460 -0
- package/src/components/select-field/SelectField.tsx +138 -0
- package/src/components/select-field/index.ts +1 -0
- package/src/components/skeleton/Skeleton.mdx +194 -0
- package/src/components/skeleton/Skeleton.stories.tsx +260 -0
- package/src/components/skeleton/Skeleton.tsx +107 -0
- package/src/components/skeleton/index.ts +1 -0
- package/src/components/split-button/SplitButton.mdx +445 -0
- package/src/components/split-button/SplitButton.stories.tsx +465 -0
- package/src/components/split-button/SplitButton.tsx +361 -0
- package/src/components/split-button/index.ts +7 -0
- package/src/components/status-summary-bar/StatusSummaryBar.mdx +338 -0
- package/src/components/status-summary-bar/StatusSummaryBar.stories.tsx +408 -0
- package/src/components/status-summary-bar/StatusSummaryBar.tsx +428 -0
- package/src/components/status-summary-bar/index.ts +8 -0
- package/src/components/subject-lookup-field/SubjectLookupField.mdx +378 -0
- package/src/components/subject-lookup-field/SubjectLookupField.stories.tsx +393 -0
- package/src/components/subject-lookup-field/SubjectLookupField.tsx +1079 -0
- package/src/components/subject-lookup-field/index.ts +11 -0
- package/src/components/switch/Switch.mdx +376 -0
- package/src/components/switch/Switch.stories.tsx +296 -0
- package/src/components/switch/Switch.tsx +483 -0
- package/src/components/switch/index.ts +1 -0
- package/src/components/table/Table.mdx +575 -0
- package/src/components/table/Table.stories.tsx +1049 -0
- package/src/components/table/Table.tsx +745 -0
- package/src/components/table/TableConsumers.stories.tsx +195 -0
- package/src/components/table/_tableFixtures.ts +1189 -0
- package/src/components/table/index.ts +22 -0
- package/src/components/text-field/TextField.mdx +479 -0
- package/src/components/text-field/TextField.stories.tsx +366 -0
- package/src/components/text-field/TextField.tsx +391 -0
- package/src/components/text-field/index.ts +8 -0
- package/src/components/text-link/TextLink.mdx +353 -0
- package/src/components/text-link/TextLink.stories.tsx +458 -0
- package/src/components/text-link/TextLink.tsx +504 -0
- package/src/components/text-link/index.ts +10 -0
- package/src/components/textarea/Textarea.mdx +244 -0
- package/src/components/textarea/Textarea.stories.tsx +371 -0
- package/src/components/textarea/Textarea.tsx +489 -0
- package/src/components/textarea/index.ts +9 -0
- package/src/components/tooltip/Tooltip.mdx +462 -0
- package/src/components/tooltip/Tooltip.stories.tsx +500 -0
- package/src/components/tooltip/Tooltip.tsx +756 -0
- package/src/components/tooltip/index.ts +13 -0
- package/src/components/unit-field/UnitField.mdx +215 -0
- package/src/components/unit-field/UnitField.stories.tsx +291 -0
- package/src/components/unit-field/UnitField.tsx +255 -0
- package/src/components/unit-field/index.ts +7 -0
- package/src/icons/icon-registry.generated.ts +510 -0
- package/src/icons/icon-types.generated.ts +256 -0
- package/src/index.ts +71 -0
- package/src/internal/BottomSheet.tsx +714 -0
- package/src/internal/FodsProvider.tsx +36 -0
- package/src/internal/MotionCaret.tsx +53 -0
- package/src/internal/NumberFormatInput.tsx +276 -0
- package/src/internal/SummaryDonut.tsx +359 -0
- package/src/internal/buttonSegment.ts +241 -0
- package/src/internal/collapseRoom.ts +130 -0
- package/src/internal/comboboxKeys.ts +90 -0
- package/src/internal/contentPresence.ts +46 -0
- package/src/internal/dayCell.ts +274 -0
- package/src/internal/dialogPortal.ts +50 -0
- package/src/internal/donutSweeps.ts +77 -0
- package/src/internal/enterOnViewGeometry.ts +53 -0
- package/src/internal/faqItem.ts +104 -0
- package/src/internal/floatingLabelMotion.tsx +109 -0
- package/src/internal/formBlockContext.ts +27 -0
- package/src/internal/heightRoom.ts +135 -0
- package/src/internal/numberSeparators.ts +93 -0
- package/src/internal/overlayMotion.tsx +32 -0
- package/src/internal/paginationItem.ts +106 -0
- package/src/internal/popoverSurface.ts +78 -0
- package/src/internal/portalContainer.ts +11 -0
- package/src/internal/progressBarItem.ts +356 -0
- package/src/internal/selectionControlText.ts +42 -0
- package/src/internal/statusSummaryParts.tsx +475 -0
- package/src/internal/summaryMotion.ts +111 -0
- package/src/internal/table/ChildConnector.tsx +57 -0
- package/src/internal/table/ChildRowPrefix.tsx +21 -0
- package/src/internal/table/ColumnSettings.tsx +194 -0
- package/src/internal/table/ScrollRegion.tsx +176 -0
- package/src/internal/table/TableEmpty.tsx +99 -0
- package/src/internal/table/TableLayout.tsx +29 -0
- package/src/internal/table/TableLoadStatus.tsx +60 -0
- package/src/internal/table/TableMobile.tsx +582 -0
- package/src/internal/table/TruncatedCell.tsx +35 -0
- package/src/internal/table/emptyValue.ts +11 -0
- package/src/internal/table/features.ts +44 -0
- package/src/internal/table/recipes.ts +263 -0
- package/src/internal/table/rowClick.ts +8 -0
- package/src/internal/table/types.ts +342 -0
- package/src/internal/tailwind-variants.ts +65 -0
- package/src/internal/tooltipContext.ts +15 -0
- package/src/internal/tw-merge-config.generated.ts +275 -0
- package/src/internal/useAnchoredPanel.ts +340 -0
- package/src/internal/useCountUp.ts +65 -0
- package/src/internal/useDateFieldTrigger.tsx +357 -0
- package/src/internal/useEChart.ts +88 -0
- package/src/internal/useEnterOnView.ts +80 -0
- package/src/internal/useFloatingBar.ts +125 -0
- package/src/internal/useFormReset.ts +47 -0
- package/src/internal/useIsMobile.ts +64 -0
- package/src/internal/useNoImplicitSubmit.ts +41 -0
- package/src/internal/useOneRowOverflow.ts +103 -0
- package/src/internal/usePrefersReducedMotion.ts +27 -0
- package/src/internal/useReturnFocus.ts +34 -0
- package/src/internal/utils.ts +58 -0
- package/src/recipes/EmptyState.stories.tsx +105 -0
- package/src/recipes/Form.stories.tsx +355 -0
- package/src/recipes/ModalWithForm.stories.tsx +219 -0
- package/src/recipes/Recipes.mdx +61 -0
- package/src/recipes/TableWithFilters.stories.tsx +278 -0
- package/src/storybook/FodsFamily.tsx +39 -0
- package/src/storybook/Section.tsx +36 -0
- package/src/storybook/a11y.ts +24 -0
- package/src/storybook/assets/banner-character-bartender.webp +0 -0
- package/src/storybook/assets/banner-invoice-sheet-left.webp +0 -0
- package/src/storybook/assets/banner-invoice-sheet-right.webp +0 -0
- package/src/storybook/assets/invoice-hero.webp +0 -0
- package/src/storybook/assets/invoice.webp +0 -0
- package/src/storybook/assets/section-document-info.svg +21 -0
- package/src/storybook/assets/section-gear-checklist.svg +11 -0
- package/src/storybook/assets/section-person-arrow-in.svg +15 -0
- package/src/storybook/assets/section-person-arrow-out.svg +22 -0
- package/src/storybook/assets/section-receipt-dollar.svg +23 -0
- package/src/storybook/assets/table-empty-folder-empty.png +0 -0
- package/src/storybook/assets/table-empty-folder-magnifying-glass.png +0 -0
- package/src/storybook/assets/table-empty-funnel.png +0 -0
- package/src/storybook/assets/table-empty-load-failed.png +0 -0
- package/src/storybook/assets/wallet-spot.png +0 -0
- package/src/storybook/assets.d.ts +17 -0
- package/src/storybook/componentDoc.ts +41 -0
- package/src/storybook/fitFrame.tsx +70 -0
- package/src/storybook/forceStates.tsx +647 -0
- package/src/storybook/illustrations.tsx +66 -0
- package/src/storybook/viewportFrame.tsx +58 -0
- package/src/styles/assets/label-brush-1.svg +6 -0
- package/src/styles/assets/pattern-dark.svg +113 -0
- package/src/styles/base.css +106 -0
- package/src/styles/index.css +15 -0
- package/src/styles/motion.css +157 -0
- package/src/styles/promo-sticker.css +27 -0
- package/src/styles/promo-surface.css +49 -0
- package/src/styles/shared.css +11 -0
- package/src/styles/theme.generated.css +314 -0
- package/src/styles/theme.map.json +278 -0
- package/src/styles/tracking.generated.css +12 -0
- package/src/tokens/index.ts +4 -0
- package/src/tokens/tokens.generated.ts +542 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { Meta, Canvas, Controls } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as IconButtonStories from './IconButton.stories';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
<Meta of={IconButtonStories} tags={['autodocs']} />
|
|
6
|
+
|
|
7
|
+
# IconButton
|
|
8
|
+
|
|
9
|
+
## Metadata
|
|
10
|
+
|
|
11
|
+
- **Layer:** atom
|
|
12
|
+
- **Status:** stable
|
|
13
|
+
- **Tokens used:** `--bg-active`, `--bg-active-inverse`, `--bg-hover`, `--bg-hover-inverse`, `--bg-primary`, `--border-width-100`, `--border-width-200`, `--disabled-control`, `--disabled-foreground`, `--font-body`, `--outline-default`, `--outline-focus`, `--outline-focus-inverse`, `--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-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`, `--text-inverted`, `--text-inverted-secondary`
|
|
14
|
+
- **Manifest version:** 2.3.1
|
|
15
|
+
|
|
16
|
+
## Overview
|
|
17
|
+
|
|
18
|
+
A **square**, label-less control for a single action carried entirely by an icon — toolbars, dense table rows, close/expand affordances. It shares Button's colour families, sizes, states and token contract; the only differences are that it is square (width = height, padding 0, glyph optically centred) and has no visible label.
|
|
19
|
+
|
|
20
|
+
Use it when the icon alone is unambiguous (×, +, edit, trash) and space is tight. For any action that needs a word, use [`Button`](?path=/docs/design-system-atoms-button--docs). Because there is no visible text, an **`aria-label` is mandatory** — it is the control's only accessible name.
|
|
21
|
+
|
|
22
|
+
## Rationale
|
|
23
|
+
|
|
24
|
+
The legacy button set folded icon-only into a `Content = Icon` value on the rectangular Button. That was wrong: a label-less button must be **square**, and a boolean/variant cannot change a component's padding — toggling the label off leaves the button rectangular. So icon-only is its own atom. It reuses Button's exact colour families and state model, so the two stay visually locked; only geometry (square) and content (one swappable icon, no label) differ.
|
|
25
|
+
|
|
26
|
+
## Anatomy
|
|
27
|
+
|
|
28
|
+
- **Container** — a fixed-size square (`size-[Npx]`, width = height), padding 0. Fill / border / radius per family + state (identical treatment to Button). Radius `--radius-200`, except XL which steps up to `--radius-300`.
|
|
29
|
+
- **Surface** (optional, borderless families only) — an opaque `--bg-primary` layer behind the icon, switched on with the `showSurface` prop. Absent from the filled families and from `disabled`, so the prop is inert there. See [Surface](#surface).
|
|
30
|
+
- **Icon** — a single DS `<Icon>` glyph, optically centred, recoloured to the family foreground, sized per size from the manifest `sizes[].icon` via `[&_.icon]:size-icon-<step>` (width and height; the loading spinner too). Passed through the required `icon` prop. Decorative — the `aria-label` owns the announcement.
|
|
31
|
+
- **Spinner** — in the `loading` state the icon is replaced by `<Icon name="spinner" />` with `animate-spin`; the control becomes non-interactive (`aria-busy`).
|
|
32
|
+
|
|
33
|
+
## Variants
|
|
34
|
+
|
|
35
|
+
<Canvas of={IconButtonStories.Variants} />
|
|
36
|
+
|
|
37
|
+
Eight colour/intent families, identical fill / border / icon treatment to [`Button`](?path=/docs/design-system-atoms-button--docs):
|
|
38
|
+
|
|
39
|
+
<table>
|
|
40
|
+
<thead>
|
|
41
|
+
<tr><th>Varianta</th><th>Kdy</th><th>Tokeny (kód)</th></tr>
|
|
42
|
+
</thead>
|
|
43
|
+
<tbody>
|
|
44
|
+
<tr><td><code>primary</code></td><td>Blue filled — in-product default confirm affordance</td><td>bg <code>--secondary-solid</code>, hover <code>--secondary-hover</code>, active <code>--secondary-active</code>, icon <code>--secondary-foreground</code></td></tr>
|
|
45
|
+
<tr><td><code>secondary</code></td><td>Neutral outline — close / dismiss</td><td>transparent + border <code>--outline-default</code>, icon <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>
|
|
46
|
+
<tr><td><code>tertiary</code></td><td>Ghost — most common in dense UI</td><td>transparent + transparent border (border law — the edge stays, only its colour goes), icon <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>
|
|
47
|
+
<tr><td><code>brand</code></td><td>Orange filled — marketing accent</td><td>bg <code>--primary-solid</code>, hover <code>--primary-hover</code>, active <code>--primary-active</code>, icon <code>--primary-foreground</code></td></tr>
|
|
48
|
+
<tr><td><code>danger</code></td><td>Red filled — destructive</td><td>bg <code>--status-danger-solid</code>, hover <code>--status-danger-hover</code>, active <code>--status-danger-active</code>, icon <code>--status-danger-foreground</code></td></tr>
|
|
49
|
+
<tr><td><code>danger-outline</code></td><td>Quiet destructive — row delete, dense confirm</td><td>transparent + border <code>--outline-default</code>, icon <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>
|
|
50
|
+
<tr><td><code>success</code></td><td>Green filled — confirmation</td><td>bg <code>--status-success-solid</code>, hover <code>--status-success-hover</code>, active <code>--status-success-active</code>, icon <code>--status-success-foreground</code></td></tr>
|
|
51
|
+
<tr><td><code>success-outline</code></td><td>Quiet success/confirm</td><td>transparent + border <code>--outline-default</code>, icon <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>
|
|
52
|
+
</tbody>
|
|
53
|
+
</table>
|
|
54
|
+
|
|
55
|
+
> Intent note: the blue family is `primary` (in-product default) and the orange family is `brand`. Which goes where is **not** an open question — the rule was closed upstream by the 2026-07-15 grill (`button.md` § Primary vs Brand) and is written out in [`Button` → Rationale](?path=/docs/design-system-atoms-button--docs): `brand` only in the signature slots, everything else in-app is `primary`, never both in one region.
|
|
56
|
+
>
|
|
57
|
+
> Per manifest 1.2.0 the blue borderless families (`secondary`, `tertiary`) bind **the same `--secondary-active` ink in hover and active** — the wash depth (`--bg-hover` vs `--bg-active`) separates the two states, and `--secondary-hover` is left to blue fills. The status outline families keep their own `-hover` → `-active` ladder.
|
|
58
|
+
>
|
|
59
|
+
> Outline families follow the **border law**: a neutral `--outline-default` edge, the status colour lives in the icon. Resting icons use the **AA-safe** token — `danger-outline` → `--status-danger` (6.2:1), `success-outline` → `--status-success-tint-foreground` (5.1:1; the bright `--status-success` is only 2.4:1 and fails AA). Mirrors the Button families (siblings stay visually locked).
|
|
60
|
+
|
|
61
|
+
### Matrix
|
|
62
|
+
|
|
63
|
+
The full variant × size grid, mirroring the Figma labelled grid — a quick side-by-side of every family
|
|
64
|
+
at every size.
|
|
65
|
+
|
|
66
|
+
<Canvas of={IconButtonStories.Matrix} />
|
|
67
|
+
|
|
68
|
+
## Sizes
|
|
69
|
+
|
|
70
|
+
<Canvas of={IconButtonStories.Sizes} />
|
|
71
|
+
|
|
72
|
+
Square — width = height. Icon steps coarsely; heights match Button size-for-size so an IconButton lines up with text Buttons in a row.
|
|
73
|
+
|
|
74
|
+
<table>
|
|
75
|
+
<thead>
|
|
76
|
+
<tr><th>Size</th><th>Box (W=H)</th><th>Icon</th><th>Radius</th></tr>
|
|
77
|
+
</thead>
|
|
78
|
+
<tbody>
|
|
79
|
+
<tr><td><code>xs</code></td><td>28 px</td><td>16 px (<code>--size-icon-xsmall</code>)</td><td><code>--radius-200</code></td></tr>
|
|
80
|
+
<tr><td><code>sm</code></td><td>32 px</td><td>20 px (<code>--size-icon-small</code>)</td><td><code>--radius-200</code></td></tr>
|
|
81
|
+
<tr><td><code>md</code> (default)</td><td>40 px</td><td>24 px (<code>--size-icon</code>)</td><td><code>--radius-200</code></td></tr>
|
|
82
|
+
<tr><td><code>lg</code></td><td>44 px</td><td>24 px (<code>--size-icon</code>)</td><td><code>--radius-200</code></td></tr>
|
|
83
|
+
<tr><td><code>xl</code></td><td>56 px</td><td>32 px (<code>--size-icon-large</code>)</td><td><code>--radius-300</code></td></tr>
|
|
84
|
+
</tbody>
|
|
85
|
+
</table>
|
|
86
|
+
|
|
87
|
+
## States
|
|
88
|
+
|
|
89
|
+
<Canvas of={IconButtonStories.States} />
|
|
90
|
+
|
|
91
|
+
- **Default** — family base (see Variants).
|
|
92
|
+
- **Hover** — filled families shift fill to the `-hover` step; borderless families add a neutral `--bg-hover` wash. The icon moves to `--secondary-active` on the blue families (same ink as active, manifest 1.2.0 — the wash depth is what separates the two states) and to its own `-hover` colour on the status outline families.
|
|
93
|
+
- **Active** — filled families use the `-active` fill; borderless families use the `--bg-active` wash + the `-active` icon colour.
|
|
94
|
+
- **Focus** — additive native `--outline-focus` outline at `outline-offset: 2px` via `:focus-visible` (per `focus-ring.md`), uniform across all families. Never removed.
|
|
95
|
+
- **Disabled** — filled → `--disabled-control` surface + `--disabled-foreground` icon; outline → `--disabled-control` border + muted icon; ghost dims the icon only. Sets the native `disabled` attribute plus `aria-disabled` (no pointer events).
|
|
96
|
+
- **Loading** — icon → `spinner` (`animate-spin`), `aria-busy="true"`, clicks suppressed; family styling is preserved (not the disabled look).
|
|
97
|
+
- **Motion** (manifest 2.3.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 in the app stops it.
|
|
98
|
+
|
|
99
|
+
**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/icon-colour 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>.
|
|
100
|
+
|
|
101
|
+
## Surface
|
|
102
|
+
|
|
103
|
+
<Canvas of={IconButtonStories.Surface} />
|
|
104
|
+
|
|
105
|
+
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 icon, so the control keeps its own background on a tinted section, card or banner.
|
|
106
|
+
|
|
107
|
+
- 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.
|
|
108
|
+
- The prop is **inert** on the filled families and in `disabled` (the layer does not exist there).
|
|
109
|
+
- 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 control is tinted.
|
|
110
|
+
- Same layer and the same token stack as [`Button`](?path=/docs/design-system-atoms-button--docs) — the siblings' contracts are identical by design, and so is the **prop name**: `icon-button` 2.0.0 renamed the boolean to `showSurface` because the bare `surface` is this atom's Default · Inverse axis, and `button` 2.0.0 / `dropdown-button` 2.0.0 followed so the three siblings share one name.
|
|
111
|
+
|
|
112
|
+
## Inverse ground
|
|
113
|
+
|
|
114
|
+
<Canvas of={IconButtonStories.InverseGround} />
|
|
115
|
+
|
|
116
|
+
`surface="inverse"` is this atom's half of `spec/06-patterns/inverse-surface.md` — a pure token rebind for a control composed on dark chrome. Geometry, radius and sizes are untouched.
|
|
117
|
+
|
|
118
|
+
<table>
|
|
119
|
+
<thead>
|
|
120
|
+
<tr><th>Part</th><th>Light surface</th><th>On inverse</th></tr>
|
|
121
|
+
</thead>
|
|
122
|
+
<tbody>
|
|
123
|
+
<tr><td>Glyph ink</td><td><code>--secondary</code></td><td><code>--text-inverted</code></td></tr>
|
|
124
|
+
<tr><td>Hover fill</td><td><code>--bg-hover</code> (claudy 3%)</td><td><code>--bg-hover-inverse</code> (white 8%)</td></tr>
|
|
125
|
+
<tr><td>Pressed fill</td><td><code>--bg-active</code> (claudy 6%)</td><td><code>--bg-active-inverse</code> (white 12%)</td></tr>
|
|
126
|
+
<tr><td>Focus ring</td><td><code>--outline-focus</code></td><td><code>--outline-focus-inverse</code></td></tr>
|
|
127
|
+
<tr><td>Disabled glyph</td><td><code>--disabled-foreground</code></td><td><code>--text-inverted-secondary</code> at 50%</td></tr>
|
|
128
|
+
</tbody>
|
|
129
|
+
</table>
|
|
130
|
+
|
|
131
|
+
- The white washes run **stronger** than the claudy pair (8/12 % against 3/6 %) because a light wash needs more alpha to read against a dark fill. Counterparts, not equal percentages.
|
|
132
|
+
- **`--bg-hover-inverse` and `--bg-active-inverse` ship in the package tokens** since tokens `0.11.1` (2026-09-14, published then as `@invoiceonline/ui-system`). Every token in the table below ships in the package's `tokens.css`.
|
|
133
|
+
- The axis is **sparse**: Inverse exists for the ghost `tertiary` family only. The manifest is blunt about the rest — *"A consumer switching a non-Tertiary instance to Inverse gets Figma's nearest-match fallback — that is a misuse signal, not a gap; the pattern defines no inverse render for the other families."* Filled families read on dark as they are; outlined families on dark are out of contract.
|
|
134
|
+
- The **focus ring is the exception to that sparseness** and swaps on any family, because every control on a dark surface needs it: `--outline-focus` measures 2.12:1 there, under the 3:1 non-text floor, against 9.43:1 for the inverted ring.
|
|
135
|
+
- The prop is **`surface`**, and it was **`ground`** until `icon-button` 2.0.0. The axis had existed since 1.4.0 with no `properties[]` entry of its own, while the `Show surface` boolean claimed the bare `surface` name in its `maps` — one code prop cannot be both a boolean and an enum, so the axis carried a local disambiguation here. 2.0.0 resolved it upstream: the axis got its own `properties[]` entry with `maps: "surface"` and the boolean moved to `maps: "showSurface"`, which is why the bump is MAJOR — a consumer still passing the old boolean would land on the new enum. [`TextLink`](?path=/docs/design-system-atoms-textlink--docs) already used `surface` for this same Default/Inverse axis, so the pattern now reads identically on both atoms.
|
|
136
|
+
- Sibling contract: `Button` deliberately gets **no** inverse render. The stance there is *compose, not recolour* — one filled `Brand` CTA on a dark ground, no secondary button beside it.
|
|
137
|
+
|
|
138
|
+
## Compositions
|
|
139
|
+
|
|
140
|
+
<Canvas of={IconButtonStories.Compositions} />
|
|
141
|
+
|
|
142
|
+
## API
|
|
143
|
+
|
|
144
|
+
<Controls />
|
|
145
|
+
|
|
146
|
+
## Do / Don't
|
|
147
|
+
|
|
148
|
+
- ✅ Always set `aria-label` — it is the only accessible name
|
|
149
|
+
- ✅ Use when the icon alone is unambiguous (×, +, edit, trash)
|
|
150
|
+
- ✅ Match the size to adjacent Buttons in the same row
|
|
151
|
+
- ✅ Use `lg` / `xl` as standalone tap targets
|
|
152
|
+
- ❌ Don't use an icon whose meaning is unclear without a label — use a `Button`
|
|
153
|
+
- ❌ Don't ship an icon-only control with no accessible name
|
|
154
|
+
- ❌ Don't place a 28 px `xs` IconButton as a lone primary tap target on mobile
|
|
155
|
+
- ❌ Don't fake a square icon button by toggling a `Button`'s label off (it stays rectangular)
|
|
156
|
+
|
|
157
|
+
## Accessibility
|
|
158
|
+
|
|
159
|
+
- **Accessible name is mandatory** — `aria-label` is required by the type. The `icon` is decorative (`<Icon>` renders `aria-hidden`). Without `aria-label` the control is unnamed for assistive tech.
|
|
160
|
+
- **Keyboard** — native `<button>`: Tab focuses, Enter / Space activates.
|
|
161
|
+
- **Focus outline** — `focus-visible:outline-200 focus-visible:outline-outline-focus` with `outline-offset-2` (native `outline`); provides a visible outline against any fill. Never override with `outline: none` without an equal replacement.
|
|
162
|
+
- **Touch target** — ≥ 44×44 is met by `lg` / `xl`. For `xs` / `sm` / `md` standalone on mobile, pad the hit area (not the visual box).
|
|
163
|
+
- **Loading** — sets `aria-busy="true"` and suppresses repeat submits.
|
|
164
|
+
- **Disabled** — native `disabled` + `aria-disabled` + visual change; `--disabled-foreground` is exempt from contrast minimums (WCAG 1.4.3).
|
|
165
|
+
|
|
166
|
+
Accessibility floor for every FODS component: `spec/01-foundations/accessibility.md`.
|
|
167
|
+
|
|
168
|
+
## Usage
|
|
169
|
+
|
|
170
|
+
```tsx
|
|
171
|
+
import { IconButton, Icon } from '@invoiceonline/ui-react';
|
|
172
|
+
|
|
173
|
+
// Good — ghost toolbar action with a required aria-label
|
|
174
|
+
<IconButton variant="tertiary" icon={<Icon name="pencil-simple" />} aria-label="Upravit fakturu" onClick={editInvoice} />
|
|
175
|
+
|
|
176
|
+
// Good — destructive action in a dense table row
|
|
177
|
+
<IconButton variant="danger" size="sm" icon={<Icon name="trash" />} aria-label="Smazat fakturu" onClick={deleteInvoice} />
|
|
178
|
+
|
|
179
|
+
// Good — loading: spinner replaces the icon, clicks suppressed
|
|
180
|
+
<IconButton variant="primary" icon={<Icon name="arrow-clockwise" />} aria-label="Obnovit" loading onClick={refresh} />
|
|
181
|
+
|
|
182
|
+
// Good — standalone tap target uses l/xl for the 44×44 minimum
|
|
183
|
+
<IconButton variant="tertiary" size="lg" icon={<Icon name="plus" />} aria-label="Přidat položku" onClick={addItem} />
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
```tsx
|
|
187
|
+
// Don't — no accessible name (TypeScript also flags the missing aria-label)
|
|
188
|
+
<IconButton variant="tertiary" icon={<Icon name="trash" />} />
|
|
189
|
+
|
|
190
|
+
// Don't — ambiguous icon that needs a word; use a Button instead
|
|
191
|
+
<IconButton variant="primary" icon={<Icon name="share" />} aria-label="?" />
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Related
|
|
195
|
+
|
|
196
|
+
- [`Button`](?path=/docs/design-system-atoms-button--docs) — the rectangular, labelled sibling (same families / sizes / states / tokens)
|
|
197
|
+
- [`Icon`](?path=/docs/design-system-atoms-icon--docs) — the DS icon set the `icon` prop draws from
|
|
198
|
+
- `spec/03-atoms/icon-button.md` — upstream design spec
|
|
199
|
+
|
|
200
|
+
## Migration notes
|
|
201
|
+
|
|
202
|
+
> **2.3.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. 2.3.0 (Figma Size values renamed to `xs`–`xl`) needed no code change.
|
|
203
|
+
|
|
204
|
+
> **2.2.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. The inverse ghost's disabled glyph (`--text-inverted-secondary` at 50%) is unchanged.
|
|
205
|
+
|
|
206
|
+
> **2.1.0 — cross-axis stretch (notes only).** The manifest now allows a composing parent to stretch an Icon Button to its own cross-axis height (width, icon and centring stay the size's; fill, surface, focus ring and hit area take the stretched height). The recipe still binds both edges through `size-*`, so nothing stretches today — the only consumer the manifest names is the item-row action strip (Size=M at 40×48), which is not built here yet. That build owns the height override; no change to this atom until then.
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
import { Fragment } from 'react';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
3
|
+
import { IconButton } from './IconButton';
|
|
4
|
+
import { Icon } from '../icon/Icon';
|
|
5
|
+
import { Section, Showcase } from '../../storybook/Section';
|
|
6
|
+
import { FodsFamily } from '../../storybook/FodsFamily';
|
|
7
|
+
import { BUTTON_FAMILY_FORCE_STATE as FORCE_STATE } from '../../storybook/forceStates';
|
|
8
|
+
import { componentDoc } from '../../storybook/componentDoc';
|
|
9
|
+
|
|
10
|
+
const VARIANTS = [
|
|
11
|
+
'brand',
|
|
12
|
+
'primary',
|
|
13
|
+
'secondary',
|
|
14
|
+
'tertiary',
|
|
15
|
+
'danger',
|
|
16
|
+
'danger-outline',
|
|
17
|
+
'success',
|
|
18
|
+
'success-outline',
|
|
19
|
+
] as const;
|
|
20
|
+
const SIZES = ['xs', 'sm', 'md', 'lg', 'xl'] as const;
|
|
21
|
+
/**
|
|
22
|
+
* `axes.surface` — the ground the control is composed on. Sparse: Inverse is a real render
|
|
23
|
+
* for the ghost `tertiary` family only, so there is no full Surface × Variant matrix to draw.
|
|
24
|
+
* The prop is `surface` since `icon-button` 2.0.0; the backing-layer boolean it used to
|
|
25
|
+
* collide with now maps to `showSurface`.
|
|
26
|
+
*/
|
|
27
|
+
const SURFACES = ['default', 'inverse'] as const;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Bare (unprefixed) twins of the component's own `hover:` / `active:` bindings,
|
|
31
|
+
* per family — only the properties that actually change against Default.
|
|
32
|
+
*
|
|
33
|
+
* `state` is deliberately NOT a prop on this family (manifest-first §4): Hover and
|
|
34
|
+
* Active are CSS pseudo-classes. To render them in a docs matrix they have to be
|
|
35
|
+
* forced statically — `parameters.pseudo` cannot be trusted, Tailwind v4 wraps every
|
|
36
|
+
* `hover:` utility in `@media (hover: hover)` and the addon does not rewrite rules
|
|
37
|
+
* nested in a media query, so the row would come out identical to Default
|
|
38
|
+
* (conventions.md § Definition of Done (b)).
|
|
39
|
+
*
|
|
40
|
+
* Passing them through `className` is enough here — our configured tailwind-merge
|
|
41
|
+
* drops the resting fill / border / icon-colour class of the same group and keeps the
|
|
42
|
+
* forced one. The `!` prefix is kept on the icon colours because the recipe ships them
|
|
43
|
+
* important; without it tailwind-merge treats the two as different modifiers and both
|
|
44
|
+
* survive.
|
|
45
|
+
*
|
|
46
|
+
* Tokens per `icon-button.manifest.json` 1.4.0 `families[].states.hover|active`,
|
|
47
|
+
* resolved to the theme's utility classes — the same stack as Button, the
|
|
48
|
+
* two must stay locked.
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
// The state axis of the manifest (axes.state, 1.4.0). Disabled and Loading are
|
|
52
|
+
// props; Hover and Active are forced statically via FORCE_STATE above.
|
|
53
|
+
const STATES = [
|
|
54
|
+
{ label: 'Default', props: {}, force: null },
|
|
55
|
+
{ label: 'Hover', props: {}, force: 'hover' },
|
|
56
|
+
{ label: 'Active', props: {}, force: 'active' },
|
|
57
|
+
{ label: 'Disabled', props: { disabled: true }, force: null },
|
|
58
|
+
{ label: 'Loading', props: { loading: true }, force: null },
|
|
59
|
+
] as const;
|
|
60
|
+
|
|
61
|
+
const meta = {
|
|
62
|
+
title: 'Design System/Atoms/IconButton',
|
|
63
|
+
component: IconButton,
|
|
64
|
+
parameters: {
|
|
65
|
+
layout: 'centered',
|
|
66
|
+
docs: {
|
|
67
|
+
description: {
|
|
68
|
+
component: componentDoc({
|
|
69
|
+
summary:
|
|
70
|
+
'Square, label-less control for a single icon-carried action — toolbars, dense table rows, close/expand. Same families, sizes, states and tokens as Button; only square and label-less. An `aria-label` is mandatory.',
|
|
71
|
+
useCases: [
|
|
72
|
+
'`tertiary` — ghost icon action, the most common in dense UI (toolbar, table row)',
|
|
73
|
+
'`secondary` — outline close / dismiss affordance',
|
|
74
|
+
'`primary` — blue square confirm affordance (in-product default)',
|
|
75
|
+
'`danger` — destructive icon action in a row',
|
|
76
|
+
'`danger-outline` / `success-outline` — quiet outline status actions (neutral border, colour in the icon)',
|
|
77
|
+
'`brand` / `success` — orange marketing accent / green confirmation',
|
|
78
|
+
],
|
|
79
|
+
bestPractices: [
|
|
80
|
+
'Always set `aria-label` — it is the only accessible name (the icon is decorative)',
|
|
81
|
+
'Use only when the icon alone is unambiguous (×, +, edit, trash); otherwise use Button',
|
|
82
|
+
'Match the size to adjacent Buttons in the same row (heights align size-for-size)',
|
|
83
|
+
'Use L/XL as standalone tap targets; pad the hit area for XS/S/M on mobile',
|
|
84
|
+
],
|
|
85
|
+
docsLink: { label: 'spec/03-atoms/icon-button.md' },
|
|
86
|
+
}),
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
// No autodocs tag — IconButton.mdx provides the dedicated Docs page.
|
|
91
|
+
} satisfies Meta<typeof IconButton>;
|
|
92
|
+
|
|
93
|
+
export default meta;
|
|
94
|
+
type Story = StoryObj<typeof meta>;
|
|
95
|
+
|
|
96
|
+
export const Playground: Story = {
|
|
97
|
+
args: {
|
|
98
|
+
icon: <Icon name="check" />,
|
|
99
|
+
'aria-label': 'Potvrdit',
|
|
100
|
+
variant: 'primary',
|
|
101
|
+
size: 'md',
|
|
102
|
+
loading: false,
|
|
103
|
+
disabled: false,
|
|
104
|
+
showSurface: false,
|
|
105
|
+
surface: 'default',
|
|
106
|
+
},
|
|
107
|
+
argTypes: {
|
|
108
|
+
variant: { control: 'select', options: VARIANTS },
|
|
109
|
+
size: { control: 'select', options: SIZES },
|
|
110
|
+
loading: { control: 'boolean' },
|
|
111
|
+
disabled: { control: 'boolean' },
|
|
112
|
+
showSurface: { control: 'boolean' },
|
|
113
|
+
surface: { control: 'inline-radio', options: SURFACES },
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export const Variants: Story = {
|
|
118
|
+
args: { icon: <Icon name="check" />, 'aria-label': 'Akce' },
|
|
119
|
+
parameters: {
|
|
120
|
+
docs: { description: { story: 'All eight colour/intent families — identical treatment to Button.' } },
|
|
121
|
+
},
|
|
122
|
+
render: () => (
|
|
123
|
+
<Showcase>
|
|
124
|
+
<Section title="Families">
|
|
125
|
+
{VARIANTS.map(v => (
|
|
126
|
+
<IconButton key={v} variant={v} icon={<Icon name="check" />} aria-label={v} />
|
|
127
|
+
))}
|
|
128
|
+
</Section>
|
|
129
|
+
<Section title="Disabled state for each family">
|
|
130
|
+
{VARIANTS.map(v => (
|
|
131
|
+
<IconButton key={v} variant={v} icon={<Icon name="check" />} aria-label={`${v} disabled`} disabled />
|
|
132
|
+
))}
|
|
133
|
+
</Section>
|
|
134
|
+
</Showcase>
|
|
135
|
+
),
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
export const Matrix: Story = {
|
|
139
|
+
args: { icon: <Icon name="check" />, 'aria-label': 'Akce' },
|
|
140
|
+
parameters: {
|
|
141
|
+
docs: {
|
|
142
|
+
description: {
|
|
143
|
+
story:
|
|
144
|
+
'Full variant × size matrix (mirrors the Figma labelled grid) — token bindings resolve per family and size against manifest 1.1.0. Rows = families, columns = sizes.',
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
render: () => (
|
|
149
|
+
<Showcase>
|
|
150
|
+
{VARIANTS.map(v => (
|
|
151
|
+
<FodsFamily key={v} name={v}>
|
|
152
|
+
<Section title={v} layout="row">
|
|
153
|
+
{SIZES.map(s => (
|
|
154
|
+
<IconButton key={s} variant={v} size={s} icon={<Icon name="check" />} aria-label={`${v} ${s}`} />
|
|
155
|
+
))}
|
|
156
|
+
</Section>
|
|
157
|
+
</FodsFamily>
|
|
158
|
+
))}
|
|
159
|
+
</Showcase>
|
|
160
|
+
),
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
export const Sizes: Story = {
|
|
164
|
+
args: { icon: <Icon name="pencil-simple" />, 'aria-label': 'Upravit' },
|
|
165
|
+
parameters: {
|
|
166
|
+
docs: { description: { story: 'Square box (W=H): 28 / 32 / 40 / 44 / 56. Icon steps 16/20/24/24/32; XL radius steps up.' } },
|
|
167
|
+
},
|
|
168
|
+
render: () => (
|
|
169
|
+
<Showcase>
|
|
170
|
+
<Section title="Filled (primary) — xs → xl">
|
|
171
|
+
{SIZES.map(s => (
|
|
172
|
+
<IconButton key={s} size={s} icon={<Icon name="pencil-simple" />} aria-label={`Upravit ${s}`} />
|
|
173
|
+
))}
|
|
174
|
+
</Section>
|
|
175
|
+
<Section title="Ghost (tertiary) — xs → xl">
|
|
176
|
+
{SIZES.map(s => (
|
|
177
|
+
<IconButton key={s} size={s} variant="tertiary" icon={<Icon name="pencil-simple" />} aria-label={`Upravit ${s}`} />
|
|
178
|
+
))}
|
|
179
|
+
</Section>
|
|
180
|
+
</Showcase>
|
|
181
|
+
),
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
export const States: Story = {
|
|
185
|
+
args: { icon: <Icon name="check" />, 'aria-label': 'Stav' },
|
|
186
|
+
parameters: {
|
|
187
|
+
docs: {
|
|
188
|
+
description: {
|
|
189
|
+
story:
|
|
190
|
+
'The whole state axis of the manifest (Default · Hover · Active · Disabled · Loading) for every family. Hover and Active are **forced statically** — `state` is not a prop, so each cell gets the bare (unprefixed) twin of the recipe’s own `hover:` / `active:` class; every row therefore differs from Default without a live cursor. Disabled and Loading are props (loading = spinner instead of the icon, `aria-busy`, clicks suppressed). Focus is not a manifest state — it is the additive `--outline-focus` outline and stays reachable with Tab.',
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
render: () => (
|
|
195
|
+
<Showcase>
|
|
196
|
+
<Section title="State × family" layout="column">
|
|
197
|
+
<div className="grid grid-cols-[8rem_repeat(5,minmax(0,1fr))] items-center gap-400">
|
|
198
|
+
<span />
|
|
199
|
+
{STATES.map(state => (
|
|
200
|
+
<span key={state.label} className="text-body-sm font-semibold text-text-secondary">
|
|
201
|
+
{state.label}
|
|
202
|
+
</span>
|
|
203
|
+
))}
|
|
204
|
+
{VARIANTS.map(variant => (
|
|
205
|
+
<Fragment key={variant}>
|
|
206
|
+
<span className="text-body-sm text-text-secondary">{variant}</span>
|
|
207
|
+
{STATES.map(state => (
|
|
208
|
+
<IconButton
|
|
209
|
+
key={state.label}
|
|
210
|
+
variant={variant}
|
|
211
|
+
icon={<Icon name="check" />}
|
|
212
|
+
aria-label={`${variant} ${state.label}`}
|
|
213
|
+
className={state.force ? FORCE_STATE[variant][state.force] : undefined}
|
|
214
|
+
{...state.props}
|
|
215
|
+
/>
|
|
216
|
+
))}
|
|
217
|
+
</Fragment>
|
|
218
|
+
))}
|
|
219
|
+
</div>
|
|
220
|
+
</Section>
|
|
221
|
+
</Showcase>
|
|
222
|
+
),
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
const BORDERLESS = ['secondary', 'tertiary', 'danger-outline', 'success-outline'] as const;
|
|
226
|
+
|
|
227
|
+
export const Surface: Story = {
|
|
228
|
+
args: { icon: <Icon name="check" />, 'aria-label': 'Akce' },
|
|
229
|
+
parameters: {
|
|
230
|
+
docs: {
|
|
231
|
+
description: {
|
|
232
|
+
story:
|
|
233
|
+
'`showSurface` paints an opaque `--bg-primary` layer behind the icon so a borderless control stops borrowing the page colour — the four borderless families only. On hover / active the wash composites over that white layer instead of replacing it. Inert on the filled families and in `disabled`. Both rows sit on a tinted background so the difference is visible. Same layer, token stack and prop name as Button and DropdownButton (both renamed `surface` → `showSurface` in their 2.0.0). This atom took the `show` prefix first, because here the `surface` axis (Default · Inverse) already holds the bare name.',
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
render: () => (
|
|
238
|
+
<Showcase>
|
|
239
|
+
<div className="flex flex-col gap-600 rounded-200 bg-secondary-subtle p-600">
|
|
240
|
+
<Section title="Without surface (borrows the page colour)">
|
|
241
|
+
{BORDERLESS.map(v => (
|
|
242
|
+
<IconButton key={v} variant={v} icon={<Icon name="check" />} aria-label={v} />
|
|
243
|
+
))}
|
|
244
|
+
</Section>
|
|
245
|
+
<Section title="With surface">
|
|
246
|
+
{BORDERLESS.map(v => (
|
|
247
|
+
<IconButton key={v} variant={v} showSurface icon={<Icon name="check" />} aria-label={v} />
|
|
248
|
+
))}
|
|
249
|
+
</Section>
|
|
250
|
+
<Section title="Inert — filled family and disabled">
|
|
251
|
+
<IconButton variant="primary" showSurface icon={<Icon name="check" />} aria-label="primary" />
|
|
252
|
+
<IconButton
|
|
253
|
+
variant="secondary"
|
|
254
|
+
showSurface
|
|
255
|
+
disabled
|
|
256
|
+
icon={<Icon name="check" />}
|
|
257
|
+
aria-label="secondary disabled"
|
|
258
|
+
/>
|
|
259
|
+
</Section>
|
|
260
|
+
</div>
|
|
261
|
+
</Showcase>
|
|
262
|
+
),
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
export const InverseGround: Story = {
|
|
266
|
+
args: { icon: <Icon name="x" />, 'aria-label': 'Zavřít' },
|
|
267
|
+
parameters: {
|
|
268
|
+
docs: {
|
|
269
|
+
description: {
|
|
270
|
+
story:
|
|
271
|
+
'`surface="inverse"` is the dark-chrome rebind from `spec/06-patterns/inverse-surface.md` — glyph `--text-inverted`, hover / pressed washes `--bg-hover-inverse` / `--bg-active-inverse` (white at 8 / 12 %, stronger than the claudy 3 / 6 % pair because a light wash needs more alpha on a dark fill), disabled glyph `--text-inverted-secondary` at 50 %, ring `--outline-focus-inverse`. Geometry, radius and sizes are untouched. The axis is SPARSE: Inverse exists for the ghost `tertiary` family only — the manifest calls a non-Tertiary instance on Inverse "a misuse signal, not a gap". The one thing that is not family-scoped is the focus ring: every control on a dark surface needs it, because `--outline-focus` measures 2.12:1 there against the 3:1 non-text floor. Until `icon-button` 2.0.0 this prop was called `ground`: the axis had no `properties[]` entry and the `Show surface` boolean owned the bare name. The manifest now gives the axis `maps: "surface"` and the boolean `maps: "showSurface"`, so the prop matches Text Link.',
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
render: () => (
|
|
276
|
+
<Showcase>
|
|
277
|
+
<div className="flex flex-col gap-600 rounded-200 bg-background-inverse p-600">
|
|
278
|
+
<Section title="Ghost family on inverse — the recipe's only render">
|
|
279
|
+
{SIZES.map(size => (
|
|
280
|
+
<IconButton
|
|
281
|
+
key={size}
|
|
282
|
+
variant="tertiary"
|
|
283
|
+
size={size}
|
|
284
|
+
surface="inverse"
|
|
285
|
+
icon={<Icon name="x" />}
|
|
286
|
+
aria-label={`Zavřít ${size}`}
|
|
287
|
+
/>
|
|
288
|
+
))}
|
|
289
|
+
</Section>
|
|
290
|
+
<Section title="Disabled">
|
|
291
|
+
<IconButton
|
|
292
|
+
variant="tertiary"
|
|
293
|
+
surface="inverse"
|
|
294
|
+
disabled
|
|
295
|
+
icon={<Icon name="x" />}
|
|
296
|
+
aria-label="Zavřít (disabled)"
|
|
297
|
+
/>
|
|
298
|
+
</Section>
|
|
299
|
+
<Section title="Announcement-bar composition">
|
|
300
|
+
<div className="flex w-full items-center justify-between gap-600">
|
|
301
|
+
<span className="text-body-sm text-text-inverted">
|
|
302
|
+
Od 1. ledna platí nové sazby DPH.
|
|
303
|
+
</span>
|
|
304
|
+
<IconButton
|
|
305
|
+
variant="tertiary"
|
|
306
|
+
size="sm"
|
|
307
|
+
surface="inverse"
|
|
308
|
+
icon={<Icon name="x" />}
|
|
309
|
+
aria-label="Zavřít oznámení"
|
|
310
|
+
/>
|
|
311
|
+
</div>
|
|
312
|
+
</Section>
|
|
313
|
+
</div>
|
|
314
|
+
</Showcase>
|
|
315
|
+
),
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
export const Compositions: Story = {
|
|
319
|
+
args: { icon: <Icon name="pencil-simple" />, 'aria-label': 'Akce' },
|
|
320
|
+
parameters: {
|
|
321
|
+
docs: {
|
|
322
|
+
description: { story: 'Real-world compositions — table-row toolbar, panel close, confirm/cancel pair.' },
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
render: () => (
|
|
326
|
+
<Showcase>
|
|
327
|
+
<Section title="Dense table-row actions" layout="row">
|
|
328
|
+
<IconButton size="sm" variant="tertiary" icon={<Icon name="pencil-simple" />} aria-label="Upravit fakturu" />
|
|
329
|
+
<IconButton size="sm" variant="tertiary" icon={<Icon name="copy" />} aria-label="Duplikovat fakturu" />
|
|
330
|
+
<IconButton size="sm" variant="danger" icon={<Icon name="trash" />} aria-label="Smazat fakturu" />
|
|
331
|
+
</Section>
|
|
332
|
+
<Section title="Panel close (outline)" layout="row">
|
|
333
|
+
<IconButton variant="secondary" icon={<Icon name="x" />} aria-label="Zavřít" />
|
|
334
|
+
</Section>
|
|
335
|
+
<Section title="Confirm / cancel pair" layout="row">
|
|
336
|
+
<IconButton variant="secondary" icon={<Icon name="x" />} aria-label="Zrušit" />
|
|
337
|
+
<IconButton variant="success" icon={<Icon name="check-circle" />} aria-label="Potvrdit" />
|
|
338
|
+
</Section>
|
|
339
|
+
</Showcase>
|
|
340
|
+
),
|
|
341
|
+
};
|