@spartan-ng/cli 0.0.1-alpha.530 → 0.0.1-alpha.531
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/libs/ui-button-helm/files/lib/hlm-button.ts.template +1 -1
- package/src/generators/ui/libs/ui-input-group-helm/files/index.ts.template +18 -9
- package/src/generators/ui/libs/ui-input-group-helm/files/lib/hlm-input-group-addon.ts.template +42 -0
- package/src/generators/ui/libs/ui-input-group-helm/files/lib/hlm-input-group-button.ts.template +54 -0
- package/src/generators/ui/libs/ui-input-group-helm/files/lib/hlm-input-group-input.ts.template +31 -0
- package/src/generators/ui/libs/ui-input-group-helm/files/lib/hlm-input-group-text.ts.template +20 -0
- package/src/generators/ui/libs/ui-input-group-helm/files/lib/hlm-input-group-textarea.ts.template +31 -0
- package/src/generators/ui/libs/ui-input-group-helm/files/lib/hlm-input-group.ts.template +19 -36
- package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input.ts.template +7 -1
- package/src/generators/ui/libs/ui-textarea-helm/files/lib/hlm-textarea.ts.template +8 -2
- package/src/generators/ui/supported-ui-libraries.json +32 -32
- package/src/generators/ui/libs/ui-input-group-helm/files/lib/hlm-prefix-addon.ts.template +0 -36
- package/src/generators/ui/libs/ui-input-group-helm/files/lib/hlm-prefix.ts.template +0 -27
- package/src/generators/ui/libs/ui-input-group-helm/files/lib/hlm-suffix-addon.ts.template +0 -36
- package/src/generators/ui/libs/ui-input-group-helm/files/lib/hlm-suffix.ts.template +0 -27
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ import type { ClassValue } from 'clsx';
|
|
|
6
6
|
import { injectBrnButtonConfig } from './hlm-button.token';
|
|
7
7
|
|
|
8
8
|
export const buttonVariants = cva(
|
|
9
|
-
|
|
9
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive hallo inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium outline-none transition-all focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_ng-icon:not([class*='size-'])]:size-4 [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0",
|
|
10
10
|
{
|
|
11
11
|
variants: {
|
|
12
12
|
variant: {
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import { HlmInputGroup } from './lib/hlm-input-group';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { HlmInputGroupAddon } from './lib/hlm-input-group-addon';
|
|
3
|
+
import { HlmInputGroupButton } from './lib/hlm-input-group-button';
|
|
4
|
+
import { HlmInputGroupInput } from './lib/hlm-input-group-input';
|
|
5
|
+
import { HlmInputGroupText } from './lib/hlm-input-group-text';
|
|
6
|
+
import { HlmInputGroupTextarea } from './lib/hlm-input-group-textarea';
|
|
6
7
|
|
|
7
8
|
export * from './lib/hlm-input-group';
|
|
8
|
-
export * from './lib/hlm-
|
|
9
|
-
export * from './lib/hlm-
|
|
10
|
-
export * from './lib/hlm-
|
|
11
|
-
export * from './lib/hlm-
|
|
9
|
+
export * from './lib/hlm-input-group-addon';
|
|
10
|
+
export * from './lib/hlm-input-group-button';
|
|
11
|
+
export * from './lib/hlm-input-group-input';
|
|
12
|
+
export * from './lib/hlm-input-group-text';
|
|
13
|
+
export * from './lib/hlm-input-group-textarea';
|
|
12
14
|
|
|
13
|
-
export const HlmInputGroupImports = [
|
|
15
|
+
export const HlmInputGroupImports = [
|
|
16
|
+
HlmInputGroup,
|
|
17
|
+
HlmInputGroupAddon,
|
|
18
|
+
HlmInputGroupButton,
|
|
19
|
+
HlmInputGroupInput,
|
|
20
|
+
HlmInputGroupText,
|
|
21
|
+
HlmInputGroupTextarea,
|
|
22
|
+
] as const;
|
package/src/generators/ui/libs/ui-input-group-helm/files/lib/hlm-input-group-addon.ts.template
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { computed, Directive, input } from '@angular/core';
|
|
2
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
3
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
4
|
+
import type { ClassValue } from 'clsx';
|
|
5
|
+
|
|
6
|
+
const inputGroupAddonVariants = cva(
|
|
7
|
+
"text-muted-foreground flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>ng-icon:not([class*='size-'])]:size-4",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
align: {
|
|
11
|
+
'inline-start': 'order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]',
|
|
12
|
+
'inline-end': 'order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]',
|
|
13
|
+
'block-start':
|
|
14
|
+
'[.border-b]:pb-3 order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5',
|
|
15
|
+
'block-end': '[.border-t]:pt-3 order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
align: 'inline-start',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
type InputGroupAddonVariants = VariantProps<typeof inputGroupAddonVariants>;
|
|
25
|
+
|
|
26
|
+
@Directive({
|
|
27
|
+
selector: 'hlm-input-group-addon,[hlmInputGroupAddon]',
|
|
28
|
+
host: {
|
|
29
|
+
role: 'group',
|
|
30
|
+
'data-slot': 'input-group-addon',
|
|
31
|
+
'[attr.data-align]': 'align()',
|
|
32
|
+
'[class]': '_computedClass()',
|
|
33
|
+
},
|
|
34
|
+
})
|
|
35
|
+
export class HlmInputGroupAddon {
|
|
36
|
+
public readonly align = input<InputGroupAddonVariants['align']>('inline-start');
|
|
37
|
+
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
38
|
+
|
|
39
|
+
protected readonly _computedClass = computed(() =>
|
|
40
|
+
hlm(inputGroupAddonVariants({ align: this.align() }), this.userClass()),
|
|
41
|
+
);
|
|
42
|
+
}
|
package/src/generators/ui/libs/ui-input-group-helm/files/lib/hlm-input-group-button.ts.template
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { computed, Directive, effect, inject, input } from '@angular/core';
|
|
2
|
+
import { HlmButton, provideBrnButtonConfig } from '<%- importAlias %>/button';
|
|
3
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
4
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
5
|
+
import type { ClassValue } from 'clsx';
|
|
6
|
+
|
|
7
|
+
const inputGroupAddonVariants = cva('flex items-center gap-2 text-sm shadow-none', {
|
|
8
|
+
variants: {
|
|
9
|
+
size: {
|
|
10
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>ng-icon]:px-2 [&>ng-icon:not([class*='size-'])]:size-3.5",
|
|
11
|
+
sm: 'h-8 gap-1.5 rounded-md px-2.5 has-[>ng-icon]:px-2.5',
|
|
12
|
+
'icon-xs': 'size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>ng-icon]:p-0',
|
|
13
|
+
'icon-sm': 'size-8 p-0 has-[>ng-icon]:p-0',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
size: 'xs',
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
type InputGroupAddonVariants = VariantProps<typeof inputGroupAddonVariants>;
|
|
22
|
+
|
|
23
|
+
@Directive({
|
|
24
|
+
selector: 'button[hlmInputGroupButton]',
|
|
25
|
+
providers: [
|
|
26
|
+
provideBrnButtonConfig({
|
|
27
|
+
variant: 'ghost',
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
30
|
+
hostDirectives: [
|
|
31
|
+
{
|
|
32
|
+
directive: HlmButton,
|
|
33
|
+
inputs: ['variant'],
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
host: {
|
|
37
|
+
'[attr.data-size]': 'size()',
|
|
38
|
+
},
|
|
39
|
+
})
|
|
40
|
+
export class HlmInputGroupButton {
|
|
41
|
+
private readonly _hlmButton = inject(HlmButton);
|
|
42
|
+
public readonly size = input<InputGroupAddonVariants['size']>('xs');
|
|
43
|
+
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
44
|
+
|
|
45
|
+
protected readonly _computedClass = computed(() =>
|
|
46
|
+
hlm(inputGroupAddonVariants({ size: this.size() }), this.userClass()),
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
constructor() {
|
|
50
|
+
effect(() => {
|
|
51
|
+
this._hlmButton.setClass(this._computedClass());
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
package/src/generators/ui/libs/ui-input-group-helm/files/lib/hlm-input-group-input.ts.template
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { computed, Directive, effect, inject, input } from '@angular/core';
|
|
2
|
+
import { HlmInput } from '<%- importAlias %>/input';
|
|
3
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
4
|
+
import type { ClassValue } from 'clsx';
|
|
5
|
+
|
|
6
|
+
@Directive({
|
|
7
|
+
selector: 'input[hlmInputGroupInput]',
|
|
8
|
+
hostDirectives: [HlmInput],
|
|
9
|
+
host: {
|
|
10
|
+
'[class]': '_computedClass()',
|
|
11
|
+
'data-slot': 'input-group-control',
|
|
12
|
+
},
|
|
13
|
+
})
|
|
14
|
+
export class HlmInputGroupInput {
|
|
15
|
+
private readonly _hlmInput = inject(HlmInput);
|
|
16
|
+
|
|
17
|
+
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
18
|
+
|
|
19
|
+
protected readonly _computedClass = computed(() =>
|
|
20
|
+
hlm(
|
|
21
|
+
'flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent',
|
|
22
|
+
this.userClass(),
|
|
23
|
+
),
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
constructor() {
|
|
27
|
+
effect(() => {
|
|
28
|
+
this._hlmInput.setClass(this._computedClass());
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { computed, Directive, input } from '@angular/core';
|
|
2
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
3
|
+
import type { ClassValue } from 'clsx';
|
|
4
|
+
|
|
5
|
+
@Directive({
|
|
6
|
+
selector: 'span[hlmInputGroupText]',
|
|
7
|
+
host: {
|
|
8
|
+
'[class]': '_computedClass()',
|
|
9
|
+
},
|
|
10
|
+
})
|
|
11
|
+
export class HlmInputGroupText {
|
|
12
|
+
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
13
|
+
|
|
14
|
+
protected readonly _computedClass = computed(() =>
|
|
15
|
+
hlm(
|
|
16
|
+
`text-muted-foreground flex items-center gap-2 text-sm [&_ng-icon:not([class*='size-'])]:size-4 [&_ng-icon]:pointer-events-none`,
|
|
17
|
+
this.userClass(),
|
|
18
|
+
),
|
|
19
|
+
);
|
|
20
|
+
}
|
package/src/generators/ui/libs/ui-input-group-helm/files/lib/hlm-input-group-textarea.ts.template
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { computed, Directive, effect, inject, input } from '@angular/core';
|
|
2
|
+
import { HlmTextarea } from '<%- importAlias %>/textarea';
|
|
3
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
4
|
+
import type { ClassValue } from 'clsx';
|
|
5
|
+
|
|
6
|
+
@Directive({
|
|
7
|
+
selector: 'textarea[hlmInputGroupTextarea]',
|
|
8
|
+
hostDirectives: [HlmTextarea],
|
|
9
|
+
host: {
|
|
10
|
+
'[class]': '_computedClass()',
|
|
11
|
+
'data-slot': 'input-group-control',
|
|
12
|
+
},
|
|
13
|
+
})
|
|
14
|
+
export class HlmInputGroupTextarea {
|
|
15
|
+
private readonly _hlmInput = inject(HlmTextarea);
|
|
16
|
+
|
|
17
|
+
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
18
|
+
|
|
19
|
+
protected readonly _computedClass = computed(() =>
|
|
20
|
+
hlm(
|
|
21
|
+
'flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent',
|
|
22
|
+
this.userClass(),
|
|
23
|
+
),
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
constructor() {
|
|
27
|
+
effect(() => {
|
|
28
|
+
this._hlmInput.setClass(this._computedClass());
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -1,50 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { provideHlmIconConfig } from '<%- importAlias %>/icon';
|
|
1
|
+
import { computed, Directive, input } from '@angular/core';
|
|
3
2
|
import { hlm } from '<%- importAlias %>/utils';
|
|
4
3
|
import type { ClassValue } from 'clsx';
|
|
5
4
|
|
|
6
|
-
@
|
|
7
|
-
selector: 'hlm-input-group',
|
|
8
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9
|
-
providers: [
|
|
10
|
-
provideHlmIconConfig({
|
|
11
|
-
size: 'sm',
|
|
12
|
-
}),
|
|
13
|
-
],
|
|
14
|
-
template: `
|
|
15
|
-
<ng-content select="hlm-prefix-addon, [hlmPrefixAddon]" />
|
|
16
|
-
<div [class]="_inputWrapperClasses()">
|
|
17
|
-
<ng-content select="hlm-prefix, [hlmPrefix]" />
|
|
18
|
-
<ng-content select="input[hlmInput], textarea[hlmInput]"></ng-content>
|
|
19
|
-
<ng-content select="hlm-suffix, [hlmSuffix]" />
|
|
20
|
-
</div>
|
|
21
|
-
<ng-content select="hlm-suffix-addon, [hlmSuffixAddon]" />
|
|
22
|
-
`,
|
|
5
|
+
@Directive({
|
|
6
|
+
selector: '[hlmInputGroup],hlm-input-group',
|
|
23
7
|
host: {
|
|
24
|
-
'
|
|
8
|
+
'data-slot': 'input-group',
|
|
9
|
+
role: 'group',
|
|
10
|
+
'[class]': '_computedClass()',
|
|
25
11
|
},
|
|
26
12
|
})
|
|
27
13
|
export class HlmInputGroup {
|
|
28
14
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
29
|
-
public readonly inputWrapperClass = input<ClassValue>('');
|
|
30
15
|
|
|
31
|
-
protected readonly
|
|
16
|
+
protected readonly _computedClass = computed(() =>
|
|
32
17
|
hlm(
|
|
33
|
-
'shadow-xs
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
18
|
+
'group/input-group border-input dark:bg-input/30 shadow-xs relative flex w-full items-center rounded-md border outline-none transition-[color,box-shadow]',
|
|
19
|
+
'h-9 min-w-0 has-[>textarea]:h-auto',
|
|
20
|
+
// Variants based on alignment.
|
|
21
|
+
'has-[>[data-align=inline-start]]:[&>input]:pl-2',
|
|
22
|
+
'has-[>[data-align=inline-end]]:[&>input]:pr-2',
|
|
23
|
+
'has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3',
|
|
24
|
+
'has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3',
|
|
25
|
+
// Focus state.
|
|
26
|
+
'has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]',
|
|
27
|
+
// Error state.
|
|
28
|
+
'has-[>.ng-invalid.ng-touched]:ring-destructive/20 has-[>.ng-invalid.ng-touched]:border-destructive dark:has-[>.ng-invalid.ng-touched]:ring-destructive/40',
|
|
39
29
|
|
|
40
|
-
|
|
41
|
-
hlm(
|
|
42
|
-
'border-input bg-background placeholder:text-muted-foreground focus-within:border-ring focus-within:ring-ring/50 z-20 flex h-auto min-h-9 w-full flex-row gap-1 rounded-md border px-3 text-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-within:outline-none focus-within:ring-[3px]' +
|
|
43
|
-
// Invalid States
|
|
44
|
-
' has-[>.ng-invalid.ng-touched]:text-destructive/20 dark:[&.ng-invalid.ng-touched]:text-destructive/40 has-[>.ng-invalid.ng-touched]:border-destructive has-[>.ng-invalid.ng-touched]:focus-within:ring-destructive' +
|
|
45
|
-
// Group addon specific
|
|
46
|
-
' group-has-[hlm-prefix-addon,[hlmPrefixAddon]]:rounded-l-none group-has-[hlm-suffix-addon,[hlmSuffixAddon]]:rounded-r-none group-has-[hlm-prefix-addon,[hlmPrefixAddon]]:border-l-0 group-has-[hlm-suffix-addon,[hlmSuffixAddon]]:border-r-0',
|
|
47
|
-
this.inputWrapperClass(),
|
|
30
|
+
this.userClass(),
|
|
48
31
|
),
|
|
49
32
|
);
|
|
50
33
|
}
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
Injector,
|
|
9
9
|
input,
|
|
10
10
|
linkedSignal,
|
|
11
|
+
signal,
|
|
11
12
|
untracked,
|
|
12
13
|
} from '@angular/core';
|
|
13
14
|
import { FormGroupDirective, NgControl, NgForm } from '@angular/forms';
|
|
@@ -47,6 +48,7 @@ type InputVariants = VariantProps<typeof inputVariants>;
|
|
|
47
48
|
})
|
|
48
49
|
export class HlmInput implements BrnFormFieldControl, DoCheck {
|
|
49
50
|
private readonly _injector = inject(Injector);
|
|
51
|
+
private readonly _additionalClasses = signal<ClassValue>('');
|
|
50
52
|
|
|
51
53
|
private readonly _errorStateTracker: ErrorStateTracker;
|
|
52
54
|
|
|
@@ -56,7 +58,7 @@ export class HlmInput implements BrnFormFieldControl, DoCheck {
|
|
|
56
58
|
|
|
57
59
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
58
60
|
protected readonly _computedClass = computed(() =>
|
|
59
|
-
hlm(inputVariants({ error: this._state().error }), this.userClass()),
|
|
61
|
+
hlm(inputVariants({ error: this._state().error }), this.userClass(), this._additionalClasses()),
|
|
60
62
|
);
|
|
61
63
|
|
|
62
64
|
public readonly error = input<InputVariants['error']>('auto');
|
|
@@ -94,4 +96,8 @@ export class HlmInput implements BrnFormFieldControl, DoCheck {
|
|
|
94
96
|
setError(error: InputVariants['error']) {
|
|
95
97
|
this._state.set({ error });
|
|
96
98
|
}
|
|
99
|
+
|
|
100
|
+
setClass(classes: string): void {
|
|
101
|
+
this._additionalClasses.set(classes);
|
|
102
|
+
}
|
|
97
103
|
}
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
Injector,
|
|
9
9
|
input,
|
|
10
10
|
linkedSignal,
|
|
11
|
+
signal,
|
|
11
12
|
untracked,
|
|
12
13
|
} from '@angular/core';
|
|
13
14
|
import { FormGroupDirective, NgControl, NgForm } from '@angular/forms';
|
|
@@ -48,6 +49,7 @@ type TextareaVariants = VariantProps<typeof textareaVariants>;
|
|
|
48
49
|
})
|
|
49
50
|
export class HlmTextarea implements BrnFormFieldControl, DoCheck {
|
|
50
51
|
private readonly _injector = inject(Injector);
|
|
52
|
+
private readonly _additionalClasses = signal<ClassValue>('');
|
|
51
53
|
|
|
52
54
|
private readonly _errorStateTracker: ErrorStateTracker;
|
|
53
55
|
|
|
@@ -57,7 +59,7 @@ export class HlmTextarea implements BrnFormFieldControl, DoCheck {
|
|
|
57
59
|
|
|
58
60
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
59
61
|
protected readonly _computedClass = computed(() =>
|
|
60
|
-
hlm(textareaVariants({ error: this._state().error }), this.userClass()),
|
|
62
|
+
hlm(textareaVariants({ error: this._state().error }), this.userClass(), this._additionalClasses()),
|
|
61
63
|
);
|
|
62
64
|
|
|
63
65
|
public readonly error = input<TextareaVariants['error']>('auto');
|
|
@@ -92,7 +94,11 @@ export class HlmTextarea implements BrnFormFieldControl, DoCheck {
|
|
|
92
94
|
this._errorStateTracker.updateErrorState();
|
|
93
95
|
}
|
|
94
96
|
|
|
95
|
-
setError(error: TextareaVariants['error']) {
|
|
97
|
+
public setError(error: TextareaVariants['error']): void {
|
|
96
98
|
this._state.set({ error });
|
|
97
99
|
}
|
|
100
|
+
|
|
101
|
+
public setClass(classes: string): void {
|
|
102
|
+
this._additionalClasses.set(classes);
|
|
103
|
+
}
|
|
98
104
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"internalName": "ui-accordion-helm",
|
|
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.531",
|
|
7
7
|
"clsx": "^2.1.1",
|
|
8
8
|
"@ng-icons/core": ">=29.0.0",
|
|
9
9
|
"@ng-icons/lucide": ">=29.0.0"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"internalName": "ui-alert-dialog-helm",
|
|
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.531",
|
|
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.531",
|
|
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
|
"internalName": "ui-avatar-helm",
|
|
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.531",
|
|
54
54
|
"clsx": "^2.1.1"
|
|
55
55
|
}
|
|
56
56
|
},
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"internalName": "ui-button-helm",
|
|
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.531",
|
|
80
80
|
"class-variance-authority": "^0.7.0",
|
|
81
81
|
"clsx": "^2.1.1"
|
|
82
82
|
}
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"internalName": "ui-button-group-helm",
|
|
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.531",
|
|
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": ">=29.0.0",
|
|
100
100
|
"@ng-icons/lucide": ">=29.0.0",
|
|
101
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
101
|
+
"@spartan-ng/brain": "0.0.1-alpha.531",
|
|
102
102
|
"clsx": "^2.1.1"
|
|
103
103
|
}
|
|
104
104
|
},
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"@angular/forms": ">=19.0.0",
|
|
129
129
|
"@ng-icons/core": ">=29.0.0",
|
|
130
130
|
"@ng-icons/lucide": ">=29.0.0",
|
|
131
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
131
|
+
"@spartan-ng/brain": "0.0.1-alpha.531",
|
|
132
132
|
"clsx": "^2.1.1"
|
|
133
133
|
}
|
|
134
134
|
},
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"internalName": "ui-command-helm",
|
|
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.531",
|
|
140
140
|
"clsx": "^2.1.1"
|
|
141
141
|
}
|
|
142
142
|
},
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
"@angular/forms": ">=19.0.0",
|
|
149
149
|
"@ng-icons/core": ">=29.0.0",
|
|
150
150
|
"@ng-icons/lucide": ">=29.0.0",
|
|
151
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
151
|
+
"@spartan-ng/brain": "0.0.1-alpha.531",
|
|
152
152
|
"clsx": "^2.1.1"
|
|
153
153
|
}
|
|
154
154
|
},
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
"@angular/common": ">=19.0.0",
|
|
161
161
|
"@ng-icons/core": ">=29.0.0",
|
|
162
162
|
"@ng-icons/lucide": ">=29.0.0",
|
|
163
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
163
|
+
"@spartan-ng/brain": "0.0.1-alpha.531",
|
|
164
164
|
"@angular/cdk": ">=19.0.0"
|
|
165
165
|
}
|
|
166
166
|
},
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
"peerDependencies": {
|
|
178
178
|
"@angular/core": ">=19.0.0",
|
|
179
179
|
"@angular/forms": ">=19.0.0",
|
|
180
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
180
|
+
"@spartan-ng/brain": "0.0.1-alpha.531",
|
|
181
181
|
"clsx": "^2.1.1"
|
|
182
182
|
}
|
|
183
183
|
},
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"internalName": "ui-hover-card-helm",
|
|
186
186
|
"peerDependencies": {
|
|
187
187
|
"@angular/core": ">=19.0.0",
|
|
188
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
188
|
+
"@spartan-ng/brain": "0.0.1-alpha.531",
|
|
189
189
|
"clsx": "^2.1.1"
|
|
190
190
|
}
|
|
191
191
|
},
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
"peerDependencies": {
|
|
203
203
|
"@angular/core": ">=19.0.0",
|
|
204
204
|
"@angular/forms": ">=19.0.0",
|
|
205
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
205
|
+
"@spartan-ng/brain": "0.0.1-alpha.531",
|
|
206
206
|
"class-variance-authority": "^0.7.0",
|
|
207
207
|
"clsx": "^2.1.1"
|
|
208
208
|
}
|
|
@@ -211,8 +211,8 @@
|
|
|
211
211
|
"internalName": "ui-input-group-helm",
|
|
212
212
|
"peerDependencies": {
|
|
213
213
|
"@angular/core": ">=19.0.0",
|
|
214
|
-
"
|
|
215
|
-
"
|
|
214
|
+
"class-variance-authority": "^0.7.0",
|
|
215
|
+
"clsx": "^2.1.1"
|
|
216
216
|
}
|
|
217
217
|
},
|
|
218
218
|
"input-otp": {
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
"@ng-icons/core": ">=29.0.0",
|
|
224
224
|
"@ng-icons/lucide": ">=29.0.0",
|
|
225
225
|
"@angular/cdk": ">=19.0.0",
|
|
226
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
226
|
+
"@spartan-ng/brain": "0.0.1-alpha.531"
|
|
227
227
|
}
|
|
228
228
|
},
|
|
229
229
|
"kbd": {
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
"internalName": "ui-label-helm",
|
|
238
238
|
"peerDependencies": {
|
|
239
239
|
"@angular/core": ">=19.0.0",
|
|
240
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
240
|
+
"@spartan-ng/brain": "0.0.1-alpha.531",
|
|
241
241
|
"clsx": "^2.1.1"
|
|
242
242
|
}
|
|
243
243
|
},
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
"internalName": "ui-menu-helm",
|
|
246
246
|
"peerDependencies": {
|
|
247
247
|
"@angular/core": ">=19.0.0",
|
|
248
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
248
|
+
"@spartan-ng/brain": "0.0.1-alpha.531",
|
|
249
249
|
"clsx": "^2.1.1",
|
|
250
250
|
"@ng-icons/core": ">=29.0.0",
|
|
251
251
|
"@ng-icons/lucide": ">=29.0.0",
|
|
@@ -259,7 +259,7 @@
|
|
|
259
259
|
"@angular/cdk": ">=19.0.0",
|
|
260
260
|
"@angular/core": ">=19.0.0",
|
|
261
261
|
"@angular/forms": ">=19.0.0",
|
|
262
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
262
|
+
"@spartan-ng/brain": "0.0.1-alpha.531",
|
|
263
263
|
"class-variance-authority": "^0.7.0",
|
|
264
264
|
"clsx": "^2.1.1",
|
|
265
265
|
"@ng-icons/core": ">=29.0.0",
|
|
@@ -272,14 +272,14 @@
|
|
|
272
272
|
"peerDependencies": {
|
|
273
273
|
"@angular/core": ">=19.0.0",
|
|
274
274
|
"clsx": "^2.1.1",
|
|
275
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
275
|
+
"@spartan-ng/brain": "0.0.1-alpha.531"
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
278
|
"progress": {
|
|
279
279
|
"internalName": "ui-progress-helm",
|
|
280
280
|
"peerDependencies": {
|
|
281
281
|
"@angular/core": ">=19.0.0",
|
|
282
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
282
|
+
"@spartan-ng/brain": "0.0.1-alpha.531",
|
|
283
283
|
"clsx": "^2.1.1"
|
|
284
284
|
}
|
|
285
285
|
},
|
|
@@ -287,7 +287,7 @@
|
|
|
287
287
|
"internalName": "ui-radio-group-helm",
|
|
288
288
|
"peerDependencies": {
|
|
289
289
|
"@angular/core": ">=19.0.0",
|
|
290
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
290
|
+
"@spartan-ng/brain": "0.0.1-alpha.531",
|
|
291
291
|
"clsx": "^2.1.1",
|
|
292
292
|
"@angular/common": ">=19.0.0"
|
|
293
293
|
}
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
"peerDependencies": {
|
|
305
305
|
"@angular/cdk": ">=19.0.0",
|
|
306
306
|
"@angular/core": ">=19.0.0",
|
|
307
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
307
|
+
"@spartan-ng/brain": "0.0.1-alpha.531",
|
|
308
308
|
"clsx": "^2.1.1",
|
|
309
309
|
"@ng-icons/core": ">=29.0.0",
|
|
310
310
|
"@ng-icons/lucide": ">=29.0.0",
|
|
@@ -315,7 +315,7 @@
|
|
|
315
315
|
"internalName": "ui-separator-helm",
|
|
316
316
|
"peerDependencies": {
|
|
317
317
|
"@angular/core": ">=19.0.0",
|
|
318
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
318
|
+
"@spartan-ng/brain": "0.0.1-alpha.531",
|
|
319
319
|
"clsx": "^2.1.1"
|
|
320
320
|
}
|
|
321
321
|
},
|
|
@@ -326,7 +326,7 @@
|
|
|
326
326
|
"clsx": "^2.1.1",
|
|
327
327
|
"@ng-icons/core": ">=29.0.0",
|
|
328
328
|
"@ng-icons/lucide": ">=29.0.0",
|
|
329
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
329
|
+
"@spartan-ng/brain": "0.0.1-alpha.531",
|
|
330
330
|
"class-variance-authority": "^0.7.0"
|
|
331
331
|
}
|
|
332
332
|
},
|
|
@@ -335,7 +335,7 @@
|
|
|
335
335
|
"peerDependencies": {
|
|
336
336
|
"@angular/core": ">=19.0.0",
|
|
337
337
|
"clsx": "^2.1.1",
|
|
338
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
338
|
+
"@spartan-ng/brain": "0.0.1-alpha.531",
|
|
339
339
|
"class-variance-authority": "^0.7.0",
|
|
340
340
|
"@ng-icons/core": ">=29.0.0",
|
|
341
341
|
"@ng-icons/lucide": ">=29.0.0",
|
|
@@ -353,7 +353,7 @@
|
|
|
353
353
|
"internalName": "ui-slider-helm",
|
|
354
354
|
"peerDependencies": {
|
|
355
355
|
"@angular/core": ">=19.0.0",
|
|
356
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
356
|
+
"@spartan-ng/brain": "0.0.1-alpha.531",
|
|
357
357
|
"clsx": "^2.1.1"
|
|
358
358
|
}
|
|
359
359
|
},
|
|
@@ -379,7 +379,7 @@
|
|
|
379
379
|
"clsx": "^2.1.1",
|
|
380
380
|
"@angular/cdk": ">=19.0.0",
|
|
381
381
|
"@angular/forms": ">=19.0.0",
|
|
382
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
382
|
+
"@spartan-ng/brain": "0.0.1-alpha.531"
|
|
383
383
|
}
|
|
384
384
|
},
|
|
385
385
|
"table": {
|
|
@@ -393,7 +393,7 @@
|
|
|
393
393
|
"internalName": "ui-tabs-helm",
|
|
394
394
|
"peerDependencies": {
|
|
395
395
|
"@angular/core": ">=19.0.0",
|
|
396
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
396
|
+
"@spartan-ng/brain": "0.0.1-alpha.531",
|
|
397
397
|
"clsx": "^2.1.1",
|
|
398
398
|
"class-variance-authority": "^0.7.0",
|
|
399
399
|
"@angular/cdk": ">=19.0.0",
|
|
@@ -407,7 +407,7 @@
|
|
|
407
407
|
"peerDependencies": {
|
|
408
408
|
"@angular/core": ">=19.0.0",
|
|
409
409
|
"@angular/forms": ">=19.0.0",
|
|
410
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
410
|
+
"@spartan-ng/brain": "0.0.1-alpha.531",
|
|
411
411
|
"class-variance-authority": "^0.7.0",
|
|
412
412
|
"clsx": "^2.1.1"
|
|
413
413
|
}
|
|
@@ -432,7 +432,7 @@
|
|
|
432
432
|
"internalName": "ui-tooltip-helm",
|
|
433
433
|
"peerDependencies": {
|
|
434
434
|
"@angular/core": ">=19.0.0",
|
|
435
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
435
|
+
"@spartan-ng/brain": "0.0.1-alpha.531"
|
|
436
436
|
}
|
|
437
437
|
},
|
|
438
438
|
"typography": {
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
2
|
-
import { BrnAffixes } from '@spartan-ng/brain/input-group';
|
|
3
|
-
import { hlm } from '<%- importAlias %>/utils';
|
|
4
|
-
import type { ClassValue } from 'clsx';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'hlm-prefix-addon,[hlmPrefixAddon]',
|
|
8
|
-
hostDirectives: [
|
|
9
|
-
{
|
|
10
|
-
directive: BrnAffixes,
|
|
11
|
-
inputs: ['tabindex'],
|
|
12
|
-
},
|
|
13
|
-
],
|
|
14
|
-
template: `
|
|
15
|
-
<ng-content />
|
|
16
|
-
`,
|
|
17
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
18
|
-
host: {
|
|
19
|
-
'[class]': '_computedClass()',
|
|
20
|
-
},
|
|
21
|
-
})
|
|
22
|
-
export class HlmPrefixAddon {
|
|
23
|
-
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
24
|
-
protected readonly _computedClass = computed(() =>
|
|
25
|
-
hlm(
|
|
26
|
-
'bg-muted border-input focus-visible:border-ring focus-visible:ring-ring/50 block' +
|
|
27
|
-
' text-muted-foreground inline-flex h-auto min-h-9' +
|
|
28
|
-
' items-center justify-center whitespace-nowrap border' +
|
|
29
|
-
' px-3 text-sm font-medium transition-colors' +
|
|
30
|
-
' focus-visible:outline-none focus-visible:ring-[3px]' +
|
|
31
|
-
' disabled:pointer-events-none disabled:opacity-50' +
|
|
32
|
-
' rounded-l-md border-r-0',
|
|
33
|
-
this.userClass(),
|
|
34
|
-
),
|
|
35
|
-
);
|
|
36
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
2
|
-
import { BrnAffixes } from '@spartan-ng/brain/input-group';
|
|
3
|
-
import { hlm } from '<%- importAlias %>/utils';
|
|
4
|
-
import type { ClassValue } from 'clsx';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'hlm-prefix,[hlmPrefix]',
|
|
8
|
-
hostDirectives: [
|
|
9
|
-
{
|
|
10
|
-
directive: BrnAffixes,
|
|
11
|
-
inputs: ['tabindex'],
|
|
12
|
-
},
|
|
13
|
-
],
|
|
14
|
-
template: `
|
|
15
|
-
<ng-content />
|
|
16
|
-
`,
|
|
17
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
18
|
-
host: {
|
|
19
|
-
'[class]': '_computedClass()',
|
|
20
|
-
},
|
|
21
|
-
})
|
|
22
|
-
export class HlmPrefix {
|
|
23
|
-
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
24
|
-
protected readonly _computedClass = computed(() =>
|
|
25
|
-
hlm('text-muted-foreground inset-y-0 z-10 flex items-center ' + this.userClass()),
|
|
26
|
-
);
|
|
27
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
2
|
-
import { BrnAffixes } from '@spartan-ng/brain/input-group';
|
|
3
|
-
import { hlm } from '<%- importAlias %>/utils';
|
|
4
|
-
import type { ClassValue } from 'clsx';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'hlm-suffix-addon,[hlmSuffixAddon]',
|
|
8
|
-
hostDirectives: [
|
|
9
|
-
{
|
|
10
|
-
directive: BrnAffixes,
|
|
11
|
-
inputs: ['tabindex'],
|
|
12
|
-
},
|
|
13
|
-
],
|
|
14
|
-
template: `
|
|
15
|
-
<ng-content />
|
|
16
|
-
`,
|
|
17
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
18
|
-
host: {
|
|
19
|
-
'[class]': '_computedClass()',
|
|
20
|
-
},
|
|
21
|
-
})
|
|
22
|
-
export class HlmSuffixAddon {
|
|
23
|
-
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
24
|
-
protected readonly _computedClass = computed(() =>
|
|
25
|
-
hlm(
|
|
26
|
-
'bg-muted border-input focus-visible:border-ring focus-visible:ring-ring/50 block' +
|
|
27
|
-
' text-muted-foreground inline-flex h-auto min-h-9' +
|
|
28
|
-
' items-center justify-center whitespace-nowrap border' +
|
|
29
|
-
' px-3 text-sm font-medium transition-colors' +
|
|
30
|
-
' focus-visible:outline-none focus-visible:ring-[3px]' +
|
|
31
|
-
' disabled:pointer-events-none disabled:opacity-50' +
|
|
32
|
-
' border-p-0 rounded-r-md',
|
|
33
|
-
this.userClass(),
|
|
34
|
-
),
|
|
35
|
-
);
|
|
36
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
2
|
-
import { BrnAffixes } from '@spartan-ng/brain/input-group';
|
|
3
|
-
import { hlm } from '<%- importAlias %>/utils';
|
|
4
|
-
import type { ClassValue } from 'clsx';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'hlm-suffix,[hlmSuffix]',
|
|
8
|
-
hostDirectives: [
|
|
9
|
-
{
|
|
10
|
-
directive: BrnAffixes,
|
|
11
|
-
inputs: ['tabindex'],
|
|
12
|
-
},
|
|
13
|
-
],
|
|
14
|
-
template: `
|
|
15
|
-
<ng-content />
|
|
16
|
-
`,
|
|
17
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
18
|
-
host: {
|
|
19
|
-
'[class]': '_computedClass()',
|
|
20
|
-
},
|
|
21
|
-
})
|
|
22
|
-
export class HlmSuffix {
|
|
23
|
-
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
24
|
-
protected readonly _computedClass = computed(() =>
|
|
25
|
-
hlm('text-muted-foreground inset-y-0 z-10 flex items-center ' + this.userClass()),
|
|
26
|
-
);
|
|
27
|
-
}
|