@povio/ui 3.1.0 → 3.2.0

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 (301) hide show
  1. package/dist/assets/icons/AlignCenter.js +26 -11
  2. package/dist/assets/icons/AlignLeft.js +26 -11
  3. package/dist/assets/icons/AlignLeftRight.js +26 -11
  4. package/dist/assets/icons/AlignRight.js +26 -11
  5. package/dist/assets/icons/ArrowDropDown.js +26 -11
  6. package/dist/assets/icons/ArrowDropUp.js +26 -11
  7. package/dist/assets/icons/ArrowLeft.js +26 -11
  8. package/dist/assets/icons/ArrowRight.js +26 -11
  9. package/dist/assets/icons/Bold.js +26 -11
  10. package/dist/assets/icons/BulletedList.js +26 -11
  11. package/dist/assets/icons/Calendar.js +28 -13
  12. package/dist/assets/icons/Check.js +28 -13
  13. package/dist/assets/icons/CheckCircle.js +26 -11
  14. package/dist/assets/icons/CheckboxCheckmark.js +29 -14
  15. package/dist/assets/icons/CheckboxIndeterminate.js +29 -14
  16. package/dist/assets/icons/ChevronDown.js +28 -13
  17. package/dist/assets/icons/ChevronLeft.js +28 -13
  18. package/dist/assets/icons/ChevronRight.js +28 -13
  19. package/dist/assets/icons/ChevronUp.js +28 -13
  20. package/dist/assets/icons/ChevronsLeft.js +28 -13
  21. package/dist/assets/icons/ChevronsRight.js +28 -13
  22. package/dist/assets/icons/Clock.js +26 -11
  23. package/dist/assets/icons/Close.js +26 -11
  24. package/dist/assets/icons/DateTime.js +35 -14
  25. package/dist/assets/icons/DragIndicator.js +26 -11
  26. package/dist/assets/icons/File.js +28 -13
  27. package/dist/assets/icons/Highlight.js +26 -11
  28. package/dist/assets/icons/HighlightOn.js +49 -15
  29. package/dist/assets/icons/Home.js +26 -11
  30. package/dist/assets/icons/Info.js +37 -16
  31. package/dist/assets/icons/Italic.js +26 -11
  32. package/dist/assets/icons/Link.js +26 -11
  33. package/dist/assets/icons/Menu.js +26 -11
  34. package/dist/assets/icons/NumberedList.js +26 -11
  35. package/dist/assets/icons/PointerHorizontal.js +26 -11
  36. package/dist/assets/icons/PointerVertical.js +26 -11
  37. package/dist/assets/icons/Search.js +26 -11
  38. package/dist/assets/icons/Send.js +28 -13
  39. package/dist/assets/icons/Strikethrough.js +26 -11
  40. package/dist/assets/icons/TextColor.js +48 -14
  41. package/dist/assets/icons/Today.js +26 -11
  42. package/dist/assets/icons/Underlined.js +28 -13
  43. package/dist/assets/icons/Upload.js +35 -14
  44. package/dist/assets/icons/Visibility.js +26 -11
  45. package/dist/assets/icons/VisibilityOff.js +26 -11
  46. package/dist/assets/icons/WarningFilled.js +28 -13
  47. package/dist/components/Breadcrumbs/Breadcrumbs.js +207 -56
  48. package/dist/components/Menu/Menu.js +18 -2
  49. package/dist/components/Menu/MenuDesktop.js +41 -7
  50. package/dist/components/Menu/MenuItem.js +32 -9
  51. package/dist/components/Menu/MenuMobile.js +102 -39
  52. package/dist/components/Menu/MenuPopover.js +105 -29
  53. package/dist/components/buttons/Button/button.cva.d.ts +3 -3
  54. package/dist/components/buttons/IconButton/IconButton.js +40 -8
  55. package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +2 -1
  56. package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
  57. package/dist/components/buttons/PillButton/PillButton.js +55 -17
  58. package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
  59. package/dist/components/buttons/SplitButton/SplitButton.js +103 -18
  60. package/dist/components/buttons/TextButton/TextButton.js +30 -8
  61. package/dist/components/buttons/ToggleButton/ToggleButton.js +28 -8
  62. package/dist/components/buttons/shared/ButtonContent.js +80 -22
  63. package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
  64. package/dist/components/inputs/Checkbox/Checkbox.js +201 -35
  65. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
  66. package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +3 -0
  67. package/dist/components/inputs/Checkbox/checkbox.cva.js +2 -1
  68. package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +12 -5
  69. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +380 -75
  70. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +12 -5
  71. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +499 -186
  72. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +14 -5
  73. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +280 -46
  74. package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +7 -3
  75. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +616 -121
  76. package/dist/components/inputs/DateTime/shared/Calendar.d.ts +5 -2
  77. package/dist/components/inputs/DateTime/shared/Calendar.js +342 -119
  78. package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +4 -2
  79. package/dist/components/inputs/DateTime/shared/CalendarCell.js +310 -103
  80. package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +4 -2
  81. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +150 -33
  82. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +233 -98
  83. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
  84. package/dist/components/inputs/DateTime/shared/DateField.d.ts +2 -1
  85. package/dist/components/inputs/DateTime/shared/DateField.js +288 -112
  86. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +14 -3
  87. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +359 -129
  88. package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +18 -1
  89. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +104 -11
  90. package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +83 -28
  91. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
  92. package/dist/components/inputs/DateTime/shared/MonthPicker.js +103 -58
  93. package/dist/components/inputs/DateTime/shared/RangeCalendar.js +193 -82
  94. package/dist/components/inputs/DateTime/shared/TimeField.js +27 -8
  95. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +279 -110
  96. package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +4 -1
  97. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +211 -65
  98. package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
  99. package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +5 -0
  100. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +16 -0
  101. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +16 -0
  102. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +15 -0
  103. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +32 -0
  104. package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +2 -0
  105. package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +1 -0
  106. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +41 -0
  107. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +99 -0
  108. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +1 -0
  109. package/dist/components/inputs/File/FileUpload.js +91 -46
  110. package/dist/components/inputs/File/FileUploadContainer.js +15 -7
  111. package/dist/components/inputs/File/InputUpload.js +317 -79
  112. package/dist/components/inputs/File/index.d.ts +1 -1
  113. package/dist/components/inputs/File/shared/FileCard.js +104 -41
  114. package/dist/components/inputs/File/shared/FileCardList.js +47 -12
  115. package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
  116. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
  117. package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
  118. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
  119. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
  120. package/dist/components/inputs/File/shared/InputUploadContent.js +148 -34
  121. package/dist/components/inputs/File/shared/InputUploadFilled.js +49 -8
  122. package/dist/components/inputs/File/shared/ProgressBar.js +102 -15
  123. package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +0 -11
  124. package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -18
  125. package/dist/components/inputs/FormField/FormField.d.ts +3 -3
  126. package/dist/components/inputs/FormField/FormField.js +119 -37
  127. package/dist/components/inputs/FormField/FormFieldError.js +25 -5
  128. package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
  129. package/dist/components/inputs/FormField/FormFieldHeader.js +81 -22
  130. package/dist/components/inputs/FormField/FormFieldHeaderClose.js +31 -7
  131. package/dist/components/inputs/FormField/FormFieldHelper.js +26 -6
  132. package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
  133. package/dist/components/inputs/FormField/FormFieldLabel.js +40 -9
  134. package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +13 -0
  135. package/dist/components/inputs/FormField/formFieldHeader.cva.js +14 -0
  136. package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +5 -2
  137. package/dist/components/inputs/Input/NumberInput/NumberInput.js +446 -97
  138. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +45 -0
  139. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +571 -0
  140. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +35 -0
  141. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +574 -0
  142. package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
  143. package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +8 -0
  144. package/dist/components/inputs/Input/TextArea/TextArea.cva.js +5 -0
  145. package/dist/components/inputs/Input/TextArea/TextArea.js +305 -90
  146. package/dist/components/inputs/Input/TextInput/TextInput.d.ts +3 -1
  147. package/dist/components/inputs/Input/TextInput/TextInput.js +429 -90
  148. package/dist/components/inputs/Input/shared/InputContent.js +193 -59
  149. package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +1 -0
  150. package/dist/components/inputs/Input/shared/numberStatic.utils.js +7 -0
  151. package/dist/components/inputs/Inputs/Form.js +40 -11
  152. package/dist/components/inputs/Inputs/InputItem.d.ts +15 -21
  153. package/dist/components/inputs/Inputs/InputItem.js +69 -14
  154. package/dist/components/inputs/Inputs/Inputs.js +37 -11
  155. package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +3 -1
  156. package/dist/components/inputs/RadioGroup/RadioGroup.js +353 -61
  157. package/dist/components/inputs/RadioGroup/radio.cva.d.ts +45 -0
  158. package/dist/components/inputs/RadioGroup/radio.cva.js +48 -1
  159. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +6 -2
  160. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +217 -22
  161. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -18
  162. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +107 -8
  163. package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +37 -0
  164. package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +14 -0
  165. package/dist/components/inputs/Selection/Select/QuerySelect.js +178 -0
  166. package/dist/components/inputs/Selection/Select/Select.d.ts +7 -3
  167. package/dist/components/inputs/Selection/Select/Select.js +227 -18
  168. package/dist/components/inputs/Selection/shared/SelectBase.d.ts +8 -1
  169. package/dist/components/inputs/Selection/shared/SelectBase.js +69 -18
  170. package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
  171. package/dist/components/inputs/Selection/shared/SelectDesktop.js +393 -138
  172. package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
  173. package/dist/components/inputs/Selection/shared/SelectInput.js +397 -116
  174. package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
  175. package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
  176. package/dist/components/inputs/Selection/shared/SelectListBox.js +164 -52
  177. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +85 -35
  178. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +69 -16
  179. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +70 -21
  180. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
  181. package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
  182. package/dist/components/inputs/Selection/shared/SelectMobile.js +9 -3
  183. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +9 -0
  184. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +47 -0
  185. package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +14 -0
  186. package/dist/components/inputs/Selection/shared/querySelect.utils.js +43 -0
  187. package/dist/components/inputs/Selection/shared/select.context.d.ts +3 -2
  188. package/dist/components/inputs/Selection/shared/select.context.js +67 -36
  189. package/dist/components/inputs/Selection/shared/select.types.d.ts +3 -2
  190. package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +6 -0
  191. package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +5 -0
  192. package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +12 -0
  193. package/dist/components/inputs/Selection/shared/selectInput.cva.js +8 -0
  194. package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +23 -0
  195. package/dist/components/inputs/Selection/shared/staticSelect.utils.js +54 -0
  196. package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +1 -0
  197. package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
  198. package/dist/components/inputs/Skeleton/InputFrame.d.ts +83 -0
  199. package/dist/components/inputs/Skeleton/InputFrame.js +612 -0
  200. package/dist/components/inputs/Slider/Slider.d.ts +2 -1
  201. package/dist/components/inputs/Slider/Slider.js +265 -76
  202. package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -0
  203. package/dist/components/inputs/TextEditor/TextEditor.js +447 -98
  204. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
  205. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +102 -30
  206. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
  207. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
  208. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
  209. package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
  210. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
  211. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
  212. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
  213. package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
  214. package/dist/components/inputs/Toggle/Toggle.d.ts +1 -0
  215. package/dist/components/inputs/Toggle/Toggle.js +214 -37
  216. package/dist/components/inputs/Toggle/toggle.cva.d.ts +3 -0
  217. package/dist/components/inputs/Toggle/toggle.cva.js +2 -1
  218. package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
  219. package/dist/components/inputs/shared/CheckContent.js +21 -11
  220. package/dist/components/inputs/shared/InputClear.d.ts +2 -1
  221. package/dist/components/inputs/shared/InputClear.js +88 -12
  222. package/dist/components/inputs/shared/TooltipWrapper.js +50 -11
  223. package/dist/components/inputs/shared/input.cva.d.ts +28 -0
  224. package/dist/components/inputs/shared/input.cva.js +38 -4
  225. package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +8 -0
  226. package/dist/components/inputs/shared/tooltipWrapper.cva.js +5 -0
  227. package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +15 -0
  228. package/dist/components/inputs/shared/useStaticInputHandoff.js +112 -0
  229. package/dist/components/navigation/Accordion/Accordion.js +69 -22
  230. package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
  231. package/dist/components/navigation/Stepper/Stepper.js +67 -22
  232. package/dist/components/navigation/Stepper/StepperItem.js +104 -31
  233. package/dist/components/navigation/Stepper/StepperSeparator.js +23 -5
  234. package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
  235. package/dist/components/overlays/BottomSheet/BottomSheet.js +96 -23
  236. package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
  237. package/dist/components/overlays/Drawer/Drawer.js +62 -20
  238. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +85 -28
  239. package/dist/components/overlays/Tooltip/Tooltip.js +137 -28
  240. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
  241. package/dist/components/segment/Segment.js +218 -57
  242. package/dist/components/segment/SegmentItem.js +67 -10
  243. package/dist/components/shared/pagination/Pagination.js +108 -22
  244. package/dist/components/shared/pagination/PaginationList.js +167 -64
  245. package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
  246. package/dist/components/status/Alert/Alert.js +97 -30
  247. package/dist/components/status/Loader/Loader.js +77 -22
  248. package/dist/components/status/Toast/Toast.js +28 -14
  249. package/dist/components/status/Toast/toast.cva.d.ts +1 -1
  250. package/dist/components/status/Toast/useToast.js +62 -57
  251. package/dist/components/table/ColumnConfig.js +158 -54
  252. package/dist/components/table/InfiniteTable.js +67 -16
  253. package/dist/components/table/PaginatedTable.js +84 -18
  254. package/dist/components/table/Table.js +28 -27
  255. package/dist/components/text/Link/Link.js +19 -7
  256. package/dist/components/text/Typography/Typography.js +23 -8
  257. package/dist/config/confirmation.context.js +1 -1
  258. package/dist/config/link.context.js +23 -9
  259. package/dist/config/router.context.js +42 -16
  260. package/dist/config/theme.context.js +98 -45
  261. package/dist/config/uiConfig.context.d.ts +20 -6
  262. package/dist/config/uiConfig.context.js +68 -14
  263. package/dist/config/uiOverrides.context.d.ts +30 -11
  264. package/dist/config/uiOverrides.context.js +54 -14
  265. package/dist/helpers/dynamicInputs.d.ts +12 -9
  266. package/dist/helpers/dynamicInputs.js +13 -8
  267. package/dist/hooks/useAutosave.d.ts +2 -1
  268. package/dist/hooks/useAutosave.js +12 -4
  269. package/dist/hooks/useAutosave.spec.d.ts +1 -0
  270. package/dist/hooks/useBreakpoint.js +16 -3
  271. package/dist/hooks/useDebounceCallback.js +51 -17
  272. package/dist/hooks/useFilters.js +125 -64
  273. package/dist/hooks/useForm.js +42 -8
  274. package/dist/hooks/useFormAutosave.d.ts +3 -1
  275. package/dist/hooks/useFormAutosave.js +122 -30
  276. package/dist/hooks/useFormAutosave.spec.d.ts +1 -0
  277. package/dist/hooks/useIntersectionObserver.d.ts +1 -1
  278. package/dist/hooks/useIntersectionObserver.js +91 -24
  279. package/dist/hooks/useKeyInteractions.d.ts +20 -0
  280. package/dist/hooks/useKeyInteractions.js +54 -0
  281. package/dist/hooks/useKeyInteractions.spec.d.ts +1 -0
  282. package/dist/hooks/useLocalStorage.js +43 -10
  283. package/dist/hooks/useLongPressRepeat.js +55 -20
  284. package/dist/hooks/usePagination.js +49 -19
  285. package/dist/hooks/useQueryAutocomplete.d.ts +14 -0
  286. package/dist/hooks/useQueryAutocomplete.js +72 -0
  287. package/dist/hooks/useScrollableListBox.js +37 -16
  288. package/dist/hooks/useSorting.js +69 -28
  289. package/dist/hooks/useStateAndRef.js +21 -7
  290. package/dist/hooks/useTableColumnConfig.js +124 -31
  291. package/dist/hooks/useTranslationMemo.js +25 -5
  292. package/dist/index.d.ts +18 -3
  293. package/dist/index.js +15 -5
  294. package/dist/tw-ui-plugin.js +6 -0
  295. package/dist/utils/date-time.utils.d.ts +38 -10
  296. package/dist/utils/date-time.utils.js +136 -22
  297. package/dist/utils/query.utils.d.ts +4 -0
  298. package/dist/utils/query.utils.js +8 -0
  299. package/dist/utils/zod.utils.d.ts +2 -0
  300. package/dist/utils/zod.utils.js +5 -0
  301. package/package.json +2 -2
@@ -4,74 +4,208 @@ import { Loader } from "../../../status/Loader/Loader.js";
4
4
  import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
5
5
  import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
6
6
  import { InputClear } from "../../shared/InputClear.js";
7
- import { inputSizeDefinition } from "../../shared/input.cva.js";
7
+ import { inputContentWrapperDefinition, inputSizeDefinition } from "../../shared/input.cva.js";
8
+ import { c } from "react/compiler-runtime";
8
9
  import { jsx, jsxs } from "react/jsx-runtime";
9
10
  import { clsx } from "clsx";
10
11
  import { isValidElement } from "react";
11
12
  //#region src/components/inputs/Input/shared/InputContent.tsx
12
- var InputContent = ({ leadingIcon: LeadingIcon, trailingIcon: TrailingIcon, unit, isLoading, isDisabled, action, isClearable, value, onChange, onBlur, children, headerProps, as, size }) => {
13
+ var InputContent = (t0) => {
14
+ const $ = c(64);
15
+ const { leadingIcon: LeadingIcon, trailingIcon: TrailingIcon, unit, isLoading, isDisabled, action, isClearable, value, onChange, onBlur, children, headerProps, as, size } = t0;
13
16
  const typographyCva = UIOverrides.useCva("typography.cva", typographyDefinition);
14
17
  const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
15
- const isLeadingIconElement = LeadingIcon && isValidElement(LeadingIcon);
16
- const isTrailingIconElement = TrailingIcon && isValidElement(TrailingIcon);
18
+ const inputContentWrapperCva = UIOverrides.useCva("input.contentWrapperCva", inputContentWrapperDefinition);
19
+ let t1;
20
+ if ($[0] !== LeadingIcon) {
21
+ t1 = LeadingIcon && isValidElement(LeadingIcon);
22
+ $[0] = LeadingIcon;
23
+ $[1] = t1;
24
+ } else t1 = $[1];
25
+ const isLeadingIconElement = t1;
26
+ let t2;
27
+ if ($[2] !== TrailingIcon) {
28
+ t2 = TrailingIcon && isValidElement(TrailingIcon);
29
+ $[2] = TrailingIcon;
30
+ $[3] = t2;
31
+ } else t2 = $[3];
32
+ const isTrailingIconElement = t2;
17
33
  const showClear = value != null && value !== "" && !isDisabled;
18
- return /* @__PURE__ */ jsxs("div", {
19
- className: "flex w-full items-center gap-input-gap-input-text-to-elements",
20
- children: [/* @__PURE__ */ jsxs("div", {
21
- className: clsx(inputSizeCva({
22
- size,
23
- as
24
- }), "group/input-content flex w-full items-center gap-input-gap-input-text-to-elements pr-0!", as === "inline" && "h-full"),
25
- children: [LeadingIcon && /* @__PURE__ */ jsx("div", {
26
- className: clsx(!isLeadingIconElement && "pointer-events-none"),
27
- children: isLeadingIconElement ? LeadingIcon : /* @__PURE__ */ jsx(LeadingIcon, { className: "size-6 text-interactive-text-secondary-idle" })
28
- }), /* @__PURE__ */ jsxs("div", {
29
- className: clsx("flex w-full", as === "floating" && "flex-col", as === "filter" && "gap-input-gap-input-text-to-elements"),
30
- children: [as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
31
- as,
32
- size,
33
- ...headerProps
34
- }), children]
35
- })]
36
- }), /* @__PURE__ */ jsxs("div", {
37
- className: clsx(inputSizeCva({
38
- size,
39
- as
40
- }), "flex items-center gap-input-gap-trailing-elements py-0! pl-0!", !isTrailingIconElement && !action && !(isClearable && showClear) && "pointer-events-none"),
34
+ const t3 = as === "inline" && "h-full";
35
+ let t4;
36
+ if ($[4] !== as || $[5] !== inputSizeCva || $[6] !== size || $[7] !== t3) {
37
+ t4 = clsx("group/input-content flex w-full items-center gap-input-gap-input-text-to-elements pr-0!", t3, inputSizeCva({
38
+ size,
39
+ as
40
+ }));
41
+ $[4] = as;
42
+ $[5] = inputSizeCva;
43
+ $[6] = size;
44
+ $[7] = t3;
45
+ $[8] = t4;
46
+ } else t4 = $[8];
47
+ let t5;
48
+ if ($[9] !== LeadingIcon || $[10] !== isLeadingIconElement) {
49
+ t5 = LeadingIcon && /* @__PURE__ */ jsx("div", {
50
+ className: clsx(!isLeadingIconElement && "pointer-events-none"),
51
+ children: isLeadingIconElement ? LeadingIcon : /* @__PURE__ */ jsx(LeadingIcon, { className: "size-6 text-interactive-text-secondary-idle" })
52
+ });
53
+ $[9] = LeadingIcon;
54
+ $[10] = isLeadingIconElement;
55
+ $[11] = t5;
56
+ } else t5 = $[11];
57
+ let t6;
58
+ if ($[12] !== as || $[13] !== inputContentWrapperCva) {
59
+ t6 = inputContentWrapperCva({ as });
60
+ $[12] = as;
61
+ $[13] = inputContentWrapperCva;
62
+ $[14] = t6;
63
+ } else t6 = $[14];
64
+ let t7;
65
+ if ($[15] !== as || $[16] !== headerProps || $[17] !== size) {
66
+ t7 = as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
67
+ as,
68
+ size,
69
+ ...headerProps
70
+ });
71
+ $[15] = as;
72
+ $[16] = headerProps;
73
+ $[17] = size;
74
+ $[18] = t7;
75
+ } else t7 = $[18];
76
+ let t8;
77
+ if ($[19] !== children || $[20] !== t6 || $[21] !== t7) {
78
+ t8 = /* @__PURE__ */ jsxs("div", {
79
+ className: t6,
80
+ children: [t7, children]
81
+ });
82
+ $[19] = children;
83
+ $[20] = t6;
84
+ $[21] = t7;
85
+ $[22] = t8;
86
+ } else t8 = $[22];
87
+ let t9;
88
+ if ($[23] !== t4 || $[24] !== t5 || $[25] !== t8) {
89
+ t9 = /* @__PURE__ */ jsxs("div", {
90
+ className: t4,
91
+ children: [t5, t8]
92
+ });
93
+ $[23] = t4;
94
+ $[24] = t5;
95
+ $[25] = t8;
96
+ $[26] = t9;
97
+ } else t9 = $[26];
98
+ let t10;
99
+ if ($[27] !== action || $[28] !== as || $[29] !== inputSizeCva || $[30] !== isClearable || $[31] !== isTrailingIconElement || $[32] !== showClear || $[33] !== size) {
100
+ t10 = clsx("flex items-center gap-input-gap-trailing-elements py-0! pl-0!", inputSizeCva({
101
+ size,
102
+ as
103
+ }), !isTrailingIconElement && !action && !(isClearable && showClear) && "pointer-events-none");
104
+ $[27] = action;
105
+ $[28] = as;
106
+ $[29] = inputSizeCva;
107
+ $[30] = isClearable;
108
+ $[31] = isTrailingIconElement;
109
+ $[32] = showClear;
110
+ $[33] = size;
111
+ $[34] = t10;
112
+ } else t10 = $[34];
113
+ let t11;
114
+ if ($[35] !== isClearable || $[36] !== onBlur || $[37] !== onChange || $[38] !== showClear) {
115
+ t11 = isClearable && /* @__PURE__ */ jsx(InputClear, {
116
+ onClear: () => {
117
+ onChange?.("");
118
+ onBlur?.({ target: { value: "" } });
119
+ },
120
+ show: showClear
121
+ });
122
+ $[35] = isClearable;
123
+ $[36] = onBlur;
124
+ $[37] = onChange;
125
+ $[38] = showClear;
126
+ $[39] = t11;
127
+ } else t11 = $[39];
128
+ let t12;
129
+ if ($[40] !== typographyCva || $[41] !== unit) {
130
+ t12 = unit && /* @__PURE__ */ jsx("span", {
131
+ className: typographyCva({
132
+ size: "label-2",
133
+ sizeMobile: "label-2",
134
+ variant: "prominent-1",
135
+ className: "text-text-default-3"
136
+ }),
137
+ children: unit
138
+ });
139
+ $[40] = typographyCva;
140
+ $[41] = unit;
141
+ $[42] = t12;
142
+ } else t12 = $[42];
143
+ let t13;
144
+ if ($[43] !== isLoading) {
145
+ t13 = isLoading && /* @__PURE__ */ jsx("div", {
146
+ className: "inline-flex",
147
+ children: /* @__PURE__ */ jsx(Loader, {})
148
+ });
149
+ $[43] = isLoading;
150
+ $[44] = t13;
151
+ } else t13 = $[44];
152
+ let t14;
153
+ if ($[45] !== action || $[46] !== isDisabled || $[47] !== isLoading) {
154
+ t14 = !isLoading && action && /* @__PURE__ */ jsx(InlineIconButton, {
155
+ color: "secondary",
156
+ icon: action.icon,
157
+ isDisabled,
158
+ onPress: action.onClick,
159
+ excludeFromTabOrder: true,
160
+ label: action.altText,
161
+ className: clsx("border-0!", action.className),
162
+ "data-static-press-action": ""
163
+ });
164
+ $[45] = action;
165
+ $[46] = isDisabled;
166
+ $[47] = isLoading;
167
+ $[48] = t14;
168
+ } else t14 = $[48];
169
+ let t15;
170
+ if ($[49] !== TrailingIcon || $[50] !== action || $[51] !== isLoading || $[52] !== isTrailingIconElement) {
171
+ t15 = !isLoading && !action && TrailingIcon && (isTrailingIconElement ? TrailingIcon : /* @__PURE__ */ jsx(TrailingIcon, { className: "size-6 text-interactive-text-secondary-idle" }));
172
+ $[49] = TrailingIcon;
173
+ $[50] = action;
174
+ $[51] = isLoading;
175
+ $[52] = isTrailingIconElement;
176
+ $[53] = t15;
177
+ } else t15 = $[53];
178
+ let t16;
179
+ if ($[54] !== t10 || $[55] !== t11 || $[56] !== t12 || $[57] !== t13 || $[58] !== t14 || $[59] !== t15) {
180
+ t16 = /* @__PURE__ */ jsxs("div", {
181
+ className: t10,
41
182
  children: [
42
- isClearable && /* @__PURE__ */ jsx(InputClear, {
43
- onClear: () => {
44
- onChange?.("");
45
- onBlur?.({ target: { value: "" } });
46
- },
47
- show: showClear
48
- }),
49
- unit && /* @__PURE__ */ jsx("span", {
50
- className: typographyCva({
51
- size: "label-2",
52
- sizeMobile: "label-2",
53
- variant: "prominent-1",
54
- className: "text-text-default-3"
55
- }),
56
- children: unit
57
- }),
58
- isLoading && /* @__PURE__ */ jsx("div", {
59
- className: "inline-flex",
60
- children: /* @__PURE__ */ jsx(Loader, {})
61
- }),
62
- !isLoading && action && /* @__PURE__ */ jsx(InlineIconButton, {
63
- color: "secondary",
64
- icon: action.icon,
65
- isDisabled,
66
- onPress: action.onClick,
67
- excludeFromTabOrder: true,
68
- label: action.altText,
69
- className: clsx("border-0!", action.className)
70
- }),
71
- !isLoading && !action && TrailingIcon && (isTrailingIconElement ? TrailingIcon : /* @__PURE__ */ jsx(TrailingIcon, { className: "size-6 text-interactive-text-secondary-idle" }))
183
+ t11,
184
+ t12,
185
+ t13,
186
+ t14,
187
+ t15
72
188
  ]
73
- })]
74
- });
189
+ });
190
+ $[54] = t10;
191
+ $[55] = t11;
192
+ $[56] = t12;
193
+ $[57] = t13;
194
+ $[58] = t14;
195
+ $[59] = t15;
196
+ $[60] = t16;
197
+ } else t16 = $[60];
198
+ let t17;
199
+ if ($[61] !== t16 || $[62] !== t9) {
200
+ t17 = /* @__PURE__ */ jsxs("div", {
201
+ className: "flex w-full items-center gap-input-gap-input-text-to-elements",
202
+ children: [t9, t16]
203
+ });
204
+ $[61] = t16;
205
+ $[62] = t9;
206
+ $[63] = t17;
207
+ } else t17 = $[63];
208
+ return t17;
75
209
  };
76
210
  //#endregion
77
211
  export { InputContent };
@@ -0,0 +1 @@
1
+ export declare const getStaticNumberDisplayValue: (value: unknown, formatter: Intl.NumberFormat) => string | null;
@@ -0,0 +1,7 @@
1
+ //#region src/components/inputs/Input/shared/numberStatic.utils.ts
2
+ var getStaticNumberDisplayValue = (value, formatter) => {
3
+ if (typeof value !== "number" || !Number.isFinite(value)) return null;
4
+ return formatter.format(value);
5
+ };
6
+ //#endregion
7
+ export { getStaticNumberDisplayValue };
@@ -2,8 +2,8 @@ import { InputItem } from "./InputItem.js";
2
2
  import { StringUtils } from "../../../utils/string.utils.js";
3
3
  import { ZodUtils } from "../../../utils/zod.utils.js";
4
4
  import { getDefaultInputComponentType } from "../../../helpers/dynamicInputs.js";
5
+ import { c } from "react/compiler-runtime";
5
6
  import { jsx } from "react/jsx-runtime";
6
- import { useMemo } from "react";
7
7
  import { z } from "zod";
8
8
  //#region src/components/inputs/Inputs/Form.tsx
9
9
  var createFieldComponent = (field, schemaKeyType, form) => {
@@ -23,22 +23,51 @@ var createFieldComponent = (field, schemaKeyType, form) => {
23
23
  });
24
24
  };
25
25
  };
26
- function Form({ form, schema, onSubmit, onError, className, children }) {
27
- const components = useMemo(() => {
28
- const fieldComponents = {};
26
+ function Form(t0) {
27
+ const $ = c(14);
28
+ const { form, schema, onSubmit, onError, className, children } = t0;
29
+ let fieldComponents;
30
+ if ($[0] !== form || $[1] !== schema.shape) {
31
+ fieldComponents = {};
29
32
  const fields = Object.keys(schema.shape);
30
33
  for (const field of fields) {
31
34
  const componentName = StringUtils.capitalize(String(field));
32
35
  const schemaKeyType = schema.shape[field];
33
36
  fieldComponents[componentName] = createFieldComponent(field, schemaKeyType, form);
34
37
  }
35
- return fieldComponents;
36
- }, [schema.shape, form]);
37
- return /* @__PURE__ */ jsx("form", {
38
- onSubmit: form.handleSubmit(onSubmit, onError),
39
- className,
40
- children: children(components)
41
- });
38
+ $[0] = form;
39
+ $[1] = schema.shape;
40
+ $[2] = fieldComponents;
41
+ } else fieldComponents = $[2];
42
+ const components = fieldComponents;
43
+ let t1;
44
+ if ($[3] !== form || $[4] !== onError || $[5] !== onSubmit) {
45
+ t1 = form.handleSubmit(onSubmit, onError);
46
+ $[3] = form;
47
+ $[4] = onError;
48
+ $[5] = onSubmit;
49
+ $[6] = t1;
50
+ } else t1 = $[6];
51
+ let t2;
52
+ if ($[7] !== children || $[8] !== components) {
53
+ t2 = children(components);
54
+ $[7] = children;
55
+ $[8] = components;
56
+ $[9] = t2;
57
+ } else t2 = $[9];
58
+ let t3;
59
+ if ($[10] !== className || $[11] !== t1 || $[12] !== t2) {
60
+ t3 = /* @__PURE__ */ jsx("form", {
61
+ onSubmit: t1,
62
+ className,
63
+ children: t2
64
+ });
65
+ $[10] = className;
66
+ $[11] = t1;
67
+ $[12] = t2;
68
+ $[13] = t3;
69
+ } else t3 = $[13];
70
+ return t3;
42
71
  }
43
72
  //#endregion
44
73
  export { Form };
@@ -1,33 +1,27 @@
1
1
  import { ComponentProps, JSXElementConstructor, ReactElement, ReactNode } from 'react';
2
2
  import { Control, UseFormReturn } from 'react-hook-form';
3
3
  import { z } from 'zod';
4
+ import { Autocomplete } from '../Selection/Autocomplete/Autocomplete';
5
+ import { Select } from '../Selection/Select/Select';
4
6
  import { HasRequiredProperty } from '../../../types/common';
5
7
  declare const componentRegistry: {
6
8
  readonly toggle: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('../Toggle/Toggle').ControlledToggleProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
7
9
  readonly checkbox: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('../Checkbox/Checkbox').ControlledCheckboxProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
8
- readonly numberInput: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('../Input/NumberInput/NumberInput').ControlledNumberInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
10
+ readonly numberInput: <TFieldValues extends import('react-hook-form').FieldValues>({ renderStaticInput, ...props }: import('../Input/NumberInput/NumberInput').ControlledNumberInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
11
+ readonly numberRangeInput: <TFieldValues extends import('react-hook-form').FieldValues>({ renderStaticInput, ...props }: import('../Input/NumberRangeInput/NumberRangeInput').ControlledNumberRangeInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
9
12
  readonly slider: <TFieldValues extends import('react-hook-form').FieldValues, IsRange extends boolean = false>(props: import('../Slider/Slider').ControlledSliderProps<TFieldValues, IsRange>) => import("react/jsx-runtime").JSX.Element;
10
- readonly textInput: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('../Input/TextInput/TextInput').ControlledTextInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
13
+ readonly textInput: <TFieldValues extends import('react-hook-form').FieldValues>({ renderStaticInput, ...props }: import('../Input/TextInput/TextInput').ControlledTextInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
11
14
  readonly passwordInput: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('../Input/PasswordInput/PasswordInput').ControlledPasswordInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
12
15
  readonly textArea: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('../Input/TextArea/TextArea').ControlledTextAreaProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
13
- readonly select: <TFieldValues extends import('react-hook-form').FieldValues, TKey extends import('react-aria').Key = import('react-aria').Key, TInitialSelectItem = import('../Selection/shared/select.types').DefaultInitialSelectItem<TKey>>(props: import('../Selection/Select/Select').ControlledSelectProps<TFieldValues, TKey, TInitialSelectItem>) => import("react/jsx-runtime").JSX.Element;
14
- readonly autocomplete: <TFieldValues extends import('react-hook-form').FieldValues, TKey extends import('react-aria').Key = import('react-aria').Key, TInitialSelectItem = import('../Selection/shared/select.types').DefaultInitialSelectItem<TKey>>(props: import('../Selection/Autocomplete/Autocomplete').ControlledAutocompleteProps<TFieldValues, TKey, TInitialSelectItem>) => import("react/jsx-runtime").JSX.Element;
15
- readonly queryAutocomplete: <TFieldValues extends import('react-hook-form').FieldValues, TSelectItem extends import('../Selection/shared/select.types').SelectItem<any>, TQueryFn extends (...args: any) => import('@tanstack/react-query').UseQueryResult<TSelectItem[]>>({ query, queryParams, queryOptions, ...props }: import('../../../types/common').OmitDiscriminatedUnion<import('../Selection/Autocomplete/Autocomplete').AutocompleteProps<Exclude<ReturnType<TQueryFn>["data"], undefined>[0] extends {
16
- id: infer InferredKey extends import('react-aria').Key;
17
- } ? InferredKey : never>, "onChange" | "value" | "items" | "selectionMode" | "isLoading" | "showSelectionBar" | "showSelectAllOption" | "initialSelection" | "showSelectionContent" | "onSearchChange"> & (import('../Selection/shared/select.types').GroupedSelectControlProps<TFieldValues, Exclude<ReturnType<TQueryFn>["data"], undefined>[0] extends {
18
- id: infer InferredKey extends import('react-aria').Key;
19
- } ? InferredKey : never> & {
20
- query: Parameters<TQueryFn>[0] extends {
21
- search?: string;
22
- } ? TQueryFn : never;
23
- queryParams?: Omit<Parameters<TQueryFn>[0], "search"> | undefined;
24
- queryOptions?: Parameters<TQueryFn>[1] | undefined;
25
- })) => import("react/jsx-runtime").JSX.Element;
16
+ readonly select: typeof Select;
17
+ readonly querySelect: <TFieldValues extends import('react-hook-form').FieldValues, TQueryFn extends import('../Selection/shared/querySelect.utils').QueryFn, TKey extends import('react-aria').Key = import('react-aria').Key, TInitialSelectItem = import('../../..').DefaultInitialSelectItem<TKey>>(props: import('../Selection/Select/QuerySelect').QuerySelectProps<TFieldValues, TQueryFn, TKey, TInitialSelectItem>) => import("react/jsx-runtime").JSX.Element;
18
+ readonly autocomplete: typeof Autocomplete;
19
+ readonly queryAutocomplete: <TFieldValues extends import('react-hook-form').FieldValues, TSelectItem extends import('../../..').SelectItem<any>, TQueryFn extends import('../Selection/Autocomplete/queryAutocomplete.types').QueryFn>(props: import('../Selection/Autocomplete/queryAutocomplete.types').QueryAutocompleteProps<TFieldValues, TSelectItem, TQueryFn>) => import("react/jsx-runtime").JSX.Element;
26
20
  readonly segment: <TFieldValues extends import('react-hook-form').FieldValues, TKey extends import('react-aria').Key = import('react-aria').Key>(props: import('../../..').ControlledSegmentProps<TFieldValues, TKey>) => import("react/jsx-runtime").JSX.Element;
27
- readonly datePicker: <TFieldValues extends import('react-hook-form').FieldValues>({ fullIso, granularity, minValue, maxValue, ...props }: import('../DateTime/DatePicker/DatePicker').ControlledDatePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
28
- readonly dateTimePicker: <TFieldValues extends import('react-hook-form').FieldValues>({ fullIso, ...props }: import('../DateTime/DateTimePicker/DateTimePicker').ControlledDateTimePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
29
- readonly timePicker: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('../DateTime/TimePicker/TimePicker').ControlledTimePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
30
- readonly dateRangePicker: <TFieldValues extends import('react-hook-form').FieldValues>({ fullIso, minValue, maxValue, ...props }: import('../DateTime/DateRangePicker/DateRangePicker').ControlledDateRangePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
21
+ readonly datePicker: <TFieldValues extends import('react-hook-form').FieldValues>({ fullIso, granularity, minValue, maxValue, renderStaticInput, ...props }: import('../DateTime/DatePicker/DatePicker').ControlledDatePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
22
+ readonly dateTimePicker: <TFieldValues extends import('react-hook-form').FieldValues>({ fullIso, renderStaticInput, ...props }: import('../DateTime/DateTimePicker/DateTimePicker').ControlledDateTimePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
23
+ readonly timePicker: <TFieldValues extends import('react-hook-form').FieldValues>({ renderStaticInput, ...props }: import('../DateTime/TimePicker/TimePicker').ControlledTimePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
24
+ readonly dateRangePicker: <TFieldValues extends import('react-hook-form').FieldValues>({ fullIso, minValue, maxValue, renderStaticInput, ...props }: import('../DateTime/DateRangePicker/DateRangePicker').ControlledDateRangePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
31
25
  readonly unknown: null;
32
26
  };
33
27
  export type InputComponentRegistry = typeof componentRegistry;
@@ -56,8 +50,8 @@ type TypeBasedInputDef<TSchemaType extends Record<string, any>, T extends InputC
56
50
  interface RenderBasedInputDef<TSchemaType extends Record<string, any>, K extends keyof TSchemaType> {
57
51
  type?: never;
58
52
  name: K;
59
- label?: never;
60
- placeholder?: never;
53
+ label?: string;
54
+ placeholder?: string;
61
55
  props?: never;
62
56
  inputWrapper?: never;
63
57
  render: (formControl: {
@@ -6,6 +6,7 @@ import { DateRangePicker } from "../DateTime/DateRangePicker/DateRangePicker.js"
6
6
  import { DateTimePicker } from "../DateTime/DateTimePicker/DateTimePicker.js";
7
7
  import { TimePicker } from "../DateTime/TimePicker/TimePicker.js";
8
8
  import { NumberInput } from "../Input/NumberInput/NumberInput.js";
9
+ import { NumberRangeInput } from "../Input/NumberRangeInput/NumberRangeInput.js";
9
10
  import { PasswordInput } from "../Input/PasswordInput/PasswordInput.js";
10
11
  import { TextArea } from "../Input/TextArea/TextArea.js";
11
12
  import { Autocomplete } from "../Selection/Autocomplete/Autocomplete.js";
@@ -13,17 +14,21 @@ import { QueryAutocomplete } from "../Selection/Autocomplete/QueryAutocomplete.j
13
14
  import { Slider } from "../Slider/Slider.js";
14
15
  import { Toggle } from "../Toggle/Toggle.js";
15
16
  import { Segment } from "../../segment/Segment.js";
17
+ import { QuerySelect } from "../Selection/Select/QuerySelect.js";
18
+ import { c } from "react/compiler-runtime";
16
19
  import { jsx } from "react/jsx-runtime";
17
20
  //#region src/components/inputs/Inputs/InputItem.tsx
18
21
  var componentRegistry = {
19
22
  toggle: Toggle,
20
23
  checkbox: Checkbox,
21
24
  numberInput: NumberInput,
25
+ numberRangeInput: NumberRangeInput,
22
26
  slider: Slider,
23
27
  textInput: TextInput,
24
28
  passwordInput: PasswordInput,
25
29
  textArea: TextArea,
26
30
  select: Select,
31
+ querySelect: QuerySelect,
27
32
  autocomplete: Autocomplete,
28
33
  queryAutocomplete: QueryAutocomplete,
29
34
  segment: Segment,
@@ -33,24 +38,74 @@ var componentRegistry = {
33
38
  dateRangePicker: DateRangePicker,
34
39
  unknown: null
35
40
  };
36
- function InputItem({ form, inputDef }) {
41
+ function InputItem(t0) {
42
+ const $ = c(18);
43
+ const { form, inputDef } = t0;
37
44
  const { name, label, placeholder, props, inputWrapper, render, type } = inputDef;
38
- const formControl = {
39
- control: form.control,
40
- name
41
- };
42
- if (render) return render(formControl, form);
45
+ const t1 = form.control;
46
+ let formControl;
47
+ let t2;
48
+ if ($[0] !== form || $[1] !== name || $[2] !== render) {
49
+ t2 = Symbol.for("react.early_return_sentinel");
50
+ bb0: {
51
+ formControl = {
52
+ control: t1,
53
+ name
54
+ };
55
+ if (render) {
56
+ t2 = render(formControl, form);
57
+ break bb0;
58
+ }
59
+ }
60
+ $[0] = form;
61
+ $[1] = name;
62
+ $[2] = render;
63
+ $[3] = formControl;
64
+ $[4] = t2;
65
+ } else {
66
+ formControl = $[3];
67
+ t2 = $[4];
68
+ }
69
+ if (t2 !== Symbol.for("react.early_return_sentinel")) return t2;
43
70
  if (!type) return null;
44
71
  const Component = componentRegistry[type];
45
72
  const usesChildrenAsLabel = ["toggle", "checkbox"].includes(type);
46
- const inputComponent = /* @__PURE__ */ jsx(Component, {
47
- ...props ?? {},
48
- label: usesChildrenAsLabel ? void 0 : label,
49
- placeholder,
50
- formControl,
51
- children: usesChildrenAsLabel ? label : void 0
52
- });
53
- return inputWrapper ? inputWrapper(inputComponent, label) : inputComponent;
73
+ let t3;
74
+ if ($[5] !== props) {
75
+ t3 = props ?? {};
76
+ $[5] = props;
77
+ $[6] = t3;
78
+ } else t3 = $[6];
79
+ const inputProps = t3;
80
+ const t4 = usesChildrenAsLabel ? void 0 : label;
81
+ const t5 = usesChildrenAsLabel ? label : void 0;
82
+ let t6;
83
+ if ($[7] !== Component || $[8] !== formControl || $[9] !== inputProps || $[10] !== placeholder || $[11] !== t4 || $[12] !== t5) {
84
+ t6 = /* @__PURE__ */ jsx(Component, {
85
+ ...inputProps,
86
+ label: t4,
87
+ placeholder,
88
+ formControl,
89
+ children: t5
90
+ });
91
+ $[7] = Component;
92
+ $[8] = formControl;
93
+ $[9] = inputProps;
94
+ $[10] = placeholder;
95
+ $[11] = t4;
96
+ $[12] = t5;
97
+ $[13] = t6;
98
+ } else t6 = $[13];
99
+ const inputComponent = t6;
100
+ let t7;
101
+ if ($[14] !== inputComponent || $[15] !== inputWrapper || $[16] !== label) {
102
+ t7 = inputWrapper ? inputWrapper(inputComponent, label) : inputComponent;
103
+ $[14] = inputComponent;
104
+ $[15] = inputWrapper;
105
+ $[16] = label;
106
+ $[17] = t7;
107
+ } else t7 = $[17];
108
+ return t7;
54
109
  }
55
110
  //#endregion
56
111
  export { InputItem };
@@ -1,17 +1,43 @@
1
1
  import { InputItem } from "./InputItem.js";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { jsx } from "react/jsx-runtime";
3
4
  //#region src/components/inputs/Inputs/Inputs.tsx
4
- function Inputs({ form, inputDefs, children }) {
5
- if (!children) return inputDefs.map((inputDef) => /* @__PURE__ */ jsx(InputItem, {
6
- form,
7
- inputDef
8
- }, String(inputDef.name)));
9
- const childrenParams = {};
10
- for (const inputDef of inputDefs) childrenParams[inputDef.name] = /* @__PURE__ */ jsx(InputItem, {
11
- form,
12
- inputDef
13
- });
14
- return children(childrenParams);
5
+ function Inputs(t0) {
6
+ const $ = c(9);
7
+ const { form, inputDefs, children } = t0;
8
+ if (!children) {
9
+ let t1;
10
+ if ($[0] !== form || $[1] !== inputDefs) {
11
+ let t2;
12
+ if ($[3] !== form) {
13
+ t2 = (inputDef) => /* @__PURE__ */ jsx(InputItem, {
14
+ form,
15
+ inputDef
16
+ }, String(inputDef.name));
17
+ $[3] = form;
18
+ $[4] = t2;
19
+ } else t2 = $[4];
20
+ t1 = inputDefs.map(t2);
21
+ $[0] = form;
22
+ $[1] = inputDefs;
23
+ $[2] = t1;
24
+ } else t1 = $[2];
25
+ return t1;
26
+ }
27
+ let t1;
28
+ if ($[5] !== children || $[6] !== form || $[7] !== inputDefs) {
29
+ const childrenParams = {};
30
+ for (const inputDef_0 of inputDefs) childrenParams[inputDef_0.name] = /* @__PURE__ */ jsx(InputItem, {
31
+ form,
32
+ inputDef: inputDef_0
33
+ });
34
+ t1 = children(childrenParams);
35
+ $[5] = children;
36
+ $[6] = form;
37
+ $[7] = inputDefs;
38
+ $[8] = t1;
39
+ } else t1 = $[8];
40
+ return t1;
15
41
  }
16
42
  //#endregion
17
43
  export { Inputs };
@@ -4,7 +4,8 @@ import { FieldValues } from 'react-hook-form';
4
4
  import { FormFieldProps } from '../FormField/FormField';
5
5
  import { RadioVariantProps } from './radio.cva';
6
6
  import { ControlProps } from '../shared/form.types';
7
- interface RadioGroupBaseProps extends Omit<FormFieldProps, "variant">, RadioVariantProps, Omit<AriaRadioGroupProps, "className"> {
7
+ import { InputVariantProps } from '../shared/input.cva';
8
+ interface RadioGroupBaseProps extends Omit<FormFieldProps, "variant">, RadioVariantProps, Omit<InputVariantProps, "variant">, Omit<AriaRadioGroupProps, "className"> {
8
9
  ref?: Ref<HTMLDivElement>;
9
10
  options: {
10
11
  label: string | ReactElement;
@@ -13,6 +14,7 @@ interface RadioGroupBaseProps extends Omit<FormFieldProps, "variant">, RadioVari
13
14
  isDirty?: boolean;
14
15
  inputClassName?: string;
15
16
  labelClassName?: string;
17
+ fireBlurOnChange?: boolean;
16
18
  }
17
19
  export interface RadioGroupProps extends RadioGroupBaseProps {
18
20
  }