@povio/ui 2.3.0-rc.6 → 2.3.0-rc.8

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.
Files changed (194) hide show
  1. package/dist/assets/icons/AlignCenter.js +26 -11
  2. package/dist/assets/icons/AlignLeft.js +26 -11
  3. package/dist/assets/icons/AlignLeftRight.js +26 -11
  4. package/dist/assets/icons/AlignRight.js +26 -11
  5. package/dist/assets/icons/ArrowDropDown.js +26 -11
  6. package/dist/assets/icons/ArrowDropUp.js +26 -11
  7. package/dist/assets/icons/ArrowLeft.js +26 -11
  8. package/dist/assets/icons/ArrowRight.js +26 -11
  9. package/dist/assets/icons/Bold.js +26 -11
  10. package/dist/assets/icons/BulletedList.js +26 -11
  11. package/dist/assets/icons/Calendar.js +28 -13
  12. package/dist/assets/icons/Check.js +28 -13
  13. package/dist/assets/icons/CheckCircle.js +26 -11
  14. package/dist/assets/icons/CheckboxCheckmark.js +29 -14
  15. package/dist/assets/icons/CheckboxIndeterminate.js +29 -14
  16. package/dist/assets/icons/ChevronDown.js +28 -13
  17. package/dist/assets/icons/ChevronLeft.js +28 -13
  18. package/dist/assets/icons/ChevronRight.js +28 -13
  19. package/dist/assets/icons/ChevronUp.js +28 -13
  20. package/dist/assets/icons/ChevronsLeft.js +28 -13
  21. package/dist/assets/icons/ChevronsRight.js +28 -13
  22. package/dist/assets/icons/Clock.js +26 -11
  23. package/dist/assets/icons/Close.js +26 -11
  24. package/dist/assets/icons/DateTime.js +35 -14
  25. package/dist/assets/icons/DragIndicator.js +26 -11
  26. package/dist/assets/icons/File.js +28 -13
  27. package/dist/assets/icons/Highlight.js +26 -11
  28. package/dist/assets/icons/HighlightOn.js +49 -15
  29. package/dist/assets/icons/Home.js +26 -11
  30. package/dist/assets/icons/Info.js +37 -16
  31. package/dist/assets/icons/Italic.js +26 -11
  32. package/dist/assets/icons/Link.js +26 -11
  33. package/dist/assets/icons/Menu.js +26 -11
  34. package/dist/assets/icons/NumberedList.js +26 -11
  35. package/dist/assets/icons/PointerHorizontal.js +26 -11
  36. package/dist/assets/icons/PointerVertical.js +26 -11
  37. package/dist/assets/icons/Search.js +26 -11
  38. package/dist/assets/icons/Send.js +28 -13
  39. package/dist/assets/icons/Strikethrough.js +26 -11
  40. package/dist/assets/icons/TextColor.js +48 -14
  41. package/dist/assets/icons/Today.js +26 -11
  42. package/dist/assets/icons/Underlined.js +28 -13
  43. package/dist/assets/icons/Upload.js +35 -14
  44. package/dist/assets/icons/Visibility.js +26 -11
  45. package/dist/assets/icons/VisibilityOff.js +26 -11
  46. package/dist/assets/icons/WarningFilled.js +28 -13
  47. package/dist/components/Breadcrumbs/Breadcrumbs.js +207 -56
  48. package/dist/components/Menu/Menu.js +18 -2
  49. package/dist/components/Menu/MenuDesktop.js +41 -7
  50. package/dist/components/Menu/MenuItem.js +32 -9
  51. package/dist/components/Menu/MenuMobile.js +97 -38
  52. package/dist/components/Menu/MenuPopover.js +105 -29
  53. package/dist/components/buttons/IconButton/IconButton.js +40 -8
  54. package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
  55. package/dist/components/buttons/PillButton/PillButton.js +55 -17
  56. package/dist/components/buttons/SplitButton/SplitButton.js +103 -18
  57. package/dist/components/buttons/TextButton/TextButton.js +30 -8
  58. package/dist/components/buttons/ToggleButton/ToggleButton.js +28 -8
  59. package/dist/components/buttons/shared/ButtonContent.js +80 -22
  60. package/dist/components/inputs/Checkbox/Checkbox.js +164 -34
  61. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
  62. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +8 -8
  63. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +103 -103
  64. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +9 -9
  65. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +384 -116
  66. package/dist/components/inputs/DateTime/shared/Calendar.js +331 -137
  67. package/dist/components/inputs/DateTime/shared/CalendarCell.js +283 -102
  68. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +142 -33
  69. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +245 -90
  70. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
  71. package/dist/components/inputs/DateTime/shared/DateField.js +296 -112
  72. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +345 -142
  73. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +94 -21
  74. package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +81 -27
  75. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
  76. package/dist/components/inputs/DateTime/shared/MonthPicker.js +103 -58
  77. package/dist/components/inputs/DateTime/shared/RangeCalendar.js +193 -82
  78. package/dist/components/inputs/DateTime/shared/TimeField.js +27 -8
  79. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +279 -110
  80. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +205 -70
  81. package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
  82. package/dist/components/inputs/File/FileUpload.js +86 -44
  83. package/dist/components/inputs/File/FileUploadContainer.js +15 -7
  84. package/dist/components/inputs/File/InputUpload.js +317 -79
  85. package/dist/components/inputs/File/shared/FileCard.js +104 -41
  86. package/dist/components/inputs/File/shared/FileCardList.js +47 -12
  87. package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
  88. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
  89. package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
  90. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
  91. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
  92. package/dist/components/inputs/File/shared/InputUploadContent.js +148 -35
  93. package/dist/components/inputs/File/shared/InputUploadFilled.js +49 -8
  94. package/dist/components/inputs/File/shared/ProgressBar.js +48 -9
  95. package/dist/components/inputs/FormField/FormField.js +119 -37
  96. package/dist/components/inputs/FormField/FormFieldError.js +25 -5
  97. package/dist/components/inputs/FormField/FormFieldHeader.js +79 -22
  98. package/dist/components/inputs/FormField/FormFieldHeaderClose.js +31 -7
  99. package/dist/components/inputs/FormField/FormFieldHelper.js +26 -6
  100. package/dist/components/inputs/FormField/FormFieldLabel.js +40 -9
  101. package/dist/components/inputs/Input/NumberInput/NumberInput.js +253 -82
  102. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +541 -116
  103. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +314 -75
  104. package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
  105. package/dist/components/inputs/Input/TextArea/TextArea.js +298 -89
  106. package/dist/components/inputs/Input/TextInput/TextInput.js +241 -81
  107. package/dist/components/inputs/Input/shared/InputContent.js +190 -58
  108. package/dist/components/inputs/Inputs/Form.js +40 -11
  109. package/dist/components/inputs/Inputs/InputItem.js +65 -14
  110. package/dist/components/inputs/Inputs/Inputs.js +37 -11
  111. package/dist/components/inputs/RadioGroup/RadioGroup.js +317 -106
  112. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +2 -2
  113. package/dist/components/inputs/Selection/Select/QuerySelect.js +107 -27
  114. package/dist/components/inputs/Selection/shared/SelectBase.js +69 -20
  115. package/dist/components/inputs/Selection/shared/SelectDesktop.js +390 -143
  116. package/dist/components/inputs/Selection/shared/SelectInput.js +334 -136
  117. package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
  118. package/dist/components/inputs/Selection/shared/SelectListBox.js +163 -51
  119. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +85 -35
  120. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +69 -16
  121. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +70 -21
  122. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
  123. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +36 -11
  124. package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +1 -1
  125. package/dist/components/inputs/Selection/shared/querySelect.utils.js +1 -7
  126. package/dist/components/inputs/Selection/shared/select.context.js +34 -34
  127. package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
  128. package/dist/components/inputs/Skeleton/InputFrame.js +472 -145
  129. package/dist/components/inputs/Slider/Slider.js +247 -74
  130. package/dist/components/inputs/TextEditor/TextEditor.js +447 -103
  131. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
  132. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +102 -30
  133. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
  134. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
  135. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
  136. package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
  137. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
  138. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
  139. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
  140. package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
  141. package/dist/components/inputs/Toggle/Toggle.js +187 -41
  142. package/dist/components/inputs/shared/CheckContent.js +21 -10
  143. package/dist/components/inputs/shared/InputClear.js +78 -21
  144. package/dist/components/inputs/shared/TooltipWrapper.js +47 -12
  145. package/dist/components/inputs/shared/input.cva.js +13 -3
  146. package/dist/components/inputs/shared/useStaticInputHandoff.js +83 -55
  147. package/dist/components/navigation/Accordion/Accordion.js +69 -22
  148. package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
  149. package/dist/components/navigation/Stepper/Stepper.js +67 -22
  150. package/dist/components/navigation/Stepper/StepperItem.js +104 -31
  151. package/dist/components/navigation/Stepper/StepperSeparator.js +23 -5
  152. package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
  153. package/dist/components/overlays/BottomSheet/BottomSheet.js +96 -23
  154. package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
  155. package/dist/components/overlays/Drawer/Drawer.js +62 -20
  156. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +83 -27
  157. package/dist/components/overlays/Tooltip/Tooltip.js +137 -28
  158. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
  159. package/dist/components/segment/Segment.js +218 -57
  160. package/dist/components/segment/SegmentItem.js +67 -10
  161. package/dist/components/shared/pagination/Pagination.js +108 -22
  162. package/dist/components/shared/pagination/PaginationList.js +167 -64
  163. package/dist/components/status/Alert/Alert.js +97 -30
  164. package/dist/components/status/Loader/Loader.js +77 -22
  165. package/dist/components/status/Toast/Toast.js +21 -13
  166. package/dist/components/status/Toast/useToast.js +62 -57
  167. package/dist/components/table/ColumnConfig.js +158 -54
  168. package/dist/components/table/InfiniteTable.js +67 -16
  169. package/dist/components/table/PaginatedTable.js +84 -18
  170. package/dist/components/table/Table.js +23 -23
  171. package/dist/components/text/Link/Link.js +19 -7
  172. package/dist/components/text/Typography/Typography.js +23 -8
  173. package/dist/config/confirmation.context.js +1 -1
  174. package/dist/config/link.context.js +23 -9
  175. package/dist/config/router.context.js +42 -16
  176. package/dist/config/theme.context.js +98 -45
  177. package/dist/config/uiConfig.context.js +39 -8
  178. package/dist/config/uiStyle.context.js +15 -5
  179. package/dist/hooks/useBreakpoint.js +16 -3
  180. package/dist/hooks/useDebounceCallback.js +51 -17
  181. package/dist/hooks/useFilters.js +125 -64
  182. package/dist/hooks/useForm.js +42 -8
  183. package/dist/hooks/useFormAutosave.js +101 -30
  184. package/dist/hooks/useIntersectionObserver.js +86 -32
  185. package/dist/hooks/useLocalStorage.js +43 -10
  186. package/dist/hooks/useLongPressRepeat.js +55 -20
  187. package/dist/hooks/usePagination.js +49 -19
  188. package/dist/hooks/useQueryAutocomplete.js +1 -1
  189. package/dist/hooks/useScrollableListBox.js +37 -16
  190. package/dist/hooks/useSorting.js +69 -28
  191. package/dist/hooks/useStateAndRef.js +21 -7
  192. package/dist/hooks/useTableColumnConfig.js +124 -31
  193. package/dist/hooks/useTranslationMemo.js +25 -5
  194. 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
- const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, className, inputClassName, minInputClassName, maxInputClassName, value, minValue, maxValue, minPlaceholder = "Min", maxPlaceholder = "Max", minLabel = "Minimum", maxLabel = "Maximum", invalidRangeError = "Minimum cannot be greater than maximum", hideInnerLabels = true, isDirty, autoFocusOnMount, onChange, onMinChange, onMaxChange, onBlur, isClearable: isClearableProps, as: asProp, variant: variantProps, size: sizeProps, hideLabel: hideLabelProps, ...rest } = props;
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
- const rangeValue = normalizeRangeValue(value, minValue, maxValue);
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
- const { hoverProps, isHovered } = useHover({ isDisabled });
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
- const { focusWithinProps } = useFocusWithin({ onFocusWithinChange: setIsFocused });
45
- const formFieldProps = {
46
- error: effectiveError,
47
- label,
48
- tooltipText,
49
- helperText,
50
- isRequired,
51
- rightContent,
52
- isHeaderHidden: isHeaderHidden || as === "inline" || as === "filter" || as === "floating",
53
- hideLabel,
54
- isDisabled,
55
- headerClassName,
56
- errorClassName
57
- };
58
- const headerProps = {
59
- label,
60
- tooltipText,
61
- helperText,
62
- isRequired,
63
- rightContent,
64
- isHeaderHidden: hideLabel || isHeaderHidden,
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
- onChange?.(nextRange);
74
- if (side === "min") onMinChange?.(nextValue);
75
- else onMaxChange?.(nextValue);
76
- };
77
- const clearRangeSide = (side) => {
78
- updateRange(side, null);
79
- onBlur?.({ target: { value: "" } });
80
- };
81
- return /* @__PURE__ */ jsx(NumberRangeField, {
82
- ...rest,
83
- ref,
84
- as,
85
- className,
86
- inputClassName,
87
- minInputClassName,
88
- maxInputClassName,
89
- inputBaseClassName: inputBaseCva({
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
- inputSizeClassName: inputSizeCva({
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
- formFieldProps,
98
- headerProps,
99
- rangeValue,
100
- effectiveError,
101
- minPlaceholder,
102
- maxPlaceholder,
103
- minLabel,
104
- maxLabel,
105
- hideInnerLabels,
106
- isDirty,
107
- isClearable,
108
- autoFocusOnMount,
109
- isDisabled,
110
- isRequired,
111
- isEmpty,
112
- isHovered,
113
- isFocused,
114
- isFocusVisible,
115
- focusWithinProps,
116
- hoverProps,
117
- onRangeSideChange: updateRange,
118
- onRangeSideClear: clearRangeSide,
119
- onBlur
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
- return /* @__PURE__ */ jsx(TextInput, {
13
- ...props,
14
- type: isRevealed ? "text" : "password",
15
- action: {
16
- icon: isRevealed ? VisibilityIcon : VisibilityOffIcon,
17
- altText: t(($) => isRevealed ? $.ui.password.hide : $.ui.password.reveal),
18
- onClick: () => setIsRevealed(!isRevealed)
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 };