@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
@@ -10,6 +10,7 @@ import { InputFrame } from "../../Skeleton/InputFrame.js";
10
10
  import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
11
11
  import { useDebounceCallback } from "../../../../hooks/useDebounceCallback.js";
12
12
  import { TimePickerInput } from "../shared/TimePickerInput.js";
13
+ import { c } from "react/compiler-runtime";
13
14
  import { jsx, jsxs } from "react/jsx-runtime";
14
15
  import { clsx } from "clsx";
15
16
  import { useEffect, useRef, useState } from "react";
@@ -21,129 +22,396 @@ import { DateTime } from "luxon";
21
22
  import { useTimeFieldState } from "react-stately";
22
23
  //#region src/components/inputs/DateTime/TimePicker/TimePicker.tsx
23
24
  var TimePickerBase = (props) => {
25
+ const $ = c(129);
24
26
  const ui = UIConfig.useConfig();
25
- const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, placeholder, className, inputClassName, variant: variantProp, as: asProp, size: sizeProp, hideLabel: hideLabelProp, isClearable: isClearableProp, disableManualEntry: disableManualEntryProp, ...rest } = props;
27
+ let asProp;
28
+ let className;
29
+ let disableDropdown;
30
+ let disableManualEntryProp;
31
+ let error;
32
+ let errorClassName;
33
+ let headerClassName;
34
+ let helperText;
35
+ let hideLabelProp;
36
+ let inputClassName;
37
+ let isClearableProp;
38
+ let isDirty;
39
+ let isDisabled;
40
+ let isHeaderHidden;
41
+ let isRequired;
42
+ let label;
43
+ let onBlur;
44
+ let onChange;
45
+ let placeholder;
46
+ let ref;
47
+ let rest;
48
+ let rightContent;
49
+ let sizeProp;
50
+ let tooltipText;
51
+ let value;
52
+ let variantProp;
53
+ if ($[0] !== props) {
54
+ ({ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, placeholder, className, inputClassName, variant: variantProp, as: asProp, size: sizeProp, hideLabel: hideLabelProp, isClearable: isClearableProp, disableManualEntry: disableManualEntryProp, ...rest} = props);
55
+ $[0] = props;
56
+ $[1] = asProp;
57
+ $[2] = className;
58
+ $[3] = disableDropdown;
59
+ $[4] = disableManualEntryProp;
60
+ $[5] = error;
61
+ $[6] = errorClassName;
62
+ $[7] = headerClassName;
63
+ $[8] = helperText;
64
+ $[9] = hideLabelProp;
65
+ $[10] = inputClassName;
66
+ $[11] = isClearableProp;
67
+ $[12] = isDirty;
68
+ $[13] = isDisabled;
69
+ $[14] = isHeaderHidden;
70
+ $[15] = isRequired;
71
+ $[16] = label;
72
+ $[17] = onBlur;
73
+ $[18] = onChange;
74
+ $[19] = placeholder;
75
+ $[20] = ref;
76
+ $[21] = rest;
77
+ $[22] = rightContent;
78
+ $[23] = sizeProp;
79
+ $[24] = tooltipText;
80
+ $[25] = value;
81
+ $[26] = variantProp;
82
+ } else {
83
+ asProp = $[1];
84
+ className = $[2];
85
+ disableDropdown = $[3];
86
+ disableManualEntryProp = $[4];
87
+ error = $[5];
88
+ errorClassName = $[6];
89
+ headerClassName = $[7];
90
+ helperText = $[8];
91
+ hideLabelProp = $[9];
92
+ inputClassName = $[10];
93
+ isClearableProp = $[11];
94
+ isDirty = $[12];
95
+ isDisabled = $[13];
96
+ isHeaderHidden = $[14];
97
+ isRequired = $[15];
98
+ label = $[16];
99
+ onBlur = $[17];
100
+ onChange = $[18];
101
+ placeholder = $[19];
102
+ ref = $[20];
103
+ rest = $[21];
104
+ rightContent = $[22];
105
+ sizeProp = $[23];
106
+ tooltipText = $[24];
107
+ value = $[25];
108
+ variantProp = $[26];
109
+ }
26
110
  const variant = variantProp ?? ui.input.variant;
27
111
  const as = asProp ?? ui.input.as;
28
112
  const size = sizeProp ?? ui.input.size;
29
113
  const hideLabel = hideLabelProp ?? ui.input.hideLabel;
30
114
  const isClearable = isClearableProp ?? ui.input.isClearable;
31
115
  const disableManualEntry = disableManualEntryProp ?? ui.dateInput.disableManualEntry;
32
- const formFieldProps = {
33
- error,
34
- label,
35
- tooltipText,
36
- helperText,
37
- isRequired,
38
- rightContent,
39
- isHeaderHidden: isHeaderHidden || as === "inline" || as === "filter" || as === "floating",
40
- hideLabel,
41
- isDisabled,
42
- headerClassName,
43
- errorClassName
44
- };
116
+ const t0 = isHeaderHidden || as === "inline" || as === "filter" || as === "floating";
117
+ let t1;
118
+ if ($[27] !== error || $[28] !== errorClassName || $[29] !== headerClassName || $[30] !== helperText || $[31] !== hideLabel || $[32] !== isDisabled || $[33] !== isRequired || $[34] !== label || $[35] !== rightContent || $[36] !== t0 || $[37] !== tooltipText) {
119
+ t1 = {
120
+ error,
121
+ label,
122
+ tooltipText,
123
+ helperText,
124
+ isRequired,
125
+ rightContent,
126
+ isHeaderHidden: t0,
127
+ hideLabel,
128
+ isDisabled,
129
+ headerClassName,
130
+ errorClassName
131
+ };
132
+ $[27] = error;
133
+ $[28] = errorClassName;
134
+ $[29] = headerClassName;
135
+ $[30] = helperText;
136
+ $[31] = hideLabel;
137
+ $[32] = isDisabled;
138
+ $[33] = isRequired;
139
+ $[34] = label;
140
+ $[35] = rightContent;
141
+ $[36] = t0;
142
+ $[37] = tooltipText;
143
+ $[38] = t1;
144
+ } else t1 = $[38];
145
+ const formFieldProps = t1;
45
146
  const [isOpen, setIsOpen] = useState(false);
46
147
  const initialDateEmitRef = useRef(true);
47
148
  const { locale } = useLocale();
48
- const dialogState = useTimeFieldState({
49
- ...rest,
50
- defaultValue: value || rest.defaultValue,
51
- locale
52
- });
53
- const handleBlur = (val) => {
54
- onBlur?.({ target: { value: val } });
55
- };
56
- const { callback: debouncedBlur } = useDebounceCallback(handleBlur, { delay: 500 });
57
- const state = useTimeFieldState({
58
- ...rest,
59
- isDisabled,
60
- value,
61
- onChange: (val) => {
62
- onChange?.(val);
63
- debouncedBlur(val);
64
- },
65
- locale
66
- });
67
- useEffect(() => {
68
- if (initialDateEmitRef.current) {
69
- initialDateEmitRef.current = false;
70
- return;
71
- }
72
- if (state.timeValue) onChange?.(state.timeValue);
73
- }, [rest.date]);
149
+ const t2 = value || rest.defaultValue;
150
+ let t3;
151
+ if ($[39] !== locale || $[40] !== rest || $[41] !== t2) {
152
+ t3 = {
153
+ ...rest,
154
+ defaultValue: t2,
155
+ locale
156
+ };
157
+ $[39] = locale;
158
+ $[40] = rest;
159
+ $[41] = t2;
160
+ $[42] = t3;
161
+ } else t3 = $[42];
162
+ const dialogState = useTimeFieldState(t3);
163
+ let t4;
164
+ if ($[43] !== onBlur) {
165
+ t4 = (val) => {
166
+ onBlur?.({ target: { value: val } });
167
+ };
168
+ $[43] = onBlur;
169
+ $[44] = t4;
170
+ } else t4 = $[44];
171
+ const handleBlur = t4;
172
+ let t5;
173
+ if ($[45] === Symbol.for("react.memo_cache_sentinel")) {
174
+ t5 = { delay: 500 };
175
+ $[45] = t5;
176
+ } else t5 = $[45];
177
+ const { callback: debouncedBlur } = useDebounceCallback(handleBlur, t5);
178
+ let t6;
179
+ if ($[46] !== debouncedBlur || $[47] !== onChange) {
180
+ t6 = (val_0) => {
181
+ onChange?.(val_0);
182
+ debouncedBlur(val_0);
183
+ };
184
+ $[46] = debouncedBlur;
185
+ $[47] = onChange;
186
+ $[48] = t6;
187
+ } else t6 = $[48];
188
+ let t7;
189
+ if ($[49] !== isDisabled || $[50] !== locale || $[51] !== rest || $[52] !== t6 || $[53] !== value) {
190
+ t7 = {
191
+ ...rest,
192
+ isDisabled,
193
+ value,
194
+ onChange: t6,
195
+ locale
196
+ };
197
+ $[49] = isDisabled;
198
+ $[50] = locale;
199
+ $[51] = rest;
200
+ $[52] = t6;
201
+ $[53] = value;
202
+ $[54] = t7;
203
+ } else t7 = $[54];
204
+ const state = useTimeFieldState(t7);
205
+ let t8;
206
+ if ($[55] !== onChange || $[56] !== state.timeValue) {
207
+ t8 = () => {
208
+ if (initialDateEmitRef.current) {
209
+ initialDateEmitRef.current = false;
210
+ return;
211
+ }
212
+ if (state.timeValue) onChange?.(state.timeValue);
213
+ };
214
+ $[55] = onChange;
215
+ $[56] = state.timeValue;
216
+ $[57] = t8;
217
+ } else t8 = $[57];
218
+ let t9;
219
+ if ($[58] !== rest.date) {
220
+ t9 = [rest.date];
221
+ $[58] = rest.date;
222
+ $[59] = t9;
223
+ } else t9 = $[59];
224
+ useEffect(t8, t9);
74
225
  const timeFieldRef = useRef(null);
75
- const { labelProps, fieldProps } = useTimeField({
76
- ...rest,
77
- label,
78
- isReadOnly: disableManualEntry
79
- }, state, timeFieldRef);
80
- const headerProps = {
81
- label,
82
- tooltipText,
83
- helperText,
84
- isRequired,
85
- rightContent,
86
- isHeaderHidden: hideLabel || isHeaderHidden,
87
- isDisabled,
88
- className: headerClassName,
89
- labelProps
90
- };
91
- const onApply = () => {
92
- const newValue = dialogState.value;
93
- state.setValue(newValue);
94
- setIsOpen(false);
95
- handleBlur(newValue);
96
- };
97
- const onOpenChange = (open) => {
98
- setIsOpen(open);
99
- if (!isOpen) dialogState.setValue(state.value);
100
- };
101
- const onOpen = () => {
102
- dialogState.setValue(state.value);
103
- setIsOpen(true);
104
- };
105
- return /* @__PURE__ */ jsx(TooltipWrapper, {
106
- as,
107
- error,
108
- triggerTabIndex: as === "inline" ? -1 : void 0,
109
- children: /* @__PURE__ */ jsxs(FormField, {
226
+ let t10;
227
+ if ($[60] !== disableManualEntry || $[61] !== label || $[62] !== rest) {
228
+ t10 = {
229
+ ...rest,
230
+ label,
231
+ isReadOnly: disableManualEntry
232
+ };
233
+ $[60] = disableManualEntry;
234
+ $[61] = label;
235
+ $[62] = rest;
236
+ $[63] = t10;
237
+ } else t10 = $[63];
238
+ const { labelProps, fieldProps } = useTimeField(t10, state, timeFieldRef);
239
+ const t11 = hideLabel || isHeaderHidden;
240
+ let t12;
241
+ if ($[64] !== headerClassName || $[65] !== helperText || $[66] !== isDisabled || $[67] !== isRequired || $[68] !== label || $[69] !== labelProps || $[70] !== rightContent || $[71] !== t11 || $[72] !== tooltipText) {
242
+ t12 = {
243
+ label,
244
+ tooltipText,
245
+ helperText,
246
+ isRequired,
247
+ rightContent,
248
+ isHeaderHidden: t11,
249
+ isDisabled,
250
+ className: headerClassName,
251
+ labelProps
252
+ };
253
+ $[64] = headerClassName;
254
+ $[65] = helperText;
255
+ $[66] = isDisabled;
256
+ $[67] = isRequired;
257
+ $[68] = label;
258
+ $[69] = labelProps;
259
+ $[70] = rightContent;
260
+ $[71] = t11;
261
+ $[72] = tooltipText;
262
+ $[73] = t12;
263
+ } else t12 = $[73];
264
+ const headerProps = t12;
265
+ let t13;
266
+ if ($[74] !== dialogState.value || $[75] !== handleBlur || $[76] !== state) {
267
+ t13 = () => {
268
+ const newValue = dialogState.value;
269
+ state.setValue(newValue);
270
+ setIsOpen(false);
271
+ handleBlur(newValue);
272
+ };
273
+ $[74] = dialogState.value;
274
+ $[75] = handleBlur;
275
+ $[76] = state;
276
+ $[77] = t13;
277
+ } else t13 = $[77];
278
+ const onApply = t13;
279
+ let t14;
280
+ if ($[78] !== dialogState || $[79] !== isOpen || $[80] !== state.value) {
281
+ t14 = (open) => {
282
+ setIsOpen(open);
283
+ if (!isOpen) dialogState.setValue(state.value);
284
+ };
285
+ $[78] = dialogState;
286
+ $[79] = isOpen;
287
+ $[80] = state.value;
288
+ $[81] = t14;
289
+ } else t14 = $[81];
290
+ const onOpenChange = t14;
291
+ let t15;
292
+ if ($[82] !== dialogState || $[83] !== state.value) {
293
+ t15 = () => {
294
+ dialogState.setValue(state.value);
295
+ setIsOpen(true);
296
+ };
297
+ $[82] = dialogState;
298
+ $[83] = state.value;
299
+ $[84] = t15;
300
+ } else t15 = $[84];
301
+ const onOpen = t15;
302
+ const t16 = as === "inline" ? -1 : void 0;
303
+ let t17;
304
+ if ($[85] !== className) {
305
+ t17 = clsx("relative inline-flex w-full flex-col text-left", className);
306
+ $[85] = className;
307
+ $[86] = t17;
308
+ } else t17 = $[86];
309
+ const t18 = as === "inline" ? -1 : void 0;
310
+ let t19;
311
+ if ($[87] !== ref) {
312
+ t19 = mergeRefs(ref, timeFieldRef);
313
+ $[87] = ref;
314
+ $[88] = t19;
315
+ } else t19 = $[88];
316
+ const t20 = !!error;
317
+ let t21;
318
+ if ($[89] !== as || $[90] !== disableDropdown || $[91] !== disableManualEntry || $[92] !== fieldProps || $[93] !== headerProps || $[94] !== inputClassName || $[95] !== isClearable || $[96] !== isDirty || $[97] !== isDisabled || $[98] !== isRequired || $[99] !== onOpen || $[100] !== placeholder || $[101] !== size || $[102] !== state || $[103] !== t19 || $[104] !== t20 || $[105] !== variant) {
319
+ t21 = /* @__PURE__ */ jsx(TimePickerInput, {
320
+ ref: t19,
321
+ as,
322
+ fieldProps,
323
+ state,
324
+ onPress: onOpen,
325
+ isDisabled,
326
+ isDirty,
327
+ isRequired,
328
+ isInvalid: t20,
329
+ disableDropdown,
330
+ variant,
331
+ size,
332
+ isClearable,
333
+ headerProps,
334
+ disableManualEntry,
335
+ placeholder,
336
+ className: inputClassName
337
+ });
338
+ $[89] = as;
339
+ $[90] = disableDropdown;
340
+ $[91] = disableManualEntry;
341
+ $[92] = fieldProps;
342
+ $[93] = headerProps;
343
+ $[94] = inputClassName;
344
+ $[95] = isClearable;
345
+ $[96] = isDirty;
346
+ $[97] = isDisabled;
347
+ $[98] = isRequired;
348
+ $[99] = onOpen;
349
+ $[100] = placeholder;
350
+ $[101] = size;
351
+ $[102] = state;
352
+ $[103] = t19;
353
+ $[104] = t20;
354
+ $[105] = variant;
355
+ $[106] = t21;
356
+ } else t21 = $[106];
357
+ let t22;
358
+ if ($[107] !== dialogState || $[108] !== disableDropdown || $[109] !== disableManualEntry || $[110] !== isDisabled || $[111] !== isOpen || $[112] !== label || $[113] !== onApply || $[114] !== onOpenChange) {
359
+ t22 = (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(DateTimeDialog, {
360
+ footer: /* @__PURE__ */ jsx(DateTimeDialogFooter, {
361
+ isDisabled,
362
+ onApply,
363
+ isValid: !dialogState.isInvalid && !!dialogState.value
364
+ }),
365
+ label,
366
+ triggerRef: timeFieldRef,
367
+ isOpen,
368
+ onOpenChange,
369
+ children: /* @__PURE__ */ jsx(TimePickerForm, { state: dialogState })
370
+ });
371
+ $[107] = dialogState;
372
+ $[108] = disableDropdown;
373
+ $[109] = disableManualEntry;
374
+ $[110] = isDisabled;
375
+ $[111] = isOpen;
376
+ $[112] = label;
377
+ $[113] = onApply;
378
+ $[114] = onOpenChange;
379
+ $[115] = t22;
380
+ } else t22 = $[115];
381
+ let t23;
382
+ if ($[116] !== as || $[117] !== formFieldProps || $[118] !== labelProps || $[119] !== t17 || $[120] !== t18 || $[121] !== t21 || $[122] !== t22) {
383
+ t23 = /* @__PURE__ */ jsxs(FormField, {
110
384
  ...formFieldProps,
111
385
  as,
112
386
  labelProps,
113
- className: clsx("relative inline-flex w-full flex-col text-left", className),
114
- tabIndex: as === "inline" ? -1 : void 0,
115
- children: [/* @__PURE__ */ jsx(TimePickerInput, {
116
- ref: mergeRefs(ref, timeFieldRef),
117
- as,
118
- fieldProps,
119
- state,
120
- onPress: onOpen,
121
- isDisabled,
122
- isDirty,
123
- isRequired,
124
- isInvalid: !!error,
125
- disableDropdown,
126
- variant,
127
- size,
128
- isClearable,
129
- headerProps,
130
- disableManualEntry,
131
- placeholder,
132
- className: inputClassName
133
- }), (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(DateTimeDialog, {
134
- footer: /* @__PURE__ */ jsx(DateTimeDialogFooter, {
135
- isDisabled,
136
- onApply,
137
- isValid: !dialogState.isInvalid && !!dialogState.value
138
- }),
139
- label,
140
- triggerRef: timeFieldRef,
141
- isOpen,
142
- onOpenChange,
143
- children: /* @__PURE__ */ jsx(TimePickerForm, { state: dialogState })
144
- })]
145
- })
146
- });
387
+ className: t17,
388
+ tabIndex: t18,
389
+ children: [t21, t22]
390
+ });
391
+ $[116] = as;
392
+ $[117] = formFieldProps;
393
+ $[118] = labelProps;
394
+ $[119] = t17;
395
+ $[120] = t18;
396
+ $[121] = t21;
397
+ $[122] = t22;
398
+ $[123] = t23;
399
+ } else t23 = $[123];
400
+ let t24;
401
+ if ($[124] !== as || $[125] !== error || $[126] !== t16 || $[127] !== t23) {
402
+ t24 = /* @__PURE__ */ jsx(TooltipWrapper, {
403
+ as,
404
+ error,
405
+ triggerTabIndex: t16,
406
+ children: t23
407
+ });
408
+ $[124] = as;
409
+ $[125] = error;
410
+ $[126] = t16;
411
+ $[127] = t23;
412
+ $[128] = t24;
413
+ } else t24 = $[128];
414
+ return t24;
147
415
  };
148
416
  var TimePicker = ({ renderStaticInput, ...props }) => {
149
417
  const ui = UIConfig.useConfig();
@@ -179,16 +447,16 @@ var TimePicker = ({ renderStaticInput, ...props }) => {
179
447
  return toTime(DateTimeUtils.fromISOtoZonedDateTime(isoString, effectiveTimeZone));
180
448
  };
181
449
  if (!renderInput) {
182
- const timeValue = rawValue ? parseTimeValue(rawValue) : null;
450
+ const timeValue_0 = rawValue ? parseTimeValue(rawValue) : null;
183
451
  const as = props.as ?? ui.input.as;
184
452
  const isDisabled = isFormControlDisabled || !!props.isDisabled;
185
453
  const disableManualEntry = props.disableManualEntry ?? ui.dateInput.disableManualEntry;
186
454
  const showDropdown = !props.disableDropdown || disableManualEntry;
187
455
  const staticSegments = getStaticTimeSegments({
188
- value: timeValue,
456
+ value: timeValue_0,
189
457
  locale,
190
458
  isDisabled,
191
- hidePlaceholder: as === "floating" && !timeValue
459
+ hidePlaceholder: as === "floating" && !timeValue_0
192
460
  });
193
461
  return /* @__PURE__ */ jsx(InputFrame, {
194
462
  ...props,
@@ -198,14 +466,14 @@ var TimePicker = ({ renderStaticInput, ...props }) => {
198
466
  contentClassName: "pr-0!",
199
467
  labelPlacement: "content-row",
200
468
  dataAttributes: {
201
- dataIsEmpty: timeValue === null,
202
- dataIsFilled: timeValue !== null,
469
+ dataIsEmpty: timeValue_0 === null,
470
+ dataIsFilled: timeValue_0 !== null,
203
471
  dataIsDirty: props.isDirty,
204
472
  dataIsRequired: props.isRequired,
205
473
  dataIsDisabled: isDisabled,
206
474
  dataDisabled: isDisabled,
207
475
  dataInvalid: !!props.error,
208
- dataHasSelection: timeValue !== null
476
+ dataHasSelection: timeValue_0 !== null
209
477
  },
210
478
  renderStatic: true,
211
479
  onStaticInteract: renderRealInput,
@@ -236,7 +504,7 @@ var TimePicker = ({ renderStaticInput, ...props }) => {
236
504
  ...props,
237
505
  ref: mergeRefs(props.ref, inputRef),
238
506
  value: parseTimeValue(props.value),
239
- onChange: (value) => props.onChange?.(formatTimeValue(value))
507
+ onChange: (value_0) => props.onChange?.(formatTimeValue(value_0))
240
508
  });
241
509
  };
242
510
  //#endregion