@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
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { uyTv as e } from "@payfit/unity-themes";
|
|
2
|
+
const u = e({
|
|
3
|
+
slots: {
|
|
4
|
+
base: [
|
|
5
|
+
"uy:flex uy:flex-row uy:items-center",
|
|
6
|
+
"uy:rounded-lg uy:border-solid uy:border-1 uy:transition-colors uy:group",
|
|
7
|
+
"uy:cursor-pointer uy:disabled:cursor-not-allowed uy:aria-disabled:cursor-not-allowed",
|
|
8
|
+
"uy:bg-surface-neutral uy:border-border-neutral uy:text-content-neutral-low",
|
|
9
|
+
"uy:hover:bg-surface-neutral-hover uy:hover:border-border-neutral-hover",
|
|
10
|
+
"uy:active:bg-surface-neutral-pressed uy:active:border-border-neutral-pressed",
|
|
11
|
+
"uy:data-[pressed=true]:bg-surface-neutral-pressed uy:data-[pressed=true]:border-border-neutral-pressed",
|
|
12
|
+
"uy:focus-visible:outline-utility-focus-ring uy:focus-visible:outline-2 uy:focus-visible:outline-solid uy:focus-visible:outline-offset-2",
|
|
13
|
+
"uy:disabled:bg-surface-neutral-disabled uy:disabled:border-border-neutral-disabled uy:aria-disabled:bg-surface-neutral-disabled uy:aria-disabled:border-border-neutral-disabled"
|
|
14
|
+
],
|
|
15
|
+
prefix: ["uy:w-fit uy:contents uy:grow-0 uy:shrink-1"],
|
|
16
|
+
body: ["uy:flex-1 uy:space-y-50"],
|
|
17
|
+
suffix: ["uy:w-fit uy:grow-0 uy:shrink-1"]
|
|
18
|
+
},
|
|
19
|
+
variants: {
|
|
20
|
+
gap: {
|
|
21
|
+
$0: { base: "uy:gap-0" },
|
|
22
|
+
$25: { base: "uy:gap-25" },
|
|
23
|
+
$50: { base: "uy:gap-50" },
|
|
24
|
+
$75: { base: "uy:gap-75" },
|
|
25
|
+
$100: { base: "uy:gap-100" },
|
|
26
|
+
$125: { base: "uy:gap-125" },
|
|
27
|
+
$150: { base: "uy:gap-150" },
|
|
28
|
+
$200: { base: "uy:gap-200" },
|
|
29
|
+
$250: { base: "uy:gap-250" },
|
|
30
|
+
$300: { base: "uy:gap-300" },
|
|
31
|
+
$400: { base: "uy:gap-400" },
|
|
32
|
+
$500: { base: "uy:gap-500" },
|
|
33
|
+
$600: { base: "uy:gap-600" },
|
|
34
|
+
$800: { base: "uy:gap-800" },
|
|
35
|
+
$1000: { base: "uy:gap-1000" }
|
|
36
|
+
},
|
|
37
|
+
padding: {
|
|
38
|
+
$0: { base: "uy:p-0" },
|
|
39
|
+
$25: { base: "uy:p-25" },
|
|
40
|
+
$50: { base: "uy:p-50" },
|
|
41
|
+
$75: { base: "uy:p-75" },
|
|
42
|
+
$100: { base: "uy:p-100" },
|
|
43
|
+
$125: { base: "uy:p-125" },
|
|
44
|
+
$150: { base: "uy:p-150" },
|
|
45
|
+
$200: { base: "uy:p-200" },
|
|
46
|
+
$250: { base: "uy:p-250" },
|
|
47
|
+
$300: { base: "uy:p-300" },
|
|
48
|
+
$400: { base: "uy:p-400" },
|
|
49
|
+
$500: { base: "uy:p-500" },
|
|
50
|
+
$600: { base: "uy:p-600" },
|
|
51
|
+
$800: { base: "uy:p-800" },
|
|
52
|
+
$1000: { base: "uy:p-1000" }
|
|
53
|
+
},
|
|
54
|
+
paddingBlock: {
|
|
55
|
+
$0: { base: "uy:py-0" },
|
|
56
|
+
$25: { base: "uy:py-25" },
|
|
57
|
+
$50: { base: "uy:py-50" },
|
|
58
|
+
$75: { base: "uy:py-75" },
|
|
59
|
+
$100: { base: "uy:py-100" },
|
|
60
|
+
$125: { base: "uy:py-125" },
|
|
61
|
+
$150: { base: "uy:py-150" },
|
|
62
|
+
$200: { base: "uy:py-200" },
|
|
63
|
+
$250: { base: "uy:py-250" },
|
|
64
|
+
$300: { base: "uy:py-300" },
|
|
65
|
+
$400: { base: "uy:py-400" },
|
|
66
|
+
$500: { base: "uy:py-500" },
|
|
67
|
+
$600: { base: "uy:py-600" },
|
|
68
|
+
$800: { base: "uy:py-800" },
|
|
69
|
+
$1000: { base: "uy:py-1000" }
|
|
70
|
+
},
|
|
71
|
+
paddingInline: {
|
|
72
|
+
$0: { base: "uy:px-0" },
|
|
73
|
+
$25: { base: "uy:px-25" },
|
|
74
|
+
$50: { base: "uy:px-50" },
|
|
75
|
+
$75: { base: "uy:px-75" },
|
|
76
|
+
$100: { base: "uy:px-100" },
|
|
77
|
+
$125: { base: "uy:px-125" },
|
|
78
|
+
$150: { base: "uy:px-150" },
|
|
79
|
+
$200: { base: "uy:px-200" },
|
|
80
|
+
$250: { base: "uy:px-250" },
|
|
81
|
+
$300: { base: "uy:px-300" },
|
|
82
|
+
$400: { base: "uy:px-400" },
|
|
83
|
+
$500: { base: "uy:px-500" },
|
|
84
|
+
$600: { base: "uy:px-600" },
|
|
85
|
+
$800: { base: "uy:px-800" },
|
|
86
|
+
$1000: { base: "uy:px-1000" }
|
|
87
|
+
},
|
|
88
|
+
paddingTop: {
|
|
89
|
+
$0: { base: "uy:pt-0" },
|
|
90
|
+
$25: { base: "uy:pt-25" },
|
|
91
|
+
$50: { base: "uy:pt-50" },
|
|
92
|
+
$75: { base: "uy:pt-75" },
|
|
93
|
+
$100: { base: "uy:pt-100" },
|
|
94
|
+
$125: { base: "uy:pt-125" },
|
|
95
|
+
$150: { base: "uy:pt-150" },
|
|
96
|
+
$200: { base: "uy:pt-200" },
|
|
97
|
+
$250: { base: "uy:pt-250" },
|
|
98
|
+
$300: { base: "uy:pt-300" },
|
|
99
|
+
$400: { base: "uy:pt-400" },
|
|
100
|
+
$500: { base: "uy:pt-500" },
|
|
101
|
+
$600: { base: "uy:pt-600" },
|
|
102
|
+
$800: { base: "uy:pt-800" },
|
|
103
|
+
$1000: { base: "uy:pt-1000" }
|
|
104
|
+
},
|
|
105
|
+
paddingRight: {
|
|
106
|
+
$0: { base: "uy:pr-0" },
|
|
107
|
+
$25: { base: "uy:pr-25" },
|
|
108
|
+
$50: { base: "uy:pr-50" },
|
|
109
|
+
$75: { base: "uy:pr-75" },
|
|
110
|
+
$100: { base: "uy:pr-100" },
|
|
111
|
+
$125: { base: "uy:pr-125" },
|
|
112
|
+
$150: { base: "uy:pr-150" },
|
|
113
|
+
$200: { base: "uy:pr-200" },
|
|
114
|
+
$250: { base: "uy:pr-250" },
|
|
115
|
+
$300: { base: "uy:pr-300" },
|
|
116
|
+
$400: { base: "uy:pr-400" },
|
|
117
|
+
$500: { base: "uy:pr-500" },
|
|
118
|
+
$600: { base: "uy:pr-600" },
|
|
119
|
+
$800: { base: "uy:pr-800" },
|
|
120
|
+
$1000: { base: "uy:pr-1000" }
|
|
121
|
+
},
|
|
122
|
+
paddingBottom: {
|
|
123
|
+
$0: { base: "uy:pb-0" },
|
|
124
|
+
$25: { base: "uy:pb-25" },
|
|
125
|
+
$50: { base: "uy:pb-50" },
|
|
126
|
+
$75: { base: "uy:pb-75" },
|
|
127
|
+
$100: { base: "uy:pb-100" },
|
|
128
|
+
$125: { base: "uy:pb-125" },
|
|
129
|
+
$150: { base: "uy:pb-150" },
|
|
130
|
+
$200: { base: "uy:pb-200" },
|
|
131
|
+
$250: { base: "uy:pb-250" },
|
|
132
|
+
$300: { base: "uy:pb-300" },
|
|
133
|
+
$400: { base: "uy:pb-400" },
|
|
134
|
+
$500: { base: "uy:pb-500" },
|
|
135
|
+
$600: { base: "uy:pb-600" },
|
|
136
|
+
$800: { base: "uy:pb-800" },
|
|
137
|
+
$1000: { base: "uy:pb-1000" }
|
|
138
|
+
},
|
|
139
|
+
paddingLeft: {
|
|
140
|
+
$0: { base: "uy:pl-0" },
|
|
141
|
+
$25: { base: "uy:pl-25" },
|
|
142
|
+
$50: { base: "uy:pl-50" },
|
|
143
|
+
$75: { base: "uy:pl-75" },
|
|
144
|
+
$100: { base: "uy:pl-100" },
|
|
145
|
+
$125: { base: "uy:pl-125" },
|
|
146
|
+
$150: { base: "uy:pl-150" },
|
|
147
|
+
$200: { base: "uy:pl-200" },
|
|
148
|
+
$250: { base: "uy:pl-250" },
|
|
149
|
+
$300: { base: "uy:pl-300" },
|
|
150
|
+
$400: { base: "uy:pl-400" },
|
|
151
|
+
$500: { base: "uy:pl-500" },
|
|
152
|
+
$600: { base: "uy:pl-600" },
|
|
153
|
+
$800: { base: "uy:pl-800" },
|
|
154
|
+
$1000: { base: "uy:pl-1000" }
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
defaultVariants: {
|
|
158
|
+
padding: "$300",
|
|
159
|
+
gap: "$150"
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
export {
|
|
163
|
+
u as navigationCard
|
|
164
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { TextProps } from '../../text/Text.js';
|
|
2
|
+
export type NavigationCardDescriptionProps = Omit<TextProps, 'variant' | 'color' | 'className' | 'style'>;
|
|
3
|
+
/**
|
|
4
|
+
* Displays supplementary descriptive text for a NavigationCard component.
|
|
5
|
+
* Use this component to provide additional context or details about the navigation card's destination, helping users understand what they'll find when they navigate.
|
|
6
|
+
* The description automatically connects to the parent NavigationCard for proper accessibility semantics.
|
|
7
|
+
* @param {NavigationCardDescriptionProps} props - Standard text element props (excluding variant, color, className, and style which are preset)
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* import {
|
|
11
|
+
* RawNavigationCard,
|
|
12
|
+
* NavigationCardLabel,
|
|
13
|
+
* NavigationCardDescription
|
|
14
|
+
* } from '@payfit/unity-components'
|
|
15
|
+
*
|
|
16
|
+
* function Example() {
|
|
17
|
+
* return (
|
|
18
|
+
* <RawNavigationCard href="/reports">
|
|
19
|
+
* <NavigationCardLabel>Monthly Reports</NavigationCardLabel>
|
|
20
|
+
* <NavigationCardDescription>
|
|
21
|
+
* Access and download your company's monthly reports
|
|
22
|
+
* </NavigationCardDescription>
|
|
23
|
+
* </RawNavigationCard>
|
|
24
|
+
* )
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
* @remarks
|
|
28
|
+
* - Must be used within a `NavigationCard` component to function correctly
|
|
29
|
+
* - The description text is styled with the "body" typography variant and lower emphasis color
|
|
30
|
+
* - Automatically receives proper accessibility IDs from the parent NavigationCard
|
|
31
|
+
* - Supports all standard HTML text element props except styling props which are managed by the component
|
|
32
|
+
* @see {@link NavigationCardDescriptionProps} for all available props
|
|
33
|
+
* @see Source code in {@link https://github.com/PayFit/hr-apps/tree/master/libs/shared/unity/components/src/components/navigation-card/parts GitHub}
|
|
34
|
+
* @see Design specs {@link https://www.figma.com/design/poaMyU7abAgL9VRhx4ygyy/Unity-DS-%3E-Components-Library?node-id=14505-64292 Figma}
|
|
35
|
+
* @see Design docs in {@link https://www.payfit.design/ Payfit.design}
|
|
36
|
+
* @see Developer docs in {@link https://unity-components.payfit.io/?path=/docs/navigation-navigationcard-navigationcarddescription--docs unity-components.payfit.io}
|
|
37
|
+
*/
|
|
38
|
+
declare const NavigationCardDescription: import('react').ForwardRefExoticComponent<NavigationCardDescriptionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
39
|
+
export { NavigationCardDescription };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as i } from "react";
|
|
3
|
+
import { Text as e } from "../../text/Text.js";
|
|
4
|
+
import { useNavigationCardContext as n } from "../NavigationCard.context.js";
|
|
5
|
+
const d = i((o, t) => {
|
|
6
|
+
const { descriptionId: r } = n();
|
|
7
|
+
return /* @__PURE__ */ a(
|
|
8
|
+
e,
|
|
9
|
+
{
|
|
10
|
+
id: r,
|
|
11
|
+
...o,
|
|
12
|
+
ref: t,
|
|
13
|
+
variant: "body",
|
|
14
|
+
color: "content.neutral.low",
|
|
15
|
+
className: "uy:group-aria-disabled:text-content-neutral-disabled"
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
});
|
|
19
|
+
d.displayName = "NavigationCardDescription";
|
|
20
|
+
export {
|
|
21
|
+
d as NavigationCardDescription
|
|
22
|
+
};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { default as React, PropsWithChildren } from 'react';
|
|
2
|
+
import { VariantProps } from '@payfit/unity-themes';
|
|
3
|
+
export declare const navigationCardGroup: import('tailwind-variants').TVReturnType<{
|
|
4
|
+
orientation: {
|
|
5
|
+
horizontal: {
|
|
6
|
+
list: string;
|
|
7
|
+
};
|
|
8
|
+
vertical: {
|
|
9
|
+
list: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
variant: {
|
|
13
|
+
compact: {
|
|
14
|
+
list: string;
|
|
15
|
+
};
|
|
16
|
+
comfortable: {
|
|
17
|
+
list: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
showLabel: {
|
|
21
|
+
true: {
|
|
22
|
+
label: string;
|
|
23
|
+
};
|
|
24
|
+
false: {
|
|
25
|
+
label: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
}, {
|
|
29
|
+
base: string[];
|
|
30
|
+
label: string[];
|
|
31
|
+
list: string[];
|
|
32
|
+
listItem: string[];
|
|
33
|
+
}, undefined, {
|
|
34
|
+
orientation: {
|
|
35
|
+
horizontal: {
|
|
36
|
+
list: string;
|
|
37
|
+
};
|
|
38
|
+
vertical: {
|
|
39
|
+
list: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
variant: {
|
|
43
|
+
compact: {
|
|
44
|
+
list: string;
|
|
45
|
+
};
|
|
46
|
+
comfortable: {
|
|
47
|
+
list: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
showLabel: {
|
|
51
|
+
true: {
|
|
52
|
+
label: string;
|
|
53
|
+
};
|
|
54
|
+
false: {
|
|
55
|
+
label: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
}, {
|
|
59
|
+
base: string[];
|
|
60
|
+
label: string[];
|
|
61
|
+
list: string[];
|
|
62
|
+
listItem: string[];
|
|
63
|
+
}, import('tailwind-variants').TVReturnType<{
|
|
64
|
+
orientation: {
|
|
65
|
+
horizontal: {
|
|
66
|
+
list: string;
|
|
67
|
+
};
|
|
68
|
+
vertical: {
|
|
69
|
+
list: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
variant: {
|
|
73
|
+
compact: {
|
|
74
|
+
list: string;
|
|
75
|
+
};
|
|
76
|
+
comfortable: {
|
|
77
|
+
list: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
showLabel: {
|
|
81
|
+
true: {
|
|
82
|
+
label: string;
|
|
83
|
+
};
|
|
84
|
+
false: {
|
|
85
|
+
label: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
}, {
|
|
89
|
+
base: string[];
|
|
90
|
+
label: string[];
|
|
91
|
+
list: string[];
|
|
92
|
+
listItem: string[];
|
|
93
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
94
|
+
export interface NavigationCardGroupProps extends PropsWithChildren {
|
|
95
|
+
label: string;
|
|
96
|
+
isLabelHidden?: boolean;
|
|
97
|
+
orientation?: VariantProps<typeof navigationCardGroup>['orientation'];
|
|
98
|
+
variant?: VariantProps<typeof navigationCardGroup>['variant'];
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Groups multiple NavigationCard components together with a shared label, consistent layout, and proper accessibility.
|
|
102
|
+
* Use this component to organize related navigation cards into logical sections, creating clear visual hierarchy and improving discoverability.
|
|
103
|
+
* The group automatically handles spacing, borders, and rounded corners for seamless visual integration between cards.
|
|
104
|
+
* @param {NavigationCardGroupProps} props - Props including label, isLabelHidden, orientation, variant, and children
|
|
105
|
+
* @example
|
|
106
|
+
* ```tsx
|
|
107
|
+
* import {
|
|
108
|
+
* NavigationCardGroup,
|
|
109
|
+
* RawNavigationCard,
|
|
110
|
+
* NavigationCardLabel
|
|
111
|
+
* } from '@payfit/unity-components'
|
|
112
|
+
*
|
|
113
|
+
* function Example() {
|
|
114
|
+
* return (
|
|
115
|
+
* <NavigationCardGroup
|
|
116
|
+
* label="Quick Actions"
|
|
117
|
+
* variant="compact"
|
|
118
|
+
* >
|
|
119
|
+
* <RawNavigationCard href="/payroll">
|
|
120
|
+
* <NavigationCardLabel>Run Payroll</NavigationCardLabel>
|
|
121
|
+
* </RawNavigationCard>
|
|
122
|
+
* <RawNavigationCard href="/reports">
|
|
123
|
+
* <NavigationCardLabel>View Reports</NavigationCardLabel>
|
|
124
|
+
* </RawNavigationCard>
|
|
125
|
+
* <RawNavigationCard href="/settings">
|
|
126
|
+
* <NavigationCardLabel>Settings</NavigationCardLabel>
|
|
127
|
+
* </RawNavigationCard>
|
|
128
|
+
* </NavigationCardGroup>
|
|
129
|
+
* )
|
|
130
|
+
* }
|
|
131
|
+
* ```
|
|
132
|
+
* @remarks
|
|
133
|
+
* - Set the `variant` prop to `"compact"` to remove spacing between cards and merge their borders for a unified look
|
|
134
|
+
* - Use `variant="comfortable"` (default) for cards with individual spacing and borders
|
|
135
|
+
* - Set `orientation` to `"horizontal"` for responsive layout (stacks vertically on mobile, horizontally on larger screens)
|
|
136
|
+
* - Use `isLabelHidden` to visually hide the label while keeping it accessible to screen readers
|
|
137
|
+
* - The label is required for accessibility and provides context for navigation landmarks
|
|
138
|
+
* - Only include NavigationCard components as direct children for proper styling
|
|
139
|
+
* @see {@link NavigationCardGroupProps} for all available props
|
|
140
|
+
* @see Source code in {@link https://github.com/PayFit/hr-apps/tree/master/libs/shared/unity/components/src/components/navigation-card/parts GitHub}
|
|
141
|
+
* @see Design specs {@link https://www.figma.com/design/poaMyU7abAgL9VRhx4ygyy/Unity-DS-%3E-Components-Library?node-id=14505-64292 Figma}
|
|
142
|
+
* @see Design docs in {@link https://www.payfit.design/ Payfit.design}
|
|
143
|
+
* @see Developer docs in {@link https://unity-components.payfit.io/?path=/docs/navigation-navigationcard-navigationcardgroup--docs unity-components.payfit.io}
|
|
144
|
+
*/
|
|
145
|
+
declare const NavigationCardGroup: React.ForwardRefExoticComponent<NavigationCardGroupProps & React.RefAttributes<HTMLElement>>;
|
|
146
|
+
export { NavigationCardGroup };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsxs as N, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import i, { forwardRef as w } from "react";
|
|
3
|
+
import { uyTv as C } from "@payfit/unity-themes";
|
|
4
|
+
import { useId as I } from "react-aria";
|
|
5
|
+
const L = C({
|
|
6
|
+
// add the component styles
|
|
7
|
+
slots: {
|
|
8
|
+
base: ["uy:flex uy:flex-col uy:gap-100"],
|
|
9
|
+
label: ["uy:typography-action"],
|
|
10
|
+
list: ["uy:flex uy:list-none uy:group"],
|
|
11
|
+
listItem: [
|
|
12
|
+
"uy:contents",
|
|
13
|
+
"uy:data-[variant=compact]:*:rounded-none",
|
|
14
|
+
"uy:data-[variant=compact]:*:border-b-0",
|
|
15
|
+
"uy:data-[variant=compact]:first:*:rounded-t-lg",
|
|
16
|
+
"uy:data-[variant=compact]:last:*:rounded-b-lg",
|
|
17
|
+
"uy:data-[variant=compact]:last:*:border-b-1",
|
|
18
|
+
"uy:data-[variant=compact]:first:last:*:rounded-lg"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
variants: {
|
|
22
|
+
orientation: {
|
|
23
|
+
horizontal: {
|
|
24
|
+
list: "uy:flex-col uy:sm:flex-row"
|
|
25
|
+
},
|
|
26
|
+
vertical: {
|
|
27
|
+
list: "uy:flex-col"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
variant: {
|
|
31
|
+
compact: {
|
|
32
|
+
list: "uy:gap-0"
|
|
33
|
+
},
|
|
34
|
+
comfortable: {
|
|
35
|
+
list: "uy:gap-100"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
showLabel: {
|
|
39
|
+
true: {
|
|
40
|
+
label: ""
|
|
41
|
+
},
|
|
42
|
+
false: {
|
|
43
|
+
label: "uy:sr-only"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
defaultVariants: {
|
|
48
|
+
orientation: "vertical",
|
|
49
|
+
variant: "comfortable",
|
|
50
|
+
showLabel: !0
|
|
51
|
+
}
|
|
52
|
+
}), G = w(
|
|
53
|
+
({
|
|
54
|
+
children: s,
|
|
55
|
+
label: n,
|
|
56
|
+
isLabelHidden: c = !1,
|
|
57
|
+
orientation: u = "vertical",
|
|
58
|
+
variant: t = "comfortable",
|
|
59
|
+
...d
|
|
60
|
+
}, y) => {
|
|
61
|
+
const m = I(), {
|
|
62
|
+
base: p,
|
|
63
|
+
label: b,
|
|
64
|
+
list: f,
|
|
65
|
+
listItem: v
|
|
66
|
+
} = L({ orientation: u, variant: t, showLabel: !c }), r = i.Children.toArray(s), g = r.length, o = `navcard-group-label-${m}`;
|
|
67
|
+
return /* @__PURE__ */ N("nav", { ...d, ref: y, className: p(), "aria-labelledby": o, children: [
|
|
68
|
+
/* @__PURE__ */ l("span", { className: b(), id: o, children: n }),
|
|
69
|
+
/* @__PURE__ */ l("ul", { className: f(), "data-variant": t, children: r.map((a, e) => {
|
|
70
|
+
if (i.isValidElement(a)) {
|
|
71
|
+
const h = e === 0, x = e === g - 1;
|
|
72
|
+
return /* @__PURE__ */ l(
|
|
73
|
+
"li",
|
|
74
|
+
{
|
|
75
|
+
className: v(),
|
|
76
|
+
"data-variant": t,
|
|
77
|
+
"data-unity-first": h ? "" : void 0,
|
|
78
|
+
"data-unity-last": x ? "" : void 0,
|
|
79
|
+
children: a
|
|
80
|
+
},
|
|
81
|
+
a.key
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
return a;
|
|
85
|
+
}) })
|
|
86
|
+
] });
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
G.displayName = "NavigationCardGroup";
|
|
90
|
+
export {
|
|
91
|
+
G as NavigationCardGroup,
|
|
92
|
+
L as navigationCardGroup
|
|
93
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { TextProps } from '../../text/Text.js';
|
|
2
|
+
export type NavigationCardLabelProps = Omit<TextProps, 'variant' | 'color' | 'className' | 'style'>;
|
|
3
|
+
/**
|
|
4
|
+
* Displays the primary label text for a NavigationCard component.
|
|
5
|
+
* Use this component to provide the main identifying text for your navigation card, which serves as the accessible label for the entire card.
|
|
6
|
+
* The label automatically connects to the parent NavigationCard for proper accessibility semantics.
|
|
7
|
+
* @param {NavigationCardLabelProps} props - Standard text element props (excluding variant, color, className, and style which are preset)
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* import { RawNavigationCard, NavigationCardLabel } from '@payfit/unity-components'
|
|
11
|
+
*
|
|
12
|
+
* function Example() {
|
|
13
|
+
* return (
|
|
14
|
+
* <RawNavigationCard href="/team">
|
|
15
|
+
* <NavigationCardLabel>Team Members</NavigationCardLabel>
|
|
16
|
+
* </RawNavigationCard>
|
|
17
|
+
* )
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
* @remarks
|
|
21
|
+
* - Must be used within a `NavigationCard` component to function correctly
|
|
22
|
+
* - The label text is styled with the "action" typography variant for consistency
|
|
23
|
+
* - Automatically receives proper accessibility IDs from the parent NavigationCard
|
|
24
|
+
* - Supports all standard HTML text element props except styling props which are managed by the component
|
|
25
|
+
* @see {@link NavigationCardLabelProps} for all available props
|
|
26
|
+
* @see Source code in {@link https://github.com/PayFit/hr-apps/tree/master/libs/shared/unity/components/src/components/navigation-card/parts GitHub}
|
|
27
|
+
* @see Design specs {@link https://www.figma.com/design/poaMyU7abAgL9VRhx4ygyy/Unity-DS-%3E-Components-Library?node-id=14505-64292 Figma}
|
|
28
|
+
* @see Design docs in {@link https://www.payfit.design/ Payfit.design}
|
|
29
|
+
* @see Developer docs in {@link https://unity-components.payfit.io/?path=/docs/navigation-navigationcard-navigationcardlabel--docs unity-components.payfit.io}
|
|
30
|
+
*/
|
|
31
|
+
declare const NavigationCardLabel: import('react').ForwardRefExoticComponent<NavigationCardLabelProps & import('react').RefAttributes<HTMLElement>>;
|
|
32
|
+
export { NavigationCardLabel };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as e } from "react";
|
|
3
|
+
import { Text as i } from "../../text/Text.js";
|
|
4
|
+
import { useNavigationCardContext as n } from "../NavigationCard.context.js";
|
|
5
|
+
const d = e(
|
|
6
|
+
(a, t) => {
|
|
7
|
+
const { labelId: o } = n();
|
|
8
|
+
return /* @__PURE__ */ r(
|
|
9
|
+
i,
|
|
10
|
+
{
|
|
11
|
+
id: o,
|
|
12
|
+
...a,
|
|
13
|
+
ref: t,
|
|
14
|
+
variant: "action",
|
|
15
|
+
color: "content.neutral",
|
|
16
|
+
className: "uy:group-aria-disabled:text-content-neutral-disabled"
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
d.displayName = "NavigationCardLabel";
|
|
22
|
+
export {
|
|
23
|
+
d as NavigationCardLabel
|
|
24
|
+
};
|
|
@@ -42,6 +42,8 @@ type NumberFieldComponent = (<TSchema extends Schema>(props: NumberFieldProps<St
|
|
|
42
42
|
* @param {NumberFieldProps<StandardSchemaV1.InferOutput<TSchema>>} props - The props for the NumberField component
|
|
43
43
|
* @param {ForwardedRef<HTMLInputElement>} ref - Ref forwarded to the underlying input element
|
|
44
44
|
* @returns {JSX.Element} A NumberField component
|
|
45
|
+
* @deprecated React Hook Form components are deprecated. Use the TanStack Form version instead.
|
|
46
|
+
* @see Storybook docs: https://unity-components.payfit.io/?path=/docs/forms-introduction-to-unity-forms--docs
|
|
45
47
|
*/
|
|
46
48
|
declare const NumberField: NumberFieldComponent;
|
|
47
49
|
export { NumberField };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { LabelProps } from '../label/Label.js';
|
|
3
|
+
import { TanstackNumberInputProps } from '../number-input/TanstackNumberInput.js';
|
|
4
|
+
/**
|
|
5
|
+
* Base props shared by the TanstackNumberField, including label and field adornments.
|
|
6
|
+
* Inherits `isRequired` and `requiredVariant` from {@link LabelProps} to control
|
|
7
|
+
* the required indicator in the label.
|
|
8
|
+
*/
|
|
9
|
+
export interface FieldProps extends Pick<LabelProps, 'isRequired' | 'requiredVariant'> {
|
|
10
|
+
/** The plain-text label associated with the number input (required for a11y). */
|
|
11
|
+
label: string;
|
|
12
|
+
/** Optional helper text displayed above the control to guide the user. */
|
|
13
|
+
helperText?: ReactNode;
|
|
14
|
+
/** Optional contextual link rendered below the control for additional info. */
|
|
15
|
+
contextualLink?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Props for {@link TanstackNumberField}.
|
|
19
|
+
*
|
|
20
|
+
* Combines field chrome (label, helper/contextual link, feedback) with the
|
|
21
|
+
* input behavior from {@link TanstackNumberInput}. All value/validation aspects
|
|
22
|
+
* are handled by the TanStack Form field context, so you should not pass `name`,
|
|
23
|
+
* `value`, `defaultValue`, or `isInvalid` here.
|
|
24
|
+
*/
|
|
25
|
+
export type NumberFieldProps = FieldProps & TanstackNumberInputProps;
|
|
26
|
+
/**
|
|
27
|
+
* TanstackNumberField renders a complete number field for TanStack forms:
|
|
28
|
+
* label, helper text, the numeric input itself, feedback message, and an
|
|
29
|
+
* optional contextual link.
|
|
30
|
+
*
|
|
31
|
+
* Behavior
|
|
32
|
+
* - Integrates with the TanStack Form field via `<form.AppField name="…">`.
|
|
33
|
+
* - Uses {@link TanstackNumberInput} for the numeric control and forwards visual
|
|
34
|
+
* props such as `withControls`, `minValue`, `maxValue`, `step`, `formatOptions`,
|
|
35
|
+
* `prefix`, `suffix`, and state props (`isReadOnly`, `isDisabled`, `isLoading`).
|
|
36
|
+
* - Invalid state is derived from the field meta (touched + !isValid) and is
|
|
37
|
+
* displayed through the underlying input and feedback area.
|
|
38
|
+
*
|
|
39
|
+
* Accessibility
|
|
40
|
+
* - The surrounding {@link TanstackFormField} provides `aria-labelledby`,
|
|
41
|
+
* `aria-describedby` (helper/feedback), and `aria-details` wiring so the input
|
|
42
|
+
* is fully accessible out of the box.
|
|
43
|
+
*
|
|
44
|
+
* Example
|
|
45
|
+
* ```tsx
|
|
46
|
+
* import { useTanstackUnityForm } from "@/hooks/use-tanstack-form"
|
|
47
|
+
* import { TanstackNumberField } from "@/components/number-field/TanstackNumberField"
|
|
48
|
+
*
|
|
49
|
+
* const form = useTanstackUnityForm<{ amount: number }>({ validators: {} })
|
|
50
|
+
*
|
|
51
|
+
* <form.AppForm>
|
|
52
|
+
* <form.Form>
|
|
53
|
+
* <form.AppField name="amount">
|
|
54
|
+
* {() => (
|
|
55
|
+
* <TanstackNumberField
|
|
56
|
+
* label="Amount"
|
|
57
|
+
* withControls
|
|
58
|
+
* minValue={0}
|
|
59
|
+
* step={5}
|
|
60
|
+
* helperText="Enter a positive amount"
|
|
61
|
+
* />
|
|
62
|
+
* )}
|
|
63
|
+
* </form.AppField>
|
|
64
|
+
* </form.Form>
|
|
65
|
+
* </form.AppForm>
|
|
66
|
+
* ```
|
|
67
|
+
* @see TanstackNumberInput for the underlying numeric control
|
|
68
|
+
* @see TanstackFormField for the a11y and layout context
|
|
69
|
+
* @see useTanstackUnityForm to create a form and field context
|
|
70
|
+
* @returns A composite field bound to the current TanStack form field
|
|
71
|
+
*/
|
|
72
|
+
declare const TanstackNumberField: import('react').ForwardRefExoticComponent<FieldProps & TanstackNumberInputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
73
|
+
export type { NumberFieldProps as TanstackNumberFieldProps };
|
|
74
|
+
export { TanstackNumberField };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsxs as d, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as f } from "react";
|
|
3
|
+
import { TanstackFormFeedbackText as l } from "../form-field/parts/TanstackFormFeedbackText.js";
|
|
4
|
+
import { TanstackFormHelperText as F } from "../form-field/parts/TanstackFormHelperText.js";
|
|
5
|
+
import { TanstackFormLabel as k } from "../form-field/parts/TanstackFormLabel.js";
|
|
6
|
+
import { TanstackFormField as T } from "../form-field/TanstackFormField.js";
|
|
7
|
+
import { TanstackNumberInput as u } from "../number-input/TanstackNumberInput.js";
|
|
8
|
+
function b({
|
|
9
|
+
label: m,
|
|
10
|
+
helperText: o,
|
|
11
|
+
contextualLink: t,
|
|
12
|
+
isRequired: a,
|
|
13
|
+
isLoading: e,
|
|
14
|
+
isDisabled: n,
|
|
15
|
+
isReadOnly: c,
|
|
16
|
+
requiredVariant: i,
|
|
17
|
+
...s
|
|
18
|
+
}, p) {
|
|
19
|
+
return /* @__PURE__ */ d(T, { children: [
|
|
20
|
+
/* @__PURE__ */ r(
|
|
21
|
+
k,
|
|
22
|
+
{
|
|
23
|
+
requiredVariant: i,
|
|
24
|
+
isRequired: a,
|
|
25
|
+
children: m
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
o && /* @__PURE__ */ r(F, { children: o }),
|
|
29
|
+
/* @__PURE__ */ r(u, { ref: p, ...{
|
|
30
|
+
isLoading: e,
|
|
31
|
+
isDisabled: n,
|
|
32
|
+
isReadOnly: c
|
|
33
|
+
}, ...s }),
|
|
34
|
+
/* @__PURE__ */ r(l, {}),
|
|
35
|
+
t
|
|
36
|
+
] });
|
|
37
|
+
}
|
|
38
|
+
const N = f(
|
|
39
|
+
b
|
|
40
|
+
);
|
|
41
|
+
N.displayName = "TanstackNumberField";
|
|
42
|
+
export {
|
|
43
|
+
N as TanstackNumberField
|
|
44
|
+
};
|