@povio/ui 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons/AlignCenter.js +26 -11
- package/dist/assets/icons/AlignLeft.js +26 -11
- package/dist/assets/icons/AlignLeftRight.js +26 -11
- package/dist/assets/icons/AlignRight.js +26 -11
- package/dist/assets/icons/ArrowDropDown.js +26 -11
- package/dist/assets/icons/ArrowDropUp.js +26 -11
- package/dist/assets/icons/ArrowLeft.js +26 -11
- package/dist/assets/icons/ArrowRight.js +26 -11
- package/dist/assets/icons/Bold.js +26 -11
- package/dist/assets/icons/BulletedList.js +26 -11
- package/dist/assets/icons/Calendar.js +28 -13
- package/dist/assets/icons/Check.js +28 -13
- package/dist/assets/icons/CheckCircle.js +26 -11
- package/dist/assets/icons/CheckboxCheckmark.js +29 -14
- package/dist/assets/icons/CheckboxIndeterminate.js +29 -14
- package/dist/assets/icons/ChevronDown.js +28 -13
- package/dist/assets/icons/ChevronLeft.js +28 -13
- package/dist/assets/icons/ChevronRight.js +28 -13
- package/dist/assets/icons/ChevronUp.js +28 -13
- package/dist/assets/icons/ChevronsLeft.js +28 -13
- package/dist/assets/icons/ChevronsRight.js +28 -13
- package/dist/assets/icons/Clock.js +26 -11
- package/dist/assets/icons/Close.js +26 -11
- package/dist/assets/icons/DateTime.js +35 -14
- package/dist/assets/icons/DragIndicator.js +26 -11
- package/dist/assets/icons/File.js +28 -13
- package/dist/assets/icons/Highlight.js +26 -11
- package/dist/assets/icons/HighlightOn.js +49 -15
- package/dist/assets/icons/Home.js +26 -11
- package/dist/assets/icons/Info.js +37 -16
- package/dist/assets/icons/Italic.js +26 -11
- package/dist/assets/icons/Link.js +26 -11
- package/dist/assets/icons/Menu.js +26 -11
- package/dist/assets/icons/NumberedList.js +26 -11
- package/dist/assets/icons/PointerHorizontal.js +26 -11
- package/dist/assets/icons/PointerVertical.js +26 -11
- package/dist/assets/icons/Search.js +26 -11
- package/dist/assets/icons/Send.js +28 -13
- package/dist/assets/icons/Strikethrough.js +26 -11
- package/dist/assets/icons/TextColor.js +48 -14
- package/dist/assets/icons/Today.js +26 -11
- package/dist/assets/icons/Underlined.js +28 -13
- package/dist/assets/icons/Upload.js +35 -14
- package/dist/assets/icons/Visibility.js +26 -11
- package/dist/assets/icons/VisibilityOff.js +26 -11
- package/dist/assets/icons/WarningFilled.js +28 -13
- package/dist/components/Breadcrumbs/Breadcrumbs.js +207 -56
- package/dist/components/Menu/Menu.js +18 -2
- package/dist/components/Menu/MenuDesktop.js +41 -7
- package/dist/components/Menu/MenuItem.js +32 -9
- package/dist/components/Menu/MenuMobile.js +102 -39
- package/dist/components/Menu/MenuPopover.js +105 -29
- package/dist/components/buttons/Button/button.cva.d.ts +3 -3
- package/dist/components/buttons/IconButton/IconButton.js +40 -8
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +2 -1
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
- package/dist/components/buttons/PillButton/PillButton.js +55 -17
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
- package/dist/components/buttons/SplitButton/SplitButton.js +103 -18
- package/dist/components/buttons/TextButton/TextButton.js +30 -8
- package/dist/components/buttons/ToggleButton/ToggleButton.js +28 -8
- package/dist/components/buttons/shared/ButtonContent.js +80 -22
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/inputs/Checkbox/Checkbox.js +201 -35
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +3 -0
- package/dist/components/inputs/Checkbox/checkbox.cva.js +2 -1
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +380 -75
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +499 -186
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +14 -5
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +280 -46
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +7 -3
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +616 -121
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +5 -2
- package/dist/components/inputs/DateTime/shared/Calendar.js +342 -119
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +4 -2
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +310 -103
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +4 -2
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +150 -33
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +233 -98
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/DateField.js +288 -112
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +14 -3
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +359 -129
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +18 -1
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +104 -11
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +83 -28
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +103 -58
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +193 -82
- package/dist/components/inputs/DateTime/shared/TimeField.js +27 -8
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +279 -110
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +4 -1
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +211 -65
- package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +5 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +16 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +16 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +15 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +32 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +2 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +1 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +41 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +99 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +1 -0
- package/dist/components/inputs/File/FileUpload.js +91 -46
- package/dist/components/inputs/File/FileUploadContainer.js +15 -7
- package/dist/components/inputs/File/InputUpload.js +317 -79
- package/dist/components/inputs/File/index.d.ts +1 -1
- package/dist/components/inputs/File/shared/FileCard.js +104 -41
- package/dist/components/inputs/File/shared/FileCardList.js +47 -12
- package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
- package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
- package/dist/components/inputs/File/shared/InputUploadContent.js +148 -34
- package/dist/components/inputs/File/shared/InputUploadFilled.js +49 -8
- package/dist/components/inputs/File/shared/ProgressBar.js +102 -15
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +0 -11
- package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -18
- package/dist/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormField.js +119 -37
- package/dist/components/inputs/FormField/FormFieldError.js +25 -5
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +81 -22
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +31 -7
- package/dist/components/inputs/FormField/FormFieldHelper.js +26 -6
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +40 -9
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +13 -0
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +14 -0
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +5 -2
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +446 -97
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +45 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +571 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +35 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +574 -0
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +8 -0
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +5 -0
- package/dist/components/inputs/Input/TextArea/TextArea.js +305 -90
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +3 -1
- package/dist/components/inputs/Input/TextInput/TextInput.js +429 -90
- package/dist/components/inputs/Input/shared/InputContent.js +193 -59
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +1 -0
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +7 -0
- package/dist/components/inputs/Inputs/Form.js +40 -11
- package/dist/components/inputs/Inputs/InputItem.d.ts +15 -21
- package/dist/components/inputs/Inputs/InputItem.js +69 -14
- package/dist/components/inputs/Inputs/Inputs.js +37 -11
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +3 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.js +353 -61
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +45 -0
- package/dist/components/inputs/RadioGroup/radio.cva.js +48 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +6 -2
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +217 -22
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -18
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +107 -8
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +37 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +14 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.js +178 -0
- package/dist/components/inputs/Selection/Select/Select.d.ts +7 -3
- package/dist/components/inputs/Selection/Select/Select.js +227 -18
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +8 -1
- package/dist/components/inputs/Selection/shared/SelectBase.js +69 -18
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +393 -138
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +397 -116
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBox.js +164 -52
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +85 -35
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +69 -16
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +70 -21
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +9 -3
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +9 -0
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +47 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +14 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +43 -0
- package/dist/components/inputs/Selection/shared/select.context.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/select.context.js +67 -36
- package/dist/components/inputs/Selection/shared/select.types.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +6 -0
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +5 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +12 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +8 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +23 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +54 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +1 -0
- package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +83 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +612 -0
- package/dist/components/inputs/Slider/Slider.d.ts +2 -1
- package/dist/components/inputs/Slider/Slider.js +265 -76
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -0
- package/dist/components/inputs/TextEditor/TextEditor.js +447 -98
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +102 -30
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
- package/dist/components/inputs/Toggle/Toggle.d.ts +1 -0
- package/dist/components/inputs/Toggle/Toggle.js +214 -37
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +3 -0
- package/dist/components/inputs/Toggle/toggle.cva.js +2 -1
- package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
- package/dist/components/inputs/shared/CheckContent.js +21 -11
- package/dist/components/inputs/shared/InputClear.d.ts +2 -1
- package/dist/components/inputs/shared/InputClear.js +88 -12
- package/dist/components/inputs/shared/TooltipWrapper.js +50 -11
- package/dist/components/inputs/shared/input.cva.d.ts +28 -0
- package/dist/components/inputs/shared/input.cva.js +38 -4
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +8 -0
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +5 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +15 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.js +112 -0
- package/dist/components/navigation/Accordion/Accordion.js +69 -22
- package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
- package/dist/components/navigation/Stepper/Stepper.js +67 -22
- package/dist/components/navigation/Stepper/StepperItem.js +104 -31
- package/dist/components/navigation/Stepper/StepperSeparator.js +23 -5
- package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
- package/dist/components/overlays/BottomSheet/BottomSheet.js +96 -23
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
- package/dist/components/overlays/Drawer/Drawer.js +62 -20
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +85 -28
- package/dist/components/overlays/Tooltip/Tooltip.js +137 -28
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
- package/dist/components/segment/Segment.js +218 -57
- package/dist/components/segment/SegmentItem.js +67 -10
- package/dist/components/shared/pagination/Pagination.js +108 -22
- package/dist/components/shared/pagination/PaginationList.js +167 -64
- package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
- package/dist/components/status/Alert/Alert.js +97 -30
- package/dist/components/status/Loader/Loader.js +77 -22
- package/dist/components/status/Toast/Toast.js +28 -14
- package/dist/components/status/Toast/toast.cva.d.ts +1 -1
- package/dist/components/status/Toast/useToast.js +62 -57
- package/dist/components/table/ColumnConfig.js +158 -54
- package/dist/components/table/InfiniteTable.js +67 -16
- package/dist/components/table/PaginatedTable.js +84 -18
- package/dist/components/table/Table.js +28 -27
- package/dist/components/text/Link/Link.js +19 -7
- package/dist/components/text/Typography/Typography.js +23 -8
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +23 -9
- package/dist/config/router.context.js +42 -16
- package/dist/config/theme.context.js +98 -45
- package/dist/config/uiConfig.context.d.ts +20 -6
- package/dist/config/uiConfig.context.js +68 -14
- package/dist/config/uiOverrides.context.d.ts +30 -11
- package/dist/config/uiOverrides.context.js +54 -14
- package/dist/helpers/dynamicInputs.d.ts +12 -9
- package/dist/helpers/dynamicInputs.js +13 -8
- package/dist/hooks/useAutosave.d.ts +2 -1
- package/dist/hooks/useAutosave.js +12 -4
- package/dist/hooks/useAutosave.spec.d.ts +1 -0
- package/dist/hooks/useBreakpoint.js +16 -3
- package/dist/hooks/useDebounceCallback.js +51 -17
- package/dist/hooks/useFilters.js +125 -64
- package/dist/hooks/useForm.js +42 -8
- package/dist/hooks/useFormAutosave.d.ts +3 -1
- package/dist/hooks/useFormAutosave.js +122 -30
- package/dist/hooks/useFormAutosave.spec.d.ts +1 -0
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +91 -24
- package/dist/hooks/useKeyInteractions.d.ts +20 -0
- package/dist/hooks/useKeyInteractions.js +54 -0
- package/dist/hooks/useKeyInteractions.spec.d.ts +1 -0
- package/dist/hooks/useLocalStorage.js +43 -10
- package/dist/hooks/useLongPressRepeat.js +55 -20
- package/dist/hooks/usePagination.js +49 -19
- package/dist/hooks/useQueryAutocomplete.d.ts +14 -0
- package/dist/hooks/useQueryAutocomplete.js +72 -0
- package/dist/hooks/useScrollableListBox.js +37 -16
- package/dist/hooks/useSorting.js +69 -28
- package/dist/hooks/useStateAndRef.js +21 -7
- package/dist/hooks/useTableColumnConfig.js +124 -31
- package/dist/hooks/useTranslationMemo.js +25 -5
- package/dist/index.d.ts +18 -3
- package/dist/index.js +15 -5
- package/dist/tw-ui-plugin.js +6 -0
- package/dist/utils/date-time.utils.d.ts +38 -10
- package/dist/utils/date-time.utils.js +136 -22
- package/dist/utils/query.utils.d.ts +4 -0
- package/dist/utils/query.utils.js +8 -0
- package/dist/utils/zod.utils.d.ts +2 -0
- package/dist/utils/zod.utils.js +5 -0
- package/package.json +2 -2
|
@@ -0,0 +1,571 @@
|
|
|
1
|
+
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
2
|
+
import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
|
|
3
|
+
import { InputClear } from "../../shared/InputClear.js";
|
|
4
|
+
import { FormField } from "../../FormField/FormField.js";
|
|
5
|
+
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { clsx } from "clsx";
|
|
9
|
+
import { useEffect, useRef } from "react";
|
|
10
|
+
import { Input, useLocale } from "react-aria-components";
|
|
11
|
+
import { useFocusVisible, useNumberField } from "react-aria";
|
|
12
|
+
import { mergeRefs } from "@react-aria/utils";
|
|
13
|
+
import { useNumberFieldState } from "react-stately";
|
|
14
|
+
//#region src/components/inputs/Input/NumberRangeInput/NumberRangeField.tsx
|
|
15
|
+
var NumberRangeValueField = (t0) => {
|
|
16
|
+
const $ = c(63);
|
|
17
|
+
let autoFocusOnMount;
|
|
18
|
+
let className;
|
|
19
|
+
let formatOptions;
|
|
20
|
+
let hideInnerLabels;
|
|
21
|
+
let isClearable;
|
|
22
|
+
let isDisabled;
|
|
23
|
+
let isInvalid;
|
|
24
|
+
let isRequired;
|
|
25
|
+
let label;
|
|
26
|
+
let onBlur;
|
|
27
|
+
let onChange;
|
|
28
|
+
let onClear;
|
|
29
|
+
let placeholder;
|
|
30
|
+
let rest;
|
|
31
|
+
let value;
|
|
32
|
+
if ($[0] !== t0) {
|
|
33
|
+
({label, value, placeholder, isDisabled, isInvalid, isRequired, formatOptions, hideInnerLabels, autoFocusOnMount, isClearable, className, onChange, onClear, onBlur, ...rest} = t0);
|
|
34
|
+
$[0] = t0;
|
|
35
|
+
$[1] = autoFocusOnMount;
|
|
36
|
+
$[2] = className;
|
|
37
|
+
$[3] = formatOptions;
|
|
38
|
+
$[4] = hideInnerLabels;
|
|
39
|
+
$[5] = isClearable;
|
|
40
|
+
$[6] = isDisabled;
|
|
41
|
+
$[7] = isInvalid;
|
|
42
|
+
$[8] = isRequired;
|
|
43
|
+
$[9] = label;
|
|
44
|
+
$[10] = onBlur;
|
|
45
|
+
$[11] = onChange;
|
|
46
|
+
$[12] = onClear;
|
|
47
|
+
$[13] = placeholder;
|
|
48
|
+
$[14] = rest;
|
|
49
|
+
$[15] = value;
|
|
50
|
+
} else {
|
|
51
|
+
autoFocusOnMount = $[1];
|
|
52
|
+
className = $[2];
|
|
53
|
+
formatOptions = $[3];
|
|
54
|
+
hideInnerLabels = $[4];
|
|
55
|
+
isClearable = $[5];
|
|
56
|
+
isDisabled = $[6];
|
|
57
|
+
isInvalid = $[7];
|
|
58
|
+
isRequired = $[8];
|
|
59
|
+
label = $[9];
|
|
60
|
+
onBlur = $[10];
|
|
61
|
+
onChange = $[11];
|
|
62
|
+
onClear = $[12];
|
|
63
|
+
placeholder = $[13];
|
|
64
|
+
rest = $[14];
|
|
65
|
+
value = $[15];
|
|
66
|
+
}
|
|
67
|
+
const ui = UIConfig.useConfig();
|
|
68
|
+
const { locale } = useLocale();
|
|
69
|
+
const { isFocusVisible } = useFocusVisible();
|
|
70
|
+
const inputRef = useRef(null);
|
|
71
|
+
const numberFieldRef = useRef(null);
|
|
72
|
+
let t1;
|
|
73
|
+
let t2;
|
|
74
|
+
if ($[16] !== autoFocusOnMount || $[17] !== isDisabled) {
|
|
75
|
+
t1 = () => {
|
|
76
|
+
if (!autoFocusOnMount || isDisabled) return;
|
|
77
|
+
requestAnimationFrame(() => inputRef.current?.focus());
|
|
78
|
+
};
|
|
79
|
+
t2 = [autoFocusOnMount, isDisabled];
|
|
80
|
+
$[16] = autoFocusOnMount;
|
|
81
|
+
$[17] = isDisabled;
|
|
82
|
+
$[18] = t1;
|
|
83
|
+
$[19] = t2;
|
|
84
|
+
} else {
|
|
85
|
+
t1 = $[18];
|
|
86
|
+
t2 = $[19];
|
|
87
|
+
}
|
|
88
|
+
useEffect(t1, t2);
|
|
89
|
+
const t3 = value ?? NaN;
|
|
90
|
+
let t4;
|
|
91
|
+
if ($[20] !== onBlur) {
|
|
92
|
+
t4 = (e) => onBlur?.({ target: e.target });
|
|
93
|
+
$[20] = onBlur;
|
|
94
|
+
$[21] = t4;
|
|
95
|
+
} else t4 = $[21];
|
|
96
|
+
const t5 = formatOptions ?? ui.numberInput.formatOptions;
|
|
97
|
+
let t6;
|
|
98
|
+
if ($[22] !== isDisabled || $[23] !== isInvalid || $[24] !== isRequired || $[25] !== label || $[26] !== locale || $[27] !== onChange || $[28] !== placeholder || $[29] !== rest || $[30] !== t3 || $[31] !== t4 || $[32] !== t5) {
|
|
99
|
+
t6 = {
|
|
100
|
+
...rest,
|
|
101
|
+
label,
|
|
102
|
+
value: t3,
|
|
103
|
+
placeholder,
|
|
104
|
+
isDisabled,
|
|
105
|
+
isInvalid,
|
|
106
|
+
isRequired,
|
|
107
|
+
onChange,
|
|
108
|
+
onBlur: t4,
|
|
109
|
+
locale,
|
|
110
|
+
formatOptions: t5
|
|
111
|
+
};
|
|
112
|
+
$[22] = isDisabled;
|
|
113
|
+
$[23] = isInvalid;
|
|
114
|
+
$[24] = isRequired;
|
|
115
|
+
$[25] = label;
|
|
116
|
+
$[26] = locale;
|
|
117
|
+
$[27] = onChange;
|
|
118
|
+
$[28] = placeholder;
|
|
119
|
+
$[29] = rest;
|
|
120
|
+
$[30] = t3;
|
|
121
|
+
$[31] = t4;
|
|
122
|
+
$[32] = t5;
|
|
123
|
+
$[33] = t6;
|
|
124
|
+
} else t6 = $[33];
|
|
125
|
+
const numberProps = t6;
|
|
126
|
+
const { labelProps, inputProps } = useNumberField(numberProps, useNumberFieldState(numberProps), numberFieldRef);
|
|
127
|
+
const t7 = hideInnerLabels && "sr-only";
|
|
128
|
+
let t8;
|
|
129
|
+
if ($[34] !== t7) {
|
|
130
|
+
t8 = clsx(t7);
|
|
131
|
+
$[34] = t7;
|
|
132
|
+
$[35] = t8;
|
|
133
|
+
} else t8 = $[35];
|
|
134
|
+
let t9;
|
|
135
|
+
if ($[36] !== isDisabled || $[37] !== isRequired || $[38] !== label || $[39] !== labelProps || $[40] !== t8) {
|
|
136
|
+
t9 = /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
137
|
+
label,
|
|
138
|
+
labelProps,
|
|
139
|
+
isRequired,
|
|
140
|
+
isDisabled,
|
|
141
|
+
className: t8
|
|
142
|
+
});
|
|
143
|
+
$[36] = isDisabled;
|
|
144
|
+
$[37] = isRequired;
|
|
145
|
+
$[38] = label;
|
|
146
|
+
$[39] = labelProps;
|
|
147
|
+
$[40] = t8;
|
|
148
|
+
$[41] = t9;
|
|
149
|
+
} else t9 = $[41];
|
|
150
|
+
let t10;
|
|
151
|
+
if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
|
|
152
|
+
t10 = mergeRefs(inputRef, numberFieldRef);
|
|
153
|
+
$[42] = t10;
|
|
154
|
+
} else t10 = $[42];
|
|
155
|
+
const t11 = inputProps.placeholder;
|
|
156
|
+
let t12;
|
|
157
|
+
if ($[43] !== className) {
|
|
158
|
+
t12 = clsx("w-full min-w-0 bg-transparent outline-none", className);
|
|
159
|
+
$[43] = className;
|
|
160
|
+
$[44] = t12;
|
|
161
|
+
} else t12 = $[44];
|
|
162
|
+
let t13;
|
|
163
|
+
if ($[45] !== inputProps || $[46] !== isFocusVisible) {
|
|
164
|
+
t13 = (e_0) => {
|
|
165
|
+
inputProps.onFocus?.(e_0);
|
|
166
|
+
if (isFocusVisible) e_0.target.select();
|
|
167
|
+
};
|
|
168
|
+
$[45] = inputProps;
|
|
169
|
+
$[46] = isFocusVisible;
|
|
170
|
+
$[47] = t13;
|
|
171
|
+
} else t13 = $[47];
|
|
172
|
+
let t14;
|
|
173
|
+
if ($[48] !== inputProps || $[49] !== t12 || $[50] !== t13) {
|
|
174
|
+
t14 = /* @__PURE__ */ jsx(Input, {
|
|
175
|
+
...inputProps,
|
|
176
|
+
ref: t10,
|
|
177
|
+
placeholder: t11,
|
|
178
|
+
className: t12,
|
|
179
|
+
onFocus: t13
|
|
180
|
+
});
|
|
181
|
+
$[48] = inputProps;
|
|
182
|
+
$[49] = t12;
|
|
183
|
+
$[50] = t13;
|
|
184
|
+
$[51] = t14;
|
|
185
|
+
} else t14 = $[51];
|
|
186
|
+
let t15;
|
|
187
|
+
if ($[52] !== isClearable || $[53] !== isDisabled || $[54] !== onClear || $[55] !== value) {
|
|
188
|
+
t15 = isClearable && !isDisabled && /* @__PURE__ */ jsx(InputClear, {
|
|
189
|
+
onClear,
|
|
190
|
+
show: value !== null
|
|
191
|
+
});
|
|
192
|
+
$[52] = isClearable;
|
|
193
|
+
$[53] = isDisabled;
|
|
194
|
+
$[54] = onClear;
|
|
195
|
+
$[55] = value;
|
|
196
|
+
$[56] = t15;
|
|
197
|
+
} else t15 = $[56];
|
|
198
|
+
let t16;
|
|
199
|
+
if ($[57] !== t14 || $[58] !== t15) {
|
|
200
|
+
t16 = /* @__PURE__ */ jsxs("div", {
|
|
201
|
+
className: "flex items-center gap-input-gap-trailing-elements",
|
|
202
|
+
children: [t14, t15]
|
|
203
|
+
});
|
|
204
|
+
$[57] = t14;
|
|
205
|
+
$[58] = t15;
|
|
206
|
+
$[59] = t16;
|
|
207
|
+
} else t16 = $[59];
|
|
208
|
+
let t17;
|
|
209
|
+
if ($[60] !== t16 || $[61] !== t9) {
|
|
210
|
+
t17 = /* @__PURE__ */ jsxs("div", {
|
|
211
|
+
className: "min-w-0 flex-1",
|
|
212
|
+
children: [t9, t16]
|
|
213
|
+
});
|
|
214
|
+
$[60] = t16;
|
|
215
|
+
$[61] = t9;
|
|
216
|
+
$[62] = t17;
|
|
217
|
+
} else t17 = $[62];
|
|
218
|
+
return t17;
|
|
219
|
+
};
|
|
220
|
+
var NumberRangeField = (t0) => {
|
|
221
|
+
const $ = c(118);
|
|
222
|
+
let as;
|
|
223
|
+
let autoFocusOnMount;
|
|
224
|
+
let className;
|
|
225
|
+
let effectiveError;
|
|
226
|
+
let focusWithinProps;
|
|
227
|
+
let formFieldProps;
|
|
228
|
+
let headerProps;
|
|
229
|
+
let hideInnerLabels;
|
|
230
|
+
let hoverProps;
|
|
231
|
+
let inputBaseClassName;
|
|
232
|
+
let inputClassName;
|
|
233
|
+
let inputSizeClassName;
|
|
234
|
+
let isClearable;
|
|
235
|
+
let isDirty;
|
|
236
|
+
let isDisabled;
|
|
237
|
+
let isEmpty;
|
|
238
|
+
let isFocusVisible;
|
|
239
|
+
let isFocused;
|
|
240
|
+
let isHovered;
|
|
241
|
+
let isRequired;
|
|
242
|
+
let maxInputClassName;
|
|
243
|
+
let maxLabel;
|
|
244
|
+
let maxPlaceholder;
|
|
245
|
+
let minInputClassName;
|
|
246
|
+
let minLabel;
|
|
247
|
+
let minPlaceholder;
|
|
248
|
+
let numberFieldProps;
|
|
249
|
+
let onBlur;
|
|
250
|
+
let onRangeSideChange;
|
|
251
|
+
let onRangeSideClear;
|
|
252
|
+
let rangeValue;
|
|
253
|
+
let ref;
|
|
254
|
+
if ($[0] !== t0) {
|
|
255
|
+
({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} = t0);
|
|
256
|
+
$[0] = t0;
|
|
257
|
+
$[1] = as;
|
|
258
|
+
$[2] = autoFocusOnMount;
|
|
259
|
+
$[3] = className;
|
|
260
|
+
$[4] = effectiveError;
|
|
261
|
+
$[5] = focusWithinProps;
|
|
262
|
+
$[6] = formFieldProps;
|
|
263
|
+
$[7] = headerProps;
|
|
264
|
+
$[8] = hideInnerLabels;
|
|
265
|
+
$[9] = hoverProps;
|
|
266
|
+
$[10] = inputBaseClassName;
|
|
267
|
+
$[11] = inputClassName;
|
|
268
|
+
$[12] = inputSizeClassName;
|
|
269
|
+
$[13] = isClearable;
|
|
270
|
+
$[14] = isDirty;
|
|
271
|
+
$[15] = isDisabled;
|
|
272
|
+
$[16] = isEmpty;
|
|
273
|
+
$[17] = isFocusVisible;
|
|
274
|
+
$[18] = isFocused;
|
|
275
|
+
$[19] = isHovered;
|
|
276
|
+
$[20] = isRequired;
|
|
277
|
+
$[21] = maxInputClassName;
|
|
278
|
+
$[22] = maxLabel;
|
|
279
|
+
$[23] = maxPlaceholder;
|
|
280
|
+
$[24] = minInputClassName;
|
|
281
|
+
$[25] = minLabel;
|
|
282
|
+
$[26] = minPlaceholder;
|
|
283
|
+
$[27] = numberFieldProps;
|
|
284
|
+
$[28] = onBlur;
|
|
285
|
+
$[29] = onRangeSideChange;
|
|
286
|
+
$[30] = onRangeSideClear;
|
|
287
|
+
$[31] = rangeValue;
|
|
288
|
+
$[32] = ref;
|
|
289
|
+
} else {
|
|
290
|
+
as = $[1];
|
|
291
|
+
autoFocusOnMount = $[2];
|
|
292
|
+
className = $[3];
|
|
293
|
+
effectiveError = $[4];
|
|
294
|
+
focusWithinProps = $[5];
|
|
295
|
+
formFieldProps = $[6];
|
|
296
|
+
headerProps = $[7];
|
|
297
|
+
hideInnerLabels = $[8];
|
|
298
|
+
hoverProps = $[9];
|
|
299
|
+
inputBaseClassName = $[10];
|
|
300
|
+
inputClassName = $[11];
|
|
301
|
+
inputSizeClassName = $[12];
|
|
302
|
+
isClearable = $[13];
|
|
303
|
+
isDirty = $[14];
|
|
304
|
+
isDisabled = $[15];
|
|
305
|
+
isEmpty = $[16];
|
|
306
|
+
isFocusVisible = $[17];
|
|
307
|
+
isFocused = $[18];
|
|
308
|
+
isHovered = $[19];
|
|
309
|
+
isRequired = $[20];
|
|
310
|
+
maxInputClassName = $[21];
|
|
311
|
+
maxLabel = $[22];
|
|
312
|
+
maxPlaceholder = $[23];
|
|
313
|
+
minInputClassName = $[24];
|
|
314
|
+
minLabel = $[25];
|
|
315
|
+
minPlaceholder = $[26];
|
|
316
|
+
numberFieldProps = $[27];
|
|
317
|
+
onBlur = $[28];
|
|
318
|
+
onRangeSideChange = $[29];
|
|
319
|
+
onRangeSideClear = $[30];
|
|
320
|
+
rangeValue = $[31];
|
|
321
|
+
ref = $[32];
|
|
322
|
+
}
|
|
323
|
+
const t1 = as === "inline" ? -1 : void 0;
|
|
324
|
+
let t2;
|
|
325
|
+
if ($[33] !== className) {
|
|
326
|
+
t2 = clsx("group w-full", className);
|
|
327
|
+
$[33] = className;
|
|
328
|
+
$[34] = t2;
|
|
329
|
+
} else t2 = $[34];
|
|
330
|
+
const t3 = as === "inline" ? -1 : void 0;
|
|
331
|
+
let t4;
|
|
332
|
+
if ($[35] !== inputBaseClassName || $[36] !== inputClassName) {
|
|
333
|
+
t4 = clsx(inputBaseClassName, "group/date-picker-content relative flex min-w-input-width-min-width items-center justify-between gap-2", inputClassName);
|
|
334
|
+
$[35] = inputBaseClassName;
|
|
335
|
+
$[36] = inputClassName;
|
|
336
|
+
$[37] = t4;
|
|
337
|
+
} else t4 = $[37];
|
|
338
|
+
const t5 = isHovered || void 0;
|
|
339
|
+
const t6 = isDisabled || void 0;
|
|
340
|
+
const t7 = isDisabled || void 0;
|
|
341
|
+
const t8 = !!effectiveError || void 0;
|
|
342
|
+
const t9 = isEmpty || void 0;
|
|
343
|
+
const t10 = isFocused || void 0;
|
|
344
|
+
const t11 = isFocused && isFocusVisible || void 0;
|
|
345
|
+
const t12 = !isEmpty || void 0;
|
|
346
|
+
const t13 = isDirty || void 0;
|
|
347
|
+
const t14 = isRequired || void 0;
|
|
348
|
+
const t15 = !isEmpty || void 0;
|
|
349
|
+
let t16;
|
|
350
|
+
if ($[38] !== inputSizeClassName) {
|
|
351
|
+
t16 = clsx("flex w-full items-center gap-input-gap-input-text-to-elements pr-0!", inputSizeClassName);
|
|
352
|
+
$[38] = inputSizeClassName;
|
|
353
|
+
$[39] = t16;
|
|
354
|
+
} else t16 = $[39];
|
|
355
|
+
let t17;
|
|
356
|
+
if ($[40] !== as || $[41] !== headerProps) {
|
|
357
|
+
t17 = as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
358
|
+
as,
|
|
359
|
+
...headerProps
|
|
360
|
+
});
|
|
361
|
+
$[40] = as;
|
|
362
|
+
$[41] = headerProps;
|
|
363
|
+
$[42] = t17;
|
|
364
|
+
} else t17 = $[42];
|
|
365
|
+
let t18;
|
|
366
|
+
if ($[43] !== onRangeSideChange) {
|
|
367
|
+
t18 = (nextValue) => {
|
|
368
|
+
onRangeSideChange("min", nextValue);
|
|
369
|
+
};
|
|
370
|
+
$[43] = onRangeSideChange;
|
|
371
|
+
$[44] = t18;
|
|
372
|
+
} else t18 = $[44];
|
|
373
|
+
const t19 = !!effectiveError;
|
|
374
|
+
let t20;
|
|
375
|
+
if ($[45] !== onRangeSideClear) {
|
|
376
|
+
t20 = () => {
|
|
377
|
+
onRangeSideClear("min");
|
|
378
|
+
};
|
|
379
|
+
$[45] = onRangeSideClear;
|
|
380
|
+
$[46] = t20;
|
|
381
|
+
} else t20 = $[46];
|
|
382
|
+
let t21;
|
|
383
|
+
if ($[47] !== autoFocusOnMount || $[48] !== hideInnerLabels || $[49] !== isClearable || $[50] !== isDisabled || $[51] !== isRequired || $[52] !== minInputClassName || $[53] !== minLabel || $[54] !== minPlaceholder || $[55] !== numberFieldProps || $[56] !== onBlur || $[57] !== rangeValue.min || $[58] !== t18 || $[59] !== t19 || $[60] !== t20) {
|
|
384
|
+
t21 = /* @__PURE__ */ jsx(NumberRangeValueField, {
|
|
385
|
+
...numberFieldProps,
|
|
386
|
+
label: minLabel,
|
|
387
|
+
placeholder: minPlaceholder,
|
|
388
|
+
value: rangeValue.min,
|
|
389
|
+
onChange: t18,
|
|
390
|
+
onBlur,
|
|
391
|
+
isDisabled,
|
|
392
|
+
isInvalid: t19,
|
|
393
|
+
isRequired,
|
|
394
|
+
hideInnerLabels,
|
|
395
|
+
autoFocusOnMount,
|
|
396
|
+
isClearable,
|
|
397
|
+
onClear: t20,
|
|
398
|
+
className: minInputClassName
|
|
399
|
+
});
|
|
400
|
+
$[47] = autoFocusOnMount;
|
|
401
|
+
$[48] = hideInnerLabels;
|
|
402
|
+
$[49] = isClearable;
|
|
403
|
+
$[50] = isDisabled;
|
|
404
|
+
$[51] = isRequired;
|
|
405
|
+
$[52] = minInputClassName;
|
|
406
|
+
$[53] = minLabel;
|
|
407
|
+
$[54] = minPlaceholder;
|
|
408
|
+
$[55] = numberFieldProps;
|
|
409
|
+
$[56] = onBlur;
|
|
410
|
+
$[57] = rangeValue.min;
|
|
411
|
+
$[58] = t18;
|
|
412
|
+
$[59] = t19;
|
|
413
|
+
$[60] = t20;
|
|
414
|
+
$[61] = t21;
|
|
415
|
+
} else t21 = $[61];
|
|
416
|
+
const t22 = isDisabled && "text-interactive-text-secondary-disabled";
|
|
417
|
+
let t23;
|
|
418
|
+
if ($[62] !== t22) {
|
|
419
|
+
t23 = clsx("pointer-events-none shrink-0 select-none text-label-2 text-text-default-3", t22);
|
|
420
|
+
$[62] = t22;
|
|
421
|
+
$[63] = t23;
|
|
422
|
+
} else t23 = $[63];
|
|
423
|
+
let t24;
|
|
424
|
+
if ($[64] !== t23) {
|
|
425
|
+
t24 = /* @__PURE__ */ jsx("span", {
|
|
426
|
+
className: t23,
|
|
427
|
+
children: "-"
|
|
428
|
+
});
|
|
429
|
+
$[64] = t23;
|
|
430
|
+
$[65] = t24;
|
|
431
|
+
} else t24 = $[65];
|
|
432
|
+
let t25;
|
|
433
|
+
if ($[66] !== onRangeSideChange) {
|
|
434
|
+
t25 = (nextValue_0) => {
|
|
435
|
+
onRangeSideChange("max", nextValue_0);
|
|
436
|
+
};
|
|
437
|
+
$[66] = onRangeSideChange;
|
|
438
|
+
$[67] = t25;
|
|
439
|
+
} else t25 = $[67];
|
|
440
|
+
const t26 = !!effectiveError;
|
|
441
|
+
let t27;
|
|
442
|
+
if ($[68] !== onRangeSideClear) {
|
|
443
|
+
t27 = () => {
|
|
444
|
+
onRangeSideClear("max");
|
|
445
|
+
};
|
|
446
|
+
$[68] = onRangeSideClear;
|
|
447
|
+
$[69] = t27;
|
|
448
|
+
} else t27 = $[69];
|
|
449
|
+
let t28;
|
|
450
|
+
if ($[70] !== hideInnerLabels || $[71] !== isClearable || $[72] !== isDisabled || $[73] !== isRequired || $[74] !== maxInputClassName || $[75] !== maxLabel || $[76] !== maxPlaceholder || $[77] !== numberFieldProps || $[78] !== onBlur || $[79] !== rangeValue.max || $[80] !== t25 || $[81] !== t26 || $[82] !== t27) {
|
|
451
|
+
t28 = /* @__PURE__ */ jsx(NumberRangeValueField, {
|
|
452
|
+
...numberFieldProps,
|
|
453
|
+
label: maxLabel,
|
|
454
|
+
placeholder: maxPlaceholder,
|
|
455
|
+
value: rangeValue.max,
|
|
456
|
+
onChange: t25,
|
|
457
|
+
onBlur,
|
|
458
|
+
isDisabled,
|
|
459
|
+
isInvalid: t26,
|
|
460
|
+
isRequired,
|
|
461
|
+
hideInnerLabels,
|
|
462
|
+
isClearable,
|
|
463
|
+
onClear: t27,
|
|
464
|
+
className: maxInputClassName
|
|
465
|
+
});
|
|
466
|
+
$[70] = hideInnerLabels;
|
|
467
|
+
$[71] = isClearable;
|
|
468
|
+
$[72] = isDisabled;
|
|
469
|
+
$[73] = isRequired;
|
|
470
|
+
$[74] = maxInputClassName;
|
|
471
|
+
$[75] = maxLabel;
|
|
472
|
+
$[76] = maxPlaceholder;
|
|
473
|
+
$[77] = numberFieldProps;
|
|
474
|
+
$[78] = onBlur;
|
|
475
|
+
$[79] = rangeValue.max;
|
|
476
|
+
$[80] = t25;
|
|
477
|
+
$[81] = t26;
|
|
478
|
+
$[82] = t27;
|
|
479
|
+
$[83] = t28;
|
|
480
|
+
} else t28 = $[83];
|
|
481
|
+
let t29;
|
|
482
|
+
if ($[84] !== t16 || $[85] !== t17 || $[86] !== t21 || $[87] !== t24 || $[88] !== t28) {
|
|
483
|
+
t29 = /* @__PURE__ */ jsxs("div", {
|
|
484
|
+
className: t16,
|
|
485
|
+
children: [
|
|
486
|
+
t17,
|
|
487
|
+
t21,
|
|
488
|
+
t24,
|
|
489
|
+
t28
|
|
490
|
+
]
|
|
491
|
+
});
|
|
492
|
+
$[84] = t16;
|
|
493
|
+
$[85] = t17;
|
|
494
|
+
$[86] = t21;
|
|
495
|
+
$[87] = t24;
|
|
496
|
+
$[88] = t28;
|
|
497
|
+
$[89] = t29;
|
|
498
|
+
} else t29 = $[89];
|
|
499
|
+
let t30;
|
|
500
|
+
if ($[90] !== focusWithinProps || $[91] !== hoverProps || $[92] !== t10 || $[93] !== t11 || $[94] !== t12 || $[95] !== t13 || $[96] !== t14 || $[97] !== t15 || $[98] !== t29 || $[99] !== t4 || $[100] !== t5 || $[101] !== t6 || $[102] !== t7 || $[103] !== t8 || $[104] !== t9) {
|
|
501
|
+
t30 = /* @__PURE__ */ jsx("div", {
|
|
502
|
+
className: t4,
|
|
503
|
+
"data-rac": "",
|
|
504
|
+
"data-hovered": t5,
|
|
505
|
+
"data-disabled": t6,
|
|
506
|
+
"data-is-disabled": t7,
|
|
507
|
+
"data-invalid": t8,
|
|
508
|
+
"data-is-empty": t9,
|
|
509
|
+
"data-focus-within": t10,
|
|
510
|
+
"data-focus-visible": t11,
|
|
511
|
+
"data-has-selection": t12,
|
|
512
|
+
"data-is-dirty": t13,
|
|
513
|
+
"data-is-required": t14,
|
|
514
|
+
"data-is-filled": t15,
|
|
515
|
+
...focusWithinProps,
|
|
516
|
+
...hoverProps,
|
|
517
|
+
children: t29
|
|
518
|
+
});
|
|
519
|
+
$[90] = focusWithinProps;
|
|
520
|
+
$[91] = hoverProps;
|
|
521
|
+
$[92] = t10;
|
|
522
|
+
$[93] = t11;
|
|
523
|
+
$[94] = t12;
|
|
524
|
+
$[95] = t13;
|
|
525
|
+
$[96] = t14;
|
|
526
|
+
$[97] = t15;
|
|
527
|
+
$[98] = t29;
|
|
528
|
+
$[99] = t4;
|
|
529
|
+
$[100] = t5;
|
|
530
|
+
$[101] = t6;
|
|
531
|
+
$[102] = t7;
|
|
532
|
+
$[103] = t8;
|
|
533
|
+
$[104] = t9;
|
|
534
|
+
$[105] = t30;
|
|
535
|
+
} else t30 = $[105];
|
|
536
|
+
let t31;
|
|
537
|
+
if ($[106] !== as || $[107] !== formFieldProps || $[108] !== ref || $[109] !== t2 || $[110] !== t3 || $[111] !== t30) {
|
|
538
|
+
t31 = /* @__PURE__ */ jsx(FormField, {
|
|
539
|
+
...formFieldProps,
|
|
540
|
+
ref,
|
|
541
|
+
as,
|
|
542
|
+
className: t2,
|
|
543
|
+
tabIndex: t3,
|
|
544
|
+
children: t30
|
|
545
|
+
});
|
|
546
|
+
$[106] = as;
|
|
547
|
+
$[107] = formFieldProps;
|
|
548
|
+
$[108] = ref;
|
|
549
|
+
$[109] = t2;
|
|
550
|
+
$[110] = t3;
|
|
551
|
+
$[111] = t30;
|
|
552
|
+
$[112] = t31;
|
|
553
|
+
} else t31 = $[112];
|
|
554
|
+
let t32;
|
|
555
|
+
if ($[113] !== as || $[114] !== effectiveError || $[115] !== t1 || $[116] !== t31) {
|
|
556
|
+
t32 = /* @__PURE__ */ jsx(TooltipWrapper, {
|
|
557
|
+
as,
|
|
558
|
+
error: effectiveError,
|
|
559
|
+
triggerTabIndex: t1,
|
|
560
|
+
children: t31
|
|
561
|
+
});
|
|
562
|
+
$[113] = as;
|
|
563
|
+
$[114] = effectiveError;
|
|
564
|
+
$[115] = t1;
|
|
565
|
+
$[116] = t31;
|
|
566
|
+
$[117] = t32;
|
|
567
|
+
} else t32 = $[117];
|
|
568
|
+
return t32;
|
|
569
|
+
};
|
|
570
|
+
//#endregion
|
|
571
|
+
export { NumberRangeField };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { FocusEvent, Ref } from 'react';
|
|
2
|
+
import { NumberFieldProps as AriaNumberFieldProps } from 'react-aria-components';
|
|
3
|
+
import { FieldValues } from 'react-hook-form';
|
|
4
|
+
import { FormFieldProps } from '../../FormField/FormField';
|
|
5
|
+
import { NumberRangeValue } from './NumberRangeField';
|
|
6
|
+
import { ControlProps } from '../../shared/form.types';
|
|
7
|
+
import { InputVariantProps } from '../../shared/input.cva';
|
|
8
|
+
export type { NumberRangeValue } from './NumberRangeField';
|
|
9
|
+
interface NumberRangeInputBaseProps extends FormFieldProps, InputVariantProps, Omit<AriaNumberFieldProps, "className" | "defaultValue" | "label" | "maxValue" | "minValue" | "onBlur" | "onChange" | "value"> {
|
|
10
|
+
ref?: Ref<HTMLDivElement>;
|
|
11
|
+
value?: NumberRangeValue | null;
|
|
12
|
+
minValue?: number | null;
|
|
13
|
+
maxValue?: number | null;
|
|
14
|
+
minPlaceholder?: string;
|
|
15
|
+
maxPlaceholder?: string;
|
|
16
|
+
minLabel?: string;
|
|
17
|
+
maxLabel?: string;
|
|
18
|
+
invalidRangeError?: string;
|
|
19
|
+
inputClassName?: string;
|
|
20
|
+
minInputClassName?: string;
|
|
21
|
+
maxInputClassName?: string;
|
|
22
|
+
hideInnerLabels?: boolean;
|
|
23
|
+
isDirty?: boolean;
|
|
24
|
+
isClearable?: boolean;
|
|
25
|
+
autoFocusOnMount?: boolean;
|
|
26
|
+
onChange?: (value: NumberRangeValue) => void;
|
|
27
|
+
onMinChange?: (value: number | null) => void;
|
|
28
|
+
onMaxChange?: (value: number | null) => void;
|
|
29
|
+
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
30
|
+
}
|
|
31
|
+
export type NumberRangeInputProps = NumberRangeInputBaseProps & {
|
|
32
|
+
renderStaticInput?: boolean;
|
|
33
|
+
};
|
|
34
|
+
export type ControlledNumberRangeInputProps<TFieldValues extends FieldValues> = ControlProps<NumberRangeInputProps, TFieldValues>;
|
|
35
|
+
export declare const NumberRangeInput: <TFieldValues extends FieldValues>({ renderStaticInput, ...props }: ControlledNumberRangeInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|