@spartan-ng/cli 0.0.1-alpha.566 → 0.0.1-alpha.568

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 (74) hide show
  1. package/package.json +1 -1
  2. package/src/generators/healthcheck/generator.js +6 -2
  3. package/src/generators/healthcheck/generator.js.map +1 -1
  4. package/src/generators/healthcheck/healthchecks/hlm-menu.d.ts +2 -0
  5. package/src/generators/healthcheck/healthchecks/hlm-menu.js +37 -0
  6. package/src/generators/healthcheck/healthchecks/hlm-menu.js.map +1 -0
  7. package/src/generators/healthcheck/healthchecks.d.ts +2 -1
  8. package/src/generators/healthcheck/healthchecks.js.map +1 -1
  9. package/src/generators/healthcheck/utils/runner.d.ts +1 -1
  10. package/src/generators/healthcheck/utils/runner.js +2 -2
  11. package/src/generators/healthcheck/utils/runner.js.map +1 -1
  12. package/src/generators/migrate-menu/compat.d.ts +2 -0
  13. package/src/generators/migrate-menu/compat.js +6 -0
  14. package/src/generators/migrate-menu/compat.js.map +1 -0
  15. package/src/generators/migrate-menu/generator.d.ts +5 -0
  16. package/src/generators/migrate-menu/generator.js +138 -0
  17. package/src/generators/migrate-menu/generator.js.map +1 -0
  18. package/src/generators/migrate-menu/schema.d.ts +4 -0
  19. package/src/generators/migrate-menu/schema.json +19 -0
  20. package/src/generators/migrate-module-imports/import-map.js +10 -10
  21. package/src/generators/migrate-module-imports/import-map.js.map +1 -1
  22. package/src/generators/ui/generator.js +1 -30
  23. package/src/generators/ui/generator.js.map +1 -1
  24. package/src/generators/ui/libs/context-menu/files/index.ts.template +6 -0
  25. package/src/generators/ui/libs/context-menu/files/lib/hlm-context-menu-token.ts.template +22 -0
  26. package/src/generators/ui/libs/context-menu/files/lib/hlm-context-menu-trigger.ts.template +54 -0
  27. package/src/generators/ui/libs/context-menu/generator.js +9 -0
  28. package/src/generators/ui/libs/context-menu/generator.js.map +1 -0
  29. package/src/generators/ui/libs/dropdown-menu/files/index.ts.template +45 -0
  30. package/src/generators/ui/libs/{menu/files/lib/hlm-menu-item-check.ts.template → dropdown-menu/files/lib/hlm-dropdown-menu-checkbox-indicator.ts.template} +5 -7
  31. package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-checkbox.ts.template +36 -0
  32. package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-group.ts.template +17 -0
  33. package/src/generators/ui/libs/{menu/files/lib/hlm-menu-item-sub-indicator.ts.template → dropdown-menu/files/lib/hlm-dropdown-menu-item-sub-indicator.ts.template} +4 -5
  34. package/src/generators/ui/libs/{menu/files/lib/hlm-menu-item.ts.template → dropdown-menu/files/lib/hlm-dropdown-menu-item.ts.template} +19 -14
  35. package/src/generators/ui/libs/{menu/files/lib/hlm-menu-label.ts.template → dropdown-menu/files/lib/hlm-dropdown-menu-label.ts.template} +10 -13
  36. package/src/generators/ui/libs/{menu/files/lib/hlm-menu-item-radio-indicator.ts.template → dropdown-menu/files/lib/hlm-dropdown-menu-radio-indicator.ts.template} +5 -7
  37. package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-radio.ts.template +36 -0
  38. package/src/generators/ui/libs/{menu/files/lib/hlm-menu-separator.ts.template → dropdown-menu/files/lib/hlm-dropdown-menu-separator.ts.template} +5 -6
  39. package/src/generators/ui/libs/{menu/files/lib/hlm-menu-shortcut.ts.template → dropdown-menu/files/lib/hlm-dropdown-menu-shortcut.ts.template} +5 -8
  40. package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-sub.ts.template +63 -0
  41. package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-token.ts.template +22 -0
  42. package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-trigger.ts.template +46 -0
  43. package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu.ts.template +67 -0
  44. package/src/generators/ui/libs/dropdown-menu/generator.d.ts +3 -0
  45. package/src/generators/ui/libs/dropdown-menu/generator.js +9 -0
  46. package/src/generators/ui/libs/dropdown-menu/generator.js.map +1 -0
  47. package/src/generators/ui/libs/menubar/files/index.ts.template +8 -0
  48. package/src/generators/ui/libs/menubar/files/lib/hlm-menubar-token.ts.template +22 -0
  49. package/src/generators/ui/libs/menubar/files/lib/hlm-menubar-trigger.ts.template +66 -0
  50. package/src/generators/ui/libs/{menu/files/lib/hlm-menu-bar.ts.template → menubar/files/lib/hlm-menubar.ts.template} +7 -8
  51. package/src/generators/ui/libs/menubar/generator.d.ts +3 -0
  52. package/src/generators/ui/libs/{menu → menubar}/generator.js +1 -1
  53. package/src/generators/ui/libs/menubar/generator.js.map +1 -0
  54. package/src/generators/ui/libs/scroll-area/files/lib/hlm-scroll-area.ts.template +6 -5
  55. package/src/generators/ui/primitive-deps.js +3 -3
  56. package/src/generators/ui/primitive-deps.js.map +1 -1
  57. package/src/generators/ui/primitives.d.ts +1 -1
  58. package/src/generators/ui/supported-ui-libraries.json +61 -42
  59. package/src/utils/config.d.ts +1 -0
  60. package/src/utils/config.js +11 -0
  61. package/src/utils/config.js.map +1 -1
  62. package/src/utils/import-alias.d.ts +1 -0
  63. package/src/utils/import-alias.js +7 -0
  64. package/src/utils/import-alias.js.map +1 -0
  65. package/src/generators/ui/libs/menu/files/index.ts.template +0 -49
  66. package/src/generators/ui/libs/menu/files/lib/hlm-menu-bar-item.ts.template +0 -21
  67. package/src/generators/ui/libs/menu/files/lib/hlm-menu-group.ts.template +0 -15
  68. package/src/generators/ui/libs/menu/files/lib/hlm-menu-item-checkbox.ts.template +0 -27
  69. package/src/generators/ui/libs/menu/files/lib/hlm-menu-item-icon.ts.template +0 -16
  70. package/src/generators/ui/libs/menu/files/lib/hlm-menu-item-radio.ts.template +0 -27
  71. package/src/generators/ui/libs/menu/files/lib/hlm-menu.ts.template +0 -39
  72. package/src/generators/ui/libs/menu/files/lib/hlm-sub-menu.ts.template +0 -25
  73. package/src/generators/ui/libs/menu/generator.js.map +0 -1
  74. /package/src/generators/ui/libs/{menu → context-menu}/generator.d.ts +0 -0
@@ -1,21 +0,0 @@
1
- import { Directive, computed, input } from '@angular/core';
2
- import { BrnMenuItem } from '@spartan-ng/brain/menu';
3
- import { hlm } from '<%- importAlias %>/utils';
4
- import type { ClassValue } from 'clsx';
5
-
6
- @Directive({
7
- selector: '[hlmMenuBarItem]',
8
- hostDirectives: [BrnMenuItem],
9
- host: {
10
- '[class]': '_computedClass()',
11
- },
12
- })
13
- export class HlmMenuBarItem {
14
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
15
- protected readonly _computedClass = computed(() =>
16
- hlm(
17
- 'focus:bg-accent focus:text-accent-foreground aria-expanded:bg-accent aria-expanded:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-none select-none',
18
- this.userClass(),
19
- ),
20
- );
21
- }
@@ -1,15 +0,0 @@
1
- import { ChangeDetectionStrategy, Component } from '@angular/core';
2
- import { BrnMenuGroup } from '@spartan-ng/brain/menu';
3
-
4
- @Component({
5
- selector: 'hlm-menu-group',
6
- changeDetection: ChangeDetectionStrategy.OnPush,
7
- hostDirectives: [BrnMenuGroup],
8
- host: {
9
- class: 'block',
10
- },
11
- template: `
12
- <ng-content />
13
- `,
14
- })
15
- export class HlmMenuGroup {}
@@ -1,27 +0,0 @@
1
- import { Directive, computed, input } from '@angular/core';
2
- import { BrnMenuItemCheckbox } from '@spartan-ng/brain/menu';
3
- import { hlm } from '<%- importAlias %>/utils';
4
- import type { ClassValue } from 'clsx';
5
-
6
- @Directive({
7
- selector: '[hlmMenuItemCheckbox]',
8
- hostDirectives: [
9
- {
10
- directive: BrnMenuItemCheckbox,
11
- inputs: ['disabled: disabled', 'checked: checked'],
12
- outputs: ['triggered: triggered'],
13
- },
14
- ],
15
- host: {
16
- '[class]': '_computedClass()',
17
- },
18
- })
19
- export class HlmMenuItemCheckbox {
20
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
21
- protected readonly _computedClass = computed(() =>
22
- hlm(
23
- 'hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground group relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none disabled:pointer-events-none disabled:opacity-50',
24
- this.userClass(),
25
- ),
26
- );
27
- }
@@ -1,16 +0,0 @@
1
- import { Directive, computed, input } from '@angular/core';
2
- import { provideHlmIconConfig } from '<%- importAlias %>/icon';
3
- import { hlm } from '<%- importAlias %>/utils';
4
- import type { ClassValue } from 'clsx';
5
-
6
- @Directive({
7
- selector: '[hlmMenuIcon]',
8
- providers: [provideHlmIconConfig({ size: 'sm' })],
9
- host: {
10
- '[class]': '_computedClass()',
11
- },
12
- })
13
- export class HlmMenuItemIcon {
14
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
15
- protected readonly _computedClass = computed(() => hlm('mr-2', this.userClass()));
16
- }
@@ -1,27 +0,0 @@
1
- import { Directive, computed, input } from '@angular/core';
2
- import { BrnMenuItemRadio } from '@spartan-ng/brain/menu';
3
- import { hlm } from '<%- importAlias %>/utils';
4
- import type { ClassValue } from 'clsx';
5
-
6
- @Directive({
7
- selector: '[hlmMenuItemRadio]',
8
- hostDirectives: [
9
- {
10
- directive: BrnMenuItemRadio,
11
- inputs: ['disabled: disabled', 'checked: checked'],
12
- outputs: ['triggered: triggered'],
13
- },
14
- ],
15
- host: {
16
- '[class]': '_computedClass()',
17
- },
18
- })
19
- export class HlmMenuItemRadio {
20
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
21
- protected readonly _computedClass = computed(() =>
22
- hlm(
23
- 'hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground group relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none disabled:pointer-events-none disabled:opacity-50',
24
- this.userClass(),
25
- ),
26
- );
27
- }
@@ -1,39 +0,0 @@
1
- import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
2
- import { BrnMenu } from '@spartan-ng/brain/menu';
3
- import { hlm } from '<%- importAlias %>/utils';
4
- import { type VariantProps, cva } from 'class-variance-authority';
5
- import type { ClassValue } from 'clsx';
6
-
7
- export const menuVariants = cva(
8
- 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-top overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md',
9
- {
10
- variants: {
11
- variant: {
12
- default: 'my-0.5',
13
- menubar: 'my-2',
14
- },
15
- },
16
- defaultVariants: {
17
- variant: 'default',
18
- },
19
- },
20
- );
21
- type MenuVariants = VariantProps<typeof menuVariants>;
22
-
23
- @Component({
24
- selector: 'hlm-menu',
25
- changeDetection: ChangeDetectionStrategy.OnPush,
26
- hostDirectives: [BrnMenu],
27
- host: {
28
- '[class]': '_computedClass()',
29
- },
30
- template: `
31
- <ng-content />
32
- `,
33
- })
34
- export class HlmMenu {
35
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
36
- protected readonly _computedClass = computed(() => hlm(menuVariants({ variant: this.variant() }), this.userClass()));
37
-
38
- public readonly variant = input<MenuVariants['variant']>('default');
39
- }
@@ -1,25 +0,0 @@
1
- import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
2
- import { BrnMenu } from '@spartan-ng/brain/menu';
3
- import { hlm } from '<%- importAlias %>/utils';
4
- import type { ClassValue } from 'clsx';
5
-
6
- @Component({
7
- selector: 'hlm-sub-menu',
8
- changeDetection: ChangeDetectionStrategy.OnPush,
9
- hostDirectives: [BrnMenu],
10
- host: {
11
- '[class]': '_computedClass()',
12
- },
13
- template: `
14
- <ng-content />
15
- `,
16
- })
17
- export class HlmSubMenu {
18
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
19
- protected readonly _computedClass = computed(() =>
20
- hlm(
21
- 'border-border bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg',
22
- this.userClass(),
23
- ),
24
- );
25
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../../libs/cli/src/generators/ui/libs/menu/generator.ts"],"names":[],"mappings":";;AAIA,8BAEC;;AALD,gFAAuD;AAGhD,KAAK,UAAU,SAAS,CAAC,IAAU,EAAE,OAA+B;IAC1E,OAAO,MAAM,IAAA,mBAAgB,EAAC,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;AACnE,CAAC"}