@spartan-ng/cli 0.0.1-alpha.379 → 0.0.1-alpha.382

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 (198) hide show
  1. package/generators.json +30 -0
  2. package/package.json +4 -2
  3. package/src/generators/base/lib/build-dependency-array.js +1 -35
  4. package/src/generators/base/lib/build-dependency-array.js.map +1 -1
  5. package/src/generators/base/schema.d.ts +0 -1
  6. package/src/generators/base/versions.d.ts +1 -21
  7. package/src/generators/base/versions.js +2 -22
  8. package/src/generators/base/versions.js.map +1 -1
  9. package/src/generators/migrate-core/compat.d.ts +2 -0
  10. package/src/generators/migrate-core/compat.js +6 -0
  11. package/src/generators/migrate-core/compat.js.map +1 -0
  12. package/src/generators/migrate-core/generator.d.ts +4 -0
  13. package/src/generators/migrate-core/generator.js +52 -0
  14. package/src/generators/migrate-core/generator.js.map +1 -0
  15. package/src/generators/migrate-core/schema.d.ts +3 -0
  16. package/src/generators/migrate-core/schema.json +14 -0
  17. package/src/generators/migrate-icon/compat.d.ts +2 -0
  18. package/src/generators/migrate-icon/compat.js +6 -0
  19. package/src/generators/migrate-icon/compat.js.map +1 -0
  20. package/src/generators/migrate-icon/generator.d.ts +4 -0
  21. package/src/generators/migrate-icon/generator.js +286 -0
  22. package/src/generators/migrate-icon/generator.js.map +1 -0
  23. package/src/generators/migrate-icon/schema.d.ts +3 -0
  24. package/src/generators/migrate-icon/schema.json +14 -0
  25. package/src/generators/migrate-scroll-area/compat.d.ts +2 -0
  26. package/src/generators/migrate-scroll-area/compat.js +6 -0
  27. package/src/generators/migrate-scroll-area/compat.js.map +1 -0
  28. package/src/generators/migrate-scroll-area/generator.d.ts +4 -0
  29. package/src/generators/migrate-scroll-area/generator.js +112 -0
  30. package/src/generators/migrate-scroll-area/generator.js.map +1 -0
  31. package/src/generators/migrate-scroll-area/schema.d.ts +3 -0
  32. package/src/generators/migrate-scroll-area/schema.json +14 -0
  33. package/src/generators/ui/generator.js +0 -5
  34. package/src/generators/ui/generator.js.map +1 -1
  35. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-content.component.ts.template +1 -1
  36. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-icon.directive.ts.template +4 -3
  37. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-item.directive.ts.template +1 -1
  38. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-trigger.directive.ts.template +1 -1
  39. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion.directive.ts.template +1 -1
  40. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-cancel-button.directive.ts.template +1 -1
  41. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-content.component.ts.template +1 -1
  42. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-description.directive.ts.template +1 -1
  43. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-footer.component.ts.template +1 -1
  44. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-header.component.ts.template +1 -1
  45. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-overlay.directive.ts.template +1 -1
  46. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-title.directive.ts.template +1 -1
  47. package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-description.directive.ts.template +1 -1
  48. package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-title.directive.ts.template +1 -1
  49. package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert.directive.ts.template +1 -1
  50. package/src/generators/ui/libs/ui-aspect-ratio-helm/files/lib/helm-aspect-ratio.directive.ts.template +1 -1
  51. package/src/generators/ui/libs/ui-avatar-helm/files/lib/fallback/hlm-avatar-fallback.directive.ts.template +1 -1
  52. package/src/generators/ui/libs/ui-avatar-helm/files/lib/hlm-avatar.component.ts.template +1 -1
  53. package/src/generators/ui/libs/ui-avatar-helm/files/lib/image/hlm-avatar-image.directive.ts.template +1 -1
  54. package/src/generators/ui/libs/ui-badge-helm/files/lib/hlm-badge.directive.ts.template +1 -1
  55. package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/breadcrumb-ellipsis.component.ts.template +5 -4
  56. package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/breadcrumb-item.directive.ts.template +1 -1
  57. package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/breadcrumb-link.directive.ts.template +1 -1
  58. package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/breadcrumb-list.directive.ts.template +1 -1
  59. package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/breadcrumb-page.directive.ts.template +1 -1
  60. package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/breadcrumb-separator.component.ts.template +5 -4
  61. package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/breadcrumb.directive.ts.template +1 -1
  62. package/src/generators/ui/libs/ui-button-helm/files/lib/hlm-button.directive.ts.template +1 -1
  63. package/src/generators/ui/libs/ui-calendar-helm/files/lib/hlm-calendar.component.ts.template +7 -5
  64. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-content.directive.ts.template +1 -1
  65. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-description.directive.ts.template +1 -1
  66. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-footer.directive.ts.template +1 -1
  67. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-header.directive.ts.template +1 -1
  68. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-title.directive.ts.template +1 -1
  69. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card.directive.ts.template +1 -1
  70. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-content.component.ts.template +1 -1
  71. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-item.component.ts.template +1 -1
  72. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-next.component.ts.template +5 -4
  73. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-previous.component.ts.template +5 -4
  74. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel.component.ts.template +1 -1
  75. package/src/generators/ui/libs/ui-checkbox-helm/files/lib/hlm-checkbox-checkicon.component.ts.template +5 -4
  76. package/src/generators/ui/libs/ui-checkbox-helm/files/lib/hlm-checkbox.component.ts.template +1 -1
  77. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-dialog-close-button.directive.ts.template +1 -1
  78. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-dialog.directive.ts.template +1 -1
  79. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-empty.directive.ts.template +1 -1
  80. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-group.directive.ts.template +1 -1
  81. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-input-wrapper.component.ts.template +2 -2
  82. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-input.directive.ts.template +1 -1
  83. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-item-icon.directive.ts.template +3 -3
  84. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-item.directive.ts.template +1 -1
  85. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-list.directive.ts.template +1 -1
  86. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-shortcut.component.ts.template +1 -1
  87. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command.directive.ts.template +1 -1
  88. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-close.directive.ts.template +1 -1
  89. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-content.component.ts.template +5 -4
  90. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-description.directive.ts.template +1 -1
  91. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-footer.component.ts.template +1 -1
  92. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-header.component.ts.template +1 -1
  93. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-overlay.directive.ts.template +1 -1
  94. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-title.directive.ts.template +1 -1
  95. package/src/generators/ui/libs/ui-hover-card-helm/files/lib/hlm-hover-card-content.component.ts.template +1 -1
  96. package/src/generators/ui/libs/ui-icon-helm/files/index.ts.template +4 -7
  97. package/src/generators/ui/libs/ui-icon-helm/files/lib/hlm-icon.directive.spec.ts.template +66 -0
  98. package/src/generators/ui/libs/ui-icon-helm/files/lib/hlm-icon.directive.ts.template +41 -0
  99. package/src/generators/ui/libs/ui-icon-helm/files/lib/hlm-icon.token.ts.template +1 -4
  100. package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input-error.directive.ts.template +1 -1
  101. package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input.directive.ts.template +1 -1
  102. package/src/generators/ui/libs/ui-label-helm/files/lib/hlm-label.directive.ts.template +1 -1
  103. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-bar-item.directive.ts.template +1 -1
  104. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-bar.component.ts.template +1 -1
  105. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-check.component.ts.template +5 -4
  106. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-checkbox.directive.ts.template +1 -1
  107. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-icon.directive.ts.template +3 -3
  108. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-radio.component.ts.template +5 -4
  109. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-radio.directive.ts.template +1 -1
  110. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-sub-indicator.component.ts.template +5 -4
  111. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item.directive.ts.template +1 -1
  112. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-label.component.ts.template +1 -1
  113. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-separator.component.ts.template +1 -1
  114. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-shortcut.component.ts.template +1 -1
  115. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu.component.ts.template +1 -1
  116. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-sub-menu.component.ts.template +1 -1
  117. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-content.directive.ts.template +1 -1
  118. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-ellipsis.component.ts.template +5 -4
  119. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-item.directive.ts.template +1 -1
  120. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-link.directive.ts.template +1 -1
  121. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-next.component.ts.template +5 -4
  122. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-previous.component.ts.template +5 -4
  123. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination.directive.ts.template +1 -1
  124. package/src/generators/ui/libs/ui-popover-helm/files/lib/hlm-popover-close.directive.ts.template +1 -1
  125. package/src/generators/ui/libs/ui-popover-helm/files/lib/hlm-popover-content.directive.ts.template +1 -1
  126. package/src/generators/ui/libs/ui-progress-helm/files/lib/hlm-progress-indicator.directive.ts.template +1 -1
  127. package/src/generators/ui/libs/ui-progress-helm/files/lib/hlm-progress.directive.ts.template +1 -1
  128. package/src/generators/ui/libs/ui-radio-group-helm/files/index.ts.template +3 -3
  129. package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio-group.component.ts.template +23 -0
  130. package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio-indicator.component.ts.template +1 -1
  131. package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio.directive.ts.template +5 -2
  132. package/src/generators/ui/libs/ui-scroll-area-helm/files/index.ts.template +4 -4
  133. package/src/generators/ui/libs/ui-scroll-area-helm/files/lib/hlm-scroll-area.directive.ts.template +20 -0
  134. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-content.directive.ts.template +1 -1
  135. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-group.directive.ts.template +1 -1
  136. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-label.directive.ts.template +1 -1
  137. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-option.component.ts.template +5 -4
  138. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-scroll-down.component.ts.template +4 -3
  139. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-scroll-up.component.ts.template +4 -3
  140. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-trigger.component.ts.template +6 -6
  141. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-value.directive.ts.template +1 -1
  142. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select.directive.ts.template +1 -1
  143. package/src/generators/ui/libs/ui-separator-helm/files/lib/hlm-separator.directive.ts.template +1 -1
  144. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-close.directive.ts.template +1 -1
  145. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-content.component.ts.template +5 -4
  146. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-description.directive.ts.template +1 -1
  147. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-footer.component.ts.template +1 -1
  148. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-header.component.ts.template +1 -1
  149. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-overlay.directive.ts.template +1 -1
  150. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-title.directive.ts.template +1 -1
  151. package/src/generators/ui/libs/ui-skeleton-helm/files/lib/hlm-skeleton.component.ts.template +1 -1
  152. package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider-input.directive.ts.template +1 -1
  153. package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider-thumb.directive.ts.template +1 -1
  154. package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider-tick-mark.directive.ts.template +1 -1
  155. package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider-tick-marks.directive.ts.template +1 -1
  156. package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider-track-active-fill.directive.ts.template +1 -1
  157. package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider-track-active.directive.ts.template +1 -1
  158. package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider-track-inactive.directive.ts.template +1 -1
  159. package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider-track.component.ts.template +1 -1
  160. package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider.component.ts.template +1 -1
  161. package/src/generators/ui/libs/ui-sonner-helm/files/lib/hlm-toaster.component.ts.template +1 -1
  162. package/src/generators/ui/libs/ui-spinner-helm/files/lib/hlm-spinner.component.ts.template +1 -1
  163. package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch-thumb.directive.ts.template +1 -1
  164. package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch.component.ts.template +1 -1
  165. package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-caption.component.ts.template +1 -1
  166. package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-table.component.ts.template +1 -1
  167. package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-table.directive.ts.template +1 -1
  168. package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-td.component.ts.template +1 -1
  169. package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-th.component.ts.template +1 -1
  170. package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-trow.component.ts.template +1 -1
  171. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-content.directive.ts.template +1 -1
  172. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-list.component.ts.template +1 -1
  173. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-paginated-list.component.ts.template +6 -5
  174. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-trigger.directive.ts.template +1 -1
  175. package/src/generators/ui/libs/ui-toggle-helm/files/lib/hlm-toggle-group.directive.ts.template +1 -1
  176. package/src/generators/ui/libs/ui-toggle-helm/files/lib/hlm-toggle.directive.ts.template +1 -1
  177. package/src/generators/ui/libs/ui-tooltip-helm/files/lib/hlm-tooltip-trigger.directive.ts.template +19 -24
  178. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-blockquote.directive.ts.template +1 -1
  179. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-code.directive.ts.template +1 -1
  180. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h1.directive.ts.template +1 -1
  181. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h2.directive.ts.template +1 -1
  182. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h3.directive.ts.template +1 -1
  183. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h4.directive.ts.template +1 -1
  184. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-large.directive.ts.template +1 -1
  185. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-lead.directive.ts.template +1 -1
  186. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-muted.directive.ts.template +1 -1
  187. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-p.directive.ts.template +1 -1
  188. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-small.directive.ts.template +1 -1
  189. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-ul.directive.ts.template +1 -1
  190. package/src/generators/ui/schema.d.ts +0 -1
  191. package/src/generators/ui/supported-ui-libraries.json +69 -82
  192. package/src/utils/visit-files.d.ts +2 -0
  193. package/src/utils/visit-files.js +14 -0
  194. package/src/utils/visit-files.js.map +1 -0
  195. package/src/generators/ui/libs/ui-icon-helm/files/lib/hlm-icon.component.spec.ts.template +0 -64
  196. package/src/generators/ui/libs/ui-icon-helm/files/lib/hlm-icon.component.ts.template +0 -118
  197. package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio-group.directive.ts.template +0 -15
  198. package/src/generators/ui/libs/ui-scroll-area-helm/files/lib/hlm-scroll-area.component.ts.template +0 -49
@@ -3,10 +3,10 @@
3
3
  "internalName": "ui-accordion-helm",
4
4
  "peerDependencies": {
5
5
  "@angular/core": ">=18.0.0",
6
+ "@ng-icons/core": ">=29.0.0",
6
7
  "@ng-icons/lucide": ">=29.0.0",
7
- "@spartan-ng/brain": "0.0.1-alpha.379",
8
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
9
- "@spartan-ng/ui-icon-helm": "0.0.1-alpha.379",
8
+ "@spartan-ng/brain": "0.0.1-alpha.381",
9
+ "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
10
10
  "clsx": "^2.1.1"
11
11
  }
12
12
  },
@@ -14,8 +14,8 @@
14
14
  "internalName": "ui-alert-helm",
15
15
  "peerDependencies": {
16
16
  "@angular/core": ">=18.0.0",
17
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
18
- "@spartan-ng/ui-icon-helm": "0.0.1-alpha.379",
17
+ "@spartan-ng/brain": "0.0.1-alpha.381",
18
+ "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
19
19
  "class-variance-authority": "^0.7.0",
20
20
  "clsx": "^2.1.1"
21
21
  }
@@ -24,9 +24,8 @@
24
24
  "internalName": "ui-alert-dialog-helm",
25
25
  "peerDependencies": {
26
26
  "@angular/core": ">=18.0.0",
27
- "@spartan-ng/brain": "0.0.1-alpha.379",
28
- "@spartan-ng/ui-button-helm": "0.0.1-alpha.379",
29
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
27
+ "@spartan-ng/brain": "0.0.1-alpha.381",
28
+ "@spartan-ng/ui-button-helm": "0.0.1-alpha.381",
30
29
  "clsx": "^2.1.1"
31
30
  }
32
31
  },
@@ -35,7 +34,7 @@
35
34
  "peerDependencies": {
36
35
  "@angular/cdk": ">=18.0.0",
37
36
  "@angular/core": ">=18.0.0",
38
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
37
+ "@spartan-ng/brain": "0.0.1-alpha.381",
39
38
  "clsx": "^2.1.1"
40
39
  }
41
40
  },
@@ -43,8 +42,7 @@
43
42
  "internalName": "ui-avatar-helm",
44
43
  "peerDependencies": {
45
44
  "@angular/core": ">=18.0.0",
46
- "@spartan-ng/brain": "0.0.1-alpha.379",
47
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
45
+ "@spartan-ng/brain": "0.0.1-alpha.381",
48
46
  "class-variance-authority": "^0.7.0",
49
47
  "clsx": "^2.1.1"
50
48
  }
@@ -54,7 +52,7 @@
54
52
  "peerDependencies": {
55
53
  "@angular/cdk": ">=18.0.0",
56
54
  "@angular/core": ">=18.0.0",
57
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
55
+ "@spartan-ng/brain": "0.0.1-alpha.381",
58
56
  "class-variance-authority": "^0.7.0",
59
57
  "clsx": "^2.1.1"
60
58
  }
@@ -64,9 +62,10 @@
64
62
  "peerDependencies": {
65
63
  "@angular/core": "18.2.5",
66
64
  "@angular/router": "18.2.5",
65
+ "@ng-icons/core": ">=29.0.0",
67
66
  "@ng-icons/lucide": ">=29.0.0",
68
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
69
- "@spartan-ng/ui-icon-helm": "0.0.1-alpha.379",
67
+ "@spartan-ng/brain": "0.0.1-alpha.381",
68
+ "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
70
69
  "clsx": "^2.1.1"
71
70
  }
72
71
  },
@@ -74,7 +73,7 @@
74
73
  "internalName": "ui-button-helm",
75
74
  "peerDependencies": {
76
75
  "@angular/core": ">=18.0.0",
77
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
76
+ "@spartan-ng/brain": "0.0.1-alpha.381",
78
77
  "class-variance-authority": "^0.7.0",
79
78
  "clsx": "^2.1.1"
80
79
  }
@@ -84,18 +83,18 @@
84
83
  "peerDependencies": {
85
84
  "@angular/cdk": ">=18.0.0",
86
85
  "@angular/core": ">=18.0.0",
86
+ "@ng-icons/core": ">=29.0.0",
87
87
  "@ng-icons/lucide": ">=29.0.0",
88
- "@spartan-ng/brain": "0.0.1-alpha.379",
89
- "@spartan-ng/ui-button-helm": "0.0.1-alpha.379",
90
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
91
- "@spartan-ng/ui-icon-helm": "0.0.1-alpha.379"
88
+ "@spartan-ng/brain": "0.0.1-alpha.381",
89
+ "@spartan-ng/ui-button-helm": "0.0.1-alpha.381",
90
+ "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381"
92
91
  }
93
92
  },
94
93
  "card": {
95
94
  "internalName": "ui-card-helm",
96
95
  "peerDependencies": {
97
96
  "@angular/core": ">=18.0.0",
98
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
97
+ "@spartan-ng/brain": "0.0.1-alpha.381",
99
98
  "class-variance-authority": "^0.7.0",
100
99
  "clsx": "^2.1.1"
101
100
  }
@@ -104,9 +103,9 @@
104
103
  "internalName": "ui-command-helm",
105
104
  "peerDependencies": {
106
105
  "@angular/core": ">=18.0.0",
107
- "@spartan-ng/ui-button-helm": "0.0.1-alpha.379",
108
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
109
- "@spartan-ng/ui-icon-helm": "0.0.1-alpha.379",
106
+ "@spartan-ng/brain": "0.0.1-alpha.381",
107
+ "@spartan-ng/ui-button-helm": "0.0.1-alpha.381",
108
+ "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
110
109
  "clsx": "^2.1.1"
111
110
  }
112
111
  },
@@ -116,22 +115,17 @@
116
115
  "@angular/cdk": ">=18.0.0",
117
116
  "@angular/common": ">=18.0.0",
118
117
  "@angular/core": ">=18.0.0",
118
+ "@ng-icons/core": ">=29.0.0",
119
119
  "@ng-icons/lucide": ">=29.0.0",
120
- "@spartan-ng/brain": "0.0.1-alpha.379",
121
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
122
- "@spartan-ng/ui-icon-helm": "0.0.1-alpha.379",
120
+ "@spartan-ng/brain": "0.0.1-alpha.381",
121
+ "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
123
122
  "clsx": "^2.1.1"
124
123
  }
125
124
  },
126
125
  "icon": {
127
126
  "internalName": "ui-icon-helm",
128
127
  "peerDependencies": {
129
- "@angular/common": ">=18.0.0",
130
- "@angular/core": ">=18.0.0",
131
- "@ng-icons/core": ">=29.0.0",
132
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
133
- "class-variance-authority": "^0.7.0",
134
- "clsx": "^2.1.1"
128
+ "@angular/core": ">=18.0.0"
135
129
  }
136
130
  },
137
131
  "input": {
@@ -139,8 +133,7 @@
139
133
  "peerDependencies": {
140
134
  "@angular/core": ">=18.0.0",
141
135
  "@angular/forms": ">=18.0.0",
142
- "@spartan-ng/brain": "0.0.1-alpha.379",
143
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
136
+ "@spartan-ng/brain": "0.0.1-alpha.381",
144
137
  "class-variance-authority": "^0.7.0",
145
138
  "clsx": "^2.1.1"
146
139
  }
@@ -149,8 +142,7 @@
149
142
  "internalName": "ui-label-helm",
150
143
  "peerDependencies": {
151
144
  "@angular/core": ">=18.0.0",
152
- "@spartan-ng/brain": "0.0.1-alpha.379",
153
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
145
+ "@spartan-ng/brain": "0.0.1-alpha.381",
154
146
  "class-variance-authority": "^0.7.0",
155
147
  "clsx": "^2.1.1"
156
148
  }
@@ -159,10 +151,10 @@
159
151
  "internalName": "ui-menu-helm",
160
152
  "peerDependencies": {
161
153
  "@angular/core": ">=18.0.0",
154
+ "@ng-icons/core": ">=29.0.0",
162
155
  "@ng-icons/lucide": ">=29.0.0",
163
- "@spartan-ng/brain": "0.0.1-alpha.379",
164
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
165
- "@spartan-ng/ui-icon-helm": "0.0.1-alpha.379",
156
+ "@spartan-ng/brain": "0.0.1-alpha.381",
157
+ "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
166
158
  "class-variance-authority": "^0.7.0",
167
159
  "clsx": "^2.1.1"
168
160
  }
@@ -171,7 +163,7 @@
171
163
  "internalName": "ui-popover-helm",
172
164
  "peerDependencies": {
173
165
  "@angular/core": ">=18.0.0",
174
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
166
+ "@spartan-ng/brain": "0.0.1-alpha.381",
175
167
  "clsx": "^2.1.1"
176
168
  }
177
169
  },
@@ -179,8 +171,7 @@
179
171
  "internalName": "ui-progress-helm",
180
172
  "peerDependencies": {
181
173
  "@angular/core": ">=18.0.0",
182
- "@spartan-ng/brain": "0.0.1-alpha.379",
183
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
174
+ "@spartan-ng/brain": "0.0.1-alpha.381",
184
175
  "clsx": "^2.1.1"
185
176
  }
186
177
  },
@@ -188,25 +179,24 @@
188
179
  "internalName": "ui-radio-group-helm",
189
180
  "peerDependencies": {
190
181
  "@angular/core": ">=18.0.0",
191
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
182
+ "@spartan-ng/brain": "0.0.1-alpha.381",
192
183
  "clsx": "^2.1.1"
193
184
  }
194
185
  },
195
186
  "scrollarea": {
196
187
  "internalName": "ui-scroll-area-helm",
197
188
  "peerDependencies": {
198
- "@angular/cdk": ">=18.0.0",
199
189
  "@angular/core": ">=18.0.0",
200
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
190
+ "@spartan-ng/brain": "0.0.1-alpha.381",
201
191
  "clsx": "^2.1.1",
202
- "ngx-scrollbar": "^13.0.3"
192
+ "ngx-scrollbar": ">=16.0.0"
203
193
  }
204
194
  },
205
195
  "separator": {
206
196
  "internalName": "ui-separator-helm",
207
197
  "peerDependencies": {
208
198
  "@angular/core": ">=18.0.0",
209
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
199
+ "@spartan-ng/brain": "0.0.1-alpha.381",
210
200
  "clsx": "^2.1.1"
211
201
  }
212
202
  },
@@ -214,10 +204,10 @@
214
204
  "internalName": "ui-sheet-helm",
215
205
  "peerDependencies": {
216
206
  "@angular/core": ">=18.0.0",
207
+ "@ng-icons/core": ">=29.0.0",
217
208
  "@ng-icons/lucide": ">=29.0.0",
218
- "@spartan-ng/brain": "0.0.1-alpha.379",
219
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
220
- "@spartan-ng/ui-icon-helm": "0.0.1-alpha.379",
209
+ "@spartan-ng/brain": "0.0.1-alpha.381",
210
+ "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
221
211
  "class-variance-authority": "^0.7.0",
222
212
  "clsx": "^2.1.1"
223
213
  }
@@ -226,7 +216,7 @@
226
216
  "internalName": "ui-skeleton-helm",
227
217
  "peerDependencies": {
228
218
  "@angular/core": ">=18.0.0",
229
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
219
+ "@spartan-ng/brain": "0.0.1-alpha.381",
230
220
  "clsx": "^2.1.1"
231
221
  }
232
222
  },
@@ -234,7 +224,7 @@
234
224
  "internalName": "ui-spinner-helm",
235
225
  "peerDependencies": {
236
226
  "@angular/core": ">=18.0.0",
237
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
227
+ "@spartan-ng/brain": "0.0.1-alpha.381",
238
228
  "class-variance-authority": "^0.7.0",
239
229
  "clsx": "^2.1.1"
240
230
  }
@@ -245,8 +235,7 @@
245
235
  "@angular/cdk": ">=18.0.0",
246
236
  "@angular/core": ">=18.0.0",
247
237
  "@angular/forms": ">=18.0.0",
248
- "@spartan-ng/brain": "0.0.1-alpha.379",
249
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
238
+ "@spartan-ng/brain": "0.0.1-alpha.381",
250
239
  "clsx": "^2.1.1"
251
240
  }
252
241
  },
@@ -255,11 +244,11 @@
255
244
  "peerDependencies": {
256
245
  "@angular/cdk": ">=18.0.0",
257
246
  "@angular/core": ">=18.0.0",
247
+ "@ng-icons/core": ">=29.0.0",
258
248
  "@ng-icons/lucide": ">=29.0.0",
259
- "@spartan-ng/brain": "0.0.1-alpha.379",
260
- "@spartan-ng/ui-button-helm": "0.0.1-alpha.379",
261
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
262
- "@spartan-ng/ui-icon-helm": "0.0.1-alpha.379",
249
+ "@spartan-ng/brain": "0.0.1-alpha.381",
250
+ "@spartan-ng/ui-button-helm": "0.0.1-alpha.381",
251
+ "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
263
252
  "class-variance-authority": "^0.7.0",
264
253
  "clsx": "^2.1.1"
265
254
  }
@@ -268,7 +257,7 @@
268
257
  "internalName": "ui-toggle-helm",
269
258
  "peerDependencies": {
270
259
  "@angular/core": ">=18.0.0",
271
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
260
+ "@spartan-ng/brain": "0.0.1-alpha.381",
272
261
  "class-variance-authority": "^0.7.0",
273
262
  "clsx": "^2.1.1"
274
263
  }
@@ -277,7 +266,7 @@
277
266
  "internalName": "ui-typography-helm",
278
267
  "peerDependencies": {
279
268
  "@angular/core": ">=18.0.0",
280
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
269
+ "@spartan-ng/brain": "0.0.1-alpha.381",
281
270
  "clsx": "^2.1.1"
282
271
  }
283
272
  },
@@ -286,8 +275,7 @@
286
275
  "peerDependencies": {
287
276
  "@angular/common": ">=18.0.0",
288
277
  "@angular/core": ">=18.0.0",
289
- "@spartan-ng/brain": "0.0.1-alpha.379",
290
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
278
+ "@spartan-ng/brain": "0.0.1-alpha.381",
291
279
  "clsx": "^2.1.1"
292
280
  }
293
281
  },
@@ -295,7 +283,7 @@
295
283
  "internalName": "ui-hover-card-helm",
296
284
  "peerDependencies": {
297
285
  "@angular/core": ">=18.0.0",
298
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
286
+ "@spartan-ng/brain": "0.0.1-alpha.381",
299
287
  "clsx": "^2.1.1"
300
288
  }
301
289
  },
@@ -304,10 +292,10 @@
304
292
  "peerDependencies": {
305
293
  "@angular/core": ">=18.0.0",
306
294
  "@angular/forms": ">=18.0.0",
295
+ "@ng-icons/core": ">=29.0.0",
307
296
  "@ng-icons/lucide": ">=29.0.0",
308
- "@spartan-ng/brain": "0.0.1-alpha.379",
309
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
310
- "@spartan-ng/ui-icon-helm": "0.0.1-alpha.379",
297
+ "@spartan-ng/brain": "0.0.1-alpha.381",
298
+ "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
311
299
  "clsx": "^2.1.1"
312
300
  }
313
301
  },
@@ -315,7 +303,7 @@
315
303
  "internalName": "ui-tooltip-helm",
316
304
  "peerDependencies": {
317
305
  "@angular/core": ">=18.0.0",
318
- "@spartan-ng/brain": "0.0.1-alpha.379"
306
+ "@spartan-ng/brain": "0.0.1-alpha.381"
319
307
  }
320
308
  },
321
309
  "pagination": {
@@ -325,12 +313,12 @@
325
313
  "@angular/core": ">=18.0.0",
326
314
  "@angular/forms": ">=18.0.0",
327
315
  "@angular/router": ">=18.0.0",
316
+ "@ng-icons/core": ">=29.0.0",
328
317
  "@ng-icons/lucide": ">=29.0.0",
329
- "@spartan-ng/brain": "0.0.1-alpha.379",
330
- "@spartan-ng/ui-button-helm": "0.0.1-alpha.379",
331
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
332
- "@spartan-ng/ui-icon-helm": "0.0.1-alpha.379",
333
- "@spartan-ng/ui-select-helm": "0.0.1-alpha.379",
318
+ "@spartan-ng/brain": "0.0.1-alpha.381",
319
+ "@spartan-ng/ui-button-helm": "0.0.1-alpha.381",
320
+ "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
321
+ "@spartan-ng/ui-select-helm": "0.0.1-alpha.381",
334
322
  "class-variance-authority": "^0.7.0",
335
323
  "clsx": "^2.1.1"
336
324
  }
@@ -339,10 +327,11 @@
339
327
  "internalName": "ui-carousel-helm",
340
328
  "peerDependencies": {
341
329
  "@angular/core": ">=18.0.0",
330
+ "@ng-icons/core": ">=29.0.0",
342
331
  "@ng-icons/lucide": ">=29.0.0",
343
- "@spartan-ng/ui-button-helm": "0.0.1-alpha.379",
344
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
345
- "@spartan-ng/ui-icon-helm": "0.0.1-alpha.379",
332
+ "@spartan-ng/brain": "0.0.1-alpha.381",
333
+ "@spartan-ng/ui-button-helm": "0.0.1-alpha.381",
334
+ "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
346
335
  "clsx": "^2.1.1",
347
336
  "embla-carousel-angular": "18.0.0"
348
337
  }
@@ -353,9 +342,8 @@
353
342
  "@angular/core": ">=18.0.0",
354
343
  "@ng-icons/core": ">=29.0.0",
355
344
  "@ng-icons/lucide": ">=29.0.0",
356
- "@spartan-ng/brain": "0.0.1-alpha.379",
357
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
358
- "@spartan-ng/ui-icon-helm": "0.0.1-alpha.379",
345
+ "@spartan-ng/brain": "0.0.1-alpha.381",
346
+ "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
359
347
  "class-variance-authority": "^0.7.0",
360
348
  "clsx": "^2.1.1"
361
349
  }
@@ -366,7 +354,7 @@
366
354
  "@angular/common": "^18.1.0",
367
355
  "@angular/core": "^18.1.0",
368
356
  "@ng-icons/lucide": "^26.3.0",
369
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
357
+ "@spartan-ng/brain": "0.0.1-alpha.381",
370
358
  "clsx": "^2.1.1",
371
359
  "ngx-sonner": "^2.0.0"
372
360
  }
@@ -375,15 +363,14 @@
375
363
  "internalName": "ui-form-field-helm",
376
364
  "peerDependencies": {
377
365
  "@angular/core": ">=18.0.0",
378
- "@spartan-ng/brain": "0.0.1-alpha.379"
366
+ "@spartan-ng/brain": "0.0.1-alpha.381"
379
367
  }
380
368
  },
381
369
  "slider": {
382
370
  "internalName": "ui-slider-helm",
383
371
  "peerDependencies": {
384
372
  "@angular/core": ">=18.0.0",
385
- "@spartan-ng/brain": "0.0.1-alpha.379",
386
- "@spartan-ng/ui-core": "0.0.1-alpha.379",
373
+ "@spartan-ng/brain": "0.0.1-alpha.381",
387
374
  "clsx": "^2.1.1"
388
375
  }
389
376
  }
@@ -0,0 +1,2 @@
1
+ import { Tree } from '@nx/devkit';
2
+ export declare function visitFiles(tree: Tree, dirPath: string, visitor: (path: string) => void): void;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.visitFiles = visitFiles;
4
+ const devkit_1 = require("@nx/devkit");
5
+ function visitFiles(tree, dirPath, visitor) {
6
+ (0, devkit_1.visitNotIgnoredFiles)(tree, dirPath, (path) => {
7
+ // if the file is part of the generators we want to skip as we don't want it updating the code that is performing the updates
8
+ if (path.includes('libs/cli/src/generators')) {
9
+ return;
10
+ }
11
+ visitor(path);
12
+ });
13
+ }
14
+ //# sourceMappingURL=visit-files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visit-files.js","sourceRoot":"","sources":["../../../../../libs/cli/src/utils/visit-files.ts"],"names":[],"mappings":";;AAEA,gCAQC;AAVD,uCAAwD;AAExD,SAAgB,UAAU,CAAC,IAAU,EAAE,OAAe,EAAE,OAA+B;IACtF,IAAA,6BAAoB,EAAC,IAAI,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QAC5C,6HAA6H;QAC7H,IAAI,IAAI,CAAC,QAAQ,CAAC,yBAAyB,CAAC,EAAE,CAAC;YAC9C,OAAO;QACR,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC,CAAC,CAAC;AACJ,CAAC"}
@@ -1,64 +0,0 @@
1
- import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
2
- import { By } from '@angular/platform-browser';
3
- import { NgIconComponent, provideIcons } from '@ng-icons/core';
4
- import { lucideCheck } from '@ng-icons/lucide';
5
- import { type RenderResult, render } from '@testing-library/angular';
6
- import { HlmIconComponent } from './hlm-icon.component';
7
-
8
- @Component({
9
- selector: 'hlm-mock',
10
- standalone: true,
11
- changeDetection: ChangeDetectionStrategy.OnPush,
12
- imports: [HlmIconComponent],
13
- providers: [provideIcons({ lucideCheck })],
14
- template: `
15
- <hlm-icon class="test" ngIconClass="test2" name="lucideCheck" [size]="size" color="red" strokeWidth="2" />
16
- `,
17
- })
18
- class HlmMockComponent {
19
- @Input() public size = 'base';
20
- }
21
-
22
- describe('HlmIconComponent', () => {
23
- let r: RenderResult<HlmMockComponent>;
24
-
25
- beforeEach(async () => {
26
- r = await render(HlmMockComponent);
27
- });
28
-
29
- it('should create', () => {
30
- expect(r).toBeTruthy();
31
- });
32
-
33
- it('should render the icon', () => {
34
- expect(r.container.querySelector('svg')).toBeTruthy();
35
- });
36
-
37
- it('should pass the size, color and strokeWidth props and the classes to the ng-icon component', () => {
38
- const debugEl = r.fixture.debugElement.query(By.directive(NgIconComponent));
39
- const component = debugEl.componentInstance as NgIconComponent;
40
- expect(component.color()).toBe('red');
41
- expect(component.strokeWidth()).toBe('2');
42
- expect(component.size()).toBe('100%');
43
- expect(debugEl.nativeElement.classList).toContain('test2');
44
- });
45
-
46
- it('should add the appropriate size variant class', () => {
47
- expect(r.container.querySelector('hlm-icon')?.classList).toContain('h-6');
48
- expect(r.container.querySelector('hlm-icon')?.classList).toContain('w-6');
49
- });
50
-
51
- it('should compose the user classes', () => {
52
- expect(r.container.querySelector('hlm-icon')?.classList).toContain('inline-flex');
53
- expect(r.container.querySelector('hlm-icon')?.classList).toContain('test');
54
- });
55
-
56
- it('should forward the size property if the size is not a pre-defined size', async () => {
57
- await r.rerender({ componentInputs: { size: '2rem' } });
58
- r.fixture.detectChanges();
59
- const debugEl = r.fixture.debugElement.query(By.directive(NgIconComponent));
60
- expect(debugEl.componentInstance.size()).toBe('2rem');
61
- expect(r.container.querySelector('hlm-icon')?.classList).not.toContain('h-6');
62
- expect(r.container.querySelector('hlm-icon')?.classList).not.toContain('w-6');
63
- });
64
- });
@@ -1,118 +0,0 @@
1
- import { isPlatformBrowser } from '@angular/common';
2
- import {
3
- ChangeDetectionStrategy,
4
- Component,
5
- ElementRef,
6
- type OnDestroy,
7
- PLATFORM_ID,
8
- ViewEncapsulation,
9
- computed,
10
- inject,
11
- input,
12
- signal,
13
- } from '@angular/core';
14
- import { type IconType, NgIconComponent } from '@ng-icons/core';
15
- import { hlm } from '@spartan-ng/ui-core';
16
- import { type VariantProps, cva } from 'class-variance-authority';
17
- import type { ClassValue } from 'clsx';
18
- import { injectHlmIconConfig } from './hlm-icon.token';
19
-
20
- const DEFINED_SIZES = ['xs', 'sm', 'base', 'lg', 'xl', 'none'] as const;
21
-
22
- type DefinedSizes = (typeof DEFINED_SIZES)[number];
23
-
24
- export const iconVariants = cva('inline-flex', {
25
- variants: {
26
- variant: {
27
- xs: 'h-3 w-3',
28
- sm: 'h-4 w-4',
29
- base: 'h-6 w-6',
30
- lg: 'h-8 w-8',
31
- xl: 'h-12 w-12',
32
- none: '',
33
- } satisfies Record<DefinedSizes, string>,
34
- },
35
- defaultVariants: {
36
- variant: 'base',
37
- },
38
- });
39
-
40
- export type IconVariants = VariantProps<typeof iconVariants>;
41
-
42
- export type IconSize = DefinedSizes | (Record<never, never> & string);
43
-
44
- const isDefinedSize = (size: IconSize): size is DefinedSizes => {
45
- return DEFINED_SIZES.includes(size as DefinedSizes);
46
- };
47
-
48
- const TAILWIND_H_W_PATTERN = /\b(h-\d+|w-\d+)\b/g;
49
-
50
- @Component({
51
- selector: 'hlm-icon',
52
- standalone: true,
53
- imports: [NgIconComponent],
54
- encapsulation: ViewEncapsulation.None,
55
- changeDetection: ChangeDetectionStrategy.OnPush,
56
- template: `
57
- <ng-icon
58
- [class]="ngIconClass()"
59
- [size]="ngIconSize()"
60
- [name]="name()"
61
- [color]="color()"
62
- [strokeWidth]="strokeWidth()"
63
- />
64
- `,
65
- host: {
66
- '[class]': '_computedClass()',
67
- },
68
- })
69
- export class HlmIconComponent implements OnDestroy {
70
- private readonly _host = inject(ElementRef);
71
- private readonly _platformId = inject(PLATFORM_ID);
72
- private readonly _config = injectHlmIconConfig();
73
-
74
- private _mutObs?: MutationObserver;
75
-
76
- private readonly _hostClasses = signal<string>('');
77
-
78
- public readonly name = input<IconType>(this._config.name);
79
-
80
- public readonly size = input<IconSize>(this._config.size);
81
-
82
- protected readonly ngIconSize = computed(() => (isDefinedSize(this.size()) ? '100%' : (this.size() as string)));
83
-
84
- public readonly color = input<string | undefined>(undefined);
85
-
86
- public readonly strokeWidth = input<string | number | undefined>(undefined);
87
-
88
- public readonly ngIconClass = input<ClassValue>('');
89
-
90
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
91
-
92
- protected readonly _computedClass = computed(() => {
93
- const size: IconSize = this.size();
94
- const hostClasses = this._hostClasses();
95
- const variant = isDefinedSize(size) ? size : 'none';
96
- const classes = variant === 'none' && size === 'none' ? hostClasses : hostClasses.replace(TAILWIND_H_W_PATTERN, '');
97
- return hlm(iconVariants({ variant }), this.userClass(), classes);
98
- });
99
-
100
- constructor() {
101
- if (isPlatformBrowser(this._platformId)) {
102
- this._mutObs = new MutationObserver((mutations: MutationRecord[]) => {
103
- mutations.forEach((mutation: MutationRecord) => {
104
- if (mutation.attributeName !== 'class') return;
105
- this._hostClasses.set((mutation.target as Node & { className?: string })?.className ?? '');
106
- });
107
- });
108
- this._mutObs.observe(this._host.nativeElement, {
109
- attributes: true,
110
- });
111
- }
112
- }
113
-
114
- ngOnDestroy() {
115
- this._mutObs?.disconnect();
116
- this._mutObs = undefined;
117
- }
118
- }
@@ -1,15 +0,0 @@
1
- import { Directive, computed, input } from '@angular/core';
2
- import { hlm } from '@spartan-ng/ui-core';
3
- import type { ClassValue } from 'clsx';
4
-
5
- @Directive({
6
- selector: 'brn-radio-group[hlm],[hlmRadioGroup]',
7
- standalone: true,
8
- host: {
9
- '[class]': '_computedClass()',
10
- },
11
- })
12
- export class HlmRadioGroupDirective {
13
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
14
- protected _computedClass = computed(() => hlm('block', this.userClass()));
15
- }