@spartan-ng/cli 0.0.1-alpha.519 → 0.0.1-alpha.520

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 (216) hide show
  1. package/package.json +1 -1
  2. package/src/generators/base/lib/deleteFiles.d.ts +1 -1
  3. package/src/generators/base/lib/initialize-angular-library.js.map +1 -1
  4. package/src/generators/base/schema.d.ts +1 -1
  5. package/src/generators/healthcheck/compat.d.ts +1 -1
  6. package/src/generators/healthcheck/generator.d.ts +2 -2
  7. package/src/generators/healthcheck/generator.js.map +1 -1
  8. package/src/generators/healthcheck/healthchecks/brain-imports.d.ts +1 -1
  9. package/src/generators/healthcheck/healthchecks/brain-imports.js.map +1 -1
  10. package/src/generators/healthcheck/healthchecks/brn-accordion-trigger.d.ts +1 -1
  11. package/src/generators/healthcheck/healthchecks/brn-accordion-trigger.js.map +1 -1
  12. package/src/generators/healthcheck/healthchecks/brn-checkbox-changed-event-rename.d.ts +1 -1
  13. package/src/generators/healthcheck/healthchecks/brn-checkbox-changed-event-rename.js.map +1 -1
  14. package/src/generators/healthcheck/healthchecks/brn-radio.d.ts +1 -1
  15. package/src/generators/healthcheck/healthchecks/brn-radio.js.map +1 -1
  16. package/src/generators/healthcheck/healthchecks/brn-separator.d.ts +1 -1
  17. package/src/generators/healthcheck/healthchecks/brn-separator.js.map +1 -1
  18. package/src/generators/healthcheck/healthchecks/brn-switch-changed-event-rename.d.ts +1 -1
  19. package/src/generators/healthcheck/healthchecks/brn-switch-changed-event-rename.js.map +1 -1
  20. package/src/generators/healthcheck/healthchecks/brn-toggle-group.d.ts +1 -1
  21. package/src/generators/healthcheck/healthchecks/brn-toggle-group.js.map +1 -1
  22. package/src/generators/healthcheck/healthchecks/core-imports.d.ts +1 -1
  23. package/src/generators/healthcheck/healthchecks/core-imports.js.map +1 -1
  24. package/src/generators/healthcheck/healthchecks/helm-imports.d.ts +1 -1
  25. package/src/generators/healthcheck/healthchecks/helm-imports.js.map +1 -1
  26. package/src/generators/healthcheck/healthchecks/hlm-date-picker.d.ts +1 -1
  27. package/src/generators/healthcheck/healthchecks/hlm-date-picker.js.map +1 -1
  28. package/src/generators/healthcheck/healthchecks/hlm-icon.d.ts +1 -1
  29. package/src/generators/healthcheck/healthchecks/hlm-icon.js.map +1 -1
  30. package/src/generators/healthcheck/healthchecks/hlm-progress.d.ts +1 -1
  31. package/src/generators/healthcheck/healthchecks/hlm-progress.js.map +1 -1
  32. package/src/generators/healthcheck/healthchecks/hlm-scroll-area.d.ts +1 -1
  33. package/src/generators/healthcheck/healthchecks/hlm-scroll-area.js.map +1 -1
  34. package/src/generators/healthcheck/healthchecks/hlm-select.d.ts +1 -1
  35. package/src/generators/healthcheck/healthchecks/hlm-select.js.map +1 -1
  36. package/src/generators/healthcheck/healthchecks/hlm.d.ts +1 -1
  37. package/src/generators/healthcheck/healthchecks/hlm.js.map +1 -1
  38. package/src/generators/healthcheck/healthchecks/module-imports.d.ts +1 -1
  39. package/src/generators/healthcheck/healthchecks/module-imports.js.map +1 -1
  40. package/src/generators/healthcheck/healthchecks/naming-conventions.d.ts +1 -1
  41. package/src/generators/healthcheck/healthchecks/naming-conventions.js.map +1 -1
  42. package/src/generators/healthcheck/healthchecks/version.d.ts +1 -1
  43. package/src/generators/healthcheck/healthchecks/version.js.map +1 -1
  44. package/src/generators/healthcheck/healthchecks.d.ts +1 -1
  45. package/src/generators/healthcheck/utils/reporter.d.ts +1 -1
  46. package/src/generators/healthcheck/utils/reporter.js.map +1 -1
  47. package/src/generators/healthcheck/utils/runner.d.ts +2 -2
  48. package/src/generators/migrate-brain-accordion-trigger/generator.d.ts +2 -2
  49. package/src/generators/migrate-brain-accordion-trigger/generator.js.map +1 -1
  50. package/src/generators/migrate-brain-accordion-trigger/utils/html-utils.d.ts +1 -1
  51. package/src/generators/migrate-brain-accordion-trigger/utils/html-utils.js.map +1 -1
  52. package/src/generators/migrate-brain-accordion-trigger/utils/shared-utils.d.ts +2 -2
  53. package/src/generators/migrate-brain-accordion-trigger/utils/shared-utils.js.map +1 -1
  54. package/src/generators/migrate-brain-imports/generator.d.ts +2 -2
  55. package/src/generators/migrate-brain-imports/generator.js.map +1 -1
  56. package/src/generators/migrate-brn-checkbox-changed-event/generator.d.ts +2 -2
  57. package/src/generators/migrate-brn-checkbox-changed-event/generator.js.map +1 -1
  58. package/src/generators/migrate-brn-switch-changed-event/generator.d.ts +2 -2
  59. package/src/generators/migrate-brn-switch-changed-event/generator.js.map +1 -1
  60. package/src/generators/migrate-core/generator.d.ts +2 -2
  61. package/src/generators/migrate-core/generator.js.map +1 -1
  62. package/src/generators/migrate-date-picker/generator.d.ts +2 -2
  63. package/src/generators/migrate-date-picker/generator.js.map +1 -1
  64. package/src/generators/migrate-helm-imports/generator.d.ts +2 -2
  65. package/src/generators/migrate-helm-imports/generator.js.map +1 -1
  66. package/src/generators/migrate-helm-libraries/compat.d.ts +1 -1
  67. package/src/generators/migrate-helm-libraries/generator.d.ts +2 -2
  68. package/src/generators/migrate-helm-libraries/generator.js.map +1 -1
  69. package/src/generators/migrate-helm-libraries/schema.d.ts +1 -1
  70. package/src/generators/migrate-hlm/generator.d.ts +2 -2
  71. package/src/generators/migrate-hlm/generator.js.map +1 -1
  72. package/src/generators/migrate-icon/generator.d.ts +2 -2
  73. package/src/generators/migrate-icon/generator.js.map +1 -1
  74. package/src/generators/migrate-module-imports/generator.d.ts +2 -2
  75. package/src/generators/migrate-module-imports/generator.js.map +1 -1
  76. package/src/generators/migrate-naming-convention/generator.d.ts +2 -2
  77. package/src/generators/migrate-naming-convention/generator.js.map +1 -1
  78. package/src/generators/migrate-progress/generator.d.ts +2 -2
  79. package/src/generators/migrate-progress/generator.js.map +1 -1
  80. package/src/generators/migrate-radio/generator.d.ts +2 -2
  81. package/src/generators/migrate-radio/generator.js.map +1 -1
  82. package/src/generators/migrate-scroll-area/generator.d.ts +2 -2
  83. package/src/generators/migrate-scroll-area/generator.js.map +1 -1
  84. package/src/generators/migrate-select/generator.d.ts +2 -2
  85. package/src/generators/migrate-select/generator.js.map +1 -1
  86. package/src/generators/migrate-separator/generator.d.ts +2 -2
  87. package/src/generators/migrate-separator/generator.js.map +1 -1
  88. package/src/generators/migrate-toggle-group/generator.d.ts +2 -2
  89. package/src/generators/migrate-toggle-group/generator.js.map +1 -1
  90. package/src/generators/theme/generator.js.map +1 -1
  91. package/src/generators/theme/libs/add-theme-to-application-styles.d.ts +1 -1
  92. package/src/generators/theme/libs/add-theme-to-application-styles.js.map +1 -1
  93. package/src/generators/ui/generator.d.ts +4 -4
  94. package/src/generators/ui/generator.js +6 -1
  95. package/src/generators/ui/generator.js.map +1 -1
  96. package/src/generators/ui/libs/input-group/generator.d.ts +3 -0
  97. package/src/generators/ui/libs/input-group/generator.js +14 -0
  98. package/src/generators/ui/libs/input-group/generator.js.map +1 -0
  99. package/src/generators/ui/libs/ui-autocomplete-helm/files/lib/hlm-autocomplete-trigger.ts.template +1 -1
  100. package/src/generators/ui/libs/ui-autocomplete-helm/files/lib/hlm-autocomplete.token.ts.template +1 -1
  101. package/src/generators/ui/libs/ui-autocomplete-helm/files/lib/hlm-autocomplete.ts.template +4 -4
  102. package/src/generators/ui/libs/ui-avatar-helm/files/lib/image/hlm-avatar-image.ts.template +1 -1
  103. package/src/generators/ui/libs/ui-button-helm/files/lib/hlm-button.token.ts.template +1 -1
  104. package/src/generators/ui/libs/ui-calendar-helm/files/lib/hlm-calendar-multi.ts.template +2 -2
  105. package/src/generators/ui/libs/ui-calendar-helm/files/lib/hlm-calendar-range.ts.template +2 -2
  106. package/src/generators/ui/libs/ui-calendar-helm/files/lib/hlm-calendar.ts.template +2 -2
  107. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card.ts.template +1 -1
  108. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-slide-display.ts.template +2 -2
  109. package/src/generators/ui/libs/ui-checkbox-helm/files/lib/hlm-checkbox.ts.template +2 -2
  110. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-icon.ts.template +1 -1
  111. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-shortcut.ts.template +1 -1
  112. package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-picker-multi.token.ts.template +1 -1
  113. package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-picker-multi.ts.template +4 -4
  114. package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-picker.token.ts.template +1 -1
  115. package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-picker.ts.template +4 -4
  116. package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-range-picker.token.ts.template +1 -1
  117. package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-range-picker.ts.template +4 -4
  118. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-footer.ts.template +1 -1
  119. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-header.ts.template +3 -1
  120. package/src/generators/ui/libs/ui-form-field-helm/files/lib/hlm-error.ts.template +1 -1
  121. package/src/generators/ui/libs/ui-form-field-helm/files/lib/hlm-form-field.ts.template +1 -1
  122. package/src/generators/ui/libs/ui-form-field-helm/files/lib/hlm-hint.ts.template +1 -1
  123. package/src/generators/ui/libs/ui-icon-helm/files/lib/hlm-icon.token.ts.template +1 -1
  124. package/src/generators/ui/libs/ui-input-group-helm/files/index.ts.template +13 -0
  125. package/src/generators/ui/libs/ui-input-group-helm/files/lib/hlm-input-group.ts.template +50 -0
  126. package/src/generators/ui/libs/ui-input-group-helm/files/lib/hlm-prefix-addon.ts.template +36 -0
  127. package/src/generators/ui/libs/ui-input-group-helm/files/lib/hlm-prefix.ts.template +27 -0
  128. package/src/generators/ui/libs/ui-input-group-helm/files/lib/hlm-suffix-addon.ts.template +36 -0
  129. package/src/generators/ui/libs/ui-input-group-helm/files/lib/hlm-suffix.ts.template +27 -0
  130. package/src/generators/ui/libs/ui-input-group-helm/generator.d.ts +3 -0
  131. package/src/generators/ui/libs/ui-input-group-helm/generator.js +14 -0
  132. package/src/generators/ui/libs/ui-input-group-helm/generator.js.map +1 -0
  133. package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input-error.ts.template +1 -1
  134. package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input.ts.template +1 -1
  135. package/src/generators/ui/libs/ui-input-otp-helm/files/lib/hlm-input-otp-group.ts.template +1 -1
  136. package/src/generators/ui/libs/ui-input-otp-helm/files/lib/hlm-input-otp-separator.ts.template +1 -1
  137. package/src/generators/ui/libs/ui-input-otp-helm/files/lib/hlm-input-otp-slot.ts.template +2 -2
  138. package/src/generators/ui/libs/ui-input-otp-helm/files/lib/hlm-input-otp.ts.template +1 -1
  139. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-bar.ts.template +1 -1
  140. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-check.ts.template +1 -1
  141. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-icon.ts.template +1 -1
  142. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-sub-indicator.ts.template +1 -1
  143. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item.ts.template +2 -2
  144. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-label.ts.template +3 -3
  145. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-separator.ts.template +1 -1
  146. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-shortcut.ts.template +1 -1
  147. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-numbered-pagination-query-params.ts.template +1 -1
  148. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-numbered-pagination.ts.template +1 -1
  149. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-link.ts.template +1 -1
  150. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-next.ts.template +4 -4
  151. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-previous.ts.template +4 -4
  152. package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio.ts.template +2 -2
  153. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-content.ts.template +1 -1
  154. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-scroll-down.ts.template +1 -1
  155. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-scroll-up.ts.template +1 -1
  156. package/src/generators/ui/libs/ui-separator-helm/files/lib/hlm-separator.ts.template +1 -1
  157. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-footer.ts.template +1 -1
  158. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-header.ts.template +1 -1
  159. package/src/generators/ui/libs/ui-sidebar-helm/files/index.ts.template +75 -0
  160. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-content.ts.template +22 -0
  161. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-footer.ts.template +17 -0
  162. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-group-action.ts.template +25 -0
  163. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-group-content.ts.template +17 -0
  164. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-group-label.ts.template +23 -0
  165. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-group.ts.template +19 -0
  166. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-header.ts.template +17 -0
  167. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-input.ts.template +21 -0
  168. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-inset.ts.template +29 -0
  169. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-menu-action.ts.template +31 -0
  170. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-menu-badge.ts.template +27 -0
  171. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-menu-button.ts.template +72 -0
  172. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-menu-item.ts.template +17 -0
  173. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-menu-skeleton.ts.template +33 -0
  174. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-menu-sub-button.ts.template +30 -0
  175. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-menu-sub-item.ts.template +17 -0
  176. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-menu-sub.ts.template +23 -0
  177. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-menu.ts.template +17 -0
  178. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-rail.ts.template +39 -0
  179. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-separator.ts.template +20 -0
  180. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-trigger.ts.template +42 -0
  181. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar-wrapper.ts.template +25 -0
  182. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar.service.ts.template +106 -0
  183. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar.token.ts.template +31 -0
  184. package/src/generators/ui/libs/ui-sidebar-helm/files/lib/hlm-sidebar.ts.template +115 -0
  185. package/src/generators/ui/libs/ui-sidebar-helm/generator.d.ts +3 -0
  186. package/src/generators/ui/libs/ui-sidebar-helm/generator.js +14 -0
  187. package/src/generators/ui/libs/ui-sidebar-helm/generator.js.map +1 -0
  188. package/src/generators/ui/libs/ui-skeleton-helm/files/lib/hlm-skeleton.ts.template +1 -1
  189. package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch.ts.template +3 -3
  190. package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-table.ts.template +1 -1
  191. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs.ts.template +1 -1
  192. package/src/generators/ui/libs/ui-toggle-group-helm/files/lib/hlm-toggle-group.token.ts.template +1 -1
  193. package/src/generators/ui/libs/ui-toggle-group-helm/files/lib/hlm-toggle-group.ts.template +2 -2
  194. package/src/generators/ui/libs/ui-tooltip-helm/files/lib/hlm-tooltip-trigger.ts.template +1 -1
  195. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-blockquote.ts.template +1 -1
  196. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-code.ts.template +1 -1
  197. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h1.ts.template +1 -1
  198. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h2.ts.template +1 -1
  199. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h3.ts.template +1 -1
  200. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-large.ts.template +1 -1
  201. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-lead.ts.template +1 -1
  202. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-muted.ts.template +1 -1
  203. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-p.ts.template +1 -1
  204. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-small.ts.template +1 -1
  205. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-ul.ts.template +1 -1
  206. package/src/generators/ui/primitive-deps.js +2 -0
  207. package/src/generators/ui/primitive-deps.js.map +1 -1
  208. package/src/generators/ui/primitives.d.ts +1 -1
  209. package/src/generators/ui/schema.d.ts +1 -1
  210. package/src/generators/ui/supported-ui-libraries.json +47 -27
  211. package/src/utils/config.js.map +1 -1
  212. package/src/utils/hlm-class.d.ts +1 -1
  213. package/src/utils/tsconfig.d.ts +1 -1
  214. package/src/utils/tsconfig.js.map +1 -1
  215. package/src/utils/visit-files.d.ts +1 -1
  216. package/src/utils/visit-files.js.map +1 -1
@@ -13,9 +13,9 @@ import {
13
13
  Renderer2,
14
14
  signal,
15
15
  } from '@angular/core';
16
- import { BrnRadio, BrnRadioChange } from '@spartan-ng/brain/radio-group';
16
+ import { BrnRadio, type BrnRadioChange } from '@spartan-ng/brain/radio-group';
17
17
  import { hlm } from '<%- importAlias %>/utils';
18
- import { ClassValue } from 'clsx';
18
+ import type { ClassValue } from 'clsx';
19
19
 
20
20
  @Component({
21
21
  selector: 'hlm-radio',
@@ -1,4 +1,4 @@
1
- import { BooleanInput } from '@angular/cdk/coercion';
1
+ import type { BooleanInput } from '@angular/cdk/coercion';
2
2
  import { Directive, booleanAttribute, computed, input } from '@angular/core';
3
3
  import { injectExposedSideProvider, injectExposesStateProvider } from '@spartan-ng/brain/core';
4
4
  import { hlm } from '<%- importAlias %>/utils';
@@ -3,7 +3,7 @@ import { NgIcon, provideIcons } from '@ng-icons/core';
3
3
  import { lucideChevronDown } from '@ng-icons/lucide';
4
4
  import { HlmIcon } from '<%- importAlias %>/icon';
5
5
  import { hlm } from '<%- importAlias %>/utils';
6
- import { ClassValue } from 'clsx';
6
+ import type { ClassValue } from 'clsx';
7
7
 
8
8
  @Component({
9
9
  selector: 'hlm-select-scroll-down',
@@ -3,7 +3,7 @@ import { NgIcon, provideIcons } from '@ng-icons/core';
3
3
  import { lucideChevronUp } from '@ng-icons/lucide';
4
4
  import { HlmIcon } from '<%- importAlias %>/icon';
5
5
  import { hlm } from '<%- importAlias %>/utils';
6
- import { ClassValue } from 'clsx';
6
+ import type { ClassValue } from 'clsx';
7
7
 
8
8
  @Component({
9
9
  selector: 'hlm-select-scroll-up',
@@ -12,7 +12,7 @@ import type { ClassValue } from 'clsx';
12
12
  })
13
13
  export class HlmSeparator {
14
14
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
15
- protected _computedClass = computed(() =>
15
+ protected readonly _computedClass = computed(() =>
16
16
  hlm(
17
17
  'bg-border inline-flex shrink-0 data-[orientation=horizontal]:h-px data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px',
18
18
  this.userClass(),
@@ -14,5 +14,5 @@ import type { ClassValue } from 'clsx';
14
14
  })
15
15
  export class HlmSheetFooter {
16
16
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
17
- protected _computedClass = computed(() => hlm('mt-auto flex flex-col gap-2 p-4', this.userClass()));
17
+ protected readonly _computedClass = computed(() => hlm('mt-auto flex flex-col gap-2 p-4', this.userClass()));
18
18
  }
@@ -14,5 +14,5 @@ import type { ClassValue } from 'clsx';
14
14
  })
15
15
  export class HlmSheetHeader {
16
16
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
17
- protected _computedClass = computed(() => hlm('flex flex-col gap-1.5 p-4', this.userClass()));
17
+ protected readonly _computedClass = computed(() => hlm('flex flex-col gap-1.5 p-4', this.userClass()));
18
18
  }
@@ -0,0 +1,75 @@
1
+ import { HlmSidebar } from './lib/hlm-sidebar';
2
+ import { HlmSidebarContent } from './lib/hlm-sidebar-content';
3
+ import { HlmSidebarFooter } from './lib/hlm-sidebar-footer';
4
+ import { HlmSidebarGroup } from './lib/hlm-sidebar-group';
5
+ import { HlmSidebarGroupAction } from './lib/hlm-sidebar-group-action';
6
+ import { HlmSidebarGroupContent } from './lib/hlm-sidebar-group-content';
7
+ import { HlmSidebarGroupLabel } from './lib/hlm-sidebar-group-label';
8
+ import { HlmSidebarHeader } from './lib/hlm-sidebar-header';
9
+ import { HlmSidebarInput } from './lib/hlm-sidebar-input';
10
+ import { HlmSidebarInset } from './lib/hlm-sidebar-inset';
11
+ import { HlmSidebarMenu } from './lib/hlm-sidebar-menu';
12
+ import { HlmSidebarMenuAction } from './lib/hlm-sidebar-menu-action';
13
+ import { HlmSidebarMenuBadge } from './lib/hlm-sidebar-menu-badge';
14
+ import { HlmSidebarMenuButton } from './lib/hlm-sidebar-menu-button';
15
+ import { HlmSidebarMenuItem } from './lib/hlm-sidebar-menu-item';
16
+ import { HlmSidebarMenuSkeleton } from './lib/hlm-sidebar-menu-skeleton';
17
+ import { HlmSidebarMenuSub } from './lib/hlm-sidebar-menu-sub';
18
+ import { HlmSidebarMenuSubButton } from './lib/hlm-sidebar-menu-sub-button';
19
+ import { HlmSidebarMenuSubItem } from './lib/hlm-sidebar-menu-sub-item';
20
+ import { HlmSidebarRail } from './lib/hlm-sidebar-rail';
21
+ import { HlmSidebarSeparator } from './lib/hlm-sidebar-separator';
22
+ import { HlmSidebarTrigger } from './lib/hlm-sidebar-trigger';
23
+ import { HlmSidebarWrapper } from './lib/hlm-sidebar-wrapper';
24
+
25
+ export * from './lib/hlm-sidebar';
26
+ export * from './lib/hlm-sidebar-content';
27
+ export * from './lib/hlm-sidebar-footer';
28
+ export * from './lib/hlm-sidebar-group';
29
+ export * from './lib/hlm-sidebar-group-action';
30
+ export * from './lib/hlm-sidebar-group-content';
31
+ export * from './lib/hlm-sidebar-group-label';
32
+ export * from './lib/hlm-sidebar-header';
33
+ export * from './lib/hlm-sidebar-input';
34
+ export * from './lib/hlm-sidebar-inset';
35
+ export * from './lib/hlm-sidebar-menu';
36
+ export * from './lib/hlm-sidebar-menu-action';
37
+ export * from './lib/hlm-sidebar-menu-badge';
38
+ export * from './lib/hlm-sidebar-menu-button';
39
+ export * from './lib/hlm-sidebar-menu-item';
40
+ export * from './lib/hlm-sidebar-menu-skeleton';
41
+ export * from './lib/hlm-sidebar-menu-sub';
42
+ export * from './lib/hlm-sidebar-menu-sub-button';
43
+ export * from './lib/hlm-sidebar-menu-sub-item';
44
+ export * from './lib/hlm-sidebar-rail';
45
+ export * from './lib/hlm-sidebar-separator';
46
+ export * from './lib/hlm-sidebar-trigger';
47
+ export * from './lib/hlm-sidebar-wrapper';
48
+ export * from './lib/hlm-sidebar.service';
49
+ export * from './lib/hlm-sidebar.token';
50
+
51
+ export const HlmSidebarImports = [
52
+ HlmSidebar,
53
+ HlmSidebarContent,
54
+ HlmSidebarFooter,
55
+ HlmSidebarGroup,
56
+ HlmSidebarGroupAction,
57
+ HlmSidebarGroupContent,
58
+ HlmSidebarGroupLabel,
59
+ HlmSidebarHeader,
60
+ HlmSidebarInput,
61
+ HlmSidebarInset,
62
+ HlmSidebarMenu,
63
+ HlmSidebarMenuSkeleton,
64
+ HlmSidebarMenuAction,
65
+ HlmSidebarMenuBadge,
66
+ HlmSidebarMenuButton,
67
+ HlmSidebarMenuItem,
68
+ HlmSidebarMenuSub,
69
+ HlmSidebarMenuSubButton,
70
+ HlmSidebarRail,
71
+ HlmSidebarSeparator,
72
+ HlmSidebarTrigger,
73
+ HlmSidebarWrapper,
74
+ HlmSidebarMenuSubItem,
75
+ ] as const;
@@ -0,0 +1,22 @@
1
+ import { computed, Directive, input } from '@angular/core';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
+
4
+ import type { ClassValue } from 'clsx';
5
+
6
+ @Directive({
7
+ selector: 'div[hlmSidebarContent]',
8
+
9
+ host: {
10
+ 'data-sidebar': 'content',
11
+ '[class]': '_computedClass()',
12
+ },
13
+ })
14
+ export class HlmSidebarContent {
15
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
16
+ protected readonly _computedClass = computed(() =>
17
+ hlm(
18
+ 'flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden',
19
+ this.userClass(),
20
+ ),
21
+ );
22
+ }
@@ -0,0 +1,17 @@
1
+ import { computed, Directive, input } from '@angular/core';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
+
4
+ import type { ClassValue } from 'clsx';
5
+
6
+ @Directive({
7
+ selector: 'div[hlmSidebarFooter]',
8
+
9
+ host: {
10
+ 'data-sidebar': 'footer',
11
+ '[class]': '_computedClass()',
12
+ },
13
+ })
14
+ export class HlmSidebarFooter {
15
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
16
+ protected readonly _computedClass = computed(() => hlm('flex flex-col gap-2 p-2', this.userClass()));
17
+ }
@@ -0,0 +1,25 @@
1
+ import { computed, Directive, input } from '@angular/core';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
+
4
+ import type { ClassValue } from 'clsx';
5
+
6
+ @Directive({
7
+ selector: 'button[hlmSidebarGroupAction]',
8
+
9
+ host: {
10
+ 'data-sidebar': 'group-action',
11
+ '[class]': '_computedClass()',
12
+ },
13
+ })
14
+ export class HlmSidebarGroupAction {
15
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
16
+ protected readonly _computedClass = computed(() =>
17
+ hlm(
18
+ 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-none transition-transform hover:cursor-pointer focus-visible:ring-2 disabled:hover:cursor-default [&>_ng-icon]:size-4 [&>_ng-icon]:shrink-0',
19
+ // Increases the hit area of the button on mobile.
20
+ 'after:absolute after:-inset-2 after:md:hidden',
21
+ 'group-data-[collapsible=icon]:hidden',
22
+ this.userClass(),
23
+ ),
24
+ );
25
+ }
@@ -0,0 +1,17 @@
1
+ import { computed, Directive, input } from '@angular/core';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
+
4
+ import type { ClassValue } from 'clsx';
5
+
6
+ @Directive({
7
+ selector: 'div[hlmSidebarGroupContent]',
8
+
9
+ host: {
10
+ 'data-sidebar': 'group-content',
11
+ '[class]': '_computedClass()',
12
+ },
13
+ })
14
+ export class HlmSidebarGroupContent {
15
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
16
+ protected readonly _computedClass = computed(() => hlm('w-full text-sm', this.userClass()));
17
+ }
@@ -0,0 +1,23 @@
1
+ import { computed, Directive, input } from '@angular/core';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
+
4
+ import type { ClassValue } from 'clsx';
5
+
6
+ @Directive({
7
+ selector: 'div[hlmSidebarGroupLabel], button[hlmSidebarGroupLabel]',
8
+
9
+ host: {
10
+ 'data-sidebar': 'group-label',
11
+ '[class]': '_computedClass()',
12
+ },
13
+ })
14
+ export class HlmSidebarGroupLabel {
15
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
16
+ protected readonly _computedClass = computed(() =>
17
+ hlm(
18
+ 'text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-none transition-[margin,opa] duration-200 ease-linear focus-visible:ring-2 [&>_ng-icon]:size-4 [&>_ng-icon]:shrink-0',
19
+ 'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0',
20
+ this.userClass(),
21
+ ),
22
+ );
23
+ }
@@ -0,0 +1,19 @@
1
+ import { computed, Directive, input } from '@angular/core';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
+
4
+ import type { ClassValue } from 'clsx';
5
+
6
+ @Directive({
7
+ selector: 'div[hlmSidebarGroup]',
8
+
9
+ host: {
10
+ 'data-sidebar': 'group',
11
+ '[class]': '_computedClass()',
12
+ },
13
+ })
14
+ export class HlmSidebarGroup {
15
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
16
+ protected readonly _computedClass = computed(() =>
17
+ hlm('relative flex w-full min-w-0 flex-col p-2', this.userClass()),
18
+ );
19
+ }
@@ -0,0 +1,17 @@
1
+ import { computed, Directive, input } from '@angular/core';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
+
4
+ import type { ClassValue } from 'clsx';
5
+
6
+ @Directive({
7
+ selector: 'div[hlmSidebarHeader]',
8
+
9
+ host: {
10
+ 'data-sidebar': 'header',
11
+ '[class]': '_computedClass()',
12
+ },
13
+ })
14
+ export class HlmSidebarHeader {
15
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
16
+ protected readonly _computedClass = computed(() => hlm('flex flex-col gap-2 p-2', this.userClass()));
17
+ }
@@ -0,0 +1,21 @@
1
+ import { computed, Directive } from '@angular/core';
2
+ import { HlmInput, inputVariants } from '<%- importAlias %>/input';
3
+ import { hlm } from '<%- importAlias %>/utils';
4
+
5
+ @Directive({
6
+ selector: 'input[hlmSidebarInput]',
7
+
8
+ host: {
9
+ 'data-sidebar': 'input',
10
+ '[class]': '_computedClass()',
11
+ },
12
+ })
13
+ export class HlmSidebarInput extends HlmInput {
14
+ protected override readonly _computedClass = computed(() =>
15
+ hlm(
16
+ inputVariants({ error: this._state().error }),
17
+ 'bg-background focus-visible:ring-sidebar-ring h-8 w-full shadow-none focus-visible:ring-2',
18
+ this.userClass(),
19
+ ),
20
+ );
21
+ }
@@ -0,0 +1,29 @@
1
+ import { computed, Directive, inject, input } from '@angular/core';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
+
4
+ import { HlmSidebarService } from './hlm-sidebar.service';
5
+
6
+ import type { ClassValue } from 'clsx';
7
+
8
+ @Directive({
9
+ selector: 'main[hlmSidebarInset]', // Restrict to main elements only
10
+
11
+ host: {
12
+ 'data-slot': 'sidebar-inset',
13
+ '[class]': '_computedClass()',
14
+ },
15
+ })
16
+ export class HlmSidebarInset {
17
+ private readonly _sidebarService = inject(HlmSidebarService);
18
+
19
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
20
+ protected readonly _computedClass = computed(() =>
21
+ hlm(
22
+ 'bg-background relative flex w-full flex-1 flex-col',
23
+ this._sidebarService.variant() === 'inset' &&
24
+ 'min-h-[calc(100svh-theme(spacing.4)))] md:m-2 md:rounded-xl md:shadow-sm',
25
+ this._sidebarService.open() ? 'md:ml-0' : 'md:ml-2',
26
+ this.userClass(),
27
+ ),
28
+ );
29
+ }
@@ -0,0 +1,31 @@
1
+ import { booleanAttribute, computed, Directive, input } from '@angular/core';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
+
4
+ import type { ClassValue } from 'clsx';
5
+
6
+ @Directive({
7
+ selector: 'button[hlmSidebarMenuAction]',
8
+
9
+ host: {
10
+ 'data-sidebar': 'menu-action',
11
+ '[class]': '_computedClass()',
12
+ },
13
+ })
14
+ export class HlmSidebarMenuAction {
15
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
16
+ public readonly showOnHover = input<boolean, boolean>(false, { transform: booleanAttribute });
17
+ protected readonly _computedClass = computed(() =>
18
+ hlm(
19
+ 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-none transition-transform hover:cursor-pointer focus-visible:ring-2 disabled:hover:cursor-default [&>_ng-icon]:size-4 [&>_ng-icon]:shrink-0',
20
+ // Increases the hit area of the button on mobile.
21
+ 'after:absolute after:-inset-2 after:md:hidden',
22
+ 'peer-data-[size=sm]/menu-button:top-1',
23
+ 'peer-data-[size=default]/menu-button:top-1.5',
24
+ 'peer-data-[size=lg]/menu-button:top-2.5',
25
+ 'group-data-[collapsible=icon]:hidden',
26
+ this.showOnHover() &&
27
+ 'peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0',
28
+ this.userClass(),
29
+ ),
30
+ );
31
+ }
@@ -0,0 +1,27 @@
1
+ import { computed, Directive, input } from '@angular/core';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
+
4
+ import type { ClassValue } from 'clsx';
5
+
6
+ @Directive({
7
+ selector: 'div[hlmSidebarMenuBadge]',
8
+
9
+ host: {
10
+ 'data-sidebar': 'menu-badge',
11
+ '[class]': '_computedClass()',
12
+ },
13
+ })
14
+ export class HlmSidebarMenuBadge {
15
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
16
+ protected readonly _computedClass = computed(() =>
17
+ hlm(
18
+ 'text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums',
19
+ 'peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground',
20
+ 'peer-data-[size=sm]/menu-button:top-1',
21
+ 'peer-data-[size=default]/menu-button:top-1.5',
22
+ 'peer-data-[size=lg]/menu-button:top-2.5',
23
+ 'group-data-[collapsible=icon]:hidden',
24
+ this.userClass(),
25
+ ),
26
+ );
27
+ }
@@ -0,0 +1,72 @@
1
+ import { booleanAttribute, computed, Directive, inject, input } from '@angular/core';
2
+ import { BrnTooltipTrigger, provideBrnTooltipDefaultOptions } from '@spartan-ng/brain/tooltip';
3
+ import { DEFAULT_TOOLTIP_CONTENT_CLASSES } from '<%- importAlias %>/tooltip';
4
+ import { hlm } from '<%- importAlias %>/utils';
5
+ import { cva } from 'class-variance-authority';
6
+
7
+ import { HlmSidebarService } from './hlm-sidebar.service';
8
+
9
+ import type { ClassValue } from 'clsx';
10
+
11
+ const sidebarMenuButtonVariants = cva(
12
+ 'peer/menu-button ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground flex w-full items-center justify-start gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none transition-[width,height,padding] hover:cursor-pointer focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 disabled:hover:cursor-default group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:font-medium group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>_ng-icon]:size-4 [&>_ng-icon]:shrink-0 [&>span:last-child]:truncate group-data-[collapsible=icon]:[&>span]:hidden',
13
+ {
14
+ variants: {
15
+ variant: {
16
+ default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
17
+ outline:
18
+ 'bg-background shadow-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-sidebar-accent',
19
+ },
20
+ size: {
21
+ default: 'h-8 text-sm',
22
+ sm: 'h-7 text-xs',
23
+ lg: 'h-12 text-sm group-data-[collapsible=icon]:!p-0',
24
+ },
25
+ },
26
+ defaultVariants: {
27
+ variant: 'default',
28
+ size: 'default',
29
+ },
30
+ },
31
+ );
32
+
33
+ @Directive({
34
+ selector: 'button[hlmSidebarMenuButton], a[hlmSidebarMenuButton]',
35
+
36
+ providers: [
37
+ provideBrnTooltipDefaultOptions({
38
+ showDelay: 150,
39
+ hideDelay: 0,
40
+ exitAnimationDuration: 150,
41
+ tooltipContentClasses: DEFAULT_TOOLTIP_CONTENT_CLASSES,
42
+ position: 'left',
43
+ }),
44
+ ],
45
+ hostDirectives: [
46
+ {
47
+ directive: BrnTooltipTrigger,
48
+ inputs: ['brnTooltipTrigger: tooltip', 'aria-describedby'],
49
+ },
50
+ ],
51
+ host: {
52
+ 'data-sidebar': 'menu-button',
53
+ '[attr.data-size]': 'size()',
54
+ '[attr.data-active]': 'isActive()',
55
+ '[class]': '_computedClass()',
56
+ },
57
+ })
58
+ export class HlmSidebarMenuButton {
59
+ private readonly _sidebarService = inject(HlmSidebarService);
60
+
61
+ public readonly variant = input<'default' | 'outline'>('default');
62
+ public readonly size = input<'default' | 'sm' | 'lg'>('default');
63
+ public readonly isActive = input<boolean, boolean>(false, { transform: booleanAttribute });
64
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
65
+
66
+ protected readonly _isTooltipHidden = computed(
67
+ () => this._sidebarService.state() !== 'collapsed' || this._sidebarService.isMobile(),
68
+ );
69
+ protected readonly _computedClass = computed(() =>
70
+ hlm(sidebarMenuButtonVariants({ variant: this.variant(), size: this.size() }), this.userClass()),
71
+ );
72
+ }
@@ -0,0 +1,17 @@
1
+ import { computed, Directive, input } from '@angular/core';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
+
4
+ import type { ClassValue } from 'clsx';
5
+
6
+ @Directive({
7
+ selector: 'li[hlmSidebarMenuItem]',
8
+
9
+ host: {
10
+ 'data-sidebar': 'menu-item',
11
+ '[class]': '_computedClass()',
12
+ },
13
+ })
14
+ export class HlmSidebarMenuItem {
15
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
16
+ protected readonly _computedClass = computed(() => hlm('group/menu-item relative', this.userClass()));
17
+ }
@@ -0,0 +1,33 @@
1
+ import { booleanAttribute, ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
+
4
+ import { HlmSkeletonImports } from '<%- importAlias %>/skeleton';
5
+ import type { ClassValue } from 'clsx';
6
+
7
+ @Component({
8
+ // eslint-disable-next-line @angular-eslint/component-selector
9
+ selector: 'div[hlmSidebarMenuSkeleton]',
10
+ changeDetection: ChangeDetectionStrategy.OnPush,
11
+ template: `
12
+ @if (showIcon()) {
13
+ <hlm-skeleton data-sidebar="menu-skeleton-icon" class="size-4 rounded-md" />
14
+ } @else {
15
+ <hlm-skeleton data-sidebar="menu-skeleton-text" class="h-4 max-w-[var(--skeleton-width)] flex-1" />
16
+ }
17
+ `,
18
+ host: {
19
+ 'data-sidebar': 'menu-skeleton',
20
+ '[class]': '_computedClass()',
21
+ '[style.--skeleton-width]': '_width',
22
+ },
23
+
24
+ imports: [HlmSkeletonImports],
25
+ })
26
+ export class HlmSidebarMenuSkeleton {
27
+ public readonly showIcon = input<boolean, boolean>(false, { transform: booleanAttribute });
28
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
29
+ protected readonly _computedClass = computed(() =>
30
+ hlm('flex h-8 items-center gap-2 rounded-md px-2', this.userClass()),
31
+ );
32
+ protected readonly _width = `${Math.floor(Math.random() * 40) + 50}%`;
33
+ }
@@ -0,0 +1,30 @@
1
+ import { booleanAttribute, computed, Directive, input } from '@angular/core';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
+
4
+ import type { ClassValue } from 'clsx';
5
+
6
+ @Directive({
7
+ selector: 'a[hlmSidebarMenuSubButton], button[hlmSidebarMenuSubButton]',
8
+
9
+ host: {
10
+ 'data-sidebar': 'menu-sub-button',
11
+ '[attr.data-active]': 'isActive()',
12
+ '[attr.data-size]': 'size()',
13
+ '[class]': '_computedClass()',
14
+ },
15
+ })
16
+ export class HlmSidebarMenuSubButton {
17
+ public readonly size = input<'sm' | 'md'>('md');
18
+ public readonly isActive = input<boolean, boolean>(false, { transform: booleanAttribute });
19
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
20
+ protected readonly _computedClass = computed(() =>
21
+ hlm(
22
+ 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>_ng-icon]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-none hover:cursor-pointer focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 disabled:hover:cursor-default aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>_ng-icon]:size-4 [&>_ng-icon]:shrink-0 [&>span:last-child]:truncate',
23
+ 'data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground',
24
+ this.size() === 'sm' && 'text-xs',
25
+ this.size() === 'md' && 'text-sm',
26
+ 'group-data-[collapsible=icon]:hidden',
27
+ this.userClass(),
28
+ ),
29
+ );
30
+ }
@@ -0,0 +1,17 @@
1
+ import { computed, Directive, input } from '@angular/core';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
+
4
+ import type { ClassValue } from 'clsx';
5
+
6
+ @Directive({
7
+ selector: 'li[hlmSidebarMenuSubItem]',
8
+
9
+ host: {
10
+ 'data-sidebar': 'menu-sub-item',
11
+ '[class]': '_computedClass()',
12
+ },
13
+ })
14
+ export class HlmSidebarMenuSubItem {
15
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
16
+ protected readonly _computedClass = computed(() => hlm('group/menu-sub-item relative', this.userClass()));
17
+ }
@@ -0,0 +1,23 @@
1
+ import { computed, Directive, input } from '@angular/core';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
+
4
+ import type { ClassValue } from 'clsx';
5
+
6
+ @Directive({
7
+ selector: 'ul[hlmSidebarMenuSub]',
8
+
9
+ host: {
10
+ 'data-sidebar': 'menu-sub',
11
+ '[class]': '_computedClass()',
12
+ },
13
+ })
14
+ export class HlmSidebarMenuSub {
15
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
16
+ protected readonly _computedClass = computed(() =>
17
+ hlm(
18
+ 'border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5',
19
+ 'group-data-[collapsible=icon]:hidden',
20
+ this.userClass(),
21
+ ),
22
+ );
23
+ }
@@ -0,0 +1,17 @@
1
+ import { computed, Directive, input } from '@angular/core';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
+
4
+ import type { ClassValue } from 'clsx';
5
+
6
+ @Directive({
7
+ selector: 'ul[hlmSidebarMenu]',
8
+
9
+ host: {
10
+ 'data-sidebar': 'menu',
11
+ '[class]': '_computedClass()',
12
+ },
13
+ })
14
+ export class HlmSidebarMenu {
15
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
16
+ protected readonly _computedClass = computed(() => hlm('flex w-full min-w-0 flex-col gap-1', this.userClass()));
17
+ }