@kapiuara/ui 0.22.0 → 0.23.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 (368) hide show
  1. package/dist/components/chat/KapiChatDivider.js +1 -2
  2. package/dist/components/chat/KapiChatList.js +15 -16
  3. package/dist/components/chat/KapiChatThread.js +21 -22
  4. package/dist/components/chat/KapiComposer.js +23 -24
  5. package/dist/components/chat/KapiMessageBubble.js +5 -6
  6. package/dist/components/chat/KapiTypingIndicator.js +5 -6
  7. package/dist/components/chat/chatLogic.js +1 -2
  8. package/dist/components/data/KapiBarChart.js +22 -23
  9. package/dist/components/data/KapiDataTable.js +92 -93
  10. package/dist/components/data/KapiEventCalendar.js +96 -97
  11. package/dist/components/data/KapiHeatmap.js +21 -22
  12. package/dist/components/data/KapiLineChart.js +23 -24
  13. package/dist/components/data/KapiPagination.js +1 -2
  14. package/dist/components/data/KapiPaginationFooter.js +5 -6
  15. package/dist/components/data/KapiScatterChart.js +18 -19
  16. package/dist/components/data/KapiSheet.js +2 -3
  17. package/dist/components/data/KapiSparkline.js +1 -2
  18. package/dist/components/data/KapiTable.js +107 -108
  19. package/dist/components/data/KapiTableFilter.js +13 -14
  20. package/dist/components/data/KapiTableFooter.js +21 -22
  21. package/dist/components/data/KapiTableRow.js +10 -11
  22. package/dist/components/data/KapiTableToolbar.js +95 -96
  23. package/dist/components/data/barChartLogic.js +1 -2
  24. package/dist/components/data/chartFrame.js +13 -14
  25. package/dist/components/data/datasetSelectionLogic.js +1 -2
  26. package/dist/components/data/eventCalendarLogic.js +2 -3
  27. package/dist/components/data/heatmapLogic.js +1 -2
  28. package/dist/components/data/lineChartLogic.js +1 -2
  29. package/dist/components/data/rowClickLogic.js +2 -17
  30. package/dist/components/data/scatterLogic.js +1 -2
  31. package/dist/components/data/sparklineLogic.js +1 -2
  32. package/dist/components/data/tableCells.js +14 -15
  33. package/dist/components/data/tableHeaderMenu.js +1 -2
  34. package/dist/components/data/tableLabels.js +1 -2
  35. package/dist/components/data/tableLogic.js +0 -1
  36. package/dist/components/data/tablePaginationLogic.js +1 -2
  37. package/dist/components/data/tableResizeLogic.js +1 -2
  38. package/dist/components/data/tableSlots.js +1 -2
  39. package/dist/components/data/tableSpanLogic.js +1 -2
  40. package/dist/components/data/useColumnResize.js +23 -24
  41. package/dist/components/data/useRowKeyWarning.js +1 -2
  42. package/dist/components/data/useTableEdges.js +1 -2
  43. package/dist/components/data/useTableSelection.js +25 -26
  44. package/dist/components/display/KapiAnchor.js +7 -8
  45. package/dist/components/display/KapiAnnotation.js +15 -16
  46. package/dist/components/display/KapiAvatar.js +6 -7
  47. package/dist/components/display/KapiAvatarGroup.js +15 -16
  48. package/dist/components/display/KapiBadge.js +1 -2
  49. package/dist/components/display/KapiCodeBlock.js +14 -15
  50. package/dist/components/display/KapiComment.js +10 -11
  51. package/dist/components/display/KapiCommentComposer.js +13 -14
  52. package/dist/components/display/KapiDescriptionList.js +1 -2
  53. package/dist/components/display/KapiDiff.js +23 -24
  54. package/dist/components/display/KapiFileItem.js +13 -14
  55. package/dist/components/display/KapiFileViewer.js +17 -18
  56. package/dist/components/display/KapiHighlight.js +2 -3
  57. package/dist/components/display/KapiIconTile.js +2 -3
  58. package/dist/components/display/KapiStat.js +8 -9
  59. package/dist/components/display/KapiTag.js +6 -7
  60. package/dist/components/display/KapiText.js +5 -6
  61. package/dist/components/display/KapiTimeline.js +2 -3
  62. package/dist/components/display/KapiTitle.js +1 -2
  63. package/dist/components/display/KapiTruncate.js +5 -6
  64. package/dist/components/display/annotationLogic.js +1 -2
  65. package/dist/components/display/avatarGroupLogic.js +1 -2
  66. package/dist/components/display/avatarGroupSlots.js +1 -2
  67. package/dist/components/display/avatarLogic.js +1 -2
  68. package/dist/components/display/codeBlockSlots.js +1 -2
  69. package/dist/components/display/commentLogic.js +1 -2
  70. package/dist/components/display/diffLogic.js +1 -2
  71. package/dist/components/display/diffSlots.js +1 -2
  72. package/dist/components/display/fileItemLogic.js +1 -2
  73. package/dist/components/display/highlightLogic.js +1 -2
  74. package/dist/components/display/highlightSlots.js +1 -2
  75. package/dist/components/display/iconTileLogic.js +1 -2
  76. package/dist/components/display/statLogic.js +1 -2
  77. package/dist/components/display/tagLogic.js +1 -2
  78. package/dist/components/display/textLogic.js +1 -2
  79. package/dist/components/display/timelineLogic.js +1 -2
  80. package/dist/components/display/truncateLogic.js +1 -2
  81. package/dist/components/feedback/KapiAlert.js +6 -7
  82. package/dist/components/feedback/KapiBulkBar.js +5 -6
  83. package/dist/components/feedback/KapiCountdown.js +16 -17
  84. package/dist/components/feedback/KapiEmpty.js +2 -3
  85. package/dist/components/feedback/KapiFab.js +96 -97
  86. package/dist/components/feedback/KapiOfflineBanner.js +4 -5
  87. package/dist/components/feedback/KapiProgress.js +1 -2
  88. package/dist/components/feedback/KapiSkeleton.js +1 -2
  89. package/dist/components/feedback/KapiSpinner.js +5 -6
  90. package/dist/components/feedback/KapiToastContainer.js +28 -29
  91. package/dist/components/feedback/KapiTour.js +24 -25
  92. package/dist/components/feedback/KapiUnsavedBar.js +5 -6
  93. package/dist/components/feedback/alertSlots.js +1 -2
  94. package/dist/components/feedback/bulkBarLogic.js +1 -2
  95. package/dist/components/feedback/countdownLogic.js +1 -2
  96. package/dist/components/feedback/countdownSlots.js +1 -2
  97. package/dist/components/feedback/emptySlots.js +1 -2
  98. package/dist/components/feedback/fabLogic.js +1 -2
  99. package/dist/components/feedback/offlineBannerLogic.js +1 -2
  100. package/dist/components/feedback/progressLogic.js +1 -2
  101. package/dist/components/feedback/toastLayer.js +1 -2
  102. package/dist/components/feedback/toastStore.js +2 -3
  103. package/dist/components/feedback/tourLogic.js +1 -2
  104. package/dist/components/feedback/unsavedBarLogic.js +1 -2
  105. package/dist/components/inputs/KapiAutocomplete.js +23 -24
  106. package/dist/components/inputs/KapiButton.js +1 -2
  107. package/dist/components/inputs/KapiCalendar.js +12 -13
  108. package/dist/components/inputs/KapiCalendarGrid.js +15 -16
  109. package/dist/components/inputs/KapiCheckCard.js +4 -5
  110. package/dist/components/inputs/KapiCheckbox.js +1 -2
  111. package/dist/components/inputs/KapiChecklist.js +62 -63
  112. package/dist/components/inputs/KapiCopyButton.js +6 -7
  113. package/dist/components/inputs/KapiDatePicker.js +33 -34
  114. package/dist/components/inputs/KapiDateRangePicker.js +145 -146
  115. package/dist/components/inputs/KapiFacetedSearch.js +55 -56
  116. package/dist/components/inputs/KapiField.js +5 -6
  117. package/dist/components/inputs/KapiFileUpload.js +26 -27
  118. package/dist/components/inputs/KapiIconButton.js +1 -2
  119. package/dist/components/inputs/KapiInput.js +46 -47
  120. package/dist/components/inputs/KapiInputGroup.js +1 -2
  121. package/dist/components/inputs/KapiMaskedInput.js +50 -51
  122. package/dist/components/inputs/KapiNumberStepper.js +49 -50
  123. package/dist/components/inputs/KapiPinInput.js +9 -10
  124. package/dist/components/inputs/KapiPropsForm.js +43 -44
  125. package/dist/components/inputs/KapiRadio.js +1 -2
  126. package/dist/components/inputs/KapiRating.js +38 -39
  127. package/dist/components/inputs/KapiSearchChip.js +10 -11
  128. package/dist/components/inputs/KapiSegmented.js +65 -66
  129. package/dist/components/inputs/KapiSelect.js +198 -199
  130. package/dist/components/inputs/KapiSelectMenu.js +1 -2
  131. package/dist/components/inputs/KapiSlider.js +11 -12
  132. package/dist/components/inputs/KapiSwitch.js +6 -7
  133. package/dist/components/inputs/KapiTagInput.js +32 -33
  134. package/dist/components/inputs/KapiTextarea.js +22 -23
  135. package/dist/components/inputs/asyncSelectLogic.js +22 -23
  136. package/dist/components/inputs/autocompleteLogic.js +1 -2
  137. package/dist/components/inputs/checkControl.js +4 -5
  138. package/dist/components/inputs/checklistLogic.js +1 -2
  139. package/dist/components/inputs/copyLogic.js +1 -2
  140. package/dist/components/inputs/datePickerLogic.js +1 -2
  141. package/dist/components/inputs/dateRangeLogic.js +1 -2
  142. package/dist/components/inputs/facetedSearchLogic.js +1 -2
  143. package/dist/components/inputs/fieldLogic.js +1 -2
  144. package/dist/components/inputs/fileUploadLogic.js +1 -2
  145. package/dist/components/inputs/formBridgeLogic.js +1 -2
  146. package/dist/components/inputs/inputGroupLogic.js +1 -2
  147. package/dist/components/inputs/inputLogic.js +1 -2
  148. package/dist/components/inputs/maskLogic.js +0 -1
  149. package/dist/components/inputs/misuseWarnings.js +1 -2
  150. package/dist/components/inputs/numberStepLogic.js +1 -2
  151. package/dist/components/inputs/ownField.js +9 -10
  152. package/dist/components/inputs/pinInputLogic.js +1 -2
  153. package/dist/components/inputs/propsFormLogic.js +1 -2
  154. package/dist/components/inputs/ratingLogic.js +1 -2
  155. package/dist/components/inputs/searchChipLogic.js +1 -2
  156. package/dist/components/inputs/segmentedLogic.js +1 -2
  157. package/dist/components/inputs/selectKeyLogic.js +1 -2
  158. package/dist/components/inputs/selectLogic.js +1 -2
  159. package/dist/components/inputs/selectSlots.js +1 -2
  160. package/dist/components/inputs/sliderLogic.js +1 -2
  161. package/dist/components/inputs/tagInputLogic.js +1 -2
  162. package/dist/components/inputs/textareaLogic.js +1 -2
  163. package/dist/components/inputs/useCalendarFocus.js +1 -2
  164. package/dist/components/inputs/useDatePopSide.js +1 -2
  165. package/dist/components/inputs/useSelectCreate.js +1 -2
  166. package/dist/components/inputs/useSelectSource.js +11 -12
  167. package/dist/components/labelsLogic.js +1 -2
  168. package/dist/components/layout/KapiAccessCard.js +10 -11
  169. package/dist/components/layout/KapiAccountMenu.js +24 -25
  170. package/dist/components/layout/KapiBox.js +5 -6
  171. package/dist/components/layout/KapiCard.js +18 -19
  172. package/dist/components/layout/KapiCenter.js +1 -2
  173. package/dist/components/layout/KapiCluster.js +1 -2
  174. package/dist/components/layout/KapiCol.js +1 -2
  175. package/dist/components/layout/KapiCollapse.js +1 -2
  176. package/dist/components/layout/KapiContextSlot.js +98 -99
  177. package/dist/components/layout/KapiDivider.js +1 -2
  178. package/dist/components/layout/KapiGrid.js +9 -10
  179. package/dist/components/layout/KapiMasonry.js +1 -2
  180. package/dist/components/layout/KapiNotificationBell.js +53 -54
  181. package/dist/components/layout/KapiPageHeader.js +42 -43
  182. package/dist/components/layout/KapiPanelParts.js +43 -44
  183. package/dist/components/layout/KapiRail.js +103 -104
  184. package/dist/components/layout/KapiRailAccount.js +11 -12
  185. package/dist/components/layout/KapiRoot.js +33 -34
  186. package/dist/components/layout/KapiScrollArea.js +7 -8
  187. package/dist/components/layout/KapiShell.js +8 -9
  188. package/dist/components/layout/KapiStack.js +1 -2
  189. package/dist/components/layout/KapiThemeScript.js +1 -2
  190. package/dist/components/layout/accessCardLogic.js +1 -2
  191. package/dist/components/layout/cardLogic.js +1 -2
  192. package/dist/components/layout/cardSlots.js +1 -2
  193. package/dist/components/layout/gridSpanLogic.js +1 -2
  194. package/dist/components/layout/layoutPrimitives.js +1 -2
  195. package/dist/components/layout/masonryLogic.js +1 -2
  196. package/dist/components/layout/notificationBellLogic.js +1 -2
  197. package/dist/components/layout/pageHeaderLogic.js +1 -2
  198. package/dist/components/layout/pageHeaderSlots.js +1 -2
  199. package/dist/components/layout/railContext.js +1 -2
  200. package/dist/components/layout/railLogic.js +1 -2
  201. package/dist/components/layout/railSlots.js +1 -2
  202. package/dist/components/layout/reopenBus.js +1 -2
  203. package/dist/components/layout/shellSlots.js +1 -2
  204. package/dist/components/layout/useGridBreakpoint.js +1 -2
  205. package/dist/components/layout/useMasonrySpans.js +6 -7
  206. package/dist/components/layout/useRailOverflow.js +7 -8
  207. package/dist/components/locale/KapiLocaleProvider.js +1 -2
  208. package/dist/components/locale/linkLabels.js +1 -2
  209. package/dist/components/locale/localeLogic.js +1 -2
  210. package/dist/components/navigation/CtxSlidingList.js +7 -8
  211. package/dist/components/navigation/KapiAccordion.js +11 -12
  212. package/dist/components/navigation/KapiBreadcrumb.js +11 -12
  213. package/dist/components/navigation/KapiCollapsiblePanel.js +13 -14
  214. package/dist/components/navigation/KapiContextPanel.js +138 -139
  215. package/dist/components/navigation/KapiFilterChips.js +25 -22
  216. package/dist/components/navigation/KapiNavBadge.js +6 -7
  217. package/dist/components/navigation/KapiPanelGroup.js +34 -35
  218. package/dist/components/navigation/KapiSteps.js +41 -36
  219. package/dist/components/navigation/KapiTabs.js +40 -41
  220. package/dist/components/navigation/KapiToc.js +15 -16
  221. package/dist/components/navigation/KapiTree.js +126 -124
  222. package/dist/components/navigation/KapiWizard.js +12 -13
  223. package/dist/components/navigation/MiniNavItem.js +11 -12
  224. package/dist/components/navigation/accordionLogic.js +1 -2
  225. package/dist/components/navigation/activeItemLogic.js +1 -2
  226. package/dist/components/navigation/breadcrumbLogic.js +1 -2
  227. package/dist/components/navigation/contextPanelLogic.js +1 -2
  228. package/dist/components/navigation/filterChipsLogic.d.ts +9 -1
  229. package/dist/components/navigation/filterChipsLogic.js +2 -3
  230. package/dist/components/navigation/navBadgeLogic.js +1 -2
  231. package/dist/components/navigation/navLink.js +1 -2
  232. package/dist/components/navigation/navLinkLogic.js +1 -2
  233. package/dist/components/navigation/panelGroupLogic.js +1 -2
  234. package/dist/components/navigation/panelMini.js +0 -1
  235. package/dist/components/navigation/panelMiniLogic.js +1 -2
  236. package/dist/components/navigation/stepsLogic.js +1 -2
  237. package/dist/components/navigation/tabsLogic.js +1 -2
  238. package/dist/components/navigation/tocLogic.js +1 -2
  239. package/dist/components/navigation/tocSlots.js +1 -2
  240. package/dist/components/navigation/treeLogic.js +1 -2
  241. package/dist/components/navigation/wizardLogic.js +1 -2
  242. package/dist/components/overlays/KapiCanvasForm.js +5 -6
  243. package/dist/components/overlays/KapiCommandPalette.js +45 -45
  244. package/dist/components/overlays/KapiConfirm.js +9 -10
  245. package/dist/components/overlays/KapiContextMenu.js +16 -17
  246. package/dist/components/overlays/KapiDialogHost.js +50 -51
  247. package/dist/components/overlays/KapiDropdown.js +2 -3
  248. package/dist/components/overlays/KapiImageViewer.js +8 -9
  249. package/dist/components/overlays/KapiLoading.js +7 -8
  250. package/dist/components/overlays/KapiMenuButton.js +19 -20
  251. package/dist/components/overlays/KapiModal.js +58 -59
  252. package/dist/components/overlays/KapiOffcanvas.js +146 -147
  253. package/dist/components/overlays/KapiOffcanvasStack.js +18 -19
  254. package/dist/components/overlays/KapiPhotoView.js +21 -22
  255. package/dist/components/overlays/KapiPopover.js +12 -13
  256. package/dist/components/overlays/KapiShapeSheet.js +11 -12
  257. package/dist/components/overlays/KapiShortcutsHelp.js +18 -19
  258. package/dist/components/overlays/KapiSplitModal.js +20 -21
  259. package/dist/components/overlays/KapiTooltip.js +46 -47
  260. package/dist/components/overlays/KapiViewport.js +17 -18
  261. package/dist/components/overlays/canvasFormLogic.js +1 -2
  262. package/dist/components/overlays/commandPaletteLogic.js +1 -2
  263. package/dist/components/overlays/dialogStore.js +3 -4
  264. package/dist/components/overlays/dialogUtils.js +1 -2
  265. package/dist/components/overlays/exitPresenceLogic.js +1 -2
  266. package/dist/components/overlays/menuButtonLogic.js +1 -2
  267. package/dist/components/overlays/menuKeyboardLogic.js +1 -2
  268. package/dist/components/overlays/menuList.js +94 -95
  269. package/dist/components/overlays/modalSlots.js +1 -2
  270. package/dist/components/overlays/modalStack.js +1 -2
  271. package/dist/components/overlays/offcanvasCompanion.js +1 -2
  272. package/dist/components/overlays/offcanvasResize.js +0 -1
  273. package/dist/components/overlays/offcanvasSide.js +1 -2
  274. package/dist/components/overlays/offcanvasStack.js +1 -2
  275. package/dist/components/overlays/overlayPortal.js +1 -2
  276. package/dist/components/overlays/popoverLogic.js +1 -2
  277. package/dist/components/overlays/shortcutsHelpSlots.js +1 -2
  278. package/dist/components/overlays/splitModalLayout.js +1 -2
  279. package/dist/components/overlays/useExitPresence.js +11 -12
  280. package/dist/components/overlays/useNativeDialog.js +21 -22
  281. package/dist/components/overlays/viewportLogic.js +1 -2
  282. package/dist/components/renderSlot.js +1 -2
  283. package/dist/components/rootProps.js +1 -2
  284. package/dist/components/slotCatalog.js +33 -34
  285. package/dist/components/slotsLogic.js +1 -2
  286. package/dist/components/tone.js +1 -2
  287. package/dist/css/base.css +1 -1
  288. package/dist/css/components/navigation/navigation.css +1 -1
  289. package/dist/css/components/overlays/KapiViewport.css +1 -1
  290. package/dist/hooks/asyncResourceLogic.js +1 -2
  291. package/dist/hooks/breakpointOpenLogic.js +1 -2
  292. package/dist/hooks/colorLogic.js +1 -2
  293. package/dist/hooks/dateFormat.js +1 -2
  294. package/dist/hooks/densityLogic.js +1 -2
  295. package/dist/hooks/directionLogic.js +1 -2
  296. package/dist/hooks/downloadLogic.js +1 -2
  297. package/dist/hooks/elementSizeLogic.js +1 -2
  298. package/dist/hooks/fieldErrorsLogic.js +1 -2
  299. package/dist/hooks/focusLogic.js +2 -11
  300. package/dist/hooks/growOriginLogic.js +1 -2
  301. package/dist/hooks/hotkeyLogic.js +1 -2
  302. package/dist/hooks/hotkeyRegistry.js +1 -2
  303. package/dist/hooks/kapiRoot.js +2 -3
  304. package/dist/hooks/mergeRefs.js +1 -2
  305. package/dist/hooks/numberFormatLogic.js +1 -2
  306. package/dist/hooks/onlineStatusLogic.js +1 -2
  307. package/dist/hooks/ownerDocument.js +1 -2
  308. package/dist/hooks/persistentStateLogic.js +1 -2
  309. package/dist/hooks/portalRoot.js +1 -2
  310. package/dist/hooks/rafThrottle.js +1 -2
  311. package/dist/hooks/rangeSelectLogic.js +1 -2
  312. package/dist/hooks/recentLogic.js +1 -2
  313. package/dist/hooks/reducedMotion.js +8 -9
  314. package/dist/hooks/rightClick.js +10 -11
  315. package/dist/hooks/scrollCollapseLogic.js +1 -2
  316. package/dist/hooks/scrollEdgesLogic.js +1 -2
  317. package/dist/hooks/shallowStable.js +1 -2
  318. package/dist/hooks/slidingIndicatorLogic.js +1 -2
  319. package/dist/hooks/storageLogic.js +1 -2
  320. package/dist/hooks/themeColorsLogic.js +1 -2
  321. package/dist/hooks/themeContrastLogic.js +1 -2
  322. package/dist/hooks/themeDeriveLogic.js +0 -1
  323. package/dist/hooks/themeRadiiLogic.js +1 -2
  324. package/dist/hooks/themeScript.js +1 -2
  325. package/dist/hooks/toneFamilyLogic.js +1 -2
  326. package/dist/hooks/unsavedGuardLogic.js +1 -2
  327. package/dist/hooks/useAsyncLoader.js +1 -2
  328. package/dist/hooks/useAsyncResource.js +5 -6
  329. package/dist/hooks/useAsyncTasks.js +1 -2
  330. package/dist/hooks/useBottomBarInset.js +9 -10
  331. package/dist/hooks/useControllableState.js +1 -2
  332. package/dist/hooks/useDebouncedValue.js +1 -2
  333. package/dist/hooks/useDisclosure.js +1 -2
  334. package/dist/hooks/useDismiss.js +10 -11
  335. package/dist/hooks/useDragScroll.js +12 -13
  336. package/dist/hooks/useElementSize.js +1 -2
  337. package/dist/hooks/useFieldErrors.js +1 -2
  338. package/dist/hooks/useFocusReturn.js +1 -2
  339. package/dist/hooks/useFormReset.js +1 -2
  340. package/dist/hooks/useGlobalRightClick.js +1 -2
  341. package/dist/hooks/useGrowOrigin.js +1 -2
  342. package/dist/hooks/useHotkey.js +1 -2
  343. package/dist/hooks/useHydrated.js +1 -2
  344. package/dist/hooks/useKapiTheme.js +55 -56
  345. package/dist/hooks/useMediaQuery.js +1 -2
  346. package/dist/hooks/useObjectUrl.js +1 -2
  347. package/dist/hooks/useOnlineStatus.js +1 -2
  348. package/dist/hooks/useOutsidePress.js +1 -2
  349. package/dist/hooks/usePersistentState.js +9 -10
  350. package/dist/hooks/usePlacement.js +15 -16
  351. package/dist/hooks/useRangeSelect.js +2 -3
  352. package/dist/hooks/useRecent.js +6 -7
  353. package/dist/hooks/useScrollCollapse.js +1 -2
  354. package/dist/hooks/useScrollEdges.js +25 -26
  355. package/dist/hooks/useSlidingIndicator.js +19 -20
  356. package/dist/hooks/useSubmitDraft.js +1 -2
  357. package/dist/hooks/useToneFamilies.js +0 -1
  358. package/dist/hooks/useTypeahead.js +1 -2
  359. package/dist/hooks/useUnsavedGuard.js +5 -6
  360. package/dist/hooks/useVirtualList.js +1 -2
  361. package/dist/hooks/useWheelZoom.js +1 -2
  362. package/dist/hooks/viewportInsetLogic.js +1 -2
  363. package/dist/hooks/virtualListLogic.js +0 -1
  364. package/dist/hooks/wheelZoomLogic.js +1 -2
  365. package/dist/kapi.css +1 -1
  366. package/dist/kapi.layered.css +1 -1
  367. package/dist/logic.js +45 -45
  368. package/package.json +35 -36
@@ -1,94 +1,93 @@
1
1
  "use client";
2
- import { useLabels as e } from "../locale/KapiLocaleProvider.js";
3
- import { activeElementOf as t } from "../../hooks/ownerDocument.js";
4
- import { assignRef as n } from "./fieldLogic.js";
5
- import { KapiInput as r } from "./KapiInput.js";
6
- import { useControllableState as i } from "../../hooks/useControllableState.js";
7
- import { useFormReset as a } from "../../hooks/useFormReset.js";
8
- import { caretForSignificant as o, countSignificant as s, formatCuit as c, formatCurrency as l, formatDni as u, isValidCuit as d, maskCurrencyInput as f, onlyDigits as p, parseCurrency as m } from "./maskLogic.js";
2
+ import { useControllableState as e } from "../../hooks/useControllableState.js";
3
+ import { useFormReset as t } from "../../hooks/useFormReset.js";
4
+ import { KapiInput as n } from "./KapiInput.js";
5
+ import { assignRef as r } from "./fieldLogic.js";
6
+ import { useLabels as i } from "../locale/KapiLocaleProvider.js";
7
+ import { caretForSignificant as a, countSignificant as o, formatCuit as s, formatCurrency as c, formatDni as l, isValidCuit as u, maskCurrencyInput as d, onlyDigits as f, parseCurrency as p } from "./maskLogic.js";
8
+ import { activeElementOf as m } from "../../hooks/ownerDocument.js";
9
9
  import { useCallback as h, useRef as g, useState as _ } from "react";
10
10
  import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
11
- //#region src/components/inputs/KapiMaskedInput.tsx
11
+ // src/components/inputs/KapiMaskedInput.tsx
12
12
  var x = (e, t, n) => e ? /* @__PURE__ */ y("input", {
13
13
  type: "hidden",
14
14
  name: e,
15
15
  value: t,
16
16
  disabled: n
17
- }) : null, S = (e, r, i, a) => ({
17
+ }) : null, S = (e, t, n, i) => ({
18
18
  setRef: h((e) => {
19
- n(r, e), a?.(e);
20
- }, [r, a]),
21
- apply: (n, r) => {
22
- let a = n.target, c = a.selectionStart ?? a.value.length;
23
- if (i !== void 0 && p(a.value).length > i) {
24
- let e = Math.max(0, c - (a.value.length - r.length));
25
- return a.value = r, a.setSelectionRange(e, e), r;
19
+ r(t, e), i?.(e);
20
+ }, [t, i]),
21
+ apply: (t, r) => {
22
+ let i = t.target, s = i.selectionStart ?? i.value.length;
23
+ if (n !== void 0 && f(i.value).length > n) {
24
+ let e = Math.max(0, s - (i.value.length - r.length));
25
+ return i.value = r, i.setSelectionRange(e, e), r;
26
26
  }
27
- let l = s(a.value, c), u = e(a.value);
28
- if (a.value = u, t(a) === a) {
29
- let e = o(u, l);
30
- a.setSelectionRange(e, e);
27
+ let c = o(i.value, s), l = e(i.value);
28
+ if (i.value = l, m(i) === i) {
29
+ let e = a(l, c);
30
+ i.setSelectionRange(e, e);
31
31
  }
32
- return u;
32
+ return l;
33
33
  }
34
- }), C = ({ value: e, defaultValue: t = "", onValueChange: n, onChange: o, ref: s, name: c, disabled: l, placeholder: d = "12.345.678", ...f }) => {
35
- let [m, h, , g] = i(e, () => p(t, 8), n), _ = p(m, 8), { setRef: C, apply: w } = S(u, s, 8, a(g));
36
- return /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(r, {
37
- ...f,
34
+ }), C = ({ value: r, defaultValue: i = "", onValueChange: a, onChange: o, ref: s, name: c, disabled: u, placeholder: d = "12.345.678", ...p }) => {
35
+ let [m, h, , g] = e(r, () => f(i, 8), a), _ = f(m, 8), { setRef: C, apply: w } = S(l, s, 8, t(g));
36
+ return /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(n, {
37
+ ...p,
38
38
  ref: C,
39
- disabled: l,
40
- value: u(_),
39
+ disabled: u,
40
+ value: l(_),
41
41
  placeholder: d,
42
42
  inputMode: "numeric",
43
43
  autoComplete: "off",
44
44
  onChange: (e) => {
45
- let t = p(w(e, u(_)));
45
+ let t = f(w(e, l(_)));
46
46
  t !== _ && h(t), o?.(e);
47
47
  }
48
- }), x(c, _, l)] });
49
- }, w = { invalid: "CUIT inválido: revisa el dígito verificador" }, T = ({ value: t, defaultValue: n = "", onValueChange: o, onChange: s, invalidMessage: l, invalid: u, status: f, help: m, label: h, ref: g, name: _, disabled: C, placeholder: T = "20-12345678-9", ...E }) => {
50
- let D = e("cuitInput", w), [O, k, , A] = i(t, () => p(n, 11), o && ((e) => o(e, d(e)))), j = p(O, 11), M = a(A), N = j.length === 11 && !d(j), P = u !== void 0 || f !== void 0, F = h != null || !!m, { setRef: I, apply: L } = S(c, g, 11, M);
51
- return /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(r, {
48
+ }), x(c, _, u)] });
49
+ }, w = { invalid: "CUIT inválido: revisa el dígito verificador" }, T = ({ value: r, defaultValue: a = "", onValueChange: o, onChange: c, invalidMessage: l, invalid: d, status: p, help: m, label: h, ref: g, name: _, disabled: C, placeholder: T = "20-12345678-9", ...E }) => {
50
+ let D = i("cuitInput", w), [O, k, , A] = e(r, () => f(a, 11), o && ((e) => o(e, u(e)))), j = f(O, 11), M = t(A), N = j.length === 11 && !u(j), P = d !== void 0 || p !== void 0, F = h != null || !!m, { setRef: I, apply: L } = S(s, g, 11, M);
51
+ return /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(n, {
52
52
  ...E,
53
53
  ref: I,
54
54
  disabled: C,
55
55
  label: h,
56
56
  help: F && N ? l ?? D.invalid : m,
57
- status: f,
58
- invalid: P ? u : N || void 0,
59
- value: c(j),
57
+ status: p,
58
+ invalid: P ? d : N || void 0,
59
+ value: s(j),
60
60
  placeholder: T,
61
61
  inputMode: "numeric",
62
62
  autoComplete: "off",
63
63
  onChange: (e) => {
64
- let t = p(L(e, c(j)));
65
- t !== j && k(t), s?.(e);
64
+ let t = f(L(e, s(j)));
65
+ t !== j && k(t), c?.(e);
66
66
  }
67
67
  }), x(_, j, C)] });
68
- }, E = ({ value: e, defaultValue: t = null, onValueChange: n, onChange: i, onBlur: o, ref: s, name: c, disabled: u, placeholder: d = "$ 0,00", ...p }) => {
69
- let [h, C] = _(() => l(e === void 0 ? t : e)), w = g(m(h)), T = g(h), [E, D] = _(e);
70
- e !== void 0 && e !== E && (D(e), e !== m(h) && (C(l(e)), w.current = e));
71
- let O = a(() => {
72
- e === void 0 && (C(T.current), w.current = m(T.current));
73
- }), { setRef: k, apply: A } = S(f, s, void 0, O), j = m(h);
74
- return /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(r, {
75
- ...p,
68
+ }, E = ({ value: e, defaultValue: r = null, onValueChange: i, onChange: a, onBlur: o, ref: s, name: l, disabled: u, placeholder: f = "$ 0,00", ...m }) => {
69
+ let [h, C] = _(() => c(e === void 0 ? r : e)), w = g(p(h)), T = g(h), [E, D] = _(e);
70
+ e !== void 0 && e !== E && (D(e), e !== p(h) && (C(c(e)), w.current = e));
71
+ let O = t(() => {
72
+ e === void 0 && (C(T.current), w.current = p(T.current));
73
+ }), { setRef: k, apply: A } = S(d, s, void 0, O), j = p(h);
74
+ return /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(n, {
75
+ ...m,
76
76
  ref: k,
77
77
  disabled: u,
78
78
  value: h,
79
- placeholder: d,
79
+ placeholder: f,
80
80
  inputMode: "decimal",
81
81
  autoComplete: "off",
82
82
  onChange: (e) => {
83
83
  let t = A(e, h);
84
84
  C(t);
85
- let r = m(t);
86
- r !== w.current && (w.current = r, n?.(r)), i?.(e);
85
+ let n = p(t);
86
+ n !== w.current && (w.current = n, i?.(n)), a?.(e);
87
87
  },
88
88
  onBlur: (e) => {
89
- C(l(m(h))), o?.(e);
89
+ C(c(p(h))), o?.(e);
90
90
  }
91
- }), x(c, j === null ? "" : String(j), u)] });
91
+ }), x(l, j === null ? "" : String(j), u)] });
92
92
  };
93
- //#endregion
94
93
  export { w as DEFAULT_CUIT_INPUT_LABELS, T as KapiCuitInput, E as KapiCurrencyInput, C as KapiDniInput };
@@ -1,89 +1,89 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/inputs/inputsExtra.css";
3
- import { useLabels as e } from "../locale/KapiLocaleProvider.js";
4
- import { fieldControlProps as t, joinIds as n, resolveFieldClassName as r, resolveFieldMessage as i, resolveReadOnly as a } from "./fieldLogic.js";
5
- import { useOwnField as o } from "./ownField.js";
6
3
  /* empty css */
7
- import { inputClasses as s } from "./KapiInput.js";
8
- import { useControllableState as ee } from "../../hooks/useControllableState.js";
9
- import { canDecrement as c, canIncrement as te, clampNumber as l, parseTypedNumber as u, snapToStep as d, stepValue as ne } from "./numberStepLogic.js";
10
- import { useEffect as f, useState as p } from "react";
11
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
12
- import { Minus as g, Plus as re } from "lucide-react";
13
- //#region src/components/inputs/KapiNumberStepper.tsx
14
- var _ = ({ size: e = "md", className: t = "" } = {}) => [
4
+ import { useOwnField as e } from "./ownField.js";
5
+ import { fieldControlProps as t, joinIds as n, resolveFieldClassName as r, resolveFieldMessage as i, resolveReadOnly as a } from "./fieldLogic.js";
6
+ import { inputClasses as o } from "./KapiInput.js";
7
+ import { canDecrement as s, canIncrement as ee, clampNumber as c, parseTypedNumber as l, snapToStep as u, stepValue as te } from "./numberStepLogic.js";
8
+ import { useLabels as d } from "../locale/KapiLocaleProvider.js";
9
+ import { useControllableState as f } from "../../hooks/useControllableState.js";
10
+ import { useEffect as p, useState as m } from "react";
11
+ import { jsx as h, jsxs as ne } from "react/jsx-runtime";
12
+ import { Minus as re, Plus as ie } from "lucide-react";
13
+ // src/components/inputs/KapiNumberStepper.tsx
14
+ var g = ({ size: e = "md", className: t = "" } = {}) => [
15
15
  "kapi-stepper",
16
16
  e !== "md" && `kapi-stepper--${e}`,
17
17
  t
18
- ].filter(Boolean).join(" "), v = {
18
+ ].filter(Boolean).join(" "), _ = {
19
19
  decrease: "Disminuir",
20
20
  increase: "Aumentar"
21
- }, y = ({ value: y, defaultValue: b, onChange: x, min: S, max: C, step: w = 1, size: T = "md", invalid: E, status: D, required: O, label: ie, help: k, error: A, fieldClassName: j, wrapperClassName: M, labels: N, className: P, disabled: F, readOnly: I, id: L, ...R }) => {
22
- let z = e("numberStepper", v, N), [B, V] = ee(y, () => l(b ?? 0, {
23
- min: S,
24
- max: C,
25
- step: w
26
- }), x), { invalid: H, status: U } = i(A, k, E, D), W = o({
21
+ }, v = ({ value: v, defaultValue: y, onChange: b, min: x, max: S, step: C = 1, size: w = "md", invalid: T, status: E, required: D, label: O, help: k, error: A, fieldClassName: j, wrapperClassName: M, labels: N, className: P, disabled: F, readOnly: I, id: L, ...R }) => {
22
+ let z = d("numberStepper", _, N), [B, V] = f(v, () => c(y ?? 0, {
23
+ min: x,
24
+ max: S,
25
+ step: C
26
+ }), b), { invalid: H, status: U } = i(A, k, T, E), W = e({
27
27
  id: L,
28
- label: ie,
28
+ label: O,
29
29
  help: k,
30
30
  error: A,
31
- required: O,
32
- invalid: E,
33
- status: D,
31
+ required: D,
32
+ invalid: T,
33
+ status: E,
34
34
  readOnly: I
35
35
  }), G = W.controlId ?? W.autoId, { helpId: K } = W, q = a(I, W.field), J = {
36
- min: S,
37
- max: C,
38
- step: w
39
- }, [Y, X] = p(null);
40
- f(() => X(null), [B]);
36
+ min: x,
37
+ max: S,
38
+ step: C
39
+ }, [Y, X] = m(null);
40
+ p(() => X(null), [B]);
41
41
  let Z = (e) => {
42
- let t = l(e, J);
42
+ let t = c(e, J);
43
43
  t !== B && V(t), X(null);
44
44
  }, Q = () => {
45
45
  if (Y === null) return;
46
- let e = u(Y);
47
- Z(e === null ? B : d(e, J));
46
+ let e = l(Y);
47
+ Z(e === null ? B : u(e, J));
48
48
  }, $ = (e) => {
49
49
  if (q) return;
50
- let t = Y === null ? null : u(Y), n = t === null ? B : d(t, J);
51
- Z(ne(n, e, J));
52
- }, ae = /* @__PURE__ */ h("div", {
53
- className: _({
54
- size: T,
50
+ let t = Y === null ? null : l(Y), n = t === null ? B : u(t, J);
51
+ Z(te(n, e, J));
52
+ }, ae = /* @__PURE__ */ ne("div", {
53
+ className: g({
54
+ size: w,
55
55
  className: r(j, M)
56
56
  }),
57
57
  children: [
58
- /* @__PURE__ */ m("button", {
58
+ /* @__PURE__ */ h("button", {
59
59
  type: "button",
60
60
  className: "kapi-stepper__btn",
61
61
  "aria-label": z.decrease,
62
62
  tabIndex: -1,
63
- disabled: F || q || !c(B, J),
63
+ disabled: F || q || !s(B, J),
64
64
  onClick: () => $(-1),
65
- children: /* @__PURE__ */ m(g, {
65
+ children: /* @__PURE__ */ h(re, {
66
66
  size: 15,
67
67
  strokeWidth: 2.4
68
68
  })
69
69
  }),
70
- /* @__PURE__ */ m("input", {
70
+ /* @__PURE__ */ h("input", {
71
71
  ...R,
72
72
  ...t(W.outer, {
73
73
  id: G,
74
74
  describedBy: n(K, R["aria-describedby"]),
75
75
  invalid: H
76
76
  }),
77
- required: O,
77
+ required: D,
78
78
  readOnly: q || void 0,
79
79
  type: "text",
80
- inputMode: w % 1 == 0 ? "numeric" : "decimal",
80
+ inputMode: C % 1 == 0 ? "numeric" : "decimal",
81
81
  role: "spinbutton",
82
82
  "aria-valuenow": B,
83
- "aria-valuemin": S,
84
- "aria-valuemax": C,
85
- className: s({
86
- size: T,
83
+ "aria-valuemin": x,
84
+ "aria-valuemax": S,
85
+ className: o({
86
+ size: w,
87
87
  status: U,
88
88
  num: !0,
89
89
  className: `kapi-stepper__input ${P ?? ""}`.trim()
@@ -96,14 +96,14 @@ var _ = ({ size: e = "md", className: t = "" } = {}) => [
96
96
  e.key === "ArrowUp" ? (e.preventDefault(), $(1)) : e.key === "ArrowDown" ? (e.preventDefault(), $(-1)) : e.key === "Enter" && Q();
97
97
  }
98
98
  }),
99
- /* @__PURE__ */ m("button", {
99
+ /* @__PURE__ */ h("button", {
100
100
  type: "button",
101
101
  className: "kapi-stepper__btn",
102
102
  "aria-label": z.increase,
103
103
  tabIndex: -1,
104
- disabled: F || q || !te(B, J),
104
+ disabled: F || q || !ee(B, J),
105
105
  onClick: () => $(1),
106
- children: /* @__PURE__ */ m(re, {
106
+ children: /* @__PURE__ */ h(ie, {
107
107
  size: 15,
108
108
  strokeWidth: 2.4
109
109
  })
@@ -112,5 +112,4 @@ var _ = ({ size: e = "md", className: t = "" } = {}) => [
112
112
  });
113
113
  return W.wrap(ae);
114
114
  };
115
- //#endregion
116
- export { v as DEFAULT_NUMBER_STEPPER_LABELS, y as KapiNumberStepper, _ as stepperClasses };
115
+ export { _ as DEFAULT_NUMBER_STEPPER_LABELS, v as KapiNumberStepper, g as stepperClasses };
@@ -1,19 +1,19 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/inputs/KapiPinInput.css";
3
- import { joinClasses as e } from "../rootProps.js";
3
+ import { useControllableState as e } from "../../hooks/useControllableState.js";
4
4
  import { useMergedRefs as t } from "../../hooks/mergeRefs.js";
5
5
  import { useLabels as n } from "../locale/KapiLocaleProvider.js";
6
- import { fieldControlProps as r } from "./fieldLogic.js";
7
- import { useOwnField as i } from "./ownField.js";
8
- import { useControllableState as a } from "../../hooks/useControllableState.js";
6
+ import { joinClasses as r } from "../rootProps.js";
7
+ import { fieldControlProps as i } from "./fieldLogic.js";
8
+ import { useOwnField as a } from "./ownField.js";
9
9
  import { joinPin as o, pinAfterBackspace as s, pinAfterInput as c, pinAfterPaste as l, splitPin as u } from "./pinInputLogic.js";
10
10
  /* empty css */
11
11
  import { useRef as d } from "react";
12
12
  import { jsx as f, jsxs as p } from "react/jsx-runtime";
13
- //#region src/components/inputs/KapiPinInput.tsx
13
+ // src/components/inputs/KapiPinInput.tsx
14
14
  var m = { digit: "Dígito {n} de {total}" };
15
15
  function h({ ref: h, length: g = 6, type: _ = "numeric", value: v, defaultValue: y, onChange: b, onComplete: x, mask: S, oneTimeCode: C = !0, label: w, help: T, error: E, invalid: D, status: O, required: k, readOnly: A, disabled: j, autoFocus: M, name: N, onBlur: P, fieldClassName: F, className: I, id: L, labels: R, ...z }) {
16
- let B = n("pinInput", m, R), V = i({
16
+ let B = n("pinInput", m, R), V = a({
17
17
  id: L,
18
18
  label: w,
19
19
  help: T,
@@ -23,7 +23,7 @@ function h({ ref: h, length: g = 6, type: _ = "numeric", value: v, defaultValue:
23
23
  status: O,
24
24
  readOnly: A,
25
25
  fieldClassName: F
26
- }), [H, U] = a(v, y ?? "", b), W = d([]), G = t(h, (e) => {
26
+ }), [H, U] = e(v, y ?? "", b), W = d([]), G = t(h, (e) => {
27
27
  W.current[0] = e;
28
28
  }), K = u(H, g), q = ({ boxes: e, focus: t }) => {
29
29
  let n = o(e);
@@ -32,7 +32,7 @@ function h({ ref: h, length: g = 6, type: _ = "numeric", value: v, defaultValue:
32
32
  A || j || (t.key === "Backspace" ? (t.preventDefault(), q(s(K, e))) : t.key === "ArrowLeft" && e > 0 ? (t.preventDefault(), W.current[e - 1]?.focus()) : t.key === "ArrowRight" && e < g - 1 && (t.preventDefault(), W.current[e + 1]?.focus()));
33
33
  }, Y = (e) => (t) => {
34
34
  A || j || (t.preventDefault(), q(l(K, e, t.clipboardData.getData("text"), _)));
35
- }, X = r(V.field, {
35
+ }, X = i(V.field, {
36
36
  id: L,
37
37
  required: k,
38
38
  invalid: D,
@@ -40,7 +40,7 @@ function h({ ref: h, length: g = 6, type: _ = "numeric", value: v, defaultValue:
40
40
  });
41
41
  return V.wrap(/* @__PURE__ */ p("div", {
42
42
  ...z,
43
- className: e("kapi-pin", I),
43
+ className: r("kapi-pin", I),
44
44
  role: "group",
45
45
  onBlur: (e) => {
46
46
  e.currentTarget.contains(e.relatedTarget) || P?.(e);
@@ -71,5 +71,4 @@ function h({ ref: h, length: g = 6, type: _ = "numeric", value: v, defaultValue:
71
71
  })]
72
72
  }));
73
73
  }
74
- //#endregion
75
74
  export { m as DEFAULT_PIN_INPUT_LABELS, h as KapiPinInput };
@@ -1,17 +1,17 @@
1
1
  "use client";
2
- import { KapiInput as e } from "./KapiInput.js";
3
- import { useControllableState as t } from "../../hooks/useControllableState.js";
4
- import { KapiSwitch as n } from "./KapiSwitch.js";
5
- import { KapiSelect as r } from "./KapiSelect.js";
6
- import { KapiTextarea as i } from "./KapiTextarea.js";
7
- import { KapiNumberStepper as a } from "./KapiNumberStepper.js";
8
- import { KapiGrid as o } from "../layout/KapiGrid.js";
2
+ import { useControllableState as e } from "../../hooks/useControllableState.js";
3
+ import { KapiGrid as t } from "../layout/KapiGrid.js";
4
+ import { KapiInput as n } from "./KapiInput.js";
5
+ import { KapiNumberStepper as r } from "./KapiNumberStepper.js";
6
+ import { KapiSelect as i } from "./KapiSelect.js";
7
+ import { KapiSwitch as a } from "./KapiSwitch.js";
8
+ import { KapiTextarea as o } from "./KapiTextarea.js";
9
9
  import { missingPropsFormFields as s, reconcilePropsFormValues as c } from "./propsFormLogic.js";
10
10
  import { useMemo as l } from "react";
11
11
  import { jsx as u } from "react/jsx-runtime";
12
- //#region src/components/inputs/KapiPropsForm.tsx
12
+ // src/components/inputs/KapiPropsForm.tsx
13
13
  function d({ fields: d, values: f, defaultValues: p, onChange: m, showErrors: h = !1, disabled: g = !1, min: _ = 220, className: v, ...y }) {
14
- let [b, x] = t(f, () => c(d, p ?? {}), m), S = l(() => c(d, b), [d, b]), C = l(() => h ? new Set(s(d, S)) : /* @__PURE__ */ new Set(), [
14
+ let [b, x] = e(f, () => c(d, p ?? {}), m), S = l(() => c(d, b), [d, b]), C = l(() => h ? new Set(s(d, S)) : /* @__PURE__ */ new Set(), [
15
15
  h,
16
16
  d,
17
17
  S
@@ -22,57 +22,56 @@ function d({ fields: d, values: f, defaultValues: p, onChange: m, showErrors: h
22
22
  return /* @__PURE__ */ u("div", {
23
23
  ...y,
24
24
  className: ["kapi-propsform", v].filter(Boolean).join(" "),
25
- children: /* @__PURE__ */ u(o, {
25
+ children: /* @__PURE__ */ u(t, {
26
26
  min: _,
27
27
  gap: 4,
28
- children: d.map((t) => {
29
- let o = {
30
- label: t.label,
31
- name: t.name,
32
- disabled: g || t.disabled === !0,
33
- required: t.required === !0,
34
- invalid: C.has(t.name),
35
- ...t.hint === void 0 ? {} : { help: t.hint }
36
- }, s = S[t.name] ?? null;
37
- if (t.kind === "boolean") return /* @__PURE__ */ u(n, {
38
- ...o,
28
+ children: d.map((e) => {
29
+ let t = {
30
+ label: e.label,
31
+ name: e.name,
32
+ disabled: g || e.disabled === !0,
33
+ required: e.required === !0,
34
+ invalid: C.has(e.name),
35
+ ...e.hint === void 0 ? {} : { help: e.hint }
36
+ }, s = S[e.name] ?? null;
37
+ if (e.kind === "boolean") return /* @__PURE__ */ u(a, {
38
+ ...t,
39
39
  checked: s === !0,
40
- onChange: (e) => w(t.name, e.currentTarget.checked)
41
- }, t.name);
42
- if (t.kind === "number") return /* @__PURE__ */ u(a, {
43
- ...o,
40
+ onChange: (t) => w(e.name, t.currentTarget.checked)
41
+ }, e.name);
42
+ if (e.kind === "number") return /* @__PURE__ */ u(r, {
43
+ ...t,
44
44
  ...typeof s == "number" ? { value: s } : {},
45
- onChange: (e) => w(t.name, e),
46
- ...t.min === void 0 ? {} : { min: t.min },
47
- ...t.max === void 0 ? {} : { max: t.max }
48
- }, t.name);
49
- if (t.kind === "select") return /* @__PURE__ */ u(r, {
50
- ...o,
51
- options: (t.options ?? []).map((e) => ({
45
+ onChange: (t) => w(e.name, t),
46
+ ...e.min === void 0 ? {} : { min: e.min },
47
+ ...e.max === void 0 ? {} : { max: e.max }
48
+ }, e.name);
49
+ if (e.kind === "select") return /* @__PURE__ */ u(i, {
50
+ ...t,
51
+ options: (e.options ?? []).map((e) => ({
52
52
  value: e.value,
53
53
  label: e.label
54
54
  })),
55
55
  value: typeof s == "string" ? s : null,
56
- onChange: (e) => w(t.name, e),
56
+ onChange: (t) => w(e.name, t),
57
57
  clearable: !0,
58
- ...t.placeholder === void 0 ? {} : { placeholder: t.placeholder }
59
- }, t.name);
60
- let c = typeof s == "string" ? s : "", l = t.placeholder === void 0 ? {} : { placeholder: t.placeholder };
61
- return t.kind === "textarea" ? /* @__PURE__ */ u(i, {
62
- ...o,
58
+ ...e.placeholder === void 0 ? {} : { placeholder: e.placeholder }
59
+ }, e.name);
60
+ let c = typeof s == "string" ? s : "", l = e.placeholder === void 0 ? {} : { placeholder: e.placeholder };
61
+ return e.kind === "textarea" ? /* @__PURE__ */ u(o, {
62
+ ...t,
63
63
  ...l,
64
64
  rows: 3,
65
65
  value: c,
66
- onChange: (e) => w(t.name, e.currentTarget.value)
67
- }, t.name) : /* @__PURE__ */ u(e, {
68
- ...o,
66
+ onChange: (t) => w(e.name, t.currentTarget.value)
67
+ }, e.name) : /* @__PURE__ */ u(n, {
68
+ ...t,
69
69
  ...l,
70
70
  value: c,
71
- onChange: (e) => w(t.name, e.currentTarget.value)
72
- }, t.name);
71
+ onChange: (t) => w(e.name, t.currentTarget.value)
72
+ }, e.name);
73
73
  })
74
74
  })
75
75
  });
76
76
  }
77
- //#endregion
78
77
  export { d as KapiPropsForm };
@@ -1,5 +1,4 @@
1
1
  import { createCheckControl as e } from "./checkControl.js";
2
- //#region src/components/inputs/KapiRadio.tsx
2
+ // src/components/inputs/KapiRadio.tsx
3
3
  var t = e("radio", "KapiRadio");
4
- //#endregion
5
4
  export { t as KapiRadio };