@caribeng/ui 22.2.0 → 22.5.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 (285) hide show
  1. package/README.md +311 -231
  2. package/fesm2022/caribeng-ui-accordion.mjs +2 -2
  3. package/fesm2022/caribeng-ui-account-picker.mjs +533 -0
  4. package/fesm2022/caribeng-ui-aging.mjs +488 -0
  5. package/fesm2022/{caribeng-ui-caribe-alert.mjs → caribeng-ui-alert.mjs} +45 -45
  6. package/fesm2022/caribeng-ui-amount.mjs +249 -0
  7. package/fesm2022/caribeng-ui-anchor.mjs +2 -2
  8. package/fesm2022/{caribeng-ui-caribe-animation-lottie.mjs → caribeng-ui-animation-lottie.mjs} +41 -41
  9. package/fesm2022/caribeng-ui-audit-log.mjs +323 -0
  10. package/fesm2022/caribeng-ui-avatar.mjs +4 -4
  11. package/fesm2022/caribeng-ui-badge.mjs +8 -2
  12. package/fesm2022/caribeng-ui-breadcrumb.mjs +26 -9
  13. package/fesm2022/{caribeng-ui-caribe-button-group.mjs → caribeng-ui-button-group.mjs} +15 -15
  14. package/fesm2022/caribeng-ui-button.mjs +2 -2
  15. package/fesm2022/{caribeng-ui-caribe-card-content.mjs → caribeng-ui-card-content.mjs} +39 -39
  16. package/fesm2022/{caribeng-ui-caribe-card-move.mjs → caribeng-ui-card-move.mjs} +65 -65
  17. package/fesm2022/{caribeng-ui-caribe-card-primary.mjs → caribeng-ui-card-primary.mjs} +31 -31
  18. package/fesm2022/{caribeng-ui-caribe-card-select.mjs → caribeng-ui-card-select.mjs} +67 -67
  19. package/fesm2022/caribeng-ui-carousel.mjs +2 -2
  20. package/fesm2022/caribeng-ui-cascadeselect.mjs +45 -9
  21. package/fesm2022/caribeng-ui-chart.mjs +8 -5
  22. package/fesm2022/caribeng-ui-chat.mjs +1303 -0
  23. package/fesm2022/{caribeng-ui-caribe-coachmark.mjs → caribeng-ui-coachmark.mjs} +85 -85
  24. package/fesm2022/caribeng-ui-code-block.mjs +332 -0
  25. package/fesm2022/caribeng-ui-colorpicker.mjs +99 -5
  26. package/fesm2022/caribeng-ui-command-palette.mjs +476 -0
  27. package/fesm2022/caribeng-ui-comments.mjs +864 -0
  28. package/fesm2022/caribeng-ui-confirmdialog.mjs +78 -13
  29. package/fesm2022/caribeng-ui-confirmpopup.mjs +91 -16
  30. package/fesm2022/caribeng-ui-contextmenu.mjs +8 -4
  31. package/fesm2022/caribeng-ui-copy-button.mjs +230 -0
  32. package/fesm2022/caribeng-ui-datagrid.mjs +1635 -0
  33. package/fesm2022/caribeng-ui-dataview.mjs +6 -3
  34. package/fesm2022/caribeng-ui-datepicker.mjs +2 -2
  35. package/fesm2022/caribeng-ui-dock.mjs +52 -12
  36. package/fesm2022/caribeng-ui-document.mjs +495 -0
  37. package/fesm2022/{caribeng-ui-caribe-dots-indicator.mjs → caribeng-ui-dots-indicator.mjs} +41 -41
  38. package/fesm2022/caribeng-ui-drawer.mjs +9 -4
  39. package/fesm2022/caribeng-ui-dynamic-form.mjs +1581 -0
  40. package/fesm2022/caribeng-ui-editor.mjs +2324 -1311
  41. package/fesm2022/{caribeng-ui-caribe-expansion-panel.mjs → caribeng-ui-expansion-panel.mjs} +39 -39
  42. package/fesm2022/{caribeng-ui-caribe-fab-menu.mjs → caribeng-ui-fab-menu.mjs} +75 -75
  43. package/fesm2022/caribeng-ui-fieldset.mjs +2 -2
  44. package/fesm2022/caribeng-ui-file-card.mjs +134 -17
  45. package/fesm2022/{caribeng-ui-caribe-file-download.mjs → caribeng-ui-file-download.mjs} +63 -63
  46. package/fesm2022/caribeng-ui-financial-report.mjs +380 -0
  47. package/fesm2022/{caribeng-ui-caribe-float-menu.mjs → caribeng-ui-float-menu.mjs} +31 -31
  48. package/fesm2022/caribeng-ui-floatlabel.mjs +2 -2
  49. package/fesm2022/caribeng-ui-flow.mjs +1508 -0
  50. package/fesm2022/caribeng-ui-folder-card.mjs +122 -12
  51. package/fesm2022/{caribeng-ui-caribe-footer.mjs → caribeng-ui-footer.mjs} +19 -19
  52. package/fesm2022/caribeng-ui-gantt.mjs +1094 -0
  53. package/fesm2022/{caribeng-ui-caribe-header.mjs → caribeng-ui-header.mjs} +49 -49
  54. package/fesm2022/{caribeng-ui-caribe-icon-button.mjs → caribeng-ui-icon-button.mjs} +23 -23
  55. package/fesm2022/caribeng-ui-image-cropper.mjs +671 -0
  56. package/fesm2022/caribeng-ui-import-wizard.mjs +746 -0
  57. package/fesm2022/caribeng-ui-infinite-scroll.mjs +226 -0
  58. package/fesm2022/caribeng-ui-inlinemessage.mjs +2 -2
  59. package/fesm2022/caribeng-ui-input-number.mjs +22 -6
  60. package/fesm2022/{caribeng-ui-caribe-input-search.mjs → caribeng-ui-input-search.mjs} +65 -65
  61. package/fesm2022/{caribeng-ui-caribe-input-token.mjs → caribeng-ui-input-token.mjs} +59 -59
  62. package/fesm2022/caribeng-ui-inputmask.mjs +8 -2
  63. package/fesm2022/caribeng-ui-inputotp.mjs +2 -2
  64. package/fesm2022/caribeng-ui-journal-entry.mjs +340 -0
  65. package/fesm2022/caribeng-ui-kanban.mjs +4612 -0
  66. package/fesm2022/caribeng-ui-kbd.mjs +122 -0
  67. package/fesm2022/caribeng-ui-kpi.mjs +189 -0
  68. package/fesm2022/{caribeng-ui-caribe-link.mjs → caribeng-ui-link.mjs} +37 -37
  69. package/fesm2022/caribeng-ui-masonry.mjs +93 -0
  70. package/fesm2022/caribeng-ui-media-player.mjs +821 -0
  71. package/fesm2022/caribeng-ui-megamenu.mjs +13 -9
  72. package/fesm2022/caribeng-ui-mentions.mjs +495 -0
  73. package/fesm2022/caribeng-ui-menu.mjs +8 -4
  74. package/fesm2022/caribeng-ui-menubar.mjs +9 -5
  75. package/fesm2022/caribeng-ui-message.mjs +6 -3
  76. package/fesm2022/caribeng-ui-notification-center.mjs +636 -0
  77. package/fesm2022/{caribeng-ui-caribe-off-canvas.mjs → caribeng-ui-off-canvas.mjs} +55 -55
  78. package/fesm2022/{caribeng-ui-caribe-onboarding.mjs → caribeng-ui-onboarding.mjs} +105 -105
  79. package/fesm2022/caribeng-ui-orderlist.mjs +2 -2
  80. package/fesm2022/caribeng-ui-organizationchart.mjs +6 -10
  81. package/fesm2022/caribeng-ui-panel.mjs +6 -6
  82. package/fesm2022/caribeng-ui-panelmenu.mjs +9 -6
  83. package/fesm2022/caribeng-ui-pdfviewer.mjs +1755 -25
  84. package/fesm2022/caribeng-ui-period-picker.mjs +637 -0
  85. package/fesm2022/caribeng-ui-phone-input.mjs +688 -0
  86. package/fesm2022/caribeng-ui-picklist.mjs +2 -2
  87. package/fesm2022/caribeng-ui-pivot.mjs +419 -0
  88. package/fesm2022/caribeng-ui-pricing.mjs +263 -69
  89. package/fesm2022/caribeng-ui-qrcode.mjs +564 -0
  90. package/fesm2022/caribeng-ui-rating.mjs +14 -17
  91. package/fesm2022/caribeng-ui-reconciliation.mjs +386 -0
  92. package/fesm2022/caribeng-ui-ripple.mjs +2 -0
  93. package/fesm2022/caribeng-ui-scheduler.mjs +1027 -0
  94. package/fesm2022/caribeng-ui-scrolltop.mjs +3 -1
  95. package/fesm2022/caribeng-ui-select.mjs +2 -2
  96. package/fesm2022/{caribeng-ui-caribe-shortcut.mjs → caribeng-ui-shortcut.mjs} +29 -29
  97. package/fesm2022/caribeng-ui-sidebar.mjs +573 -0
  98. package/fesm2022/caribeng-ui-signature-pad.mjs +654 -0
  99. package/fesm2022/{caribeng-ui-caribe-status.mjs → caribeng-ui-status.mjs} +11 -11
  100. package/fesm2022/{caribeng-ui-caribe-step-indicator.mjs → caribeng-ui-step-indicator.mjs} +53 -53
  101. package/fesm2022/caribeng-ui-stepper.mjs +12 -5
  102. package/fesm2022/caribeng-ui-steps.mjs +2 -2
  103. package/fesm2022/caribeng-ui-table.mjs +333 -19
  104. package/fesm2022/caribeng-ui-tabmenu.mjs +10 -6
  105. package/fesm2022/caribeng-ui-tabs.mjs +2 -2
  106. package/fesm2022/{caribeng-ui-caribe-tag-button.mjs → caribeng-ui-tag-button.mjs} +25 -25
  107. package/fesm2022/caribeng-ui-tag.mjs +2 -2
  108. package/fesm2022/caribeng-ui-tieredmenu.mjs +111 -21
  109. package/fesm2022/{caribeng-ui-caribe-tracker.mjs → caribeng-ui-tracker.mjs} +29 -29
  110. package/fesm2022/{caribeng-ui-caribe-transaction-status.mjs → caribeng-ui-transaction-status.mjs} +11 -11
  111. package/fesm2022/caribeng-ui-treeselect.mjs +44 -9
  112. package/fesm2022/caribeng-ui-treetable.mjs +236 -17
  113. package/fesm2022/{caribeng-ui-caribe-voucher.mjs → caribeng-ui-voucher.mjs} +45 -45
  114. package/fesm2022/caribeng-ui-xlsx.mjs +486 -0
  115. package/fesm2022/caribeng-ui.mjs +1568 -1
  116. package/package.json +258 -178
  117. package/schematics/collection.json +5 -0
  118. package/schematics/migrate-from-primeng/core-icons.json +1 -0
  119. package/schematics/migrate-from-primeng/icons.js +269 -0
  120. package/schematics/migrate-from-primeng/index.js +290 -0
  121. package/schematics/migrate-from-primeng/mappings/button.js +93 -0
  122. package/schematics/migrate-from-primeng/mappings/card.js +33 -0
  123. package/schematics/migrate-from-primeng/mappings/checkbox.js +44 -0
  124. package/schematics/migrate-from-primeng/mappings/confirm.js +221 -0
  125. package/schematics/migrate-from-primeng/mappings/datepicker.js +121 -0
  126. package/schematics/migrate-from-primeng/mappings/dialog.js +84 -0
  127. package/schematics/migrate-from-primeng/mappings/index.js +88 -0
  128. package/schematics/migrate-from-primeng/mappings/inputnumber.js +62 -0
  129. package/schematics/migrate-from-primeng/mappings/inputtext.js +60 -0
  130. package/schematics/migrate-from-primeng/mappings/menu.js +468 -0
  131. package/schematics/migrate-from-primeng/mappings/multiselect.js +49 -0
  132. package/schematics/migrate-from-primeng/mappings/radiobutton.js +22 -0
  133. package/schematics/migrate-from-primeng/mappings/rules.js +206 -0
  134. package/schematics/migrate-from-primeng/mappings/select.js +97 -0
  135. package/schematics/migrate-from-primeng/mappings/service-calls.js +100 -0
  136. package/schematics/migrate-from-primeng/mappings/table.js +613 -0
  137. package/schematics/migrate-from-primeng/mappings/tabs.js +225 -0
  138. package/schematics/migrate-from-primeng/mappings/tag.js +29 -0
  139. package/schematics/migrate-from-primeng/mappings/textarea.js +44 -0
  140. package/schematics/migrate-from-primeng/mappings/toast.js +173 -0
  141. package/schematics/migrate-from-primeng/mappings/toggleswitch.js +37 -0
  142. package/schematics/migrate-from-primeng/mappings/tooltip.js +44 -0
  143. package/schematics/migrate-from-primeng/mappings/types.js +10 -0
  144. package/schematics/migrate-from-primeng/report.js +79 -0
  145. package/schematics/migrate-from-primeng/schema.js +2 -0
  146. package/schematics/migrate-from-primeng/schema.json +34 -0
  147. package/schematics/migrate-from-primeng/template.js +387 -0
  148. package/schematics/migrate-from-primeng/todo.js +5 -0
  149. package/schematics/migrate-from-primeng/typescript.js +442 -0
  150. package/schematics/migrate-from-primeng/workspace.js +117 -0
  151. package/schematics/ng-add/index.js +16 -1
  152. package/types/caribeng-ui-account-picker.d.ts +142 -0
  153. package/types/caribeng-ui-aging.d.ts +123 -0
  154. package/types/{caribeng-ui-caribe-alert.d.ts → caribeng-ui-alert.d.ts} +2 -2
  155. package/types/caribeng-ui-amount.d.ts +82 -0
  156. package/types/{caribeng-ui-caribe-animation-lottie.d.ts → caribeng-ui-animation-lottie.d.ts} +2 -2
  157. package/types/caribeng-ui-audit-log.d.ts +86 -0
  158. package/types/caribeng-ui-badge.d.ts +3 -1
  159. package/types/caribeng-ui-breadcrumb.d.ts +9 -1
  160. package/types/{caribeng-ui-caribe-button-group.d.ts → caribeng-ui-button-group.d.ts} +2 -2
  161. package/types/{caribeng-ui-caribe-card-content.d.ts → caribeng-ui-card-content.d.ts} +2 -2
  162. package/types/{caribeng-ui-caribe-card-move.d.ts → caribeng-ui-card-move.d.ts} +1 -1
  163. package/types/{caribeng-ui-caribe-card-primary.d.ts → caribeng-ui-card-primary.d.ts} +2 -2
  164. package/types/{caribeng-ui-caribe-card-select.d.ts → caribeng-ui-card-select.d.ts} +2 -2
  165. package/types/caribeng-ui-cascadeselect.d.ts +6 -0
  166. package/types/caribeng-ui-chart.d.ts +3 -1
  167. package/types/caribeng-ui-chat.d.ts +299 -0
  168. package/types/{caribeng-ui-caribe-coachmark.d.ts → caribeng-ui-coachmark.d.ts} +2 -2
  169. package/types/caribeng-ui-code-block.d.ts +65 -0
  170. package/types/caribeng-ui-colorpicker.d.ts +5 -1
  171. package/types/caribeng-ui-command-palette.d.ts +133 -0
  172. package/types/caribeng-ui-comments.d.ts +214 -0
  173. package/types/caribeng-ui-confirmdialog.d.ts +34 -2
  174. package/types/caribeng-ui-confirmpopup.d.ts +39 -2
  175. package/types/caribeng-ui-contextmenu.d.ts +7 -0
  176. package/types/caribeng-ui-copy-button.d.ts +90 -0
  177. package/types/caribeng-ui-datagrid.d.ts +269 -0
  178. package/types/caribeng-ui-dataview.d.ts +2 -0
  179. package/types/caribeng-ui-dock.d.ts +13 -1
  180. package/types/caribeng-ui-document.d.ts +138 -0
  181. package/types/{caribeng-ui-caribe-dots-indicator.d.ts → caribeng-ui-dots-indicator.d.ts} +2 -2
  182. package/types/caribeng-ui-drawer.d.ts +3 -1
  183. package/types/caribeng-ui-dynamic-form.d.ts +409 -0
  184. package/types/caribeng-ui-editor.d.ts +110 -12
  185. package/types/{caribeng-ui-caribe-expansion-panel.d.ts → caribeng-ui-expansion-panel.d.ts} +1 -1
  186. package/types/{caribeng-ui-caribe-fab-menu.d.ts → caribeng-ui-fab-menu.d.ts} +2 -2
  187. package/types/caribeng-ui-file-card.d.ts +27 -2
  188. package/types/{caribeng-ui-caribe-file-download.d.ts → caribeng-ui-file-download.d.ts} +1 -1
  189. package/types/caribeng-ui-financial-report.d.ts +102 -0
  190. package/types/{caribeng-ui-caribe-float-menu.d.ts → caribeng-ui-float-menu.d.ts} +2 -2
  191. package/types/caribeng-ui-flow.d.ts +228 -0
  192. package/types/caribeng-ui-folder-card.d.ts +27 -5
  193. package/types/{caribeng-ui-caribe-footer.d.ts → caribeng-ui-footer.d.ts} +2 -2
  194. package/types/caribeng-ui-gantt.d.ts +244 -0
  195. package/types/{caribeng-ui-caribe-header.d.ts → caribeng-ui-header.d.ts} +2 -2
  196. package/types/{caribeng-ui-caribe-icon-button.d.ts → caribeng-ui-icon-button.d.ts} +2 -2
  197. package/types/{caribeng-ui-caribe-illustration.d.ts → caribeng-ui-illustration.d.ts} +1 -1
  198. package/types/caribeng-ui-image-cropper.d.ts +169 -0
  199. package/types/caribeng-ui-import-wizard.d.ts +149 -0
  200. package/types/caribeng-ui-infinite-scroll.d.ts +75 -0
  201. package/types/caribeng-ui-input-number.d.ts +1 -1
  202. package/types/{caribeng-ui-caribe-input-search.d.ts → caribeng-ui-input-search.d.ts} +2 -2
  203. package/types/{caribeng-ui-caribe-input-token.d.ts → caribeng-ui-input-token.d.ts} +2 -2
  204. package/types/caribeng-ui-inputmask.d.ts +3 -1
  205. package/types/caribeng-ui-journal-entry.d.ts +110 -0
  206. package/types/caribeng-ui-kanban.d.ts +783 -0
  207. package/types/caribeng-ui-kbd.d.ts +36 -0
  208. package/types/caribeng-ui-kpi.d.ts +64 -0
  209. package/types/{caribeng-ui-caribe-link.d.ts → caribeng-ui-link.d.ts} +2 -2
  210. package/types/{caribeng-ui-caribe-logo.d.ts → caribeng-ui-logo.d.ts} +1 -1
  211. package/types/caribeng-ui-masonry.d.ts +32 -0
  212. package/types/caribeng-ui-media-player.d.ts +140 -0
  213. package/types/caribeng-ui-megamenu.d.ts +11 -0
  214. package/types/caribeng-ui-mentions.d.ts +127 -0
  215. package/types/caribeng-ui-menu.d.ts +7 -0
  216. package/types/caribeng-ui-menubar.d.ts +7 -0
  217. package/types/caribeng-ui-message.d.ts +2 -0
  218. package/types/caribeng-ui-notification-center.d.ts +153 -0
  219. package/types/{caribeng-ui-caribe-off-canvas.d.ts → caribeng-ui-off-canvas.d.ts} +2 -2
  220. package/types/{caribeng-ui-caribe-onboarding.d.ts → caribeng-ui-onboarding.d.ts} +2 -2
  221. package/types/caribeng-ui-panelmenu.d.ts +7 -0
  222. package/types/caribeng-ui-pdfviewer.d.ts +245 -5
  223. package/types/caribeng-ui-period-picker.d.ts +148 -0
  224. package/types/caribeng-ui-phone-input.d.ts +168 -0
  225. package/types/caribeng-ui-pivot.d.ts +116 -0
  226. package/types/caribeng-ui-pricing.d.ts +41 -4
  227. package/types/caribeng-ui-qrcode.d.ts +88 -0
  228. package/types/caribeng-ui-reconciliation.d.ts +109 -0
  229. package/types/caribeng-ui-scheduler.d.ts +188 -0
  230. package/types/{caribeng-ui-caribe-shortcut.d.ts → caribeng-ui-shortcut.d.ts} +2 -2
  231. package/types/caribeng-ui-sidebar.d.ts +167 -0
  232. package/types/caribeng-ui-signature-pad.d.ts +151 -0
  233. package/types/{caribeng-ui-caribe-status.d.ts → caribeng-ui-status.d.ts} +2 -2
  234. package/types/{caribeng-ui-caribe-step-indicator.d.ts → caribeng-ui-step-indicator.d.ts} +2 -2
  235. package/types/caribeng-ui-stepper.d.ts +2 -0
  236. package/types/caribeng-ui-table.d.ts +67 -3
  237. package/types/caribeng-ui-tabmenu.d.ts +7 -0
  238. package/types/{caribeng-ui-caribe-tag-button.d.ts → caribeng-ui-tag-button.d.ts} +2 -2
  239. package/types/caribeng-ui-tieredmenu.d.ts +17 -1
  240. package/types/{caribeng-ui-caribe-tracker.d.ts → caribeng-ui-tracker.d.ts} +2 -2
  241. package/types/{caribeng-ui-caribe-transaction-status.d.ts → caribeng-ui-transaction-status.d.ts} +2 -2
  242. package/types/caribeng-ui-treeselect.d.ts +6 -0
  243. package/types/caribeng-ui-treetable.d.ts +67 -2
  244. package/types/{caribeng-ui-caribe-voucher.d.ts → caribeng-ui-voucher.d.ts} +2 -2
  245. package/types/caribeng-ui-xlsx.d.ts +79 -0
  246. package/types/caribeng-ui.d.ts +985 -2
  247. package/fesm2022/caribeng-ui-caribe-calendar.mjs +0 -92
  248. package/fesm2022/caribeng-ui-caribe-circle-loading.mjs +0 -130
  249. package/fesm2022/caribeng-ui-caribe-data-table.mjs +0 -94
  250. package/fesm2022/caribeng-ui-caribe-file-select.mjs +0 -88
  251. package/fesm2022/caribeng-ui-caribe-inline-alert.mjs +0 -100
  252. package/fesm2022/caribeng-ui-caribe-input-date.mjs +0 -138
  253. package/fesm2022/caribeng-ui-caribe-input-select.mjs +0 -154
  254. package/fesm2022/caribeng-ui-caribe-loader.mjs +0 -48
  255. package/fesm2022/caribeng-ui-caribe-modal.mjs +0 -119
  256. package/fesm2022/caribeng-ui-caribe-pictogram.mjs +0 -52
  257. package/fesm2022/caribeng-ui-caribe-pop-over.mjs +0 -104
  258. package/fesm2022/caribeng-ui-caribe-preloader.mjs +0 -57
  259. package/fesm2022/caribeng-ui-caribe-progress-bar.mjs +0 -84
  260. package/fesm2022/caribeng-ui-caribe-stroke.mjs +0 -69
  261. package/fesm2022/caribeng-ui-caribe-switch.mjs +0 -182
  262. package/styles/caribeng.css +0 -380
  263. package/styles/scss/_mixins.scss +0 -46
  264. package/styles/scss/_overlay.scss +0 -15
  265. package/styles/scss/_tokens.scss +0 -267
  266. package/styles/scss/_utilities.scss +0 -73
  267. package/styles/scss/_variables.scss +0 -33
  268. package/styles/scss/index.scss +0 -16
  269. package/types/caribeng-ui-caribe-calendar.d.ts +0 -27
  270. package/types/caribeng-ui-caribe-circle-loading.d.ts +0 -28
  271. package/types/caribeng-ui-caribe-data-table.d.ts +0 -26
  272. package/types/caribeng-ui-caribe-file-select.d.ts +0 -31
  273. package/types/caribeng-ui-caribe-inline-alert.d.ts +0 -28
  274. package/types/caribeng-ui-caribe-input-date.d.ts +0 -40
  275. package/types/caribeng-ui-caribe-input-select.d.ts +0 -47
  276. package/types/caribeng-ui-caribe-loader.d.ts +0 -22
  277. package/types/caribeng-ui-caribe-modal.d.ts +0 -21
  278. package/types/caribeng-ui-caribe-pictogram.d.ts +0 -15
  279. package/types/caribeng-ui-caribe-pop-over.d.ts +0 -17
  280. package/types/caribeng-ui-caribe-preloader.d.ts +0 -24
  281. package/types/caribeng-ui-caribe-progress-bar.d.ts +0 -28
  282. package/types/caribeng-ui-caribe-stroke.d.ts +0 -17
  283. package/types/caribeng-ui-caribe-switch.d.ts +0 -55
  284. /package/fesm2022/{caribeng-ui-caribe-illustration.mjs → caribeng-ui-illustration.mjs} +0 -0
  285. /package/fesm2022/{caribeng-ui-caribe-logo.mjs → caribeng-ui-logo.mjs} +0 -0
@@ -0,0 +1,476 @@
1
+ import { DOCUMENT } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, ViewContainerRef, Injector, viewChild, input, model, booleanAttribute, output, computed, signal, effect, untracked, afterNextRender, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import { Overlay } from '@angular/cdk/overlay';
5
+ import { TemplatePortal } from '@angular/cdk/portal';
6
+ import { injectCbTranslation, cbFormat } from '@caribeng/ui';
7
+ import { CbIcon } from '@caribeng/ui/icon';
8
+ import { CbKbd } from '@caribeng/ui/kbd';
9
+
10
+ /** Minúsculas y sin tildes, carácter a carácter (conserva las posiciones). */
11
+ function cbCommandNormalize(text) {
12
+ let out = '';
13
+ for (const ch of text)
14
+ out += ch.normalize('NFD').replace(/[̀-ͯ]/g, '').toLowerCase().charAt(0) || ch;
15
+ return out;
16
+ }
17
+ function isSubsequence(needle, haystack) {
18
+ let i = 0;
19
+ for (const ch of haystack)
20
+ if (ch === needle[i] && ++i === needle.length)
21
+ return true;
22
+ return needle.length === 0;
23
+ }
24
+ /**
25
+ * Relevancia de `item` para `query` (0 = no coincide). Prioriza el label que
26
+ * empieza por la búsqueda, luego el inicio de una palabra, el texto contenido,
27
+ * los sinónimos y la descripción, y por último las letras en orden ("cfg" → "Configuración").
28
+ */
29
+ function cbCommandScore(item, query) {
30
+ const q = cbCommandNormalize(query.trim());
31
+ if (!q)
32
+ return 1;
33
+ const label = cbCommandNormalize(item.label);
34
+ if (label.startsWith(q))
35
+ return 100;
36
+ if (label.split(/[\s\-_/.]+/).some((word) => word.startsWith(q)))
37
+ return 80;
38
+ if (label.includes(q))
39
+ return 60;
40
+ const keywords = (item.keywords ?? []).map(cbCommandNormalize);
41
+ if (keywords.some((k) => k.startsWith(q)))
42
+ return 50;
43
+ if (keywords.some((k) => k.includes(q)))
44
+ return 40;
45
+ if (cbCommandNormalize(item.description ?? '').includes(q) || cbCommandNormalize(item.group ?? '').includes(q))
46
+ return 30;
47
+ if (q.length > 1 && isSubsequence(q, label.replace(/\s+/g, '')))
48
+ return 10;
49
+ return 0;
50
+ }
51
+ /**
52
+ * Filtra, ordena y agrupa los items. Sin búsqueda conserva el orden original;
53
+ * con búsqueda ordena por relevancia y los grupos siguen a su mejor resultado.
54
+ */
55
+ function cbCommandFilter(items, query, filter = true) {
56
+ const ranked = items
57
+ .map((item, index) => ({ item, index, score: filter ? cbCommandScore(item, query) : 1 }))
58
+ .filter((entry) => entry.score > 0);
59
+ if (filter && query.trim())
60
+ ranked.sort((a, b) => b.score - a.score || a.index - b.index);
61
+ const groups = new Map();
62
+ for (const { item } of ranked) {
63
+ const key = item.group ?? '';
64
+ if (!groups.has(key))
65
+ groups.set(key, []);
66
+ groups.get(key).push(item);
67
+ }
68
+ return [...groups].map(([label, groupItems]) => ({ label, items: groupItems }));
69
+ }
70
+ /** Partes del label para resaltar la coincidencia contigua con la búsqueda. */
71
+ function cbCommandHighlight(label, query) {
72
+ const q = cbCommandNormalize(query.trim());
73
+ const start = q ? cbCommandNormalize(label).indexOf(q) : -1;
74
+ if (start < 0)
75
+ return [{ text: label, match: false }];
76
+ const chars = [...label];
77
+ const parts = [
78
+ { text: chars.slice(0, start).join(''), match: false },
79
+ { text: chars.slice(start, start + [...q].length).join(''), match: true },
80
+ { text: chars.slice(start + [...q].length).join(''), match: false },
81
+ ];
82
+ return parts.filter((p) => p.text);
83
+ }
84
+
85
+ let nextUid = 0;
86
+ /** Combinación de teclas en texto (`mod+k`, `ctrl+shift+p`, `/`). `mod` acepta ⌘ y Ctrl. */
87
+ function matchesShortcut(event, shortcut) {
88
+ const parts = shortcut.toLowerCase().split('+').map((p) => p.trim()).filter(Boolean);
89
+ const key = parts.pop();
90
+ if (!key || event.key.toLowerCase() !== key)
91
+ return false;
92
+ const wants = new Set(parts);
93
+ if (wants.has('mod')) {
94
+ if (!event.metaKey && !event.ctrlKey)
95
+ return false;
96
+ }
97
+ else if (event.ctrlKey !== wants.has('ctrl') || event.metaKey !== wants.has('meta')) {
98
+ return false;
99
+ }
100
+ return event.shiftKey === wants.has('shift') && event.altKey === wants.has('alt');
101
+ }
102
+ /** Si el foco está en un campo de texto (para no robar atajos sin modificador como `/`). */
103
+ function isTyping(target) {
104
+ const el = target;
105
+ return !!el && (el.isContentEditable || /^(input|textarea|select)$/i.test(el.tagName));
106
+ }
107
+ /**
108
+ * Paleta de comandos de CaribeNG (Ctrl/⌘ + K): buscador global de páginas y
109
+ * acciones con teclado. Filtra sin tildes ni mayúsculas, agrupa, resalta la
110
+ * coincidencia y muestra atajos con `cb-kbd`.
111
+ *
112
+ * Accesibilidad: diálogo modal con un combobox (`aria-activedescendant`) que
113
+ * controla una lista de opciones; el foco no sale del campo y vuelve al
114
+ * elemento anterior al cerrar.
115
+ *
116
+ * @example
117
+ * ```html
118
+ * <cb-command-palette [items]="comandos" (itemSelect)="ir($event.item)" />
119
+ * ```
120
+ */
121
+ class CbCommandPalette {
122
+ constructor() {
123
+ /** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
124
+ this.t = injectCbTranslation();
125
+ this.overlay = inject(Overlay);
126
+ this.vcr = inject(ViewContainerRef);
127
+ this.document = inject(DOCUMENT);
128
+ this.injector = inject(Injector);
129
+ this.tpl = viewChild.required('tpl');
130
+ this.inputEl = viewChild('input', /* @ts-ignore */
131
+ ...(ngDevMode ? [{ debugName: "inputEl" }] : /* istanbul ignore next */ []));
132
+ this.overlayRef = null;
133
+ this.previouslyFocused = null;
134
+ this.listId = `cb-command-${++nextUid}`;
135
+ /** Páginas y acciones. */
136
+ this.items = input([], /* @ts-ignore */
137
+ ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
138
+ /** Abierta o cerrada. */
139
+ this.visible = model(false, /* @ts-ignore */
140
+ ...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
141
+ /** Texto buscado (bidireccional, para búsquedas en servidor). */
142
+ this.query = model('', /* @ts-ignore */
143
+ ...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
144
+ /** Atajo global que abre o cierra la paleta. `''` lo desactiva. */
145
+ this.shortcut = input('mod+k', /* @ts-ignore */
146
+ ...(ngDevMode ? [{ debugName: "shortcut" }] : /* istanbul ignore next */ []));
147
+ this.placeholder = input(undefined, /* @ts-ignore */
148
+ ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
149
+ /** Mensaje sin resultados. Por defecto, "Sin resultados". */
150
+ this.emptyMessage = input(undefined, /* @ts-ignore */
151
+ ...(ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []));
152
+ /** Nombre del diálogo. Por defecto, "Paleta de comandos". */
153
+ this.ariaLabel = input(undefined, /* @ts-ignore */
154
+ ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
155
+ /** Filtra `items` con la búsqueda. Desactívalo si los resultados llegan ya filtrados (servidor). */
156
+ this.filter = input(true, { ...(ngDevMode ? { debugName: "filter" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
157
+ /** Muestra "Cargando" mientras no hay resultados. */
158
+ this.loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
159
+ /** Cierra la paleta al elegir un item. */
160
+ this.closeOnSelect = input(true, { ...(ngDevMode ? { debugName: "closeOnSelect" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
161
+ /** Item elegido (con clic o Enter). */
162
+ this.itemSelect = output();
163
+ this.label = computed(() => this.ariaLabel() ?? this.t().commandPalette, /* @ts-ignore */
164
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
165
+ this.groups = computed(() => cbCommandFilter(this.items(), this.query(), this.filter()), /* @ts-ignore */
166
+ ...(ngDevMode ? [{ debugName: "groups" }] : /* istanbul ignore next */ []));
167
+ /** Resultados en el orden en que se muestran (para el teclado). */
168
+ this.flat = computed(() => this.groups().flatMap((g) => g.items), /* @ts-ignore */
169
+ ...(ngDevMode ? [{ debugName: "flat" }] : /* istanbul ignore next */ []));
170
+ this.enabled = computed(() => this.flat().filter((item) => !item.disabled), /* @ts-ignore */
171
+ ...(ngDevMode ? [{ debugName: "enabled" }] : /* istanbul ignore next */ []));
172
+ this.activeItem = signal(null, /* @ts-ignore */
173
+ ...(ngDevMode ? [{ debugName: "activeItem" }] : /* istanbul ignore next */ []));
174
+ this.activeOptionId = computed(() => {
175
+ const item = this.activeItem();
176
+ return item ? this.optionId(item) : null;
177
+ }, /* @ts-ignore */
178
+ ...(ngDevMode ? [{ debugName: "activeOptionId" }] : /* istanbul ignore next */ []));
179
+ this.announcement = computed(() => this.query().trim() && !this.loading() ? cbFormat(this.t().commandResults, String(this.flat().length)) : '', /* @ts-ignore */
180
+ ...(ngDevMode ? [{ debugName: "announcement" }] : /* istanbul ignore next */ []));
181
+ effect(() => {
182
+ const open = this.visible();
183
+ untracked(() => {
184
+ if (open && !this.overlayRef)
185
+ this.attach();
186
+ else if (!open && this.overlayRef)
187
+ this.detach();
188
+ });
189
+ });
190
+ // Al cambiar los resultados, el activo pasa al primero disponible.
191
+ effect(() => {
192
+ const enabled = this.enabled();
193
+ untracked(() => {
194
+ const current = this.activeItem();
195
+ if (!current || !enabled.includes(current))
196
+ this.activeItem.set(enabled[0] ?? null);
197
+ });
198
+ });
199
+ }
200
+ open() {
201
+ this.visible.set(true);
202
+ }
203
+ close() {
204
+ this.visible.set(false);
205
+ }
206
+ toggle() {
207
+ this.visible.update((v) => !v);
208
+ }
209
+ optionId(item) {
210
+ return `${this.listId}-o${this.flat().indexOf(item)}`;
211
+ }
212
+ highlight(item) {
213
+ return this.filter() ? cbCommandHighlight(item.label, this.query()) : [{ text: item.label, match: false }];
214
+ }
215
+ onDocumentKeydown(event) {
216
+ const shortcut = this.shortcut();
217
+ if (!shortcut || !matchesShortcut(event, shortcut))
218
+ return;
219
+ // Un atajo sin modificador (p. ej. "/") no se roba mientras se escribe en otro campo.
220
+ const hasModifier = /(^|\+)(mod|ctrl|meta|alt)\+/i.test(shortcut);
221
+ if (!hasModifier && !this.visible() && isTyping(event.target))
222
+ return;
223
+ event.preventDefault();
224
+ this.toggle();
225
+ }
226
+ onInput(event) {
227
+ this.query.set(event.target.value);
228
+ }
229
+ hover(item) {
230
+ if (!item.disabled && this.activeItem() !== item)
231
+ this.activeItem.set(item);
232
+ }
233
+ onKeydown(event) {
234
+ const enabled = this.enabled();
235
+ const index = enabled.indexOf(this.activeItem());
236
+ switch (event.key) {
237
+ case 'ArrowDown':
238
+ case 'ArrowUp': {
239
+ event.preventDefault();
240
+ if (!enabled.length)
241
+ return;
242
+ const step = event.key === 'ArrowDown' ? 1 : -1;
243
+ this.setActive(enabled[(index + step + enabled.length) % enabled.length]);
244
+ break;
245
+ }
246
+ case 'Home':
247
+ case 'End':
248
+ if (!event.ctrlKey && !event.metaKey)
249
+ return;
250
+ event.preventDefault();
251
+ this.setActive(event.key === 'Home' ? enabled[0] : enabled[enabled.length - 1]);
252
+ break;
253
+ case 'Enter': {
254
+ event.preventDefault();
255
+ const item = this.activeItem();
256
+ if (item)
257
+ this.select(item, event);
258
+ break;
259
+ }
260
+ case 'Tab':
261
+ // El foco se queda en el campo: la lista se recorre con las flechas.
262
+ event.preventDefault();
263
+ break;
264
+ }
265
+ }
266
+ /** Elige un item: ejecuta su `command`, emite `itemSelect` y cierra (según `closeOnSelect`). */
267
+ select(item, originalEvent) {
268
+ if (item.disabled)
269
+ return;
270
+ const event = { item, query: this.query(), originalEvent };
271
+ if (this.closeOnSelect())
272
+ this.close();
273
+ item.command?.(event);
274
+ this.itemSelect.emit(event);
275
+ }
276
+ setActive(item) {
277
+ if (!item)
278
+ return;
279
+ this.activeItem.set(item);
280
+ afterNextRender(() => {
281
+ this.document.getElementById(this.optionId(item))?.scrollIntoView?.({ block: 'nearest' });
282
+ }, { injector: this.injector });
283
+ }
284
+ attach() {
285
+ this.previouslyFocused = this.document.activeElement;
286
+ this.query.set('');
287
+ this.overlayRef = this.overlay.create({
288
+ hasBackdrop: true,
289
+ backdropClass: 'cb-dialog-backdrop',
290
+ panelClass: 'cb-command-pane',
291
+ scrollStrategy: this.overlay.scrollStrategies.block(),
292
+ positionStrategy: this.overlay.position().global().centerHorizontally().top('12vh'),
293
+ });
294
+ this.overlayRef.attach(new TemplatePortal(this.tpl(), this.vcr));
295
+ this.overlayRef.backdropClick().subscribe(() => this.close());
296
+ this.overlayRef.keydownEvents().subscribe((event) => {
297
+ if (event.key === 'Escape') {
298
+ event.preventDefault();
299
+ this.close();
300
+ }
301
+ });
302
+ this.activeItem.set(this.enabled()[0] ?? null);
303
+ afterNextRender(() => this.inputEl()?.nativeElement.focus(), { injector: this.injector });
304
+ }
305
+ detach() {
306
+ this.overlayRef?.dispose();
307
+ this.overlayRef = null;
308
+ const target = this.previouslyFocused;
309
+ this.previouslyFocused = null;
310
+ if (target?.isConnected)
311
+ target.focus();
312
+ }
313
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbCommandPalette, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
314
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbCommandPalette, isStandalone: true, selector: "cb-command-palette", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null }, shortcut: { classPropertyName: "shortcut", publicName: "shortcut", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", query: "queryChange", itemSelect: "itemSelect" }, host: { listeners: { "document:keydown": "onDocumentKeydown($event)" }, classAttribute: "cb-command-palette" }, viewQueries: [{ propertyName: "tpl", first: true, predicate: ["tpl"], descendants: true, isSignal: true }, { propertyName: "inputEl", first: true, predicate: ["input"], descendants: true, isSignal: true }], ngImport: i0, template: `
315
+ <ng-template #tpl>
316
+ <div class="cb-command" role="dialog" aria-modal="true" [attr.aria-label]="label()">
317
+ <div class="cb-command__search">
318
+ <cb-icon name="search" [size]="18" class="cb-command__search-icon" aria-hidden="true" />
319
+ <input
320
+ #input
321
+ class="cb-command__input"
322
+ type="text"
323
+ role="combobox"
324
+ aria-autocomplete="list"
325
+ aria-expanded="true"
326
+ autocomplete="off"
327
+ spellcheck="false"
328
+ [attr.aria-controls]="listId"
329
+ [attr.aria-activedescendant]="activeOptionId()"
330
+ [attr.aria-label]="label()"
331
+ [placeholder]="placeholder() ?? t().commandPlaceholder"
332
+ [value]="query()"
333
+ (input)="onInput($event)"
334
+ (keydown)="onKeydown($event)"
335
+ />
336
+ </div>
337
+
338
+ <div class="cb-command__list" role="listbox" [id]="listId" [attr.aria-label]="label()">
339
+ @for (group of groups(); track group.label; let g = $index) {
340
+ <div role="group" [attr.aria-labelledby]="group.label ? listId + '-g' + g : null">
341
+ @if (group.label) {
342
+ <div class="cb-command__group" [id]="listId + '-g' + g" aria-hidden="true">{{ group.label }}</div>
343
+ }
344
+ @for (item of group.items; track item.id ?? item.label) {
345
+ <div
346
+ class="cb-command__option"
347
+ role="option"
348
+ [id]="optionId(item)"
349
+ [class.cb-command__option--active]="item === activeItem()"
350
+ [attr.aria-selected]="item === activeItem()"
351
+ [attr.aria-disabled]="item.disabled ? 'true' : null"
352
+ (mousemove)="hover(item)"
353
+ (mousedown)="$event.preventDefault()"
354
+ (click)="select(item, $event)"
355
+ >
356
+ @if (item.icon) {
357
+ <cb-icon class="cb-command__icon" [name]="item.icon" [size]="18" aria-hidden="true" />
358
+ }
359
+ <span class="cb-command__text">
360
+ <!-- En una línea: los saltos de línea añadirían espacios dentro de la palabra resaltada. -->
361
+ <span class="cb-command__label">@for (part of highlight(item); track $index) {@if (part.match) {<mark class="cb-command__match">{{ part.text }}</mark>} @else {<span>{{ part.text }}</span>}}</span>
362
+ @if (item.description) {
363
+ <span class="cb-command__description">{{ item.description }}</span>
364
+ }
365
+ </span>
366
+ @if (item.shortcut?.length) {
367
+ <cb-kbd class="cb-command__shortcut" [keys]="item.shortcut!" size="sm" aria-hidden="true" />
368
+ }
369
+ </div>
370
+ }
371
+ </div>
372
+ }
373
+ @if (!flat().length) {
374
+ <div class="cb-command__empty">{{ loading() ? t().loading : (emptyMessage() ?? t().noResults) }}</div>
375
+ }
376
+ </div>
377
+
378
+ <div class="cb-command__footer" aria-hidden="true">
379
+ <span><cb-kbd [keys]="['up', 'down']" size="sm" /> {{ t().commandNavigate }}</span>
380
+ <span><cb-kbd [keys]="['enter']" size="sm" /> {{ t().commandSelect }}</span>
381
+ <span><cb-kbd size="sm">Esc</cb-kbd> {{ t().close }}</span>
382
+ </div>
383
+ <div class="cb-command__status" role="status">{{ announcement() }}</div>
384
+ </div>
385
+ </ng-template>
386
+ `, isInline: true, styles: [":host{display:contents}.cb-command{display:flex;flex-direction:column;width:min(40rem,calc(100vw - 2rem));max-height:min(32rem,76vh);overflow:hidden;border:1px solid var(--cb-color-border);border-radius:var(--cb-radius-lg, 12px);background:var(--cb-color-surface-raised);box-shadow:var(--cb-shadow-lg);color:var(--cb-color-text);font-family:var(--cb-font-sans)}.cb-command__search{display:flex;align-items:center;gap:.625rem;padding:0 1rem;border-bottom:1px solid var(--cb-color-border)}.cb-command__search-icon{flex:none;color:var(--cb-color-text-muted)}.cb-command__input{flex:1;min-width:0;height:3.25rem;padding:0;border:0;outline:none;background:transparent;color:inherit;font:inherit;font-size:var(--cb-text-base, 1rem)}.cb-command__input::placeholder{color:var(--cb-color-text-muted)}.cb-command__list{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:.375rem}.cb-command__group{padding:.625rem .625rem .25rem;color:var(--cb-color-text-muted);font-size:var(--cb-text-xs, .75rem);font-weight:var(--cb-font-weight-semibold, 600)}.cb-command__option{display:flex;align-items:center;gap:.75rem;min-height:2.5rem;padding:.375rem .625rem;border-radius:var(--cb-radius-md, 8px);cursor:pointer;-webkit-user-select:none;user-select:none}.cb-command__option--active{background:var(--cb-color-surface-hover);color:var(--cb-color-text-strong);outline:2px solid transparent;box-shadow:inset 3px 0 0 var(--cb-color-primary)}.cb-command__option[aria-disabled=true]{cursor:not-allowed;opacity:.5}.cb-command__icon{flex:none;color:var(--cb-color-text-muted)}.cb-command__text{display:flex;flex:1;flex-direction:column;min-width:0}.cb-command__label,.cb-command__description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cb-command__description{color:var(--cb-color-text-muted);font-size:var(--cb-text-xs, .75rem)}.cb-command__match{background:transparent;color:var(--cb-color-primary-text);font-weight:var(--cb-font-weight-semibold, 600)}.cb-command__shortcut{flex:none}.cb-command__empty{padding:2rem 1rem;color:var(--cb-color-text-muted);text-align:center}.cb-command__footer{display:flex;flex-wrap:wrap;gap:1rem;padding:.5rem 1rem;border-top:1px solid var(--cb-color-border);color:var(--cb-color-text-muted);font-size:var(--cb-text-xs, .75rem)}.cb-command__footer span{display:inline-flex;align-items:center;gap:.375rem}.cb-command__status{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}@media(max-width:480px){.cb-command__footer{display:none}}\n"], dependencies: [{ kind: "component", type: CbIcon, selector: "cb-icon", inputs: ["name", "size", "spin", "ariaLabel"] }, { kind: "component", type: CbKbd, selector: "cb-kbd", inputs: ["keys", "platform", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
387
+ }
388
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbCommandPalette, decorators: [{
389
+ type: Component,
390
+ args: [{ selector: 'cb-command-palette', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, imports: [CbIcon, CbKbd], host: {
391
+ class: 'cb-command-palette',
392
+ '(document:keydown)': 'onDocumentKeydown($event)',
393
+ }, template: `
394
+ <ng-template #tpl>
395
+ <div class="cb-command" role="dialog" aria-modal="true" [attr.aria-label]="label()">
396
+ <div class="cb-command__search">
397
+ <cb-icon name="search" [size]="18" class="cb-command__search-icon" aria-hidden="true" />
398
+ <input
399
+ #input
400
+ class="cb-command__input"
401
+ type="text"
402
+ role="combobox"
403
+ aria-autocomplete="list"
404
+ aria-expanded="true"
405
+ autocomplete="off"
406
+ spellcheck="false"
407
+ [attr.aria-controls]="listId"
408
+ [attr.aria-activedescendant]="activeOptionId()"
409
+ [attr.aria-label]="label()"
410
+ [placeholder]="placeholder() ?? t().commandPlaceholder"
411
+ [value]="query()"
412
+ (input)="onInput($event)"
413
+ (keydown)="onKeydown($event)"
414
+ />
415
+ </div>
416
+
417
+ <div class="cb-command__list" role="listbox" [id]="listId" [attr.aria-label]="label()">
418
+ @for (group of groups(); track group.label; let g = $index) {
419
+ <div role="group" [attr.aria-labelledby]="group.label ? listId + '-g' + g : null">
420
+ @if (group.label) {
421
+ <div class="cb-command__group" [id]="listId + '-g' + g" aria-hidden="true">{{ group.label }}</div>
422
+ }
423
+ @for (item of group.items; track item.id ?? item.label) {
424
+ <div
425
+ class="cb-command__option"
426
+ role="option"
427
+ [id]="optionId(item)"
428
+ [class.cb-command__option--active]="item === activeItem()"
429
+ [attr.aria-selected]="item === activeItem()"
430
+ [attr.aria-disabled]="item.disabled ? 'true' : null"
431
+ (mousemove)="hover(item)"
432
+ (mousedown)="$event.preventDefault()"
433
+ (click)="select(item, $event)"
434
+ >
435
+ @if (item.icon) {
436
+ <cb-icon class="cb-command__icon" [name]="item.icon" [size]="18" aria-hidden="true" />
437
+ }
438
+ <span class="cb-command__text">
439
+ <!-- En una línea: los saltos de línea añadirían espacios dentro de la palabra resaltada. -->
440
+ <span class="cb-command__label">@for (part of highlight(item); track $index) {@if (part.match) {<mark class="cb-command__match">{{ part.text }}</mark>} @else {<span>{{ part.text }}</span>}}</span>
441
+ @if (item.description) {
442
+ <span class="cb-command__description">{{ item.description }}</span>
443
+ }
444
+ </span>
445
+ @if (item.shortcut?.length) {
446
+ <cb-kbd class="cb-command__shortcut" [keys]="item.shortcut!" size="sm" aria-hidden="true" />
447
+ }
448
+ </div>
449
+ }
450
+ </div>
451
+ }
452
+ @if (!flat().length) {
453
+ <div class="cb-command__empty">{{ loading() ? t().loading : (emptyMessage() ?? t().noResults) }}</div>
454
+ }
455
+ </div>
456
+
457
+ <div class="cb-command__footer" aria-hidden="true">
458
+ <span><cb-kbd [keys]="['up', 'down']" size="sm" /> {{ t().commandNavigate }}</span>
459
+ <span><cb-kbd [keys]="['enter']" size="sm" /> {{ t().commandSelect }}</span>
460
+ <span><cb-kbd size="sm">Esc</cb-kbd> {{ t().close }}</span>
461
+ </div>
462
+ <div class="cb-command__status" role="status">{{ announcement() }}</div>
463
+ </div>
464
+ </ng-template>
465
+ `, styles: [":host{display:contents}.cb-command{display:flex;flex-direction:column;width:min(40rem,calc(100vw - 2rem));max-height:min(32rem,76vh);overflow:hidden;border:1px solid var(--cb-color-border);border-radius:var(--cb-radius-lg, 12px);background:var(--cb-color-surface-raised);box-shadow:var(--cb-shadow-lg);color:var(--cb-color-text);font-family:var(--cb-font-sans)}.cb-command__search{display:flex;align-items:center;gap:.625rem;padding:0 1rem;border-bottom:1px solid var(--cb-color-border)}.cb-command__search-icon{flex:none;color:var(--cb-color-text-muted)}.cb-command__input{flex:1;min-width:0;height:3.25rem;padding:0;border:0;outline:none;background:transparent;color:inherit;font:inherit;font-size:var(--cb-text-base, 1rem)}.cb-command__input::placeholder{color:var(--cb-color-text-muted)}.cb-command__list{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:.375rem}.cb-command__group{padding:.625rem .625rem .25rem;color:var(--cb-color-text-muted);font-size:var(--cb-text-xs, .75rem);font-weight:var(--cb-font-weight-semibold, 600)}.cb-command__option{display:flex;align-items:center;gap:.75rem;min-height:2.5rem;padding:.375rem .625rem;border-radius:var(--cb-radius-md, 8px);cursor:pointer;-webkit-user-select:none;user-select:none}.cb-command__option--active{background:var(--cb-color-surface-hover);color:var(--cb-color-text-strong);outline:2px solid transparent;box-shadow:inset 3px 0 0 var(--cb-color-primary)}.cb-command__option[aria-disabled=true]{cursor:not-allowed;opacity:.5}.cb-command__icon{flex:none;color:var(--cb-color-text-muted)}.cb-command__text{display:flex;flex:1;flex-direction:column;min-width:0}.cb-command__label,.cb-command__description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cb-command__description{color:var(--cb-color-text-muted);font-size:var(--cb-text-xs, .75rem)}.cb-command__match{background:transparent;color:var(--cb-color-primary-text);font-weight:var(--cb-font-weight-semibold, 600)}.cb-command__shortcut{flex:none}.cb-command__empty{padding:2rem 1rem;color:var(--cb-color-text-muted);text-align:center}.cb-command__footer{display:flex;flex-wrap:wrap;gap:1rem;padding:.5rem 1rem;border-top:1px solid var(--cb-color-border);color:var(--cb-color-text-muted);font-size:var(--cb-text-xs, .75rem)}.cb-command__footer span{display:inline-flex;align-items:center;gap:.375rem}.cb-command__status{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}@media(max-width:480px){.cb-command__footer{display:none}}\n"] }]
466
+ }], ctorParameters: () => [], propDecorators: { tpl: [{ type: i0.ViewChild, args: ['tpl', { isSignal: true }] }], inputEl: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], query: [{ type: i0.Input, args: [{ isSignal: true, alias: "query", required: false }] }, { type: i0.Output, args: ["queryChange"] }], shortcut: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcut", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], closeOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnSelect", required: false }] }], itemSelect: [{ type: i0.Output, args: ["itemSelect"] }] } });
467
+
468
+ /*
469
+ * Public API Surface de @caribeng/ui/command-palette
470
+ */
471
+
472
+ /**
473
+ * Generated bundle index. Do not edit.
474
+ */
475
+
476
+ export { CbCommandPalette, cbCommandFilter, cbCommandHighlight, cbCommandNormalize, cbCommandScore };