@spartan-ng/cli 0.0.1-alpha.560 → 0.0.1-alpha.562
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.
- package/package.json +1 -1
- package/src/generators/ui/generator.js +0 -6
- package/src/generators/ui/generator.js.map +1 -1
- package/src/generators/ui/libs/button-group/files/lib/hlm-button-group-text.ts.template +1 -1
- package/src/generators/ui/libs/button-group/files/lib/hlm-button-group.ts.template +1 -1
- package/src/generators/ui/libs/input-group/files/lib/hlm-input-group-button.ts.template +2 -0
- package/src/generators/ui/libs/input-group/files/lib/hlm-input-group-input.ts.template +1 -1
- package/src/generators/ui/libs/input-group/files/lib/hlm-input-group-textarea.ts.template +1 -1
- package/src/generators/ui/libs/kbd/files/lib/hlm-kbd-group.ts.template +1 -1
- package/src/generators/ui/libs/kbd/files/lib/hlm-kbd.ts.template +1 -1
- package/src/generators/ui/libs/pagination/files/lib/hlm-numbered-pagination-query-params.ts.template +1 -0
- package/src/generators/ui/libs/pagination/files/lib/hlm-pagination-content.ts.template +3 -9
- package/src/generators/ui/libs/pagination/files/lib/hlm-pagination-ellipsis.ts.template +9 -6
- package/src/generators/ui/libs/pagination/files/lib/hlm-pagination-item.ts.template +3 -10
- package/src/generators/ui/libs/pagination/files/lib/hlm-pagination-link.ts.template +3 -8
- package/src/generators/ui/libs/pagination/files/lib/hlm-pagination-next.ts.template +1 -1
- package/src/generators/ui/libs/pagination/files/lib/hlm-pagination-previous.ts.template +1 -1
- package/src/generators/ui/libs/pagination/files/lib/hlm-pagination.ts.template +3 -10
- package/src/generators/ui/supported-ui-libraries.json +36 -37
package/package.json
CHANGED
|
@@ -50,7 +50,6 @@ async function hlmUIGenerator(tree, options) {
|
|
|
50
50
|
const availablePrimitives = await Promise.resolve().then(() => __importStar(require('./supported-ui-libraries.json'))).then((m) => m.default);
|
|
51
51
|
const availablePrimitiveNames = [
|
|
52
52
|
...Object.keys(availablePrimitives),
|
|
53
|
-
'collapsible',
|
|
54
53
|
'menubar',
|
|
55
54
|
'context-menu',
|
|
56
55
|
];
|
|
@@ -83,9 +82,6 @@ async function createPrimitiveLibraries(response, availablePrimitiveNames, avail
|
|
|
83
82
|
await (0, add_dependent_primitive_1.addDependentPrimitives)(primitivesToCreate, false);
|
|
84
83
|
}
|
|
85
84
|
await replaceContextAndMenuBar(primitivesToCreate, allPrimitivesSelected);
|
|
86
|
-
if (primitivesToCreate.length === 1 && primitivesToCreate[0] === 'collapsible') {
|
|
87
|
-
return tasks;
|
|
88
|
-
}
|
|
89
85
|
const projects = (0, devkit_1.getProjects)(tree);
|
|
90
86
|
if (typeof config.generateAs === 'string' &&
|
|
91
87
|
config.generateAs === 'entrypoint' &&
|
|
@@ -101,8 +97,6 @@ async function createPrimitiveLibraries(response, availablePrimitiveNames, avail
|
|
|
101
97
|
}
|
|
102
98
|
// Use Promise.all() to handle parallel execution of primitive library creation tasks
|
|
103
99
|
const installTasks = await Promise.all(primitivesToCreate.map(async (primitiveName) => {
|
|
104
|
-
if (primitiveName === 'collapsible')
|
|
105
|
-
return;
|
|
106
100
|
const name = availablePrimitives[primitiveName].name;
|
|
107
101
|
const peerDependencies = removeHelmKeys(availablePrimitives[primitiveName].peerDependencies);
|
|
108
102
|
const { generator } = await Promise.resolve(`${`./libs/${name}/generator`}`).then(s => __importStar(require(s)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/ui/generator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/ui/generator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,iCAgCC;AAED,4DAwEC;AAvHD,uCAA8F;AAC9F,uCAAkC;AAClC,+CAAoE;AAEpE,uFAAqF;AACrF,iEAA4D;AAE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AC,CAAC;IAC/D,IAAI,YAAY,IAAI,CAAC,EAAE,CAAC;QACvB,IAAI,CAAC,MAAM,EAAE,CAAC;YACb,MAAM,IAAA,iBAAM,EAAC;gBACZ,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,aAAa;gBACnB,OAAO,EAAE,4FAA4F;aACrG,CAAC,CAAC;QACJ,CAAC;QACD,iBAAiB,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAC3C,CAAC;IACD,MAAM,YAAY,GAAG,iBAAiB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAC1D,IAAI,YAAY,IAAI,CAAC,EAAE,CAAC;QACvB,IAAI,CAAC,MAAM,EAAE,CAAC;YACb,MAAM,IAAA,iBAAM,EAAC;gBACZ,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,uFAAuF;aAChG,CAAC,CAAC;QACJ,CAAC;QACD,iBAAiB,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAC3C,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,GAA2B,EAAE,EAAE,CACtD,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -35,12 +35,14 @@ type InputGroupAddonVariants = VariantProps<typeof inputGroupAddonVariants>;
|
|
|
35
35
|
],
|
|
36
36
|
host: {
|
|
37
37
|
'[attr.data-size]': 'size()',
|
|
38
|
+
'[type]': 'type()',
|
|
38
39
|
},
|
|
39
40
|
})
|
|
40
41
|
export class HlmInputGroupButton {
|
|
41
42
|
private readonly _hlmButton = inject(HlmButton);
|
|
42
43
|
public readonly size = input<InputGroupAddonVariants['size']>('xs');
|
|
43
44
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
45
|
+
public readonly type = input<'button' | 'submit' | 'reset'>('button');
|
|
44
46
|
|
|
45
47
|
protected readonly _computedClass = computed(() =>
|
|
46
48
|
hlm(inputGroupAddonVariants({ size: this.size() }), this.userClass()),
|
|
@@ -7,8 +7,8 @@ import type { ClassValue } from 'clsx';
|
|
|
7
7
|
selector: 'input[hlmInputGroupInput]',
|
|
8
8
|
hostDirectives: [HlmInput],
|
|
9
9
|
host: {
|
|
10
|
-
'[class]': '_computedClass()',
|
|
11
10
|
'data-slot': 'input-group-control',
|
|
11
|
+
'[class]': '_computedClass()',
|
|
12
12
|
},
|
|
13
13
|
})
|
|
14
14
|
export class HlmInputGroupInput {
|
|
@@ -7,8 +7,8 @@ import type { ClassValue } from 'clsx';
|
|
|
7
7
|
selector: 'textarea[hlmInputGroupTextarea]',
|
|
8
8
|
hostDirectives: [HlmTextarea],
|
|
9
9
|
host: {
|
|
10
|
-
'[class]': '_computedClass()',
|
|
11
10
|
'data-slot': 'input-group-control',
|
|
11
|
+
'[class]': '_computedClass()',
|
|
12
12
|
},
|
|
13
13
|
})
|
|
14
14
|
export class HlmInputGroupTextarea {
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
import { Directive, computed, input } from '@angular/core';
|
|
2
2
|
import { hlm } from '<%- importAlias %>/utils';
|
|
3
|
-
import { type VariantProps, cva } from 'class-variance-authority';
|
|
4
3
|
import type { ClassValue } from 'clsx';
|
|
5
4
|
|
|
6
|
-
export const paginationContentVariants = cva('flex flex-row items-center gap-1', {
|
|
7
|
-
variants: {},
|
|
8
|
-
defaultVariants: {},
|
|
9
|
-
});
|
|
10
|
-
export type PaginationContentVariants = VariantProps<typeof paginationContentVariants>;
|
|
11
|
-
|
|
12
5
|
@Directive({
|
|
13
|
-
selector: '[hlmPaginationContent]',
|
|
6
|
+
selector: 'ul[hlmPaginationContent]',
|
|
14
7
|
host: {
|
|
8
|
+
'data-slot': 'pagination-content',
|
|
15
9
|
'[class]': '_computedClass()',
|
|
16
10
|
},
|
|
17
11
|
})
|
|
18
12
|
export class HlmPaginationContent {
|
|
19
13
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
20
|
-
protected readonly _computedClass = computed(() => hlm(
|
|
14
|
+
protected readonly _computedClass = computed(() => hlm('flex flex-row items-center gap-1', this.userClass()));
|
|
21
15
|
}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { provideIcons } from '@ng-icons/core';
|
|
3
3
|
import { lucideEllipsis } from '@ng-icons/lucide';
|
|
4
|
-
import {
|
|
4
|
+
import { HlmIconImports } from '<%- importAlias %>/icon';
|
|
5
5
|
import { hlm } from '<%- importAlias %>/utils';
|
|
6
6
|
import type { ClassValue } from 'clsx';
|
|
7
7
|
|
|
8
8
|
@Component({
|
|
9
9
|
selector: 'hlm-pagination-ellipsis',
|
|
10
|
-
imports: [
|
|
10
|
+
imports: [HlmIconImports],
|
|
11
11
|
providers: [provideIcons({ lucideEllipsis })],
|
|
12
12
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
13
|
+
host: {
|
|
14
|
+
'data-slot': 'pagination-ellipsis',
|
|
15
|
+
},
|
|
13
16
|
template: `
|
|
14
|
-
<span [class]="_computedClass()">
|
|
17
|
+
<span [class]="_computedClass()" aria-hidden="true">
|
|
15
18
|
<ng-icon hlm size="sm" name="lucideEllipsis" />
|
|
16
19
|
<span class="sr-only">{{ srOnlyText() }}</span>
|
|
17
20
|
</span>
|
|
@@ -19,8 +22,8 @@ import type { ClassValue } from 'clsx';
|
|
|
19
22
|
})
|
|
20
23
|
export class HlmPaginationEllipsis {
|
|
21
24
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
25
|
+
protected readonly _computedClass = computed(() => hlm('flex size-9 items-center justify-center', this.userClass()));
|
|
26
|
+
|
|
22
27
|
/** Screen reader only text for the ellipsis */
|
|
23
28
|
public readonly srOnlyText = input<string>('More pages');
|
|
24
|
-
|
|
25
|
-
protected readonly _computedClass = computed(() => hlm('flex size-9 items-center justify-center', this.userClass()));
|
|
26
29
|
}
|
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
import { Directive, computed, input } from '@angular/core';
|
|
2
2
|
import { hlm } from '<%- importAlias %>/utils';
|
|
3
|
-
import { type VariantProps, cva } from 'class-variance-authority';
|
|
4
3
|
import type { ClassValue } from 'clsx';
|
|
5
4
|
|
|
6
|
-
export const paginationItemVariants = cva('', {
|
|
7
|
-
variants: {},
|
|
8
|
-
defaultVariants: {},
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
export type PaginationItemVariants = VariantProps<typeof paginationItemVariants>;
|
|
12
|
-
|
|
13
5
|
@Directive({
|
|
14
|
-
selector: '[hlmPaginationItem]',
|
|
6
|
+
selector: 'li[hlmPaginationItem]',
|
|
15
7
|
host: {
|
|
8
|
+
'data-slot': 'pagination-item',
|
|
16
9
|
'[class]': '_computedClass()',
|
|
17
10
|
},
|
|
18
11
|
})
|
|
19
12
|
export class HlmPaginationItem {
|
|
20
13
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
21
|
-
protected readonly _computedClass = computed(() => hlm(
|
|
14
|
+
protected readonly _computedClass = computed(() => hlm('', this.userClass()));
|
|
22
15
|
}
|
|
@@ -3,15 +3,8 @@ import { Directive, booleanAttribute, computed, input } from '@angular/core';
|
|
|
3
3
|
import { RouterLink } from '@angular/router';
|
|
4
4
|
import { type ButtonVariants, buttonVariants } from '<%- importAlias %>/button';
|
|
5
5
|
import { hlm } from '<%- importAlias %>/utils';
|
|
6
|
-
import { type VariantProps, cva } from 'class-variance-authority';
|
|
7
6
|
import type { ClassValue } from 'clsx';
|
|
8
7
|
|
|
9
|
-
export const paginationLinkVariants = cva('', {
|
|
10
|
-
variants: {},
|
|
11
|
-
defaultVariants: {},
|
|
12
|
-
});
|
|
13
|
-
export type PaginationLinkVariants = VariantProps<typeof paginationLinkVariants>;
|
|
14
|
-
|
|
15
8
|
@Directive({
|
|
16
9
|
selector: '[hlmPaginationLink]',
|
|
17
10
|
hostDirectives: [
|
|
@@ -33,7 +26,9 @@ export type PaginationLinkVariants = VariantProps<typeof paginationLinkVariants>
|
|
|
33
26
|
},
|
|
34
27
|
],
|
|
35
28
|
host: {
|
|
29
|
+
'data-slot': 'pagination-link',
|
|
36
30
|
'[class]': '_computedClass()',
|
|
31
|
+
'[attr.data-active]': 'isActive() ? "true" : null',
|
|
37
32
|
'[attr.aria-current]': 'isActive() ? "page" : null',
|
|
38
33
|
},
|
|
39
34
|
})
|
|
@@ -48,7 +43,7 @@ export class HlmPaginationLink {
|
|
|
48
43
|
|
|
49
44
|
protected readonly _computedClass = computed(() =>
|
|
50
45
|
hlm(
|
|
51
|
-
|
|
46
|
+
'',
|
|
52
47
|
this.link() === undefined ? 'cursor-pointer' : '',
|
|
53
48
|
buttonVariants({
|
|
54
49
|
variant: this.isActive() ? 'outline' : 'ghost',
|
|
@@ -51,6 +51,6 @@ export class HlmPaginationNext {
|
|
|
51
51
|
protected readonly _size = computed<ButtonVariants['size']>(() => (this.iconOnly() ? 'icon' : 'default'));
|
|
52
52
|
|
|
53
53
|
protected readonly _computedClass = computed(() =>
|
|
54
|
-
hlm('gap-1', !this.iconOnly() ? 'sm:pr-2.5' : '', this.userClass()),
|
|
54
|
+
hlm('gap-1 px-2.5', !this.iconOnly() ? 'sm:pr-2.5' : '', this.userClass()),
|
|
55
55
|
);
|
|
56
56
|
}
|
|
@@ -51,6 +51,6 @@ export class HlmPaginationPrevious {
|
|
|
51
51
|
protected readonly _size = computed<ButtonVariants['size']>(() => (this.iconOnly() ? 'icon' : 'default'));
|
|
52
52
|
|
|
53
53
|
protected readonly _computedClass = computed(() =>
|
|
54
|
-
hlm('gap-1', !this.iconOnly() ? 'sm:pl-2.5' : '', this.userClass()),
|
|
54
|
+
hlm('gap-1 px-2.5', !this.iconOnly() ? 'sm:pl-2.5' : '', this.userClass()),
|
|
55
55
|
);
|
|
56
56
|
}
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import { Directive, computed, input } from '@angular/core';
|
|
2
2
|
import { hlm } from '<%- importAlias %>/utils';
|
|
3
|
-
import { type VariantProps, cva } from 'class-variance-authority';
|
|
4
3
|
import type { ClassValue } from 'clsx';
|
|
5
4
|
|
|
6
|
-
export const paginationVariants = cva('mx-auto flex w-full justify-center', {
|
|
7
|
-
variants: {},
|
|
8
|
-
defaultVariants: {},
|
|
9
|
-
});
|
|
10
|
-
export type PaginationVariants = VariantProps<typeof paginationVariants>;
|
|
11
|
-
|
|
12
5
|
@Directive({
|
|
13
|
-
selector: '[hlmPagination]',
|
|
6
|
+
selector: '[hlmPagination],hlm-pagination',
|
|
14
7
|
host: {
|
|
8
|
+
'data-slot': 'pagination',
|
|
15
9
|
role: 'navigation',
|
|
16
10
|
'[class]': '_computedClass()',
|
|
17
11
|
'[attr.aria-label]': 'ariaLabel()',
|
|
@@ -19,9 +13,8 @@ export type PaginationVariants = VariantProps<typeof paginationVariants>;
|
|
|
19
13
|
})
|
|
20
14
|
export class HlmPagination {
|
|
21
15
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
16
|
+
protected readonly _computedClass = computed(() => hlm('mx-auto flex w-full justify-center', this.userClass()));
|
|
22
17
|
|
|
23
18
|
/** The aria-label for the pagination component. */
|
|
24
19
|
public readonly ariaLabel = input<string>('pagination', { alias: 'aria-label' });
|
|
25
|
-
|
|
26
|
-
protected readonly _computedClass = computed(() => hlm(paginationVariants(), this.userClass()));
|
|
27
20
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "accordion",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/core": "^19.0.0",
|
|
6
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
6
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
7
7
|
"clsx": "^2.1.1",
|
|
8
8
|
"@ng-icons/core": "^31.4.0",
|
|
9
9
|
"@ng-icons/lucide": "^31.4.0"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"name": "alert-dialog",
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@angular/core": "^19.0.0",
|
|
24
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
24
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
25
25
|
"clsx": "^2.1.1"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@angular/core": "^19.0.0",
|
|
40
40
|
"clsx": "^2.1.1",
|
|
41
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
41
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
42
42
|
"@angular/cdk": "^19.0.0",
|
|
43
43
|
"@angular/common": "^19.0.0",
|
|
44
44
|
"@angular/forms": "^19.0.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"name": "avatar",
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@angular/core": "^19.0.0",
|
|
53
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
53
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
54
54
|
"clsx": "^2.1.1"
|
|
55
55
|
}
|
|
56
56
|
},
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"name": "button",
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"@angular/core": "^19.0.0",
|
|
79
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
79
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
80
80
|
"class-variance-authority": "^0.7.0",
|
|
81
81
|
"clsx": "^2.1.1"
|
|
82
82
|
}
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"name": "button-group",
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"@angular/core": "^19.0.0",
|
|
88
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
88
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
89
89
|
"clsx": "^2.1.1",
|
|
90
90
|
"class-variance-authority": "^0.7.0"
|
|
91
91
|
}
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"@angular/core": "^19.0.0",
|
|
99
99
|
"@ng-icons/core": "^31.4.0",
|
|
100
100
|
"@ng-icons/lucide": "^31.4.0",
|
|
101
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
101
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
102
102
|
"clsx": "^2.1.1"
|
|
103
103
|
}
|
|
104
104
|
},
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"@angular/cdk": "^19.0.0",
|
|
129
129
|
"@ng-icons/core": "^31.4.0",
|
|
130
130
|
"@ng-icons/lucide": "^31.4.0",
|
|
131
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
131
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
132
132
|
"clsx": "^2.1.1"
|
|
133
133
|
}
|
|
134
134
|
},
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"name": "collapsible",
|
|
137
137
|
"peerDependencies": {
|
|
138
138
|
"@angular/core": "^19.0.0",
|
|
139
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
139
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
140
140
|
"clsx": "^2.1.1"
|
|
141
141
|
}
|
|
142
142
|
},
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"name": "command",
|
|
145
145
|
"peerDependencies": {
|
|
146
146
|
"@angular/core": "^19.0.0",
|
|
147
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
147
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
148
148
|
"clsx": "^2.1.1"
|
|
149
149
|
}
|
|
150
150
|
},
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
"@angular/forms": "^19.0.0",
|
|
157
157
|
"@ng-icons/core": "^31.4.0",
|
|
158
158
|
"@ng-icons/lucide": "^31.4.0",
|
|
159
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
159
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
160
160
|
"clsx": "^2.1.1"
|
|
161
161
|
}
|
|
162
162
|
},
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
"@angular/common": "^19.0.0",
|
|
169
169
|
"@ng-icons/core": "^31.4.0",
|
|
170
170
|
"@ng-icons/lucide": "^31.4.0",
|
|
171
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
171
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
172
172
|
"@angular/cdk": "^19.0.0"
|
|
173
173
|
}
|
|
174
174
|
},
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
"peerDependencies": {
|
|
194
194
|
"@angular/core": "^19.0.0",
|
|
195
195
|
"@angular/forms": "^19.0.0",
|
|
196
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
196
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
197
197
|
"clsx": "^2.1.1"
|
|
198
198
|
}
|
|
199
199
|
},
|
|
@@ -201,7 +201,7 @@
|
|
|
201
201
|
"name": "hover-card",
|
|
202
202
|
"peerDependencies": {
|
|
203
203
|
"@angular/core": "^19.0.0",
|
|
204
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
204
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
205
205
|
"clsx": "^2.1.1"
|
|
206
206
|
}
|
|
207
207
|
},
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
"peerDependencies": {
|
|
219
219
|
"@angular/core": "^19.0.0",
|
|
220
220
|
"@angular/forms": "^19.0.0",
|
|
221
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
221
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
222
222
|
"class-variance-authority": "^0.7.0",
|
|
223
223
|
"clsx": "^2.1.1"
|
|
224
224
|
}
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
"@ng-icons/core": "^31.4.0",
|
|
240
240
|
"@ng-icons/lucide": "^31.4.0",
|
|
241
241
|
"@angular/cdk": "^19.0.0",
|
|
242
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
242
|
+
"@spartan-ng/brain": "0.0.1-alpha.562"
|
|
243
243
|
}
|
|
244
244
|
},
|
|
245
245
|
"item": {
|
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
"@angular/core": "^19.0.0",
|
|
249
249
|
"clsx": "^2.1.1",
|
|
250
250
|
"class-variance-authority": "^0.7.0",
|
|
251
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
251
|
+
"@spartan-ng/brain": "0.0.1-alpha.562"
|
|
252
252
|
}
|
|
253
253
|
},
|
|
254
254
|
"kbd": {
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
"name": "label",
|
|
263
263
|
"peerDependencies": {
|
|
264
264
|
"@angular/core": "^19.0.0",
|
|
265
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
265
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
266
266
|
"clsx": "^2.1.1"
|
|
267
267
|
}
|
|
268
268
|
},
|
|
@@ -270,7 +270,7 @@
|
|
|
270
270
|
"name": "menu",
|
|
271
271
|
"peerDependencies": {
|
|
272
272
|
"@angular/core": "^19.0.0",
|
|
273
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
273
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
274
274
|
"clsx": "^2.1.1",
|
|
275
275
|
"@ng-icons/core": "^31.4.0",
|
|
276
276
|
"@ng-icons/lucide": "^31.4.0",
|
|
@@ -283,7 +283,7 @@
|
|
|
283
283
|
"peerDependencies": {
|
|
284
284
|
"@angular/core": "^19.0.0",
|
|
285
285
|
"clsx": "^2.1.1",
|
|
286
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
286
|
+
"@spartan-ng/brain": "0.0.1-alpha.562"
|
|
287
287
|
}
|
|
288
288
|
},
|
|
289
289
|
"pagination": {
|
|
@@ -292,8 +292,7 @@
|
|
|
292
292
|
"@angular/cdk": "^19.0.0",
|
|
293
293
|
"@angular/core": "^19.0.0",
|
|
294
294
|
"@angular/forms": "^19.0.0",
|
|
295
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
296
|
-
"class-variance-authority": "^0.7.0",
|
|
295
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
297
296
|
"clsx": "^2.1.1",
|
|
298
297
|
"@ng-icons/core": "^31.4.0",
|
|
299
298
|
"@ng-icons/lucide": "^31.4.0",
|
|
@@ -305,14 +304,14 @@
|
|
|
305
304
|
"peerDependencies": {
|
|
306
305
|
"@angular/core": "^19.0.0",
|
|
307
306
|
"clsx": "^2.1.1",
|
|
308
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
307
|
+
"@spartan-ng/brain": "0.0.1-alpha.562"
|
|
309
308
|
}
|
|
310
309
|
},
|
|
311
310
|
"progress": {
|
|
312
311
|
"name": "progress",
|
|
313
312
|
"peerDependencies": {
|
|
314
313
|
"@angular/core": "^19.0.0",
|
|
315
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
314
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
316
315
|
"clsx": "^2.1.1"
|
|
317
316
|
}
|
|
318
317
|
},
|
|
@@ -320,7 +319,7 @@
|
|
|
320
319
|
"name": "radio-group",
|
|
321
320
|
"peerDependencies": {
|
|
322
321
|
"@angular/core": "^19.0.0",
|
|
323
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
322
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
324
323
|
"clsx": "^2.1.1",
|
|
325
324
|
"@angular/common": "^19.0.0"
|
|
326
325
|
}
|
|
@@ -329,7 +328,7 @@
|
|
|
329
328
|
"name": "resizable",
|
|
330
329
|
"peerDependencies": {
|
|
331
330
|
"@angular/core": "^19.0.0",
|
|
332
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
331
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
333
332
|
"clsx": "^2.1.1",
|
|
334
333
|
"@ng-icons/core": "^31.4.0",
|
|
335
334
|
"@ng-icons/lucide": "^31.4.0"
|
|
@@ -347,7 +346,7 @@
|
|
|
347
346
|
"peerDependencies": {
|
|
348
347
|
"@angular/cdk": "^19.0.0",
|
|
349
348
|
"@angular/core": "^19.0.0",
|
|
350
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
349
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
351
350
|
"clsx": "^2.1.1",
|
|
352
351
|
"@ng-icons/core": "^31.4.0",
|
|
353
352
|
"@ng-icons/lucide": "^31.4.0",
|
|
@@ -358,7 +357,7 @@
|
|
|
358
357
|
"name": "separator",
|
|
359
358
|
"peerDependencies": {
|
|
360
359
|
"@angular/core": "^19.0.0",
|
|
361
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
360
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
362
361
|
"clsx": "^2.1.1"
|
|
363
362
|
}
|
|
364
363
|
},
|
|
@@ -369,7 +368,7 @@
|
|
|
369
368
|
"clsx": "^2.1.1",
|
|
370
369
|
"@ng-icons/core": "^31.4.0",
|
|
371
370
|
"@ng-icons/lucide": "^31.4.0",
|
|
372
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
371
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
373
372
|
"class-variance-authority": "^0.7.0"
|
|
374
373
|
}
|
|
375
374
|
},
|
|
@@ -379,7 +378,7 @@
|
|
|
379
378
|
"@angular/core": "^19.0.0",
|
|
380
379
|
"clsx": "^2.1.1",
|
|
381
380
|
"@angular/cdk": "^19.0.0",
|
|
382
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
381
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
383
382
|
"class-variance-authority": "^0.7.0",
|
|
384
383
|
"@ng-icons/core": "^31.4.0",
|
|
385
384
|
"@ng-icons/lucide": "^31.4.0",
|
|
@@ -397,7 +396,7 @@
|
|
|
397
396
|
"name": "slider",
|
|
398
397
|
"peerDependencies": {
|
|
399
398
|
"@angular/core": "^19.0.0",
|
|
400
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
399
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
401
400
|
"clsx": "^2.1.1"
|
|
402
401
|
}
|
|
403
402
|
},
|
|
@@ -425,7 +424,7 @@
|
|
|
425
424
|
"clsx": "^2.1.1",
|
|
426
425
|
"@angular/cdk": "^19.0.0",
|
|
427
426
|
"@angular/forms": "^19.0.0",
|
|
428
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
427
|
+
"@spartan-ng/brain": "0.0.1-alpha.562"
|
|
429
428
|
}
|
|
430
429
|
},
|
|
431
430
|
"table": {
|
|
@@ -439,7 +438,7 @@
|
|
|
439
438
|
"name": "tabs",
|
|
440
439
|
"peerDependencies": {
|
|
441
440
|
"@angular/core": "^19.0.0",
|
|
442
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
441
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
443
442
|
"clsx": "^2.1.1",
|
|
444
443
|
"class-variance-authority": "^0.7.0",
|
|
445
444
|
"@angular/cdk": "^19.0.0",
|
|
@@ -453,7 +452,7 @@
|
|
|
453
452
|
"peerDependencies": {
|
|
454
453
|
"@angular/core": "^19.0.0",
|
|
455
454
|
"@angular/forms": "^19.0.0",
|
|
456
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
455
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
457
456
|
"class-variance-authority": "^0.7.0",
|
|
458
457
|
"clsx": "^2.1.1"
|
|
459
458
|
}
|
|
@@ -462,7 +461,7 @@
|
|
|
462
461
|
"name": "toggle",
|
|
463
462
|
"peerDependencies": {
|
|
464
463
|
"@angular/core": "^19.0.0",
|
|
465
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
464
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
466
465
|
"class-variance-authority": "^0.7.0",
|
|
467
466
|
"clsx": "^2.1.1"
|
|
468
467
|
}
|
|
@@ -471,7 +470,7 @@
|
|
|
471
470
|
"name": "toggle-group",
|
|
472
471
|
"peerDependencies": {
|
|
473
472
|
"@angular/core": "^19.0.0",
|
|
474
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
473
|
+
"@spartan-ng/brain": "0.0.1-alpha.562",
|
|
475
474
|
"clsx": "^2.1.1",
|
|
476
475
|
"@angular/cdk": "^19.0.0"
|
|
477
476
|
}
|
|
@@ -480,7 +479,7 @@
|
|
|
480
479
|
"name": "tooltip",
|
|
481
480
|
"peerDependencies": {
|
|
482
481
|
"@angular/core": "^19.0.0",
|
|
483
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
482
|
+
"@spartan-ng/brain": "0.0.1-alpha.562"
|
|
484
483
|
}
|
|
485
484
|
},
|
|
486
485
|
"typography": {
|