@payfit/unity-components 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/components/action-bar/ActionBar.d.ts +153 -0
- package/dist/esm/components/action-bar/ActionBar.js +173 -0
- package/dist/esm/components/action-bar/parts/ActionBarAction.d.ts +44 -0
- package/dist/esm/components/action-bar/parts/ActionBarAction.js +45 -0
- package/dist/esm/components/action-bar/parts/ActionBarRoot.d.ts +44 -0
- package/dist/esm/components/action-bar/parts/ActionBarRoot.js +46 -0
- package/dist/esm/components/actionable/Actionable.js +20 -21
- package/dist/esm/components/alert/Alert.d.ts +1 -1
- package/dist/esm/components/alert/Alert.js +1 -1
- package/dist/esm/components/alert/parts/AlertActions.d.ts +1 -1
- package/dist/esm/components/alert/parts/AlertActions.js +1 -1
- package/dist/esm/components/alert/parts/AlertContent.d.ts +1 -1
- package/dist/esm/components/alert/parts/AlertTitle.d.ts +1 -1
- package/dist/esm/components/anchor/Anchor.js +1 -1
- package/dist/esm/components/app-layout/AppLayout.js +6 -6
- package/dist/esm/components/app-menu/parts/AppMenuFooter.js +30 -30
- package/dist/esm/components/app-menu/parts/AppMenuNavContent.js +1 -1
- package/dist/esm/components/autocomplete/Autocomplete.d.ts +1 -1
- package/dist/esm/components/autocomplete/Autocomplete.js +14 -14
- package/dist/esm/components/autocomplete/parts/AutocompleteClearButton.js +5 -5
- package/dist/esm/components/autocomplete/parts/AutocompleteItem.d.ts +1 -1
- package/dist/esm/components/autocomplete/parts/AutocompleteItem.js +4 -4
- package/dist/esm/components/autocomplete/parts/AutocompleteItemGroup.d.ts +1 -1
- package/dist/esm/components/autocomplete/parts/AutocompleteItemGroup.js +12 -12
- package/dist/esm/components/autocomplete/parts/AutocompletePanel.d.ts +1 -1
- package/dist/esm/components/autocomplete/parts/AutocompletePanel.js +7 -7
- package/dist/esm/components/avatar/Avatar.d.ts +1 -1
- package/dist/esm/components/avatar/Avatar.js +15 -16
- package/dist/esm/components/avatar/Avatar.variants.js +1 -1
- package/dist/esm/components/avatar/parts/AvatarFallback.d.ts +1 -1
- package/dist/esm/components/avatar/parts/AvatarFallback.js +9 -10
- package/dist/esm/components/avatar/parts/AvatarImage.js +12 -12
- package/dist/esm/components/avatar/parts/AvatarPair.d.ts +1 -1
- package/dist/esm/components/avatar/parts/AvatarPair.js +4 -4
- package/dist/esm/components/badge/Badge.d.ts +1 -1
- package/dist/esm/components/badge/Badge.js +31 -35
- package/dist/esm/components/bottom-sheet/BottomSheet.d.ts +1 -1
- package/dist/esm/components/bottom-sheet/BottomSheet.js +14 -14
- package/dist/esm/components/bottom-sheet/parts/BottomSheetContent.d.ts +1 -1
- package/dist/esm/components/bottom-sheet/parts/BottomSheetContent.js +4 -4
- package/dist/esm/components/bottom-sheet/parts/BottomSheetDragIndicator.js +11 -11
- package/dist/esm/components/bottom-sheet/parts/BottomSheetFooter.d.ts +1 -1
- package/dist/esm/components/bottom-sheet/parts/BottomSheetFooter.js +4 -4
- package/dist/esm/components/bottom-sheet/parts/BottomSheetHeader.d.ts +4 -4
- package/dist/esm/components/bottom-sheet/parts/BottomSheetHeader.js +6 -6
- package/dist/esm/components/breadcrumbs/Breadcrumbs.context.d.ts +1 -1
- package/dist/esm/components/breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/esm/components/breadcrumbs/Breadcrumbs.variant.js +3 -3
- package/dist/esm/components/button/Button.js +33 -41
- package/dist/esm/components/button/Button.variants.d.ts +1 -1
- package/dist/esm/components/button/Button.variants.js +1 -1
- package/dist/esm/components/checkbox/Checkbox.js +53 -49
- package/dist/esm/components/checkbox/Checkbox.variants.js +1 -1
- package/dist/esm/components/checkbox/parts/CheckboxIndicator.js +1 -1
- package/dist/esm/components/checkbox-field/CheckboxField.js +39 -34
- package/dist/esm/components/checkbox-group/CheckboxGroup.d.ts +1 -1
- package/dist/esm/components/checkbox-group/CheckboxGroup.js +12 -12
- package/dist/esm/components/collapsible/Collapsible.js +22 -16
- package/dist/esm/components/collapsible/parts/CollapsibleContent.js +16 -7
- package/dist/esm/components/collapsible/parts/CollapsibleTitle.js +23 -23
- package/dist/esm/components/data-table/DataTable.d.ts +48 -17
- package/dist/esm/components/data-table/DataTable.js +104 -60
- package/dist/esm/components/data-table/mocks/employee-columns.d.ts +4 -0
- package/dist/esm/components/data-table/parts/DataTableBulkActions.d.ts +55 -0
- package/dist/esm/components/data-table/parts/DataTableBulkActions.js +65 -0
- package/dist/esm/components/data-table/parts/DataTableRoot.d.ts +37 -0
- package/dist/esm/components/data-table/parts/DataTableRoot.js +13 -0
- package/dist/esm/components/date-calendar/DateCalendar.js +8 -8
- package/dist/esm/components/date-picker/DatePicker.js +9 -9
- package/dist/esm/components/date-picker/parts/DateInput.js +7 -7
- package/dist/esm/components/date-picker-field/DatePickerField.js +12 -12
- package/dist/esm/components/definition-tooltip/DefinitionTooltip.js +4 -4
- package/dist/esm/components/dialog/Dialog.d.ts +1 -1
- package/dist/esm/components/dialog/Dialog.js +9 -9
- package/dist/esm/components/dialog/parts/DialogActions/DialogButton.d.ts +1 -1
- package/dist/esm/components/fieldset/Fieldset.d.ts +1 -1
- package/dist/esm/components/fieldset/Fieldset.js +4 -4
- package/dist/esm/components/flex/Flex.d.ts +1 -1
- package/dist/esm/components/flex/Flex.variants.js +189 -207
- package/dist/esm/components/flex/FlexItem.d.ts +1 -1
- package/dist/esm/components/form/Form.context.d.ts +1 -4
- package/dist/esm/components/form/Form.context.js +11 -13
- package/dist/esm/components/form/Form.d.ts +13 -11
- package/dist/esm/components/form/Form.js +45 -48
- package/dist/esm/components/form-field/FormField.context.d.ts +1 -6
- package/dist/esm/components/form-field/FormField.context.js +39 -47
- package/dist/esm/components/form-field/FormField.d.ts +0 -2
- package/dist/esm/components/form-field/FormField.js +37 -42
- package/dist/esm/components/form-field/parts/FormContextualLink.js +17 -17
- package/dist/esm/components/form-field/parts/FormControl.js +39 -35
- package/dist/esm/components/form-field/parts/FormFeedbackText.js +15 -17
- package/dist/esm/components/full-page-loader/FullPageLoader.js +7 -7
- package/dist/esm/components/funnel-layout/FunnelLayout.d.ts +2 -2
- package/dist/esm/components/funnel-layout/FunnelLayout.js +26 -26
- package/dist/esm/components/funnel-layout/parts/FunnelBody.d.ts +2 -2
- package/dist/esm/components/funnel-layout/parts/FunnelBody.js +4 -4
- package/dist/esm/components/funnel-layout/parts/FunnelPage.d.ts +2 -2
- package/dist/esm/components/funnel-layout/parts/FunnelPage.js +10 -10
- package/dist/esm/components/funnel-layout/parts/FunnelPageAction.d.ts +1 -1
- package/dist/esm/components/funnel-layout/parts/FunnelPageActions.d.ts +2 -2
- package/dist/esm/components/funnel-layout/parts/FunnelPageActions.js +13 -13
- package/dist/esm/components/funnel-layout/parts/FunnelPageContent.d.ts +2 -2
- package/dist/esm/components/funnel-layout/parts/FunnelPageContent.js +1 -1
- package/dist/esm/components/funnel-layout/parts/FunnelPageFooter.d.ts +2 -2
- package/dist/esm/components/funnel-layout/parts/FunnelPageFooter.js +7 -7
- package/dist/esm/components/funnel-layout/parts/FunnelPageHeader.d.ts +2 -2
- package/dist/esm/components/funnel-layout/parts/FunnelPageHeader.js +4 -4
- package/dist/esm/components/funnel-layout/parts/FunnelProgressBar.d.ts +1 -1
- package/dist/esm/components/funnel-layout/parts/FunnelProgressBar.js +4 -4
- package/dist/esm/components/funnel-layout/parts/FunnelSidebar.d.ts +2 -2
- package/dist/esm/components/funnel-layout/parts/FunnelSidebar.js +7 -7
- package/dist/esm/components/funnel-layout/parts/FunnelTopBar.d.ts +2 -2
- package/dist/esm/components/funnel-layout/parts/FunnelTopBar.js +9 -9
- package/dist/esm/components/grid/Grid.d.ts +1 -1
- package/dist/esm/components/grid/Grid.variants.d.ts +1 -1
- package/dist/esm/components/grid/Grid.variants.js +3 -3
- package/dist/esm/components/grid/GridItem.d.ts +1 -1
- package/dist/esm/components/icon/Icon.d.ts +1 -1
- package/dist/esm/components/icon/Icon.js +1 -1
- package/dist/esm/components/icon-button/CircularIconButton.d.ts +1 -1
- package/dist/esm/components/icon-button/CircularIconButton.js +21 -20
- package/dist/esm/components/icon-button/IconButton.variants.d.ts +1 -1
- package/dist/esm/components/icon-button/IconButton.variants.js +2 -2
- package/dist/esm/components/input/Input.js +6 -6
- package/dist/esm/components/label/Label.js +13 -13
- package/dist/esm/components/link/Link.d.ts +11 -1
- package/dist/esm/components/link/Link.js +32 -30
- package/dist/esm/components/link/Link.variants.d.ts +141 -30
- package/dist/esm/components/link/Link.variants.js +44 -16
- package/dist/esm/components/menu/parts/MenuItem.js +8 -8
- package/dist/esm/components/multi-select/parts/MultiSelectButton.js +14 -14
- package/dist/esm/components/multi-select/parts/MultiSelectOptGroup.js +5 -5
- package/dist/esm/components/multi-select/parts/MultiSelectOption.js +3 -3
- package/dist/esm/components/multi-select/parts/MultiSelectPopover.js +1 -1
- package/dist/esm/components/multi-select-field/MultiSelectField.js +6 -6
- package/dist/esm/components/nav/parts/NavGroup.js +28 -29
- package/dist/esm/components/nav/parts/NavItem.d.ts +1 -1
- package/dist/esm/components/nav/parts/NavItem.js +13 -14
- package/dist/esm/components/number-field/NumberField.js +14 -14
- package/dist/esm/components/number-input/NumberInput.d.ts +2 -2
- package/dist/esm/components/number-input/NumberInput.js +37 -37
- package/dist/esm/components/page/Page.d.ts +1 -1
- package/dist/esm/components/page/Page.js +5 -5
- package/dist/esm/components/page/parts/PageHeader.d.ts +1 -1
- package/dist/esm/components/page/parts/PageHeader.js +4 -4
- package/dist/esm/components/pagination/Pagination.d.ts +1 -1
- package/dist/esm/components/pagination/Pagination.js +16 -16
- package/dist/esm/components/pagination/parts/PaginationEllipsis.d.ts +1 -1
- package/dist/esm/components/pagination/parts/PaginationEllipsis.js +8 -8
- package/dist/esm/components/pagination/parts/PaginationJumpDialog.js +9 -9
- package/dist/esm/components/pagination/parts/PaginationLink.d.ts +1 -1
- package/dist/esm/components/pagination/parts/PaginationLink.js +6 -6
- package/dist/esm/components/payfit-brand/PayFitBrand.js +4 -4
- package/dist/esm/components/pill/Pill.d.ts +1 -1
- package/dist/esm/components/pill/Pill.js +1 -1
- package/dist/esm/components/popover/Popover.js +5 -5
- package/dist/esm/components/popover/parts/PopoverHeader.js +7 -7
- package/dist/esm/components/progress-bar/ProgressBar.js +11 -11
- package/dist/esm/components/radio-button-group/parts/RadioButton.d.ts +1 -1
- package/dist/esm/components/radio-button-group/parts/RadioButton.js +5 -5
- package/dist/esm/components/search/Search.d.ts +1 -1
- package/dist/esm/components/search/Search.js +14 -14
- package/dist/esm/components/segmented-button-group/parts/ToggleButton.js +10 -10
- package/dist/esm/components/select/Select.js +12 -12
- package/dist/esm/components/select/parts/SearchInput.js +7 -7
- package/dist/esm/components/select/parts/SelectButton.js +17 -14
- package/dist/esm/components/select/parts/SelectOption.js +4 -4
- package/dist/esm/components/select/parts/SelectOptionGroup.js +8 -8
- package/dist/esm/components/select/parts/SelectOptionHelper.js +1 -1
- package/dist/esm/components/select-field/SelectField.d.ts +1 -1
- package/dist/esm/components/select-field/SelectField.js +16 -16
- package/dist/esm/components/selectable-button-group/SelectableButtonGroup.d.ts +1 -1
- package/dist/esm/components/selectable-button-group/SelectableButtonGroup.js +8 -8
- package/dist/esm/components/selectable-button-group/parts/SelectableButton.js +10 -10
- package/dist/esm/components/selectable-card/internals/Content.js +5 -5
- package/dist/esm/components/selectable-card/internals/Description.js +1 -1
- package/dist/esm/components/selectable-card/internals/Illustration.js +3 -3
- package/dist/esm/components/selectable-card/internals/SelectedIndicator.js +4 -4
- package/dist/esm/components/selectable-card/selectable-card-checkbox-group/parts/SelectableCardCheckbox.d.ts +1 -1
- package/dist/esm/components/selectable-card/selectable-card-radio-group/parts/RadioIndicator.js +3 -3
- package/dist/esm/components/selectable-card/selectable-card-radio-group/parts/SelectableCardRadio.d.ts +1 -1
- package/dist/esm/components/selectable-card/selectableCard.variant.js +1 -1
- package/dist/esm/components/selectable-card-radio-group-field/SelectableCardRadioGroupField.js +22 -22
- package/dist/esm/components/side-panel/SidePanel.d.ts +1 -1
- package/dist/esm/components/side-panel/SidePanel.js +6 -6
- package/dist/esm/components/side-panel/parts/SidePanelContent.d.ts +1 -1
- package/dist/esm/components/side-panel/parts/SidePanelContent.js +9 -9
- package/dist/esm/components/side-panel/parts/SidePanelDragIndicator.js +11 -11
- package/dist/esm/components/side-panel/parts/SidePanelFooter.d.ts +1 -1
- package/dist/esm/components/side-panel/parts/SidePanelFooter.js +4 -4
- package/dist/esm/components/side-panel/parts/SidePanelHeader.d.ts +4 -4
- package/dist/esm/components/side-panel/parts/SidePanelHeader.js +6 -6
- package/dist/esm/components/skip-links/SkipLinks.d.ts +79 -0
- package/dist/esm/components/skip-links/SkipLinks.js +80 -0
- package/dist/esm/components/spinner/Spinner.js +5 -5
- package/dist/esm/components/table/Table.js +101 -100
- package/dist/esm/components/table/hooks/useTableKeyboardNavigation.d.ts +1 -19
- package/dist/esm/components/table/hooks/useTableKeyboardNavigation.js +147 -95
- package/dist/esm/components/table/parts/TableBody.js +1 -1
- package/dist/esm/components/table/parts/TableCell.d.ts +17 -1
- package/dist/esm/components/table/parts/TableCell.js +45 -41
- package/dist/esm/components/table/parts/TableColumnHeader.d.ts +2 -1
- package/dist/esm/components/table/parts/TableColumnHeader.js +63 -57
- package/dist/esm/components/table/parts/TableEmptyState.d.ts +1 -1
- package/dist/esm/components/table/parts/TableEmptyState.js +1 -1
- package/dist/esm/components/table/parts/TableHeader.d.ts +3 -3
- package/dist/esm/components/table/parts/TableHeader.js +28 -26
- package/dist/esm/components/table/parts/TablePagination.d.ts +1 -1
- package/dist/esm/components/table/parts/TablePagination.js +9 -9
- package/dist/esm/components/table/parts/TableRow.d.ts +1 -1
- package/dist/esm/components/table/parts/TableRow.js +36 -34
- package/dist/esm/components/tabs/Tabs.context.d.ts +1 -1
- package/dist/esm/components/tabs/Tabs.d.ts +1 -1
- package/dist/esm/components/tabs/Tabs.variant.js +1 -1
- package/dist/esm/components/tabs/parts/NavigationButton.js +12 -12
- package/dist/esm/components/tabs/parts/Tab.d.ts +3 -2
- package/dist/esm/components/tabs/parts/Tab.js +12 -12
- package/dist/esm/components/tabs/parts/TabPanel.d.ts +4 -2
- package/dist/esm/components/tabs/parts/TabPanel.js +7 -7
- package/dist/esm/components/task-menu/TaskMenu.d.ts +1 -1
- package/dist/esm/components/task-menu/TaskMenu.js +7 -7
- package/dist/esm/components/task-menu/parts/Content.js +6 -6
- package/dist/esm/components/task-menu/parts/Header.js +7 -7
- package/dist/esm/components/task-menu/parts/SubTask.js +6 -6
- package/dist/esm/components/task-menu/parts/Task.d.ts +1 -1
- package/dist/esm/components/task-menu/parts/Task.js +12 -12
- package/dist/esm/components/task-menu/parts/TaskGroup.js +7 -7
- package/dist/esm/components/task-menu/parts/task.variants.js +1 -1
- package/dist/esm/components/text/Text.d.ts +1 -1
- package/dist/esm/components/text/Text.variants.js +1 -1
- package/dist/esm/components/text-area/TextArea.js +6 -6
- package/dist/esm/components/text-field/TextField.js +5 -5
- package/dist/esm/components/toast/UnityToast.d.ts +1 -1
- package/dist/esm/components/toast/UnityToast.js +11 -11
- package/dist/esm/components/toggle-switch/ToggleSwitch.d.ts +1 -1
- package/dist/esm/components/toggle-switch/ToggleSwitch.js +4 -4
- package/dist/esm/components/toggle-switch-field/ToggleSwitchField.js +35 -31
- package/dist/esm/components/toggle-switch-group/ToggleSwitchGroup.d.ts +1 -1
- package/dist/esm/components/toggle-switch-group/ToggleSwitchGroup.js +5 -5
- package/dist/esm/components/toggle-switch-group-field/ToggleSwitchGroupField.js +43 -38
- package/dist/esm/components/tooltip/Tooltip.d.ts +2 -0
- package/dist/esm/components/tooltip/Tooltip.js +27 -19
- package/dist/esm/hooks/use-form.js +7 -7
- package/dist/esm/index.d.ts +6 -1
- package/dist/esm/index.js +366 -352
- package/dist/esm/integrations/react-router/v5/UnityReactRouterV5Provider.js +28 -0
- package/dist/esm/integrations/react-router/v5/index.d.ts +1 -0
- package/dist/esm/integrations/react-router/v5.js +4 -0
- package/i18n/en-GB.json +6 -0
- package/i18n/es-ES.json +6 -0
- package/i18n/fr-FR.json +6 -0
- package/package.json +38 -35
- package/dist/esm/providers/router/integrations/UnityReactRouterV5Provider.js +0 -28
- /package/dist/esm/{providers/router/integrations → integrations/react-router/v5}/UnityReactRouterV5Provider.d.ts +0 -0
|
@@ -1,217 +1,199 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const y = s(
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
false: "uy:flex"
|
|
9
|
-
},
|
|
10
|
-
direction: {
|
|
11
|
-
row: "uy:flex-row",
|
|
12
|
-
col: "uy:flex-col"
|
|
13
|
-
},
|
|
14
|
-
isReversed: {
|
|
15
|
-
true: null,
|
|
16
|
-
false: null
|
|
17
|
-
},
|
|
18
|
-
wrap: {
|
|
19
|
-
wrap: "uy:flex-wrap",
|
|
20
|
-
"wrap-reverse": "uy:flex-wrap-reverse",
|
|
21
|
-
nowrap: "uy:flex-nowrap"
|
|
22
|
-
},
|
|
23
|
-
gap: {
|
|
24
|
-
0: "uy:gap-0",
|
|
25
|
-
25: "uy:gap-25",
|
|
26
|
-
50: "uy:gap-50",
|
|
27
|
-
75: "uy:gap-75",
|
|
28
|
-
100: "uy:gap-100",
|
|
29
|
-
125: "uy:gap-125",
|
|
30
|
-
150: "uy:gap-150",
|
|
31
|
-
200: "uy:gap-200",
|
|
32
|
-
250: "uy:gap-250",
|
|
33
|
-
300: "uy:gap-300",
|
|
34
|
-
400: "uy:gap-400",
|
|
35
|
-
500: "uy:gap-500",
|
|
36
|
-
600: "uy:gap-600",
|
|
37
|
-
800: "uy:gap-800",
|
|
38
|
-
1e3: "uy:gap-1000"
|
|
39
|
-
},
|
|
40
|
-
gapX: {
|
|
41
|
-
0: "uy:gap-x-0",
|
|
42
|
-
25: "uy:gap-x-25",
|
|
43
|
-
50: "uy:gap-x-50",
|
|
44
|
-
75: "uy:gap-x-75",
|
|
45
|
-
100: "uy:gap-x-100",
|
|
46
|
-
125: "uy:gap-x-125",
|
|
47
|
-
150: "uy:gap-x-150",
|
|
48
|
-
200: "uy:gap-x-200",
|
|
49
|
-
250: "uy:gap-x-250",
|
|
50
|
-
300: "uy:gap-x-300",
|
|
51
|
-
400: "uy:gap-x-400",
|
|
52
|
-
500: "uy:gap-x-500",
|
|
53
|
-
600: "uy:gap-x-600",
|
|
54
|
-
800: "uy:gap-x-800",
|
|
55
|
-
1e3: "uy:gap-x-1000"
|
|
56
|
-
},
|
|
57
|
-
gapY: {
|
|
58
|
-
0: "uy:gap-y-0",
|
|
59
|
-
25: "uy:gap-y-25",
|
|
60
|
-
50: "uy:gap-y-50",
|
|
61
|
-
75: "uy:gap-y-75",
|
|
62
|
-
100: "uy:gap-y-100",
|
|
63
|
-
125: "uy:gap-y-125",
|
|
64
|
-
150: "uy:gap-y-150",
|
|
65
|
-
200: "uy:gap-y-200",
|
|
66
|
-
250: "uy:gap-y-250",
|
|
67
|
-
300: "uy:gap-y-300",
|
|
68
|
-
400: "uy:gap-y-400",
|
|
69
|
-
500: "uy:gap-y-500",
|
|
70
|
-
600: "uy:gap-y-600",
|
|
71
|
-
800: "uy:gap-y-800",
|
|
72
|
-
1e3: "uy:gap-y-1000"
|
|
73
|
-
},
|
|
74
|
-
justify: {
|
|
75
|
-
start: "uy:justify-start",
|
|
76
|
-
end: "uy:justify-end",
|
|
77
|
-
center: "uy:justify-center",
|
|
78
|
-
between: "uy:justify-between",
|
|
79
|
-
around: "uy:justify-around",
|
|
80
|
-
evenly: "uy:justify-evenly"
|
|
81
|
-
},
|
|
82
|
-
align: {
|
|
83
|
-
start: "uy:items-start",
|
|
84
|
-
end: "uy:items-end",
|
|
85
|
-
center: "uy:items-center",
|
|
86
|
-
baseline: "uy:items-baseline",
|
|
87
|
-
stretch: "uy:items-stretch"
|
|
88
|
-
},
|
|
89
|
-
alignContent: {
|
|
90
|
-
start: "uy:content-start",
|
|
91
|
-
end: "uy:content-end",
|
|
92
|
-
center: "uy:content-center",
|
|
93
|
-
between: "uy:content-between",
|
|
94
|
-
around: "uy:content-around",
|
|
95
|
-
evenly: "uy:content-evenly"
|
|
96
|
-
}
|
|
1
|
+
import { uyTv as s } from "@payfit/unity-themes";
|
|
2
|
+
const y = s({
|
|
3
|
+
base: "uy:flex",
|
|
4
|
+
variants: {
|
|
5
|
+
inline: {
|
|
6
|
+
true: "uy:inline-flex",
|
|
7
|
+
false: "uy:flex"
|
|
97
8
|
},
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
9
|
+
direction: {
|
|
10
|
+
row: "uy:flex-row",
|
|
11
|
+
col: "uy:flex-col"
|
|
12
|
+
},
|
|
13
|
+
isReversed: {
|
|
14
|
+
true: null,
|
|
15
|
+
false: null
|
|
16
|
+
},
|
|
17
|
+
wrap: {
|
|
18
|
+
wrap: "uy:flex-wrap",
|
|
19
|
+
"wrap-reverse": "uy:flex-wrap-reverse",
|
|
20
|
+
nowrap: "uy:flex-nowrap"
|
|
21
|
+
},
|
|
22
|
+
gap: {
|
|
23
|
+
0: "uy:gap-0",
|
|
24
|
+
25: "uy:gap-25",
|
|
25
|
+
50: "uy:gap-50",
|
|
26
|
+
75: "uy:gap-75",
|
|
27
|
+
100: "uy:gap-100",
|
|
28
|
+
125: "uy:gap-125",
|
|
29
|
+
150: "uy:gap-150",
|
|
30
|
+
200: "uy:gap-200",
|
|
31
|
+
250: "uy:gap-250",
|
|
32
|
+
300: "uy:gap-300",
|
|
33
|
+
400: "uy:gap-400",
|
|
34
|
+
500: "uy:gap-500",
|
|
35
|
+
600: "uy:gap-600",
|
|
36
|
+
800: "uy:gap-800",
|
|
37
|
+
1e3: "uy:gap-1000"
|
|
38
|
+
},
|
|
39
|
+
gapX: {
|
|
40
|
+
0: "uy:gap-x-0",
|
|
41
|
+
25: "uy:gap-x-25",
|
|
42
|
+
50: "uy:gap-x-50",
|
|
43
|
+
75: "uy:gap-x-75",
|
|
44
|
+
100: "uy:gap-x-100",
|
|
45
|
+
125: "uy:gap-x-125",
|
|
46
|
+
150: "uy:gap-x-150",
|
|
47
|
+
200: "uy:gap-x-200",
|
|
48
|
+
250: "uy:gap-x-250",
|
|
49
|
+
300: "uy:gap-x-300",
|
|
50
|
+
400: "uy:gap-x-400",
|
|
51
|
+
500: "uy:gap-x-500",
|
|
52
|
+
600: "uy:gap-x-600",
|
|
53
|
+
800: "uy:gap-x-800",
|
|
54
|
+
1e3: "uy:gap-x-1000"
|
|
105
55
|
},
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
56
|
+
gapY: {
|
|
57
|
+
0: "uy:gap-y-0",
|
|
58
|
+
25: "uy:gap-y-25",
|
|
59
|
+
50: "uy:gap-y-50",
|
|
60
|
+
75: "uy:gap-y-75",
|
|
61
|
+
100: "uy:gap-y-100",
|
|
62
|
+
125: "uy:gap-y-125",
|
|
63
|
+
150: "uy:gap-y-150",
|
|
64
|
+
200: "uy:gap-y-200",
|
|
65
|
+
250: "uy:gap-y-250",
|
|
66
|
+
300: "uy:gap-y-300",
|
|
67
|
+
400: "uy:gap-y-400",
|
|
68
|
+
500: "uy:gap-y-500",
|
|
69
|
+
600: "uy:gap-y-600",
|
|
70
|
+
800: "uy:gap-y-800",
|
|
71
|
+
1e3: "uy:gap-y-1000"
|
|
72
|
+
},
|
|
73
|
+
justify: {
|
|
74
|
+
start: "uy:justify-start",
|
|
75
|
+
end: "uy:justify-end",
|
|
76
|
+
center: "uy:justify-center",
|
|
77
|
+
between: "uy:justify-between",
|
|
78
|
+
around: "uy:justify-around",
|
|
79
|
+
evenly: "uy:justify-evenly"
|
|
80
|
+
},
|
|
81
|
+
align: {
|
|
82
|
+
start: "uy:items-start",
|
|
83
|
+
end: "uy:items-end",
|
|
84
|
+
center: "uy:items-center",
|
|
85
|
+
baseline: "uy:items-baseline",
|
|
86
|
+
stretch: "uy:items-stretch"
|
|
87
|
+
},
|
|
88
|
+
alignContent: {
|
|
89
|
+
start: "uy:content-start",
|
|
90
|
+
end: "uy:content-end",
|
|
91
|
+
center: "uy:content-center",
|
|
92
|
+
between: "uy:content-between",
|
|
93
|
+
around: "uy:content-around",
|
|
94
|
+
evenly: "uy:content-evenly"
|
|
95
|
+
}
|
|
123
96
|
},
|
|
124
|
-
{
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
97
|
+
defaultVariants: {
|
|
98
|
+
inline: !1,
|
|
99
|
+
direction: "row",
|
|
100
|
+
wrap: "nowrap",
|
|
101
|
+
justify: "start",
|
|
102
|
+
align: "stretch",
|
|
103
|
+
isReversed: !1
|
|
104
|
+
},
|
|
105
|
+
compoundVariants: [
|
|
106
|
+
{
|
|
107
|
+
isReversed: !0,
|
|
108
|
+
direction: "row",
|
|
109
|
+
className: "uy:flex-row-reverse"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
isReversed: !0,
|
|
113
|
+
direction: void 0,
|
|
114
|
+
className: "uy:flex-row-reverse"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
isReversed: !0,
|
|
118
|
+
direction: "col",
|
|
119
|
+
className: "uy:flex-col-reverse"
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
}), e = s({
|
|
123
|
+
variants: {
|
|
124
|
+
grow: {
|
|
125
|
+
0: "uy:grow-0",
|
|
126
|
+
1: "uy:grow"
|
|
127
|
+
},
|
|
128
|
+
shrink: {
|
|
129
|
+
0: "uy:shrink-0",
|
|
130
|
+
1: "uy:shrink"
|
|
131
|
+
},
|
|
132
|
+
basis: {
|
|
133
|
+
auto: "uy:basis-auto",
|
|
134
|
+
min: "uy:basis-min",
|
|
135
|
+
max: "uy:basis-max",
|
|
136
|
+
fit: "uy:basis-fit",
|
|
137
|
+
full: "uy:basis-full",
|
|
138
|
+
"1/2": "uy:basis-1/2",
|
|
139
|
+
"1/3": "uy:basis-1/3",
|
|
140
|
+
"2/3": "uy:basis-2/3",
|
|
141
|
+
"1/4": "uy:basis-1/4",
|
|
142
|
+
"2/4": "uy:basis-2/4",
|
|
143
|
+
"3/4": "uy:basis-3/4",
|
|
144
|
+
"1/6": "uy:basis-1/6",
|
|
145
|
+
"2/6": "uy:basis-2/6",
|
|
146
|
+
"3/6": "uy:basis-3/6",
|
|
147
|
+
"4/6": "uy:basis-4/6",
|
|
148
|
+
"5/6": "uy:basis-5/6",
|
|
149
|
+
"1/12": "uy:basis-1/12",
|
|
150
|
+
"2/12": "uy:basis-2/12",
|
|
151
|
+
"3/12": "uy:basis-3/12",
|
|
152
|
+
"4/12": "uy:basis-4/12",
|
|
153
|
+
"5/12": "uy:basis-5/12",
|
|
154
|
+
"6/12": "uy:basis-6/12",
|
|
155
|
+
"7/12": "uy:basis-7/12",
|
|
156
|
+
"8/12": "uy:basis-8/12",
|
|
157
|
+
"9/12": "uy:basis-9/12",
|
|
158
|
+
"10/12": "uy:basis-10/12",
|
|
159
|
+
"11/12": "uy:basis-11/12",
|
|
160
|
+
0: "uy:basis-0",
|
|
161
|
+
25: "uy:basis-25",
|
|
162
|
+
50: "uy:basis-50",
|
|
163
|
+
75: "uy:basis-75",
|
|
164
|
+
100: "uy:basis-100",
|
|
165
|
+
125: "uy:basis-125",
|
|
166
|
+
150: "uy:basis-150",
|
|
167
|
+
200: "uy:basis-200",
|
|
168
|
+
250: "uy:basis-250",
|
|
169
|
+
300: "uy:basis-300",
|
|
170
|
+
400: "uy:basis-400",
|
|
171
|
+
500: "uy:basis-500",
|
|
172
|
+
600: "uy:basis-600",
|
|
173
|
+
800: "uy:basis-800",
|
|
174
|
+
1e3: "uy:basis-1000"
|
|
175
|
+
},
|
|
176
|
+
order: {
|
|
177
|
+
first: "uy:order-first",
|
|
178
|
+
last: "uy:order-last",
|
|
179
|
+
none: "uy:order-none"
|
|
199
180
|
},
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
181
|
+
self: {
|
|
182
|
+
auto: "uy:self-auto",
|
|
183
|
+
start: "uy:self-start",
|
|
184
|
+
end: "uy:self-end",
|
|
185
|
+
center: "uy:self-center",
|
|
186
|
+
stretch: "uy:self-stretch",
|
|
187
|
+
baseline: "uy:self-baseline"
|
|
205
188
|
}
|
|
206
189
|
},
|
|
207
|
-
{
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
// responsiveVariants: ['sm', 'md', 'lg', 'xl'],
|
|
190
|
+
defaultVariants: {
|
|
191
|
+
grow: 0,
|
|
192
|
+
shrink: 1,
|
|
193
|
+
order: "none",
|
|
194
|
+
self: "auto"
|
|
213
195
|
}
|
|
214
|
-
);
|
|
196
|
+
});
|
|
215
197
|
export {
|
|
216
198
|
y as flex,
|
|
217
199
|
e as flexItem
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VariantProps } from '
|
|
1
|
+
import { VariantProps } from '@payfit/unity-themes';
|
|
2
2
|
import { flexItem } from './Flex.variants.js';
|
|
3
3
|
export type FlexItemVariantProps = VariantProps<typeof flexItem>;
|
|
4
4
|
type ElementType = 'div' | 'span' | 'section' | 'nav' | 'aside' | 'header' | 'footer' | 'main' | 'article';
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { UseFormReturn } from 'react-hook-form';
|
|
3
|
-
import { infer as ZodInfer } from 'zod';
|
|
4
2
|
import { Schema } from '../../hooks/use-form.types.js';
|
|
5
3
|
interface UnityFormContextValue<TSchema extends Schema> {
|
|
6
4
|
schema: TSchema;
|
|
7
|
-
form: UseFormReturn<ZodInfer<TSchema>>;
|
|
8
5
|
}
|
|
9
6
|
export declare const UnityFormContext: import('react').Context<UnityFormContextValue<Schema> | null>;
|
|
10
|
-
export declare function UnityFormProvider<TSchema extends Schema>({ children, schema,
|
|
7
|
+
export declare function UnityFormProvider<TSchema extends Schema>({ children, schema, }: PropsWithChildren<UnityFormContextValue<TSchema>>): import("react/jsx-runtime").JSX.Element;
|
|
11
8
|
export declare function useUnityFormProvider<TSchema extends Schema>(): UnityFormContextValue<TSchema>;
|
|
12
9
|
export {};
|
|
@@ -1,30 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useContext as
|
|
3
|
-
const o =
|
|
4
|
-
function
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as n, createContext as i } from "react";
|
|
3
|
+
const o = i(null);
|
|
4
|
+
function s({
|
|
5
5
|
children: t,
|
|
6
|
-
schema: r
|
|
7
|
-
form: e
|
|
6
|
+
schema: r
|
|
8
7
|
}) {
|
|
9
|
-
return /* @__PURE__ */
|
|
8
|
+
return /* @__PURE__ */ e(
|
|
10
9
|
o.Provider,
|
|
11
10
|
{
|
|
12
11
|
value: {
|
|
13
|
-
schema: r
|
|
14
|
-
form: e
|
|
12
|
+
schema: r
|
|
15
13
|
},
|
|
16
14
|
children: t
|
|
17
15
|
}
|
|
18
16
|
);
|
|
19
17
|
}
|
|
20
|
-
function
|
|
21
|
-
const t =
|
|
18
|
+
function c() {
|
|
19
|
+
const t = n(o);
|
|
22
20
|
if (!t)
|
|
23
21
|
throw new Error("useFormContext must be used within a Form component");
|
|
24
22
|
return t;
|
|
25
23
|
}
|
|
26
24
|
export {
|
|
27
25
|
o as UnityFormContext,
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
s as UnityFormProvider,
|
|
27
|
+
c as useUnityFormProvider
|
|
30
28
|
};
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { FormProps as AriaFormProps } from 'react-aria-components';
|
|
3
|
-
import { UseFormReturn } from 'react-hook-form';
|
|
4
|
-
import {
|
|
3
|
+
import { FieldErrors, UseFormReturn } from 'react-hook-form';
|
|
4
|
+
import { infer as ZodInfer } from 'zod';
|
|
5
5
|
import { Schema, TFormValues } from '../../hooks/use-form.types.js';
|
|
6
6
|
type AllowedAriaFormProps = Omit<AriaFormProps, 'action' | 'onSubmit' | 'method' | 'target' | 'validationErrors' | 'onInvalid'>;
|
|
7
|
-
export interface FormProps<TSchema extends Schema, TForm extends TFormValues = ZodInfer<TSchema
|
|
7
|
+
export interface FormProps<TSchema extends Schema, TForm extends TFormValues = ZodInfer<TSchema>, TActionResult = unknown> extends PropsWithChildren<AllowedAriaFormProps> {
|
|
8
8
|
/** The form instance from react-hook-form */
|
|
9
9
|
form: UseFormReturn<TForm>;
|
|
10
10
|
/** The schema to validate the form data */
|
|
11
11
|
schema: TSchema;
|
|
12
12
|
/** The operations to execute when the form is submitted and the input data is valid */
|
|
13
|
-
action: (values: TForm) => Promise<
|
|
14
|
-
/** Handle successful form submission (when `action` callback resolves its promise or does not throw an error) */
|
|
15
|
-
onSuccess?: (data: TForm) => void;
|
|
16
|
-
/** Handle form submission errors (when `action` callback rejects its promise or throws an error) */
|
|
17
|
-
onError?: (error:
|
|
13
|
+
action: (values: TForm) => Promise<TActionResult> | TActionResult;
|
|
14
|
+
/** Handle successful form submission (when the `action` callback resolves its promise or does not throw an error) */
|
|
15
|
+
onSuccess?: (result: TActionResult, data: TForm) => void;
|
|
16
|
+
/** Handle form submission errors (when the `action` callback rejects its promise or throws an error) */
|
|
17
|
+
onError?: (error: unknown, data: TForm) => void;
|
|
18
|
+
/** Handle form validation errors (when form data is invalid) */
|
|
19
|
+
onInvalid?: (errors: FieldErrors) => void;
|
|
18
20
|
/** Enable or disable `react-hook-form`'s devtools (only in development mode) */
|
|
19
21
|
debug?: boolean;
|
|
20
22
|
}
|
|
21
23
|
/**
|
|
22
|
-
* The `Form` component provides full state management for complex forms with validation
|
|
24
|
+
* The `Form` component provides full state management for complex forms with validation by following a schema-based approach.
|
|
23
25
|
*
|
|
24
|
-
* Use this component to create complex
|
|
26
|
+
* Use this component to create complex forms with validation and error handling, alongside the [`FormField` component](/?path=/docs/forms-formfield--docs).
|
|
25
27
|
*
|
|
26
28
|
* Under the hood, the `Form` component is a wrapper around the `react-hook-form` library, which takes care of form state management. Additionally, it uses the `zod` library to define a schema used for form data validation. To use the `Form` component correctly, **you must install Zod and react-hook-form** as dependencies in your project:
|
|
27
29
|
*
|
|
@@ -29,5 +31,5 @@ export interface FormProps<TSchema extends Schema, TForm extends TFormValues = Z
|
|
|
29
31
|
* $ yarn add zod react-hook-form
|
|
30
32
|
* ```
|
|
31
33
|
*/
|
|
32
|
-
declare const Form: import('react').ForwardRefExoticComponent<FormProps<Schema, TFormValues> & import('react').RefAttributes<HTMLFormElement>>;
|
|
34
|
+
declare const Form: import('react').ForwardRefExoticComponent<FormProps<Schema, TFormValues, unknown> & import('react').RefAttributes<HTMLFormElement>>;
|
|
33
35
|
export { Form };
|
|
@@ -1,58 +1,55 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
), S = u(
|
|
1
|
+
import { jsx as m, jsxs as v, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as F, Suspense as P, lazy as j } from "react";
|
|
3
|
+
import { FormProvider as n } from "react-hook-form";
|
|
4
|
+
import { UnityFormProvider as u } from "./Form.context.js";
|
|
5
|
+
const D = j(
|
|
6
|
+
() => import("@hookform/devtools").then((e) => ({ default: e.DevTool }))
|
|
7
|
+
), T = F(
|
|
9
8
|
({
|
|
10
|
-
form:
|
|
11
|
-
schema:
|
|
12
|
-
onSuccess:
|
|
13
|
-
onError:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
})(e)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
p && /* @__PURE__ */ a(k, { fallback: /* @__PURE__ */ a(g, {}), children: /* @__PURE__ */ a(P, { control: t.control }) }),
|
|
39
|
-
/* @__PURE__ */ a(
|
|
40
|
-
D,
|
|
9
|
+
form: e,
|
|
10
|
+
schema: f,
|
|
11
|
+
onSuccess: r,
|
|
12
|
+
onError: i,
|
|
13
|
+
onInvalid: l,
|
|
14
|
+
action: p,
|
|
15
|
+
children: a,
|
|
16
|
+
className: d,
|
|
17
|
+
onReset: h,
|
|
18
|
+
debug: s = !1,
|
|
19
|
+
...b
|
|
20
|
+
}, c) => {
|
|
21
|
+
const y = e.handleSubmit(
|
|
22
|
+
(t) => {
|
|
23
|
+
Promise.resolve().then(() => p(t)).then((o) => {
|
|
24
|
+
r == null || r(o, t);
|
|
25
|
+
}).catch((o) => {
|
|
26
|
+
i == null || i(o, t);
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
(t) => {
|
|
30
|
+
l == null || l(t);
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
return /* @__PURE__ */ m(u, { schema: f, children: /* @__PURE__ */ v(n, { ...e, children: [
|
|
34
|
+
s && /* @__PURE__ */ m(P, { fallback: /* @__PURE__ */ m(x, {}), children: /* @__PURE__ */ m(D, { control: e.control }) }),
|
|
35
|
+
/* @__PURE__ */ m(
|
|
36
|
+
"form",
|
|
41
37
|
{
|
|
42
|
-
...
|
|
43
|
-
ref:
|
|
44
|
-
onSubmit:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
38
|
+
...b,
|
|
39
|
+
ref: c,
|
|
40
|
+
onSubmit: (t) => {
|
|
41
|
+
y(t);
|
|
42
|
+
},
|
|
43
|
+
className: d,
|
|
44
|
+
onReset: h,
|
|
48
45
|
"data-dd-privacy": "mask",
|
|
49
|
-
children:
|
|
46
|
+
children: a
|
|
50
47
|
}
|
|
51
48
|
)
|
|
52
49
|
] }) });
|
|
53
50
|
}
|
|
54
51
|
);
|
|
55
|
-
|
|
52
|
+
T.displayName = "Form";
|
|
56
53
|
export {
|
|
57
|
-
|
|
54
|
+
T as Form
|
|
58
55
|
};
|
|
@@ -4,7 +4,6 @@ interface FormFieldContextValue<TFieldValues extends FieldValues = FieldValues,
|
|
|
4
4
|
id: string;
|
|
5
5
|
name: TName;
|
|
6
6
|
isRequired?: boolean;
|
|
7
|
-
isInvalid?: boolean;
|
|
8
7
|
isLoading?: boolean;
|
|
9
8
|
isReadOnly?: boolean;
|
|
10
9
|
isDisabled?: boolean;
|
|
@@ -12,17 +11,13 @@ interface FormFieldContextValue<TFieldValues extends FieldValues = FieldValues,
|
|
|
12
11
|
hasContextualLink?: boolean;
|
|
13
12
|
}
|
|
14
13
|
export declare const FormFieldContext: import('react').Context<FormFieldContextValue<FieldValues, string>>;
|
|
15
|
-
export declare function FormFieldProvider({ children, id, name, isRequired,
|
|
14
|
+
export declare function FormFieldProvider({ children, id, name, isRequired, isLoading, isReadOnly, isDisabled, hasHelperText, hasContextualLink, }: PropsWithChildren<FormFieldContextValue>): import("react/jsx-runtime").JSX.Element;
|
|
16
15
|
export declare function useFormField(): {
|
|
17
16
|
fieldState: {
|
|
18
17
|
isRequired: boolean | undefined;
|
|
19
|
-
isInvalid: boolean | undefined;
|
|
20
18
|
isLoading: boolean | undefined;
|
|
21
19
|
isReadOnly: boolean | undefined;
|
|
22
20
|
isDisabled: boolean | undefined;
|
|
23
|
-
isDirty: boolean;
|
|
24
|
-
isTouched: boolean;
|
|
25
|
-
error?: import('react-hook-form').FieldError;
|
|
26
21
|
};
|
|
27
22
|
formState: import('react-hook-form').UseFormStateReturn<FieldValues>;
|
|
28
23
|
id: string;
|