@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,778 @@
|
|
|
1
|
+
import { Meta, Canvas, Controls } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as FilterChipStories from './FilterChip.stories';
|
|
3
|
+
|
|
4
|
+
<Meta of={FilterChipStories} tags={['autodocs']} />
|
|
5
|
+
|
|
6
|
+
# FilterChip
|
|
7
|
+
|
|
8
|
+
## Metadata
|
|
9
|
+
|
|
10
|
+
- **Layer:** atom
|
|
11
|
+
- **Status:** draft
|
|
12
|
+
- **Tokens used:** `--bg-primary`, `--border-width-100`, `--border-width-200`, `--disabled-control`, `--disabled-foreground`, `--font-body`, `--font-size-base`, `--font-size-sm`, `--font-weight-normal`, `--font-weight-semibold`, `--icon-muted`, `--leading-loose`, `--leading-relaxed`, `--outline-default`, `--outline-focus`, `--outline-focus-inverse`, `--radius-200`, `--radius-300`, `--radius-400`, `--radius-500`, `--secondary-foreground`, `--secondary-hover`, `--secondary-solid`, `--size-icon-small`, `--size-icon-xsmall`, `--space-1000`, `--space-300`, `--space-400`, `--space-500`, `--space-900`, `--status-danger-foreground`, `--status-danger-hover`, `--status-danger-solid`, `--status-warning-foreground`, `--status-warning-hover`, `--status-warning-solid`, `--text-primary`, `--text-secondary`, `--text-wrap-body`
|
|
13
|
+
- **Manifest version:** `1.14.1`
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
FilterChip is the **filter-bar control** — a chip whose own state *is* the applied filter, at the
|
|
18
|
+
32/40 control tier. It has two types:
|
|
19
|
+
|
|
20
|
+
- **Facet** (`type="facet"`, the default) — opens an options panel, then morphs **in place** into the
|
|
21
|
+
chosen value: the category noun (`Kraj`) becomes the applied value (`Praha`) and the trailing caret
|
|
22
|
+
becomes a clearing ×. Reach for it when a control picks one value — or several — out of a set.
|
|
23
|
+
What the panel is decides the trigger's ARIA shape, set by `popup`: a single-value panel
|
|
24
|
+
(`listbox`, the default) or a multi-value one (`dialog`).
|
|
25
|
+
- **Toggle** (`type="toggle"`) — a binary flag switched directly, no panel (`Plátce DPH`,
|
|
26
|
+
`Nespolehlivý DPH`, `Insolvence`).
|
|
27
|
+
|
|
28
|
+
Both carry a **live result count** under the current query.
|
|
29
|
+
|
|
30
|
+
Use FilterChip when the control **is** the filter state. **Do NOT use it** for a removable tag or a
|
|
31
|
+
checkbox-driven filter row (that is **Chip**, the 22/30 tag tier), for read-only status reporting
|
|
32
|
+
(**Badge**), or for a trigger whose label is a fixed menu noun such as "Akce" (**DropdownButton** — a
|
|
33
|
+
Facet's label *becomes* the applied value, a DropdownButton's never changes).
|
|
34
|
+
|
|
35
|
+
The options panel a Facet opens is **not** part of this component; the chip only exposes `open`,
|
|
36
|
+
`value`, `onClear` and `popup` (which kind of panel it announces).
|
|
37
|
+
[`FilterFacet`](?path=/docs/design-system-organisms-filterfacet--docs) is the assembly that wires
|
|
38
|
+
both panel kinds to it.
|
|
39
|
+
|
|
40
|
+
<Canvas of={FilterChipStories.Playground} />
|
|
41
|
+
|
|
42
|
+
## Rationale
|
|
43
|
+
|
|
44
|
+
A filter bar needs a control at button-scale density whose selection state is legible at a glance
|
|
45
|
+
across a whole row of chips — a job Chip's tag-tier soft tints do not cover. So **selection recolours
|
|
46
|
+
the whole pill** (outline chrome → family solid) instead of living in a leading checkbox. That is the
|
|
47
|
+
deliberate boundary against `Chip`, whose pill never recolours; the two share nothing else
|
|
48
|
+
structurally either, because FilterChip is the 32/40 control tier and Chip the 22/30 tag tier.
|
|
49
|
+
|
|
50
|
+
Colour comes from the **family** (Emotion × Selection), never from the type: the manifest is
|
|
51
|
+
`kind: matrix` and follows the Checkbox precedent, where selection is a family split and the states
|
|
52
|
+
stay Default · Hover · Disabled. Chrome and padding are the shared
|
|
53
|
+
`spec/06-patterns/pill.md` recipe
|
|
54
|
+
extended to the control tier on Button metrics.
|
|
55
|
+
|
|
56
|
+
Two things this component deliberately does *not* make public:
|
|
57
|
+
|
|
58
|
+
- **Selection is derived, not passed.** `selected = type === 'facet' ? value != null : checked`.
|
|
59
|
+
There is no `selected` prop, which makes "a Selected Facet without an applied value"
|
|
60
|
+
unrepresentable.
|
|
61
|
+
- **The family is derived too** — one recipe axis with six values, computed from `emotion` plus the
|
|
62
|
+
selection, so the two halves cannot drift apart. It is a single key because `data-fods-family`
|
|
63
|
+
carries one value and the FODS verifier cannot resolve a multi-key family selector.
|
|
64
|
+
|
|
65
|
+
## Anatomy
|
|
66
|
+
|
|
67
|
+
One DOM shape for both types, in this order: **leading glyph → label → count → caret** (Facet +
|
|
68
|
+
Unselected) **| ×** (Facet + Selected).
|
|
69
|
+
|
|
70
|
+
- **Pill** (`data-fods-part="root"`) — a `<span>`, `relative inline-flex h-fit w-fit max-w-full`. It
|
|
71
|
+
owns the chrome (fill, hairline), the label ink every glyph inherits through `currentColor`, the
|
|
72
|
+
height (`min-h-900` / `min-h-1000` = 32 / 40), the radius, the gap and the focus band. It is a
|
|
73
|
+
`<span>` even for a Toggle for three reasons: a Selected Facet needs **two sibling buttons**
|
|
74
|
+
(trigger + ×) and a `<button>` may not contain interactive content; the morph animates the
|
|
75
|
+
container, and a root that switched `<button>` ↔ `<span>` with the selection would be unmounted by
|
|
76
|
+
React so the transition would never play; and one DOM shape means one place for the padding, the
|
|
77
|
+
ring and runtime part measurement.
|
|
78
|
+
- **Trigger** (`data-fods-part="trigger"`) — the interactive `<button type="button">`, the chip body
|
|
79
|
+
for both types. It carries **no colour of its own** in any state (the pill paints, the content
|
|
80
|
+
inherits) and instead owns the **inline padding** and the glyph↔label gap. `onClick` lands here,
|
|
81
|
+
not on the root: the root is a plain `<span>`, so a handler there would be neither
|
|
82
|
+
keyboard-reachable nor disabled-aware. Every other rest prop goes to the root.
|
|
83
|
+
- **Leading glyph** (`data-fods-part="leading"`) — a scanning cue, not decoration: the facet's
|
|
84
|
+
category (`map-pin`, `briefcase`, `buildings`) or the flag's risk class from Badge's emotion→glyph map. Sized to the
|
|
85
|
+
tier (16 / 20 via the `ICON_SIZE` constant, `xsmall` / `small`), `--icon-muted` on Unselected and the family foreground
|
|
86
|
+
on Selected. Defaults to `funnel-simple`; `leadingIcon={null}` hides it. Expected on every chip
|
|
87
|
+
(manifest 1.12.0 icon rule, the Button rule extended): the glyph names the facet, and the
|
|
88
|
+
chip goes text-only only where the row has no room for icon + label. A missing fitting glyph is not
|
|
89
|
+
an exception. Docs-only — the prop, its default and the Figma `Show leading` default are unchanged.
|
|
90
|
+
- **Label** (`data-fods-part="label"`) — `min-w-0 truncate font-semibold`. `Body/S/Semibold` (`sm`) /
|
|
91
|
+
`Body/M/Semibold` (`md`), one line, truncated on overflow. It carries no colour of its own by
|
|
92
|
+
design — the family's `text` token arrives by inheriting the pill's `text-*` class.
|
|
93
|
+
- **Count** (`data-fods-part="count"`) — `shrink-0 font-normal`: the same size as the label at Regular
|
|
94
|
+
weight, so weight alone separates the value from its metadata on a solid fill. **Zero renders** —
|
|
95
|
+
the check is `count != null`, never truthiness. Structurally **absent** on a **Facet entirely** (no
|
|
96
|
+
node at all, not a hidden one — manifest 1.3.0): on Selected because the applied value has replaced
|
|
97
|
+
the option list, on Unselected because a count answers "how many rows if I apply THIS" and a
|
|
98
|
+
category is not appliable — the number it would show is the unfiltered total. The per-option counts
|
|
99
|
+
live on the panel rows instead. A **Toggle keeps its count**: the flag IS the thing being applied.
|
|
100
|
+
`showCount` therefore only has an effect on `type="toggle"`.
|
|
101
|
+
- **Caret** (`data-fods-part="caret"`) — Facet + Unselected only: the `caret-down-small` glyph at
|
|
102
|
+
the tier's icon size, `--icon-muted`.
|
|
103
|
+
- **×** (`data-fods-part="clear"`) — Facet + Selected only: a real **sibling** `<button>` after the
|
|
104
|
+
trigger, never nested inside it, named by `clearLabel`, holding the `x` glyph. Its **32×32**
|
|
105
|
+
hit area — the dense-control tier `accessibility.md` names for toolbar controls, raised off the
|
|
106
|
+
24×24 floor in manifest 1.3.0 (b) — is a `before:size-900` (`--space-900`) pseudo-element centred
|
|
107
|
+
vertically on the glyph-tight button and anchored horizontally to the pill's right edge
|
|
108
|
+
(`before:-right-400`, the root's trailing `--space-400`), so the trailing padding is part of the
|
|
109
|
+
target at both sizes. The root carries **no `overflow-hidden`**: a
|
|
110
|
+
clip there would crop the tap area back to the pill and silently undo the tier. Its own focus ring
|
|
111
|
+
is an `outline` at `--border-width-200` in **`--outline-focus-inverse`** with a 2px offset, shaped
|
|
112
|
+
by `--radius-200` — the × only exists on the solid Selected fill, where `--outline-focus` on
|
|
113
|
+
`--secondary-solid` is 1.00:1. Since manifest 1.8.0 the binding is structured upstream as
|
|
114
|
+
`chrome.clear.focus.ring = --outline-focus-inverse` (earlier only prose in `focus.note`); the code
|
|
115
|
+
already bound it, so nothing moved.
|
|
116
|
+
|
|
117
|
+
The FODS verifier's parts map records all seven parts. `trigger`, `label` and
|
|
118
|
+
`clear` are declared with **empty** expectations on purpose — they carry no colour of their own, so a
|
|
119
|
+
binding there would be a duplicate rather than a check and would report the intended inheritance as a
|
|
120
|
+
defect.
|
|
121
|
+
|
|
122
|
+
## Variants
|
|
123
|
+
|
|
124
|
+
<Canvas of={FilterChipStories.Types} />
|
|
125
|
+
|
|
126
|
+
The **type** axis changes semantics and the trailing affordance, not colour.
|
|
127
|
+
|
|
128
|
+
<table>
|
|
129
|
+
<thead>
|
|
130
|
+
<tr><th>Type</th><th>Semantics</th><th>Selection comes from</th><th>Trailing affordance</th><th>Emotions</th></tr>
|
|
131
|
+
</thead>
|
|
132
|
+
<tbody>
|
|
133
|
+
<tr>
|
|
134
|
+
<td><code>facet</code> (default)</td>
|
|
135
|
+
<td><code>popup="listbox"</code> (default): <code><button role="combobox" aria-haspopup="listbox" aria-expanded></code>, or with <code>searchable</code> a plain <code><button aria-haspopup="listbox" aria-expanded></code>; <code>popup="dialog"</code>: <code><button aria-haspopup="dialog" aria-expanded></code></td>
|
|
136
|
+
<td><code>value != null</code></td>
|
|
137
|
+
<td>caret while Unselected; a sibling × <code><button></code> once a value is applied</td>
|
|
138
|
+
<td>Neutral only — a non-Neutral Facet logs a dev <code>console.warn</code></td>
|
|
139
|
+
</tr>
|
|
140
|
+
<tr>
|
|
141
|
+
<td><code>toggle</code></td>
|
|
142
|
+
<td><code><button aria-pressed></code></td>
|
|
143
|
+
<td><code>checked</code> / <code>defaultChecked</code></td>
|
|
144
|
+
<td>none — the count sits at the end of the label run</td>
|
|
145
|
+
<td>Neutral · Warning · Danger (the risk flags)</td>
|
|
146
|
+
</tr>
|
|
147
|
+
</tbody>
|
|
148
|
+
</table>
|
|
149
|
+
|
|
150
|
+
<Canvas of={FilterChipStories.Emotions} />
|
|
151
|
+
|
|
152
|
+
Colour is one recipe axis with six values — the manifest's families, Emotion × Selection.
|
|
153
|
+
|
|
154
|
+
<table>
|
|
155
|
+
<thead>
|
|
156
|
+
<tr><th>Family</th><th>When</th><th>Rest</th><th>Hover</th><th>Disabled</th></tr>
|
|
157
|
+
</thead>
|
|
158
|
+
<tbody>
|
|
159
|
+
<tr>
|
|
160
|
+
<td><code>neutral-unselected</code></td>
|
|
161
|
+
<td>the resting Facet trigger and an off Neutral flag</td>
|
|
162
|
+
<td>fill <code>--bg-primary</code>, hairline <code>--outline-default</code> at <code>--border-width-100</code>, label <code>--text-primary</code>, glyph <code>--icon-muted</code>, count <code>--text-secondary</code></td>
|
|
163
|
+
<td>hairline → <code>--secondary-solid</code></td>
|
|
164
|
+
<td>fill and hairline stay, content → <code>--disabled-foreground</code></td>
|
|
165
|
+
</tr>
|
|
166
|
+
<tr>
|
|
167
|
+
<td><code>neutral-selected</code></td>
|
|
168
|
+
<td>an applied Facet value, an on Neutral flag — the app's selection accent</td>
|
|
169
|
+
<td>fill <code>--secondary-solid</code>, content <code>--secondary-foreground</code></td>
|
|
170
|
+
<td>fill → <code>--secondary-hover</code></td>
|
|
171
|
+
<td>fill <code>--disabled-control</code>, content <code>--disabled-foreground</code></td>
|
|
172
|
+
</tr>
|
|
173
|
+
<tr>
|
|
174
|
+
<td><code>warning-unselected</code></td>
|
|
175
|
+
<td>an off risk flag (<code>Nespolehlivý DPH</code>)</td>
|
|
176
|
+
<td>identical outline chrome to <code>neutral-unselected</code></td>
|
|
177
|
+
<td>hairline → <code>--status-warning-solid</code></td>
|
|
178
|
+
<td>as above — grey is emotion-independent</td>
|
|
179
|
+
</tr>
|
|
180
|
+
<tr>
|
|
181
|
+
<td><code>warning-selected</code></td>
|
|
182
|
+
<td>that flag switched on</td>
|
|
183
|
+
<td>fill <code>--status-warning-solid</code>, content <code>--status-warning-foreground</code></td>
|
|
184
|
+
<td>fill → <code>--status-warning-hover</code></td>
|
|
185
|
+
<td>fill <code>--disabled-control</code>, content <code>--disabled-foreground</code></td>
|
|
186
|
+
</tr>
|
|
187
|
+
<tr>
|
|
188
|
+
<td><code>danger-unselected</code></td>
|
|
189
|
+
<td>an off severe flag (<code>Insolvence</code>)</td>
|
|
190
|
+
<td>identical outline chrome to <code>neutral-unselected</code></td>
|
|
191
|
+
<td>hairline → <code>--status-danger-solid</code></td>
|
|
192
|
+
<td>as above</td>
|
|
193
|
+
</tr>
|
|
194
|
+
<tr>
|
|
195
|
+
<td><code>danger-selected</code></td>
|
|
196
|
+
<td>that flag switched on</td>
|
|
197
|
+
<td>fill <code>--status-danger-solid</code>, content <code>--status-danger-foreground</code></td>
|
|
198
|
+
<td>fill → <code>--status-danger-hover</code></td>
|
|
199
|
+
<td>fill <code>--disabled-control</code>, content <code>--disabled-foreground</code></td>
|
|
200
|
+
</tr>
|
|
201
|
+
</tbody>
|
|
202
|
+
</table>
|
|
203
|
+
|
|
204
|
+
**Unselected chrome is emotion-blind at rest** — every emotion is `--bg-primary` plus a
|
|
205
|
+
`--outline-default` hairline, and the family only shows on hover, where the hairline swaps to that
|
|
206
|
+
family's solid. That is why the emotion of an *off* flag is invisible until the pointer arrives.
|
|
207
|
+
|
|
208
|
+
<Canvas of={FilterChipStories.Matrix} />
|
|
209
|
+
|
|
210
|
+
The Figma set is 48 variants: Facet builds 12 under Neutral, Toggle 36 across all three emotions.
|
|
211
|
+
|
|
212
|
+
## Sizes
|
|
213
|
+
|
|
214
|
+
<Canvas of={FilterChipStories.Sizes} />
|
|
215
|
+
|
|
216
|
+
<table>
|
|
217
|
+
<thead>
|
|
218
|
+
<tr><th>Size</th><th style={{ textAlign: 'right' }}>Height</th><th>Label</th><th style={{ textAlign: 'right' }}>Glyphs</th><th>Radius</th><th>Gap</th><th>Focus band radius</th></tr>
|
|
219
|
+
</thead>
|
|
220
|
+
<tbody>
|
|
221
|
+
<tr>
|
|
222
|
+
<td><code>md</code> (default)</td>
|
|
223
|
+
<td style={{ textAlign: 'right' }}>40px (<code>min-h-1000</code> = <code>--space-1000</code>)</td>
|
|
224
|
+
<td><code>Body/M/Semibold</code> — <code>--font-size-base</code> + <code>--font-weight-semibold</code></td>
|
|
225
|
+
<td style={{ textAlign: 'right' }}>20px</td>
|
|
226
|
+
<td><code>--radius-400</code></td>
|
|
227
|
+
<td><code>--space-400</code></td>
|
|
228
|
+
<td><code>--radius-500</code></td>
|
|
229
|
+
</tr>
|
|
230
|
+
<tr>
|
|
231
|
+
<td><code>sm</code></td>
|
|
232
|
+
<td style={{ textAlign: 'right' }}>32px (<code>min-h-900</code> = <code>--space-900</code>)</td>
|
|
233
|
+
<td><code>Body/S/Semibold</code> — <code>--font-size-sm</code> + <code>--leading-loose</code></td>
|
|
234
|
+
<td style={{ textAlign: 'right' }}>16px</td>
|
|
235
|
+
<td><code>--radius-300</code></td>
|
|
236
|
+
<td><code>--space-300</code></td>
|
|
237
|
+
<td><code>--radius-400</code></td>
|
|
238
|
+
</tr>
|
|
239
|
+
</tbody>
|
|
240
|
+
</table>
|
|
241
|
+
|
|
242
|
+
`md` is the default filter-bar density; `sm` is for dense toolbars, embedded bars and any row long
|
|
243
|
+
enough to crowd, such as a bar of seven controls plus a clear action. The
|
|
244
|
+
options panel a Facet opens renders its rows at **Small 36** under either trigger size.
|
|
245
|
+
|
|
246
|
+
Two implementation notes behind that table. The pill declares a **min-height**, not a fixed height,
|
|
247
|
+
so a long label cannot break the box. And the `sm` label sets `--leading-loose` explicitly: the
|
|
248
|
+
project-wide `text-body-sm` maps to `--leading-tight`, while the published `Body/S` style is
|
|
249
|
+
`--leading-loose`. The glyph sizes are the `ICON_SIZE` constant passed to `<Icon size>` (`--size-icon-xsmall` /
|
|
250
|
+
`--size-icon-small`), so there is no class for the static pass to read.
|
|
251
|
+
|
|
252
|
+
**Inline padding is a per-side rule, not a size row** — `sizes[].paddingX` is a single
|
|
253
|
+
`--space-500` for both sizes in Figma; in code (manifest 1.5.1, the Button optical-padding rule) a
|
|
254
|
+
side that ends in an **icon** — leading glyph, caret, × — steps down to `--space-400`, and a side
|
|
255
|
+
that ends in **text** — label or count — keeps `--space-500`. A Facet with a leading glyph is 8 / 8;
|
|
256
|
+
a Toggle with a leading glyph and a count is 8 / 12.
|
|
257
|
+
|
|
258
|
+
<table>
|
|
259
|
+
<thead>
|
|
260
|
+
<tr><th>Case</th><th>Left</th><th>Right</th></tr>
|
|
261
|
+
</thead>
|
|
262
|
+
<tbody>
|
|
263
|
+
<tr><td>with a leading glyph (the default)</td><td><code>--space-400</code> (8) on the trigger</td><td>—</td></tr>
|
|
264
|
+
<tr><td><code>leadingIcon={null}</code></td><td><code>--space-500</code> (12) on the trigger</td><td>—</td></tr>
|
|
265
|
+
<tr><td><code>toggle</code></td><td>—</td><td><code>--space-500</code> (12) — it ends in the label or count, a text run</td></tr>
|
|
266
|
+
<tr><td><code>facet</code>, Unselected (caret)</td><td>—</td><td><code>--space-400</code> (8) on the trigger</td></tr>
|
|
267
|
+
<tr><td><code>facet</code>, Selected (×)</td><td>—</td><td><code>--space-400</code> (8) on the <strong>root</strong>, after the ×</td></tr>
|
|
268
|
+
</tbody>
|
|
269
|
+
</table>
|
|
270
|
+
|
|
271
|
+
The right padding of a Selected Facet lives on the pill rather than on the × on purpose: padding on
|
|
272
|
+
the × made its box lopsided around the glyph, and the focus ring follows that box, so it slid off
|
|
273
|
+
the glyph and past the pill's edge. A glyph-tight × keeps the ring centred, and its 32×32 hit area
|
|
274
|
+
is anchored to the end of the padding, so the padding is no dead zone.
|
|
275
|
+
|
|
276
|
+
## States
|
|
277
|
+
|
|
278
|
+
<Canvas of={FilterChipStories.States} />
|
|
279
|
+
|
|
280
|
+
- **Default** — per family, per selection (see the table in [Variants](#variants)).
|
|
281
|
+
- **Hover** — two different things depending on selection, and that is the point: an Unselected
|
|
282
|
+
family keeps its `--bg-primary` fill and swaps the **hairline** to the family solid, while a
|
|
283
|
+
Selected family deepens the **fill** one step to the family's hover tone. Nothing else changes; the
|
|
284
|
+
leading glyph has no hover binding of its own (`families[].states.hover.icon` equals `default.icon`
|
|
285
|
+
in all six families).
|
|
286
|
+
- **Focus** — **not a variant**, but the cross-cutting additive offset ring: `--outline-focus` at
|
|
287
|
+
`--border-width-200`, sitting 2px outside the pill, with a radius one step up the ladder per size
|
|
288
|
+
(`sm` → `--radius-400`, `md` → `--radius-500`). It is painted as a `::before` band on the pill,
|
|
289
|
+
declared unconditionally as transparent geometry and switched by colour alone under
|
|
290
|
+
`has-[[data-fods-part=trigger]:focus-visible]:`. The × rings **itself** with its own `outline` in
|
|
291
|
+
`--outline-focus-inverse` (it sits on the solid fill), so the ring always sits on whichever control
|
|
292
|
+
holds DOM focus — never on both.
|
|
293
|
+
- **Disabled** — preserves the selection structurally but not chromatically: Unselected keeps the
|
|
294
|
+
outline chrome with grey content, Selected keeps a solid fill in `--disabled-control` grey. Grey is
|
|
295
|
+
emotion-independent, so a disabled Danger Toggle looks identical to a disabled Neutral Facet.
|
|
296
|
+
Greying is token-based, never `opacity`, and reaches **both** buttons — the trigger and the × each
|
|
297
|
+
get the native `disabled` attribute plus `aria-disabled`. On a Selected Facet the × still *renders*
|
|
298
|
+
(composition carries the selection) but has no tab stop, no hover and no action; clearing a
|
|
299
|
+
disabled applied facet happens through the bar's `Vymazat`.
|
|
300
|
+
- **There is no Active state.** The manifest's state axis is Default · Hover · Disabled.
|
|
301
|
+
|
|
302
|
+
Hover and Focus are **forced statically** in the States story — both are pseudo-classes that no prop
|
|
303
|
+
can reach, so each column is rendered with the bare twin of the recipe's own class. The last row
|
|
304
|
+
forces the ×'s own `--outline-focus-inverse` ring on a Selected Facet the same way.
|
|
305
|
+
|
|
306
|
+
<Canvas of={FilterChipStories.Morph} />
|
|
307
|
+
|
|
308
|
+
The morph is one node in both directions: the category noun is replaced by the applied value, the
|
|
309
|
+
caret becomes the ×, and the count node disappears entirely. The container's colours transition over
|
|
310
|
+
`--duration-toggle` (`transition-[background-color,color,outline-color] duration-toggle`; `outline-color` is the hairline, the focus ring is a `::before` band and does not animate) while the content swap is instant, and
|
|
311
|
+
`motion-reduce:transition-none` makes the whole thing instant under `prefers-reduced-motion`. The
|
|
312
|
+
manifest's transparent 1px inside stroke on Selected variants is a Figma-only width-parity device: an
|
|
313
|
+
`outline` takes no layout, so both selections already measure the same box.
|
|
314
|
+
|
|
315
|
+
### Motion
|
|
316
|
+
|
|
317
|
+
<Canvas of={FilterChipStories.Motion} />
|
|
318
|
+
|
|
319
|
+
Manifest 1.13.1 `motion` — **the Facet caret** (`states.open`) turns 180° (down → up) while its panel is
|
|
320
|
+
open and back on close, on `--spring-standard` (`springs.standard` from the package tokens, in
|
|
321
|
+
Motion; shared `internal/MotionCaret.tsx`). Before 1.13.1 it did not turn at all. A quick re-toggle turns it
|
|
322
|
+
around mid-turn without a jerk (`interrupt`); the first paint and the server render show the current pose
|
|
323
|
+
without a turn. The `caret` part stays on the glyph inside the rotating wrapper. Under
|
|
324
|
+
`prefers-reduced-motion: reduce` the `MotionConfig` in `FodsProvider` drops the transform animation, so the caret
|
|
325
|
+
shows its end pose at once (`reducedMotion`: «the caret turns without the spring»). The colour changes —
|
|
326
|
+
`states.hover` and `states.toggle` — are the pill's colour transition described with the morph above.
|
|
327
|
+
|
|
328
|
+
## Multi-value
|
|
329
|
+
|
|
330
|
+
<Canvas of={FilterChipStories.MultiValue} />
|
|
331
|
+
|
|
332
|
+
A Facet may apply **several** values: within one facet they **OR** together, across facets they
|
|
333
|
+
**AND**. This is deliberately **not** a new variant — the matrix stays 48 cells and the label carries
|
|
334
|
+
it, collapsing to `value +N` (`Čistota Plus +2`). The `+N` form is mandatory over "Dodavatel: 3": it
|
|
335
|
+
keeps a concrete value on screen, which is the whole point of the morph, and it sidesteps Czech
|
|
336
|
+
numeral agreement (2 dodavatelé / 5 dodavatelů).
|
|
337
|
+
|
|
338
|
+
The component composes the collapsed label itself, from `value`. That is why `children` stays the
|
|
339
|
+
**category** in both directions: on a Selected Facet the applied value is rendered in its place, and
|
|
340
|
+
the category is still needed in front of the accessible name.
|
|
341
|
+
|
|
342
|
+
`+2` is an **elision**, so it may never be the only carrier of what is applied:
|
|
343
|
+
|
|
344
|
+
- the elided values are listed in a **Tooltip** on the trigger (`Datacentrum Sever, Pekárna Růžička`), and
|
|
345
|
+
- the **accessible name** carries the full list with the category in front —
|
|
346
|
+
`Dodavatel: Čistota Plus, Datacentrum Sever, Pekárna Růžička`.
|
|
347
|
+
|
|
348
|
+
Without both, an applied filter is locked behind a click for sighted and screen-reader users alike.
|
|
349
|
+
|
|
350
|
+
**A multi-value facet opens a different panel, so its trigger announces differently.** Several
|
|
351
|
+
values are picked in a Multi-select filter — a `role="group"` of native checkboxes that focus moves
|
|
352
|
+
**into** — not in a listbox the trigger points into. Since manifest 1.7.0 such a trigger takes
|
|
353
|
+
`popup="dialog"`: a plain `<button aria-haspopup="dialog" aria-expanded>`, no `combobox` role, and
|
|
354
|
+
an `aria-activedescendant` forwarded through `triggerProps` is dropped, because there is no active
|
|
355
|
+
descendant to point at. The pill, the collapsed label, the Tooltip and the accessible name are the
|
|
356
|
+
same in both — the MultiValue story above shows the two `popup="dialog"` chips next to the
|
|
357
|
+
`listbox` ones.
|
|
358
|
+
The Tooltip attaches to the trigger button rather than to an inner span, because Radix renders its
|
|
359
|
+
own `<button>` unless it adopts the child as one — and a button inside a button is exactly the
|
|
360
|
+
invalid nesting that made an applied range un-editable in the filter-bar prototype. Only the collapsed
|
|
361
|
+
case mounts a Tooltip, and that case therefore needs a **`TooltipProvider` ancestor**, the same
|
|
362
|
+
requirement [`Chip`](?path=/docs/design-system-atoms-chip--docs)'s info slot carries.
|
|
363
|
+
|
|
364
|
+
A **numeric range is a facet too**, not a pair of fields in the bar: the panel holds a
|
|
365
|
+
[`FieldPair`](?path=/docs/design-system-molecules-fieldpair--docs) and the chip label collapses to
|
|
366
|
+
`od 500 Kč` / `500 – 5 000 Kč`, with the unit stated once. That is an ordinary single-value
|
|
367
|
+
selection as far as the chip is concerned — the range lives in the panel. Its trigger takes
|
|
368
|
+
`popup="dialog"` (manifest 1.11.0), like the multi-value facet: opening moves focus into the first
|
|
369
|
+
field and the panel holds no list, so `combobox` + `aria-haspopup="listbox"` would announce a list
|
|
370
|
+
that is not there.
|
|
371
|
+
|
|
372
|
+
### The hairline and the focus ring both wanted the root's single `outline`
|
|
373
|
+
|
|
374
|
+
The Unselected hairline is `strokeMode: "inset-outline"` — an `outline` at a −1px offset, never a
|
|
375
|
+
CSS `border`, which would grow the box the manifest pins and make the in-place morph nudge the bar.
|
|
376
|
+
The focus ring is an additive offset `outline` too, and an element has exactly one. FilterChip is the
|
|
377
|
+
first component in the system to collide these two, and the collision is resolved **the other way
|
|
378
|
+
round** from `edge-outline.md` § *Interaction with the focus ring*, which suggests moving the edge
|
|
379
|
+
outline to a pseudo-element:
|
|
380
|
+
|
|
381
|
+
- the hairline's mechanism is a **structured manifest fact** that the FODS verifier reads and
|
|
382
|
+
enforces per family and state (it produced 18 findings while it lived on `::before`), whereas
|
|
383
|
+
- the ring's mechanism is a **free choice** among the five `focus-ring.md` § Styles — one of which is
|
|
384
|
+
exactly this `::before` offset ring, already shipped on FieldPair and `_field-segment`.
|
|
385
|
+
|
|
386
|
+
The rendering is identical either way: a 2px `--outline-focus` band 2px outside the box, and both can
|
|
387
|
+
show at once, which is what "additive" means. Since manifest 1.5.2 the pattern doc records this as
|
|
388
|
+
the approved Filter Chip exception (designer QA 2026-09-29), and `focus.note` names the `::before`
|
|
389
|
+
mechanism.
|
|
390
|
+
|
|
391
|
+
### Known limitations
|
|
392
|
+
|
|
393
|
+
- **A spec conflict on the leading glyph, resolved towards `families`.** `slots.leading.note` says
|
|
394
|
+
the glyph tracks "the variant's label foreground", but `families[].states[].icon` binds
|
|
395
|
+
`--icon-muted` on Unselected, where the label is `--text-primary`. The structured field wins on
|
|
396
|
+
authority order and the Figma set agrees (grey glyph, black label); the prose is what needs
|
|
397
|
+
correcting. On Selected both readings meet at the family foreground.
|
|
398
|
+
- **Every upstream glyph exists under its upstream name.** `funnel-simple`, `caret-down-small`, `x`,
|
|
399
|
+
`map-pin`, `warning-circle` and `briefcase` all render as named; the legacy icon-font spellings
|
|
400
|
+
(`filter`, `chevron-down-small`, `cross`, `pin`, `danger`) are not part of `IconName` in React.
|
|
401
|
+
|
|
402
|
+
## API
|
|
403
|
+
|
|
404
|
+
<Controls />
|
|
405
|
+
|
|
406
|
+
<table>
|
|
407
|
+
<thead>
|
|
408
|
+
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Note</th></tr>
|
|
409
|
+
</thead>
|
|
410
|
+
<tbody>
|
|
411
|
+
<tr><td><code>type</code></td><td><code>'facet' | 'toggle'</code></td><td><code>'facet'</code></td><td>Composition, not colour. Decides the ARIA shape and the trailing affordance.</td></tr>
|
|
412
|
+
<tr><td><code>popup</code></td><td><code>'listbox' | 'dialog'</code> (<code>FilterChipPopup</code>)</td><td><code>'listbox'</code></td><td>Facet only — what kind of panel the trigger opens, which decides its ARIA contract (manifest 1.7.0 <code>delivery.react</code>). <code>listbox</code>: a single-value facet, <code>role="combobox"</code> + <code>aria-haspopup="listbox"</code>, a forwarded <code>aria-activedescendant</code> is honoured. <code>dialog</code>: a multi-value facet whose panel is a Multi-select filter group that focus moves into — a plain button with <code>aria-haspopup="dialog"</code>, no role, and a forwarded <code>aria-activedescendant</code> is dropped. The pill is identical in both. On a Toggle it logs a dev warning.</td></tr>
|
|
413
|
+
<tr><td><code>searchable</code></td><td><code>boolean</code></td><td><code>false</code></td><td>Facet only, <code>popup="listbox"</code> — the panel carries the search header (manifest 1.9.0 <code>delivery.react</code>). The facet then follows the Combobox (search) pattern: the search input is the <code>role="combobox"</code>, so the trigger drops <code>role</code> and a forwarded <code>aria-activedescendant</code> and stays a plain <code><button aria-haspopup="listbox" aria-expanded></code>. <code>FilterFacet</code> sets it from its <code>search</code> prop.</td></tr>
|
|
414
|
+
<tr><td><code>triggerRef</code></td><td><code>Ref<HTMLButtonElement></code></td><td>—</td><td>Ref to the trigger <code><button></code>, the element that holds focus. The forwarded <code>ref</code> lands on the non-focusable root <code><span></code>, so a composition that returns focus to the chip on dismissal registers this one.</td></tr>
|
|
415
|
+
<tr><td><code>emotion</code></td><td><code>'neutral' | 'warning' | 'danger'</code></td><td><code>'neutral'</code></td><td>Family colour. A Facet stays Neutral; anything else logs a dev warning.</td></tr>
|
|
416
|
+
<tr><td><code>size</code></td><td><code>'sm' | 'md'</code></td><td><code>'md'</code></td><td>32 / 40. Match the bar's density.</td></tr>
|
|
417
|
+
<tr><td><code>children</code></td><td><code>string</code></td><td>—</td><td>Required. The <strong>category</strong> noun (Facet) or the flag's name (Toggle) — it does <em>not</em> switch to the applied value; a Selected Facet renders <code>value</code> in its place. Plain text by contract: 1 line, truncated, ≤ ~28 chars.</td></tr>
|
|
418
|
+
<tr><td><code>count</code></td><td><code>number</code></td><td><code>undefined</code></td><td>The live result count. Pass <code>0</code> — zero renders (<code>count != null</code>, not truthiness). Grouped in <code>locale</code> (<code>1 284</code> in Czech), not the browser locale.</td></tr>
|
|
419
|
+
<tr><td><code>locale</code></td><td><code>string</code></td><td><code>'cs'</code></td><td>The locale that groups the digits of <code>count</code>.</td></tr>
|
|
420
|
+
<tr><td><code>showCount</code></td><td><code>boolean</code></td><td><code>true</code></td><td>Turns the run off. Structurally inert on a <strong>Facet</strong> in either selection state, which has no count node at all — it only bites on <code>type="toggle"</code>.</td></tr>
|
|
421
|
+
<tr><td><code>leadingIcon</code></td><td><code>IconName | null</code></td><td><code>'funnel-simple'</code></td><td>One prop for Figma's <code>Show leading</code> boolean plus the <code>Leading</code> instance-swap, so an icon can never be asked for without a name to render. <code>null</code> hides it and returns the left padding to 12.</td></tr>
|
|
422
|
+
<tr><td><code>value</code></td><td><code>string | string[]</code></td><td><code>undefined</code></td><td>Facet: the applied value(s), rendered <em>in place of</em> <code>children</code>. <strong>Its presence is the selection</strong> (an empty array counts as nothing applied). Several values collapse the label to <code>value +N</code> and pull in a Tooltip — see <a href="#multi-value">Multi-value</a>.</td></tr>
|
|
423
|
+
<tr><td><code>onClear</code></td><td><code>() => void</code></td><td>—</td><td>Facet: fired by the ×, which returns the chip to its bare trigger.</td></tr>
|
|
424
|
+
<tr><td><code>clearLabel</code></td><td><code>string</code></td><td>—</td><td><strong>Required for <code>type="facet"</code></strong> through the props union — the accessible name of the icon-only ×.</td></tr>
|
|
425
|
+
<tr><td><code>open</code></td><td><code>boolean</code></td><td><code>false</code></td><td>Facet: drives <code>aria-expanded</code>. The panel itself is the consumer's.</td></tr>
|
|
426
|
+
<tr><td><code>checked</code> / <code>defaultChecked</code></td><td><code>boolean</code></td><td><code>undefined</code> / <code>false</code></td><td>Toggle: controlled / uncontrolled on-off state.</td></tr>
|
|
427
|
+
<tr><td><code>onCheckedChange</code></td><td><code>(checked: boolean) => void</code></td><td>—</td><td>Toggle: receives the new boolean, not the DOM event.</td></tr>
|
|
428
|
+
<tr><td><code>disabled</code></td><td><code>boolean</code></td><td><code>false</code></td><td>Reaches the trigger and the × as a native <code>disabled</code> attribute plus <code>aria-disabled</code>.</td></tr>
|
|
429
|
+
<tr><td><code>onClick</code></td><td><code>MouseEventHandler<HTMLButtonElement></code></td><td>—</td><td>Lands on the <strong>trigger</strong>. Every other rest prop lands on the root <code><span></code>.</td></tr>
|
|
430
|
+
</tbody>
|
|
431
|
+
</table>
|
|
432
|
+
|
|
433
|
+
`clearLabel` is required **at the type level**, not defaulted at runtime: the × is icon-only so it
|
|
434
|
+
needs a name (WCAG 4.1.2), and this atom has no locale of its own — it ships on nine markets, so a
|
|
435
|
+
`?? 'Zrušit filtr'` fallback would announce Czech on the PL / SK / EN sites. The requirement is
|
|
436
|
+
carried by exactly **one** `type`-keyed union, because TypeScript only distributes a source object
|
|
437
|
+
over a discriminated target when there is a single such axis; a second union would break every
|
|
438
|
+
`<FilterChip type={type}>` in the docs matrices. Stories therefore type themselves against the
|
|
439
|
+
permissive `FilterChipBaseProps` and the union does its work at the real callsites.
|
|
440
|
+
|
|
441
|
+
Four dev-only `console.warn`s guard the combinations the types cannot: a non-Neutral Facet,
|
|
442
|
+
`checked` / `defaultChecked` / `onCheckedChange` on a Facet, `value` / `onClear` on a Toggle, and a
|
|
443
|
+
non-default `popup` on a Toggle.
|
|
444
|
+
|
|
445
|
+
## Do / Don't
|
|
446
|
+
|
|
447
|
+
- ✅ Use `facet` for a control that picks one value (or several) from an options panel, `toggle` for
|
|
448
|
+
a direct on/off flag.
|
|
449
|
+
- ✅ Set `popup="dialog"` on a Facet whose panel is a multi-value checkbox group; keep the default
|
|
450
|
+
`listbox` for a single-value panel.
|
|
451
|
+
- ✅ Let selection recolour the whole pill (outline → family solid) — the deliberate opposite of Chip.
|
|
452
|
+
- ✅ Morph a Facet **in place**: the same node, category label ↔ applied value, caret ↔ ×. The × clears
|
|
453
|
+
the filter; it never removes the control.
|
|
454
|
+
- ✅ Show the live result count **including zero** — an answer, not an absence. A bare
|
|
455
|
+
locale-formatted integer: no parentheses, no unit noun.
|
|
456
|
+
- ✅ Keep a Toggle **enabled** when its count is zero.
|
|
457
|
+
- ✅ Give every chip a leading glyph that names its facet — the category (`map-pin`, `briefcase`,
|
|
458
|
+
`buildings`) or the flag's risk class per Badge's emotion→glyph map; go text-only
|
|
459
|
+
(`leadingIcon={null}`) only where the row has no room for icon + label.
|
|
460
|
+
- ✅ Pass `clearLabel` from your own translation layer and name the **facet** (`Zrušit filtr Kraj`), so
|
|
461
|
+
a bar of chips does not announce the same name over and over.
|
|
462
|
+
- ✅ Match the bar's density: `md` (40) is the default, `sm` (32) for dense toolbars.
|
|
463
|
+
- ✅ Keep the bar-level reset (`Vymazat`) beside the chips as a composition concern — it is also the
|
|
464
|
+
only way to clear a *disabled* applied facet.
|
|
465
|
+
- ❌ Don't reach for FilterChip when the tag only *reports* state (**Badge**), when it is a removable
|
|
466
|
+
token or a checkbox filter row (**Chip**), or when the trigger's label never changes
|
|
467
|
+
(**DropdownButton**).
|
|
468
|
+
- ❌ Don't give a Facet a Warning or Danger emotion — those belong to Toggle's risk flags.
|
|
469
|
+
- ❌ Don't ship the generic `funnel-simple` default, and never pick a glyph that contradicts
|
|
470
|
+
the label.
|
|
471
|
+
- ❌ Don't hide the glyph (`leadingIcon={null}`) by habit where the row has room for it.
|
|
472
|
+
- ❌ Don't hide a zero count or wrap it in parentheses, and don't prefix an applied value with its
|
|
473
|
+
category (`Kraj: Praha`).
|
|
474
|
+
- ❌ Don't disable a Toggle because its count is zero.
|
|
475
|
+
- ❌ Don't mix chip sizes in one bar.
|
|
476
|
+
- ❌ Don't override the colours through `className` — every emotion × selection × state pair is
|
|
477
|
+
token-bound.
|
|
478
|
+
- ❌ Don't pass markup as `children`; the label is typed `string` by contract.
|
|
479
|
+
|
|
480
|
+
## Accessibility
|
|
481
|
+
|
|
482
|
+
- **Keyboard** — the trigger is a native `<button type="button">`: one tab stop, activated by Enter /
|
|
483
|
+
Space (on a single-value Facet, ↓ / ↑ open the panel as well, through the panel assembly; a
|
|
484
|
+
multi-value Facet opens on Enter / Space only). On a Selected Facet the × is a second native `<button>` and therefore a second tab stop,
|
|
485
|
+
immediately after the trigger in DOM order. Each chip in a bar is its own tab stop. `disabled`
|
|
486
|
+
removes both from the tab order natively. The keyboard contract of the options panel a Facet opens
|
|
487
|
+
belongs to the panel assembly, not to this atom.
|
|
488
|
+
- **Focus after ×** — clearing a Facet moves focus to **that same chip's trigger** (manifest 1.8.0):
|
|
489
|
+
the chip morphs back to Unselected in place and keeps focus, never dropping it to the document.
|
|
490
|
+
The atom does this itself, after the commit that removes the selection — the × unmounts with it,
|
|
491
|
+
and a collapsed `+N` chip's trigger is remounted as its remainder Tooltip unwraps it, so a focus
|
|
492
|
+
call inside the click handler would be lost.
|
|
493
|
+
- **ARIA** — the Facet trigger's role follows the panel it opens (manifest 1.6.0 / 1.7.0
|
|
494
|
+
`delivery.react`); `popup` picks which:
|
|
495
|
+
- **Single-value Facet** (`popup="listbox"`, the default) — `role="combobox"` (a select-only
|
|
496
|
+
combobox on a native button) with `aria-haspopup="listbox"` plus `aria-expanded` (driven by
|
|
497
|
+
`open`, explicitly `"false"` when closed). The composition that owns the panel adds
|
|
498
|
+
`aria-controls` (the listbox id) and `aria-activedescendant` (the current option) through
|
|
499
|
+
`triggerProps`; DOM focus stays on the trigger, and `aria-activedescendant` is not supported on
|
|
500
|
+
role `button`, which is why this one is a combobox.
|
|
501
|
+
- **Single-value Facet with search** (`searchable`, manifest 1.9.0) — the Combobox (search)
|
|
502
|
+
pattern: the trigger is a plain `<button aria-haspopup="listbox" aria-expanded>`, **not**
|
|
503
|
+
`role="combobox"` and without `aria-activedescendant`. Opening moves focus into the panel's
|
|
504
|
+
search input, which is the combobox (`aria-expanded`, `aria-controls`, `aria-activedescendant`)
|
|
505
|
+
— wired by the assembly, see [`FilterFacet`](?path=/docs/design-system-organisms-filterfacet--docs).
|
|
506
|
+
- **Multi-value Facet** (`popup="dialog"`) — a plain `<button>` with **no role**,
|
|
507
|
+
`aria-haspopup="dialog"` and the same explicit `aria-expanded`. Its panel is a `role="group"`
|
|
508
|
+
that focus moves into, so an `aria-activedescendant` arriving through `triggerProps` is dropped by
|
|
509
|
+
the atom; `aria-controls` still passes through.
|
|
510
|
+
- **Toggle** — a plain `<button>` carrying `aria-pressed` (driven by `checked` /
|
|
511
|
+
`defaultChecked`), no `aria-haspopup`, no `aria-expanded`.
|
|
512
|
+
|
|
513
|
+
So selection is exposed programmatically, never by colour alone. `disabled` sets both the native
|
|
514
|
+
attribute and `aria-disabled` on the trigger and on the ×. The × is named by the required
|
|
515
|
+
`clearLabel`, an action such as `Zrušit filtr Kraj`. Every glyph goes through `Icon`, which always
|
|
516
|
+
renders `aria-hidden="true"`, so the caret and the leading glyph are decorative — the affordance is
|
|
517
|
+
announced through `aria-haspopup`, and the meaning through the label.
|
|
518
|
+
- **Screen reader** — the count is folded into the **accessible name** rather than being a
|
|
519
|
+
visual-only suffix. Whenever a count renders, the trigger carries an `aria-label` composed in the
|
|
520
|
+
same render as the visible runs — `` `${children}, ${countText}` `` — so a Toggle reads as
|
|
521
|
+
*"Plátce DPH, 18"* with its pressed state. The string is composed rather than left to the name calculation over the label
|
|
522
|
+
and count nodes because those two join with a **space**, which produced *"Plátce DPH , 18"*; it
|
|
523
|
+
cannot drift from the screen, since both halves come from the same two values. A Toggle with no
|
|
524
|
+
count has no `aria-label` and is named by its label. A **Facet always** has one, under either
|
|
525
|
+
`popup`: a `combobox` takes no name from its content, and the dialog button follows suit so both
|
|
526
|
+
facets announce the same string — the category noun while Unselected (*"Kraj"*), and the category
|
|
527
|
+
followed by every applied value once Selected (*"Kraj: Praha"*, *"Dodavatel: Čistota Plus,
|
|
528
|
+
Datacentrum Sever, Pekárna Růžička"*). A Selected Facet reads as two controls: the trigger (a combobox or a button
|
|
529
|
+
that opens a dialog) and a button carrying `clearLabel`.
|
|
530
|
+
- **Contrast & motion** — the manifest records `--secondary-foreground` on `--secondary-solid` at
|
|
531
|
+
~4.45:1 at the label sizes, the same pairing shipped Button Primary uses. Disabled uses the
|
|
532
|
+
`--disabled-control` / `--disabled-foreground` pair rather than `opacity`, so the ink stays token-bound.
|
|
533
|
+
Focus is an additive `--outline-focus` ring at `--border-width-200` — never a border swap or a
|
|
534
|
+
colour-only change. Motion: the pill's colour transition on `duration-toggle`, disabled by
|
|
535
|
+
`motion-reduce:transition-none`, and the Facet caret's 180° turn, which shows its end pose at once
|
|
536
|
+
under reduced motion — see [Motion](#motion).
|
|
537
|
+
|
|
538
|
+
Accessibility floor for every FODS component: `spec/01-foundations/accessibility.md`.
|
|
539
|
+
|
|
540
|
+
## Copy
|
|
541
|
+
|
|
542
|
+
Voice: the product tone of voice, impersonal and in-app. Field copy follows the Text Field Copy
|
|
543
|
+
rules; these are Filter Chip's own.
|
|
544
|
+
|
|
545
|
+
- **Label** (`children`, and `value` on a Selected Facet): single line, truncates, max 28
|
|
546
|
+
characters. No terminal period.
|
|
547
|
+
- *Facet, Unselected*: the facet's category noun in sentence case, 1–2 words: `Kraj` · `Obor činnosti` ·
|
|
548
|
+
`Právní forma`.
|
|
549
|
+
- *Facet, Selected*: the applied value, verbatim, never prefixed with the category. The morph
|
|
550
|
+
replaces the label; it does not annotate it.
|
|
551
|
+
- *Facet, several values applied*: the first value plus a remainder count, `Čistota Plus +2`,
|
|
552
|
+
never `Dodavatel: 3`. It keeps a concrete value visible and sidesteps Czech numeral agreement
|
|
553
|
+
(2 dodavatelé / 5 dodavatelů). A collapsed label always carries a Tooltip.
|
|
554
|
+
- *Range value*: the bounds with the unit said once: `od 500 Kč` · `do 5 000 Kč` ·
|
|
555
|
+
`500 – 5 000 Kč`. Never repeat the unit per bound.
|
|
556
|
+
- *Toggle*: the flag's noun phrase: `Plátce DPH` · `Nespolehlivý DPH` · `Insolvence`. It
|
|
557
|
+
truncates past 28 characters; shorten it instead of relying on truncation.
|
|
558
|
+
- **Count** (`count`): a bare locale-formatted integer, no parentheses, no unit noun. Single
|
|
559
|
+
line, truncates, max 6 characters. Zero renders as `0`. Absent on a Facet entirely. The
|
|
560
|
+
accessible name folds the count in: `Plátce DPH, 18`, not a separate visual-only suffix.
|
|
561
|
+
- **Sheet close label** (`sheetCloseLabel` on `FilterFacet`, optional): the name of the hidden
|
|
562
|
+
close button of the mobile bottom sheet, default «Zavřít». Single line, truncates, max 20
|
|
563
|
+
characters. An app with more than one language version passes it from its translations on
|
|
564
|
+
every use. Never shown on desktop.
|
|
565
|
+
- **× accessible name** (`clearLabel`): an action, not visible text: `Zrušit filtr {facet}`,
|
|
566
|
+
e.g. `Zrušit filtr Kraj`.
|
|
567
|
+
|
|
568
|
+
<table>
|
|
569
|
+
<thead>
|
|
570
|
+
<tr><th>✅ Write</th><th>❌ Not</th></tr>
|
|
571
|
+
</thead>
|
|
572
|
+
<tbody>
|
|
573
|
+
<tr><td><code>Praha</code> (Facet, Selected)</td><td><code>Kraj: Praha</code></td></tr>
|
|
574
|
+
<tr><td><code>18</code> (count)</td><td><code>(18)</code> · <code>18 firem</code></td></tr>
|
|
575
|
+
<tr><td><code>Čistota Plus +2</code> (several applied)</td><td><code>Dodavatel: 3</code> · <code>3 dodavatelé</code></td></tr>
|
|
576
|
+
<tr><td><code>500 – 5 000 Kč</code> (range)</td><td><code>500 Kč – 5 000 Kč</code></td></tr>
|
|
577
|
+
<tr><td><code>Zrušit filtr Kraj</code> (× <code>aria-label</code>)</td><td>a bare <code>×</code> with no label</td></tr>
|
|
578
|
+
</tbody>
|
|
579
|
+
</table>
|
|
580
|
+
|
|
581
|
+
## Usage
|
|
582
|
+
|
|
583
|
+
<Canvas of={FilterChipStories.FilterBar} />
|
|
584
|
+
|
|
585
|
+
```tsx
|
|
586
|
+
import { FilterChip } from '@invoiceonline/ui-react';
|
|
587
|
+
|
|
588
|
+
// Good — a Facet driven by the page: the applied value IS the selection
|
|
589
|
+
<FilterChip
|
|
590
|
+
size="sm"
|
|
591
|
+
leadingIcon="map-pin"
|
|
592
|
+
count={14}
|
|
593
|
+
value={facets.region} // undefined → the bare trigger
|
|
594
|
+
open={openPanel === 'region'}
|
|
595
|
+
clearLabel={t('filters.clear', { facet: 'Kraj' })}
|
|
596
|
+
onClick={() => setOpenPanel('region')}
|
|
597
|
+
onClear={() => setFacets(prev => ({ ...prev, region: undefined }))}
|
|
598
|
+
>
|
|
599
|
+
Kraj {/* the CATEGORY, in both directions */}
|
|
600
|
+
</FilterChip>
|
|
601
|
+
|
|
602
|
+
// Good — several values: the chip collapses the label, mounts the Tooltip and
|
|
603
|
+
// composes the full accessible name. Needs a TooltipProvider ancestor. Its panel
|
|
604
|
+
// is a checkbox group focus moves into, so the trigger announces a dialog.
|
|
605
|
+
<FilterChip
|
|
606
|
+
leadingIcon="buildings"
|
|
607
|
+
popup="dialog"
|
|
608
|
+
value={facets.suppliers} // ['Čistota Plus', 'Datacentrum Sever', 'Pekárna Růžička']
|
|
609
|
+
clearLabel={t('filters.clear', { facet: 'Dodavatel' })}
|
|
610
|
+
>
|
|
611
|
+
Dodavatel
|
|
612
|
+
</FilterChip>
|
|
613
|
+
|
|
614
|
+
// Good — a risk-flag Toggle: emotion + Badge's glyph, controlled state
|
|
615
|
+
<FilterChip
|
|
616
|
+
type="toggle"
|
|
617
|
+
emotion="warning"
|
|
618
|
+
leadingIcon="warning"
|
|
619
|
+
count={2}
|
|
620
|
+
checked={flags.includes('unreliableVat')}
|
|
621
|
+
onCheckedChange={checked => toggleFlag('unreliableVat', checked)}
|
|
622
|
+
>
|
|
623
|
+
Nespolehlivý DPH
|
|
624
|
+
</FilterChip>
|
|
625
|
+
|
|
626
|
+
// Good — zero renders: it is an answer, not an absence
|
|
627
|
+
<FilterChip type="toggle" leadingIcon="shield-check" count={0}>
|
|
628
|
+
Plátce DPH
|
|
629
|
+
</FilterChip>
|
|
630
|
+
|
|
631
|
+
// Good — text-only, the exception: a row with no room for icon + label
|
|
632
|
+
<FilterChip type="toggle" leadingIcon={null} showCount={false} defaultChecked>
|
|
633
|
+
Plátce DPH
|
|
634
|
+
</FilterChip>
|
|
635
|
+
```
|
|
636
|
+
|
|
637
|
+
```tsx
|
|
638
|
+
// Don't — a Facet without `clearLabel`; the props union rejects it, and the
|
|
639
|
+
// icon-only × would ship unnamed
|
|
640
|
+
<FilterChip value="Praha">Kraj</FilterChip>
|
|
641
|
+
|
|
642
|
+
// Don't — hardcode the × name in the app; this atom ships on nine markets
|
|
643
|
+
<FilterChip value="Praha" clearLabel="Zrušit filtr Kraj">Kraj</FilterChip> // ...unless it came from t()
|
|
644
|
+
|
|
645
|
+
// Don't — omit a zero count, or dress it up
|
|
646
|
+
<FilterChip type="toggle" count={count || undefined}>Plátce DPH</FilterChip>
|
|
647
|
+
|
|
648
|
+
// Don't — a risk emotion on a Facet; that vocabulary is Toggle's (dev warning)
|
|
649
|
+
<FilterChip emotion="danger" value="Praha" clearLabel="Zrušit filtr Kraj">Kraj</FilterChip>
|
|
650
|
+
|
|
651
|
+
// Don't — Toggle props on a Facet; they are dropped and warn in dev
|
|
652
|
+
<FilterChip defaultChecked clearLabel="Zrušit filtr Kraj">Kraj</FilterChip>
|
|
653
|
+
|
|
654
|
+
// Don't — spell the applied value into `children`; the chip renders `value` there
|
|
655
|
+
// itself, and a category is what the collapsed accessible name needs in front
|
|
656
|
+
<FilterChip value="Praha" clearLabel="Zrušit filtr Kraj">Praha</FilterChip>
|
|
657
|
+
|
|
658
|
+
// Don't — pre-collapse the label yourself; `+2` then carries no Tooltip and no
|
|
659
|
+
// accessible name, which is exactly what the elision rule forbids
|
|
660
|
+
<FilterChip value="Čistota Plus +2" clearLabel="Zrušit filtr Dodavatel">Dodavatel</FilterChip>
|
|
661
|
+
|
|
662
|
+
// Don't — expect a count on a Facet; it has no count node in either state
|
|
663
|
+
<FilterChip count={14} clearLabel="Zrušit filtr Kraj">Kraj</FilterChip>
|
|
664
|
+
|
|
665
|
+
// Don't — the glyph hidden by habit in a bar that has room for it, or the
|
|
666
|
+
// generic `funnel-simple` default (no leadingIcon) left on every chip
|
|
667
|
+
<FilterChip type="toggle" leadingIcon={null} count={14}>Plátce DPH</FilterChip>
|
|
668
|
+
<FilterChip clearLabel={t('filters.clear', { facet: 'Kraj' })}>Kraj</FilterChip>
|
|
669
|
+
|
|
670
|
+
// Don't — hardcoded colours instead of the family tokens
|
|
671
|
+
<FilterChip className="bg-[#1d4ed8] text-white" type="toggle">Plátce DPH</FilterChip>
|
|
672
|
+
```
|
|
673
|
+
|
|
674
|
+
<Canvas of={FilterChipStories.Count} />
|
|
675
|
+
|
|
676
|
+
<Canvas of={FilterChipStories.LeadingGlyph} />
|
|
677
|
+
|
|
678
|
+
## Related
|
|
679
|
+
|
|
680
|
+
- [`Chip`](?path=/docs/design-system-atoms-chip--docs) — the 22/30 **tag tier**, whose pill never
|
|
681
|
+
recolours (its selection lives in a leading checkbox). The deliberate boundary against this
|
|
682
|
+
component; FilterChip does not replace it anywhere.
|
|
683
|
+
- [`Badge`](?path=/docs/design-system-atoms-badge--docs) — **read-only** status reporting, no states,
|
|
684
|
+
no affordance.
|
|
685
|
+
- [`DropdownButton`](?path=/docs/design-system-atoms-dropdownbutton--docs) — a trigger whose label
|
|
686
|
+
is a fixed menu noun ("Akce"); a Facet's label becomes the applied value instead.
|
|
687
|
+
- [`FilterFacet`](?path=/docs/design-system-organisms-filterfacet--docs) — the Facet plus the panel
|
|
688
|
+
it opens, single-value (`listbox`) or `multiple` (checkbox group, `popup="dialog"`).
|
|
689
|
+
- [`ListRow`](?path=/docs/design-system-atoms-listrow--docs) — the rows of the options panel a
|
|
690
|
+
Facet opens, at **Small 36** under either trigger size. The panel itself is the Popover / Filter
|
|
691
|
+
Facet assembly, not part of this atom.
|
|
692
|
+
- Spec: `spec/03-atoms/filter-chip.md`,
|
|
693
|
+
the shared chrome recipe `spec/06-patterns/pill.md`,
|
|
694
|
+
the stroke mechanism `spec/06-patterns/edge-outline.md`,
|
|
695
|
+
the focus pattern `spec/06-patterns/focus-ring.md`,
|
|
696
|
+
the panel patterns `spec/06-patterns/popover-patterns.md`.
|
|
697
|
+
|
|
698
|
+
## Migration notes
|
|
699
|
+
|
|
700
|
+
### 1.13.0 / 1.13.1 — stable, motion audit (2026-11-03)
|
|
701
|
+
|
|
702
|
+
- **1.13.0** — upstream status draft → stable (the component ships in Storybook). No design, token or code change. The local status stays `draft`.
|
|
703
|
+
- **1.13.1** — the motion block names hover, toggle and open. New in code: the Facet caret now turns 180°
|
|
704
|
+
on `--spring-standard` while the panel is open (Motion, shared `internal/MotionCaret.tsx`); it had no
|
|
705
|
+
rotation before. New `Motion` story.
|
|
706
|
+
|
|
707
|
+
### 1.14.0 — sheet close label (2026-11-13)
|
|
708
|
+
|
|
709
|
+
- **1.14.0** — optional code-only `text.sheet-close-label` → `sheetCloseLabel` on `FilterFacet`: the name
|
|
710
|
+
of the hidden close button of the facet's mobile bottom sheet, default «Zavřít». An app with more
|
|
711
|
+
language versions passes it from its translations. The chip itself does not change.
|
|
712
|
+
|
|
713
|
+
### 1.14.1 — fictitious sample names (2026-11-16)
|
|
714
|
+
|
|
715
|
+
- **1.14.1** — the spec's Copy examples use the same fictitious supplier names as the stories
|
|
716
|
+
(Čistota Plus, Datacentrum Sever, Pekárna Růžička). No code change.
|
|
717
|
+
|
|
718
|
+
### 1.8.0 / 1.9.0 — searchable Facet focus model, focus after × (2026-10-08)
|
|
719
|
+
|
|
720
|
+
- **1.8.0** — focus model: a single-value Facet **with search** moves focus into the search input on
|
|
721
|
+
open; the input owns ↑ / ↓ via `aria-activedescendant`, Enter commits the highlighted option and
|
|
722
|
+
closes, Esc closes and returns focus to the trigger. After the × clears a Facet, focus lands on
|
|
723
|
+
that chip's own trigger — the atom now does this itself. The × ring is structured as
|
|
724
|
+
`chrome.clear.focus.ring = --outline-focus-inverse`; the code already bound it (1.5.1).
|
|
725
|
+
- **1.9.0** — roles for that case: the search input carries `role="combobox"`, `aria-expanded`,
|
|
726
|
+
`aria-controls` and `aria-activedescendant`, and the chip trigger is a plain
|
|
727
|
+
`<button aria-haspopup="listbox" aria-expanded>`. Landed as the new `searchable` prop; a Facet
|
|
728
|
+
without search keeps `role="combobox"` on the trigger. The new `triggerRef` prop lets the assembly
|
|
729
|
+
return focus to the trigger button rather than to the non-focusable root.
|
|
730
|
+
|
|
731
|
+
### 1.6.0 / 1.7.0 — the Facet trigger's role follows its panel (2026-10-05)
|
|
732
|
+
|
|
733
|
+
- **1.6.0** — the spec adopts what the build already shipped: the Facet trigger is
|
|
734
|
+
`role="combobox"` with `aria-haspopup="listbox"` and `aria-expanded`, replacing the plain
|
|
735
|
+
`<button aria-haspopup="listbox" aria-expanded>`. No code change. This closes the dev-side
|
|
736
|
+
deviation recorded here since the designer QA of 2026-09-29: the team had chosen the combobox
|
|
737
|
+
because `aria-activedescendant` is invalid on role `button`, and a combobox takes no name from its
|
|
738
|
+
content, which is why a Facet always carries an `aria-label` (*"Kraj: Praha"*, earlier just
|
|
739
|
+
*"Praha"*).
|
|
740
|
+
- **1.7.0** — a multi-value Facet, whose panel is a Multi-select filter `role="group"`, is a plain
|
|
741
|
+
`<button aria-haspopup="dialog" aria-expanded>`: not a combobox, not `aria-haspopup="listbox"`, no
|
|
742
|
+
`aria-activedescendant`, focus moves into the panel. Landed as the new `popup` prop
|
|
743
|
+
(`'listbox'` default · `'dialog'`). Existing callers are unaffected — the default keeps the 1.6.0
|
|
744
|
+
trigger. The single-value Facet and the Toggle are unchanged.
|
|
745
|
+
|
|
746
|
+
### 1.5.0 / 1.5.1 — disabled grey, per-side padding, inverse × ring (2026-09-22 / 29)
|
|
747
|
+
|
|
748
|
+
- **1.5.0** — Selected Disabled fill rebinds `--disabled` → `--disabled-control` (ui-system 0.13.0
|
|
749
|
+
deprecates `--disabled`); Unselected Disabled is unchanged.
|
|
750
|
+
- **1.5.1** — inline padding is stated per side (icon side `--space-400`, text side `--space-500`);
|
|
751
|
+
the build already padded that way, so no geometry moved. A Toggle at zero stays enabled — the
|
|
752
|
+
component never disabled it. The × focus ring on a Selected Facet binds `--outline-focus-inverse`
|
|
753
|
+
instead of `--outline-focus`, which was invisible on the solid fill.
|
|
754
|
+
|
|
755
|
+
### 1.3.0 — the eight filter-bar usage rules (2026-08-26)
|
|
756
|
+
|
|
757
|
+
Manifest 1.3.0 recorded eight rules from the filter-bar prototype. Two of them **correct**
|
|
758
|
+
the contract rather than extend it; the rest are behaviour that had never been written down.
|
|
759
|
+
|
|
760
|
+
| Rule | Where it landed |
|
|
761
|
+
|---|---|
|
|
762
|
+
| (a) the × is a **sibling** button, never nested | already shipped this way — nesting is invalid HTML and is what made an applied range un-editable in the prototype. Only the docs caught up. |
|
|
763
|
+
| (b) the ×'s hit area moves **24×24 → 32×32** | `before:size-800` → `before:size-900`; it bleeds over the pill's 1px edge, so the root must stay free of `overflow-hidden`. |
|
|
764
|
+
| a Facet **Unselected carries no count** | the count is now absent on a Facet in *both* selection states; `showCount` only bites on a Toggle. |
|
|
765
|
+
| multi-value: OR within a facet, AND across | `value` accepts `string[]`; the matrix is unchanged. |
|
|
766
|
+
| the label collapses to `value +N` | composed by the component from `value`, which is why `children` stays the category. |
|
|
767
|
+
| a collapsed label **requires a Tooltip** + the full list in the accessible name | both, on the trigger — see [Multi-value](#multi-value). |
|
|
768
|
+
| the panel's search header appears from ~**5 options**, and rows sort by count descending only where the option set has no order of its own | **not this component.** The options panel is the Popover / Filter Facet assembly, which the manifest explicitly puts outside Filter Chip. Recorded here as the contract a consumer must meet; the assembly has since been built as `FilterFacet`. |
|
|
769
|
+
| a **range facet's** Field Pair panel must stay editable while applied | same: panel-side. The chip's half is the collapsed label (`od 500 Kč` / `500 – 5 000 Kč`), which is an ordinary single value — see [Multi-value](#multi-value). |
|
|
770
|
+
|
|
771
|
+
**Breaking for callers of a Selected Facet.** `children` used to be switched to the applied value by
|
|
772
|
+
the caller (`{region ?? 'Kraj'}`); it is now always the category and the chip renders `value` in its
|
|
773
|
+
place. A call site that keeps the ternary still renders correctly for one value, but loses the
|
|
774
|
+
category the collapsed accessible name needs — drop the ternary.
|
|
775
|
+
|
|
776
|
+
**Spec contradiction, filed upstream.** `filter-chip.md` § Anatomy still says the count is
|
|
777
|
+
"structurally absent on Facet + Selected", while manifest 1.3.0 makes it absent on a Facet entirely.
|
|
778
|
+
The manifest wins per the authority order and the code follows it.
|