@payfit/unity-components 2.47.5 → 2.47.7
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/adapters/standardSchemaAdapter.js +18 -19
- package/dist/esm/adapters/zodAdapter.js +59 -73
- package/dist/esm/components/action-bar/ActionBar.js +46 -69
- package/dist/esm/components/action-bar/ActionBar.variants.js +18 -25
- package/dist/esm/components/action-bar/hooks/use-action-bar-state.js +31 -21
- package/dist/esm/components/action-bar/parts/ActionBarButton.js +29 -35
- package/dist/esm/components/action-bar/parts/ActionBarIconButton.js +29 -41
- package/dist/esm/components/action-bar/parts/ActionBarOverflowMenu.js +39 -45
- package/dist/esm/components/action-bar/parts/ActionBarPrefixArea.js +22 -33
- package/dist/esm/components/action-bar/parts/ActionBarRoot.js +44 -56
- package/dist/esm/components/action-bar/utils/action-bar-helpers.js +23 -28
- package/dist/esm/components/actionable/Actionable.js +66 -82
- package/dist/esm/components/alert/Alert.js +84 -99
- package/dist/esm/components/alert/parts/AlertActions.js +19 -21
- package/dist/esm/components/alert/parts/AlertContent.js +13 -10
- package/dist/esm/components/alert/parts/AlertTitle.js +15 -20
- package/dist/esm/components/anchor/Anchor.js +40 -48
- package/dist/esm/components/app-layout/AppLayout.js +62 -76
- package/dist/esm/components/app-menu/AppMenu.js +11 -14
- package/dist/esm/components/app-menu/parts/AppMenu.context.js +21 -22
- package/dist/esm/components/app-menu/parts/AppMenuFooter.js +189 -246
- package/dist/esm/components/app-menu/parts/AppMenuHeader.js +52 -49
- package/dist/esm/components/app-menu/parts/AppMenuNavContent.js +14 -22
- package/dist/esm/components/autocomplete/Autocomplete.js +136 -168
- package/dist/esm/components/autocomplete/parts/AutocompleteClearButton.js +23 -33
- package/dist/esm/components/autocomplete/parts/AutocompleteItem.js +28 -36
- package/dist/esm/components/autocomplete/parts/AutocompleteItemGroup.js +38 -32
- package/dist/esm/components/autocomplete/parts/AutocompletePanel.js +44 -46
- package/dist/esm/components/avatar/Avatar.context.js +24 -25
- package/dist/esm/components/avatar/Avatar.js +38 -46
- package/dist/esm/components/avatar/Avatar.variants.js +62 -62
- package/dist/esm/components/avatar/parts/AvatarFallback.js +77 -81
- package/dist/esm/components/avatar/parts/AvatarIcon.js +32 -40
- package/dist/esm/components/avatar/parts/AvatarImage.js +22 -18
- package/dist/esm/components/avatar/parts/AvatarPair.js +49 -47
- package/dist/esm/components/avatar/utils.js +4 -4
- package/dist/esm/components/badge/Badge.js +57 -92
- package/dist/esm/components/badge/parts/BadgeDot.js +42 -83
- package/dist/esm/components/bottom-sheet/BottomSheet.js +48 -69
- package/dist/esm/components/bottom-sheet/parts/BottomSheetContent.js +26 -26
- package/dist/esm/components/bottom-sheet/parts/BottomSheetDragIndicator.js +44 -65
- package/dist/esm/components/bottom-sheet/parts/BottomSheetFooter.js +20 -28
- package/dist/esm/components/bottom-sheet/parts/BottomSheetHeader.js +49 -45
- package/dist/esm/components/breadcrumbs/Breadcrumbs.context.js +22 -25
- package/dist/esm/components/breadcrumbs/Breadcrumbs.js +124 -159
- package/dist/esm/components/breadcrumbs/Breadcrumbs.variant.js +13 -19
- package/dist/esm/components/breadcrumbs/parts/Breadcrumb.js +35 -41
- package/dist/esm/components/breadcrumbs/parts/RawBreadcrumbLink.js +53 -62
- package/dist/esm/components/button/Button.js +90 -107
- package/dist/esm/components/button/Button.variants.js +172 -179
- package/dist/esm/components/card/Card.context.js +9 -13
- package/dist/esm/components/card/Card.js +63 -99
- package/dist/esm/components/card/parts/CardContent.js +11 -7
- package/dist/esm/components/card/parts/CardTitle.js +24 -31
- package/dist/esm/components/carousel/Carousel.context.js +8 -12
- package/dist/esm/components/carousel/Carousel.js +67 -106
- package/dist/esm/components/carousel/Carousel.options.js +69 -61
- package/dist/esm/components/carousel/hooks/useCarouselAccessibility.js +81 -85
- package/dist/esm/components/carousel/hooks/useCarouselState.js +54 -61
- package/dist/esm/components/carousel/parts/CarouselContent.js +52 -68
- package/dist/esm/components/carousel/parts/CarouselHeader.js +43 -58
- package/dist/esm/components/carousel/parts/CarouselNav.js +64 -79
- package/dist/esm/components/carousel/parts/CarouselSlide.js +26 -35
- package/dist/esm/components/checkbox/Checkbox.js +83 -105
- package/dist/esm/components/checkbox/Checkbox.variants.js +60 -80
- package/dist/esm/components/checkbox/CheckboxStandalone.js +33 -28
- package/dist/esm/components/checkbox/TanstackCheckbox.js +35 -51
- package/dist/esm/components/checkbox/parts/CheckboxIndicator.js +131 -161
- package/dist/esm/components/checkbox-field/CheckboxField.js +38 -65
- package/dist/esm/components/checkbox-field/TanstackCheckboxField.js +23 -39
- package/dist/esm/components/checkbox-group/CheckboxGroup.js +44 -73
- package/dist/esm/components/checkbox-group/TanstackCheckboxGroup.js +32 -37
- package/dist/esm/components/checkbox-group-field/CheckboxGroupField.js +35 -55
- package/dist/esm/components/checkbox-group-field/TanstackCheckGroupField.js +26 -39
- package/dist/esm/components/client-side-pagination/ClientSidePagination.js +130 -177
- package/dist/esm/components/client-side-pagination/hooks/use-pagination.js +20 -27
- package/dist/esm/components/client-side-pagination/parts/PaginationEllipsis.js +29 -29
- package/dist/esm/components/client-side-pagination/parts/PaginationJumpDialog.js +110 -143
- package/dist/esm/components/client-side-pagination/parts/PaginationNavButton.js +23 -31
- package/dist/esm/components/client-side-pagination/parts/RawPaginationLink.js +35 -48
- package/dist/esm/components/client-side-pagination/utils/pagination-window.js +37 -31
- package/dist/esm/components/code/Code.js +34 -38
- package/dist/esm/components/code/copyToClipboard.js +9 -9
- package/dist/esm/components/collapsible/Collapsible.js +21 -28
- package/dist/esm/components/collapsible/parts/CollapsibleContent.js +16 -18
- package/dist/esm/components/collapsible/parts/CollapsibleTitle.js +53 -53
- package/dist/esm/components/data-table/DataTable.js +101 -155
- package/dist/esm/components/data-table/parts/ColumnSortHeader.js +24 -36
- package/dist/esm/components/data-table/parts/DataTableBulkActions.js +95 -148
- package/dist/esm/components/data-table/parts/DataTableRoot.js +13 -13
- package/dist/esm/components/date-calendar/DateCalendar.js +121 -174
- package/dist/esm/components/date-calendar/DateCalendar.variants.js +32 -49
- package/dist/esm/components/date-calendar/hooks/useMonthsList.js +18 -25
- package/dist/esm/components/date-calendar/hooks/useYearsList.js +23 -32
- package/dist/esm/components/date-calendar/parts/DateSegmentSelect.js +62 -65
- package/dist/esm/components/date-picker/DatePicker.js +131 -174
- package/dist/esm/components/date-picker/TanstackDatePicker.js +39 -53
- package/dist/esm/components/date-picker/parts/DateInput.js +101 -135
- package/dist/esm/components/date-picker-field/DatePickerField.js +52 -71
- package/dist/esm/components/date-picker-field/TanstackDatePickerField.js +28 -41
- package/dist/esm/components/date-picker-field/test-utils.js +26 -51
- package/dist/esm/components/date-range-calendar/DateRangeCalendar.js +148 -211
- package/dist/esm/components/date-range-picker/DateRangePicker.js +132 -175
- package/dist/esm/components/date-range-picker/TanstackDateRangePicker.js +39 -53
- package/dist/esm/components/date-range-picker/parts/DateRangeInput.js +90 -101
- package/dist/esm/components/date-range-picker-field/TanstackDateRangePickerField.js +28 -41
- package/dist/esm/components/date-range-picker-field/test-utils.js +37 -65
- package/dist/esm/components/definition-list/DefinitionList.context.js +12 -16
- package/dist/esm/components/definition-list/DefinitionList.js +23 -22
- package/dist/esm/components/definition-list/parts/DefinitionItem.js +49 -50
- package/dist/esm/components/definition-tooltip/DefinitionTooltip.js +25 -28
- package/dist/esm/components/dialog/Dialog.js +79 -110
- package/dist/esm/components/dialog/parts/DialogActions/DialogButton.js +41 -61
- package/dist/esm/components/dialog/parts/DialogActions.js +10 -13
- package/dist/esm/components/dialog/parts/DialogContent.js +17 -22
- package/dist/esm/components/dialog/parts/DialogTitle.js +12 -9
- package/dist/esm/components/dialog/test-utils.js +46 -88
- package/dist/esm/components/empty-state/EmptyState.js +20 -25
- package/dist/esm/components/empty-state/EmptyState.variants.js +15 -22
- package/dist/esm/components/empty-state/parts/EmptyStateActions.js +12 -17
- package/dist/esm/components/empty-state/parts/EmptyStateContent.js +21 -21
- package/dist/esm/components/empty-state/parts/EmptyStateIcon.js +19 -14
- package/dist/esm/components/empty-state/presets/EmptyStateGetStarted.js +30 -26
- package/dist/esm/components/empty-state/presets/EmptyStateGoodJob.js +35 -55
- package/dist/esm/components/empty-state/presets/EmptyStateNoSearchResults.js +31 -27
- package/dist/esm/components/empty-state/presets/EmptyStateUpgradeRequired.js +30 -26
- package/dist/esm/components/empty-state/presets/EmptyStateUseDesktop.js +26 -25
- package/dist/esm/components/empty-state/presets/EmptyStateWaitingForData.js +30 -26
- package/dist/esm/components/error-state/ErrorState.js +155 -239
- package/dist/esm/components/error-state/initConfig.js +90 -148
- package/dist/esm/components/error-state/parts/Collapsible.js +68 -67
- package/dist/esm/components/fieldset/Fieldset.js +63 -72
- package/dist/esm/components/fieldset/parts/FieldGroup.js +13 -18
- package/dist/esm/components/filter/Filter.controls.js +49 -42
- package/dist/esm/components/filter/Filter.js +101 -146
- package/dist/esm/components/filter/hooks/useFilterIds.js +12 -12
- package/dist/esm/components/filter/hooks/useFilterState.js +16 -22
- package/dist/esm/components/filter/hooks/useFilterValue.js +31 -30
- package/dist/esm/components/filter/parts/FilterButton.js +40 -54
- package/dist/esm/components/filter/parts/FilterLabel.js +38 -56
- package/dist/esm/components/filter/parts/FilterPopover.js +68 -80
- package/dist/esm/components/filter/utils/value-formatters.js +9 -11
- package/dist/esm/components/filter-toolbar/FilterToolbar.js +124 -173
- package/dist/esm/components/filter-toolbar/hooks/use-filter-toolbar-state.js +128 -130
- package/dist/esm/components/filter-toolbar/parts/AddFilter.js +81 -109
- package/dist/esm/components/filter-toolbar/parts/AddFilterItem.js +20 -18
- package/dist/esm/components/filter-toolbar/utils/filter-adapters.js +17 -88
- package/dist/esm/components/filter-toolbar/utils/normalize-filter-value.js +12 -18
- package/dist/esm/components/flex/Flex.js +38 -57
- package/dist/esm/components/flex/Flex.variants.js +198 -199
- package/dist/esm/components/flex/FlexItem.js +21 -32
- package/dist/esm/components/floating-action-bar/FloatingActionBar.js +55 -68
- package/dist/esm/components/form/Form.context.js +15 -26
- package/dist/esm/components/form/Form.js +40 -57
- package/dist/esm/components/form/TanstackForm.js +22 -29
- package/dist/esm/components/form-field/FormField.context.js +44 -70
- package/dist/esm/components/form-field/FormField.js +50 -56
- package/dist/esm/components/form-field/TanstackFormField.context.js +11 -12
- package/dist/esm/components/form-field/TanstackFormField.js +44 -45
- package/dist/esm/components/form-field/parts/FormControl.js +41 -52
- package/dist/esm/components/form-field/parts/FormFeedbackText.js +24 -26
- package/dist/esm/components/form-field/parts/FormHelperText.js +21 -26
- package/dist/esm/components/form-field/parts/FormLabel.js +21 -30
- package/dist/esm/components/form-field/parts/RawFormContextualLink.js +32 -38
- package/dist/esm/components/form-field/parts/TanstackFormFeedbackText.js +28 -31
- package/dist/esm/components/form-field/parts/TanstackFormHelperText.js +22 -25
- package/dist/esm/components/form-field/parts/TanstackFormLabel.js +21 -26
- package/dist/esm/components/form-field/parts/TanstackRawFormContextualLink.js +33 -45
- package/dist/esm/components/form-field/utils/isFieldRequired.js +7 -7
- package/dist/esm/components/full-page-loader/FullPageLoader.js +26 -35
- package/dist/esm/components/funnel-layout/FunnelLayout.context.js +12 -26
- package/dist/esm/components/funnel-layout/FunnelLayout.js +75 -91
- package/dist/esm/components/funnel-layout/parts/FunnelBackButton.js +24 -34
- package/dist/esm/components/funnel-layout/parts/FunnelBody.js +15 -23
- package/dist/esm/components/funnel-layout/parts/FunnelPage.js +27 -35
- package/dist/esm/components/funnel-layout/parts/FunnelPageAction.js +32 -39
- package/dist/esm/components/funnel-layout/parts/FunnelPageActions.js +30 -41
- package/dist/esm/components/funnel-layout/parts/FunnelPageContent.js +15 -23
- package/dist/esm/components/funnel-layout/parts/FunnelPageFooter.js +20 -28
- package/dist/esm/components/funnel-layout/parts/FunnelPageHeader.js +53 -55
- package/dist/esm/components/funnel-layout/parts/FunnelProgressBar.js +39 -50
- package/dist/esm/components/funnel-layout/parts/FunnelSidebar.js +47 -54
- package/dist/esm/components/funnel-layout/parts/FunnelTopBar.js +88 -119
- package/dist/esm/components/grid/Grid.js +27 -38
- package/dist/esm/components/grid/Grid.variants.js +147 -164
- package/dist/esm/components/grid/GridItem.js +24 -43
- package/dist/esm/components/icon/Icon.js +112 -115
- package/dist/esm/components/icon-button/CircularIconButton.js +117 -119
- package/dist/esm/components/icon-button/IconButton.js +82 -93
- package/dist/esm/components/icon-button/IconButton.variants.js +167 -174
- package/dist/esm/components/inline-field/InlineField.context.js +8 -9
- package/dist/esm/components/inline-field/InlineField.js +48 -57
- package/dist/esm/components/inline-field/hooks/useInlineFieldMode.js +23 -26
- package/dist/esm/components/inline-field/parts/InlineFieldEditView.js +113 -149
- package/dist/esm/components/inline-field/parts/InlineFieldReadView.js +52 -57
- package/dist/esm/components/inline-field-group/InlineFieldGroup.context.js +5 -5
- package/dist/esm/components/inline-field-group/InlineFieldGroup.js +188 -216
- package/dist/esm/components/inline-field-group/hooks/useInlineFieldGroupMode.js +23 -26
- package/dist/esm/components/inline-field-group/parts/InlineFieldGroupActions.js +109 -156
- package/dist/esm/components/inline-field-group/parts/InlineFieldGroupEditView.js +51 -55
- package/dist/esm/components/inline-field-group/parts/InlineFieldGroupHeader.js +39 -38
- package/dist/esm/components/inline-field-group/parts/InlineFieldGroupReadView.js +18 -27
- package/dist/esm/components/input/Input.js +123 -150
- package/dist/esm/components/input/TanstackInput.js +33 -38
- package/dist/esm/components/label/Label.js +52 -66
- package/dist/esm/components/link/RawLink.js +109 -165
- package/dist/esm/components/link/utils.js +12 -15
- package/dist/esm/components/link-button/RawLinkButton.js +100 -127
- package/dist/esm/components/list-view/ListView.js +40 -45
- package/dist/esm/components/list-view/parts/ListViewItemLabel.js +17 -22
- package/dist/esm/components/list-view/parts/ListViewItemText.js +17 -22
- package/dist/esm/components/list-view/parts/ListViewSection.js +25 -23
- package/dist/esm/components/list-view/parts/RawListViewItem.js +68 -81
- package/dist/esm/components/menu/Menu.js +21 -30
- package/dist/esm/components/menu/parts/MenuContent.js +17 -29
- package/dist/esm/components/menu/parts/MenuHeader.js +13 -16
- package/dist/esm/components/menu/parts/MenuSection.js +32 -42
- package/dist/esm/components/menu/parts/MenuSeparator.js +8 -8
- package/dist/esm/components/menu/parts/MenuTrigger.js +12 -13
- package/dist/esm/components/menu/parts/RawMenuItem.js +29 -42
- package/dist/esm/components/multi-select/MultiSelect.js +249 -299
- package/dist/esm/components/multi-select/Multiselect.context.js +6 -6
- package/dist/esm/components/multi-select/TanstackMultiSelect.js +31 -41
- package/dist/esm/components/multi-select/parts/MultiSelectOptGroup.js +35 -43
- package/dist/esm/components/multi-select/parts/MultiSelectOption.js +60 -76
- package/dist/esm/components/multi-select/utils/selection-adapter.js +9 -15
- package/dist/esm/components/multi-select-field/MultiSelectField.js +56 -71
- package/dist/esm/components/multi-select-field/TanstackMultiSelectField.js +27 -48
- package/dist/esm/components/multi-select-field/test-utils.js +22 -45
- package/dist/esm/components/nav/Nav.js +21 -27
- package/dist/esm/components/nav/parts/NavGroup.js +103 -123
- package/dist/esm/components/nav/parts/RawNavItem.js +99 -118
- package/dist/esm/components/navigation-card/NavigationCard.context.js +10 -11
- package/dist/esm/components/navigation-card/NavigationCard.js +53 -63
- package/dist/esm/components/navigation-card/NavigationCard.variants.js +162 -162
- package/dist/esm/components/navigation-card/parts/NavigationCardDescription.js +17 -20
- package/dist/esm/components/navigation-card/parts/NavigationCardGroup.js +76 -93
- package/dist/esm/components/navigation-card/parts/NavigationCardLabel.js +18 -23
- package/dist/esm/components/number-field/NumberField.js +48 -69
- package/dist/esm/components/number-field/TanstackNumberField.js +30 -43
- package/dist/esm/components/number-input/NumberInput.js +161 -216
- package/dist/esm/components/number-input/TanstackNumberInput.js +33 -38
- package/dist/esm/components/page/Page.js +33 -48
- package/dist/esm/components/page/parts/PageHeader.js +41 -36
- package/dist/esm/components/page/parts/PageHeading.js +17 -19
- package/dist/esm/components/pagination/Pagination.js +78 -102
- package/dist/esm/components/pagination/PaginationContext.js +8 -14
- package/dist/esm/components/pagination/hooks/use-pagination-state.js +20 -26
- package/dist/esm/components/pagination/hooks/use-pagination-window.js +10 -13
- package/dist/esm/components/pagination/parts/PaginationContent.js +26 -37
- package/dist/esm/components/pagination/parts/PaginationEllipsis.js +33 -33
- package/dist/esm/components/pagination/parts/PaginationItem.js +17 -22
- package/dist/esm/components/pagination/parts/RawPaginationLink.js +50 -60
- package/dist/esm/components/pagination/parts/RawPaginationNext.js +53 -70
- package/dist/esm/components/pagination/parts/RawPaginationPrevious.js +52 -66
- package/dist/esm/components/pagination/utils/pagination-window.js +55 -40
- package/dist/esm/components/password-field/TanstackPasswordField.js +55 -82
- package/dist/esm/components/password-field/hooks/use-caps-lock.js +11 -11
- package/dist/esm/components/password-field/parts/PasswordFieldDetails.js +42 -41
- package/dist/esm/components/password-field/parts/PasswordInput.js +153 -188
- package/dist/esm/components/password-field/parts/ValidationRuleItem.js +38 -43
- package/dist/esm/components/payfit-brand/PayFitBrand.js +74 -84
- package/dist/esm/components/payfit-brand/PayFitPreprod.js +53 -57
- package/dist/esm/components/phone-number/PhoneNumberInput.js +214 -331
- package/dist/esm/components/phone-number/TanstackPhoneNumberInput.js +29 -32
- package/dist/esm/components/phone-number/parts/PhoneNumberItem.js +49 -65
- package/dist/esm/components/phone-number/unknownFlag.js +4 -0
- package/dist/esm/components/phone-number-field/TanstackPhoneNumberField.js +21 -32
- package/dist/esm/components/pill/Pill.js +48 -58
- package/dist/esm/components/popover/Popover.js +37 -41
- package/dist/esm/components/popover/parts/PopoverHeader.js +48 -60
- package/dist/esm/components/progress-bar/ProgressBar.js +66 -76
- package/dist/esm/components/promo-dialog/PromoDialog.js +135 -218
- package/dist/esm/components/promo-dialog/parts/PromoDialogActions.js +19 -29
- package/dist/esm/components/promo-dialog/parts/PromoDialogContent.js +14 -19
- package/dist/esm/components/promo-dialog/parts/PromoDialogHero.js +17 -24
- package/dist/esm/components/promo-dialog/parts/PromoDialogSubtitle.js +15 -21
- package/dist/esm/components/promo-dialog/parts/PromoDialogTitle.js +11 -16
- package/dist/esm/components/radio-button-group/RadioButtonGroup.js +18 -23
- package/dist/esm/components/radio-button-group/TanstackRadioButtonGroup.js +32 -42
- package/dist/esm/components/radio-button-group/parts/RadioButton.js +61 -66
- package/dist/esm/components/radio-button-group/parts/RadioButtonHelper.js +14 -19
- package/dist/esm/components/radio-button-group/parts/RadioIndicator.js +107 -129
- package/dist/esm/components/radio-button-group-field/RadioButtonGroupField.js +37 -52
- package/dist/esm/components/radio-button-group-field/TanstackRadioButtonGroupField.js +31 -37
- package/dist/esm/components/search/Search.js +120 -166
- package/dist/esm/components/segmented-button-group/SegmentedButtonGroup.js +20 -20
- package/dist/esm/components/segmented-button-group/SegmentedButtonGroups.context.js +11 -14
- package/dist/esm/components/segmented-button-group/parts/ToggleButton.js +105 -125
- package/dist/esm/components/select/Select.js +85 -130
- package/dist/esm/components/select/TanstackSelect.js +31 -40
- package/dist/esm/components/select/parts/SelectButton.js +79 -103
- package/dist/esm/components/select/parts/SelectOption.context.js +14 -21
- package/dist/esm/components/select/parts/SelectOption.js +53 -64
- package/dist/esm/components/select/parts/SelectOptionGroup.js +34 -27
- package/dist/esm/components/select/parts/SelectOptionHelper.js +22 -21
- package/dist/esm/components/select-field/SelectField.js +44 -66
- package/dist/esm/components/select-field/TanstackSelectField.js +29 -45
- package/dist/esm/components/select-field/test-utils.js +10 -25
- package/dist/esm/components/select-list/SelectList.js +70 -81
- package/dist/esm/components/select-list/constants.js +13 -28
- package/dist/esm/components/select-list/helpers.js +37 -43
- package/dist/esm/components/select-list/hooks/useControlledSelection.js +13 -15
- package/dist/esm/components/select-list/hooks/useSelectedFirstSorting.js +30 -30
- package/dist/esm/components/select-list/parts/SelectListEmptyState.js +24 -24
- package/dist/esm/components/select-list/parts/SelectListOptGroup.js +33 -30
- package/dist/esm/components/select-list/parts/SelectListOption.js +54 -70
- package/dist/esm/components/select-list/parts/SelectListSearchInput.js +43 -49
- package/dist/esm/components/select-list/parts/SelectedItemsSection.js +29 -35
- package/dist/esm/components/select-list/utils/partition.js +7 -8
- package/dist/esm/components/selectable-button-group/SelectableButtonGroup.context.js +5 -5
- package/dist/esm/components/selectable-button-group/SelectableButtonGroup.js +32 -38
- package/dist/esm/components/selectable-button-group/TanstackSelectableButtonGroup.js +27 -33
- package/dist/esm/components/selectable-button-group/parts/SelectableButton.js +81 -123
- package/dist/esm/components/selectable-button-group-field/SelectableButtonGroupField.js +41 -44
- package/dist/esm/components/selectable-button-group-field/TanstackSelectableButtonGroupField.js +29 -46
- package/dist/esm/components/selectable-card/internals/Content.js +8 -8
- package/dist/esm/components/selectable-card/internals/Description.js +11 -10
- package/dist/esm/components/selectable-card/internals/Illustration.js +8 -8
- package/dist/esm/components/selectable-card/internals/SelectedIndicator.js +9 -9
- package/dist/esm/components/selectable-card/selectable-card-checkbox-group/SelectableCardCheckboxGroup.js +13 -16
- package/dist/esm/components/selectable-card/selectable-card-checkbox-group/TanstackSelectableCardCheckboxGroup.js +28 -31
- package/dist/esm/components/selectable-card/selectable-card-checkbox-group/parts/SelectableCardCheckbox.js +37 -37
- package/dist/esm/components/selectable-card/selectable-card-radio-group/SelectableCardRadioGroup.js +18 -21
- package/dist/esm/components/selectable-card/selectable-card-radio-group/TanstackSelectableCardRadioGroup.js +28 -31
- package/dist/esm/components/selectable-card/selectable-card-radio-group/parts/SelectableCardRadio.js +40 -47
- package/dist/esm/components/selectable-card/selectableCard.variant.js +16 -22
- package/dist/esm/components/selectable-card-checkbox-group-field/SelectableCardCheckboxGroupField.js +38 -46
- package/dist/esm/components/selectable-card-checkbox-group-field/TanstackSelectableCardCheckboxGroupField.js +29 -37
- package/dist/esm/components/selectable-card-radio-group-field/SelectableCardRadioGroupField.js +37 -45
- package/dist/esm/components/selectable-card-radio-group-field/TanstackSelectableCardRadioGroupField.js +29 -37
- package/dist/esm/components/side-panel/SidePanel.js +53 -71
- package/dist/esm/components/side-panel/parts/SidePanelContent.js +25 -25
- package/dist/esm/components/side-panel/parts/SidePanelDragIndicator.js +44 -65
- package/dist/esm/components/side-panel/parts/SidePanelFooter.js +26 -29
- package/dist/esm/components/side-panel/parts/SidePanelHeader.js +41 -43
- package/dist/esm/components/skip-links/SkipLinks.js +69 -87
- package/dist/esm/components/spinner/Spinner.js +76 -106
- package/dist/esm/components/stepper/Stepper.context.js +15 -20
- package/dist/esm/components/stepper/Stepper.js +16 -18
- package/dist/esm/components/stepper/hooks/useStepper.js +20 -25
- package/dist/esm/components/stepper/parts/Step.js +47 -56
- package/dist/esm/components/table/Table.context.js +35 -41
- package/dist/esm/components/table/Table.js +155 -225
- package/dist/esm/components/table/hooks/useTableKeyboardNavigation.js +180 -208
- package/dist/esm/components/table/parts/TableBody.js +81 -104
- package/dist/esm/components/table/parts/TableCell.js +38 -62
- package/dist/esm/components/table/parts/TableColumnHeader.js +62 -78
- package/dist/esm/components/table/parts/TableEmptyState.js +131 -161
- package/dist/esm/components/table/parts/TableHeader.js +24 -37
- package/dist/esm/components/table/parts/TablePagination.js +119 -141
- package/dist/esm/components/table/parts/TableRow.js +36 -52
- package/dist/esm/components/tabs/Tabs.context.js +19 -20
- package/dist/esm/components/tabs/Tabs.js +26 -24
- package/dist/esm/components/tabs/Tabs.variant.js +35 -41
- package/dist/esm/components/tabs/parts/NavigationButton.js +37 -46
- package/dist/esm/components/tabs/parts/RawTab.js +22 -18
- package/dist/esm/components/tabs/parts/TabList.js +84 -83
- package/dist/esm/components/tabs/parts/TabPanel.js +13 -9
- package/dist/esm/components/task-menu/TaskMenu.context.js +44 -58
- package/dist/esm/components/task-menu/TaskMenu.js +21 -28
- package/dist/esm/components/task-menu/parts/Content.js +43 -48
- package/dist/esm/components/task-menu/parts/Header.js +39 -54
- package/dist/esm/components/task-menu/parts/RawSubTask.js +141 -166
- package/dist/esm/components/task-menu/parts/RawTask.js +115 -145
- package/dist/esm/components/task-menu/parts/TaskGroup.js +103 -140
- package/dist/esm/components/task-menu/parts/dot.js +19 -0
- package/dist/esm/components/task-menu/parts/task.variants.js +59 -64
- package/dist/esm/components/text/Text.js +56 -71
- package/dist/esm/components/text/Text.variants.js +106 -112
- package/dist/esm/components/text-area/TanstackTextArea.js +30 -35
- package/dist/esm/components/text-area/TextArea.js +121 -164
- package/dist/esm/components/text-field/TanstackTextField.js +39 -59
- package/dist/esm/components/text-field/TextField.js +53 -76
- package/dist/esm/components/timeline/Timeline.context.js +18 -21
- package/dist/esm/components/timeline/Timeline.js +33 -37
- package/dist/esm/components/timeline/Timeline.utils.js +8 -8
- package/dist/esm/components/timeline/Timeline.variants.js +93 -118
- package/dist/esm/components/timeline/parts/TimelineMarker.js +36 -26
- package/dist/esm/components/timeline/parts/TimelineStep.context.js +15 -19
- package/dist/esm/components/timeline/parts/TimelineStep.js +57 -52
- package/dist/esm/components/timeline/parts/TimelineStepContent.context.js +15 -20
- package/dist/esm/components/timeline/parts/TimelineStepContent.js +30 -17
- package/dist/esm/components/timeline/parts/TimelineStepDescription.js +12 -7
- package/dist/esm/components/timeline/parts/TimelineStepHeader.js +34 -36
- package/dist/esm/components/timeline/parts/check.js +23 -0
- package/dist/esm/components/toast/Toast.context.js +15 -20
- package/dist/esm/components/toast/ToastManager.js +13 -21
- package/dist/esm/components/toast/UnityToast.js +82 -95
- package/dist/esm/components/toast/parts/ToastAction.js +18 -13
- package/dist/esm/components/toast/parts/ToastContent.js +13 -9
- package/dist/esm/components/toast/parts/ToastTitle.js +13 -8
- package/dist/esm/components/toast/test-utils.js +63 -117
- package/dist/esm/components/toast/toast.js +27 -38
- package/dist/esm/components/toggle-switch/TanstackToggleSwitch.js +21 -24
- package/dist/esm/components/toggle-switch/ToggleSwitch.js +111 -112
- package/dist/esm/components/toggle-switch-field/TanstackToggleSwitchField.js +19 -33
- package/dist/esm/components/toggle-switch-field/ToggleSwitchField.js +33 -58
- package/dist/esm/components/toggle-switch-group/TanstackToggleSwitchGroup.js +18 -21
- package/dist/esm/components/toggle-switch-group/ToggleSwitchGroup.js +83 -108
- package/dist/esm/components/toggle-switch-group-field/TanstackToggleSwitchGroupField.js +30 -49
- package/dist/esm/components/toggle-switch-group-field/ToggleSwitchGroupField.js +41 -61
- package/dist/esm/components/tooltip/Tooltip.js +30 -31
- package/dist/esm/hooks/tanstack-form-context.js +5 -8
- package/dist/esm/hooks/tanstack-form-default-values.js +5 -5
- package/dist/esm/hooks/use-async-list.js +2 -0
- package/dist/esm/hooks/use-breakpoint-listener.js +16 -25
- package/dist/esm/hooks/use-container-query-level.js +30 -31
- package/dist/esm/hooks/use-form.js +35 -29
- package/dist/esm/hooks/use-has-scroll.js +76 -74
- package/dist/esm/hooks/use-id.js +18 -24
- package/dist/esm/hooks/use-media-query.js +15 -18
- package/dist/esm/hooks/use-resizable.js +49 -49
- package/dist/esm/hooks/use-responsive-value.js +22 -26
- package/dist/esm/hooks/use-scroll-direction.js +50 -52
- package/dist/esm/hooks/use-tanstack-form.js +60 -287
- package/dist/esm/index.js +240 -577
- package/dist/esm/integrations/tanstack-router/components/breadcrumbs/BreadcrumbLink.js +7 -7
- package/dist/esm/integrations/tanstack-router/components/form-contextual-link/FormContextualLink.js +7 -7
- package/dist/esm/integrations/tanstack-router/components/link/Link.js +7 -7
- package/dist/esm/integrations/tanstack-router/components/link-button/LinkButton.js +5 -5
- package/dist/esm/integrations/tanstack-router/components/list-view/ListView.js +20 -23
- package/dist/esm/integrations/tanstack-router/components/list-view/parts/ListViewItem.js +17 -30
- package/dist/esm/integrations/tanstack-router/components/menu-item/MenuItem.js +17 -15
- package/dist/esm/integrations/tanstack-router/components/nav-item/NavItem.js +21 -27
- package/dist/esm/integrations/tanstack-router/components/navigation-card/NavigationCard.js +19 -35
- package/dist/esm/integrations/tanstack-router/components/pagination/PaginationLink.js +18 -20
- package/dist/esm/integrations/tanstack-router/components/pagination/PaginationNext.js +17 -20
- package/dist/esm/integrations/tanstack-router/components/pagination/PaginationPrevious.js +18 -21
- package/dist/esm/integrations/tanstack-router/components/tabs/Tabs.js +52 -67
- package/dist/esm/integrations/tanstack-router/components/tabs/parts/Tab.js +16 -22
- package/dist/esm/integrations/tanstack-router/components/tabs/parts/TabPanel.js +14 -14
- package/dist/esm/integrations/tanstack-router/components/task-menu/SubTask.js +15 -12
- package/dist/esm/integrations/tanstack-router/components/task-menu/Task.js +15 -12
- package/dist/esm/integrations/tanstack-router.js +19 -40
- package/dist/esm/providers/router/RouterProvider.js +24 -20
- package/dist/esm/storybook-testing.js +7 -14
- package/dist/esm/utils/createSchemaAdapter.js +7 -12
- package/dist/esm/utils/field-revalidate-logic.js +41 -38
- package/dist/esm/utils/platform.js +4 -4
- package/dist/esm/utils/scroll-detection.js +31 -32
- package/dist/esm/utils/spacing.js +14 -14
- package/package.json +12 -12
- package/dist/esm/components/phone-number/unknownFlag.svg.js +0 -4
- package/dist/esm/components/task-menu/parts/dot.svg.js +0 -5
- package/dist/esm/components/timeline/parts/check.svg.js +0 -5
|
@@ -1,331 +1,214 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
"data-dd-privacy": "mask",
|
|
216
|
-
className: "react-international-phone-flag-emoji",
|
|
217
|
-
width: 24,
|
|
218
|
-
height: 24
|
|
219
|
-
}
|
|
220
|
-
),
|
|
221
|
-
/* @__PURE__ */ e(
|
|
222
|
-
f,
|
|
223
|
-
{
|
|
224
|
-
className: U(),
|
|
225
|
-
"aria-hidden": "true",
|
|
226
|
-
src: D ? "CaretUpOutlined" : "CaretDownOutlined"
|
|
227
|
-
}
|
|
228
|
-
)
|
|
229
|
-
]
|
|
230
|
-
}
|
|
231
|
-
),
|
|
232
|
-
/* @__PURE__ */ e(
|
|
233
|
-
oe,
|
|
234
|
-
{
|
|
235
|
-
style: {
|
|
236
|
-
"--trigger-width": `${d.current?.offsetWidth}px`
|
|
237
|
-
},
|
|
238
|
-
triggerRef: d,
|
|
239
|
-
offset: 1,
|
|
240
|
-
containerPadding: 8,
|
|
241
|
-
className: G(),
|
|
242
|
-
children: /* @__PURE__ */ a(_, { filter: O, children: [
|
|
243
|
-
/* @__PURE__ */ e("div", { className: "uy:m-100", children: /* @__PURE__ */ e(fe, { label: M, "data-dd-privacy": "mask" }) }),
|
|
244
|
-
/* @__PURE__ */ e(de, { className: "uy:mx-100 uy:border-t uy:border-border-neutral uy:border-solid" }),
|
|
245
|
-
/* @__PURE__ */ e(
|
|
246
|
-
ie,
|
|
247
|
-
{
|
|
248
|
-
layout: ne,
|
|
249
|
-
layoutOptions: {
|
|
250
|
-
padding: 8
|
|
251
|
-
},
|
|
252
|
-
children: /* @__PURE__ */ e(
|
|
253
|
-
ae,
|
|
254
|
-
{
|
|
255
|
-
className: T(),
|
|
256
|
-
items: m,
|
|
257
|
-
children: (r) => {
|
|
258
|
-
const l = ye(r);
|
|
259
|
-
return /* @__PURE__ */ e(
|
|
260
|
-
be,
|
|
261
|
-
{
|
|
262
|
-
country: l,
|
|
263
|
-
id: l.iso2
|
|
264
|
-
},
|
|
265
|
-
l.iso2
|
|
266
|
-
);
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
)
|
|
270
|
-
}
|
|
271
|
-
)
|
|
272
|
-
] })
|
|
273
|
-
}
|
|
274
|
-
)
|
|
275
|
-
]
|
|
276
|
-
}
|
|
277
|
-
),
|
|
278
|
-
/* @__PURE__ */ a("div", { className: V(), children: [
|
|
279
|
-
/* @__PURE__ */ e(
|
|
280
|
-
te,
|
|
281
|
-
{
|
|
282
|
-
ref: y,
|
|
283
|
-
...B,
|
|
284
|
-
className: z(),
|
|
285
|
-
type: "tel",
|
|
286
|
-
onChange: j,
|
|
287
|
-
value: c,
|
|
288
|
-
"data-dd-privacy": "mask",
|
|
289
|
-
"aria-invalid": o,
|
|
290
|
-
disabled: u,
|
|
291
|
-
"aria-label": s
|
|
292
|
-
}
|
|
293
|
-
),
|
|
294
|
-
/* @__PURE__ */ a("div", { className: H(), children: [
|
|
295
|
-
o && /* @__PURE__ */ e(
|
|
296
|
-
f,
|
|
297
|
-
{
|
|
298
|
-
src: "WarningCircleOutlined",
|
|
299
|
-
color: "content.form.invalid",
|
|
300
|
-
role: "img",
|
|
301
|
-
"aria-label": i.formatMessage({
|
|
302
|
-
id: "unity:component:form-field:form-input:error:alt",
|
|
303
|
-
defaultMessage: "Error"
|
|
304
|
-
})
|
|
305
|
-
}
|
|
306
|
-
),
|
|
307
|
-
q && /* @__PURE__ */ e(
|
|
308
|
-
me,
|
|
309
|
-
{
|
|
310
|
-
title: i.formatMessage({
|
|
311
|
-
id: "unity:component:common:clear:title",
|
|
312
|
-
defaultMessage: "Clear"
|
|
313
|
-
}),
|
|
314
|
-
color: "content.neutral.low",
|
|
315
|
-
icon: "CloseOutlined",
|
|
316
|
-
onPress: () => {
|
|
317
|
-
v?.();
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
)
|
|
321
|
-
] })
|
|
322
|
-
] })
|
|
323
|
-
]
|
|
324
|
-
}
|
|
325
|
-
) });
|
|
326
|
-
}
|
|
327
|
-
);
|
|
328
|
-
he.displayName = "PhoneNumberInput";
|
|
329
|
-
export {
|
|
330
|
-
he as PhoneNumberInput
|
|
331
|
-
};
|
|
1
|
+
import { Icon as e } from "../icon/Icon.js";
|
|
2
|
+
import { CircularIconButton as t } from "../icon-button/CircularIconButton.js";
|
|
3
|
+
import { Search as n } from "../search/Search.js";
|
|
4
|
+
import { PhoneNumberItem as r } from "./parts/PhoneNumberItem.js";
|
|
5
|
+
import i from "./unknownFlag.js";
|
|
6
|
+
import { forwardRef as a, useImperativeHandle as o, useRef as s, useState as c } from "react";
|
|
7
|
+
import { uyTv as l } from "@payfit/unity-themes";
|
|
8
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
|
+
import { Group as f } from "react-aria-components/Group";
|
|
10
|
+
import { useIntl as p } from "react-intl";
|
|
11
|
+
import { Button as m } from "react-aria-components/Button";
|
|
12
|
+
import { Separator as h } from "react-aria-components/Separator";
|
|
13
|
+
import { ListBox as g } from "react-aria-components/ListBox";
|
|
14
|
+
import { Popover as _ } from "react-aria-components/Popover";
|
|
15
|
+
import { Input as v } from "react-aria-components/Input";
|
|
16
|
+
import { Autocomplete as y, useFilter as b } from "react-aria-components/Autocomplete";
|
|
17
|
+
import { Select as x } from "react-aria-components/Select";
|
|
18
|
+
import { ListLayout as S, Virtualizer as C } from "react-aria-components/Virtualizer";
|
|
19
|
+
import { FlagImage as w, defaultCountries as T, parseCountry as E, usePhoneInput as D } from "react-international-phone";
|
|
20
|
+
//#region src/components/phone-number/PhoneNumberInput.tsx
|
|
21
|
+
var O = l({ slots: {
|
|
22
|
+
base: [
|
|
23
|
+
"uy:group",
|
|
24
|
+
"uy:flex uy:w-full uy:border uy:border-border-form-enabled uy:bg-surface-form-enabled uy:border-solid uy:focus-within:outline-none uy:focus-within:ring-2 uy:focus-within:ring-utility-focus-ring uy:focus-within:ring-offset-2",
|
|
25
|
+
"uy:data-[active=\"true\"]:data-[hovered=\"true\"]:border-border-form-hover uy:data-[active=\"true\"]:data-[hovered=\"true\"]:bg-surface-form-hover uy:data-[active=\"true\"]:data-[hovered=\"true\"]:text-content-form-hover",
|
|
26
|
+
"uy:data-[active=\"true\"]:data-[pressed=\"true\"]:border-border-form-pressed uy:data-[active=\"true\"]:data-[pressed=\"true\"]:bg-surface-form-pressed uy:data-[active=\"true\"]:data-[pressed=\"true\"]:text-content-form-pressed",
|
|
27
|
+
"uy:data-[active=\"true\"]:border-border-form-active",
|
|
28
|
+
"uy:data-[focus-visible=\"true\"]:outline-none uy:data-[focus-visible=\"true\"]:ring-2 uy:data-[focus-visible=\"true\"]:ring-utility-focus-ring uy:data-[focus-visible=\"true\"]:ring-offset-2",
|
|
29
|
+
"uy:data-[invalid=\"true\"]:border-border-form-error uy:data-[invalid=\"true\"]:bg-surface-form-error uy:data-[invalid=\"true\"]:text-content-form-danger-enabled",
|
|
30
|
+
"uy:data-[disabled=\"true\"]:border-border-form-disabled uy:data-[disabled=\"true\"]:bg-surface-form-disabled uy:data-[disabled=\"true\"]:text-content-form-disabled uy:data-[disabled=\"true\"]:cursor-not-allowed",
|
|
31
|
+
"uy:h-5.5 uy:rounded-100",
|
|
32
|
+
"uy:sm:h-500 uy:sm:rounded-75 "
|
|
33
|
+
],
|
|
34
|
+
prefix: [
|
|
35
|
+
"uy:border-r uy:border-solid uy:border-border-form-enabled uy:text-content-form-enabled uy:flex-grow-0 uy:pl-150 uy:pr-100 uy:group-data-[active=true]:border-border-form-active uy:cursor-pointer",
|
|
36
|
+
"uy:group-data-[invalid=\"true\"]:border-border-form-error",
|
|
37
|
+
"uy:group-data-[disabled=\"true\"]:border-border-form-disabled uy:group-data-[disabled=\"true\"]:text-content-form-disabled uy:data-[disabled=\"true\"]:cursor-not-allowed",
|
|
38
|
+
"uy:py-125",
|
|
39
|
+
"uy:sm:py-100"
|
|
40
|
+
],
|
|
41
|
+
inputWrapper: [
|
|
42
|
+
"uy:border-border-form-enabled uy:bg-surface-form-enabled uy:flex uy:gap-50 uy:flex-grow uy:flex-nowrap uy:px-150 uy:max-w-full uy:justify-between",
|
|
43
|
+
"uy:group-data-[invalid=\"true\"]:bg-surface-form-error",
|
|
44
|
+
"uy:group-data-[disabled=\"true\"]:bg-surface-form-disabled uy:data-[disabled=\"true\"]:cursor-not-allowed",
|
|
45
|
+
"uy:py-125 uy:rounded-100",
|
|
46
|
+
"uy:sm:py-100 uy:sm:rounded-75"
|
|
47
|
+
],
|
|
48
|
+
input: [
|
|
49
|
+
"uy:text-content-form-enabled uy:bg-surface-form-enabled uy:w-full uy:flex-1 uy:outline-none uy:typography-body uy:placeholder:text-content-neutral-lowest uy:min-w-0 uy:max-w-full uy:min-h-300",
|
|
50
|
+
"uy:group-data-[invalid=\"true\"]:bg-surface-form-error uy:group-data-[invalid=\"true\"]:text-content-danger-enabled",
|
|
51
|
+
"uy:group-data-[disabled=\"true\"]:bg-surface-form-disabled uy:group-data-[disabled=\"true\"]:text-content-form-disabled uy:data-[disabled=\"true\"]:cursor-not-allowed"
|
|
52
|
+
],
|
|
53
|
+
state: ["uy:flex uy:gap-50 uy:items-center uy:shrink-0"],
|
|
54
|
+
selectIcon: [""],
|
|
55
|
+
selectButton: ["uy:cursor-pointer uy:flex uy:gap-50 uy:items-center uy:outline-none", "uy:data-[disabled=\"true\"]:cursor-not-allowed"],
|
|
56
|
+
selectPopover: [
|
|
57
|
+
"uy:border uy:border-solid uy:border-border-neutral uy:w-[var(--trigger-width)] uy:bg-surface-neutral-enabled uy:shadow-300",
|
|
58
|
+
"uy:rounded-100",
|
|
59
|
+
"uy:sm:rounded-75"
|
|
60
|
+
],
|
|
61
|
+
selectListbox: ["uy:overflow-y-auto uy:overflow-x-hidden uy:max-h-[296px]"]
|
|
62
|
+
} }), k = a((a, l) => {
|
|
63
|
+
let k = p(), { onChange: A, value: j, defaultCountry: M = "unknown", onClearButtonPress: N, isInvalid: P = !1, isDisabled: F = !1, prefix: I = "+", "aria-label": L, defaultMask: R, charAfterDialCode: z, historySaveDebounceMS: B, disableCountryGuess: ee, forceDialCode: V, disableDialCodeAndPrefix: H, disableFormatting: U, searchInputAriaLabel: W, ...G } = a, [K, q] = c(!1), { contains: J } = b({ sensitivity: "base" }), Y = s(null);
|
|
64
|
+
o(l, () => Y.current, [Y]);
|
|
65
|
+
let { inputRef: X, inputValue: Z, handlePhoneValueChange: Q, country: $, setCountry: te, phone: ne } = D({
|
|
66
|
+
prefix: I,
|
|
67
|
+
defaultCountry: M,
|
|
68
|
+
value: j,
|
|
69
|
+
countries: [[
|
|
70
|
+
"",
|
|
71
|
+
"unknown",
|
|
72
|
+
"",
|
|
73
|
+
""
|
|
74
|
+
], ...T],
|
|
75
|
+
disableDialCodePrefill: !0,
|
|
76
|
+
defaultMask: R,
|
|
77
|
+
charAfterDialCode: z,
|
|
78
|
+
historySaveDebounceMS: B,
|
|
79
|
+
disableCountryGuess: ee,
|
|
80
|
+
forceDialCode: V,
|
|
81
|
+
disableDialCodeAndPrefix: H,
|
|
82
|
+
disableFormatting: U,
|
|
83
|
+
onChange: (e) => {
|
|
84
|
+
A?.($.iso2 === "unknown" ? "" : e.phone);
|
|
85
|
+
}
|
|
86
|
+
}), { base: re, prefix: ie, inputWrapper: ae, input: oe, selectPopover: se, selectListbox: ce, selectIcon: le, selectButton: ue, state: de } = O(), fe = Z.replace(ne, "").trim() !== "" && !F;
|
|
87
|
+
return /* @__PURE__ */ u("div", {
|
|
88
|
+
ref: Y,
|
|
89
|
+
children: /* @__PURE__ */ d(f, {
|
|
90
|
+
className: re(),
|
|
91
|
+
"aria-label": `${L}${j ? `, ${j}` : ""}`,
|
|
92
|
+
"aria-invalid": P,
|
|
93
|
+
"data-invalid": P,
|
|
94
|
+
"data-disabled": F,
|
|
95
|
+
"aria-disabled": F,
|
|
96
|
+
children: [/* @__PURE__ */ d(x, {
|
|
97
|
+
onOpenChange: (e) => {
|
|
98
|
+
q(e), e || setTimeout(() => {
|
|
99
|
+
X.current?.focus();
|
|
100
|
+
}, 0);
|
|
101
|
+
},
|
|
102
|
+
isDisabled: F,
|
|
103
|
+
value: $.iso2,
|
|
104
|
+
onChange: (e) => {
|
|
105
|
+
te(e);
|
|
106
|
+
},
|
|
107
|
+
className: ie(),
|
|
108
|
+
isInvalid: P,
|
|
109
|
+
children: [/* @__PURE__ */ d(m, {
|
|
110
|
+
"data-dd-privacy": "mask",
|
|
111
|
+
className: ue(),
|
|
112
|
+
"aria-label": k.formatMessage({
|
|
113
|
+
id: "unity:component:phone-number:country-selector:label",
|
|
114
|
+
defaultMessage: "Select country code, {country} {dialCode}"
|
|
115
|
+
}, {
|
|
116
|
+
country: $.name,
|
|
117
|
+
dialCode: $.dialCode
|
|
118
|
+
}),
|
|
119
|
+
children: [$.iso2 === "unknown" ? /* @__PURE__ */ u("img", {
|
|
120
|
+
"aria-hidden": "true",
|
|
121
|
+
src: i,
|
|
122
|
+
alt: "",
|
|
123
|
+
"data-dd-privacy": "mask",
|
|
124
|
+
className: "react-international-phone-flag-emoji",
|
|
125
|
+
width: 24,
|
|
126
|
+
height: 24
|
|
127
|
+
}) : /* @__PURE__ */ u(w, {
|
|
128
|
+
iso2: $.iso2,
|
|
129
|
+
alt: $.name,
|
|
130
|
+
size: 24,
|
|
131
|
+
"aria-hidden": "true",
|
|
132
|
+
"data-dd-privacy": "mask"
|
|
133
|
+
}), /* @__PURE__ */ u(e, {
|
|
134
|
+
className: le(),
|
|
135
|
+
"aria-hidden": "true",
|
|
136
|
+
src: K ? "CaretUpOutlined" : "CaretDownOutlined"
|
|
137
|
+
})]
|
|
138
|
+
}), /* @__PURE__ */ u(_, {
|
|
139
|
+
style: { "--trigger-width": `${Y.current?.offsetWidth}px` },
|
|
140
|
+
triggerRef: Y,
|
|
141
|
+
offset: 1,
|
|
142
|
+
containerPadding: 8,
|
|
143
|
+
className: se(),
|
|
144
|
+
children: /* @__PURE__ */ d(y, {
|
|
145
|
+
filter: J,
|
|
146
|
+
children: [
|
|
147
|
+
/* @__PURE__ */ u("div", {
|
|
148
|
+
className: "uy:m-100",
|
|
149
|
+
children: /* @__PURE__ */ u(n, {
|
|
150
|
+
label: W,
|
|
151
|
+
"data-dd-privacy": "mask"
|
|
152
|
+
})
|
|
153
|
+
}),
|
|
154
|
+
/* @__PURE__ */ u(h, { className: "uy:mx-100 uy:border-t uy:border-border-neutral uy:border-solid" }),
|
|
155
|
+
/* @__PURE__ */ u(C, {
|
|
156
|
+
layout: S,
|
|
157
|
+
layoutOptions: { padding: 8 },
|
|
158
|
+
children: /* @__PURE__ */ u(g, {
|
|
159
|
+
className: ce(),
|
|
160
|
+
items: T,
|
|
161
|
+
children: (e) => {
|
|
162
|
+
let t = E(e);
|
|
163
|
+
return /* @__PURE__ */ u(r, {
|
|
164
|
+
country: t,
|
|
165
|
+
id: t.iso2
|
|
166
|
+
}, t.iso2);
|
|
167
|
+
}
|
|
168
|
+
})
|
|
169
|
+
})
|
|
170
|
+
]
|
|
171
|
+
})
|
|
172
|
+
})]
|
|
173
|
+
}), /* @__PURE__ */ d("div", {
|
|
174
|
+
className: ae(),
|
|
175
|
+
children: [/* @__PURE__ */ u(v, {
|
|
176
|
+
ref: X,
|
|
177
|
+
...G,
|
|
178
|
+
className: oe(),
|
|
179
|
+
type: "tel",
|
|
180
|
+
onChange: Q,
|
|
181
|
+
value: Z,
|
|
182
|
+
"data-dd-privacy": "mask",
|
|
183
|
+
"aria-invalid": P,
|
|
184
|
+
disabled: F,
|
|
185
|
+
"aria-label": L
|
|
186
|
+
}), /* @__PURE__ */ d("div", {
|
|
187
|
+
className: de(),
|
|
188
|
+
children: [P && /* @__PURE__ */ u(e, {
|
|
189
|
+
src: "WarningCircleOutlined",
|
|
190
|
+
color: "content.form.invalid",
|
|
191
|
+
role: "img",
|
|
192
|
+
"aria-label": k.formatMessage({
|
|
193
|
+
id: "unity:component:form-field:form-input:error:alt",
|
|
194
|
+
defaultMessage: "Error"
|
|
195
|
+
})
|
|
196
|
+
}), fe && /* @__PURE__ */ u(t, {
|
|
197
|
+
title: k.formatMessage({
|
|
198
|
+
id: "unity:component:common:clear:title",
|
|
199
|
+
defaultMessage: "Clear"
|
|
200
|
+
}),
|
|
201
|
+
color: "content.neutral.low",
|
|
202
|
+
icon: "CloseOutlined",
|
|
203
|
+
onPress: () => {
|
|
204
|
+
N?.();
|
|
205
|
+
}
|
|
206
|
+
})]
|
|
207
|
+
})]
|
|
208
|
+
})]
|
|
209
|
+
})
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
k.displayName = "PhoneNumberInput";
|
|
213
|
+
//#endregion
|
|
214
|
+
export { k as PhoneNumberInput };
|
|
@@ -1,33 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
);
|
|
1
|
+
import { PhoneNumberInput as e } from "./PhoneNumberInput.js";
|
|
2
|
+
import { useFieldContext as t } from "../../hooks/tanstack-form-context.js";
|
|
3
|
+
import { useFieldA11yContext as n } from "../form-field/TanstackFormField.context.js";
|
|
4
|
+
import { forwardRef as r } from "react";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/phone-number/TanstackPhoneNumberInput.tsx
|
|
7
|
+
var a = r(({ onChange: r, onBlur: a, onClearButtonPress: o, isDisabled: s, ...c }, l) => {
|
|
8
|
+
let u = t(), d = n(), f = u.state.meta.isTouched && !u.state.meta.isValid, p = [d.helperTextId, d.feedbackTextId].filter(Boolean).join(" ");
|
|
9
|
+
return /* @__PURE__ */ i(e, {
|
|
10
|
+
ref: l,
|
|
11
|
+
...c,
|
|
12
|
+
value: u.state.value ?? "",
|
|
13
|
+
onChange: (e) => {
|
|
14
|
+
u.handleChange(e), r?.(e);
|
|
15
|
+
},
|
|
16
|
+
onBlur: (e) => {
|
|
17
|
+
u.handleBlur(), a?.(e);
|
|
18
|
+
},
|
|
19
|
+
onClearButtonPress: () => {
|
|
20
|
+
u.setValue(""), o?.();
|
|
21
|
+
},
|
|
22
|
+
isDisabled: s,
|
|
23
|
+
isInvalid: f,
|
|
24
|
+
"aria-labelledby": d.labelId,
|
|
25
|
+
"aria-describedby": p.length > 0 ? p : void 0,
|
|
26
|
+
"aria-details": d.contextualLinkId
|
|
27
|
+
});
|
|
30
28
|
});
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { a as TanstackPhoneNumberInput };
|