@egose/shadcn-theme-ng 0.0.9 → 0.0.10
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/accordion/fesm2022/accordion.mjs +49 -49
- package/accordion/fesm2022/accordion.mjs.map +1 -1
- package/accordion/index.d.ts +21 -21
- package/alert/fesm2022/alert.mjs +45 -45
- package/alert/fesm2022/alert.mjs.map +1 -1
- package/alert/index.d.ts +18 -18
- package/badge/fesm2022/badge.mjs +6 -6
- package/badge/fesm2022/badge.mjs.map +1 -1
- package/badge/index.d.ts +4 -4
- package/button/fesm2022/button.mjs +19 -19
- package/button/fesm2022/button.mjs.map +1 -1
- package/button/index.d.ts +9 -9
- package/form-field/fesm2022/form-field.mjs +30 -30
- package/form-field/fesm2022/form-field.mjs.map +1 -1
- package/form-field/index.d.ts +16 -16
- package/icon/fesm2022/icon.mjs +20 -20
- package/icon/fesm2022/icon.mjs.map +1 -1
- package/icon/index.d.ts +13 -13
- package/input/fesm2022/input.mjs +16 -16
- package/input/fesm2022/input.mjs.map +1 -1
- package/input/index.d.ts +9 -9
- package/label/fesm2022/label.mjs +14 -14
- package/label/fesm2022/label.mjs.map +1 -1
- package/label/index.d.ts +9 -9
- package/package.json +1 -18
- package/radio-group/fesm2022/radio-group.mjs +26 -26
- package/radio-group/fesm2022/radio-group.mjs.map +1 -1
- package/radio-group/index.d.ts +15 -15
- package/select/fesm2022/select.mjs +97 -97
- package/select/fesm2022/select.mjs.map +1 -1
- package/select/index.d.ts +35 -35
- package/sonner/fesm2022/sonner.mjs +14 -14
- package/sonner/fesm2022/sonner.mjs.map +1 -1
- package/sonner/index.d.ts +9 -9
- package/spinner/fesm2022/spinner.mjs +14 -14
- package/spinner/fesm2022/spinner.mjs.map +1 -1
- package/spinner/index.d.ts +9 -9
- package/switch/fesm2022/switch.mjs +24 -24
- package/switch/fesm2022/switch.mjs.map +1 -1
- package/switch/index.d.ts +12 -12
- package/tabs/fesm2022/tabs.mjs +45 -45
- package/tabs/fesm2022/tabs.mjs.map +1 -1
- package/tabs/index.d.ts +21 -21
- package/tooltip/fesm2022/tooltip.mjs +22 -22
- package/tooltip/fesm2022/tooltip.mjs.map +1 -1
- package/tooltip/index.d.ts +12 -12
package/form-field/index.d.ts
CHANGED
|
@@ -2,36 +2,36 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { ClassValue } from 'clsx';
|
|
3
3
|
import { BrnFormFieldControl } from '@spartan-ng/brain/form-field';
|
|
4
4
|
|
|
5
|
-
declare class
|
|
5
|
+
declare class HlmError {
|
|
6
6
|
readonly userClass: _angular_core.InputSignal<ClassValue>;
|
|
7
7
|
protected readonly _computedClass: _angular_core.Signal<string>;
|
|
8
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
9
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<
|
|
8
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HlmError, never>;
|
|
9
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HlmError, "hlm-error", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
declare class
|
|
12
|
+
declare class HlmFormField {
|
|
13
13
|
readonly userClass: _angular_core.InputSignal<ClassValue>;
|
|
14
14
|
protected readonly _computedClass: _angular_core.Signal<string>;
|
|
15
15
|
readonly control: _angular_core.Signal<BrnFormFieldControl | undefined>;
|
|
16
|
-
readonly errorChildren: _angular_core.Signal<readonly
|
|
16
|
+
readonly errorChildren: _angular_core.Signal<readonly HlmError[]>;
|
|
17
17
|
protected readonly _hasDisplayedMessage: _angular_core.Signal<"error" | "hint">;
|
|
18
18
|
constructor();
|
|
19
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
20
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<
|
|
19
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HlmFormField, never>;
|
|
20
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<HlmFormField, "hlm-form-field", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, ["control", "errorChildren"], ["*", "hlm-error", "hlm-hint"], true, never>;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
declare class
|
|
23
|
+
declare class HlmHint {
|
|
24
24
|
readonly userClass: _angular_core.InputSignal<ClassValue>;
|
|
25
25
|
protected readonly _computedClass: _angular_core.Signal<string>;
|
|
26
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
27
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<
|
|
26
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HlmHint, never>;
|
|
27
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HlmHint, "hlm-hint", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
declare const
|
|
31
|
-
declare class
|
|
32
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
33
|
-
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<
|
|
34
|
-
static ɵinj: _angular_core.ɵɵInjectorDeclaration<
|
|
30
|
+
declare const HlmFormFieldImports: (typeof HlmError | typeof HlmFormField | typeof HlmHint)[];
|
|
31
|
+
declare class HlmFormFieldModule {
|
|
32
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HlmFormFieldModule, never>;
|
|
33
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<HlmFormFieldModule, never, [typeof HlmFormField, typeof HlmError, typeof HlmHint], [typeof HlmFormField, typeof HlmError, typeof HlmHint]>;
|
|
34
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<HlmFormFieldModule>;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
export {
|
|
37
|
+
export { HlmError, HlmFormField, HlmFormFieldImports, HlmFormFieldModule, HlmHint };
|
package/icon/fesm2022/icon.mjs
CHANGED
|
@@ -4,16 +4,16 @@ import { InjectionToken, inject, input, computed, Directive, NgModule } from '@a
|
|
|
4
4
|
const defaultConfig = {
|
|
5
5
|
size: 'base',
|
|
6
6
|
};
|
|
7
|
-
const
|
|
8
|
-
function
|
|
9
|
-
return { provide:
|
|
7
|
+
const HlmIconConfigToken = new InjectionToken('HlmIconConfig');
|
|
8
|
+
function provideHlmIconConfig(config) {
|
|
9
|
+
return { provide: HlmIconConfigToken, useValue: { ...defaultConfig, ...config } };
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
return inject(
|
|
11
|
+
function injectHlmIconConfig() {
|
|
12
|
+
return inject(HlmIconConfigToken, { optional: true }) ?? defaultConfig;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
class
|
|
16
|
-
_config =
|
|
15
|
+
class HlmIcon {
|
|
16
|
+
_config = injectHlmIconConfig();
|
|
17
17
|
size = input(this._config.size, ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
18
18
|
_computedSize = computed(() => {
|
|
19
19
|
const size = this.size();
|
|
@@ -33,13 +33,13 @@ class EgIcon {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}, ...(ngDevMode ? [{ debugName: "_computedSize" }] : []));
|
|
36
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
37
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.
|
|
36
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
37
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.0", type: HlmIcon, isStandalone: true, selector: "ng-icon[hlm]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--ng-icon__size": "_computedSize()" } }, ngImport: i0 });
|
|
38
38
|
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmIcon, decorators: [{
|
|
40
40
|
type: Directive,
|
|
41
41
|
args: [{
|
|
42
|
-
selector: 'ng-icon[
|
|
42
|
+
selector: 'ng-icon[hlm]',
|
|
43
43
|
host: {
|
|
44
44
|
'[style.--ng-icon__size]': '_computedSize()',
|
|
45
45
|
},
|
|
@@ -49,17 +49,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
49
49
|
/*
|
|
50
50
|
* Public API Surface of icon
|
|
51
51
|
*/
|
|
52
|
-
const
|
|
53
|
-
class
|
|
54
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
55
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.
|
|
56
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.
|
|
52
|
+
const HlmIconImports = [HlmIcon];
|
|
53
|
+
class HlmIconModule {
|
|
54
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
55
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: HlmIconModule, imports: [HlmIcon], exports: [HlmIcon] });
|
|
56
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmIconModule });
|
|
57
57
|
}
|
|
58
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmIconModule, decorators: [{
|
|
59
59
|
type: NgModule,
|
|
60
60
|
args: [{
|
|
61
|
-
imports: [...
|
|
62
|
-
exports: [...
|
|
61
|
+
imports: [...HlmIconImports],
|
|
62
|
+
exports: [...HlmIconImports],
|
|
63
63
|
}]
|
|
64
64
|
}] });
|
|
65
65
|
|
|
@@ -67,5 +67,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
67
67
|
* Generated bundle index. Do not edit.
|
|
68
68
|
*/
|
|
69
69
|
|
|
70
|
-
export {
|
|
70
|
+
export { HlmIcon, HlmIconImports, HlmIconModule, injectHlmIconConfig, provideHlmIconConfig };
|
|
71
71
|
//# sourceMappingURL=icon.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.mjs","sources":["../../../projects/icon/src/lib/icon.token.ts","../../../projects/icon/src/lib/icon.ts","../../../projects/icon/src/public-api.ts","../../../projects/icon/src/icon.ts"],"sourcesContent":["import { InjectionToken, ValueProvider, inject } from '@angular/core';\nimport type { IconSize } from './icon';\n\nexport interface
|
|
1
|
+
{"version":3,"file":"icon.mjs","sources":["../../../projects/icon/src/lib/icon.token.ts","../../../projects/icon/src/lib/icon.ts","../../../projects/icon/src/public-api.ts","../../../projects/icon/src/icon.ts"],"sourcesContent":["import { InjectionToken, ValueProvider, inject } from '@angular/core';\nimport type { IconSize } from './icon';\n\nexport interface HlmIconConfig {\n size: IconSize;\n}\n\nconst defaultConfig: HlmIconConfig = {\n size: 'base',\n};\n\nconst HlmIconConfigToken = new InjectionToken<HlmIconConfig>('HlmIconConfig');\n\nexport function provideHlmIconConfig(config: Partial<HlmIconConfig>): ValueProvider {\n return { provide: HlmIconConfigToken, useValue: { ...defaultConfig, ...config } };\n}\n\nexport function injectHlmIconConfig(): HlmIconConfig {\n return inject(HlmIconConfigToken, { optional: true }) ?? defaultConfig;\n}\n","import { Directive, computed, input } from '@angular/core';\nimport { injectHlmIconConfig } from './icon.token';\n\nexport type IconSize = 'xs' | 'sm' | 'base' | 'lg' | 'xl' | 'none' | (Record<never, never> & string);\n\n@Directive({\n selector: 'ng-icon[hlm]',\n host: {\n '[style.--ng-icon__size]': '_computedSize()',\n },\n})\nexport class HlmIcon {\n private readonly _config = injectHlmIconConfig();\n public readonly size = input<IconSize>(this._config.size);\n\n protected readonly _computedSize = computed(() => {\n const size = this.size();\n\n switch (size) {\n case 'xs':\n return '12px';\n case 'sm':\n return '16px';\n case 'base':\n return '24px';\n case 'lg':\n return '32px';\n case 'xl':\n return '48px';\n default: {\n return size;\n }\n }\n });\n}\n","/*\n * Public API Surface of icon\n */\n\nimport { NgModule } from '@angular/core';\nimport { HlmIcon } from './lib/icon';\n\nexport * from './lib/icon';\nexport * from './lib/icon.token';\n\nexport const HlmIconImports = [HlmIcon] as const;\n\n@NgModule({\n imports: [...HlmIconImports],\n exports: [...HlmIconImports],\n})\nexport class HlmIconModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAOA,MAAM,aAAa,GAAkB;AACnC,IAAA,IAAI,EAAE,MAAM;CACb;AAED,MAAM,kBAAkB,GAAG,IAAI,cAAc,CAAgB,eAAe,CAAC;AAEvE,SAAU,oBAAoB,CAAC,MAA8B,EAAA;AACjE,IAAA,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,EAAE,GAAG,aAAa,EAAE,GAAG,MAAM,EAAE,EAAE;AACnF;SAEgB,mBAAmB,GAAA;AACjC,IAAA,OAAO,MAAM,CAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,aAAa;AACxE;;MCRa,OAAO,CAAA;IACD,OAAO,GAAG,mBAAmB,EAAE;IAChC,IAAI,GAAG,KAAK,CAAW,IAAI,CAAC,OAAO,CAAC,IAAI,EAAA,IAAA,SAAA,GAAA,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EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAb,aAAa,EAAA,OAAA,EAAA,CANK,OAAO,CAAA,EAAA,OAAA,EAAA,CAAP,OAAO,CAAA,EAAA,CAAA;wGAMzB,aAAa,EAAA,CAAA;;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,cAAc,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,cAAc,CAAC;AAC7B,iBAAA;;;ACfD;;AAEG;;;;"}
|
package/icon/index.d.ts
CHANGED
|
@@ -2,26 +2,26 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { ValueProvider } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
type IconSize = 'xs' | 'sm' | 'base' | 'lg' | 'xl' | 'none' | (Record<never, never> & string);
|
|
5
|
-
declare class
|
|
5
|
+
declare class HlmIcon {
|
|
6
6
|
private readonly _config;
|
|
7
7
|
readonly size: i0.InputSignal<IconSize>;
|
|
8
8
|
protected readonly _computedSize: i0.Signal<"none" | (Record<never, never> & string) | "12px" | "16px" | "24px" | "32px" | "48px">;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
10
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmIcon, never>;
|
|
10
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmIcon, "ng-icon[hlm]", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
interface
|
|
13
|
+
interface HlmIconConfig {
|
|
14
14
|
size: IconSize;
|
|
15
15
|
}
|
|
16
|
-
declare function
|
|
17
|
-
declare function
|
|
16
|
+
declare function provideHlmIconConfig(config: Partial<HlmIconConfig>): ValueProvider;
|
|
17
|
+
declare function injectHlmIconConfig(): HlmIconConfig;
|
|
18
18
|
|
|
19
|
-
declare const
|
|
20
|
-
declare class
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
22
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<
|
|
23
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<
|
|
19
|
+
declare const HlmIconImports: readonly [typeof HlmIcon];
|
|
20
|
+
declare class HlmIconModule {
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmIconModule, never>;
|
|
22
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<HlmIconModule, never, [typeof HlmIcon], [typeof HlmIcon]>;
|
|
23
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<HlmIconModule>;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
export {
|
|
27
|
-
export type {
|
|
26
|
+
export { HlmIcon, HlmIconImports, HlmIconModule, injectHlmIconConfig, provideHlmIconConfig };
|
|
27
|
+
export type { HlmIconConfig, IconSize };
|
package/input/fesm2022/input.mjs
CHANGED
|
@@ -17,7 +17,7 @@ const inputVariants = cva('tw:file:text-foreground tw:placeholder:text-muted-for
|
|
|
17
17
|
error: 'auto',
|
|
18
18
|
},
|
|
19
19
|
});
|
|
20
|
-
class
|
|
20
|
+
class HlmInput {
|
|
21
21
|
error = input('auto', ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
22
22
|
_state = linkedSignal(() => ({ error: this.error() }));
|
|
23
23
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
@@ -48,25 +48,25 @@ class EgInput {
|
|
|
48
48
|
setError(error) {
|
|
49
49
|
this._state.set({ error });
|
|
50
50
|
}
|
|
51
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
52
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.
|
|
51
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
52
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.0", type: HlmInput, isStandalone: true, selector: "[hlmInput]", inputs: { error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, providers: [
|
|
53
53
|
{
|
|
54
54
|
provide: BrnFormFieldControl,
|
|
55
|
-
useExisting: forwardRef(() =>
|
|
55
|
+
useExisting: forwardRef(() => HlmInput),
|
|
56
56
|
},
|
|
57
57
|
], ngImport: i0 });
|
|
58
58
|
}
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmInput, decorators: [{
|
|
60
60
|
type: Directive,
|
|
61
61
|
args: [{
|
|
62
|
-
selector: '[
|
|
62
|
+
selector: '[hlmInput]',
|
|
63
63
|
host: {
|
|
64
64
|
'[class]': '_computedClass()',
|
|
65
65
|
},
|
|
66
66
|
providers: [
|
|
67
67
|
{
|
|
68
68
|
provide: BrnFormFieldControl,
|
|
69
|
-
useExisting: forwardRef(() =>
|
|
69
|
+
useExisting: forwardRef(() => HlmInput),
|
|
70
70
|
},
|
|
71
71
|
],
|
|
72
72
|
}]
|
|
@@ -75,17 +75,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
75
75
|
/*
|
|
76
76
|
* Public API Surface of input
|
|
77
77
|
*/
|
|
78
|
-
const
|
|
79
|
-
class
|
|
80
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
81
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.
|
|
82
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.
|
|
78
|
+
const HlmInputImpots = [HlmInput];
|
|
79
|
+
class HlmInputModule {
|
|
80
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
81
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: HlmInputModule, imports: [HlmInput], exports: [HlmInput] });
|
|
82
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmInputModule });
|
|
83
83
|
}
|
|
84
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmInputModule, decorators: [{
|
|
85
85
|
type: NgModule,
|
|
86
86
|
args: [{
|
|
87
|
-
imports: [...
|
|
88
|
-
exports: [...
|
|
87
|
+
imports: [...HlmInputImpots],
|
|
88
|
+
exports: [...HlmInputImpots],
|
|
89
89
|
}]
|
|
90
90
|
}] });
|
|
91
91
|
|
|
@@ -93,5 +93,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
93
93
|
* Generated bundle index. Do not edit.
|
|
94
94
|
*/
|
|
95
95
|
|
|
96
|
-
export {
|
|
96
|
+
export { HlmInput, HlmInputImpots, HlmInputModule, inputVariants };
|
|
97
97
|
//# sourceMappingURL=input.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.mjs","sources":["../../../projects/input/src/lib/input.ts","../../../projects/input/src/public-api.ts","../../../projects/input/src/input.ts"],"sourcesContent":["import {\n computed,\n Directive,\n type DoCheck,\n effect,\n forwardRef,\n inject,\n Injector,\n input,\n linkedSignal,\n untracked,\n} from '@angular/core';\nimport { FormGroupDirective, NgControl, NgForm } from '@angular/forms';\nimport { BrnFormFieldControl } from '@spartan-ng/brain/form-field';\nimport { ErrorStateMatcher, ErrorStateTracker } from '@spartan-ng/brain/forms';\nimport { cn } from '@egose/shadcn-theme-ng/utils';\nimport { cva, VariantProps } from 'class-variance-authority';\nimport type { ClassValue } from 'clsx';\n\nexport const inputVariants = cva(\n 'tw:file:text-foreground tw:placeholder:text-muted-foreground tw:selection:bg-primary tw:selection:text-primary-foreground tw:dark:bg-input/30 tw:border-input tw:shadow-xs tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:flex tw:h-9 tw:w-full tw:min-w-0 tw:rounded-md tw:border tw:bg-transparent tw:px-3 tw:py-1 tw:text-base tw:outline-none tw:transition-[color,box-shadow] tw:file:inline-flex tw:file:h-7 tw:file:border-0 tw:file:bg-transparent tw:file:text-sm tw:file:font-medium tw:focus-visible:ring-[3px] tw:disabled:pointer-events-none tw:disabled:cursor-not-allowed tw:disabled:opacity-50 md:text-sm',\n {\n variants: {\n error: {\n auto: 'tw:[&.ng-invalid.ng-touched]:text-destructive/20 tw:dark:[&.ng-invalid.ng-touched]:text-destructive/40 tw:[&.ng-invalid.ng-touched]:border-destructive tw:[&.ng-invalid.ng-touched]:focus-visible:ring-destructive',\n true: 'tw:text-destructive/20 dark:text-destructive/40 tw:border-destructive tw:focus-visible:ring-destructive',\n },\n },\n defaultVariants: {\n error: 'auto',\n },\n },\n);\ntype InputVariants = VariantProps<typeof inputVariants>;\n\n@Directive({\n selector: '[
|
|
1
|
+
{"version":3,"file":"input.mjs","sources":["../../../projects/input/src/lib/input.ts","../../../projects/input/src/public-api.ts","../../../projects/input/src/input.ts"],"sourcesContent":["import {\n computed,\n Directive,\n type DoCheck,\n effect,\n forwardRef,\n inject,\n Injector,\n input,\n linkedSignal,\n untracked,\n} from '@angular/core';\nimport { FormGroupDirective, NgControl, NgForm } from '@angular/forms';\nimport { BrnFormFieldControl } from '@spartan-ng/brain/form-field';\nimport { ErrorStateMatcher, ErrorStateTracker } from '@spartan-ng/brain/forms';\nimport { cn } from '@egose/shadcn-theme-ng/utils';\nimport { cva, VariantProps } from 'class-variance-authority';\nimport type { ClassValue } from 'clsx';\n\nexport const inputVariants = cva(\n 'tw:file:text-foreground tw:placeholder:text-muted-foreground tw:selection:bg-primary tw:selection:text-primary-foreground tw:dark:bg-input/30 tw:border-input tw:shadow-xs tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:flex tw:h-9 tw:w-full tw:min-w-0 tw:rounded-md tw:border tw:bg-transparent tw:px-3 tw:py-1 tw:text-base tw:outline-none tw:transition-[color,box-shadow] tw:file:inline-flex tw:file:h-7 tw:file:border-0 tw:file:bg-transparent tw:file:text-sm tw:file:font-medium tw:focus-visible:ring-[3px] tw:disabled:pointer-events-none tw:disabled:cursor-not-allowed tw:disabled:opacity-50 md:text-sm',\n {\n variants: {\n error: {\n auto: 'tw:[&.ng-invalid.ng-touched]:text-destructive/20 tw:dark:[&.ng-invalid.ng-touched]:text-destructive/40 tw:[&.ng-invalid.ng-touched]:border-destructive tw:[&.ng-invalid.ng-touched]:focus-visible:ring-destructive',\n true: 'tw:text-destructive/20 dark:text-destructive/40 tw:border-destructive tw:focus-visible:ring-destructive',\n },\n },\n defaultVariants: {\n error: 'auto',\n },\n },\n);\ntype InputVariants = VariantProps<typeof inputVariants>;\n\n@Directive({\n selector: '[hlmInput]',\n host: {\n '[class]': '_computedClass()',\n },\n providers: [\n {\n provide: BrnFormFieldControl,\n useExisting: forwardRef(() => HlmInput),\n },\n ],\n})\nexport class HlmInput implements BrnFormFieldControl, DoCheck {\n public readonly error = input<InputVariants['error']>('auto');\n\n protected readonly _state = linkedSignal(() => ({ error: this.error() }));\n\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n cn(inputVariants({ error: this._state().error }), this.userClass()),\n );\n\n private readonly _injector = inject(Injector);\n\n public readonly ngControl: NgControl | null = this._injector.get(NgControl, null);\n\n private readonly _errorStateTracker: ErrorStateTracker;\n\n private readonly _defaultErrorStateMatcher = inject(ErrorStateMatcher);\n private readonly _parentForm = inject(NgForm, { optional: true });\n private readonly _parentFormGroup = inject(FormGroupDirective, { optional: true });\n\n public readonly errorState = computed(() => this._errorStateTracker.errorState());\n\n constructor() {\n this._errorStateTracker = new ErrorStateTracker(\n this._defaultErrorStateMatcher,\n this.ngControl,\n this._parentFormGroup,\n this._parentForm,\n );\n\n effect(() => {\n const error = this._errorStateTracker.errorState();\n untracked(() => {\n if (this.ngControl) {\n const shouldShowError = error && this.ngControl.invalid && (this.ngControl.touched || this.ngControl.dirty);\n this._errorStateTracker.errorState.set(shouldShowError ? true : false);\n this.setError(shouldShowError ? true : 'auto');\n }\n });\n });\n }\n\n ngDoCheck() {\n this._errorStateTracker.updateErrorState();\n }\n\n setError(error: InputVariants['error']) {\n this._state.set({ error });\n }\n}\n","/*\n * Public API Surface of input\n */\n\nimport { NgModule } from '@angular/core';\nimport { HlmInput } from './lib/input';\n\nexport * from './lib/input';\n\nexport const HlmInputImpots = [HlmInput] as const;\n\n@NgModule({\n imports: [...HlmInputImpots],\n exports: [...HlmInputImpots],\n})\nexport class HlmInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAmBO,MAAM,aAAa,GAAG,GAAG,CAC9B,4mBAA4mB,EAC5mB;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,oNAAoN;AAC1N,YAAA,IAAI,EAAE,yGAAyG;AAChH,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,KAAK,EAAE,MAAM;AACd,KAAA;AACF,CAAA;MAgBU,QAAQ,CAAA;AACH,IAAA,KAAK,GAAG,KAAK,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} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
12
|
type InputVariants = VariantProps<typeof inputVariants>;
|
|
13
|
-
declare class
|
|
13
|
+
declare class HlmInput implements BrnFormFieldControl, DoCheck {
|
|
14
14
|
readonly error: _angular_core.InputSignal<boolean | "auto" | null | undefined>;
|
|
15
15
|
protected readonly _state: _angular_core.WritableSignal<{
|
|
16
16
|
error: boolean | "auto" | null | undefined;
|
|
@@ -27,15 +27,15 @@ declare class EgInput implements BrnFormFieldControl, DoCheck {
|
|
|
27
27
|
constructor();
|
|
28
28
|
ngDoCheck(): void;
|
|
29
29
|
setError(error: InputVariants['error']): void;
|
|
30
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
31
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<
|
|
30
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HlmInput, never>;
|
|
31
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HlmInput, "[hlmInput]", never, { "error": { "alias": "error"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
declare const
|
|
35
|
-
declare class
|
|
36
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
37
|
-
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<
|
|
38
|
-
static ɵinj: _angular_core.ɵɵInjectorDeclaration<
|
|
34
|
+
declare const HlmInputImpots: readonly [typeof HlmInput];
|
|
35
|
+
declare class HlmInputModule {
|
|
36
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HlmInputModule, never>;
|
|
37
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<HlmInputModule, never, [typeof HlmInput], [typeof HlmInput]>;
|
|
38
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<HlmInputModule>;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
export {
|
|
41
|
+
export { HlmInput, HlmInputImpots, HlmInputModule, inputVariants };
|
package/label/fesm2022/label.mjs
CHANGED
|
@@ -4,16 +4,16 @@ import * as i1 from '@spartan-ng/brain/label';
|
|
|
4
4
|
import { BrnLabel } from '@spartan-ng/brain/label';
|
|
5
5
|
import { cn } from '@egose/shadcn-theme-ng/utils';
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
class HlmLabel {
|
|
8
8
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
9
9
|
_computedClass = computed(() => cn('tw:flex tw:select-none tw:items-center tw:gap-2 tw:text-sm tw:font-medium tw:leading-none tw:peer-disabled:cursor-not-allowed tw:peer-disabled:opacity-50 tw:has-[[disabled]]:cursor-not-allowed tw:has-[[disabled]]:opacity-50 tw:group-data-[disabled=true]:pointer-events-none tw:group-data-[disabled=true]:opacity-50 tw:peer-data-[disabled]:cursor-not-allowed tw:peer-data-[disabled]:opacity-50', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
10
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
11
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.
|
|
10
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
11
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.0", type: HlmLabel, isStandalone: true, selector: "[hlmLabel]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnLabel, inputs: ["id", "id"] }], ngImport: i0 });
|
|
12
12
|
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmLabel, decorators: [{
|
|
14
14
|
type: Directive,
|
|
15
15
|
args: [{
|
|
16
|
-
selector: '[
|
|
16
|
+
selector: '[hlmLabel]',
|
|
17
17
|
hostDirectives: [
|
|
18
18
|
{
|
|
19
19
|
directive: BrnLabel,
|
|
@@ -29,17 +29,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
29
29
|
/*
|
|
30
30
|
* Public API Surface of label
|
|
31
31
|
*/
|
|
32
|
-
const
|
|
33
|
-
class
|
|
34
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
35
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.
|
|
36
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.
|
|
32
|
+
const HlmLabelImports = [HlmLabel];
|
|
33
|
+
class HlmLabelModule {
|
|
34
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
35
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: HlmLabelModule, imports: [HlmLabel], exports: [HlmLabel] });
|
|
36
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmLabelModule });
|
|
37
37
|
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmLabelModule, decorators: [{
|
|
39
39
|
type: NgModule,
|
|
40
40
|
args: [{
|
|
41
|
-
imports: [...
|
|
42
|
-
exports: [...
|
|
41
|
+
imports: [...HlmLabelImports],
|
|
42
|
+
exports: [...HlmLabelImports],
|
|
43
43
|
}]
|
|
44
44
|
}] });
|
|
45
45
|
|
|
@@ -47,5 +47,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
47
47
|
* Generated bundle index. Do not edit.
|
|
48
48
|
*/
|
|
49
49
|
|
|
50
|
-
export {
|
|
50
|
+
export { HlmLabel, HlmLabelImports, HlmLabelModule };
|
|
51
51
|
//# sourceMappingURL=label.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.mjs","sources":["../../../projects/label/src/lib/label.ts","../../../projects/label/src/public-api.ts","../../../projects/label/src/label.ts"],"sourcesContent":["import { Directive, computed, input } from '@angular/core';\nimport { BrnLabel } from '@spartan-ng/brain/label';\nimport { cn } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[
|
|
1
|
+
{"version":3,"file":"label.mjs","sources":["../../../projects/label/src/lib/label.ts","../../../projects/label/src/public-api.ts","../../../projects/label/src/label.ts"],"sourcesContent":["import { Directive, computed, input } from '@angular/core';\nimport { BrnLabel } from '@spartan-ng/brain/label';\nimport { cn } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmLabel]',\n hostDirectives: [\n {\n directive: BrnLabel,\n inputs: ['id'],\n },\n ],\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmLabel {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(() =>\n cn(\n 'tw:flex tw:select-none tw:items-center tw:gap-2 tw:text-sm tw:font-medium tw:leading-none tw:peer-disabled:cursor-not-allowed tw:peer-disabled:opacity-50 tw:has-[[disabled]]:cursor-not-allowed tw:has-[[disabled]]:opacity-50 tw:group-data-[disabled=true]:pointer-events-none tw:group-data-[disabled=true]:opacity-50 tw:peer-data-[disabled]:cursor-not-allowed tw:peer-data-[disabled]:opacity-50',\n this.userClass(),\n ),\n );\n}\n","/*\n * Public API Surface of label\n */\n\nimport { NgModule } from '@angular/core';\nimport { HlmLabel } from './lib/label';\n\nexport * from './lib/label';\n\nexport const HlmLabelImports = [HlmLabel] as const;\n\n@NgModule({\n imports: [...HlmLabelImports],\n exports: [...HlmLabelImports],\n})\nexport class HlmLabelModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAiBa,QAAQ,CAAA;AACH,IAAA,SAAS,GAAG,KAAK,CAAa,EAAE,6CAAI,KAAK,EAAE,OAAO,EAAA,CAAA,GAAA,CAAhB,EAAE,KAAK,EAAE,OAAO,EAAE,GAAC;AAElD,IAAA,cAAc,GAAG,QAAQ,CAAC,MAC3C,EAAE,CACA,0YAA0Y,EAC1Y,IAAI,CAAC,SAAS,EAAE,CACjB,0DACF;uGARU,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAR,QAAQ,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,kBAAA,EAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,QAAA,EAAA,MAAA,EAAA,CAAA,IAAA,EAAA,IAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAR,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAZpB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,YAAY;AACtB,oBAAA,cAAc,EAAE;AACd,wBAAA;AACE,4BAAA,SAAS,EAAE,QAAQ;4BACnB,MAAM,EAAE,CAAC,IAAI,CAAC;AACf,yBAAA;AACF,qBAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,kBAAkB;AAC9B,qBAAA;AACF,iBAAA;;;AChBD;;AAEG;AAOI,MAAM,eAAe,GAAG,CAAC,QAAQ;MAM3B,cAAc,CAAA;uGAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAd,cAAc,EAAA,OAAA,EAAA,CANK,QAAQ,CAAA,EAAA,OAAA,EAAA,CAAR,QAAQ,CAAA,EAAA,CAAA;wGAM3B,cAAc,EAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,eAAe,CAAC;AAC7B,oBAAA,OAAO,EAAE,CAAC,GAAG,eAAe,CAAC;AAC9B,iBAAA;;;ACdD;;AAEG;;;;"}
|
package/label/index.d.ts
CHANGED
|
@@ -2,18 +2,18 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { ClassValue } from 'clsx';
|
|
3
3
|
import * as i1 from '@spartan-ng/brain/label';
|
|
4
4
|
|
|
5
|
-
declare class
|
|
5
|
+
declare class HlmLabel {
|
|
6
6
|
readonly userClass: i0.InputSignal<ClassValue>;
|
|
7
7
|
protected readonly _computedClass: i0.Signal<string>;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
9
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmLabel, never>;
|
|
9
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmLabel, "[hlmLabel]", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.BrnLabel; inputs: { "id": "id"; }; outputs: {}; }]>;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
declare const
|
|
13
|
-
declare class
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
15
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<
|
|
16
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<
|
|
12
|
+
declare const HlmLabelImports: readonly [typeof HlmLabel];
|
|
13
|
+
declare class HlmLabelModule {
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmLabelModule, never>;
|
|
15
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<HlmLabelModule, never, [typeof HlmLabel], [typeof HlmLabel]>;
|
|
16
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<HlmLabelModule>;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export {
|
|
19
|
+
export { HlmLabel, HlmLabelImports, HlmLabelModule };
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.0.
|
|
2
|
+
"version": "0.0.10",
|
|
3
3
|
"description": "Angular shadcn UI theme",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
@@ -7,23 +7,6 @@
|
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/egose/shadcn-theme"
|
|
9
9
|
},
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"@angular/cdk": "20.2.2",
|
|
12
|
-
"@ng-icons/core": "^32.1.0",
|
|
13
|
-
"@ng-icons/lucide": ">=29.0.0",
|
|
14
|
-
"@ng-icons/tabler-icons": "^32.1.0",
|
|
15
|
-
"class-variance-authority": "^0.7.0",
|
|
16
|
-
"clsx": "^2.1.1",
|
|
17
|
-
"embla-carousel-angular": ">=19.0.0",
|
|
18
|
-
"ngx-sonner": ">=3.0.0",
|
|
19
|
-
"tailwind-merge": "^2.5.2",
|
|
20
|
-
"tslib": "^2.3.0"
|
|
21
|
-
},
|
|
22
|
-
"peerDependencies": {
|
|
23
|
-
"@angular/common": "^20.2.0",
|
|
24
|
-
"@angular/core": "^20.2.0",
|
|
25
|
-
"@spartan-ng/brain": "0.0.1-alpha.510"
|
|
26
|
-
},
|
|
27
10
|
"engines": {
|
|
28
11
|
"node": ">=20"
|
|
29
12
|
},
|