@povio/ui 3.4.0-rc.2 → 3.4.0-rc.3

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/index.d.ts CHANGED
@@ -1,263 +1 @@
1
- export { AlignCenterIcon } from './assets/icons/AlignCenter';
2
- export { AlignLeftIcon } from './assets/icons/AlignLeft';
3
- export { AlignLeftRightIcon } from './assets/icons/AlignLeftRight';
4
- export { AlignRightIcon } from './assets/icons/AlignRight';
5
- export { ArrowDropDownIcon } from './assets/icons/ArrowDropDown';
6
- export { ArrowDropUpIcon } from './assets/icons/ArrowDropUp';
7
- export { ArrowLeftIcon } from './assets/icons/ArrowLeft';
8
- export { ArrowRightIcon } from './assets/icons/ArrowRight';
9
- export { BoldIcon } from './assets/icons/Bold';
10
- export { BulletedListIcon } from './assets/icons/BulletedList';
11
- export { CalendarIcon } from './assets/icons/Calendar';
12
- export { CheckIcon } from './assets/icons/Check';
13
- export { CheckboxCheckmarkIcon } from './assets/icons/CheckboxCheckmark';
14
- export { CheckboxIndeterminateIcon } from './assets/icons/CheckboxIndeterminate';
15
- export { ChevronDownIcon } from './assets/icons/ChevronDown';
16
- export { ChevronLeftIcon } from './assets/icons/ChevronLeft';
17
- export { ChevronRightIcon } from './assets/icons/ChevronRight';
18
- export { ChevronsLeftIcon } from './assets/icons/ChevronsLeft';
19
- export { ChevronsRightIcon } from './assets/icons/ChevronsRight';
20
- export { ChevronUpIcon } from './assets/icons/ChevronUp';
21
- export { ClockIcon } from './assets/icons/Clock';
22
- export { CloseIcon } from './assets/icons/Close';
23
- export { DateTimeIcon } from './assets/icons/DateTime';
24
- export { HighlightIcon } from './assets/icons/Highlight';
25
- export { HighlightOnIcon } from './assets/icons/HighlightOn';
26
- export { HomeIcon } from './assets/icons/Home';
27
- export { InfoIcon } from './assets/icons/Info';
28
- export { ItalicIcon } from './assets/icons/Italic';
29
- export { LinkIcon } from './assets/icons/Link';
30
- export { MenuIcon } from './assets/icons/Menu';
31
- export { NumberedListIcon } from './assets/icons/NumberedList';
32
- export { PointerHorizontalIcon } from './assets/icons/PointerHorizontal';
33
- export { PointerVerticalIcon } from './assets/icons/PointerVertical';
34
- export { SendIcon } from './assets/icons/Send';
35
- export { StrikethroughIcon } from './assets/icons/Strikethrough';
36
- export { TextColorIcon } from './assets/icons/TextColor';
37
- export { UnderlinedIcon } from './assets/icons/Underlined';
38
- export { VisibilityIcon } from './assets/icons/Visibility';
39
- export { VisibilityOffIcon } from './assets/icons/VisibilityOff';
40
- export type { BreadcrumbItem, BreadcrumbsProps } from './components/Breadcrumbs/Breadcrumbs';
41
- export { Breadcrumbs } from './components/Breadcrumbs/Breadcrumbs';
42
- export type { BreadcrumbChevronVariantProps, BreadcrumbIconVariantProps, BreadcrumbItemVariantProps, BreadcrumbSegmentVariantProps, BreadcrumbsVariantProps, } from './components/Breadcrumbs/breadcrumbs.cva';
43
- export type { ButtonProps } from './components/buttons/Button/Button';
44
- export { Button } from './components/buttons/Button/Button';
45
- export type { ButtonVariantProps } from './components/buttons/Button/button.cva';
46
- export type { IconButtonProps } from './components/buttons/IconButton/IconButton';
47
- export { IconButton } from './components/buttons/IconButton/IconButton';
48
- export type { InlineIconButtonProps } from './components/buttons/InlineIconButton/InlineIconButton';
49
- export { InlineIconButton } from './components/buttons/InlineIconButton/InlineIconButton';
50
- export type { PillButtonProps } from './components/buttons/PillButton/PillButton';
51
- export { PillButton } from './components/buttons/PillButton/PillButton';
52
- export type { PillButtonVariants } from './components/buttons/PillButton/pillButton.cva';
53
- export type { SplitButtonProps } from './components/buttons/SplitButton/SplitButton';
54
- export { SplitButton } from './components/buttons/SplitButton/SplitButton';
55
- export type { TextButtonProps } from './components/buttons/TextButton/TextButton';
56
- export { TextButton } from './components/buttons/TextButton/TextButton';
57
- export type { ToggleButtonProps } from './components/buttons/ToggleButton/ToggleButton';
58
- export { ToggleButton } from './components/buttons/ToggleButton/ToggleButton';
59
- export type { CheckboxProps, ControlledCheckboxProps } from './components/inputs/Checkbox/Checkbox';
60
- export { Checkbox } from './components/inputs/Checkbox/Checkbox';
61
- export type { CheckboxGroupProps, ControlledCheckboxGroupProps } from './components/inputs/Checkbox/CheckboxGroup';
62
- export { CheckboxGroup } from './components/inputs/Checkbox/CheckboxGroup';
63
- export type { CheckboxVariantProps } from './components/inputs/Checkbox/checkbox.cva';
64
- export type { ControlledDatePickerProps, DatePickerProps } from './components/inputs/DateTime/DatePicker/DatePicker';
65
- export { DatePicker } from './components/inputs/DateTime/DatePicker/DatePicker';
66
- export type { ControlledDateRangePickerProps, DateRangePickerProps, } from './components/inputs/DateTime/DateRangePicker/DateRangePicker';
67
- export { DateRangePicker } from './components/inputs/DateTime/DateRangePicker/DateRangePicker';
68
- export type { ControlledDateTimePickerProps, DateTimePickerProps, } from './components/inputs/DateTime/DateTimePicker/DateTimePicker';
69
- export { DateTimePicker } from './components/inputs/DateTime/DateTimePicker/DateTimePicker';
70
- export type { ControlledTimePickerProps, TimePickerProps } from './components/inputs/DateTime/TimePicker/TimePicker';
71
- export { TimePicker } from './components/inputs/DateTime/TimePicker/TimePicker';
72
- export type { FileUploadError, FileUploadProps, FileUploadRequest, FileUploadState, } from './components/inputs/File/FileUpload';
73
- export { FileUpload } from './components/inputs/File/FileUpload';
74
- export type { FileUploadContainerProps } from './components/inputs/File/FileUploadContainer';
75
- export { FileUploadContainer } from './components/inputs/File/FileUploadContainer';
76
- export type { InputUploadProps } from './components/inputs/File/InputUpload';
77
- export { InputUpload } from './components/inputs/File/InputUpload';
78
- export { ProgressBar } from './components/inputs/File/shared/ProgressBar';
79
- export type { FormFieldProps } from './components/inputs/FormField/FormField';
80
- export { FormField } from './components/inputs/FormField/FormField';
81
- export type { ControlledNumberInputProps, NumberInputProps } from './components/inputs/Input/NumberInput/NumberInput';
82
- export { NumberInput } from './components/inputs/Input/NumberInput/NumberInput';
83
- export type { ControlledNumberRangeInputProps, NumberRangeInputProps, NumberRangeValue, } from './components/inputs/Input/NumberRangeInput/NumberRangeInput';
84
- export { NumberRangeInput } from './components/inputs/Input/NumberRangeInput/NumberRangeInput';
85
- export type { ControlledPasswordInputProps, PasswordInputProps, } from './components/inputs/Input/PasswordInput/PasswordInput';
86
- export { PasswordInput } from './components/inputs/Input/PasswordInput/PasswordInput';
87
- export type { ControlledTextAreaProps, TextAreaProps } from './components/inputs/Input/TextArea/TextArea';
88
- export { TextArea } from './components/inputs/Input/TextArea/TextArea';
89
- export type { ControlledTextInputProps, TextInputProps } from './components/inputs/Input/TextInput/TextInput';
90
- export { TextInput } from './components/inputs/Input/TextInput/TextInput';
91
- export { Form } from './components/inputs/Inputs/Form';
92
- export type { InputDef } from './components/inputs/Inputs/InputItem';
93
- export type { InputsProps } from './components/inputs/Inputs/Inputs';
94
- export { Inputs } from './components/inputs/Inputs/Inputs';
95
- export type { ControlledRadioGroupProps, RadioGroupProps } from './components/inputs/RadioGroup/RadioGroup';
96
- export { RadioGroup } from './components/inputs/RadioGroup/RadioGroup';
97
- export type { RadioVariantProps } from './components/inputs/RadioGroup/radio.cva';
98
- export type { AutocompleteProps, ControlledAutocompleteProps, } from './components/inputs/Selection/Autocomplete/Autocomplete';
99
- export { Autocomplete } from './components/inputs/Selection/Autocomplete/Autocomplete';
100
- export { QueryAutocomplete } from './components/inputs/Selection/Autocomplete/QueryAutocomplete';
101
- export type { SelectBaseProps } from './components/inputs/Selection/shared/SelectBase';
102
- export type { DefaultInitialSelectItem, SelectAsyncProps, SelectItem, } from './components/inputs/Selection/shared/select.types';
103
- export type { QuerySelectProps } from './components/inputs/Selection/Select/QuerySelect';
104
- export { QuerySelect } from './components/inputs/Selection/Select/QuerySelect';
105
- export type { ControlledSelectProps, SelectProps } from './components/inputs/Selection/Select/Select';
106
- export { Select } from './components/inputs/Selection/Select/Select';
107
- export type { ControlledSliderProps, SliderProps } from './components/inputs/Slider/Slider';
108
- export { Slider } from './components/inputs/Slider/Slider';
109
- export type { InputVariantProps } from './components/inputs/shared/input.cva';
110
- export type { TooltipWrapperTriggerVariantProps } from './components/inputs/shared/tooltipWrapper.cva';
111
- export type { ControlledToggleProps, ToggleProps } from './components/inputs/Toggle/Toggle';
112
- export { Toggle } from './components/inputs/Toggle/Toggle';
113
- export type { MenuProps } from './components/Menu/Menu';
114
- export { Menu } from './components/Menu/Menu';
115
- export { MenuItem, type MenuListItemProps } from './components/Menu/MenuItem';
116
- export type { MenuPopoverProps } from './components/Menu/MenuPopover';
117
- export { MenuPopover } from './components/Menu/MenuPopover';
118
- export type { MenuCvaVariantProps, MenuItemVariantProps, MenuPopoverVariantProps, MenuPopoverWrapperVariantProps, } from './components/Menu/menu.cva';
119
- export type { AccordionItemProps, AccordionProps } from './components/navigation/Accordion/Accordion';
120
- export { Accordion } from './components/navigation/Accordion/Accordion';
121
- export type { AccordionVariantProps } from './components/navigation/Accordion/accordion.cva';
122
- export type { AccordionItem } from './components/navigation/Accordion/accordion.types';
123
- export { Stepper } from './components/navigation/Stepper/Stepper';
124
- export type { StepperVariantProps } from './components/navigation/Stepper/stepper.cva';
125
- export type { StepItem, StepperProps } from './components/navigation/Stepper/stepper.types';
126
- export { uiOutlineClass } from './components/outline.clsx';
127
- export type { ActionModalProps } from './components/overlays/ActionModal/ActionModal';
128
- export { ActionModal } from './components/overlays/ActionModal/ActionModal';
129
- export type { BottomSheetProps } from './components/overlays/BottomSheet/BottomSheet';
130
- export { BottomSheet } from './components/overlays/BottomSheet/BottomSheet';
131
- export type { DrawerProps } from './components/overlays/Drawer/Drawer';
132
- export { Drawer } from './components/overlays/Drawer/Drawer';
133
- export type { ModalProps } from './components/overlays/Modal/Modal';
134
- export { Modal } from './components/overlays/Modal/Modal';
135
- export type { ResponsivePopoverProps } from './components/overlays/ResponsivePopover/ResponsivePopover';
136
- export { ResponsivePopover } from './components/overlays/ResponsivePopover/ResponsivePopover';
137
- export type { TooltipProps } from './components/overlays/Tooltip/Tooltip';
138
- export { Tooltip } from './components/overlays/Tooltip/Tooltip';
139
- export type { TooltipEllipsisProps } from './components/overlays/Tooltip/TooltipEllipsis';
140
- export { TooltipEllipsis } from './components/overlays/Tooltip/TooltipEllipsis';
141
- export { Segment } from './components/segment/Segment';
142
- export type { ControlledSegmentProps, SegmentProps } from './components/segment/segment.types';
143
- export type { PaginationProps } from './components/shared/pagination/Pagination';
144
- export { Pagination } from './components/shared/pagination/Pagination';
145
- export { PaginationList } from './components/shared/pagination/PaginationList';
146
- export type { AlertProps } from './components/status/Alert/Alert';
147
- export { Alert } from './components/status/Alert/Alert';
148
- export type { LoaderProps } from './components/status/Loader/Loader';
149
- export { Loader } from './components/status/Loader/Loader';
150
- export type { ToastAction, ToastProps } from './components/status/Toast/Toast';
151
- export { Toast, ToastContainer } from './components/status/Toast/Toast';
152
- export type { ToastVariantProps } from './components/status/Toast/toast.cva';
153
- export type { ToastOptions, ToastParams } from './components/status/Toast/useToast';
154
- export { useToast } from './components/status/Toast/useToast';
155
- export type { CellTextProps } from './components/table/CellText';
156
- export { CellText } from './components/table/CellText';
157
- export type { ColumnConfigModalProps } from './components/table/ColumnConfig';
158
- export { ColumnConfigModal } from './components/table/ColumnConfig';
159
- export type { HeaderTextProps } from './components/table/HeaderText';
160
- export { HeaderText } from './components/table/HeaderText';
161
- export type { InfiniteTableProps, InfiniteTableWrapperProps } from './components/table/InfiniteTable';
162
- export { InfiniteTable } from './components/table/InfiniteTable';
163
- export type { PaginatedTableProps, PaginatedTableWrapperProps } from './components/table/PaginatedTable';
164
- export { PaginatedTable } from './components/table/PaginatedTable';
165
- export type { TableProps, TableWrapperProps } from './components/table/Table';
166
- export { Table } from './components/table/Table';
167
- export type { TableRowVariantProps } from './components/table/table.cva';
168
- export type { LinkNavigationProps, LinkProps } from './components/text/Link/Link';
169
- export { Link } from './components/text/Link/Link';
170
- export type { LinkVariantProps } from './components/text/Link/link.cva';
171
- export type { PillProps } from './components/text/Pill/Pill';
172
- export { Pill } from './components/text/Pill/Pill';
173
- export type { TagProps } from './components/text/Tag/Tag';
174
- export { Tag } from './components/text/Tag/Tag';
175
- export type { TagVariantProps } from './components/text/Tag/tag.cva';
176
- export type { TypographyProps } from './components/text/Typography/Typography';
177
- export { Typography } from './components/text/Typography/Typography';
178
- export type { TypographyVariantProps } from './components/text/Typography/typography.cva';
179
- export { Confirmation } from './config/confirmation.context';
180
- export { ns, resources } from './config/i18n';
181
- export { LinkContext } from './config/link.context';
182
- export { UIRouter } from './config/router.context';
183
- export { ThemeContext } from './config/theme.context';
184
- export { UIConfig } from './config/uiConfig.context';
185
- export { UIOverrides } from './config/uiOverrides.context';
186
- export { breadcrumbChevronDefinition, breadcrumbIconDefinition, breadcrumbItemDefinition, breadcrumbsDefinition, breadcrumbSegmentDefinition, } from './components/Breadcrumbs/breadcrumbs.cva';
187
- export { buttonContentDefinition, buttonDefinition, buttonIconSizeDefinition, buttonSizeDefinition, } from './components/buttons/Button/button.cva';
188
- export { pillButtonContentDefinition, pillButtonDefinition } from './components/buttons/PillButton/pillButton.cva';
189
- export { checkboxContentRowDefinition, checkboxContentWrapperDefinition, checkboxDefinition, checkboxGroupLabelDefinition, checkboxIconDefinition, } from './components/inputs/Checkbox/checkbox.cva';
190
- export { datePickerInputContentRowDefinition } from './components/inputs/DateTime/shared/datePickerInput.cva';
191
- export { fileUploadDropZoneDefinition } from './components/inputs/File/shared/fileUpload.cva';
192
- export { inputUploadButtonDefinition, inputUploadDropZoneDefinition, } from './components/inputs/File/shared/inputUploadButton.cva';
193
- export { progressBarDefinition, progressBarFillDefinition, progressBarTrackDefinition, progressBarTrackWrapperDefinition, progressBarValueDefinition, } from './components/inputs/File/shared/progressBar.cva';
194
- export type { ProgressBarConfig, ProgressBarTrackConfig, ProgressBarVariantProps, } from './components/inputs/File/shared/progressBar.cva';
195
- export { formFieldHeaderDefinition } from './components/inputs/FormField/formFieldHeader.cva';
196
- export { formFieldErrorDefinition } from './components/inputs/FormField/formFieldError.cva';
197
- export { formFieldHelperDefinition } from './components/inputs/FormField/formFieldHelper.cva';
198
- export { textAreaWrapperDefinition } from './components/inputs/Input/TextArea/TextArea.cva';
199
- export { inputBaseDefinition, inputClearClassDefinition, inputContentWrapperDefinition, inputSideDefinition, inputSizeDefinition, } from './components/inputs/shared/input.cva';
200
- export type { LabelBaseProps, LabelConfig } from './components/inputs/shared/label.cva';
201
- export { labelDefinition } from './components/inputs/shared/label.cva';
202
- export { tooltipWrapperTriggerDefinition } from './components/inputs/shared/tooltipWrapper.cva';
203
- export { radioContentRowDefinition, radioContentWrapperDefinition, radioDefinition, } from './components/inputs/RadioGroup/radio.cva';
204
- export { selectPopoverDefinition } from './components/inputs/Selection/shared/selectDesktop.cva';
205
- export { selectInputTagsContentWrapperDefinition } from './components/inputs/Selection/shared/selectInput.cva';
206
- export { selectListBoxItemDefinition } from './components/inputs/Selection/shared/selectItem.cva';
207
- export { toggleDefinition } from './components/inputs/Toggle/toggle.cva';
208
- export { menuDefinition, menuItemDefinition, menuPopoverDefinition, menuPopoverWrapperDefinition, } from './components/Menu/menu.cva';
209
- export { accordionChevronDefinition, accordionDefinition, accordionHeadingDefinition, accordionHeadingSubtitleDefinition, accordionHeadingTitleDefinition, accordionIconDefinition, accordionItemDefinition, accordionPanelContentDefinition, accordionPanelDefinition, accordionTriggerDefinition, } from './components/navigation/Accordion/accordion.cva';
210
- export { stepperDefinition, stepperIconDefinition, stepperItemDefinition, stepperNumberDefinition, stepperSeparatorDefinition, stepperSubtextDefinition, stepperTitleDefinition, } from './components/navigation/Stepper/stepper.cva';
211
- export { modalContentDefinition, modalMainDefinition, modalOverlayDefinition, } from './components/overlays/Modal/modal.cva';
212
- export { tooltipDefinition, tooltipPointerHorizontalDefinition, tooltipPointerVerticalDefinition, tooltipTextDefinition, } from './components/overlays/Tooltip/tooltip.cva';
213
- export { segmentDefinition, segmentItemDefinition } from './components/segment/segment.cva';
214
- export { popoverDefinition } from './components/shared/popover.cva';
215
- export { alertDefinition } from './components/status/Alert/alert.cva';
216
- export { loaderDefinition, loaderWrapperDefinition } from './components/status/Loader/loader.cva';
217
- export { statusIconDefinition, statusSeparatorDefinition } from './components/status/shared/status.cva';
218
- export { toastDefinition, statusIconDefinition as toastStatusIconDefinition, statusSeparatorDefinition as toastStatusSeparatorDefinition, } from './components/status/Toast/toast.cva';
219
- export { tableCellTextDefinition, tableDataDefinition, tableHeadDataDefinition, tableHeaderTextDefinition, tableHeadRowDefinition, tableRowDefinition, } from './components/table/table.cva';
220
- export { linkDefinition } from './components/text/Link/link.cva';
221
- export { tagDefinition } from './components/text/Tag/tag.cva';
222
- export { typographyDefinition } from './components/text/Typography/typography.cva';
223
- export type { DynamicColumnsOptions } from './helpers/dynamicColumns';
224
- export { dynamicColumns } from './helpers/dynamicColumns';
225
- export type { DynamicInputsObjectSchema, DynamicInputsOptions } from './helpers/dynamicInputs';
226
- export { dynamicInputs } from './helpers/dynamicInputs';
227
- export { useAutosave } from './hooks/useAutosave';
228
- export { useBreakpoint } from './hooks/useBreakpoint';
229
- export { useDebounceCallback } from './hooks/useDebounceCallback';
230
- export { useDeepCompareEffect, useDeepCompareLayoutEffect, useDeepCompareMemo } from './hooks/useDeepCompare';
231
- export type { FilterStore } from './hooks/useFilters';
232
- export { useFilters } from './hooks/useFilters';
233
- export type { DeepKeys, DeepValue, FormSubmitErrorHandler, FormSubmitHandler, UIForm, UseFormProps, } from './hooks/useForm';
234
- export { useForm, useFormState, useFormValue } from './hooks/useForm';
235
- export type { UseFormAutosaveProps } from './hooks/useFormAutosave';
236
- export { useFormAutosave } from './hooks/useFormAutosave';
237
- export { useIntersectionObserver } from './hooks/useIntersectionObserver';
238
- export { createKeyInteractionsHandler, getKeyInteractionAction, useKeyInteractions, type KeyInteraction, type KeyInteractionAction, type KeyInteractionCallback, type KeyInteractionGroup, type KeyInteractions, type UseKeyInteractionsResult, } from './hooks/useKeyInteractions';
239
- export { useLocalStorage } from './hooks/useLocalStorage';
240
- export { useLongPressRepeat } from './hooks/useLongPressRepeat';
241
- export { usePagination } from './hooks/usePagination';
242
- export { useScrollableListBox } from './hooks/useScrollableListBox';
243
- export { useSorting } from './hooks/useSorting';
244
- export { useStateAndRef } from './hooks/useStateAndRef';
245
- export { useTableColumnConfig } from './hooks/useTableColumnConfig';
246
- export { useTableNav } from './hooks/useTableNav';
247
- export { useTranslationMemo } from './hooks/useTranslationMemo';
248
- export type { Function, HasRequiredProperty, IfAny, IsAny, IsRequiredChildrenProperty, IsUnknown, OmitDiscriminatedUnion, } from './types/common';
249
- export { ArrayUtils } from './utils/array.utils';
250
- export { type CompoundMapper, compoundMapper } from './utils/compoundMapper';
251
- export { DateUtils } from './utils/date.utils';
252
- export { DateTimeUtils } from './utils/date-time.utils';
253
- export { DomUtils } from './utils/dom.utils';
254
- export { FileUtils } from './utils/file.utils';
255
- export { isEqual } from './utils/isEqual';
256
- export { IntlUtils } from './utils/intl.utils';
257
- export { logger } from './utils/logger';
258
- export { ObjectUtils } from './utils/object.utils';
259
- export { QueriesUtils } from './utils/queries.utils';
260
- export { RestUtils } from './utils/rest.utils';
261
- export { RoutingUtils } from './utils/routing.utils';
262
- export { StringUtils } from './utils/string.utils';
263
- export { ZodUtils } from './utils/zod.utils';
1
+ export * from './rhf';
package/dist/index.js CHANGED
@@ -73,13 +73,11 @@ import { TextButton } from "./components/buttons/TextButton/TextButton.js";
73
73
  import { ToggleButton } from "./components/buttons/ToggleButton/ToggleButton.js";
74
74
  import { checkboxContentRowDefinition, checkboxContentWrapperDefinition, checkboxDefinition, checkboxGroupLabelDefinition, checkboxIconDefinition } from "./components/inputs/Checkbox/checkbox.cva.js";
75
75
  import { formFieldErrorDefinition } from "./components/inputs/FormField/formFieldError.cva.js";
76
- import { Checkbox } from "./components/inputs/Checkbox/Checkbox.js";
77
76
  import { formFieldHeaderDefinition } from "./components/inputs/FormField/formFieldHeader.cva.js";
78
77
  import { labelDefinition } from "./components/inputs/shared/label.cva.js";
79
78
  import { formFieldHelperDefinition } from "./components/inputs/FormField/formFieldHelper.cva.js";
80
79
  import { FormField } from "./components/inputs/FormField/FormField.js";
81
80
  import { inputBaseDefinition, inputClearClassDefinition, inputContentWrapperDefinition, inputSideDefinition, inputSizeDefinition } from "./components/inputs/shared/input.cva.js";
82
- import { CheckboxGroup } from "./components/inputs/Checkbox/CheckboxGroup.js";
83
81
  import { useLongPressRepeat } from "./hooks/useLongPressRepeat.js";
84
82
  import { useScrollableListBox } from "./hooks/useScrollableListBox.js";
85
83
  import { IntlUtils } from "./utils/intl.utils.js";
@@ -87,7 +85,6 @@ import { DateTimeUtils } from "./utils/date-time.utils.js";
87
85
  import { datePickerInputContentRowDefinition } from "./components/inputs/DateTime/shared/datePickerInput.cva.js";
88
86
  import { popoverDefinition } from "./components/shared/popover.cva.js";
89
87
  import { tooltipWrapperTriggerDefinition } from "./components/inputs/shared/tooltipWrapper.cva.js";
90
- import { DatePicker } from "./components/inputs/DateTime/DatePicker/DatePicker.js";
91
88
  import { tagDefinition } from "./components/text/Tag/tag.cva.js";
92
89
  import { Tag } from "./components/text/Tag/Tag.js";
93
90
  import { useDebounceCallback } from "./hooks/useDebounceCallback.js";
@@ -96,40 +93,22 @@ import { createKeyInteractionsHandler, getKeyInteractionAction, useKeyInteractio
96
93
  import { selectListBoxItemDefinition } from "./components/inputs/Selection/shared/selectItem.cva.js";
97
94
  import { useIntersectionObserver } from "./hooks/useIntersectionObserver.js";
98
95
  import { selectPopoverDefinition } from "./components/inputs/Selection/shared/selectDesktop.cva.js";
99
- import { TextInput } from "./components/inputs/Input/TextInput/TextInput.js";
100
- import { Select } from "./components/inputs/Selection/Select/Select.js";
101
- import { DateRangePicker } from "./components/inputs/DateTime/DateRangePicker/DateRangePicker.js";
102
- import { DateTimePicker } from "./components/inputs/DateTime/DateTimePicker/DateTimePicker.js";
103
- import { TimePicker } from "./components/inputs/DateTime/TimePicker/TimePicker.js";
104
96
  import { RestUtils } from "./utils/rest.utils.js";
105
97
  import { FileUtils } from "./utils/file.utils.js";
106
98
  import { progressBarDefinition, progressBarFillDefinition, progressBarTrackDefinition, progressBarTrackWrapperDefinition, progressBarValueDefinition } from "./components/inputs/File/shared/progressBar.cva.js";
107
99
  import { ProgressBar } from "./components/inputs/File/shared/ProgressBar.js";
108
100
  import { fileUploadDropZoneDefinition } from "./components/inputs/File/shared/fileUpload.cva.js";
109
- import { FileUpload } from "./components/inputs/File/FileUpload.js";
110
- import { FileUploadContainer } from "./components/inputs/File/FileUploadContainer.js";
111
101
  import { inputUploadButtonDefinition, inputUploadDropZoneDefinition } from "./components/inputs/File/shared/inputUploadButton.cva.js";
112
- import { InputUpload } from "./components/inputs/File/InputUpload.js";
113
- import { NumberInput } from "./components/inputs/Input/NumberInput/NumberInput.js";
114
- import { NumberRangeInput } from "./components/inputs/Input/NumberRangeInput/NumberRangeInput.js";
115
- import { PasswordInput } from "./components/inputs/Input/PasswordInput/PasswordInput.js";
116
102
  import { textAreaWrapperDefinition } from "./components/inputs/Input/TextArea/TextArea.cva.js";
117
- import { TextArea } from "./components/inputs/Input/TextArea/TextArea.js";
118
- import { Autocomplete } from "./components/inputs/Selection/Autocomplete/Autocomplete.js";
119
- import { QueryAutocomplete } from "./components/inputs/Selection/Autocomplete/QueryAutocomplete.js";
120
- import { Slider } from "./components/inputs/Slider/Slider.js";
103
+ import { radioContentRowDefinition, radioContentWrapperDefinition, radioDefinition } from "./components/inputs/RadioGroup/radio.cva.js";
121
104
  import { toggleDefinition } from "./components/inputs/Toggle/toggle.cva.js";
122
- import { Toggle } from "./components/inputs/Toggle/Toggle.js";
105
+ import { ResponsivePopover } from "./components/overlays/ResponsivePopover/ResponsivePopover.js";
123
106
  import { segmentDefinition, segmentItemDefinition } from "./components/segment/segment.cva.js";
124
- import { Segment } from "./components/segment/Segment.js";
125
- import { QuerySelect } from "./components/inputs/Selection/Select/QuerySelect.js";
107
+ import { Autocomplete, Checkbox, CheckboxGroup, DatePicker, DateRangePicker, DateTimePicker, FileUpload, InputUpload, NumberInput, NumberRangeInput, PasswordInput, QueryAutocomplete, QuerySelect, RadioGroup, Segment, Select, Slider, TextArea, TextInput, TimePicker, Toggle } from "./rhf/components.js";
108
+ import { FileUploadContainer } from "./components/inputs/File/FileUploadContainer.js";
126
109
  import { StringUtils } from "./utils/string.utils.js";
127
110
  import { ZodUtils } from "./utils/zod.utils.js";
128
- import { dynamicInputs } from "./helpers/dynamicInputs.js";
129
- import { Form } from "./components/inputs/Inputs/Form.js";
130
- import { Inputs } from "./components/inputs/Inputs/Inputs.js";
131
- import { radioContentRowDefinition, radioContentWrapperDefinition, radioDefinition } from "./components/inputs/RadioGroup/radio.cva.js";
132
- import { RadioGroup } from "./components/inputs/RadioGroup/RadioGroup.js";
111
+ import { Form, Inputs } from "./rhf/Inputs.js";
133
112
  import { accordionChevronDefinition, accordionDefinition, accordionHeadingDefinition, accordionHeadingSubtitleDefinition, accordionHeadingTitleDefinition, accordionIconDefinition, accordionItemDefinition, accordionPanelContentDefinition, accordionPanelDefinition, accordionTriggerDefinition } from "./components/navigation/Accordion/accordion.cva.js";
134
113
  import { Accordion } from "./components/navigation/Accordion/Accordion.js";
135
114
  import { stepperDefinition, stepperIconDefinition, stepperItemDefinition, stepperNumberDefinition, stepperSeparatorDefinition, stepperSubtextDefinition, stepperTitleDefinition } from "./components/navigation/Stepper/stepper.cva.js";
@@ -138,7 +117,6 @@ import { modalContentDefinition, modalMainDefinition, modalOverlayDefinition } f
138
117
  import { Modal } from "./components/overlays/Modal/Modal.js";
139
118
  import { ActionModal } from "./components/overlays/ActionModal/ActionModal.js";
140
119
  import { Drawer } from "./components/overlays/Drawer/Drawer.js";
141
- import { ResponsivePopover } from "./components/overlays/ResponsivePopover/ResponsivePopover.js";
142
120
  import { TooltipEllipsis } from "./components/overlays/Tooltip/TooltipEllipsis.js";
143
121
  import { PaginationList } from "./components/shared/pagination/PaginationList.js";
144
122
  import { Pagination } from "./components/shared/pagination/Pagination.js";
@@ -167,14 +145,15 @@ import { useLocalStorage } from "./hooks/useLocalStorage.js";
167
145
  import { ThemeContext } from "./config/theme.context.js";
168
146
  import { DateUtils } from "./utils/date.utils.js";
169
147
  import { dynamicColumns } from "./helpers/dynamicColumns.js";
170
- import { useAutosave } from "./hooks/useAutosave.js";
148
+ import { dynamicInputs } from "./rhf/dynamicInputs.js";
149
+ import { useAutosave } from "./rhf/useAutosave.js";
171
150
  import { RoutingUtils } from "./utils/routing.utils.js";
172
151
  import { useFilters } from "./hooks/useFilters.js";
173
- import { useForm, useFormState, useFormValue } from "./hooks/useForm.js";
174
- import { useFormAutosave } from "./hooks/useFormAutosave.js";
152
+ import { useForm } from "./rhf/useForm.js";
153
+ import { useFormAutosave } from "./rhf/useFormAutosave.js";
175
154
  import { usePagination } from "./hooks/usePagination.js";
176
155
  import { useSorting } from "./hooks/useSorting.js";
177
156
  import { useTableColumnConfig } from "./hooks/useTableColumnConfig.js";
178
157
  import { ArrayUtils } from "./utils/array.utils.js";
179
158
  import { QueriesUtils } from "./utils/queries.utils.js";
180
- export { Accordion, ActionModal, Alert, AlignCenterIcon, AlignLeftIcon, AlignLeftRightIcon, AlignRightIcon, ArrayUtils, ArrowDropDownIcon, ArrowDropUpIcon, ArrowLeftIcon, ArrowRightIcon, Autocomplete, BoldIcon, BottomSheet, Breadcrumbs, BulletedListIcon, Button, CalendarIcon, CellText, CheckIcon, Checkbox, CheckboxCheckmarkIcon, CheckboxGroup, CheckboxIndeterminateIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ClockIcon, CloseIcon, ColumnConfigModal, Confirmation, DatePicker, DateRangePicker, DateTimeIcon, DateTimePicker, DateTimeUtils, DateUtils, DomUtils, Drawer, FileUpload, FileUploadContainer, FileUtils, Form, FormField, HeaderText, HighlightIcon, HighlightOnIcon, HomeIcon, IconButton, InfiniteTable, InfoIcon, InlineIconButton, InputUpload, Inputs, IntlUtils, ItalicIcon, Link, LinkContext, LinkIcon, Loader, Menu, MenuIcon, MenuItem, MenuPopover, Modal, NumberInput, NumberRangeInput, NumberedListIcon, ObjectUtils, PaginatedTable, Pagination, PaginationList, PasswordInput, Pill, PillButton, PointerHorizontalIcon, PointerVerticalIcon, ProgressBar, QueriesUtils, QueryAutocomplete, QuerySelect, RadioGroup, ResponsivePopover, RestUtils, RoutingUtils, Segment, Select, SendIcon, Slider, SplitButton, Stepper, StrikethroughIcon, StringUtils, Table, Tag, TextArea, TextButton, TextColorIcon, TextInput, ThemeContext, TimePicker, Toast, ToastContainer, Toggle, ToggleButton, Tooltip, TooltipEllipsis, Typography, UIConfig, UIOverrides, UIRouter, UnderlinedIcon, VisibilityIcon, VisibilityOffIcon, ZodUtils, accordionChevronDefinition, accordionDefinition, accordionHeadingDefinition, accordionHeadingSubtitleDefinition, accordionHeadingTitleDefinition, accordionIconDefinition, accordionItemDefinition, accordionPanelContentDefinition, accordionPanelDefinition, accordionTriggerDefinition, alertDefinition, breadcrumbChevronDefinition, breadcrumbIconDefinition, breadcrumbItemDefinition, breadcrumbSegmentDefinition, breadcrumbsDefinition, buttonContentDefinition, buttonDefinition, buttonIconSizeDefinition, buttonSizeDefinition, checkboxContentRowDefinition, checkboxContentWrapperDefinition, checkboxDefinition, checkboxGroupLabelDefinition, checkboxIconDefinition, compoundMapper, createKeyInteractionsHandler, datePickerInputContentRowDefinition, dynamicColumns, dynamicInputs, fileUploadDropZoneDefinition, formFieldErrorDefinition, formFieldHeaderDefinition, formFieldHelperDefinition, getKeyInteractionAction, inputBaseDefinition, inputClearClassDefinition, inputContentWrapperDefinition, inputSideDefinition, inputSizeDefinition, inputUploadButtonDefinition, inputUploadDropZoneDefinition, isEqual, labelDefinition, linkDefinition, loaderDefinition, loaderWrapperDefinition, logger, menuDefinition, menuItemDefinition, menuPopoverDefinition, menuPopoverWrapperDefinition, modalContentDefinition, modalMainDefinition, modalOverlayDefinition, ns, pillButtonContentDefinition, pillButtonDefinition, popoverDefinition, progressBarDefinition, progressBarFillDefinition, progressBarTrackDefinition, progressBarTrackWrapperDefinition, progressBarValueDefinition, radioContentRowDefinition, radioContentWrapperDefinition, radioDefinition, resources, segmentDefinition, segmentItemDefinition, selectInputTagsContentWrapperDefinition, selectListBoxItemDefinition, selectPopoverDefinition, statusIconDefinition, statusSeparatorDefinition, stepperDefinition, stepperIconDefinition, stepperItemDefinition, stepperNumberDefinition, stepperSeparatorDefinition, stepperSubtextDefinition, stepperTitleDefinition, tableCellTextDefinition, tableDataDefinition, tableHeadDataDefinition, tableHeadRowDefinition, tableHeaderTextDefinition, tableRowDefinition, tagDefinition, textAreaWrapperDefinition, toastDefinition, statusIconDefinition$1 as toastStatusIconDefinition, statusSeparatorDefinition$1 as toastStatusSeparatorDefinition, toggleDefinition, tooltipDefinition, tooltipPointerHorizontalDefinition, tooltipPointerVerticalDefinition, tooltipTextDefinition, tooltipWrapperTriggerDefinition, typographyDefinition, uiOutlineClass, useAutosave, useBreakpoint, useDebounceCallback, useDeepCompareEffect, useDeepCompareLayoutEffect, useDeepCompareMemo, useFilters, useForm, useFormAutosave, useFormState, useFormValue, useIntersectionObserver, useKeyInteractions, useLocalStorage, useLongPressRepeat, usePagination, useScrollableListBox, useSorting, useStateAndRef, useTableColumnConfig, useTableNav, useToast, useTranslationMemo };
159
+ export { Accordion, ActionModal, Alert, AlignCenterIcon, AlignLeftIcon, AlignLeftRightIcon, AlignRightIcon, ArrayUtils, ArrowDropDownIcon, ArrowDropUpIcon, ArrowLeftIcon, ArrowRightIcon, Autocomplete, BoldIcon, BottomSheet, Breadcrumbs, BulletedListIcon, Button, CalendarIcon, CellText, CheckIcon, Checkbox, CheckboxCheckmarkIcon, CheckboxGroup, CheckboxIndeterminateIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ClockIcon, CloseIcon, ColumnConfigModal, Confirmation, DatePicker, DateRangePicker, DateTimeIcon, DateTimePicker, DateTimeUtils, DateUtils, DomUtils, Drawer, FileUpload, FileUploadContainer, FileUtils, Form, FormField, HeaderText, HighlightIcon, HighlightOnIcon, HomeIcon, IconButton, InfiniteTable, InfoIcon, InlineIconButton, InputUpload, Inputs, IntlUtils, ItalicIcon, Link, LinkContext, LinkIcon, Loader, Menu, MenuIcon, MenuItem, MenuPopover, Modal, NumberInput, NumberRangeInput, NumberedListIcon, ObjectUtils, PaginatedTable, Pagination, PaginationList, PasswordInput, Pill, PillButton, PointerHorizontalIcon, PointerVerticalIcon, ProgressBar, QueriesUtils, QueryAutocomplete, QuerySelect, RadioGroup, ResponsivePopover, RestUtils, RoutingUtils, Segment, Select, SendIcon, Slider, SplitButton, Stepper, StrikethroughIcon, StringUtils, Table, Tag, TextArea, TextButton, TextColorIcon, TextInput, ThemeContext, TimePicker, Toast, ToastContainer, Toggle, ToggleButton, Tooltip, TooltipEllipsis, Typography, UIConfig, UIOverrides, UIRouter, UnderlinedIcon, VisibilityIcon, VisibilityOffIcon, ZodUtils, accordionChevronDefinition, accordionDefinition, accordionHeadingDefinition, accordionHeadingSubtitleDefinition, accordionHeadingTitleDefinition, accordionIconDefinition, accordionItemDefinition, accordionPanelContentDefinition, accordionPanelDefinition, accordionTriggerDefinition, alertDefinition, breadcrumbChevronDefinition, breadcrumbIconDefinition, breadcrumbItemDefinition, breadcrumbSegmentDefinition, breadcrumbsDefinition, buttonContentDefinition, buttonDefinition, buttonIconSizeDefinition, buttonSizeDefinition, checkboxContentRowDefinition, checkboxContentWrapperDefinition, checkboxDefinition, checkboxGroupLabelDefinition, checkboxIconDefinition, compoundMapper, createKeyInteractionsHandler, datePickerInputContentRowDefinition, dynamicColumns, dynamicInputs, fileUploadDropZoneDefinition, formFieldErrorDefinition, formFieldHeaderDefinition, formFieldHelperDefinition, getKeyInteractionAction, inputBaseDefinition, inputClearClassDefinition, inputContentWrapperDefinition, inputSideDefinition, inputSizeDefinition, inputUploadButtonDefinition, inputUploadDropZoneDefinition, isEqual, labelDefinition, linkDefinition, loaderDefinition, loaderWrapperDefinition, logger, menuDefinition, menuItemDefinition, menuPopoverDefinition, menuPopoverWrapperDefinition, modalContentDefinition, modalMainDefinition, modalOverlayDefinition, ns, pillButtonContentDefinition, pillButtonDefinition, popoverDefinition, progressBarDefinition, progressBarFillDefinition, progressBarTrackDefinition, progressBarTrackWrapperDefinition, progressBarValueDefinition, radioContentRowDefinition, radioContentWrapperDefinition, radioDefinition, resources, segmentDefinition, segmentItemDefinition, selectInputTagsContentWrapperDefinition, selectListBoxItemDefinition, selectPopoverDefinition, statusIconDefinition, statusSeparatorDefinition, stepperDefinition, stepperIconDefinition, stepperItemDefinition, stepperNumberDefinition, stepperSeparatorDefinition, stepperSubtextDefinition, stepperTitleDefinition, tableCellTextDefinition, tableDataDefinition, tableHeadDataDefinition, tableHeadRowDefinition, tableHeaderTextDefinition, tableRowDefinition, tagDefinition, textAreaWrapperDefinition, toastDefinition, statusIconDefinition$1 as toastStatusIconDefinition, statusSeparatorDefinition$1 as toastStatusSeparatorDefinition, toggleDefinition, tooltipDefinition, tooltipPointerHorizontalDefinition, tooltipPointerVerticalDefinition, tooltipTextDefinition, tooltipWrapperTriggerDefinition, typographyDefinition, uiOutlineClass, useAutosave, useBreakpoint, useDebounceCallback, useDeepCompareEffect, useDeepCompareLayoutEffect, useDeepCompareMemo, useFilters, useForm, useFormAutosave, useIntersectionObserver, useKeyInteractions, useLocalStorage, useLongPressRepeat, usePagination, useScrollableListBox, useSorting, useStateAndRef, useTableColumnConfig, useTableNav, useToast, useTranslationMemo };
@@ -0,0 +1,60 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { SubmitErrorHandler, SubmitHandler, UseFormReturn } from 'react-hook-form';
3
+ import { z } from 'zod';
4
+ declare const componentRegistry: {
5
+ readonly autocomplete: <TFieldValues extends import('react-hook-form').FieldValues, TKey extends import('react-aria').Key = import('react-aria').Key, TInitialSelectItem = import('..').DefaultInitialSelectItem<TKey>>(props: import('./components').ControlledAutocompleteProps<TFieldValues, TKey, TInitialSelectItem>) => ReactNode;
6
+ readonly checkbox: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('./components').ControlledCheckboxProps<TFieldValues>) => ReactNode;
7
+ readonly checkboxGroup: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('./components').ControlledCheckboxGroupProps<TFieldValues>) => ReactNode;
8
+ readonly datePicker: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('./components').ControlledDatePickerProps<TFieldValues>) => ReactNode;
9
+ readonly dateRangePicker: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('./components').ControlledDateRangePickerProps<TFieldValues>) => ReactNode;
10
+ readonly dateTimePicker: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('./components').ControlledDateTimePickerProps<TFieldValues>) => ReactNode;
11
+ readonly numberInput: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('./components').ControlledNumberInputProps<TFieldValues>) => ReactNode;
12
+ readonly numberRangeInput: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('./components').ControlledNumberRangeInputProps<TFieldValues>) => ReactNode;
13
+ readonly passwordInput: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('./components').ControlledPasswordInputProps<TFieldValues>) => ReactNode;
14
+ readonly queryAutocomplete: <TFieldValues extends import('react-hook-form').FieldValues, TSelectItem extends import('..').SelectItem<any>, TQueryFn extends import('../components/inputs/Selection/Autocomplete/queryAutocomplete.types').QueryFn>(props: import('./components').RHFQueryAutocompleteProps<TFieldValues, TSelectItem, TQueryFn>) => ReactNode;
15
+ readonly querySelect: <TFieldValues extends import('react-hook-form').FieldValues, TQueryFn extends Parameters<typeof import('../tanstack').QuerySelect>[0]["query"], TKey extends import('react-aria').Key = import('react-aria').Key, TInitialSelectItem = import('..').DefaultInitialSelectItem<TKey>>(props: import('./components').RHFQuerySelectProps<TFieldValues, TQueryFn, TKey, TInitialSelectItem>) => ReactNode;
16
+ readonly segment: <TFieldValues extends import('react-hook-form').FieldValues, TKey extends import('react-aria').Key = import('react-aria').Key>(props: import('./components').ControlledSegmentProps<TFieldValues, TKey>) => ReactNode;
17
+ readonly select: <TFieldValues extends import('react-hook-form').FieldValues, TKey extends import('react-aria').Key = import('react-aria').Key, TInitialSelectItem = import('..').DefaultInitialSelectItem<TKey>>(props: import('./components').ControlledSelectProps<TFieldValues, TKey, TInitialSelectItem>) => ReactNode;
18
+ readonly slider: <TFieldValues extends import('react-hook-form').FieldValues, IsRange extends boolean = false>(props: import('./components').ControlledSliderProps<TFieldValues, IsRange>) => ReactNode;
19
+ readonly textArea: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('./components').ControlledTextAreaProps<TFieldValues>) => ReactNode;
20
+ readonly textInput: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('./components').ControlledTextInputProps<TFieldValues>) => ReactNode;
21
+ readonly timePicker: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('./components').ControlledTimePickerProps<TFieldValues>) => ReactNode;
22
+ readonly toggle: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('./components').ControlledToggleProps<TFieldValues>) => ReactNode;
23
+ };
24
+ export type InputComponentType = keyof typeof componentRegistry;
25
+ export type InputWrapperType = (children: ReactNode, label: string) => ReactElement;
26
+ export interface InputDef<TFieldValues extends Record<string, any>> {
27
+ name: keyof TFieldValues;
28
+ type?: InputComponentType;
29
+ label?: string;
30
+ placeholder?: string;
31
+ props?: Record<string, unknown>;
32
+ inputWrapper?: InputWrapperType;
33
+ render?: (formControl: {
34
+ control: UseFormReturn<TFieldValues>["control"];
35
+ name: keyof TFieldValues;
36
+ }, form: UseFormReturn<TFieldValues>) => ReactElement;
37
+ }
38
+ export interface InputsProps<TFieldValues extends Record<string, any>> {
39
+ form: UseFormReturn<TFieldValues>;
40
+ inputDefs: Array<InputDef<TFieldValues>>;
41
+ children?: (inputs: Record<keyof TFieldValues, ReactNode>) => ReactNode;
42
+ }
43
+ export declare function Inputs<TFieldValues extends Record<string, any>>({ form, inputDefs, children, }: InputsProps<TFieldValues>): string | number | bigint | boolean | ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element[] | null | undefined;
44
+ type FieldComponents<TSchema extends z.ZodObject<any>> = {
45
+ [K in keyof Required<z.infer<TSchema>> as Capitalize<K & string>]: (props: {
46
+ inputType?: InputComponentType;
47
+ label: string;
48
+ placeholder?: string;
49
+ [key: string]: unknown;
50
+ }) => ReactNode;
51
+ };
52
+ export declare function Form<TSchema extends z.ZodObject<any>>({ form, schema, onSubmit, onError, className, children, }: {
53
+ form: UseFormReturn<z.infer<TSchema>>;
54
+ schema: TSchema;
55
+ onSubmit: SubmitHandler<z.infer<TSchema>>;
56
+ onError?: SubmitErrorHandler<z.infer<TSchema>>;
57
+ className?: string;
58
+ children: (components: FieldComponents<TSchema>) => ReactNode;
59
+ }): import("react/jsx-runtime").JSX.Element;
60
+ export {};
@@ -0,0 +1,148 @@
1
+ import { Autocomplete, Checkbox, CheckboxGroup, DatePicker, DateRangePicker, DateTimePicker, NumberInput, NumberRangeInput, PasswordInput, QueryAutocomplete, QuerySelect, Segment, Select, Slider, TextArea, TextInput, TimePicker, Toggle } from "./components.js";
2
+ import { StringUtils } from "../utils/string.utils.js";
3
+ import { ZodUtils } from "../utils/zod.utils.js";
4
+ import { c } from "react/compiler-runtime";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { z } from "zod";
7
+ //#region src/rhf/Inputs.tsx
8
+ var componentRegistry = {
9
+ autocomplete: Autocomplete,
10
+ checkbox: Checkbox,
11
+ checkboxGroup: CheckboxGroup,
12
+ datePicker: DatePicker,
13
+ dateRangePicker: DateRangePicker,
14
+ dateTimePicker: DateTimePicker,
15
+ numberInput: NumberInput,
16
+ numberRangeInput: NumberRangeInput,
17
+ passwordInput: PasswordInput,
18
+ queryAutocomplete: QueryAutocomplete,
19
+ querySelect: QuerySelect,
20
+ segment: Segment,
21
+ select: Select,
22
+ slider: Slider,
23
+ textArea: TextArea,
24
+ textInput: TextInput,
25
+ timePicker: TimePicker,
26
+ toggle: Toggle
27
+ };
28
+ function InputItem({ form, inputDef }) {
29
+ const { name, label = "", placeholder, props, inputWrapper, render, type } = inputDef;
30
+ const formControl = {
31
+ control: form.control,
32
+ name
33
+ };
34
+ if (render) return render(formControl, form);
35
+ if (!type) return null;
36
+ const Component = componentRegistry[type];
37
+ const usesChildrenAsLabel = type === "toggle" || type === "checkbox";
38
+ const inputComponent = /* @__PURE__ */ jsx(Component, {
39
+ ...props,
40
+ label: usesChildrenAsLabel ? void 0 : label,
41
+ placeholder,
42
+ formControl,
43
+ children: usesChildrenAsLabel ? label : void 0
44
+ });
45
+ return inputWrapper ? inputWrapper(inputComponent, label) : inputComponent;
46
+ }
47
+ function Inputs(t0) {
48
+ const $ = c(9);
49
+ const { form, inputDefs, children } = t0;
50
+ if (!children) {
51
+ let t1;
52
+ if ($[0] !== form || $[1] !== inputDefs) {
53
+ let t2;
54
+ if ($[3] !== form) {
55
+ t2 = (inputDef) => /* @__PURE__ */ jsx(InputItem, {
56
+ form,
57
+ inputDef
58
+ }, String(inputDef.name));
59
+ $[3] = form;
60
+ $[4] = t2;
61
+ } else t2 = $[4];
62
+ t1 = inputDefs.map(t2);
63
+ $[0] = form;
64
+ $[1] = inputDefs;
65
+ $[2] = t1;
66
+ } else t1 = $[2];
67
+ return t1;
68
+ }
69
+ let t1;
70
+ if ($[5] !== children || $[6] !== form || $[7] !== inputDefs) {
71
+ const rendered = {};
72
+ for (const inputDef_0 of inputDefs) rendered[inputDef_0.name] = /* @__PURE__ */ jsx(InputItem, {
73
+ form,
74
+ inputDef: inputDef_0
75
+ });
76
+ t1 = children(rendered);
77
+ $[5] = children;
78
+ $[6] = form;
79
+ $[7] = inputDefs;
80
+ $[8] = t1;
81
+ } else t1 = $[8];
82
+ return t1;
83
+ }
84
+ function Form(t0) {
85
+ const $ = c(16);
86
+ const { form, schema, onSubmit, onError, className, children } = t0;
87
+ let fields;
88
+ if ($[0] !== form || $[1] !== schema.shape) {
89
+ fields = {};
90
+ let t1;
91
+ if ($[3] !== schema.shape) {
92
+ t1 = Object.keys(schema.shape);
93
+ $[3] = schema.shape;
94
+ $[4] = t1;
95
+ } else t1 = $[4];
96
+ for (const field of t1) {
97
+ const componentName = StringUtils.capitalize(String(field));
98
+ fields[componentName] = ((t2) => {
99
+ const { inputType, label, placeholder, ...props } = t2;
100
+ const schemaType = ZodUtils.unwrapZodType(schema.shape[field]);
101
+ return /* @__PURE__ */ jsx(InputItem, {
102
+ form,
103
+ inputDef: {
104
+ name: field,
105
+ type: inputType ?? (schemaType instanceof z.ZodBoolean ? "toggle" : schemaType instanceof z.ZodNumber ? "numberInput" : "textInput"),
106
+ label,
107
+ placeholder,
108
+ props
109
+ }
110
+ });
111
+ });
112
+ }
113
+ $[0] = form;
114
+ $[1] = schema.shape;
115
+ $[2] = fields;
116
+ } else fields = $[2];
117
+ const components = fields;
118
+ let t1;
119
+ if ($[5] !== form || $[6] !== onError || $[7] !== onSubmit) {
120
+ t1 = form.handleSubmit(onSubmit, onError);
121
+ $[5] = form;
122
+ $[6] = onError;
123
+ $[7] = onSubmit;
124
+ $[8] = t1;
125
+ } else t1 = $[8];
126
+ let t2;
127
+ if ($[9] !== children || $[10] !== components) {
128
+ t2 = children(components);
129
+ $[9] = children;
130
+ $[10] = components;
131
+ $[11] = t2;
132
+ } else t2 = $[11];
133
+ let t3;
134
+ if ($[12] !== className || $[13] !== t1 || $[14] !== t2) {
135
+ t3 = /* @__PURE__ */ jsx("form", {
136
+ className,
137
+ onSubmit: t1,
138
+ children: t2
139
+ });
140
+ $[12] = className;
141
+ $[13] = t1;
142
+ $[14] = t2;
143
+ $[15] = t3;
144
+ } else t3 = $[15];
145
+ return t3;
146
+ }
147
+ //#endregion
148
+ export { Form, Inputs };