@payfit/unity-components 2.0.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/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-menu/parts/AppMenuFooter.js +23 -23
- package/dist/esm/components/app-menu/parts/AppMenuHeader.d.ts +1 -1
- package/dist/esm/components/app-menu/parts/AppMenuHeader.js +9 -9
- 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.variant.js +1 -1
- 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/parts/PaginationNavButton.js +1 -1
- package/dist/esm/components/client-side-pagination/parts/RawPaginationLink.js +10 -10
- 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.js +7 -7
- 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/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/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 +2 -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/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/RawLink.js +38 -31
- 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/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/RawNavItem.js +6 -6
- 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 +12 -11
- package/dist/esm/components/pagination/parts/RawPaginationLink.js +22 -22
- package/dist/esm/components/pagination/parts/RawPaginationNext.js +13 -13
- package/dist/esm/components/pagination/parts/RawPaginationPrevious.js +10 -10
- 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 +53 -45
- 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-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/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 +93 -0
- package/dist/esm/components/table/Table.js +135 -107
- package/dist/esm/components/table/parts/TableBody.js +83 -21
- 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.js +1 -1
- package/dist/esm/components/table/parts/TableRow.js +1 -0
- 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/task-menu/parts/RawSubTask.js +26 -26
- package/dist/esm/components/task-menu/parts/RawTask.js +32 -28
- 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 +41 -31
- 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-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 +44 -20
- package/dist/esm/index.js +457 -394
- package/dist/esm/index.storybook-testing.d.ts +3 -0
- package/dist/esm/integrations/tanstack-router/components/form-contextual-link/FormContextualLink.d.ts +6 -1
- package/dist/esm/integrations/tanstack-router/components/form-contextual-link/TanstackFormContextualLink.d.ts +43 -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/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/index.d.ts +3 -0
- package/dist/esm/integrations/tanstack-router/utils/decorators.d.ts +1 -1
- package/dist/esm/integrations/tanstack-router.js +32 -26
- package/dist/esm/mocks/employees.d.ts +1 -5
- package/dist/esm/storybook-testing.js +8 -2
- package/dist/esm/storybook-utilities/previewTransform.d.ts +1 -0
- 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 +21 -8
- package/i18n/es-ES.json +23 -10
- package/i18n/fr-FR.json +24 -11
- package/package.json +41 -42
- package/dist/esm/components/multi-select/Multiselect.types.d.ts +0 -109
- 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
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { jsxs as t, jsx as
|
|
1
|
+
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as k } from "react";
|
|
3
3
|
import { uyTv as z } from "@payfit/unity-themes";
|
|
4
4
|
import { NumberField as F, Group as G, Input as T } from "react-aria-components";
|
|
5
5
|
import { Icon as W } from "../icon/Icon.js";
|
|
6
6
|
import "@payfit/unity-icons";
|
|
7
7
|
import { useIntl as q } from "react-intl";
|
|
8
|
-
import { CircularIconButton as
|
|
8
|
+
import { CircularIconButton as s } from "../icon-button/CircularIconButton.js";
|
|
9
9
|
import { Spinner as A } from "../spinner/Spinner.js";
|
|
10
10
|
const H = z({
|
|
11
11
|
slots: {
|
|
12
12
|
base: [
|
|
13
|
-
"uy:group uy:flex uy:h-500 uy:border uy:border-solid uy:rounded-75",
|
|
13
|
+
"uy:group uy:flex uy:h-5.5 uy:sm:h-500 uy:border uy:border-solid uy:rounded-100 uy:sm:rounded-75",
|
|
14
14
|
"uy:focus-within:outline-none uy:focus-within:ring-2 uy:focus-within:ring-utility-focus-ring uy:focus-within:ring-offset-2",
|
|
15
15
|
"uy:active:border-border-form-active"
|
|
16
16
|
],
|
|
17
17
|
wrapper: [
|
|
18
|
-
"uy:flex uy:gap-50 uy:flex-grow uy:flex-nowrap uy:pt-100 uy:pb-100 uy:pl-150 uy:pr-150 uy:rounded-75 uy:max-w-full uy:justify-between uy:items-center"
|
|
18
|
+
"uy:flex uy:gap-50 uy:flex-grow uy:flex-nowrap uy:pt-125 uy:sm:pt-100 uy:pb-125 uy:sm:pb-100 uy:pl-150 uy:pr-150 uy:rounded-100 uy:sm:rounded-75 uy:max-w-full uy:justify-between uy:items-center"
|
|
19
19
|
],
|
|
20
20
|
input: [
|
|
21
21
|
"uy:w-full uy:flex-1 uy:outline-none uy:typography-body uy:min-w-0 uy:max-w-full",
|
|
22
22
|
"uy:placeholder:text-content-neutral-lowest"
|
|
23
23
|
],
|
|
24
24
|
prefix: [
|
|
25
|
-
"uy:flex-grow-0 uy:content-center uy:pt-100 uy:pb-100 uy:pl-150 uy:pr-150 uy:border-r uy:border-solid uy:rounded-l-75",
|
|
25
|
+
"uy:flex-grow-0 uy:content-center uy:pt-125 uy:sm:pt-100 uy:pb-125 uy:sm:pb-100 uy:pl-150 uy:pr-150 uy:border-r uy:border-solid uy:rounded-l-100 uy:sm:rounded-l-75",
|
|
26
26
|
"uy:active:border-border-form-active"
|
|
27
27
|
],
|
|
28
28
|
suffix: [
|
|
29
|
-
"uy:flex-grow-0 uy:content-center uy:pt-100 uy:pb-100 uy:pl-150 uy:pr-150 uy:border-l uy:border-solid uy:rounded-r-75",
|
|
29
|
+
"uy:flex-grow-0 uy:content-center uy:pt-125 uy:sm:pt-100 uy:pb-125 uy:sm:pb-100 uy:pl-150 uy:pr-150 uy:border-l uy:border-solid uy:rounded-r-100 uy:sm:rounded-r-75",
|
|
30
30
|
"uy:active:border-border-form-active"
|
|
31
31
|
],
|
|
32
32
|
state: [
|
|
@@ -83,23 +83,23 @@ const H = z({
|
|
|
83
83
|
}
|
|
84
84
|
}), J = k(
|
|
85
85
|
({
|
|
86
|
-
withControls:
|
|
86
|
+
withControls: i = !1,
|
|
87
87
|
defaultValue: u,
|
|
88
88
|
formatOptions: p,
|
|
89
|
-
isDisabled:
|
|
90
|
-
isInvalid:
|
|
89
|
+
isDisabled: y,
|
|
90
|
+
isInvalid: b,
|
|
91
91
|
isLoading: a,
|
|
92
92
|
isReadOnly: d,
|
|
93
93
|
isRequired: g,
|
|
94
94
|
maxValue: n,
|
|
95
95
|
minValue: l,
|
|
96
|
-
prefix:
|
|
96
|
+
prefix: f,
|
|
97
97
|
onBlur: x,
|
|
98
98
|
onChange: w,
|
|
99
99
|
onClearButtonPress: v,
|
|
100
100
|
step: h,
|
|
101
101
|
suffix: m,
|
|
102
|
-
value:
|
|
102
|
+
value: e,
|
|
103
103
|
...N
|
|
104
104
|
}, c) => {
|
|
105
105
|
const {
|
|
@@ -110,20 +110,20 @@ const H = z({
|
|
|
110
110
|
suffix: E,
|
|
111
111
|
state: O,
|
|
112
112
|
controls: S
|
|
113
|
-
} = H({ isReadOnly: d }), o = q(), B =
|
|
113
|
+
} = H({ isReadOnly: d }), o = q(), B = e !== void 0 && !isNaN(e), D = u !== void 0 && !isNaN(u), P = (B || D) && !i && !a && !d && !y;
|
|
114
114
|
return /* @__PURE__ */ t(
|
|
115
115
|
F,
|
|
116
116
|
{
|
|
117
117
|
ref: c,
|
|
118
118
|
className: M(),
|
|
119
|
-
value:
|
|
119
|
+
value: e,
|
|
120
120
|
defaultValue: u,
|
|
121
121
|
minValue: l,
|
|
122
122
|
maxValue: n,
|
|
123
123
|
step: h,
|
|
124
|
-
isDisabled:
|
|
124
|
+
isDisabled: y,
|
|
125
125
|
isReadOnly: d,
|
|
126
|
-
isInvalid:
|
|
126
|
+
isInvalid: b,
|
|
127
127
|
isRequired: g,
|
|
128
128
|
"aria-busy": a,
|
|
129
129
|
onChange: w,
|
|
@@ -131,11 +131,11 @@ const H = z({
|
|
|
131
131
|
onBlur: x,
|
|
132
132
|
...N,
|
|
133
133
|
children: [
|
|
134
|
-
|
|
134
|
+
f ? /* @__PURE__ */ r("span", { className: j(), children: f }) : null,
|
|
135
135
|
/* @__PURE__ */ t(G, { className: I(), children: [
|
|
136
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ r(T, { ref: c, className: C() }),
|
|
137
137
|
/* @__PURE__ */ t("div", { className: O(), children: [
|
|
138
|
-
a && /* @__PURE__ */
|
|
138
|
+
a && /* @__PURE__ */ r(
|
|
139
139
|
A,
|
|
140
140
|
{
|
|
141
141
|
color: "inherit",
|
|
@@ -146,7 +146,7 @@ const H = z({
|
|
|
146
146
|
})
|
|
147
147
|
}
|
|
148
148
|
),
|
|
149
|
-
|
|
149
|
+
b && /* @__PURE__ */ r(
|
|
150
150
|
W,
|
|
151
151
|
{
|
|
152
152
|
src: "WarningCircleOutlined",
|
|
@@ -157,8 +157,8 @@ const H = z({
|
|
|
157
157
|
})
|
|
158
158
|
}
|
|
159
159
|
),
|
|
160
|
-
P && /* @__PURE__ */
|
|
161
|
-
|
|
160
|
+
P && /* @__PURE__ */ r(
|
|
161
|
+
s,
|
|
162
162
|
{
|
|
163
163
|
title: o.formatMessage({
|
|
164
164
|
id: "unity:component:common:clear:title",
|
|
@@ -172,27 +172,29 @@ const H = z({
|
|
|
172
172
|
}
|
|
173
173
|
)
|
|
174
174
|
] }),
|
|
175
|
-
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
|
|
175
|
+
i && /* @__PURE__ */ t("div", { className: S(), children: [
|
|
176
|
+
/* @__PURE__ */ r(
|
|
177
|
+
s,
|
|
178
178
|
{
|
|
179
179
|
asElement: "button",
|
|
180
180
|
icon: "MinusOutlined",
|
|
181
181
|
slot: "decrement",
|
|
182
|
-
|
|
182
|
+
color: "content.neutral",
|
|
183
|
+
isDisabled: l !== void 0 && e === l,
|
|
183
184
|
title: o.formatMessage({
|
|
184
185
|
id: "unity:component:form-field:number-input:decrement:title",
|
|
185
186
|
defaultMessage: "decrement"
|
|
186
187
|
})
|
|
187
188
|
}
|
|
188
189
|
),
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
|
|
190
|
+
/* @__PURE__ */ r(
|
|
191
|
+
s,
|
|
191
192
|
{
|
|
192
193
|
asElement: "button",
|
|
193
194
|
icon: "PlusOutlined",
|
|
194
195
|
slot: "increment",
|
|
195
|
-
|
|
196
|
+
color: "content.neutral",
|
|
197
|
+
isDisabled: n !== void 0 && e === n,
|
|
196
198
|
title: o.formatMessage({
|
|
197
199
|
id: "unity:component:form-field:number-input:increment:title",
|
|
198
200
|
defaultMessage: "increment"
|
|
@@ -201,7 +203,7 @@ const H = z({
|
|
|
201
203
|
)
|
|
202
204
|
] })
|
|
203
205
|
] }),
|
|
204
|
-
m ? /* @__PURE__ */
|
|
206
|
+
m ? /* @__PURE__ */ r("span", { className: E(), children: m }) : null
|
|
205
207
|
]
|
|
206
208
|
}
|
|
207
209
|
);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { NumberProps } from './NumberInput.js';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the TanstackNumberInput component.
|
|
4
|
+
*
|
|
5
|
+
* This type mirrors {@link NumberProps} from the Unity NumberInput, while omitting
|
|
6
|
+
* the properties that are managed by the TanStack Form field context:
|
|
7
|
+
* - `name` — provided by <form.AppField name="…"/>
|
|
8
|
+
* - `value` and `defaultValue` — driven by the form field state
|
|
9
|
+
* - `isInvalid` — derived from the field meta (touched + !isValid)
|
|
10
|
+
*
|
|
11
|
+
* You can still pass all other visual/behavioral props supported by the base
|
|
12
|
+
* NumberInput (e.g. `withControls`, `minValue`, `maxValue`, `step`, `prefix`, `suffix`,
|
|
13
|
+
* `formatOptions`, `isReadOnly`, `isDisabled`, `isLoading`, etc.).
|
|
14
|
+
*/
|
|
15
|
+
export type TanstackNumberInputProps = Omit<NumberProps, 'name' | 'value' | 'defaultValue' | 'isInvalid'>;
|
|
16
|
+
/**
|
|
17
|
+
* TanstackNumberInput is a controlled numeric input wired to a TanStack Form field.
|
|
18
|
+
* It composes the Unity {@link NumberInput} and synchronizes value, invalid state,
|
|
19
|
+
* and events through the TanStack field API.
|
|
20
|
+
*
|
|
21
|
+
* Behavior
|
|
22
|
+
* - Value is controlled by the form field state (`field.state.value`).
|
|
23
|
+
* - Invalid state is derived from `meta`: when the field is touched and invalid,
|
|
24
|
+
* the underlying input receives `isInvalid` and proper a11y attributes.
|
|
25
|
+
* - `onChange` forwards the new numeric value to the form via `field.handleChange`.
|
|
26
|
+
* - `onBlur` triggers `field.handleBlur`.
|
|
27
|
+
* - The clear action sets the value to `NaN` by default, then calls an optional
|
|
28
|
+
* `onClearButtonPress` handler.
|
|
29
|
+
*
|
|
30
|
+
* Accessibility
|
|
31
|
+
* - `aria-labelledby`, `aria-describedby` (helper and feedback), and `aria-details`
|
|
32
|
+
* are provided via the TanstackFormField a11y context.
|
|
33
|
+
*
|
|
34
|
+
* Example:
|
|
35
|
+
* ```tsx
|
|
36
|
+
* import { useTanstackUnityForm } from "@/hooks/use-tanstack-form"
|
|
37
|
+
* import { TanstackNumberInput } from "@/components/number-input/TanstackNumberInput"
|
|
38
|
+
*
|
|
39
|
+
* function ExampleField() {
|
|
40
|
+
* const form = useTanstackUnityForm<{ amount: number }>({ validators: {} })
|
|
41
|
+
* return (
|
|
42
|
+
* <form.AppForm>
|
|
43
|
+
* <form.Form>
|
|
44
|
+
* <form.AppField name="amount">
|
|
45
|
+
* {() => <TanstackNumberInput aria-label="Amount" withControls />}
|
|
46
|
+
* </form.AppField>
|
|
47
|
+
* </form.Form>
|
|
48
|
+
* </form.AppForm>
|
|
49
|
+
* )
|
|
50
|
+
* }
|
|
51
|
+
* ```
|
|
52
|
+
* @see NumberInput for the underlying visual component and props
|
|
53
|
+
* @see TanstackFormField for the enclosing a11y wiring
|
|
54
|
+
* @see useTanstackUnityForm for creating the form context
|
|
55
|
+
* @returns A Unity NumberInput controlled by the TanStack form field
|
|
56
|
+
*/
|
|
57
|
+
declare const TanstackNumberInput: import('react').ForwardRefExoticComponent<TanstackNumberInputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
58
|
+
export { TanstackNumberInput };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
import { useFieldContext as b } from "../../hooks/tanstack-form-context.js";
|
|
4
|
+
import { useFieldA11yContext as f } from "../form-field/TanstackFormField.context.js";
|
|
5
|
+
import { NumberInput as I } from "./NumberInput.js";
|
|
6
|
+
const h = p(
|
|
7
|
+
({ onClearButtonPress: o, onBlur: n, onChange: i, isReadOnly: l, isDisabled: d, ...s }, u) => {
|
|
8
|
+
const e = b(), t = f(), m = e.state.meta.isTouched && !e.state.meta.isValid, r = [t.helperTextId, t.feedbackTextId].filter(Boolean).join(" ");
|
|
9
|
+
return /* @__PURE__ */ c(
|
|
10
|
+
I,
|
|
11
|
+
{
|
|
12
|
+
...s,
|
|
13
|
+
ref: u,
|
|
14
|
+
id: t.inputId,
|
|
15
|
+
value: e.state.value,
|
|
16
|
+
onChange: (a) => {
|
|
17
|
+
e.handleChange(a), i?.(a);
|
|
18
|
+
},
|
|
19
|
+
onBlur: (a) => {
|
|
20
|
+
e.handleBlur(), n?.(a);
|
|
21
|
+
},
|
|
22
|
+
onClearButtonPress: () => {
|
|
23
|
+
e.setValue(NaN), o?.();
|
|
24
|
+
},
|
|
25
|
+
isReadOnly: l,
|
|
26
|
+
isDisabled: d,
|
|
27
|
+
isInvalid: m,
|
|
28
|
+
"aria-labelledby": t.labelId,
|
|
29
|
+
"aria-describedby": r.length > 0 ? r : void 0,
|
|
30
|
+
"aria-details": t.contextualLinkId
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
h.displayName = "TanstackNumberInput";
|
|
36
|
+
export {
|
|
37
|
+
h as TanstackNumberInput
|
|
38
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as m } from "react";
|
|
3
|
-
import { uyTv as
|
|
4
|
-
const
|
|
3
|
+
import { uyTv as o } from "@payfit/unity-themes";
|
|
4
|
+
const t = o({
|
|
5
5
|
base: "uy:min-h-dvh uy:flex uy:flex-col uy:gap-400",
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
@@ -9,7 +9,8 @@ const o = t({
|
|
|
9
9
|
"uy:px-200 uy:py-300 uy:md:p-300 uy:lg:p-500",
|
|
10
10
|
// a tiny margin left so the shadow is visible
|
|
11
11
|
"uy:md:ml-100",
|
|
12
|
-
"uy:bg-surface-neutral uy:md:border uy:md:border-solid uy:md:border-border-neutral uy:border-r-0 uy:md:rounded-
|
|
12
|
+
"uy:bg-surface-neutral uy:md:border uy:md:border-solid uy:md:border-border-neutral-low uy:border-r-0 uy:md:rounded-l-300",
|
|
13
|
+
"uy:md:shadow-[-1px_-1px_2px_-1px_var(--uy-color-utility-shadow-raising)]"
|
|
13
14
|
],
|
|
14
15
|
legacy__midnight: [
|
|
15
16
|
"uy:bg-transparent",
|
|
@@ -22,14 +23,14 @@ const o = t({
|
|
|
22
23
|
variant: "default"
|
|
23
24
|
}
|
|
24
25
|
}), l = m(
|
|
25
|
-
({ children: r, variant: a, ...
|
|
26
|
-
const
|
|
27
|
-
return /* @__PURE__ */
|
|
26
|
+
({ children: r, variant: a, ...u }, d) => {
|
|
27
|
+
const y = t({ variant: a });
|
|
28
|
+
return /* @__PURE__ */ e(
|
|
28
29
|
"main",
|
|
29
30
|
{
|
|
30
|
-
...
|
|
31
|
-
ref:
|
|
32
|
-
className:
|
|
31
|
+
...u,
|
|
32
|
+
ref: d,
|
|
33
|
+
className: y,
|
|
33
34
|
"data-dd-privacy": "allow",
|
|
34
35
|
"data-unity-page": a,
|
|
35
36
|
children: r
|
|
@@ -40,5 +41,5 @@ const o = t({
|
|
|
40
41
|
l.displayName = "Page";
|
|
41
42
|
export {
|
|
42
43
|
l as Page,
|
|
43
|
-
|
|
44
|
+
t as page
|
|
44
45
|
};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { uyTv as
|
|
4
|
-
import { Link as
|
|
5
|
-
import { useIntl as
|
|
6
|
-
import { usePaginationContext as
|
|
7
|
-
const R =
|
|
2
|
+
import { forwardRef as w, useRef as h, useCallback as u } from "react";
|
|
3
|
+
import { uyTv as v } from "@payfit/unity-themes";
|
|
4
|
+
import { Link as x } from "react-aria-components";
|
|
5
|
+
import { useIntl as P } from "react-intl";
|
|
6
|
+
import { usePaginationContext as k } from "../PaginationContext.js";
|
|
7
|
+
const R = v({
|
|
8
8
|
base: [
|
|
9
9
|
"uy:min-w-300 uy:h-300 uy:p-25 uy:flex uy:justify-center uy:items-center uy:typography-action uy:rounded-pill uy:transition-colors",
|
|
10
10
|
"uy:enabled:text-content-neutral-enabled uy:enabled:bg-transparent uy:cursor-pointer",
|
|
11
|
-
"uy:data-[disabled]:text-content-neutral-disabled uy:data-[disabled]:bg-surface-neutral-disabled uy:data-[disabled]:cursor-not-allowed",
|
|
12
|
-
"uy:hover:text-content-neutral-hover uy:hover:bg-surface-neutral-hover",
|
|
13
|
-
"uy:active:text-content-neutral-pressed uy:active:bg-surface-neutral-pressed uy:data-[pressed]:text-content-neutral-pressed uy:data-[pressed]:bg-surface-neutral-pressed",
|
|
14
|
-
"uy:aria-[current=page]:bg-surface-neutral-
|
|
11
|
+
"uy:data-[disabled]:text-content-neutral-disabled uy:data-[disabled]:bg-surface-neutral-lowest-disabled uy:data-[disabled]:cursor-not-allowed",
|
|
12
|
+
"uy:hover:text-content-neutral-hover uy:hover:bg-surface-neutral-lowest-hover",
|
|
13
|
+
"uy:active:text-content-neutral-pressed uy:active:bg-surface-neutral-lowest-pressed uy:data-[pressed]:text-content-neutral-pressed uy:data-[pressed]:bg-surface-neutral-lowest-pressed",
|
|
14
|
+
"uy:aria-[current=page]:bg-surface-neutral-lowest-selected",
|
|
15
15
|
"uy:focus-visible:outline-2 uy:focus-visible:outline-solid uy:focus-visible:outline-utility-focus-ring uy:focus-visible:outline-offset-2",
|
|
16
16
|
"uy:data-[focus-visible]:outline-2 uy:data-[focus-visible]:outline-solid uy:data-[focus-visible]:outline-utility-focus-ring uy:data-[focus-visible]:outline-offset-2"
|
|
17
17
|
]
|
|
18
|
-
}), C =
|
|
19
|
-
({ isCurrent: r, isDisabled: l, value: t, onPress: c, ...
|
|
20
|
-
const y =
|
|
18
|
+
}), C = w(
|
|
19
|
+
({ isCurrent: r, isDisabled: l, value: t, onPress: c, ...a }, n) => {
|
|
20
|
+
const y = P(), { currentPage: s, onKeyDown: f, pageRefs: i, onPageChange: o } = k(), d = h(null), g = u(
|
|
21
21
|
(e) => {
|
|
22
|
-
d.current = e, e ?
|
|
22
|
+
d.current = e, e ? i.current.set(t, e) : i.current.delete(t), typeof n == "function" ? n(e) : n && (n.current = e);
|
|
23
23
|
},
|
|
24
|
-
[t,
|
|
25
|
-
), b = r ??
|
|
26
|
-
if (!
|
|
27
|
-
const e = t >
|
|
28
|
-
|
|
24
|
+
[t, i, n]
|
|
25
|
+
), b = r ?? s === t, p = u(() => {
|
|
26
|
+
if (!a.href) {
|
|
27
|
+
const e = t > s ? 1 : -1;
|
|
28
|
+
o(t, s, e);
|
|
29
29
|
}
|
|
30
|
-
}, [t,
|
|
30
|
+
}, [t, s, o, a.href]);
|
|
31
31
|
return /* @__PURE__ */ m(
|
|
32
|
-
|
|
32
|
+
x,
|
|
33
33
|
{
|
|
34
|
-
...
|
|
34
|
+
...a,
|
|
35
35
|
ref: g,
|
|
36
36
|
className: R(),
|
|
37
37
|
isDisabled: l,
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as g } from "react";
|
|
3
3
|
import { uyTv as b } from "@payfit/unity-themes";
|
|
4
4
|
import { Link as x } from "react-aria-components";
|
|
5
5
|
import { useIntl as v } from "react-intl";
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { Tooltip as
|
|
6
|
+
import { Icon as w } from "../../icon/Icon.js";
|
|
7
|
+
import { Tooltip as h } from "../../tooltip/Tooltip.js";
|
|
8
8
|
import { usePaginationContext as P } from "../PaginationContext.js";
|
|
9
9
|
const N = b({
|
|
10
10
|
base: [
|
|
11
11
|
"uy:min-w-300 uy:h-300 uy:p-25 uy:flex uy:justify-center uy:items-center uy:typography-action uy:rounded-circle uy:transition-colors",
|
|
12
12
|
"uy:text-content-neutral-lowest uy:enabled:bg-transparent uy:cursor-pointer",
|
|
13
|
-
"uy:hover:text-content-neutral-hover uy:hover:bg-surface-neutral-hover",
|
|
14
|
-
"uy:active:text-content-neutral-pressed uy:active:bg-surface-neutral-pressed",
|
|
15
|
-
"uy:data-[pressed]:text-content-neutral-pressed uy:data-[pressed]:bg-surface-neutral-pressed",
|
|
16
|
-
"uy:data-[disabled]:text-content-neutral-disabled uy:data-[disabled]:bg-transparent uy:data-[disabled]:cursor-not-allowed",
|
|
13
|
+
"uy:hover:text-content-neutral-hover uy:hover:bg-surface-neutral-lowest-hover",
|
|
14
|
+
"uy:active:text-content-neutral-pressed uy:active:bg-surface-neutral-lowest-pressed",
|
|
15
|
+
"uy:data-[pressed=true]:text-content-neutral-pressed uy:data-[pressed=true]:bg-surface-neutral-lowest-pressed",
|
|
16
|
+
"uy:data-[disabled=true]:text-content-neutral-disabled uy:data-[disabled=true]:bg-transparent uy:data-[disabled=true]:cursor-not-allowed",
|
|
17
17
|
"uy:focus-visible:outline-2 uy:focus-visible:outline-solid uy:focus-visible:outline-utility-focus-ring uy:focus-visible:outline-offset-2"
|
|
18
18
|
]
|
|
19
19
|
}), D = g(
|
|
20
|
-
({ isDisabled: i, href:
|
|
20
|
+
({ isDisabled: i, href: n, onPress: s, ...u }, l) => {
|
|
21
21
|
const a = v(), {
|
|
22
22
|
onKeyDown: c,
|
|
23
23
|
currentPage: e,
|
|
@@ -37,13 +37,13 @@ const N = b({
|
|
|
37
37
|
), p = (m) => {
|
|
38
38
|
c(m);
|
|
39
39
|
}, f = () => {
|
|
40
|
-
!
|
|
40
|
+
!n && (r === -1 || e < r) && y(e + 1, e, 1);
|
|
41
41
|
};
|
|
42
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ o(h, { title: t, children: /* @__PURE__ */ o(
|
|
43
43
|
x,
|
|
44
44
|
{
|
|
45
45
|
ref: l,
|
|
46
|
-
href:
|
|
46
|
+
href: n,
|
|
47
47
|
className: N(),
|
|
48
48
|
isDisabled: i,
|
|
49
49
|
onPress: s ?? f,
|
|
@@ -51,8 +51,8 @@ const N = b({
|
|
|
51
51
|
"aria-description": d,
|
|
52
52
|
onKeyDown: p,
|
|
53
53
|
...u,
|
|
54
|
-
children: /* @__PURE__ */
|
|
55
|
-
|
|
54
|
+
children: /* @__PURE__ */ o(
|
|
55
|
+
w,
|
|
56
56
|
{
|
|
57
57
|
src: "CaretRightOutlined",
|
|
58
58
|
size: 20,
|
|
@@ -3,20 +3,20 @@ import { forwardRef as m } from "react";
|
|
|
3
3
|
import { uyTv as g } from "@payfit/unity-themes";
|
|
4
4
|
import { Link as v } from "react-aria-components";
|
|
5
5
|
import { useIntl as b } from "react-intl";
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { Tooltip as
|
|
6
|
+
import { Icon as w } from "../../icon/Icon.js";
|
|
7
|
+
import { Tooltip as h } from "../../tooltip/Tooltip.js";
|
|
8
8
|
import { usePaginationContext as x } from "../PaginationContext.js";
|
|
9
9
|
const P = g({
|
|
10
10
|
base: [
|
|
11
11
|
"uy:min-w-300 uy:h-300 uy:p-25 uy:flex uy:justify-center uy:items-center uy:typography-action uy:rounded-circle uy:transition-colors",
|
|
12
12
|
"uy:text-content-neutral-lowest uy:enabled:bg-transparent uy:cursor-pointer",
|
|
13
|
-
"uy:hover:text-content-neutral-hover uy:hover:bg-surface-neutral-hover",
|
|
14
|
-
"uy:active:text-content-neutral-pressed uy:active:bg-surface-neutral-pressed",
|
|
15
|
-
"uy:data-[pressed]:text-content-neutral-pressed uy:data-[pressed]:bg-surface-neutral-pressed",
|
|
13
|
+
"uy:hover:text-content-neutral-hover uy:hover:bg-surface-neutral-lowest-hover",
|
|
14
|
+
"uy:active:text-content-neutral-pressed uy:active:bg-surface-neutral-lowest-pressed",
|
|
15
|
+
"uy:data-[pressed]:text-content-neutral-pressed uy:data-[pressed]:bg-surface-neutral-lowest-pressed",
|
|
16
16
|
"uy:data-[disabled]:text-content-neutral-disabled uy:data-[disabled]:bg-transparent uy:data-[disabled]:cursor-not-allowed",
|
|
17
17
|
"uy:focus-visible:outline-2 uy:focus-visible:outline-solid uy:focus-visible:outline-utility-focus-ring uy:focus-visible:outline-offset-2"
|
|
18
18
|
]
|
|
19
|
-
}), D = m(({ isDisabled: a, href: n, onPress:
|
|
19
|
+
}), D = m(({ isDisabled: a, href: n, onPress: s, ...i }, u) => {
|
|
20
20
|
const r = b(), {
|
|
21
21
|
onKeyDown: l,
|
|
22
22
|
currentPage: e,
|
|
@@ -37,20 +37,20 @@ const P = g({
|
|
|
37
37
|
}, p = () => {
|
|
38
38
|
!n && e > 1 && c(e - 1, e, -1);
|
|
39
39
|
};
|
|
40
|
-
return /* @__PURE__ */ o(
|
|
40
|
+
return /* @__PURE__ */ o(h, { title: t, children: /* @__PURE__ */ o(
|
|
41
41
|
v,
|
|
42
42
|
{
|
|
43
43
|
ref: u,
|
|
44
44
|
href: n,
|
|
45
45
|
className: P(),
|
|
46
46
|
isDisabled: a,
|
|
47
|
-
onPress:
|
|
47
|
+
onPress: s ?? p,
|
|
48
48
|
"aria-label": t,
|
|
49
49
|
"aria-description": y,
|
|
50
50
|
onKeyDown: d,
|
|
51
|
-
...
|
|
51
|
+
...i,
|
|
52
52
|
children: /* @__PURE__ */ o(
|
|
53
|
-
|
|
53
|
+
w,
|
|
54
54
|
{
|
|
55
55
|
src: "CaretLeftOutlined",
|
|
56
56
|
size: 20,
|
|
@@ -15,6 +15,10 @@ export type PayFitBrandProps = {
|
|
|
15
15
|
* The width of the brand. Defaults to the minimum of `104px`.
|
|
16
16
|
*/
|
|
17
17
|
width?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Whether to display only the monogram or the full brand. Defaults to `false`.
|
|
20
|
+
*/
|
|
21
|
+
showOnlyMonogram?: boolean;
|
|
18
22
|
};
|
|
19
23
|
/**
|
|
20
24
|
* The PayFitBrand component represents the PayFit logo with several properties that follow our brand guidelines.
|
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { uyTv as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { jsxs as p, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as f } from "react";
|
|
3
|
+
import { uyTv as u } from "@payfit/unity-themes";
|
|
4
|
+
import g from "../../hooks/use-id.js";
|
|
5
|
+
const b = u({
|
|
6
6
|
slots: {
|
|
7
|
-
base: "
|
|
7
|
+
base: "",
|
|
8
8
|
monogram: "",
|
|
9
9
|
logotype: ""
|
|
10
10
|
},
|
|
11
11
|
variants: {
|
|
12
|
+
showOnlyMonogram: {
|
|
13
|
+
true: {
|
|
14
|
+
base: "uy:aspect-square uy:min-w-[32px]"
|
|
15
|
+
},
|
|
16
|
+
false: {
|
|
17
|
+
base: "uy:aspect-[13/4] uy:min-w-[104px]"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
12
20
|
color: {
|
|
13
21
|
original: {
|
|
14
22
|
monogram: "uy:fill-content-primary",
|
|
@@ -27,41 +35,41 @@ const g = f({
|
|
|
27
35
|
defaultVariants: {
|
|
28
36
|
color: "original"
|
|
29
37
|
}
|
|
30
|
-
}), Z =
|
|
31
|
-
({ color:
|
|
32
|
-
const o =
|
|
38
|
+
}), Z = f(
|
|
39
|
+
({ color: r, label: n, description: a, showOnlyMonogram: e = !1, ...i }, s) => {
|
|
40
|
+
const o = g(), t = `payfit-brand-title-${o}`, l = `payfit-brand-desc-${o}`, { base: m, monogram: h, logotype: d } = b({ color: r, showOnlyMonogram: e }), v = {
|
|
33
41
|
focusable: !1,
|
|
34
42
|
role: "img",
|
|
35
43
|
"aria-labelledby": t,
|
|
36
|
-
...a && { "aria-describedby":
|
|
37
|
-
},
|
|
38
|
-
...
|
|
39
|
-
...
|
|
44
|
+
...a && { "aria-describedby": l }
|
|
45
|
+
}, y = {
|
|
46
|
+
...i,
|
|
47
|
+
...v
|
|
40
48
|
};
|
|
41
|
-
return /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ p(
|
|
42
50
|
"svg",
|
|
43
51
|
{
|
|
44
|
-
...
|
|
45
|
-
ref:
|
|
52
|
+
...y,
|
|
53
|
+
ref: s,
|
|
46
54
|
fill: "none",
|
|
47
|
-
viewBox: "0 0 104 32",
|
|
48
|
-
className:
|
|
55
|
+
viewBox: e ? "0 0 32 32" : "0 0 104 32",
|
|
56
|
+
className: m(),
|
|
49
57
|
children: [
|
|
50
58
|
/* @__PURE__ */ c("title", { id: t, children: n ?? "PayFit Logo" }),
|
|
51
|
-
a && /* @__PURE__ */ c("desc", { id:
|
|
59
|
+
a && /* @__PURE__ */ c("desc", { id: l, children: a }),
|
|
52
60
|
/* @__PURE__ */ c(
|
|
53
61
|
"path",
|
|
54
62
|
{
|
|
55
63
|
fillRule: "evenodd",
|
|
56
|
-
className:
|
|
64
|
+
className: h(),
|
|
57
65
|
d: "M16 32C7.164 32 0 24.836 0 16S7.164 0 16 0s16 7.164 16 16-7.164 16-16 16Zm-.218-10.31v-3.18c0-.092.072-.183.163-.183h3.746a4.885 4.885 0 0 0 4.69-5.09 4.893 4.893 0 0 0-4.708-4.692h-9.127c-.2 0-.364.164-.364.364v12.836a2.801 2.801 0 0 0 5.6 0c.018-.036.018-.054 0-.054Zm.182-7.545h3.527a.73.73 0 0 0 .727-.727.73.73 0 0 0-.727-.727h-4.782c-.2 0-.364.163-.364.364v8.672c0 .746-.618 1.364-1.363 1.364a1.374 1.374 0 0 1-1.364-1.364V10.164c0-.091.073-.182.164-.182h7.708c1.91-.037 3.492 1.49 3.51 3.382.036 1.909-1.49 3.49-3.382 3.509h-3.654c-.091 0-.182-.073-.182-.164V14.327c0-.09.072-.163.182-.181Z",
|
|
58
66
|
clipRule: "evenodd"
|
|
59
67
|
}
|
|
60
68
|
),
|
|
61
|
-
/* @__PURE__ */ c(
|
|
69
|
+
!e && /* @__PURE__ */ c(
|
|
62
70
|
"path",
|
|
63
71
|
{
|
|
64
|
-
className:
|
|
72
|
+
className: d(),
|
|
65
73
|
d: "M76.49 11.945h-1.472c-.163 0-.309.11-.345.255-.073.218-.128.364-.146.455-.582 1.781-1.472 4.472-2.636 8.054-.018.055-.091.255-.237.582-.036.09-.145.127-.236.09a.219.219 0 0 1-.09-.09 7.862 7.862 0 0 1-.237-.582c-1.2-3.69-2.091-6.454-2.673-8.31-.018-.054-.036-.126-.054-.18a.372.372 0 0 0-.346-.255h-1.454a.365.365 0 0 0-.346.472c.018.055.036.091.055.146.909 2.582 2.272 6.436 4.09 11.582 0 .018 0 .018.019.036a.443.443 0 0 1 0 .218c0 .018 0 .018-.018.037-.019.072-.055.163-.073.236a1.805 1.805 0 0 1-1.691 1.2h-1.527c-.2 0-.364.164-.364.364v1.218c0 .2.164.363.364.363H68.6a3.72 3.72 0 0 0 3.418-2.236c.018-.055.037-.11.073-.164.018-.054 1.09-3.09 4.673-13.109.054-.127-.019-.29-.146-.345H76.6c-.055-.018-.073-.037-.11-.037ZM57.11 22.291c.345.109.708.163 1.072.163a4.232 4.232 0 0 0 2.89-1.2 2.949 2.949 0 0 0 .855-2.145v-.945a.163.163 0 0 0-.163-.164h-.037c-.182.018-.272.018-.272.018l-1.146.146-2.273.345c-1.218.2-1.963.69-2.2 1.455a1.923 1.923 0 0 0-.09.563c.018.818.581 1.527 1.363 1.764Zm6.854.8v.727c0 .2-.164.364-.364.364h-1.182a.365.365 0 0 1-.364-.364l-.018-1.2c0-.018-.018-.036-.018-.054a.088.088 0 0 0-.127 0 1.04 1.04 0 0 0-.2.2c-.946.945-2.236 1.418-3.91 1.418-1.2 0-2.181-.327-2.945-.964-.763-.636-1.127-1.527-1.127-2.654A3.316 3.316 0 0 1 54.036 19c.2-.418.491-.764.873-1.018a3.876 3.876 0 0 1 1.055-.546A5.45 5.45 0 0 1 57 17.164c1.764-.255 2.71-.382 2.89-.419.146-.018.728-.09 1.728-.236.073-.018.127-.018.2-.018.091-.018.164-.091.164-.182v-.51c0-.763-.2-1.363-.6-1.78-.4-.42-1.146-.637-2.218-.637-.491 0-.982.054-1.455.2-.364.109-.673.309-.927.6-.164.218-.31.436-.4.69-.018.055-.037.11-.055.183 0 .018 0 .036-.018.054a.371.371 0 0 1-.364.29h-1.363a.378.378 0 0 1-.346-.38v-.074c.019-.145.037-.254.055-.345.09-.345.236-.691.418-1a3.54 3.54 0 0 1 .818-.91c.437-.29.91-.508 1.418-.654a8.41 8.41 0 0 1 2.128-.254c3.29 0 4.89 1.309 4.89 3.963v7.346Zm26.963-10.873v11.564c0 .2.164.363.364.363h1.473c.2 0 .363-.163.363-.363V12.218c0-.2-.163-.364-.363-.364H91.29c-.2 0-.364.164-.364.364Zm0-3.673v1.473c0 .2.164.364.364.364h1.473c.2 0 .363-.164.363-.364V8.545c0-.2-.163-.363-.363-.363H91.29c-.2 0-.364.163-.364.363ZM100 13.782h3.109c.2 0 .364-.164.364-.364V12.2c0-.2-.164-.364-.364-.364H100c-.09 0-.182-.072-.182-.163V8.545c0-.2-.163-.363-.364-.363h-1.472c-.2 0-.364.163-.364.363v3.128c0 .09-.073.181-.163.181H96.09c-.2 0-.364.164-.364.364v1.218c0 .2.164.364.364.364h1.345c.091 0 .182.073.182.164V20.545c.073 2 1.71 3.6 3.709 3.6h1.655c.2 0 .363-.163.363-.363v-1.218c0-.2-.163-.364-.363-.364h-1.655a1.525 1.525 0 0 1-1.527-1.527v-6.71c.018-.108.09-.181.2-.181Zm-47.964-.637a4.96 4.96 0 0 0-4.854-4.963h-7c-.2 0-.364.163-.364.363v15.237c0 .2.164.363.364.363h1.472c.2 0 .364-.163.364-.363v-5.473c0-.09.073-.182.164-.182h5a4.975 4.975 0 0 0 4.854-4.982Zm-1.927 0a3.01 3.01 0 0 1-3.018 3.019h-4.873c-.09 0-.182-.073-.182-.164v-5.691c0-.09.073-.182.164-.182h4.891a3.01 3.01 0 0 1 3.018 3.018Zm31.2 4.928h5.527c.2 0 .364-.164.364-.364v-1.218c0-.2-.164-.364-.364-.364H81.31c-.09 0-.182-.072-.182-.163v-5.655c0-.09.073-.182.164-.182h6.8c.2 0 .364-.163.364-.363V8.545c0-.2-.164-.363-.364-.363h-8.8c-.2 0-.364.163-.364.363v15.237c0 .2.164.363.364.363h1.473c.2 0 .363-.163.363-.363v-5.527c0-.11.073-.182.182-.182Z"
|
|
66
74
|
}
|
|
67
75
|
)
|