@povio/ui 3.0.0-rc.3 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -0
- package/dist/assets/icons/AlignCenter.js +11 -26
- package/dist/assets/icons/AlignLeft.js +11 -26
- package/dist/assets/icons/AlignLeftRight.js +11 -26
- package/dist/assets/icons/AlignRight.js +11 -26
- package/dist/assets/icons/ArrowDropDown.js +11 -26
- package/dist/assets/icons/ArrowDropUp.js +11 -26
- package/dist/assets/icons/ArrowLeft.js +11 -26
- package/dist/assets/icons/ArrowRight.js +11 -26
- package/dist/assets/icons/Bold.js +11 -26
- package/dist/assets/icons/BulletedList.js +11 -26
- package/dist/assets/icons/Calendar.js +13 -28
- package/dist/assets/icons/Check.js +13 -28
- package/dist/assets/icons/CheckCircle.js +11 -26
- package/dist/assets/icons/CheckboxCheckmark.js +14 -29
- package/dist/assets/icons/CheckboxIndeterminate.js +14 -29
- package/dist/assets/icons/ChevronDown.js +13 -28
- package/dist/assets/icons/ChevronLeft.js +13 -28
- package/dist/assets/icons/ChevronRight.js +13 -28
- package/dist/assets/icons/ChevronUp.js +13 -28
- package/dist/assets/icons/ChevronsLeft.js +13 -28
- package/dist/assets/icons/ChevronsRight.js +13 -28
- package/dist/assets/icons/Clock.js +11 -26
- package/dist/assets/icons/Close.js +11 -26
- package/dist/assets/icons/DateTime.js +14 -35
- package/dist/assets/icons/DragIndicator.js +11 -26
- package/dist/assets/icons/File.js +13 -28
- package/dist/assets/icons/Highlight.js +11 -26
- package/dist/assets/icons/HighlightOn.js +15 -49
- package/dist/assets/icons/Home.js +11 -26
- package/dist/assets/icons/Info.js +16 -37
- package/dist/assets/icons/Italic.js +11 -26
- package/dist/assets/icons/Link.js +11 -26
- package/dist/assets/icons/Menu.js +11 -26
- package/dist/assets/icons/NumberedList.js +11 -26
- package/dist/assets/icons/PointerHorizontal.js +11 -26
- package/dist/assets/icons/PointerVertical.js +11 -26
- package/dist/assets/icons/Search.js +11 -26
- package/dist/assets/icons/Send.js +13 -28
- package/dist/assets/icons/Strikethrough.js +11 -26
- package/dist/assets/icons/TextColor.js +14 -48
- package/dist/assets/icons/Today.js +11 -26
- package/dist/assets/icons/Underlined.js +13 -28
- package/dist/assets/icons/Upload.js +14 -35
- package/dist/assets/icons/Visibility.js +11 -26
- package/dist/assets/icons/VisibilityOff.js +11 -26
- package/dist/assets/icons/WarningFilled.js +13 -28
- package/dist/components/Breadcrumbs/Breadcrumbs.js +56 -207
- package/dist/components/Menu/Menu.d.ts +4 -0
- package/dist/components/Menu/Menu.js +2 -18
- package/dist/components/Menu/MenuDesktop.js +7 -41
- package/dist/components/Menu/MenuItem.js +9 -32
- package/dist/components/Menu/MenuMobile.d.ts +1 -1
- package/dist/components/Menu/MenuMobile.js +39 -97
- package/dist/components/Menu/MenuPopover.js +29 -105
- package/dist/components/buttons/IconButton/IconButton.js +8 -40
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +1 -2
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
- package/dist/components/buttons/PillButton/PillButton.js +17 -55
- package/dist/components/buttons/SplitButton/SplitButton.js +18 -103
- package/dist/components/buttons/TextButton/TextButton.js +8 -30
- package/dist/components/buttons/ToggleButton/ToggleButton.js +8 -28
- package/dist/components/buttons/shared/ButtonContent.js +22 -80
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +0 -1
- package/dist/components/inputs/Checkbox/Checkbox.js +35 -201
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +0 -3
- package/dist/components/inputs/Checkbox/checkbox.cva.js +1 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +5 -12
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +75 -373
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +5 -12
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +186 -492
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +5 -14
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +47 -273
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -7
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +121 -611
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +3 -5
- package/dist/components/inputs/DateTime/shared/Calendar.js +120 -338
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +2 -4
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +103 -310
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +2 -4
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +33 -150
- package/dist/components/inputs/DateTime/shared/CalendarHeader.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +98 -249
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +137 -318
- package/dist/components/inputs/DateTime/shared/DateField.js +112 -286
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +3 -14
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +129 -356
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +11 -96
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.d.ts +4 -1
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +28 -81
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +58 -103
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +82 -193
- package/dist/components/inputs/DateTime/shared/TimeField.js +8 -27
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +110 -279
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +1 -4
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +65 -210
- package/dist/components/inputs/DateTime/shared/YearPicker.js +68 -119
- package/dist/components/inputs/File/FileUpload.js +45 -88
- package/dist/components/inputs/File/FileUploadContainer.js +7 -15
- package/dist/components/inputs/File/InputUpload.js +79 -317
- package/dist/components/inputs/File/shared/FileCard.js +41 -104
- package/dist/components/inputs/File/shared/FileCardList.js +12 -47
- package/dist/components/inputs/File/shared/FileUploadContent.js +44 -175
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +46 -149
- package/dist/components/inputs/File/shared/FileUploadContentError.js +93 -234
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +97 -230
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +55 -199
- package/dist/components/inputs/File/shared/InputUploadContent.js +34 -148
- package/dist/components/inputs/File/shared/InputUploadFilled.js +8 -49
- package/dist/components/inputs/File/shared/ProgressBar.d.ts +2 -2
- package/dist/components/inputs/File/shared/ProgressBar.js +20 -53
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +1 -1
- package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -1
- package/dist/components/inputs/File/shared/progressBar.cva.d.ts +38 -0
- package/dist/components/inputs/File/shared/progressBar.cva.js +28 -0
- package/dist/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormField.js +37 -119
- package/dist/components/inputs/FormField/FormFieldError.js +5 -25
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +22 -81
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +7 -31
- package/dist/components/inputs/FormField/FormFieldHelper.js +6 -26
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +9 -40
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +2 -5
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +97 -447
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +9 -48
- package/dist/components/inputs/Input/TextArea/TextArea.js +90 -305
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +1 -3
- package/dist/components/inputs/Input/TextInput/TextInput.js +90 -419
- package/dist/components/inputs/Input/shared/InputContent.js +59 -192
- package/dist/components/inputs/Inputs/Form.js +11 -40
- package/dist/components/inputs/Inputs/InputItem.d.ts +21 -15
- package/dist/components/inputs/Inputs/InputItem.js +14 -69
- package/dist/components/inputs/Inputs/Inputs.js +11 -37
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -3
- package/dist/components/inputs/RadioGroup/RadioGroup.js +61 -353
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +0 -45
- package/dist/components/inputs/RadioGroup/radio.cva.js +1 -48
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +2 -6
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +22 -217
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +18 -3
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +8 -107
- package/dist/components/inputs/Selection/Select/Select.d.ts +3 -7
- package/dist/components/inputs/Selection/Select/Select.js +18 -227
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +3 -8
- package/dist/components/inputs/Selection/shared/SelectBase.js +18 -69
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +138 -393
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +116 -397
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +25 -99
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBox.js +52 -164
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +35 -85
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +16 -69
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +21 -70
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +9 -58
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +6 -11
- package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -3
- package/dist/components/inputs/Selection/shared/select.context.js +36 -67
- package/dist/components/inputs/Selection/shared/select.types.d.ts +2 -3
- package/dist/components/inputs/Selection/shared/useSelectItems.js +49 -109
- package/dist/components/inputs/Slider/Slider.d.ts +1 -2
- package/dist/components/inputs/Slider/Slider.js +76 -265
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +0 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +98 -447
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +11 -37
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +30 -102
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +45 -194
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +28 -88
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +14 -48
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +19 -66
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +15 -49
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +32 -92
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +54 -126
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +38 -141
- package/dist/components/inputs/Toggle/Toggle.d.ts +0 -1
- package/dist/components/inputs/Toggle/Toggle.js +37 -214
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +0 -3
- package/dist/components/inputs/Toggle/toggle.cva.js +1 -2
- package/dist/components/inputs/shared/CheckContent.d.ts +1 -2
- package/dist/components/inputs/shared/CheckContent.js +11 -21
- package/dist/components/inputs/shared/InputClear.d.ts +1 -2
- package/dist/components/inputs/shared/InputClear.js +12 -88
- package/dist/components/inputs/shared/TooltipWrapper.js +11 -50
- package/dist/components/inputs/shared/input.cva.d.ts +0 -28
- package/dist/components/inputs/shared/input.cva.js +4 -38
- package/dist/components/navigation/Accordion/Accordion.js +22 -69
- package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
- package/dist/components/navigation/Stepper/Stepper.js +22 -67
- package/dist/components/navigation/Stepper/StepperItem.js +31 -104
- package/dist/components/navigation/Stepper/StepperSeparator.js +5 -23
- package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
- package/dist/components/overlays/BottomSheet/BottomSheet.js +25 -98
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +8 -48
- package/dist/components/overlays/Drawer/Drawer.js +22 -64
- package/dist/components/overlays/Modal/modal.cva.js +1 -1
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +5 -1
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +28 -83
- package/dist/components/overlays/Tooltip/Tooltip.js +28 -137
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +12 -37
- package/dist/components/segment/Segment.js +57 -218
- package/dist/components/segment/SegmentItem.js +10 -67
- package/dist/components/shared/pagination/Pagination.js +22 -108
- package/dist/components/shared/pagination/PaginationList.js +64 -167
- package/dist/components/status/Alert/Alert.js +30 -97
- package/dist/components/status/Loader/Loader.js +22 -77
- package/dist/components/status/Toast/Toast.js +17 -22
- package/dist/components/status/Toast/toast.cva.d.ts +14 -3
- package/dist/components/status/Toast/toast.cva.js +12 -10
- package/dist/components/status/Toast/useToast.js +57 -62
- package/dist/components/table/ColumnConfig.js +54 -158
- package/dist/components/table/InfiniteTable.js +16 -67
- package/dist/components/table/PaginatedTable.js +18 -84
- package/dist/components/table/Table.js +30 -30
- package/dist/components/table/table.cva.d.ts +7 -0
- package/dist/components/table/table.cva.js +2 -1
- package/dist/components/text/Link/Link.js +7 -19
- package/dist/components/text/Pill/Pill.d.ts +15 -0
- package/dist/components/text/Pill/Pill.js +44 -0
- package/dist/components/text/Typography/Typography.js +8 -23
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +9 -23
- package/dist/config/router.context.js +16 -42
- package/dist/config/theme.context.js +45 -98
- package/dist/config/uiConfig.context.d.ts +10 -21
- package/dist/config/uiConfig.context.js +18 -69
- package/dist/config/uiOverrides.context.d.ts +10 -20
- package/dist/config/uiOverrides.context.js +14 -54
- package/dist/helpers/dynamicInputs.d.ts +5 -5
- package/dist/helpers/dynamicInputs.js +0 -3
- package/dist/hooks/useAutosave.d.ts +1 -2
- package/dist/hooks/useAutosave.js +4 -12
- package/dist/hooks/useBreakpoint.js +3 -16
- package/dist/hooks/useDebounceCallback.js +17 -51
- package/dist/hooks/useFilters.js +64 -125
- package/dist/hooks/useForm.js +8 -42
- package/dist/hooks/useFormAutosave.d.ts +1 -3
- package/dist/hooks/useFormAutosave.js +30 -122
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +24 -91
- package/dist/hooks/useLocalStorage.js +10 -43
- package/dist/hooks/useLongPressRepeat.js +20 -55
- package/dist/hooks/usePagination.js +19 -49
- package/dist/hooks/useScrollableListBox.js +16 -37
- package/dist/hooks/useSorting.js +28 -69
- package/dist/hooks/useStateAndRef.js +7 -21
- package/dist/hooks/useTableColumnConfig.js +31 -124
- package/dist/hooks/useTranslationMemo.js +5 -25
- package/dist/index.d.ts +7 -16
- package/dist/index.js +6 -13
- package/dist/tw-ui-plugin.js +0 -6
- package/dist/utils/date-time.utils.d.ts +10 -38
- package/dist/utils/date-time.utils.js +22 -136
- package/package.json +1 -1
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +0 -5
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +0 -16
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +0 -16
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +0 -32
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +0 -2
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +0 -40
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +0 -85
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +0 -1
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +0 -13
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +0 -14
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +0 -45
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +0 -571
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +0 -35
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +0 -575
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +0 -8
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +0 -5
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +0 -1
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +0 -7
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +0 -37
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -14
- package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -178
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +0 -47
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +0 -14
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +0 -43
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +0 -6
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +0 -5
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +0 -12
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +0 -8
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +0 -54
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +0 -1
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -82
- package/dist/components/inputs/Skeleton/InputFrame.js +0 -548
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +0 -8
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +0 -5
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +0 -14
- package/dist/components/inputs/shared/useStaticInputHandoff.js +0 -100
- package/dist/hooks/useAutosave.spec.d.ts +0 -1
- package/dist/hooks/useFormAutosave.spec.d.ts +0 -1
- package/dist/hooks/useKeyInteractions.d.ts +0 -20
- package/dist/hooks/useKeyInteractions.js +0 -54
- package/dist/hooks/useKeyInteractions.spec.d.ts +0 -1
- package/dist/hooks/useQueryAutocomplete.d.ts +0 -14
- package/dist/hooks/useQueryAutocomplete.js +0 -72
- package/dist/utils/query.utils.d.ts +0 -4
- package/dist/utils/query.utils.js +0 -8
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { FocusEvent, HTMLAttributes, Ref } from 'react';
|
|
2
|
-
import { NumberFieldProps as AriaNumberFieldProps } from 'react-aria-components';
|
|
3
|
-
import { FormFieldProps } from '../../FormField/FormField';
|
|
4
|
-
import { FormFieldHeaderProps } from '../../FormField/FormFieldHeader';
|
|
5
|
-
import { InputVariantProps } from '../../shared/input.cva';
|
|
6
|
-
export interface NumberRangeValue {
|
|
7
|
-
min: number | null;
|
|
8
|
-
max: number | null;
|
|
9
|
-
}
|
|
10
|
-
type NumberRangeFieldInputProps = Omit<AriaNumberFieldProps, "className" | "defaultValue" | "label" | "maxValue" | "minValue" | "onBlur" | "onChange" | "value">;
|
|
11
|
-
export interface NumberRangeFieldProps extends NumberRangeFieldInputProps {
|
|
12
|
-
ref?: Ref<HTMLDivElement>;
|
|
13
|
-
as: InputVariantProps["as"];
|
|
14
|
-
className?: string;
|
|
15
|
-
inputClassName?: string;
|
|
16
|
-
minInputClassName?: string;
|
|
17
|
-
maxInputClassName?: string;
|
|
18
|
-
inputBaseClassName: string;
|
|
19
|
-
inputSizeClassName: string;
|
|
20
|
-
formFieldProps: FormFieldProps;
|
|
21
|
-
headerProps: FormFieldHeaderProps;
|
|
22
|
-
rangeValue: NumberRangeValue;
|
|
23
|
-
effectiveError?: string;
|
|
24
|
-
minPlaceholder: string;
|
|
25
|
-
maxPlaceholder: string;
|
|
26
|
-
minLabel: string;
|
|
27
|
-
maxLabel: string;
|
|
28
|
-
hideInnerLabels?: boolean;
|
|
29
|
-
isDirty?: boolean;
|
|
30
|
-
isClearable?: boolean;
|
|
31
|
-
autoFocusOnMount?: boolean;
|
|
32
|
-
isDisabled?: boolean;
|
|
33
|
-
isRequired?: boolean;
|
|
34
|
-
isEmpty: boolean;
|
|
35
|
-
isHovered: boolean;
|
|
36
|
-
isFocused: boolean;
|
|
37
|
-
isFocusVisible: boolean;
|
|
38
|
-
focusWithinProps: HTMLAttributes<HTMLElement>;
|
|
39
|
-
hoverProps: HTMLAttributes<HTMLElement>;
|
|
40
|
-
onRangeSideChange: (side: keyof NumberRangeValue, nextValue: number | null) => void;
|
|
41
|
-
onRangeSideClear: (side: keyof NumberRangeValue) => void;
|
|
42
|
-
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
43
|
-
}
|
|
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 {};
|
|
@@ -1,571 +0,0 @@
|
|
|
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 };
|
|
@@ -1,35 +0,0 @@
|
|
|
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;
|