@payfit/unity-components 1.2.0 → 2.1.4
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/dist/esm/components/action-bar/ActionBar.js +14 -14
- package/dist/esm/components/actionable/Actionable.js +31 -28
- package/dist/esm/components/alert/Alert.js +41 -29
- package/dist/esm/components/alert/parts/AlertTitle.js +8 -8
- package/dist/esm/components/app-layout/AppLayout.d.ts +2 -0
- package/dist/esm/components/app-layout/AppLayout.js +17 -17
- package/dist/esm/components/app-menu/parts/AppMenuFooter.js +23 -23
- package/dist/esm/components/app-menu/parts/AppMenuHeader.d.ts +87 -5
- package/dist/esm/components/app-menu/parts/AppMenuHeader.js +25 -25
- package/dist/esm/components/autocomplete/Autocomplete.d.ts +0 -9
- package/dist/esm/components/autocomplete/Autocomplete.js +54 -57
- package/dist/esm/components/autocomplete/parts/AutocompleteItem.js +8 -8
- package/dist/esm/components/avatar/Avatar.variants.js +1 -1
- package/dist/esm/components/avatar/parts/AvatarFallback.js +26 -27
- package/dist/esm/components/badge/Badge.js +1 -1
- package/dist/esm/components/breadcrumbs/Breadcrumbs.context.js +3 -3
- package/dist/esm/components/breadcrumbs/Breadcrumbs.d.ts +19 -11
- package/dist/esm/components/breadcrumbs/Breadcrumbs.js +29 -18
- package/dist/esm/components/breadcrumbs/Breadcrumbs.variant.js +1 -1
- package/dist/esm/components/breadcrumbs/parts/Breadcrumb.d.ts +30 -5
- package/dist/esm/components/breadcrumbs/parts/Breadcrumb.js +35 -27
- package/dist/esm/components/breadcrumbs/parts/RawBreadcrumbLink.d.ts +37 -0
- package/dist/esm/components/breadcrumbs/parts/RawBreadcrumbLink.js +36 -0
- package/dist/esm/components/button/Button.js +6 -6
- package/dist/esm/components/button/Button.variants.d.ts +1 -0
- package/dist/esm/components/button/Button.variants.js +22 -15
- package/dist/esm/components/card/Card.context.d.ts +5 -0
- package/dist/esm/components/card/Card.context.js +14 -0
- package/dist/esm/components/card/Card.d.ts +210 -0
- package/dist/esm/components/card/Card.js +93 -0
- package/dist/esm/components/card/parts/CardContent.d.ts +37 -0
- package/dist/esm/components/card/parts/CardContent.js +8 -0
- package/dist/esm/components/card/parts/CardTitle.d.ts +55 -0
- package/dist/esm/components/card/parts/CardTitle.js +33 -0
- package/dist/esm/components/checkbox/Checkbox.js +38 -30
- package/dist/esm/components/checkbox/Checkbox.variants.d.ts +9 -9
- package/dist/esm/components/checkbox/Checkbox.variants.js +23 -7
- package/dist/esm/components/checkbox/TanstackCheckbox.d.ts +28 -0
- package/dist/esm/components/checkbox/TanstackCheckbox.js +51 -0
- package/dist/esm/components/checkbox/parts/CheckboxIndicator.js +7 -7
- package/dist/esm/components/checkbox-field/CheckboxField.d.ts +2 -0
- package/dist/esm/components/checkbox-field/TanstackCheckboxField.d.ts +14 -0
- package/dist/esm/components/checkbox-field/TanstackCheckboxField.js +40 -0
- package/dist/esm/components/checkbox-group/TanstackCheckboxGroup.d.ts +4 -0
- package/dist/esm/components/checkbox-group/TanstackCheckboxGroup.js +37 -0
- package/dist/esm/components/checkbox-group-field/CheckboxGroupField.d.ts +2 -0
- package/dist/esm/components/checkbox-group-field/TanstackCheckGroupField.d.ts +72 -0
- package/dist/esm/components/checkbox-group-field/TanstackCheckGroupField.js +40 -0
- package/dist/esm/components/client-side-pagination/ClientSidePagination.d.ts +103 -0
- package/dist/esm/components/client-side-pagination/ClientSidePagination.js +177 -0
- package/dist/esm/components/client-side-pagination/parts/PaginationEllipsis.d.ts +11 -0
- package/dist/esm/components/client-side-pagination/parts/PaginationEllipsis.js +30 -0
- package/dist/esm/components/client-side-pagination/parts/PaginationJumpDialog.d.ts +8 -0
- package/dist/esm/components/{pagination → client-side-pagination}/parts/PaginationNavButton.js +1 -1
- package/dist/esm/components/{pagination/parts/PaginationLink.d.ts → client-side-pagination/parts/RawPaginationLink.d.ts} +2 -2
- package/dist/esm/components/{pagination/parts/PaginationLink.js → client-side-pagination/parts/RawPaginationLink.js} +12 -12
- package/dist/esm/components/client-side-pagination/utils/pagination-window.d.ts +8 -0
- package/dist/esm/components/client-side-pagination/utils/pagination-window.js +33 -0
- package/dist/esm/components/collapsible/parts/CollapsibleContent.js +5 -5
- package/dist/esm/components/collapsible/parts/CollapsibleTitle.js +8 -8
- package/dist/esm/components/data-table/DataTable.d.ts +109 -16
- package/dist/esm/components/data-table/DataTable.js +107 -93
- package/dist/esm/components/data-table/mocks/employee-data.d.ts +1 -0
- package/dist/esm/components/date-calendar/DateCalendar.js +1 -1
- package/dist/esm/components/date-calendar/parts/DateSegmentSelect.js +1 -1
- package/dist/esm/components/date-picker/DatePicker.d.ts +1 -1
- package/dist/esm/components/date-picker/DatePicker.js +59 -50
- package/dist/esm/components/date-picker/TanstackDatePicker.d.ts +22 -0
- package/dist/esm/components/date-picker/TanstackDatePicker.js +53 -0
- package/dist/esm/components/date-picker/parts/DateInput.js +4 -4
- package/dist/esm/components/date-picker-field/DatePickerField.d.ts +2 -0
- package/dist/esm/components/date-picker-field/TanstackDatePickerField.d.ts +71 -0
- package/dist/esm/components/date-picker-field/TanstackDatePickerField.js +41 -0
- package/dist/esm/components/definition-list/DefinitionList.context.d.ts +19 -0
- package/dist/esm/components/definition-list/DefinitionList.d.ts +24 -0
- package/dist/esm/components/definition-list/parts/DefinitionItem.d.ts +25 -0
- package/dist/esm/components/dialog/Dialog.d.ts +34 -22
- package/dist/esm/components/dialog/Dialog.js +90 -52
- package/dist/esm/components/dialog/parts/DialogActions.js +6 -6
- package/dist/esm/components/dialog/parts/DialogTitle.js +7 -4
- package/dist/esm/components/dialog/test-utils.d.ts +28 -0
- package/dist/esm/components/dialog/test-utils.js +78 -0
- package/dist/esm/components/error-state/ErrorState.d.ts +13 -1
- package/dist/esm/components/error-state/ErrorState.js +133 -92
- package/dist/esm/components/error-state/initConfig.js +1 -1
- package/dist/esm/components/fieldset/Fieldset.d.ts +19 -0
- package/dist/esm/components/fieldset/Fieldset.js +32 -26
- package/dist/esm/components/filter/Filter.controls.d.ts +192 -0
- package/dist/esm/components/filter/Filter.controls.js +45 -0
- package/dist/esm/components/filter/Filter.d.ts +189 -0
- package/dist/esm/components/filter/Filter.js +147 -0
- package/dist/esm/components/filter/Filter.types.d.ts +121 -0
- package/dist/esm/components/filter/hooks/useFilterIds.d.ts +49 -0
- package/dist/esm/components/filter/hooks/useFilterIds.js +13 -0
- package/dist/esm/components/filter/hooks/useFilterState.d.ts +74 -0
- package/dist/esm/components/filter/hooks/useFilterState.js +23 -0
- package/dist/esm/components/filter/hooks/useFilterValue.d.ts +61 -0
- package/dist/esm/components/filter/hooks/useFilterValue.js +31 -0
- package/dist/esm/components/filter/parts/FilterButton.d.ts +75 -0
- package/dist/esm/components/filter/parts/FilterButton.js +55 -0
- package/dist/esm/components/filter/parts/FilterLabel.d.ts +96 -0
- package/dist/esm/components/filter/parts/FilterLabel.js +57 -0
- package/dist/esm/components/filter/parts/FilterPopover.d.ts +95 -0
- package/dist/esm/components/filter/parts/FilterPopover.js +79 -0
- package/dist/esm/components/filter/utils/value-formatters.d.ts +62 -0
- package/dist/esm/components/filter/utils/value-formatters.js +14 -0
- package/dist/esm/components/filter-toolbar/FilterToolbar.d.ts +110 -0
- package/dist/esm/components/filter-toolbar/FilterToolbar.js +172 -0
- package/dist/esm/components/filter-toolbar/FilterToolbar.types.d.ts +119 -0
- package/dist/esm/components/filter-toolbar/hooks/use-filter-toolbar-state.d.ts +96 -0
- package/dist/esm/components/filter-toolbar/hooks/use-filter-toolbar-state.js +132 -0
- package/dist/esm/components/filter-toolbar/parts/AddFilter.d.ts +63 -0
- package/dist/esm/components/filter-toolbar/parts/AddFilter.js +107 -0
- package/dist/esm/components/filter-toolbar/parts/AddFilterItem.d.ts +18 -0
- package/dist/esm/components/filter-toolbar/parts/AddFilterItem.js +18 -0
- package/dist/esm/components/filter-toolbar/utils/filter-adapters.d.ts +93 -0
- package/dist/esm/components/filter-toolbar/utils/filter-adapters.js +88 -0
- package/dist/esm/components/filter-toolbar/utils/normalize-filter-value.d.ts +24 -0
- package/dist/esm/components/filter-toolbar/utils/normalize-filter-value.js +19 -0
- package/dist/esm/components/flex/Flex.js +52 -37
- package/dist/esm/components/form/Form.d.ts +2 -0
- package/dist/esm/components/form/TanstackForm.d.ts +24 -0
- package/dist/esm/components/form/TanstackForm.js +29 -0
- package/dist/esm/components/form-field/FormField.d.ts +2 -0
- package/dist/esm/components/form-field/FormField.js +12 -12
- package/dist/esm/components/form-field/TanstackFormField.context.d.ts +10 -0
- package/dist/esm/components/form-field/TanstackFormField.context.js +14 -0
- package/dist/esm/components/form-field/TanstackFormField.d.ts +49 -0
- package/dist/esm/components/form-field/TanstackFormField.js +46 -0
- package/dist/esm/components/form-field/parts/FormControl.d.ts +2 -0
- package/dist/esm/components/form-field/parts/FormFeedbackText.d.ts +2 -0
- package/dist/esm/components/form-field/parts/FormHelperText.d.ts +2 -0
- package/dist/esm/components/form-field/parts/FormLabel.d.ts +2 -0
- package/dist/esm/components/form-field/parts/RawFormContextualLink.d.ts +22 -0
- package/dist/esm/components/form-field/parts/RawFormContextualLink.js +39 -0
- package/dist/esm/components/form-field/parts/TanstackFormFeedbackText.d.ts +12 -0
- package/dist/esm/components/form-field/parts/TanstackFormFeedbackText.js +32 -0
- package/dist/esm/components/form-field/parts/TanstackFormHelperText.d.ts +11 -0
- package/dist/esm/components/form-field/parts/TanstackFormHelperText.js +25 -0
- package/dist/esm/components/form-field/parts/TanstackFormLabel.d.ts +8 -0
- package/dist/esm/components/form-field/parts/TanstackFormLabel.js +26 -0
- package/dist/esm/components/form-field/parts/TanstackRawFormContextualLink.d.ts +26 -0
- package/dist/esm/components/form-field/parts/TanstackRawFormContextualLink.js +45 -0
- package/dist/esm/components/funnel-layout/parts/FunnelSidebar.d.ts +2 -2
- package/dist/esm/components/icon/Icon.js +23 -19
- package/dist/esm/components/icon-button/CircularIconButton.d.ts +9 -9
- package/dist/esm/components/icon-button/CircularIconButton.js +53 -36
- package/dist/esm/components/icon-button/IconButton.variants.d.ts +1 -0
- package/dist/esm/components/icon-button/IconButton.variants.js +44 -28
- package/dist/esm/components/input/Input.js +36 -35
- package/dist/esm/components/input/TanstackInput.d.ts +22 -0
- package/dist/esm/components/input/TanstackInput.js +38 -0
- package/dist/esm/components/label/Label.js +12 -12
- package/dist/esm/components/link/{Link.variants.d.ts → RawLink.d.ts} +92 -0
- package/dist/esm/components/link/{Link.variants.js → RawLink.js} +78 -5
- package/dist/esm/components/list-view/ListView.d.ts +56 -0
- package/dist/esm/components/list-view/ListView.fixtures.d.ts +20 -0
- package/dist/esm/components/list-view/ListView.js +44 -0
- package/dist/esm/components/list-view/parts/ListViewItemLabel.d.ts +34 -0
- package/dist/esm/components/list-view/parts/ListViewItemLabel.js +22 -0
- package/dist/esm/components/list-view/parts/ListViewItemText.d.ts +33 -0
- package/dist/esm/components/list-view/parts/ListViewItemText.js +22 -0
- package/dist/esm/components/list-view/parts/ListViewSection.d.ts +14 -0
- package/dist/esm/components/list-view/parts/ListViewSection.js +21 -0
- package/dist/esm/components/list-view/parts/RawListViewItem.d.ts +102 -0
- package/dist/esm/components/list-view/parts/RawListViewItem.js +80 -0
- package/dist/esm/components/menu/parts/{MenuItem.d.ts → RawMenuItem.d.ts} +3 -4
- package/dist/esm/components/menu/parts/{MenuItem.js → RawMenuItem.js} +9 -9
- package/dist/esm/components/multi-select/MultiSelect.d.ts +5 -7
- package/dist/esm/components/multi-select/MultiSelect.js +199 -176
- package/dist/esm/components/multi-select/MultiselectTypes.d.ts +114 -0
- package/dist/esm/components/multi-select/TanstackMultiSelect.d.ts +7 -0
- package/dist/esm/components/multi-select/TanstackMultiSelect.js +41 -0
- package/dist/esm/components/multi-select/parts/MultiSelectButton.d.ts +2 -0
- package/dist/esm/components/multi-select/parts/MultiSelectButton.js +62 -46
- package/dist/esm/components/multi-select/parts/MultiSelectPopover.js +15 -15
- package/dist/esm/components/multi-select-field/MultiSelectField.d.ts +45 -12
- package/dist/esm/components/multi-select-field/MultiSelectField.js +56 -66
- package/dist/esm/components/multi-select-field/TanstackMultiSelectField.d.ts +92 -0
- package/dist/esm/components/multi-select-field/TanstackMultiSelectField.js +48 -0
- package/dist/esm/components/multi-select-field/test-utils.d.ts +17 -0
- package/dist/esm/components/multi-select-field/test-utils.js +45 -0
- package/dist/esm/components/nav/parts/NavGroup.d.ts +3 -3
- package/dist/esm/components/nav/parts/NavGroup.js +62 -51
- package/dist/esm/components/nav/parts/{NavItem.d.ts → RawNavItem.d.ts} +102 -5
- package/dist/esm/components/nav/parts/RawNavItem.js +106 -0
- package/dist/esm/components/navigation-card/NavigationCard.context.d.ts +31 -0
- package/dist/esm/components/navigation-card/NavigationCard.context.js +13 -0
- package/dist/esm/components/navigation-card/NavigationCard.d.ts +46 -0
- package/dist/esm/components/navigation-card/NavigationCard.js +62 -0
- package/dist/esm/components/navigation-card/NavigationCard.types.d.ts +37 -0
- package/dist/esm/components/navigation-card/NavigationCard.variants.d.ts +1147 -0
- package/dist/esm/components/navigation-card/NavigationCard.variants.js +164 -0
- package/dist/esm/components/navigation-card/parts/NavigationCardDescription.d.ts +39 -0
- package/dist/esm/components/navigation-card/parts/NavigationCardDescription.js +22 -0
- package/dist/esm/components/navigation-card/parts/NavigationCardGroup.d.ts +146 -0
- package/dist/esm/components/navigation-card/parts/NavigationCardGroup.js +93 -0
- package/dist/esm/components/navigation-card/parts/NavigationCardLabel.d.ts +32 -0
- package/dist/esm/components/navigation-card/parts/NavigationCardLabel.js +24 -0
- package/dist/esm/components/number-field/NumberField.d.ts +2 -0
- package/dist/esm/components/number-field/TanstackNumberField.d.ts +74 -0
- package/dist/esm/components/number-field/TanstackNumberField.js +44 -0
- package/dist/esm/components/number-input/NumberInput.js +31 -29
- package/dist/esm/components/number-input/TanstackNumberInput.d.ts +58 -0
- package/dist/esm/components/number-input/TanstackNumberInput.js +38 -0
- package/dist/esm/components/page/Page.js +13 -12
- package/dist/esm/components/page/parts/PageHeader.d.ts +79 -9
- package/dist/esm/components/page/parts/PageHeader.js +22 -20
- package/dist/esm/components/pagination/Pagination.d.ts +23 -44
- package/dist/esm/components/pagination/Pagination.js +89 -163
- package/dist/esm/components/pagination/PaginationContext.d.ts +11 -0
- package/dist/esm/components/pagination/PaginationContext.js +15 -0
- package/dist/esm/components/pagination/hooks/use-pagination-state.d.ts +63 -0
- package/dist/esm/components/pagination/hooks/use-pagination-state.js +27 -0
- package/dist/esm/components/pagination/hooks/use-pagination-window.d.ts +64 -0
- package/dist/esm/components/pagination/hooks/use-pagination-window.js +15 -0
- package/dist/esm/components/pagination/parts/PaginationContent.d.ts +30 -0
- package/dist/esm/components/pagination/parts/PaginationContent.js +37 -0
- package/dist/esm/components/pagination/parts/PaginationEllipsis.d.ts +23 -4
- package/dist/esm/components/pagination/parts/PaginationEllipsis.js +20 -16
- package/dist/esm/components/pagination/parts/PaginationItem.d.ts +38 -0
- package/dist/esm/components/pagination/parts/PaginationItem.js +22 -0
- package/dist/esm/components/pagination/parts/RawPaginationLink.d.ts +11 -0
- package/dist/esm/components/pagination/parts/RawPaginationLink.js +60 -0
- package/dist/esm/components/pagination/parts/RawPaginationNext.d.ts +22 -0
- package/dist/esm/components/pagination/parts/RawPaginationNext.js +70 -0
- package/dist/esm/components/pagination/parts/RawPaginationPrevious.d.ts +22 -0
- package/dist/esm/components/pagination/parts/RawPaginationPrevious.js +67 -0
- package/dist/esm/components/pagination/utils/pagination-window.js +29 -20
- package/dist/esm/components/payfit-brand/PayFitBrand.d.ts +4 -0
- package/dist/esm/components/payfit-brand/PayFitBrand.js +30 -22
- package/dist/esm/components/payfit-brand/PayFitPreprod.js +25 -25
- package/dist/esm/components/phone-number/PhoneNumberInput.d.ts +67 -0
- package/dist/esm/components/phone-number/PhoneNumberInput.js +322 -0
- package/dist/esm/components/phone-number/TanstackPhoneNumberInput.d.ts +64 -0
- package/dist/esm/components/phone-number/TanstackPhoneNumberInput.js +33 -0
- package/dist/esm/components/phone-number/parts/PhoneNumberItem.d.ts +42 -0
- package/dist/esm/components/phone-number/parts/PhoneNumberItem.js +68 -0
- package/dist/esm/components/phone-number/unknownFlag.svg.js +4 -0
- package/dist/esm/components/phone-number-field/TanstackPhoneNumberField.d.ts +15 -0
- package/dist/esm/components/phone-number-field/TanstackPhoneNumberField.js +32 -0
- package/dist/esm/components/pill/Pill.d.ts +2 -2
- package/dist/esm/components/pill/Pill.js +8 -8
- package/dist/esm/components/popover/Popover.js +6 -6
- package/dist/esm/components/promo-dialog/PromoDialog.d.ts +149 -0
- package/dist/esm/components/promo-dialog/PromoDialog.js +219 -0
- package/dist/esm/components/promo-dialog/parts/PromoDialogActions.d.ts +44 -0
- package/dist/esm/components/promo-dialog/parts/PromoDialogActions.js +29 -0
- package/dist/esm/components/promo-dialog/parts/PromoDialogContent.d.ts +43 -0
- package/dist/esm/components/promo-dialog/parts/PromoDialogContent.js +20 -0
- package/dist/esm/components/promo-dialog/parts/PromoDialogHero.d.ts +47 -0
- package/dist/esm/components/promo-dialog/parts/PromoDialogHero.js +25 -0
- package/dist/esm/components/promo-dialog/parts/PromoDialogSubtitle.d.ts +53 -0
- package/dist/esm/components/promo-dialog/parts/PromoDialogSubtitle.js +21 -0
- package/dist/esm/components/promo-dialog/parts/PromoDialogTitle.d.ts +6 -0
- package/dist/esm/components/promo-dialog/parts/PromoDialogTitle.js +18 -0
- package/dist/esm/components/radio-button-group/TanstackRadioButtonGroup.d.ts +13 -0
- package/dist/esm/components/radio-button-group/TanstackRadioButtonGroup.js +43 -0
- package/dist/esm/components/radio-button-group/parts/RadioButton.d.ts +29 -11
- package/dist/esm/components/radio-button-group/parts/RadioButton.js +53 -51
- package/dist/esm/components/radio-button-group-field/RadioButtonGroupField.d.ts +2 -0
- package/dist/esm/components/radio-button-group-field/TanstackRadioButtonGroupField.d.ts +13 -0
- package/dist/esm/components/radio-button-group-field/TanstackRadioButtonGroupField.js +38 -0
- package/dist/esm/components/search/Search.js +46 -46
- package/dist/esm/components/segmented-button-group/parts/ToggleButton.js +5 -5
- package/dist/esm/components/select/Select.d.ts +5 -4
- package/dist/esm/components/select/Select.js +79 -53
- package/dist/esm/components/select/TanstackSelect.d.ts +80 -0
- package/dist/esm/components/select/TanstackSelect.js +34 -0
- package/dist/esm/components/select/parts/SearchInput.d.ts +4 -1
- package/dist/esm/components/select/parts/SearchInput.js +49 -31
- package/dist/esm/components/select/parts/SelectButton.js +19 -17
- package/dist/esm/components/select/parts/SelectOption.js +9 -9
- package/dist/esm/components/select-field/SelectField.d.ts +2 -0
- package/dist/esm/components/select-field/SelectField.js +8 -9
- package/dist/esm/components/select-field/TanstackSelectField.d.ts +124 -0
- package/dist/esm/components/select-field/TanstackSelectField.js +44 -0
- package/dist/esm/components/select-list/SelectList.d.ts +95 -0
- package/dist/esm/components/select-list/SelectList.js +79 -0
- package/dist/esm/components/select-list/SelectList.types.d.ts +29 -0
- package/dist/esm/components/select-list/constants.d.ts +36 -0
- package/dist/esm/components/select-list/constants.js +29 -0
- package/dist/esm/components/select-list/helpers.d.ts +42 -0
- package/dist/esm/components/select-list/helpers.js +48 -0
- package/dist/esm/components/select-list/hooks/useControlledSelection.d.ts +23 -0
- package/dist/esm/components/select-list/hooks/useControlledSelection.js +16 -0
- package/dist/esm/components/select-list/hooks/useSelectedFirstSorting.d.ts +23 -0
- package/dist/esm/components/select-list/hooks/useSelectedFirstSorting.js +31 -0
- package/dist/esm/components/select-list/parts/SelectListEmptyState.d.ts +8 -0
- package/dist/esm/components/select-list/parts/SelectListEmptyState.js +25 -0
- package/dist/esm/components/select-list/parts/SelectListOptGroup.d.ts +118 -0
- package/dist/esm/components/select-list/parts/SelectListOptGroup.js +28 -0
- package/dist/esm/components/select-list/parts/SelectListOption.d.ts +24 -0
- package/dist/esm/components/select-list/parts/SelectListOption.js +72 -0
- package/dist/esm/components/select-list/parts/SelectListSearchInput.d.ts +2 -0
- package/dist/esm/components/select-list/parts/SelectListSearchInput.js +43 -0
- package/dist/esm/components/select-list/parts/SelectedItemsSection.d.ts +54 -0
- package/dist/esm/components/select-list/parts/SelectedItemsSection.js +35 -0
- package/dist/esm/components/select-list/utils/partition.d.ts +13 -0
- package/dist/esm/components/select-list/utils/partition.js +9 -0
- package/dist/esm/components/selectable-button-group/SelectableButtonGroup.context.d.ts +1 -5
- package/dist/esm/components/selectable-button-group/SelectableButtonGroup.d.ts +6 -1
- package/dist/esm/components/selectable-button-group/SelectableButtonGroup.js +23 -23
- package/dist/esm/components/selectable-button-group/TanstackSelectableButtonGroup.d.ts +27 -0
- package/dist/esm/components/selectable-button-group/TanstackSelectableButtonGroup.js +34 -0
- package/dist/esm/components/selectable-button-group/parts/SelectableButton.d.ts +1 -16
- package/dist/esm/components/selectable-button-group/parts/SelectableButton.js +56 -57
- package/dist/esm/components/selectable-button-group-field/SelectableButtonGroupField.d.ts +2 -0
- package/dist/esm/components/selectable-button-group-field/TanstackSelectableButtonGroupField.d.ts +81 -0
- package/dist/esm/components/selectable-button-group-field/TanstackSelectableButtonGroupField.js +47 -0
- package/dist/esm/components/selectable-card/internals/Description.js +1 -1
- package/dist/esm/components/selectable-card/selectable-card-checkbox-group/SelectableCardCheckboxGroup.js +1 -1
- package/dist/esm/components/selectable-card/selectable-card-checkbox-group/TanstackSelectableCardCheckboxGroup.d.ts +26 -0
- package/dist/esm/components/selectable-card/selectable-card-checkbox-group/TanstackSelectableCardCheckboxGroup.js +32 -0
- package/dist/esm/components/selectable-card/selectable-card-checkbox-group/parts/SelectableCardCheckbox.js +24 -24
- package/dist/esm/components/selectable-card/selectable-card-radio-group/SelectableCardRadioGroup.d.ts +2 -0
- package/dist/esm/components/selectable-card/selectable-card-radio-group/SelectableCardRadioGroup.js +12 -14
- package/dist/esm/components/selectable-card/selectable-card-radio-group/TanstackSelectableCardRadioGroup.d.ts +28 -0
- package/dist/esm/components/selectable-card/selectable-card-radio-group/TanstackSelectableCardRadioGroup.js +32 -0
- package/dist/esm/components/selectable-card/selectable-card-radio-group/parts/RadioIndicator.js +14 -13
- package/dist/esm/components/selectable-card/selectable-card-radio-group/parts/SelectableCardRadio.js +27 -25
- package/dist/esm/components/selectable-card/selectableCard.variant.js +5 -5
- package/dist/esm/components/selectable-card-checkbox-group-field/SelectableCardCheckboxGroupField.d.ts +2 -0
- package/dist/esm/components/selectable-card-checkbox-group-field/TanstackSelectableCardCheckboxGroupField.d.ts +10 -0
- package/dist/esm/components/selectable-card-checkbox-group-field/TanstackSelectableCardCheckboxGroupField.js +38 -0
- package/dist/esm/components/selectable-card-radio-group-field/SelectableCardRadioGroupField.d.ts +2 -0
- package/dist/esm/components/selectable-card-radio-group-field/TanstackSelectableCardRadioGroupField.d.ts +10 -0
- package/dist/esm/components/selectable-card-radio-group-field/TanstackSelectableCardRadioGroupField.js +38 -0
- package/dist/esm/components/skip-links/SkipLinks.js +1 -1
- package/dist/esm/components/table/Table.context.d.ts +5 -0
- package/dist/esm/components/table/Table.context.js +14 -13
- package/dist/esm/components/table/Table.d.ts +94 -0
- package/dist/esm/components/table/Table.js +145 -108
- package/dist/esm/components/table/hooks/useTableKeyboardNavigation.js +6 -6
- package/dist/esm/components/table/parts/TableBody.js +83 -21
- package/dist/esm/components/table/parts/TableCell.js +29 -26
- package/dist/esm/components/table/parts/TableEmptyState.js +6 -6
- package/dist/esm/components/table/parts/TableHeader.js +1 -1
- package/dist/esm/components/table/parts/TablePagination.d.ts +5 -5
- package/dist/esm/components/table/parts/TablePagination.js +11 -11
- package/dist/esm/components/table/parts/TableRow.js +22 -18
- package/dist/esm/components/tabs/Tabs.variant.d.ts +0 -6
- package/dist/esm/components/tabs/Tabs.variant.js +11 -12
- package/dist/esm/components/tabs/parts/{Tab.d.ts → RawTab.d.ts} +2 -2
- package/dist/esm/components/tabs/parts/{Tab.js → RawTab.js} +6 -6
- package/dist/esm/components/task-menu/TaskMenu.d.ts +4 -4
- package/dist/esm/components/task-menu/parts/{SubTask.d.ts → RawSubTask.d.ts} +7 -7
- package/dist/esm/components/task-menu/parts/{SubTask.js → RawSubTask.js} +43 -43
- package/dist/esm/components/task-menu/parts/{Task.d.ts → RawTask.d.ts} +7 -7
- package/dist/esm/components/task-menu/parts/{Task.js → RawTask.js} +45 -41
- package/dist/esm/components/task-menu/parts/TaskGroup.d.ts +5 -5
- package/dist/esm/components/task-menu/parts/TaskGroup.js +30 -26
- package/dist/esm/components/task-menu/parts/task.variants.js +4 -2
- package/dist/esm/components/text/Text.d.ts +11 -1
- package/dist/esm/components/text/Text.js +43 -30
- package/dist/esm/components/text/Text.variants.d.ts +12 -0
- package/dist/esm/components/text/Text.variants.js +4 -0
- package/dist/esm/components/text-area/TanstackTextArea.d.ts +21 -0
- package/dist/esm/components/text-area/TanstackTextArea.js +35 -0
- package/dist/esm/components/text-area/TextArea.js +31 -29
- package/dist/esm/components/text-field/TanstackTextField.d.ts +79 -0
- package/dist/esm/components/text-field/TanstackTextField.js +60 -0
- package/dist/esm/components/text-field/TextField.d.ts +2 -0
- package/dist/esm/components/toast/UnityToast.js +5 -5
- package/dist/esm/components/toast/test-utils.d.ts +36 -0
- package/dist/esm/components/toast/test-utils.js +118 -0
- package/dist/esm/components/toggle-switch/TanstackToggleSwitch.d.ts +46 -0
- package/dist/esm/components/toggle-switch/TanstackToggleSwitch.js +25 -0
- package/dist/esm/components/toggle-switch/ToggleSwitch.d.ts +21 -9
- package/dist/esm/components/toggle-switch/ToggleSwitch.js +71 -32
- package/dist/esm/components/toggle-switch-field/TanstackToggleSwitchField.d.ts +11 -0
- package/dist/esm/components/toggle-switch-field/TanstackToggleSwitchField.js +34 -0
- package/dist/esm/components/toggle-switch-field/ToggleSwitchField.d.ts +2 -0
- package/dist/esm/components/toggle-switch-group/TanstackToggleSwitchGroup.d.ts +57 -0
- package/dist/esm/components/toggle-switch-group/TanstackToggleSwitchGroup.js +23 -0
- package/dist/esm/components/toggle-switch-group/ToggleSwitchGroup.js +1 -1
- package/dist/esm/components/toggle-switch-group-field/TanstackToggleSwitchGroupField.d.ts +19 -0
- package/dist/esm/components/toggle-switch-group-field/TanstackToggleSwitchGroupField.js +50 -0
- package/dist/esm/components/toggle-switch-group-field/ToggleSwitchGroupField.d.ts +2 -0
- package/dist/esm/docs/{table → examples/data}/mocks/employee-columns.d.ts +1 -1
- package/dist/esm/hooks/tanstack-form-context.d.ts +1 -0
- package/dist/esm/hooks/tanstack-form-context.js +8 -0
- package/dist/esm/hooks/use-container-query-level.d.ts +42 -0
- package/dist/esm/hooks/use-container-query-level.js +33 -0
- package/dist/esm/hooks/use-form.d.ts +2 -0
- package/dist/esm/hooks/use-has-scroll.d.ts +71 -0
- package/dist/esm/hooks/use-has-scroll.js +75 -0
- package/dist/esm/hooks/use-tanstack-form.d.ts +369 -0
- package/dist/esm/hooks/use-tanstack-form.js +209 -0
- package/dist/esm/index.d.ts +64 -30
- package/dist/esm/index.js +482 -394
- package/dist/esm/index.storybook-testing.d.ts +3 -0
- package/dist/esm/integrations/tanstack-router/components/breadcrumbs/Breadcrumb.d.ts +23 -0
- package/dist/esm/integrations/tanstack-router/components/breadcrumbs/BreadcrumbLink.d.ts +38 -0
- package/dist/esm/integrations/tanstack-router/components/breadcrumbs/BreadcrumbLink.js +7 -0
- package/dist/esm/integrations/tanstack-router/components/breadcrumbs/Breadcrumbs.d.ts +23 -0
- package/dist/esm/integrations/tanstack-router/components/breadcrumbs/use-route-breadcrumb.d.ts +53 -0
- package/dist/esm/integrations/tanstack-router/components/form-contextual-link/FormContextualLink.d.ts +45 -0
- package/dist/esm/integrations/tanstack-router/components/form-contextual-link/FormContextualLink.js +7 -0
- package/dist/esm/integrations/tanstack-router/components/form-contextual-link/TanstackFormContextualLink.d.ts +43 -0
- package/dist/esm/integrations/tanstack-router/components/link/Link.d.ts +33 -0
- package/dist/esm/integrations/tanstack-router/components/link/Link.js +7 -0
- package/dist/esm/integrations/tanstack-router/components/list-view/ListView.d.ts +34 -0
- package/dist/esm/integrations/tanstack-router/components/list-view/ListView.js +25 -0
- package/dist/esm/integrations/tanstack-router/components/list-view/parts/ListViewItem.d.ts +51 -0
- package/dist/esm/integrations/tanstack-router/components/list-view/parts/ListViewItem.js +32 -0
- package/dist/esm/integrations/tanstack-router/components/menu-item/MenuItem.d.ts +49 -0
- package/dist/esm/integrations/tanstack-router/components/menu-item/MenuItem.js +16 -0
- package/dist/esm/integrations/tanstack-router/components/nav-item/NavItem.d.ts +52 -0
- package/dist/esm/integrations/tanstack-router/components/nav-item/NavItem.js +29 -0
- package/dist/esm/integrations/tanstack-router/components/navigation-card/NavigationCard.d.ts +73 -0
- package/dist/esm/integrations/tanstack-router/components/navigation-card/NavigationCard.js +37 -0
- package/dist/esm/integrations/tanstack-router/components/pagination/PaginationLink.d.ts +54 -0
- package/dist/esm/integrations/tanstack-router/components/pagination/PaginationLink.js +21 -0
- package/dist/esm/integrations/tanstack-router/components/pagination/PaginationNext.d.ts +52 -0
- package/dist/esm/integrations/tanstack-router/components/pagination/PaginationNext.js +22 -0
- package/dist/esm/integrations/tanstack-router/components/pagination/PaginationPrevious.d.ts +51 -0
- package/dist/esm/integrations/tanstack-router/components/pagination/PaginationPrevious.js +22 -0
- package/dist/esm/integrations/tanstack-router/components/tabs/Tabs.d.ts +82 -0
- package/dist/esm/integrations/tanstack-router/components/tabs/Tabs.js +41 -0
- package/dist/esm/integrations/tanstack-router/components/tabs/parts/Tab.d.ts +52 -0
- package/dist/esm/integrations/tanstack-router/components/tabs/parts/Tab.js +15 -0
- package/dist/esm/integrations/tanstack-router/components/tabs/parts/TabList.d.ts +5 -0
- package/dist/esm/integrations/tanstack-router/components/tabs/parts/TabPanel.d.ts +77 -0
- package/dist/esm/integrations/tanstack-router/components/tabs/parts/TabPanel.js +16 -0
- package/dist/esm/integrations/tanstack-router/components/task-menu/SubTask.d.ts +69 -0
- package/dist/esm/integrations/tanstack-router/components/task-menu/SubTask.js +14 -0
- package/dist/esm/integrations/tanstack-router/components/task-menu/Task.d.ts +64 -0
- package/dist/esm/integrations/tanstack-router/components/task-menu/Task.js +14 -0
- package/dist/esm/integrations/tanstack-router/index.d.ts +19 -0
- package/dist/esm/integrations/tanstack-router/utils/decorators.d.ts +23 -0
- package/dist/esm/integrations/tanstack-router.js +40 -0
- package/dist/esm/mocks/employees.d.ts +1 -5
- package/dist/esm/providers/router/RouterProvider.d.ts +7 -2
- package/dist/esm/providers/router/RouterProvider.js +14 -10
- package/dist/esm/storybook-testing.js +8 -2
- package/dist/esm/storybook-utilities/previewTransform.d.ts +1 -0
- package/dist/esm/types/DataAttributes.d.ts +1 -1
- package/dist/esm/utils/scroll-detection.d.ts +77 -0
- package/dist/esm/utils/scroll-detection.js +33 -0
- package/dist/esm/utils/spacing.d.ts +63 -0
- package/dist/esm/utils/spacing.js +15 -0
- package/i18n/en-GB.json +22 -8
- package/i18n/es-ES.json +24 -10
- package/i18n/fr-FR.json +25 -11
- package/package.json +66 -45
- package/dist/esm/components/form-field/parts/FormContextualLink.d.ts +0 -20
- package/dist/esm/components/form-field/parts/FormContextualLink.js +0 -37
- package/dist/esm/components/link/Link.d.ts +0 -93
- package/dist/esm/components/link/Link.js +0 -68
- package/dist/esm/components/multi-select/Multiselect.types.d.ts +0 -109
- package/dist/esm/components/nav/parts/NavItem.js +0 -95
- package/dist/esm/integrations/react-router/v5/UnityReactRouterV5Provider.d.ts +0 -6
- package/dist/esm/integrations/react-router/v5/UnityReactRouterV5Provider.js +0 -28
- package/dist/esm/integrations/react-router/v5/index.d.ts +0 -1
- package/dist/esm/integrations/react-router/v5.js +0 -4
- /package/dist/esm/components/{pagination → client-side-pagination}/hooks/use-pagination.d.ts +0 -0
- /package/dist/esm/components/{pagination → client-side-pagination}/hooks/use-pagination.js +0 -0
- /package/dist/esm/components/{pagination → client-side-pagination}/parts/PaginationJumpDialog.js +0 -0
- /package/dist/esm/components/{pagination → client-side-pagination}/parts/PaginationNavButton.d.ts +0 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { useMemo as u, useReducer as g, useCallback as c } from "react";
|
|
2
|
+
import { normalizeFilterValue as M } from "../utils/normalize-filter-value.js";
|
|
3
|
+
function v(E) {
|
|
4
|
+
return (r, d) => {
|
|
5
|
+
switch (d.type) {
|
|
6
|
+
case "ADD_FILTERS": {
|
|
7
|
+
const t = new Set(r.appliedFilters);
|
|
8
|
+
let s = !1;
|
|
9
|
+
for (const a of d.payload)
|
|
10
|
+
E.has(a) && !t.has(a) && (t.add(a), s = !0);
|
|
11
|
+
return s ? { appliedFilters: t, filterValues: r.filterValues } : r;
|
|
12
|
+
}
|
|
13
|
+
case "REMOVE_FILTERS": {
|
|
14
|
+
const t = new Set(r.appliedFilters), s = new Map(r.filterValues);
|
|
15
|
+
let a = !1;
|
|
16
|
+
for (const F of d.payload)
|
|
17
|
+
t.delete(F) && (s.delete(F), a = !0);
|
|
18
|
+
return a ? { appliedFilters: t, filterValues: s } : r;
|
|
19
|
+
}
|
|
20
|
+
case "CLEAR_FILTERS":
|
|
21
|
+
return { appliedFilters: /* @__PURE__ */ new Set(), filterValues: /* @__PURE__ */ new Map() };
|
|
22
|
+
case "SET_FILTER_VALUE": {
|
|
23
|
+
const { filterId: t, value: s } = d.payload;
|
|
24
|
+
if (!r.appliedFilters.has(t))
|
|
25
|
+
return r;
|
|
26
|
+
const a = new Map(r.filterValues);
|
|
27
|
+
if (s == null) {
|
|
28
|
+
if (!a.has(t))
|
|
29
|
+
return r;
|
|
30
|
+
a.delete(t);
|
|
31
|
+
} else {
|
|
32
|
+
if (a.get(t) === s)
|
|
33
|
+
return r;
|
|
34
|
+
a.set(t, s);
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
appliedFilters: r.appliedFilters,
|
|
38
|
+
filterValues: a
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
default:
|
|
42
|
+
return r;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function D(E) {
|
|
47
|
+
const { filterDefs: r, initialValue: d, onChange: t } = E, s = u(
|
|
48
|
+
() => new Set(r.map((e) => e.id)),
|
|
49
|
+
[r]
|
|
50
|
+
), a = u(() => {
|
|
51
|
+
const e = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map();
|
|
52
|
+
if (d)
|
|
53
|
+
for (const n of d) {
|
|
54
|
+
const o = n.id, p = n.value;
|
|
55
|
+
s.has(o) && (e.add(o), p != null && i.set(o, p));
|
|
56
|
+
}
|
|
57
|
+
return { appliedFilters: e, filterValues: i };
|
|
58
|
+
}, [d, s]), F = u(() => v(s), [s]), [l, V] = g(F, a), S = u(
|
|
59
|
+
() => Array.from(l.appliedFilters),
|
|
60
|
+
[l.appliedFilters]
|
|
61
|
+
), y = u(() => Array.from(s).filter(
|
|
62
|
+
(e) => !l.appliedFilters.has(e)
|
|
63
|
+
), [s, l.appliedFilters]), L = u(() => {
|
|
64
|
+
const e = [];
|
|
65
|
+
for (const i of r)
|
|
66
|
+
l.appliedFilters.has(i.id) || e.push(i);
|
|
67
|
+
return e;
|
|
68
|
+
}, [r, l.appliedFilters]), R = u(() => {
|
|
69
|
+
const e = l.appliedFilters.size, i = s.size;
|
|
70
|
+
return e === 0 ? "EMPTY" : i > 0 && e === i ? "WITH_ALL_FILTERS_APPLIED" : "WITH_SOME_FILTERS_APPLIED";
|
|
71
|
+
}, [l.appliedFilters.size, s.size]), f = c(
|
|
72
|
+
(e, i) => Array.from(e).map((n) => ({
|
|
73
|
+
id: n,
|
|
74
|
+
value: M(i.get(n))
|
|
75
|
+
})),
|
|
76
|
+
[]
|
|
77
|
+
), T = c(
|
|
78
|
+
(e) => {
|
|
79
|
+
const i = Array.isArray(e) ? e : [e], n = new Set(l.appliedFilters);
|
|
80
|
+
let o = !1;
|
|
81
|
+
for (const p of i)
|
|
82
|
+
s.has(p) && !n.has(p) && (n.add(p), o = !0);
|
|
83
|
+
o && (V({ type: "ADD_FILTERS", payload: i }), t && t(f(n, l.filterValues)));
|
|
84
|
+
},
|
|
85
|
+
[
|
|
86
|
+
t,
|
|
87
|
+
l.appliedFilters,
|
|
88
|
+
l.filterValues,
|
|
89
|
+
s,
|
|
90
|
+
f
|
|
91
|
+
]
|
|
92
|
+
), m = c(
|
|
93
|
+
(e) => {
|
|
94
|
+
const i = Array.isArray(e) ? e : [e], n = new Set(l.appliedFilters);
|
|
95
|
+
let o = !1;
|
|
96
|
+
for (const p of i)
|
|
97
|
+
n.delete(p) && (o = !0);
|
|
98
|
+
if (o && (V({ type: "REMOVE_FILTERS", payload: i }), t)) {
|
|
99
|
+
const p = new Map(l.filterValues);
|
|
100
|
+
for (const A of i)
|
|
101
|
+
p.delete(A);
|
|
102
|
+
t(f(n, p));
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
[t, l.appliedFilters, l.filterValues, f]
|
|
106
|
+
), w = c(() => {
|
|
107
|
+
l.appliedFilters.size > 0 && (V({ type: "CLEAR_FILTERS" }), t && t([]));
|
|
108
|
+
}, [t, l.appliedFilters.size]), _ = c(
|
|
109
|
+
(e, i) => {
|
|
110
|
+
const n = l.filterValues.get(e), o = i == null, p = l.filterValues.has(e);
|
|
111
|
+
if (l.appliedFilters.has(e) && (o ? p : n !== i) && (V({ type: "SET_FILTER_VALUE", payload: { filterId: e, value: i } }), t)) {
|
|
112
|
+
const h = new Map(l.filterValues);
|
|
113
|
+
o ? h.delete(e) : h.set(e, i), t(f(l.appliedFilters, h));
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
[t, l.appliedFilters, l.filterValues, f]
|
|
117
|
+
);
|
|
118
|
+
return {
|
|
119
|
+
status: R,
|
|
120
|
+
appliedFilters: S,
|
|
121
|
+
remainingFilters: y,
|
|
122
|
+
availableFilterDefs: L,
|
|
123
|
+
filterValues: l.filterValues,
|
|
124
|
+
addFilter: T,
|
|
125
|
+
removeFilter: m,
|
|
126
|
+
clearFilters: w,
|
|
127
|
+
setFilterValue: _
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
export {
|
|
131
|
+
D as useFilterToolbarState
|
|
132
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { VariantProps } from '@payfit/unity-themes';
|
|
2
|
+
import { Selection } from 'react-aria-components';
|
|
3
|
+
import { FilterDef } from '../FilterToolbar.types.js';
|
|
4
|
+
export interface AddFilterProps extends VariantProps<typeof addFilter> {
|
|
5
|
+
/** Available filter definitions that can be added */
|
|
6
|
+
availableFilterDefs: FilterDef[];
|
|
7
|
+
/** Callback invoked when user selects filters to add */
|
|
8
|
+
onSelectionChange?: (selection: Selection) => void;
|
|
9
|
+
/** Whether the add filter button is disabled */
|
|
10
|
+
isDisabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const addFilter: import('tailwind-variants').TVReturnType<{
|
|
13
|
+
[key: string]: {
|
|
14
|
+
[key: string]: import('tailwind-merge').ClassNameValue | {
|
|
15
|
+
button?: import('tailwind-merge').ClassNameValue;
|
|
16
|
+
listbox?: import('tailwind-merge').ClassNameValue;
|
|
17
|
+
icon?: import('tailwind-merge').ClassNameValue;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
} | {
|
|
21
|
+
[x: string]: {
|
|
22
|
+
[x: string]: import('tailwind-merge').ClassNameValue | {
|
|
23
|
+
button?: import('tailwind-merge').ClassNameValue;
|
|
24
|
+
listbox?: import('tailwind-merge').ClassNameValue;
|
|
25
|
+
icon?: import('tailwind-merge').ClassNameValue;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
} | {}, {
|
|
29
|
+
button: string[];
|
|
30
|
+
icon: string[];
|
|
31
|
+
listbox: string[];
|
|
32
|
+
}, undefined, {
|
|
33
|
+
[key: string]: {
|
|
34
|
+
[key: string]: import('tailwind-merge').ClassNameValue | {
|
|
35
|
+
button?: import('tailwind-merge').ClassNameValue;
|
|
36
|
+
listbox?: import('tailwind-merge').ClassNameValue;
|
|
37
|
+
icon?: import('tailwind-merge').ClassNameValue;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
} | {}, {
|
|
41
|
+
button: string[];
|
|
42
|
+
icon: string[];
|
|
43
|
+
listbox: string[];
|
|
44
|
+
}, import('tailwind-variants').TVReturnType<unknown, {
|
|
45
|
+
button: string[];
|
|
46
|
+
icon: string[];
|
|
47
|
+
listbox: string[];
|
|
48
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
49
|
+
/**
|
|
50
|
+
* Internal component that renders the "Add filter" button and popover menu.
|
|
51
|
+
* Displays a list of available filters that users can add to the toolbar.
|
|
52
|
+
* The popover closes automatically when a filter is selected.
|
|
53
|
+
* @param props - AddFilter component props
|
|
54
|
+
* @param props.availableFilterDefs - Available filter definitions that can be added
|
|
55
|
+
* @param props.onSelectionChange - Callback invoked when user selects filters to add
|
|
56
|
+
* @param props.isDisabled - Whether the add filter button is disabled
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
declare const AddFilter: {
|
|
60
|
+
({ availableFilterDefs, onSelectionChange, isDisabled, ...rest }: AddFilterProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
displayName: string;
|
|
62
|
+
};
|
|
63
|
+
export { AddFilter };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { jsxs as s, Fragment as y, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as g, useRef as h } from "react";
|
|
3
|
+
import { Icon as v } from "@payfit/unity-icons";
|
|
4
|
+
import { uyTv as x } from "@payfit/unity-themes";
|
|
5
|
+
import { Button as F, Popover as N, Dialog as M, ListBox as A } from "react-aria-components";
|
|
6
|
+
import { useIntl as O, FormattedMessage as P } from "react-intl";
|
|
7
|
+
import { filterPopover as w } from "../../filter/parts/FilterPopover.js";
|
|
8
|
+
import { AddFilterItem as I } from "./AddFilterItem.js";
|
|
9
|
+
const S = x({
|
|
10
|
+
slots: {
|
|
11
|
+
button: [
|
|
12
|
+
"uy:flex uy:group uy:items-center",
|
|
13
|
+
"uy:rounded-sm",
|
|
14
|
+
"uy:border uy:border-solid",
|
|
15
|
+
"uy:cursor-pointer uy:data-[disabled=true]:cursor-not-allowed",
|
|
16
|
+
"uy:w-fit uy:p-100 uy:pl-100 uy:pr-150",
|
|
17
|
+
"uy:typography-action",
|
|
18
|
+
"uy:border-border-form-enabled uy:bg-surface-form-enabled uy:text-content-form-enabled",
|
|
19
|
+
"uy:hover:border-border-form-hover uy:hover:bg-surface-form-hover",
|
|
20
|
+
"uy:data-[pressed=true]:border-border-form-pressed uy:data-[pressed=true]:bg-surface-form-pressed",
|
|
21
|
+
"uy:data-[disabled=true]:border-border-form-disabled uy:data-[disabled=true]:bg-surface-form-disabled uy:data-[disabled=true]:text-content-form-disabled",
|
|
22
|
+
"uy:focus-visible:outline-2 uy:focus-visible:outline-offset-2 uy:focus-visible:outline-utility-focus-ring"
|
|
23
|
+
],
|
|
24
|
+
icon: [
|
|
25
|
+
"uy:p-0.25",
|
|
26
|
+
"uy:text-content-neutral-low",
|
|
27
|
+
"uy:group-data-[status=active]:text-content-primary-enabled",
|
|
28
|
+
"uy:group-data-[disabled=true]:text-content-neutral-disabled"
|
|
29
|
+
],
|
|
30
|
+
listbox: ["uy:p-100"]
|
|
31
|
+
}
|
|
32
|
+
}), j = ({
|
|
33
|
+
availableFilterDefs: a,
|
|
34
|
+
onSelectionChange: l,
|
|
35
|
+
isDisabled: d = !1,
|
|
36
|
+
...i
|
|
37
|
+
}) => {
|
|
38
|
+
const u = O(), [n, r] = g(!1), o = h(null), { popover: c, dialog: f } = w(), { icon: m, button: b, listbox: p } = S();
|
|
39
|
+
return /* @__PURE__ */ s(y, { children: [
|
|
40
|
+
/* @__PURE__ */ s(
|
|
41
|
+
F,
|
|
42
|
+
{
|
|
43
|
+
className: b(),
|
|
44
|
+
ref: o,
|
|
45
|
+
onPress: () => {
|
|
46
|
+
r(!0);
|
|
47
|
+
},
|
|
48
|
+
isDisabled: d,
|
|
49
|
+
...i,
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ e(
|
|
52
|
+
v,
|
|
53
|
+
{
|
|
54
|
+
src: "PlusOutlined",
|
|
55
|
+
role: "presentation",
|
|
56
|
+
size: 20,
|
|
57
|
+
className: m()
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
/* @__PURE__ */ e(
|
|
61
|
+
P,
|
|
62
|
+
{
|
|
63
|
+
id: "unity:component:filter-toolbar:add-filter:label",
|
|
64
|
+
defaultMessage: "Add filter"
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
/* @__PURE__ */ e(
|
|
71
|
+
N,
|
|
72
|
+
{
|
|
73
|
+
className: c(),
|
|
74
|
+
triggerRef: o,
|
|
75
|
+
isOpen: n,
|
|
76
|
+
onOpenChange: r,
|
|
77
|
+
placement: "bottom start",
|
|
78
|
+
children: /* @__PURE__ */ e(
|
|
79
|
+
M,
|
|
80
|
+
{
|
|
81
|
+
className: f(),
|
|
82
|
+
"aria-label": u.formatMessage({
|
|
83
|
+
id: "unity:component:filter-toolbar:add-filter:popover:label",
|
|
84
|
+
defaultMessage: "Select a filter to add"
|
|
85
|
+
}),
|
|
86
|
+
children: /* @__PURE__ */ e(
|
|
87
|
+
A,
|
|
88
|
+
{
|
|
89
|
+
className: p(),
|
|
90
|
+
selectionMode: "single",
|
|
91
|
+
items: a,
|
|
92
|
+
onSelectionChange: (t) => {
|
|
93
|
+
l?.(t), r(!1);
|
|
94
|
+
},
|
|
95
|
+
children: (t) => /* @__PURE__ */ e(I, { id: t.id, children: t.label })
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
] });
|
|
103
|
+
};
|
|
104
|
+
j.displayName = "AddFilter";
|
|
105
|
+
export {
|
|
106
|
+
j as AddFilter
|
|
107
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { VariantProps } from '@payfit/unity-themes';
|
|
2
|
+
import { ListBoxItemProps } from 'react-aria-components';
|
|
3
|
+
export declare const addFilterItem: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, string[], unknown, unknown, undefined>>;
|
|
4
|
+
export interface AddFilterItemProps extends VariantProps<typeof addFilterItem>, ListBoxItemProps {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Internal component that renders individual filter options in the add filter menu.
|
|
8
|
+
* Each item represents a filter that can be added to the toolbar.
|
|
9
|
+
* @param props - AddFilterItem component props
|
|
10
|
+
* @param props.id - Unique identifier for the filter item
|
|
11
|
+
* @param props.children - Label content to display for the filter
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
declare const AddFilterItem: {
|
|
15
|
+
({ id, children, ...rest }: AddFilterItemProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
export { AddFilterItem };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { uyTv as o } from "@payfit/unity-themes";
|
|
3
|
+
import { ListBoxItem as i } from "react-aria-components";
|
|
4
|
+
const s = o({
|
|
5
|
+
base: [
|
|
6
|
+
"uy:flex uy:items-center uy:gap-100 uy:text-content-neutral uy:typography-body",
|
|
7
|
+
"uy:px-150 uy:py-100",
|
|
8
|
+
"uy:rounded-50 uy:cursor-pointer",
|
|
9
|
+
"uy:hover:bg-surface-neutral-hover",
|
|
10
|
+
"uy:active:bg-surface-neutral-pressed",
|
|
11
|
+
"uy:data-[focus-visible]:outline-2 uy:data-[focus-visible]:outline-utility-focus-ring uy:data-[focus-visible]:outline-offset-2"
|
|
12
|
+
]
|
|
13
|
+
}), y = ({ id: e, children: t, ...u }) => /* @__PURE__ */ r(i, { className: s(), id: e, ...u, children: t });
|
|
14
|
+
y.displayName = "AddFilterItem";
|
|
15
|
+
export {
|
|
16
|
+
y as AddFilterItem,
|
|
17
|
+
s as addFilterItem
|
|
18
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { ColumnFiltersState } from '@tanstack/react-table';
|
|
2
|
+
import { AppliedFilter } from '../FilterToolbar.types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Adapters for converting FilterToolbar's AppliedFilter format to and from external formats.
|
|
5
|
+
*
|
|
6
|
+
* Use these adapters to integrate FilterToolbar with other libraries like Tanstack Table.
|
|
7
|
+
* Each adapter provides bidirectional conversion methods.
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* import { FilterAdapters } from '@payfit/unity-components'
|
|
11
|
+
*
|
|
12
|
+
* // Convert FilterToolbar filters to Tanstack Table format
|
|
13
|
+
* const columnFilters = FilterAdapters.TanstackTable.toColumnFilters(appliedFilters)
|
|
14
|
+
*
|
|
15
|
+
* // Convert Tanstack Table filters back to FilterToolbar format
|
|
16
|
+
* const appliedFilters = FilterAdapters.TanstackTable.fromColumnFilters(columnFilters)
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare const FilterAdapters: {
|
|
20
|
+
/**
|
|
21
|
+
* Adapter for Tanstack Table integration.
|
|
22
|
+
*
|
|
23
|
+
* Handles conversion between FilterToolbar's AppliedFilter format and
|
|
24
|
+
* Tanstack Table's ColumnFiltersState format.
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* const [appliedFilters, setAppliedFilters] = useState<AppliedFilter[]>([])
|
|
28
|
+
* const columnFilters = FilterAdapters.TanstackTable.toColumnFilters(appliedFilters)
|
|
29
|
+
*
|
|
30
|
+
* const table = useReactTable({
|
|
31
|
+
* state: { columnFilters },
|
|
32
|
+
* // ... other config
|
|
33
|
+
* })
|
|
34
|
+
*
|
|
35
|
+
* return (
|
|
36
|
+
* <>
|
|
37
|
+
* <FilterToolbar
|
|
38
|
+
* filterDefs={filterDefs}
|
|
39
|
+
* initialValue={appliedFilters}
|
|
40
|
+
* onChange={setAppliedFilters}
|
|
41
|
+
* />
|
|
42
|
+
* <DataTable table={table} />
|
|
43
|
+
* </>
|
|
44
|
+
* )
|
|
45
|
+
* ```
|
|
46
|
+
* @see {@link https://tanstack.com/table/latest/docs/guide/filters Tanstack Table Filters Documentation}
|
|
47
|
+
*/
|
|
48
|
+
TanstackTable: {
|
|
49
|
+
/**
|
|
50
|
+
* Converts FilterToolbar's AppliedFilter format to Tanstack Table's ColumnFiltersState format.
|
|
51
|
+
*
|
|
52
|
+
* This method handles two key transformations:
|
|
53
|
+
* 1. Filters out empty filters (filters without values) so the table shows all results
|
|
54
|
+
* 2. Converts Set values to Arrays (React Aria uses Set, Tanstack Table uses Array)
|
|
55
|
+
* @param appliedFilters - Array of applied filters from FilterToolbar's onChange callback
|
|
56
|
+
* @returns Column filters compatible with Tanstack Table's state.columnFilters
|
|
57
|
+
* @remarks
|
|
58
|
+
* - Empty filters (undefined values or empty Sets) are excluded from the result
|
|
59
|
+
* - This ensures that adding a filter without selecting values doesn't hide all table rows
|
|
60
|
+
* - Set values are converted to Arrays for compatibility with Tanstack Table's filter functions
|
|
61
|
+
* @example
|
|
62
|
+
* ```tsx
|
|
63
|
+
* const columnFilters = FilterAdapters.TanstackTable.toColumnFilters([
|
|
64
|
+
* { id: 'status', value: new Set(['active', 'pending']) },
|
|
65
|
+
* { id: 'department', value: undefined }, // Will be filtered out
|
|
66
|
+
* ])
|
|
67
|
+
* // Result: [{ id: 'status', value: ['active', 'pending'] }]
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
toColumnFilters(appliedFilters: AppliedFilter[]): ColumnFiltersState;
|
|
71
|
+
/**
|
|
72
|
+
* Converts Tanstack Table's ColumnFiltersState format to FilterToolbar's AppliedFilter format.
|
|
73
|
+
*
|
|
74
|
+
* This is useful when you need to initialize FilterToolbar from existing table state,
|
|
75
|
+
* URL parameters, or server-side filter state.
|
|
76
|
+
* @param columnFilters - Column filters from Tanstack Table's state
|
|
77
|
+
* @returns Array of applied filters compatible with FilterToolbar's initialValue
|
|
78
|
+
* @remarks
|
|
79
|
+
* - Array values are converted to Sets for compatibility with React Aria's SelectList
|
|
80
|
+
* - In most cases, you should make FilterToolbar the source of truth and use toColumnFilters
|
|
81
|
+
* to derive table state instead of syncing bidirectionally
|
|
82
|
+
* @example
|
|
83
|
+
* ```tsx
|
|
84
|
+
* // Initialize FilterToolbar from URL params
|
|
85
|
+
* const urlFilters = parseUrlToColumnFilters(searchParams)
|
|
86
|
+
* const appliedFilters = FilterAdapters.TanstackTable.fromColumnFilters(urlFilters)
|
|
87
|
+
*
|
|
88
|
+
* return <FilterToolbar initialValue={appliedFilters} />
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
fromColumnFilters(columnFilters: ColumnFiltersState): AppliedFilter[];
|
|
92
|
+
};
|
|
93
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
const u = {
|
|
2
|
+
/**
|
|
3
|
+
* Adapter for Tanstack Table integration.
|
|
4
|
+
*
|
|
5
|
+
* Handles conversion between FilterToolbar's AppliedFilter format and
|
|
6
|
+
* Tanstack Table's ColumnFiltersState format.
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* const [appliedFilters, setAppliedFilters] = useState<AppliedFilter[]>([])
|
|
10
|
+
* const columnFilters = FilterAdapters.TanstackTable.toColumnFilters(appliedFilters)
|
|
11
|
+
*
|
|
12
|
+
* const table = useReactTable({
|
|
13
|
+
* state: { columnFilters },
|
|
14
|
+
* // ... other config
|
|
15
|
+
* })
|
|
16
|
+
*
|
|
17
|
+
* return (
|
|
18
|
+
* <>
|
|
19
|
+
* <FilterToolbar
|
|
20
|
+
* filterDefs={filterDefs}
|
|
21
|
+
* initialValue={appliedFilters}
|
|
22
|
+
* onChange={setAppliedFilters}
|
|
23
|
+
* />
|
|
24
|
+
* <DataTable table={table} />
|
|
25
|
+
* </>
|
|
26
|
+
* )
|
|
27
|
+
* ```
|
|
28
|
+
* @see {@link https://tanstack.com/table/latest/docs/guide/filters Tanstack Table Filters Documentation}
|
|
29
|
+
*/
|
|
30
|
+
TanstackTable: {
|
|
31
|
+
/**
|
|
32
|
+
* Converts FilterToolbar's AppliedFilter format to Tanstack Table's ColumnFiltersState format.
|
|
33
|
+
*
|
|
34
|
+
* This method handles two key transformations:
|
|
35
|
+
* 1. Filters out empty filters (filters without values) so the table shows all results
|
|
36
|
+
* 2. Converts Set values to Arrays (React Aria uses Set, Tanstack Table uses Array)
|
|
37
|
+
* @param appliedFilters - Array of applied filters from FilterToolbar's onChange callback
|
|
38
|
+
* @returns Column filters compatible with Tanstack Table's state.columnFilters
|
|
39
|
+
* @remarks
|
|
40
|
+
* - Empty filters (undefined values or empty Sets) are excluded from the result
|
|
41
|
+
* - This ensures that adding a filter without selecting values doesn't hide all table rows
|
|
42
|
+
* - Set values are converted to Arrays for compatibility with Tanstack Table's filter functions
|
|
43
|
+
* @example
|
|
44
|
+
* ```tsx
|
|
45
|
+
* const columnFilters = FilterAdapters.TanstackTable.toColumnFilters([
|
|
46
|
+
* { id: 'status', value: new Set(['active', 'pending']) },
|
|
47
|
+
* { id: 'department', value: undefined }, // Will be filtered out
|
|
48
|
+
* ])
|
|
49
|
+
* // Result: [{ id: 'status', value: ['active', 'pending'] }]
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
toColumnFilters(e) {
|
|
53
|
+
return e.filter((a) => a.value instanceof Set ? a.value.size > 0 : a.value !== void 0 && a.value !== null).map((a) => ({
|
|
54
|
+
id: a.id,
|
|
55
|
+
value: a.value instanceof Set ? Array.from(a.value) : a.value
|
|
56
|
+
}));
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* Converts Tanstack Table's ColumnFiltersState format to FilterToolbar's AppliedFilter format.
|
|
60
|
+
*
|
|
61
|
+
* This is useful when you need to initialize FilterToolbar from existing table state,
|
|
62
|
+
* URL parameters, or server-side filter state.
|
|
63
|
+
* @param columnFilters - Column filters from Tanstack Table's state
|
|
64
|
+
* @returns Array of applied filters compatible with FilterToolbar's initialValue
|
|
65
|
+
* @remarks
|
|
66
|
+
* - Array values are converted to Sets for compatibility with React Aria's SelectList
|
|
67
|
+
* - In most cases, you should make FilterToolbar the source of truth and use toColumnFilters
|
|
68
|
+
* to derive table state instead of syncing bidirectionally
|
|
69
|
+
* @example
|
|
70
|
+
* ```tsx
|
|
71
|
+
* // Initialize FilterToolbar from URL params
|
|
72
|
+
* const urlFilters = parseUrlToColumnFilters(searchParams)
|
|
73
|
+
* const appliedFilters = FilterAdapters.TanstackTable.fromColumnFilters(urlFilters)
|
|
74
|
+
*
|
|
75
|
+
* return <FilterToolbar initialValue={appliedFilters} />
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
fromColumnFilters(e) {
|
|
79
|
+
return e.map((a) => ({
|
|
80
|
+
id: a.id,
|
|
81
|
+
value: Array.isArray(a.value) ? new Set(a.value) : a.value
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
export {
|
|
87
|
+
u as FilterAdapters
|
|
88
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalizes filter values to serializable formats (string or string array).
|
|
3
|
+
* This ensures filter values can be safely serialized to URLs or JSON.
|
|
4
|
+
* Handles various JavaScript types including primitives, arrays, Sets, Dates, and objects.
|
|
5
|
+
* @param value - The filter value to normalize (can be any type)
|
|
6
|
+
* @returns A string, string array, or undefined
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* // React Aria Selection (Set)
|
|
10
|
+
* normalizeFilterValue(new Set(['apple', 'banana'])) // ['apple', 'banana']
|
|
11
|
+
*
|
|
12
|
+
* // Arrays
|
|
13
|
+
* normalizeFilterValue(['apple', 'banana', 123]) // ['apple', 'banana', '123']
|
|
14
|
+
*
|
|
15
|
+
* // Primitives
|
|
16
|
+
* normalizeFilterValue(42) // '42'
|
|
17
|
+
* normalizeFilterValue('hello') // 'hello'
|
|
18
|
+
*
|
|
19
|
+
* // Objects
|
|
20
|
+
* normalizeFilterValue({ key: 'value' }) // '{"key":"value"}'
|
|
21
|
+
* ```
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export declare function normalizeFilterValue(value: unknown): string | string[] | undefined;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
function i(r) {
|
|
2
|
+
if (r != null) {
|
|
3
|
+
if (Array.isArray(r))
|
|
4
|
+
return r.map((t) => String(t));
|
|
5
|
+
if (typeof r == "object" && Symbol.iterator in r)
|
|
6
|
+
return Array.from(r).map((t) => String(t));
|
|
7
|
+
if (r instanceof Date)
|
|
8
|
+
return r.toISOString();
|
|
9
|
+
if (typeof r == "object")
|
|
10
|
+
return JSON.stringify(r);
|
|
11
|
+
if (typeof r == "string")
|
|
12
|
+
return r;
|
|
13
|
+
if (typeof r == "number" || typeof r == "boolean")
|
|
14
|
+
return String(r);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
i as normalizeFilterValue
|
|
19
|
+
};
|
|
@@ -1,42 +1,57 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { flex as
|
|
4
|
-
const
|
|
1
|
+
import { jsx as E } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as M, useMemo as S } from "react";
|
|
3
|
+
import { flex as b } from "./Flex.variants.js";
|
|
4
|
+
const N = M(
|
|
5
5
|
({
|
|
6
|
-
asElement:
|
|
7
|
-
children:
|
|
8
|
-
className:
|
|
9
|
-
inline:
|
|
10
|
-
direction:
|
|
11
|
-
isReversed:
|
|
12
|
-
wrap:
|
|
13
|
-
gap:
|
|
14
|
-
gapX:
|
|
15
|
-
gapY:
|
|
16
|
-
justify:
|
|
17
|
-
align:
|
|
18
|
-
alignContent:
|
|
19
|
-
...
|
|
20
|
-
},
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
6
|
+
asElement: a = "div",
|
|
7
|
+
children: d,
|
|
8
|
+
className: m,
|
|
9
|
+
inline: o,
|
|
10
|
+
direction: r,
|
|
11
|
+
isReversed: e,
|
|
12
|
+
wrap: f,
|
|
13
|
+
gap: s,
|
|
14
|
+
gapX: t,
|
|
15
|
+
gapY: x,
|
|
16
|
+
justify: l,
|
|
17
|
+
align: c,
|
|
18
|
+
alignContent: F,
|
|
19
|
+
...k
|
|
20
|
+
}, p) => {
|
|
21
|
+
const u = S(
|
|
22
|
+
() => b({
|
|
23
|
+
inline: o,
|
|
24
|
+
direction: r,
|
|
25
|
+
isReversed: e,
|
|
26
|
+
wrap: f,
|
|
27
|
+
gap: s,
|
|
28
|
+
gapX: t,
|
|
29
|
+
gapY: x,
|
|
30
|
+
justify: l,
|
|
31
|
+
align: c,
|
|
32
|
+
alignContent: F,
|
|
33
|
+
className: m
|
|
34
|
+
}),
|
|
35
|
+
[
|
|
36
|
+
c,
|
|
37
|
+
F,
|
|
38
|
+
m,
|
|
39
|
+
r,
|
|
40
|
+
s,
|
|
41
|
+
t,
|
|
42
|
+
x,
|
|
43
|
+
o,
|
|
44
|
+
e,
|
|
45
|
+
l,
|
|
46
|
+
f
|
|
47
|
+
]
|
|
48
|
+
);
|
|
49
|
+
return /* @__PURE__ */ E(a, { ref: p, className: u, ...k, children: d });
|
|
35
50
|
}
|
|
36
51
|
);
|
|
37
|
-
|
|
38
|
-
const
|
|
52
|
+
N.displayName = "Flex";
|
|
53
|
+
const v = N;
|
|
39
54
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
55
|
+
N as Flex,
|
|
56
|
+
v as Stack
|
|
42
57
|
};
|
|
@@ -36,6 +36,8 @@ type FormComponent = {
|
|
|
36
36
|
* ```bash
|
|
37
37
|
* $ yarn add zod react-hook-form
|
|
38
38
|
* ```
|
|
39
|
+
* @deprecated React Hook Form components are deprecated. Use the TanStack Form version instead.
|
|
40
|
+
* @see Storybook docs: https://unity-components.payfit.io/?path=/docs/forms-introduction-to-unity-forms--docs
|
|
39
41
|
*/
|
|
40
42
|
declare const Form: FormComponent;
|
|
41
43
|
export { Form };
|