@egose/shadcn-theme-ng 0.0.9 → 0.0.11
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 +55 -55
- package/accordion/fesm2022/accordion.mjs.map +1 -1
- package/accordion/index.d.ts +21 -21
- package/alert/fesm2022/alert.mjs +125 -49
- package/alert/fesm2022/alert.mjs.map +1 -1
- package/alert/index.d.ts +23 -20
- package/badge/fesm2022/badge.mjs +8 -8
- package/badge/fesm2022/badge.mjs.map +1 -1
- package/badge/index.d.ts +4 -4
- package/basic-alert/README.md +64 -0
- package/basic-alert/fesm2022/basic-alert.mjs +111 -0
- package/basic-alert/fesm2022/basic-alert.mjs.map +1 -0
- package/basic-alert/index.d.ts +14 -0
- package/button/fesm2022/button.mjs +25 -25
- package/button/fesm2022/button.mjs.map +1 -1
- package/button/index.d.ts +9 -9
- package/calendar/README.md +64 -0
- package/calendar/fesm2022/calendar.mjs +637 -0
- package/calendar/fesm2022/calendar.mjs.map +1 -0
- package/calendar/index.d.ts +111 -0
- package/confirmation-dialog/README.md +64 -0
- package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +93 -0
- package/confirmation-dialog/fesm2022/confirmation-dialog.mjs.map +1 -0
- package/confirmation-dialog/index.d.ts +24 -0
- package/date-picker/README.md +64 -0
- package/date-picker/fesm2022/date-picker.mjs +599 -0
- package/date-picker/fesm2022/date-picker.mjs.map +1 -0
- package/date-picker/index.d.ts +227 -0
- package/dialog/README.md +64 -0
- package/dialog/fesm2022/dialog.mjs +278 -0
- package/dialog/fesm2022/dialog.mjs.map +1 -0
- package/dialog/index.d.ts +89 -0
- package/exports.json +1 -1
- package/form-date-picker/README.md +64 -0
- package/form-date-picker/fesm2022/form-date-picker.mjs +146 -0
- package/form-date-picker/fesm2022/form-date-picker.mjs.map +1 -0
- package/form-date-picker/index.d.ts +32 -0
- package/form-field/fesm2022/form-field.mjs +36 -34
- package/form-field/fesm2022/form-field.mjs.map +1 -1
- package/form-field/index.d.ts +16 -16
- package/form-select/README.md +64 -0
- package/form-select/fesm2022/form-select.mjs +165 -0
- package/form-select/fesm2022/form-select.mjs.map +1 -0
- package/form-select/index.d.ts +33 -0
- package/form-text-input/README.md +64 -0
- package/form-text-input/fesm2022/form-text-input.mjs +197 -0
- package/form-text-input/fesm2022/form-text-input.mjs.map +1 -0
- package/form-text-input/index.d.ts +47 -0
- package/form-textarea/README.md +64 -0
- package/form-textarea/fesm2022/form-textarea.mjs +156 -0
- package/form-textarea/fesm2022/form-textarea.mjs.map +1 -0
- package/form-textarea/index.d.ts +33 -0
- 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 +20 -20
- package/input/fesm2022/input.mjs.map +1 -1
- package/input/index.d.ts +9 -9
- package/label/fesm2022/label.mjs +16 -16
- package/label/fesm2022/label.mjs.map +1 -1
- package/label/index.d.ts +9 -9
- package/package.json +41 -15
- package/popover/README.md +64 -0
- package/popover/fesm2022/popover.mjs +69 -0
- package/popover/fesm2022/popover.mjs.map +1 -0
- package/popover/index.d.ts +30 -0
- package/radio-group/fesm2022/radio-group.mjs +30 -30
- package/radio-group/fesm2022/radio-group.mjs.map +1 -1
- package/radio-group/index.d.ts +15 -15
- package/select/fesm2022/select.mjs +108 -108
- package/select/fesm2022/select.mjs.map +1 -1
- package/select/index.d.ts +35 -35
- package/sonner/fesm2022/sonner.mjs +16 -16
- package/sonner/fesm2022/sonner.mjs.map +1 -1
- package/sonner/index.d.ts +9 -9
- package/spinner/fesm2022/spinner.mjs +17 -17
- package/spinner/fesm2022/spinner.mjs.map +1 -1
- package/spinner/index.d.ts +9 -9
- package/switch/fesm2022/switch.mjs +27 -27
- package/switch/fesm2022/switch.mjs.map +1 -1
- package/switch/index.d.ts +12 -12
- package/tabs/fesm2022/tabs.mjs +53 -53
- 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/utils/fesm2022/utils.mjs +2 -2
- package/utils/fesm2022/utils.mjs.map +1 -1
- package/utils/index.d.ts +2 -2
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, computed, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/forms';
|
|
4
|
+
import { ReactiveFormsModule, FormGroupDirective, ControlContainer } from '@angular/forms';
|
|
5
|
+
import { HlmFormField, HlmError, HlmHint } from '@egose/shadcn-theme-ng/form-field';
|
|
6
|
+
import { HlmLabel } from '@egose/shadcn-theme-ng/label';
|
|
7
|
+
import { HlmInput } from '@egose/shadcn-theme-ng/input';
|
|
8
|
+
import { hlm } from '@egose/shadcn-theme-ng/utils';
|
|
9
|
+
|
|
10
|
+
let nextId = 0;
|
|
11
|
+
class EgFormTextarea {
|
|
12
|
+
// General props
|
|
13
|
+
label = input(undefined, ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
14
|
+
controlName = input('', ...(ngDevMode ? [{ debugName: "controlName" }] : []));
|
|
15
|
+
error = input(undefined, ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
16
|
+
hint = input(undefined, ...(ngDevMode ? [{ debugName: "hint" }] : []));
|
|
17
|
+
// HTML/textarea attributes
|
|
18
|
+
id = input(crypto.randomUUID(), ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
19
|
+
// id = input<string>(`eg-form-text-input-${nextId++}`);
|
|
20
|
+
name = input(undefined, ...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
21
|
+
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
22
|
+
readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : []));
|
|
23
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
24
|
+
maxlength = input(null, ...(ngDevMode ? [{ debugName: "maxlength" }] : []));
|
|
25
|
+
minlength = input(null, ...(ngDevMode ? [{ debugName: "minlength" }] : []));
|
|
26
|
+
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : []));
|
|
27
|
+
rows = input(3, ...(ngDevMode ? [{ debugName: "rows" }] : []));
|
|
28
|
+
cols = input(undefined, ...(ngDevMode ? [{ debugName: "cols" }] : []));
|
|
29
|
+
// Styling classes
|
|
30
|
+
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
31
|
+
labelClass = input('', ...(ngDevMode ? [{ debugName: "labelClass" }] : []));
|
|
32
|
+
textareaClass = input('', ...(ngDevMode ? [{ debugName: "textareaClass" }] : []));
|
|
33
|
+
errorClass = input('', ...(ngDevMode ? [{ debugName: "errorClass" }] : []));
|
|
34
|
+
hintClass = input('', ...(ngDevMode ? [{ debugName: "hintClass" }] : []));
|
|
35
|
+
// Computed class bindings
|
|
36
|
+
$userClass = computed(() => hlm('tw:flex tw:flex-col', this.userClass()), ...(ngDevMode ? [{ debugName: "$userClass" }] : []));
|
|
37
|
+
$labelClass = computed(() => hlm('tw:mb-1 tw:gap-0', this.labelClass()), ...(ngDevMode ? [{ debugName: "$labelClass" }] : []));
|
|
38
|
+
$textareaClass = computed(() => hlm('tw:mb-1', this.textareaClass()), ...(ngDevMode ? [{ debugName: "$textareaClass" }] : []));
|
|
39
|
+
$errorClass = computed(() => hlm('tw:mt-0', this.errorClass()), ...(ngDevMode ? [{ debugName: "$errorClass" }] : []));
|
|
40
|
+
$hintClass = computed(() => hlm('tw:mt-0', this.hintClass()), ...(ngDevMode ? [{ debugName: "$hintClass" }] : []));
|
|
41
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: EgFormTextarea, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
42
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: EgFormTextarea, isStandalone: true, selector: "eg-form-textarea", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, controlName: { classPropertyName: "controlName", publicName: "controlName", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null }, minlength: { classPropertyName: "minlength", publicName: "minlength", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, cols: { classPropertyName: "cols", publicName: "cols", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, labelClass: { classPropertyName: "labelClass", publicName: "labelClass", isSignal: true, isRequired: false, transformFunction: null }, textareaClass: { classPropertyName: "textareaClass", publicName: "textareaClass", isSignal: true, isRequired: false, transformFunction: null }, errorClass: { classPropertyName: "errorClass", publicName: "errorClass", isSignal: true, isRequired: false, transformFunction: null }, hintClass: { classPropertyName: "hintClass", publicName: "hintClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "tw:w-full" }, providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }], ngImport: i0, template: `
|
|
43
|
+
@let lbl = label();
|
|
44
|
+
@let nm = controlName();
|
|
45
|
+
@let err = error();
|
|
46
|
+
@let hnt = hint();
|
|
47
|
+
@let rqrd = required();
|
|
48
|
+
|
|
49
|
+
<hlm-form-field>
|
|
50
|
+
@if (lbl) {
|
|
51
|
+
<span hlmLabel [class]="$labelClass()">{{ lbl }}
|
|
52
|
+
@if (rqrd) {
|
|
53
|
+
<span class="tw:text-red-500">*</span>
|
|
54
|
+
}
|
|
55
|
+
</span>
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
<textarea
|
|
59
|
+
hlmInput
|
|
60
|
+
[attr.aria-label]="lbl"
|
|
61
|
+
[id]="id()"
|
|
62
|
+
[name]="nm || name()"
|
|
63
|
+
[formControlName]="nm"
|
|
64
|
+
[class]="$textareaClass()"
|
|
65
|
+
[placeholder]="placeholder()"
|
|
66
|
+
[readonly]="readonly()"
|
|
67
|
+
[maxlength]="maxlength()"
|
|
68
|
+
[minlength]="minlength()"
|
|
69
|
+
[required]="rqrd"
|
|
70
|
+
[rows]="rows()"
|
|
71
|
+
[cols]="cols()"
|
|
72
|
+
></textarea>
|
|
73
|
+
|
|
74
|
+
@if (err) {
|
|
75
|
+
<hlm-error [class]="$errorClass()">
|
|
76
|
+
{{ err }}
|
|
77
|
+
</hlm-error>
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@if (hnt) {
|
|
81
|
+
<hlm-hint [class]="$hintClass()">
|
|
82
|
+
{{ hnt }}
|
|
83
|
+
</hlm-hint>
|
|
84
|
+
}
|
|
85
|
+
</hlm-form-field>
|
|
86
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: HlmFormField, selector: "hlm-form-field", inputs: ["class"] }, { kind: "directive", type: HlmError, selector: "hlm-error", inputs: ["class"] }, { kind: "directive", type: HlmHint, selector: "hlm-hint", inputs: ["class"] }, { kind: "directive", type: HlmLabel, selector: "[hlmLabel]", inputs: ["class"] }, { kind: "directive", type: HlmInput, selector: "[hlmInput]", inputs: ["error", "class"] }] });
|
|
87
|
+
}
|
|
88
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: EgFormTextarea, decorators: [{
|
|
89
|
+
type: Component,
|
|
90
|
+
args: [{
|
|
91
|
+
selector: 'eg-form-textarea',
|
|
92
|
+
standalone: true,
|
|
93
|
+
host: {
|
|
94
|
+
class: 'tw:w-full',
|
|
95
|
+
},
|
|
96
|
+
imports: [ReactiveFormsModule, HlmFormField, HlmError, HlmHint, HlmLabel, HlmInput],
|
|
97
|
+
providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }],
|
|
98
|
+
// prettier-ignore
|
|
99
|
+
template: `
|
|
100
|
+
@let lbl = label();
|
|
101
|
+
@let nm = controlName();
|
|
102
|
+
@let err = error();
|
|
103
|
+
@let hnt = hint();
|
|
104
|
+
@let rqrd = required();
|
|
105
|
+
|
|
106
|
+
<hlm-form-field>
|
|
107
|
+
@if (lbl) {
|
|
108
|
+
<span hlmLabel [class]="$labelClass()">{{ lbl }}
|
|
109
|
+
@if (rqrd) {
|
|
110
|
+
<span class="tw:text-red-500">*</span>
|
|
111
|
+
}
|
|
112
|
+
</span>
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
<textarea
|
|
116
|
+
hlmInput
|
|
117
|
+
[attr.aria-label]="lbl"
|
|
118
|
+
[id]="id()"
|
|
119
|
+
[name]="nm || name()"
|
|
120
|
+
[formControlName]="nm"
|
|
121
|
+
[class]="$textareaClass()"
|
|
122
|
+
[placeholder]="placeholder()"
|
|
123
|
+
[readonly]="readonly()"
|
|
124
|
+
[maxlength]="maxlength()"
|
|
125
|
+
[minlength]="minlength()"
|
|
126
|
+
[required]="rqrd"
|
|
127
|
+
[rows]="rows()"
|
|
128
|
+
[cols]="cols()"
|
|
129
|
+
></textarea>
|
|
130
|
+
|
|
131
|
+
@if (err) {
|
|
132
|
+
<hlm-error [class]="$errorClass()">
|
|
133
|
+
{{ err }}
|
|
134
|
+
</hlm-error>
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@if (hnt) {
|
|
138
|
+
<hlm-hint [class]="$hintClass()">
|
|
139
|
+
{{ hnt }}
|
|
140
|
+
</hlm-hint>
|
|
141
|
+
}
|
|
142
|
+
</hlm-form-field>
|
|
143
|
+
`,
|
|
144
|
+
}]
|
|
145
|
+
}] });
|
|
146
|
+
|
|
147
|
+
/*
|
|
148
|
+
* Public API Surface of form-textarea
|
|
149
|
+
*/
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Generated bundle index. Do not edit.
|
|
153
|
+
*/
|
|
154
|
+
|
|
155
|
+
export { EgFormTextarea };
|
|
156
|
+
//# sourceMappingURL=form-textarea.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-textarea.mjs","sources":["../../../projects/form-textarea/src/lib/form-textarea.ts","../../../projects/form-textarea/src/public-api.ts","../../../projects/form-textarea/src/form-textarea.ts"],"sourcesContent":["import { Component, computed, input } from '@angular/core';\nimport { ControlContainer, FormGroupDirective, ReactiveFormsModule } from '@angular/forms';\nimport { HlmFormField, HlmError, HlmHint } from '@egose/shadcn-theme-ng/form-field';\nimport { HlmLabel } from '@egose/shadcn-theme-ng/label';\nimport { HlmInput } from '@egose/shadcn-theme-ng/input';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport { ClassValue } from 'clsx';\n\nlet nextId = 0;\n\n@Component({\n selector: 'eg-form-textarea',\n standalone: true,\n host: {\n class: 'tw:w-full',\n },\n imports: [ReactiveFormsModule, HlmFormField, HlmError, HlmHint, HlmLabel, HlmInput],\n providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }],\n // prettier-ignore\n template: `\n @let lbl = label();\n @let nm = controlName();\n @let err = error();\n @let hnt = hint();\n @let rqrd = required();\n\n <hlm-form-field>\n @if (lbl) {\n <span hlmLabel [class]=\"$labelClass()\">{{ lbl }}\n @if (rqrd) {\n <span class=\"tw:text-red-500\">*</span>\n }\n </span>\n }\n\n <textarea\n hlmInput\n [attr.aria-label]=\"lbl\"\n [id]=\"id()\"\n [name]=\"nm || name()\"\n [formControlName]=\"nm\"\n [class]=\"$textareaClass()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly()\"\n [maxlength]=\"maxlength()\"\n [minlength]=\"minlength()\"\n [required]=\"rqrd\"\n [rows]=\"rows()\"\n [cols]=\"cols()\"\n ></textarea>\n\n @if (err) {\n <hlm-error [class]=\"$errorClass()\">\n {{ err }}\n </hlm-error>\n }\n\n @if (hnt) {\n <hlm-hint [class]=\"$hintClass()\">\n {{ hnt }}\n </hlm-hint>\n }\n </hlm-form-field>\n `,\n})\nexport class EgFormTextarea {\n // General props\n label = input<string | undefined>(undefined);\n controlName = input<string>('');\n error = input<string | undefined>(undefined);\n hint = input<string | undefined>(undefined);\n\n // HTML/textarea attributes\n id = input<string>(crypto.randomUUID());\n // id = input<string>(`eg-form-text-input-${nextId++}`);\n\n name = input<string | undefined>(undefined);\n placeholder = input<string>('');\n readonly = input<boolean>(false);\n disabled = input<boolean>(false);\n maxlength = input<string | number | null>(null);\n minlength = input<string | number | null>(null);\n required = input<boolean>(false);\n rows = input<string | number | undefined>(3);\n cols = input<string | number | undefined>(undefined);\n\n // Styling classes\n userClass = input<ClassValue>('', { alias: 'class' });\n labelClass = input<string>('');\n textareaClass = input<string>('');\n errorClass = input<string>('');\n hintClass = input<string>('');\n\n // Computed class bindings\n $userClass = computed(() => hlm('tw:flex tw:flex-col', this.userClass()));\n $labelClass = computed(() => hlm('tw:mb-1 tw:gap-0', this.labelClass()));\n $textareaClass = computed(() => hlm('tw:mb-1', this.textareaClass()));\n $errorClass = computed(() => hlm('tw:mt-0', this.errorClass()));\n $hintClass = computed(() => hlm('tw:mt-0', this.hintClass()));\n}\n","/*\n * Public API Surface of form-textarea\n */\n\nexport * from './lib/form-textarea';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAQA,IAAI,MAAM,GAAG,CAAC;MAyDD,cAAc,CAAA;;AAEzB,IAAA,KAAK,GAAG,KAAK,CAAqB,SAAS,iDAAC;AAC5C,IAAA,WAAW,GAAG,KAAK,CAAS,EAAE,uDAAC;AAC/B,IAAA,KAAK,GAAG,KAAK,CAAqB,SAAS,iDAAC;AAC5C,IAAA,IAAI,GAAG,KAAK,CAAqB,SAAS,gDAAC;;IAG3C,EAAE,GAAG,KAAK,CAAS,MAAM,CAAC,UAAU,EAAE,8CAAC;;AAGvC,IAAA,IAAI,GAAG,KAAK,CAAqB,SAAS,gDAAC;AAC3C,IAAA,WAAW,GAAG,KAAK,CAAS,EAAE,uDAAC;AAC/B,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,oDAAC;AAChC,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,oDAAC;AAChC,IAAA,SAAS,GAAG,KAAK,CAAyB,IAAI,qDAAC;AAC/C,IAAA,SAAS,GAAG,KAAK,CAAyB,IAAI,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AAgB,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;;AAE3E,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CT,EAAA,CAAA;AACF,iBAAA;;;AChED;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ClassValue } from 'clsx';
|
|
3
|
+
|
|
4
|
+
declare class EgFormTextarea {
|
|
5
|
+
label: _angular_core.InputSignal<string | undefined>;
|
|
6
|
+
controlName: _angular_core.InputSignal<string>;
|
|
7
|
+
error: _angular_core.InputSignal<string | undefined>;
|
|
8
|
+
hint: _angular_core.InputSignal<string | undefined>;
|
|
9
|
+
id: _angular_core.InputSignal<string>;
|
|
10
|
+
name: _angular_core.InputSignal<string | undefined>;
|
|
11
|
+
placeholder: _angular_core.InputSignal<string>;
|
|
12
|
+
readonly: _angular_core.InputSignal<boolean>;
|
|
13
|
+
disabled: _angular_core.InputSignal<boolean>;
|
|
14
|
+
maxlength: _angular_core.InputSignal<string | number | null>;
|
|
15
|
+
minlength: _angular_core.InputSignal<string | number | null>;
|
|
16
|
+
required: _angular_core.InputSignal<boolean>;
|
|
17
|
+
rows: _angular_core.InputSignal<string | number | undefined>;
|
|
18
|
+
cols: _angular_core.InputSignal<string | number | undefined>;
|
|
19
|
+
userClass: _angular_core.InputSignal<ClassValue>;
|
|
20
|
+
labelClass: _angular_core.InputSignal<string>;
|
|
21
|
+
textareaClass: _angular_core.InputSignal<string>;
|
|
22
|
+
errorClass: _angular_core.InputSignal<string>;
|
|
23
|
+
hintClass: _angular_core.InputSignal<string>;
|
|
24
|
+
$userClass: _angular_core.Signal<string>;
|
|
25
|
+
$labelClass: _angular_core.Signal<string>;
|
|
26
|
+
$textareaClass: _angular_core.Signal<string>;
|
|
27
|
+
$errorClass: _angular_core.Signal<string>;
|
|
28
|
+
$hintClass: _angular_core.Signal<string>;
|
|
29
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EgFormTextarea, never>;
|
|
30
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EgFormTextarea, "eg-form-textarea", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "controlName": { "alias": "controlName"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "maxlength": { "alias": "maxlength"; "required": false; "isSignal": true; }; "minlength": { "alias": "minlength"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "cols": { "alias": "cols"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "labelClass": { "alias": "labelClass"; "required": false; "isSignal": true; }; "textareaClass": { "alias": "textareaClass"; "required": false; "isSignal": true; }; "errorClass": { "alias": "errorClass"; "required": false; "isSignal": true; }; "hintClass": { "alias": "hintClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { EgFormTextarea };
|
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,CAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC;AAEtC,IAAA,aAAa,GAAG,QAAQ,CAAC,MAAK;AAC/C,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE;QAExB,QAAQ,IAAI;AACV,YAAA,KAAK,IAAI;AACP,gBAAA,OAAO,MAAM;AACf,YAAA,KAAK,IAAI;AACP,gBAAA,OAAO,MAAM;AACf,YAAA,KAAK,MAAM;AACT,gBAAA,OAAO,MAAM;AACf,YAAA,KAAK,IAAI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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
|
@@ -3,25 +3,25 @@ import { input, linkedSignal, computed, inject, Injector, effect, untracked, for
|
|
|
3
3
|
import { NgControl, NgForm, FormGroupDirective } from '@angular/forms';
|
|
4
4
|
import { BrnFormFieldControl } from '@spartan-ng/brain/form-field';
|
|
5
5
|
import { ErrorStateMatcher, ErrorStateTracker } from '@spartan-ng/brain/forms';
|
|
6
|
-
import {
|
|
6
|
+
import { hlm } from '@egose/shadcn-theme-ng/utils';
|
|
7
7
|
import { cva } from 'class-variance-authority';
|
|
8
8
|
|
|
9
|
-
const inputVariants = cva('tw:file:text-foreground tw:placeholder:text-muted-foreground tw:selection:bg-primary tw:selection:text-primary-foreground tw:dark:bg-input/
|
|
9
|
+
const inputVariants = cva('tw:file:text-foreground tw:placeholder:text-muted-foreground tw:selection:bg-primary tw:selection:text-primary-foreground tw:dark:bg-input/10 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', {
|
|
10
10
|
variants: {
|
|
11
11
|
error: {
|
|
12
12
|
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',
|
|
13
|
-
true: 'tw:text-destructive/
|
|
13
|
+
true: 'tw:text-destructive/90 dark:text-destructive/60 tw:border-destructive tw:focus-visible:ring-destructive',
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
16
|
defaultVariants: {
|
|
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' }]));
|
|
24
|
-
_computedClass = computed(() =>
|
|
24
|
+
_computedClass = computed(() => hlm(inputVariants({ error: this._state().error }), this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
25
25
|
_injector = inject(Injector);
|
|
26
26
|
ngControl = this._injector.get(NgControl, null);
|
|
27
27
|
_errorStateTracker;
|
|
@@ -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 {
|
|
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 { hlm } 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/10 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/90 dark:text-destructive/60 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 hlm(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,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AC,GAAG,cAAc,CAAC;AAC7B,iBAAA;;;ACdD;;AAEG;;;;"}
|
package/input/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ declare const inputVariants: (props?: ({
|
|
|
10
10
|
error?: boolean | "auto" | null | undefined;
|
|
11
11
|
} & 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
|
@@ -2,18 +2,18 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { input, computed, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@spartan-ng/brain/label';
|
|
4
4
|
import { BrnLabel } from '@spartan-ng/brain/label';
|
|
5
|
-
import {
|
|
5
|
+
import { hlm } 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
|
-
_computedClass = computed(() =>
|
|
10
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
11
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.
|
|
9
|
+
_computedClass = computed(() => hlm('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.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
|