@povio/ui 2.3.1 → 2.3.2-rc.2

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