@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,78 @@
|
|
|
1
|
+
import { userEvent as c, within as o, expect as n, waitFor as r, screen as w } from "storybook/test";
|
|
2
|
+
const f = (i) => {
|
|
3
|
+
const s = async ({ title: a }) => await r(() => {
|
|
4
|
+
const t = w.queryByRole("dialog", { name: a }) ?? w.queryByRole("alertdialog", { name: a });
|
|
5
|
+
if (!t)
|
|
6
|
+
throw new Error(`Dialog with title: "${a}" not found in the page`);
|
|
7
|
+
return t;
|
|
8
|
+
}), y = async (a, t) => {
|
|
9
|
+
await c.click(
|
|
10
|
+
o(a).getByRole("button", {
|
|
11
|
+
name: t
|
|
12
|
+
}),
|
|
13
|
+
{ delay: 100 }
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
return {
|
|
17
|
+
findDialog: s,
|
|
18
|
+
closeDialog: async ({
|
|
19
|
+
title: a,
|
|
20
|
+
closeButtonLabel: t
|
|
21
|
+
}) => {
|
|
22
|
+
await i.step("Close dialog", async () => {
|
|
23
|
+
const e = await s({ title: a });
|
|
24
|
+
await y(e, t);
|
|
25
|
+
});
|
|
26
|
+
},
|
|
27
|
+
assertDialogIsClosed: async (a) => {
|
|
28
|
+
await r(
|
|
29
|
+
async () => {
|
|
30
|
+
await n(a).not.toBeInTheDocument();
|
|
31
|
+
},
|
|
32
|
+
{ timeout: 1e3 }
|
|
33
|
+
);
|
|
34
|
+
},
|
|
35
|
+
assertElementExistsInDialog: async ({
|
|
36
|
+
title: a,
|
|
37
|
+
content: t,
|
|
38
|
+
primaryActionLabel: e,
|
|
39
|
+
secondaryActionLabel: g
|
|
40
|
+
}) => {
|
|
41
|
+
const l = await s({ title: a });
|
|
42
|
+
t && await i.step(`Check if "${t}" is in the dialog`, async () => {
|
|
43
|
+
await n(o(l).getByText(t)).toBeInTheDocument();
|
|
44
|
+
}), e && await i.step(
|
|
45
|
+
`Check if "${e}" is in the dialog`,
|
|
46
|
+
async () => {
|
|
47
|
+
await n(
|
|
48
|
+
o(l).getByRole("button", { name: e })
|
|
49
|
+
).toBeInTheDocument();
|
|
50
|
+
}
|
|
51
|
+
), g && await i.step(
|
|
52
|
+
`Check if "${g}" is in the dialog`,
|
|
53
|
+
async () => {
|
|
54
|
+
await n(
|
|
55
|
+
o(l).getByRole("button", { name: g })
|
|
56
|
+
).toBeInTheDocument();
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
},
|
|
60
|
+
triggerPrimaryAction: async ({
|
|
61
|
+
title: a,
|
|
62
|
+
primaryActionLabel: t
|
|
63
|
+
}) => {
|
|
64
|
+
const e = await s({ title: a });
|
|
65
|
+
await i.step(
|
|
66
|
+
`Trigger the primary action "${t}" of the dialog`,
|
|
67
|
+
async () => {
|
|
68
|
+
await c.click(
|
|
69
|
+
o(e).getByRole("button", { name: t })
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export {
|
|
77
|
+
f as getTestingUtilsDialog
|
|
78
|
+
};
|
|
@@ -8,9 +8,11 @@ export declare const errorState: import('tailwind-variants').TVReturnType<{
|
|
|
8
8
|
h2?: import('tailwind-merge').ClassNameValue;
|
|
9
9
|
h3?: import('tailwind-merge').ClassNameValue;
|
|
10
10
|
h4?: import('tailwind-merge').ClassNameValue;
|
|
11
|
+
container?: import('tailwind-merge').ClassNameValue;
|
|
11
12
|
base?: import('tailwind-merge').ClassNameValue;
|
|
12
13
|
icon?: import('tailwind-merge').ClassNameValue;
|
|
13
14
|
description?: import('tailwind-merge').ClassNameValue;
|
|
15
|
+
wrapper?: import('tailwind-merge').ClassNameValue;
|
|
14
16
|
illustration?: import('tailwind-merge').ClassNameValue;
|
|
15
17
|
informationContainer?: import('tailwind-merge').ClassNameValue;
|
|
16
18
|
information?: import('tailwind-merge').ClassNameValue;
|
|
@@ -24,9 +26,11 @@ export declare const errorState: import('tailwind-variants').TVReturnType<{
|
|
|
24
26
|
h2?: import('tailwind-merge').ClassNameValue;
|
|
25
27
|
h3?: import('tailwind-merge').ClassNameValue;
|
|
26
28
|
h4?: import('tailwind-merge').ClassNameValue;
|
|
29
|
+
container?: import('tailwind-merge').ClassNameValue;
|
|
27
30
|
base?: import('tailwind-merge').ClassNameValue;
|
|
28
31
|
icon?: import('tailwind-merge').ClassNameValue;
|
|
29
32
|
description?: import('tailwind-merge').ClassNameValue;
|
|
33
|
+
wrapper?: import('tailwind-merge').ClassNameValue;
|
|
30
34
|
illustration?: import('tailwind-merge').ClassNameValue;
|
|
31
35
|
informationContainer?: import('tailwind-merge').ClassNameValue;
|
|
32
36
|
information?: import('tailwind-merge').ClassNameValue;
|
|
@@ -34,6 +38,8 @@ export declare const errorState: import('tailwind-variants').TVReturnType<{
|
|
|
34
38
|
};
|
|
35
39
|
};
|
|
36
40
|
} | {}, {
|
|
41
|
+
container: string[];
|
|
42
|
+
wrapper: string[];
|
|
37
43
|
base: string[];
|
|
38
44
|
illustration: string[];
|
|
39
45
|
icon: string[];
|
|
@@ -52,9 +58,11 @@ export declare const errorState: import('tailwind-variants').TVReturnType<{
|
|
|
52
58
|
h2?: import('tailwind-merge').ClassNameValue;
|
|
53
59
|
h3?: import('tailwind-merge').ClassNameValue;
|
|
54
60
|
h4?: import('tailwind-merge').ClassNameValue;
|
|
61
|
+
container?: import('tailwind-merge').ClassNameValue;
|
|
55
62
|
base?: import('tailwind-merge').ClassNameValue;
|
|
56
63
|
icon?: import('tailwind-merge').ClassNameValue;
|
|
57
64
|
description?: import('tailwind-merge').ClassNameValue;
|
|
65
|
+
wrapper?: import('tailwind-merge').ClassNameValue;
|
|
58
66
|
illustration?: import('tailwind-merge').ClassNameValue;
|
|
59
67
|
informationContainer?: import('tailwind-merge').ClassNameValue;
|
|
60
68
|
information?: import('tailwind-merge').ClassNameValue;
|
|
@@ -62,6 +70,8 @@ export declare const errorState: import('tailwind-variants').TVReturnType<{
|
|
|
62
70
|
};
|
|
63
71
|
};
|
|
64
72
|
} | {}, {
|
|
73
|
+
container: string[];
|
|
74
|
+
wrapper: string[];
|
|
65
75
|
base: string[];
|
|
66
76
|
illustration: string[];
|
|
67
77
|
icon: string[];
|
|
@@ -74,6 +84,8 @@ export declare const errorState: import('tailwind-variants').TVReturnType<{
|
|
|
74
84
|
h4: string[];
|
|
75
85
|
description: string[];
|
|
76
86
|
}, import('tailwind-variants').TVReturnType<unknown, {
|
|
87
|
+
container: string[];
|
|
88
|
+
wrapper: string[];
|
|
77
89
|
base: string[];
|
|
78
90
|
illustration: string[];
|
|
79
91
|
icon: string[];
|
|
@@ -163,7 +175,7 @@ interface _404ErrorStateProps extends ErrorStateBaseProps {
|
|
|
163
175
|
/**
|
|
164
176
|
* No error object needed for 404 states.
|
|
165
177
|
*/
|
|
166
|
-
error
|
|
178
|
+
error?: never;
|
|
167
179
|
}
|
|
168
180
|
export type ErrorStateProps = KnownErrorStateProps | UnknownErrorStateProps | _404ErrorStateProps;
|
|
169
181
|
/**
|
|
@@ -1,16 +1,26 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Illustration as
|
|
4
|
-
import { useIntl as
|
|
5
|
-
import { tv as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
1
|
+
import { jsx as e, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as J, useRef as K, useCallback as O } from "react";
|
|
3
|
+
import { Illustration as U } from "@payfit/unity-illustrations";
|
|
4
|
+
import { useIntl as V } from "react-intl";
|
|
5
|
+
import { tv as W } from "tailwind-variants";
|
|
6
|
+
import { useContainerQueryLevel as X } from "../../hooks/use-container-query-level.js";
|
|
7
|
+
import { Button as h } from "../button/Button.js";
|
|
8
|
+
import { Code as Y } from "../code/Code.js";
|
|
9
|
+
import { Icon as Z } from "../icon/Icon.js";
|
|
10
|
+
import { Text as r } from "../text/Text.js";
|
|
11
|
+
import { initConfig as _ } from "./initConfig.js";
|
|
12
|
+
import { Collapsible as $ } from "./parts/Collapsible.js";
|
|
13
|
+
const ee = W({
|
|
13
14
|
slots: {
|
|
15
|
+
container: [
|
|
16
|
+
"uy:@container uy:w-full uy:h-full uy:content-center uy:flex-1"
|
|
17
|
+
],
|
|
18
|
+
wrapper: [
|
|
19
|
+
"uy:border-solid uy:border-border-neutral uy:border uy:rounded-200 uy:p-300",
|
|
20
|
+
"uy:@section:py-600 uy:@section:px-auto",
|
|
21
|
+
"uy:@page:border-0 uy:@page:py-auto uy:@page:px-auto",
|
|
22
|
+
"uy:@app:border-0 uy:@app:py-auto uy:@app:px-auto"
|
|
23
|
+
],
|
|
14
24
|
base: [
|
|
15
25
|
"uy:max-w-[704px] uy:flex uy:flex-col uy:items-center uy:justify-center uy:gap-250 uy:w-full uy:justify-self-center"
|
|
16
26
|
],
|
|
@@ -19,9 +29,9 @@ const Q = G({
|
|
|
19
29
|
//common but start from section level
|
|
20
30
|
"uy:hidden",
|
|
21
31
|
//component
|
|
22
|
-
"",
|
|
32
|
+
"uy:@page:w-[200px]",
|
|
23
33
|
// page
|
|
24
|
-
"uy:@section:w-[
|
|
34
|
+
"uy:@section:w-[200px]",
|
|
25
35
|
//section
|
|
26
36
|
"uy:@app:w-[240px]"
|
|
27
37
|
//app
|
|
@@ -59,95 +69,126 @@ const Q = G({
|
|
|
59
69
|
// only on component
|
|
60
70
|
description: ["uy:hidden uy:@section:block uy:@section:w-full"]
|
|
61
71
|
}
|
|
62
|
-
}),
|
|
63
|
-
const
|
|
64
|
-
return /* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
/* @__PURE__ */
|
|
72
|
+
}), ne = (t, n) => {
|
|
73
|
+
const i = t.detailDescription ?? n?.detailDescription;
|
|
74
|
+
return /* @__PURE__ */ u($, { children: [
|
|
75
|
+
/* @__PURE__ */ e("div", { className: "uy:mb-200", children: i }),
|
|
76
|
+
/* @__PURE__ */ e(Y, { children: t.error.message })
|
|
67
77
|
] });
|
|
68
|
-
},
|
|
69
|
-
const
|
|
70
|
-
return /* @__PURE__ */
|
|
71
|
-
|
|
78
|
+
}, te = (t, n) => {
|
|
79
|
+
const i = t.backButtonLabel ?? n?.backButtonLabel;
|
|
80
|
+
return /* @__PURE__ */ e("div", { className: "uy:mt-200 uy:@section:block uy:hidden", children: /* @__PURE__ */ e(
|
|
81
|
+
h,
|
|
72
82
|
{
|
|
73
83
|
onClick: () => {
|
|
74
84
|
window.history.go(-1);
|
|
75
85
|
},
|
|
76
86
|
color: "primary",
|
|
77
87
|
variant: "ghost",
|
|
78
|
-
children:
|
|
88
|
+
children: i
|
|
79
89
|
}
|
|
80
90
|
) });
|
|
81
|
-
},
|
|
91
|
+
}, oe = J((t, n) => {
|
|
82
92
|
const {
|
|
83
|
-
icon:
|
|
84
|
-
illustration:
|
|
85
|
-
onButtonPress:
|
|
86
|
-
buttonLabel:
|
|
87
|
-
mainTitle:
|
|
88
|
-
mainDescription:
|
|
89
|
-
mainDescriptionComponent:
|
|
90
|
-
type:
|
|
91
|
-
error:
|
|
92
|
-
role:
|
|
93
|
+
icon: i,
|
|
94
|
+
illustration: b,
|
|
95
|
+
onButtonPress: v,
|
|
96
|
+
buttonLabel: g,
|
|
97
|
+
mainTitle: x,
|
|
98
|
+
mainDescription: k,
|
|
99
|
+
mainDescriptionComponent: w,
|
|
100
|
+
type: m,
|
|
101
|
+
error: C,
|
|
102
|
+
role: N = "status"
|
|
93
103
|
} = t, {
|
|
94
|
-
base:
|
|
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
|
-
|
|
104
|
+
base: D,
|
|
105
|
+
container: E,
|
|
106
|
+
wrapper: B,
|
|
107
|
+
illustration: L,
|
|
108
|
+
icon: M,
|
|
109
|
+
informationContainer: j,
|
|
110
|
+
information: I,
|
|
111
|
+
informationComponent: T,
|
|
112
|
+
description: R,
|
|
113
|
+
h1: S,
|
|
114
|
+
h2: P,
|
|
115
|
+
h3: z,
|
|
116
|
+
h4: Q
|
|
117
|
+
} = ee(), l = V(), q = _(l), y = K(null), { level: d } = X({ ref: y }), A = O(
|
|
118
|
+
(c) => {
|
|
119
|
+
y.current = c, n && (typeof n == "function" ? n(c) : n.current = c);
|
|
120
|
+
},
|
|
121
|
+
[n]
|
|
122
|
+
);
|
|
123
|
+
let a = m === "404" ? "404" : "unknown";
|
|
124
|
+
m === "generic" && C && (a = "known");
|
|
125
|
+
const o = q.get(a), p = b ?? o?.illustration, f = i ?? o?.icon, F = g ?? o?.buttonLabel, s = x ?? o?.mainTitle, G = k ?? o?.mainDescription, H = w ?? o?.mainDescriptionComponent;
|
|
126
|
+
return /* @__PURE__ */ e(
|
|
127
|
+
"div",
|
|
128
|
+
{
|
|
129
|
+
role: N,
|
|
130
|
+
className: E(),
|
|
131
|
+
ref: A,
|
|
132
|
+
"data-container-level": d,
|
|
133
|
+
children: /* @__PURE__ */ e("div", { className: B(), children: /* @__PURE__ */ u("div", { className: D(), children: [
|
|
134
|
+
p && /* @__PURE__ */ e(
|
|
135
|
+
U,
|
|
136
|
+
{
|
|
137
|
+
src: p,
|
|
138
|
+
variant: "picture",
|
|
139
|
+
alt: l.formatMessage({
|
|
140
|
+
id: "unity:component:error-state:common:illustration:alt",
|
|
141
|
+
defaultMessage: "Error states"
|
|
142
|
+
}),
|
|
143
|
+
className: L(),
|
|
144
|
+
isDecorative: !0
|
|
145
|
+
}
|
|
146
|
+
),
|
|
147
|
+
f && /* @__PURE__ */ e(
|
|
148
|
+
Z,
|
|
149
|
+
{
|
|
150
|
+
src: f,
|
|
151
|
+
size: 24,
|
|
152
|
+
color: "content.neutral.low",
|
|
153
|
+
alt: l.formatMessage({
|
|
154
|
+
id: "unity:component:error-state:common:icon:alt",
|
|
155
|
+
defaultMessage: "Error states"
|
|
156
|
+
}),
|
|
157
|
+
className: M()
|
|
158
|
+
}
|
|
159
|
+
),
|
|
160
|
+
/* @__PURE__ */ u("div", { className: j(), children: [
|
|
161
|
+
/* @__PURE__ */ e(r, { asElement: "h1", variant: "h1", className: S(), children: s }),
|
|
162
|
+
/* @__PURE__ */ e(r, { asElement: "h2", variant: "h2", className: P(), children: s }),
|
|
163
|
+
/* @__PURE__ */ e(r, { asElement: "h3", variant: "h3", className: z(), children: s }),
|
|
164
|
+
/* @__PURE__ */ e(r, { asElement: "h4", variant: "h4", className: Q(), children: s }),
|
|
165
|
+
/* @__PURE__ */ e(r, { asElement: "p", variant: "body", className: I(), children: G }),
|
|
166
|
+
/* @__PURE__ */ e(
|
|
167
|
+
r,
|
|
168
|
+
{
|
|
169
|
+
asElement: "p",
|
|
170
|
+
variant: "body",
|
|
171
|
+
className: T(),
|
|
172
|
+
children: H
|
|
173
|
+
}
|
|
174
|
+
)
|
|
175
|
+
] }),
|
|
176
|
+
/* @__PURE__ */ e(
|
|
177
|
+
h,
|
|
178
|
+
{
|
|
179
|
+
variant: d === "component" ? "ghost" : "primary",
|
|
180
|
+
onPress: v,
|
|
181
|
+
children: F
|
|
182
|
+
}
|
|
183
|
+
),
|
|
184
|
+
a === "unknown" && te(t, o),
|
|
185
|
+
a === "known" && /* @__PURE__ */ e("div", { className: R(), children: ne(t, o) })
|
|
186
|
+
] }) })
|
|
187
|
+
}
|
|
188
|
+
);
|
|
148
189
|
});
|
|
149
|
-
|
|
190
|
+
oe.displayName = "ErrorState";
|
|
150
191
|
export {
|
|
151
|
-
|
|
152
|
-
|
|
192
|
+
oe as ErrorState,
|
|
193
|
+
ee as errorState
|
|
153
194
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import t from "@payfit/unity-illustrations/assets/EmptyStateIncidentPanel";
|
|
3
3
|
import a from "@payfit/unity-illustrations/assets/EmptyStateResearch";
|
|
4
|
-
import {
|
|
4
|
+
import { RawLink as n } from "../link/RawLink.js";
|
|
5
5
|
const c = (e) => /* @__PURE__ */ new Map([
|
|
6
6
|
[
|
|
7
7
|
"known",
|
|
@@ -13,6 +13,11 @@ export declare const fieldset: import('tailwind-variants').TVReturnType<{
|
|
|
13
13
|
fieldsContainer: string;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
+
disableEndMargin: {
|
|
17
|
+
true: {
|
|
18
|
+
base: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
16
21
|
}, {
|
|
17
22
|
base: string;
|
|
18
23
|
legend: string;
|
|
@@ -31,6 +36,11 @@ export declare const fieldset: import('tailwind-variants').TVReturnType<{
|
|
|
31
36
|
fieldsContainer: string;
|
|
32
37
|
};
|
|
33
38
|
};
|
|
39
|
+
disableEndMargin: {
|
|
40
|
+
true: {
|
|
41
|
+
base: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
34
44
|
}, {
|
|
35
45
|
base: string;
|
|
36
46
|
legend: string;
|
|
@@ -49,6 +59,11 @@ export declare const fieldset: import('tailwind-variants').TVReturnType<{
|
|
|
49
59
|
fieldsContainer: string;
|
|
50
60
|
};
|
|
51
61
|
};
|
|
62
|
+
disableEndMargin: {
|
|
63
|
+
true: {
|
|
64
|
+
base: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
52
67
|
}, {
|
|
53
68
|
base: string;
|
|
54
69
|
legend: string;
|
|
@@ -68,6 +83,10 @@ export interface FieldsetProps extends PropsWithChildren<VariantProps<typeof fie
|
|
|
68
83
|
* Whether to hide the legend of the fieldset.
|
|
69
84
|
*/
|
|
70
85
|
isLegendHidden?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Whether to disable the end margin of the fieldset.
|
|
88
|
+
*/
|
|
89
|
+
disableEndMargin?: boolean;
|
|
71
90
|
}
|
|
72
91
|
/**
|
|
73
92
|
* The `Fieldset` component groups related form fields together with an accessible structure.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { uyTv as
|
|
4
|
-
import { useId as
|
|
5
|
-
const
|
|
1
|
+
import { jsxs as m, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as g } from "react";
|
|
3
|
+
import { uyTv as b } from "@payfit/unity-themes";
|
|
4
|
+
import { useId as x } from "react-aria";
|
|
5
|
+
const h = b({
|
|
6
6
|
slots: {
|
|
7
7
|
base: "uy:p-0 uy:m-0 uy:[&+&]:mt-500 uy:[&:last-of-type]:mb-500",
|
|
8
8
|
legend: "uy:typography-h3 uy:text-content-neutral",
|
|
@@ -21,46 +21,52 @@ const x = g({
|
|
|
21
21
|
description: "uy:block",
|
|
22
22
|
fieldsContainer: "uy:mt-300"
|
|
23
23
|
}
|
|
24
|
+
},
|
|
25
|
+
disableEndMargin: {
|
|
26
|
+
true: {
|
|
27
|
+
base: "uy:[&:last-of-type]:mb-0"
|
|
28
|
+
}
|
|
24
29
|
}
|
|
25
30
|
},
|
|
26
31
|
defaultVariants: {
|
|
27
|
-
isLegendHidden: !1
|
|
32
|
+
isLegendHidden: !1,
|
|
33
|
+
disableEndMargin: !1
|
|
28
34
|
}
|
|
29
|
-
}),
|
|
30
|
-
({ children:
|
|
31
|
-
const
|
|
32
|
-
base:
|
|
33
|
-
legend:
|
|
34
|
-
description:
|
|
35
|
-
fieldsContainer:
|
|
36
|
-
} =
|
|
37
|
-
return /* @__PURE__ */
|
|
35
|
+
}), v = g(
|
|
36
|
+
({ children: t, ...d }, n) => {
|
|
37
|
+
const i = x(), { legend: l, description: e, isLegendHidden: a, disableEndMargin: r, ...o } = d, {
|
|
38
|
+
base: y,
|
|
39
|
+
legend: c,
|
|
40
|
+
description: u,
|
|
41
|
+
fieldsContainer: p
|
|
42
|
+
} = h({ isLegendHidden: a, disableEndMargin: r }), f = e ? `${i}-fieldset-description` : void 0;
|
|
43
|
+
return /* @__PURE__ */ m(
|
|
38
44
|
"fieldset",
|
|
39
45
|
{
|
|
40
46
|
"data-dd-privacy": "allow",
|
|
41
|
-
...
|
|
47
|
+
...o,
|
|
42
48
|
ref: n,
|
|
43
|
-
className:
|
|
44
|
-
"aria-describedby":
|
|
49
|
+
className: y(),
|
|
50
|
+
"aria-describedby": f,
|
|
45
51
|
children: [
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
e && /* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ s("legend", { className: c(), children: l }),
|
|
53
|
+
e && /* @__PURE__ */ s(
|
|
48
54
|
"span",
|
|
49
55
|
{
|
|
50
|
-
id: `${
|
|
56
|
+
id: `${i}-fieldset-description`,
|
|
51
57
|
"data-fieldset-slot": "description",
|
|
52
|
-
className:
|
|
58
|
+
className: u(),
|
|
53
59
|
children: e
|
|
54
60
|
}
|
|
55
61
|
),
|
|
56
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ s("div", { className: p(), children: t })
|
|
57
63
|
]
|
|
58
64
|
}
|
|
59
65
|
);
|
|
60
66
|
}
|
|
61
67
|
);
|
|
62
|
-
|
|
68
|
+
v.displayName = "Fieldset";
|
|
63
69
|
export {
|
|
64
|
-
|
|
65
|
-
|
|
70
|
+
v as Fieldset,
|
|
71
|
+
h as fieldset
|
|
66
72
|
};
|