@povio/ui 3.3.0 → 3.4.0-rc.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/dist/assets/locales/en/translation.json.d.ts +158 -0
  2. package/dist/assets/locales/sl/translation.json.d.ts +154 -0
  3. package/dist/components/Breadcrumbs/Breadcrumbs.js +7 -7
  4. package/dist/components/Menu/MenuDesktop.js +1 -1
  5. package/dist/components/Menu/MenuItem.js +4 -4
  6. package/dist/components/Menu/MenuMobile.js +5 -5
  7. package/dist/components/Menu/MenuPopover.js +2 -2
  8. package/dist/components/buttons/Button/Button.js +1 -1
  9. package/dist/components/buttons/PillButton/PillButton.js +4 -4
  10. package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
  11. package/dist/components/buttons/SplitButton/SplitButton.js +3 -3
  12. package/dist/components/buttons/shared/ButtonContent.js +2 -2
  13. package/dist/components/buttons/shared/buttonContent.cva.d.ts +1 -1
  14. package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -2
  15. package/dist/components/inputs/Checkbox/Checkbox.js +95 -102
  16. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +2 -3
  17. package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +1 -2
  18. package/dist/components/inputs/Checkbox/CheckboxGroup.js +111 -115
  19. package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +2 -2
  20. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +17 -22
  21. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +2 -2
  22. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +17 -23
  23. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +2 -2
  24. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +21 -25
  25. package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +2 -2
  26. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +225 -238
  27. package/dist/components/inputs/DateTime/shared/Calendar.js +1 -1
  28. package/dist/components/inputs/DateTime/shared/CalendarCell.js +1 -1
  29. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +1 -1
  30. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +7 -10
  31. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +8 -12
  32. package/dist/components/inputs/DateTime/shared/DateField.d.ts +2 -1
  33. package/dist/components/inputs/DateTime/shared/DateField.js +4 -4
  34. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +2 -2
  35. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +8 -16
  36. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +3 -3
  37. package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +2 -2
  38. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +1 -1
  39. package/dist/components/inputs/DateTime/shared/MonthPicker.js +2 -2
  40. package/dist/components/inputs/DateTime/shared/RangeCalendar.js +2 -2
  41. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +4 -5
  42. package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -2
  43. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +10 -11
  44. package/dist/components/inputs/DateTime/shared/YearPicker.js +2 -2
  45. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +46 -1
  46. package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.js +1 -1
  47. package/dist/components/inputs/File/FileUpload.d.ts +1 -1
  48. package/dist/components/inputs/File/FileUpload.js +20 -20
  49. package/dist/components/inputs/File/InputUpload.d.ts +1 -1
  50. package/dist/components/inputs/File/InputUpload.js +19 -19
  51. package/dist/components/inputs/File/fileUpload.types.d.ts +1 -1
  52. package/dist/components/inputs/File/inputUpload.types.d.ts +1 -1
  53. package/dist/components/inputs/File/shared/FileCard.js +1 -1
  54. package/dist/components/inputs/File/shared/FileCardList.js +1 -1
  55. package/dist/components/inputs/File/shared/FileUploadContent.js +1 -1
  56. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +3 -3
  57. package/dist/components/inputs/File/shared/FileUploadContentError.js +5 -6
  58. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +5 -6
  59. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +4 -5
  60. package/dist/components/inputs/File/shared/InputUploadContent.js +4 -4
  61. package/dist/components/inputs/File/shared/InputUploadFilled.js +3 -3
  62. package/dist/components/inputs/FormField/FormFieldError.js +1 -1
  63. package/dist/components/inputs/FormField/FormFieldHeader.js +4 -4
  64. package/dist/components/inputs/FormField/FormFieldHeaderClose.js +3 -3
  65. package/dist/components/inputs/FormField/FormFieldHelper.js +1 -1
  66. package/dist/components/inputs/FormField/FormFieldLabel.js +2 -2
  67. package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +1 -1
  68. package/dist/components/inputs/Input/NumberInput/NumberInput.js +109 -107
  69. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +2 -1
  70. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +265 -254
  71. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +2 -1
  72. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +25 -24
  73. package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +1 -1
  74. package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +3 -4
  75. package/dist/components/inputs/Input/TextArea/TextArea.d.ts +2 -1
  76. package/dist/components/inputs/Input/TextArea/TextArea.js +118 -117
  77. package/dist/components/inputs/Input/TextInput/TextInput.d.ts +2 -2
  78. package/dist/components/inputs/Input/TextInput/TextInput.js +129 -129
  79. package/dist/components/inputs/Input/shared/InputContent.d.ts +2 -1
  80. package/dist/components/inputs/Input/shared/InputContent.js +50 -48
  81. package/dist/components/inputs/Inputs/Form.d.ts +4 -4
  82. package/dist/components/inputs/Inputs/Form.js +1 -1
  83. package/dist/components/inputs/Inputs/InputItem.d.ts +22 -22
  84. package/dist/components/inputs/Inputs/InputItem.js +36 -37
  85. package/dist/components/inputs/Inputs/Inputs.d.ts +2 -2
  86. package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -2
  87. package/dist/components/inputs/RadioGroup/RadioGroup.js +109 -113
  88. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +1 -1
  89. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +16 -16
  90. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +1 -1
  91. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +20 -20
  92. package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +1 -1
  93. package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +1 -1
  94. package/dist/components/inputs/Selection/Select/QuerySelect.js +20 -20
  95. package/dist/components/inputs/Selection/Select/Select.d.ts +1 -1
  96. package/dist/components/inputs/Selection/Select/Select.js +23 -23
  97. package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -1
  98. package/dist/components/inputs/Selection/shared/SelectBase.js +34 -37
  99. package/dist/components/inputs/Selection/shared/SelectDesktop.js +58 -56
  100. package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
  101. package/dist/components/inputs/Selection/shared/SelectInput.js +57 -56
  102. package/dist/components/inputs/Selection/shared/SelectListBox.js +1 -1
  103. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +2 -2
  104. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +2 -2
  105. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +1 -1
  106. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +1 -1
  107. package/dist/components/inputs/Selection/shared/SelectMobile.js +5 -4
  108. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +3 -3
  109. package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -2
  110. package/dist/components/inputs/Selection/shared/select.context.js +5 -9
  111. package/dist/components/inputs/Selection/shared/select.types.d.ts +1 -1
  112. package/dist/components/inputs/Skeleton/InputFrame.d.ts +1 -0
  113. package/dist/components/inputs/Skeleton/InputFrame.js +10 -7
  114. package/dist/components/inputs/Slider/Slider.d.ts +1 -1
  115. package/dist/components/inputs/Slider/Slider.js +20 -20
  116. package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -1
  117. package/dist/components/inputs/TextEditor/TextEditor.js +20 -20
  118. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +2 -2
  119. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +4 -4
  120. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +4 -4
  121. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +5 -8
  122. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +3 -3
  123. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +4 -5
  124. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +4 -5
  125. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +6 -9
  126. package/dist/components/inputs/Toggle/Toggle.d.ts +1 -2
  127. package/dist/components/inputs/Toggle/Toggle.js +61 -65
  128. package/dist/components/inputs/shared/CheckContent.js +1 -1
  129. package/dist/components/inputs/shared/InputClear.js +45 -28
  130. package/dist/components/inputs/shared/TooltipWrapper.d.ts +1 -1
  131. package/dist/components/inputs/shared/form.binding.d.ts +27 -0
  132. package/dist/components/inputs/shared/form.binding.js +57 -0
  133. package/dist/components/inputs/shared/form.types.d.ts +9 -8
  134. package/dist/components/inputs/shared/form.types.js +8 -0
  135. package/dist/components/inputs/shared/input.cva.js +1 -1
  136. package/dist/components/inputs/shared/useStaticInputHandoff.js +64 -38
  137. package/dist/components/navigation/Accordion/Accordion.js +1 -1
  138. package/dist/components/navigation/Accordion/AccordionItem.js +3 -3
  139. package/dist/components/navigation/Stepper/Stepper.js +2 -2
  140. package/dist/components/navigation/Stepper/StepperItem.js +4 -4
  141. package/dist/components/overlays/ActionModal/ActionModal.js +1 -1
  142. package/dist/components/overlays/BottomSheet/BottomSheet.js +3 -3
  143. package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +4 -4
  144. package/dist/components/overlays/Drawer/Drawer.js +2 -2
  145. package/dist/components/overlays/Modal/Modal.js +3 -3
  146. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +1 -1
  147. package/dist/components/overlays/Tooltip/Tooltip.js +15 -8
  148. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +1 -1
  149. package/dist/components/segment/Segment.d.ts +1 -1
  150. package/dist/components/segment/Segment.js +21 -21
  151. package/dist/components/segment/SegmentItem.js +1 -1
  152. package/dist/components/segment/segment.types.d.ts +1 -1
  153. package/dist/components/shared/pagination/Pagination.js +1 -1
  154. package/dist/components/shared/pagination/PaginationList.js +6 -9
  155. package/dist/components/table/ColumnConfig.js +1 -1
  156. package/dist/components/table/InfiniteTable.js +1 -1
  157. package/dist/components/table/Table.js +6 -8
  158. package/dist/components/text/Link/Link.js +1 -1
  159. package/dist/components/text/Pill/Pill.js +3 -3
  160. package/dist/components/text/Tag/Tag.js +3 -3
  161. package/dist/config/confirmation.context.js +1 -1
  162. package/dist/config/link.context.js +1 -1
  163. package/dist/config/router.context.js +1 -1
  164. package/dist/config/theme.context.js +1 -1
  165. package/dist/config/uiConfig.context.d.ts +14 -5
  166. package/dist/config/uiConfig.context.js +9 -11
  167. package/dist/config/uiOverrides.context.js +2 -2
  168. package/dist/helpers/dynamicColumns.d.ts +1 -1
  169. package/dist/helpers/dynamicInputs.d.ts +7 -7
  170. package/dist/hooks/useAutosave.d.ts +4 -4
  171. package/dist/hooks/useAutosave.js +64 -49
  172. package/dist/hooks/useFilters.js +1 -1
  173. package/dist/hooks/useForm.d.ts +39 -15
  174. package/dist/hooks/useForm.js +96 -43
  175. package/dist/hooks/useFormAutosave.d.ts +8 -9
  176. package/dist/hooks/useFormAutosave.js +23 -9
  177. package/dist/hooks/useIntersectionObserver.js +1 -1
  178. package/dist/hooks/useLocalStorage.js +1 -1
  179. package/dist/hooks/usePagination.js +1 -1
  180. package/dist/hooks/useScrollableListBox.js +1 -1
  181. package/dist/hooks/useSorting.js +1 -1
  182. package/dist/hooks/useStateAndRef.js +1 -1
  183. package/dist/hooks/useTableColumnConfig.js +1 -1
  184. package/dist/index.d.ts +1 -263
  185. package/dist/index.js +11 -71
  186. package/dist/rhf/Inputs.d.ts +60 -0
  187. package/dist/rhf/Inputs.js +148 -0
  188. package/dist/rhf/components.d.ts +80 -0
  189. package/dist/rhf/components.js +101 -0
  190. package/dist/rhf/dynamicInputs.d.ts +18 -0
  191. package/dist/rhf/dynamicInputs.js +5 -0
  192. package/dist/rhf/fieldAdapter.d.ts +7 -0
  193. package/dist/rhf/fieldAdapter.js +40 -0
  194. package/dist/rhf/form.types.d.ts +12 -0
  195. package/dist/rhf/useAutosave.d.ts +10 -0
  196. package/dist/rhf/useAutosave.js +71 -0
  197. package/dist/rhf/useForm.d.ts +18 -0
  198. package/dist/rhf/useForm.js +48 -0
  199. package/dist/rhf/useFormAutosave.d.ts +15 -0
  200. package/dist/rhf/useFormAutosave.js +59 -0
  201. package/dist/rhf.d.ts +225 -0
  202. package/dist/tanstack.d.ts +224 -0
  203. package/dist/tanstack.js +141 -0
  204. package/package.json +15 -3
  205. package/dist/assets/icons/Account.d.ts +0 -2
  206. package/dist/assets/icons/AlignCenter.d.ts +0 -2
  207. package/dist/assets/icons/AlignCenter.js +0 -30
  208. package/dist/assets/icons/AlignLeft.d.ts +0 -2
  209. package/dist/assets/icons/AlignLeft.js +0 -30
  210. package/dist/assets/icons/AlignLeftRight.d.ts +0 -2
  211. package/dist/assets/icons/AlignLeftRight.js +0 -30
  212. package/dist/assets/icons/AlignRight.d.ts +0 -2
  213. package/dist/assets/icons/AlignRight.js +0 -30
  214. package/dist/assets/icons/ArrowDropDown.d.ts +0 -2
  215. package/dist/assets/icons/ArrowDropDown.js +0 -30
  216. package/dist/assets/icons/ArrowDropUp.d.ts +0 -2
  217. package/dist/assets/icons/ArrowDropUp.js +0 -30
  218. package/dist/assets/icons/ArrowLeft.d.ts +0 -2
  219. package/dist/assets/icons/ArrowLeft.js +0 -30
  220. package/dist/assets/icons/ArrowRight.d.ts +0 -2
  221. package/dist/assets/icons/ArrowRight.js +0 -30
  222. package/dist/assets/icons/Board.d.ts +0 -2
  223. package/dist/assets/icons/Bold.d.ts +0 -2
  224. package/dist/assets/icons/Bold.js +0 -30
  225. package/dist/assets/icons/BulletedList.d.ts +0 -2
  226. package/dist/assets/icons/BulletedList.js +0 -30
  227. package/dist/assets/icons/Calendar.d.ts +0 -2
  228. package/dist/assets/icons/Calendar.js +0 -32
  229. package/dist/assets/icons/Check.d.ts +0 -2
  230. package/dist/assets/icons/Check.js +0 -32
  231. package/dist/assets/icons/CheckCircle.d.ts +0 -2
  232. package/dist/assets/icons/CheckCircle.js +0 -30
  233. package/dist/assets/icons/CheckboxCheckmark.d.ts +0 -2
  234. package/dist/assets/icons/CheckboxCheckmark.js +0 -33
  235. package/dist/assets/icons/CheckboxIndeterminate.d.ts +0 -2
  236. package/dist/assets/icons/CheckboxIndeterminate.js +0 -33
  237. package/dist/assets/icons/ChevronDown.d.ts +0 -2
  238. package/dist/assets/icons/ChevronDown.js +0 -32
  239. package/dist/assets/icons/ChevronLeft.d.ts +0 -2
  240. package/dist/assets/icons/ChevronLeft.js +0 -32
  241. package/dist/assets/icons/ChevronRight.d.ts +0 -2
  242. package/dist/assets/icons/ChevronRight.js +0 -32
  243. package/dist/assets/icons/ChevronUp.d.ts +0 -2
  244. package/dist/assets/icons/ChevronUp.js +0 -32
  245. package/dist/assets/icons/ChevronsLeft.d.ts +0 -2
  246. package/dist/assets/icons/ChevronsLeft.js +0 -32
  247. package/dist/assets/icons/ChevronsRight.d.ts +0 -2
  248. package/dist/assets/icons/ChevronsRight.js +0 -32
  249. package/dist/assets/icons/Clock.d.ts +0 -2
  250. package/dist/assets/icons/Clock.js +0 -30
  251. package/dist/assets/icons/Close.d.ts +0 -2
  252. package/dist/assets/icons/Close.js +0 -30
  253. package/dist/assets/icons/DateTime.d.ts +0 -2
  254. package/dist/assets/icons/DateTime.js +0 -39
  255. package/dist/assets/icons/DragIndicator.d.ts +0 -2
  256. package/dist/assets/icons/DragIndicator.js +0 -30
  257. package/dist/assets/icons/Edit.d.ts +0 -2
  258. package/dist/assets/icons/Emoji.d.ts +0 -2
  259. package/dist/assets/icons/File.d.ts +0 -2
  260. package/dist/assets/icons/File.js +0 -32
  261. package/dist/assets/icons/Grid.d.ts +0 -2
  262. package/dist/assets/icons/Highlight.d.ts +0 -2
  263. package/dist/assets/icons/Highlight.js +0 -30
  264. package/dist/assets/icons/HighlightOn.d.ts +0 -6
  265. package/dist/assets/icons/HighlightOn.js +0 -55
  266. package/dist/assets/icons/Home.d.ts +0 -2
  267. package/dist/assets/icons/Home.js +0 -30
  268. package/dist/assets/icons/Image.d.ts +0 -2
  269. package/dist/assets/icons/ImageError.d.ts +0 -2
  270. package/dist/assets/icons/Info.d.ts +0 -2
  271. package/dist/assets/icons/Info.js +0 -41
  272. package/dist/assets/icons/Italic.d.ts +0 -2
  273. package/dist/assets/icons/Italic.js +0 -30
  274. package/dist/assets/icons/Link.d.ts +0 -2
  275. package/dist/assets/icons/Link.js +0 -30
  276. package/dist/assets/icons/Loader.d.ts +0 -2
  277. package/dist/assets/icons/MapPin.d.ts +0 -2
  278. package/dist/assets/icons/Menu.d.ts +0 -2
  279. package/dist/assets/icons/Menu.js +0 -30
  280. package/dist/assets/icons/Minus.d.ts +0 -2
  281. package/dist/assets/icons/MoreHoriz.d.ts +0 -2
  282. package/dist/assets/icons/NumberedList.d.ts +0 -2
  283. package/dist/assets/icons/NumberedList.js +0 -30
  284. package/dist/assets/icons/Pause.d.ts +0 -2
  285. package/dist/assets/icons/Plus.d.ts +0 -2
  286. package/dist/assets/icons/PointerHorizontal.d.ts +0 -2
  287. package/dist/assets/icons/PointerHorizontal.js +0 -30
  288. package/dist/assets/icons/PointerVertical.d.ts +0 -2
  289. package/dist/assets/icons/PointerVertical.js +0 -30
  290. package/dist/assets/icons/Retry.d.ts +0 -2
  291. package/dist/assets/icons/Search.d.ts +0 -2
  292. package/dist/assets/icons/Search.js +0 -30
  293. package/dist/assets/icons/Send.d.ts +0 -2
  294. package/dist/assets/icons/Send.js +0 -32
  295. package/dist/assets/icons/Share.d.ts +0 -2
  296. package/dist/assets/icons/Slash.d.ts +0 -2
  297. package/dist/assets/icons/Strikethrough.d.ts +0 -2
  298. package/dist/assets/icons/Strikethrough.js +0 -30
  299. package/dist/assets/icons/TextColor.d.ts +0 -6
  300. package/dist/assets/icons/TextColor.js +0 -52
  301. package/dist/assets/icons/Today.d.ts +0 -2
  302. package/dist/assets/icons/Today.js +0 -30
  303. package/dist/assets/icons/Trash.d.ts +0 -2
  304. package/dist/assets/icons/Underlined.d.ts +0 -2
  305. package/dist/assets/icons/Underlined.js +0 -32
  306. package/dist/assets/icons/Upload.d.ts +0 -2
  307. package/dist/assets/icons/Upload.js +0 -39
  308. package/dist/assets/icons/User.d.ts +0 -2
  309. package/dist/assets/icons/Visibility.d.ts +0 -2
  310. package/dist/assets/icons/Visibility.js +0 -30
  311. package/dist/assets/icons/VisibilityOff.d.ts +0 -2
  312. package/dist/assets/icons/VisibilityOff.js +0 -30
  313. package/dist/assets/icons/WarningFilled.d.ts +0 -2
  314. package/dist/assets/icons/WarningFilled.js +0 -32
  315. package/dist/assets/icons/WarningOutlined.d.ts +0 -2
  316. /package/dist/{hooks/useAutosave.spec.d.ts → rhf/entrypoints.type-test.d.ts} +0 -0
@@ -1,5 +1,6 @@
1
1
  import { UIOverrides } from "../../../../config/uiOverrides.context.js";
2
2
  import { UIConfig } from "../../../../config/uiConfig.context.js";
3
+ import { FieldController } from "../../shared/form.binding.js";
3
4
  import { FormField } from "../../FormField/FormField.js";
4
5
  import { inputBaseDefinition } from "../../shared/input.cva.js";
5
6
  import { IntlUtils } from "../../../../utils/intl.utils.js";
@@ -8,23 +9,22 @@ import { InputFrame } from "../../Skeleton/InputFrame.js";
8
9
  import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
9
10
  import { InputContent } from "../shared/InputContent.js";
10
11
  import { getStaticNumberDisplayValue } from "../shared/numberStatic.utils.js";
11
- import { c } from "react/compiler-runtime";
12
- import { jsx } from "react/jsx-runtime";
13
12
  import { clsx } from "clsx";
14
13
  import { useEffect, useRef, useState } from "react";
15
14
  import { Input, useLocale } from "react-aria-components";
15
+ import { c } from "react/compiler-runtime";
16
+ import { jsx } from "react/jsx-runtime";
16
17
  import { useFocusVisible, useNumberField } from "react-aria";
17
18
  import { mergeRefs } from "@react-aria/utils";
18
- import { Controller } from "react-hook-form";
19
19
  import { useNumberFieldState } from "react-stately";
20
20
  //#region src/components/inputs/Input/NumberInput/NumberInput.tsx
21
21
  var NumberInputBase = (props) => {
22
- const $ = c(90);
22
+ const $ = c(91);
23
23
  const ui = UIConfig.useConfig();
24
24
  const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
25
25
  const hasControlledValue = "value" in props;
26
26
  const inputRef = useRef(null);
27
- const { ref, inputClassName, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, className, unit, isLoading, action, leadingIcon, trailingIcon, value, onChange, onBlur, formatOptions: formatOptionsProp, variant: variantProp, as: asProp, size: sizeProp, hideLabel: hideLabelProp, isClearable: isClearableProp, autoFocusOnMount, ...rest } = props;
27
+ const { ref, inputClassName, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, className, unit, isLoading, action, leadingIcon, trailingIcon, value, onChange, onBlur, formatOptions: formatOptionsProp, variant: variantProp, as: asProp, size: sizeProp, hideLabel: hideLabelProp, isClearable: isClearableProp, isClearableIfDisabled, autoFocusOnMount, ...rest } = props;
28
28
  const formatOptions = formatOptionsProp ?? ui.numberInput.formatOptions;
29
29
  const variant = variantProp ?? ui.input.variant;
30
30
  const as = asProp ?? ui.input.as;
@@ -128,7 +128,7 @@ var NumberInputBase = (props) => {
128
128
  $[24] = t7;
129
129
  } else t7 = $[24];
130
130
  let t8;
131
- if ($[25] !== action || $[26] !== handleInputBlur || $[27] !== isClearable || $[28] !== isDisabled || $[29] !== isLoading || $[30] !== leadingIcon || $[31] !== state.inputValue || $[32] !== t7 || $[33] !== trailingIcon || $[34] !== unit) {
131
+ if ($[25] !== action || $[26] !== handleInputBlur || $[27] !== isClearable || $[28] !== isClearableIfDisabled || $[29] !== isDisabled || $[30] !== isLoading || $[31] !== leadingIcon || $[32] !== state.inputValue || $[33] !== t7 || $[34] !== trailingIcon || $[35] !== unit) {
132
132
  t8 = {
133
133
  unit,
134
134
  isLoading,
@@ -137,6 +137,7 @@ var NumberInputBase = (props) => {
137
137
  leadingIcon,
138
138
  trailingIcon,
139
139
  isClearable,
140
+ isClearableIfDisabled,
140
141
  onChange: t7,
141
142
  value: state.inputValue,
142
143
  onBlur: handleInputBlur
@@ -144,19 +145,20 @@ var NumberInputBase = (props) => {
144
145
  $[25] = action;
145
146
  $[26] = handleInputBlur;
146
147
  $[27] = isClearable;
147
- $[28] = isDisabled;
148
- $[29] = isLoading;
149
- $[30] = leadingIcon;
150
- $[31] = state.inputValue;
151
- $[32] = t7;
152
- $[33] = trailingIcon;
153
- $[34] = unit;
154
- $[35] = t8;
155
- } else t8 = $[35];
148
+ $[28] = isClearableIfDisabled;
149
+ $[29] = isDisabled;
150
+ $[30] = isLoading;
151
+ $[31] = leadingIcon;
152
+ $[32] = state.inputValue;
153
+ $[33] = t7;
154
+ $[34] = trailingIcon;
155
+ $[35] = unit;
156
+ $[36] = t8;
157
+ } else t8 = $[36];
156
158
  const inputContentProps = t8;
157
159
  const t9 = hideLabel || isHeaderHidden;
158
160
  let t10;
159
- if ($[36] !== headerClassName || $[37] !== helperText || $[38] !== isDisabled || $[39] !== isRequired || $[40] !== label || $[41] !== labelProps || $[42] !== rightContent || $[43] !== t9 || $[44] !== tooltipText) {
161
+ if ($[37] !== headerClassName || $[38] !== helperText || $[39] !== isDisabled || $[40] !== isRequired || $[41] !== label || $[42] !== labelProps || $[43] !== rightContent || $[44] !== t9 || $[45] !== tooltipText) {
160
162
  t10 = {
161
163
  label,
162
164
  tooltipText,
@@ -168,28 +170,28 @@ var NumberInputBase = (props) => {
168
170
  className: headerClassName,
169
171
  labelProps
170
172
  };
171
- $[36] = headerClassName;
172
- $[37] = helperText;
173
- $[38] = isDisabled;
174
- $[39] = isRequired;
175
- $[40] = label;
176
- $[41] = labelProps;
177
- $[42] = rightContent;
178
- $[43] = t9;
179
- $[44] = tooltipText;
180
- $[45] = t10;
181
- } else t10 = $[45];
173
+ $[37] = headerClassName;
174
+ $[38] = helperText;
175
+ $[39] = isDisabled;
176
+ $[40] = isRequired;
177
+ $[41] = label;
178
+ $[42] = labelProps;
179
+ $[43] = rightContent;
180
+ $[44] = t9;
181
+ $[45] = tooltipText;
182
+ $[46] = t10;
183
+ } else t10 = $[46];
182
184
  const headerProps = t10;
183
185
  const dataIsDisabled = isDisabled || void 0;
184
186
  const T0 = TooltipWrapper;
185
187
  const t11 = as === "inline" ? -1 : void 0;
186
188
  const T1 = FormField;
187
189
  let t12;
188
- if ($[46] !== className) {
190
+ if ($[47] !== className) {
189
191
  t12 = clsx("group w-full", className);
190
- $[46] = className;
191
- $[47] = t12;
192
- } else t12 = $[47];
192
+ $[47] = className;
193
+ $[48] = t12;
194
+ } else t12 = $[48];
193
195
  const t13 = as === "inline" ? -1 : void 0;
194
196
  const t14 = clsx("relative flex cursor-text has-disabled:cursor-default", inputBaseCva({
195
197
  variant,
@@ -197,35 +199,35 @@ var NumberInputBase = (props) => {
197
199
  ...rest
198
200
  }), inputClassName);
199
201
  let t15;
200
- if ($[48] === Symbol.for("react.memo_cache_sentinel")) {
202
+ if ($[49] === Symbol.for("react.memo_cache_sentinel")) {
201
203
  t15 = () => inputRef.current?.focus();
202
- $[48] = t15;
203
- } else t15 = $[48];
204
+ $[49] = t15;
205
+ } else t15 = $[49];
204
206
  const t16 = value === null || value === void 0 || void 0;
205
207
  const t17 = isRequired || void 0;
206
208
  let t18;
207
- if ($[49] !== ref) {
209
+ if ($[50] !== ref) {
208
210
  t18 = mergeRefs(ref, inputRef, numberFieldRef);
209
- $[49] = ref;
210
- $[50] = t18;
211
- } else t18 = $[50];
211
+ $[50] = ref;
212
+ $[51] = t18;
213
+ } else t18 = $[51];
212
214
  const t19 = isDirty || void 0;
213
215
  const t20 = isRequired || void 0;
214
216
  const t21 = state.inputValue === "" || state.inputValue === void 0 || state.inputValue === null || void 0;
215
217
  const t22 = !("" + value === "" || value === null || value === void 0) || void 0;
216
218
  const t23 = as === "floating" ? "\xA0" : inputProps.placeholder;
217
219
  let t24;
218
- if ($[51] !== inputProps || $[52] !== isFocusVisible) {
220
+ if ($[52] !== inputProps || $[53] !== isFocusVisible) {
219
221
  t24 = (e_1) => {
220
222
  inputProps.onFocus?.(e_1);
221
223
  if (isFocusVisible) e_1.target.select();
222
224
  };
223
- $[51] = inputProps;
224
- $[52] = isFocusVisible;
225
- $[53] = t24;
226
- } else t24 = $[53];
225
+ $[52] = inputProps;
226
+ $[53] = isFocusVisible;
227
+ $[54] = t24;
228
+ } else t24 = $[54];
227
229
  let t25;
228
- if ($[54] !== dataIsDisabled || $[55] !== inputProps || $[56] !== t18 || $[57] !== t19 || $[58] !== t20 || $[59] !== t21 || $[60] !== t22 || $[61] !== t23 || $[62] !== t24) {
230
+ if ($[55] !== dataIsDisabled || $[56] !== inputProps || $[57] !== t18 || $[58] !== t19 || $[59] !== t20 || $[60] !== t21 || $[61] !== t22 || $[62] !== t23 || $[63] !== t24) {
229
231
  t25 = /* @__PURE__ */ jsx(Input, {
230
232
  ...inputProps,
231
233
  ref: t18,
@@ -238,19 +240,19 @@ var NumberInputBase = (props) => {
238
240
  className: "w-full bg-transparent outline-none",
239
241
  onFocus: t24
240
242
  });
241
- $[54] = dataIsDisabled;
242
- $[55] = inputProps;
243
- $[56] = t18;
244
- $[57] = t19;
245
- $[58] = t20;
246
- $[59] = t21;
247
- $[60] = t22;
248
- $[61] = t23;
249
- $[62] = t24;
250
- $[63] = t25;
251
- } else t25 = $[63];
243
+ $[55] = dataIsDisabled;
244
+ $[56] = inputProps;
245
+ $[57] = t18;
246
+ $[58] = t19;
247
+ $[59] = t20;
248
+ $[60] = t21;
249
+ $[61] = t22;
250
+ $[62] = t23;
251
+ $[63] = t24;
252
+ $[64] = t25;
253
+ } else t25 = $[64];
252
254
  let t26;
253
- if ($[64] !== as || $[65] !== headerProps || $[66] !== inputContentProps || $[67] !== size || $[68] !== t25) {
255
+ if ($[65] !== as || $[66] !== headerProps || $[67] !== inputContentProps || $[68] !== size || $[69] !== t25) {
254
256
  t26 = /* @__PURE__ */ jsx(InputContent, {
255
257
  ...inputContentProps,
256
258
  headerProps,
@@ -258,15 +260,15 @@ var NumberInputBase = (props) => {
258
260
  size,
259
261
  children: t25
260
262
  });
261
- $[64] = as;
262
- $[65] = headerProps;
263
- $[66] = inputContentProps;
264
- $[67] = size;
265
- $[68] = t25;
266
- $[69] = t26;
267
- } else t26 = $[69];
263
+ $[65] = as;
264
+ $[66] = headerProps;
265
+ $[67] = inputContentProps;
266
+ $[68] = size;
267
+ $[69] = t25;
268
+ $[70] = t26;
269
+ } else t26 = $[70];
268
270
  let t27;
269
- if ($[70] !== dataIsDisabled || $[71] !== t14 || $[72] !== t16 || $[73] !== t17 || $[74] !== t26) {
271
+ if ($[71] !== dataIsDisabled || $[72] !== t14 || $[73] !== t16 || $[74] !== t17 || $[75] !== t26) {
270
272
  t27 = /* @__PURE__ */ jsx("div", {
271
273
  className: t14,
272
274
  onClick: t15,
@@ -275,15 +277,15 @@ var NumberInputBase = (props) => {
275
277
  "data-is-disabled": dataIsDisabled,
276
278
  children: t26
277
279
  });
278
- $[70] = dataIsDisabled;
279
- $[71] = t14;
280
- $[72] = t16;
281
- $[73] = t17;
282
- $[74] = t26;
283
- $[75] = t27;
284
- } else t27 = $[75];
280
+ $[71] = dataIsDisabled;
281
+ $[72] = t14;
282
+ $[73] = t16;
283
+ $[74] = t17;
284
+ $[75] = t26;
285
+ $[76] = t27;
286
+ } else t27 = $[76];
285
287
  let t28;
286
- if ($[76] !== T1 || $[77] !== as || $[78] !== formFieldProps || $[79] !== labelProps || $[80] !== t12 || $[81] !== t13 || $[82] !== t27) {
288
+ if ($[77] !== T1 || $[78] !== as || $[79] !== formFieldProps || $[80] !== labelProps || $[81] !== t12 || $[82] !== t13 || $[83] !== t27) {
287
289
  t28 = /* @__PURE__ */ jsx(T1, {
288
290
  ...formFieldProps,
289
291
  as,
@@ -292,30 +294,30 @@ var NumberInputBase = (props) => {
292
294
  tabIndex: t13,
293
295
  children: t27
294
296
  });
295
- $[76] = T1;
296
- $[77] = as;
297
- $[78] = formFieldProps;
298
- $[79] = labelProps;
299
- $[80] = t12;
300
- $[81] = t13;
301
- $[82] = t27;
302
- $[83] = t28;
303
- } else t28 = $[83];
297
+ $[77] = T1;
298
+ $[78] = as;
299
+ $[79] = formFieldProps;
300
+ $[80] = labelProps;
301
+ $[81] = t12;
302
+ $[82] = t13;
303
+ $[83] = t27;
304
+ $[84] = t28;
305
+ } else t28 = $[84];
304
306
  let t29;
305
- if ($[84] !== T0 || $[85] !== as || $[86] !== error || $[87] !== t11 || $[88] !== t28) {
307
+ if ($[85] !== T0 || $[86] !== as || $[87] !== error || $[88] !== t11 || $[89] !== t28) {
306
308
  t29 = /* @__PURE__ */ jsx(T0, {
307
309
  as,
308
310
  error,
309
311
  triggerTabIndex: t11,
310
312
  children: t28
311
313
  });
312
- $[84] = T0;
313
- $[85] = as;
314
- $[86] = error;
315
- $[87] = t11;
316
- $[88] = t28;
317
- $[89] = t29;
318
- } else t29 = $[89];
314
+ $[85] = T0;
315
+ $[86] = as;
316
+ $[87] = error;
317
+ $[88] = t11;
318
+ $[89] = t28;
319
+ $[90] = t29;
320
+ } else t29 = $[90];
319
321
  return t29;
320
322
  };
321
323
  var NumberInputInner = (t0) => {
@@ -420,35 +422,35 @@ var NumberInput = (t0) => {
420
422
  props = $[1];
421
423
  renderStaticInput = $[2];
422
424
  }
423
- if ("formControl" in props && props.formControl) {
424
- let formControl;
425
+ if ("field" in props && props.field) {
426
+ let field;
425
427
  let innerProps;
426
428
  let ref;
427
429
  if ($[3] !== props) {
428
- ({formControl, ref, ...innerProps} = props);
430
+ ({field, ref, ...innerProps} = props);
429
431
  $[3] = props;
430
- $[4] = formControl;
432
+ $[4] = field;
431
433
  $[5] = innerProps;
432
434
  $[6] = ref;
433
435
  } else {
434
- formControl = $[4];
436
+ field = $[4];
435
437
  innerProps = $[5];
436
438
  ref = $[6];
437
439
  }
438
- const controlWithOptions = formControl.control;
440
+ const controlWithOptions = field.form;
439
441
  let t1;
440
442
  if ($[7] !== controlWithOptions._options?.disabled || $[8] !== innerProps || $[9] !== props.error || $[10] !== props.isDisabled || $[11] !== ref || $[12] !== renderStaticInput) {
441
443
  t1 = (t2) => {
442
- const { field, fieldState: t3 } = t2;
444
+ const { field: field_0, fieldState: t3 } = t2;
443
445
  const { error, isDirty } = t3;
444
446
  return /* @__PURE__ */ jsx(NumberInputInner, {
445
447
  ...innerProps,
446
- ref: mergeRefs(ref, field.ref),
447
- value: field.value,
448
- onChange: field.onChange,
449
- onBlur: field.onBlur,
448
+ ref: mergeRefs(ref, field_0.ref),
449
+ value: field_0.value,
450
+ onChange: field_0.onChange,
451
+ onBlur: field_0.onBlur,
450
452
  isDirty,
451
- isDisabled: field.disabled || props.isDisabled,
453
+ isDisabled: field_0.disabled || props.isDisabled,
452
454
  isFormControlDisabled: !!controlWithOptions._options?.disabled,
453
455
  error: props.error ?? error?.message,
454
456
  renderStaticInput
@@ -463,14 +465,14 @@ var NumberInput = (t0) => {
463
465
  $[13] = t1;
464
466
  } else t1 = $[13];
465
467
  let t2;
466
- if ($[14] !== formControl.control || $[15] !== formControl.name || $[16] !== t1) {
467
- t2 = /* @__PURE__ */ jsx(Controller, {
468
- control: formControl.control,
469
- name: formControl.name,
468
+ if ($[14] !== field.form || $[15] !== field.name || $[16] !== t1) {
469
+ t2 = /* @__PURE__ */ jsx(FieldController, {
470
+ control: field.form,
471
+ name: field.name,
470
472
  render: t1
471
473
  });
472
- $[14] = formControl.control;
473
- $[15] = formControl.name;
474
+ $[14] = field.form;
475
+ $[15] = field.name;
474
476
  $[16] = t1;
475
477
  $[17] = t2;
476
478
  } else t2 = $[17];
@@ -28,6 +28,7 @@ export interface NumberRangeFieldProps extends NumberRangeFieldInputProps {
28
28
  hideInnerLabels?: boolean;
29
29
  isDirty?: boolean;
30
30
  isClearable?: boolean;
31
+ isClearableIfDisabled?: boolean;
31
32
  autoFocusOnMount?: boolean;
32
33
  isDisabled?: boolean;
33
34
  isRequired?: boolean;
@@ -41,5 +42,5 @@ export interface NumberRangeFieldProps extends NumberRangeFieldInputProps {
41
42
  onRangeSideClear: (side: keyof NumberRangeValue) => void;
42
43
  onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
43
44
  }
44
- export declare const NumberRangeField: ({ ref, as, className, inputClassName, minInputClassName, maxInputClassName, inputBaseClassName, inputSizeClassName, formFieldProps, headerProps, rangeValue, effectiveError, minPlaceholder, maxPlaceholder, minLabel, maxLabel, hideInnerLabels, isDirty, isClearable, autoFocusOnMount, isDisabled, isRequired, isEmpty, isHovered, isFocused, isFocusVisible, focusWithinProps, hoverProps, onRangeSideChange, onRangeSideClear, onBlur, ...numberFieldProps }: NumberRangeFieldProps) => import("react/jsx-runtime").JSX.Element;
45
+ export declare const NumberRangeField: ({ ref, as, className, inputClassName, minInputClassName, maxInputClassName, inputBaseClassName, inputSizeClassName, formFieldProps, headerProps, rangeValue, effectiveError, minPlaceholder, maxPlaceholder, minLabel, maxLabel, hideInnerLabels, isDirty, isClearable, isClearableIfDisabled, autoFocusOnMount, isDisabled, isRequired, isEmpty, isHovered, isFocused, isFocusVisible, focusWithinProps, hoverProps, onRangeSideChange, onRangeSideClear, onBlur, ...numberFieldProps }: NumberRangeFieldProps) => import("react/jsx-runtime").JSX.Element;
45
46
  export {};