@povio/ui 2.3.0-rc.5 → 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.
Files changed (195) 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 +16 -12
  63. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +111 -107
  64. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +17 -13
  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 +321 -77
  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/Autocomplete.js +9 -3
  113. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +2 -2
  114. package/dist/components/inputs/Selection/Select/QuerySelect.js +107 -27
  115. package/dist/components/inputs/Selection/Select/Select.js +9 -3
  116. package/dist/components/inputs/Selection/shared/SelectBase.js +69 -20
  117. package/dist/components/inputs/Selection/shared/SelectDesktop.js +390 -143
  118. package/dist/components/inputs/Selection/shared/SelectInput.js +334 -136
  119. package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
  120. package/dist/components/inputs/Selection/shared/SelectListBox.js +163 -51
  121. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +85 -35
  122. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +69 -16
  123. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +70 -21
  124. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
  125. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +9 -0
  126. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +47 -0
  127. package/dist/components/inputs/Selection/shared/select.context.js +34 -34
  128. package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
  129. package/dist/components/inputs/Skeleton/InputFrame.d.ts +1 -0
  130. package/dist/components/inputs/Skeleton/InputFrame.js +444 -116
  131. package/dist/components/inputs/Slider/Slider.js +247 -74
  132. package/dist/components/inputs/TextEditor/TextEditor.js +447 -103
  133. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
  134. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +102 -30
  135. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
  136. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
  137. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
  138. package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
  139. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
  140. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
  141. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
  142. package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
  143. package/dist/components/inputs/Toggle/Toggle.js +187 -41
  144. package/dist/components/inputs/shared/CheckContent.js +21 -10
  145. package/dist/components/inputs/shared/InputClear.js +78 -21
  146. package/dist/components/inputs/shared/TooltipWrapper.js +47 -12
  147. package/dist/components/inputs/shared/input.cva.js +13 -3
  148. package/dist/components/inputs/shared/useStaticInputHandoff.js +97 -39
  149. package/dist/components/navigation/Accordion/Accordion.js +69 -22
  150. package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
  151. package/dist/components/navigation/Stepper/Stepper.js +67 -22
  152. package/dist/components/navigation/Stepper/StepperItem.js +104 -31
  153. package/dist/components/navigation/Stepper/StepperSeparator.js +23 -5
  154. package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
  155. package/dist/components/overlays/BottomSheet/BottomSheet.js +96 -23
  156. package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
  157. package/dist/components/overlays/Drawer/Drawer.js +62 -20
  158. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +83 -27
  159. package/dist/components/overlays/Tooltip/Tooltip.js +137 -28
  160. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
  161. package/dist/components/segment/Segment.js +218 -57
  162. package/dist/components/segment/SegmentItem.js +67 -10
  163. package/dist/components/shared/pagination/Pagination.js +108 -22
  164. package/dist/components/shared/pagination/PaginationList.js +167 -64
  165. package/dist/components/status/Alert/Alert.js +97 -30
  166. package/dist/components/status/Loader/Loader.js +77 -22
  167. package/dist/components/status/Toast/Toast.js +21 -13
  168. package/dist/components/status/Toast/useToast.js +62 -57
  169. package/dist/components/table/ColumnConfig.js +158 -54
  170. package/dist/components/table/InfiniteTable.js +67 -16
  171. package/dist/components/table/PaginatedTable.js +84 -18
  172. package/dist/components/table/Table.js +23 -23
  173. package/dist/components/text/Link/Link.js +19 -7
  174. package/dist/components/text/Typography/Typography.js +23 -8
  175. package/dist/config/confirmation.context.js +1 -1
  176. package/dist/config/link.context.js +23 -9
  177. package/dist/config/router.context.js +42 -16
  178. package/dist/config/theme.context.js +98 -45
  179. package/dist/config/uiConfig.context.js +39 -8
  180. package/dist/config/uiStyle.context.js +15 -5
  181. package/dist/hooks/useBreakpoint.js +16 -3
  182. package/dist/hooks/useDebounceCallback.js +51 -17
  183. package/dist/hooks/useFilters.js +125 -64
  184. package/dist/hooks/useForm.js +42 -8
  185. package/dist/hooks/useFormAutosave.js +101 -30
  186. package/dist/hooks/useIntersectionObserver.js +86 -32
  187. package/dist/hooks/useLocalStorage.js +43 -10
  188. package/dist/hooks/useLongPressRepeat.js +55 -20
  189. package/dist/hooks/usePagination.js +49 -19
  190. package/dist/hooks/useScrollableListBox.js +37 -16
  191. package/dist/hooks/useSorting.js +69 -28
  192. package/dist/hooks/useStateAndRef.js +21 -7
  193. package/dist/hooks/useTableColumnConfig.js +124 -31
  194. package/dist/hooks/useTranslationMemo.js +25 -5
  195. package/package.json +1 -1
@@ -3,6 +3,7 @@ import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
3
3
  import { InputClear } from "../../shared/InputClear.js";
4
4
  import { FormField } from "../../FormField/FormField.js";
5
5
  import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
6
+ import { c } from "react/compiler-runtime";
6
7
  import { jsx, jsxs } from "react/jsx-runtime";
7
8
  import { clsx } from "clsx";
8
9
  import { useEffect, useRef } from "react";
@@ -11,136 +12,560 @@ import { useFocusVisible, useNumberField } from "react-aria";
11
12
  import { mergeRefs } from "@react-aria/utils";
12
13
  import { useNumberFieldState } from "react-stately";
13
14
  //#region src/components/inputs/Input/NumberRangeInput/NumberRangeField.tsx
14
- var NumberRangeValueField = ({ label, value, placeholder, isDisabled, isInvalid, isRequired, formatOptions, hideInnerLabels, autoFocusOnMount, isClearable, className, onChange, onClear, onBlur, ...rest }) => {
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
+ }
15
67
  const ui = UIConfig.useConfig();
16
68
  const { locale } = useLocale();
17
69
  const { isFocusVisible } = useFocusVisible();
18
70
  const inputRef = useRef(null);
19
71
  const numberFieldRef = useRef(null);
20
- useEffect(() => {
21
- if (!autoFocusOnMount || isDisabled) return;
22
- requestAnimationFrame(() => inputRef.current?.focus());
23
- }, [autoFocusOnMount, isDisabled]);
24
- const numberProps = {
25
- ...rest,
26
- label,
27
- value: value ?? NaN,
28
- placeholder,
29
- isDisabled,
30
- isInvalid,
31
- isRequired,
32
- onChange,
33
- onBlur: (e) => onBlur?.({ target: e.target }),
34
- locale,
35
- formatOptions: formatOptions ?? ui.numberInput.formatOptions
36
- };
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;
37
126
  const { labelProps, inputProps } = useNumberField(numberProps, useNumberFieldState(numberProps), numberFieldRef);
38
- return /* @__PURE__ */ jsxs("div", {
39
- className: "min-w-0 flex-1",
40
- children: [/* @__PURE__ */ jsx(FormFieldLabel, {
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, {
41
137
  label,
42
138
  labelProps,
43
139
  isRequired,
44
140
  isDisabled,
45
- className: clsx(hideInnerLabels && "sr-only")
46
- }), /* @__PURE__ */ jsxs("div", {
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 && /* @__PURE__ */ jsx(InputClear, {
189
+ onClear,
190
+ show: value !== null && !isDisabled
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", {
47
201
  className: "flex items-center gap-input-gap-trailing-elements",
48
- children: [/* @__PURE__ */ jsx(Input, {
49
- ...inputProps,
50
- ref: mergeRefs(inputRef, numberFieldRef),
51
- placeholder: inputProps.placeholder,
52
- className: clsx("w-full min-w-0 bg-transparent outline-none", className),
53
- onFocus: (e) => {
54
- inputProps.onFocus?.(e);
55
- if (isFocusVisible) e.target.select();
56
- }
57
- }), isClearable && /* @__PURE__ */ jsx(InputClear, {
58
- onClear,
59
- show: value !== null && !isDisabled
60
- })]
61
- })]
62
- });
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;
63
219
  };
64
- var 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 }) => /* @__PURE__ */ jsx(TooltipWrapper, {
65
- as,
66
- error: effectiveError,
67
- triggerTabIndex: as === "inline" ? -1 : void 0,
68
- children: /* @__PURE__ */ jsx(FormField, {
69
- ...formFieldProps,
70
- ref,
71
- as,
72
- className: clsx("group w-full", className),
73
- tabIndex: as === "inline" ? -1 : void 0,
74
- children: /* @__PURE__ */ jsx("div", {
75
- className: clsx(inputBaseClassName, "group/date-picker-content relative flex min-w-input-width-min-width items-center justify-between gap-2", inputClassName),
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,
76
503
  "data-rac": "",
77
- "data-hovered": isHovered || void 0,
78
- "data-disabled": isDisabled || void 0,
79
- "data-is-disabled": isDisabled || void 0,
80
- "data-invalid": !!effectiveError || void 0,
81
- "data-is-empty": isEmpty || void 0,
82
- "data-focus-within": isFocused || void 0,
83
- "data-focus-visible": isFocused && isFocusVisible || void 0,
84
- "data-has-selection": !isEmpty || void 0,
85
- "data-is-dirty": isDirty || void 0,
86
- "data-is-required": isRequired || void 0,
87
- "data-is-filled": !isEmpty || void 0,
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,
88
515
  ...focusWithinProps,
89
516
  ...hoverProps,
90
- children: /* @__PURE__ */ jsxs("div", {
91
- className: clsx("flex w-full items-center gap-input-gap-input-text-to-elements pr-0!", inputSizeClassName),
92
- children: [
93
- as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
94
- as,
95
- ...headerProps
96
- }),
97
- /* @__PURE__ */ jsx(NumberRangeValueField, {
98
- ...numberFieldProps,
99
- label: minLabel,
100
- placeholder: minPlaceholder,
101
- value: rangeValue.min,
102
- onChange: (nextValue) => {
103
- onRangeSideChange("min", nextValue);
104
- },
105
- onBlur,
106
- isDisabled,
107
- isInvalid: !!effectiveError,
108
- isRequired,
109
- hideInnerLabels,
110
- autoFocusOnMount,
111
- isClearable,
112
- onClear: () => {
113
- onRangeSideClear("min");
114
- },
115
- className: minInputClassName
116
- }),
117
- /* @__PURE__ */ jsx("span", {
118
- className: clsx("pointer-events-none shrink-0 select-none text-label-2 text-text-default-3", isDisabled && "text-interactive-text-secondary-disabled"),
119
- children: "-"
120
- }),
121
- /* @__PURE__ */ jsx(NumberRangeValueField, {
122
- ...numberFieldProps,
123
- label: maxLabel,
124
- placeholder: maxPlaceholder,
125
- value: rangeValue.max,
126
- onChange: (nextValue) => {
127
- onRangeSideChange("max", nextValue);
128
- },
129
- onBlur,
130
- isDisabled,
131
- isInvalid: !!effectiveError,
132
- isRequired,
133
- hideInnerLabels,
134
- isClearable,
135
- onClear: () => {
136
- onRangeSideClear("max");
137
- },
138
- className: maxInputClassName
139
- })
140
- ]
141
- })
142
- })
143
- })
144
- });
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
+ };
145
570
  //#endregion
146
571
  export { NumberRangeField };