@kapiuara/ui 0.23.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 (366) 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/components/overlays/KapiViewport.css +1 -1
  288. package/dist/hooks/asyncResourceLogic.js +1 -2
  289. package/dist/hooks/breakpointOpenLogic.js +1 -2
  290. package/dist/hooks/colorLogic.js +1 -2
  291. package/dist/hooks/dateFormat.js +1 -2
  292. package/dist/hooks/densityLogic.js +1 -2
  293. package/dist/hooks/directionLogic.js +1 -2
  294. package/dist/hooks/downloadLogic.js +1 -2
  295. package/dist/hooks/elementSizeLogic.js +1 -2
  296. package/dist/hooks/fieldErrorsLogic.js +1 -2
  297. package/dist/hooks/focusLogic.js +2 -11
  298. package/dist/hooks/growOriginLogic.js +1 -2
  299. package/dist/hooks/hotkeyLogic.js +1 -2
  300. package/dist/hooks/hotkeyRegistry.js +1 -2
  301. package/dist/hooks/kapiRoot.js +2 -3
  302. package/dist/hooks/mergeRefs.js +1 -2
  303. package/dist/hooks/numberFormatLogic.js +1 -2
  304. package/dist/hooks/onlineStatusLogic.js +1 -2
  305. package/dist/hooks/ownerDocument.js +1 -2
  306. package/dist/hooks/persistentStateLogic.js +1 -2
  307. package/dist/hooks/portalRoot.js +1 -2
  308. package/dist/hooks/rafThrottle.js +1 -2
  309. package/dist/hooks/rangeSelectLogic.js +1 -2
  310. package/dist/hooks/recentLogic.js +1 -2
  311. package/dist/hooks/reducedMotion.js +8 -9
  312. package/dist/hooks/rightClick.js +10 -11
  313. package/dist/hooks/scrollCollapseLogic.js +1 -2
  314. package/dist/hooks/scrollEdgesLogic.js +1 -2
  315. package/dist/hooks/shallowStable.js +1 -2
  316. package/dist/hooks/slidingIndicatorLogic.js +1 -2
  317. package/dist/hooks/storageLogic.js +1 -2
  318. package/dist/hooks/themeColorsLogic.js +1 -2
  319. package/dist/hooks/themeContrastLogic.js +1 -2
  320. package/dist/hooks/themeDeriveLogic.js +0 -1
  321. package/dist/hooks/themeRadiiLogic.js +1 -2
  322. package/dist/hooks/themeScript.js +1 -2
  323. package/dist/hooks/toneFamilyLogic.js +1 -2
  324. package/dist/hooks/unsavedGuardLogic.js +1 -2
  325. package/dist/hooks/useAsyncLoader.js +1 -2
  326. package/dist/hooks/useAsyncResource.js +5 -6
  327. package/dist/hooks/useAsyncTasks.js +1 -2
  328. package/dist/hooks/useBottomBarInset.js +9 -10
  329. package/dist/hooks/useControllableState.js +1 -2
  330. package/dist/hooks/useDebouncedValue.js +1 -2
  331. package/dist/hooks/useDisclosure.js +1 -2
  332. package/dist/hooks/useDismiss.js +10 -11
  333. package/dist/hooks/useDragScroll.js +12 -13
  334. package/dist/hooks/useElementSize.js +1 -2
  335. package/dist/hooks/useFieldErrors.js +1 -2
  336. package/dist/hooks/useFocusReturn.js +1 -2
  337. package/dist/hooks/useFormReset.js +1 -2
  338. package/dist/hooks/useGlobalRightClick.js +1 -2
  339. package/dist/hooks/useGrowOrigin.js +1 -2
  340. package/dist/hooks/useHotkey.js +1 -2
  341. package/dist/hooks/useHydrated.js +1 -2
  342. package/dist/hooks/useKapiTheme.js +55 -56
  343. package/dist/hooks/useMediaQuery.js +1 -2
  344. package/dist/hooks/useObjectUrl.js +1 -2
  345. package/dist/hooks/useOnlineStatus.js +1 -2
  346. package/dist/hooks/useOutsidePress.js +1 -2
  347. package/dist/hooks/usePersistentState.js +9 -10
  348. package/dist/hooks/usePlacement.js +15 -16
  349. package/dist/hooks/useRangeSelect.js +2 -3
  350. package/dist/hooks/useRecent.js +6 -7
  351. package/dist/hooks/useScrollCollapse.js +1 -2
  352. package/dist/hooks/useScrollEdges.js +25 -26
  353. package/dist/hooks/useSlidingIndicator.js +19 -20
  354. package/dist/hooks/useSubmitDraft.js +1 -2
  355. package/dist/hooks/useToneFamilies.js +0 -1
  356. package/dist/hooks/useTypeahead.js +1 -2
  357. package/dist/hooks/useUnsavedGuard.js +5 -6
  358. package/dist/hooks/useVirtualList.js +1 -2
  359. package/dist/hooks/useWheelZoom.js +1 -2
  360. package/dist/hooks/viewportInsetLogic.js +1 -2
  361. package/dist/hooks/virtualListLogic.js +0 -1
  362. package/dist/hooks/wheelZoomLogic.js +1 -2
  363. package/dist/kapi.css +1 -1
  364. package/dist/kapi.layered.css +1 -1
  365. package/dist/logic.js +45 -45
  366. package/package.json +16 -16
@@ -1,21 +1,21 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/inputs/KapiFacetedSearch.css";
3
- import { joinClasses as e } from "../rootProps.js";
4
- import { useMergedRefs as t } from "../../hooks/mergeRefs.js";
5
- import { useLabels as ee } from "../locale/KapiLocaleProvider.js";
6
- import { enabledIndexes as n, nextEnabledIndex as r } from "../overlays/menuKeyboardLogic.js";
7
- import { useAsyncLoader as te } from "../../hooks/useAsyncLoader.js";
8
- import { KapiDatePicker as ne } from "./KapiDatePicker.js";
9
- import { KapiDateRangePicker as re } from "./KapiDateRangePicker.js";
10
- import { KapiTag as i } from "../display/KapiTag.js";
11
- import { KapiPopover as ie } from "../overlays/KapiPopover.js";
12
- import { facetChipText as ae, facetKeyAction as oe, facetMenuItems as se, facetOperators as a, facetOptionName as ce, isDateFacet as o, toDateRangeValue as le, toDateValue as ue } from "./facetedSearchLogic.js";
3
+ import { useAsyncLoader as e } from "../../hooks/useAsyncLoader.js";
4
+ import { KapiTag as t } from "../display/KapiTag.js";
5
+ import { KapiPopover as ee } from "../overlays/KapiPopover.js";
6
+ import { useLabels as n } from "../locale/KapiLocaleProvider.js";
7
+ import { joinClasses as r } from "../rootProps.js";
8
+ import { KapiDatePicker as te } from "./KapiDatePicker.js";
9
+ import { KapiDateRangePicker as ne } from "./KapiDateRangePicker.js";
10
+ import { facetChipText as re, facetKeyAction as i, facetMenuItems as ie, facetOperators as a, facetOptionName as ae, isDateFacet as o, toDateRangeValue as oe, toDateValue as se } from "./facetedSearchLogic.js";
11
+ import { enabledIndexes as ce, nextEnabledIndex as le } from "../overlays/menuKeyboardLogic.js";
13
12
  /* empty css */
14
- import { useId as s, useRef as c, useState as l } from "react";
15
- import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
16
- import { Search as de } from "lucide-react";
17
- //#region src/components/inputs/KapiFacetedSearch.tsx
18
- var p = {
13
+ import { useMergedRefs as s } from "../../hooks/mergeRefs.js";
14
+ import { useId as c, useRef as l, useState as u } from "react";
15
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
16
+ import { Search as ue } from "lucide-react";
17
+ // src/components/inputs/KapiFacetedSearch.tsx
18
+ var m = {
19
19
  input: "Buscar o filtrar",
20
20
  region: "Búsqueda",
21
21
  placeholder: "Buscar o filtrar…",
@@ -39,8 +39,8 @@ var p = {
39
39
  operatorLt: "menor que",
40
40
  operatorLte: "menor o igual que"
41
41
  };
42
- function m({ facets: m, chips: h, onText: fe, onClearAll: g, loadDelay: pe = 300, reloadKey: me, labels: he, className: ge, onMouseDown: _e, "aria-label": _, ref: ve, ...v }) {
43
- let y = ee("facetedSearch", p, he), b = s(), x = `${b}-list`, S = c(null), ye = t(S, ve), C = c(null), w = c(null), [T, E] = l(""), [D, O] = l(null), [k, A] = l(null), [j, M] = l(!1), [N, P] = l(-1), F = T.trim(), I = !!D && a(D).length >= 2 && k === null, L = D?.kind === "text" && !I, R = typeof D?.loadOptions == "function" && D.kind !== "text" && !I, z = {
42
+ function h({ facets: h, chips: g, onText: de, onClearAll: _, loadDelay: fe = 300, reloadKey: pe, labels: me, className: he, onMouseDown: ge, "aria-label": v, ref: _e, ...ve }) {
43
+ let y = n("facetedSearch", m, me), b = c(), x = `${b}-list`, S = l(null), ye = s(S, _e), C = l(null), w = l(null), [T, E] = u(""), [D, O] = u(null), [k, A] = u(null), [j, M] = u(!1), [N, P] = u(-1), F = T.trim(), I = !!D && a(D).length >= 2 && k === null, L = D?.kind === "text" && !I, R = typeof D?.loadOptions == "function" && D.kind !== "text" && !I, z = {
44
44
  eq: y.operatorEq,
45
45
  ne: y.operatorNe,
46
46
  contains: y.operatorContains,
@@ -50,15 +50,15 @@ function m({ facets: m, chips: h, onText: fe, onClearAll: g, loadDelay: pe = 300
50
50
  gte: y.operatorGte,
51
51
  lt: y.operatorLt,
52
52
  lte: y.operatorLte
53
- }, B = (e) => ae(e, e.operator ? z[e.operator] : void 0), V = o(D) && !I, be = te({
53
+ }, B = (e) => re(e, e.operator ? z[e.operator] : void 0), V = o(D) && !I, be = e({
54
54
  query: F,
55
55
  key: `${D?.key ?? ""}\u0000${F}`,
56
56
  enabled: R && j && !V,
57
57
  load: D?.loadOptions,
58
- delay: pe,
59
- reloadKey: me,
58
+ delay: fe,
59
+ reloadKey: pe,
60
60
  onLoaded: () => P(-1)
61
- }), H = R ? be.result : null, U = R && !H, W = se(m, D, T, H && !H.error ? H.data : void 0, k), G = j && !V && !(L && W.length === 0), K = () => requestAnimationFrame(() => C.current?.focus()), q = () => {
61
+ }), H = R ? be.result : null, U = R && !H, W = ie(h, D, T, H && !H.error ? H.data : void 0, k), G = j && !V && !(L && W.length === 0), K = () => requestAnimationFrame(() => C.current?.focus()), q = () => {
62
62
  E(""), O(null), A(null), P(-1);
63
63
  }, J = () => {
64
64
  q(), M(!1), K();
@@ -67,7 +67,7 @@ function m({ facets: m, chips: h, onText: fe, onClearAll: g, loadDelay: pe = 300
67
67
  }, X = () => {
68
68
  k !== null && D && a(D).length >= 2 || O(null), A(null), P(-1), K();
69
69
  }, Z = (e) => {
70
- D?.kind === "text" ? D.apply(e, k ?? "eq") : fe(e), J();
70
+ D?.kind === "text" ? D.apply(e, k ?? "eq") : de(e), J();
71
71
  }, Q = (e) => {
72
72
  if (e.type === "text") Z(e.text);
73
73
  else if (e.type === "option") D?.apply(e.option.value, k ?? "eq"), J();
@@ -77,18 +77,18 @@ function m({ facets: m, chips: h, onText: fe, onClearAll: g, loadDelay: pe = 300
77
77
  t.length >= 2 ? (O(e.facet), A(null), E(""), P(-1), M(!0), K()) : Y(e.facet, t[0] ?? "eq");
78
78
  }
79
79
  }, xe = (e) => {
80
- let t = oe(e.key, {
80
+ let t = i(e.key, {
81
81
  input: T,
82
82
  pending: !!D,
83
83
  pendingText: L,
84
84
  active: N,
85
85
  open: G,
86
- chips: h.length
86
+ chips: g.length
87
87
  });
88
88
  if (t) switch (e.preventDefault(), t) {
89
89
  case "next":
90
90
  case "prev":
91
- M(!0), P((e) => r(G ? e : -1, t, n(W.length)));
91
+ M(!0), P((e) => le(G ? e : -1, t, ce(W.length)));
92
92
  break;
93
93
  case "select": {
94
94
  let e = W[N];
@@ -107,28 +107,28 @@ function m({ facets: m, chips: h, onText: fe, onClearAll: g, loadDelay: pe = 300
107
107
  case "dropPending":
108
108
  X();
109
109
  break;
110
- case "removeLast": h[h.length - 1]?.onRemove();
110
+ case "removeLast": g[g.length - 1]?.onRemove();
111
111
  }
112
112
  }, Se = (e) => {
113
113
  let t = e.target.value === "";
114
114
  e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), q(), K()) : e.key === "Backspace" && t && (e.preventDefault(), X());
115
115
  }, $ = (e) => `${b}-opt-${e}`;
116
- return /* @__PURE__ */ f("div", {
117
- ...v,
116
+ return /* @__PURE__ */ p("div", {
117
+ ...ve,
118
118
  ref: ye,
119
- className: e("kapi-facets", ge),
119
+ className: r("kapi-facets", he),
120
120
  role: "search",
121
- "aria-label": _ ?? y.region,
121
+ "aria-label": v ?? y.region,
122
122
  onMouseDown: (e) => {
123
- _e?.(e), !e.defaultPrevented && e.target === e.currentTarget && (e.preventDefault(), C.current?.focus(), M(!0));
123
+ ge?.(e), e.defaultPrevented || e.target === e.currentTarget && (e.preventDefault(), C.current?.focus(), M(!0));
124
124
  },
125
125
  children: [
126
- /* @__PURE__ */ d(de, {
126
+ /* @__PURE__ */ f(ue, {
127
127
  className: "kapi-facets__icon",
128
128
  size: 15,
129
129
  "aria-hidden": !0
130
130
  }),
131
- h.map((e) => /* @__PURE__ */ d(i, {
131
+ g.map((e) => /* @__PURE__ */ f(t, {
132
132
  size: "sm",
133
133
  onRemove: () => {
134
134
  e.onRemove(), K();
@@ -136,7 +136,7 @@ function m({ facets: m, chips: h, onText: fe, onClearAll: g, loadDelay: pe = 300
136
136
  removeLabel: `${y.remove} ${B(e)}`,
137
137
  children: B(e)
138
138
  }, e.key)),
139
- D && /* @__PURE__ */ f(i, {
139
+ D && /* @__PURE__ */ p(t, {
140
140
  size: "sm",
141
141
  tone: "primary",
142
142
  className: "kapi-facets__pending",
@@ -146,23 +146,23 @@ function m({ facets: m, chips: h, onText: fe, onClearAll: g, loadDelay: pe = 300
146
146
  ":"
147
147
  ]
148
148
  }),
149
- V && D ? /* @__PURE__ */ d("span", {
149
+ V && D ? /* @__PURE__ */ f("span", {
150
150
  className: "kapi-facets__date",
151
151
  onKeyDownCapture: Se,
152
- children: D.kind === "dateRange" ? /* @__PURE__ */ d(re, {
152
+ children: D.kind === "dateRange" ? /* @__PURE__ */ f(ne, {
153
153
  ref: w,
154
154
  "aria-label": `${y.valuePrefix} ${D.label}`,
155
155
  onChange: ({ from: e, to: t }) => {
156
- e && t && (D.apply(le(e, t), k ?? "eq"), J());
156
+ e && t && (D.apply(oe(e, t), k ?? "eq"), J());
157
157
  }
158
- }) : /* @__PURE__ */ d(ne, {
158
+ }) : /* @__PURE__ */ f(te, {
159
159
  ref: w,
160
160
  "aria-label": `${y.valuePrefix} ${D.label}`,
161
161
  onChange: (e) => {
162
- e && (D.apply(ue(e), k ?? "eq"), J());
162
+ e && (D.apply(se(e), k ?? "eq"), J());
163
163
  }
164
164
  })
165
- }) : /* @__PURE__ */ d("input", {
165
+ }) : /* @__PURE__ */ f("input", {
166
166
  ref: C,
167
167
  className: "kapi-facets__input",
168
168
  type: "text",
@@ -173,28 +173,28 @@ function m({ facets: m, chips: h, onText: fe, onClearAll: g, loadDelay: pe = 300
173
173
  "aria-controls": x,
174
174
  "aria-autocomplete": "list",
175
175
  "aria-activedescendant": G && N >= 0 ? $(N) : void 0,
176
- placeholder: L ? y.typeValue : h.length === 0 && !D ? y.placeholder : void 0,
176
+ placeholder: L ? y.typeValue : g.length === 0 && !D ? y.placeholder : void 0,
177
177
  value: T,
178
178
  onFocus: () => M(!0),
179
179
  onClick: () => M(!0),
180
180
  onBlur: (e) => {
181
181
  let t = e.relatedTarget;
182
- (!t || !S.current?.contains(t)) && M(!1);
182
+ t && S.current?.contains(t) || M(!1);
183
183
  },
184
184
  onChange: (e) => {
185
185
  E(e.target.value), M(!0), P(-1);
186
186
  },
187
187
  onKeyDown: xe
188
188
  }),
189
- g && h.length > 0 && /* @__PURE__ */ d("button", {
189
+ _ && g.length > 0 && /* @__PURE__ */ f("button", {
190
190
  type: "button",
191
191
  className: "kapi-facets__clear",
192
192
  onClick: () => {
193
- g(), q(), K();
193
+ _(), q(), K();
194
194
  },
195
195
  children: y.clearAll
196
196
  }),
197
- /* @__PURE__ */ f(ie, {
197
+ /* @__PURE__ */ p(ee, {
198
198
  open: G,
199
199
  anchorRef: S,
200
200
  onClose: () => M(!1),
@@ -206,40 +206,40 @@ function m({ facets: m, chips: h, onText: fe, onClearAll: g, loadDelay: pe = 300
206
206
  restoreFocus: !1,
207
207
  className: "kapi-facets__menu",
208
208
  children: [
209
- U && /* @__PURE__ */ d("div", {
209
+ U && /* @__PURE__ */ f("div", {
210
210
  className: "kapi-facets__empty",
211
211
  children: y.loading
212
212
  }),
213
- !U && H?.error && /* @__PURE__ */ d("div", {
213
+ !U && H?.error && /* @__PURE__ */ f("div", {
214
214
  className: "kapi-facets__empty kapi-facets__empty--err",
215
215
  children: y.loadError
216
216
  }),
217
- !U && !H?.error && W.length === 0 && /* @__PURE__ */ d("div", {
217
+ !U && !H?.error && W.length === 0 && /* @__PURE__ */ f("div", {
218
218
  className: "kapi-facets__empty",
219
219
  children: y.empty
220
220
  }),
221
- !U && !H?.error && W.map((e, t) => /* @__PURE__ */ d("div", {
221
+ !U && !H?.error && W.map((e, t) => /* @__PURE__ */ f("div", {
222
222
  id: $(t),
223
223
  role: "option",
224
224
  "aria-selected": t === N,
225
- "aria-label": e.type === "option" ? ce(e.option) : void 0,
225
+ "aria-label": e.type === "option" ? ae(e.option) : void 0,
226
226
  className: `kapi-facets__opt${t === N ? " kapi-facets__opt--active" : ""}`,
227
227
  onMouseDown: (e) => e.preventDefault(),
228
228
  onMouseEnter: () => P(t),
229
229
  onClick: () => Q(e),
230
- children: e.type === "text" ? /* @__PURE__ */ f("span", { children: [
230
+ children: e.type === "text" ? /* @__PURE__ */ p("span", { children: [
231
231
  y.searchFor,
232
232
  " “",
233
233
  e.text,
234
234
  "”"
235
- ] }) : e.type === "operator" ? /* @__PURE__ */ d("span", { children: z[e.operator] }) : e.type === "option" ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("span", { children: e.option.label }), e.option.count !== void 0 && /* @__PURE__ */ d("span", {
235
+ ] }) : e.type === "operator" ? /* @__PURE__ */ f("span", { children: z[e.operator] }) : e.type === "option" ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("span", { children: e.option.label }), e.option.count !== void 0 && /* @__PURE__ */ f("span", {
236
236
  className: "kapi-facets__count",
237
237
  "aria-hidden": "true",
238
238
  children: e.option.count
239
- })] }) : /* @__PURE__ */ f("span", { children: [/* @__PURE__ */ d("span", {
239
+ })] }) : /* @__PURE__ */ p("span", { children: [/* @__PURE__ */ f("span", {
240
240
  className: "kapi-facets__facet",
241
241
  children: e.facet.label
242
- }), e.facet.kind !== "flag" && /* @__PURE__ */ f("span", {
242
+ }), e.facet.kind !== "flag" && /* @__PURE__ */ p("span", {
243
243
  className: "kapi-facets__hint",
244
244
  children: [
245
245
  " ",
@@ -253,5 +253,4 @@ function m({ facets: m, chips: h, onText: fe, onClearAll: g, loadDelay: pe = 300
253
253
  ]
254
254
  });
255
255
  }
256
- //#endregion
257
- export { p as DEFAULT_FACETED_SEARCH_LABELS, m as KapiFacetedSearch };
256
+ export { m as DEFAULT_FACETED_SEARCH_LABELS, h as KapiFacetedSearch };
@@ -1,17 +1,17 @@
1
1
  "use client";
2
- import { present as e } from "./inputLogic.js";
3
- import { fieldContextValue as t, fieldIds as n, resolveFieldMessage as r } from "./fieldLogic.js";
2
+ import { fieldContextValue as e, fieldIds as t, resolveFieldMessage as n } from "./fieldLogic.js";
3
+ import { present as r } from "./inputLogic.js";
4
4
  import { createContext as i, useContext as a, useId as o, useMemo as s } from "react";
5
5
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
6
  import { AlertTriangle as u, CheckCircle2 as d, LoaderCircle as f } from "lucide-react";
7
- //#region src/components/inputs/KapiField.tsx
7
+ // src/components/inputs/KapiField.tsx
8
8
  var p = i(null), m = () => a(p), h = (e = "") => ["kapi-field", e].filter(Boolean).join(" "), g = (e) => ["kapi-help", e && `kapi-help--${e}`].filter(Boolean).join(" "), _ = ({ label: i, htmlFor: a, required: m = !1, help: _, error: v, helpId: y, invalid: b, status: x, readOnly: S, className: C, children: w, ...T }) => {
9
- let E = o(), { message: D, status: O } = r(v, _, b, x), k = e(D), { controlId: A, labelId: j, helpId: M } = n({
9
+ let E = o(), { message: D, status: O } = n(v, _, b, x), k = r(D), { controlId: A, labelId: j, helpId: M } = t({
10
10
  htmlFor: a,
11
11
  autoId: E,
12
12
  helpId: y,
13
13
  hasHelp: k
14
- }), N = i != null, P = s(() => t({
14
+ }), N = i != null, P = s(() => e({
15
15
  controlId: A,
16
16
  labelId: N ? j : void 0,
17
17
  helpId: M,
@@ -65,5 +65,4 @@ var p = i(null), m = () => a(p), h = (e = "") => ["kapi-field", e].filter(Boolea
65
65
  })
66
66
  });
67
67
  };
68
- //#endregion
69
68
  export { _ as KapiField, h as fieldClasses, g as helpClasses, m as useKapiField };
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/inputs/KapiFileUpload.css";
3
- import { joinClasses as e } from "../rootProps.js";
4
- import { useLabels as t } from "../locale/KapiLocaleProvider.js";
5
- import { fieldControlProps as n, joinIds as r } from "./fieldLogic.js";
6
- import { useKapiField as i } from "./KapiField.js";
7
- import { formatFileSize as a, isActivationKey as o, matchesAccept as s, mergeFiles as c, removeFileAt as l } from "./fileUploadLogic.js";
3
+ import { formatFileSize as e, isActivationKey as t, matchesAccept as n, mergeFiles as r, removeFileAt as i } from "./fileUploadLogic.js";
8
4
  /* empty css */
9
- import { KapiProgress as u } from "../feedback/KapiProgress.js";
5
+ import { useLabels as a } from "../locale/KapiLocaleProvider.js";
6
+ import { KapiProgress as o } from "../feedback/KapiProgress.js";
7
+ import { useKapiField as s } from "./KapiField.js";
8
+ import { fieldControlProps as c, joinIds as l } from "./fieldLogic.js";
9
+ import { joinClasses as u } from "../rootProps.js";
10
10
  import { useEffect as d, useId as f, useRef as p, useState as m } from "react";
11
11
  import { jsx as h, jsxs as g } from "react/jsx-runtime";
12
12
  import { FileText as _, UploadCloud as v, X as y } from "lucide-react";
13
- //#region src/components/inputs/KapiFileUpload.tsx
13
+ // src/components/inputs/KapiFileUpload.tsx
14
14
  var b = {
15
15
  drop: "Arrastra archivos o",
16
16
  choose: "elige",
@@ -18,9 +18,9 @@ var b = {
18
18
  hint: "PDF, JPG, PNG · hasta 10MB",
19
19
  uploading: "Subiendo"
20
20
  }, x = ({ multiple: x = !0, accept: S, hint: C, onChange: w, disabled: T = !1, className: E, style: D, labels: O, name: k, id: A, onBlur: j, invalid: M, progress: N, paste: P = !1, "aria-describedby": F, ref: I }) => {
21
- let L = t("fileUpload", b, O), R = C ?? L.hint, z = i(), [B, V] = m([]), [H, U] = m(!1), W = p(null), G = f(), K = `${G}-title`, q = `${G}-hint`, J = !!z?.labelId, Y = n(z, {
21
+ let L = a("fileUpload", b, O), R = C ?? L.hint, z = s(), [B, V] = m([]), [H, U] = m(!1), W = p(null), G = f(), K = `${G}-title`, q = `${G}-hint`, J = !!z?.labelId, Y = c(z, {
22
22
  id: A,
23
- describedBy: r(J && q, F),
23
+ describedBy: l(J && q, F),
24
24
  invalid: M
25
25
  });
26
26
  d(() => {
@@ -33,10 +33,10 @@ var b = {
33
33
  V(e), w?.(e);
34
34
  }, Z = (e) => {
35
35
  let t = Array.from(e ?? []);
36
- t.length !== 0 && X(c(B, t, x));
36
+ t.length !== 0 && X(r(B, t, x));
37
37
  }, Q = () => W.current?.click();
38
38
  return /* @__PURE__ */ g("div", {
39
- className: e("kapi-upload-wrap", E),
39
+ className: u("kapi-upload-wrap", E),
40
40
  style: D,
41
41
  children: [
42
42
  /* @__PURE__ */ g("div", {
@@ -44,12 +44,12 @@ var b = {
44
44
  id: Y.id,
45
45
  "aria-describedby": Y["aria-describedby"],
46
46
  "aria-invalid": Y["aria-invalid"],
47
- "aria-labelledby": J ? r(z?.labelId, K) : void 0,
47
+ "aria-labelledby": J ? l(z?.labelId, K) : void 0,
48
48
  onBlur: j,
49
49
  className: `kapi-upload${H ? " is-over" : ""}`,
50
50
  onClick: Q,
51
51
  onKeyDown: (e) => {
52
- o(e.key) && (e.preventDefault(), Q());
52
+ t(e.key) && (e.preventDefault(), Q());
53
53
  },
54
54
  onDragOver: (e) => {
55
55
  e.preventDefault(), T || U(!0);
@@ -57,13 +57,13 @@ var b = {
57
57
  onDragLeave: () => U(!1),
58
58
  onDrop: (e) => {
59
59
  if (e.preventDefault(), U(!1), T) return;
60
- let t = Array.from(e.dataTransfer.files).filter((e) => s(e, S));
61
- t.length !== 0 && X(c(B, t, x));
60
+ let t = Array.from(e.dataTransfer.files).filter((e) => n(e, S));
61
+ t.length !== 0 && X(r(B, t, x));
62
62
  },
63
63
  onPaste: (e) => {
64
64
  if (!P || T) return;
65
- let t = Array.from(e.clipboardData?.files ?? []).filter((e) => s(e, S));
66
- t.length !== 0 && (e.preventDefault(), X(c(B, t, x)));
65
+ let t = Array.from(e.clipboardData?.files ?? []).filter((e) => n(e, S));
66
+ t.length !== 0 && (e.preventDefault(), X(r(B, t, x)));
67
67
  },
68
68
  role: "button",
69
69
  tabIndex: T ? -1 : 0,
@@ -107,7 +107,7 @@ var b = {
107
107
  }),
108
108
  B.length > 0 && /* @__PURE__ */ h("div", {
109
109
  className: "kapi-upload__list",
110
- children: B.map((e, t) => /* @__PURE__ */ g("div", {
110
+ children: B.map((t, n) => /* @__PURE__ */ g("div", {
111
111
  className: "kapi-upload__file",
112
112
  children: [
113
113
  /* @__PURE__ */ h(_, {
@@ -117,32 +117,31 @@ var b = {
117
117
  }),
118
118
  /* @__PURE__ */ h("span", {
119
119
  className: "kapi-upload__name",
120
- children: e.name
120
+ children: t.name
121
121
  }),
122
122
  /* @__PURE__ */ h("span", {
123
123
  className: "kapi-upload__size",
124
- children: a(e.size)
124
+ children: e(t.size)
125
125
  }),
126
126
  /* @__PURE__ */ h("button", {
127
127
  type: "button",
128
- "aria-label": `${L.remove} ${e.name}`,
129
- onClick: () => X(l(B, t)),
128
+ "aria-label": `${L.remove} ${t.name}`,
129
+ onClick: () => X(i(B, n)),
130
130
  children: /* @__PURE__ */ h(y, {
131
131
  size: 15,
132
132
  strokeWidth: 2.2
133
133
  })
134
134
  }),
135
- N?.(e, t) !== void 0 && /* @__PURE__ */ h(u, {
135
+ N?.(t, n) !== void 0 && /* @__PURE__ */ h(o, {
136
136
  className: "kapi-upload__progress",
137
- value: N(e, t) ?? 0,
137
+ value: N(t, n) ?? 0,
138
138
  size: "sm",
139
- label: `${L.uploading} ${e.name}`
139
+ label: `${L.uploading} ${t.name}`
140
140
  })
141
141
  ]
142
- }, `${e.name}-${t}`))
142
+ }, `${t.name}-${n}`))
143
143
  })
144
144
  ]
145
145
  });
146
146
  };
147
- //#endregion
148
147
  export { b as DEFAULT_FILE_UPLOAD_LABELS, x as KapiFileUpload };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { renderSlot as e } from "../renderSlot.js";
3
3
  import { jsx as t } from "react/jsx-runtime";
4
- //#region src/components/inputs/KapiIconButton.tsx
4
+ // src/components/inputs/KapiIconButton.tsx
5
5
  var n = (e = "") => [
6
6
  "kapi-btn",
7
7
  "kapi-btn--icon",
@@ -29,5 +29,4 @@ var n = (e = "") => [
29
29
  children: u
30
30
  }));
31
31
  };
32
- //#endregion
33
32
  export { r as KapiIconButton, n as iconButtonClasses };
@@ -1,21 +1,21 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/inputs/inputsExtra.css";
3
- import { useLabels as e } from "../locale/KapiLocaleProvider.js";
4
- import { hasAdornments as t, hasValue as n, inputBoxClasses as r, present as i, tipoDeCampo as ee } from "./inputLogic.js";
5
- import { fieldControlProps as te, joinIds as a, resolveFieldMessage as o } from "./fieldLogic.js";
6
- import { useOwnField as s } from "./ownField.js";
7
- import { resolveGroupSize as c } from "./inputGroupLogic.js";
8
- import { useKapiInputGroup as ne } from "./KapiInputGroup.js";
3
+ import { useOwnField as e } from "./ownField.js";
4
+ import { fieldControlProps as t, joinIds as n, resolveFieldMessage as r } from "./fieldLogic.js";
5
+ import { useKapiInputGroup as ee } from "./KapiInputGroup.js";
6
+ import { resolveGroupSize as te } from "./inputGroupLogic.js";
7
+ import { hasAdornments as ne, hasValue as i, inputBoxClasses as a, present as o, tipoDeCampo as re } from "./inputLogic.js";
8
+ import { useLabels as ie } from "../locale/KapiLocaleProvider.js";
9
9
  /* empty css */
10
- import { useEffect as re, useId as ie, useRef as l, useState as u } from "react";
11
- import { jsx as d, jsxs as ae } from "react/jsx-runtime";
12
- import { Eye as oe, EyeOff as f, X as p } from "lucide-react";
13
- //#region src/components/inputs/KapiInput.tsx
14
- var m = {
10
+ import { useEffect as ae, useId as s, useRef as c, useState as l } from "react";
11
+ import { jsx as u, jsxs as oe } from "react/jsx-runtime";
12
+ import { Eye as d, EyeOff as f, X as se } from "lucide-react";
13
+ // src/components/inputs/KapiInput.tsx
14
+ var p = {
15
15
  clear: "Limpiar",
16
16
  show: "Mostrar la contraseña",
17
17
  hide: "Ocultar la contraseña"
18
- }, se = (e) => {
18
+ }, m = (e) => {
19
19
  Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 }));
20
20
  }, h = ({ size: e = "md", status: t, num: n = !1, className: r = "" } = {}) => [
21
21
  "kapi-input",
@@ -24,7 +24,7 @@ var m = {
24
24
  t && `kapi-input--${t}`,
25
25
  r
26
26
  ].filter(Boolean).join(" "), g = (g) => {
27
- let { size: _, invalid: v, status: y, num: ce, label: le, required: b, help: x, error: S, fieldClassName: C, className: w, multiline: T, id: ue, startIcon: E, endIcon: D, prefix: O, suffix: k, clearable: A, onClear: de, reveal: j, shortcut: M, labels: N, ref: P, ...F } = g, I = P, { invalid: L, status: R } = o(S, x, v, y), z = e("input", m, N), B = c(_, ne()?.size), V = !T && t({
27
+ let { size: ce, invalid: _, status: v, num: le, label: y, required: b, help: x, error: S, fieldClassName: ue, className: C, multiline: w, id: T, startIcon: E, endIcon: D, prefix: O, suffix: k, clearable: A, onClear: de, reveal: j, shortcut: M, labels: N, ref: P, ...F } = g, I = P, { invalid: L, status: R } = r(S, x, _, v), z = ie("input", p, N), B = te(ce, ee()?.size), V = !w && ne({
28
28
  startIcon: E,
29
29
  endIcon: D,
30
30
  prefix: O,
@@ -32,109 +32,109 @@ var m = {
32
32
  clearable: A,
33
33
  reveal: j,
34
34
  shortcut: M
35
- }), [H, U] = u(!1), W = l(null), G = F;
36
- re(() => {
35
+ }), [H, U] = l(!1), W = c(null), G = F;
36
+ ae(() => {
37
37
  G.disabled && U(!1);
38
38
  }, [G.disabled]);
39
- let K = ee({
39
+ let K = re({
40
40
  reveal: j,
41
41
  revealed: H,
42
42
  disabled: G.disabled
43
- }), [fe, q] = u(() => n(G.defaultValue)), J = s({
44
- id: ue,
45
- label: le,
43
+ }), [fe, q] = l(() => i(G.defaultValue)), J = e({
44
+ id: T,
45
+ label: y,
46
46
  help: x,
47
47
  error: S,
48
48
  required: b,
49
- invalid: v,
50
- status: y,
51
- fieldClassName: C
52
- }), { controlId: pe, helpId: me } = J, Y = ie(), X = V && i(O) ? `${Y}-prefix` : void 0, Z = V && i(k) ? `${Y}-suffix` : void 0, Q = {
53
- ...te(J.outer, {
49
+ invalid: _,
50
+ status: v,
51
+ fieldClassName: ue
52
+ }), { controlId: pe, helpId: me } = J, Y = s(), X = V && o(O) ? `${Y}-prefix` : void 0, Z = V && o(k) ? `${Y}-suffix` : void 0, Q = {
53
+ ...t(J.outer, {
54
54
  id: pe,
55
- describedBy: a(me, F["aria-describedby"], X, Z),
55
+ describedBy: n(me, F["aria-describedby"], X, Z),
56
56
  invalid: L
57
57
  }),
58
58
  required: b,
59
59
  className: V ? "kapi-inputbox__control" : h({
60
60
  size: B,
61
61
  status: R,
62
- num: ce,
63
- className: w
62
+ num: le,
63
+ className: C
64
64
  })
65
65
  }, he = (e) => {
66
66
  W.current = e, typeof I == "function" ? I(e) : I && (I.current = e);
67
- }, $ = G.value === void 0 ? fe : n(G.value), ge = () => {
67
+ }, $ = G.value === void 0 ? fe : i(G.value), ge = () => {
68
68
  let e = W.current;
69
- e && (se(e), q(!1), e.focus(), de?.());
70
- }, _e = T ? /* @__PURE__ */ d("textarea", {
69
+ e && (m(e), q(!1), e.focus(), de?.());
70
+ }, _e = w ? /* @__PURE__ */ u("textarea", {
71
71
  ref: I,
72
72
  ...F,
73
73
  ...Q
74
- }) : V ? /* @__PURE__ */ ae("div", {
75
- className: r({
74
+ }) : V ? /* @__PURE__ */ oe("div", {
75
+ className: a({
76
76
  size: B,
77
77
  status: R,
78
78
  disabled: G.disabled,
79
- className: w
79
+ className: C
80
80
  }),
81
81
  onMouseDown: (e) => {
82
82
  e.target === W.current || G.disabled || (e.preventDefault(), W.current?.focus());
83
83
  },
84
84
  children: [
85
- i(E) && /* @__PURE__ */ d("span", {
85
+ o(E) && /* @__PURE__ */ u("span", {
86
86
  className: "kapi-inputbox__icon",
87
87
  "aria-hidden": "true",
88
88
  children: E
89
89
  }),
90
- i(O) && /* @__PURE__ */ d("span", {
90
+ o(O) && /* @__PURE__ */ u("span", {
91
91
  id: X,
92
92
  className: "kapi-inputbox__affix",
93
93
  children: O
94
94
  }),
95
- /* @__PURE__ */ d("input", {
95
+ /* @__PURE__ */ u("input", {
96
96
  ref: he,
97
97
  ...G,
98
98
  ...Q,
99
99
  ...K ? { type: K } : {},
100
100
  "aria-keyshortcuts": G["aria-keyshortcuts"] ?? (M || void 0),
101
101
  onChange: (e) => {
102
- q(n(e.target.value)), G.onChange?.(e);
102
+ q(i(e.target.value)), G.onChange?.(e);
103
103
  }
104
104
  }),
105
- i(k) && /* @__PURE__ */ d("span", {
105
+ o(k) && /* @__PURE__ */ u("span", {
106
106
  id: Z,
107
107
  className: "kapi-inputbox__affix",
108
108
  children: k
109
109
  }),
110
- j && !G.disabled && /* @__PURE__ */ d("button", {
110
+ j && !G.disabled && /* @__PURE__ */ u("button", {
111
111
  type: "button",
112
112
  className: "kapi-inputbox__reveal",
113
113
  "aria-label": H ? z.hide : z.show,
114
114
  "aria-pressed": H,
115
115
  onClick: () => U((e) => !e),
116
- children: d(H ? f : oe, { "aria-hidden": "true" })
116
+ children: u(H ? f : d, { "aria-hidden": "true" })
117
117
  }),
118
- A && $ && !G.disabled && !G.readOnly && /* @__PURE__ */ d("button", {
118
+ A && $ && !G.disabled && !G.readOnly && /* @__PURE__ */ u("button", {
119
119
  type: "button",
120
120
  tabIndex: -1,
121
121
  className: "kapi-inputbox__clear",
122
122
  "aria-label": z.clear,
123
123
  onClick: ge,
124
- children: /* @__PURE__ */ d(p, { "aria-hidden": "true" })
124
+ children: /* @__PURE__ */ u(se, { "aria-hidden": "true" })
125
125
  }),
126
- M && !$ && /* @__PURE__ */ d("kbd", {
126
+ M && !$ && /* @__PURE__ */ u("kbd", {
127
127
  className: "kapi-inputbox__kbd",
128
128
  "aria-hidden": "true",
129
129
  children: M
130
130
  }),
131
- i(D) && /* @__PURE__ */ d("span", {
131
+ o(D) && /* @__PURE__ */ u("span", {
132
132
  className: "kapi-inputbox__icon",
133
133
  "aria-hidden": "true",
134
134
  children: D
135
135
  })
136
136
  ]
137
- }) : /* @__PURE__ */ d("input", {
137
+ }) : /* @__PURE__ */ u("input", {
138
138
  ref: I,
139
139
  ...G,
140
140
  ...Q
@@ -142,5 +142,4 @@ var m = {
142
142
  return J.wrap(_e);
143
143
  };
144
144
  g.displayName = "KapiInput";
145
- //#endregion
146
- export { m as DEFAULT_INPUT_LABELS, g as KapiInput, h as inputClasses };
145
+ export { p as DEFAULT_INPUT_LABELS, g as KapiInput, h as inputClasses };
@@ -5,7 +5,7 @@ import { inputGroupAddonClasses as t, inputGroupClasses as n } from "./inputGrou
5
5
  /* empty css */
6
6
  import { createContext as r, useContext as i, useMemo as a } from "react";
7
7
  import { jsx as o } from "react/jsx-runtime";
8
- //#region src/components/inputs/KapiInputGroup.tsx
8
+ // src/components/inputs/KapiInputGroup.tsx
9
9
  var s = r(null), c = () => i(s), l = ({ decorative: e = !1, className: n, children: r }) => /* @__PURE__ */ o("span", {
10
10
  className: t(n),
11
11
  "aria-hidden": e || void 0,
@@ -27,5 +27,4 @@ var s = r(null), c = () => i(s), l = ({ decorative: e = !1, className: n, childr
27
27
  });
28
28
  };
29
29
  u.Addon = l;
30
- //#endregion
31
30
  export { u as KapiInputGroup, c as useKapiInputGroup };