@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,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { input, booleanAttribute, model, output, signal, forwardRef, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
4
- import { cbFieldState } from '@caribeng/ui';
4
+ import { injectCbTranslation, cbFieldState } from '@caribeng/ui';
5
5
 
6
6
  /**
7
7
  * Input-search de Caribe Design: campo de búsqueda con icono, botón de limpiar
@@ -14,7 +14,9 @@ import { cbFieldState } from '@caribeng/ui';
14
14
  */
15
15
  class CbInputSearch {
16
16
  constructor() {
17
- this.placeholder = input('Buscar…', /* @ts-ignore */
17
+ /** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
18
+ this.t = injectCbTranslation();
19
+ this.placeholder = input(undefined, /* @ts-ignore */
18
20
  ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
19
21
  this.clearable = input(true, /* @ts-ignore */
20
22
  ...(ngDevMode ? [{ debugName: "clearable" }] : /* istanbul ignore next */ []));
@@ -69,14 +71,15 @@ class CbInputSearch {
69
71
  >
70
72
  <span class="cb-input-search__icon" aria-hidden="true">⌕</span>
71
73
  <input
74
+ #field
72
75
  class="cb-input-search__field"
73
76
  [attr.aria-invalid]="fieldState.invalid() ? 'true' : null"
74
77
  [attr.aria-required]="fieldState.required() || null"
75
78
  type="search"
76
79
  [value]="value()"
77
- [placeholder]="placeholder()"
80
+ [placeholder]="(placeholder() ?? t().search)"
78
81
  [disabled]="disabled() || cvaDisabled()"
79
- [attr.aria-label]="placeholder()"
82
+ [attr.aria-label]="(placeholder() ?? t().search)"
80
83
  (input)="onInput($event)"
81
84
  (blur)="onTouched()"
82
85
  (keydown.enter)="search.emit(value())"
@@ -85,8 +88,8 @@ class CbInputSearch {
85
88
  <button
86
89
  type="button"
87
90
  class="cb-input-search__clear"
88
- aria-label="Limpiar búsqueda"
89
- (click)="clear()"
91
+ [attr.aria-label]="t().clearSearch"
92
+ (click)="clear(); field.focus()"
90
93
  >
91
94
  ×
92
95
  </button>
@@ -110,14 +113,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
110
113
  >
111
114
  <span class="cb-input-search__icon" aria-hidden="true">⌕</span>
112
115
  <input
116
+ #field
113
117
  class="cb-input-search__field"
114
118
  [attr.aria-invalid]="fieldState.invalid() ? 'true' : null"
115
119
  [attr.aria-required]="fieldState.required() || null"
116
120
  type="search"
117
121
  [value]="value()"
118
- [placeholder]="placeholder()"
122
+ [placeholder]="(placeholder() ?? t().search)"
119
123
  [disabled]="disabled() || cvaDisabled()"
120
- [attr.aria-label]="placeholder()"
124
+ [attr.aria-label]="(placeholder() ?? t().search)"
121
125
  (input)="onInput($event)"
122
126
  (blur)="onTouched()"
123
127
  (keydown.enter)="search.emit(value())"
@@ -126,8 +130,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
126
130
  <button
127
131
  type="button"
128
132
  class="cb-input-search__clear"
129
- aria-label="Limpiar búsqueda"
130
- (click)="clear()"
133
+ [attr.aria-label]="t().clearSearch"
134
+ (click)="clear(); field.focus()"
131
135
  >
132
136
  ×
133
137
  </button>
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { input, booleanAttribute, model, signal, forwardRef, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
4
- import { cbFieldState } from '@caribeng/ui';
4
+ import { injectCbTranslation, cbFieldState } from '@caribeng/ui';
5
5
 
6
6
  /**
7
7
  * Input-select de Caribe Design: desplegable nativo estilizado con etiqueta,
@@ -14,9 +14,11 @@ import { cbFieldState } from '@caribeng/ui';
14
14
  */
15
15
  class CbInputSelect {
16
16
  constructor() {
17
+ /** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
18
+ this.t = injectCbTranslation();
17
19
  this.label = input('', /* @ts-ignore */
18
20
  ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
19
- this.placeholder = input('Seleccione una opción', /* @ts-ignore */
21
+ this.placeholder = input(undefined, /* @ts-ignore */
20
22
  ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
21
23
  this.options = input([], /* @ts-ignore */
22
24
  ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
@@ -83,16 +85,16 @@ class CbInputSelect {
83
85
  [class.cb-is-invalid]="fieldState.invalid()"
84
86
  [attr.aria-invalid]="fieldState.invalid() ? 'true' : null"
85
87
  [attr.aria-required]="fieldState.required() || null"
86
- [value]="value()"
87
88
  [disabled]="disabled() || cvaDisabled()"
88
89
  (change)="onSelect($event)"
89
90
  (blur)="onTouched()"
90
91
  >
91
- @if (placeholder()) {
92
- <option value="" disabled>{{ placeholder() }}</option>
92
+ @if ((placeholder() ?? t().select)) {
93
+ <option value="" disabled [selected]="!value()">{{ (placeholder() ?? t().select) }}</option>
93
94
  }
95
+ <!-- [selected] por opción: [value] en el <select> se aplicaría antes de crear las opciones -->
94
96
  @for (opt of options(); track opt.value) {
95
- <option [value]="opt.value">{{ opt.label }}</option>
97
+ <option [value]="opt.value" [selected]="opt.value === value()">{{ opt.label }}</option>
96
98
  }
97
99
  </select>
98
100
  <span class="cb-input-select__chevron" aria-hidden="true">▾</span>
@@ -127,16 +129,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
127
129
  [class.cb-is-invalid]="fieldState.invalid()"
128
130
  [attr.aria-invalid]="fieldState.invalid() ? 'true' : null"
129
131
  [attr.aria-required]="fieldState.required() || null"
130
- [value]="value()"
131
132
  [disabled]="disabled() || cvaDisabled()"
132
133
  (change)="onSelect($event)"
133
134
  (blur)="onTouched()"
134
135
  >
135
- @if (placeholder()) {
136
- <option value="" disabled>{{ placeholder() }}</option>
136
+ @if ((placeholder() ?? t().select)) {
137
+ <option value="" disabled [selected]="!value()">{{ (placeholder() ?? t().select) }}</option>
137
138
  }
139
+ <!-- [selected] por opción: [value] en el <select> se aplicaría antes de crear las opciones -->
138
140
  @for (opt of options(); track opt.value) {
139
- <option [value]="opt.value">{{ opt.label }}</option>
141
+ <option [value]="opt.value" [selected]="opt.value === value()">{{ opt.label }}</option>
140
142
  }
141
143
  </select>
142
144
  <span class="cb-input-select__chevron" aria-hidden="true">▾</span>
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, booleanAttribute, model, signal, computed, forwardRef, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { input, booleanAttribute, model, signal, inject, ElementRef, computed, forwardRef, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
4
- import { cbFieldState } from '@caribeng/ui';
4
+ import { injectCbTranslation, cbFormat, cbFieldState } from '@caribeng/ui';
5
5
 
6
6
  /**
7
7
  * Input-token de Caribe Design: entrada de código OTP con casillas por dígito,
@@ -14,6 +14,10 @@ import { cbFieldState } from '@caribeng/ui';
14
14
  */
15
15
  class CbInputToken {
16
16
  constructor() {
17
+ /** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
18
+ this.t = injectCbTranslation();
19
+ /** Rellena `{0}`, `{1}`… de un texto traducido. */
20
+ this.fmt = cbFormat;
17
21
  this.numInputs = input(6, /* @ts-ignore */
18
22
  ...(ngDevMode ? [{ debugName: "numInputs" }] : /* istanbul ignore next */ []));
19
23
  this.unmasked = input(false, /* @ts-ignore */
@@ -30,23 +34,65 @@ class CbInputToken {
30
34
  ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
31
35
  this.cvaDisabled = signal(false, /* @ts-ignore */
32
36
  ...(ngDevMode ? [{ debugName: "cvaDisabled" }] : /* istanbul ignore next */ []));
37
+ this.host = inject(ElementRef);
33
38
  this.slots = computed(() => Array.from({ length: Math.max(3, Math.min(8, this.numInputs())) }, (_, i) => i), /* @ts-ignore */
34
39
  ...(ngDevMode ? [{ debugName: "slots" }] : /* istanbul ignore next */ []));
35
40
  this.onChange = () => { };
36
41
  this.onTouched = () => { };
37
42
  }
38
43
  charAt(index) {
39
- return (this.value() ?? '')[index] ?? '';
44
+ const ch = (this.value() ?? '')[index] ?? '';
45
+ return ch === ' ' ? '' : ch;
40
46
  }
47
+ /** Solo acepta dígitos y pasa a la casilla siguiente al escribir uno. */
41
48
  onDigitInput(event, index) {
42
- const ch = (event.target.value || '').slice(-1);
43
- const chars = this.slots().map((i) => this.charAt(i));
44
- chars[index] = ch;
45
- const next = chars.join('');
49
+ const el = event.target;
50
+ const ch = (el.value || '').slice(-1);
51
+ const digit = /^[0-9]$/.test(ch) ? ch : '';
52
+ el.value = digit;
53
+ this.setChar(index, digit);
54
+ if (digit)
55
+ this.focusSlot(index + 1);
56
+ }
57
+ /** Flechas mueven el foco; Backspace borra la casilla actual o, si está vacía, la anterior. */
58
+ onKeydown(event, index) {
59
+ if (event.key === 'ArrowLeft' || event.key === 'ArrowRight') {
60
+ event.preventDefault();
61
+ this.focusSlot(index + (event.key === 'ArrowLeft' ? -1 : 1));
62
+ }
63
+ else if (event.key === 'Backspace') {
64
+ event.preventDefault();
65
+ const target = this.charAt(index) || index === 0 ? index : index - 1;
66
+ this.setChar(target, '');
67
+ this.slotEls()[target].value = '';
68
+ this.focusSlot(target);
69
+ }
70
+ }
71
+ /** Pegar reparte los dígitos entre las casillas y enfoca la última rellenada. */
72
+ onPaste(event) {
73
+ event.preventDefault();
74
+ const digits = (event.clipboardData?.getData('text') ?? '').replace(/[^0-9]/g, '').slice(0, this.slots().length);
75
+ if (!digits)
76
+ return;
77
+ this.updateValue(digits);
78
+ this.focusSlot(digits.length - 1);
79
+ }
80
+ setChar(index, ch) {
81
+ const chars = this.slots().map((i) => this.charAt(i) || ' ');
82
+ chars[index] = ch || ' ';
83
+ this.updateValue(chars.join('').trimEnd());
84
+ }
85
+ updateValue(next) {
46
86
  this.value.set(next);
47
87
  this.onChange(next);
48
88
  this.onTouched();
49
89
  }
90
+ slotEls() {
91
+ return Array.from(this.host.nativeElement.querySelectorAll('.cb-input-token__slot'));
92
+ }
93
+ focusSlot(index) {
94
+ this.slotEls()[index]?.focus();
95
+ }
50
96
  writeValue(val) {
51
97
  this.value.set(val ?? '');
52
98
  }
@@ -71,7 +117,7 @@ class CbInputToken {
71
117
  <div
72
118
  class="cb-input-token__slots"
73
119
  role="group"
74
- aria-label="Código de verificación"
120
+ [attr.aria-label]="t().verificationCode"
75
121
  >
76
122
  @for (slot of slots(); track slot) {
77
123
  <input
@@ -83,8 +129,10 @@ class CbInputToken {
83
129
  inputmode="numeric"
84
130
  [value]="charAt(slot)"
85
131
  [disabled]="disabled() || cvaDisabled()"
86
- [attr.aria-label]="'Dígito ' + (slot + 1)"
132
+ [attr.aria-label]="fmt(t().digit, slot + 1)"
87
133
  (input)="onDigitInput($event, slot)"
134
+ (keydown)="onKeydown($event, slot)"
135
+ (paste)="onPaste($event)"
88
136
  (blur)="onTouched()"
89
137
  />
90
138
  }
@@ -108,7 +156,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
108
156
  <div
109
157
  class="cb-input-token__slots"
110
158
  role="group"
111
- aria-label="Código de verificación"
159
+ [attr.aria-label]="t().verificationCode"
112
160
  >
113
161
  @for (slot of slots(); track slot) {
114
162
  <input
@@ -120,8 +168,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
120
168
  inputmode="numeric"
121
169
  [value]="charAt(slot)"
122
170
  [disabled]="disabled() || cvaDisabled()"
123
- [attr.aria-label]="'Dígito ' + (slot + 1)"
171
+ [attr.aria-label]="fmt(t().digit, slot + 1)"
124
172
  (input)="onDigitInput($event, slot)"
173
+ (keydown)="onKeydown($event, slot)"
174
+ (paste)="onPaste($event)"
125
175
  (blur)="onTouched()"
126
176
  />
127
177
  }
@@ -1,5 +1,6 @@
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
  /**
5
6
  * Enlace de Caribe Design. Renderiza un ancla accesible con estilos de marca,
@@ -13,6 +14,8 @@ import { input, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@a
13
14
  */
14
15
  class CbLink {
15
16
  constructor() {
17
+ /** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
18
+ this.t = injectCbTranslation();
16
19
  /** Destino del enlace. */
17
20
  this.href = input('#', /* @ts-ignore */
18
21
  ...(ngDevMode ? [{ debugName: "href" }] : /* istanbul ignore next */ []));
@@ -41,9 +44,10 @@ class CbLink {
41
44
  <span class="cb-link__label">{{ label() }}<ng-content /></span>
42
45
  @if (external()) {
43
46
  <span class="cb-link__external" aria-hidden="true">↗</span>
47
+ <span class="cb-link__sr">{{ t().opensInNewTab }}</span>
44
48
  }
45
49
  </a>
46
- `, isInline: true, styles: [":host{display:inline-flex;align-items:center}.cb-link{display:inline-flex;align-items:center;gap:var(--cb-space-1, .25rem);font-family:var(--cb-font-sans, inherit);font-size:var(--cb-text-sm, .875rem);font-weight:var(--cb-font-weight-medium, 500);line-height:var(--cb-line-height-normal, 1.5);color:var(--cb-color-primary-600, #047857);text-decoration:none;cursor:pointer;border-radius:var(--cb-radius-sm, .25rem);transition:color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-link__label{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}.cb-link:hover{color:var(--cb-color-primary-700, #065f46)}.cb-link:active{color:var(--cb-color-primary-800, #064e3b)}.cb-link:focus-visible{outline:2px solid var(--cb-color-focus-ring, var(--cb-color-primary-500, #10b981));outline-offset:2px}.cb-link__external{font-size:.85em;line-height:1}.cb-link.cb-is-disabled{color:var(--cb-color-text-muted, #94a3b8);pointer-events:none;cursor:not-allowed}:host-context([data-theme=\"dark\"]) .cb-link{color:var(--cb-color-primary-400, #34d399)}:host-context([data-theme=\"dark\"]) .cb-link:hover{color:var(--cb-color-primary-300, #6ee7b7)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
50
+ `, isInline: true, styles: [":host{display:inline-flex;align-items:center}.cb-link{display:inline-flex;align-items:center;gap:var(--cb-space-1, .25rem);font-family:var(--cb-font-sans, inherit);font-size:var(--cb-text-sm, .875rem);font-weight:var(--cb-font-weight-medium, 500);line-height:var(--cb-line-height-normal, 1.5);color:var(--cb-color-primary-600, #047857);text-decoration:none;cursor:pointer;border-radius:var(--cb-radius-sm, .25rem);transition:color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-link__label{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}.cb-link:hover{color:var(--cb-color-primary-700, #065f46)}.cb-link:active{color:var(--cb-color-primary-800, #064e3b)}.cb-link:focus-visible{outline:2px solid var(--cb-color-focus-ring, var(--cb-color-primary-500, #10b981));outline-offset:2px}.cb-link__external{font-size:.85em;line-height:1}.cb-link.cb-is-disabled{color:var(--cb-color-text-muted, #94a3b8);pointer-events:none;cursor:not-allowed}:host-context([data-theme=\"dark\"]) .cb-link{color:var(--cb-color-primary-400, #34d399)}:host-context([data-theme=\"dark\"]) .cb-link:hover{color:var(--cb-color-primary-300, #6ee7b7)}.cb-link__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
47
51
  }
48
52
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbLink, decorators: [{
49
53
  type: Component,
@@ -61,9 +65,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
61
65
  <span class="cb-link__label">{{ label() }}<ng-content /></span>
62
66
  @if (external()) {
63
67
  <span class="cb-link__external" aria-hidden="true">↗</span>
68
+ <span class="cb-link__sr">{{ t().opensInNewTab }}</span>
64
69
  }
65
70
  </a>
66
- `, styles: [":host{display:inline-flex;align-items:center}.cb-link{display:inline-flex;align-items:center;gap:var(--cb-space-1, .25rem);font-family:var(--cb-font-sans, inherit);font-size:var(--cb-text-sm, .875rem);font-weight:var(--cb-font-weight-medium, 500);line-height:var(--cb-line-height-normal, 1.5);color:var(--cb-color-primary-600, #047857);text-decoration:none;cursor:pointer;border-radius:var(--cb-radius-sm, .25rem);transition:color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-link__label{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}.cb-link:hover{color:var(--cb-color-primary-700, #065f46)}.cb-link:active{color:var(--cb-color-primary-800, #064e3b)}.cb-link:focus-visible{outline:2px solid var(--cb-color-focus-ring, var(--cb-color-primary-500, #10b981));outline-offset:2px}.cb-link__external{font-size:.85em;line-height:1}.cb-link.cb-is-disabled{color:var(--cb-color-text-muted, #94a3b8);pointer-events:none;cursor:not-allowed}:host-context([data-theme=\"dark\"]) .cb-link{color:var(--cb-color-primary-400, #34d399)}:host-context([data-theme=\"dark\"]) .cb-link:hover{color:var(--cb-color-primary-300, #6ee7b7)}\n"] }]
71
+ `, styles: [":host{display:inline-flex;align-items:center}.cb-link{display:inline-flex;align-items:center;gap:var(--cb-space-1, .25rem);font-family:var(--cb-font-sans, inherit);font-size:var(--cb-text-sm, .875rem);font-weight:var(--cb-font-weight-medium, 500);line-height:var(--cb-line-height-normal, 1.5);color:var(--cb-color-primary-600, #047857);text-decoration:none;cursor:pointer;border-radius:var(--cb-radius-sm, .25rem);transition:color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-link__label{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}.cb-link:hover{color:var(--cb-color-primary-700, #065f46)}.cb-link:active{color:var(--cb-color-primary-800, #064e3b)}.cb-link:focus-visible{outline:2px solid var(--cb-color-focus-ring, var(--cb-color-primary-500, #10b981));outline-offset:2px}.cb-link__external{font-size:.85em;line-height:1}.cb-link.cb-is-disabled{color:var(--cb-color-text-muted, #94a3b8);pointer-events:none;cursor:not-allowed}:host-context([data-theme=\"dark\"]) .cb-link{color:var(--cb-color-primary-400, #34d399)}:host-context([data-theme=\"dark\"]) .cb-link:hover{color:var(--cb-color-primary-300, #6ee7b7)}.cb-link__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}\n"] }]
67
72
  }], propDecorators: { href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], external: [{ type: i0.Input, args: [{ isSignal: true, alias: "external", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
68
73
 
69
74
  /**
@@ -1,5 +1,6 @@
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
  /**
5
6
  * Loader de Caribe Design: indicador de carga en línea con spinner y texto.
@@ -11,7 +12,9 @@ import { input, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@a
11
12
  */
12
13
  class CbLoader {
13
14
  constructor() {
14
- this.text = input('Cargando información…', /* @ts-ignore */
15
+ /** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
16
+ this.t = injectCbTranslation();
17
+ this.text = input(undefined, /* @ts-ignore */
15
18
  ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
16
19
  this.size = input('md', /* @ts-ignore */
17
20
  ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
@@ -20,8 +23,8 @@ class CbLoader {
20
23
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbLoader, isStandalone: true, selector: "cb-loader", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "cb-loader-host" }, ngImport: i0, template: `
21
24
  <div class="cb-loader cb-loader--{{ size() }}" role="status" aria-live="polite">
22
25
  <span class="cb-loader__spinner" aria-hidden="true"></span>
23
- @if (text()) {
24
- <span class="cb-loader__text">{{ text() }}</span>
26
+ @if ((text() ?? t().loadingMessage)) {
27
+ <span class="cb-loader__text">{{ (text() ?? t().loadingMessage) }}</span>
25
28
  }
26
29
  </div>
27
30
  `, isInline: true, styles: [":host{display:inline-flex}.cb-loader{display:inline-flex;align-items:center;gap:var(--cb-space-2, .65rem);font-family:var(--cb-font-sans, inherit);font-size:var(--cb-text-sm, .875rem);color:var(--cb-color-text, #334155)}.cb-loader__spinner{flex:none;display:inline-block;width:1.1rem;height:1.1rem;border:2px solid var(--cb-color-surface-300, #cbd5e1);border-top-color:var(--cb-color-primary-500, #10b981);border-radius:var(--cb-radius-full, 999px);animation:cb-loader-spin .7s linear infinite}.cb-loader--sm .cb-loader__spinner{width:.85rem;height:.85rem}.cb-loader--lg .cb-loader__spinner{width:1.5rem;height:1.5rem;border-width:3px}@keyframes cb-loader-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.cb-loader__spinner{animation-duration:2s}}:host-context([data-theme=\"dark\"]) .cb-loader{color:var(--cb-color-surface-100, #f1f5f9)}:host-context([data-theme=\"dark\"]) .cb-loader__spinner{border-color:var(--cb-color-surface-600, #475569);border-top-color:var(--cb-color-primary-500, #10b981)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -31,8 +34,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
31
34
  args: [{ selector: 'cb-loader', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: { class: 'cb-loader-host' }, template: `
32
35
  <div class="cb-loader cb-loader--{{ size() }}" role="status" aria-live="polite">
33
36
  <span class="cb-loader__spinner" aria-hidden="true"></span>
34
- @if (text()) {
35
- <span class="cb-loader__text">{{ text() }}</span>
37
+ @if ((text() ?? t().loadingMessage)) {
38
+ <span class="cb-loader__text">{{ (text() ?? t().loadingMessage) }}</span>
36
39
  }
37
40
  </div>
38
41
  `, styles: [":host{display:inline-flex}.cb-loader{display:inline-flex;align-items:center;gap:var(--cb-space-2, .65rem);font-family:var(--cb-font-sans, inherit);font-size:var(--cb-text-sm, .875rem);color:var(--cb-color-text, #334155)}.cb-loader__spinner{flex:none;display:inline-block;width:1.1rem;height:1.1rem;border:2px solid var(--cb-color-surface-300, #cbd5e1);border-top-color:var(--cb-color-primary-500, #10b981);border-radius:var(--cb-radius-full, 999px);animation:cb-loader-spin .7s linear infinite}.cb-loader--sm .cb-loader__spinner{width:.85rem;height:.85rem}.cb-loader--lg .cb-loader__spinner{width:1.5rem;height:1.5rem;border-width:3px}@keyframes cb-loader-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.cb-loader__spinner{animation-duration:2s}}:host-context([data-theme=\"dark\"]) .cb-loader{color:var(--cb-color-surface-100, #f1f5f9)}:host-context([data-theme=\"dark\"]) .cb-loader__spinner{border-color:var(--cb-color-surface-600, #475569);border-top-color:var(--cb-color-primary-500, #10b981)}\n"] }]
@@ -1,6 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, model, output, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { input, model, output, viewChild, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import * as i1 from '@angular/cdk/a11y';
4
+ import { A11yModule } from '@angular/cdk/a11y';
3
5
  import { CbButton } from '@caribeng/ui/button';
6
+ import { injectCbTranslation, cbOverlayFocus } from '@caribeng/ui';
4
7
 
5
8
  /**
6
9
  * Modal de Caribe Design: diálogo centrado con backdrop, cabecera, contenido y
@@ -11,38 +14,48 @@ import { CbButton } from '@caribeng/ui/button';
11
14
  * <cb-modal title="Confirmar" [(visible)]="open" (confirm)="ok()">…</cb-modal>
12
15
  * ```
13
16
  */
17
+ let nextId = 0;
14
18
  class CbModal {
15
19
  constructor() {
20
+ /** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
21
+ this.t = injectCbTranslation();
16
22
  this.title = input('', /* @ts-ignore */
17
23
  ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
18
- this.confirmLabel = input('Aceptar', /* @ts-ignore */
24
+ this.confirmLabel = input(undefined, /* @ts-ignore */
19
25
  ...(ngDevMode ? [{ debugName: "confirmLabel" }] : /* istanbul ignore next */ []));
20
26
  this.visible = model(false, /* @ts-ignore */
21
27
  ...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
22
28
  this.confirm = output();
23
29
  this.closed = output();
30
+ this.titleId = `cb-modal-${++nextId}-title`;
31
+ this.closeBtn = viewChild('closeBtn', /* @ts-ignore */
32
+ ...(ngDevMode ? [{ debugName: "closeBtn" }] : /* istanbul ignore next */ []));
33
+ cbOverlayFocus({ open: this.visible, initialFocus: () => this.closeBtn()?.nativeElement });
24
34
  }
25
35
  close() {
26
36
  this.visible.set(false);
27
37
  this.closed.emit();
28
38
  }
29
39
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbModal, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
30
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbModal, isStandalone: true, selector: "cb-modal", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, confirmLabel: { classPropertyName: "confirmLabel", publicName: "confirmLabel", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", confirm: "confirm", closed: "closed" }, ngImport: i0, template: `
40
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbModal, isStandalone: true, selector: "cb-modal", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, confirmLabel: { classPropertyName: "confirmLabel", publicName: "confirmLabel", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", confirm: "confirm", closed: "closed" }, viewQueries: [{ propertyName: "closeBtn", first: true, predicate: ["closeBtn"], descendants: true, isSignal: true }], ngImport: i0, template: `
31
41
  @if (visible()) {
32
42
  <div class="cb-modal__backdrop" (click)="close()">
33
43
  <div
34
44
  class="cb-modal"
35
45
  role="dialog"
36
46
  aria-modal="true"
37
- [attr.aria-label]="title()"
47
+ [attr.aria-labelledby]="title() ? titleId : null"
48
+ cdkTrapFocus
38
49
  (click)="$event.stopPropagation()"
50
+ (keydown.escape)="close()"
39
51
  >
40
52
  <header class="cb-modal__head">
41
- <h2 class="cb-modal__title">{{ title() }}</h2>
53
+ <h2 class="cb-modal__title" [id]="titleId">{{ title() }}</h2>
42
54
  <button
55
+ #closeBtn
43
56
  type="button"
44
57
  class="cb-modal__close"
45
- aria-label="Cerrar"
58
+ [attr.aria-label]="t().close"
46
59
  (click)="close()"
47
60
  >
48
61
  ×
@@ -51,33 +64,36 @@ class CbModal {
51
64
  <div class="cb-modal__body"><ng-content /></div>
52
65
  <footer class="cb-modal__foot">
53
66
  <cb-button variant="text" severity="secondary" (click)="close()">
54
- Cancelar
67
+ {{ t().cancel }}
55
68
  </cb-button>
56
- <cb-button (click)="confirm.emit()">{{ confirmLabel() }}</cb-button>
69
+ <cb-button (click)="confirm.emit()">{{ (confirmLabel() ?? t().accept) }}</cb-button>
57
70
  </footer>
58
71
  </div>
59
72
  </div>
60
73
  }
61
- `, isInline: true, styles: [":host{display:contents}.cb-modal__backdrop{position:fixed;inset:0;z-index:var(--cb-z-modal, 1000);display:flex;align-items:center;justify-content:center;padding:var(--cb-space-4, 1rem);background-color:var(--cb-color-overlay, rgba(15, 23, 42, .55));animation:cb-modal-fade var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-modal{display:flex;flex-direction:column;width:100%;max-width:28rem;max-height:90vh;overflow:hidden;font-family:var(--cb-font-sans, inherit);color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-0, #ffffff);border-radius:var(--cb-radius-lg, .75rem);box-shadow:var(--cb-shadow-lg, 0 24px 48px rgba(0, 0, 0, .28));animation:cb-modal-in var(--cb-duration-normal, .2s) var(--cb-ease-out, ease-out)}.cb-modal__head{display:flex;align-items:center;justify-content:space-between;gap:var(--cb-space-3, .75rem);padding:var(--cb-space-4, 1rem) var(--cb-space-5, 1.25rem);border-bottom:1px solid var(--cb-color-border, #e2e8f0)}.cb-modal__title{margin:0;font-size:var(--cb-text-lg, 1.05rem);font-weight:var(--cb-font-weight-semibold, 600)}.cb-modal__close{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:1.25rem;line-height:1;color:var(--cb-color-text-muted, #64748b);background:transparent;border:none;border-radius:var(--cb-radius-full, 999px);cursor:pointer}.cb-modal__close:hover{background-color:var(--cb-color-surface-100, #f1f5f9)}.cb-modal__body{flex:1;overflow-y:auto;padding:var(--cb-space-5, 1.25rem);font-size:var(--cb-text-sm, .9375rem);color:var(--cb-color-text, #334155);line-height:var(--cb-line-height-relaxed, 1.6)}.cb-modal__foot{display:flex;justify-content:flex-end;gap:var(--cb-space-2, .5rem);padding:var(--cb-space-4, 1rem) var(--cb-space-5, 1.25rem);border-top:1px solid var(--cb-color-border, #e2e8f0)}@keyframes cb-modal-fade{0%{opacity:0}to{opacity:1}}@keyframes cb-modal-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}:host-context([data-theme=\"dark\"]) .cb-modal{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-800, #1e293b)}:host-context([data-theme=\"dark\"]) .cb-modal__head,:host-context([data-theme=\"dark\"]) .cb-modal__foot{border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-modal__body{color:var(--cb-color-surface-200, #e2e8f0)}\n"], dependencies: [{ kind: "component", type: CbButton, selector: "cb-button", inputs: ["severity", "variant", "size", "disabled", "loading", "fullWidth", "type"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
74
+ `, isInline: true, styles: [":host{display:contents}.cb-modal__backdrop{position:fixed;inset:0;z-index:var(--cb-z-modal, 1000);display:flex;align-items:center;justify-content:center;padding:var(--cb-space-4, 1rem);background-color:var(--cb-color-overlay, rgba(15, 23, 42, .55));animation:cb-modal-fade var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-modal{display:flex;flex-direction:column;width:100%;max-width:28rem;max-height:90vh;overflow:hidden;font-family:var(--cb-font-sans, inherit);color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-0, #ffffff);border-radius:var(--cb-radius-lg, .75rem);box-shadow:var(--cb-shadow-lg, 0 24px 48px rgba(0, 0, 0, .28));animation:cb-modal-in var(--cb-duration-normal, .2s) var(--cb-ease-out, ease-out)}.cb-modal__head{display:flex;align-items:center;justify-content:space-between;gap:var(--cb-space-3, .75rem);padding:var(--cb-space-4, 1rem) var(--cb-space-5, 1.25rem);border-bottom:1px solid var(--cb-color-border, #e2e8f0)}.cb-modal__title{margin:0;font-size:var(--cb-text-lg, 1.05rem);font-weight:var(--cb-font-weight-semibold, 600)}.cb-modal__close{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:1.25rem;line-height:1;color:var(--cb-color-text-muted, #64748b);background:transparent;border:none;border-radius:var(--cb-radius-full, 999px);cursor:pointer}.cb-modal__close:hover{background-color:var(--cb-color-surface-100, #f1f5f9)}.cb-modal__body{flex:1;overflow-y:auto;padding:var(--cb-space-5, 1.25rem);font-size:var(--cb-text-sm, .9375rem);color:var(--cb-color-text, #334155);line-height:var(--cb-line-height-relaxed, 1.6)}.cb-modal__foot{display:flex;justify-content:flex-end;gap:var(--cb-space-2, .5rem);padding:var(--cb-space-4, 1rem) var(--cb-space-5, 1.25rem);border-top:1px solid var(--cb-color-border, #e2e8f0)}@keyframes cb-modal-fade{0%{opacity:0}to{opacity:1}}@keyframes cb-modal-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}:host-context([data-theme=\"dark\"]) .cb-modal{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-800, #1e293b)}:host-context([data-theme=\"dark\"]) .cb-modal__head,:host-context([data-theme=\"dark\"]) .cb-modal__foot{border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-modal__body{color:var(--cb-color-surface-200, #e2e8f0)}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: CbButton, selector: "cb-button", inputs: ["severity", "variant", "size", "disabled", "loading", "fullWidth", "type", "ariaLabel", "ariaHaspopup", "ariaExpanded", "ariaControls"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
62
75
  }
63
76
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbModal, decorators: [{
64
77
  type: Component,
65
- args: [{ selector: 'cb-modal', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, imports: [CbButton], template: `
78
+ args: [{ selector: 'cb-modal', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, imports: [A11yModule, CbButton], template: `
66
79
  @if (visible()) {
67
80
  <div class="cb-modal__backdrop" (click)="close()">
68
81
  <div
69
82
  class="cb-modal"
70
83
  role="dialog"
71
84
  aria-modal="true"
72
- [attr.aria-label]="title()"
85
+ [attr.aria-labelledby]="title() ? titleId : null"
86
+ cdkTrapFocus
73
87
  (click)="$event.stopPropagation()"
88
+ (keydown.escape)="close()"
74
89
  >
75
90
  <header class="cb-modal__head">
76
- <h2 class="cb-modal__title">{{ title() }}</h2>
91
+ <h2 class="cb-modal__title" [id]="titleId">{{ title() }}</h2>
77
92
  <button
93
+ #closeBtn
78
94
  type="button"
79
95
  class="cb-modal__close"
80
- aria-label="Cerrar"
96
+ [attr.aria-label]="t().close"
81
97
  (click)="close()"
82
98
  >
83
99
  ×
@@ -86,15 +102,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
86
102
  <div class="cb-modal__body"><ng-content /></div>
87
103
  <footer class="cb-modal__foot">
88
104
  <cb-button variant="text" severity="secondary" (click)="close()">
89
- Cancelar
105
+ {{ t().cancel }}
90
106
  </cb-button>
91
- <cb-button (click)="confirm.emit()">{{ confirmLabel() }}</cb-button>
107
+ <cb-button (click)="confirm.emit()">{{ (confirmLabel() ?? t().accept) }}</cb-button>
92
108
  </footer>
93
109
  </div>
94
110
  </div>
95
111
  }
96
112
  `, styles: [":host{display:contents}.cb-modal__backdrop{position:fixed;inset:0;z-index:var(--cb-z-modal, 1000);display:flex;align-items:center;justify-content:center;padding:var(--cb-space-4, 1rem);background-color:var(--cb-color-overlay, rgba(15, 23, 42, .55));animation:cb-modal-fade var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-modal{display:flex;flex-direction:column;width:100%;max-width:28rem;max-height:90vh;overflow:hidden;font-family:var(--cb-font-sans, inherit);color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-0, #ffffff);border-radius:var(--cb-radius-lg, .75rem);box-shadow:var(--cb-shadow-lg, 0 24px 48px rgba(0, 0, 0, .28));animation:cb-modal-in var(--cb-duration-normal, .2s) var(--cb-ease-out, ease-out)}.cb-modal__head{display:flex;align-items:center;justify-content:space-between;gap:var(--cb-space-3, .75rem);padding:var(--cb-space-4, 1rem) var(--cb-space-5, 1.25rem);border-bottom:1px solid var(--cb-color-border, #e2e8f0)}.cb-modal__title{margin:0;font-size:var(--cb-text-lg, 1.05rem);font-weight:var(--cb-font-weight-semibold, 600)}.cb-modal__close{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:1.25rem;line-height:1;color:var(--cb-color-text-muted, #64748b);background:transparent;border:none;border-radius:var(--cb-radius-full, 999px);cursor:pointer}.cb-modal__close:hover{background-color:var(--cb-color-surface-100, #f1f5f9)}.cb-modal__body{flex:1;overflow-y:auto;padding:var(--cb-space-5, 1.25rem);font-size:var(--cb-text-sm, .9375rem);color:var(--cb-color-text, #334155);line-height:var(--cb-line-height-relaxed, 1.6)}.cb-modal__foot{display:flex;justify-content:flex-end;gap:var(--cb-space-2, .5rem);padding:var(--cb-space-4, 1rem) var(--cb-space-5, 1.25rem);border-top:1px solid var(--cb-color-border, #e2e8f0)}@keyframes cb-modal-fade{0%{opacity:0}to{opacity:1}}@keyframes cb-modal-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}:host-context([data-theme=\"dark\"]) .cb-modal{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-800, #1e293b)}:host-context([data-theme=\"dark\"]) .cb-modal__head,:host-context([data-theme=\"dark\"]) .cb-modal__foot{border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-modal__body{color:var(--cb-color-surface-200, #e2e8f0)}\n"] }]
97
- }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], confirmLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirmLabel", required: false }] }], visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], confirm: [{ type: i0.Output, args: ["confirm"] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
113
+ }], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], confirmLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirmLabel", required: false }] }], visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], confirm: [{ type: i0.Output, args: ["confirm"] }], closed: [{ type: i0.Output, args: ["closed"] }], closeBtn: [{ type: i0.ViewChild, args: ['closeBtn', { isSignal: true }] }] } });
98
114
 
99
115
  /**
100
116
  * Generated bundle index. Do not edit.
@@ -1,5 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, model, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { input, model, viewChild, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import * as i1 from '@angular/cdk/a11y';
4
+ import { A11yModule } from '@angular/cdk/a11y';
5
+ import { injectCbTranslation, cbOverlayFocus } from '@caribeng/ui';
3
6
 
4
7
  /**
5
8
  * Off-canvas de Caribe Design: panel lateral deslizable con cabecera, botón de
@@ -12,8 +15,10 @@ import { input, model, ViewEncapsulation, ChangeDetectionStrategy, Component } f
12
15
  */
13
16
  class CbOffCanvas {
14
17
  constructor() {
18
+ /** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
19
+ this.t = injectCbTranslation();
15
20
  /** Título del panel. */
16
- this.title = input('Panel lateral', /* @ts-ignore */
21
+ this.title = input(undefined, /* @ts-ignore */
17
22
  ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
18
23
  /** Lado de aparición. */
19
24
  this.position = input('right', /* @ts-ignore */
@@ -21,22 +26,28 @@ class CbOffCanvas {
21
26
  /** Estado abierto/cerrado (two-way). */
22
27
  this.open = model(false, /* @ts-ignore */
23
28
  ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
29
+ this.closeBtn = viewChild('closeBtn', /* @ts-ignore */
30
+ ...(ngDevMode ? [{ debugName: "closeBtn" }] : /* istanbul ignore next */ []));
31
+ cbOverlayFocus({ open: this.open, initialFocus: () => this.closeBtn()?.nativeElement });
24
32
  }
25
33
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbOffCanvas, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
26
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbOffCanvas, isStandalone: true, selector: "cb-off-canvas", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { classAttribute: "cb-off-canvas-host" }, ngImport: i0, template: `
34
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbOffCanvas, isStandalone: true, selector: "cb-off-canvas", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { classAttribute: "cb-off-canvas-host" }, viewQueries: [{ propertyName: "closeBtn", first: true, predicate: ["closeBtn"], descendants: true, isSignal: true }], ngImport: i0, template: `
27
35
  @if (open()) {
28
36
  <aside
29
37
  class="cb-off-canvas cb-off-canvas--{{ position() }}"
30
38
  role="dialog"
31
39
  aria-modal="true"
32
- [attr.aria-label]="title()"
40
+ [attr.aria-label]="(title() ?? t().sidePanel)"
41
+ cdkTrapFocus
42
+ (keydown.escape)="open.set(false)"
33
43
  >
34
44
  <div class="cb-off-canvas__header">
35
- <strong class="cb-off-canvas__title">{{ title() }}</strong>
45
+ <strong class="cb-off-canvas__title">{{ (title() ?? t().sidePanel) }}</strong>
36
46
  <button
47
+ #closeBtn
37
48
  type="button"
38
49
  class="cb-off-canvas__close"
39
- aria-label="Cerrar panel"
50
+ [attr.aria-label]="t().close"
40
51
  (click)="open.set(false)"
41
52
  >
42
53
  <span aria-hidden="true">×</span>
@@ -47,24 +58,27 @@ class CbOffCanvas {
47
58
  </div>
48
59
  </aside>
49
60
  }
50
- `, isInline: true, styles: [":host{display:block}.cb-off-canvas{display:flex;flex-direction:column;box-sizing:border-box;width:100%;max-width:20rem;min-height:12rem;padding:var(--cb-space-4, 1rem);font-family:var(--cb-font-sans, inherit);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-lg, .75rem);box-shadow:var(--cb-shadow-lg, 0 12px 32px rgba(0, 0, 0, .18));animation:cb-off-canvas-in var(--cb-duration-normal, .2s) var(--cb-ease-out, ease-out)}.cb-off-canvas--bottom{max-width:none}.cb-off-canvas__header{display:flex;align-items:center;justify-content:space-between;gap:var(--cb-space-3, .75rem);margin-bottom:var(--cb-space-3, .75rem);padding-bottom:var(--cb-space-3, .75rem);border-bottom:1px solid var(--cb-color-border, #e2e8f0)}.cb-off-canvas__title{font-size:var(--cb-text-lg, 1rem);font-weight:var(--cb-font-weight-semibold, 600)}.cb-off-canvas__close{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:1.25rem;line-height:1;color:inherit;background:transparent;border:none;border-radius:var(--cb-radius-full, 999px);cursor:pointer;transition:background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-off-canvas__close:hover{background-color:var(--cb-color-surface-100, #f1f5f9)}.cb-off-canvas__body{flex:1;font-size:var(--cb-text-sm, .875rem);color:var(--cb-color-text, #334155)}@keyframes cb-off-canvas-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}:host-context([data-theme=\"dark\"]) .cb-off-canvas{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-off-canvas__header{border-bottom-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-off-canvas__close:hover{background-color:var(--cb-color-surface-700, #334155)}:host-context([data-theme=\"dark\"]) .cb-off-canvas__body{color:var(--cb-color-surface-200, #e2e8f0)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
61
+ `, isInline: true, styles: [":host{display:block}.cb-off-canvas{display:flex;flex-direction:column;box-sizing:border-box;width:100%;max-width:20rem;min-height:12rem;padding:var(--cb-space-4, 1rem);font-family:var(--cb-font-sans, inherit);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-lg, .75rem);box-shadow:var(--cb-shadow-lg, 0 12px 32px rgba(0, 0, 0, .18));animation:cb-off-canvas-in var(--cb-duration-normal, .2s) var(--cb-ease-out, ease-out)}.cb-off-canvas--bottom{max-width:none}.cb-off-canvas__header{display:flex;align-items:center;justify-content:space-between;gap:var(--cb-space-3, .75rem);margin-bottom:var(--cb-space-3, .75rem);padding-bottom:var(--cb-space-3, .75rem);border-bottom:1px solid var(--cb-color-border, #e2e8f0)}.cb-off-canvas__title{font-size:var(--cb-text-lg, 1rem);font-weight:var(--cb-font-weight-semibold, 600)}.cb-off-canvas__close{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:1.25rem;line-height:1;color:inherit;background:transparent;border:none;border-radius:var(--cb-radius-full, 999px);cursor:pointer;transition:background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-off-canvas__close:hover{background-color:var(--cb-color-surface-100, #f1f5f9)}.cb-off-canvas__body{flex:1;font-size:var(--cb-text-sm, .875rem);color:var(--cb-color-text, #334155)}@keyframes cb-off-canvas-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}:host-context([data-theme=\"dark\"]) .cb-off-canvas{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-off-canvas__header{border-bottom-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-off-canvas__close:hover{background-color:var(--cb-color-surface-700, #334155)}:host-context([data-theme=\"dark\"]) .cb-off-canvas__body{color:var(--cb-color-surface-200, #e2e8f0)}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
51
62
  }
52
63
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbOffCanvas, decorators: [{
53
64
  type: Component,
54
- args: [{ selector: 'cb-off-canvas', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: { class: 'cb-off-canvas-host' }, template: `
65
+ args: [{ selector: 'cb-off-canvas', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, imports: [A11yModule], host: { class: 'cb-off-canvas-host' }, template: `
55
66
  @if (open()) {
56
67
  <aside
57
68
  class="cb-off-canvas cb-off-canvas--{{ position() }}"
58
69
  role="dialog"
59
70
  aria-modal="true"
60
- [attr.aria-label]="title()"
71
+ [attr.aria-label]="(title() ?? t().sidePanel)"
72
+ cdkTrapFocus
73
+ (keydown.escape)="open.set(false)"
61
74
  >
62
75
  <div class="cb-off-canvas__header">
63
- <strong class="cb-off-canvas__title">{{ title() }}</strong>
76
+ <strong class="cb-off-canvas__title">{{ (title() ?? t().sidePanel) }}</strong>
64
77
  <button
78
+ #closeBtn
65
79
  type="button"
66
80
  class="cb-off-canvas__close"
67
- aria-label="Cerrar panel"
81
+ [attr.aria-label]="t().close"
68
82
  (click)="open.set(false)"
69
83
  >
70
84
  <span aria-hidden="true">×</span>
@@ -76,7 +90,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
76
90
  </aside>
77
91
  }
78
92
  `, styles: [":host{display:block}.cb-off-canvas{display:flex;flex-direction:column;box-sizing:border-box;width:100%;max-width:20rem;min-height:12rem;padding:var(--cb-space-4, 1rem);font-family:var(--cb-font-sans, inherit);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-lg, .75rem);box-shadow:var(--cb-shadow-lg, 0 12px 32px rgba(0, 0, 0, .18));animation:cb-off-canvas-in var(--cb-duration-normal, .2s) var(--cb-ease-out, ease-out)}.cb-off-canvas--bottom{max-width:none}.cb-off-canvas__header{display:flex;align-items:center;justify-content:space-between;gap:var(--cb-space-3, .75rem);margin-bottom:var(--cb-space-3, .75rem);padding-bottom:var(--cb-space-3, .75rem);border-bottom:1px solid var(--cb-color-border, #e2e8f0)}.cb-off-canvas__title{font-size:var(--cb-text-lg, 1rem);font-weight:var(--cb-font-weight-semibold, 600)}.cb-off-canvas__close{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:1.25rem;line-height:1;color:inherit;background:transparent;border:none;border-radius:var(--cb-radius-full, 999px);cursor:pointer;transition:background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-off-canvas__close:hover{background-color:var(--cb-color-surface-100, #f1f5f9)}.cb-off-canvas__body{flex:1;font-size:var(--cb-text-sm, .875rem);color:var(--cb-color-text, #334155)}@keyframes cb-off-canvas-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}:host-context([data-theme=\"dark\"]) .cb-off-canvas{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-off-canvas__header{border-bottom-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-off-canvas__close:hover{background-color:var(--cb-color-surface-700, #334155)}:host-context([data-theme=\"dark\"]) .cb-off-canvas__body{color:var(--cb-color-surface-200, #e2e8f0)}\n"] }]
79
- }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }] } });
93
+ }], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], closeBtn: [{ type: i0.ViewChild, args: ['closeBtn', { isSignal: true }] }] } });
80
94
 
81
95
  /**
82
96
  * Generated bundle index. Do not edit.