@dropi/ui-components 1.0.12 → 1.0.13

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 (255) hide show
  1. package/README.md +55 -36
  2. package/dist/README.md +58 -38
  3. package/dist/components-source/accordion/accordion-item/accordion-item.component.d.ts +31 -0
  4. package/dist/components-source/accordion/accordion.component.d.ts +26 -0
  5. package/dist/components-source/alert/alert.component.d.ts +32 -0
  6. package/dist/components-source/alert-modal/alert-modal.component.d.ts +78 -0
  7. package/dist/components-source/alert-validation/alert-validation.component.d.ts +21 -0
  8. package/dist/components-source/badge/badge.component.d.ts +12 -0
  9. package/dist/components-source/beta-tag/beta-tag.component.d.ts +5 -0
  10. package/dist/components-source/breadcrumb/breadcrumb.component.d.ts +11 -0
  11. package/dist/components-source/card-product/card-product.component.d.ts +204 -0
  12. package/dist/components-source/card-section/card-section.component.d.ts +31 -0
  13. package/dist/components-source/checkbox-selection-list/checkbox-selection-list.component.d.ts +26 -0
  14. package/dist/components-source/city-selector/city-selector.component.d.ts +17 -0
  15. package/dist/components-source/color-picker/color-picker.component.d.ts +73 -0
  16. package/dist/components-source/confirm-dialog/confirm-dialog.component.d.ts +10 -0
  17. package/dist/components-source/country-flags/country-flags.component.d.ts +12 -0
  18. package/dist/components-source/date-picker/date-picker.component.d.ts +27 -0
  19. package/dist/components-source/date-picker-range/date-picker-range.component.d.ts +26 -0
  20. package/dist/components-source/dropi-avatars/dropi-avatars.component.d.ts +11 -0
  21. package/dist/components-source/dropi-badge/dropi-badge.component.d.ts +29 -0
  22. package/dist/components-source/dropi-banner-external/dropi-banner-external.component.d.ts +19 -0
  23. package/dist/components-source/dropi-breadcrumb/dropi-breadcrumb.component.d.ts +22 -0
  24. package/dist/components-source/dropi-card-checkbox/dropi-card-checkbox.component.d.ts +20 -0
  25. package/dist/components-source/dropi-carousel/dropi-carousel.component.d.ts +52 -0
  26. package/dist/components-source/dropi-checkbox/dropi-checkbox.component.d.ts +11 -0
  27. package/dist/components-source/dropi-chips/dropi-chips.component.d.ts +17 -0
  28. package/dist/components-source/dropi-country-selector/countries.data.d.ts +6 -0
  29. package/dist/components-source/dropi-country-selector/dropi-country-selector.component.d.ts +90 -0
  30. package/dist/components-source/dropi-drawer/dropi-drawer.component.d.ts +20 -0
  31. package/dist/components-source/dropi-dropdown/dropi-dropdown.component.d.ts +20 -0
  32. package/dist/components-source/dropi-favorite-button/dropi-favorite-button.component.d.ts +12 -0
  33. package/dist/components-source/dropi-file-upload/card-view/card-view.component.d.ts +19 -0
  34. package/dist/components-source/dropi-file-upload/drop-zone/drop-zone.component.d.ts +38 -0
  35. package/dist/components-source/dropi-file-upload/dropi-file-upload.component.d.ts +18 -0
  36. package/dist/components-source/dropi-file-upload/file-list/file-list.component.d.ts +39 -0
  37. package/dist/components-source/dropi-file-upload/grid-view/grid-view.component.d.ts +15 -0
  38. package/dist/components-source/dropi-ilustration-icon/dropi-ilustration-icon.component.d.ts +20 -0
  39. package/dist/components-source/dropi-image-overlay/dropi-image-overlay.component.d.ts +8 -0
  40. package/dist/components-source/dropi-languages-selector/dropi-languages-selector.component.d.ts +18 -0
  41. package/dist/components-source/dropi-logo/dropi-logo.component.d.ts +12 -0
  42. package/dist/components-source/dropi-modal/dropi-modal.component.d.ts +34 -0
  43. package/dist/components-source/dropi-modal/p-template.directive.d.ts +9 -0
  44. package/dist/components-source/dropi-navbar/dropi-navbar.component.d.ts +20 -0
  45. package/dist/components-source/dropi-paginator/dropi-paginator.component.d.ts +21 -0
  46. package/dist/components-source/dropi-phone-input/dropi-phone-input.component.d.ts +55 -0
  47. package/dist/components-source/dropi-radio-button/dropi-radio-button.component.d.ts +17 -0
  48. package/dist/components-source/dropi-search/dropi-search.component.d.ts +40 -0
  49. package/dist/components-source/dropi-select/dropi-select.component.d.ts +34 -0
  50. package/dist/components-source/dropi-skeleton/dropi-skeleton.component.d.ts +14 -0
  51. package/dist/components-source/dropi-steps/dropi-steps.component.d.ts +64 -0
  52. package/dist/components-source/dropi-switch/dropi-switch.component.d.ts +11 -0
  53. package/dist/components-source/dropi-table/dropi-table.component.d.ts +82 -0
  54. package/dist/components-source/dropi-tag/dropi-tag.component.d.ts +15 -0
  55. package/dist/components-source/dropi-text-area/dropi-text-area.component.d.ts +14 -0
  56. package/dist/components-source/dropi-tooltip/dropi-tooltip.component.d.ts +28 -0
  57. package/dist/components-source/dropi-youtube-lazy-video/dropi-youtube-lazy-video.component.d.ts +16 -0
  58. package/dist/components-source/empty/empty.component.d.ts +9 -0
  59. package/dist/components-source/empty-state/empty-state.component.d.ts +17 -0
  60. package/dist/components-source/file-upload-progress-bar/file-upload-progress-bar.component.d.ts +30 -0
  61. package/dist/components-source/index.d.ts +85 -0
  62. package/dist/components-source/input/input.component.d.ts +33 -0
  63. package/dist/components-source/lottie-loader/lottie-loader.component.d.ts +9 -0
  64. package/dist/components-source/otp-send-code/otp-send-code.component.d.ts +83 -0
  65. package/dist/components-source/radio-selection-list/radio-selection-list.component.d.ts +30 -0
  66. package/dist/components-source/read-more/read-more.component.d.ts +60 -0
  67. package/dist/components-source/sidebar/sidebar.component.d.ts +27 -0
  68. package/dist/components-source/simple-stepper/simple-stepper.component.d.ts +21 -0
  69. package/dist/components-source/spinner/spinner.component.d.ts +9 -0
  70. package/dist/components-source/tabs/tabs.component.d.ts +27 -0
  71. package/dist/components-source/tag-type-product/tag-type-product.component.d.ts +5 -0
  72. package/dist/components-source/toast/toast.component.d.ts +21 -0
  73. package/dist/components-source/toggle/input-toggle.component.d.ts +11 -0
  74. package/dist/components-source/tooltip/tooltip.component.d.ts +15 -0
  75. package/dist/components-source/vertical-steps/vertical-steps.component.d.ts +27 -0
  76. package/dist/esm2022/components-source/accordion/accordion-item/accordion-item.component.mjs +51 -0
  77. package/dist/esm2022/components-source/accordion/accordion.component.mjs +46 -0
  78. package/dist/esm2022/components-source/alert/alert.component.mjs +114 -0
  79. package/dist/esm2022/components-source/alert-modal/alert-modal.component.mjs +247 -0
  80. package/dist/esm2022/components-source/alert-validation/alert-validation.component.mjs +53 -0
  81. package/dist/esm2022/components-source/badge/badge.component.mjs +23 -0
  82. package/dist/esm2022/components-source/beta-tag/beta-tag.component.mjs +11 -0
  83. package/dist/esm2022/components-source/breadcrumb/breadcrumb.component.mjs +26 -0
  84. package/dist/esm2022/components-source/card-product/card-product.component.mjs +534 -0
  85. package/dist/esm2022/components-source/card-section/card-section.component.mjs +91 -0
  86. package/dist/esm2022/components-source/checkbox-selection-list/checkbox-selection-list.component.mjs +79 -0
  87. package/dist/esm2022/components-source/city-selector/city-selector.component.mjs +53 -0
  88. package/dist/esm2022/components-source/color-picker/color-picker.component.mjs +320 -0
  89. package/dist/esm2022/components-source/confirm-dialog/confirm-dialog.component.mjs +27 -0
  90. package/dist/esm2022/components-source/country-flags/country-flags.component.mjs +27 -0
  91. package/dist/esm2022/components-source/date-picker/date-picker.component.mjs +73 -0
  92. package/dist/esm2022/components-source/date-picker-range/date-picker-range.component.mjs +67 -0
  93. package/dist/esm2022/components-source/dropi-avatars/dropi-avatars.component.mjs +31 -0
  94. package/dist/esm2022/components-source/dropi-badge/dropi-badge.component.mjs +45 -0
  95. package/dist/esm2022/components-source/dropi-banner-external/dropi-banner-external.component.mjs +39 -0
  96. package/dist/esm2022/components-source/dropi-breadcrumb/dropi-breadcrumb.component.mjs +45 -0
  97. package/dist/esm2022/components-source/dropi-card-checkbox/dropi-card-checkbox.component.mjs +53 -0
  98. package/dist/esm2022/components-source/dropi-carousel/dropi-carousel.component.mjs +243 -0
  99. package/dist/esm2022/components-source/dropi-checkbox/dropi-checkbox.component.mjs +31 -0
  100. package/dist/esm2022/components-source/dropi-chips/dropi-chips.component.mjs +38 -0
  101. package/dist/esm2022/components-source/dropi-country-selector/countries.data.mjs +254 -0
  102. package/dist/esm2022/components-source/dropi-country-selector/dropi-country-selector.component.mjs +183 -0
  103. package/dist/esm2022/components-source/dropi-drawer/dropi-drawer.component.mjs +69 -0
  104. package/dist/esm2022/components-source/dropi-dropdown/dropi-dropdown.component.mjs +59 -0
  105. package/dist/esm2022/components-source/dropi-favorite-button/dropi-favorite-button.component.mjs +33 -0
  106. package/dist/esm2022/components-source/dropi-file-upload/card-view/card-view.component.mjs +47 -0
  107. package/dist/esm2022/components-source/dropi-file-upload/drop-zone/drop-zone.component.mjs +115 -0
  108. package/dist/esm2022/components-source/dropi-file-upload/dropi-file-upload.component.mjs +66 -0
  109. package/dist/esm2022/components-source/dropi-file-upload/file-list/file-list.component.mjs +95 -0
  110. package/dist/esm2022/components-source/dropi-file-upload/grid-view/grid-view.component.mjs +37 -0
  111. package/dist/esm2022/components-source/dropi-ilustration-icon/dropi-ilustration-icon.component.mjs +59 -0
  112. package/dist/esm2022/components-source/dropi-image-overlay/dropi-image-overlay.component.mjs +31 -0
  113. package/dist/esm2022/components-source/dropi-languages-selector/dropi-languages-selector.component.mjs +38 -0
  114. package/dist/esm2022/components-source/dropi-logo/dropi-logo.component.mjs +27 -0
  115. package/dist/esm2022/components-source/dropi-modal/dropi-modal.component.mjs +92 -0
  116. package/dist/esm2022/components-source/dropi-modal/p-template.directive.mjs +22 -0
  117. package/dist/esm2022/components-source/dropi-navbar/dropi-navbar.component.mjs +51 -0
  118. package/dist/esm2022/components-source/dropi-paginator/dropi-paginator.component.mjs +89 -0
  119. package/dist/esm2022/components-source/dropi-phone-input/dropi-phone-input.component.mjs +155 -0
  120. package/dist/esm2022/components-source/dropi-radio-button/dropi-radio-button.component.mjs +48 -0
  121. package/dist/esm2022/components-source/dropi-search/dropi-search.component.mjs +104 -0
  122. package/dist/esm2022/components-source/dropi-select/dropi-select.component.mjs +96 -0
  123. package/dist/esm2022/components-source/dropi-skeleton/dropi-skeleton.component.mjs +39 -0
  124. package/dist/esm2022/components-source/dropi-steps/dropi-steps.component.mjs +97 -0
  125. package/dist/esm2022/components-source/dropi-switch/dropi-switch.component.mjs +22 -0
  126. package/dist/esm2022/components-source/dropi-table/dropi-table.component.mjs +333 -0
  127. package/dist/esm2022/components-source/dropi-tag/dropi-tag.component.mjs +36 -0
  128. package/dist/esm2022/components-source/dropi-text-area/dropi-text-area.component.mjs +53 -0
  129. package/dist/esm2022/components-source/dropi-tooltip/dropi-tooltip.component.mjs +78 -0
  130. package/dist/esm2022/components-source/dropi-youtube-lazy-video/dropi-youtube-lazy-video.component.mjs +46 -0
  131. package/dist/esm2022/components-source/empty/empty.component.mjs +18 -0
  132. package/dist/esm2022/components-source/empty-state/empty-state.component.mjs +62 -0
  133. package/dist/esm2022/components-source/file-upload-progress-bar/file-upload-progress-bar.component.mjs +91 -0
  134. package/dist/esm2022/components-source/index.mjs +107 -0
  135. package/dist/esm2022/components-source/input/input.component.mjs +104 -0
  136. package/dist/esm2022/components-source/lottie-loader/lottie-loader.component.mjs +25 -0
  137. package/dist/esm2022/components-source/otp-send-code/otp-send-code.component.mjs +201 -0
  138. package/dist/esm2022/components-source/radio-selection-list/radio-selection-list.component.mjs +89 -0
  139. package/dist/esm2022/components-source/read-more/read-more.component.mjs +91 -0
  140. package/dist/esm2022/components-source/sidebar/sidebar.component.mjs +88 -0
  141. package/dist/esm2022/components-source/simple-stepper/simple-stepper.component.mjs +60 -0
  142. package/dist/esm2022/components-source/spinner/spinner.component.mjs +19 -0
  143. package/dist/esm2022/components-source/tabs/tabs.component.mjs +83 -0
  144. package/dist/esm2022/components-source/tag-type-product/tag-type-product.component.mjs +11 -0
  145. package/dist/esm2022/components-source/toast/toast.component.mjs +47 -0
  146. package/dist/esm2022/components-source/toggle/input-toggle.component.mjs +36 -0
  147. package/dist/esm2022/components-source/tooltip/tooltip.component.mjs +34 -0
  148. package/dist/esm2022/components-source/vertical-steps/vertical-steps.component.mjs +75 -0
  149. package/dist/esm2022/lib/elements-registry.mjs +343 -2
  150. package/dist/esm2022/utilities/interfaces/ui/dropi-table.interface.mjs +2 -0
  151. package/dist/esm2022/utilities/interfaces/ui/input-interface.mjs +2 -0
  152. package/dist/esm2022/utilities/interfaces/ui/select-interface.mjs +2 -0
  153. package/dist/esm2022/utilities/interfaces/ui/selection-list-interface.mjs +2 -0
  154. package/dist/esm2022/utilities/interfaces/ui/upload.model.mjs +5 -0
  155. package/dist/fesm2022/dropi-ui-components.mjs +5913 -2
  156. package/dist/fesm2022/dropi-ui-components.mjs.map +1 -1
  157. package/dist/utilities/interfaces/ui/dropi-table.interface.d.ts +45 -0
  158. package/dist/utilities/interfaces/ui/input-interface.d.ts +33 -0
  159. package/dist/utilities/interfaces/ui/select-interface.d.ts +8 -0
  160. package/dist/utilities/interfaces/ui/selection-list-interface.d.ts +24 -0
  161. package/dist/utilities/interfaces/ui/upload.model.d.ts +30 -0
  162. package/package.json +18 -6
  163. package/src/components-source/alert/alert.component.ts +12 -129
  164. package/src/components-source/alert-modal/alert-modal.component.ts +84 -114
  165. package/src/components-source/alert-validation/alert-validation.component.html +8 -0
  166. package/src/components-source/alert-validation/alert-validation.component.scss +225 -0
  167. package/src/components-source/alert-validation/alert-validation.component.ts +43 -0
  168. package/src/components-source/beta-tag/beta-tag.component.html +1 -0
  169. package/src/components-source/beta-tag/beta-tag.component.scss +26 -0
  170. package/src/components-source/beta-tag/beta-tag.component.ts +11 -0
  171. package/src/components-source/breadcrumb/breadcrumb.component.html +13 -5
  172. package/src/components-source/breadcrumb/breadcrumb.component.scss +8 -1
  173. package/src/components-source/breadcrumb/breadcrumb.component.spec.ts +26 -26
  174. package/src/components-source/breadcrumb/breadcrumb.component.ts +10 -12
  175. package/src/components-source/card-product/card-product.component.spec.ts +9 -9
  176. package/src/components-source/card-product/card-product.component.stories.ts +2 -2
  177. package/src/components-source/card-product/card-product.component.ts +294 -818
  178. package/src/components-source/card-section/card-section.component.html +7 -7
  179. package/src/components-source/card-section/card-section.component.ts +41 -15
  180. package/src/components-source/checkbox-selection-list/checkbox-selection-list.component.ts +42 -179
  181. package/src/components-source/city-selector/city-selector.component.ts +37 -137
  182. package/src/components-source/confirm-dialog/confirm-dialog.component.html +26 -0
  183. package/src/components-source/confirm-dialog/confirm-dialog.component.scss +55 -0
  184. package/src/components-source/confirm-dialog/confirm-dialog.component.ts +22 -0
  185. package/src/components-source/country-flags/country-flags.component.ts +20 -12
  186. package/src/components-source/date-picker/date-picker.component.ts +32 -292
  187. package/src/components-source/date-picker-range/date-picker-range.component.html +15 -7
  188. package/src/components-source/date-picker-range/date-picker-range.component.ts +42 -235
  189. package/src/components-source/dropi-banner-external/dropi-banner-external.component.ts +24 -185
  190. package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.component.html +21 -21
  191. package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.component.spec.ts +9 -9
  192. package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.component.ts +41 -23
  193. package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.stories.ts +12 -12
  194. package/src/components-source/dropi-chips/dropi-chips.component.ts +22 -87
  195. package/src/components-source/dropi-country-selector/countries.data.ts +256 -236
  196. package/src/components-source/dropi-country-selector/dropi-country-selector.component.ts +37 -25
  197. package/src/components-source/dropi-drawer/dropi-drawer.component.ts +91 -78
  198. package/src/components-source/dropi-dropdown/dropi-dropdown.component.ts +44 -47
  199. package/src/components-source/dropi-file-upload/card-view/card-view.component.ts +33 -53
  200. package/src/components-source/dropi-file-upload/drop-zone/drop-zone.component.ts +52 -123
  201. package/src/components-source/dropi-file-upload/dropi-file-upload.component.ts +38 -294
  202. package/src/components-source/dropi-file-upload/file-list/file-list.component.ts +62 -43
  203. package/src/components-source/dropi-file-upload/grid-view/grid-view.component.ts +23 -22
  204. package/src/components-source/dropi-ilustration-icon/dropi-ilustration-icon.component.scss +6 -2
  205. package/src/components-source/dropi-image-overlay/dropi-image-overlay.component.ts +16 -71
  206. package/src/components-source/dropi-modal/dropi-modal.component.ts +56 -372
  207. package/src/components-source/dropi-navbar/dropi-navbar.component.ts +17 -17
  208. package/src/components-source/dropi-paginator/dropi-paginator.component.html +18 -7
  209. package/src/components-source/dropi-paginator/dropi-paginator.component.ts +40 -32
  210. package/src/components-source/dropi-phone-input/dropi-phone-input.component.html +78 -79
  211. package/src/components-source/dropi-phone-input/dropi-phone-input.component.ts +29 -85
  212. package/src/components-source/dropi-search/dropi-search.component.ts +59 -222
  213. package/src/components-source/dropi-select/dropi-select.component.html +82 -131
  214. package/src/components-source/dropi-select/dropi-select.component.ts +60 -423
  215. package/src/components-source/dropi-table/dropi-table.component.html +40 -23
  216. package/src/components-source/dropi-table/dropi-table.component.ts +130 -374
  217. package/src/components-source/dropi-tag/dropi-tag.component.ts +20 -90
  218. package/src/components-source/dropi-text-area/dropi-text-area.component.ts +22 -48
  219. package/src/components-source/dropi-tooltip/dropi-tooltip.component.ts +40 -129
  220. package/src/components-source/empty/empty.component.html +3 -0
  221. package/src/components-source/empty/empty.component.scss +0 -0
  222. package/src/components-source/empty/empty.component.ts +16 -0
  223. package/src/components-source/empty-state/empty-state.component.ts +47 -19
  224. package/src/components-source/index.ts +82 -37
  225. package/src/components-source/input/input.component.html +79 -63
  226. package/src/components-source/input/input.component.ts +51 -97
  227. package/src/components-source/lottie-loader/lottie-loader.component.ts +13 -16
  228. package/src/components-source/otp-send-code/otp-send-code.component.ts +60 -528
  229. package/src/components-source/radio-selection-list/radio-selection-list.component.ts +36 -97
  230. package/src/components-source/sidebar/sidebar.component.spec.ts +11 -11
  231. package/src/components-source/sidebar/sidebar.component.stories.ts +3 -3
  232. package/src/components-source/sidebar/sidebar.component.ts +51 -47
  233. package/src/components-source/simple-stepper/simple-stepper.component.ts +20 -35
  234. package/src/components-source/spinner/spinner.component.html +6 -0
  235. package/src/components-source/spinner/spinner.component.scss +15 -0
  236. package/src/components-source/spinner/spinner.component.ts +17 -0
  237. package/src/components-source/tabs/tabs.component.spec.ts +8 -8
  238. package/src/components-source/tabs/tabs.component.stories.ts +5 -5
  239. package/src/components-source/tabs/tabs.component.ts +41 -83
  240. package/src/components-source/toast/toast.component.ts +40 -46
  241. package/src/components-source/toggle/input-toggle.component.html +34 -0
  242. package/src/components-source/toggle/input-toggle.component.scss +0 -0
  243. package/src/components-source/toggle/input-toggle.component.ts +27 -0
  244. package/src/components-source/toggle/inputToggleConfig.ts +11 -0
  245. package/src/components-source/tooltip/tooltip.component.html +22 -11
  246. package/src/components-source/tooltip/tooltip.component.ts +28 -13
  247. package/src/components-source/vertical-steps/vertical-steps.component.ts +16 -78
  248. package/src/lib/elements-registry.ts +413 -1
  249. package/src/lib/router-stub.ts +7 -0
  250. package/src/libreria work space.code-workspace +11 -8
  251. package/src/utilities/interfaces/ui/dropi-table.interface.ts +60 -0
  252. package/src/utilities/interfaces/ui/input-interface.ts +34 -0
  253. package/src/utilities/interfaces/ui/select-interface.ts +8 -0
  254. package/src/utilities/interfaces/ui/selection-list-interface.ts +15 -0
  255. package/src/utilities/interfaces/ui/upload.model.ts +41 -0
@@ -1,38 +1,56 @@
1
- import { CommonModule } from '@angular/common';
2
- import { Component, Input } from '@angular/core';
3
- import { RouterModule } from '@angular/router';
4
- import { IconComponent } from '../icon/icon.component';
5
- import { TranslateModule } from '@ngx-translate/core';
1
+ import {
2
+ Component,
3
+ Input,
4
+ Output,
5
+ EventEmitter,
6
+ OnInit,
7
+ Inject,
8
+ CUSTOM_ELEMENTS_SCHEMA,
9
+ } from "@angular/core";
10
+ import { CommonModule } from "@angular/common";
11
+ import { TranslateModule } from "@ngx-translate/core";
12
+ import { IconComponent } from "../icon/icon.component";
6
13
 
7
14
  export interface BreadcrumbItem {
8
15
  label: string;
9
- /** Rutas internas con RouterLink */
10
- routerLink?: string | any[];
11
- /** (Opcional) Enlace externo si algún día lo necesitas */
12
16
  url?: string;
13
- /** (Opcional) Deshabilitar el click */
14
17
  disabled?: boolean;
15
- /** (Opcional) Query params / fragment para RouterLink */
16
18
  queryParams?: Record<string, any>;
17
19
  fragment?: string;
20
+ command?: (event?: any) => void; // Cambiado de 'click' para evitar conflictos de sintaxis
18
21
  }
22
+
19
23
  @Component({
20
- selector: 'app-dropi-breadcrumb',
24
+ selector: "app-dropi-breadcrumb",
21
25
  standalone: true,
22
- imports: [CommonModule, RouterModule, IconComponent, TranslateModule],
23
- templateUrl: './dropi-breadcrumb.component.html',
24
- styleUrls: ['./dropi-breadcrumb.component.scss']
26
+ imports: [CommonModule, TranslateModule, IconComponent],
27
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
28
+ templateUrl: "./dropi-breadcrumb.component.html",
29
+ styleUrls: ["./dropi-breadcrumb.component.scss"],
25
30
  })
26
- export class DropiBreadcrumbComponent {
27
- /** Items desde la raíz → página actual (sin incluir home) */
28
- @Input() items: BreadcrumbItem[] = [];
29
- /** Home: solo ícono + ruta (RouterLink) */
30
- @Input() homeRoute: string | any[] = '/';
31
- @Input() homeIconName: string = 'Home';
32
- @Input() lastItemClickable = false;
31
+ export class DropiBreadcrumbComponent implements OnInit {
32
+ @Input() public items: BreadcrumbItem[] = [];
33
+ @Input() public ariaLabel: string = "Breadcrumb";
34
+ @Input() public homeIconName: string = "Home";
35
+ @Input() public lastItemClickable: boolean = false;
36
+
37
+ @Output() public onNavigate = new EventEmitter<BreadcrumbItem>();
38
+
39
+ constructor() {}
33
40
 
41
+ ngOnInit(): void {}
34
42
 
43
+ public navigate(item: BreadcrumbItem | null, isHome: boolean = false): void {
44
+ if (isHome) {
45
+ this.onNavigate.emit({ label: "Home", url: "/" });
46
+ return;
47
+ }
35
48
 
36
- /** ARIA label para accesibilidad */
37
- ariaLabel = 'Breadcrumb';
49
+ if (item && !item.disabled) {
50
+ if (item.command) {
51
+ item.command(item);
52
+ }
53
+ this.onNavigate.emit(item);
54
+ }
55
+ }
38
56
  }
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { type Meta, type StoryObj, applicationConfig } from '@storybook/angular';
6
6
  import { importProvidersFrom } from '@angular/core';
7
- import { RouterTestingModule } from '@angular/router/testing';
7
+ import { anyTestingModule } from ' /testing';
8
8
  import { TranslateModule } from '@ngx-translate/core';
9
9
 
10
10
  import { DropiBreadcrumbComponent, type BreadcrumbItem } from './dropi-breadcrumb.component';
@@ -16,7 +16,7 @@ const meta: Meta<DropiBreadcrumbComponent> = {
16
16
  decorators: [
17
17
  applicationConfig({
18
18
  providers: [
19
- importProvidersFrom(RouterTestingModule.withRoutes([]), TranslateModule.forRoot()),
19
+ importProvidersFrom(anyTestingModule.withRoutes([]), TranslateModule.forRoot()),
20
20
  ],
21
21
  }),
22
22
  ],
@@ -35,7 +35,7 @@ A navigation component showing the user's current location in the page hierarchy
35
35
 
36
36
  ## Key Features
37
37
  - **Home icon**: Customizable home route
38
- - **Router integration**: Works with Angular Router
38
+ - **any integration**: Works with Angular any
39
39
  - **External links**: Support for external URLs
40
40
  - **Disabled items**: Items can be disabled
41
41
  - **Last item clickable**: Optional clickable last item
@@ -52,7 +52,7 @@ A navigation component showing the user's current location in the page hierarchy
52
52
  },
53
53
  homeRoute: {
54
54
  control: 'object',
55
- description: 'Route (routerLink) for the Home icon.',
55
+ description: 'Route ( (click)) for the Home icon.',
56
56
  },
57
57
  homeIconName: {
58
58
  control: 'text',
@@ -76,8 +76,8 @@ export const Default: Story = {
76
76
  homeIconName: 'Home',
77
77
  lastItemClickable: false,
78
78
  items: [
79
- { label: 'Catalog', routerLink: ['/catalog'] },
80
- { label: 'Shoes', routerLink: ['/catalog/shoes'] },
79
+ { label: 'Catalog', (click): ['/catalog'] },
80
+ { label: 'Shoes', (click): ['/catalog/shoes'] },
81
81
  { label: 'Sports' }, // current
82
82
  ] as BreadcrumbItem[],
83
83
  },
@@ -89,9 +89,9 @@ export const LastItemClickable: Story = {
89
89
  homeIconName: 'Home',
90
90
  lastItemClickable: true,
91
91
  items: [
92
- { label: 'Catalog', routerLink: ['/catalog'] },
93
- { label: 'Shoes', routerLink: ['/catalog/shoes'] },
94
- { label: 'Sports', routerLink: ['/catalog/shoes/sport'] },
92
+ { label: 'Catalog', (click): ['/catalog'] },
93
+ { label: 'Shoes', (click): ['/catalog/shoes'] },
94
+ { label: 'Sports', (click): ['/catalog/shoes/sport'] },
95
95
  ] as BreadcrumbItem[],
96
96
  },
97
97
  };
@@ -113,7 +113,7 @@ export const WithDisabledItem: Story = {
113
113
  homeRoute: ['/'],
114
114
  homeIconName: 'Home',
115
115
  items: [
116
- { label: 'Catalog', routerLink: ['/catalog'] },
116
+ { label: 'Catalog', (click): ['/catalog'] },
117
117
  { label: 'Shoes', disabled: true },
118
118
  { label: 'Detail' }, // current
119
119
  ] as BreadcrumbItem[],
@@ -125,8 +125,8 @@ export const LongLabels: Story = {
125
125
  homeRoute: ['/'],
126
126
  homeIconName: 'Home',
127
127
  items: [
128
- { label: 'Category with a very long name', routerLink: ['/c/very-long'] },
129
- { label: 'Very long subsection to test ellipsis', routerLink: ['/c/very-long/sub'] },
128
+ { label: 'Category with a very long name', (click): ['/c/very-long'] },
129
+ { label: 'Very long subsection to test ellipsis', (click): ['/c/very-long/sub'] },
130
130
  { label: 'Page with extended title' },
131
131
  ] as BreadcrumbItem[],
132
132
  },
@@ -1,100 +1,35 @@
1
- import { CommonModule } from '@angular/common';
2
- import { Component, Input, OnInit } from '@angular/core';
3
- import { IconComponent } from '../icon/icon.component';
4
- import { trigger, transition, style, animate } from '@angular/animations';
1
+ import {
2
+ Component,
3
+ Input,
4
+ OnInit,
5
+ CUSTOM_ELEMENTS_SCHEMA,
6
+ } from "@angular/core";
7
+ import { CommonModule } from "@angular/common";
5
8
 
6
9
  @Component({
7
- selector: 'app-dropi-chips',
8
- templateUrl: './dropi-chips.component.html',
9
- styleUrls: ['./dropi-chips.component.scss'],
10
+ selector: "dropi-chips",
10
11
  standalone: true,
11
- imports: [CommonModule, IconComponent],
12
- animations: [
13
- trigger('fade', [
14
- transition(':enter', [
15
- style({ opacity: 0, transform: 'scale(0.8)' }),
16
- animate('200ms ease-out', style({ opacity: 1, transform: 'scale(1)' })),
17
- ]),
18
- transition(':leave', [
19
- animate('150ms ease-in', style({ opacity: 0, transform: 'scale(0.8)' })),
20
- ]),
21
- ]),
22
- ],
12
+ imports: [CommonModule],
13
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
14
+ templateUrl: "./dropi-chips.component.html",
15
+ styleUrls: ["./dropi-chips.component.scss"],
23
16
  })
24
17
  export class DropiChipsComponent implements OnInit {
25
- @Input() style: 'filtrers' | 'fill' = 'fill';
26
- @Input() type: 'icon' | 'text' | 'avatar' = 'icon';
27
- @Input() urlImg: string;
28
- @Input() showIcon: boolean = false;
29
- @Input() icon: string = '';
30
- isVisible = true;
18
+ @Input() public value: any[] = [];
19
+ @Input() public type: "avatar" | "icon" | "default" = "default";
20
+ @Input() public urlImg: string = "";
21
+ @Input() public icon: string = "";
22
+ @Input() public fontColor: string = "currentColor";
23
+ @Input() public showIcon: boolean = false;
31
24
 
32
- fontColor = 'Gray-Gray-600';
33
-
34
- stylesChips = {
35
- flitrers: {
36
- bgc: 'var(--Gray-Gray-50)',
37
- br: 'var(--Border-2)',
38
- bs: 'solid',
39
- bw: '1px',
40
- bc: 'var(--Gray-Gray-200)',
41
- cl: 'var(--Gray-Gray-600)',
42
- },
43
- fill: {
44
- bgc: 'var(--Primary-Primary-50)',
45
- br: 'var(--Border-2)',
46
- bs: 'none',
47
- bw: '1px',
48
- bc: 'var(--Primary-Primary-200)',
49
- cl: 'var(--Primary-Primary-500)',
50
- },
51
- };
52
-
53
- styleToApply: {
54
- 'background-color': any;
55
- 'border-radius': any;
56
- 'border-style': any;
57
- 'border-width': any;
58
- 'border-color': any;
59
- color: any;
60
- };
25
+ public isVisible: boolean = true;
26
+ public styleToApply: any = {};
61
27
 
62
28
  constructor() {}
63
29
 
64
- ngOnInit() {
65
- if (!this.urlImg || this.urlImg == '') {
66
- this.urlImg = 'assets/images/.Radio icon.png';
67
- }
68
- this.selectStyle();
69
- }
70
-
71
- selectStyle() {
72
- if (this.stylesChips.hasOwnProperty(this.style)) {
73
- const selectedStyle = this.stylesChips[this.style];
74
-
75
- this.styleToApply = {
76
- 'background-color': selectedStyle.bgc,
77
- 'border-radius': selectedStyle.br,
78
- 'border-style': selectedStyle.bs,
79
- 'border-width': selectedStyle.bw,
80
- 'border-color': selectedStyle.bc,
81
- color: selectedStyle.cl,
82
- };
83
-
84
- if (this.type == 'icon') {
85
- this.styleToApply['padding'] = '0 8px';
86
- }
87
-
88
- this.setFontColor();
89
- }
90
- }
91
-
92
- setFontColor() {
93
- this.fontColor = this.styleToApply['color'];
94
- this.fontColor = this.fontColor.substring(6, this.fontColor.length - 1);
95
- }
30
+ ngOnInit(): void {}
96
31
 
97
- closeChips() {
32
+ public closeChips(): void {
98
33
  this.isVisible = false;
99
34
  }
100
35
  }