@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,7 +1,7 @@
1
1
  import { Typography } from "../../../text/Typography/Typography.js";
2
2
  import { CalendarCell } from "./CalendarCell.js";
3
- import { clsx } from "clsx";
4
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { clsx } from "clsx";
5
5
  import { useCalendarGrid } from "@react-aria/calendar";
6
6
  //#region src/components/inputs/DateTime/shared/CalendarGrid.tsx
7
7
  var WEEK_INDICES = [
@@ -1,8 +1,11 @@
1
+ import { ArrowDropDownIcon } from "../../../../assets/icons/ArrowDropDown.js";
2
+ import { ArrowDropUpIcon } from "../../../../assets/icons/ArrowDropUp.js";
3
+ import { ChevronLeftIcon } from "../../../../assets/icons/ChevronLeft.js";
4
+ import { ChevronRightIcon } from "../../../../assets/icons/ChevronRight.js";
1
5
  import { PillButton } from "../../../buttons/PillButton/PillButton.js";
2
- import { ChevronDown, ChevronLeft, ChevronRight, ChevronUp } from "lucide-react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
3
7
  import { clsx } from "clsx";
4
8
  import { Button, ToggleButtonGroup } from "react-aria-components";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
9
  import { CalendarDateTime, Time } from "@internationalized/date";
7
10
  import { useDateFormatter } from "@react-aria/i18n";
8
11
  //#region src/components/inputs/DateTime/shared/CalendarHeader.tsx
@@ -40,7 +43,7 @@ var CalendarHeader = ({ calendarState, datePickerState, prevButtonProps, nextBut
40
43
  ...prevButtonProps,
41
44
  isDisabled: !!toggleState,
42
45
  className: clsx("shrink-0 focus-visible:outline-interactive-contained-secondary-focus", !!toggleState && "opacity-0"),
43
- children: /* @__PURE__ */ jsx(ChevronLeft, { className: "size-6 text-interactive-text-secondary-idle" })
46
+ children: /* @__PURE__ */ jsx(ChevronLeftIcon, { className: "size-6 text-interactive-text-secondary-idle" })
44
47
  })
45
48
  }),
46
49
  /* @__PURE__ */ jsxs(ToggleButtonGroup, {
@@ -50,7 +53,7 @@ var CalendarHeader = ({ calendarState, datePickerState, prevButtonProps, nextBut
50
53
  color: "secondary",
51
54
  variant: "subtle",
52
55
  iconPosition: "right",
53
- icon: toggleState === "month" ? ChevronUp : ChevronDown,
56
+ icon: toggleState === "month" ? ArrowDropUpIcon : ArrowDropDownIcon,
54
57
  toggle: true,
55
58
  isSelected: toggleState === "month",
56
59
  onChange: (isSelected) => {
@@ -70,7 +73,7 @@ var CalendarHeader = ({ calendarState, datePickerState, prevButtonProps, nextBut
70
73
  color: "secondary",
71
74
  variant: "subtle",
72
75
  iconPosition: "right",
73
- icon: toggleState === "year" ? ChevronUp : ChevronDown,
76
+ icon: toggleState === "year" ? ArrowDropUpIcon : ArrowDropDownIcon,
74
77
  toggle: true,
75
78
  isSelected: toggleState === "year",
76
79
  onChange: (isSelected_0) => {
@@ -94,7 +97,7 @@ var CalendarHeader = ({ calendarState, datePickerState, prevButtonProps, nextBut
94
97
  color: "secondary",
95
98
  variant: "subtle",
96
99
  iconPosition: "right",
97
- icon: toggleState === "time" ? ChevronUp : ChevronDown,
100
+ icon: toggleState === "time" ? ArrowDropUpIcon : ArrowDropDownIcon,
98
101
  toggle: true,
99
102
  isSelected: toggleState === "time",
100
103
  onChange: (isSelected_1) => setToggleState(isSelected_1 ? "time" : null),
@@ -108,7 +111,7 @@ var CalendarHeader = ({ calendarState, datePickerState, prevButtonProps, nextBut
108
111
  ...nextButtonProps,
109
112
  isDisabled: !!toggleState,
110
113
  className: clsx("shrink-0 focus-visible:outline-interactive-contained-secondary-focus", !!toggleState && "opacity-0"),
111
- children: /* @__PURE__ */ jsx(ChevronRight, { className: "size-6 text-interactive-text-secondary-idle" })
114
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, { className: "size-6 text-interactive-text-secondary-idle" })
112
115
  })
113
116
  })
114
117
  ]
@@ -1,10 +1,14 @@
1
+ import { ArrowDropDownIcon } from "../../../../assets/icons/ArrowDropDown.js";
2
+ import { ChevronLeftIcon } from "../../../../assets/icons/ChevronLeft.js";
3
+ import { ChevronRightIcon } from "../../../../assets/icons/ChevronRight.js";
4
+ import { ChevronsLeftIcon } from "../../../../assets/icons/ChevronsLeft.js";
5
+ import { ChevronsRightIcon } from "../../../../assets/icons/ChevronsRight.js";
1
6
  import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
2
7
  import { PillButton } from "../../../buttons/PillButton/PillButton.js";
3
8
  import "../../../../config/i18n.js";
4
9
  import { Select } from "../../Selection/Select/Select.js";
5
- import { ChevronDown, ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight } from "lucide-react";
6
- import { useMemo } from "react";
7
10
  import { jsx, jsxs } from "react/jsx-runtime";
11
+ import { useMemo } from "react";
8
12
  import { useTranslation } from "react-i18next";
9
13
  import { useDateFormatter } from "@react-aria/i18n";
10
14
  //#region src/components/inputs/DateTime/shared/CalendarSelectHeader.tsx
@@ -101,13 +105,13 @@ var CalendarSelectHeader = ({ state, isPrevMonthDisabled, isPrevYearDisabled, is
101
105
  color: "secondary",
102
106
  isDisabled: isPrevYearDisabled,
103
107
  onClick: handlePrevYear,
104
- icon: ChevronsLeft,
108
+ icon: ChevronsLeftIcon,
105
109
  label: t(($) => $.ui.datePicker.navigation.previousYear)
106
110
  }), /* @__PURE__ */ jsx(InlineIconButton, {
107
111
  color: "secondary",
108
112
  isDisabled: isPrevMonthDisabled,
109
113
  onClick: handlePrevMonth,
110
- icon: ChevronLeft,
114
+ icon: ChevronLeftIcon,
111
115
  label: t(($_0) => $_0.ui.datePicker.navigation.previousMonth)
112
116
  })]
113
117
  }),
@@ -120,7 +124,7 @@ var CalendarSelectHeader = ({ state, isPrevMonthDisabled, isPrevYearDisabled, is
120
124
  color: "secondary",
121
125
  variant: "subtle",
122
126
  iconPosition: "right",
123
- icon: ChevronDown,
127
+ icon: ArrowDropDownIcon,
124
128
  children: MONTHS[currentMonth].slice(0, 3)
125
129
  }),
126
130
  ignoreTriggerWidth: true,
@@ -138,7 +142,7 @@ var CalendarSelectHeader = ({ state, isPrevMonthDisabled, isPrevYearDisabled, is
138
142
  color: "secondary",
139
143
  variant: "subtle",
140
144
  iconPosition: "right",
141
- icon: ChevronDown,
145
+ icon: ArrowDropDownIcon,
142
146
  children: currentYear.toString()
143
147
  }),
144
148
  items: availableYears.map(({ year: year_0, isDisabled: isDisabled_3 }) => ({
@@ -156,13 +160,13 @@ var CalendarSelectHeader = ({ state, isPrevMonthDisabled, isPrevYearDisabled, is
156
160
  color: "secondary",
157
161
  isDisabled: isNextMonthDisabled,
158
162
  onClick: handleNextMonth,
159
- icon: ChevronRight,
163
+ icon: ChevronRightIcon,
160
164
  label: t(($_1) => $_1.ui.datePicker.navigation.nextMonth)
161
165
  }), /* @__PURE__ */ jsx(InlineIconButton, {
162
166
  color: "secondary",
163
167
  isDisabled: isNextYearDisabled,
164
168
  onClick: handleNextYear,
165
- icon: ChevronsRight,
169
+ icon: ChevronsRightIcon,
166
170
  label: t(($_2) => $_2.ui.datePicker.navigation.nextYear)
167
171
  })]
168
172
  })
@@ -15,7 +15,6 @@ interface DateFieldProps extends Omit<DateFieldStateOptions, "locale" | "createC
15
15
  timeZone?: string;
16
16
  segmentGroup?: string;
17
17
  shouldAutoFixYear?: boolean;
18
- preserveNullValue?: boolean;
19
18
  }
20
- export declare const DateField: ({ ref, onClearChange, hidePlaceholder, isDisabled, disableManualEntry, dateGranularity, isTimeOptional, format, timeZone, segmentGroup, shouldAutoFixYear, preserveNullValue, ...props }: DateFieldProps) => import("react/jsx-runtime").JSX.Element;
19
+ export declare const DateField: ({ ref, onClearChange, hidePlaceholder, isDisabled, disableManualEntry, dateGranularity, isTimeOptional, format, timeZone, segmentGroup, shouldAutoFixYear, ...props }: DateFieldProps) => import("react/jsx-runtime").JSX.Element;
21
20
  export {};
@@ -1,18 +1,18 @@
1
1
  import { DateSegmentItem } from "./DateSegmentItem.js";
2
2
  import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
3
+ import { Fragment, jsx } from "react/jsx-runtime";
3
4
  import { clsx } from "clsx";
4
5
  import { useCallback, useEffect, useImperativeHandle, useMemo, useRef } from "react";
5
- import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
6
6
  import { useDateField, useLocale } from "react-aria";
7
7
  import { CalendarDate, CalendarDateTime, createCalendar } from "@internationalized/date";
8
8
  import { DateTime } from "luxon";
9
9
  import { useDateFieldState } from "react-stately";
10
10
  //#region src/components/inputs/DateTime/shared/DateField.tsx
11
11
  var omitNullValue = ({ value: _value, ...props }) => props;
12
- var DateField = ({ ref, onClearChange, hidePlaceholder, isDisabled, disableManualEntry, dateGranularity = "day", isTimeOptional = false, format, timeZone, segmentGroup, shouldAutoFixYear = false, preserveNullValue = false, ...props }) => {
12
+ var DateField = ({ ref, onClearChange, hidePlaceholder, isDisabled, disableManualEntry, dateGranularity = "day", isTimeOptional = false, format, timeZone, segmentGroup, shouldAutoFixYear = false, ...props }) => {
13
13
  const { locale } = useLocale();
14
14
  const previousValueRef = useRef(props.value);
15
- const dateFieldProps = props.value == null && !preserveNullValue ? omitNullValue(props) : props;
15
+ const dateFieldProps = props.value == null ? omitNullValue(props) : props;
16
16
  const state = useDateFieldState({
17
17
  ...dateFieldProps,
18
18
  isDisabled,
@@ -130,7 +130,7 @@ var DateField = ({ ref, onClearChange, hidePlaceholder, isDisabled, disableManua
130
130
  return formattedDate.toFormat(format);
131
131
  };
132
132
  const formattedDisplayValue = getFormattedDisplayValue();
133
- let fieldContent = /* @__PURE__ */ jsx(Fragment$1, { children: segmentsToRender.map((segment_7, i) => /* @__PURE__ */ jsx(DateSegmentItem, {
133
+ let fieldContent = /* @__PURE__ */ jsx(Fragment, { children: segmentsToRender.map((segment_7, i) => /* @__PURE__ */ jsx(DateSegmentItem, {
134
134
  segment: segment_7,
135
135
  segmentGroup,
136
136
  state,
@@ -23,7 +23,6 @@ interface DatePickerInputProps extends InputVariantProps {
23
23
  isDateTime?: boolean;
24
24
  shouldShrinkInput?: boolean;
25
25
  isClearable?: boolean;
26
- isClearableIfDisabled?: boolean;
27
26
  headerProps?: FormFieldHeaderProps;
28
27
  todayIcon?: DatePickerTodayIcon;
29
28
  todayIconButtonSize?: DatePickerTodayIconButtonSize;
@@ -40,7 +39,8 @@ interface DatePickerInputProps extends InputVariantProps {
40
39
  timeZone?: string;
41
40
  isTimeOptional?: boolean;
42
41
  format?: string;
42
+ fireBlurOnChange?: boolean;
43
43
  onClear?: () => void;
44
44
  }
45
- export declare const DatePickerInput: ({ ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, shouldShrinkInput, isClearable, isClearableIfDisabled, headerProps, todayIcon, todayIconButtonSize, todayIconButtonComponent, todayIconPlacement, isDirty, isRequired, disableManualEntry, autoFixYear, placeholder, className, onOpenDropdown, dateGranularity, timeZone: timeZoneProp, isTimeOptional, format, onClear: onClearProp, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
45
+ export declare const DatePickerInput: ({ ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, shouldShrinkInput, isClearable, headerProps, todayIcon, todayIconButtonSize, todayIconButtonComponent, todayIconPlacement, isDirty, isRequired, disableManualEntry, autoFixYear, placeholder, className, onOpenDropdown, dateGranularity, timeZone: timeZoneProp, isTimeOptional, format, fireBlurOnChange, onClear: onClearProp, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
46
46
  export {};
@@ -10,14 +10,14 @@ import { datePickerInputContentRowDefinition } from "./datePickerInput.cva.js";
10
10
  import { renderDatePickerTodayIcon } from "./datePickerTodayIcon.js";
11
11
  import { useFirefoxDateSegmentSelectionGuard } from "./useFirefoxDateSegmentSelectionGuard.js";
12
12
  import { InputClear } from "../../shared/InputClear.js";
13
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
13
14
  import { clsx } from "clsx";
14
15
  import { useCallback, useImperativeHandle, useRef, useState } from "react";
15
16
  import { Button } from "react-aria-components";
16
- import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
17
17
  import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
18
18
  import { getLocalTimeZone, today } from "@internationalized/date";
19
19
  //#region src/components/inputs/DateTime/shared/DatePickerInput.tsx
20
- var DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, shouldShrinkInput, isClearable, isClearableIfDisabled, headerProps, todayIcon, todayIconButtonSize = "none", todayIconButtonComponent, todayIconPlacement = "content", isDirty, isRequired, disableManualEntry, autoFixYear = false, placeholder, className, onOpenDropdown, dateGranularity = "day", timeZone: timeZoneProp, isTimeOptional = false, format, onClear: onClearProp, ...props }) => {
20
+ var DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, shouldShrinkInput, isClearable, headerProps, todayIcon, todayIconButtonSize = "none", todayIconButtonComponent, todayIconPlacement = "content", isDirty, isRequired, disableManualEntry, autoFixYear = false, placeholder, className, onOpenDropdown, dateGranularity = "day", timeZone: timeZoneProp, isTimeOptional = false, format, fireBlurOnChange, onClear: onClearProp, ...props }) => {
21
21
  const uiConfig = UIConfig.useConfig();
22
22
  const timeZone = timeZoneProp ?? uiConfig.dateInput.timeZone;
23
23
  let effectiveTimeZone = getLocalTimeZone();
@@ -51,17 +51,22 @@ var DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, fieldVa
51
51
  shouldAutoFixYear: autoFixYear
52
52
  } : void 0;
53
53
  const clearInput = useCallback(() => {
54
+ dateFieldRef.current?.clearField();
55
+ endDateFieldRef.current?.clearField();
54
56
  if (onClearProp) onClearProp();
55
57
  else {
56
- dateFieldRef.current?.clearField();
57
- endDateFieldRef.current?.clearField();
58
58
  fieldProps.onChange?.(null);
59
59
  endFieldProps?.onChange?.(null);
60
+ if (fireBlurOnChange) {
61
+ fieldProps.onBlur?.(null);
62
+ endFieldProps?.onBlur?.(null);
63
+ }
60
64
  }
61
65
  setCanClear(false);
62
66
  }, [
63
67
  endFieldProps,
64
68
  fieldProps,
69
+ fireBlurOnChange,
65
70
  onClearProp
66
71
  ]);
67
72
  useImperativeHandle(ref, () => ({
@@ -71,7 +76,7 @@ var DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, fieldVa
71
76
  const onClearChange = useCallback((canClearInput) => {
72
77
  setCanClear(canClearInput);
73
78
  }, []);
74
- const showClear = (!isDisabled || isClearableIfDisabled === true) && (canClear || hasValue || normalizedFieldProps.value != null || normalizedEndFieldProps?.value != null);
79
+ const showClear = canClear || hasValue || normalizedFieldProps.value != null || normalizedEndFieldProps?.value != null;
75
80
  const isTodayIconDisabled = isDisabled || buttonProps.isDisabled;
76
81
  const onToday = () => {
77
82
  if (isTodayIconDisabled) return;
@@ -83,6 +88,10 @@ var DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, fieldVa
83
88
  fieldProps.onChange?.(today(effectiveTimeZone));
84
89
  if (endFieldProps) endFieldProps.onChange?.(today(effectiveTimeZone));
85
90
  }
91
+ if (fireBlurOnChange) {
92
+ fieldProps.onBlur?.(null);
93
+ endFieldProps?.onBlur?.(null);
94
+ }
86
95
  };
87
96
  const hidePlaceholder = as === "floating" && !fieldProps.value && !isFocused;
88
97
  const todayIconButton = renderDatePickerTodayIcon(todayIcon, {
@@ -140,7 +149,7 @@ var DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, fieldVa
140
149
  size: "label-1",
141
150
  className: "text-text-default-3",
142
151
  children: placeholder
143
- }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(DateField, {
152
+ }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(DateField, {
144
153
  ref: dateFieldRef,
145
154
  ...normalizedFieldProps,
146
155
  isDisabled,
@@ -150,11 +159,10 @@ var DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, fieldVa
150
159
  disableManualEntry,
151
160
  dateGranularity,
152
161
  isTimeOptional,
153
- preserveNullValue: isValueControlled && !endFieldProps,
154
162
  format,
155
163
  timeZone: effectiveTimeZone,
156
164
  segmentGroup: normalizedEndFieldProps ? "start" : void 0
157
- }), normalizedEndFieldProps && /* @__PURE__ */ jsxs(Fragment$1, { children: [!((as === "floating" || as === "filter") && hidePlaceholder) && /* @__PURE__ */ jsx("span", {
165
+ }), normalizedEndFieldProps && /* @__PURE__ */ jsxs(Fragment, { children: [!((as === "floating" || as === "filter") && hidePlaceholder) && /* @__PURE__ */ jsx("span", {
158
166
  className: clsx("pointer-events-none select-none", isDisabled && "text-interactive-text-secondary-disabled"),
159
167
  children: "–"
160
168
  }), /* @__PURE__ */ jsx(DateField, {
@@ -1,7 +1,7 @@
1
+ import { c } from "react/compiler-runtime";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
1
3
  import { clsx } from "clsx";
2
4
  import { useRef } from "react";
3
- import { c } from "react/compiler-runtime";
4
- import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
5
5
  import { useDateSegment } from "react-aria";
6
6
  //#region src/components/inputs/DateTime/shared/DateSegmentItem.tsx
7
7
  var getPlaceholder = (segment) => {
@@ -93,7 +93,7 @@ var DateSegmentItemView = (t0) => {
93
93
  const t12 = isPlaceholder ? "" : text;
94
94
  let t13;
95
95
  if ($[10] !== t11 || $[11] !== t12) {
96
- t13 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t11, t12] });
96
+ t13 = /* @__PURE__ */ jsxs(Fragment, { children: [t11, t12] });
97
97
  $[10] = t11;
98
98
  $[11] = t12;
99
99
  $[12] = t13;
@@ -2,10 +2,10 @@ import { UIOverrides } from "../../../../config/uiOverrides.context.js";
2
2
  import { BottomSheet } from "../../../overlays/BottomSheet/BottomSheet.js";
3
3
  import { useBreakpoint } from "../../../../hooks/useBreakpoint.js";
4
4
  import { popoverDefinition } from "../../../shared/popover.cva.js";
5
- import clsx$1 from "clsx";
6
- import { Dialog, Popover } from "react-aria-components";
7
5
  import { c } from "react/compiler-runtime";
8
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
+ import clsx$1 from "clsx";
8
+ import { Dialog, Popover } from "react-aria-components";
9
9
  //#region src/components/inputs/DateTime/shared/DateTimeDialog.tsx
10
10
  var DateTimeDialog = (t0) => {
11
11
  const $ = c(26);
@@ -1,7 +1,7 @@
1
1
  import "../../../../config/i18n.js";
2
2
  import { TextButton } from "../../../buttons/TextButton/TextButton.js";
3
- import { clsx } from "clsx";
4
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { clsx } from "clsx";
5
5
  import { useTranslation } from "react-i18next";
6
6
  //#region src/components/inputs/DateTime/shared/DateTimeDialogFooter.tsx
7
7
  var DateTimeDialogFooter = ({ isValid = true, isDisabled = false, onTodayPress, onApply }) => {
@@ -1,9 +1,9 @@
1
1
  import { Typography } from "../../../text/Typography/Typography.js";
2
+ import { c } from "react/compiler-runtime";
3
+ import { jsx } from "react/jsx-runtime";
2
4
  import { clsx } from "clsx";
3
5
  import { useRef } from "react";
4
6
  import { ListBox, ListBoxItem } from "react-aria-components";
5
- import { c } from "react/compiler-runtime";
6
- import { jsx } from "react/jsx-runtime";
7
7
  import { useDateFormatter } from "@react-aria/i18n";
8
8
  //#region src/components/inputs/DateTime/shared/MonthPicker.tsx
9
9
  var MonthPicker = (t0) => {
@@ -1,9 +1,9 @@
1
1
  import { CalendarGrid } from "./CalendarGrid.js";
2
2
  import { CalendarSelectHeader } from "./CalendarSelectHeader.js";
3
- import { clsx } from "clsx";
4
- import { useRef } from "react";
5
3
  import { c } from "react/compiler-runtime";
6
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { clsx } from "clsx";
6
+ import { useRef } from "react";
7
7
  import { useRangeCalendar } from "@react-aria/calendar";
8
8
  //#region src/components/inputs/DateTime/shared/RangeCalendar.tsx
9
9
  var RangeCalendar = (t0) => {
@@ -1,13 +1,14 @@
1
+ import { ChevronDownIcon } from "../../../../assets/icons/ChevronDown.js";
2
+ import { ChevronUpIcon } from "../../../../assets/icons/ChevronUp.js";
1
3
  import { Typography } from "../../../text/Typography/Typography.js";
2
4
  import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
3
5
  import { useBreakpoint } from "../../../../hooks/useBreakpoint.js";
4
6
  import { getPlaceholder } from "./DateSegmentItem.js";
5
7
  import { useLongPressRepeat } from "../../../../hooks/useLongPressRepeat.js";
6
- import { ChevronDown, ChevronUp } from "lucide-react";
7
- import { clsx } from "clsx";
8
- import { useEffect, useRef } from "react";
9
8
  import { c } from "react/compiler-runtime";
10
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
+ import { clsx } from "clsx";
11
+ import { useEffect, useRef } from "react";
11
12
  import { useDateSegment, useLocale, useTimeField } from "react-aria";
12
13
  import { Time } from "@internationalized/date";
13
14
  import { useTimeFieldState } from "@react-stately/datepicker";
@@ -288,7 +289,7 @@ var TimeSegmentButton = (t0) => {
288
289
  } else t6 = $[10];
289
290
  return t6;
290
291
  }
291
- const Icon = type === "increment" ? ChevronUp : ChevronDown;
292
+ const Icon = type === "increment" ? ChevronUpIcon : ChevronDownIcon;
292
293
  let t6;
293
294
  if ($[11] !== Icon || $[12] !== onPressEnd || $[13] !== onPressStart) {
294
295
  t6 = /* @__PURE__ */ jsx("div", {
@@ -14,12 +14,12 @@ interface DatePickerInputProps extends InputVariantProps {
14
14
  disableDropdown?: boolean;
15
15
  headerProps?: FormFieldHeaderProps;
16
16
  isClearable?: boolean;
17
- isClearableIfDisabled?: boolean;
18
17
  disableManualEntry?: boolean;
19
18
  placeholder?: string;
20
19
  className?: string;
21
20
  onPress: () => void;
22
21
  onClear?: () => void;
22
+ fireBlurOnChange?: boolean;
23
23
  }
24
- export declare const TimePickerInput: ({ ref, as, fieldProps, state, isDisabled, isDirty, isRequired, isInvalid, disableDropdown, variant, size, isClearable, isClearableIfDisabled, headerProps, disableManualEntry, placeholder, className, onPress, onClear, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
24
+ export declare const TimePickerInput: ({ ref, as, fieldProps, state, isDisabled, isDirty, isRequired, isInvalid, disableDropdown, variant, size, isClearable, headerProps, disableManualEntry, placeholder, className, onPress, onClear, fireBlurOnChange, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
25
25
  export {};
@@ -7,17 +7,17 @@ import { inputBaseDefinition, inputSizeDefinition } from "../../shared/input.cva
7
7
  import { useFirefoxDateSegmentSelectionGuard } from "./useFirefoxDateSegmentSelectionGuard.js";
8
8
  import { InputClear } from "../../shared/InputClear.js";
9
9
  import { TimeField } from "./TimeField.js";
10
+ import { c } from "react/compiler-runtime";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
10
12
  import { clsx } from "clsx";
11
13
  import { useRef, useState } from "react";
12
14
  import { Button } from "react-aria-components";
13
- import { c } from "react/compiler-runtime";
14
- import { jsx, jsxs } from "react/jsx-runtime";
15
15
  import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
16
16
  import { mergeRefs } from "@react-aria/utils";
17
17
  //#region src/components/inputs/DateTime/shared/TimePickerInput.tsx
18
18
  var TimePickerInput = (t0) => {
19
19
  const $ = c(69);
20
- const { ref, as, fieldProps, state, isDisabled, isDirty, isRequired, isInvalid, disableDropdown, variant, size, isClearable, isClearableIfDisabled, headerProps, disableManualEntry, placeholder, className, onPress, onClear, ...props } = t0;
20
+ const { ref, as, fieldProps, state, isDisabled, isDirty, isRequired, isInvalid, disableDropdown, variant, size, isClearable, headerProps, disableManualEntry, placeholder, className, onPress, onClear, fireBlurOnChange, ...props } = t0;
21
21
  const uiConfig = UIConfig.useConfig();
22
22
  const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
23
23
  const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
@@ -147,18 +147,19 @@ var TimePickerInput = (t0) => {
147
147
  $[32] = t22;
148
148
  } else t22 = $[32];
149
149
  let t23;
150
- if ($[33] !== canClear || $[34] !== isClearable || $[35] !== isClearableIfDisabled || $[36] !== isDisabled || $[37] !== onClear || $[38] !== state) {
150
+ if ($[33] !== canClear || $[34] !== fieldProps || $[35] !== fireBlurOnChange || $[36] !== isClearable || $[37] !== onClear || $[38] !== state) {
151
151
  t23 = isClearable && /* @__PURE__ */ jsx(InputClear, {
152
152
  onClear: () => {
153
- if (onClear) onClear();
154
- else state.setValue(null);
153
+ state.setValue(null);
154
+ onClear?.();
155
+ if (fireBlurOnChange) fieldProps.onBlur?.(null);
155
156
  },
156
- show: canClear && (!isDisabled || isClearableIfDisabled === true)
157
+ show: canClear
157
158
  });
158
159
  $[33] = canClear;
159
- $[34] = isClearable;
160
- $[35] = isClearableIfDisabled;
161
- $[36] = isDisabled;
160
+ $[34] = fieldProps;
161
+ $[35] = fireBlurOnChange;
162
+ $[36] = isClearable;
162
163
  $[37] = onClear;
163
164
  $[38] = state;
164
165
  $[39] = t23;
@@ -1,10 +1,10 @@
1
1
  import { Typography } from "../../../text/Typography/Typography.js";
2
2
  import { useScrollableListBox } from "../../../../hooks/useScrollableListBox.js";
3
+ import { c } from "react/compiler-runtime";
4
+ import { jsx } from "react/jsx-runtime";
3
5
  import { clsx } from "clsx";
4
6
  import { useRef } from "react";
5
7
  import { ListBox, ListBoxItem } from "react-aria-components";
6
- import { c } from "react/compiler-runtime";
7
- import { jsx } from "react/jsx-runtime";
8
8
  import { today } from "@internationalized/date";
9
9
  import { useDateFormatter } from "@react-aria/i18n";
10
10
  //#region src/components/inputs/DateTime/shared/YearPicker.tsx
@@ -1,53 +1,8 @@
1
1
  import { IconButton } from "../../../buttons/IconButton/IconButton.js";
2
2
  import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
3
- import { c } from "react/compiler-runtime";
3
+ import { TodayIcon } from "../../../../assets/icons/Today.js";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region src/components/inputs/DateTime/shared/datePickerTodayIcon.tsx
6
- var TodayIcon = (t0) => {
7
- const $ = c(9);
8
- let className;
9
- let props;
10
- if ($[0] !== t0) {
11
- ({className, ...props} = t0);
12
- $[0] = t0;
13
- $[1] = className;
14
- $[2] = props;
15
- } else {
16
- className = $[1];
17
- props = $[2];
18
- }
19
- let t1;
20
- if ($[3] !== className) {
21
- t1 = ["fill-current", className].filter(Boolean);
22
- $[3] = className;
23
- $[4] = t1;
24
- } else t1 = $[4];
25
- const t2 = t1.join(" ");
26
- let t3;
27
- if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
28
- t3 = /* @__PURE__ */ jsx("path", {
29
- fill: "currentColor",
30
- d: "M9.184 9.672v-.945h5.628v.945h-2.27V16H11.45V9.672z",
31
- transform: "translate(12 12) scale(1.65) translate(-12 -12)"
32
- });
33
- $[5] = t3;
34
- } else t3 = $[5];
35
- let t4;
36
- if ($[6] !== props || $[7] !== t2) {
37
- t4 = /* @__PURE__ */ jsx("svg", {
38
- xmlns: "http://www.w3.org/2000/svg",
39
- fill: "none",
40
- viewBox: "0 0 24 24",
41
- ...props,
42
- className: t2,
43
- children: t3
44
- });
45
- $[6] = props;
46
- $[7] = t2;
47
- $[8] = t4;
48
- } else t4 = $[8];
49
- return t4;
50
- };
51
6
  var getDatePickerTodayIcon = (todayIcon) => {
52
7
  if (!todayIcon) return null;
53
8
  return todayIcon === true ? TodayIcon : todayIcon;
@@ -1,5 +1,5 @@
1
- import { useLayoutEffect } from "react";
2
1
  import { c } from "react/compiler-runtime";
2
+ import { useLayoutEffect } from "react";
3
3
  import { isFirefox } from "@react-aria/utils";
4
4
  //#region src/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.ts
5
5
  var isEditableElement = (element) => element instanceof HTMLElement && (element.matches("input, textarea") || element.isContentEditable);
@@ -1,4 +1,4 @@
1
- import { FieldValues } from '../shared/form.binding';
1
+ import { FieldValues } from 'react-hook-form';
2
2
  import { FileUploadProps } from './fileUpload.types';
3
3
  export type { DefaultFile, FileUploadBaseProps, FileUploadButtonProps, FileUploadError, FileUploadProps, FileUploadRequest, FileUploadResponse, FileUploadState, } from './fileUpload.types';
4
4
  export declare const FileUpload: <TFieldValues extends FieldValues = FieldValues>(props: FileUploadProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
@@ -1,20 +1,20 @@
1
1
  import { UIOverrides } from "../../../config/uiOverrides.context.js";
2
2
  import { UIConfig } from "../../../config/uiConfig.context.js";
3
3
  import "../../../config/i18n.js";
4
- import { FieldController } from "../shared/form.binding.js";
5
4
  import { FormField } from "../FormField/FormField.js";
6
5
  import { FileUtils } from "../../../utils/file.utils.js";
7
6
  import { FileCardList } from "./shared/FileCardList.js";
8
7
  import { FileUploadContentEmpty } from "./shared/FileUploadContentEmpty.js";
9
8
  import { FileUploadContent } from "./shared/FileUploadContent.js";
10
9
  import { fileUploadDropZoneDefinition } from "./shared/fileUpload.cva.js";
10
+ import { c } from "react/compiler-runtime";
11
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
12
  import { clsx } from "clsx";
12
13
  import { useCallback, useState } from "react";
13
14
  import { DropZone } from "react-aria-components";
14
- import { c } from "react/compiler-runtime";
15
- import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
16
15
  import { mergeRefs, useLabels } from "@react-aria/utils";
17
16
  import { useTranslation } from "react-i18next";
17
+ import { Controller } from "react-hook-form";
18
18
  //#region src/components/inputs/File/FileUpload.tsx
19
19
  var FileUploadBase = (props) => {
20
20
  const { t } = useTranslation("ui");
@@ -142,7 +142,7 @@ var FileUploadBase = (props) => {
142
142
  isContainer: !!children,
143
143
  className: "group/file-upload-drop-zone"
144
144
  }),
145
- children: children ? /* @__PURE__ */ jsxs(Fragment$1, { children: [children({
145
+ children: children ? /* @__PURE__ */ jsxs(Fragment, { children: [children({
146
146
  files: uploadState,
147
147
  onRemove: handleRemove,
148
148
  onCancel: handleCancelUpload
@@ -192,32 +192,32 @@ var FileUploadBase = (props) => {
192
192
  };
193
193
  var FileUpload = (props) => {
194
194
  const $ = c(15);
195
- if ("field" in props && props.field) {
196
- let field;
195
+ if ("formControl" in props && props.formControl) {
196
+ let formControl;
197
197
  let innerProps;
198
198
  let ref;
199
199
  if ($[0] !== props) {
200
- ({field, ref, ...innerProps} = props);
200
+ ({formControl, ref, ...innerProps} = props);
201
201
  $[0] = props;
202
- $[1] = field;
202
+ $[1] = formControl;
203
203
  $[2] = innerProps;
204
204
  $[3] = ref;
205
205
  } else {
206
- field = $[1];
206
+ formControl = $[1];
207
207
  innerProps = $[2];
208
208
  ref = $[3];
209
209
  }
210
210
  let t0;
211
211
  if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
212
212
  t0 = (t1) => {
213
- const { field: field_0, fieldState: t2 } = t1;
213
+ const { field, fieldState: t2 } = t1;
214
214
  const { error } = t2;
215
215
  return /* @__PURE__ */ jsx(FileUploadBase, {
216
216
  ...innerProps,
217
- ref: mergeRefs(ref, field_0.ref),
218
- value: field_0.value,
219
- onChange: field_0.onChange,
220
- isDisabled: field_0.disabled || props.isDisabled,
217
+ ref: mergeRefs(ref, field.ref),
218
+ value: field.value,
219
+ onChange: field.onChange,
220
+ isDisabled: field.disabled || props.isDisabled,
221
221
  error: props.error ?? error?.message
222
222
  });
223
223
  };
@@ -228,14 +228,14 @@ var FileUpload = (props) => {
228
228
  $[8] = t0;
229
229
  } else t0 = $[8];
230
230
  let t1;
231
- if ($[9] !== field.form || $[10] !== field.name || $[11] !== t0) {
232
- t1 = /* @__PURE__ */ jsx(FieldController, {
233
- control: field.form,
234
- name: field.name,
231
+ if ($[9] !== formControl.control || $[10] !== formControl.name || $[11] !== t0) {
232
+ t1 = /* @__PURE__ */ jsx(Controller, {
233
+ control: formControl.control,
234
+ name: formControl.name,
235
235
  render: t0
236
236
  });
237
- $[9] = field.form;
238
- $[10] = field.name;
237
+ $[9] = formControl.control;
238
+ $[10] = formControl.name;
239
239
  $[11] = t0;
240
240
  $[12] = t1;
241
241
  } else t1 = $[12];
@@ -1,4 +1,4 @@
1
- import { FieldValues } from '../shared/form.binding';
1
+ import { FieldValues } from 'react-hook-form';
2
2
  import { InputUploadProps } from './inputUpload.types';
3
3
  export type { InputUploadBaseProps, InputUploadProps } from './inputUpload.types';
4
4
  export declare const InputUpload: <TFieldValues extends FieldValues = FieldValues>(props: InputUploadProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;