@povio/ui 2.3.0-rc.6 → 2.3.0-rc.7
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 +97 -38
- package/dist/components/Menu/MenuPopover.js +105 -29
- package/dist/components/buttons/IconButton/IconButton.js +40 -8
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
- package/dist/components/buttons/PillButton/PillButton.js +55 -17
- 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.js +164 -34
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +8 -8
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +103 -103
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +9 -9
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +384 -116
- package/dist/components/inputs/DateTime/shared/Calendar.js +331 -137
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +283 -102
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +142 -33
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +245 -90
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
- package/dist/components/inputs/DateTime/shared/DateField.js +296 -112
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +345 -142
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +94 -21
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +81 -27
- 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.js +205 -70
- package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
- package/dist/components/inputs/File/FileUpload.js +86 -44
- package/dist/components/inputs/File/FileUploadContainer.js +15 -7
- package/dist/components/inputs/File/InputUpload.js +317 -79
- 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 -35
- package/dist/components/inputs/File/shared/InputUploadFilled.js +49 -8
- package/dist/components/inputs/File/shared/ProgressBar.js +48 -9
- package/dist/components/inputs/FormField/FormField.js +119 -37
- package/dist/components/inputs/FormField/FormFieldError.js +25 -5
- package/dist/components/inputs/FormField/FormFieldHeader.js +79 -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.js +40 -9
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +253 -82
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +541 -116
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +314 -75
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
- package/dist/components/inputs/Input/TextArea/TextArea.js +298 -89
- package/dist/components/inputs/Input/TextInput/TextInput.js +241 -81
- package/dist/components/inputs/Input/shared/InputContent.js +190 -58
- package/dist/components/inputs/Inputs/Form.js +40 -11
- package/dist/components/inputs/Inputs/InputItem.js +65 -14
- package/dist/components/inputs/Inputs/Inputs.js +37 -11
- package/dist/components/inputs/RadioGroup/RadioGroup.js +317 -106
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +2 -2
- package/dist/components/inputs/Selection/Select/QuerySelect.js +107 -27
- package/dist/components/inputs/Selection/shared/SelectBase.js +69 -20
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +390 -143
- package/dist/components/inputs/Selection/shared/SelectInput.js +334 -136
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
- package/dist/components/inputs/Selection/shared/SelectListBox.js +163 -51
- 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/StaticSelectTrailingContent.js +36 -11
- package/dist/components/inputs/Selection/shared/select.context.js +34 -34
- package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
- package/dist/components/inputs/Skeleton/InputFrame.js +472 -145
- package/dist/components/inputs/Slider/Slider.js +247 -74
- package/dist/components/inputs/TextEditor/TextEditor.js +447 -103
- 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.js +187 -41
- package/dist/components/inputs/shared/CheckContent.js +21 -10
- package/dist/components/inputs/shared/InputClear.js +78 -21
- package/dist/components/inputs/shared/TooltipWrapper.js +47 -12
- package/dist/components/inputs/shared/input.cva.js +13 -3
- package/dist/components/inputs/shared/useStaticInputHandoff.js +93 -50
- 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 +83 -27
- 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/status/Alert/Alert.js +97 -30
- package/dist/components/status/Loader/Loader.js +77 -22
- package/dist/components/status/Toast/Toast.js +21 -13
- 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 +23 -23
- 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.js +39 -8
- package/dist/config/uiStyle.context.js +15 -5
- 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.js +101 -30
- package/dist/hooks/useIntersectionObserver.js +86 -32
- package/dist/hooks/useLocalStorage.js +43 -10
- package/dist/hooks/useLongPressRepeat.js +55 -20
- package/dist/hooks/usePagination.js +49 -19
- 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/package.json +1 -1
|
@@ -6,6 +6,7 @@ import { InputFrame } from "../../Skeleton/InputFrame.js";
|
|
|
6
6
|
import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
|
|
7
7
|
import { getStaticNumberDisplayValue } from "../shared/numberStatic.utils.js";
|
|
8
8
|
import { NumberRangeField } from "./NumberRangeField.js";
|
|
9
|
+
import { c } from "react/compiler-runtime";
|
|
9
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
11
|
import { clsx } from "clsx";
|
|
11
12
|
import { useRef, useState } from "react";
|
|
@@ -25,99 +26,337 @@ var normalizeRangeValue = (value, minValue, maxValue) => {
|
|
|
25
26
|
};
|
|
26
27
|
};
|
|
27
28
|
var NumberRangeInputBase = (props) => {
|
|
29
|
+
const $ = c(114);
|
|
28
30
|
const ui = UIConfig.useConfig();
|
|
29
31
|
const inputBaseCva = UIStyle.useCva("input.baseCva", inputBase);
|
|
30
32
|
const inputSizeCva = UIStyle.useCva("input.sizeCva", inputSize);
|
|
31
|
-
|
|
33
|
+
let asProp;
|
|
34
|
+
let autoFocusOnMount;
|
|
35
|
+
let className;
|
|
36
|
+
let error;
|
|
37
|
+
let errorClassName;
|
|
38
|
+
let headerClassName;
|
|
39
|
+
let helperText;
|
|
40
|
+
let hideLabelProps;
|
|
41
|
+
let inputClassName;
|
|
42
|
+
let isClearableProps;
|
|
43
|
+
let isDirty;
|
|
44
|
+
let isDisabled;
|
|
45
|
+
let isHeaderHidden;
|
|
46
|
+
let isRequired;
|
|
47
|
+
let label;
|
|
48
|
+
let maxInputClassName;
|
|
49
|
+
let maxValue;
|
|
50
|
+
let minInputClassName;
|
|
51
|
+
let minValue;
|
|
52
|
+
let onBlur;
|
|
53
|
+
let onChange;
|
|
54
|
+
let onMaxChange;
|
|
55
|
+
let onMinChange;
|
|
56
|
+
let ref;
|
|
57
|
+
let rest;
|
|
58
|
+
let rightContent;
|
|
59
|
+
let sizeProps;
|
|
60
|
+
let t0;
|
|
61
|
+
let t1;
|
|
62
|
+
let t2;
|
|
63
|
+
let t3;
|
|
64
|
+
let t4;
|
|
65
|
+
let t5;
|
|
66
|
+
let tooltipText;
|
|
67
|
+
let value;
|
|
68
|
+
let variantProps;
|
|
69
|
+
if ($[0] !== props) {
|
|
70
|
+
({ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, className, inputClassName, minInputClassName, maxInputClassName, value, minValue, maxValue, minPlaceholder: t0, maxPlaceholder: t1, minLabel: t2, maxLabel: t3, invalidRangeError: t4, hideInnerLabels: t5, isDirty, autoFocusOnMount, onChange, onMinChange, onMaxChange, onBlur, isClearable: isClearableProps, as: asProp, variant: variantProps, size: sizeProps, hideLabel: hideLabelProps, ...rest} = props);
|
|
71
|
+
$[0] = props;
|
|
72
|
+
$[1] = asProp;
|
|
73
|
+
$[2] = autoFocusOnMount;
|
|
74
|
+
$[3] = className;
|
|
75
|
+
$[4] = error;
|
|
76
|
+
$[5] = errorClassName;
|
|
77
|
+
$[6] = headerClassName;
|
|
78
|
+
$[7] = helperText;
|
|
79
|
+
$[8] = hideLabelProps;
|
|
80
|
+
$[9] = inputClassName;
|
|
81
|
+
$[10] = isClearableProps;
|
|
82
|
+
$[11] = isDirty;
|
|
83
|
+
$[12] = isDisabled;
|
|
84
|
+
$[13] = isHeaderHidden;
|
|
85
|
+
$[14] = isRequired;
|
|
86
|
+
$[15] = label;
|
|
87
|
+
$[16] = maxInputClassName;
|
|
88
|
+
$[17] = maxValue;
|
|
89
|
+
$[18] = minInputClassName;
|
|
90
|
+
$[19] = minValue;
|
|
91
|
+
$[20] = onBlur;
|
|
92
|
+
$[21] = onChange;
|
|
93
|
+
$[22] = onMaxChange;
|
|
94
|
+
$[23] = onMinChange;
|
|
95
|
+
$[24] = ref;
|
|
96
|
+
$[25] = rest;
|
|
97
|
+
$[26] = rightContent;
|
|
98
|
+
$[27] = sizeProps;
|
|
99
|
+
$[28] = t0;
|
|
100
|
+
$[29] = t1;
|
|
101
|
+
$[30] = t2;
|
|
102
|
+
$[31] = t3;
|
|
103
|
+
$[32] = t4;
|
|
104
|
+
$[33] = t5;
|
|
105
|
+
$[34] = tooltipText;
|
|
106
|
+
$[35] = value;
|
|
107
|
+
$[36] = variantProps;
|
|
108
|
+
} else {
|
|
109
|
+
asProp = $[1];
|
|
110
|
+
autoFocusOnMount = $[2];
|
|
111
|
+
className = $[3];
|
|
112
|
+
error = $[4];
|
|
113
|
+
errorClassName = $[5];
|
|
114
|
+
headerClassName = $[6];
|
|
115
|
+
helperText = $[7];
|
|
116
|
+
hideLabelProps = $[8];
|
|
117
|
+
inputClassName = $[9];
|
|
118
|
+
isClearableProps = $[10];
|
|
119
|
+
isDirty = $[11];
|
|
120
|
+
isDisabled = $[12];
|
|
121
|
+
isHeaderHidden = $[13];
|
|
122
|
+
isRequired = $[14];
|
|
123
|
+
label = $[15];
|
|
124
|
+
maxInputClassName = $[16];
|
|
125
|
+
maxValue = $[17];
|
|
126
|
+
minInputClassName = $[18];
|
|
127
|
+
minValue = $[19];
|
|
128
|
+
onBlur = $[20];
|
|
129
|
+
onChange = $[21];
|
|
130
|
+
onMaxChange = $[22];
|
|
131
|
+
onMinChange = $[23];
|
|
132
|
+
ref = $[24];
|
|
133
|
+
rest = $[25];
|
|
134
|
+
rightContent = $[26];
|
|
135
|
+
sizeProps = $[27];
|
|
136
|
+
t0 = $[28];
|
|
137
|
+
t1 = $[29];
|
|
138
|
+
t2 = $[30];
|
|
139
|
+
t3 = $[31];
|
|
140
|
+
t4 = $[32];
|
|
141
|
+
t5 = $[33];
|
|
142
|
+
tooltipText = $[34];
|
|
143
|
+
value = $[35];
|
|
144
|
+
variantProps = $[36];
|
|
145
|
+
}
|
|
146
|
+
const minPlaceholder = t0 === void 0 ? "Min" : t0;
|
|
147
|
+
const maxPlaceholder = t1 === void 0 ? "Max" : t1;
|
|
148
|
+
const minLabel = t2 === void 0 ? "Minimum" : t2;
|
|
149
|
+
const maxLabel = t3 === void 0 ? "Maximum" : t3;
|
|
150
|
+
const invalidRangeError = t4 === void 0 ? "Minimum cannot be greater than maximum" : t4;
|
|
151
|
+
const hideInnerLabels = t5 === void 0 ? true : t5;
|
|
32
152
|
const isClearable = isClearableProps ?? ui.input.isClearable;
|
|
33
153
|
const as = asProp ?? ui.input.as;
|
|
34
154
|
const variant = variantProps ?? ui.input.variant;
|
|
35
155
|
const size = sizeProps ?? ui.input.size;
|
|
36
156
|
const hideLabel = hideLabelProps ?? ui.input.hideLabel;
|
|
37
|
-
|
|
157
|
+
let t6;
|
|
158
|
+
if ($[37] !== maxValue || $[38] !== minValue || $[39] !== value) {
|
|
159
|
+
t6 = normalizeRangeValue(value, minValue, maxValue);
|
|
160
|
+
$[37] = maxValue;
|
|
161
|
+
$[38] = minValue;
|
|
162
|
+
$[39] = value;
|
|
163
|
+
$[40] = t6;
|
|
164
|
+
} else t6 = $[40];
|
|
165
|
+
const rangeValue = t6;
|
|
38
166
|
const isEmpty = rangeValue.min === null && rangeValue.max === null;
|
|
39
167
|
const rangeError = rangeValue.min !== null && rangeValue.max !== null && rangeValue.min > rangeValue.max ? invalidRangeError : void 0;
|
|
40
168
|
const effectiveError = error || rangeError;
|
|
41
|
-
|
|
169
|
+
let t7;
|
|
170
|
+
if ($[41] !== isDisabled) {
|
|
171
|
+
t7 = { isDisabled };
|
|
172
|
+
$[41] = isDisabled;
|
|
173
|
+
$[42] = t7;
|
|
174
|
+
} else t7 = $[42];
|
|
175
|
+
const { hoverProps, isHovered } = useHover(t7);
|
|
42
176
|
const { isFocusVisible } = useFocusVisible();
|
|
43
177
|
const [isFocused, setIsFocused] = useState(false);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
isDisabled,
|
|
66
|
-
className: headerClassName
|
|
67
|
-
};
|
|
68
|
-
const updateRange = (side, nextValue) => {
|
|
69
|
-
const nextRange = {
|
|
70
|
-
...rangeValue,
|
|
71
|
-
[side]: nextValue
|
|
178
|
+
let t8;
|
|
179
|
+
if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
|
|
180
|
+
t8 = { onFocusWithinChange: setIsFocused };
|
|
181
|
+
$[43] = t8;
|
|
182
|
+
} else t8 = $[43];
|
|
183
|
+
const { focusWithinProps } = useFocusWithin(t8);
|
|
184
|
+
const t9 = isHeaderHidden || as === "inline" || as === "filter" || as === "floating";
|
|
185
|
+
let t10;
|
|
186
|
+
if ($[44] !== effectiveError || $[45] !== errorClassName || $[46] !== headerClassName || $[47] !== helperText || $[48] !== hideLabel || $[49] !== isDisabled || $[50] !== isRequired || $[51] !== label || $[52] !== rightContent || $[53] !== t9 || $[54] !== tooltipText) {
|
|
187
|
+
t10 = {
|
|
188
|
+
error: effectiveError,
|
|
189
|
+
label,
|
|
190
|
+
tooltipText,
|
|
191
|
+
helperText,
|
|
192
|
+
isRequired,
|
|
193
|
+
rightContent,
|
|
194
|
+
isHeaderHidden: t9,
|
|
195
|
+
hideLabel,
|
|
196
|
+
isDisabled,
|
|
197
|
+
headerClassName,
|
|
198
|
+
errorClassName
|
|
72
199
|
};
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
200
|
+
$[44] = effectiveError;
|
|
201
|
+
$[45] = errorClassName;
|
|
202
|
+
$[46] = headerClassName;
|
|
203
|
+
$[47] = helperText;
|
|
204
|
+
$[48] = hideLabel;
|
|
205
|
+
$[49] = isDisabled;
|
|
206
|
+
$[50] = isRequired;
|
|
207
|
+
$[51] = label;
|
|
208
|
+
$[52] = rightContent;
|
|
209
|
+
$[53] = t9;
|
|
210
|
+
$[54] = tooltipText;
|
|
211
|
+
$[55] = t10;
|
|
212
|
+
} else t10 = $[55];
|
|
213
|
+
const formFieldProps = t10;
|
|
214
|
+
const t11 = hideLabel || isHeaderHidden;
|
|
215
|
+
let t12;
|
|
216
|
+
if ($[56] !== headerClassName || $[57] !== helperText || $[58] !== isDisabled || $[59] !== isRequired || $[60] !== label || $[61] !== rightContent || $[62] !== t11 || $[63] !== tooltipText) {
|
|
217
|
+
t12 = {
|
|
218
|
+
label,
|
|
219
|
+
tooltipText,
|
|
220
|
+
helperText,
|
|
221
|
+
isRequired,
|
|
222
|
+
rightContent,
|
|
223
|
+
isHeaderHidden: t11,
|
|
224
|
+
isDisabled,
|
|
225
|
+
className: headerClassName
|
|
226
|
+
};
|
|
227
|
+
$[56] = headerClassName;
|
|
228
|
+
$[57] = helperText;
|
|
229
|
+
$[58] = isDisabled;
|
|
230
|
+
$[59] = isRequired;
|
|
231
|
+
$[60] = label;
|
|
232
|
+
$[61] = rightContent;
|
|
233
|
+
$[62] = t11;
|
|
234
|
+
$[63] = tooltipText;
|
|
235
|
+
$[64] = t12;
|
|
236
|
+
} else t12 = $[64];
|
|
237
|
+
const headerProps = t12;
|
|
238
|
+
let t13;
|
|
239
|
+
if ($[65] !== onChange || $[66] !== onMaxChange || $[67] !== onMinChange || $[68] !== rangeValue) {
|
|
240
|
+
t13 = (side, nextValue) => {
|
|
241
|
+
const nextRange = {
|
|
242
|
+
...rangeValue,
|
|
243
|
+
[side]: nextValue
|
|
244
|
+
};
|
|
245
|
+
onChange?.(nextRange);
|
|
246
|
+
if (side === "min") onMinChange?.(nextValue);
|
|
247
|
+
else onMaxChange?.(nextValue);
|
|
248
|
+
};
|
|
249
|
+
$[65] = onChange;
|
|
250
|
+
$[66] = onMaxChange;
|
|
251
|
+
$[67] = onMinChange;
|
|
252
|
+
$[68] = rangeValue;
|
|
253
|
+
$[69] = t13;
|
|
254
|
+
} else t13 = $[69];
|
|
255
|
+
const updateRange = t13;
|
|
256
|
+
let t14;
|
|
257
|
+
if ($[70] !== onBlur || $[71] !== updateRange) {
|
|
258
|
+
t14 = (side_0) => {
|
|
259
|
+
updateRange(side_0, null);
|
|
260
|
+
onBlur?.({ target: { value: "" } });
|
|
261
|
+
};
|
|
262
|
+
$[70] = onBlur;
|
|
263
|
+
$[71] = updateRange;
|
|
264
|
+
$[72] = t14;
|
|
265
|
+
} else t14 = $[72];
|
|
266
|
+
const clearRangeSide = t14;
|
|
267
|
+
let t15;
|
|
268
|
+
if ($[73] !== as || $[74] !== inputBaseCva || $[75] !== variant) {
|
|
269
|
+
t15 = inputBaseCva({
|
|
90
270
|
variant,
|
|
91
271
|
as
|
|
92
|
-
})
|
|
93
|
-
|
|
272
|
+
});
|
|
273
|
+
$[73] = as;
|
|
274
|
+
$[74] = inputBaseCva;
|
|
275
|
+
$[75] = variant;
|
|
276
|
+
$[76] = t15;
|
|
277
|
+
} else t15 = $[76];
|
|
278
|
+
let t16;
|
|
279
|
+
if ($[77] !== as || $[78] !== inputSizeCva || $[79] !== size) {
|
|
280
|
+
t16 = inputSizeCva({
|
|
94
281
|
size,
|
|
95
282
|
as
|
|
96
|
-
})
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
283
|
+
});
|
|
284
|
+
$[77] = as;
|
|
285
|
+
$[78] = inputSizeCva;
|
|
286
|
+
$[79] = size;
|
|
287
|
+
$[80] = t16;
|
|
288
|
+
} else t16 = $[80];
|
|
289
|
+
let t17;
|
|
290
|
+
if ($[81] !== as || $[82] !== autoFocusOnMount || $[83] !== className || $[84] !== clearRangeSide || $[85] !== effectiveError || $[86] !== focusWithinProps || $[87] !== formFieldProps || $[88] !== headerProps || $[89] !== hideInnerLabels || $[90] !== hoverProps || $[91] !== inputClassName || $[92] !== isClearable || $[93] !== isDirty || $[94] !== isDisabled || $[95] !== isEmpty || $[96] !== isFocusVisible || $[97] !== isFocused || $[98] !== isHovered || $[99] !== isRequired || $[100] !== maxInputClassName || $[101] !== maxLabel || $[102] !== maxPlaceholder || $[103] !== minInputClassName || $[104] !== minLabel || $[105] !== minPlaceholder || $[106] !== onBlur || $[107] !== rangeValue || $[108] !== ref || $[109] !== rest || $[110] !== t15 || $[111] !== t16 || $[112] !== updateRange) {
|
|
291
|
+
t17 = /* @__PURE__ */ jsx(NumberRangeField, {
|
|
292
|
+
...rest,
|
|
293
|
+
ref,
|
|
294
|
+
as,
|
|
295
|
+
className,
|
|
296
|
+
inputClassName,
|
|
297
|
+
minInputClassName,
|
|
298
|
+
maxInputClassName,
|
|
299
|
+
inputBaseClassName: t15,
|
|
300
|
+
inputSizeClassName: t16,
|
|
301
|
+
formFieldProps,
|
|
302
|
+
headerProps,
|
|
303
|
+
rangeValue,
|
|
304
|
+
effectiveError,
|
|
305
|
+
minPlaceholder,
|
|
306
|
+
maxPlaceholder,
|
|
307
|
+
minLabel,
|
|
308
|
+
maxLabel,
|
|
309
|
+
hideInnerLabels,
|
|
310
|
+
isDirty,
|
|
311
|
+
isClearable,
|
|
312
|
+
autoFocusOnMount,
|
|
313
|
+
isDisabled,
|
|
314
|
+
isRequired,
|
|
315
|
+
isEmpty,
|
|
316
|
+
isHovered,
|
|
317
|
+
isFocused,
|
|
318
|
+
isFocusVisible,
|
|
319
|
+
focusWithinProps,
|
|
320
|
+
hoverProps,
|
|
321
|
+
onRangeSideChange: updateRange,
|
|
322
|
+
onRangeSideClear: clearRangeSide,
|
|
323
|
+
onBlur
|
|
324
|
+
});
|
|
325
|
+
$[81] = as;
|
|
326
|
+
$[82] = autoFocusOnMount;
|
|
327
|
+
$[83] = className;
|
|
328
|
+
$[84] = clearRangeSide;
|
|
329
|
+
$[85] = effectiveError;
|
|
330
|
+
$[86] = focusWithinProps;
|
|
331
|
+
$[87] = formFieldProps;
|
|
332
|
+
$[88] = headerProps;
|
|
333
|
+
$[89] = hideInnerLabels;
|
|
334
|
+
$[90] = hoverProps;
|
|
335
|
+
$[91] = inputClassName;
|
|
336
|
+
$[92] = isClearable;
|
|
337
|
+
$[93] = isDirty;
|
|
338
|
+
$[94] = isDisabled;
|
|
339
|
+
$[95] = isEmpty;
|
|
340
|
+
$[96] = isFocusVisible;
|
|
341
|
+
$[97] = isFocused;
|
|
342
|
+
$[98] = isHovered;
|
|
343
|
+
$[99] = isRequired;
|
|
344
|
+
$[100] = maxInputClassName;
|
|
345
|
+
$[101] = maxLabel;
|
|
346
|
+
$[102] = maxPlaceholder;
|
|
347
|
+
$[103] = minInputClassName;
|
|
348
|
+
$[104] = minLabel;
|
|
349
|
+
$[105] = minPlaceholder;
|
|
350
|
+
$[106] = onBlur;
|
|
351
|
+
$[107] = rangeValue;
|
|
352
|
+
$[108] = ref;
|
|
353
|
+
$[109] = rest;
|
|
354
|
+
$[110] = t15;
|
|
355
|
+
$[111] = t16;
|
|
356
|
+
$[112] = updateRange;
|
|
357
|
+
$[113] = t17;
|
|
358
|
+
} else t17 = $[113];
|
|
359
|
+
return t17;
|
|
121
360
|
};
|
|
122
361
|
var NumberRangeInput = ({ renderStaticInput, ...props }) => {
|
|
123
362
|
const inputSizeCva = UIStyle.useCva("input.sizeCva", inputSize);
|
|
@@ -2,22 +2,61 @@ import { VisibilityIcon } from "../../../../assets/icons/Visibility.js";
|
|
|
2
2
|
import { VisibilityOffIcon } from "../../../../assets/icons/VisibilityOff.js";
|
|
3
3
|
import "../../../../config/i18n.js";
|
|
4
4
|
import { TextInput } from "../TextInput/TextInput.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
5
6
|
import { jsx } from "react/jsx-runtime";
|
|
6
7
|
import { useState } from "react";
|
|
7
8
|
import { useTranslation } from "react-i18next";
|
|
8
9
|
//#region src/components/inputs/Input/PasswordInput/PasswordInput.tsx
|
|
9
10
|
var PasswordInput = (props) => {
|
|
11
|
+
const $0 = c(15);
|
|
10
12
|
const { t } = useTranslation("ui");
|
|
11
13
|
const [isRevealed, setIsRevealed] = useState(false);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
const t0 = isRevealed ? "text" : "password";
|
|
15
|
+
const t1 = isRevealed ? VisibilityIcon : VisibilityOffIcon;
|
|
16
|
+
let t2;
|
|
17
|
+
if ($0[0] !== isRevealed) {
|
|
18
|
+
t2 = ($) => isRevealed ? $.ui.password.hide : $.ui.password.reveal;
|
|
19
|
+
$0[0] = isRevealed;
|
|
20
|
+
$0[1] = t2;
|
|
21
|
+
} else t2 = $0[1];
|
|
22
|
+
let t3;
|
|
23
|
+
if ($0[2] !== t || $0[3] !== t2) {
|
|
24
|
+
t3 = t(t2);
|
|
25
|
+
$0[2] = t;
|
|
26
|
+
$0[3] = t2;
|
|
27
|
+
$0[4] = t3;
|
|
28
|
+
} else t3 = $0[4];
|
|
29
|
+
let t4;
|
|
30
|
+
if ($0[5] !== isRevealed) {
|
|
31
|
+
t4 = () => setIsRevealed(!isRevealed);
|
|
32
|
+
$0[5] = isRevealed;
|
|
33
|
+
$0[6] = t4;
|
|
34
|
+
} else t4 = $0[6];
|
|
35
|
+
let t5;
|
|
36
|
+
if ($0[7] !== t1 || $0[8] !== t3 || $0[9] !== t4) {
|
|
37
|
+
t5 = {
|
|
38
|
+
icon: t1,
|
|
39
|
+
altText: t3,
|
|
40
|
+
onClick: t4
|
|
41
|
+
};
|
|
42
|
+
$0[7] = t1;
|
|
43
|
+
$0[8] = t3;
|
|
44
|
+
$0[9] = t4;
|
|
45
|
+
$0[10] = t5;
|
|
46
|
+
} else t5 = $0[10];
|
|
47
|
+
let t6;
|
|
48
|
+
if ($0[11] !== props || $0[12] !== t0 || $0[13] !== t5) {
|
|
49
|
+
t6 = /* @__PURE__ */ jsx(TextInput, {
|
|
50
|
+
...props,
|
|
51
|
+
type: t0,
|
|
52
|
+
action: t5
|
|
53
|
+
});
|
|
54
|
+
$0[11] = props;
|
|
55
|
+
$0[12] = t0;
|
|
56
|
+
$0[13] = t5;
|
|
57
|
+
$0[14] = t6;
|
|
58
|
+
} else t6 = $0[14];
|
|
59
|
+
return t6;
|
|
21
60
|
};
|
|
22
61
|
//#endregion
|
|
23
62
|
export { PasswordInput };
|