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