@caribeng/ui 22.1.1 → 22.4.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 (305) hide show
  1. package/README.md +134 -12
  2. package/fesm2022/caribeng-ui-accordion.mjs +4 -4
  3. package/fesm2022/caribeng-ui-anchor.mjs +169 -0
  4. package/fesm2022/caribeng-ui-autocomplete.mjs +10 -8
  5. package/fesm2022/caribeng-ui-avatar.mjs +2 -2
  6. package/fesm2022/caribeng-ui-avatargroup.mjs +9 -3
  7. package/fesm2022/caribeng-ui-badge.mjs +8 -2
  8. package/fesm2022/caribeng-ui-blockui.mjs +12 -4
  9. package/fesm2022/caribeng-ui-breadcrumb.mjs +17 -7
  10. package/fesm2022/caribeng-ui-button.mjs +22 -2
  11. package/fesm2022/caribeng-ui-caribe-alert.mjs +5 -2
  12. package/fesm2022/caribeng-ui-caribe-animation-lottie.mjs +6 -3
  13. package/fesm2022/caribeng-ui-caribe-button-group.mjs +6 -3
  14. package/fesm2022/caribeng-ui-caribe-calendar.mjs +11 -6
  15. package/fesm2022/caribeng-ui-caribe-card-content.mjs +6 -3
  16. package/fesm2022/caribeng-ui-caribe-card-move.mjs +29 -7
  17. package/fesm2022/caribeng-ui-caribe-card-select.mjs +56 -14
  18. package/fesm2022/caribeng-ui-caribe-circle-loading.mjs +10 -7
  19. package/fesm2022/caribeng-ui-caribe-coachmark.mjs +42 -19
  20. package/fesm2022/caribeng-ui-caribe-data-table.mjs +15 -9
  21. package/fesm2022/caribeng-ui-caribe-dots-indicator.mjs +38 -5
  22. package/fesm2022/caribeng-ui-caribe-expansion-panel.mjs +16 -5
  23. package/fesm2022/caribeng-ui-caribe-fab-menu.mjs +56 -7
  24. package/fesm2022/caribeng-ui-caribe-file-download.mjs +68 -27
  25. package/fesm2022/caribeng-ui-caribe-file-select.mjs +22 -17
  26. package/fesm2022/caribeng-ui-caribe-float-menu.mjs +6 -3
  27. package/fesm2022/caribeng-ui-caribe-footer.mjs +8 -4
  28. package/fesm2022/caribeng-ui-caribe-header.mjs +6 -3
  29. package/fesm2022/caribeng-ui-caribe-icon-button.mjs +6 -3
  30. package/fesm2022/caribeng-ui-caribe-illustration.mjs +6 -3
  31. package/fesm2022/caribeng-ui-caribe-inline-alert.mjs +5 -2
  32. package/fesm2022/caribeng-ui-caribe-input-search.mjs +14 -10
  33. package/fesm2022/caribeng-ui-caribe-input-select.mjs +12 -10
  34. package/fesm2022/caribeng-ui-caribe-input-token.mjs +61 -11
  35. package/fesm2022/caribeng-ui-caribe-link.mjs +7 -2
  36. package/fesm2022/caribeng-ui-caribe-loader.mjs +8 -5
  37. package/fesm2022/caribeng-ui-caribe-modal.mjs +32 -16
  38. package/fesm2022/caribeng-ui-caribe-off-canvas.mjs +26 -12
  39. package/fesm2022/caribeng-ui-caribe-onboarding.mjs +44 -19
  40. package/fesm2022/caribeng-ui-caribe-pictogram.mjs +6 -3
  41. package/fesm2022/caribeng-ui-caribe-pop-over.mjs +34 -10
  42. package/fesm2022/caribeng-ui-caribe-preloader.mjs +9 -6
  43. package/fesm2022/caribeng-ui-caribe-progress-bar.mjs +5 -2
  44. package/fesm2022/caribeng-ui-caribe-shortcut.mjs +8 -3
  45. package/fesm2022/caribeng-ui-caribe-step-indicator.mjs +12 -5
  46. package/fesm2022/caribeng-ui-caribe-stroke.mjs +6 -3
  47. package/fesm2022/caribeng-ui-caribe-switch.mjs +5 -3
  48. package/fesm2022/caribeng-ui-caribe-tag-button.mjs +1 -1
  49. package/fesm2022/caribeng-ui-caribe-tracker.mjs +5 -2
  50. package/fesm2022/caribeng-ui-caribe-transaction-status.mjs +1 -1
  51. package/fesm2022/caribeng-ui-caribe-voucher.mjs +11 -8
  52. package/fesm2022/caribeng-ui-carousel.mjs +49 -14
  53. package/fesm2022/caribeng-ui-cascadeselect.mjs +22 -8
  54. package/fesm2022/caribeng-ui-chart.mjs +2601 -303
  55. package/fesm2022/caribeng-ui-chat.mjs +1303 -0
  56. package/fesm2022/caribeng-ui-chip.mjs +9 -4
  57. package/fesm2022/caribeng-ui-chips.mjs +9 -5
  58. package/fesm2022/caribeng-ui-code-block.mjs +332 -0
  59. package/fesm2022/caribeng-ui-colorpicker.mjs +107 -11
  60. package/fesm2022/caribeng-ui-command-palette.mjs +476 -0
  61. package/fesm2022/caribeng-ui-confirmdialog.mjs +140 -10
  62. package/fesm2022/caribeng-ui-confirmpopup.mjs +209 -9
  63. package/fesm2022/caribeng-ui-contextmenu.mjs +13 -6
  64. package/fesm2022/caribeng-ui-copy-button.mjs +230 -0
  65. package/fesm2022/caribeng-ui-dataview.mjs +214 -6
  66. package/fesm2022/caribeng-ui-datepicker.mjs +1630 -393
  67. package/fesm2022/caribeng-ui-descriptions.mjs +124 -0
  68. package/fesm2022/caribeng-ui-dialog.mjs +10 -7
  69. package/fesm2022/caribeng-ui-dock.mjs +58 -15
  70. package/fesm2022/caribeng-ui-drawer.mjs +17 -9
  71. package/fesm2022/caribeng-ui-dynamicdialog.mjs +210 -6
  72. package/fesm2022/caribeng-ui-editor.mjs +4413 -243
  73. package/fesm2022/caribeng-ui-empty.mjs +80 -0
  74. package/fesm2022/caribeng-ui-fieldset.mjs +2 -2
  75. package/fesm2022/caribeng-ui-file-card.mjs +136 -19
  76. package/fesm2022/caribeng-ui-fileupload.mjs +96 -19
  77. package/fesm2022/caribeng-ui-floatlabel.mjs +4 -2
  78. package/fesm2022/caribeng-ui-folder-card.mjs +132 -15
  79. package/fesm2022/caribeng-ui-galleria.mjs +76 -45
  80. package/fesm2022/caribeng-ui-image.mjs +52 -29
  81. package/fesm2022/caribeng-ui-inlinemessage.mjs +2 -2
  82. package/fesm2022/caribeng-ui-inplace.mjs +22 -6
  83. package/fesm2022/caribeng-ui-input-number.mjs +9 -7
  84. package/fesm2022/caribeng-ui-inputgroup.mjs +2 -2
  85. package/fesm2022/caribeng-ui-inputmask.mjs +22 -13
  86. package/fesm2022/caribeng-ui-inputotp.mjs +12 -6
  87. package/fesm2022/caribeng-ui-kanban.mjs +4612 -0
  88. package/fesm2022/caribeng-ui-kbd.mjs +122 -0
  89. package/fesm2022/caribeng-ui-keyfilter.mjs +72 -0
  90. package/fesm2022/caribeng-ui-listbox.mjs +13 -11
  91. package/fesm2022/caribeng-ui-megamenu.mjs +228 -32
  92. package/fesm2022/caribeng-ui-mentions.mjs +495 -0
  93. package/fesm2022/caribeng-ui-menu.mjs +18 -8
  94. package/fesm2022/caribeng-ui-menubar.mjs +17 -8
  95. package/fesm2022/caribeng-ui-message.mjs +13 -7
  96. package/fesm2022/caribeng-ui-metergroup.mjs +29 -11
  97. package/fesm2022/caribeng-ui-multiselect.mjs +399 -97
  98. package/fesm2022/caribeng-ui-orderlist.mjs +230 -11
  99. package/fesm2022/caribeng-ui-organizationchart.mjs +16 -15
  100. package/fesm2022/caribeng-ui-paginator.mjs +18 -15
  101. package/fesm2022/caribeng-ui-panel.mjs +11 -8
  102. package/fesm2022/caribeng-ui-panelmenu.mjs +14 -8
  103. package/fesm2022/caribeng-ui-password.mjs +8 -6
  104. package/fesm2022/caribeng-ui-pdfviewer.mjs +1553 -0
  105. package/fesm2022/caribeng-ui-phone-input.mjs +688 -0
  106. package/fesm2022/caribeng-ui-picklist.mjs +251 -14
  107. package/fesm2022/caribeng-ui-pricing.mjs +272 -75
  108. package/fesm2022/caribeng-ui-qrcode.mjs +564 -0
  109. package/fesm2022/caribeng-ui-rating.mjs +7 -3
  110. package/fesm2022/caribeng-ui-repeater.mjs +223 -0
  111. package/fesm2022/caribeng-ui-result.mjs +91 -0
  112. package/fesm2022/caribeng-ui-ripple.mjs +2 -0
  113. package/fesm2022/caribeng-ui-scrollpanel.mjs +6 -3
  114. package/fesm2022/caribeng-ui-scrolltop.mjs +9 -4
  115. package/fesm2022/caribeng-ui-select.mjs +379 -87
  116. package/fesm2022/caribeng-ui-selectbutton.mjs +2 -2
  117. package/fesm2022/caribeng-ui-sidebar.mjs +573 -0
  118. package/fesm2022/caribeng-ui-slider.mjs +171 -75
  119. package/fesm2022/caribeng-ui-speeddial.mjs +7 -4
  120. package/fesm2022/caribeng-ui-spinner.mjs +5 -2
  121. package/fesm2022/caribeng-ui-splitbutton.mjs +163 -0
  122. package/fesm2022/caribeng-ui-splitter.mjs +5 -2
  123. package/fesm2022/caribeng-ui-statistic.mjs +183 -0
  124. package/fesm2022/caribeng-ui-stepper.mjs +17 -7
  125. package/fesm2022/caribeng-ui-steps.mjs +6 -3
  126. package/fesm2022/caribeng-ui-table.mjs +716 -84
  127. package/fesm2022/caribeng-ui-tabmenu.mjs +13 -6
  128. package/fesm2022/caribeng-ui-tag.mjs +2 -2
  129. package/fesm2022/caribeng-ui-terminal.mjs +45 -9
  130. package/fesm2022/caribeng-ui-themetoggle.mjs +82 -0
  131. package/fesm2022/caribeng-ui-tieredmenu.mjs +113 -20
  132. package/fesm2022/caribeng-ui-timeline.mjs +175 -6
  133. package/fesm2022/caribeng-ui-toast.mjs +7 -4
  134. package/fesm2022/caribeng-ui-togglebutton.mjs +8 -6
  135. package/fesm2022/caribeng-ui-toolbar.mjs +6 -3
  136. package/fesm2022/caribeng-ui-tree.mjs +302 -6
  137. package/fesm2022/caribeng-ui-treeselect.mjs +26 -10
  138. package/fesm2022/caribeng-ui-treetable.mjs +269 -6
  139. package/fesm2022/caribeng-ui-virtualscroller.mjs +123 -10
  140. package/fesm2022/caribeng-ui.mjs +1216 -6
  141. package/package.json +93 -3
  142. package/schematics/collection.json +15 -0
  143. package/schematics/migrate-from-primeng/core-icons.json +1 -0
  144. package/schematics/migrate-from-primeng/icons.js +269 -0
  145. package/schematics/migrate-from-primeng/index.js +290 -0
  146. package/schematics/migrate-from-primeng/mappings/button.js +93 -0
  147. package/schematics/migrate-from-primeng/mappings/card.js +33 -0
  148. package/schematics/migrate-from-primeng/mappings/checkbox.js +44 -0
  149. package/schematics/migrate-from-primeng/mappings/confirm.js +221 -0
  150. package/schematics/migrate-from-primeng/mappings/datepicker.js +121 -0
  151. package/schematics/migrate-from-primeng/mappings/dialog.js +84 -0
  152. package/schematics/migrate-from-primeng/mappings/index.js +88 -0
  153. package/schematics/migrate-from-primeng/mappings/inputnumber.js +62 -0
  154. package/schematics/migrate-from-primeng/mappings/inputtext.js +60 -0
  155. package/schematics/migrate-from-primeng/mappings/menu.js +468 -0
  156. package/schematics/migrate-from-primeng/mappings/multiselect.js +49 -0
  157. package/schematics/migrate-from-primeng/mappings/radiobutton.js +22 -0
  158. package/schematics/migrate-from-primeng/mappings/rules.js +206 -0
  159. package/schematics/migrate-from-primeng/mappings/select.js +97 -0
  160. package/schematics/migrate-from-primeng/mappings/service-calls.js +100 -0
  161. package/schematics/migrate-from-primeng/mappings/table.js +613 -0
  162. package/schematics/migrate-from-primeng/mappings/tabs.js +225 -0
  163. package/schematics/migrate-from-primeng/mappings/tag.js +29 -0
  164. package/schematics/migrate-from-primeng/mappings/textarea.js +44 -0
  165. package/schematics/migrate-from-primeng/mappings/toast.js +173 -0
  166. package/schematics/migrate-from-primeng/mappings/toggleswitch.js +37 -0
  167. package/schematics/migrate-from-primeng/mappings/tooltip.js +44 -0
  168. package/schematics/migrate-from-primeng/mappings/types.js +10 -0
  169. package/schematics/migrate-from-primeng/report.js +79 -0
  170. package/schematics/migrate-from-primeng/schema.js +2 -0
  171. package/schematics/migrate-from-primeng/schema.json +34 -0
  172. package/schematics/migrate-from-primeng/template.js +387 -0
  173. package/schematics/migrate-from-primeng/todo.js +5 -0
  174. package/schematics/migrate-from-primeng/typescript.js +442 -0
  175. package/schematics/migrate-from-primeng/workspace.js +117 -0
  176. package/schematics/ng-add/index.js +140 -0
  177. package/schematics/ng-add/schema.js +2 -0
  178. package/schematics/ng-add/schema.json +66 -0
  179. package/types/caribeng-ui-anchor.d.ts +50 -0
  180. package/types/caribeng-ui-autocomplete.d.ts +4 -2
  181. package/types/caribeng-ui-avatargroup.d.ts +3 -1
  182. package/types/caribeng-ui-badge.d.ts +3 -1
  183. package/types/caribeng-ui-blockui.d.ts +9 -4
  184. package/types/caribeng-ui-breadcrumb.d.ts +11 -0
  185. package/types/caribeng-ui-button.d.ts +9 -1
  186. package/types/caribeng-ui-caribe-alert.d.ts +3 -0
  187. package/types/caribeng-ui-caribe-animation-lottie.d.ts +4 -1
  188. package/types/caribeng-ui-caribe-button-group.d.ts +4 -1
  189. package/types/caribeng-ui-caribe-calendar.d.ts +5 -1
  190. package/types/caribeng-ui-caribe-card-content.d.ts +4 -1
  191. package/types/caribeng-ui-caribe-card-move.d.ts +13 -13
  192. package/types/caribeng-ui-caribe-card-select.d.ts +10 -1
  193. package/types/caribeng-ui-caribe-circle-loading.d.ts +4 -1
  194. package/types/caribeng-ui-caribe-coachmark.d.ts +6 -0
  195. package/types/caribeng-ui-caribe-data-table.d.ts +7 -2
  196. package/types/caribeng-ui-caribe-dots-indicator.d.ts +9 -0
  197. package/types/caribeng-ui-caribe-expansion-panel.d.ts +7 -10
  198. package/types/caribeng-ui-caribe-fab-menu.d.ts +10 -1
  199. package/types/caribeng-ui-caribe-file-download.d.ts +8 -10
  200. package/types/caribeng-ui-caribe-file-select.d.ts +7 -1
  201. package/types/caribeng-ui-caribe-float-menu.d.ts +4 -1
  202. package/types/caribeng-ui-caribe-header.d.ts +3 -0
  203. package/types/caribeng-ui-caribe-icon-button.d.ts +4 -1
  204. package/types/caribeng-ui-caribe-illustration.d.ts +4 -1
  205. package/types/caribeng-ui-caribe-inline-alert.d.ts +3 -0
  206. package/types/caribeng-ui-caribe-input-search.d.ts +4 -2
  207. package/types/caribeng-ui-caribe-input-select.d.ts +4 -2
  208. package/types/caribeng-ui-caribe-input-token.d.ts +16 -1
  209. package/types/caribeng-ui-caribe-link.d.ts +3 -0
  210. package/types/caribeng-ui-caribe-loader.d.ts +4 -1
  211. package/types/caribeng-ui-caribe-modal.d.ts +7 -10
  212. package/types/caribeng-ui-caribe-off-canvas.d.ts +6 -1
  213. package/types/caribeng-ui-caribe-onboarding.d.ts +6 -0
  214. package/types/caribeng-ui-caribe-pictogram.d.ts +4 -1
  215. package/types/caribeng-ui-caribe-pop-over.d.ts +7 -10
  216. package/types/caribeng-ui-caribe-preloader.d.ts +4 -1
  217. package/types/caribeng-ui-caribe-progress-bar.d.ts +3 -0
  218. package/types/caribeng-ui-caribe-shortcut.d.ts +3 -1
  219. package/types/caribeng-ui-caribe-step-indicator.d.ts +6 -0
  220. package/types/caribeng-ui-caribe-stroke.d.ts +4 -1
  221. package/types/caribeng-ui-caribe-switch.d.ts +3 -1
  222. package/types/caribeng-ui-caribe-tracker.d.ts +3 -0
  223. package/types/caribeng-ui-caribe-voucher.d.ts +5 -2
  224. package/types/caribeng-ui-carousel.d.ts +10 -1
  225. package/types/caribeng-ui-cascadeselect.d.ts +7 -2
  226. package/types/caribeng-ui-chart.d.ts +471 -44
  227. package/types/caribeng-ui-chat.d.ts +299 -0
  228. package/types/caribeng-ui-chip.d.ts +6 -0
  229. package/types/caribeng-ui-chips.d.ts +6 -2
  230. package/types/caribeng-ui-code-block.d.ts +65 -0
  231. package/types/caribeng-ui-colorpicker.d.ts +8 -2
  232. package/types/caribeng-ui-command-palette.d.ts +133 -0
  233. package/types/caribeng-ui-confirmdialog.d.ts +57 -6
  234. package/types/caribeng-ui-confirmpopup.d.ts +74 -5
  235. package/types/caribeng-ui-contextmenu.d.ts +11 -1
  236. package/types/caribeng-ui-copy-button.d.ts +90 -0
  237. package/types/caribeng-ui-dataview.d.ts +65 -5
  238. package/types/caribeng-ui-datepicker.d.ts +186 -21
  239. package/types/caribeng-ui-descriptions.d.ts +63 -0
  240. package/types/caribeng-ui-dialog.d.ts +4 -1
  241. package/types/caribeng-ui-dock.d.ts +17 -2
  242. package/types/caribeng-ui-drawer.d.ts +7 -2
  243. package/types/caribeng-ui-dynamicdialog.d.ts +93 -3
  244. package/types/caribeng-ui-editor.d.ts +486 -13
  245. package/types/caribeng-ui-empty.d.ts +34 -0
  246. package/types/caribeng-ui-file-card.d.ts +28 -3
  247. package/types/caribeng-ui-fileupload.d.ts +27 -4
  248. package/types/caribeng-ui-folder-card.d.ts +31 -6
  249. package/types/caribeng-ui-galleria.d.ts +9 -0
  250. package/types/caribeng-ui-image.d.ts +10 -0
  251. package/types/caribeng-ui-inplace.d.ts +8 -0
  252. package/types/caribeng-ui-input-number.d.ts +3 -1
  253. package/types/caribeng-ui-inputmask.d.ts +8 -1
  254. package/types/caribeng-ui-inputotp.d.ts +7 -2
  255. package/types/caribeng-ui-kanban.d.ts +783 -0
  256. package/types/caribeng-ui-kbd.d.ts +36 -0
  257. package/types/caribeng-ui-keyfilter.d.ts +30 -0
  258. package/types/caribeng-ui-listbox.d.ts +5 -3
  259. package/types/caribeng-ui-megamenu.d.ts +37 -2
  260. package/types/caribeng-ui-mentions.d.ts +127 -0
  261. package/types/caribeng-ui-menu.d.ts +14 -2
  262. package/types/caribeng-ui-menubar.d.ts +12 -1
  263. package/types/caribeng-ui-message.d.ts +5 -0
  264. package/types/caribeng-ui-metergroup.d.ts +9 -1
  265. package/types/caribeng-ui-multiselect.d.ts +71 -10
  266. package/types/caribeng-ui-orderlist.d.ts +58 -6
  267. package/types/caribeng-ui-organizationchart.d.ts +7 -1
  268. package/types/caribeng-ui-paginator.d.ts +3 -0
  269. package/types/caribeng-ui-panel.d.ts +3 -0
  270. package/types/caribeng-ui-panelmenu.d.ts +11 -1
  271. package/types/caribeng-ui-password.d.ts +4 -2
  272. package/types/caribeng-ui-pdfviewer.d.ts +258 -0
  273. package/types/caribeng-ui-phone-input.d.ts +168 -0
  274. package/types/caribeng-ui-picklist.d.ts +67 -7
  275. package/types/caribeng-ui-pricing.d.ts +49 -9
  276. package/types/caribeng-ui-qrcode.d.ts +88 -0
  277. package/types/caribeng-ui-rating.d.ts +6 -2
  278. package/types/caribeng-ui-repeater.d.ts +79 -0
  279. package/types/caribeng-ui-result.d.ts +35 -0
  280. package/types/caribeng-ui-scrollpanel.d.ts +4 -1
  281. package/types/caribeng-ui-scrolltop.d.ts +4 -1
  282. package/types/caribeng-ui-select.d.ts +73 -9
  283. package/types/caribeng-ui-sidebar.d.ts +167 -0
  284. package/types/caribeng-ui-slider.d.ts +63 -10
  285. package/types/caribeng-ui-speeddial.d.ts +5 -2
  286. package/types/caribeng-ui-spinner.d.ts +3 -0
  287. package/types/caribeng-ui-splitbutton.d.ts +49 -0
  288. package/types/caribeng-ui-splitter.d.ts +3 -0
  289. package/types/caribeng-ui-statistic.d.ts +65 -0
  290. package/types/caribeng-ui-stepper.d.ts +5 -0
  291. package/types/caribeng-ui-steps.d.ts +4 -1
  292. package/types/caribeng-ui-table.d.ts +185 -17
  293. package/types/caribeng-ui-tabmenu.d.ts +11 -1
  294. package/types/caribeng-ui-terminal.d.ts +10 -0
  295. package/types/caribeng-ui-themetoggle.d.ts +32 -0
  296. package/types/caribeng-ui-tieredmenu.d.ts +22 -3
  297. package/types/caribeng-ui-timeline.d.ts +63 -4
  298. package/types/caribeng-ui-toast.d.ts +3 -0
  299. package/types/caribeng-ui-togglebutton.d.ts +5 -3
  300. package/types/caribeng-ui-toolbar.d.ts +7 -4
  301. package/types/caribeng-ui-tree.d.ts +76 -4
  302. package/types/caribeng-ui-treeselect.d.ts +10 -2
  303. package/types/caribeng-ui-treetable.d.ts +68 -4
  304. package/types/caribeng-ui-virtualscroller.d.ts +45 -5
  305. package/types/caribeng-ui.d.ts +775 -12
@@ -1,6 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, model, output, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { input, model, output, inject, ElementRef, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { injectCbTranslation, cbOverlayFocus } from '@caribeng/ui';
3
4
 
5
+ let nextId = 0;
4
6
  /**
5
7
  * Fab-menu de Caribe Design: botón de acción flotante que despliega una lista
6
8
  * de acciones rápidas.
@@ -12,8 +14,10 @@ import { input, model, output, ViewEncapsulation, ChangeDetectionStrategy, Compo
12
14
  */
13
15
  class CbFabMenu {
14
16
  constructor() {
17
+ /** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
18
+ this.t = injectCbTranslation();
15
19
  /** Etiqueta accesible del botón flotante. */
16
- this.triggerLabel = input('Menú de acciones rápidas', /* @ts-ignore */
20
+ this.triggerLabel = input(undefined, /* @ts-ignore */
17
21
  ...(ngDevMode ? [{ debugName: "triggerLabel" }] : /* istanbul ignore next */ []));
18
22
  /** Acciones del menú. */
19
23
  this.items = input([], /* @ts-ignore */
@@ -23,6 +27,33 @@ class CbFabMenu {
23
27
  ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
24
28
  /** Emite la acción seleccionada. */
25
29
  this.itemSelected = output();
30
+ this.menuId = `cb-fab-menu-${++nextId}`;
31
+ this.host = inject(ElementRef);
32
+ // Al abrir, el foco va a la primera acción; al cerrar, vuelve al botón flotante.
33
+ cbOverlayFocus({ open: this.open, initialFocus: () => this.menuItems()[0] });
34
+ }
35
+ menuItems() {
36
+ return Array.from(this.host.nativeElement.querySelectorAll('.cb-fab-menu__item'));
37
+ }
38
+ /** Patrón *menu*: flechas (circular), Inicio, Fin, y Escape / Tab cierran. */
39
+ onMenuKeydown(event) {
40
+ const items = this.menuItems();
41
+ const cur = items.indexOf(event.target);
42
+ const last = items.length - 1;
43
+ const target = event.key === 'ArrowDown' ? (cur < last ? cur + 1 : 0)
44
+ : event.key === 'ArrowUp' ? (cur > 0 ? cur - 1 : last)
45
+ : event.key === 'Home' ? 0
46
+ : event.key === 'End' ? last
47
+ : -1;
48
+ if (target >= 0) {
49
+ event.preventDefault();
50
+ items[target]?.focus();
51
+ }
52
+ else if (event.key === 'Escape' || event.key === 'Tab') {
53
+ if (event.key === 'Escape')
54
+ event.preventDefault();
55
+ this.open.set(false);
56
+ }
26
57
  }
27
58
  selectItem(item) {
28
59
  this.itemSelected.emit(item);
@@ -32,12 +63,19 @@ class CbFabMenu {
32
63
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbFabMenu, isStandalone: true, selector: "cb-fab-menu", inputs: { triggerLabel: { classPropertyName: "triggerLabel", publicName: "triggerLabel", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", itemSelected: "itemSelected" }, host: { classAttribute: "cb-fab-menu-host" }, ngImport: i0, template: `
33
64
  <div class="cb-fab-menu">
34
65
  @if (open()) {
35
- <div class="cb-fab-menu__list" role="menu">
66
+ <div
67
+ class="cb-fab-menu__list"
68
+ role="menu"
69
+ [id]="menuId"
70
+ [attr.aria-label]="(triggerLabel() ?? t().quickActions)"
71
+ (keydown)="onMenuKeydown($event)"
72
+ >
36
73
  @for (item of items(); track item.id) {
37
74
  <button
38
75
  type="button"
39
76
  class="cb-fab-menu__item"
40
77
  role="menuitem"
78
+ tabindex="-1"
41
79
  (click)="selectItem(item)"
42
80
  >
43
81
  {{ item.label }}
@@ -49,8 +87,10 @@ class CbFabMenu {
49
87
  type="button"
50
88
  class="cb-fab-menu__trigger"
51
89
  [class.cb-is-open]="open()"
90
+ aria-haspopup="menu"
52
91
  [attr.aria-expanded]="open()"
53
- [attr.aria-label]="triggerLabel()"
92
+ [attr.aria-controls]="open() ? menuId : null"
93
+ [attr.aria-label]="(triggerLabel() ?? t().quickActions)"
54
94
  (click)="open.set(!open())"
55
95
  >
56
96
  <span aria-hidden="true">{{ open() ? '×' : '+' }}</span>
@@ -63,12 +103,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
63
103
  args: [{ selector: 'cb-fab-menu', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: { class: 'cb-fab-menu-host' }, template: `
64
104
  <div class="cb-fab-menu">
65
105
  @if (open()) {
66
- <div class="cb-fab-menu__list" role="menu">
106
+ <div
107
+ class="cb-fab-menu__list"
108
+ role="menu"
109
+ [id]="menuId"
110
+ [attr.aria-label]="(triggerLabel() ?? t().quickActions)"
111
+ (keydown)="onMenuKeydown($event)"
112
+ >
67
113
  @for (item of items(); track item.id) {
68
114
  <button
69
115
  type="button"
70
116
  class="cb-fab-menu__item"
71
117
  role="menuitem"
118
+ tabindex="-1"
72
119
  (click)="selectItem(item)"
73
120
  >
74
121
  {{ item.label }}
@@ -80,15 +127,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
80
127
  type="button"
81
128
  class="cb-fab-menu__trigger"
82
129
  [class.cb-is-open]="open()"
130
+ aria-haspopup="menu"
83
131
  [attr.aria-expanded]="open()"
84
- [attr.aria-label]="triggerLabel()"
132
+ [attr.aria-controls]="open() ? menuId : null"
133
+ [attr.aria-label]="(triggerLabel() ?? t().quickActions)"
85
134
  (click)="open.set(!open())"
86
135
  >
87
136
  <span aria-hidden="true">{{ open() ? '×' : '+' }}</span>
88
137
  </button>
89
138
  </div>
90
139
  `, styles: [":host{display:inline-flex}.cb-fab-menu{display:inline-flex;flex-direction:column;align-items:flex-end;gap:var(--cb-space-2, .5rem);font-family:var(--cb-font-sans, inherit)}.cb-fab-menu__list{display:flex;flex-direction:column;gap:var(--cb-space-2, .35rem);animation:cb-fab-in var(--cb-duration-fast, .12s) var(--cb-ease-out, ease-out)}.cb-fab-menu__item{padding:var(--cb-space-2, .5rem) var(--cb-space-4, 1rem);font:inherit;font-size:var(--cb-text-sm, .8125rem);font-weight:var(--cb-font-weight-medium, 500);color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-0, #ffffff);border:1px solid var(--cb-color-border, #e2e8f0);border-radius:var(--cb-radius-full, 999px);box-shadow:var(--cb-shadow-sm, 0 1px 2px rgba(0, 0, 0, .12));cursor:pointer;white-space:nowrap;transition:background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-fab-menu__item:hover{background-color:var(--cb-color-surface-100, #f1f5f9)}.cb-fab-menu__trigger{display:inline-flex;align-items:center;justify-content:center;width:3.25rem;height:3.25rem;font-size:1.6rem;line-height:1;color:var(--cb-color-primary-contrast, #ffffff);background-color:var(--cb-color-primary-600, #047857);border:none;border-radius:var(--cb-radius-full, 999px);box-shadow:var(--cb-shadow-md, 0 6px 16px rgba(0, 0, 0, .2));cursor:pointer;transition:background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease),transform var(--cb-duration-normal, .2s) var(--cb-ease, ease)}.cb-fab-menu__trigger:hover{background-color:var(--cb-color-primary-700, #065f46)}.cb-fab-menu__trigger.cb-is-open{transform:rotate(90deg)}.cb-fab-menu__trigger:focus-visible{outline:2px solid var(--cb-color-focus-ring, var(--cb-color-primary-500, #10b981));outline-offset:2px}@keyframes cb-fab-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}:host-context([data-theme=\"dark\"]) .cb-fab-menu__item{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-800, #1e293b);border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-fab-menu__item:hover{background-color:var(--cb-color-surface-700, #334155)}\n"] }]
91
- }], propDecorators: { triggerLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerLabel", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], itemSelected: [{ type: i0.Output, args: ["itemSelected"] }] } });
140
+ }], ctorParameters: () => [], propDecorators: { triggerLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerLabel", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], itemSelected: [{ type: i0.Output, args: ["itemSelected"] }] } });
92
141
 
93
142
  /**
94
143
  * Generated bundle index. Do not edit.
@@ -1,5 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, output, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { input, computed, output, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { injectCbTranslation } from '@caribeng/ui';
3
4
 
4
5
  /**
5
6
  * File-download de Caribe Design: fila de archivo con nombre, tamaño y botón de
@@ -10,19 +11,31 @@ import { input, output, ViewEncapsulation, ChangeDetectionStrategy, Component }
10
11
  * <cb-file-download fileName="Extracto.pdf" fileSize="420 KB" (download)="go($event)" />
11
12
  * ```
12
13
  */
14
+ let nextId = 0;
13
15
  class CbFileDownload {
14
16
  constructor() {
15
- this.fileName = input('Certificado_Bancario.pdf', /* @ts-ignore */
17
+ /** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
18
+ this.t = injectCbTranslation();
19
+ this.fileName = input('', /* @ts-ignore */
16
20
  ...(ngDevMode ? [{ debugName: "fileName" }] : /* istanbul ignore next */ []));
17
- this.fileSize = input('420 KB', /* @ts-ignore */
21
+ this.fileSize = input('', /* @ts-ignore */
18
22
  ...(ngDevMode ? [{ debugName: "fileSize" }] : /* istanbul ignore next */ []));
23
+ /** Tipo de archivo mostrado en la insignia, a partir de la extensión (p. ej. PDF, XLSX). */
24
+ this.extension = computed(() => {
25
+ const name = this.fileName();
26
+ const dot = name.lastIndexOf('.');
27
+ return dot > 0 ? name.slice(dot + 1, dot + 5).toUpperCase() : '';
28
+ }, /* @ts-ignore */
29
+ ...(ngDevMode ? [{ debugName: "extension" }] : /* istanbul ignore next */ []));
19
30
  this.href = input('', /* @ts-ignore */
20
31
  ...(ngDevMode ? [{ debugName: "href" }] : /* istanbul ignore next */ []));
21
- this.buttonLabel = input('Descargar', /* @ts-ignore */
32
+ this.buttonLabel = input(undefined, /* @ts-ignore */
22
33
  ...(ngDevMode ? [{ debugName: "buttonLabel" }] : /* istanbul ignore next */ []));
23
34
  this.disabled = input(false, /* @ts-ignore */
24
35
  ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
25
36
  this.download = output();
37
+ /** Id del nombre: describe el botón ("Descargar" → "Certificado.pdf"). */
38
+ this.nameId = `cb-file-download-${++nextId}-name`;
26
39
  }
27
40
  onDownload() {
28
41
  if (this.disabled())
@@ -30,43 +43,71 @@ class CbFileDownload {
30
43
  this.download.emit(this.fileName());
31
44
  }
32
45
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbFileDownload, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
33
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: CbFileDownload, isStandalone: true, selector: "cb-file-download", inputs: { fileName: { classPropertyName: "fileName", publicName: "fileName", isSignal: true, isRequired: false, transformFunction: null }, fileSize: { classPropertyName: "fileSize", publicName: "fileSize", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, buttonLabel: { classPropertyName: "buttonLabel", publicName: "buttonLabel", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { download: "download" }, host: { classAttribute: "cb-file-download-host" }, ngImport: i0, template: `
46
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbFileDownload, isStandalone: true, selector: "cb-file-download", inputs: { fileName: { classPropertyName: "fileName", publicName: "fileName", isSignal: true, isRequired: false, transformFunction: null }, fileSize: { classPropertyName: "fileSize", publicName: "fileSize", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, buttonLabel: { classPropertyName: "buttonLabel", publicName: "buttonLabel", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { download: "download" }, host: { classAttribute: "cb-file-download-host" }, ngImport: i0, template: `
34
47
  <div class="cb-file-download">
35
- <span class="cb-file-download__icon" aria-hidden="true">PDF</span>
48
+ <span class="cb-file-download__icon" aria-hidden="true">{{ extension() }}</span>
36
49
  <div class="cb-file-download__meta">
37
- <strong class="cb-file-download__name">{{ fileName() }}</strong>
50
+ <strong class="cb-file-download__name" [id]="nameId">{{ fileName() }}</strong>
38
51
  <span class="cb-file-download__size">{{ fileSize() }}</span>
39
52
  </div>
40
- <button
41
- type="button"
42
- class="cb-file-download__btn"
43
- (click)="onDownload()"
44
- [disabled]="disabled()"
45
- >
46
- {{ buttonLabel() }}
47
- </button>
53
+ <!-- Con href, enlace de descarga nativo; sin él, botón que emite (download) para descargarlo desde la app. -->
54
+ @if (href() && !disabled()) {
55
+ <a
56
+ class="cb-file-download__btn"
57
+ [href]="href()"
58
+ [attr.download]="fileName() || ''"
59
+ [attr.aria-describedby]="fileName() ? nameId : null"
60
+ (click)="onDownload()"
61
+ >
62
+ {{ (buttonLabel() ?? t().download) }}
63
+ </a>
64
+ } @else {
65
+ <button
66
+ type="button"
67
+ class="cb-file-download__btn"
68
+ [attr.aria-describedby]="fileName() ? nameId : null"
69
+ (click)="onDownload()"
70
+ [disabled]="disabled()"
71
+ >
72
+ {{ (buttonLabel() ?? t().download) }}
73
+ </button>
74
+ }
48
75
  </div>
49
- `, isInline: true, styles: [":host{display:block;width:100%;max-width:24rem}.cb-file-download{display:flex;align-items:center;gap:var(--cb-space-3, .75rem);box-sizing:border-box;padding:var(--cb-space-3, .75rem);font-family:var(--cb-font-sans, inherit);background-color:var(--cb-color-surface-0, #ffffff);border:1px solid var(--cb-color-border, #e2e8f0);border-radius:var(--cb-radius-md, .5rem)}.cb-file-download__icon{display:inline-flex;align-items:center;justify-content:center;flex:none;width:2.5rem;height:2.5rem;font-size:.6rem;font-weight:var(--cb-font-weight-bold, 700);letter-spacing:.04em;color:var(--cb-color-danger-600, #dc2626);background-color:var(--cb-color-danger-50, #fef2f2);border-radius:var(--cb-radius-sm, .375rem)}.cb-file-download__meta{flex:1;min-width:0;display:flex;flex-direction:column}.cb-file-download__name{font-size:var(--cb-text-sm, .875rem);font-weight:var(--cb-font-weight-semibold, 600);color:var(--cb-color-text-strong, #0f172a);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cb-file-download__size{font-size:var(--cb-text-xs, .75rem);color:var(--cb-color-text-muted, #64748b)}.cb-file-download__btn{flex:none;padding:var(--cb-space-2, .45rem) var(--cb-space-3, .85rem);font:inherit;font-size:var(--cb-text-sm, .8125rem);font-weight:var(--cb-font-weight-semibold, 600);color:var(--cb-color-primary-contrast, #ffffff);background-color:var(--cb-color-primary-600, #047857);border:none;border-radius:var(--cb-radius-md, .5rem);cursor:pointer;transition:background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-file-download__btn:hover:not(:disabled){background-color:var(--cb-color-primary-700, #065f46)}.cb-file-download__btn:disabled{opacity:.55;cursor:not-allowed}:host-context([data-theme=\"dark\"]) .cb-file-download{background-color:var(--cb-color-surface-800, #1e293b);border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-file-download__name{color:var(--cb-color-surface-0, #f8fafc)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
76
+ `, isInline: true, styles: [":host{display:block;width:100%;max-width:24rem}.cb-file-download{display:flex;align-items:center;gap:var(--cb-space-3, .75rem);box-sizing:border-box;padding:var(--cb-space-3, .75rem);font-family:var(--cb-font-sans, inherit);background-color:var(--cb-color-surface-0, #ffffff);border:1px solid var(--cb-color-border, #e2e8f0);border-radius:var(--cb-radius-md, .5rem)}.cb-file-download__icon{display:inline-flex;align-items:center;justify-content:center;flex:none;width:2.5rem;height:2.5rem;font-size:.6rem;font-weight:var(--cb-font-weight-bold, 700);letter-spacing:.04em;color:var(--cb-color-danger-600, #dc2626);background-color:var(--cb-color-danger-50, #fef2f2);border-radius:var(--cb-radius-sm, .375rem)}.cb-file-download__meta{flex:1;min-width:0;display:flex;flex-direction:column}.cb-file-download__name{font-size:var(--cb-text-sm, .875rem);font-weight:var(--cb-font-weight-semibold, 600);color:var(--cb-color-text-strong, #0f172a);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cb-file-download__size{font-size:var(--cb-text-xs, .75rem);color:var(--cb-color-text-muted, #64748b)}.cb-file-download__btn{flex:none;padding:var(--cb-space-2, .45rem) var(--cb-space-3, .85rem);font:inherit;font-size:var(--cb-text-sm, .8125rem);font-weight:var(--cb-font-weight-semibold, 600);color:var(--cb-color-primary-contrast, #ffffff);background-color:var(--cb-color-primary-600, #047857);border:none;border-radius:var(--cb-radius-md, .5rem);cursor:pointer;text-decoration:none;transition:background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-file-download__btn:hover:not(:disabled){background-color:var(--cb-color-primary-700, #065f46)}.cb-file-download__btn:disabled{opacity:.55;cursor:not-allowed}:host-context([data-theme=\"dark\"]) .cb-file-download{background-color:var(--cb-color-surface-800, #1e293b);border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-file-download__name{color:var(--cb-color-surface-0, #f8fafc)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
50
77
  }
51
78
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbFileDownload, decorators: [{
52
79
  type: Component,
53
80
  args: [{ selector: 'cb-file-download', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: { class: 'cb-file-download-host' }, template: `
54
81
  <div class="cb-file-download">
55
- <span class="cb-file-download__icon" aria-hidden="true">PDF</span>
82
+ <span class="cb-file-download__icon" aria-hidden="true">{{ extension() }}</span>
56
83
  <div class="cb-file-download__meta">
57
- <strong class="cb-file-download__name">{{ fileName() }}</strong>
84
+ <strong class="cb-file-download__name" [id]="nameId">{{ fileName() }}</strong>
58
85
  <span class="cb-file-download__size">{{ fileSize() }}</span>
59
86
  </div>
60
- <button
61
- type="button"
62
- class="cb-file-download__btn"
63
- (click)="onDownload()"
64
- [disabled]="disabled()"
65
- >
66
- {{ buttonLabel() }}
67
- </button>
87
+ <!-- Con href, enlace de descarga nativo; sin él, botón que emite (download) para descargarlo desde la app. -->
88
+ @if (href() && !disabled()) {
89
+ <a
90
+ class="cb-file-download__btn"
91
+ [href]="href()"
92
+ [attr.download]="fileName() || ''"
93
+ [attr.aria-describedby]="fileName() ? nameId : null"
94
+ (click)="onDownload()"
95
+ >
96
+ {{ (buttonLabel() ?? t().download) }}
97
+ </a>
98
+ } @else {
99
+ <button
100
+ type="button"
101
+ class="cb-file-download__btn"
102
+ [attr.aria-describedby]="fileName() ? nameId : null"
103
+ (click)="onDownload()"
104
+ [disabled]="disabled()"
105
+ >
106
+ {{ (buttonLabel() ?? t().download) }}
107
+ </button>
108
+ }
68
109
  </div>
69
- `, styles: [":host{display:block;width:100%;max-width:24rem}.cb-file-download{display:flex;align-items:center;gap:var(--cb-space-3, .75rem);box-sizing:border-box;padding:var(--cb-space-3, .75rem);font-family:var(--cb-font-sans, inherit);background-color:var(--cb-color-surface-0, #ffffff);border:1px solid var(--cb-color-border, #e2e8f0);border-radius:var(--cb-radius-md, .5rem)}.cb-file-download__icon{display:inline-flex;align-items:center;justify-content:center;flex:none;width:2.5rem;height:2.5rem;font-size:.6rem;font-weight:var(--cb-font-weight-bold, 700);letter-spacing:.04em;color:var(--cb-color-danger-600, #dc2626);background-color:var(--cb-color-danger-50, #fef2f2);border-radius:var(--cb-radius-sm, .375rem)}.cb-file-download__meta{flex:1;min-width:0;display:flex;flex-direction:column}.cb-file-download__name{font-size:var(--cb-text-sm, .875rem);font-weight:var(--cb-font-weight-semibold, 600);color:var(--cb-color-text-strong, #0f172a);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cb-file-download__size{font-size:var(--cb-text-xs, .75rem);color:var(--cb-color-text-muted, #64748b)}.cb-file-download__btn{flex:none;padding:var(--cb-space-2, .45rem) var(--cb-space-3, .85rem);font:inherit;font-size:var(--cb-text-sm, .8125rem);font-weight:var(--cb-font-weight-semibold, 600);color:var(--cb-color-primary-contrast, #ffffff);background-color:var(--cb-color-primary-600, #047857);border:none;border-radius:var(--cb-radius-md, .5rem);cursor:pointer;transition:background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-file-download__btn:hover:not(:disabled){background-color:var(--cb-color-primary-700, #065f46)}.cb-file-download__btn:disabled{opacity:.55;cursor:not-allowed}:host-context([data-theme=\"dark\"]) .cb-file-download{background-color:var(--cb-color-surface-800, #1e293b);border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-file-download__name{color:var(--cb-color-surface-0, #f8fafc)}\n"] }]
110
+ `, styles: [":host{display:block;width:100%;max-width:24rem}.cb-file-download{display:flex;align-items:center;gap:var(--cb-space-3, .75rem);box-sizing:border-box;padding:var(--cb-space-3, .75rem);font-family:var(--cb-font-sans, inherit);background-color:var(--cb-color-surface-0, #ffffff);border:1px solid var(--cb-color-border, #e2e8f0);border-radius:var(--cb-radius-md, .5rem)}.cb-file-download__icon{display:inline-flex;align-items:center;justify-content:center;flex:none;width:2.5rem;height:2.5rem;font-size:.6rem;font-weight:var(--cb-font-weight-bold, 700);letter-spacing:.04em;color:var(--cb-color-danger-600, #dc2626);background-color:var(--cb-color-danger-50, #fef2f2);border-radius:var(--cb-radius-sm, .375rem)}.cb-file-download__meta{flex:1;min-width:0;display:flex;flex-direction:column}.cb-file-download__name{font-size:var(--cb-text-sm, .875rem);font-weight:var(--cb-font-weight-semibold, 600);color:var(--cb-color-text-strong, #0f172a);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cb-file-download__size{font-size:var(--cb-text-xs, .75rem);color:var(--cb-color-text-muted, #64748b)}.cb-file-download__btn{flex:none;padding:var(--cb-space-2, .45rem) var(--cb-space-3, .85rem);font:inherit;font-size:var(--cb-text-sm, .8125rem);font-weight:var(--cb-font-weight-semibold, 600);color:var(--cb-color-primary-contrast, #ffffff);background-color:var(--cb-color-primary-600, #047857);border:none;border-radius:var(--cb-radius-md, .5rem);cursor:pointer;text-decoration:none;transition:background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-file-download__btn:hover:not(:disabled){background-color:var(--cb-color-primary-700, #065f46)}.cb-file-download__btn:disabled{opacity:.55;cursor:not-allowed}:host-context([data-theme=\"dark\"]) .cb-file-download{background-color:var(--cb-color-surface-800, #1e293b);border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-file-download__name{color:var(--cb-color-surface-0, #f8fafc)}\n"] }]
70
111
  }], propDecorators: { fileName: [{ type: i0.Input, args: [{ isSignal: true, alias: "fileName", required: false }] }], fileSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "fileSize", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], buttonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonLabel", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], download: [{ type: i0.Output, args: ["download"] }] } });
71
112
 
72
113
  /**
@@ -1,5 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { input, model, output, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { injectCbTranslation, cbFormat } from '@caribeng/ui';
3
4
 
4
5
  /**
5
6
  * File-select de Caribe Design: zona de selección de archivos con formatos
@@ -12,7 +13,11 @@ import { input, model, output, ViewEncapsulation, ChangeDetectionStrategy, Compo
12
13
  */
13
14
  class CbFileSelect {
14
15
  constructor() {
15
- this.label = input('Seleccionar documento', /* @ts-ignore */
16
+ /** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
17
+ this.t = injectCbTranslation();
18
+ /** Rellena `{0}`, `{1}`… de un texto traducido. */
19
+ this.fmt = cbFormat;
20
+ this.label = input(undefined, /* @ts-ignore */
16
21
  ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
17
22
  this.accept = input('.pdf,.png,.jpg', /* @ts-ignore */
18
23
  ...(ngDevMode ? [{ debugName: "accept" }] : /* istanbul ignore next */ []));
@@ -34,13 +39,13 @@ class CbFileSelect {
34
39
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbFileSelect, isStandalone: true, selector: "cb-file-select", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { files: "filesChange", filesSelected: "filesSelected" }, host: { classAttribute: "cb-file-select-host" }, ngImport: i0, template: `
35
40
  <label class="cb-file-select" [class.cb-is-disabled]="disabled()">
36
41
  <span class="cb-file-select__icon" aria-hidden="true">↑</span>
37
- <span class="cb-file-select__title">{{ label() }}</span>
38
- <span class="cb-file-select__hint">Formatos: {{ accept() }}</span>
39
- @if (files().length) {
40
- <span class="cb-file-select__count">
41
- {{ files().length }} archivo(s) seleccionado(s)
42
- </span>
43
- }
42
+ <span class="cb-file-select__title">{{ (label() ?? t().selectDocument) }}</span>
43
+ <span class="cb-file-select__hint">{{ fmt(t().formats, accept()) }}</span>
44
+ <span class="cb-file-select__count" aria-live="polite">
45
+ @if (files().length) {
46
+ {{ fmt(t().filesSelected, files().length) }}
47
+ }
48
+ </span>
44
49
  <input
45
50
  class="cb-file-select__input"
46
51
  type="file"
@@ -50,20 +55,20 @@ class CbFileSelect {
50
55
  (change)="onFileChange($event)"
51
56
  />
52
57
  </label>
53
- `, isInline: true, styles: [":host{display:block;width:100%;max-width:24rem}.cb-file-select{display:flex;flex-direction:column;align-items:center;gap:var(--cb-space-1, .25rem);box-sizing:border-box;padding:var(--cb-space-5, 1.25rem);font-family:var(--cb-font-sans, inherit);text-align:center;color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-50, #f8fafc);border:1.5px dashed var(--cb-color-border-strong, #94a3b8);border-radius:var(--cb-radius-lg, .75rem);cursor:pointer;transition:border-color var(--cb-duration-fast, .12s) var(--cb-ease, ease),background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-file-select:hover:not(.cb-is-disabled){border-color:var(--cb-color-primary-400, #34d399);background-color:var(--cb-color-primary-50, #ecfdf5)}.cb-file-select.cb-is-disabled{opacity:.6;cursor:not-allowed}.cb-file-select__icon{display:inline-flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;font-size:1.2rem;color:var(--cb-color-primary-600, #047857);background-color:var(--cb-color-primary-50, #ecfdf5);border-radius:var(--cb-radius-full, 999px)}.cb-file-select__title{font-size:var(--cb-text-sm, .875rem);font-weight:var(--cb-font-weight-semibold, 600)}.cb-file-select__hint{font-size:var(--cb-text-xs, .75rem);color:var(--cb-color-text-muted, #64748b)}.cb-file-select__count{margin-top:var(--cb-space-1, .25rem);font-size:var(--cb-text-xs, .75rem);font-weight:var(--cb-font-weight-semibold, 600);color:var(--cb-color-primary-700, #065f46)}.cb-file-select__input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}:host-context([data-theme=\"dark\"]) .cb-file-select{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-900, #0f172a);border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-file-select:hover:not(.cb-is-disabled){border-color:var(--cb-color-primary-500, #10b981);background-color:color-mix(in srgb,var(--cb-color-primary-500, #10b981) 12%,transparent)}:host-context([data-theme=\"dark\"]) .cb-file-select__icon{color:var(--cb-color-primary-300, #6ee7b7);background-color:color-mix(in srgb,var(--cb-color-primary-500, #10b981) 18%,transparent)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
58
+ `, isInline: true, styles: [":host{display:block;width:100%;max-width:24rem}.cb-file-select{display:flex;flex-direction:column;align-items:center;gap:var(--cb-space-1, .25rem);box-sizing:border-box;padding:var(--cb-space-5, 1.25rem);font-family:var(--cb-font-sans, inherit);text-align:center;color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-50, #f8fafc);border:1.5px dashed var(--cb-color-border-strong, #94a3b8);border-radius:var(--cb-radius-lg, .75rem);cursor:pointer;transition:border-color var(--cb-duration-fast, .12s) var(--cb-ease, ease),background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-file-select:hover:not(.cb-is-disabled){border-color:var(--cb-color-primary-400, #34d399);background-color:var(--cb-color-primary-50, #ecfdf5)}.cb-file-select.cb-is-disabled{opacity:.6;cursor:not-allowed}.cb-file-select__icon{display:inline-flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;font-size:1.2rem;color:var(--cb-color-primary-600, #047857);background-color:var(--cb-color-primary-50, #ecfdf5);border-radius:var(--cb-radius-full, 999px)}.cb-file-select__title{font-size:var(--cb-text-sm, .875rem);font-weight:var(--cb-font-weight-semibold, 600)}.cb-file-select__hint{font-size:var(--cb-text-xs, .75rem);color:var(--cb-color-text-muted, #64748b)}.cb-file-select__count{margin-top:var(--cb-space-1, .25rem);font-size:var(--cb-text-xs, .75rem);font-weight:var(--cb-font-weight-semibold, 600);color:var(--cb-color-primary-700, #065f46)}.cb-file-select__count:empty{margin-top:0}.cb-file-select__input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}.cb-file-select:has(.cb-file-select__input:focus-visible){outline:2px solid var(--cb-color-focus-ring, var(--cb-color-primary-500, #10b981));outline-offset:2px}:host-context([data-theme=\"dark\"]) .cb-file-select{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-900, #0f172a);border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-file-select:hover:not(.cb-is-disabled){border-color:var(--cb-color-primary-500, #10b981);background-color:color-mix(in srgb,var(--cb-color-primary-500, #10b981) 12%,transparent)}:host-context([data-theme=\"dark\"]) .cb-file-select__icon{color:var(--cb-color-primary-300, #6ee7b7);background-color:color-mix(in srgb,var(--cb-color-primary-500, #10b981) 18%,transparent)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
54
59
  }
55
60
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbFileSelect, decorators: [{
56
61
  type: Component,
57
62
  args: [{ selector: 'cb-file-select', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: { class: 'cb-file-select-host' }, template: `
58
63
  <label class="cb-file-select" [class.cb-is-disabled]="disabled()">
59
64
  <span class="cb-file-select__icon" aria-hidden="true">↑</span>
60
- <span class="cb-file-select__title">{{ label() }}</span>
61
- <span class="cb-file-select__hint">Formatos: {{ accept() }}</span>
62
- @if (files().length) {
63
- <span class="cb-file-select__count">
64
- {{ files().length }} archivo(s) seleccionado(s)
65
- </span>
66
- }
65
+ <span class="cb-file-select__title">{{ (label() ?? t().selectDocument) }}</span>
66
+ <span class="cb-file-select__hint">{{ fmt(t().formats, accept()) }}</span>
67
+ <span class="cb-file-select__count" aria-live="polite">
68
+ @if (files().length) {
69
+ {{ fmt(t().filesSelected, files().length) }}
70
+ }
71
+ </span>
67
72
  <input
68
73
  class="cb-file-select__input"
69
74
  type="file"
@@ -73,7 +78,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
73
78
  (change)="onFileChange($event)"
74
79
  />
75
80
  </label>
76
- `, styles: [":host{display:block;width:100%;max-width:24rem}.cb-file-select{display:flex;flex-direction:column;align-items:center;gap:var(--cb-space-1, .25rem);box-sizing:border-box;padding:var(--cb-space-5, 1.25rem);font-family:var(--cb-font-sans, inherit);text-align:center;color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-50, #f8fafc);border:1.5px dashed var(--cb-color-border-strong, #94a3b8);border-radius:var(--cb-radius-lg, .75rem);cursor:pointer;transition:border-color var(--cb-duration-fast, .12s) var(--cb-ease, ease),background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-file-select:hover:not(.cb-is-disabled){border-color:var(--cb-color-primary-400, #34d399);background-color:var(--cb-color-primary-50, #ecfdf5)}.cb-file-select.cb-is-disabled{opacity:.6;cursor:not-allowed}.cb-file-select__icon{display:inline-flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;font-size:1.2rem;color:var(--cb-color-primary-600, #047857);background-color:var(--cb-color-primary-50, #ecfdf5);border-radius:var(--cb-radius-full, 999px)}.cb-file-select__title{font-size:var(--cb-text-sm, .875rem);font-weight:var(--cb-font-weight-semibold, 600)}.cb-file-select__hint{font-size:var(--cb-text-xs, .75rem);color:var(--cb-color-text-muted, #64748b)}.cb-file-select__count{margin-top:var(--cb-space-1, .25rem);font-size:var(--cb-text-xs, .75rem);font-weight:var(--cb-font-weight-semibold, 600);color:var(--cb-color-primary-700, #065f46)}.cb-file-select__input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}:host-context([data-theme=\"dark\"]) .cb-file-select{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-900, #0f172a);border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-file-select:hover:not(.cb-is-disabled){border-color:var(--cb-color-primary-500, #10b981);background-color:color-mix(in srgb,var(--cb-color-primary-500, #10b981) 12%,transparent)}:host-context([data-theme=\"dark\"]) .cb-file-select__icon{color:var(--cb-color-primary-300, #6ee7b7);background-color:color-mix(in srgb,var(--cb-color-primary-500, #10b981) 18%,transparent)}\n"] }]
81
+ `, styles: [":host{display:block;width:100%;max-width:24rem}.cb-file-select{display:flex;flex-direction:column;align-items:center;gap:var(--cb-space-1, .25rem);box-sizing:border-box;padding:var(--cb-space-5, 1.25rem);font-family:var(--cb-font-sans, inherit);text-align:center;color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-50, #f8fafc);border:1.5px dashed var(--cb-color-border-strong, #94a3b8);border-radius:var(--cb-radius-lg, .75rem);cursor:pointer;transition:border-color var(--cb-duration-fast, .12s) var(--cb-ease, ease),background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-file-select:hover:not(.cb-is-disabled){border-color:var(--cb-color-primary-400, #34d399);background-color:var(--cb-color-primary-50, #ecfdf5)}.cb-file-select.cb-is-disabled{opacity:.6;cursor:not-allowed}.cb-file-select__icon{display:inline-flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;font-size:1.2rem;color:var(--cb-color-primary-600, #047857);background-color:var(--cb-color-primary-50, #ecfdf5);border-radius:var(--cb-radius-full, 999px)}.cb-file-select__title{font-size:var(--cb-text-sm, .875rem);font-weight:var(--cb-font-weight-semibold, 600)}.cb-file-select__hint{font-size:var(--cb-text-xs, .75rem);color:var(--cb-color-text-muted, #64748b)}.cb-file-select__count{margin-top:var(--cb-space-1, .25rem);font-size:var(--cb-text-xs, .75rem);font-weight:var(--cb-font-weight-semibold, 600);color:var(--cb-color-primary-700, #065f46)}.cb-file-select__count:empty{margin-top:0}.cb-file-select__input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}.cb-file-select:has(.cb-file-select__input:focus-visible){outline:2px solid var(--cb-color-focus-ring, var(--cb-color-primary-500, #10b981));outline-offset:2px}:host-context([data-theme=\"dark\"]) .cb-file-select{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-900, #0f172a);border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-file-select:hover:not(.cb-is-disabled){border-color:var(--cb-color-primary-500, #10b981);background-color:color-mix(in srgb,var(--cb-color-primary-500, #10b981) 12%,transparent)}:host-context([data-theme=\"dark\"]) .cb-file-select__icon{color:var(--cb-color-primary-300, #6ee7b7);background-color:color-mix(in srgb,var(--cb-color-primary-500, #10b981) 18%,transparent)}\n"] }]
77
82
  }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], files: [{ type: i0.Input, args: [{ isSignal: true, alias: "files", required: false }] }, { type: i0.Output, args: ["filesChange"] }], filesSelected: [{ type: i0.Output, args: ["filesSelected"] }] } });
78
83
 
79
84
  /**
@@ -1,5 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { input, output, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { injectCbTranslation } from '@caribeng/ui';
3
4
 
4
5
  /**
5
6
  * Float-menu de Caribe Design: menú flotante en forma de píldora con opciones
@@ -12,6 +13,8 @@ import { input, output, ViewEncapsulation, ChangeDetectionStrategy, Component }
12
13
  */
13
14
  class CbFloatMenu {
14
15
  constructor() {
16
+ /** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
17
+ this.t = injectCbTranslation();
15
18
  /** Opciones del menú. */
16
19
  this.items = input([], /* @ts-ignore */
17
20
  ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
@@ -19,14 +22,14 @@ class CbFloatMenu {
19
22
  this.activeId = input('', /* @ts-ignore */
20
23
  ...(ngDevMode ? [{ debugName: "activeId" }] : /* istanbul ignore next */ []));
21
24
  /** Etiqueta accesible. */
22
- this.ariaLabel = input('Menú flotante', /* @ts-ignore */
25
+ this.ariaLabel = input(undefined, /* @ts-ignore */
23
26
  ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
24
27
  /** Emite la opción seleccionada. */
25
28
  this.select = output();
26
29
  }
27
30
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbFloatMenu, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
28
31
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbFloatMenu, isStandalone: true, selector: "cb-float-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, activeId: { classPropertyName: "activeId", publicName: "activeId", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { select: "select" }, host: { classAttribute: "cb-float-menu-host" }, ngImport: i0, template: `
29
- <nav class="cb-float-menu" [attr.aria-label]="ariaLabel()">
32
+ <nav class="cb-float-menu" [attr.aria-label]="(ariaLabel() ?? t().floatingMenu)">
30
33
  @for (item of items(); track item.id) {
31
34
  <button
32
35
  type="button"
@@ -44,7 +47,7 @@ class CbFloatMenu {
44
47
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbFloatMenu, decorators: [{
45
48
  type: Component,
46
49
  args: [{ selector: 'cb-float-menu', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: { class: 'cb-float-menu-host' }, template: `
47
- <nav class="cb-float-menu" [attr.aria-label]="ariaLabel()">
50
+ <nav class="cb-float-menu" [attr.aria-label]="(ariaLabel() ?? t().floatingMenu)">
48
51
  @for (item of items(); track item.id) {
49
52
  <button
50
53
  type="button"
@@ -13,13 +13,15 @@ import { input, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@a
13
13
  class CbFooter {
14
14
  constructor() {
15
15
  /** Texto de copyright. */
16
- this.copyright = input('© 2026 CaribeNG Design System. Todos los derechos reservados.', /* @ts-ignore */
16
+ this.copyright = input('', /* @ts-ignore */
17
17
  ...(ngDevMode ? [{ debugName: "copyright" }] : /* istanbul ignore next */ []));
18
18
  }
19
19
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbFooter, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
20
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: CbFooter, isStandalone: true, selector: "cb-footer", inputs: { copyright: { classPropertyName: "copyright", publicName: "copyright", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "cb-footer-host" }, ngImport: i0, template: `
20
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbFooter, isStandalone: true, selector: "cb-footer", inputs: { copyright: { classPropertyName: "copyright", publicName: "copyright", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "cb-footer-host" }, ngImport: i0, template: `
21
21
  <footer class="cb-footer">
22
- <span class="cb-footer__copy">{{ copyright() }}</span>
22
+ @if (copyright()) {
23
+ <span class="cb-footer__copy">{{ copyright() }}</span>
24
+ }
23
25
  <div class="cb-footer__links">
24
26
  <ng-content />
25
27
  </div>
@@ -30,7 +32,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
30
32
  type: Component,
31
33
  args: [{ selector: 'cb-footer', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: { class: 'cb-footer-host' }, template: `
32
34
  <footer class="cb-footer">
33
- <span class="cb-footer__copy">{{ copyright() }}</span>
35
+ @if (copyright()) {
36
+ <span class="cb-footer__copy">{{ copyright() }}</span>
37
+ }
34
38
  <div class="cb-footer__links">
35
39
  <ng-content />
36
40
  </div>
@@ -1,5 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { input, output, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { injectCbTranslation } from '@caribeng/ui';
3
4
 
4
5
  /**
5
6
  * Header de Caribe Design: cabecera de pantalla con título, subtítulo opcional,
@@ -12,8 +13,10 @@ import { input, output, ViewEncapsulation, ChangeDetectionStrategy, Component }
12
13
  */
13
14
  class CbHeader {
14
15
  constructor() {
16
+ /** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
17
+ this.t = injectCbTranslation();
15
18
  /** Título principal. */
16
- this.title = input('CaribeNG', /* @ts-ignore */
19
+ this.title = input('', /* @ts-ignore */
17
20
  ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
18
21
  /** Subtítulo opcional. */
19
22
  this.subtitle = input('', /* @ts-ignore */
@@ -32,7 +35,7 @@ class CbHeader {
32
35
  <button
33
36
  type="button"
34
37
  class="cb-header__back"
35
- aria-label="Volver"
38
+ [attr.aria-label]="t().back"
36
39
  (click)="backClick.emit()"
37
40
  >
38
41
  <span aria-hidden="true">←</span>
@@ -60,7 +63,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
60
63
  <button
61
64
  type="button"
62
65
  class="cb-header__back"
63
- aria-label="Volver"
66
+ [attr.aria-label]="t().back"
64
67
  (click)="backClick.emit()"
65
68
  >
66
69
  <span aria-hidden="true">←</span>
@@ -1,6 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { input, output, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { CbIcon } from '@caribeng/ui/icon';
4
+ import { injectCbTranslation } from '@caribeng/ui';
4
5
 
5
6
  /**
6
7
  * Icon-button de Caribe Design: botón circular con un único icono. Útil para
@@ -13,11 +14,13 @@ import { CbIcon } from '@caribeng/ui/icon';
13
14
  */
14
15
  class CbIconButton {
15
16
  constructor() {
17
+ /** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
18
+ this.t = injectCbTranslation();
16
19
  /** Nombre del icono del set núcleo. */
17
20
  this.icon = input('plus', /* @ts-ignore */
18
21
  ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
19
22
  /** Etiqueta accesible del botón. */
20
- this.ariaLabel = input('Acción', /* @ts-ignore */
23
+ this.ariaLabel = input(undefined, /* @ts-ignore */
21
24
  ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
22
25
  /** Variante visual. */
23
26
  this.variant = input('solid', /* @ts-ignore */
@@ -35,7 +38,7 @@ class CbIconButton {
35
38
  class="cb-icon-button"
36
39
  [class.cb-icon-button--ghost]="variant() === 'ghost'"
37
40
  [disabled]="disabled()"
38
- [attr.aria-label]="ariaLabel() || icon()"
41
+ [attr.aria-label]="(ariaLabel() ?? t().action) || icon()"
39
42
  (click)="!disabled() && pressed.emit($event)"
40
43
  >
41
44
  <cb-icon [name]="icon()" [size]="18" aria-hidden="true" />
@@ -50,7 +53,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
50
53
  class="cb-icon-button"
51
54
  [class.cb-icon-button--ghost]="variant() === 'ghost'"
52
55
  [disabled]="disabled()"
53
- [attr.aria-label]="ariaLabel() || icon()"
56
+ [attr.aria-label]="(ariaLabel() ?? t().action) || icon()"
54
57
  (click)="!disabled() && pressed.emit($event)"
55
58
  >
56
59
  <cb-icon [name]="icon()" [size]="18" aria-hidden="true" />
@@ -1,13 +1,16 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { input, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { injectCbTranslation } from '@caribeng/ui';
3
4
 
4
5
  class CbIllustration {
5
6
  constructor() {
7
+ /** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
8
+ this.t = injectCbTranslation();
6
9
  this.name = input('transfer-success', /* @ts-ignore */
7
10
  ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
8
11
  this.size = input('160px', /* @ts-ignore */
9
12
  ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
10
- this.alt = input('Ilustración Caribe', /* @ts-ignore */
13
+ this.alt = input(undefined, /* @ts-ignore */
11
14
  ...(ngDevMode ? [{ debugName: "alt" }] : /* istanbul ignore next */ []));
12
15
  }
13
16
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbIllustration, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
@@ -15,7 +18,7 @@ class CbIllustration {
15
18
  <svg
16
19
  viewBox="0 0 160 120"
17
20
  role="img"
18
- [attr.aria-label]="alt() || name()"
21
+ [attr.aria-label]="(alt() ?? t().illustration) || name()"
19
22
  style="width: 100%; height: auto"
20
23
  >
21
24
  <rect x="12" y="14" width="136" height="92" rx="16" fill="var(--cb-color-primary-50, #ecfdf5)" />
@@ -34,7 +37,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
34
37
  <svg
35
38
  viewBox="0 0 160 120"
36
39
  role="img"
37
- [attr.aria-label]="alt() || name()"
40
+ [attr.aria-label]="(alt() ?? t().illustration) || name()"
38
41
  style="width: 100%; height: auto"
39
42
  >
40
43
  <rect x="12" y="14" width="136" height="92" rx="16" fill="var(--cb-color-primary-50, #ecfdf5)" />
@@ -1,5 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { input, model, output, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { injectCbTranslation } from '@caribeng/ui';
3
4
 
4
5
  /**
5
6
  * Inline-alert de Caribe Design: aviso compacto en línea para formularios y
@@ -12,6 +13,8 @@ import { input, model, output, ViewEncapsulation, ChangeDetectionStrategy, Compo
12
13
  */
13
14
  class CbInlineAlert {
14
15
  constructor() {
16
+ /** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
17
+ this.t = injectCbTranslation();
15
18
  this.title = input('', /* @ts-ignore */
16
19
  ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
17
20
  this.status = input('info', /* @ts-ignore */
@@ -53,7 +56,7 @@ class CbInlineAlert {
53
56
  <button
54
57
  type="button"
55
58
  class="cb-inline-alert__close"
56
- aria-label="Cerrar"
59
+ [attr.aria-label]="t().close"
57
60
  (click)="close()"
58
61
  >
59
62
  ×
@@ -79,7 +82,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
79
82
  <button
80
83
  type="button"
81
84
  class="cb-inline-alert__close"
82
- aria-label="Cerrar"
85
+ [attr.aria-label]="t().close"
83
86
  (click)="close()"
84
87
  >
85
88
  ×