@povio/ui 3.4.0-rc.10 → 3.4.0-rc.11

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/icons/Account.d.ts +2 -0
  2. package/dist/assets/icons/AlignCenter.d.ts +2 -0
  3. package/dist/assets/icons/AlignCenter.js +30 -0
  4. package/dist/assets/icons/AlignLeft.d.ts +2 -0
  5. package/dist/assets/icons/AlignLeft.js +30 -0
  6. package/dist/assets/icons/AlignLeftRight.d.ts +2 -0
  7. package/dist/assets/icons/AlignLeftRight.js +30 -0
  8. package/dist/assets/icons/AlignRight.d.ts +2 -0
  9. package/dist/assets/icons/AlignRight.js +30 -0
  10. package/dist/assets/icons/ArrowDropDown.d.ts +2 -0
  11. package/dist/assets/icons/ArrowDropDown.js +30 -0
  12. package/dist/assets/icons/ArrowDropUp.d.ts +2 -0
  13. package/dist/assets/icons/ArrowDropUp.js +30 -0
  14. package/dist/assets/icons/ArrowLeft.d.ts +2 -0
  15. package/dist/assets/icons/ArrowLeft.js +30 -0
  16. package/dist/assets/icons/ArrowRight.d.ts +2 -0
  17. package/dist/assets/icons/ArrowRight.js +30 -0
  18. package/dist/assets/icons/Board.d.ts +2 -0
  19. package/dist/assets/icons/Bold.d.ts +2 -0
  20. package/dist/assets/icons/Bold.js +30 -0
  21. package/dist/assets/icons/BulletedList.d.ts +2 -0
  22. package/dist/assets/icons/BulletedList.js +30 -0
  23. package/dist/assets/icons/Calendar.d.ts +2 -0
  24. package/dist/assets/icons/Calendar.js +32 -0
  25. package/dist/assets/icons/Check.d.ts +2 -0
  26. package/dist/assets/icons/Check.js +32 -0
  27. package/dist/assets/icons/CheckCircle.d.ts +2 -0
  28. package/dist/assets/icons/CheckCircle.js +30 -0
  29. package/dist/assets/icons/CheckboxCheckmark.d.ts +2 -0
  30. package/dist/assets/icons/CheckboxCheckmark.js +33 -0
  31. package/dist/assets/icons/CheckboxIndeterminate.d.ts +2 -0
  32. package/dist/assets/icons/CheckboxIndeterminate.js +33 -0
  33. package/dist/assets/icons/ChevronDown.d.ts +2 -0
  34. package/dist/assets/icons/ChevronDown.js +32 -0
  35. package/dist/assets/icons/ChevronLeft.d.ts +2 -0
  36. package/dist/assets/icons/ChevronLeft.js +32 -0
  37. package/dist/assets/icons/ChevronRight.d.ts +2 -0
  38. package/dist/assets/icons/ChevronRight.js +32 -0
  39. package/dist/assets/icons/ChevronUp.d.ts +2 -0
  40. package/dist/assets/icons/ChevronUp.js +32 -0
  41. package/dist/assets/icons/ChevronsLeft.d.ts +2 -0
  42. package/dist/assets/icons/ChevronsLeft.js +32 -0
  43. package/dist/assets/icons/ChevronsRight.d.ts +2 -0
  44. package/dist/assets/icons/ChevronsRight.js +32 -0
  45. package/dist/assets/icons/Clock.d.ts +2 -0
  46. package/dist/assets/icons/Clock.js +30 -0
  47. package/dist/assets/icons/Close.d.ts +2 -0
  48. package/dist/assets/icons/Close.js +30 -0
  49. package/dist/assets/icons/DateTime.d.ts +2 -0
  50. package/dist/assets/icons/DateTime.js +39 -0
  51. package/dist/assets/icons/DragIndicator.d.ts +2 -0
  52. package/dist/assets/icons/DragIndicator.js +30 -0
  53. package/dist/assets/icons/Edit.d.ts +2 -0
  54. package/dist/assets/icons/Emoji.d.ts +2 -0
  55. package/dist/assets/icons/File.d.ts +2 -0
  56. package/dist/assets/icons/File.js +32 -0
  57. package/dist/assets/icons/Grid.d.ts +2 -0
  58. package/dist/assets/icons/Highlight.d.ts +2 -0
  59. package/dist/assets/icons/Highlight.js +30 -0
  60. package/dist/assets/icons/HighlightOn.d.ts +6 -0
  61. package/dist/assets/icons/HighlightOn.js +55 -0
  62. package/dist/assets/icons/Home.d.ts +2 -0
  63. package/dist/assets/icons/Home.js +30 -0
  64. package/dist/assets/icons/Image.d.ts +2 -0
  65. package/dist/assets/icons/ImageError.d.ts +2 -0
  66. package/dist/assets/icons/Info.d.ts +2 -0
  67. package/dist/assets/icons/Info.js +41 -0
  68. package/dist/assets/icons/Italic.d.ts +2 -0
  69. package/dist/assets/icons/Italic.js +30 -0
  70. package/dist/assets/icons/Link.d.ts +2 -0
  71. package/dist/assets/icons/Link.js +30 -0
  72. package/dist/assets/icons/Loader.d.ts +2 -0
  73. package/dist/assets/icons/MapPin.d.ts +2 -0
  74. package/dist/assets/icons/Menu.d.ts +2 -0
  75. package/dist/assets/icons/Menu.js +30 -0
  76. package/dist/assets/icons/Minus.d.ts +2 -0
  77. package/dist/assets/icons/MoreHoriz.d.ts +2 -0
  78. package/dist/assets/icons/NumberedList.d.ts +2 -0
  79. package/dist/assets/icons/NumberedList.js +30 -0
  80. package/dist/assets/icons/Pause.d.ts +2 -0
  81. package/dist/assets/icons/Plus.d.ts +2 -0
  82. package/dist/assets/icons/PointerHorizontal.d.ts +2 -0
  83. package/dist/assets/icons/PointerHorizontal.js +30 -0
  84. package/dist/assets/icons/PointerVertical.d.ts +2 -0
  85. package/dist/assets/icons/PointerVertical.js +30 -0
  86. package/dist/assets/icons/Retry.d.ts +2 -0
  87. package/dist/assets/icons/Search.d.ts +2 -0
  88. package/dist/assets/icons/Search.js +30 -0
  89. package/dist/assets/icons/Send.d.ts +2 -0
  90. package/dist/assets/icons/Send.js +32 -0
  91. package/dist/assets/icons/Share.d.ts +2 -0
  92. package/dist/assets/icons/Slash.d.ts +2 -0
  93. package/dist/assets/icons/Strikethrough.d.ts +2 -0
  94. package/dist/assets/icons/Strikethrough.js +30 -0
  95. package/dist/assets/icons/TextColor.d.ts +6 -0
  96. package/dist/assets/icons/TextColor.js +52 -0
  97. package/dist/assets/icons/Today.d.ts +2 -0
  98. package/dist/assets/icons/Today.js +30 -0
  99. package/dist/assets/icons/Trash.d.ts +2 -0
  100. package/dist/assets/icons/Underlined.d.ts +2 -0
  101. package/dist/assets/icons/Underlined.js +32 -0
  102. package/dist/assets/icons/Upload.d.ts +2 -0
  103. package/dist/assets/icons/Upload.js +39 -0
  104. package/dist/assets/icons/User.d.ts +2 -0
  105. package/dist/assets/icons/Visibility.d.ts +2 -0
  106. package/dist/assets/icons/Visibility.js +30 -0
  107. package/dist/assets/icons/VisibilityOff.d.ts +2 -0
  108. package/dist/assets/icons/VisibilityOff.js +30 -0
  109. package/dist/assets/icons/WarningFilled.d.ts +2 -0
  110. package/dist/assets/icons/WarningFilled.js +32 -0
  111. package/dist/assets/icons/WarningOutlined.d.ts +2 -0
  112. package/dist/components/Breadcrumbs/Breadcrumbs.js +7 -7
  113. package/dist/components/Menu/MenuDesktop.js +1 -1
  114. package/dist/components/Menu/MenuItem.js +4 -4
  115. package/dist/components/Menu/MenuMobile.js +5 -5
  116. package/dist/components/Menu/MenuPopover.js +2 -2
  117. package/dist/components/buttons/Button/Button.js +1 -1
  118. package/dist/components/buttons/PillButton/PillButton.js +4 -4
  119. package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
  120. package/dist/components/buttons/SplitButton/SplitButton.js +3 -3
  121. package/dist/components/buttons/shared/ButtonContent.js +2 -2
  122. package/dist/components/buttons/shared/buttonContent.cva.d.ts +1 -1
  123. package/dist/components/inputs/Checkbox/Checkbox.d.ts +2 -1
  124. package/dist/components/inputs/Checkbox/Checkbox.js +102 -95
  125. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +3 -2
  126. package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +2 -1
  127. package/dist/components/inputs/Checkbox/CheckboxGroup.js +115 -111
  128. package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +2 -2
  129. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +22 -17
  130. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +2 -2
  131. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +23 -17
  132. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +2 -2
  133. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +25 -21
  134. package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +2 -2
  135. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +238 -225
  136. package/dist/components/inputs/DateTime/shared/Calendar.js +1 -1
  137. package/dist/components/inputs/DateTime/shared/CalendarCell.js +1 -1
  138. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +1 -1
  139. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +10 -7
  140. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +12 -8
  141. package/dist/components/inputs/DateTime/shared/DateField.d.ts +1 -2
  142. package/dist/components/inputs/DateTime/shared/DateField.js +4 -4
  143. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +2 -2
  144. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +16 -8
  145. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +3 -3
  146. package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +2 -2
  147. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +1 -1
  148. package/dist/components/inputs/DateTime/shared/MonthPicker.js +2 -2
  149. package/dist/components/inputs/DateTime/shared/RangeCalendar.js +2 -2
  150. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +5 -4
  151. package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -2
  152. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +11 -10
  153. package/dist/components/inputs/DateTime/shared/YearPicker.js +2 -2
  154. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +1 -46
  155. package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.js +1 -1
  156. package/dist/components/inputs/File/FileUpload.d.ts +1 -1
  157. package/dist/components/inputs/File/FileUpload.js +20 -20
  158. package/dist/components/inputs/File/InputUpload.d.ts +1 -1
  159. package/dist/components/inputs/File/InputUpload.js +19 -19
  160. package/dist/components/inputs/File/fileUpload.types.d.ts +1 -1
  161. package/dist/components/inputs/File/inputUpload.types.d.ts +1 -1
  162. package/dist/components/inputs/File/shared/FileCard.js +1 -1
  163. package/dist/components/inputs/File/shared/FileCardList.js +1 -1
  164. package/dist/components/inputs/File/shared/FileUploadContent.js +1 -1
  165. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +3 -3
  166. package/dist/components/inputs/File/shared/FileUploadContentError.js +6 -5
  167. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +6 -5
  168. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +5 -4
  169. package/dist/components/inputs/File/shared/InputUploadContent.js +4 -4
  170. package/dist/components/inputs/File/shared/InputUploadFilled.js +3 -3
  171. package/dist/components/inputs/FormField/FormFieldError.js +1 -1
  172. package/dist/components/inputs/FormField/FormFieldHeader.js +4 -4
  173. package/dist/components/inputs/FormField/FormFieldHeaderClose.js +3 -3
  174. package/dist/components/inputs/FormField/FormFieldHelper.js +1 -1
  175. package/dist/components/inputs/FormField/FormFieldLabel.js +2 -2
  176. package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +1 -1
  177. package/dist/components/inputs/Input/NumberInput/NumberInput.js +107 -109
  178. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +1 -2
  179. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +254 -265
  180. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +1 -2
  181. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +24 -25
  182. package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +1 -1
  183. package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +4 -3
  184. package/dist/components/inputs/Input/TextArea/TextArea.d.ts +1 -2
  185. package/dist/components/inputs/Input/TextArea/TextArea.js +117 -118
  186. package/dist/components/inputs/Input/TextInput/TextInput.d.ts +2 -2
  187. package/dist/components/inputs/Input/TextInput/TextInput.js +129 -129
  188. package/dist/components/inputs/Input/shared/InputContent.d.ts +1 -2
  189. package/dist/components/inputs/Input/shared/InputContent.js +48 -50
  190. package/dist/components/inputs/Inputs/Form.d.ts +4 -4
  191. package/dist/components/inputs/Inputs/Form.js +1 -1
  192. package/dist/components/inputs/Inputs/InputItem.d.ts +22 -22
  193. package/dist/components/inputs/Inputs/InputItem.js +37 -36
  194. package/dist/components/inputs/Inputs/Inputs.d.ts +2 -2
  195. package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +2 -1
  196. package/dist/components/inputs/RadioGroup/RadioGroup.js +113 -109
  197. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +1 -1
  198. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +16 -16
  199. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +1 -1
  200. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +20 -20
  201. package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +1 -1
  202. package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +1 -1
  203. package/dist/components/inputs/Selection/Select/QuerySelect.js +20 -20
  204. package/dist/components/inputs/Selection/Select/Select.d.ts +1 -1
  205. package/dist/components/inputs/Selection/Select/Select.js +23 -23
  206. package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -1
  207. package/dist/components/inputs/Selection/shared/SelectBase.js +37 -34
  208. package/dist/components/inputs/Selection/shared/SelectDesktop.js +56 -58
  209. package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
  210. package/dist/components/inputs/Selection/shared/SelectInput.js +56 -57
  211. package/dist/components/inputs/Selection/shared/SelectListBox.js +1 -1
  212. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +2 -2
  213. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +2 -2
  214. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +1 -1
  215. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +1 -1
  216. package/dist/components/inputs/Selection/shared/SelectMobile.js +4 -5
  217. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +3 -3
  218. package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -2
  219. package/dist/components/inputs/Selection/shared/select.context.js +9 -5
  220. package/dist/components/inputs/Selection/shared/select.types.d.ts +1 -1
  221. package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -1
  222. package/dist/components/inputs/Skeleton/InputFrame.js +7 -10
  223. package/dist/components/inputs/Slider/Slider.d.ts +1 -1
  224. package/dist/components/inputs/Slider/Slider.js +20 -20
  225. package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -1
  226. package/dist/components/inputs/TextEditor/TextEditor.js +20 -20
  227. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +2 -2
  228. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +4 -4
  229. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +4 -4
  230. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +8 -5
  231. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +3 -3
  232. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +5 -4
  233. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +5 -4
  234. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +9 -6
  235. package/dist/components/inputs/Toggle/Toggle.d.ts +2 -1
  236. package/dist/components/inputs/Toggle/Toggle.js +65 -61
  237. package/dist/components/inputs/shared/CheckContent.js +1 -1
  238. package/dist/components/inputs/shared/InputClear.js +28 -45
  239. package/dist/components/inputs/shared/TooltipWrapper.d.ts +1 -1
  240. package/dist/components/inputs/shared/form.types.d.ts +8 -9
  241. package/dist/components/inputs/shared/input.cva.js +1 -1
  242. package/dist/components/inputs/shared/useStaticInputHandoff.js +38 -64
  243. package/dist/components/navigation/Accordion/Accordion.js +1 -1
  244. package/dist/components/navigation/Accordion/AccordionItem.js +3 -3
  245. package/dist/components/navigation/Stepper/Stepper.js +2 -2
  246. package/dist/components/navigation/Stepper/StepperItem.js +4 -4
  247. package/dist/components/overlays/ActionModal/ActionModal.js +1 -1
  248. package/dist/components/overlays/BottomSheet/BottomSheet.js +3 -3
  249. package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +4 -4
  250. package/dist/components/overlays/Drawer/Drawer.js +2 -2
  251. package/dist/components/overlays/Modal/Modal.js +3 -3
  252. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +1 -1
  253. package/dist/components/overlays/Tooltip/Tooltip.js +8 -15
  254. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +1 -1
  255. package/dist/components/segment/Segment.d.ts +1 -1
  256. package/dist/components/segment/Segment.js +21 -21
  257. package/dist/components/segment/SegmentItem.js +1 -1
  258. package/dist/components/segment/segment.types.d.ts +1 -1
  259. package/dist/components/shared/pagination/Pagination.js +1 -1
  260. package/dist/components/shared/pagination/PaginationList.js +9 -6
  261. package/dist/components/table/ColumnConfig.js +1 -1
  262. package/dist/components/table/InfiniteTable.js +1 -1
  263. package/dist/components/table/Table.js +8 -6
  264. package/dist/components/text/Link/Link.js +1 -1
  265. package/dist/components/text/Pill/Pill.js +3 -3
  266. package/dist/components/text/Tag/Tag.js +3 -3
  267. package/dist/config/confirmation.context.js +1 -1
  268. package/dist/config/link.context.js +1 -1
  269. package/dist/config/router.context.js +1 -1
  270. package/dist/config/theme.context.js +1 -1
  271. package/dist/config/uiConfig.context.d.ts +5 -14
  272. package/dist/config/uiConfig.context.js +11 -9
  273. package/dist/config/uiOverrides.context.js +2 -2
  274. package/dist/helpers/dynamicColumns.d.ts +1 -1
  275. package/dist/helpers/dynamicInputs.d.ts +7 -7
  276. package/dist/hooks/useAutosave.d.ts +4 -4
  277. package/dist/hooks/useAutosave.js +49 -64
  278. package/dist/hooks/useFilters.js +1 -1
  279. package/dist/hooks/useForm.d.ts +15 -39
  280. package/dist/hooks/useForm.js +43 -96
  281. package/dist/hooks/useFormAutosave.d.ts +9 -8
  282. package/dist/hooks/useFormAutosave.js +9 -23
  283. package/dist/hooks/useIntersectionObserver.js +1 -1
  284. package/dist/hooks/useLocalStorage.js +1 -1
  285. package/dist/hooks/usePagination.js +1 -1
  286. package/dist/hooks/useScrollableListBox.js +1 -1
  287. package/dist/hooks/useSorting.js +1 -1
  288. package/dist/hooks/useStateAndRef.js +1 -1
  289. package/dist/hooks/useTableColumnConfig.js +1 -1
  290. package/dist/index.d.ts +263 -1
  291. package/dist/index.js +71 -11
  292. package/package.json +3 -15
  293. package/dist/assets/locales/en/translation.json.d.ts +0 -158
  294. package/dist/assets/locales/sl/translation.json.d.ts +0 -154
  295. package/dist/components/inputs/shared/form.binding.d.ts +0 -27
  296. package/dist/components/inputs/shared/form.binding.js +0 -57
  297. package/dist/components/inputs/shared/form.types.js +0 -8
  298. package/dist/rhf/Inputs.d.ts +0 -60
  299. package/dist/rhf/Inputs.js +0 -148
  300. package/dist/rhf/components.d.ts +0 -80
  301. package/dist/rhf/components.js +0 -101
  302. package/dist/rhf/dynamicInputs.d.ts +0 -18
  303. package/dist/rhf/dynamicInputs.js +0 -5
  304. package/dist/rhf/fieldAdapter.d.ts +0 -7
  305. package/dist/rhf/fieldAdapter.js +0 -40
  306. package/dist/rhf/form.types.d.ts +0 -12
  307. package/dist/rhf/useAutosave.d.ts +0 -10
  308. package/dist/rhf/useAutosave.js +0 -71
  309. package/dist/rhf/useForm.d.ts +0 -18
  310. package/dist/rhf/useForm.js +0 -48
  311. package/dist/rhf/useFormAutosave.d.ts +0 -15
  312. package/dist/rhf/useFormAutosave.js +0 -59
  313. package/dist/rhf.d.ts +0 -225
  314. package/dist/tanstack.d.ts +0 -224
  315. package/dist/tanstack.js +0 -141
  316. /package/dist/{rhf/entrypoints.type-test.d.ts → hooks/useAutosave.spec.d.ts} +0 -0
@@ -1,31 +1,32 @@
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";
4
3
  import { checkboxContentRowDefinition, checkboxContentWrapperDefinition, checkboxGroupLabelDefinition } from "./checkbox.cva.js";
5
4
  import { CheckboxBase } from "./Checkbox.js";
6
5
  import { FormFieldLabel } from "../FormField/FormFieldLabel.js";
7
6
  import { FormField } from "../FormField/FormField.js";
8
7
  import { inputBaseDefinition, inputSizeDefinition } from "../shared/input.cva.js";
9
- import { clsx } from "clsx";
10
- import { CheckboxGroup } from "react-aria-components";
11
8
  import { c } from "react/compiler-runtime";
12
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
+ import { clsx } from "clsx";
11
+ import { CheckboxGroup } from "react-aria-components";
13
12
  import { useLabel } from "react-aria";
14
13
  import { mergeRefs } from "@react-aria/utils";
14
+ import { Controller } from "react-hook-form";
15
15
  //#region src/components/inputs/Checkbox/CheckboxGroup.tsx
16
16
  var CheckboxGroupBase = (props) => {
17
- const $ = c(99);
17
+ const $ = c(101);
18
18
  const ui = UIConfig.useConfig();
19
19
  const checkboxContentWrapperCva = UIOverrides.useCva("checkbox.contentWrapperCva", checkboxContentWrapperDefinition);
20
20
  const checkboxContentRowCva = UIOverrides.useCva("checkbox.contentRowCva", checkboxContentRowDefinition);
21
21
  const checkboxGroupLabelCva = UIOverrides.useCva("checkbox.groupLabelCva", checkboxGroupLabelDefinition);
22
22
  const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
23
23
  const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
24
- const { ref, label, tooltipText, helperText, isDirty, isRequired, rightContent, isDisabled, headerClassName, errorClassName, labelClassName, inputClassName, isHeaderHidden, error, className, options, allValue, value, defaultValue, onChange, onBlur, as: asProp, size: sizeProp, variant: variantProp, hideLabel: hideLabelProp, ...rest } = props;
24
+ const { ref, label, tooltipText, helperText, isDirty, isRequired, rightContent, isDisabled, headerClassName, errorClassName, labelClassName, inputClassName, isHeaderHidden, error, className, options, allValue, value, defaultValue, onChange, onBlur, fireBlurOnChange: fireBlurOnChangeProp, as: asProp, size: sizeProp, variant: variantProp, hideLabel: hideLabelProp, ...rest } = props;
25
25
  const as = asProp ?? ui.input.as;
26
26
  const size = sizeProp ?? ui.input.size;
27
27
  const variant = variantProp ?? ui.checkbox.variant;
28
28
  const hideLabel = hideLabelProp ?? ui.input.hideLabel;
29
+ const fireBlurOnChange = fireBlurOnChangeProp ?? ui.checkbox.fireBlurOnChange;
29
30
  let optionValues;
30
31
  let resolvedValue;
31
32
  let t0;
@@ -121,16 +122,19 @@ var CheckboxGroupBase = (props) => {
121
122
  } else t5 = $[31];
122
123
  const headerProps = t5;
123
124
  let t6;
124
- if ($[32] !== allValue || $[33] !== onChange || $[34] !== optionValues) {
125
+ if ($[32] !== allValue || $[33] !== fireBlurOnChange || $[34] !== onBlur || $[35] !== onChange || $[36] !== optionValues) {
125
126
  t6 = (nextValue) => {
126
127
  const hasAllOptions = allValue !== void 0 && optionValues.length > 0 && optionValues.every((optionValue) => nextValue.includes(optionValue));
127
128
  onChange?.(hasAllOptions ? allValue : nextValue);
129
+ if (fireBlurOnChange) onBlur?.({});
128
130
  };
129
131
  $[32] = allValue;
130
- $[33] = onChange;
131
- $[34] = optionValues;
132
- $[35] = t6;
133
- } else t6 = $[35];
132
+ $[33] = fireBlurOnChange;
133
+ $[34] = onBlur;
134
+ $[35] = onChange;
135
+ $[36] = optionValues;
136
+ $[37] = t6;
137
+ } else t6 = $[37];
134
138
  const handleChange = t6;
135
139
  const T0 = CheckboxGroup;
136
140
  const t7 = !!error;
@@ -140,26 +144,26 @@ var CheckboxGroupBase = (props) => {
140
144
  const T1 = FormField;
141
145
  const t11 = as === "inline" && "h-full";
142
146
  let t12;
143
- if ($[36] !== className || $[37] !== t11) {
147
+ if ($[38] !== className || $[39] !== t11) {
144
148
  t12 = clsx("w-full", t11, className);
145
- $[36] = className;
146
- $[37] = t11;
147
- $[38] = t12;
148
- } else t12 = $[38];
149
+ $[38] = className;
150
+ $[39] = t11;
151
+ $[40] = t12;
152
+ } else t12 = $[40];
149
153
  const t13 = as === "inline" ? -1 : void 0;
150
154
  let t14;
151
- if ($[39] !== as || $[40] !== inputBaseCva || $[41] !== inputClassName || $[42] !== shouldRenderInputFrame || $[43] !== ui) {
155
+ if ($[41] !== as || $[42] !== inputBaseCva || $[43] !== inputClassName || $[44] !== shouldRenderInputFrame || $[45] !== ui) {
152
156
  t14 = clsx("group/checkbox-group-content relative", shouldRenderInputFrame && inputBaseCva({
153
157
  variant: ui.input.variant,
154
158
  as
155
159
  }), inputClassName);
156
- $[39] = as;
157
- $[40] = inputBaseCva;
158
- $[41] = inputClassName;
159
- $[42] = shouldRenderInputFrame;
160
- $[43] = ui;
161
- $[44] = t14;
162
- } else t14 = $[44];
160
+ $[41] = as;
161
+ $[42] = inputBaseCva;
162
+ $[43] = inputClassName;
163
+ $[44] = shouldRenderInputFrame;
164
+ $[45] = ui;
165
+ $[46] = t14;
166
+ } else t14 = $[46];
163
167
  const t15 = "";
164
168
  const t16 = isDisabled || void 0;
165
169
  const t17 = isDisabled || void 0;
@@ -179,20 +183,20 @@ var CheckboxGroupBase = (props) => {
179
183
  const t22 = isDirty || void 0;
180
184
  const t23 = isRequired || void 0;
181
185
  let t24;
182
- if ($[45] !== as || $[46] !== checkboxGroupLabelCva || $[47] !== headerClassName || $[48] !== headerProps || $[49] !== size) {
186
+ if ($[47] !== as || $[48] !== checkboxGroupLabelCva || $[49] !== headerClassName || $[50] !== headerProps || $[51] !== size) {
183
187
  t24 = as && ["filter", "floating"].includes(as) && /* @__PURE__ */ jsx(FormFieldLabel, {
184
188
  ...headerProps,
185
189
  as: as === "floating" ? "filter" : as,
186
190
  size,
187
191
  className: clsx(headerClassName, checkboxGroupLabelCva({ as }))
188
192
  });
189
- $[45] = as;
190
- $[46] = checkboxGroupLabelCva;
191
- $[47] = headerClassName;
192
- $[48] = headerProps;
193
- $[49] = size;
194
- $[50] = t24;
195
- } else t24 = $[50];
193
+ $[47] = as;
194
+ $[48] = checkboxGroupLabelCva;
195
+ $[49] = headerClassName;
196
+ $[50] = headerProps;
197
+ $[51] = size;
198
+ $[52] = t24;
199
+ } else t24 = $[52];
196
200
  const t25 = checkboxContentRowCva({
197
201
  variant,
198
202
  as,
@@ -200,9 +204,9 @@ var CheckboxGroupBase = (props) => {
200
204
  ...rest
201
205
  });
202
206
  let t26;
203
- if ($[51] !== hideLabel || $[52] !== labelClassName || $[53] !== options || $[54] !== variant) {
207
+ if ($[53] !== hideLabel || $[54] !== labelClassName || $[55] !== options || $[56] !== variant) {
204
208
  let t27;
205
- if ($[56] !== hideLabel || $[57] !== labelClassName || $[58] !== variant) {
209
+ if ($[58] !== hideLabel || $[59] !== labelClassName || $[60] !== variant) {
206
210
  t27 = (option_0) => /* @__PURE__ */ jsx(CheckboxBase, {
207
211
  value: option_0.value,
208
212
  variant,
@@ -211,45 +215,45 @@ var CheckboxGroupBase = (props) => {
211
215
  labelClassName,
212
216
  children: option_0.label
213
217
  }, option_0.value);
214
- $[56] = hideLabel;
215
- $[57] = labelClassName;
216
- $[58] = variant;
217
- $[59] = t27;
218
- } else t27 = $[59];
218
+ $[58] = hideLabel;
219
+ $[59] = labelClassName;
220
+ $[60] = variant;
221
+ $[61] = t27;
222
+ } else t27 = $[61];
219
223
  t26 = options.map(t27);
220
- $[51] = hideLabel;
221
- $[52] = labelClassName;
222
- $[53] = options;
223
- $[54] = variant;
224
- $[55] = t26;
225
- } else t26 = $[55];
224
+ $[53] = hideLabel;
225
+ $[54] = labelClassName;
226
+ $[55] = options;
227
+ $[56] = variant;
228
+ $[57] = t26;
229
+ } else t26 = $[57];
226
230
  let t27;
227
- if ($[60] !== t25 || $[61] !== t26) {
231
+ if ($[62] !== t25 || $[63] !== t26) {
228
232
  t27 = /* @__PURE__ */ jsx("div", {
229
233
  className: t25,
230
234
  children: t26
231
235
  });
232
- $[60] = t25;
233
- $[61] = t26;
234
- $[62] = t27;
235
- } else t27 = $[62];
236
+ $[62] = t25;
237
+ $[63] = t26;
238
+ $[64] = t27;
239
+ } else t27 = $[64];
236
240
  let t28;
237
- if ($[63] !== t21 || $[64] !== t22 || $[65] !== t23 || $[66] !== t24 || $[67] !== t27) {
241
+ if ($[65] !== t21 || $[66] !== t22 || $[67] !== t23 || $[68] !== t24 || $[69] !== t27) {
238
242
  t28 = /* @__PURE__ */ jsxs("div", {
239
243
  className: t21,
240
244
  "data-is-dirty": t22,
241
245
  "data-is-required": t23,
242
246
  children: [t24, t27]
243
247
  });
244
- $[63] = t21;
245
- $[64] = t22;
246
- $[65] = t23;
247
- $[66] = t24;
248
- $[67] = t27;
249
- $[68] = t28;
250
- } else t28 = $[68];
248
+ $[65] = t21;
249
+ $[66] = t22;
250
+ $[67] = t23;
251
+ $[68] = t24;
252
+ $[69] = t27;
253
+ $[70] = t28;
254
+ } else t28 = $[70];
251
255
  let t29;
252
- if ($[69] !== t14 || $[70] !== t16 || $[71] !== t17 || $[72] !== t18 || $[73] !== t19 || $[74] !== t28) {
256
+ if ($[71] !== t14 || $[72] !== t16 || $[73] !== t17 || $[74] !== t18 || $[75] !== t19 || $[76] !== t28) {
253
257
  t29 = /* @__PURE__ */ jsx("div", {
254
258
  className: t14,
255
259
  "data-rac": t15,
@@ -260,16 +264,16 @@ var CheckboxGroupBase = (props) => {
260
264
  "data-checkbox-group-content": t20,
261
265
  children: t28
262
266
  });
263
- $[69] = t14;
264
- $[70] = t16;
265
- $[71] = t17;
266
- $[72] = t18;
267
- $[73] = t19;
268
- $[74] = t28;
269
- $[75] = t29;
270
- } else t29 = $[75];
267
+ $[71] = t14;
268
+ $[72] = t16;
269
+ $[73] = t17;
270
+ $[74] = t18;
271
+ $[75] = t19;
272
+ $[76] = t28;
273
+ $[77] = t29;
274
+ } else t29 = $[77];
271
275
  let t30;
272
- if ($[76] !== T1 || $[77] !== as || $[78] !== formFieldProps || $[79] !== labelProps || $[80] !== t12 || $[81] !== t13 || $[82] !== t29) {
276
+ if ($[78] !== T1 || $[79] !== as || $[80] !== formFieldProps || $[81] !== labelProps || $[82] !== t12 || $[83] !== t13 || $[84] !== t29) {
273
277
  t30 = /* @__PURE__ */ jsx(T1, {
274
278
  ...formFieldProps,
275
279
  as,
@@ -278,17 +282,17 @@ var CheckboxGroupBase = (props) => {
278
282
  tabIndex: t13,
279
283
  children: t29
280
284
  });
281
- $[76] = T1;
282
- $[77] = as;
283
- $[78] = formFieldProps;
284
- $[79] = labelProps;
285
- $[80] = t12;
286
- $[81] = t13;
287
- $[82] = t29;
288
- $[83] = t30;
289
- } else t30 = $[83];
285
+ $[78] = T1;
286
+ $[79] = as;
287
+ $[80] = formFieldProps;
288
+ $[81] = labelProps;
289
+ $[82] = t12;
290
+ $[83] = t13;
291
+ $[84] = t29;
292
+ $[85] = t30;
293
+ } else t30 = $[85];
290
294
  let t31;
291
- if ($[84] !== T0 || $[85] !== fieldProps || $[86] !== handleChange || $[87] !== isDisabled || $[88] !== isRequired || $[89] !== onBlur || $[90] !== ref || $[91] !== resolvedDefaultValue || $[92] !== resolvedValue || $[93] !== rest || $[94] !== t30 || $[95] !== t7 || $[96] !== t8 || $[97] !== t9) {
295
+ if ($[86] !== T0 || $[87] !== fieldProps || $[88] !== handleChange || $[89] !== isDisabled || $[90] !== isRequired || $[91] !== onBlur || $[92] !== ref || $[93] !== resolvedDefaultValue || $[94] !== resolvedValue || $[95] !== rest || $[96] !== t30 || $[97] !== t7 || $[98] !== t8 || $[99] !== t9) {
292
296
  t31 = /* @__PURE__ */ jsx(T0, {
293
297
  ...rest,
294
298
  ...fieldProps,
@@ -305,55 +309,55 @@ var CheckboxGroupBase = (props) => {
305
309
  className: t10,
306
310
  children: t30
307
311
  });
308
- $[84] = T0;
309
- $[85] = fieldProps;
310
- $[86] = handleChange;
311
- $[87] = isDisabled;
312
- $[88] = isRequired;
313
- $[89] = onBlur;
314
- $[90] = ref;
315
- $[91] = resolvedDefaultValue;
316
- $[92] = resolvedValue;
317
- $[93] = rest;
318
- $[94] = t30;
319
- $[95] = t7;
320
- $[96] = t8;
321
- $[97] = t9;
322
- $[98] = t31;
323
- } else t31 = $[98];
312
+ $[86] = T0;
313
+ $[87] = fieldProps;
314
+ $[88] = handleChange;
315
+ $[89] = isDisabled;
316
+ $[90] = isRequired;
317
+ $[91] = onBlur;
318
+ $[92] = ref;
319
+ $[93] = resolvedDefaultValue;
320
+ $[94] = resolvedValue;
321
+ $[95] = rest;
322
+ $[96] = t30;
323
+ $[97] = t7;
324
+ $[98] = t8;
325
+ $[99] = t9;
326
+ $[100] = t31;
327
+ } else t31 = $[100];
324
328
  return t31;
325
329
  };
326
330
  var CheckboxGroup$1 = (props) => {
327
331
  const $ = c(15);
328
- if ("field" in props && props.field) {
329
- let field;
332
+ if ("formControl" in props && props.formControl) {
333
+ let formControl;
330
334
  let innerProps;
331
335
  let ref;
332
336
  if ($[0] !== props) {
333
- ({field, ref, ...innerProps} = props);
337
+ ({formControl, ref, ...innerProps} = props);
334
338
  $[0] = props;
335
- $[1] = field;
339
+ $[1] = formControl;
336
340
  $[2] = innerProps;
337
341
  $[3] = ref;
338
342
  } else {
339
- field = $[1];
343
+ formControl = $[1];
340
344
  innerProps = $[2];
341
345
  ref = $[3];
342
346
  }
343
347
  let t0;
344
348
  if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
345
349
  t0 = (t1) => {
346
- const { field: field_0, fieldState: t2 } = t1;
350
+ const { field, fieldState: t2 } = t1;
347
351
  const { error, isDirty } = t2;
348
352
  return /* @__PURE__ */ jsx(CheckboxGroupBase, {
349
353
  ...innerProps,
350
- ref: mergeRefs(ref, field_0.ref),
351
- value: field_0.value,
352
- onChange: field_0.onChange,
353
- onBlur: field_0.onBlur,
354
- name: field_0.name,
354
+ ref: mergeRefs(ref, field.ref),
355
+ value: field.value,
356
+ onChange: field.onChange,
357
+ onBlur: field.onBlur,
358
+ name: field.name,
355
359
  isDirty,
356
- isDisabled: field_0.disabled || props.isDisabled,
360
+ isDisabled: field.disabled || props.isDisabled,
357
361
  error: props.error ?? error?.message
358
362
  });
359
363
  };
@@ -364,14 +368,14 @@ var CheckboxGroup$1 = (props) => {
364
368
  $[8] = t0;
365
369
  } else t0 = $[8];
366
370
  let t1;
367
- if ($[9] !== field.form || $[10] !== field.name || $[11] !== t0) {
368
- t1 = /* @__PURE__ */ jsx(FieldController, {
369
- control: field.form,
370
- name: field.name,
371
+ if ($[9] !== formControl.control || $[10] !== formControl.name || $[11] !== t0) {
372
+ t1 = /* @__PURE__ */ jsx(Controller, {
373
+ control: formControl.control,
374
+ name: formControl.name,
371
375
  render: t0
372
376
  });
373
- $[9] = field.form;
374
- $[10] = field.name;
377
+ $[9] = formControl.control;
378
+ $[10] = formControl.name;
375
379
  $[11] = t0;
376
380
  $[12] = t1;
377
381
  } else t1 = $[12];
@@ -1,6 +1,6 @@
1
1
  import { CalendarDate, DateValue } from '@internationalized/date';
2
2
  import { FocusEvent, Ref } from 'react';
3
- import { FieldValues } from '../../shared/form.binding';
3
+ import { FieldValues } from 'react-hook-form';
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,7 +12,6 @@ interface DatePickerBaseProps extends FormFieldProps, InputVariantProps, Omit<Da
12
12
  ref?: Ref<DatePickerInputHandle & HTMLDivElement>;
13
13
  disableDropdown?: boolean;
14
14
  isClearable?: boolean;
15
- isClearableIfDisabled?: boolean;
16
15
  className?: string;
17
16
  todayIcon?: DatePickerTodayIcon;
18
17
  todayIconButtonSize?: DatePickerTodayIconButtonSize;
@@ -27,6 +26,7 @@ interface DatePickerBaseProps extends FormFieldProps, InputVariantProps, Omit<Da
27
26
  shouldUpdateDateOnMonthYearChange?: boolean;
28
27
  granularity?: DatePickerGranularity;
29
28
  format?: string;
29
+ fireBlurOnChange?: boolean;
30
30
  }
31
31
  export interface DatePickerProps extends Omit<DatePickerBaseProps, "value" | "onChange" | "minValue" | "maxValue"> {
32
32
  value?: string | null;
@@ -1,6 +1,5 @@
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";
4
3
  import { FormField } from "../../FormField/FormField.js";
5
4
  import { Calendar } from "../shared/Calendar.js";
6
5
  import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
@@ -13,18 +12,20 @@ import { getStaticCalendarDateSegments, getStaticDateTimeFocusTarget } from "../
13
12
  import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
14
13
  import { InputFrame } from "../../Skeleton/InputFrame.js";
15
14
  import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
15
+ import { useDebounceCallback } from "../../../../hooks/useDebounceCallback.js";
16
+ import { jsx, jsxs } from "react/jsx-runtime";
16
17
  import { clsx } from "clsx";
17
18
  import { useCallback, 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";
21
22
  import { createCalendar, getLocalTimeZone, toCalendarDate, today } from "@internationalized/date";
22
23
  import { DateTime } from "luxon";
23
24
  import { useCalendarState, useDatePickerState } from "react-stately";
24
25
  //#region src/components/inputs/DateTime/DatePicker/DatePicker.tsx
25
26
  var DatePickerBase = (props) => {
26
27
  const ui = UIConfig.useConfig();
27
- const { ref, label, tooltipText, helperText, isRequired, rightContent, isDirty, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, className, placeholder, inputClassName, as: asProp, hideLabel: hideLabelProp, variant: variantProp, size: sizeProp, isClearable: isClearableProp, isClearableIfDisabled, todayIcon: todayIconProp, todayIconButtonSize: todayIconButtonSizeProp, todayIconButtonComponent: todayIconButtonComponentProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, shouldUpdateDateOnMonthYearChange: shouldUpdateDateOnMonthYearChangeProp, granularity: granularityProp, autoFixYear: autoFixYearProp, format, ...rest } = props;
28
+ const { ref, label, tooltipText, helperText, isRequired, rightContent, isDirty, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, className, placeholder, inputClassName, as: asProp, hideLabel: hideLabelProp, variant: variantProp, size: sizeProp, isClearable: isClearableProp, todayIcon: todayIconProp, todayIconButtonSize: todayIconButtonSizeProp, todayIconButtonComponent: todayIconButtonComponentProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, shouldUpdateDateOnMonthYearChange: shouldUpdateDateOnMonthYearChangeProp, granularity: granularityProp, autoFixYear: autoFixYearProp, fireBlurOnChange: fireBlurOnChangeProp, format, ...rest } = props;
28
29
  const as = asProp ?? ui.input.as;
29
30
  const hideLabel = hideLabelProp ?? ui.input.hideLabel;
30
31
  const variant = variantProp ?? ui.input.variant;
@@ -39,6 +40,7 @@ var DatePickerBase = (props) => {
39
40
  const shouldUpdateDateOnMonthYearChange = shouldUpdateDateOnMonthYearChangeProp ?? ui.dateInput.shouldUpdateDateOnMonthYearChange;
40
41
  const granularity = granularityProp ?? ui.dateInput.granularity;
41
42
  const autoFixYear = autoFixYearProp ?? ui.dateInput.autoFixYear;
43
+ const fireBlurOnChange = fireBlurOnChangeProp ?? ui.dateInput.fireBlurOnChange;
42
44
  const timeZone = ui.dateInput.timeZone;
43
45
  let effectiveTimeZone = getLocalTimeZone();
44
46
  if (timeZone !== "clientLocal") effectiveTimeZone = timeZone;
@@ -76,6 +78,7 @@ var DatePickerBase = (props) => {
76
78
  const handleBlur = (val) => {
77
79
  onBlur?.({ target: { value: val } });
78
80
  };
81
+ const { callback: debouncedBlur } = useDebounceCallback(handleBlur, { delay: 500 });
79
82
  const normalizedValue = value ?? null;
80
83
  const dialogState = useDatePickerState({
81
84
  ...rest,
@@ -96,6 +99,7 @@ var DatePickerBase = (props) => {
96
99
  }
97
100
  onChange?.(normalizedValue_0);
98
101
  dialogState.setValue(normalizedValue_0);
102
+ if (fireBlurOnChange) debouncedBlur(normalizedValue_0);
99
103
  if (normalizedValue_0) {
100
104
  calendarState.setFocusedDate(normalizedValue_0);
101
105
  return;
@@ -135,6 +139,7 @@ var DatePickerBase = (props) => {
135
139
  const newValue = dialogState.value ? normalizeByGranularity(dialogState.value) : dialogState.value;
136
140
  state.setValue(newValue);
137
141
  state.toggle();
142
+ if (fireBlurOnChange) handleBlur(newValue);
138
143
  };
139
144
  const onMonthYearChange = (selectedDate) => {
140
145
  if (!(shouldUpdateDateOnMonthYearChange || granularity !== "day")) return;
@@ -156,6 +161,7 @@ var DatePickerBase = (props) => {
156
161
  const onInputClear = () => {
157
162
  onChange?.(null);
158
163
  dialogState.setValue(null);
164
+ if (fireBlurOnChange) handleBlur(null);
159
165
  };
160
166
  const syncDialogFromControlledValue = () => {
161
167
  dialogState.setValue(state.value);
@@ -227,7 +233,6 @@ var DatePickerBase = (props) => {
227
233
  variant,
228
234
  size,
229
235
  isClearable,
230
- isClearableIfDisabled,
231
236
  headerProps,
232
237
  todayIcon,
233
238
  todayIconButtonSize,
@@ -239,6 +244,7 @@ var DatePickerBase = (props) => {
239
244
  dateGranularity: granularity,
240
245
  format,
241
246
  timeZone: effectiveTimeZone,
247
+ fireBlurOnChange,
242
248
  onClear: onInputClear
243
249
  }), (!disableDropdown || disableManualEntry) && state.isOpen && /* @__PURE__ */ jsx(DateTimeDialog, {
244
250
  footer: /* @__PURE__ */ jsx(DateTimeDialogFooter, {
@@ -341,7 +347,6 @@ var DatePickerInner = ({ fullIso = true, granularity = "day", minValue, maxValue
341
347
  });
342
348
  return /* @__PURE__ */ jsx(InputFrame, {
343
349
  ...props,
344
- onClear: () => props.onChange?.(null),
345
350
  isDisabled,
346
351
  className: clsx("group relative inline-flex w-full flex-col text-left", props.className),
347
352
  inputClassName: clsx("min-w-input-width-min-width", props.inputClassName),
@@ -386,20 +391,20 @@ var DatePickerInner = ({ fullIso = true, granularity = "day", minValue, maxValue
386
391
  });
387
392
  };
388
393
  var DatePicker = ({ fullIso = true, granularity = "day", minValue, maxValue, renderStaticInput, ...props }) => {
389
- if ("field" in props && props.field) {
390
- const { field, ref, ...innerProps } = props;
391
- const controlWithOptions = field.form;
392
- return /* @__PURE__ */ jsx(FieldController, {
393
- control: field.form,
394
- name: field.name,
395
- render: ({ field: field_0, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(DatePickerInner, {
394
+ if ("formControl" in props && props.formControl) {
395
+ const { formControl, ref, ...innerProps } = props;
396
+ const controlWithOptions = formControl.control;
397
+ return /* @__PURE__ */ jsx(Controller, {
398
+ control: formControl.control,
399
+ name: formControl.name,
400
+ render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(DatePickerInner, {
396
401
  ...innerProps,
397
- ref: mergeRefs(ref, field_0.ref),
398
- value: field_0.value ?? null,
399
- onChange: (value) => field_0.onChange(value ?? null),
400
- onBlur: field_0.onBlur,
402
+ ref: mergeRefs(ref, field.ref),
403
+ value: field.value ?? null,
404
+ onChange: field.onChange,
405
+ onBlur: field.onBlur,
401
406
  isDirty,
402
- isDisabled: field_0.disabled || props.isDisabled,
407
+ isDisabled: field.disabled || props.isDisabled,
403
408
  isFormControlDisabled: !!controlWithOptions._options?.disabled,
404
409
  error: props.error ?? error?.message,
405
410
  fullIso,
@@ -1,7 +1,7 @@
1
1
  import { CalendarDate } from '@internationalized/date';
2
2
  import { FocusEvent, Ref } from 'react';
3
3
  import { DateValue } from 'react-aria';
4
- import { FieldValues } from '../../shared/form.binding';
4
+ import { FieldValues } from 'react-hook-form';
5
5
  import { DateRangePickerStateOptions } from 'react-stately';
6
6
  import { DatePickerInputHandle } from '../shared/DatePickerInput';
7
7
  import { DatePickerTodayIcon, DatePickerTodayIconButtonComponent, DatePickerTodayIconButtonSize, DatePickerTodayIconPlacement } from '../shared/datePicker.types';
@@ -12,7 +12,6 @@ interface DateRangePickerBaseProps extends FormFieldProps, InputVariantProps, Om
12
12
  ref?: Ref<DatePickerInputHandle & HTMLDivElement>;
13
13
  disableDropdown?: boolean;
14
14
  isClearable?: boolean;
15
- isClearableIfDisabled?: boolean;
16
15
  hideSidebar?: boolean;
17
16
  className?: string;
18
17
  todayIcon?: DatePickerTodayIcon;
@@ -25,6 +24,7 @@ interface DateRangePickerBaseProps extends FormFieldProps, InputVariantProps, Om
25
24
  placeholder?: string;
26
25
  inputClassName?: string;
27
26
  onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
27
+ fireBlurOnChange?: boolean;
28
28
  allowPartialRange?: boolean;
29
29
  }
30
30
  export interface DateRangePickerProps extends Omit<DateRangePickerBaseProps, "value" | "onChange" | "minValue" | "maxValue"> {