@povio/ui 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (301) 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 +102 -39
  52. package/dist/components/Menu/MenuPopover.js +105 -29
  53. package/dist/components/buttons/Button/button.cva.d.ts +3 -3
  54. package/dist/components/buttons/IconButton/IconButton.js +40 -8
  55. package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +2 -1
  56. package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
  57. package/dist/components/buttons/PillButton/PillButton.js +55 -17
  58. package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
  59. package/dist/components/buttons/SplitButton/SplitButton.js +103 -18
  60. package/dist/components/buttons/TextButton/TextButton.js +30 -8
  61. package/dist/components/buttons/ToggleButton/ToggleButton.js +28 -8
  62. package/dist/components/buttons/shared/ButtonContent.js +80 -22
  63. package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
  64. package/dist/components/inputs/Checkbox/Checkbox.js +201 -35
  65. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
  66. package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +3 -0
  67. package/dist/components/inputs/Checkbox/checkbox.cva.js +2 -1
  68. package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +12 -5
  69. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +380 -75
  70. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +12 -5
  71. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +499 -186
  72. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +14 -5
  73. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +280 -46
  74. package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +7 -3
  75. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +616 -121
  76. package/dist/components/inputs/DateTime/shared/Calendar.d.ts +5 -2
  77. package/dist/components/inputs/DateTime/shared/Calendar.js +342 -119
  78. package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +4 -2
  79. package/dist/components/inputs/DateTime/shared/CalendarCell.js +310 -103
  80. package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +4 -2
  81. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +150 -33
  82. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +233 -98
  83. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
  84. package/dist/components/inputs/DateTime/shared/DateField.d.ts +2 -1
  85. package/dist/components/inputs/DateTime/shared/DateField.js +288 -112
  86. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +14 -3
  87. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +359 -129
  88. package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +18 -1
  89. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +104 -11
  90. package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +83 -28
  91. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
  92. package/dist/components/inputs/DateTime/shared/MonthPicker.js +103 -58
  93. package/dist/components/inputs/DateTime/shared/RangeCalendar.js +193 -82
  94. package/dist/components/inputs/DateTime/shared/TimeField.js +27 -8
  95. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +279 -110
  96. package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +4 -1
  97. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +211 -65
  98. package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
  99. package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +5 -0
  100. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +16 -0
  101. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +16 -0
  102. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +15 -0
  103. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +32 -0
  104. package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +2 -0
  105. package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +1 -0
  106. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +41 -0
  107. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +99 -0
  108. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +1 -0
  109. package/dist/components/inputs/File/FileUpload.js +91 -46
  110. package/dist/components/inputs/File/FileUploadContainer.js +15 -7
  111. package/dist/components/inputs/File/InputUpload.js +317 -79
  112. package/dist/components/inputs/File/index.d.ts +1 -1
  113. package/dist/components/inputs/File/shared/FileCard.js +104 -41
  114. package/dist/components/inputs/File/shared/FileCardList.js +47 -12
  115. package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
  116. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
  117. package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
  118. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
  119. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
  120. package/dist/components/inputs/File/shared/InputUploadContent.js +148 -34
  121. package/dist/components/inputs/File/shared/InputUploadFilled.js +49 -8
  122. package/dist/components/inputs/File/shared/ProgressBar.js +102 -15
  123. package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +0 -11
  124. package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -18
  125. package/dist/components/inputs/FormField/FormField.d.ts +3 -3
  126. package/dist/components/inputs/FormField/FormField.js +119 -37
  127. package/dist/components/inputs/FormField/FormFieldError.js +25 -5
  128. package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
  129. package/dist/components/inputs/FormField/FormFieldHeader.js +81 -22
  130. package/dist/components/inputs/FormField/FormFieldHeaderClose.js +31 -7
  131. package/dist/components/inputs/FormField/FormFieldHelper.js +26 -6
  132. package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
  133. package/dist/components/inputs/FormField/FormFieldLabel.js +40 -9
  134. package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +13 -0
  135. package/dist/components/inputs/FormField/formFieldHeader.cva.js +14 -0
  136. package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +5 -2
  137. package/dist/components/inputs/Input/NumberInput/NumberInput.js +446 -97
  138. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +45 -0
  139. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +571 -0
  140. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +35 -0
  141. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +574 -0
  142. package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
  143. package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +8 -0
  144. package/dist/components/inputs/Input/TextArea/TextArea.cva.js +5 -0
  145. package/dist/components/inputs/Input/TextArea/TextArea.js +305 -90
  146. package/dist/components/inputs/Input/TextInput/TextInput.d.ts +3 -1
  147. package/dist/components/inputs/Input/TextInput/TextInput.js +429 -90
  148. package/dist/components/inputs/Input/shared/InputContent.js +193 -59
  149. package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +1 -0
  150. package/dist/components/inputs/Input/shared/numberStatic.utils.js +7 -0
  151. package/dist/components/inputs/Inputs/Form.js +40 -11
  152. package/dist/components/inputs/Inputs/InputItem.d.ts +15 -21
  153. package/dist/components/inputs/Inputs/InputItem.js +69 -14
  154. package/dist/components/inputs/Inputs/Inputs.js +37 -11
  155. package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +3 -1
  156. package/dist/components/inputs/RadioGroup/RadioGroup.js +353 -61
  157. package/dist/components/inputs/RadioGroup/radio.cva.d.ts +45 -0
  158. package/dist/components/inputs/RadioGroup/radio.cva.js +48 -1
  159. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +6 -2
  160. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +217 -22
  161. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -18
  162. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +107 -8
  163. package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +37 -0
  164. package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +14 -0
  165. package/dist/components/inputs/Selection/Select/QuerySelect.js +178 -0
  166. package/dist/components/inputs/Selection/Select/Select.d.ts +7 -3
  167. package/dist/components/inputs/Selection/Select/Select.js +227 -18
  168. package/dist/components/inputs/Selection/shared/SelectBase.d.ts +8 -1
  169. package/dist/components/inputs/Selection/shared/SelectBase.js +69 -18
  170. package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
  171. package/dist/components/inputs/Selection/shared/SelectDesktop.js +393 -138
  172. package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
  173. package/dist/components/inputs/Selection/shared/SelectInput.js +397 -116
  174. package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
  175. package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
  176. package/dist/components/inputs/Selection/shared/SelectListBox.js +164 -52
  177. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +85 -35
  178. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +69 -16
  179. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +70 -21
  180. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
  181. package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
  182. package/dist/components/inputs/Selection/shared/SelectMobile.js +9 -3
  183. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +9 -0
  184. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +47 -0
  185. package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +14 -0
  186. package/dist/components/inputs/Selection/shared/querySelect.utils.js +43 -0
  187. package/dist/components/inputs/Selection/shared/select.context.d.ts +3 -2
  188. package/dist/components/inputs/Selection/shared/select.context.js +67 -36
  189. package/dist/components/inputs/Selection/shared/select.types.d.ts +3 -2
  190. package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +6 -0
  191. package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +5 -0
  192. package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +12 -0
  193. package/dist/components/inputs/Selection/shared/selectInput.cva.js +8 -0
  194. package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +23 -0
  195. package/dist/components/inputs/Selection/shared/staticSelect.utils.js +54 -0
  196. package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +1 -0
  197. package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
  198. package/dist/components/inputs/Skeleton/InputFrame.d.ts +83 -0
  199. package/dist/components/inputs/Skeleton/InputFrame.js +612 -0
  200. package/dist/components/inputs/Slider/Slider.d.ts +2 -1
  201. package/dist/components/inputs/Slider/Slider.js +265 -76
  202. package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -0
  203. package/dist/components/inputs/TextEditor/TextEditor.js +447 -98
  204. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
  205. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +102 -30
  206. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
  207. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
  208. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
  209. package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
  210. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
  211. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
  212. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
  213. package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
  214. package/dist/components/inputs/Toggle/Toggle.d.ts +1 -0
  215. package/dist/components/inputs/Toggle/Toggle.js +214 -37
  216. package/dist/components/inputs/Toggle/toggle.cva.d.ts +3 -0
  217. package/dist/components/inputs/Toggle/toggle.cva.js +2 -1
  218. package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
  219. package/dist/components/inputs/shared/CheckContent.js +21 -11
  220. package/dist/components/inputs/shared/InputClear.d.ts +2 -1
  221. package/dist/components/inputs/shared/InputClear.js +88 -12
  222. package/dist/components/inputs/shared/TooltipWrapper.js +50 -11
  223. package/dist/components/inputs/shared/input.cva.d.ts +28 -0
  224. package/dist/components/inputs/shared/input.cva.js +38 -4
  225. package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +8 -0
  226. package/dist/components/inputs/shared/tooltipWrapper.cva.js +5 -0
  227. package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +15 -0
  228. package/dist/components/inputs/shared/useStaticInputHandoff.js +112 -0
  229. package/dist/components/navigation/Accordion/Accordion.js +69 -22
  230. package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
  231. package/dist/components/navigation/Stepper/Stepper.js +67 -22
  232. package/dist/components/navigation/Stepper/StepperItem.js +104 -31
  233. package/dist/components/navigation/Stepper/StepperSeparator.js +23 -5
  234. package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
  235. package/dist/components/overlays/BottomSheet/BottomSheet.js +96 -23
  236. package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
  237. package/dist/components/overlays/Drawer/Drawer.js +62 -20
  238. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +85 -28
  239. package/dist/components/overlays/Tooltip/Tooltip.js +137 -28
  240. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
  241. package/dist/components/segment/Segment.js +218 -57
  242. package/dist/components/segment/SegmentItem.js +67 -10
  243. package/dist/components/shared/pagination/Pagination.js +108 -22
  244. package/dist/components/shared/pagination/PaginationList.js +167 -64
  245. package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
  246. package/dist/components/status/Alert/Alert.js +97 -30
  247. package/dist/components/status/Loader/Loader.js +77 -22
  248. package/dist/components/status/Toast/Toast.js +28 -14
  249. package/dist/components/status/Toast/toast.cva.d.ts +1 -1
  250. package/dist/components/status/Toast/useToast.js +62 -57
  251. package/dist/components/table/ColumnConfig.js +158 -54
  252. package/dist/components/table/InfiniteTable.js +67 -16
  253. package/dist/components/table/PaginatedTable.js +84 -18
  254. package/dist/components/table/Table.js +28 -27
  255. package/dist/components/text/Link/Link.js +19 -7
  256. package/dist/components/text/Typography/Typography.js +23 -8
  257. package/dist/config/confirmation.context.js +1 -1
  258. package/dist/config/link.context.js +23 -9
  259. package/dist/config/router.context.js +42 -16
  260. package/dist/config/theme.context.js +98 -45
  261. package/dist/config/uiConfig.context.d.ts +20 -6
  262. package/dist/config/uiConfig.context.js +68 -14
  263. package/dist/config/uiOverrides.context.d.ts +30 -11
  264. package/dist/config/uiOverrides.context.js +54 -14
  265. package/dist/helpers/dynamicInputs.d.ts +12 -9
  266. package/dist/helpers/dynamicInputs.js +13 -8
  267. package/dist/hooks/useAutosave.d.ts +2 -1
  268. package/dist/hooks/useAutosave.js +12 -4
  269. package/dist/hooks/useAutosave.spec.d.ts +1 -0
  270. package/dist/hooks/useBreakpoint.js +16 -3
  271. package/dist/hooks/useDebounceCallback.js +51 -17
  272. package/dist/hooks/useFilters.js +125 -64
  273. package/dist/hooks/useForm.js +42 -8
  274. package/dist/hooks/useFormAutosave.d.ts +3 -1
  275. package/dist/hooks/useFormAutosave.js +122 -30
  276. package/dist/hooks/useFormAutosave.spec.d.ts +1 -0
  277. package/dist/hooks/useIntersectionObserver.d.ts +1 -1
  278. package/dist/hooks/useIntersectionObserver.js +91 -24
  279. package/dist/hooks/useKeyInteractions.d.ts +20 -0
  280. package/dist/hooks/useKeyInteractions.js +54 -0
  281. package/dist/hooks/useKeyInteractions.spec.d.ts +1 -0
  282. package/dist/hooks/useLocalStorage.js +43 -10
  283. package/dist/hooks/useLongPressRepeat.js +55 -20
  284. package/dist/hooks/usePagination.js +49 -19
  285. package/dist/hooks/useQueryAutocomplete.d.ts +14 -0
  286. package/dist/hooks/useQueryAutocomplete.js +72 -0
  287. package/dist/hooks/useScrollableListBox.js +37 -16
  288. package/dist/hooks/useSorting.js +69 -28
  289. package/dist/hooks/useStateAndRef.js +21 -7
  290. package/dist/hooks/useTableColumnConfig.js +124 -31
  291. package/dist/hooks/useTranslationMemo.js +25 -5
  292. package/dist/index.d.ts +18 -3
  293. package/dist/index.js +15 -5
  294. package/dist/tw-ui-plugin.js +6 -0
  295. package/dist/utils/date-time.utils.d.ts +38 -10
  296. package/dist/utils/date-time.utils.js +136 -22
  297. package/dist/utils/query.utils.d.ts +4 -0
  298. package/dist/utils/query.utils.js +8 -0
  299. package/dist/utils/zod.utils.d.ts +2 -0
  300. package/dist/utils/zod.utils.js +5 -0
  301. package/package.json +2 -2
@@ -1,32 +1,41 @@
1
- import { Ref } from 'react';
1
+ import { FocusEvent, Ref } from 'react';
2
2
  import { DateValue } from 'react-aria';
3
3
  import { FieldValues } from 'react-hook-form';
4
4
  import { DatePickerStateOptions } from 'react-stately';
5
5
  import { DatePickerInputHandle } from '../shared/DatePickerInput';
6
+ import { DatePickerTodayIcon, DatePickerTodayIconButtonComponent, DatePickerTodayIconButtonSize, DatePickerTodayIconPlacement } from '../shared/datePicker.types';
6
7
  import { FormFieldProps } from '../../FormField/FormField';
7
8
  import { ControlProps } from '../../shared/form.types';
8
9
  import { InputVariantProps } from '../../shared/input.cva';
9
- interface DateTimePickerBaseProps extends FormFieldProps, InputVariantProps, Omit<DatePickerStateOptions<DateValue>, "granularity" | "shouldCloseOnSelect" | "label"> {
10
+ interface DateTimePickerBaseProps extends FormFieldProps, InputVariantProps, Omit<DatePickerStateOptions<DateValue>, "granularity" | "shouldCloseOnSelect" | "label" | "onBlur"> {
10
11
  ref?: Ref<DatePickerInputHandle & HTMLDivElement>;
11
12
  disableDropdown?: boolean;
12
13
  isTimeOptional?: boolean;
13
14
  isClearable?: boolean;
14
- todayIcon?: boolean;
15
+ todayIcon?: DatePickerTodayIcon;
16
+ todayIconButtonSize?: DatePickerTodayIconButtonSize;
17
+ todayIconButtonComponent?: DatePickerTodayIconButtonComponent;
18
+ todayIconPlacement?: DatePickerTodayIconPlacement;
15
19
  isDirty?: boolean;
16
20
  disableManualEntry?: boolean;
21
+ autoFixYear?: boolean;
22
+ setDateValueOnDateSelection?: boolean;
17
23
  placeholder?: string;
18
24
  inputClassName?: string;
25
+ shouldShrinkInput?: boolean;
19
26
  shouldUpdateDateOnMonthYearChange?: boolean;
20
27
  timeZone?: string;
21
- autoFixYear?: boolean;
22
28
  format?: string;
29
+ onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
30
+ fireBlurOnChange?: boolean;
23
31
  }
24
32
  export interface DateTimePickerProps extends Omit<DateTimePickerBaseProps, "value" | "onChange"> {
25
33
  value?: string | null;
26
34
  onChange?: (value: string | null) => void;
27
35
  fullIso?: boolean;
36
+ renderStaticInput?: boolean;
28
37
  timeZone?: string;
29
38
  }
30
39
  export type ControlledDateTimePickerProps<TFieldValues extends FieldValues> = ControlProps<DateTimePickerProps, TFieldValues>;
31
- export declare const DateTimePicker: <TFieldValues extends FieldValues>({ fullIso, ...props }: ControlledDateTimePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
40
+ export declare const DateTimePicker: <TFieldValues extends FieldValues>({ fullIso, renderStaticInput, ...props }: ControlledDateTimePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
32
41
  export {};
@@ -1,24 +1,49 @@
1
+ import { UIOverrides } from "../../../../config/uiOverrides.context.js";
1
2
  import { UIConfig } from "../../../../config/uiConfig.context.js";
2
3
  import { Calendar } from "../shared/Calendar.js";
3
4
  import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
5
+ import { datePickerInputContentRowDefinition } from "../shared/datePickerInput.cva.js";
6
+ import { renderDatePickerTodayIcon } from "../shared/datePickerTodayIcon.js";
4
7
  import { DatePickerInput } from "../shared/DatePickerInput.js";
5
8
  import { DateTimeDialog } from "../shared/DateTimeDialog.js";
6
9
  import { DateTimeDialogFooter } from "../shared/DateTimeDialogFooter.js";
10
+ import { getStaticCalendarDateTimeSegments, getStaticDateTimeFocusTarget } from "../shared/staticDateTimeSegments.js";
7
11
  import { FormField } from "../../FormField/FormField.js";
8
12
  import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
13
+ import { InputFrame } from "../../Skeleton/InputFrame.js";
14
+ import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
15
+ import { useDebounceCallback } from "../../../../hooks/useDebounceCallback.js";
16
+ import { c } from "react/compiler-runtime";
9
17
  import { jsx, jsxs } from "react/jsx-runtime";
10
- import { useEffect, useImperativeHandle, useMemo, useRef } from "react";
18
+ import { clsx } from "clsx";
19
+ import { useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
11
20
  import { useDatePicker, useLocale } from "react-aria";
12
21
  import { mergeRefs } from "@react-aria/utils";
13
22
  import { Controller } from "react-hook-form";
14
- import { Time, createCalendar, getLocalTimeZone, now, toCalendarDateTime, today } from "@internationalized/date";
23
+ import { Time, createCalendar, getLocalTimeZone, toCalendarDate, toCalendarDateTime, today } from "@internationalized/date";
15
24
  import { useCalendarState, useDatePickerState } from "react-stately";
16
25
  //#region src/components/inputs/DateTime/DateTimePicker/DateTimePicker.tsx
17
26
  var DateTimePickerBase = (props) => {
18
27
  const ui = UIConfig.useConfig();
19
- const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, value, disableDropdown, isTimeOptional, placeholder, inputClassName, hideLabel = ui.input.hideLabel, variant = ui.input.variant, as = ui.input.as, size = ui.input.size, isClearable = ui.input.isClearable, todayIcon = ui.dateInput.todayIcon, shouldForceLeadingZeros = ui.dateInput.shouldForceLeadingZeros, disableManualEntry = ui.dateInput.disableManualEntry, shouldUpdateDateOnMonthYearChange = ui.dateInput.shouldUpdateDateOnMonthYearChange, timeZone, autoFixYear = ui.dateInput.autoFixYear, format, ...rest } = props;
28
+ const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, isTimeOptional, placeholder, inputClassName, shouldShrinkInput, hideLabel: hideLabelProp, variant: variantProp, as: asProp, size: sizeProp, isClearable: isClearableProp, todayIcon: todayIconProp, todayIconButtonSize: todayIconButtonSizeProp, todayIconButtonComponent: todayIconButtonComponentProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, shouldUpdateDateOnMonthYearChange: shouldUpdateDateOnMonthYearChangeProp, timeZone: timeZoneProp, autoFixYear: autoFixYearProp, fireBlurOnChange: fireBlurOnChangeProp, format, setDateValueOnDateSelection: setDateValueOnDateSelectionProp, ...rest } = props;
29
+ const hideLabel = hideLabelProp ?? ui.input.hideLabel;
30
+ const variant = variantProp ?? ui.input.variant;
31
+ const as = asProp ?? ui.input.as;
32
+ const size = sizeProp ?? ui.input.size;
33
+ const isClearable = isClearableProp ?? ui.input.isClearable;
34
+ const todayIcon = todayIconProp ?? ui.dateInput.todayIcon;
35
+ const todayIconButtonSize = todayIconButtonSizeProp ?? ui.dateInput.todayIconButtonSize;
36
+ const todayIconButtonComponent = todayIconButtonComponentProp ?? ui.dateInput.todayIconButtonComponent;
37
+ const todayIconPlacement = todayIconPlacementProp ?? ui.dateInput.todayIconPlacement;
38
+ const shouldForceLeadingZeros = shouldForceLeadingZerosProp ?? ui.dateInput.shouldForceLeadingZeros;
39
+ const disableManualEntry = disableManualEntryProp ?? ui.dateInput.disableManualEntry;
40
+ const shouldUpdateDateOnMonthYearChange = shouldUpdateDateOnMonthYearChangeProp ?? ui.dateInput.shouldUpdateDateOnMonthYearChange;
41
+ const autoFixYear = autoFixYearProp ?? ui.dateInput.autoFixYear;
42
+ const fireBlurOnChange = fireBlurOnChangeProp ?? ui.dateInput.fireBlurOnChange;
43
+ const setDateValueOnDateSelection = setDateValueOnDateSelectionProp ?? ui.dateInput.setDateValueOnDateSelection;
44
+ const timeZone = timeZoneProp ?? ui.dateInput.timeZone;
20
45
  let effectiveTimeZone = getLocalTimeZone();
21
- if (timeZone) effectiveTimeZone = timeZone;
46
+ if (timeZone !== "clientLocal") effectiveTimeZone = timeZone;
22
47
  const formFieldProps = {
23
48
  error,
24
49
  label,
@@ -36,12 +61,20 @@ var DateTimePickerBase = (props) => {
36
61
  const datePickerRef = useMemo(() => ({ get current() {
37
62
  return datePickerInputRef.current?.getContainer?.() || null;
38
63
  } }), []);
39
- useImperativeHandle(ref, () => ({ clear: () => {
40
- datePickerInputRef.current?.clear();
41
- } }));
64
+ useImperativeHandle(ref, () => ({
65
+ clear: () => {
66
+ datePickerInputRef.current?.clear();
67
+ },
68
+ getContainer: () => datePickerInputRef.current?.getContainer?.() ?? null
69
+ }));
70
+ const handleBlur = (val) => {
71
+ onBlur?.({ target: { value: val } });
72
+ };
73
+ const { callback: debouncedBlur } = useDebounceCallback(handleBlur, { delay: 500 });
74
+ const normalizedValue = value ?? null;
42
75
  const dialogState = useDatePickerState({
43
76
  ...rest,
44
- defaultValue: value || rest.defaultValue,
77
+ defaultValue: normalizedValue ?? rest.defaultValue ?? null,
45
78
  shouldCloseOnSelect: false,
46
79
  granularity: "minute",
47
80
  hideTimeZone: true,
@@ -53,11 +86,12 @@ var DateTimePickerBase = (props) => {
53
86
  const state = useDatePickerState({
54
87
  ...rest,
55
88
  shouldForceLeadingZeros,
56
- value,
57
- onChange: (val) => {
58
- onChange?.(val);
59
- dialogState.setValue(val);
60
- calendarState.setFocusedDate(val || today(effectiveTimeZone));
89
+ value: normalizedValue,
90
+ onChange: (val_0) => {
91
+ onChange?.(val_0);
92
+ dialogState.setValue(val_0);
93
+ calendarState.setFocusedDate(val_0 || today(effectiveTimeZone));
94
+ if (fireBlurOnChange) debouncedBlur(val_0);
61
95
  },
62
96
  shouldCloseOnSelect: false,
63
97
  granularity: "minute",
@@ -93,8 +127,10 @@ var DateTimePickerBase = (props) => {
93
127
  labelProps
94
128
  };
95
129
  const onApply = () => {
96
- state.setValue(dialogState.value);
130
+ const newValue = dialogState.value;
131
+ state.setValue(newValue);
97
132
  state.toggle();
133
+ if (fireBlurOnChange) handleBlur(newValue);
98
134
  };
99
135
  const onMonthYearChange = (selectedDate) => {
100
136
  if (!shouldUpdateDateOnMonthYearChange) return;
@@ -112,8 +148,14 @@ var DateTimePickerBase = (props) => {
112
148
  calendarState.setFocusedDate(selectedDate);
113
149
  };
114
150
  const onTodayPress = () => {
115
- dialogState.setValue(toCalendarDateTime(now(effectiveTimeZone)));
116
- calendarState.setFocusedDate(today(effectiveTimeZone));
151
+ const currentValue = DateTimeUtils.getCurrentWallClockCalendarDateTime();
152
+ dialogState.setValue(currentValue);
153
+ calendarState.setFocusedDate(toCalendarDate(currentValue));
154
+ };
155
+ const onInputClear = () => {
156
+ onChange?.(null);
157
+ dialogState.setValue(null);
158
+ if (fireBlurOnChange) handleBlur(null);
117
159
  };
118
160
  const onOpenChange = (isOpen) => {
119
161
  state.toggle();
@@ -126,7 +168,7 @@ var DateTimePickerBase = (props) => {
126
168
  dialogState.setValue(state.value);
127
169
  return;
128
170
  }
129
- const textValue = e.currentTarget.textContent;
171
+ const textValue = e?.currentTarget?.textContent ?? null;
130
172
  const dateTimeValue = DateTimeUtils.formatTextDateToCalendarDateTime(textValue, effectiveTimeZone, locale);
131
173
  if (dateTimeValue) {
132
174
  state.setValue(dateTimeValue);
@@ -150,11 +192,15 @@ var DateTimePickerBase = (props) => {
150
192
  groupProps,
151
193
  fieldProps: {
152
194
  ...fieldProps,
153
- onBlur: (e) => {
154
- fieldProps.onBlur?.(e);
155
- onInputBlur(e);
195
+ onBlur: (e_0) => {
196
+ fieldProps.onBlur?.(e_0);
197
+ handleBlur(state.value);
198
+ onInputBlur(e_0);
156
199
  }
157
200
  },
201
+ fieldValue: normalizedValue,
202
+ isValueControlled: true,
203
+ hasValue: normalizedValue != null,
158
204
  buttonProps,
159
205
  isDirty,
160
206
  isDisabled,
@@ -163,18 +209,24 @@ var DateTimePickerBase = (props) => {
163
209
  variant,
164
210
  size,
165
211
  isDateTime: true,
212
+ shouldShrinkInput,
166
213
  isClearable,
167
214
  headerProps,
168
215
  todayIcon,
216
+ todayIconButtonSize,
217
+ todayIconButtonComponent,
218
+ todayIconPlacement,
169
219
  isRequired,
170
220
  disableManualEntry,
221
+ autoFixYear,
171
222
  placeholder,
172
223
  onOpenDropdown: () => state.toggle(),
173
224
  className: inputClassName,
174
225
  timeZone: effectiveTimeZone,
175
- autoFixYear,
176
226
  isTimeOptional,
177
- format
227
+ format,
228
+ fireBlurOnChange,
229
+ onClear: onInputClear
178
230
  }), (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(DateTimeDialog, {
179
231
  footer: /* @__PURE__ */ jsx(DateTimeDialogFooter, {
180
232
  isDisabled,
@@ -195,46 +247,228 @@ var DateTimePickerBase = (props) => {
195
247
  onApply,
196
248
  onMonthYearChange,
197
249
  granularity: "day",
250
+ setDateValueOnDateSelection,
198
251
  isTimeOptional
199
252
  })
200
253
  })]
201
254
  })
202
255
  });
203
256
  };
204
- var DateTimePicker = ({ fullIso = true, ...props }) => {
257
+ var DateTimePickerInner = (t0) => {
258
+ const $ = c(9);
259
+ const { fullIso: t1, renderStaticInput, isFormControlDisabled, ...props } = t0;
260
+ const ui = UIConfig.useConfig();
261
+ const datePickerInputContentRowCva = UIOverrides.useCva("datePickerInput.contentRowCva", datePickerInputContentRowDefinition);
262
+ const { locale } = useLocale();
263
+ const shouldForceLeadingZeros = props.shouldForceLeadingZeros ?? ui.dateInput.shouldForceLeadingZeros;
264
+ const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.renderStaticInput));
265
+ const inputRef = useRef(null);
266
+ const { renderRealInput, replayStaticInputPress } = useStaticInputHandoff({
267
+ inputRef,
268
+ renderInput,
269
+ setRenderInput,
270
+ getFocusTarget: _temp,
271
+ getPressTarget: _temp2
272
+ });
273
+ const normalizedValue = props.value ?? null;
274
+ const timeZone = props.timeZone ?? ui.dateInput.timeZone;
205
275
  let effectiveTimeZone = getLocalTimeZone();
206
- if (props.timeZone) effectiveTimeZone = props.timeZone;
276
+ if (timeZone !== "clientLocal") effectiveTimeZone = timeZone;
207
277
  const formatDateValue = (dateValue) => {
208
278
  if (dateValue === null) return null;
209
- if (fullIso) return DateTimeUtils.fromDateValueToISO(dateValue, effectiveTimeZone);
210
279
  return DateTimeUtils.fromDateValueToISO(dateValue, effectiveTimeZone);
211
280
  };
212
281
  const parseDateValue = (isoString) => {
213
- if (isoString == null) return isoString;
282
+ if (isoString == null) return null;
214
283
  return DateTimeUtils.fromUTCISOToCalendarDateTime(isoString, effectiveTimeZone);
215
284
  };
216
- if ("formControl" in props && props.formControl) {
217
- const { formControl, ref, ...innerProps } = props;
218
- return /* @__PURE__ */ jsx(Controller, {
219
- control: formControl.control,
220
- name: formControl.name,
221
- render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(DateTimePickerBase, {
222
- ...innerProps,
223
- ref: mergeRefs(ref, field.ref),
224
- value: parseDateValue(field.value),
225
- onChange: (value) => field.onChange(formatDateValue(value)),
226
- onBlur: field.onBlur,
227
- isDirty,
228
- isDisabled: field.disabled || props.isDisabled,
229
- error: props.error ?? error?.message
230
- })
285
+ if (!renderInput) {
286
+ const dateTimeValue = normalizedValue ? parseDateValue(normalizedValue) : null;
287
+ const as = props.as ?? ui.input.as;
288
+ const size = props.size ?? ui.input.size;
289
+ const isDisabled = isFormControlDisabled || !!props.isDisabled;
290
+ const todayIcon = props.todayIcon ?? ui.dateInput.todayIcon;
291
+ const todayIconButtonSize = props.todayIconButtonSize ?? ui.dateInput.todayIconButtonSize;
292
+ const todayIconButtonComponent = props.todayIconButtonComponent ?? ui.dateInput.todayIconButtonComponent;
293
+ const todayIconPlacement = props.todayIconPlacement ?? ui.dateInput.todayIconPlacement;
294
+ const staticTodayIcon = renderDatePickerTodayIcon(todayIcon, {
295
+ isDisabled,
296
+ renderStatic: true,
297
+ size: todayIconButtonSize,
298
+ todayIconButtonComponent
299
+ });
300
+ const disableManualEntry = props.disableManualEntry ?? ui.dateInput.disableManualEntry;
301
+ const showDropdown = !props.disableDropdown || disableManualEntry;
302
+ const staticSegments = getStaticCalendarDateTimeSegments({
303
+ value: dateTimeValue,
304
+ locale,
305
+ shouldForceLeadingZeros,
306
+ isDisabled,
307
+ hidePlaceholder: as === "floating" && !dateTimeValue,
308
+ disableManualEntry,
309
+ placeholder: props.placeholder
310
+ });
311
+ return /* @__PURE__ */ jsx(InputFrame, {
312
+ ...props,
313
+ isDisabled,
314
+ className: clsx("group relative inline-flex w-full flex-col text-left", props.className),
315
+ inputClassName: clsx(props.shouldShrinkInput ? "min-w-0" : "min-w-input-width-min-width", props.inputClassName),
316
+ contentClassName: "pr-0!",
317
+ contentWrapperClassName: datePickerInputContentRowCva({ size }),
318
+ contentGroup: "date-picker",
319
+ labelPlacement: "content-row",
320
+ dataAttributes: {
321
+ dataIsEmpty: dateTimeValue == null,
322
+ dataIsFilled: dateTimeValue != null,
323
+ dataIsDirty: props.isDirty,
324
+ dataIsRequired: props.isRequired,
325
+ dataIsDisabled: isDisabled,
326
+ dataDisabled: isDisabled,
327
+ dataInvalid: !!props.error,
328
+ dataHasSelection: dateTimeValue != null
329
+ },
330
+ onStaticInteract: renderRealInput,
331
+ onStaticPress: replayStaticInputPress,
332
+ staticPressTarget: "action",
333
+ actionContent: staticTodayIcon,
334
+ actionContentPlacement: todayIconPlacement === "fieldLabel" ? "content-row" : "content-wrapper",
335
+ showClear: dateTimeValue != null,
336
+ wrapContentAndTrailing: true,
337
+ contentAndTrailingClassName: "gap-2!",
338
+ trailingClassName: "py-0! pl-0!",
339
+ action: showDropdown ? {
340
+ icon: ui.dateInput.dateTimeIcon,
341
+ onClick: _temp3,
342
+ altText: ""
343
+ } : void 0,
344
+ children: staticSegments
231
345
  });
232
346
  }
233
- return /* @__PURE__ */ jsx(DateTimePickerBase, {
234
- ...props,
235
- value: parseDateValue(props.value),
236
- onChange: (value) => props.onChange?.(formatDateValue(value))
237
- });
347
+ const T0 = DateTimePickerBase;
348
+ const t2 = mergeRefs(props.ref, inputRef);
349
+ const t3 = parseDateValue(normalizedValue);
350
+ let t4;
351
+ if ($[0] !== formatDateValue || $[1] !== props) {
352
+ t4 = (value) => props.onChange?.(formatDateValue(value));
353
+ $[0] = formatDateValue;
354
+ $[1] = props;
355
+ $[2] = t4;
356
+ } else t4 = $[2];
357
+ let t5;
358
+ if ($[3] !== T0 || $[4] !== props || $[5] !== t2 || $[6] !== t3 || $[7] !== t4) {
359
+ t5 = /* @__PURE__ */ jsx(T0, {
360
+ ...props,
361
+ ref: t2,
362
+ value: t3,
363
+ onChange: t4
364
+ });
365
+ $[3] = T0;
366
+ $[4] = props;
367
+ $[5] = t2;
368
+ $[6] = t3;
369
+ $[7] = t4;
370
+ $[8] = t5;
371
+ } else t5 = $[8];
372
+ return t5;
373
+ };
374
+ var DateTimePicker = (t0) => {
375
+ const $ = c(24);
376
+ let props;
377
+ let renderStaticInput;
378
+ let t1;
379
+ if ($[0] !== t0) {
380
+ ({fullIso: t1, renderStaticInput, ...props} = t0);
381
+ $[0] = t0;
382
+ $[1] = props;
383
+ $[2] = renderStaticInput;
384
+ $[3] = t1;
385
+ } else {
386
+ props = $[1];
387
+ renderStaticInput = $[2];
388
+ t1 = $[3];
389
+ }
390
+ const fullIso = t1 === void 0 ? true : t1;
391
+ if ("formControl" in props && props.formControl) {
392
+ let formControl;
393
+ let innerProps;
394
+ let ref;
395
+ if ($[4] !== props) {
396
+ ({formControl, ref, ...innerProps} = props);
397
+ $[4] = props;
398
+ $[5] = formControl;
399
+ $[6] = innerProps;
400
+ $[7] = ref;
401
+ } else {
402
+ formControl = $[5];
403
+ innerProps = $[6];
404
+ ref = $[7];
405
+ }
406
+ const controlWithOptions = formControl.control;
407
+ let t2;
408
+ if ($[8] !== controlWithOptions._options?.disabled || $[9] !== fullIso || $[10] !== innerProps || $[11] !== props.error || $[12] !== props.isDisabled || $[13] !== ref || $[14] !== renderStaticInput) {
409
+ t2 = (t3) => {
410
+ const { field, fieldState: t4 } = t3;
411
+ const { error, isDirty } = t4;
412
+ return /* @__PURE__ */ jsx(DateTimePickerInner, {
413
+ ...innerProps,
414
+ ref: mergeRefs(ref, field.ref),
415
+ value: field.value ?? null,
416
+ onChange: field.onChange,
417
+ onBlur: field.onBlur,
418
+ isDirty,
419
+ isDisabled: field.disabled || props.isDisabled,
420
+ isFormControlDisabled: !!controlWithOptions._options?.disabled,
421
+ error: props.error ?? error?.message,
422
+ fullIso,
423
+ renderStaticInput
424
+ });
425
+ };
426
+ $[8] = controlWithOptions._options?.disabled;
427
+ $[9] = fullIso;
428
+ $[10] = innerProps;
429
+ $[11] = props.error;
430
+ $[12] = props.isDisabled;
431
+ $[13] = ref;
432
+ $[14] = renderStaticInput;
433
+ $[15] = t2;
434
+ } else t2 = $[15];
435
+ let t3;
436
+ if ($[16] !== formControl.control || $[17] !== formControl.name || $[18] !== t2) {
437
+ t3 = /* @__PURE__ */ jsx(Controller, {
438
+ control: formControl.control,
439
+ name: formControl.name,
440
+ render: t2
441
+ });
442
+ $[16] = formControl.control;
443
+ $[17] = formControl.name;
444
+ $[18] = t2;
445
+ $[19] = t3;
446
+ } else t3 = $[19];
447
+ return t3;
448
+ }
449
+ let t2;
450
+ if ($[20] !== fullIso || $[21] !== props || $[22] !== renderStaticInput) {
451
+ t2 = /* @__PURE__ */ jsx(DateTimePickerInner, {
452
+ ...props,
453
+ fullIso,
454
+ renderStaticInput
455
+ });
456
+ $[20] = fullIso;
457
+ $[21] = props;
458
+ $[22] = renderStaticInput;
459
+ $[23] = t2;
460
+ } else t2 = $[23];
461
+ return t2;
238
462
  };
463
+ function _temp(input, staticTarget) {
464
+ const container = input.getContainer?.() ?? input;
465
+ return container instanceof HTMLElement ? getStaticDateTimeFocusTarget(container, staticTarget) : null;
466
+ }
467
+ function _temp2(input_0) {
468
+ const container_0 = input_0.getContainer?.() ?? input_0;
469
+ if (!(container_0 instanceof HTMLElement)) return null;
470
+ return container_0.querySelector("[data-static-press-action]");
471
+ }
472
+ function _temp3() {}
239
473
  //#endregion
240
474
  export { DateTimePicker };
@@ -1,10 +1,10 @@
1
- import { Ref } from 'react';
1
+ import { Ref, FocusEvent } from 'react';
2
2
  import { AriaTimeFieldProps, TimeValue } from 'react-aria';
3
3
  import { FieldValues } from 'react-hook-form';
4
4
  import { FormFieldProps } from '../../FormField/FormField';
5
5
  import { ControlProps } from '../../shared/form.types';
6
6
  import { InputVariantProps } from '../../shared/input.cva';
7
- interface TimePickerBaseProps extends FormFieldProps, InputVariantProps, Omit<AriaTimeFieldProps<TimeValue>, "label"> {
7
+ interface TimePickerBaseProps extends FormFieldProps, InputVariantProps, Omit<AriaTimeFieldProps<TimeValue>, "label" | "onBlur"> {
8
8
  ref?: Ref<HTMLDivElement>;
9
9
  disableDropdown?: boolean;
10
10
  date?: string | null;
@@ -13,13 +13,17 @@ interface TimePickerBaseProps extends FormFieldProps, InputVariantProps, Omit<Ar
13
13
  disableManualEntry?: boolean;
14
14
  placeholder?: string;
15
15
  inputClassName?: string;
16
+ onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
17
+ fireBlurOnChange?: boolean;
18
+ shouldForceLeadingZeros?: boolean;
16
19
  }
17
20
  export interface TimePickerProps extends Omit<TimePickerBaseProps, "value" | "onChange"> {
18
21
  value?: string | null;
19
22
  onChange?: (value: string | null) => void;
20
23
  fullIso?: boolean;
21
24
  timeZone?: string;
25
+ renderStaticInput?: boolean;
22
26
  }
23
27
  export type ControlledTimePickerProps<TFieldValues extends FieldValues> = ControlProps<TimePickerProps, TFieldValues>;
24
- export declare const TimePicker: <TFieldValues extends FieldValues>(props: ControlledTimePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
28
+ export declare const TimePicker: <TFieldValues extends FieldValues>({ renderStaticInput, ...props }: ControlledTimePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
25
29
  export {};