@povio/ui 3.3.0 → 3.4.0-rc.10
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/assets/locales/en/translation.json.d.ts +158 -0
- package/dist/assets/locales/sl/translation.json.d.ts +154 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +7 -7
- package/dist/components/Menu/MenuDesktop.js +1 -1
- package/dist/components/Menu/MenuItem.js +4 -4
- package/dist/components/Menu/MenuMobile.js +5 -5
- package/dist/components/Menu/MenuPopover.js +2 -2
- package/dist/components/buttons/Button/Button.js +1 -1
- package/dist/components/buttons/PillButton/PillButton.js +4 -4
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
- package/dist/components/buttons/SplitButton/SplitButton.js +3 -3
- package/dist/components/buttons/shared/ButtonContent.js +2 -2
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +1 -1
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -2
- package/dist/components/inputs/Checkbox/Checkbox.js +95 -102
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +2 -3
- package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +1 -2
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +111 -115
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +17 -22
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +17 -23
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +21 -25
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +225 -238
- package/dist/components/inputs/DateTime/shared/Calendar.js +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +7 -10
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +8 -12
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/DateField.js +4 -4
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +2 -2
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +8 -16
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +3 -3
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +2 -2
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +1 -1
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +2 -2
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +2 -2
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +4 -5
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -2
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +10 -11
- package/dist/components/inputs/DateTime/shared/YearPicker.js +2 -2
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +46 -1
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.js +1 -1
- package/dist/components/inputs/File/FileUpload.d.ts +1 -1
- package/dist/components/inputs/File/FileUpload.js +20 -20
- package/dist/components/inputs/File/InputUpload.d.ts +1 -1
- package/dist/components/inputs/File/InputUpload.js +19 -19
- package/dist/components/inputs/File/fileUpload.types.d.ts +1 -1
- package/dist/components/inputs/File/inputUpload.types.d.ts +1 -1
- package/dist/components/inputs/File/shared/FileCard.js +1 -1
- package/dist/components/inputs/File/shared/FileCardList.js +1 -1
- package/dist/components/inputs/File/shared/FileUploadContent.js +1 -1
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +3 -3
- package/dist/components/inputs/File/shared/FileUploadContentError.js +5 -6
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +5 -6
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +4 -5
- package/dist/components/inputs/File/shared/InputUploadContent.js +4 -4
- package/dist/components/inputs/File/shared/InputUploadFilled.js +3 -3
- package/dist/components/inputs/FormField/FormFieldError.js +1 -1
- package/dist/components/inputs/FormField/FormFieldHeader.js +4 -4
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +3 -3
- package/dist/components/inputs/FormField/FormFieldHelper.js +1 -1
- package/dist/components/inputs/FormField/FormFieldLabel.js +2 -2
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +1 -1
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +109 -107
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +2 -1
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +265 -254
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +2 -1
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +25 -24
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +3 -4
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +2 -1
- package/dist/components/inputs/Input/TextArea/TextArea.js +118 -117
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +2 -2
- package/dist/components/inputs/Input/TextInput/TextInput.js +129 -129
- package/dist/components/inputs/Input/shared/InputContent.d.ts +2 -1
- package/dist/components/inputs/Input/shared/InputContent.js +50 -48
- package/dist/components/inputs/Inputs/Form.d.ts +4 -4
- package/dist/components/inputs/Inputs/Form.js +1 -1
- package/dist/components/inputs/Inputs/InputItem.d.ts +22 -22
- package/dist/components/inputs/Inputs/InputItem.js +36 -37
- package/dist/components/inputs/Inputs/Inputs.d.ts +2 -2
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -2
- package/dist/components/inputs/RadioGroup/RadioGroup.js +109 -113
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +16 -16
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +1 -1
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +20 -20
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/QuerySelect.js +20 -20
- package/dist/components/inputs/Selection/Select/Select.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/Select.js +23 -23
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectBase.js +34 -37
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +58 -56
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +57 -56
- package/dist/components/inputs/Selection/shared/SelectListBox.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +5 -4
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +3 -3
- package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/select.context.js +5 -9
- package/dist/components/inputs/Selection/shared/select.types.d.ts +1 -1
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +1 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +10 -7
- package/dist/components/inputs/Slider/Slider.d.ts +1 -1
- package/dist/components/inputs/Slider/Slider.js +20 -20
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +20 -20
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +2 -2
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +4 -4
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +4 -4
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +5 -8
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +3 -3
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +4 -5
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +4 -5
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +6 -9
- package/dist/components/inputs/Toggle/Toggle.d.ts +1 -2
- package/dist/components/inputs/Toggle/Toggle.js +61 -65
- package/dist/components/inputs/shared/CheckContent.js +1 -1
- package/dist/components/inputs/shared/InputClear.js +45 -28
- package/dist/components/inputs/shared/TooltipWrapper.d.ts +1 -1
- package/dist/components/inputs/shared/form.binding.d.ts +27 -0
- package/dist/components/inputs/shared/form.binding.js +57 -0
- package/dist/components/inputs/shared/form.types.d.ts +9 -8
- package/dist/components/inputs/shared/form.types.js +8 -0
- package/dist/components/inputs/shared/input.cva.js +1 -1
- package/dist/components/inputs/shared/useStaticInputHandoff.js +64 -38
- package/dist/components/navigation/Accordion/Accordion.js +1 -1
- package/dist/components/navigation/Accordion/AccordionItem.js +3 -3
- package/dist/components/navigation/Stepper/Stepper.js +2 -2
- package/dist/components/navigation/Stepper/StepperItem.js +4 -4
- package/dist/components/overlays/ActionModal/ActionModal.js +1 -1
- package/dist/components/overlays/BottomSheet/BottomSheet.js +3 -3
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +4 -4
- package/dist/components/overlays/Drawer/Drawer.js +2 -2
- package/dist/components/overlays/Modal/Modal.js +3 -3
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +1 -1
- package/dist/components/overlays/Tooltip/Tooltip.js +15 -8
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +1 -1
- package/dist/components/segment/Segment.d.ts +1 -1
- package/dist/components/segment/Segment.js +21 -21
- package/dist/components/segment/SegmentItem.js +1 -1
- package/dist/components/segment/segment.types.d.ts +1 -1
- package/dist/components/shared/pagination/Pagination.js +1 -1
- package/dist/components/shared/pagination/PaginationList.js +6 -9
- package/dist/components/table/ColumnConfig.js +1 -1
- package/dist/components/table/InfiniteTable.js +1 -1
- package/dist/components/table/Table.js +6 -8
- package/dist/components/text/Link/Link.js +1 -1
- package/dist/components/text/Pill/Pill.js +3 -3
- package/dist/components/text/Tag/Tag.js +3 -3
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +1 -1
- package/dist/config/router.context.js +1 -1
- package/dist/config/theme.context.js +1 -1
- package/dist/config/uiConfig.context.d.ts +14 -5
- package/dist/config/uiConfig.context.js +9 -11
- package/dist/config/uiOverrides.context.js +2 -2
- package/dist/helpers/dynamicColumns.d.ts +1 -1
- package/dist/helpers/dynamicInputs.d.ts +7 -7
- package/dist/hooks/useAutosave.d.ts +4 -4
- package/dist/hooks/useAutosave.js +64 -49
- package/dist/hooks/useFilters.js +1 -1
- package/dist/hooks/useForm.d.ts +39 -15
- package/dist/hooks/useForm.js +96 -43
- package/dist/hooks/useFormAutosave.d.ts +8 -9
- package/dist/hooks/useFormAutosave.js +23 -9
- package/dist/hooks/useIntersectionObserver.js +1 -1
- package/dist/hooks/useLocalStorage.js +1 -1
- package/dist/hooks/usePagination.js +1 -1
- package/dist/hooks/useScrollableListBox.js +1 -1
- package/dist/hooks/useSorting.js +1 -1
- package/dist/hooks/useStateAndRef.js +1 -1
- package/dist/hooks/useTableColumnConfig.js +1 -1
- package/dist/index.d.ts +1 -263
- package/dist/index.js +11 -71
- package/dist/rhf/Inputs.d.ts +60 -0
- package/dist/rhf/Inputs.js +148 -0
- package/dist/rhf/components.d.ts +80 -0
- package/dist/rhf/components.js +101 -0
- package/dist/rhf/dynamicInputs.d.ts +18 -0
- package/dist/rhf/dynamicInputs.js +5 -0
- package/dist/rhf/fieldAdapter.d.ts +7 -0
- package/dist/rhf/fieldAdapter.js +40 -0
- package/dist/rhf/form.types.d.ts +12 -0
- package/dist/rhf/useAutosave.d.ts +10 -0
- package/dist/rhf/useAutosave.js +71 -0
- package/dist/rhf/useForm.d.ts +18 -0
- package/dist/rhf/useForm.js +48 -0
- package/dist/rhf/useFormAutosave.d.ts +15 -0
- package/dist/rhf/useFormAutosave.js +59 -0
- package/dist/rhf.d.ts +225 -0
- package/dist/tanstack.d.ts +224 -0
- package/dist/tanstack.js +141 -0
- package/package.json +15 -3
- package/dist/assets/icons/Account.d.ts +0 -2
- package/dist/assets/icons/AlignCenter.d.ts +0 -2
- package/dist/assets/icons/AlignCenter.js +0 -30
- package/dist/assets/icons/AlignLeft.d.ts +0 -2
- package/dist/assets/icons/AlignLeft.js +0 -30
- package/dist/assets/icons/AlignLeftRight.d.ts +0 -2
- package/dist/assets/icons/AlignLeftRight.js +0 -30
- package/dist/assets/icons/AlignRight.d.ts +0 -2
- package/dist/assets/icons/AlignRight.js +0 -30
- package/dist/assets/icons/ArrowDropDown.d.ts +0 -2
- package/dist/assets/icons/ArrowDropDown.js +0 -30
- package/dist/assets/icons/ArrowDropUp.d.ts +0 -2
- package/dist/assets/icons/ArrowDropUp.js +0 -30
- package/dist/assets/icons/ArrowLeft.d.ts +0 -2
- package/dist/assets/icons/ArrowLeft.js +0 -30
- package/dist/assets/icons/ArrowRight.d.ts +0 -2
- package/dist/assets/icons/ArrowRight.js +0 -30
- package/dist/assets/icons/Board.d.ts +0 -2
- package/dist/assets/icons/Bold.d.ts +0 -2
- package/dist/assets/icons/Bold.js +0 -30
- package/dist/assets/icons/BulletedList.d.ts +0 -2
- package/dist/assets/icons/BulletedList.js +0 -30
- package/dist/assets/icons/Calendar.d.ts +0 -2
- package/dist/assets/icons/Calendar.js +0 -32
- package/dist/assets/icons/Check.d.ts +0 -2
- package/dist/assets/icons/Check.js +0 -32
- package/dist/assets/icons/CheckCircle.d.ts +0 -2
- package/dist/assets/icons/CheckCircle.js +0 -30
- package/dist/assets/icons/CheckboxCheckmark.d.ts +0 -2
- package/dist/assets/icons/CheckboxCheckmark.js +0 -33
- package/dist/assets/icons/CheckboxIndeterminate.d.ts +0 -2
- package/dist/assets/icons/CheckboxIndeterminate.js +0 -33
- package/dist/assets/icons/ChevronDown.d.ts +0 -2
- package/dist/assets/icons/ChevronDown.js +0 -32
- package/dist/assets/icons/ChevronLeft.d.ts +0 -2
- package/dist/assets/icons/ChevronLeft.js +0 -32
- package/dist/assets/icons/ChevronRight.d.ts +0 -2
- package/dist/assets/icons/ChevronRight.js +0 -32
- package/dist/assets/icons/ChevronUp.d.ts +0 -2
- package/dist/assets/icons/ChevronUp.js +0 -32
- package/dist/assets/icons/ChevronsLeft.d.ts +0 -2
- package/dist/assets/icons/ChevronsLeft.js +0 -32
- package/dist/assets/icons/ChevronsRight.d.ts +0 -2
- package/dist/assets/icons/ChevronsRight.js +0 -32
- package/dist/assets/icons/Clock.d.ts +0 -2
- package/dist/assets/icons/Clock.js +0 -30
- package/dist/assets/icons/Close.d.ts +0 -2
- package/dist/assets/icons/Close.js +0 -30
- package/dist/assets/icons/DateTime.d.ts +0 -2
- package/dist/assets/icons/DateTime.js +0 -39
- package/dist/assets/icons/DragIndicator.d.ts +0 -2
- package/dist/assets/icons/DragIndicator.js +0 -30
- package/dist/assets/icons/Edit.d.ts +0 -2
- package/dist/assets/icons/Emoji.d.ts +0 -2
- package/dist/assets/icons/File.d.ts +0 -2
- package/dist/assets/icons/File.js +0 -32
- package/dist/assets/icons/Grid.d.ts +0 -2
- package/dist/assets/icons/Highlight.d.ts +0 -2
- package/dist/assets/icons/Highlight.js +0 -30
- package/dist/assets/icons/HighlightOn.d.ts +0 -6
- package/dist/assets/icons/HighlightOn.js +0 -55
- package/dist/assets/icons/Home.d.ts +0 -2
- package/dist/assets/icons/Home.js +0 -30
- package/dist/assets/icons/Image.d.ts +0 -2
- package/dist/assets/icons/ImageError.d.ts +0 -2
- package/dist/assets/icons/Info.d.ts +0 -2
- package/dist/assets/icons/Info.js +0 -41
- package/dist/assets/icons/Italic.d.ts +0 -2
- package/dist/assets/icons/Italic.js +0 -30
- package/dist/assets/icons/Link.d.ts +0 -2
- package/dist/assets/icons/Link.js +0 -30
- package/dist/assets/icons/Loader.d.ts +0 -2
- package/dist/assets/icons/MapPin.d.ts +0 -2
- package/dist/assets/icons/Menu.d.ts +0 -2
- package/dist/assets/icons/Menu.js +0 -30
- package/dist/assets/icons/Minus.d.ts +0 -2
- package/dist/assets/icons/MoreHoriz.d.ts +0 -2
- package/dist/assets/icons/NumberedList.d.ts +0 -2
- package/dist/assets/icons/NumberedList.js +0 -30
- package/dist/assets/icons/Pause.d.ts +0 -2
- package/dist/assets/icons/Plus.d.ts +0 -2
- package/dist/assets/icons/PointerHorizontal.d.ts +0 -2
- package/dist/assets/icons/PointerHorizontal.js +0 -30
- package/dist/assets/icons/PointerVertical.d.ts +0 -2
- package/dist/assets/icons/PointerVertical.js +0 -30
- package/dist/assets/icons/Retry.d.ts +0 -2
- package/dist/assets/icons/Search.d.ts +0 -2
- package/dist/assets/icons/Search.js +0 -30
- package/dist/assets/icons/Send.d.ts +0 -2
- package/dist/assets/icons/Send.js +0 -32
- package/dist/assets/icons/Share.d.ts +0 -2
- package/dist/assets/icons/Slash.d.ts +0 -2
- package/dist/assets/icons/Strikethrough.d.ts +0 -2
- package/dist/assets/icons/Strikethrough.js +0 -30
- package/dist/assets/icons/TextColor.d.ts +0 -6
- package/dist/assets/icons/TextColor.js +0 -52
- package/dist/assets/icons/Today.d.ts +0 -2
- package/dist/assets/icons/Today.js +0 -30
- package/dist/assets/icons/Trash.d.ts +0 -2
- package/dist/assets/icons/Underlined.d.ts +0 -2
- package/dist/assets/icons/Underlined.js +0 -32
- package/dist/assets/icons/Upload.d.ts +0 -2
- package/dist/assets/icons/Upload.js +0 -39
- package/dist/assets/icons/User.d.ts +0 -2
- package/dist/assets/icons/Visibility.d.ts +0 -2
- package/dist/assets/icons/Visibility.js +0 -30
- package/dist/assets/icons/VisibilityOff.d.ts +0 -2
- package/dist/assets/icons/VisibilityOff.js +0 -30
- package/dist/assets/icons/WarningFilled.d.ts +0 -2
- package/dist/assets/icons/WarningFilled.js +0 -32
- package/dist/assets/icons/WarningOutlined.d.ts +0 -2
- /package/dist/{hooks/useAutosave.spec.d.ts → rhf/entrypoints.type-test.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FocusEvent, Ref } from 'react';
|
|
2
2
|
import { NumberFieldProps as AriaNumberFieldProps } from 'react-aria-components';
|
|
3
|
-
import { FieldValues } from '
|
|
3
|
+
import { FieldValues } from '../../shared/form.binding';
|
|
4
4
|
import { FormFieldProps } from '../../FormField/FormField';
|
|
5
5
|
import { NumberRangeValue } from './NumberRangeField';
|
|
6
6
|
import { ControlProps } from '../../shared/form.types';
|
|
@@ -22,6 +22,7 @@ interface NumberRangeInputBaseProps extends FormFieldProps, InputVariantProps, O
|
|
|
22
22
|
hideInnerLabels?: boolean;
|
|
23
23
|
isDirty?: boolean;
|
|
24
24
|
isClearable?: boolean;
|
|
25
|
+
isClearableIfDisabled?: boolean;
|
|
25
26
|
autoFocusOnMount?: boolean;
|
|
26
27
|
onChange?: (value: NumberRangeValue) => void;
|
|
27
28
|
onMinChange?: (value: number | null) => void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
2
2
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
3
|
+
import { FieldController } from "../../shared/form.binding.js";
|
|
3
4
|
import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
|
|
4
5
|
import { inputBaseDefinition, inputSizeDefinition } from "../../shared/input.cva.js";
|
|
5
6
|
import { IntlUtils } from "../../../../utils/intl.utils.js";
|
|
@@ -8,13 +9,12 @@ import { InputFrame } from "../../Skeleton/InputFrame.js";
|
|
|
8
9
|
import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
|
|
9
10
|
import { getStaticNumberDisplayValue } from "../shared/numberStatic.utils.js";
|
|
10
11
|
import { NumberRangeField } from "./NumberRangeField.js";
|
|
11
|
-
import { c } from "react/compiler-runtime";
|
|
12
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
12
|
import { clsx } from "clsx";
|
|
14
13
|
import { useRef, useState } from "react";
|
|
15
14
|
import { useLocale } from "react-aria-components";
|
|
15
|
+
import { c } from "react/compiler-runtime";
|
|
16
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
16
17
|
import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
|
|
17
|
-
import { Controller } from "react-hook-form";
|
|
18
18
|
//#region src/components/inputs/Input/NumberRangeInput/NumberRangeInput.tsx
|
|
19
19
|
var EMPTY_RANGE = {
|
|
20
20
|
min: null,
|
|
@@ -31,7 +31,7 @@ var NumberRangeInputBase = (props) => {
|
|
|
31
31
|
const ui = UIConfig.useConfig();
|
|
32
32
|
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
33
33
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
34
|
-
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, className, inputClassName, minInputClassName, maxInputClassName, value, minValue, maxValue, minPlaceholder = "Min", maxPlaceholder = "Max", minLabel = "Minimum", maxLabel = "Maximum", invalidRangeError = "Minimum cannot be greater than maximum", hideInnerLabels = true, isDirty, autoFocusOnMount, onChange, onMinChange, onMaxChange, onBlur, isClearable: isClearableProps, as: asProp, variant: variantProps, size: sizeProps, hideLabel: hideLabelProps, ...rest } = props;
|
|
34
|
+
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, className, inputClassName, minInputClassName, maxInputClassName, value, minValue, maxValue, minPlaceholder = "Min", maxPlaceholder = "Max", minLabel = "Minimum", maxLabel = "Maximum", invalidRangeError = "Minimum cannot be greater than maximum", hideInnerLabels = true, isDirty, autoFocusOnMount, onChange, onMinChange, onMaxChange, onBlur, isClearable: isClearableProps, isClearableIfDisabled, as: asProp, variant: variantProps, size: sizeProps, hideLabel: hideLabelProps, ...rest } = props;
|
|
35
35
|
const isClearable = isClearableProps ?? ui.input.isClearable;
|
|
36
36
|
const as = asProp ?? ui.input.as;
|
|
37
37
|
const variant = variantProps ?? ui.input.variant;
|
|
@@ -108,6 +108,7 @@ var NumberRangeInputBase = (props) => {
|
|
|
108
108
|
hideInnerLabels,
|
|
109
109
|
isDirty,
|
|
110
110
|
isClearable,
|
|
111
|
+
isClearableIfDisabled,
|
|
111
112
|
autoFocusOnMount,
|
|
112
113
|
isDisabled,
|
|
113
114
|
isRequired,
|
|
@@ -183,7 +184,7 @@ var NumberRangeInputInner = (t0) => {
|
|
|
183
184
|
labelPlacement: "content-wrapper",
|
|
184
185
|
children: (t2) => {
|
|
185
186
|
const { id, ...dataAttributeProps } = t2;
|
|
186
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
187
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
187
188
|
/* @__PURE__ */ jsxs("div", {
|
|
188
189
|
className: "min-w-0 flex-1",
|
|
189
190
|
children: [/* @__PURE__ */ jsx(FormFieldLabel, {
|
|
@@ -203,7 +204,7 @@ var NumberRangeInputInner = (t0) => {
|
|
|
203
204
|
className: clsx("w-full min-w-0 bg-transparent outline-none", props.minInputClassName),
|
|
204
205
|
...dataAttributeProps,
|
|
205
206
|
"data-rac": true
|
|
206
|
-
}), isClearable && /* @__PURE__ */ jsx(InputClear, {
|
|
207
|
+
}), isClearable && (!isDisabled || props.isClearableIfDisabled === true) && /* @__PURE__ */ jsx(InputClear, {
|
|
207
208
|
onClear: _temp,
|
|
208
209
|
show: staticValue.min !== null,
|
|
209
210
|
renderStatic: true
|
|
@@ -233,7 +234,7 @@ var NumberRangeInputInner = (t0) => {
|
|
|
233
234
|
className: clsx("w-full min-w-0 bg-transparent outline-none", props.maxInputClassName),
|
|
234
235
|
...dataAttributeProps,
|
|
235
236
|
"data-rac": true
|
|
236
|
-
}), isClearable && /* @__PURE__ */ jsx(InputClear, {
|
|
237
|
+
}), isClearable && (!isDisabled || props.isClearableIfDisabled === true) && /* @__PURE__ */ jsx(InputClear, {
|
|
237
238
|
onClear: _temp2,
|
|
238
239
|
show: staticValue.max !== null,
|
|
239
240
|
renderStatic: true
|
|
@@ -269,30 +270,30 @@ var NumberRangeInput = (t0) => {
|
|
|
269
270
|
props = $[1];
|
|
270
271
|
renderStaticInput = $[2];
|
|
271
272
|
}
|
|
272
|
-
if ("
|
|
273
|
-
let
|
|
273
|
+
if ("field" in props && props.field) {
|
|
274
|
+
let field;
|
|
274
275
|
let innerProps;
|
|
275
276
|
if ($[3] !== props) {
|
|
276
|
-
({
|
|
277
|
+
({field, ...innerProps} = props);
|
|
277
278
|
$[3] = props;
|
|
278
|
-
$[4] =
|
|
279
|
+
$[4] = field;
|
|
279
280
|
$[5] = innerProps;
|
|
280
281
|
} else {
|
|
281
|
-
|
|
282
|
+
field = $[4];
|
|
282
283
|
innerProps = $[5];
|
|
283
284
|
}
|
|
284
|
-
const controlWithOptions =
|
|
285
|
+
const controlWithOptions = field.form;
|
|
285
286
|
let t1;
|
|
286
287
|
if ($[6] !== controlWithOptions._options?.disabled || $[7] !== innerProps || $[8] !== props.error || $[9] !== props.isDisabled || $[10] !== renderStaticInput) {
|
|
287
288
|
t1 = (t2) => {
|
|
288
|
-
const { field, fieldState: t3 } = t2;
|
|
289
|
+
const { field: field_0, fieldState: t3 } = t2;
|
|
289
290
|
const { error } = t3;
|
|
290
291
|
return /* @__PURE__ */ jsx(NumberRangeInputInner, {
|
|
291
292
|
...innerProps,
|
|
292
|
-
value:
|
|
293
|
-
onChange:
|
|
294
|
-
onBlur:
|
|
295
|
-
isDisabled:
|
|
293
|
+
value: field_0.value ?? EMPTY_RANGE,
|
|
294
|
+
onChange: field_0.onChange,
|
|
295
|
+
onBlur: field_0.onBlur,
|
|
296
|
+
isDisabled: field_0.disabled || !!controlWithOptions._options?.disabled || props.isDisabled,
|
|
296
297
|
isFormControlDisabled: !!controlWithOptions._options?.disabled,
|
|
297
298
|
error: props.error ?? error?.message,
|
|
298
299
|
renderStaticInput
|
|
@@ -306,14 +307,14 @@ var NumberRangeInput = (t0) => {
|
|
|
306
307
|
$[11] = t1;
|
|
307
308
|
} else t1 = $[11];
|
|
308
309
|
let t2;
|
|
309
|
-
if ($[12] !==
|
|
310
|
-
t2 = /* @__PURE__ */ jsx(
|
|
311
|
-
control:
|
|
312
|
-
name:
|
|
310
|
+
if ($[12] !== field.form || $[13] !== field.name || $[14] !== t1) {
|
|
311
|
+
t2 = /* @__PURE__ */ jsx(FieldController, {
|
|
312
|
+
control: field.form,
|
|
313
|
+
name: field.name,
|
|
313
314
|
render: t1
|
|
314
315
|
});
|
|
315
|
-
$[12] =
|
|
316
|
-
$[13] =
|
|
316
|
+
$[12] = field.form;
|
|
317
|
+
$[13] = field.name;
|
|
317
318
|
$[14] = t1;
|
|
318
319
|
$[15] = t2;
|
|
319
320
|
} else t2 = $[15];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FieldValues } from '
|
|
1
|
+
import { FieldValues } from '../../shared/form.binding';
|
|
2
2
|
import { TextInputProps } from '../TextInput/TextInput';
|
|
3
3
|
import { ControlProps } from '../../shared/form.types';
|
|
4
4
|
export interface PasswordInputProps extends Omit<TextInputProps, "type" | "action" | "trailingIcon" | "unit"> {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { VisibilityIcon } from "../../../../assets/icons/Visibility.js";
|
|
2
|
-
import { VisibilityOffIcon } from "../../../../assets/icons/VisibilityOff.js";
|
|
3
1
|
import "../../../../config/i18n.js";
|
|
4
2
|
import { TextInput } from "../TextInput/TextInput.js";
|
|
3
|
+
import { Eye, EyeOff } from "lucide-react";
|
|
4
|
+
import { useState } from "react";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
import { useState } from "react";
|
|
8
7
|
import { useTranslation } from "react-i18next";
|
|
9
8
|
//#region src/components/inputs/Input/PasswordInput/PasswordInput.tsx
|
|
10
9
|
var PasswordInput = (props) => {
|
|
@@ -12,7 +11,7 @@ var PasswordInput = (props) => {
|
|
|
12
11
|
const { t } = useTranslation("ui");
|
|
13
12
|
const [isRevealed, setIsRevealed] = useState(false);
|
|
14
13
|
const t0 = isRevealed ? "text" : "password";
|
|
15
|
-
const t1 = isRevealed ?
|
|
14
|
+
const t1 = isRevealed ? Eye : EyeOff;
|
|
16
15
|
let t2;
|
|
17
16
|
if ($0[0] !== isRevealed) {
|
|
18
17
|
t2 = ($) => isRevealed ? $.ui.password.hide : $.ui.password.reveal;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { Ref } from 'react';
|
|
2
2
|
import { AriaTextFieldProps } from 'react-aria';
|
|
3
3
|
import { TextAreaProps as AriaTextAreaProps } from 'react-aria-components';
|
|
4
|
-
import { FieldValues } from '
|
|
4
|
+
import { FieldValues } from '../../shared/form.binding';
|
|
5
5
|
import { FormFieldProps } from '../../FormField/FormField';
|
|
6
6
|
import { ControlProps } from '../../shared/form.types';
|
|
7
7
|
import { InputVariantProps } from '../../shared/input.cva';
|
|
8
8
|
interface TextAreaBaseProps extends FormFieldProps, InputVariantProps, Omit<AriaTextAreaProps, "value" | "defaultValue" | "onChange" | "disabled" | "required" | "className" | keyof AriaTextFieldProps>, Omit<AriaTextFieldProps<HTMLTextAreaElement>, "label"> {
|
|
9
9
|
ref?: Ref<HTMLTextAreaElement>;
|
|
10
10
|
isClearable?: boolean;
|
|
11
|
+
isClearableIfDisabled?: boolean;
|
|
11
12
|
isDirty?: boolean;
|
|
12
13
|
inputClassName?: string;
|
|
13
14
|
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
2
2
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
3
|
+
import { FieldController } from "../../shared/form.binding.js";
|
|
3
4
|
import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
|
|
4
5
|
import { FormField } from "../../FormField/FormField.js";
|
|
5
6
|
import { inputSideDefinition, inputSizeDefinition, useInputCva } from "../../shared/input.cva.js";
|
|
6
7
|
import { InputClear } from "../../shared/InputClear.js";
|
|
7
8
|
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
8
9
|
import { textAreaWrapperDefinition } from "./TextArea.cva.js";
|
|
9
|
-
import { c } from "react/compiler-runtime";
|
|
10
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
10
|
import { clsx } from "clsx";
|
|
12
11
|
import { useRef } from "react";
|
|
13
12
|
import { TextArea } from "react-aria-components";
|
|
13
|
+
import { c } from "react/compiler-runtime";
|
|
14
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
15
|
import { useTextField } from "react-aria";
|
|
15
16
|
import { mergeRefs } from "@react-aria/utils";
|
|
16
|
-
import { Controller } from "react-hook-form";
|
|
17
17
|
//#region src/components/inputs/Input/TextArea/TextArea.tsx
|
|
18
18
|
var TextAreaBase = (props) => {
|
|
19
|
-
const $ = c(
|
|
19
|
+
const $ = c(84);
|
|
20
20
|
const ui = UIConfig.useConfig();
|
|
21
21
|
const inputCva = useInputCva();
|
|
22
22
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
23
23
|
const inputSideCva = UIOverrides.useCva("input.sideCva", inputSideDefinition);
|
|
24
24
|
const textAreaWrapperCva = UIOverrides.useCva("textArea.wrapperCva", textAreaWrapperDefinition);
|
|
25
|
-
const { ref, className, inputClassName, error, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, value, onChange, onBlur, as: asProp, hideLabel: hideLabelProp, variant: variantProp, isClearable: isClearableProp, ...rest } = props;
|
|
25
|
+
const { ref, className, inputClassName, error, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, value, onChange, onBlur, as: asProp, hideLabel: hideLabelProp, variant: variantProp, isClearable: isClearableProp, isClearableIfDisabled, ...rest } = props;
|
|
26
26
|
const as = asProp ?? ui.input.as;
|
|
27
27
|
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
28
28
|
const variant = variantProp ?? ui.input.variant;
|
|
@@ -83,7 +83,7 @@ var TextAreaBase = (props) => {
|
|
|
83
83
|
let t7;
|
|
84
84
|
let t8;
|
|
85
85
|
let t9;
|
|
86
|
-
if ($[12] !== as || $[13] !== className || $[14] !== error || $[15] !== formFieldProps || $[16] !== headerClassName || $[17] !== helperText || $[18] !== inputSideCva || $[19] !== isClearable || $[20] !==
|
|
86
|
+
if ($[12] !== as || $[13] !== className || $[14] !== error || $[15] !== formFieldProps || $[16] !== headerClassName || $[17] !== helperText || $[18] !== inputSideCva || $[19] !== isClearable || $[20] !== isClearableIfDisabled || $[21] !== isDisabled || $[22] !== isRequired || $[23] !== label || $[24] !== labelProps || $[25] !== rightContent || $[26] !== t2 || $[27] !== textAreaWrapperCva || $[28] !== tooltipText || $[29] !== value) {
|
|
87
87
|
const headerProps = {
|
|
88
88
|
label,
|
|
89
89
|
tooltipText,
|
|
@@ -95,7 +95,7 @@ var TextAreaBase = (props) => {
|
|
|
95
95
|
className: headerClassName,
|
|
96
96
|
labelProps
|
|
97
97
|
};
|
|
98
|
-
showClear = isClearable && value != null && value !== "" && !isDisabled;
|
|
98
|
+
showClear = isClearable && value != null && value !== "" && (!isDisabled || isClearableIfDisabled === true);
|
|
99
99
|
T1 = TooltipWrapper;
|
|
100
100
|
t11 = as;
|
|
101
101
|
t12 = error;
|
|
@@ -104,17 +104,17 @@ var TextAreaBase = (props) => {
|
|
|
104
104
|
t6 = formFieldProps;
|
|
105
105
|
t7 = as;
|
|
106
106
|
t8 = labelProps;
|
|
107
|
-
if ($[
|
|
107
|
+
if ($[44] !== className) {
|
|
108
108
|
t9 = clsx("group w-full flex flex-col", className);
|
|
109
|
-
$[
|
|
110
|
-
$[
|
|
111
|
-
} else t9 = $[
|
|
109
|
+
$[44] = className;
|
|
110
|
+
$[45] = t9;
|
|
111
|
+
} else t9 = $[45];
|
|
112
112
|
t10 = as === "inline" ? -1 : void 0;
|
|
113
|
-
if ($[
|
|
113
|
+
if ($[46] !== textAreaWrapperCva) {
|
|
114
114
|
t3 = textAreaWrapperCva({});
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
117
|
-
} else t3 = $[
|
|
115
|
+
$[46] = textAreaWrapperCva;
|
|
116
|
+
$[47] = t3;
|
|
117
|
+
} else t3 = $[47];
|
|
118
118
|
t4 = true;
|
|
119
119
|
t5 = as === "floating" && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
120
120
|
as,
|
|
@@ -132,54 +132,55 @@ var TextAreaBase = (props) => {
|
|
|
132
132
|
$[17] = helperText;
|
|
133
133
|
$[18] = inputSideCva;
|
|
134
134
|
$[19] = isClearable;
|
|
135
|
-
$[20] =
|
|
136
|
-
$[21] =
|
|
137
|
-
$[22] =
|
|
138
|
-
$[23] =
|
|
139
|
-
$[24] =
|
|
140
|
-
$[25] =
|
|
141
|
-
$[26] =
|
|
142
|
-
$[27] =
|
|
143
|
-
$[28] =
|
|
144
|
-
$[29] =
|
|
145
|
-
$[30] =
|
|
146
|
-
$[31] =
|
|
147
|
-
$[32] =
|
|
148
|
-
$[33] =
|
|
149
|
-
$[34] =
|
|
150
|
-
$[35] =
|
|
151
|
-
$[36] =
|
|
152
|
-
$[37] =
|
|
153
|
-
$[38] =
|
|
154
|
-
$[39] =
|
|
155
|
-
$[40] =
|
|
156
|
-
$[41] =
|
|
157
|
-
$[42] =
|
|
135
|
+
$[20] = isClearableIfDisabled;
|
|
136
|
+
$[21] = isDisabled;
|
|
137
|
+
$[22] = isRequired;
|
|
138
|
+
$[23] = label;
|
|
139
|
+
$[24] = labelProps;
|
|
140
|
+
$[25] = rightContent;
|
|
141
|
+
$[26] = t2;
|
|
142
|
+
$[27] = textAreaWrapperCva;
|
|
143
|
+
$[28] = tooltipText;
|
|
144
|
+
$[29] = value;
|
|
145
|
+
$[30] = T0;
|
|
146
|
+
$[31] = T1;
|
|
147
|
+
$[32] = showClear;
|
|
148
|
+
$[33] = t10;
|
|
149
|
+
$[34] = t11;
|
|
150
|
+
$[35] = t12;
|
|
151
|
+
$[36] = t13;
|
|
152
|
+
$[37] = t3;
|
|
153
|
+
$[38] = t4;
|
|
154
|
+
$[39] = t5;
|
|
155
|
+
$[40] = t6;
|
|
156
|
+
$[41] = t7;
|
|
157
|
+
$[42] = t8;
|
|
158
|
+
$[43] = t9;
|
|
158
159
|
} else {
|
|
159
|
-
T0 = $[
|
|
160
|
-
T1 = $[
|
|
161
|
-
showClear = $[
|
|
162
|
-
t10 = $[
|
|
163
|
-
t11 = $[
|
|
164
|
-
t12 = $[
|
|
165
|
-
t13 = $[
|
|
166
|
-
t3 = $[
|
|
167
|
-
t4 = $[
|
|
168
|
-
t5 = $[
|
|
169
|
-
t6 = $[
|
|
170
|
-
t7 = $[
|
|
171
|
-
t8 = $[
|
|
172
|
-
t9 = $[
|
|
160
|
+
T0 = $[30];
|
|
161
|
+
T1 = $[31];
|
|
162
|
+
showClear = $[32];
|
|
163
|
+
t10 = $[33];
|
|
164
|
+
t11 = $[34];
|
|
165
|
+
t12 = $[35];
|
|
166
|
+
t13 = $[36];
|
|
167
|
+
t3 = $[37];
|
|
168
|
+
t4 = $[38];
|
|
169
|
+
t5 = $[39];
|
|
170
|
+
t6 = $[40];
|
|
171
|
+
t7 = $[41];
|
|
172
|
+
t8 = $[42];
|
|
173
|
+
t9 = $[43];
|
|
173
174
|
}
|
|
174
175
|
const T2 = TextArea;
|
|
175
176
|
const t14 = isDirty || void 0;
|
|
176
177
|
const t15 = isRequired || void 0;
|
|
177
178
|
let t16;
|
|
178
|
-
if ($[
|
|
179
|
+
if ($[48] !== value) {
|
|
179
180
|
t16 = value?.trim() === "" || value === null || value === void 0 || void 0;
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
182
|
-
} else t16 = $[
|
|
181
|
+
$[48] = value;
|
|
182
|
+
$[49] = t16;
|
|
183
|
+
} else t16 = $[49];
|
|
183
184
|
const t17 = as === "floating" ? "" : inputProps.placeholder;
|
|
184
185
|
const t18 = inputCva({
|
|
185
186
|
variant,
|
|
@@ -188,7 +189,7 @@ var TextAreaBase = (props) => {
|
|
|
188
189
|
className: clsx("block h-full min-h-8", inputClassName)
|
|
189
190
|
});
|
|
190
191
|
let t19;
|
|
191
|
-
if ($[
|
|
192
|
+
if ($[50] !== T2 || $[51] !== inputProps || $[52] !== ref || $[53] !== t14 || $[54] !== t15 || $[55] !== t16 || $[56] !== t17 || $[57] !== t18) {
|
|
192
193
|
t19 = /* @__PURE__ */ jsx(T2, {
|
|
193
194
|
...inputProps,
|
|
194
195
|
"data-is-dirty": t14,
|
|
@@ -198,18 +199,18 @@ var TextAreaBase = (props) => {
|
|
|
198
199
|
className: t18,
|
|
199
200
|
ref
|
|
200
201
|
});
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
} else t19 = $[
|
|
202
|
+
$[50] = T2;
|
|
203
|
+
$[51] = inputProps;
|
|
204
|
+
$[52] = ref;
|
|
205
|
+
$[53] = t14;
|
|
206
|
+
$[54] = t15;
|
|
207
|
+
$[55] = t16;
|
|
208
|
+
$[56] = t17;
|
|
209
|
+
$[57] = t18;
|
|
210
|
+
$[58] = t19;
|
|
211
|
+
} else t19 = $[58];
|
|
211
212
|
let t20;
|
|
212
|
-
if ($[
|
|
213
|
+
if ($[59] !== inputSizeCva || $[60] !== onBlur || $[61] !== onChange || $[62] !== showClear) {
|
|
213
214
|
t20 = showClear && /* @__PURE__ */ jsx("span", {
|
|
214
215
|
className: clsx("absolute top-0 right-0", inputSizeCva({ size: "default" })),
|
|
215
216
|
children: /* @__PURE__ */ jsx(InputClear, {
|
|
@@ -220,14 +221,14 @@ var TextAreaBase = (props) => {
|
|
|
220
221
|
show: true
|
|
221
222
|
})
|
|
222
223
|
});
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
} else t20 = $[
|
|
224
|
+
$[59] = inputSizeCva;
|
|
225
|
+
$[60] = onBlur;
|
|
226
|
+
$[61] = onChange;
|
|
227
|
+
$[62] = showClear;
|
|
228
|
+
$[63] = t20;
|
|
229
|
+
} else t20 = $[63];
|
|
229
230
|
let t21;
|
|
230
|
-
if ($[
|
|
231
|
+
if ($[64] !== t19 || $[65] !== t20 || $[66] !== t3 || $[67] !== t4 || $[68] !== t5) {
|
|
231
232
|
t21 = /* @__PURE__ */ jsxs("div", {
|
|
232
233
|
className: t3,
|
|
233
234
|
"data-text-area": t4,
|
|
@@ -237,15 +238,15 @@ var TextAreaBase = (props) => {
|
|
|
237
238
|
t20
|
|
238
239
|
]
|
|
239
240
|
});
|
|
240
|
-
$[
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
} else t21 = $[
|
|
241
|
+
$[64] = t19;
|
|
242
|
+
$[65] = t20;
|
|
243
|
+
$[66] = t3;
|
|
244
|
+
$[67] = t4;
|
|
245
|
+
$[68] = t5;
|
|
246
|
+
$[69] = t21;
|
|
247
|
+
} else t21 = $[69];
|
|
247
248
|
let t22;
|
|
248
|
-
if ($[
|
|
249
|
+
if ($[70] !== T0 || $[71] !== t10 || $[72] !== t21 || $[73] !== t6 || $[74] !== t7 || $[75] !== t8 || $[76] !== t9) {
|
|
249
250
|
t22 = /* @__PURE__ */ jsx(T0, {
|
|
250
251
|
...t6,
|
|
251
252
|
as: t7,
|
|
@@ -254,62 +255,62 @@ var TextAreaBase = (props) => {
|
|
|
254
255
|
tabIndex: t10,
|
|
255
256
|
children: t21
|
|
256
257
|
});
|
|
257
|
-
$[
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
} else t22 = $[
|
|
258
|
+
$[70] = T0;
|
|
259
|
+
$[71] = t10;
|
|
260
|
+
$[72] = t21;
|
|
261
|
+
$[73] = t6;
|
|
262
|
+
$[74] = t7;
|
|
263
|
+
$[75] = t8;
|
|
264
|
+
$[76] = t9;
|
|
265
|
+
$[77] = t22;
|
|
266
|
+
} else t22 = $[77];
|
|
266
267
|
let t23;
|
|
267
|
-
if ($[
|
|
268
|
+
if ($[78] !== T1 || $[79] !== t11 || $[80] !== t12 || $[81] !== t13 || $[82] !== t22) {
|
|
268
269
|
t23 = /* @__PURE__ */ jsx(T1, {
|
|
269
270
|
as: t11,
|
|
270
271
|
error: t12,
|
|
271
272
|
triggerTabIndex: t13,
|
|
272
273
|
children: t22
|
|
273
274
|
});
|
|
274
|
-
$[
|
|
275
|
-
$[
|
|
276
|
-
$[
|
|
277
|
-
$[
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
280
|
-
} else t23 = $[
|
|
275
|
+
$[78] = T1;
|
|
276
|
+
$[79] = t11;
|
|
277
|
+
$[80] = t12;
|
|
278
|
+
$[81] = t13;
|
|
279
|
+
$[82] = t22;
|
|
280
|
+
$[83] = t23;
|
|
281
|
+
} else t23 = $[83];
|
|
281
282
|
return t23;
|
|
282
283
|
};
|
|
283
284
|
var TextArea$1 = (props) => {
|
|
284
285
|
const $ = c(15);
|
|
285
|
-
if ("
|
|
286
|
-
let
|
|
286
|
+
if ("field" in props && props.field) {
|
|
287
|
+
let field;
|
|
287
288
|
let innerProps;
|
|
288
289
|
let ref;
|
|
289
290
|
if ($[0] !== props) {
|
|
290
|
-
({
|
|
291
|
+
({field, ref, ...innerProps} = props);
|
|
291
292
|
$[0] = props;
|
|
292
|
-
$[1] =
|
|
293
|
+
$[1] = field;
|
|
293
294
|
$[2] = innerProps;
|
|
294
295
|
$[3] = ref;
|
|
295
296
|
} else {
|
|
296
|
-
|
|
297
|
+
field = $[1];
|
|
297
298
|
innerProps = $[2];
|
|
298
299
|
ref = $[3];
|
|
299
300
|
}
|
|
300
301
|
let t0;
|
|
301
302
|
if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
|
|
302
303
|
t0 = (t1) => {
|
|
303
|
-
const { field, fieldState: t2 } = t1;
|
|
304
|
+
const { field: field_0, fieldState: t2 } = t1;
|
|
304
305
|
const { error, isDirty } = t2;
|
|
305
306
|
return /* @__PURE__ */ jsx(TextAreaBase, {
|
|
306
307
|
...innerProps,
|
|
307
|
-
ref: mergeRefs(ref,
|
|
308
|
-
value:
|
|
309
|
-
onChange:
|
|
310
|
-
onBlur:
|
|
308
|
+
ref: mergeRefs(ref, field_0.ref),
|
|
309
|
+
value: field_0.value ?? "",
|
|
310
|
+
onChange: field_0.onChange,
|
|
311
|
+
onBlur: field_0.onBlur,
|
|
311
312
|
isDirty,
|
|
312
|
-
isDisabled:
|
|
313
|
+
isDisabled: field_0.disabled || props.isDisabled,
|
|
313
314
|
error: props.error ?? error?.message
|
|
314
315
|
});
|
|
315
316
|
};
|
|
@@ -320,14 +321,14 @@ var TextArea$1 = (props) => {
|
|
|
320
321
|
$[8] = t0;
|
|
321
322
|
} else t0 = $[8];
|
|
322
323
|
let t1;
|
|
323
|
-
if ($[9] !==
|
|
324
|
-
t1 = /* @__PURE__ */ jsx(
|
|
325
|
-
control:
|
|
326
|
-
name:
|
|
324
|
+
if ($[9] !== field.form || $[10] !== field.name || $[11] !== t0) {
|
|
325
|
+
t1 = /* @__PURE__ */ jsx(FieldController, {
|
|
326
|
+
control: field.form,
|
|
327
|
+
name: field.name,
|
|
327
328
|
render: t0
|
|
328
329
|
});
|
|
329
|
-
$[9] =
|
|
330
|
-
$[10] =
|
|
330
|
+
$[9] = field.form;
|
|
331
|
+
$[10] = field.name;
|
|
331
332
|
$[11] = t0;
|
|
332
333
|
$[12] = t1;
|
|
333
334
|
} else t1 = $[12];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Ref } from 'react';
|
|
2
2
|
import { AriaTextFieldProps } from 'react-aria';
|
|
3
3
|
import { InputProps as AriaInputProps } from 'react-aria-components';
|
|
4
|
-
import { FieldValues } from 'react-hook-form';
|
|
5
4
|
import { FormFieldProps } from '../../FormField/FormField';
|
|
6
5
|
import { InputContentProps } from '../shared/InputContent';
|
|
6
|
+
import { FieldValues } from '../../shared/form.binding';
|
|
7
7
|
import { ControlProps } from '../../shared/form.types';
|
|
8
8
|
import { InputVariantProps } from '../../shared/input.cva';
|
|
9
9
|
type AllowedHTMLInputTypeAttribute = "email" | "hidden" | "tel" | "text" | "url";
|
|
@@ -18,6 +18,6 @@ interface TextInputBaseProps extends FormFieldProps, InputVariantProps, Omit<Inp
|
|
|
18
18
|
export interface TextInputProps extends TextInputBaseProps {
|
|
19
19
|
renderStaticInput?: boolean;
|
|
20
20
|
}
|
|
21
|
-
export type ControlledTextInputProps<TFieldValues extends
|
|
21
|
+
export type ControlledTextInputProps<TFieldValues extends Record<string, unknown>> = ControlProps<TextInputProps, TFieldValues>;
|
|
22
22
|
export declare const TextInput: <TFieldValues extends FieldValues>({ renderStaticInput, ...props }: ControlledTextInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
export {};
|