@povio/ui 2.3.3 → 3.0.0-rc.2

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