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