@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,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 { FormField } from "../../FormField/FormField.js";
|
|
4
5
|
import { inputBaseDefinition } from "../../shared/input.cva.js";
|
|
5
6
|
import { IntlUtils } from "../../../../utils/intl.utils.js";
|
|
@@ -8,23 +9,22 @@ import { InputFrame } from "../../Skeleton/InputFrame.js";
|
|
|
8
9
|
import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
|
|
9
10
|
import { InputContent } from "../shared/InputContent.js";
|
|
10
11
|
import { getStaticNumberDisplayValue } from "../shared/numberStatic.utils.js";
|
|
11
|
-
import { c } from "react/compiler-runtime";
|
|
12
|
-
import { jsx } from "react/jsx-runtime";
|
|
13
12
|
import { clsx } from "clsx";
|
|
14
13
|
import { useEffect, useRef, useState } from "react";
|
|
15
14
|
import { Input, useLocale } from "react-aria-components";
|
|
15
|
+
import { c } from "react/compiler-runtime";
|
|
16
|
+
import { jsx } from "react/jsx-runtime";
|
|
16
17
|
import { useFocusVisible, useNumberField } from "react-aria";
|
|
17
18
|
import { mergeRefs } from "@react-aria/utils";
|
|
18
|
-
import { Controller } from "react-hook-form";
|
|
19
19
|
import { useNumberFieldState } from "react-stately";
|
|
20
20
|
//#region src/components/inputs/Input/NumberInput/NumberInput.tsx
|
|
21
21
|
var NumberInputBase = (props) => {
|
|
22
|
-
const $ = c(
|
|
22
|
+
const $ = c(91);
|
|
23
23
|
const ui = UIConfig.useConfig();
|
|
24
24
|
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
25
25
|
const hasControlledValue = "value" in props;
|
|
26
26
|
const inputRef = useRef(null);
|
|
27
|
-
const { ref, inputClassName, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, className, unit, isLoading, action, leadingIcon, trailingIcon, value, onChange, onBlur, formatOptions: formatOptionsProp, variant: variantProp, as: asProp, size: sizeProp, hideLabel: hideLabelProp, isClearable: isClearableProp, autoFocusOnMount, ...rest } = props;
|
|
27
|
+
const { ref, inputClassName, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, className, unit, isLoading, action, leadingIcon, trailingIcon, value, onChange, onBlur, formatOptions: formatOptionsProp, variant: variantProp, as: asProp, size: sizeProp, hideLabel: hideLabelProp, isClearable: isClearableProp, isClearableIfDisabled, autoFocusOnMount, ...rest } = props;
|
|
28
28
|
const formatOptions = formatOptionsProp ?? ui.numberInput.formatOptions;
|
|
29
29
|
const variant = variantProp ?? ui.input.variant;
|
|
30
30
|
const as = asProp ?? ui.input.as;
|
|
@@ -128,7 +128,7 @@ var NumberInputBase = (props) => {
|
|
|
128
128
|
$[24] = t7;
|
|
129
129
|
} else t7 = $[24];
|
|
130
130
|
let t8;
|
|
131
|
-
if ($[25] !== action || $[26] !== handleInputBlur || $[27] !== isClearable || $[28] !==
|
|
131
|
+
if ($[25] !== action || $[26] !== handleInputBlur || $[27] !== isClearable || $[28] !== isClearableIfDisabled || $[29] !== isDisabled || $[30] !== isLoading || $[31] !== leadingIcon || $[32] !== state.inputValue || $[33] !== t7 || $[34] !== trailingIcon || $[35] !== unit) {
|
|
132
132
|
t8 = {
|
|
133
133
|
unit,
|
|
134
134
|
isLoading,
|
|
@@ -137,6 +137,7 @@ var NumberInputBase = (props) => {
|
|
|
137
137
|
leadingIcon,
|
|
138
138
|
trailingIcon,
|
|
139
139
|
isClearable,
|
|
140
|
+
isClearableIfDisabled,
|
|
140
141
|
onChange: t7,
|
|
141
142
|
value: state.inputValue,
|
|
142
143
|
onBlur: handleInputBlur
|
|
@@ -144,19 +145,20 @@ var NumberInputBase = (props) => {
|
|
|
144
145
|
$[25] = action;
|
|
145
146
|
$[26] = handleInputBlur;
|
|
146
147
|
$[27] = isClearable;
|
|
147
|
-
$[28] =
|
|
148
|
-
$[29] =
|
|
149
|
-
$[30] =
|
|
150
|
-
$[31] =
|
|
151
|
-
$[32] =
|
|
152
|
-
$[33] =
|
|
153
|
-
$[34] =
|
|
154
|
-
$[35] =
|
|
155
|
-
|
|
148
|
+
$[28] = isClearableIfDisabled;
|
|
149
|
+
$[29] = isDisabled;
|
|
150
|
+
$[30] = isLoading;
|
|
151
|
+
$[31] = leadingIcon;
|
|
152
|
+
$[32] = state.inputValue;
|
|
153
|
+
$[33] = t7;
|
|
154
|
+
$[34] = trailingIcon;
|
|
155
|
+
$[35] = unit;
|
|
156
|
+
$[36] = t8;
|
|
157
|
+
} else t8 = $[36];
|
|
156
158
|
const inputContentProps = t8;
|
|
157
159
|
const t9 = hideLabel || isHeaderHidden;
|
|
158
160
|
let t10;
|
|
159
|
-
if ($[
|
|
161
|
+
if ($[37] !== headerClassName || $[38] !== helperText || $[39] !== isDisabled || $[40] !== isRequired || $[41] !== label || $[42] !== labelProps || $[43] !== rightContent || $[44] !== t9 || $[45] !== tooltipText) {
|
|
160
162
|
t10 = {
|
|
161
163
|
label,
|
|
162
164
|
tooltipText,
|
|
@@ -168,28 +170,28 @@ var NumberInputBase = (props) => {
|
|
|
168
170
|
className: headerClassName,
|
|
169
171
|
labelProps
|
|
170
172
|
};
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
} else t10 = $[
|
|
173
|
+
$[37] = headerClassName;
|
|
174
|
+
$[38] = helperText;
|
|
175
|
+
$[39] = isDisabled;
|
|
176
|
+
$[40] = isRequired;
|
|
177
|
+
$[41] = label;
|
|
178
|
+
$[42] = labelProps;
|
|
179
|
+
$[43] = rightContent;
|
|
180
|
+
$[44] = t9;
|
|
181
|
+
$[45] = tooltipText;
|
|
182
|
+
$[46] = t10;
|
|
183
|
+
} else t10 = $[46];
|
|
182
184
|
const headerProps = t10;
|
|
183
185
|
const dataIsDisabled = isDisabled || void 0;
|
|
184
186
|
const T0 = TooltipWrapper;
|
|
185
187
|
const t11 = as === "inline" ? -1 : void 0;
|
|
186
188
|
const T1 = FormField;
|
|
187
189
|
let t12;
|
|
188
|
-
if ($[
|
|
190
|
+
if ($[47] !== className) {
|
|
189
191
|
t12 = clsx("group w-full", className);
|
|
190
|
-
$[
|
|
191
|
-
$[
|
|
192
|
-
} else t12 = $[
|
|
192
|
+
$[47] = className;
|
|
193
|
+
$[48] = t12;
|
|
194
|
+
} else t12 = $[48];
|
|
193
195
|
const t13 = as === "inline" ? -1 : void 0;
|
|
194
196
|
const t14 = clsx("relative flex cursor-text has-disabled:cursor-default", inputBaseCva({
|
|
195
197
|
variant,
|
|
@@ -197,35 +199,35 @@ var NumberInputBase = (props) => {
|
|
|
197
199
|
...rest
|
|
198
200
|
}), inputClassName);
|
|
199
201
|
let t15;
|
|
200
|
-
if ($[
|
|
202
|
+
if ($[49] === Symbol.for("react.memo_cache_sentinel")) {
|
|
201
203
|
t15 = () => inputRef.current?.focus();
|
|
202
|
-
$[
|
|
203
|
-
} else t15 = $[
|
|
204
|
+
$[49] = t15;
|
|
205
|
+
} else t15 = $[49];
|
|
204
206
|
const t16 = value === null || value === void 0 || void 0;
|
|
205
207
|
const t17 = isRequired || void 0;
|
|
206
208
|
let t18;
|
|
207
|
-
if ($[
|
|
209
|
+
if ($[50] !== ref) {
|
|
208
210
|
t18 = mergeRefs(ref, inputRef, numberFieldRef);
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
211
|
-
} else t18 = $[
|
|
211
|
+
$[50] = ref;
|
|
212
|
+
$[51] = t18;
|
|
213
|
+
} else t18 = $[51];
|
|
212
214
|
const t19 = isDirty || void 0;
|
|
213
215
|
const t20 = isRequired || void 0;
|
|
214
216
|
const t21 = state.inputValue === "" || state.inputValue === void 0 || state.inputValue === null || void 0;
|
|
215
217
|
const t22 = !("" + value === "" || value === null || value === void 0) || void 0;
|
|
216
218
|
const t23 = as === "floating" ? "\xA0" : inputProps.placeholder;
|
|
217
219
|
let t24;
|
|
218
|
-
if ($[
|
|
220
|
+
if ($[52] !== inputProps || $[53] !== isFocusVisible) {
|
|
219
221
|
t24 = (e_1) => {
|
|
220
222
|
inputProps.onFocus?.(e_1);
|
|
221
223
|
if (isFocusVisible) e_1.target.select();
|
|
222
224
|
};
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
} else t24 = $[
|
|
225
|
+
$[52] = inputProps;
|
|
226
|
+
$[53] = isFocusVisible;
|
|
227
|
+
$[54] = t24;
|
|
228
|
+
} else t24 = $[54];
|
|
227
229
|
let t25;
|
|
228
|
-
if ($[
|
|
230
|
+
if ($[55] !== dataIsDisabled || $[56] !== inputProps || $[57] !== t18 || $[58] !== t19 || $[59] !== t20 || $[60] !== t21 || $[61] !== t22 || $[62] !== t23 || $[63] !== t24) {
|
|
229
231
|
t25 = /* @__PURE__ */ jsx(Input, {
|
|
230
232
|
...inputProps,
|
|
231
233
|
ref: t18,
|
|
@@ -238,19 +240,19 @@ var NumberInputBase = (props) => {
|
|
|
238
240
|
className: "w-full bg-transparent outline-none",
|
|
239
241
|
onFocus: t24
|
|
240
242
|
});
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
247
|
-
$[
|
|
248
|
-
$[
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
251
|
-
} else t25 = $[
|
|
243
|
+
$[55] = dataIsDisabled;
|
|
244
|
+
$[56] = inputProps;
|
|
245
|
+
$[57] = t18;
|
|
246
|
+
$[58] = t19;
|
|
247
|
+
$[59] = t20;
|
|
248
|
+
$[60] = t21;
|
|
249
|
+
$[61] = t22;
|
|
250
|
+
$[62] = t23;
|
|
251
|
+
$[63] = t24;
|
|
252
|
+
$[64] = t25;
|
|
253
|
+
} else t25 = $[64];
|
|
252
254
|
let t26;
|
|
253
|
-
if ($[
|
|
255
|
+
if ($[65] !== as || $[66] !== headerProps || $[67] !== inputContentProps || $[68] !== size || $[69] !== t25) {
|
|
254
256
|
t26 = /* @__PURE__ */ jsx(InputContent, {
|
|
255
257
|
...inputContentProps,
|
|
256
258
|
headerProps,
|
|
@@ -258,15 +260,15 @@ var NumberInputBase = (props) => {
|
|
|
258
260
|
size,
|
|
259
261
|
children: t25
|
|
260
262
|
});
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
} else t26 = $[
|
|
263
|
+
$[65] = as;
|
|
264
|
+
$[66] = headerProps;
|
|
265
|
+
$[67] = inputContentProps;
|
|
266
|
+
$[68] = size;
|
|
267
|
+
$[69] = t25;
|
|
268
|
+
$[70] = t26;
|
|
269
|
+
} else t26 = $[70];
|
|
268
270
|
let t27;
|
|
269
|
-
if ($[
|
|
271
|
+
if ($[71] !== dataIsDisabled || $[72] !== t14 || $[73] !== t16 || $[74] !== t17 || $[75] !== t26) {
|
|
270
272
|
t27 = /* @__PURE__ */ jsx("div", {
|
|
271
273
|
className: t14,
|
|
272
274
|
onClick: t15,
|
|
@@ -275,15 +277,15 @@ var NumberInputBase = (props) => {
|
|
|
275
277
|
"data-is-disabled": dataIsDisabled,
|
|
276
278
|
children: t26
|
|
277
279
|
});
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
280
|
-
$[
|
|
281
|
-
$[
|
|
282
|
-
$[
|
|
283
|
-
$[
|
|
284
|
-
} else t27 = $[
|
|
280
|
+
$[71] = dataIsDisabled;
|
|
281
|
+
$[72] = t14;
|
|
282
|
+
$[73] = t16;
|
|
283
|
+
$[74] = t17;
|
|
284
|
+
$[75] = t26;
|
|
285
|
+
$[76] = t27;
|
|
286
|
+
} else t27 = $[76];
|
|
285
287
|
let t28;
|
|
286
|
-
if ($[
|
|
288
|
+
if ($[77] !== T1 || $[78] !== as || $[79] !== formFieldProps || $[80] !== labelProps || $[81] !== t12 || $[82] !== t13 || $[83] !== t27) {
|
|
287
289
|
t28 = /* @__PURE__ */ jsx(T1, {
|
|
288
290
|
...formFieldProps,
|
|
289
291
|
as,
|
|
@@ -292,30 +294,30 @@ var NumberInputBase = (props) => {
|
|
|
292
294
|
tabIndex: t13,
|
|
293
295
|
children: t27
|
|
294
296
|
});
|
|
295
|
-
$[
|
|
296
|
-
$[
|
|
297
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
$[
|
|
300
|
-
$[
|
|
301
|
-
$[
|
|
302
|
-
$[
|
|
303
|
-
} else t28 = $[
|
|
297
|
+
$[77] = T1;
|
|
298
|
+
$[78] = as;
|
|
299
|
+
$[79] = formFieldProps;
|
|
300
|
+
$[80] = labelProps;
|
|
301
|
+
$[81] = t12;
|
|
302
|
+
$[82] = t13;
|
|
303
|
+
$[83] = t27;
|
|
304
|
+
$[84] = t28;
|
|
305
|
+
} else t28 = $[84];
|
|
304
306
|
let t29;
|
|
305
|
-
if ($[
|
|
307
|
+
if ($[85] !== T0 || $[86] !== as || $[87] !== error || $[88] !== t11 || $[89] !== t28) {
|
|
306
308
|
t29 = /* @__PURE__ */ jsx(T0, {
|
|
307
309
|
as,
|
|
308
310
|
error,
|
|
309
311
|
triggerTabIndex: t11,
|
|
310
312
|
children: t28
|
|
311
313
|
});
|
|
312
|
-
$[
|
|
313
|
-
$[
|
|
314
|
-
$[
|
|
315
|
-
$[
|
|
316
|
-
$[
|
|
317
|
-
$[
|
|
318
|
-
} else t29 = $[
|
|
314
|
+
$[85] = T0;
|
|
315
|
+
$[86] = as;
|
|
316
|
+
$[87] = error;
|
|
317
|
+
$[88] = t11;
|
|
318
|
+
$[89] = t28;
|
|
319
|
+
$[90] = t29;
|
|
320
|
+
} else t29 = $[90];
|
|
319
321
|
return t29;
|
|
320
322
|
};
|
|
321
323
|
var NumberInputInner = (t0) => {
|
|
@@ -420,35 +422,35 @@ var NumberInput = (t0) => {
|
|
|
420
422
|
props = $[1];
|
|
421
423
|
renderStaticInput = $[2];
|
|
422
424
|
}
|
|
423
|
-
if ("
|
|
424
|
-
let
|
|
425
|
+
if ("field" in props && props.field) {
|
|
426
|
+
let field;
|
|
425
427
|
let innerProps;
|
|
426
428
|
let ref;
|
|
427
429
|
if ($[3] !== props) {
|
|
428
|
-
({
|
|
430
|
+
({field, ref, ...innerProps} = props);
|
|
429
431
|
$[3] = props;
|
|
430
|
-
$[4] =
|
|
432
|
+
$[4] = field;
|
|
431
433
|
$[5] = innerProps;
|
|
432
434
|
$[6] = ref;
|
|
433
435
|
} else {
|
|
434
|
-
|
|
436
|
+
field = $[4];
|
|
435
437
|
innerProps = $[5];
|
|
436
438
|
ref = $[6];
|
|
437
439
|
}
|
|
438
|
-
const controlWithOptions =
|
|
440
|
+
const controlWithOptions = field.form;
|
|
439
441
|
let t1;
|
|
440
442
|
if ($[7] !== controlWithOptions._options?.disabled || $[8] !== innerProps || $[9] !== props.error || $[10] !== props.isDisabled || $[11] !== ref || $[12] !== renderStaticInput) {
|
|
441
443
|
t1 = (t2) => {
|
|
442
|
-
const { field, fieldState: t3 } = t2;
|
|
444
|
+
const { field: field_0, fieldState: t3 } = t2;
|
|
443
445
|
const { error, isDirty } = t3;
|
|
444
446
|
return /* @__PURE__ */ jsx(NumberInputInner, {
|
|
445
447
|
...innerProps,
|
|
446
|
-
ref: mergeRefs(ref,
|
|
447
|
-
value:
|
|
448
|
-
onChange:
|
|
449
|
-
onBlur:
|
|
448
|
+
ref: mergeRefs(ref, field_0.ref),
|
|
449
|
+
value: field_0.value,
|
|
450
|
+
onChange: field_0.onChange,
|
|
451
|
+
onBlur: field_0.onBlur,
|
|
450
452
|
isDirty,
|
|
451
|
-
isDisabled:
|
|
453
|
+
isDisabled: field_0.disabled || props.isDisabled,
|
|
452
454
|
isFormControlDisabled: !!controlWithOptions._options?.disabled,
|
|
453
455
|
error: props.error ?? error?.message,
|
|
454
456
|
renderStaticInput
|
|
@@ -463,14 +465,14 @@ var NumberInput = (t0) => {
|
|
|
463
465
|
$[13] = t1;
|
|
464
466
|
} else t1 = $[13];
|
|
465
467
|
let t2;
|
|
466
|
-
if ($[14] !==
|
|
467
|
-
t2 = /* @__PURE__ */ jsx(
|
|
468
|
-
control:
|
|
469
|
-
name:
|
|
468
|
+
if ($[14] !== field.form || $[15] !== field.name || $[16] !== t1) {
|
|
469
|
+
t2 = /* @__PURE__ */ jsx(FieldController, {
|
|
470
|
+
control: field.form,
|
|
471
|
+
name: field.name,
|
|
470
472
|
render: t1
|
|
471
473
|
});
|
|
472
|
-
$[14] =
|
|
473
|
-
$[15] =
|
|
474
|
+
$[14] = field.form;
|
|
475
|
+
$[15] = field.name;
|
|
474
476
|
$[16] = t1;
|
|
475
477
|
$[17] = t2;
|
|
476
478
|
} else t2 = $[17];
|
|
@@ -28,6 +28,7 @@ export interface NumberRangeFieldProps extends NumberRangeFieldInputProps {
|
|
|
28
28
|
hideInnerLabels?: boolean;
|
|
29
29
|
isDirty?: boolean;
|
|
30
30
|
isClearable?: boolean;
|
|
31
|
+
isClearableIfDisabled?: boolean;
|
|
31
32
|
autoFocusOnMount?: boolean;
|
|
32
33
|
isDisabled?: boolean;
|
|
33
34
|
isRequired?: boolean;
|
|
@@ -41,5 +42,5 @@ export interface NumberRangeFieldProps extends NumberRangeFieldInputProps {
|
|
|
41
42
|
onRangeSideClear: (side: keyof NumberRangeValue) => void;
|
|
42
43
|
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
43
44
|
}
|
|
44
|
-
export declare const NumberRangeField: ({ ref, as, className, inputClassName, minInputClassName, maxInputClassName, inputBaseClassName, inputSizeClassName, formFieldProps, headerProps, rangeValue, effectiveError, minPlaceholder, maxPlaceholder, minLabel, maxLabel, hideInnerLabels, isDirty, isClearable, autoFocusOnMount, isDisabled, isRequired, isEmpty, isHovered, isFocused, isFocusVisible, focusWithinProps, hoverProps, onRangeSideChange, onRangeSideClear, onBlur, ...numberFieldProps }: NumberRangeFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare const NumberRangeField: ({ ref, as, className, inputClassName, minInputClassName, maxInputClassName, inputBaseClassName, inputSizeClassName, formFieldProps, headerProps, rangeValue, effectiveError, minPlaceholder, maxPlaceholder, minLabel, maxLabel, hideInnerLabels, isDirty, isClearable, isClearableIfDisabled, autoFocusOnMount, isDisabled, isRequired, isEmpty, isHovered, isFocused, isFocusVisible, focusWithinProps, hoverProps, onRangeSideChange, onRangeSideClear, onBlur, ...numberFieldProps }: NumberRangeFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
45
46
|
export {};
|