@povio/ui 2.3.2 → 3.0.0-rc.1

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