@povio/ui 2.3.0-rc.9 → 2.3.1

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 (282) hide show
  1. package/dist/assets/icons/AlignCenter.js +11 -26
  2. package/dist/assets/icons/AlignLeft.js +11 -26
  3. package/dist/assets/icons/AlignLeftRight.js +11 -26
  4. package/dist/assets/icons/AlignRight.js +11 -26
  5. package/dist/assets/icons/ArrowDropDown.js +11 -26
  6. package/dist/assets/icons/ArrowDropUp.js +11 -26
  7. package/dist/assets/icons/ArrowLeft.js +11 -26
  8. package/dist/assets/icons/ArrowRight.js +11 -26
  9. package/dist/assets/icons/Bold.js +11 -26
  10. package/dist/assets/icons/BulletedList.js +11 -26
  11. package/dist/assets/icons/Calendar.js +13 -28
  12. package/dist/assets/icons/Check.js +13 -28
  13. package/dist/assets/icons/CheckCircle.js +11 -26
  14. package/dist/assets/icons/CheckboxCheckmark.js +14 -29
  15. package/dist/assets/icons/CheckboxIndeterminate.js +14 -29
  16. package/dist/assets/icons/ChevronDown.js +13 -28
  17. package/dist/assets/icons/ChevronLeft.js +13 -28
  18. package/dist/assets/icons/ChevronRight.js +13 -28
  19. package/dist/assets/icons/ChevronUp.js +13 -28
  20. package/dist/assets/icons/ChevronsLeft.js +13 -28
  21. package/dist/assets/icons/ChevronsRight.js +13 -28
  22. package/dist/assets/icons/Clock.js +11 -26
  23. package/dist/assets/icons/Close.js +11 -26
  24. package/dist/assets/icons/DateTime.js +14 -35
  25. package/dist/assets/icons/DragIndicator.js +11 -26
  26. package/dist/assets/icons/File.js +13 -28
  27. package/dist/assets/icons/Highlight.js +11 -26
  28. package/dist/assets/icons/HighlightOn.js +15 -49
  29. package/dist/assets/icons/Home.js +11 -26
  30. package/dist/assets/icons/Info.js +16 -37
  31. package/dist/assets/icons/Italic.js +11 -26
  32. package/dist/assets/icons/Link.js +11 -26
  33. package/dist/assets/icons/Menu.js +11 -26
  34. package/dist/assets/icons/NumberedList.js +11 -26
  35. package/dist/assets/icons/PointerHorizontal.js +11 -26
  36. package/dist/assets/icons/PointerVertical.js +11 -26
  37. package/dist/assets/icons/Search.js +11 -26
  38. package/dist/assets/icons/Send.js +13 -28
  39. package/dist/assets/icons/Strikethrough.js +11 -26
  40. package/dist/assets/icons/TextColor.js +14 -48
  41. package/dist/assets/icons/Today.js +11 -26
  42. package/dist/assets/icons/Underlined.js +13 -28
  43. package/dist/assets/icons/Upload.js +14 -35
  44. package/dist/assets/icons/Visibility.js +11 -26
  45. package/dist/assets/icons/VisibilityOff.js +11 -26
  46. package/dist/assets/icons/WarningFilled.js +13 -28
  47. package/dist/components/Breadcrumbs/Breadcrumbs.js +56 -207
  48. package/dist/components/Menu/Menu.js +2 -18
  49. package/dist/components/Menu/MenuDesktop.js +7 -41
  50. package/dist/components/Menu/MenuItem.js +9 -32
  51. package/dist/components/Menu/MenuMobile.js +38 -97
  52. package/dist/components/Menu/MenuPopover.js +29 -105
  53. package/dist/components/buttons/IconButton/IconButton.js +8 -40
  54. package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +1 -2
  55. package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
  56. package/dist/components/buttons/PillButton/PillButton.js +17 -55
  57. package/dist/components/buttons/SplitButton/SplitButton.js +18 -103
  58. package/dist/components/buttons/TextButton/TextButton.js +8 -30
  59. package/dist/components/buttons/ToggleButton/ToggleButton.js +8 -28
  60. package/dist/components/buttons/shared/ButtonContent.js +22 -80
  61. package/dist/components/inputs/Checkbox/Checkbox.js +35 -172
  62. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
  63. package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +0 -3
  64. package/dist/components/inputs/Checkbox/checkbox.cva.js +1 -2
  65. package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +5 -10
  66. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +20 -121
  67. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +5 -10
  68. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +111 -215
  69. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +5 -11
  70. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +19 -123
  71. package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -5
  72. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +104 -448
  73. package/dist/components/inputs/DateTime/shared/Calendar.d.ts +2 -5
  74. package/dist/components/inputs/DateTime/shared/Calendar.js +119 -330
  75. package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +1 -1
  76. package/dist/components/inputs/DateTime/shared/CalendarCell.js +102 -283
  77. package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +1 -1
  78. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +33 -142
  79. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +93 -249
  80. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +137 -318
  81. package/dist/components/inputs/DateTime/shared/DateField.js +112 -296
  82. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +3 -6
  83. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +136 -355
  84. package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -14
  85. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +11 -97
  86. package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +27 -81
  87. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
  88. package/dist/components/inputs/DateTime/shared/MonthPicker.js +58 -103
  89. package/dist/components/inputs/DateTime/shared/RangeCalendar.js +82 -193
  90. package/dist/components/inputs/DateTime/shared/TimeField.js +8 -27
  91. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +110 -279
  92. package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +1 -2
  93. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +65 -207
  94. package/dist/components/inputs/DateTime/shared/YearPicker.js +68 -119
  95. package/dist/components/inputs/File/FileUpload.js +44 -87
  96. package/dist/components/inputs/File/FileUploadContainer.js +7 -15
  97. package/dist/components/inputs/File/InputUpload.js +79 -317
  98. package/dist/components/inputs/File/shared/FileCard.js +41 -104
  99. package/dist/components/inputs/File/shared/FileCardList.js +12 -47
  100. package/dist/components/inputs/File/shared/FileUploadContent.js +44 -175
  101. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +46 -149
  102. package/dist/components/inputs/File/shared/FileUploadContentError.js +93 -234
  103. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +97 -230
  104. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +55 -199
  105. package/dist/components/inputs/File/shared/InputUploadContent.js +34 -148
  106. package/dist/components/inputs/File/shared/InputUploadFilled.js +8 -49
  107. package/dist/components/inputs/File/shared/ProgressBar.js +9 -48
  108. package/dist/components/inputs/FormField/FormField.d.ts +3 -3
  109. package/dist/components/inputs/FormField/FormField.js +37 -119
  110. package/dist/components/inputs/FormField/FormFieldError.js +5 -25
  111. package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
  112. package/dist/components/inputs/FormField/FormFieldHeader.js +22 -81
  113. package/dist/components/inputs/FormField/FormFieldHeaderClose.js +7 -31
  114. package/dist/components/inputs/FormField/FormFieldHelper.js +6 -26
  115. package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
  116. package/dist/components/inputs/FormField/FormFieldLabel.js +9 -40
  117. package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +2 -5
  118. package/dist/components/inputs/Input/NumberInput/NumberInput.js +88 -334
  119. package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +9 -48
  120. package/dist/components/inputs/Input/TextArea/TextArea.js +90 -305
  121. package/dist/components/inputs/Input/TextInput/TextInput.d.ts +1 -3
  122. package/dist/components/inputs/Input/TextInput/TextInput.js +79 -319
  123. package/dist/components/inputs/Input/shared/InputContent.js +59 -192
  124. package/dist/components/inputs/Inputs/Form.js +11 -40
  125. package/dist/components/inputs/Inputs/InputItem.d.ts +21 -16
  126. package/dist/components/inputs/Inputs/InputItem.js +14 -71
  127. package/dist/components/inputs/Inputs/Inputs.js +11 -37
  128. package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -2
  129. package/dist/components/inputs/RadioGroup/RadioGroup.js +60 -352
  130. package/dist/components/inputs/RadioGroup/radio.cva.d.ts +0 -17
  131. package/dist/components/inputs/RadioGroup/radio.cva.js +1 -42
  132. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +2 -6
  133. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +7 -109
  134. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +18 -3
  135. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +8 -34
  136. package/dist/components/inputs/Selection/Select/Select.d.ts +3 -7
  137. package/dist/components/inputs/Selection/Select/Select.js +5 -132
  138. package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -8
  139. package/dist/components/inputs/Selection/shared/SelectBase.js +18 -69
  140. package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
  141. package/dist/components/inputs/Selection/shared/SelectDesktop.js +138 -393
  142. package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
  143. package/dist/components/inputs/Selection/shared/SelectInput.js +116 -338
  144. package/dist/components/inputs/Selection/shared/SelectInputTags.js +25 -99
  145. package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
  146. package/dist/components/inputs/Selection/shared/SelectListBox.js +52 -164
  147. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +35 -85
  148. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +16 -69
  149. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +21 -70
  150. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +9 -58
  151. package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
  152. package/dist/components/inputs/Selection/shared/SelectMobile.js +3 -9
  153. package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -3
  154. package/dist/components/inputs/Selection/shared/select.context.js +34 -57
  155. package/dist/components/inputs/Selection/shared/select.types.d.ts +2 -3
  156. package/dist/components/inputs/Selection/shared/useSelectItems.js +49 -109
  157. package/dist/components/inputs/Slider/Slider.js +74 -250
  158. package/dist/components/inputs/TextEditor/TextEditor.d.ts +0 -1
  159. package/dist/components/inputs/TextEditor/TextEditor.js +98 -447
  160. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +11 -37
  161. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +30 -102
  162. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +45 -194
  163. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +28 -88
  164. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +14 -48
  165. package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +19 -66
  166. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +15 -49
  167. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +32 -92
  168. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +54 -126
  169. package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +38 -141
  170. package/dist/components/inputs/Toggle/Toggle.js +37 -189
  171. package/dist/components/inputs/Toggle/toggle.cva.d.ts +0 -3
  172. package/dist/components/inputs/Toggle/toggle.cva.js +1 -2
  173. package/dist/components/inputs/shared/CheckContent.d.ts +1 -2
  174. package/dist/components/inputs/shared/CheckContent.js +11 -21
  175. package/dist/components/inputs/shared/InputClear.d.ts +1 -2
  176. package/dist/components/inputs/shared/InputClear.js +13 -79
  177. package/dist/components/inputs/shared/TooltipWrapper.js +11 -50
  178. package/dist/components/inputs/shared/input.cva.d.ts +0 -10
  179. package/dist/components/inputs/shared/input.cva.js +4 -32
  180. package/dist/components/navigation/Accordion/Accordion.js +22 -69
  181. package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
  182. package/dist/components/navigation/Stepper/Stepper.js +22 -67
  183. package/dist/components/navigation/Stepper/StepperItem.js +31 -104
  184. package/dist/components/navigation/Stepper/StepperSeparator.js +5 -23
  185. package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
  186. package/dist/components/overlays/BottomSheet/BottomSheet.js +49 -98
  187. package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +8 -48
  188. package/dist/components/overlays/Drawer/Drawer.js +20 -62
  189. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +27 -83
  190. package/dist/components/overlays/Tooltip/Tooltip.js +28 -137
  191. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +12 -37
  192. package/dist/components/segment/Segment.js +57 -218
  193. package/dist/components/segment/SegmentItem.js +10 -67
  194. package/dist/components/shared/pagination/Pagination.js +22 -108
  195. package/dist/components/shared/pagination/PaginationList.js +64 -167
  196. package/dist/components/status/Alert/Alert.js +30 -97
  197. package/dist/components/status/Loader/Loader.js +22 -77
  198. package/dist/components/status/Toast/Toast.js +13 -21
  199. package/dist/components/status/Toast/useToast.js +57 -62
  200. package/dist/components/table/ColumnConfig.js +54 -158
  201. package/dist/components/table/InfiniteTable.js +16 -67
  202. package/dist/components/table/PaginatedTable.js +18 -84
  203. package/dist/components/table/Table.js +27 -28
  204. package/dist/components/text/Link/Link.js +7 -19
  205. package/dist/components/text/Typography/Typography.js +8 -23
  206. package/dist/config/confirmation.context.js +1 -1
  207. package/dist/config/link.context.js +9 -23
  208. package/dist/config/router.context.js +16 -42
  209. package/dist/config/theme.context.js +45 -98
  210. package/dist/config/uiConfig.context.d.ts +6 -16
  211. package/dist/config/uiConfig.context.js +13 -56
  212. package/dist/config/uiStyle.context.d.ts +4 -27
  213. package/dist/config/uiStyle.context.js +5 -15
  214. package/dist/helpers/dynamicInputs.d.ts +5 -5
  215. package/dist/helpers/dynamicInputs.js +0 -3
  216. package/dist/hooks/useBreakpoint.js +3 -16
  217. package/dist/hooks/useDebounceCallback.js +17 -51
  218. package/dist/hooks/useFilters.js +64 -125
  219. package/dist/hooks/useForm.js +8 -42
  220. package/dist/hooks/useFormAutosave.js +30 -101
  221. package/dist/hooks/useIntersectionObserver.d.ts +1 -1
  222. package/dist/hooks/useIntersectionObserver.js +24 -91
  223. package/dist/hooks/useLocalStorage.js +10 -43
  224. package/dist/hooks/useLongPressRepeat.js +20 -55
  225. package/dist/hooks/usePagination.js +19 -49
  226. package/dist/hooks/useScrollableListBox.js +16 -37
  227. package/dist/hooks/useSorting.js +28 -69
  228. package/dist/hooks/useStateAndRef.js +7 -21
  229. package/dist/hooks/useTableColumnConfig.js +31 -124
  230. package/dist/hooks/useTranslationMemo.js +5 -25
  231. package/dist/index.d.ts +0 -7
  232. package/dist/index.js +3 -5
  233. package/dist/tw-ui-plugin.js +0 -2
  234. package/dist/utils/date-time.utils.d.ts +10 -31
  235. package/dist/utils/date-time.utils.js +22 -123
  236. package/dist/utils/dom.utils.js +1 -1
  237. package/package.json +1 -1
  238. package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +0 -4
  239. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +0 -7
  240. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +0 -13
  241. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +0 -6
  242. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +0 -21
  243. package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +0 -2
  244. package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +0 -1
  245. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +0 -31
  246. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +0 -80
  247. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +0 -1
  248. package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +0 -6
  249. package/dist/components/inputs/FormField/formFieldHeader.cva.js +0 -11
  250. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +0 -45
  251. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +0 -571
  252. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +0 -35
  253. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +0 -479
  254. package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +0 -4
  255. package/dist/components/inputs/Input/TextArea/TextArea.cva.js +0 -5
  256. package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +0 -1
  257. package/dist/components/inputs/Input/shared/numberStatic.utils.js +0 -7
  258. package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +0 -36
  259. package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -14
  260. package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -122
  261. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +0 -9
  262. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +0 -47
  263. package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +0 -6
  264. package/dist/components/inputs/Selection/shared/querySelect.utils.js +0 -13
  265. package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +0 -3
  266. package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +0 -5
  267. package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +0 -5
  268. package/dist/components/inputs/Selection/shared/selectInput.cva.js +0 -5
  269. package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
  270. package/dist/components/inputs/Selection/shared/staticSelect.utils.js +0 -37
  271. package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +0 -1
  272. package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -79
  273. package/dist/components/inputs/Skeleton/InputFrame.js +0 -526
  274. package/dist/components/inputs/shared/StaticInput.d.ts +0 -38
  275. package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +0 -4
  276. package/dist/components/inputs/shared/tooltipWrapper.cva.js +0 -5
  277. package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +0 -14
  278. package/dist/components/inputs/shared/useStaticInputHandoff.js +0 -100
  279. package/dist/hooks/useQueryAutocomplete.d.ts +0 -14
  280. package/dist/hooks/useQueryAutocomplete.js +0 -57
  281. package/dist/utils/query.utils.d.ts +0 -4
  282. 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 { inputContentWrapper, inputSize } from "../../shared/input.cva.js";
8
- import { c } from "react/compiler-runtime";
7
+ import { inputSize } 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 = UIStyle.useCva("typography.cva", typography);
17
14
  const inputSizeCva = UIStyle.useCva("input.sizeCva", inputSize);
18
- const inputContentWrapperCva = UIStyle.useCva("input.contentWrapperCva", inputContentWrapper);
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,28 +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>({ query, queryParams, queryOptions, queryMap, ...props }: import('../Selection/Select/QuerySelect.js').QuerySelectProps<TFieldValues, TQueryFn, TKey>) => 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>({ query, queryParams, queryOptions, queryMap, leadingContent, ...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;
25
- readonly textEditor: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('../../../text-editor.js').ControlledTextEditorProps<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;
26
31
  readonly unknown: null;
27
32
  };
28
33
  export type InputComponentRegistry = typeof componentRegistry;
@@ -51,8 +56,8 @@ type TypeBasedInputDef<TSchemaType extends Record<string, any>, T extends InputC
51
56
  interface RenderBasedInputDef<TSchemaType extends Record<string, any>, K extends keyof TSchemaType> {
52
57
  type?: never;
53
58
  name: K;
54
- label?: string;
55
- placeholder?: string;
59
+ label?: never;
60
+ placeholder?: never;
56
61
  props?: never;
57
62
  inputWrapper?: never;
58
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,22 +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 { TextEditor } from "../TextEditor/TextEditor.js";
19
- import { c } from "react/compiler-runtime";
20
16
  import { jsx } from "react/jsx-runtime";
21
17
  //#region src/components/inputs/Inputs/InputItem.tsx
22
18
  var componentRegistry = {
23
19
  toggle: Toggle,
24
20
  checkbox: Checkbox,
25
21
  numberInput: NumberInput,
26
- numberRangeInput: NumberRangeInput,
27
22
  slider: Slider,
28
23
  textInput: TextInput,
29
24
  passwordInput: PasswordInput,
30
25
  textArea: TextArea,
31
26
  select: Select,
32
- querySelect: QuerySelect,
33
27
  autocomplete: Autocomplete,
34
28
  queryAutocomplete: QueryAutocomplete,
35
29
  segment: Segment,
@@ -37,77 +31,26 @@ var componentRegistry = {
37
31
  dateTimePicker: DateTimePicker,
38
32
  timePicker: TimePicker,
39
33
  dateRangePicker: DateRangePicker,
40
- textEditor: TextEditor,
41
34
  unknown: null
42
35
  };
43
- function InputItem(t0) {
44
- const $ = c(18);
45
- const { form, inputDef } = t0;
36
+ function InputItem({ form, inputDef }) {
46
37
  const { name, label, placeholder, props, inputWrapper, render, type } = inputDef;
47
- const t1 = form.control;
48
- let formControl;
49
- let t2;
50
- if ($[0] !== form || $[1] !== name || $[2] !== render) {
51
- t2 = Symbol.for("react.early_return_sentinel");
52
- bb0: {
53
- formControl = {
54
- control: t1,
55
- name
56
- };
57
- if (render) {
58
- t2 = render(formControl, form);
59
- break bb0;
60
- }
61
- }
62
- $[0] = form;
63
- $[1] = name;
64
- $[2] = render;
65
- $[3] = formControl;
66
- $[4] = t2;
67
- } else {
68
- formControl = $[3];
69
- t2 = $[4];
70
- }
71
- 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);
72
43
  if (!type) return null;
73
44
  const Component = componentRegistry[type];
74
45
  const usesChildrenAsLabel = ["toggle", "checkbox"].includes(type);
75
- let t3;
76
- if ($[5] !== props) {
77
- t3 = props ?? {};
78
- $[5] = props;
79
- $[6] = t3;
80
- } else t3 = $[6];
81
- const inputProps = t3;
82
- const t4 = usesChildrenAsLabel ? void 0 : label;
83
- const t5 = usesChildrenAsLabel ? label : void 0;
84
- let t6;
85
- if ($[7] !== Component || $[8] !== formControl || $[9] !== inputProps || $[10] !== placeholder || $[11] !== t4 || $[12] !== t5) {
86
- t6 = /* @__PURE__ */ jsx(Component, {
87
- ...inputProps,
88
- label: t4,
89
- placeholder,
90
- formControl,
91
- children: t5
92
- });
93
- $[7] = Component;
94
- $[8] = formControl;
95
- $[9] = inputProps;
96
- $[10] = placeholder;
97
- $[11] = t4;
98
- $[12] = t5;
99
- $[13] = t6;
100
- } else t6 = $[13];
101
- const inputComponent = t6;
102
- let t7;
103
- if ($[14] !== inputComponent || $[15] !== inputWrapper || $[16] !== label) {
104
- t7 = inputWrapper ? inputWrapper(inputComponent, label) : inputComponent;
105
- $[14] = inputComponent;
106
- $[15] = inputWrapper;
107
- $[16] = label;
108
- $[17] = t7;
109
- } else t7 = $[17];
110
- 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;
111
54
  }
112
55
  //#endregion
113
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;