@invoiceonline/ui-react 0.0.0 → 0.2.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 +100 -0
- package/CHANGELOG.md +149 -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-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 +119 -0
- package/dist/components/field/Field.js +332 -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 +210 -0
- package/dist/components/field-pair/FieldPair.js +335 -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 +160 -0
- package/dist/components/text-field/TextField.js +244 -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 +130 -0
- package/dist/index.js +74 -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.d.ts +60 -0
- package/dist/internal/useDateFieldTrigger.js +235 -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 +44 -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 +396 -0
- package/docs/Contributing.mdx +78 -0
- package/docs/ForAgents.mdx +53 -0
- package/docs/Introduction.mdx +54 -0
- package/llms.txt +550 -0
- package/package.json +347 -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-picker/DatePicker.mdx +440 -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 +787 -0
- package/src/components/field/index.ts +20 -0
- package/src/components/field-pair/FieldPair.mdx +312 -0
- package/src/components/field-pair/FieldPair.stories.tsx +539 -0
- package/src/components/field-pair/FieldPair.tsx +845 -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 +699 -0
- package/src/components/text-field/TextField.stories.tsx +674 -0
- package/src/components/text-field/TextField.tsx +645 -0
- package/src/components/text-field/index.ts +11 -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 +70 -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 +497 -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 +57 -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 +360 -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,340 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { tv } from "../../internal/tailwind-variants.js";
|
|
3
|
+
import { Icon } from "../icon/Icon.js";
|
|
4
|
+
import { Badge } from "../badge/Badge.js";
|
|
5
|
+
import { FirmAvatar } from "../firm-avatar/FirmAvatar.js";
|
|
6
|
+
import { IconButton } from "../icon-button/IconButton.js";
|
|
7
|
+
import { TooltipArrow, TooltipContent, TooltipPortal, TooltipRoot, TooltipTrigger, tooltipVariants } from "../tooltip/Tooltip.js";
|
|
8
|
+
import { cn } from "../../internal/utils.js";
|
|
9
|
+
import * as React from "react";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
// src/components/action-row/ActionRow.tsx
|
|
12
|
+
/**
|
|
13
|
+
* ActionRow — one firm row inside the account menu (manifest 2.2.4), and the same row
|
|
14
|
+
* for manageable entities (bank accounts, units) on a management surface.
|
|
15
|
+
*
|
|
16
|
+
* The row both NAVIGATES (switches the active firm) and carries inline row-actions
|
|
17
|
+
* (rename, set as home). It is not a ListRow and not a listbox option.
|
|
18
|
+
*
|
|
19
|
+
* Semantics: the ROOT is a presentational container — the navigation affordance is a real
|
|
20
|
+
* `<button>` wrapping the text stack, and the row-actions are its SIBLINGS. That is the only
|
|
21
|
+
* way a row with row-actions stays ARIA-correct: `role="button"` / `"menuitem"` / `"option"`
|
|
22
|
+
* on the root would make its children presentational and hide the action buttons from AT,
|
|
23
|
+
* while a bare focusable `<div>` is not announced as operable at all. Enter / Space therefore
|
|
24
|
+
* work natively, and the focus ring is drawn on the root through `has-[[data-action-row-nav]]`.
|
|
25
|
+
*
|
|
26
|
+
* Layer order (manifest notes[2]): leading glyph OR avatar · text stack · badge · trailing
|
|
27
|
+
* actions. The badge sits INSIDE the nav button, right after the text stack, so the
|
|
28
|
+
* accessible name composes in the manifest's order — name, description, badge label,
|
|
29
|
+
* visually-hidden tariff text, home label — from the DOM alone; a click on it is a click
|
|
30
|
+
* on the row, which is all the spec lets it do.
|
|
31
|
+
*
|
|
32
|
+
* Layering model (identical to ListRow): the Selected fill (`--secondary-subtle`) sits
|
|
33
|
+
* on the root and the Hover wash (`--bg-hover`) is a `::before` overlay, so Selected+Hover
|
|
34
|
+
* simply stacks the wash on top of the fill with no extra logic. The content lives in a
|
|
35
|
+
* `relative` wrapper so it paints above `::before`.
|
|
36
|
+
*
|
|
37
|
+
* The Hover wash is desktop-only — Mobile is touch, so it exposes Default and Selected only.
|
|
38
|
+
* The Pressed (`active:`) wash is NOT platform-gated: on Mobile a tap presses the row straight
|
|
39
|
+
* to --bg-active, Selected included (manifest 2.2.0 notes[5]).
|
|
40
|
+
*
|
|
41
|
+
* Heights are MIN-heights: the row hugs vertically once `description` is present, while
|
|
42
|
+
* the leading / trailing slots stay vertically centred.
|
|
43
|
+
*/
|
|
44
|
+
const actionRowVariants = tv({
|
|
45
|
+
slots: {
|
|
46
|
+
root: [
|
|
47
|
+
"group relative flex w-full items-center text-left",
|
|
48
|
+
"rounded-400 pl-300 pr-500 py-400",
|
|
49
|
+
"transition-[background-color] duration-toggle ease-standard",
|
|
50
|
+
"cursor-pointer",
|
|
51
|
+
"before:content-[''] before:absolute before:inset-0 before:rounded-400",
|
|
52
|
+
"before:bg-background-hover before:opacity-0",
|
|
53
|
+
"before:transition-[opacity,background-color] before:duration-hover before:ease-standard active:before:duration-press",
|
|
54
|
+
"active:before:bg-background-active active:before:opacity-100",
|
|
55
|
+
"has-[button:not([data-action-row-nav]):active]:before:bg-background-hover",
|
|
56
|
+
"has-[[data-action-row-nav]:focus-visible]:outline",
|
|
57
|
+
"has-[[data-action-row-nav]:focus-visible]:outline-200",
|
|
58
|
+
"has-[[data-action-row-nav]:focus-visible]:outline-outline-focus",
|
|
59
|
+
"has-[[data-action-row-nav]:focus-visible]:outline-offset-2"
|
|
60
|
+
],
|
|
61
|
+
content: "relative flex w-full items-center gap-100",
|
|
62
|
+
leadingSlot: ["shrink-0 inline-flex items-center justify-center", "text-text-secondary [&_.icon]:size-icon-small"],
|
|
63
|
+
body: [
|
|
64
|
+
"flex min-w-0 flex-1 items-center gap-100",
|
|
65
|
+
"cursor-pointer text-left",
|
|
66
|
+
"focus-visible:outline-none"
|
|
67
|
+
],
|
|
68
|
+
textStack: "flex min-w-0 flex-1 flex-col px-300",
|
|
69
|
+
name: "truncate text-body-base transition-[color] duration-toggle ease-standard",
|
|
70
|
+
editInput: [
|
|
71
|
+
"w-full min-w-0 border-0 bg-transparent p-0 outline-none",
|
|
72
|
+
"text-body-base font-normal text-text-primary",
|
|
73
|
+
"caret-tertiary-tint-foreground"
|
|
74
|
+
],
|
|
75
|
+
description: "truncate text-body-sm font-normal text-text-secondary",
|
|
76
|
+
badge: "shrink-0",
|
|
77
|
+
trailing: "relative shrink-0 inline-flex items-center gap-400",
|
|
78
|
+
actions: [
|
|
79
|
+
"inline-flex items-center gap-400",
|
|
80
|
+
"opacity-0 pointer-events-none transition-[opacity] duration-hover ease-standard",
|
|
81
|
+
"group-hover:opacity-100 group-hover:pointer-events-auto",
|
|
82
|
+
"group-focus-within:opacity-100 group-focus-within:pointer-events-auto"
|
|
83
|
+
],
|
|
84
|
+
rowAction: ["size-800 [&_.icon]:size-icon-small", "!text-text-secondary"],
|
|
85
|
+
manageAction: "hover:!text-text-primary active:!text-text-primary",
|
|
86
|
+
confirmAction: ["relative shrink-0", "hover:!text-secondary hover:bg-transparent active:bg-transparent"],
|
|
87
|
+
homeStatus: ["shrink-0 inline-flex items-center justify-center", "text-secondary [&_.icon]:size-icon-small"]
|
|
88
|
+
},
|
|
89
|
+
variants: {
|
|
90
|
+
platform: {
|
|
91
|
+
desktop: { root: ["min-h-1100 hover:before:opacity-100", "has-[[data-action-row-nav]:focus-visible]:before:opacity-100"] },
|
|
92
|
+
mobile: { root: "min-h-[56px] py-500" }
|
|
93
|
+
},
|
|
94
|
+
selected: {
|
|
95
|
+
true: {
|
|
96
|
+
root: "bg-secondary-subtle",
|
|
97
|
+
name: "font-semibold text-secondary-tint-foreground"
|
|
98
|
+
},
|
|
99
|
+
false: { name: "font-normal text-text-primary" }
|
|
100
|
+
},
|
|
101
|
+
highlighted: {
|
|
102
|
+
true: {
|
|
103
|
+
root: "before:opacity-100",
|
|
104
|
+
actions: "opacity-100 pointer-events-auto"
|
|
105
|
+
},
|
|
106
|
+
false: {}
|
|
107
|
+
},
|
|
108
|
+
editing: {
|
|
109
|
+
true: { root: ["outline-100 outline-outline-focus [outline-offset:calc(-1*var(--border-width-100))]", "bg-background-primary"] },
|
|
110
|
+
false: {}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
compoundVariants: [{
|
|
114
|
+
editing: true,
|
|
115
|
+
class: { root: "before:opacity-0 hover:before:opacity-0 active:before:opacity-0" }
|
|
116
|
+
}],
|
|
117
|
+
defaultVariants: {
|
|
118
|
+
platform: "desktop",
|
|
119
|
+
selected: false,
|
|
120
|
+
highlighted: false,
|
|
121
|
+
editing: false
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
/** `:focus-visible` is the tooltip's keyboard trigger; an engine without it reads as "no". */
|
|
125
|
+
function isFocusVisible(element) {
|
|
126
|
+
try {
|
|
127
|
+
return element.matches(":focus-visible");
|
|
128
|
+
} catch {
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* The badge as a tooltip trigger. Radix points the trigger at the bubble while it is
|
|
134
|
+
* open; the tariff text already sits in the nav button's name, so a description would
|
|
135
|
+
* announce it twice. The trigger's props arrive merged, so the attribute is dropped here.
|
|
136
|
+
*/
|
|
137
|
+
const UndescribedBadge = React.forwardRef(({ "aria-describedby": _describedBy, ...props }, ref) => /* @__PURE__ */ jsx(Badge, {
|
|
138
|
+
ref,
|
|
139
|
+
...props
|
|
140
|
+
}));
|
|
141
|
+
UndescribedBadge.displayName = "ActionRowBadge";
|
|
142
|
+
const ActionRow = React.forwardRef(({ className, platform = "desktop", selected = false, highlighted = false, editing = false, isHome = false, name, description, avatar, leadingIcon, badge, onActivate, onRename, onSetHome, editValue, onEditValueChange, onEditCommit, onEditCancel, labels, navTabIndex, navRef, onClick, ...props }, ref) => {
|
|
143
|
+
const isDesktop = platform === "desktop";
|
|
144
|
+
const isEditing = editing && isDesktop;
|
|
145
|
+
const slots = actionRowVariants({
|
|
146
|
+
platform,
|
|
147
|
+
selected,
|
|
148
|
+
highlighted: highlighted && isDesktop,
|
|
149
|
+
editing: isEditing
|
|
150
|
+
});
|
|
151
|
+
if (process.env.NODE_ENV !== "production") {
|
|
152
|
+
if (avatar != null && leadingIcon != null) console.warn("ActionRow: `avatar` and `leadingIcon` are mutually exclusive — the avatar is rendered, the glyph dropped.");
|
|
153
|
+
if (badge != null && selected) console.warn("ActionRow: `badge` is never shown on the Selected row (the account card carries its tariff state), so it is dropped.");
|
|
154
|
+
}
|
|
155
|
+
const inputRef = React.useRef(null);
|
|
156
|
+
const wasEditing = React.useRef(isEditing);
|
|
157
|
+
React.useEffect(() => {
|
|
158
|
+
if (isEditing && !wasEditing.current) {
|
|
159
|
+
inputRef.current?.focus();
|
|
160
|
+
inputRef.current?.select();
|
|
161
|
+
}
|
|
162
|
+
wasEditing.current = isEditing;
|
|
163
|
+
}, [isEditing]);
|
|
164
|
+
const showAvatar = avatar != null;
|
|
165
|
+
const showLeading = avatar == null && leadingIcon != null;
|
|
166
|
+
const showDescription = description != null && description !== "" && !isEditing;
|
|
167
|
+
const showBadge = badge != null && !selected && !isEditing;
|
|
168
|
+
const hasBadgeTooltip = showBadge && isDesktop && badge.tooltip != null && badge.tooltip !== "";
|
|
169
|
+
const showHome = isHome && !isEditing;
|
|
170
|
+
const showSetHome = isDesktop && !isEditing && !isHome && onSetHome != null;
|
|
171
|
+
const showRename = isDesktop && !isEditing && onRename != null;
|
|
172
|
+
const showActions = showRename || showSetHome;
|
|
173
|
+
const [badgeHovered, setBadgeHovered] = React.useState(false);
|
|
174
|
+
const [navFocusVisible, setNavFocusVisible] = React.useState(false);
|
|
175
|
+
const handleTooltipOpenChange = (open) => {
|
|
176
|
+
setBadgeHovered(open);
|
|
177
|
+
if (!open) setNavFocusVisible(false);
|
|
178
|
+
};
|
|
179
|
+
const handleEditKeyDown = (event) => {
|
|
180
|
+
if (event.key === "Tab") return;
|
|
181
|
+
event.stopPropagation();
|
|
182
|
+
if (event.key === "Enter") {
|
|
183
|
+
event.preventDefault();
|
|
184
|
+
onEditCommit?.();
|
|
185
|
+
} else if (event.key === "Escape") {
|
|
186
|
+
event.preventDefault();
|
|
187
|
+
onEditCancel?.();
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
const withoutRowActivation = (handler) => (event) => {
|
|
191
|
+
event.stopPropagation();
|
|
192
|
+
handler?.();
|
|
193
|
+
};
|
|
194
|
+
const stopActivationKeys = (event) => {
|
|
195
|
+
if (event.key === "Enter" || event.key === " ") event.stopPropagation();
|
|
196
|
+
};
|
|
197
|
+
const handleRootClick = (event) => {
|
|
198
|
+
if (!isEditing) onActivate?.();
|
|
199
|
+
onClick?.(event);
|
|
200
|
+
};
|
|
201
|
+
const badgeNode = showBadge ? /* @__PURE__ */ jsx(UndescribedBadge, {
|
|
202
|
+
"data-fods-part": "badge",
|
|
203
|
+
appearance: "soft",
|
|
204
|
+
size: "sm",
|
|
205
|
+
emotion: badge.emotion,
|
|
206
|
+
className: slots.badge(),
|
|
207
|
+
children: badge.label
|
|
208
|
+
}) : null;
|
|
209
|
+
return /* @__PURE__ */ jsx("div", {
|
|
210
|
+
ref,
|
|
211
|
+
"data-fods-component": "action-row",
|
|
212
|
+
"data-fods-part": "root",
|
|
213
|
+
"data-selected": selected ? "true" : "false",
|
|
214
|
+
className: cn(slots.root(), className),
|
|
215
|
+
onClick: handleRootClick,
|
|
216
|
+
...props,
|
|
217
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
218
|
+
"data-fods-part": "content",
|
|
219
|
+
className: slots.content(),
|
|
220
|
+
children: [
|
|
221
|
+
showAvatar && /* @__PURE__ */ jsx(FirmAvatar, {
|
|
222
|
+
"data-fods-part": "avatar",
|
|
223
|
+
name: avatar.name,
|
|
224
|
+
email: avatar.email,
|
|
225
|
+
selected,
|
|
226
|
+
size: "sm"
|
|
227
|
+
}),
|
|
228
|
+
showLeading && /* @__PURE__ */ jsx("span", {
|
|
229
|
+
"data-fods-part": "icon-leading",
|
|
230
|
+
className: slots.leadingSlot(),
|
|
231
|
+
children: leadingIcon
|
|
232
|
+
}),
|
|
233
|
+
isEditing ? /* @__PURE__ */ jsx("div", {
|
|
234
|
+
className: slots.body(),
|
|
235
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
236
|
+
className: slots.textStack(),
|
|
237
|
+
children: /* @__PURE__ */ jsx("input", {
|
|
238
|
+
ref: inputRef,
|
|
239
|
+
type: "text",
|
|
240
|
+
value: editValue ?? "",
|
|
241
|
+
"aria-label": name || labels.rename,
|
|
242
|
+
onChange: (event) => onEditValueChange?.(event.target.value),
|
|
243
|
+
onKeyDown: handleEditKeyDown,
|
|
244
|
+
onClick: (event) => event.stopPropagation(),
|
|
245
|
+
onMouseDown: (event) => event.stopPropagation(),
|
|
246
|
+
"data-fods-part": "edit-input",
|
|
247
|
+
className: slots.editInput()
|
|
248
|
+
})
|
|
249
|
+
})
|
|
250
|
+
}) : /* @__PURE__ */ jsxs("button", {
|
|
251
|
+
ref: navRef,
|
|
252
|
+
type: "button",
|
|
253
|
+
"data-action-row-nav": "",
|
|
254
|
+
tabIndex: navTabIndex,
|
|
255
|
+
"aria-current": selected || void 0,
|
|
256
|
+
onFocus: (event) => {
|
|
257
|
+
if (hasBadgeTooltip && isFocusVisible(event.currentTarget)) setNavFocusVisible(true);
|
|
258
|
+
},
|
|
259
|
+
onBlur: () => setNavFocusVisible(false),
|
|
260
|
+
className: slots.body(),
|
|
261
|
+
children: [
|
|
262
|
+
/* @__PURE__ */ jsxs("span", {
|
|
263
|
+
className: slots.textStack(),
|
|
264
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
265
|
+
"data-fods-part": "name",
|
|
266
|
+
className: slots.name(),
|
|
267
|
+
children: name
|
|
268
|
+
}), showDescription && /* @__PURE__ */ jsx("span", {
|
|
269
|
+
"data-fods-part": "description",
|
|
270
|
+
className: slots.description(),
|
|
271
|
+
children: description
|
|
272
|
+
})]
|
|
273
|
+
}),
|
|
274
|
+
hasBadgeTooltip ? /* @__PURE__ */ jsxs(TooltipRoot, {
|
|
275
|
+
open: badgeHovered || navFocusVisible,
|
|
276
|
+
onOpenChange: handleTooltipOpenChange,
|
|
277
|
+
children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
278
|
+
asChild: true,
|
|
279
|
+
children: badgeNode
|
|
280
|
+
}), /* @__PURE__ */ jsx(TooltipPortal, { children: /* @__PURE__ */ jsxs(TooltipContent, {
|
|
281
|
+
size: "sm",
|
|
282
|
+
side: "top",
|
|
283
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
284
|
+
className: tooltipVariants({ size: "sm" }).body(),
|
|
285
|
+
children: badge.tooltip
|
|
286
|
+
}), /* @__PURE__ */ jsx(TooltipArrow, {})]
|
|
287
|
+
}) })]
|
|
288
|
+
}) : badgeNode,
|
|
289
|
+
showBadge && badge.tooltip && /* @__PURE__ */ jsx("span", {
|
|
290
|
+
className: "sr-only",
|
|
291
|
+
children: badge.tooltip
|
|
292
|
+
}),
|
|
293
|
+
isHome && /* @__PURE__ */ jsx("span", {
|
|
294
|
+
className: "sr-only",
|
|
295
|
+
children: labels.home
|
|
296
|
+
})
|
|
297
|
+
]
|
|
298
|
+
}),
|
|
299
|
+
isEditing && /* @__PURE__ */ jsx(IconButton, {
|
|
300
|
+
variant: "tertiary",
|
|
301
|
+
icon: /* @__PURE__ */ jsx(Icon, { name: "check" }),
|
|
302
|
+
"aria-label": labels.confirm,
|
|
303
|
+
onClick: withoutRowActivation(onEditCommit),
|
|
304
|
+
onKeyDown: stopActivationKeys,
|
|
305
|
+
"data-fods-part": "row-action",
|
|
306
|
+
className: cn(slots.rowAction(), slots.confirmAction())
|
|
307
|
+
}),
|
|
308
|
+
(showActions || showHome) && /* @__PURE__ */ jsxs("span", {
|
|
309
|
+
className: slots.trailing(),
|
|
310
|
+
children: [showActions && /* @__PURE__ */ jsxs("span", {
|
|
311
|
+
className: slots.actions(),
|
|
312
|
+
children: [showRename && /* @__PURE__ */ jsx(IconButton, {
|
|
313
|
+
variant: "tertiary",
|
|
314
|
+
icon: /* @__PURE__ */ jsx(Icon, { name: "pencil-simple" }),
|
|
315
|
+
"aria-label": labels.rename,
|
|
316
|
+
onClick: withoutRowActivation(onRename),
|
|
317
|
+
onKeyDown: stopActivationKeys,
|
|
318
|
+
"data-fods-part": "row-action",
|
|
319
|
+
className: cn(slots.rowAction(), slots.manageAction())
|
|
320
|
+
}), showSetHome && /* @__PURE__ */ jsx(IconButton, {
|
|
321
|
+
variant: "tertiary",
|
|
322
|
+
icon: /* @__PURE__ */ jsx(Icon, { name: "house" }),
|
|
323
|
+
"aria-label": labels.setHome,
|
|
324
|
+
onClick: withoutRowActivation(onSetHome),
|
|
325
|
+
onKeyDown: stopActivationKeys,
|
|
326
|
+
"data-fods-part": "row-action",
|
|
327
|
+
className: cn(slots.rowAction(), slots.manageAction())
|
|
328
|
+
})]
|
|
329
|
+
}), showHome && /* @__PURE__ */ jsx("span", {
|
|
330
|
+
"data-fods-part": "home-status",
|
|
331
|
+
className: slots.homeStatus(),
|
|
332
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "house" })
|
|
333
|
+
})]
|
|
334
|
+
})
|
|
335
|
+
]
|
|
336
|
+
})
|
|
337
|
+
});
|
|
338
|
+
});
|
|
339
|
+
ActionRow.displayName = "ActionRow";
|
|
340
|
+
export { ActionRow, actionRowVariants };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ActionRow, ActionRowAvatar, ActionRowBadge, ActionRowBadgeEmotion, ActionRowLabels, ActionRowProps, actionRowVariants } from "./ActionRow.js";
|
|
2
|
+
export { ActionRow, type ActionRowAvatar, type ActionRowBadge, type ActionRowBadgeEmotion, type ActionRowLabels, type ActionRowProps, actionRowVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ActionRow, actionRowVariants } from "./ActionRow.js";
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import { VariantProps } from "../../internal/tailwind-variants.js";
|
|
2
|
+
import { IconName } from "../../icons/icon-types.generated.js";
|
|
3
|
+
import "../icon/Icon.js";
|
|
4
|
+
import { TextLinkElement, TextLinkProps } from "../text-link/TextLink.js";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
/**
|
|
7
|
+
* Alert — the contextual, in-flow notice (upstream spec `04-molecules/alert.md`,
|
|
8
|
+
* manifest 0.8.1, Figma node 6327-61558). A tinted status callout that flags a
|
|
9
|
+
* consequence or heads-up tied to what the user is doing RIGHT NOW, inside a form,
|
|
10
|
+
* step or section: switching VAT mode recalculates every invoice line, changing a
|
|
11
|
+
* customer's NIP needs a special KSeF procedure, a full-invoice storno requires
|
|
12
|
+
* ticking every line.
|
|
13
|
+
*
|
|
14
|
+
* Alert is **static** and **persistent**. The container is not interactive — there
|
|
15
|
+
* is no hover / pressed / selected state on it, no `tabIndex`, no focus ring; only
|
|
16
|
+
* the optional action row carries interaction, through its own Text Link / Button
|
|
17
|
+
* states.
|
|
18
|
+
* There is no dismiss affordance either: a user-dismissible or transient notice is
|
|
19
|
+
* a Status Bar or a Toast, not an Alert. Consequently `axes.state` has exactly one member
|
|
20
|
+
* (`Default`) and this component has NO `disabled` and NO `loading` prop.
|
|
21
|
+
*
|
|
22
|
+
* Scope boundaries (spec § Rationale — holding these apart is what stops Alert from
|
|
23
|
+
* sprawling back into the ad-hoc info boxes it replaces):
|
|
24
|
+
* FODS has no separate Message component — Alert is it, and it lives only inside
|
|
25
|
+
* content (a form, step, section or modal), never as a strip under the Nav Bar.
|
|
26
|
+
* App-level strips are Status Bar, transient action feedback is Toast, field-level
|
|
27
|
+
* validation copy lives on the field.
|
|
28
|
+
*
|
|
29
|
+
* Anatomy:
|
|
30
|
+
* - **Icon** — a leading semantic glyph, decorative (`aria-hidden`). 24px in
|
|
31
|
+
* Stacked, 20px in Inline. Stacked centres it on the content column and flips it
|
|
32
|
+
* to the top once that column is taller than four lines (manifest axis
|
|
33
|
+
* `icon-align`, 0.6.0) — automatic, never a prop; see note 8. Inline always
|
|
34
|
+
* centres it.
|
|
35
|
+
* - **Content** — the message column: an optional **title** (`Body/XS/Semibold`,
|
|
36
|
+
* Stacked only) over the **body** (`Body/XS/Regular`, wraps freely, never
|
|
37
|
+
* clipped).
|
|
38
|
+
* - **Action** — the Action slot, an ACTION ROW (manifest 0.7.0): a Strong Text
|
|
39
|
+
* Link alone (the default — xxs, 12, one step below the Body/XS copy, trailing
|
|
40
|
+
* small caret, manifest 0.6.0), or one or more Buttons (xs by default), or
|
|
41
|
+
* Buttons + one Text Link, or Buttons + one short helper text. One wrapping row,
|
|
42
|
+
* gap `--space-400`, main command first; below the body in Stacked, trailing in
|
|
43
|
+
* Inline — and Inline holds ONE action only (a Text Link or one Button).
|
|
44
|
+
*
|
|
45
|
+
* Two axes:
|
|
46
|
+
* - `status` (manifest `axes.variant`) — `info` · `success` · `warning` · `danger`,
|
|
47
|
+
* each a tinted callout with its own icon and colour set. Violet is reserved for
|
|
48
|
+
* the "Budoucí" invoice status and is NOT an Alert status.
|
|
49
|
+
* - `layout` (manifest `axes.content`) — `stacked` (the comfortable titled block)
|
|
50
|
+
* or `inline` (the compact single row). This is NOT a size axis: manifest
|
|
51
|
+
* `notes[0]` states "Alert has no size axis — its second axis is layout density",
|
|
52
|
+
* which is why the prop is `layout` and its values are not the `xs…xl` vocabulary.
|
|
53
|
+
*
|
|
54
|
+
* Token bindings (manifest `families[].states.default` and `sizes[]`):
|
|
55
|
+
* - fill `--status-X-subtle`, border `--status-X-subtle-border` at
|
|
56
|
+
* `--border-width-100`, radius `--radius-400` in both layouts
|
|
57
|
+
* - TEXT ink (title, body, action link) = `--status-X-active`, NOT
|
|
58
|
+
* `-tint-foreground`: on a light tint `-active` is the dark end of the scale
|
|
59
|
+
* (blue/800 · green/800 · orange/700 · red/900) and clears AA for body text
|
|
60
|
+
* (≈ 6.53 · 6.58 · 5.99 · 8.00 : 1). This is the callout-ink model.
|
|
61
|
+
* - ICON ink = `--status-X-solid` — a deliberate step BRIGHTER than the text ink
|
|
62
|
+
* (blue/600 · green/600 · orange/500 · red/700) so the glyph reads as the status
|
|
63
|
+
* hue. As a decorative non-text graphic it is measured against 3:1 (WCAG 1.4.11),
|
|
64
|
+
* not 4.5:1; Warning sits at 2.1:1 and is carried by the triangle SHAPE plus the
|
|
65
|
+
* adjacent text — a known upstream limitation, not a licence to recolour it.
|
|
66
|
+
* - Stacked: `px-600` / `py-500`, icon↔content gap `--space-500`
|
|
67
|
+
* - Inline: `px-500` / `py-400`, icon↔content gap `--space-400`
|
|
68
|
+
* - title↔body↔action gap `--space-200`; body type `--font-size-xs` in both
|
|
69
|
+
* layouts, action link one step DOWN at `--font-size-xxs` (manifest 0.6.0)
|
|
70
|
+
* - action row gap `--space-400`; helper text `--text-secondary` (manifest
|
|
71
|
+
* `parts.helper` — the one text that does not take the family ink)
|
|
72
|
+
*
|
|
73
|
+
* Deviations and non-obvious choices:
|
|
74
|
+
*
|
|
75
|
+
* 1. `hideIcon` IS A NEGATED BOOLEAN, on purpose. `COMPONENT-CODE-CONVENTIONS` §3
|
|
76
|
+
* forbids negated booleans, but manifest `properties[2].maps` spells the mapping
|
|
77
|
+
* out as «icon visibility (inverse of a hideIcon prop)» — and per the
|
|
78
|
+
* manifest-first authority order `properties[].maps` overrides the general
|
|
79
|
+
* convention when it is filled in. The Figma boolean is `Show icon` (default on);
|
|
80
|
+
* the inverse keeps the React default falsy, so the icon ships by default and a
|
|
81
|
+
* caller has to opt OUT explicitly. Hiding it is a real accessibility decision:
|
|
82
|
+
* with no glyph the status is carried by ink alone unless the copy names it
|
|
83
|
+
* (WCAG 1.4.1), so only hide it where the surrounding text already says which
|
|
84
|
+
* state this is.
|
|
85
|
+
* 2. THE ACTION LINK IS NOT BLUE. Per `text-link.manifest.json` →
|
|
86
|
+
* `delivery.coloredLinks`, a link inside a status container takes the CONTAINER
|
|
87
|
+
* ink: rest = that family's `--status-X-active`, hover / pressed = a `color-mix`
|
|
88
|
+
* wash in oklab toward `--text-primary` at 15% / 30%, underline always on in
|
|
89
|
+
* every state (the WCAG 1.4.1 non-colour signal). No token exists for the mixed
|
|
90
|
+
* step, so hover / pressed are written as arbitrary values — a documented
|
|
91
|
+
* manifest-mandated bypass, flagged with a `fods-lint-disable-next-line` note
|
|
92
|
+
* each, not a token shortcut.
|
|
93
|
+
*
|
|
94
|
+
* They carry an explicit `color:` DATA-TYPE HINT — `text-[color:color-mix(…)]`,
|
|
95
|
+
* not `text-[color-mix(…)]`. Tailwind v4 resolves both to a colour, but
|
|
96
|
+
* tailwind-merge (v2.6) classifies the UNHINTED form into neither `font-size`
|
|
97
|
+
* nor `text-color`, so `TextLink`'s own `hover:!text-text-link-hover` survives
|
|
98
|
+
* the merge instead of being replaced, and two equally-important rules then race
|
|
99
|
+
* on source order — the link renders link-blue on hover roughly at random. With
|
|
100
|
+
* the hint the class lands in `text-color` and the blue is dropped. This is the
|
|
101
|
+
* same class of silent-drop bug the shared `twMergeConfig` exists to prevent.
|
|
102
|
+
* 3. `!` ON THE LINK COLOURS — a consuming app may carry a global
|
|
103
|
+
* `a:not(.button) { color: var(--text-link) }` OUTSIDE any `@layer`, which beats
|
|
104
|
+
* every layered colour utility on an anchor, and `TextLink` itself emits
|
|
105
|
+
* `!text-text-link`. Overriding either needs `!`. Values stay on tokens; only
|
|
106
|
+
* the precedence is forced. See `TextLink` note 5.
|
|
107
|
+
* 4. CANONICAL ICON NAMES. The manifest names the semantic glyphs in the upstream
|
|
108
|
+
* vocabulary (`info` · `check-circle` · `warning` · `warning-circle`), and the
|
|
109
|
+
* map below uses exactly those names. `Icon` accepts canonical names only: the
|
|
110
|
+
* legacy icon-font spellings (`tick`, `danger`, `chevron-right-small`) are not an
|
|
111
|
+
* `IconName` and would render nothing.
|
|
112
|
+
* 5. `layout="inline"` IGNORES `title`. Manifest `intent.rules[2]`: «Layout=Inline
|
|
113
|
+
* forces no title (single message row)». The prop is not rejected — an Alert
|
|
114
|
+
* that switches layout responsively must keep passing the same props — it is
|
|
115
|
+
* simply not rendered, and no `title` part exists in that layout's DOM.
|
|
116
|
+
* 6. TWO SHAPES OF `action`. The manifest makes `action` a rendered node (the
|
|
117
|
+
* action row). The `{ label, href?, onClick? }` object every consumer already
|
|
118
|
+
* passes stays as the shorthand for the default content — one Strong Text Link
|
|
119
|
+
* in the container ink. A row is composed from `AlertActionLink` (the same link,
|
|
120
|
+
* ink read from the enclosing Alert), `Button` (`size="xs"`, own family colours,
|
|
121
|
+
* `showSurface` on Secondary / Tertiary / Danger outline — never recoloured) and
|
|
122
|
+
* `AlertActionHelper`. An external action (`arrow-square-out`) is composed by the
|
|
123
|
+
* caller with `TextLink` directly, which owns the `target` / `rel` contract.
|
|
124
|
+
* Inline must receive ONE node; the component does not police it.
|
|
125
|
+
* 7. THE ACTION PART IS A WRAPPER. `data-fods-part="action"` sits on the row
|
|
126
|
+
* `<div>`, not on a control: `TextLink` and `Button` write their own
|
|
127
|
+
* `data-fods-part="root"` AFTER the prop spread, so the attribute cannot be
|
|
128
|
+
* passed through. The wrapper carries the placement (below the body in Stacked,
|
|
129
|
+
* pushed right in Inline) and inherits the container ink, which is exactly the
|
|
130
|
+
* link's rest ink — so runtime measurement of the part still reads the value the
|
|
131
|
+
* manifest names.
|
|
132
|
+
* 8. ICON ALIGN IS MEASURED, NOT COUNTED. `sizes[Stacked].note` puts the flip at a
|
|
133
|
+
* content column taller than 4 × the line height + 3 × the column gap (95.2 px
|
|
134
|
+
* on today's tokens). Both inputs are read from the column's computed style, so
|
|
135
|
+
* a token change moves the threshold with it; a `ResizeObserver` re-checks on
|
|
136
|
+
* reflow, zoom and translation. The icon is decorative, so the flip is visual
|
|
137
|
+
* only. Changing the icon's alignment never changes the column's height, so the
|
|
138
|
+
* observer cannot oscillate.
|
|
139
|
+
*
|
|
140
|
+
* Semantics / a11y:
|
|
141
|
+
* - **Live region only when inserted after load** (spec § Accessibility, manifest
|
|
142
|
+
* 0.5.2 `delivery.react`): an Alert that appears in response to an input or action passes `live`
|
|
143
|
+
* and becomes a live region — Warning / Danger → `role="alert"` (assertive),
|
|
144
|
+
* Info / Success → `role="status"` (polite). An Alert already present when the
|
|
145
|
+
* page or view loads omits `live` and renders as plain content with no role, so
|
|
146
|
+
* it is not announced on every load. Whether it was inserted later is a fact
|
|
147
|
+
* about the CALLER's flow (a submit, a failed fetch), which the component cannot
|
|
148
|
+
* observe reliably — every mount in a client-rendered view happens "after load"
|
|
149
|
+
* — hence an explicit opt-in boolean rather than detection. The role itself
|
|
150
|
+
* stays DERIVED from `status`, never a prop — the severity and the announcement
|
|
151
|
+
* urgency must not be able to disagree. A live Info / Success Alert mounts its
|
|
152
|
+
* `role="status"` container WITHOUT the message (title + body) and injects it one
|
|
153
|
+
* commit later — a
|
|
154
|
+
* polite region inserted together with its text is often not announced.
|
|
155
|
+
* - The icon is decorative (`Icon` already renders `aria-hidden="true"`); meaning
|
|
156
|
+
* is carried by icon + text together, never colour alone.
|
|
157
|
+
* - The container takes no focus: no `tabIndex`, no `role="button"`, no ring. Every
|
|
158
|
+
* item in the action row that acts is a real Text Link or Button with its own
|
|
159
|
+
* focus ring; DOM order = visual order, main command first. Helper text is plain,
|
|
160
|
+
* unfocusable text.
|
|
161
|
+
*
|
|
162
|
+
* Motion (manifest 0.8.1 `motion`) — only for an Alert added or removed after load,
|
|
163
|
+
* which is exactly what `live` declares:
|
|
164
|
+
* - A `live` Alert mounted by a client render is wrapped in a room that opens on
|
|
165
|
+
* `--spring-gentle` (height) while the Alert fades in over `--duration-slow` +
|
|
166
|
+
* `--easing-enter`. A `live` Alert in the server render or the hydration render of its
|
|
167
|
+
* root shows at once, and every Alert without `live` renders as it always did — no
|
|
168
|
+
* wrapper, no motion.
|
|
169
|
+
* - Removal animates when the caller unmounts the `live` Alert inside
|
|
170
|
+
* `AnimatePresence`: the Alert fades out over `--duration-fast` + `--easing-exit`
|
|
171
|
+
* FIRST, then the room closes on `--spring-gentle`, so the siblings below never chase
|
|
172
|
+
* a still-visible notice. Without `AnimatePresence` it unmounts at once.
|
|
173
|
+
* - The room clips its bottom edge only while it moves (`ROOM_BOTTOM_CLIP`), so the
|
|
174
|
+
* action row's focus rings are never cut.
|
|
175
|
+
* - Reduced motion: no room animation — the room opens and closes at once and the
|
|
176
|
+
* Alert keeps an opacity-only fade (manifest `reducedMotion`).
|
|
177
|
+
*/
|
|
178
|
+
declare const alertVariants: import("tailwind-variants").TVReturnType<{
|
|
179
|
+
status: {
|
|
180
|
+
info: {
|
|
181
|
+
root: string;
|
|
182
|
+
icon: string;
|
|
183
|
+
actionLink: string[];
|
|
184
|
+
};
|
|
185
|
+
success: {
|
|
186
|
+
root: string;
|
|
187
|
+
icon: string;
|
|
188
|
+
actionLink: string[];
|
|
189
|
+
};
|
|
190
|
+
warning: {
|
|
191
|
+
root: string;
|
|
192
|
+
icon: string;
|
|
193
|
+
actionLink: string[];
|
|
194
|
+
};
|
|
195
|
+
danger: {
|
|
196
|
+
root: string;
|
|
197
|
+
icon: string;
|
|
198
|
+
actionLink: string[];
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
layout: {
|
|
202
|
+
/**
|
|
203
|
+
* Titled block: the icon is CENTRED on the content column (manifest 0.6.0;
|
|
204
|
+
* `iconAlign` flips it to the top for tall content), and the action row sits
|
|
205
|
+
* under the body. `self-start` keeps the row hugging its items — a
|
|
206
|
+
* flex-column child would otherwise stretch across the whole callout and give
|
|
207
|
+
* a lone link a full-width hit area.
|
|
208
|
+
*/
|
|
209
|
+
stacked: {
|
|
210
|
+
root: string;
|
|
211
|
+
action: string;
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* Single row: the icon is vertically centred, the body may wrap, and the
|
|
215
|
+
* action is pushed to the trailing edge. `ml-auto` (not `justify-between`)
|
|
216
|
+
* so that with no action the body still sits directly beside the icon.
|
|
217
|
+
*/
|
|
218
|
+
inline: {
|
|
219
|
+
root: string;
|
|
220
|
+
action: string;
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
/** Manifest axis `icon-align` — Stacked only, set by measurement (JSDoc note 8). */
|
|
224
|
+
iconAlign: {
|
|
225
|
+
center: {};
|
|
226
|
+
top: {
|
|
227
|
+
icon: string;
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
}, {
|
|
231
|
+
root: string;
|
|
232
|
+
icon: string;
|
|
233
|
+
content: string;
|
|
234
|
+
title: string;
|
|
235
|
+
body: string;
|
|
236
|
+
action: string;
|
|
237
|
+
actionLink: string;
|
|
238
|
+
helper: string;
|
|
239
|
+
}, undefined, undefined, undefined, undefined>;
|
|
240
|
+
export type AlertStatus = 'info' | 'success' | 'warning' | 'danger';
|
|
241
|
+
export type AlertLayout = 'stacked' | 'inline';
|
|
242
|
+
export type AlertIconAlign = 'center' | 'top';
|
|
243
|
+
/**
|
|
244
|
+
* The semantic leading glyph per status (manifest `slots.icon.default` + note),
|
|
245
|
+
* in the canonical FODS icon vocabulary — see JSDoc note 4.
|
|
246
|
+
*/
|
|
247
|
+
export declare const ALERT_STATUS_ICONS: Record<AlertStatus, IconName>;
|
|
248
|
+
/** Shorthand for the default Action slot content: one Strong Text Link. */
|
|
249
|
+
export interface AlertAction {
|
|
250
|
+
/** Verb-first label naming its object, no trailing punctuation — the caret is the affordance. */
|
|
251
|
+
label: React.ReactNode;
|
|
252
|
+
/** Navigation target. Omit for an in-page action: `TextLink` then renders a `<button>`. */
|
|
253
|
+
href?: string;
|
|
254
|
+
/**
|
|
255
|
+
* In-page handler. Typed on `HTMLAnchorElement` because that is `TextLink`'s
|
|
256
|
+
* public `onClick` signature; on the no-`href` branch the runtime target is the
|
|
257
|
+
* `<button>` the link renders.
|
|
258
|
+
*/
|
|
259
|
+
onClick?: React.MouseEventHandler<HTMLAnchorElement>;
|
|
260
|
+
}
|
|
261
|
+
export interface AlertProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title' | 'children' | 'role'>, Omit<VariantProps<typeof alertVariants>, 'iconAlign'> {
|
|
262
|
+
/** Colour family + default icon. */
|
|
263
|
+
status?: AlertStatus;
|
|
264
|
+
/**
|
|
265
|
+
* Density arrangement, NOT a size: `stacked` is the titled block, `inline` the
|
|
266
|
+
* compact single row. See JSDoc — Alert has no size axis.
|
|
267
|
+
*/
|
|
268
|
+
layout?: AlertLayout;
|
|
269
|
+
/**
|
|
270
|
+
* Drops the leading glyph. Negated on purpose (manifest `properties[2].maps`) —
|
|
271
|
+
* see JSDoc note 1. Only hide it where the copy already names the status.
|
|
272
|
+
*/
|
|
273
|
+
hideIcon?: boolean;
|
|
274
|
+
/** Overrides the semantic default from `ALERT_STATUS_ICONS`. */
|
|
275
|
+
icon?: IconName;
|
|
276
|
+
/**
|
|
277
|
+
* Short noun phrase, sentence case, no end period. **Stacked only** — it is
|
|
278
|
+
* ignored in `layout="inline"` (manifest `intent.rules[2]`).
|
|
279
|
+
*/
|
|
280
|
+
title?: React.ReactNode;
|
|
281
|
+
/** The message. Wraps freely, never truncated. */
|
|
282
|
+
children: React.ReactNode;
|
|
283
|
+
/**
|
|
284
|
+
* The Action slot. An `AlertAction` object renders the default content — one
|
|
285
|
+
* Strong Text Link in the container ink. A node renders as the action row:
|
|
286
|
+
* `AlertActionLink`, `Button size="xs"` and `AlertActionHelper`, main command
|
|
287
|
+
* first. `layout="inline"` takes ONE action only. See JSDoc note 6.
|
|
288
|
+
*/
|
|
289
|
+
action?: AlertAction | React.ReactNode;
|
|
290
|
+
/**
|
|
291
|
+
* The Alert is inserted AFTER page load, in response to an input or action
|
|
292
|
+
* (a validation error on submit, a failed request). Makes it a live region
|
|
293
|
+
* with the role derived from `status` — `alert` for warning / danger, `status`
|
|
294
|
+
* for info / success. Leave it off for an Alert present on load: that one is
|
|
295
|
+
* plain content and is not announced. Spec § Accessibility.
|
|
296
|
+
*/
|
|
297
|
+
live?: boolean;
|
|
298
|
+
}
|
|
299
|
+
declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
300
|
+
export type AlertActionLinkProps = Omit<TextLinkProps, 'variant' | 'size' | 'trailingIcon' | 'surface'>;
|
|
301
|
+
/**
|
|
302
|
+
* The Strong Text Link of the Action slot — xxs, trailing small caret, in the
|
|
303
|
+
* enclosing Alert's container ink (`text-link.manifest.json` →
|
|
304
|
+
* `delivery.coloredLinks.byFamily[status]`). Use it inside a composed `action` row;
|
|
305
|
+
* the `AlertAction` shorthand renders the same link.
|
|
306
|
+
*/
|
|
307
|
+
declare const AlertActionLink: React.ForwardRefExoticComponent<AlertActionLinkProps & React.RefAttributes<TextLinkElement>>;
|
|
308
|
+
/**
|
|
309
|
+
* Short helper text after the Buttons of a Stacked action row — Body/XS in
|
|
310
|
+
* `--text-secondary`, not the status ink (manifest `parts.helper`). Not a link,
|
|
311
|
+
* not focusable.
|
|
312
|
+
*/
|
|
313
|
+
declare const AlertActionHelper: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
|
|
314
|
+
export { Alert, AlertActionHelper, AlertActionLink, alertVariants };
|