@kapiuara/ui 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (424) hide show
  1. package/README.md +764 -2
  2. package/dist/components/data/KapiPagination.d.ts +36 -0
  3. package/dist/components/data/KapiPagination.js +102 -0
  4. package/dist/components/data/KapiTable.d.ts +245 -0
  5. package/dist/components/data/KapiTable.js +748 -0
  6. package/dist/components/data/KapiTableFilter.d.ts +48 -0
  7. package/dist/components/data/KapiTableFilter.js +81 -0
  8. package/dist/components/data/index.d.ts +10 -0
  9. package/dist/components/data/tableLogic.d.ts +197 -0
  10. package/dist/components/data/tableLogic.js +145 -0
  11. package/dist/components/data/tableResizeLogic.d.ts +28 -0
  12. package/dist/components/data/tableResizeLogic.js +20 -0
  13. package/dist/components/display/KapiAnnotation.d.ts +32 -0
  14. package/dist/components/display/KapiAnnotation.js +130 -0
  15. package/dist/components/display/KapiAvatar.d.ts +27 -0
  16. package/dist/components/display/KapiAvatar.js +43 -0
  17. package/dist/components/display/KapiAvatarGroup.d.ts +19 -0
  18. package/dist/components/display/KapiAvatarGroup.js +38 -0
  19. package/dist/components/display/KapiBadge.d.ts +21 -0
  20. package/dist/components/display/KapiBadge.js +28 -0
  21. package/dist/components/display/KapiComment.d.ts +27 -0
  22. package/dist/components/display/KapiComment.js +66 -0
  23. package/dist/components/display/KapiCommentComposer.d.ts +49 -0
  24. package/dist/components/display/KapiCommentComposer.js +76 -0
  25. package/dist/components/display/KapiDescriptionList.d.ts +19 -0
  26. package/dist/components/display/KapiDescriptionList.js +35 -0
  27. package/dist/components/display/KapiFileItem.d.ts +39 -0
  28. package/dist/components/display/KapiFileItem.js +74 -0
  29. package/dist/components/display/KapiFileViewer.d.ts +51 -0
  30. package/dist/components/display/KapiFileViewer.js +107 -0
  31. package/dist/components/display/KapiIconTile.d.ts +16 -0
  32. package/dist/components/display/KapiIconTile.js +29 -0
  33. package/dist/components/display/KapiStat.d.ts +24 -0
  34. package/dist/components/display/KapiStat.js +41 -0
  35. package/dist/components/display/KapiTag.d.ts +27 -0
  36. package/dist/components/display/KapiTag.js +44 -0
  37. package/dist/components/display/KapiTimeline.d.ts +15 -0
  38. package/dist/components/display/KapiTimeline.js +30 -0
  39. package/dist/components/display/annotationLogic.d.ts +26 -0
  40. package/dist/components/display/annotationLogic.js +17 -0
  41. package/dist/components/display/avatarGroupLogic.d.ts +14 -0
  42. package/dist/components/display/avatarGroupLogic.js +13 -0
  43. package/dist/components/display/avatarLogic.d.ts +5 -0
  44. package/dist/components/display/avatarLogic.js +9 -0
  45. package/dist/components/display/commentLogic.d.ts +18 -0
  46. package/dist/components/display/commentLogic.js +7 -0
  47. package/dist/components/display/fileItemLogic.d.ts +9 -0
  48. package/dist/components/display/fileItemLogic.js +12 -0
  49. package/dist/components/display/iconTileLogic.d.ts +13 -0
  50. package/dist/components/display/iconTileLogic.js +13 -0
  51. package/dist/components/display/index.d.ts +40 -0
  52. package/dist/components/display/statLogic.d.ts +10 -0
  53. package/dist/components/display/statLogic.js +10 -0
  54. package/dist/components/display/tagLogic.d.ts +11 -0
  55. package/dist/components/display/tagLogic.js +10 -0
  56. package/dist/components/display/timelineLogic.d.ts +5 -0
  57. package/dist/components/display/timelineLogic.js +4 -0
  58. package/dist/components/feedback/KapiAlert.d.ts +28 -0
  59. package/dist/components/feedback/KapiAlert.js +53 -0
  60. package/dist/components/feedback/KapiBulkBar.d.ts +30 -0
  61. package/dist/components/feedback/KapiBulkBar.js +34 -0
  62. package/dist/components/feedback/KapiCountdown.d.ts +26 -0
  63. package/dist/components/feedback/KapiCountdown.js +43 -0
  64. package/dist/components/feedback/KapiEmpty.d.ts +14 -0
  65. package/dist/components/feedback/KapiEmpty.js +31 -0
  66. package/dist/components/feedback/KapiFab.d.ts +34 -0
  67. package/dist/components/feedback/KapiFab.js +116 -0
  68. package/dist/components/feedback/KapiOfflineBanner.d.ts +25 -0
  69. package/dist/components/feedback/KapiOfflineBanner.js +40 -0
  70. package/dist/components/feedback/KapiProgress.d.ts +24 -0
  71. package/dist/components/feedback/KapiProgress.js +94 -0
  72. package/dist/components/feedback/KapiSkeleton.d.ts +12 -0
  73. package/dist/components/feedback/KapiSkeleton.js +16 -0
  74. package/dist/components/feedback/KapiToastContainer.d.ts +16 -0
  75. package/dist/components/feedback/KapiToastContainer.js +81 -0
  76. package/dist/components/feedback/KapiTour.d.ts +40 -0
  77. package/dist/components/feedback/KapiTour.js +157 -0
  78. package/dist/components/feedback/KapiUnsavedBar.d.ts +35 -0
  79. package/dist/components/feedback/KapiUnsavedBar.js +47 -0
  80. package/dist/components/feedback/bulkBarLogic.d.ts +2 -0
  81. package/dist/components/feedback/bulkBarLogic.js +7 -0
  82. package/dist/components/feedback/countdownLogic.d.ts +74 -0
  83. package/dist/components/feedback/countdownLogic.js +70 -0
  84. package/dist/components/feedback/fabLogic.d.ts +17 -0
  85. package/dist/components/feedback/fabLogic.js +10 -0
  86. package/dist/components/feedback/index.d.ts +33 -0
  87. package/dist/components/feedback/offlineBannerLogic.d.ts +10 -0
  88. package/dist/components/feedback/offlineBannerLogic.js +8 -0
  89. package/dist/components/feedback/progressLogic.d.ts +17 -0
  90. package/dist/components/feedback/progressLogic.js +16 -0
  91. package/dist/components/feedback/toastStore.d.ts +62 -0
  92. package/dist/components/feedback/toastStore.js +38 -0
  93. package/dist/components/feedback/tourLogic.d.ts +64 -0
  94. package/dist/components/feedback/tourLogic.js +31 -0
  95. package/dist/components/feedback/unsavedBarLogic.d.ts +2 -0
  96. package/dist/components/feedback/unsavedBarLogic.js +8 -0
  97. package/dist/components/inputs/KapiAutocomplete.d.ts +81 -0
  98. package/dist/components/inputs/KapiAutocomplete.js +205 -0
  99. package/dist/components/inputs/KapiButton.d.ts +23 -0
  100. package/dist/components/inputs/KapiButton.js +25 -0
  101. package/dist/components/inputs/KapiCalendar.d.ts +35 -0
  102. package/dist/components/inputs/KapiCalendar.js +60 -0
  103. package/dist/components/inputs/KapiCalendarGrid.d.ts +29 -0
  104. package/dist/components/inputs/KapiCalendarGrid.js +65 -0
  105. package/dist/components/inputs/KapiCheckCard.d.ts +28 -0
  106. package/dist/components/inputs/KapiCheckCard.js +41 -0
  107. package/dist/components/inputs/KapiCheckbox.d.ts +7 -0
  108. package/dist/components/inputs/KapiCheckbox.js +5 -0
  109. package/dist/components/inputs/KapiDatePicker.d.ts +46 -0
  110. package/dist/components/inputs/KapiDatePicker.js +189 -0
  111. package/dist/components/inputs/KapiDateRangePicker.d.ts +49 -0
  112. package/dist/components/inputs/KapiDateRangePicker.js +179 -0
  113. package/dist/components/inputs/KapiFacetedSearch.d.ts +45 -0
  114. package/dist/components/inputs/KapiFacetedSearch.js +188 -0
  115. package/dist/components/inputs/KapiField.d.ts +33 -0
  116. package/dist/components/inputs/KapiField.js +60 -0
  117. package/dist/components/inputs/KapiFileUpload.d.ts +58 -0
  118. package/dist/components/inputs/KapiFileUpload.js +134 -0
  119. package/dist/components/inputs/KapiIconButton.d.ts +13 -0
  120. package/dist/components/inputs/KapiIconButton.js +16 -0
  121. package/dist/components/inputs/KapiInput.d.ts +92 -0
  122. package/dist/components/inputs/KapiInput.js +123 -0
  123. package/dist/components/inputs/KapiInputGroup.d.ts +37 -0
  124. package/dist/components/inputs/KapiInputGroup.js +29 -0
  125. package/dist/components/inputs/KapiMaskedInput.d.ts +52 -0
  126. package/dist/components/inputs/KapiMaskedInput.js +78 -0
  127. package/dist/components/inputs/KapiNumberStepper.d.ts +44 -0
  128. package/dist/components/inputs/KapiNumberStepper.js +100 -0
  129. package/dist/components/inputs/KapiRadio.d.ts +7 -0
  130. package/dist/components/inputs/KapiRadio.js +5 -0
  131. package/dist/components/inputs/KapiRating.d.ts +55 -0
  132. package/dist/components/inputs/KapiRating.js +99 -0
  133. package/dist/components/inputs/KapiSegmented.d.ts +41 -0
  134. package/dist/components/inputs/KapiSegmented.js +83 -0
  135. package/dist/components/inputs/KapiSelect.d.ts +109 -0
  136. package/dist/components/inputs/KapiSelect.js +443 -0
  137. package/dist/components/inputs/KapiSlider.d.ts +42 -0
  138. package/dist/components/inputs/KapiSlider.js +70 -0
  139. package/dist/components/inputs/KapiSwitch.d.ts +13 -0
  140. package/dist/components/inputs/KapiSwitch.js +28 -0
  141. package/dist/components/inputs/KapiTagInput.d.ts +79 -0
  142. package/dist/components/inputs/KapiTagInput.js +115 -0
  143. package/dist/components/inputs/KapiTextarea.d.ts +32 -0
  144. package/dist/components/inputs/KapiTextarea.js +67 -0
  145. package/dist/components/inputs/asyncSelectLogic.d.ts +42 -0
  146. package/dist/components/inputs/asyncSelectLogic.js +46 -0
  147. package/dist/components/inputs/autocompleteLogic.d.ts +73 -0
  148. package/dist/components/inputs/autocompleteLogic.js +67 -0
  149. package/dist/components/inputs/checkControl.d.ts +20 -0
  150. package/dist/components/inputs/checkControl.js +31 -0
  151. package/dist/components/inputs/datePickerLogic.d.ts +92 -0
  152. package/dist/components/inputs/datePickerLogic.js +174 -0
  153. package/dist/components/inputs/dateRangeLogic.d.ts +31 -0
  154. package/dist/components/inputs/dateRangeLogic.js +44 -0
  155. package/dist/components/inputs/facetedSearchLogic.d.ts +69 -0
  156. package/dist/components/inputs/facetedSearchLogic.js +39 -0
  157. package/dist/components/inputs/fieldLogic.d.ts +67 -0
  158. package/dist/components/inputs/fieldLogic.js +35 -0
  159. package/dist/components/inputs/fileUploadLogic.d.ts +13 -0
  160. package/dist/components/inputs/fileUploadLogic.js +9 -0
  161. package/dist/components/inputs/index.d.ts +55 -0
  162. package/dist/components/inputs/inputGroupLogic.d.ts +22 -0
  163. package/dist/components/inputs/inputGroupLogic.js +9 -0
  164. package/dist/components/inputs/inputLogic.d.ts +25 -0
  165. package/dist/components/inputs/inputLogic.js +10 -0
  166. package/dist/components/inputs/maskLogic.d.ts +34 -0
  167. package/dist/components/inputs/maskLogic.js +57 -0
  168. package/dist/components/inputs/numberStepLogic.d.ts +14 -0
  169. package/dist/components/inputs/numberStepLogic.js +21 -0
  170. package/dist/components/inputs/ratingLogic.d.ts +9 -0
  171. package/dist/components/inputs/ratingLogic.js +22 -0
  172. package/dist/components/inputs/segmentedLogic.d.ts +6 -0
  173. package/dist/components/inputs/segmentedLogic.js +14 -0
  174. package/dist/components/inputs/selectLogic.d.ts +89 -0
  175. package/dist/components/inputs/selectLogic.js +82 -0
  176. package/dist/components/inputs/sliderLogic.d.ts +9 -0
  177. package/dist/components/inputs/sliderLogic.js +17 -0
  178. package/dist/components/inputs/tagInputLogic.d.ts +40 -0
  179. package/dist/components/inputs/tagInputLogic.js +40 -0
  180. package/dist/components/inputs/textareaLogic.d.ts +17 -0
  181. package/dist/components/inputs/textareaLogic.js +13 -0
  182. package/dist/components/inputs/useCalendarFocus.d.ts +13 -0
  183. package/dist/components/inputs/useCalendarFocus.js +25 -0
  184. package/dist/components/inputs/useDatePopSide.d.ts +15 -0
  185. package/dist/components/inputs/useDatePopSide.js +20 -0
  186. package/dist/components/labelsLogic.d.ts +6 -0
  187. package/dist/components/labelsLogic.js +11 -0
  188. package/dist/components/layout/KapiAccessCard.d.ts +40 -0
  189. package/dist/components/layout/KapiAccessCard.js +66 -0
  190. package/dist/components/layout/KapiAccountMenu.d.ts +61 -0
  191. package/dist/components/layout/KapiAccountMenu.js +212 -0
  192. package/dist/components/layout/KapiCard.d.ts +43 -0
  193. package/dist/components/layout/KapiCard.js +53 -0
  194. package/dist/components/layout/KapiCluster.d.ts +15 -0
  195. package/dist/components/layout/KapiCluster.js +21 -0
  196. package/dist/components/layout/KapiContextSlot.d.ts +45 -0
  197. package/dist/components/layout/KapiContextSlot.js +92 -0
  198. package/dist/components/layout/KapiDivider.d.ts +16 -0
  199. package/dist/components/layout/KapiDivider.js +41 -0
  200. package/dist/components/layout/KapiGrid.d.ts +19 -0
  201. package/dist/components/layout/KapiGrid.js +25 -0
  202. package/dist/components/layout/KapiNotificationBell.d.ts +75 -0
  203. package/dist/components/layout/KapiNotificationBell.js +196 -0
  204. package/dist/components/layout/KapiPageHeader.d.ts +28 -0
  205. package/dist/components/layout/KapiPageHeader.js +47 -0
  206. package/dist/components/layout/KapiPanelParts.d.ts +35 -0
  207. package/dist/components/layout/KapiPanelParts.js +63 -0
  208. package/dist/components/layout/KapiRail.d.ts +40 -0
  209. package/dist/components/layout/KapiRail.js +102 -0
  210. package/dist/components/layout/KapiScrollArea.d.ts +40 -0
  211. package/dist/components/layout/KapiScrollArea.js +49 -0
  212. package/dist/components/layout/KapiShell.d.ts +40 -0
  213. package/dist/components/layout/KapiShell.js +48 -0
  214. package/dist/components/layout/KapiStack.d.ts +11 -0
  215. package/dist/components/layout/KapiStack.js +19 -0
  216. package/dist/components/layout/accessCardLogic.d.ts +18 -0
  217. package/dist/components/layout/accessCardLogic.js +11 -0
  218. package/dist/components/layout/cardLogic.d.ts +9 -0
  219. package/dist/components/layout/cardLogic.js +11 -0
  220. package/dist/components/layout/index.d.ts +33 -0
  221. package/dist/components/layout/layoutPrimitives.d.ts +51 -0
  222. package/dist/components/layout/layoutPrimitives.js +58 -0
  223. package/dist/components/layout/notificationBellLogic.d.ts +20 -0
  224. package/dist/components/layout/notificationBellLogic.js +14 -0
  225. package/dist/components/layout/railLogic.d.ts +52 -0
  226. package/dist/components/layout/railLogic.js +16 -0
  227. package/dist/components/locale/KapiLocaleProvider.d.ts +29 -0
  228. package/dist/components/locale/KapiLocaleProvider.js +27 -0
  229. package/dist/components/locale/index.d.ts +5 -0
  230. package/dist/components/locale/labelRegistry.d.ts +110 -0
  231. package/dist/components/locale/linkLabels.d.ts +6 -0
  232. package/dist/components/locale/linkLabels.js +4 -0
  233. package/dist/components/navigation/CtxSlidingList.d.ts +11 -0
  234. package/dist/components/navigation/CtxSlidingList.js +24 -0
  235. package/dist/components/navigation/KapiAccordion.d.ts +24 -0
  236. package/dist/components/navigation/KapiAccordion.js +68 -0
  237. package/dist/components/navigation/KapiBreadcrumb.d.ts +23 -0
  238. package/dist/components/navigation/KapiBreadcrumb.js +32 -0
  239. package/dist/components/navigation/KapiCollapsiblePanel.d.ts +63 -0
  240. package/dist/components/navigation/KapiCollapsiblePanel.js +83 -0
  241. package/dist/components/navigation/KapiContextPanel.d.ts +117 -0
  242. package/dist/components/navigation/KapiContextPanel.js +265 -0
  243. package/dist/components/navigation/KapiFilterChips.d.ts +30 -0
  244. package/dist/components/navigation/KapiFilterChips.js +40 -0
  245. package/dist/components/navigation/KapiNavBadge.d.ts +26 -0
  246. package/dist/components/navigation/KapiNavBadge.js +33 -0
  247. package/dist/components/navigation/KapiPanelGroup.d.ts +69 -0
  248. package/dist/components/navigation/KapiPanelGroup.js +149 -0
  249. package/dist/components/navigation/KapiSteps.d.ts +43 -0
  250. package/dist/components/navigation/KapiSteps.js +63 -0
  251. package/dist/components/navigation/KapiTabs.d.ts +56 -0
  252. package/dist/components/navigation/KapiTabs.js +81 -0
  253. package/dist/components/navigation/KapiTree.d.ts +56 -0
  254. package/dist/components/navigation/KapiTree.js +157 -0
  255. package/dist/components/navigation/KapiWizard.d.ts +49 -0
  256. package/dist/components/navigation/KapiWizard.js +104 -0
  257. package/dist/components/navigation/MiniNavItem.d.ts +35 -0
  258. package/dist/components/navigation/MiniNavItem.js +57 -0
  259. package/dist/components/navigation/accordionLogic.d.ts +4 -0
  260. package/dist/components/navigation/accordionLogic.js +4 -0
  261. package/dist/components/navigation/activeItemLogic.d.ts +7 -0
  262. package/dist/components/navigation/activeItemLogic.js +4 -0
  263. package/dist/components/navigation/breadcrumbLogic.d.ts +8 -0
  264. package/dist/components/navigation/breadcrumbLogic.js +4 -0
  265. package/dist/components/navigation/contextPanelLogic.d.ts +27 -0
  266. package/dist/components/navigation/contextPanelLogic.js +11 -0
  267. package/dist/components/navigation/filterChipsLogic.d.ts +23 -0
  268. package/dist/components/navigation/filterChipsLogic.js +20 -0
  269. package/dist/components/navigation/index.d.ts +39 -0
  270. package/dist/components/navigation/navBadgeLogic.d.ts +26 -0
  271. package/dist/components/navigation/navBadgeLogic.js +16 -0
  272. package/dist/components/navigation/panelGroupLogic.d.ts +15 -0
  273. package/dist/components/navigation/panelGroupLogic.js +13 -0
  274. package/dist/components/navigation/panelMini.d.ts +13 -0
  275. package/dist/components/navigation/panelMini.js +9 -0
  276. package/dist/components/navigation/panelMiniLogic.d.ts +19 -0
  277. package/dist/components/navigation/panelMiniLogic.js +6 -0
  278. package/dist/components/navigation/stepsLogic.d.ts +25 -0
  279. package/dist/components/navigation/stepsLogic.js +10 -0
  280. package/dist/components/navigation/tabsLogic.d.ts +12 -0
  281. package/dist/components/navigation/tabsLogic.js +14 -0
  282. package/dist/components/navigation/treeLogic.d.ts +80 -0
  283. package/dist/components/navigation/treeLogic.js +91 -0
  284. package/dist/components/navigation/wizardLogic.d.ts +11 -0
  285. package/dist/components/navigation/wizardLogic.js +7 -0
  286. package/dist/components/overlays/KapiCanvasForm.d.ts +42 -0
  287. package/dist/components/overlays/KapiCanvasForm.js +60 -0
  288. package/dist/components/overlays/KapiCommandPalette.d.ts +58 -0
  289. package/dist/components/overlays/KapiCommandPalette.js +152 -0
  290. package/dist/components/overlays/KapiConfirm.d.ts +48 -0
  291. package/dist/components/overlays/KapiConfirm.js +94 -0
  292. package/dist/components/overlays/KapiContextMenu.d.ts +51 -0
  293. package/dist/components/overlays/KapiContextMenu.js +90 -0
  294. package/dist/components/overlays/KapiDialogHost.d.ts +23 -0
  295. package/dist/components/overlays/KapiDialogHost.js +129 -0
  296. package/dist/components/overlays/KapiDropdown.d.ts +30 -0
  297. package/dist/components/overlays/KapiDropdown.js +84 -0
  298. package/dist/components/overlays/KapiLoading.d.ts +14 -0
  299. package/dist/components/overlays/KapiLoading.js +43 -0
  300. package/dist/components/overlays/KapiMenuButton.d.ts +25 -0
  301. package/dist/components/overlays/KapiMenuButton.js +109 -0
  302. package/dist/components/overlays/KapiModal.d.ts +61 -0
  303. package/dist/components/overlays/KapiModal.js +106 -0
  304. package/dist/components/overlays/KapiOffcanvas.d.ts +96 -0
  305. package/dist/components/overlays/KapiOffcanvas.js +209 -0
  306. package/dist/components/overlays/KapiOffcanvasStack.d.ts +58 -0
  307. package/dist/components/overlays/KapiOffcanvasStack.js +84 -0
  308. package/dist/components/overlays/KapiPhotoView.d.ts +60 -0
  309. package/dist/components/overlays/KapiPhotoView.js +122 -0
  310. package/dist/components/overlays/KapiPopover.d.ts +46 -0
  311. package/dist/components/overlays/KapiPopover.js +68 -0
  312. package/dist/components/overlays/KapiShapeSheet.d.ts +34 -0
  313. package/dist/components/overlays/KapiShapeSheet.js +82 -0
  314. package/dist/components/overlays/KapiSplitModal.d.ts +41 -0
  315. package/dist/components/overlays/KapiSplitModal.js +125 -0
  316. package/dist/components/overlays/KapiTooltip.d.ts +38 -0
  317. package/dist/components/overlays/KapiTooltip.js +105 -0
  318. package/dist/components/overlays/canvasFormLogic.d.ts +18 -0
  319. package/dist/components/overlays/canvasFormLogic.js +16 -0
  320. package/dist/components/overlays/commandPaletteLogic.d.ts +29 -0
  321. package/dist/components/overlays/commandPaletteLogic.js +19 -0
  322. package/dist/components/overlays/dialogStore.d.ts +114 -0
  323. package/dist/components/overlays/dialogStore.js +76 -0
  324. package/dist/components/overlays/dialogUtils.d.ts +72 -0
  325. package/dist/components/overlays/dialogUtils.js +62 -0
  326. package/dist/components/overlays/exitPresenceLogic.d.ts +14 -0
  327. package/dist/components/overlays/exitPresenceLogic.js +5 -0
  328. package/dist/components/overlays/index.d.ts +38 -0
  329. package/dist/components/overlays/menuButtonLogic.d.ts +58 -0
  330. package/dist/components/overlays/menuButtonLogic.js +9 -0
  331. package/dist/components/overlays/menuKeyboardLogic.d.ts +25 -0
  332. package/dist/components/overlays/menuKeyboardLogic.js +30 -0
  333. package/dist/components/overlays/offcanvasCompanion.d.ts +16 -0
  334. package/dist/components/overlays/offcanvasCompanion.js +6 -0
  335. package/dist/components/overlays/offcanvasResize.d.ts +22 -0
  336. package/dist/components/overlays/offcanvasResize.js +10 -0
  337. package/dist/components/overlays/offcanvasSide.d.ts +30 -0
  338. package/dist/components/overlays/offcanvasSide.js +29 -0
  339. package/dist/components/overlays/offcanvasStack.d.ts +76 -0
  340. package/dist/components/overlays/offcanvasStack.js +72 -0
  341. package/dist/components/overlays/overlayPortal.d.ts +9 -0
  342. package/dist/components/overlays/overlayPortal.js +6 -0
  343. package/dist/components/overlays/popoverLogic.d.ts +94 -0
  344. package/dist/components/overlays/popoverLogic.js +47 -0
  345. package/dist/components/overlays/splitModalLayout.d.ts +8 -0
  346. package/dist/components/overlays/splitModalLayout.js +5 -0
  347. package/dist/components/overlays/useExitPresence.d.ts +14 -0
  348. package/dist/components/overlays/useExitPresence.js +34 -0
  349. package/dist/components/overlays/useNativeDialog.d.ts +30 -0
  350. package/dist/components/overlays/useNativeDialog.js +56 -0
  351. package/dist/components/rootProps.d.ts +17 -0
  352. package/dist/components/rootProps.js +4 -0
  353. package/dist/hooks/breakpointOpenLogic.d.ts +7 -0
  354. package/dist/hooks/breakpointOpenLogic.js +4 -0
  355. package/dist/hooks/dateFormat.d.ts +12 -0
  356. package/dist/hooks/dateFormat.js +15 -0
  357. package/dist/hooks/downloadLogic.d.ts +31 -0
  358. package/dist/hooks/downloadLogic.js +85 -0
  359. package/dist/hooks/focusLogic.d.ts +18 -0
  360. package/dist/hooks/focusLogic.js +17 -0
  361. package/dist/hooks/growOriginLogic.d.ts +22 -0
  362. package/dist/hooks/growOriginLogic.js +10 -0
  363. package/dist/hooks/hotkeyLogic.d.ts +22 -0
  364. package/dist/hooks/hotkeyLogic.js +32 -0
  365. package/dist/hooks/index.d.ts +49 -0
  366. package/dist/hooks/kapiRoot.d.ts +16 -0
  367. package/dist/hooks/kapiRoot.js +9 -0
  368. package/dist/hooks/onlineStatusLogic.d.ts +31 -0
  369. package/dist/hooks/onlineStatusLogic.js +28 -0
  370. package/dist/hooks/persistentStateLogic.d.ts +12 -0
  371. package/dist/hooks/persistentStateLogic.js +17 -0
  372. package/dist/hooks/rafThrottle.d.ts +33 -0
  373. package/dist/hooks/rafThrottle.js +33 -0
  374. package/dist/hooks/recentLogic.d.ts +9 -0
  375. package/dist/hooks/recentLogic.js +10 -0
  376. package/dist/hooks/reducedMotion.d.ts +13 -0
  377. package/dist/hooks/reducedMotion.js +5 -0
  378. package/dist/hooks/rightClick.d.ts +37 -0
  379. package/dist/hooks/rightClick.js +30 -0
  380. package/dist/hooks/scrollCollapseLogic.d.ts +12 -0
  381. package/dist/hooks/scrollCollapseLogic.js +4 -0
  382. package/dist/hooks/scrollEdgesLogic.d.ts +49 -0
  383. package/dist/hooks/scrollEdgesLogic.js +19 -0
  384. package/dist/hooks/slidingIndicatorLogic.d.ts +25 -0
  385. package/dist/hooks/slidingIndicatorLogic.js +15 -0
  386. package/dist/hooks/storageLogic.d.ts +15 -0
  387. package/dist/hooks/storageLogic.js +24 -0
  388. package/dist/hooks/unsavedGuardLogic.d.ts +17 -0
  389. package/dist/hooks/unsavedGuardLogic.js +17 -0
  390. package/dist/hooks/useDragScroll.d.ts +12 -0
  391. package/dist/hooks/useDragScroll.js +32 -0
  392. package/dist/hooks/useGlobalRightClick.d.ts +14 -0
  393. package/dist/hooks/useGlobalRightClick.js +35 -0
  394. package/dist/hooks/useGrowOrigin.d.ts +13 -0
  395. package/dist/hooks/useGrowOrigin.js +16 -0
  396. package/dist/hooks/useHotkey.d.ts +15 -0
  397. package/dist/hooks/useHotkey.js +31 -0
  398. package/dist/hooks/useKapiTheme.d.ts +69 -0
  399. package/dist/hooks/useKapiTheme.js +88 -0
  400. package/dist/hooks/useMediaQuery.d.ts +6 -0
  401. package/dist/hooks/useMediaQuery.js +13 -0
  402. package/dist/hooks/useObjectUrl.d.ts +6 -0
  403. package/dist/hooks/useObjectUrl.js +19 -0
  404. package/dist/hooks/useOnlineStatus.d.ts +7 -0
  405. package/dist/hooks/useOnlineStatus.js +7 -0
  406. package/dist/hooks/usePersistentState.d.ts +19 -0
  407. package/dist/hooks/usePersistentState.js +37 -0
  408. package/dist/hooks/usePlacement.d.ts +36 -0
  409. package/dist/hooks/usePlacement.js +84 -0
  410. package/dist/hooks/useRecent.d.ts +17 -0
  411. package/dist/hooks/useRecent.js +16 -0
  412. package/dist/hooks/useScrollCollapse.d.ts +10 -0
  413. package/dist/hooks/useScrollCollapse.js +27 -0
  414. package/dist/hooks/useScrollEdges.d.ts +32 -0
  415. package/dist/hooks/useScrollEdges.js +91 -0
  416. package/dist/hooks/useSlidingIndicator.d.ts +23 -0
  417. package/dist/hooks/useSlidingIndicator.js +51 -0
  418. package/dist/hooks/useUnsavedGuard.d.ts +70 -0
  419. package/dist/hooks/useUnsavedGuard.js +47 -0
  420. package/dist/index.d.ts +12 -0
  421. package/dist/index.js +162 -0
  422. package/dist/kapi.css +2 -0
  423. package/dist/kapi.layered.css +4 -0
  424. package/package.json +86 -4
@@ -0,0 +1,74 @@
1
+ "use client";
2
+ import { useKapiLocale as e } from "../locale/KapiLocaleProvider.js";
3
+ import { joinClasses as t } from "../rootProps.js";
4
+ import { formatFileSize as n } from "../../hooks/downloadLogic.js";
5
+ import { formatDate as r, isoDateTime as i } from "../../hooks/dateFormat.js";
6
+ import { fileItemKind as a, fileMetaParts as o } from "./fileItemLogic.js";
7
+ /* empty css */
8
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
9
+ import { File as l, FileCode as u, FileImage as d, FileText as f } from "lucide-react";
10
+ //#region src/components/display/KapiFileItem.tsx
11
+ var p = {
12
+ pdf: f,
13
+ image: d,
14
+ text: u,
15
+ other: l
16
+ }, m = ({ name: l, mimeType: u, size: d, date: f, details: m, icon: h, status: g, actions: _, onOpen: v, ref: y, className: b, ...x }) => {
17
+ let S = e() ?? "es", C = a(u, l), w = p[C], T = f === void 0 ? null : i(f), E = T === null || f === void 0 ? null : /* @__PURE__ */ s("time", {
18
+ dateTime: T,
19
+ children: r(f, S)
20
+ }, "date"), D = o(m, d === void 0 ? "" : n(d, S), E);
21
+ return /* @__PURE__ */ c("li", {
22
+ ...x,
23
+ ref: y,
24
+ className: t("kapi-file", b),
25
+ children: [
26
+ /* @__PURE__ */ s("span", {
27
+ className: `kapi-file__icon kapi-file__icon--${C}`,
28
+ "aria-hidden": "true",
29
+ children: h ?? /* @__PURE__ */ s(w, {
30
+ size: 18,
31
+ strokeWidth: 1.9
32
+ })
33
+ }),
34
+ /* @__PURE__ */ c("span", {
35
+ className: "kapi-file__body",
36
+ children: [v ? /* @__PURE__ */ s("button", {
37
+ type: "button",
38
+ className: "kapi-file__name kapi-file__name--btn",
39
+ title: l,
40
+ onClick: v,
41
+ children: l
42
+ }) : /* @__PURE__ */ s("span", {
43
+ className: "kapi-file__name",
44
+ title: l,
45
+ children: l
46
+ }), D.length > 0 && /* @__PURE__ */ s("span", {
47
+ className: "kapi-file__meta",
48
+ children: D.map((e, t) => /* @__PURE__ */ c("span", {
49
+ className: "kapi-file__part",
50
+ children: [t > 0 && /* @__PURE__ */ s("span", {
51
+ className: "kapi-file__sep",
52
+ "aria-hidden": "true",
53
+ children: " · "
54
+ }), e]
55
+ }, t))
56
+ })]
57
+ }),
58
+ g != null && g !== !1 && /* @__PURE__ */ s("span", {
59
+ className: "kapi-file__status",
60
+ children: g
61
+ }),
62
+ _ != null && _ !== !1 && /* @__PURE__ */ s("span", {
63
+ className: "kapi-file__actions",
64
+ children: _
65
+ })
66
+ ]
67
+ });
68
+ }, h = ({ className: e, ref: n, ...r }) => /* @__PURE__ */ s("ul", {
69
+ ...r,
70
+ ref: n,
71
+ className: t("kapi-filelist", e)
72
+ });
73
+ //#endregion
74
+ export { m as KapiFileItem, h as KapiFileList };
@@ -0,0 +1,51 @@
1
+ import type { HTMLAttributes, Ref } from "react";
2
+ import "./KapiFileViewer.css";
3
+ import type { KapiLabelsOverride } from "../labelsLogic";
4
+ export type KapiFileViewerProps = Omit<HTMLAttributes<HTMLDivElement>, "children" | "title"> & {
5
+ /**
6
+ * Archivo a mostrar: una URL o un Blob (p. ej. la respuesta de una API). Solo URLs relativas,
7
+ * `http(s):`, `blob:` o `data:` de imagen/PDF. El PDF va en un `<object>` sin sandbox: si una URL
8
+ * del mismo origen devuelve HTML (un archivo subido por usuarios con un Content-Type errado), ese
9
+ * HTML corre en el origen de la app. Para contenido no confiable, pasa un Blob con su `type`.
10
+ */
11
+ src: string | Blob;
12
+ /** Nombre del archivo: se muestra en la barra y es el nombre de la descarga. Sin él, sale del `File` o de la URL. */
13
+ fileName?: string;
14
+ /** Tipo MIME. Sin él, se infiere del tipo del Blob o de la extensión del nombre/URL. */
15
+ type?: string;
16
+ /** Nombre accesible del visor (alt de la imagen, título del documento). Sin él, usa el nombre del archivo. */
17
+ title?: string;
18
+ /**
19
+ * Alto del área del documento (cualquier largo CSS). Las imágenes lo usan como alto máximo.
20
+ * @default "min(70vh, 640px)"
21
+ */
22
+ height?: string;
23
+ /**
24
+ * Ofrece descargar el archivo (en la barra y en el aviso cuando no se puede mostrar). Con una URL de
25
+ * otro origen el navegador ignora el nombre de `download` (y puede abrirla en vez de descargarla).
26
+ */
27
+ downloadable?: boolean;
28
+ /** Muestra la barra superior con el nombre y las acciones. */
29
+ toolbar?: boolean;
30
+ /** Textos fijos (clave `fileViewer`). */
31
+ labels?: KapiLabelsOverride<KapiFileViewerLabels> | undefined;
32
+ /** Ref al contenedor raíz. */
33
+ ref?: Ref<HTMLDivElement>;
34
+ };
35
+ export type KapiFileViewerLabels = {
36
+ /** Botón de descarga. */
37
+ download: string;
38
+ /** Enlace que abre la URL en otra pestaña. */
39
+ openNewTab: string;
40
+ /** Aviso cuando el navegador no puede mostrar el archivo. */
41
+ unsupported: string;
42
+ /** Nombre del visor cuando no hay `title` ni nombre de archivo. */
43
+ file: string;
44
+ };
45
+ export declare const DEFAULT_FILE_VIEWER_LABELS: KapiFileViewerLabels;
46
+ /**
47
+ * Visor de archivos: PDF (`<object>`, con aviso y descarga si el navegador no tiene visor, p. ej. en
48
+ * móviles), imágenes, texto plano y, para el resto, una tarjeta con el nombre y la descarga.
49
+ * Acepta una URL o un Blob (se crea y revoca su URL temporal).
50
+ */
51
+ export declare function KapiFileViewer({ src, fileName, type, title, height, downloadable, toolbar, labels, className, style, ref, ...rest }: KapiFileViewerProps): import("react").JSX.Element;
@@ -0,0 +1,107 @@
1
+ "use client";
2
+ import { buttonClasses as e } from "../inputs/KapiButton.js";
3
+ import { useLabels as t } from "../locale/KapiLocaleProvider.js";
4
+ import { joinClasses as n } from "../rootProps.js";
5
+ import { fileKind as r, fileNameFromUrl as i, isSafeFileUrl as a } from "../../hooks/downloadLogic.js";
6
+ import { useObjectUrl as o } from "../../hooks/useObjectUrl.js";
7
+ /* empty css */
8
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
9
+ import { Download as l, ExternalLink as u, FileText as d } from "lucide-react";
10
+ //#region src/components/display/KapiFileViewer.tsx
11
+ var f = {
12
+ download: "Descargar",
13
+ openNewTab: "Abrir en otra pestaña",
14
+ unsupported: "No se puede mostrar este archivo aquí.",
15
+ file: "Archivo"
16
+ }, p = (e, t) => t || (typeof e == "string" ? i(e) : typeof File < "u" && e instanceof File && e.name ? e.name : null), m = (e, t, n) => {
17
+ let i = t || (typeof e == "string" ? "" : e.type);
18
+ if (i) {
19
+ let e = r(i);
20
+ return e !== "other" || !n ? e : /^application\/octet-stream/i.test(i) ? r(n) : e;
21
+ }
22
+ return r(n ?? (typeof e == "string" ? e : ""));
23
+ };
24
+ function h({ src: r, fileName: i, type: h, title: g, height: _, downloadable: v = !0, toolbar: y = !0, labels: b, className: x, style: S, ref: C, ...w }) {
25
+ let T = t("fileViewer", f, b), E = o(typeof r == "string" ? null : r), D = typeof r == "string" && !a(r), O = typeof r == "string" ? D ? null : r : E, k = p(r, i), A = m(r, h, k), j = g ?? k ?? T.file, M = _ ? {
26
+ ...S,
27
+ "--kapi-file-viewer-h": _
28
+ } : S, N = (t) => v && O ? /* @__PURE__ */ c("a", {
29
+ className: e({
30
+ size: "sm",
31
+ className: t
32
+ }),
33
+ href: O,
34
+ download: k ?? "",
35
+ children: [/* @__PURE__ */ s(l, {
36
+ size: 15,
37
+ "aria-hidden": !0
38
+ }), T.download]
39
+ }) : null, P = /* @__PURE__ */ c("div", {
40
+ className: "kapi-file-viewer__fallback",
41
+ children: [
42
+ /* @__PURE__ */ s(d, {
43
+ size: 32,
44
+ strokeWidth: 1.6,
45
+ className: "kapi-file-viewer__fallback-icon",
46
+ "aria-hidden": !0
47
+ }),
48
+ k && /* @__PURE__ */ s("p", {
49
+ className: "kapi-file-viewer__fallback-name",
50
+ children: k
51
+ }),
52
+ /* @__PURE__ */ s("p", {
53
+ className: "kapi-file-viewer__fallback-text",
54
+ children: T.unsupported
55
+ }),
56
+ N()
57
+ ]
58
+ }), F = D ? P : null;
59
+ return O && (F = A === "pdf" ? /* @__PURE__ */ s("object", {
60
+ className: "kapi-file-viewer__frame",
61
+ type: "application/pdf",
62
+ data: O,
63
+ "aria-label": j,
64
+ children: P
65
+ }) : A === "image" ? /* @__PURE__ */ s("img", {
66
+ className: "kapi-file-viewer__img",
67
+ src: O,
68
+ alt: j
69
+ }) : A === "text" ? /* @__PURE__ */ s("iframe", {
70
+ className: "kapi-file-viewer__frame",
71
+ src: O,
72
+ title: j,
73
+ sandbox: ""
74
+ }) : P), /* @__PURE__ */ c("div", {
75
+ ...w,
76
+ ref: C,
77
+ className: n("kapi-file-viewer", `kapi-file-viewer--${A}`, x),
78
+ style: M,
79
+ children: [y && /* @__PURE__ */ c("div", {
80
+ className: "kapi-file-viewer__bar",
81
+ children: [/* @__PURE__ */ s("span", {
82
+ className: "kapi-file-viewer__name",
83
+ children: k ?? j
84
+ }), /* @__PURE__ */ c("span", {
85
+ className: "kapi-file-viewer__actions",
86
+ children: [typeof r == "string" && O && /* @__PURE__ */ c("a", {
87
+ className: e({
88
+ size: "sm",
89
+ variant: "ghost"
90
+ }),
91
+ href: O,
92
+ target: "_blank",
93
+ rel: "noopener noreferrer",
94
+ children: [/* @__PURE__ */ s(u, {
95
+ size: 15,
96
+ "aria-hidden": !0
97
+ }), T.openNewTab]
98
+ }), A !== "other" && N()]
99
+ })]
100
+ }), /* @__PURE__ */ s("div", {
101
+ className: "kapi-file-viewer__body",
102
+ children: F
103
+ })]
104
+ });
105
+ }
106
+ //#endregion
107
+ export { f as DEFAULT_FILE_VIEWER_LABELS, h as KapiFileViewer };
@@ -0,0 +1,16 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ import { type KapiIconTileSize, type KapiIconTileTone } from "./iconTileLogic";
3
+ import "./display.css";
4
+ export type { KapiIconTileSize, KapiIconTileTone };
5
+ export type KapiIconTileProps = Omit<HTMLAttributes<HTMLSpanElement>, "children"> & {
6
+ /** The icon (e.g. a lucide element). Decorative unless `aria-label` is given. */
7
+ icon: ReactNode;
8
+ /** Rol semántico que define el color del fondo y del ícono. */
9
+ tone?: KapiIconTileTone;
10
+ /** Softer `*-bg` fill with a tone-colored icon, instead of the solid fill. */
11
+ soft?: boolean;
12
+ /** `sm` 36 · `md` 48 · `lg` 56, or an exact px number. */
13
+ size?: KapiIconTileSize;
14
+ };
15
+ /** Rounded square holding an icon. Solid by default so it survives dark mode (tokens do the rest). */
16
+ export declare function KapiIconTile({ icon, tone, soft, size, className, style, "aria-label": ariaLabel, ...rest }: KapiIconTileProps): import("react").JSX.Element;
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ /* empty css */
3
+ import { iconTileClasses as e, iconTileRadiusPx as t, iconTileSizePx as n } from "./iconTileLogic.js";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ //#region src/components/display/KapiIconTile.tsx
6
+ function i({ icon: i, tone: a = "primary", soft: o = !1, size: s = "md", className: c, style: l, "aria-label": u, ...d }) {
7
+ let f = n(s), p = {
8
+ width: f,
9
+ height: f,
10
+ borderRadius: t(f),
11
+ "--kapi-icontile-icon": `${Math.round(f * .5)}px`,
12
+ ...l
13
+ };
14
+ return /* @__PURE__ */ r("span", {
15
+ className: e({
16
+ tone: a,
17
+ soft: o,
18
+ className: c
19
+ }),
20
+ style: p,
21
+ role: u ? "img" : void 0,
22
+ "aria-label": u,
23
+ "aria-hidden": !u || void 0,
24
+ ...d,
25
+ children: i
26
+ });
27
+ }
28
+ //#endregion
29
+ export { i as KapiIconTile };
@@ -0,0 +1,24 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ import { type KapiIconTileSize, type KapiIconTileTone } from "./KapiIconTile";
3
+ import { type KapiStatTone } from "./statLogic";
4
+ import "./display.css";
5
+ export type KapiStatProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
6
+ /** Rótulo en versalitas (ej. "Matriculados"). */
7
+ label: ReactNode;
8
+ /** Valor principal, en grande (número, monto…). */
9
+ value: ReactNode;
10
+ /** Línea secundaria bajo el valor (variación, período…). */
11
+ note?: ReactNode;
12
+ /** Color del valor/nota según el significado (success = bien, danger = alerta…). */
13
+ tone?: KapiStatTone;
14
+ /** Ícono (lucide) en un `KapiIconTile` a la izquierda del contenido. Decorativo. */
15
+ icon?: ReactNode;
16
+ /** Tono del tile. Por defecto sigue a `tone` (y `primary` si `tone` es neutral). */
17
+ iconTone?: KapiIconTileTone;
18
+ /** Tile suave (fondo `*-bg`, ícono del tono) en vez de relleno sólido. */
19
+ iconSoft?: boolean;
20
+ /** Tamaño del tile (default `sm`). */
21
+ iconSize?: KapiIconTileSize;
22
+ };
23
+ /** Tarjeta de KPI. Agrupalas en un `.kapi-statgrid` para una fila responsive. */
24
+ export declare function KapiStat({ label, value, note, tone, icon, iconTone, iconSoft, iconSize, className, ...rest }: KapiStatProps): import("react").JSX.Element;
@@ -0,0 +1,41 @@
1
+ "use client";
2
+ /* empty css */
3
+ import { KapiIconTile as e } from "./KapiIconTile.js";
4
+ import { statClasses as t, statIconTone as n } from "./statLogic.js";
5
+ import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ //#region src/components/display/KapiStat.tsx
7
+ function o({ label: o, value: s, note: c, tone: l = "neutral", icon: u, iconTone: d, iconSoft: f = !1, iconSize: p = "sm", className: m, ...h }) {
8
+ let g = u != null, _ = /* @__PURE__ */ a(r, { children: [
9
+ /* @__PURE__ */ i("div", {
10
+ className: "kapi-ct",
11
+ children: o
12
+ }),
13
+ /* @__PURE__ */ i("div", {
14
+ className: "kapi-statcard__v",
15
+ children: s
16
+ }),
17
+ c != null && /* @__PURE__ */ i("div", {
18
+ className: "kapi-muted kapi-statcard__n",
19
+ children: c
20
+ })
21
+ ] });
22
+ return /* @__PURE__ */ i("div", {
23
+ className: t({
24
+ tone: l,
25
+ hasIcon: g,
26
+ className: m
27
+ }),
28
+ ...h,
29
+ children: g ? /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(e, {
30
+ icon: u,
31
+ tone: n(l, d),
32
+ soft: f,
33
+ size: p
34
+ }), /* @__PURE__ */ i("div", {
35
+ className: "kapi-statcard__body",
36
+ children: _
37
+ })] }) : _
38
+ });
39
+ }
40
+ //#endregion
41
+ export { o as KapiStat };
@@ -0,0 +1,27 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ import { type KapiTagSize, type KapiTagTone } from "./tagLogic";
3
+ import "./display.css";
4
+ import type { KapiLabelsOverride } from "../labelsLogic";
5
+ export type KapiTagProps = Omit<HTMLAttributes<HTMLSpanElement>, "children"> & {
6
+ /** Rol semántico (color). */
7
+ tone?: KapiTagTone | undefined;
8
+ /** Tamaño: `sm` · `md`. */
9
+ size?: KapiTagSize | undefined;
10
+ /** Ícono decorativo a la izquierda del texto. */
11
+ icon?: ReactNode | undefined;
12
+ /** Si viene, se muestra un botón × que lo invoca. */
13
+ onRemove?: (() => void) | undefined;
14
+ /** Etiqueta accesible del botón ×. Gana sobre `labels.remove`. */
15
+ removeLabel?: string | undefined;
16
+ /** Textos fijos (clave `tag`). */
17
+ labels?: KapiLabelsOverride<KapiTagLabels> | undefined;
18
+ /** Texto del tag. */
19
+ children?: ReactNode | undefined;
20
+ };
21
+ export type KapiTagLabels = {
22
+ /** Nombre accesible del botón ×. */
23
+ remove: string;
24
+ };
25
+ export declare const DEFAULT_TAG_LABELS: KapiTagLabels;
26
+ /** Chip de etiqueta (filtros, categorías). A diferencia del badge, puede quitarse. */
27
+ export declare function KapiTag({ tone, size, icon, onRemove, removeLabel, labels, className, children, ...rest }: KapiTagProps): import("react").JSX.Element;
@@ -0,0 +1,44 @@
1
+ "use client";
2
+ import { useLabels as e } from "../locale/KapiLocaleProvider.js";
3
+ import { tagClasses as t } from "./tagLogic.js";
4
+ /* empty css */
5
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
6
+ import { X as i } from "lucide-react";
7
+ //#region src/components/display/KapiTag.tsx
8
+ var a = { remove: "Quitar" };
9
+ function o({ tone: o = "neutral", size: s = "md", icon: c, onRemove: l, removeLabel: u, labels: d, className: f, children: p, ...m }) {
10
+ let h = e("tag", a, d);
11
+ return /* @__PURE__ */ r("span", {
12
+ className: t({
13
+ tone: o,
14
+ size: s,
15
+ removable: !!l,
16
+ className: f
17
+ }),
18
+ ...m,
19
+ children: [
20
+ c != null && /* @__PURE__ */ n("span", {
21
+ className: "kapi-tag__icon",
22
+ "aria-hidden": !0,
23
+ children: c
24
+ }),
25
+ /* @__PURE__ */ n("span", {
26
+ className: "kapi-tag__text",
27
+ children: p
28
+ }),
29
+ l && /* @__PURE__ */ n("button", {
30
+ type: "button",
31
+ className: "kapi-tag__remove",
32
+ "aria-label": u ?? h.remove,
33
+ onClick: l,
34
+ children: /* @__PURE__ */ n(i, {
35
+ size: s === "sm" ? 11 : 13,
36
+ strokeWidth: 2.4,
37
+ "aria-hidden": !0
38
+ })
39
+ })
40
+ ]
41
+ });
42
+ }
43
+ //#endregion
44
+ export { a as DEFAULT_TAG_LABELS, o as KapiTag };
@@ -0,0 +1,15 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ import { type KapiTimelineTone } from "./timelineLogic";
3
+ import "./display.css";
4
+ export type KapiTimelineItem = {
5
+ text: ReactNode;
6
+ date?: ReactNode;
7
+ tone?: KapiTimelineTone;
8
+ };
9
+ /** Atributos nativos (`id`, `style`, `data-*`, `aria-*`…) van al `<ol>`. */
10
+ export type KapiTimelineProps = Omit<HTMLAttributes<HTMLOListElement>, "children"> & {
11
+ /** Eventos en orden de aparición; cada uno con texto, fecha y tono opcionales. */
12
+ items: KapiTimelineItem[];
13
+ };
14
+ /** Línea de tiempo vertical (historial). El último ítem no dibuja conector. */
15
+ export declare function KapiTimeline({ items, className, ...rest }: KapiTimelineProps): import("react").JSX.Element;
@@ -0,0 +1,30 @@
1
+ "use client";
2
+ /* empty css */
3
+ import { showConnector as e, timelineDotClass as t } from "./timelineLogic.js";
4
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
+ //#region src/components/display/KapiTimeline.tsx
6
+ function i({ items: i, className: a, ...o }) {
7
+ return /* @__PURE__ */ n("ol", {
8
+ ...o,
9
+ className: ["kapi-timeline", a].filter(Boolean).join(" "),
10
+ children: i.map((a, o) => /* @__PURE__ */ r("li", {
11
+ className: "kapi-timeline__item",
12
+ children: [/* @__PURE__ */ r("div", {
13
+ className: "kapi-timeline__rail",
14
+ "aria-hidden": !0,
15
+ children: [/* @__PURE__ */ n("span", { className: t(a.tone) }), e(o, i.length) && /* @__PURE__ */ n("span", { className: "kapi-tl-line" })]
16
+ }), /* @__PURE__ */ r("div", {
17
+ className: "kapi-timeline__body",
18
+ children: [/* @__PURE__ */ n("div", {
19
+ className: "kapi-strong",
20
+ children: a.text
21
+ }), a.date != null && /* @__PURE__ */ n("div", {
22
+ className: "kapi-muted",
23
+ children: a.date
24
+ })]
25
+ })]
26
+ }, o))
27
+ });
28
+ }
29
+ //#endregion
30
+ export { i as KapiTimeline };
@@ -0,0 +1,26 @@
1
+ import type { ReactNode } from "react";
2
+ export type KapiAnnotationUnderline = "dotted" | "solid" | "none";
3
+ export type KapiAnnotationTone = "primary" | "info" | "warning" | "neutral";
4
+ /** Clases del término anotado. Pura: es lo que se testea (no el markup). */
5
+ export declare const annotationClasses: ({ underline, tone, clickable, className }?: {
6
+ underline?: KapiAnnotationUnderline | undefined;
7
+ tone?: KapiAnnotationTone | undefined;
8
+ clickable?: boolean | undefined;
9
+ className?: string | undefined;
10
+ }) => string;
11
+ export type KapiAnnotationRole = {
12
+ /** Elemento HTML del término: button si es clickeable, span si no. */
13
+ element: "span" | "button";
14
+ /** tabIndex a aplicar (el button ya es focuseable; el span lo necesita para el foco por teclado). */
15
+ tabIndex: number | undefined;
16
+ /** "tooltip" = KapiTooltip simple; "popover" = burbuja local con título/cuerpo. */
17
+ mode: "tooltip" | "popover";
18
+ };
19
+ /**
20
+ * Decide elemento y modo. Popover si hay `popover` o si `info` no es texto plano
21
+ * (KapiTooltip sólo acepta string).
22
+ */
23
+ export declare const annotationRole: (onClick: (() => void) | undefined, popover: {
24
+ title?: ReactNode;
25
+ body: ReactNode;
26
+ } | undefined, info?: ReactNode) => KapiAnnotationRole;
@@ -0,0 +1,17 @@
1
+ //#region src/components/display/annotationLogic.ts
2
+ var e = ({ underline: e = "dotted", tone: t = "primary", clickable: n = !1, className: r = "" } = {}) => [
3
+ "kapi-annotation",
4
+ `kapi-annotation--${t}`,
5
+ `kapi-annotation--${e}`,
6
+ n && "kapi-annotation--clickable",
7
+ r
8
+ ].filter(Boolean).join(" "), t = (e, t, n) => {
9
+ let r = typeof e == "function";
10
+ return {
11
+ element: r ? "button" : "span",
12
+ tabIndex: r ? void 0 : 0,
13
+ mode: t || typeof n != "string" && typeof n != "number" && n !== void 0 ? "popover" : "tooltip"
14
+ };
15
+ };
16
+ //#endregion
17
+ export { e as annotationClasses, t as annotationRole };
@@ -0,0 +1,14 @@
1
+ export type AvatarGroupSplit<T> = {
2
+ visible: T[];
3
+ overflow: number;
4
+ };
5
+ /**
6
+ * Caps a list at `max` visible items; `overflow` is how many were left out.
7
+ * `max` is floored and clamped to >= 0. If exactly one item would overflow it is
8
+ * shown instead, since a "+1" tile is no smaller than the avatar it hides.
9
+ */
10
+ export declare const splitAvatarGroup: <T>(items: readonly T[], max?: number) => AvatarGroupSplit<T>;
11
+ /** Label of the trailing tile. Counts above 99 collapse to "99+". */
12
+ export declare const overflowLabel: (n: number) => string;
13
+ /** Negative overlap in px for a given avatar size (about 22%). */
14
+ export declare const avatarOverlapPx: (sizePx: number) => number;
@@ -0,0 +1,13 @@
1
+ //#region src/components/display/avatarGroupLogic.ts
2
+ var e = (e, t = 4) => {
3
+ let n = Number.isFinite(t) ? Math.max(0, Math.floor(t)) : e.length;
4
+ return e.length <= n || e.length === n + 1 && n > 0 ? {
5
+ visible: [...e],
6
+ overflow: 0
7
+ } : {
8
+ visible: e.slice(0, n),
9
+ overflow: e.length - n
10
+ };
11
+ }, t = (e) => e > 99 ? "99+" : `+${e}`, n = (e) => Math.round(e * .22);
12
+ //#endregion
13
+ export { n as avatarOverlapPx, t as overflowLabel, e as splitAvatarGroup };
@@ -0,0 +1,5 @@
1
+ /** Lógica pura del avatar (sin React): iniciales y color determinístico. */
2
+ /** Hasta 2 letras mayúsculas con la inicial de las dos primeras palabras. "" si no hay nombre. */
3
+ export declare const initialsFrom: (name: string) => string;
4
+ /** Hash determinístico (djb2) de `key` mapeado a 0..n-1. `n <= 0` devuelve 0. */
5
+ export declare const colorIndexFrom: (key: string, n: number) => number;
@@ -0,0 +1,9 @@
1
+ //#region src/components/display/avatarLogic.ts
2
+ var e = (e) => e.trim().split(/\s+/).filter(Boolean).slice(0, 2).map((e) => Array.from(e)[0] ?? "").join("").toLocaleUpperCase(), t = (e, t) => {
3
+ if (t <= 0) return 0;
4
+ let n = 5381;
5
+ for (let t = 0; t < e.length; t++) n = (n << 5) + n + e.charCodeAt(t) >>> 0;
6
+ return n % t;
7
+ };
8
+ //#endregion
9
+ export { t as colorIndexFrom, e as initialsFrom };
@@ -0,0 +1,18 @@
1
+ /** Se puede enviar si hay texto que no sea solo espacio y el compositor no está deshabilitado ni enviando. */
2
+ export declare const canSubmitComment: (text: string, { disabled, loading }?: {
3
+ disabled?: boolean | undefined;
4
+ loading?: boolean | undefined;
5
+ }) => boolean;
6
+ /** Ctrl+Enter o Cmd+Enter envían; Enter solo es salto de línea. Nunca en medio de una composición (IME). */
7
+ export declare const isSubmitShortcut: (e: {
8
+ key: string;
9
+ ctrlKey: boolean;
10
+ metaKey: boolean;
11
+ isComposing?: boolean | undefined;
12
+ }) => boolean;
13
+ /**
14
+ * Borrador que queda después de un envío que resolvió: lo enviado se quita del principio (lo escrito
15
+ * mientras el envío corría se conserva, sin repetir lo que ya se publicó); si el borrador cambió de otra
16
+ * forma, queda como está.
17
+ */
18
+ export declare const draftAfterSubmit: (draft: string, sent: string) => string;
@@ -0,0 +1,7 @@
1
+ //#region src/components/display/commentLogic.ts
2
+ var e = (e, { disabled: t = !1, loading: n = !1 } = {}) => !t && !n && e.trim().length > 0, t = (e) => e.key === "Enter" && (e.ctrlKey || e.metaKey) && !e.isComposing, n = (e, t) => {
3
+ let n = e.trimStart(), r = n.slice(t.length);
4
+ return !n.startsWith(t) || /^[\p{L}\p{N}]/u.test(r) ? e : r.trimStart();
5
+ };
6
+ //#endregion
7
+ export { e as canSubmitComment, n as draftAfterSubmit, t as isSubmitShortcut };
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from "react";
2
+ import { type KapiFileKind } from "../../hooks/downloadLogic";
3
+ /**
4
+ * Tipo de visualización de un adjunto: el del MIME si lo reconoce; si no (vacío o genérico como
5
+ * `application/octet-stream`), el de la extensión del nombre.
6
+ */
7
+ export declare const fileItemKind: (mimeType: string | null | undefined, name: string) => KapiFileKind;
8
+ /** Partes de la línea de metadatos en orden (detalles, tamaño, fecha), sin las vacías. */
9
+ export declare const fileMetaParts: (details: ReadonlyArray<ReactNode> | undefined, size: string, date: ReactNode) => ReactNode[];
@@ -0,0 +1,12 @@
1
+ import { fileKind as e } from "../../hooks/downloadLogic.js";
2
+ //#region src/components/display/fileItemLogic.ts
3
+ var t = (t, n) => {
4
+ let r = e(t);
5
+ return r === "other" ? e(n) : r;
6
+ }, n = (e, t, n) => [
7
+ ...e ?? [],
8
+ t,
9
+ n
10
+ ].filter((e) => e != null && e !== !1 && e !== "");
11
+ //#endregion
12
+ export { t as fileItemKind, n as fileMetaParts };
@@ -0,0 +1,13 @@
1
+ import type { KapiBadgeVariant } from "./KapiBadge";
2
+ export type KapiIconTileTone = KapiBadgeVariant;
3
+ export type KapiIconTileSize = "sm" | "md" | "lg" | number;
4
+ /** Tile edge in px; named sizes map to a fixed scale, numbers are clamped to >= 16. */
5
+ export declare const iconTileSizePx: (size?: KapiIconTileSize) => number;
6
+ /** Corner radius that scales with the tile (about 27%, never below 8px). */
7
+ export declare const iconTileRadiusPx: (px: number) => number;
8
+ /** Classes of an icon tile. Pure and exported. */
9
+ export declare const iconTileClasses: ({ tone, soft, className }?: {
10
+ tone?: KapiIconTileTone | undefined;
11
+ soft?: boolean | undefined;
12
+ className?: string | undefined;
13
+ }) => string;
@@ -0,0 +1,13 @@
1
+ //#region src/components/display/iconTileLogic.ts
2
+ var e = {
3
+ sm: 36,
4
+ md: 48,
5
+ lg: 56
6
+ }, t = (t = "md") => typeof t == "number" ? Math.max(16, Math.round(t)) : e[t], n = (e) => Math.max(8, Math.round(e * .27)), r = ({ tone: e = "primary", soft: t = !1, className: n = "" } = {}) => [
7
+ "kapi-icontile",
8
+ `kapi-icontile--${e}`,
9
+ t && "kapi-icontile--soft",
10
+ n
11
+ ].filter(Boolean).join(" ");
12
+ //#endregion
13
+ export { r as iconTileClasses, n as iconTileRadiusPx, t as iconTileSizePx };