@povio/ui 3.3.0 → 3.4.0-rc.10

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 (316) hide show
  1. package/dist/assets/locales/en/translation.json.d.ts +158 -0
  2. package/dist/assets/locales/sl/translation.json.d.ts +154 -0
  3. package/dist/components/Breadcrumbs/Breadcrumbs.js +7 -7
  4. package/dist/components/Menu/MenuDesktop.js +1 -1
  5. package/dist/components/Menu/MenuItem.js +4 -4
  6. package/dist/components/Menu/MenuMobile.js +5 -5
  7. package/dist/components/Menu/MenuPopover.js +2 -2
  8. package/dist/components/buttons/Button/Button.js +1 -1
  9. package/dist/components/buttons/PillButton/PillButton.js +4 -4
  10. package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
  11. package/dist/components/buttons/SplitButton/SplitButton.js +3 -3
  12. package/dist/components/buttons/shared/ButtonContent.js +2 -2
  13. package/dist/components/buttons/shared/buttonContent.cva.d.ts +1 -1
  14. package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -2
  15. package/dist/components/inputs/Checkbox/Checkbox.js +95 -102
  16. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +2 -3
  17. package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +1 -2
  18. package/dist/components/inputs/Checkbox/CheckboxGroup.js +111 -115
  19. package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +2 -2
  20. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +17 -22
  21. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +2 -2
  22. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +17 -23
  23. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +2 -2
  24. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +21 -25
  25. package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +2 -2
  26. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +225 -238
  27. package/dist/components/inputs/DateTime/shared/Calendar.js +1 -1
  28. package/dist/components/inputs/DateTime/shared/CalendarCell.js +1 -1
  29. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +1 -1
  30. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +7 -10
  31. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +8 -12
  32. package/dist/components/inputs/DateTime/shared/DateField.d.ts +2 -1
  33. package/dist/components/inputs/DateTime/shared/DateField.js +4 -4
  34. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +2 -2
  35. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +8 -16
  36. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +3 -3
  37. package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +2 -2
  38. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +1 -1
  39. package/dist/components/inputs/DateTime/shared/MonthPicker.js +2 -2
  40. package/dist/components/inputs/DateTime/shared/RangeCalendar.js +2 -2
  41. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +4 -5
  42. package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -2
  43. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +10 -11
  44. package/dist/components/inputs/DateTime/shared/YearPicker.js +2 -2
  45. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +46 -1
  46. package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.js +1 -1
  47. package/dist/components/inputs/File/FileUpload.d.ts +1 -1
  48. package/dist/components/inputs/File/FileUpload.js +20 -20
  49. package/dist/components/inputs/File/InputUpload.d.ts +1 -1
  50. package/dist/components/inputs/File/InputUpload.js +19 -19
  51. package/dist/components/inputs/File/fileUpload.types.d.ts +1 -1
  52. package/dist/components/inputs/File/inputUpload.types.d.ts +1 -1
  53. package/dist/components/inputs/File/shared/FileCard.js +1 -1
  54. package/dist/components/inputs/File/shared/FileCardList.js +1 -1
  55. package/dist/components/inputs/File/shared/FileUploadContent.js +1 -1
  56. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +3 -3
  57. package/dist/components/inputs/File/shared/FileUploadContentError.js +5 -6
  58. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +5 -6
  59. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +4 -5
  60. package/dist/components/inputs/File/shared/InputUploadContent.js +4 -4
  61. package/dist/components/inputs/File/shared/InputUploadFilled.js +3 -3
  62. package/dist/components/inputs/FormField/FormFieldError.js +1 -1
  63. package/dist/components/inputs/FormField/FormFieldHeader.js +4 -4
  64. package/dist/components/inputs/FormField/FormFieldHeaderClose.js +3 -3
  65. package/dist/components/inputs/FormField/FormFieldHelper.js +1 -1
  66. package/dist/components/inputs/FormField/FormFieldLabel.js +2 -2
  67. package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +1 -1
  68. package/dist/components/inputs/Input/NumberInput/NumberInput.js +109 -107
  69. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +2 -1
  70. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +265 -254
  71. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +2 -1
  72. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +25 -24
  73. package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +1 -1
  74. package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +3 -4
  75. package/dist/components/inputs/Input/TextArea/TextArea.d.ts +2 -1
  76. package/dist/components/inputs/Input/TextArea/TextArea.js +118 -117
  77. package/dist/components/inputs/Input/TextInput/TextInput.d.ts +2 -2
  78. package/dist/components/inputs/Input/TextInput/TextInput.js +129 -129
  79. package/dist/components/inputs/Input/shared/InputContent.d.ts +2 -1
  80. package/dist/components/inputs/Input/shared/InputContent.js +50 -48
  81. package/dist/components/inputs/Inputs/Form.d.ts +4 -4
  82. package/dist/components/inputs/Inputs/Form.js +1 -1
  83. package/dist/components/inputs/Inputs/InputItem.d.ts +22 -22
  84. package/dist/components/inputs/Inputs/InputItem.js +36 -37
  85. package/dist/components/inputs/Inputs/Inputs.d.ts +2 -2
  86. package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -2
  87. package/dist/components/inputs/RadioGroup/RadioGroup.js +109 -113
  88. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +1 -1
  89. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +16 -16
  90. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +1 -1
  91. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +20 -20
  92. package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +1 -1
  93. package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +1 -1
  94. package/dist/components/inputs/Selection/Select/QuerySelect.js +20 -20
  95. package/dist/components/inputs/Selection/Select/Select.d.ts +1 -1
  96. package/dist/components/inputs/Selection/Select/Select.js +23 -23
  97. package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -1
  98. package/dist/components/inputs/Selection/shared/SelectBase.js +34 -37
  99. package/dist/components/inputs/Selection/shared/SelectDesktop.js +58 -56
  100. package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
  101. package/dist/components/inputs/Selection/shared/SelectInput.js +57 -56
  102. package/dist/components/inputs/Selection/shared/SelectListBox.js +1 -1
  103. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +2 -2
  104. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +2 -2
  105. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +1 -1
  106. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +1 -1
  107. package/dist/components/inputs/Selection/shared/SelectMobile.js +5 -4
  108. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +3 -3
  109. package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -2
  110. package/dist/components/inputs/Selection/shared/select.context.js +5 -9
  111. package/dist/components/inputs/Selection/shared/select.types.d.ts +1 -1
  112. package/dist/components/inputs/Skeleton/InputFrame.d.ts +1 -0
  113. package/dist/components/inputs/Skeleton/InputFrame.js +10 -7
  114. package/dist/components/inputs/Slider/Slider.d.ts +1 -1
  115. package/dist/components/inputs/Slider/Slider.js +20 -20
  116. package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -1
  117. package/dist/components/inputs/TextEditor/TextEditor.js +20 -20
  118. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +2 -2
  119. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +4 -4
  120. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +4 -4
  121. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +5 -8
  122. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +3 -3
  123. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +4 -5
  124. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +4 -5
  125. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +6 -9
  126. package/dist/components/inputs/Toggle/Toggle.d.ts +1 -2
  127. package/dist/components/inputs/Toggle/Toggle.js +61 -65
  128. package/dist/components/inputs/shared/CheckContent.js +1 -1
  129. package/dist/components/inputs/shared/InputClear.js +45 -28
  130. package/dist/components/inputs/shared/TooltipWrapper.d.ts +1 -1
  131. package/dist/components/inputs/shared/form.binding.d.ts +27 -0
  132. package/dist/components/inputs/shared/form.binding.js +57 -0
  133. package/dist/components/inputs/shared/form.types.d.ts +9 -8
  134. package/dist/components/inputs/shared/form.types.js +8 -0
  135. package/dist/components/inputs/shared/input.cva.js +1 -1
  136. package/dist/components/inputs/shared/useStaticInputHandoff.js +64 -38
  137. package/dist/components/navigation/Accordion/Accordion.js +1 -1
  138. package/dist/components/navigation/Accordion/AccordionItem.js +3 -3
  139. package/dist/components/navigation/Stepper/Stepper.js +2 -2
  140. package/dist/components/navigation/Stepper/StepperItem.js +4 -4
  141. package/dist/components/overlays/ActionModal/ActionModal.js +1 -1
  142. package/dist/components/overlays/BottomSheet/BottomSheet.js +3 -3
  143. package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +4 -4
  144. package/dist/components/overlays/Drawer/Drawer.js +2 -2
  145. package/dist/components/overlays/Modal/Modal.js +3 -3
  146. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +1 -1
  147. package/dist/components/overlays/Tooltip/Tooltip.js +15 -8
  148. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +1 -1
  149. package/dist/components/segment/Segment.d.ts +1 -1
  150. package/dist/components/segment/Segment.js +21 -21
  151. package/dist/components/segment/SegmentItem.js +1 -1
  152. package/dist/components/segment/segment.types.d.ts +1 -1
  153. package/dist/components/shared/pagination/Pagination.js +1 -1
  154. package/dist/components/shared/pagination/PaginationList.js +6 -9
  155. package/dist/components/table/ColumnConfig.js +1 -1
  156. package/dist/components/table/InfiniteTable.js +1 -1
  157. package/dist/components/table/Table.js +6 -8
  158. package/dist/components/text/Link/Link.js +1 -1
  159. package/dist/components/text/Pill/Pill.js +3 -3
  160. package/dist/components/text/Tag/Tag.js +3 -3
  161. package/dist/config/confirmation.context.js +1 -1
  162. package/dist/config/link.context.js +1 -1
  163. package/dist/config/router.context.js +1 -1
  164. package/dist/config/theme.context.js +1 -1
  165. package/dist/config/uiConfig.context.d.ts +14 -5
  166. package/dist/config/uiConfig.context.js +9 -11
  167. package/dist/config/uiOverrides.context.js +2 -2
  168. package/dist/helpers/dynamicColumns.d.ts +1 -1
  169. package/dist/helpers/dynamicInputs.d.ts +7 -7
  170. package/dist/hooks/useAutosave.d.ts +4 -4
  171. package/dist/hooks/useAutosave.js +64 -49
  172. package/dist/hooks/useFilters.js +1 -1
  173. package/dist/hooks/useForm.d.ts +39 -15
  174. package/dist/hooks/useForm.js +96 -43
  175. package/dist/hooks/useFormAutosave.d.ts +8 -9
  176. package/dist/hooks/useFormAutosave.js +23 -9
  177. package/dist/hooks/useIntersectionObserver.js +1 -1
  178. package/dist/hooks/useLocalStorage.js +1 -1
  179. package/dist/hooks/usePagination.js +1 -1
  180. package/dist/hooks/useScrollableListBox.js +1 -1
  181. package/dist/hooks/useSorting.js +1 -1
  182. package/dist/hooks/useStateAndRef.js +1 -1
  183. package/dist/hooks/useTableColumnConfig.js +1 -1
  184. package/dist/index.d.ts +1 -263
  185. package/dist/index.js +11 -71
  186. package/dist/rhf/Inputs.d.ts +60 -0
  187. package/dist/rhf/Inputs.js +148 -0
  188. package/dist/rhf/components.d.ts +80 -0
  189. package/dist/rhf/components.js +101 -0
  190. package/dist/rhf/dynamicInputs.d.ts +18 -0
  191. package/dist/rhf/dynamicInputs.js +5 -0
  192. package/dist/rhf/fieldAdapter.d.ts +7 -0
  193. package/dist/rhf/fieldAdapter.js +40 -0
  194. package/dist/rhf/form.types.d.ts +12 -0
  195. package/dist/rhf/useAutosave.d.ts +10 -0
  196. package/dist/rhf/useAutosave.js +71 -0
  197. package/dist/rhf/useForm.d.ts +18 -0
  198. package/dist/rhf/useForm.js +48 -0
  199. package/dist/rhf/useFormAutosave.d.ts +15 -0
  200. package/dist/rhf/useFormAutosave.js +59 -0
  201. package/dist/rhf.d.ts +225 -0
  202. package/dist/tanstack.d.ts +224 -0
  203. package/dist/tanstack.js +141 -0
  204. package/package.json +15 -3
  205. package/dist/assets/icons/Account.d.ts +0 -2
  206. package/dist/assets/icons/AlignCenter.d.ts +0 -2
  207. package/dist/assets/icons/AlignCenter.js +0 -30
  208. package/dist/assets/icons/AlignLeft.d.ts +0 -2
  209. package/dist/assets/icons/AlignLeft.js +0 -30
  210. package/dist/assets/icons/AlignLeftRight.d.ts +0 -2
  211. package/dist/assets/icons/AlignLeftRight.js +0 -30
  212. package/dist/assets/icons/AlignRight.d.ts +0 -2
  213. package/dist/assets/icons/AlignRight.js +0 -30
  214. package/dist/assets/icons/ArrowDropDown.d.ts +0 -2
  215. package/dist/assets/icons/ArrowDropDown.js +0 -30
  216. package/dist/assets/icons/ArrowDropUp.d.ts +0 -2
  217. package/dist/assets/icons/ArrowDropUp.js +0 -30
  218. package/dist/assets/icons/ArrowLeft.d.ts +0 -2
  219. package/dist/assets/icons/ArrowLeft.js +0 -30
  220. package/dist/assets/icons/ArrowRight.d.ts +0 -2
  221. package/dist/assets/icons/ArrowRight.js +0 -30
  222. package/dist/assets/icons/Board.d.ts +0 -2
  223. package/dist/assets/icons/Bold.d.ts +0 -2
  224. package/dist/assets/icons/Bold.js +0 -30
  225. package/dist/assets/icons/BulletedList.d.ts +0 -2
  226. package/dist/assets/icons/BulletedList.js +0 -30
  227. package/dist/assets/icons/Calendar.d.ts +0 -2
  228. package/dist/assets/icons/Calendar.js +0 -32
  229. package/dist/assets/icons/Check.d.ts +0 -2
  230. package/dist/assets/icons/Check.js +0 -32
  231. package/dist/assets/icons/CheckCircle.d.ts +0 -2
  232. package/dist/assets/icons/CheckCircle.js +0 -30
  233. package/dist/assets/icons/CheckboxCheckmark.d.ts +0 -2
  234. package/dist/assets/icons/CheckboxCheckmark.js +0 -33
  235. package/dist/assets/icons/CheckboxIndeterminate.d.ts +0 -2
  236. package/dist/assets/icons/CheckboxIndeterminate.js +0 -33
  237. package/dist/assets/icons/ChevronDown.d.ts +0 -2
  238. package/dist/assets/icons/ChevronDown.js +0 -32
  239. package/dist/assets/icons/ChevronLeft.d.ts +0 -2
  240. package/dist/assets/icons/ChevronLeft.js +0 -32
  241. package/dist/assets/icons/ChevronRight.d.ts +0 -2
  242. package/dist/assets/icons/ChevronRight.js +0 -32
  243. package/dist/assets/icons/ChevronUp.d.ts +0 -2
  244. package/dist/assets/icons/ChevronUp.js +0 -32
  245. package/dist/assets/icons/ChevronsLeft.d.ts +0 -2
  246. package/dist/assets/icons/ChevronsLeft.js +0 -32
  247. package/dist/assets/icons/ChevronsRight.d.ts +0 -2
  248. package/dist/assets/icons/ChevronsRight.js +0 -32
  249. package/dist/assets/icons/Clock.d.ts +0 -2
  250. package/dist/assets/icons/Clock.js +0 -30
  251. package/dist/assets/icons/Close.d.ts +0 -2
  252. package/dist/assets/icons/Close.js +0 -30
  253. package/dist/assets/icons/DateTime.d.ts +0 -2
  254. package/dist/assets/icons/DateTime.js +0 -39
  255. package/dist/assets/icons/DragIndicator.d.ts +0 -2
  256. package/dist/assets/icons/DragIndicator.js +0 -30
  257. package/dist/assets/icons/Edit.d.ts +0 -2
  258. package/dist/assets/icons/Emoji.d.ts +0 -2
  259. package/dist/assets/icons/File.d.ts +0 -2
  260. package/dist/assets/icons/File.js +0 -32
  261. package/dist/assets/icons/Grid.d.ts +0 -2
  262. package/dist/assets/icons/Highlight.d.ts +0 -2
  263. package/dist/assets/icons/Highlight.js +0 -30
  264. package/dist/assets/icons/HighlightOn.d.ts +0 -6
  265. package/dist/assets/icons/HighlightOn.js +0 -55
  266. package/dist/assets/icons/Home.d.ts +0 -2
  267. package/dist/assets/icons/Home.js +0 -30
  268. package/dist/assets/icons/Image.d.ts +0 -2
  269. package/dist/assets/icons/ImageError.d.ts +0 -2
  270. package/dist/assets/icons/Info.d.ts +0 -2
  271. package/dist/assets/icons/Info.js +0 -41
  272. package/dist/assets/icons/Italic.d.ts +0 -2
  273. package/dist/assets/icons/Italic.js +0 -30
  274. package/dist/assets/icons/Link.d.ts +0 -2
  275. package/dist/assets/icons/Link.js +0 -30
  276. package/dist/assets/icons/Loader.d.ts +0 -2
  277. package/dist/assets/icons/MapPin.d.ts +0 -2
  278. package/dist/assets/icons/Menu.d.ts +0 -2
  279. package/dist/assets/icons/Menu.js +0 -30
  280. package/dist/assets/icons/Minus.d.ts +0 -2
  281. package/dist/assets/icons/MoreHoriz.d.ts +0 -2
  282. package/dist/assets/icons/NumberedList.d.ts +0 -2
  283. package/dist/assets/icons/NumberedList.js +0 -30
  284. package/dist/assets/icons/Pause.d.ts +0 -2
  285. package/dist/assets/icons/Plus.d.ts +0 -2
  286. package/dist/assets/icons/PointerHorizontal.d.ts +0 -2
  287. package/dist/assets/icons/PointerHorizontal.js +0 -30
  288. package/dist/assets/icons/PointerVertical.d.ts +0 -2
  289. package/dist/assets/icons/PointerVertical.js +0 -30
  290. package/dist/assets/icons/Retry.d.ts +0 -2
  291. package/dist/assets/icons/Search.d.ts +0 -2
  292. package/dist/assets/icons/Search.js +0 -30
  293. package/dist/assets/icons/Send.d.ts +0 -2
  294. package/dist/assets/icons/Send.js +0 -32
  295. package/dist/assets/icons/Share.d.ts +0 -2
  296. package/dist/assets/icons/Slash.d.ts +0 -2
  297. package/dist/assets/icons/Strikethrough.d.ts +0 -2
  298. package/dist/assets/icons/Strikethrough.js +0 -30
  299. package/dist/assets/icons/TextColor.d.ts +0 -6
  300. package/dist/assets/icons/TextColor.js +0 -52
  301. package/dist/assets/icons/Today.d.ts +0 -2
  302. package/dist/assets/icons/Today.js +0 -30
  303. package/dist/assets/icons/Trash.d.ts +0 -2
  304. package/dist/assets/icons/Underlined.d.ts +0 -2
  305. package/dist/assets/icons/Underlined.js +0 -32
  306. package/dist/assets/icons/Upload.d.ts +0 -2
  307. package/dist/assets/icons/Upload.js +0 -39
  308. package/dist/assets/icons/User.d.ts +0 -2
  309. package/dist/assets/icons/Visibility.d.ts +0 -2
  310. package/dist/assets/icons/Visibility.js +0 -30
  311. package/dist/assets/icons/VisibilityOff.d.ts +0 -2
  312. package/dist/assets/icons/VisibilityOff.js +0 -30
  313. package/dist/assets/icons/WarningFilled.d.ts +0 -2
  314. package/dist/assets/icons/WarningFilled.js +0 -32
  315. package/dist/assets/icons/WarningOutlined.d.ts +0 -2
  316. /package/dist/{hooks/useAutosave.spec.d.ts → rhf/entrypoints.type-test.d.ts} +0 -0
@@ -2,6 +2,7 @@ import { UIOverrides } from "../../../../config/uiOverrides.context.js";
2
2
  import { Typography } from "../../../text/Typography/Typography.js";
3
3
  import { UIConfig } from "../../../../config/uiConfig.context.js";
4
4
  import "../../../../config/i18n.js";
5
+ import { FieldController } from "../../shared/form.binding.js";
5
6
  import { FormField } from "../../FormField/FormField.js";
6
7
  import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
7
8
  import { datePickerInputContentRowDefinition } from "../shared/datePickerInput.cva.js";
@@ -13,16 +14,14 @@ import { getStaticDateRangeSegments, getStaticDateTimeFocusTarget } from "../sha
13
14
  import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
14
15
  import { InputFrame } from "../../Skeleton/InputFrame.js";
15
16
  import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
16
- import { useDebounceCallback } from "../../../../hooks/useDebounceCallback.js";
17
17
  import { RangeCalendar } from "../shared/RangeCalendar.js";
18
- import { jsx, jsxs } from "react/jsx-runtime";
19
18
  import { clsx } from "clsx";
20
19
  import { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
21
20
  import { Button } from "react-aria-components";
21
+ import { jsx, jsxs } from "react/jsx-runtime";
22
22
  import { useDateRangePicker, useLocale as useLocale$1 } from "react-aria";
23
23
  import { mergeRefs } from "@react-aria/utils";
24
24
  import { useTranslation } from "react-i18next";
25
- import { Controller } from "react-hook-form";
26
25
  import { createCalendar, endOfMonth, endOfWeek, endOfYear, getLocalTimeZone, startOfMonth, startOfWeek, startOfYear, toCalendarDate, today } from "@internationalized/date";
27
26
  import { DateTime } from "luxon";
28
27
  import { useDateRangePickerState, useRangeCalendarState } from "react-stately";
@@ -30,7 +29,7 @@ import { useDateRangePickerState, useRangeCalendarState } from "react-stately";
30
29
  var DateRangePickerBase = (props) => {
31
30
  const ui = UIConfig.useConfig();
32
31
  const { t } = useTranslation();
33
- const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, className, hideSidebar, placeholder, inputClassName, hideLabel: hideLabelProp, variant: variantProp, as: asProp, size: sizeProp, isClearable: isClearableProp, todayIcon: todayIconProp, todayIconButtonSize: todayIconButtonSizeProp, todayIconButtonComponent: todayIconButtonComponentProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, autoFixYear: autoFixYearProp, fireBlurOnChange: fireBlurOnChangeProp, allowPartialRange: allowPartialRangeProp, minValue, maxValue, ...rest } = props;
32
+ const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, className, hideSidebar, placeholder, inputClassName, hideLabel: hideLabelProp, variant: variantProp, as: asProp, size: sizeProp, isClearable: isClearableProp, isClearableIfDisabled, todayIcon: todayIconProp, todayIconButtonSize: todayIconButtonSizeProp, todayIconButtonComponent: todayIconButtonComponentProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, autoFixYear: autoFixYearProp, allowPartialRange: allowPartialRangeProp, minValue, maxValue, ...rest } = props;
34
33
  const hideLabel = hideLabelProp ?? ui.input.hideLabel;
35
34
  const variant = variantProp ?? ui.input.variant;
36
35
  const as = asProp ?? ui.input.as;
@@ -43,7 +42,6 @@ var DateRangePickerBase = (props) => {
43
42
  const shouldForceLeadingZeros = shouldForceLeadingZerosProp ?? ui.dateInput.shouldForceLeadingZeros;
44
43
  const disableManualEntry = disableManualEntryProp ?? ui.dateInput.disableManualEntry;
45
44
  const autoFixYear = autoFixYearProp ?? ui.dateInput.autoFixYear;
46
- const fireBlurOnChange = fireBlurOnChangeProp ?? ui.dateInput.fireBlurOnChange;
47
45
  const allowPartialRange = allowPartialRangeProp ?? ui.dateInput.allowPartialRange;
48
46
  const timeZone = ui.dateInput.timeZone;
49
47
  let effectiveTimeZone = getLocalTimeZone();
@@ -77,7 +75,6 @@ var DateRangePickerBase = (props) => {
77
75
  onChange?.(newValue);
78
76
  if (isInvalidRange) return;
79
77
  handleCalendarStatesChange(newValue);
80
- if (fireBlurOnChange) debouncedBlur(newValue);
81
78
  },
82
79
  shouldCloseOnSelect: false
83
80
  });
@@ -105,7 +102,6 @@ var DateRangePickerBase = (props) => {
105
102
  if (partialRange.start && partialRange.end) return;
106
103
  const newValue_0 = partialRange.start || partialRange.end ? partialRange : null;
107
104
  onChange?.(newValue_0);
108
- if (fireBlurOnChange) debouncedBlur(newValue_0);
109
105
  };
110
106
  const { locale } = useLocale$1();
111
107
  useImperativeHandle(ref, () => ({
@@ -117,7 +113,6 @@ var DateRangePickerBase = (props) => {
117
113
  const handleBlur = (newValue_1) => {
118
114
  onBlur?.({ target: { value: newValue_1 } });
119
115
  };
120
- const { callback: debouncedBlur } = useDebounceCallback(handleBlur, { delay: 500 });
121
116
  const formFieldProps = {
122
117
  error: error || validationRangeError,
123
118
  label,
@@ -429,7 +424,6 @@ var DateRangePickerBase = (props) => {
429
424
  }
430
425
  }
431
426
  state.toggle();
432
- if (fireBlurOnChange) handleBlur(valueToApply);
433
427
  };
434
428
  const onTodayPress = () => {
435
429
  const todayDate = today(effectiveTimeZone);
@@ -457,7 +451,6 @@ var DateRangePickerBase = (props) => {
457
451
  isSelecting: false
458
452
  });
459
453
  setHoverDate(null);
460
- if (fireBlurOnChange) handleBlur(null);
461
454
  };
462
455
  const syncSelectionFromControlledValue = () => {
463
456
  const currentValue = state.value;
@@ -656,6 +649,7 @@ var DateRangePickerBase = (props) => {
656
649
  variant,
657
650
  size,
658
651
  isClearable,
652
+ isClearableIfDisabled,
659
653
  headerProps,
660
654
  todayIcon,
661
655
  todayIconButtonSize,
@@ -668,7 +662,6 @@ var DateRangePickerBase = (props) => {
668
662
  className: inputClassName,
669
663
  onOpenDropdown,
670
664
  timeZone: effectiveTimeZone,
671
- fireBlurOnChange,
672
665
  onClear: onInputClear
673
666
  }), /* @__PURE__ */ jsx(DateTimeDialog, {
674
667
  hideSidebar,
@@ -812,6 +805,7 @@ var DateRangePickerInner = ({ fullIso = true, minValue, maxValue, renderStaticIn
812
805
  });
813
806
  return /* @__PURE__ */ jsx(InputFrame, {
814
807
  ...props,
808
+ onClear: () => props.onChange?.(null),
815
809
  isDisabled,
816
810
  className: clsx("group relative inline-flex w-full flex-col text-left", props.className),
817
811
  inputClassName: clsx("min-w-input-width-min-width", props.inputClassName),
@@ -855,20 +849,20 @@ var DateRangePickerInner = ({ fullIso = true, minValue, maxValue, renderStaticIn
855
849
  });
856
850
  };
857
851
  var DateRangePicker = ({ fullIso = true, minValue, maxValue, renderStaticInput, ...props }) => {
858
- if ("formControl" in props && props.formControl) {
859
- const { formControl, ref, ...innerProps } = props;
860
- const controlWithOptions = formControl.control;
861
- return /* @__PURE__ */ jsx(Controller, {
862
- control: formControl.control,
863
- name: formControl.name,
864
- render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(DateRangePickerInner, {
852
+ if ("field" in props && props.field) {
853
+ const { field, ref, ...innerProps } = props;
854
+ const controlWithOptions = field.form;
855
+ return /* @__PURE__ */ jsx(FieldController, {
856
+ control: field.form,
857
+ name: field.name,
858
+ render: ({ field: field_0, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(DateRangePickerInner, {
865
859
  ...innerProps,
866
- ref: mergeRefs(ref, field.ref),
867
- value: field.value ?? null,
868
- onChange: field.onChange,
869
- onBlur: field.onBlur,
860
+ ref: mergeRefs(ref, field_0.ref),
861
+ value: field_0.value ?? null,
862
+ onChange: (value) => field_0.onChange(value ?? null),
863
+ onBlur: field_0.onBlur,
870
864
  isDirty,
871
- isDisabled: field.disabled || props.isDisabled,
865
+ isDisabled: field_0.disabled || props.isDisabled,
872
866
  isFormControlDisabled: !!controlWithOptions._options?.disabled,
873
867
  error: props.error ?? error?.message,
874
868
  fullIso,
@@ -1,6 +1,6 @@
1
1
  import { FocusEvent, Ref } from 'react';
2
2
  import { DateValue } from 'react-aria';
3
- import { FieldValues } from 'react-hook-form';
3
+ import { FieldValues } from '../../shared/form.binding';
4
4
  import { DatePickerStateOptions } from 'react-stately';
5
5
  import { DatePickerInputHandle } from '../shared/DatePickerInput';
6
6
  import { DatePickerTodayIcon, DatePickerTodayIconButtonComponent, DatePickerTodayIconButtonSize, DatePickerTodayIconPlacement } from '../shared/datePicker.types';
@@ -12,6 +12,7 @@ interface DateTimePickerBaseProps extends FormFieldProps, InputVariantProps, Omi
12
12
  disableDropdown?: boolean;
13
13
  isTimeOptional?: boolean;
14
14
  isClearable?: boolean;
15
+ isClearableIfDisabled?: boolean;
15
16
  todayIcon?: DatePickerTodayIcon;
16
17
  todayIconButtonSize?: DatePickerTodayIconButtonSize;
17
18
  todayIconButtonComponent?: DatePickerTodayIconButtonComponent;
@@ -27,7 +28,6 @@ interface DateTimePickerBaseProps extends FormFieldProps, InputVariantProps, Omi
27
28
  timeZone?: string;
28
29
  format?: string;
29
30
  onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
30
- fireBlurOnChange?: boolean;
31
31
  }
32
32
  export interface DateTimePickerProps extends Omit<DateTimePickerBaseProps, "value" | "onChange"> {
33
33
  value?: string | null;
@@ -1,5 +1,6 @@
1
1
  import { UIOverrides } from "../../../../config/uiOverrides.context.js";
2
2
  import { UIConfig } from "../../../../config/uiConfig.context.js";
3
+ import { FieldController } from "../../shared/form.binding.js";
3
4
  import { FormField } from "../../FormField/FormField.js";
4
5
  import { Calendar } from "../shared/Calendar.js";
5
6
  import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
@@ -12,19 +13,17 @@ import { getStaticCalendarDateTimeSegments, getStaticDateTimeFocusTarget } from
12
13
  import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
13
14
  import { InputFrame } from "../../Skeleton/InputFrame.js";
14
15
  import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
15
- import { useDebounceCallback } from "../../../../hooks/useDebounceCallback.js";
16
- import { jsx, jsxs } from "react/jsx-runtime";
17
16
  import { clsx } from "clsx";
18
17
  import { useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
18
+ import { jsx, jsxs } from "react/jsx-runtime";
19
19
  import { useDatePicker, useLocale } from "react-aria";
20
20
  import { mergeRefs } from "@react-aria/utils";
21
- import { Controller } from "react-hook-form";
22
21
  import { Time, createCalendar, getLocalTimeZone, toCalendarDate, toCalendarDateTime, today } from "@internationalized/date";
23
22
  import { useCalendarState, useDatePickerState } from "react-stately";
24
23
  //#region src/components/inputs/DateTime/DateTimePicker/DateTimePicker.tsx
25
24
  var DateTimePickerBase = (props) => {
26
25
  const ui = UIConfig.useConfig();
27
- const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, isTimeOptional, placeholder, inputClassName, shouldShrinkInput, hideLabel: hideLabelProp, variant: variantProp, as: asProp, size: sizeProp, isClearable: isClearableProp, todayIcon: todayIconProp, todayIconButtonSize: todayIconButtonSizeProp, todayIconButtonComponent: todayIconButtonComponentProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, shouldUpdateDateOnMonthYearChange: shouldUpdateDateOnMonthYearChangeProp, timeZone: timeZoneProp, autoFixYear: autoFixYearProp, fireBlurOnChange: fireBlurOnChangeProp, format, setDateValueOnDateSelection: setDateValueOnDateSelectionProp, ...rest } = props;
26
+ const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, isTimeOptional, placeholder, inputClassName, shouldShrinkInput, hideLabel: hideLabelProp, variant: variantProp, as: asProp, size: sizeProp, isClearable: isClearableProp, isClearableIfDisabled, todayIcon: todayIconProp, todayIconButtonSize: todayIconButtonSizeProp, todayIconButtonComponent: todayIconButtonComponentProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, shouldUpdateDateOnMonthYearChange: shouldUpdateDateOnMonthYearChangeProp, timeZone: timeZoneProp, autoFixYear: autoFixYearProp, format, setDateValueOnDateSelection: setDateValueOnDateSelectionProp, ...rest } = props;
28
27
  const hideLabel = hideLabelProp ?? ui.input.hideLabel;
29
28
  const variant = variantProp ?? ui.input.variant;
30
29
  const as = asProp ?? ui.input.as;
@@ -38,7 +37,6 @@ var DateTimePickerBase = (props) => {
38
37
  const disableManualEntry = disableManualEntryProp ?? ui.dateInput.disableManualEntry;
39
38
  const shouldUpdateDateOnMonthYearChange = shouldUpdateDateOnMonthYearChangeProp ?? ui.dateInput.shouldUpdateDateOnMonthYearChange;
40
39
  const autoFixYear = autoFixYearProp ?? ui.dateInput.autoFixYear;
41
- const fireBlurOnChange = fireBlurOnChangeProp ?? ui.dateInput.fireBlurOnChange;
42
40
  const setDateValueOnDateSelection = setDateValueOnDateSelectionProp ?? ui.dateInput.setDateValueOnDateSelection;
43
41
  const timeZone = timeZoneProp ?? ui.dateInput.timeZone;
44
42
  let effectiveTimeZone = getLocalTimeZone();
@@ -69,7 +67,6 @@ var DateTimePickerBase = (props) => {
69
67
  const handleBlur = (val) => {
70
68
  onBlur?.({ target: { value: val } });
71
69
  };
72
- const { callback: debouncedBlur } = useDebounceCallback(handleBlur, { delay: 500 });
73
70
  const normalizedValue = value ?? null;
74
71
  const dialogState = useDatePickerState({
75
72
  ...rest,
@@ -90,7 +87,6 @@ var DateTimePickerBase = (props) => {
90
87
  onChange?.(val_0);
91
88
  dialogState.setValue(val_0);
92
89
  calendarState.setFocusedDate(val_0 || today(effectiveTimeZone));
93
- if (fireBlurOnChange) debouncedBlur(val_0);
94
90
  },
95
91
  shouldCloseOnSelect: false,
96
92
  granularity: "minute",
@@ -126,10 +122,10 @@ var DateTimePickerBase = (props) => {
126
122
  labelProps
127
123
  };
128
124
  const onApply = () => {
129
- const newValue = dialogState.value;
130
- state.setValue(newValue);
131
- state.toggle();
132
- if (fireBlurOnChange) handleBlur(newValue);
125
+ const newValue = dialogState.value ?? null;
126
+ onChange?.(newValue);
127
+ dialogState.setValue(newValue);
128
+ state.close();
133
129
  };
134
130
  const onMonthYearChange = (selectedDate) => {
135
131
  if (!shouldUpdateDateOnMonthYearChange) return;
@@ -154,7 +150,6 @@ var DateTimePickerBase = (props) => {
154
150
  const onInputClear = () => {
155
151
  onChange?.(null);
156
152
  dialogState.setValue(null);
157
- if (fireBlurOnChange) handleBlur(null);
158
153
  };
159
154
  const syncDialogFromControlledValue = () => {
160
155
  dialogState.setValue(state.value);
@@ -210,6 +205,7 @@ var DateTimePickerBase = (props) => {
210
205
  isDateTime: true,
211
206
  shouldShrinkInput,
212
207
  isClearable,
208
+ isClearableIfDisabled,
213
209
  headerProps,
214
210
  todayIcon,
215
211
  todayIconButtonSize,
@@ -224,7 +220,6 @@ var DateTimePickerBase = (props) => {
224
220
  timeZone: effectiveTimeZone,
225
221
  isTimeOptional,
226
222
  format,
227
- fireBlurOnChange,
228
223
  onClear: onInputClear
229
224
  }), (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(DateTimeDialog, {
230
225
  footer: /* @__PURE__ */ jsx(DateTimeDialogFooter, {
@@ -314,6 +309,7 @@ var DateTimePickerInner = ({ fullIso: _fullIso = true, renderStaticInput, isForm
314
309
  });
315
310
  return /* @__PURE__ */ jsx(InputFrame, {
316
311
  ...props,
312
+ onClear: () => props.onChange?.(null),
317
313
  isDisabled,
318
314
  className: clsx("group relative inline-flex w-full flex-col text-left", props.className),
319
315
  inputClassName: clsx(props.shouldShrinkInput ? "min-w-0" : "min-w-input-width-min-width", props.inputClassName),
@@ -356,20 +352,20 @@ var DateTimePickerInner = ({ fullIso: _fullIso = true, renderStaticInput, isForm
356
352
  });
357
353
  };
358
354
  var DateTimePicker = ({ fullIso = true, renderStaticInput, ...props }) => {
359
- if ("formControl" in props && props.formControl) {
360
- const { formControl, ref, ...innerProps } = props;
361
- const controlWithOptions = formControl.control;
362
- return /* @__PURE__ */ jsx(Controller, {
363
- control: formControl.control,
364
- name: formControl.name,
365
- render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(DateTimePickerInner, {
355
+ if ("field" in props && props.field) {
356
+ const { field, ref, ...innerProps } = props;
357
+ const controlWithOptions = field.form;
358
+ return /* @__PURE__ */ jsx(FieldController, {
359
+ control: field.form,
360
+ name: field.name,
361
+ render: ({ field: field_0, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(DateTimePickerInner, {
366
362
  ...innerProps,
367
- ref: mergeRefs(ref, field.ref),
368
- value: field.value ?? null,
369
- onChange: field.onChange,
370
- onBlur: field.onBlur,
363
+ ref: mergeRefs(ref, field_0.ref),
364
+ value: field_0.value ?? null,
365
+ onChange: (value) => field_0.onChange(value ?? null),
366
+ onBlur: field_0.onBlur,
371
367
  isDirty,
372
- isDisabled: field.disabled || props.isDisabled,
368
+ isDisabled: field_0.disabled || props.isDisabled,
373
369
  isFormControlDisabled: !!controlWithOptions._options?.disabled,
374
370
  error: props.error ?? error?.message,
375
371
  fullIso,
@@ -1,6 +1,6 @@
1
1
  import { Ref, FocusEvent } from 'react';
2
2
  import { AriaTimeFieldProps, TimeValue } from 'react-aria';
3
- import { FieldValues } from 'react-hook-form';
3
+ import { FieldValues } from '../../shared/form.binding';
4
4
  import { FormFieldProps } from '../../FormField/FormField';
5
5
  import { ControlProps } from '../../shared/form.types';
6
6
  import { InputVariantProps } from '../../shared/input.cva';
@@ -9,12 +9,12 @@ interface TimePickerBaseProps extends FormFieldProps, InputVariantProps, Omit<Ar
9
9
  disableDropdown?: boolean;
10
10
  date?: string | null;
11
11
  isClearable?: boolean;
12
+ isClearableIfDisabled?: boolean;
12
13
  isDirty?: boolean;
13
14
  disableManualEntry?: boolean;
14
15
  placeholder?: string;
15
16
  inputClassName?: string;
16
17
  onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
17
- fireBlurOnChange?: boolean;
18
18
  shouldForceLeadingZeros?: boolean;
19
19
  }
20
20
  export interface TimePickerProps extends Omit<TimePickerBaseProps, "value" | "onChange"> {