@egose/shadcn-theme-ng 0.0.13 → 0.0.14
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 +10 -10
- package/alert/fesm2022/alert.mjs +30 -30
- package/autocomplete/fesm2022/autocomplete.mjs +11 -11
- package/badge/fesm2022/badge.mjs +53 -53
- package/basic-alert/fesm2022/basic-alert.mjs +2 -2
- package/button/fesm2022/button.mjs +108 -108
- package/calendar/fesm2022/calendar.mjs +78 -78
- package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +10 -10
- package/date-picker/fesm2022/date-picker.mjs +11 -11
- package/dialog/fesm2022/dialog.mjs +9 -9
- package/form-date-picker/fesm2022/form-date-picker.mjs +9 -9
- package/form-field/fesm2022/form-field.mjs +3 -3
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +9 -9
- package/form-select/fesm2022/form-select.mjs +9 -9
- package/form-text-input/fesm2022/form-text-input.mjs +9 -9
- package/form-textarea/fesm2022/form-textarea.mjs +9 -9
- package/input/fesm2022/input.mjs +3 -3
- package/label/fesm2022/label.mjs +1 -1
- package/package.json +1 -1
- package/popover/fesm2022/popover.mjs +2 -2
- package/radio-group/fesm2022/radio-group.mjs +5 -5
- package/searchable-multiselect/fesm2022/searchable-multiselect.mjs +20 -20
- package/select/fesm2022/select.mjs +18 -18
- package/separator/fesm2022/separator.mjs +1 -1
- package/sonner/fesm2022/sonner.mjs +4 -4
- package/spinner/fesm2022/spinner.mjs +6 -6
- package/switch/fesm2022/switch.mjs +2 -2
- package/tabs/fesm2022/tabs.mjs +12 -12
- package/tooltip/fesm2022/tooltip.mjs +5 -5
|
@@ -9,7 +9,7 @@ import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
|
9
9
|
import { lucideX } from '@ng-icons/lucide';
|
|
10
10
|
import { HlmIcon } from '@egose/shadcn-theme-ng/icon';
|
|
11
11
|
|
|
12
|
-
const hlmDialogOverlayClass = '
|
|
12
|
+
const hlmDialogOverlayClass = 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 bg-black/50';
|
|
13
13
|
class HlmDialogOverlay {
|
|
14
14
|
_classSettable = injectCustomClassSettable({ optional: true, host: true });
|
|
15
15
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
@@ -71,7 +71,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
71
71
|
|
|
72
72
|
class HlmDialogClose {
|
|
73
73
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
74
|
-
_computedClass = computed(() => hlm('
|
|
74
|
+
_computedClass = computed(() => hlm('ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground rounded-xs absolute right-4 top-4 flex items-center justify-center opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none [&_ng-icon]:shrink-0', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
75
75
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmDialogClose, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
76
76
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmDialogClose, isStandalone: true, selector: "[hlmDialogClose],[brnDialogClose][hlm]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
|
|
77
77
|
}
|
|
@@ -92,7 +92,7 @@ class HlmDialogContent {
|
|
|
92
92
|
component = this._dialogContext?.$component;
|
|
93
93
|
_dynamicComponentClass = this._dialogContext?.$dynamicComponentClass;
|
|
94
94
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
95
|
-
_computedClass = computed(() => hlm('
|
|
95
|
+
_computedClass = computed(() => hlm('bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 relative z-50 mx-auto grid w-full max-w-[calc(100%-2rem)] gap-4 rounded-lg border p-6 shadow-lg data-[state=closed]:duration-200 data-[state=open]:duration-200 sm:mx-0 sm:max-w-lg', this.userClass(), this._dynamicComponentClass), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
96
96
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmDialogContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
97
97
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: HlmDialogContent, isStandalone: true, selector: "hlm-dialog-content", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()", "attr.data-state": "state()" } }, providers: [provideIcons({ lucideX })], ngImport: i0, template: `
|
|
98
98
|
@if (component) {
|
|
@@ -102,7 +102,7 @@ class HlmDialogContent {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
<button brnDialogClose hlm>
|
|
105
|
-
<span class="
|
|
105
|
+
<span class="sr-only">Close</span>
|
|
106
106
|
<ng-icon hlm size="sm" name="lucideX" />
|
|
107
107
|
</button>
|
|
108
108
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: BrnDialogClose, selector: "button[brnDialogClose]", inputs: ["delay"] }, { kind: "directive", type: HlmDialogClose, selector: "[hlmDialogClose],[brnDialogClose][hlm]", inputs: ["class"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: HlmIcon, selector: "ng-icon[hlm]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
@@ -125,7 +125,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
<button brnDialogClose hlm>
|
|
128
|
-
<span class="
|
|
128
|
+
<span class="sr-only">Close</span>
|
|
129
129
|
<ng-icon hlm size="sm" name="lucideX" />
|
|
130
130
|
</button>
|
|
131
131
|
`,
|
|
@@ -136,7 +136,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
136
136
|
|
|
137
137
|
class HlmDialogDescription {
|
|
138
138
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
139
|
-
_computedClass = computed(() => hlm('
|
|
139
|
+
_computedClass = computed(() => hlm('text-muted-foreground text-sm', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
140
140
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmDialogDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
141
141
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmDialogDescription, isStandalone: true, selector: "[hlmDialogDescription]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnDialogDescription }], ngImport: i0 });
|
|
142
142
|
}
|
|
@@ -153,7 +153,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
153
153
|
|
|
154
154
|
class HlmDialogFooter {
|
|
155
155
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
156
|
-
_computedClass = computed(() => hlm('
|
|
156
|
+
_computedClass = computed(() => hlm('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
157
157
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmDialogFooter, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
158
158
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmDialogFooter, isStandalone: true, selector: "hlm-dialog-footer", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
159
159
|
}
|
|
@@ -171,7 +171,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
171
171
|
|
|
172
172
|
class HlmDialogHeader {
|
|
173
173
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
174
|
-
_computedClass = computed(() => hlm('
|
|
174
|
+
_computedClass = computed(() => hlm('flex flex-col gap-2 text-center sm:text-left', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
175
175
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmDialogHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
176
176
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmDialogHeader, isStandalone: true, selector: "hlm-dialog-header", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
177
177
|
}
|
|
@@ -189,7 +189,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
189
189
|
|
|
190
190
|
class HlmDialogTitle {
|
|
191
191
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
192
|
-
_computedClass = computed(() => hlm('
|
|
192
|
+
_computedClass = computed(() => hlm('text-lg font-semibold leading-none', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
193
193
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmDialogTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
194
194
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmDialogTitle, isStandalone: true, selector: "[hlmDialogTitle]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnDialogTitle }], ngImport: i0 });
|
|
195
195
|
}
|
|
@@ -31,13 +31,13 @@ class EgFormDatePicker {
|
|
|
31
31
|
errorClass = input('', ...(ngDevMode ? [{ debugName: "errorClass" }] : []));
|
|
32
32
|
hintClass = input('', ...(ngDevMode ? [{ debugName: "hintClass" }] : []));
|
|
33
33
|
// Computed classes
|
|
34
|
-
$userClass = computed(() => hlm('
|
|
35
|
-
$labelClass = computed(() => hlm('
|
|
36
|
-
$pickerClass = computed(() => hlm('
|
|
37
|
-
$errorClass = computed(() => hlm('
|
|
38
|
-
$hintClass = computed(() => hlm('
|
|
34
|
+
$userClass = computed(() => hlm('flex flex-col', this.userClass()), ...(ngDevMode ? [{ debugName: "$userClass" }] : []));
|
|
35
|
+
$labelClass = computed(() => hlm('mb-1', this.labelClass()), ...(ngDevMode ? [{ debugName: "$labelClass" }] : []));
|
|
36
|
+
$pickerClass = computed(() => hlm('mb-1', this.pickerClass()), ...(ngDevMode ? [{ debugName: "$pickerClass" }] : []));
|
|
37
|
+
$errorClass = computed(() => hlm('mt-0', this.errorClass()), ...(ngDevMode ? [{ debugName: "$errorClass" }] : []));
|
|
38
|
+
$hintClass = computed(() => hlm('mt-0', this.hintClass()), ...(ngDevMode ? [{ debugName: "$hintClass" }] : []));
|
|
39
39
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: EgFormDatePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
40
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: EgFormDatePicker, isStandalone: true, selector: "eg-form-date-picker", 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 }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, autoCloseOnSelect: { classPropertyName: "autoCloseOnSelect", publicName: "autoCloseOnSelect", 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 }, pickerClass: { classPropertyName: "pickerClass", publicName: "pickerClass", 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: "
|
|
40
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: EgFormDatePicker, isStandalone: true, selector: "eg-form-date-picker", 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 }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, autoCloseOnSelect: { classPropertyName: "autoCloseOnSelect", publicName: "autoCloseOnSelect", 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 }, pickerClass: { classPropertyName: "pickerClass", publicName: "pickerClass", 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: "w-full" }, providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }], ngImport: i0, template: `
|
|
41
41
|
@let lbl = label();
|
|
42
42
|
@let nm = controlName();
|
|
43
43
|
@let err = error();
|
|
@@ -48,7 +48,7 @@ class EgFormDatePicker {
|
|
|
48
48
|
@if (lbl) {
|
|
49
49
|
<span hlmLabel [class]="$labelClass()">{{ lbl }}
|
|
50
50
|
@if (rqrd) {
|
|
51
|
-
<span class="
|
|
51
|
+
<span class="text-red-500">*</span>
|
|
52
52
|
}
|
|
53
53
|
</span>
|
|
54
54
|
}
|
|
@@ -85,7 +85,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
85
85
|
selector: 'eg-form-date-picker',
|
|
86
86
|
standalone: true,
|
|
87
87
|
host: {
|
|
88
|
-
class: '
|
|
88
|
+
class: 'w-full',
|
|
89
89
|
},
|
|
90
90
|
imports: [ReactiveFormsModule, HlmFormField, HlmError, HlmHint, HlmLabel, HlmDatePicker],
|
|
91
91
|
providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }],
|
|
@@ -101,7 +101,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
101
101
|
@if (lbl) {
|
|
102
102
|
<span hlmLabel [class]="$labelClass()">{{ lbl }}
|
|
103
103
|
@if (rqrd) {
|
|
104
|
-
<span class="
|
|
104
|
+
<span class="text-red-500">*</span>
|
|
105
105
|
}
|
|
106
106
|
</span>
|
|
107
107
|
}
|
|
@@ -6,7 +6,7 @@ import { BrnFormFieldControl } from '@spartan-ng/brain/form-field';
|
|
|
6
6
|
|
|
7
7
|
class HlmError {
|
|
8
8
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
9
|
-
_computedClass = computed(() => hlm('
|
|
9
|
+
_computedClass = computed(() => hlm('text-destructive block text-sm font-medium', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
10
10
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmError, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
11
11
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmError, isStandalone: true, selector: "hlm-error", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
|
|
12
12
|
}
|
|
@@ -22,7 +22,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
22
22
|
|
|
23
23
|
class HlmFormField {
|
|
24
24
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
25
|
-
_computedClass = computed(() => hlm('
|
|
25
|
+
_computedClass = computed(() => hlm('block space-y-2', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
26
26
|
control = contentChild(BrnFormFieldControl, ...(ngDevMode ? [{ debugName: "control" }] : []));
|
|
27
27
|
errorChildren = contentChildren(HlmError, ...(ngDevMode ? [{ debugName: "errorChildren" }] : []));
|
|
28
28
|
_hasDisplayedMessage = computed(() => this.errorChildren() && this.errorChildren().length > 0 && this.control()?.errorState() ? 'error' : 'hint', ...(ngDevMode ? [{ debugName: "_hasDisplayedMessage" }] : []));
|
|
@@ -73,7 +73,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
73
73
|
|
|
74
74
|
class HlmHint {
|
|
75
75
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
76
|
-
_computedClass = computed(() => hlm('
|
|
76
|
+
_computedClass = computed(() => hlm('text-muted-foreground block text-sm', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
77
77
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmHint, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
78
78
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmHint, isStandalone: true, selector: "hlm-hint", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
|
|
79
79
|
}
|
|
@@ -26,13 +26,13 @@ class EgFormSearchableMultiselect {
|
|
|
26
26
|
errorClass = input('', ...(ngDevMode ? [{ debugName: "errorClass" }] : []));
|
|
27
27
|
hintClass = input('', ...(ngDevMode ? [{ debugName: "hintClass" }] : []));
|
|
28
28
|
// Computed class names
|
|
29
|
-
$userClass = computed(() => hlm('
|
|
30
|
-
$labelClass = computed(() => hlm('
|
|
31
|
-
$controlClass = computed(() => hlm('
|
|
32
|
-
$errorClass = computed(() => hlm('
|
|
33
|
-
$hintClass = computed(() => hlm('
|
|
29
|
+
$userClass = computed(() => hlm('flex flex-col', this.userClass()), ...(ngDevMode ? [{ debugName: "$userClass" }] : []));
|
|
30
|
+
$labelClass = computed(() => hlm('mb-1 gap-0', this.labelClass()), ...(ngDevMode ? [{ debugName: "$labelClass" }] : []));
|
|
31
|
+
$controlClass = computed(() => hlm('w-full', this.controlClass()), ...(ngDevMode ? [{ debugName: "$controlClass" }] : []));
|
|
32
|
+
$errorClass = computed(() => hlm('mt-0', this.errorClass()), ...(ngDevMode ? [{ debugName: "$errorClass" }] : []));
|
|
33
|
+
$hintClass = computed(() => hlm('mt-0', this.hintClass()), ...(ngDevMode ? [{ debugName: "$hintClass" }] : []));
|
|
34
34
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: EgFormSearchableMultiselect, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
35
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: EgFormSearchableMultiselect, isStandalone: true, selector: "eg-form-searchable-multiselect", 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 }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", 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 }, controlClass: { classPropertyName: "controlClass", publicName: "controlClass", 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: "
|
|
35
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: EgFormSearchableMultiselect, isStandalone: true, selector: "eg-form-searchable-multiselect", 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 }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", 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 }, controlClass: { classPropertyName: "controlClass", publicName: "controlClass", 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: "w-full" }, providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }], ngImport: i0, template: `
|
|
36
36
|
@let lbl = label(); @let nm = controlName(); @let err = error(); @let hnt = hint(); @let rqrd = required();
|
|
37
37
|
|
|
38
38
|
<hlm-form-field>
|
|
@@ -40,7 +40,7 @@ class EgFormSearchableMultiselect {
|
|
|
40
40
|
<span hlmLabel [class]="$labelClass()">
|
|
41
41
|
{{ lbl }}
|
|
42
42
|
@if (rqrd) {
|
|
43
|
-
<span class="
|
|
43
|
+
<span class="text-red-500">*</span>
|
|
44
44
|
}
|
|
45
45
|
</span>
|
|
46
46
|
}
|
|
@@ -72,7 +72,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
72
72
|
selector: 'eg-form-searchable-multiselect',
|
|
73
73
|
standalone: true,
|
|
74
74
|
host: {
|
|
75
|
-
class: '
|
|
75
|
+
class: 'w-full',
|
|
76
76
|
},
|
|
77
77
|
imports: [ReactiveFormsModule, HlmFormField, HlmError, HlmHint, HlmLabel, EgSearchableMultiselect],
|
|
78
78
|
providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }],
|
|
@@ -84,7 +84,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
84
84
|
<span hlmLabel [class]="$labelClass()">
|
|
85
85
|
{{ lbl }}
|
|
86
86
|
@if (rqrd) {
|
|
87
|
-
<span class="
|
|
87
|
+
<span class="text-red-500">*</span>
|
|
88
88
|
}
|
|
89
89
|
</span>
|
|
90
90
|
}
|
|
@@ -30,13 +30,13 @@ class EgFormSelect {
|
|
|
30
30
|
errorClass = input('', ...(ngDevMode ? [{ debugName: "errorClass" }] : []));
|
|
31
31
|
hintClass = input('', ...(ngDevMode ? [{ debugName: "hintClass" }] : []));
|
|
32
32
|
// Computed classes
|
|
33
|
-
$userClass = computed(() => hlm('
|
|
34
|
-
$labelClass = computed(() => hlm('
|
|
35
|
-
$selectClass = computed(() => hlm('
|
|
36
|
-
$errorClass = computed(() => hlm('
|
|
37
|
-
$hintClass = computed(() => hlm('
|
|
33
|
+
$userClass = computed(() => hlm('flex flex-col', this.userClass()), ...(ngDevMode ? [{ debugName: "$userClass" }] : []));
|
|
34
|
+
$labelClass = computed(() => hlm('mb-1 gap-0', this.labelClass()), ...(ngDevMode ? [{ debugName: "$labelClass" }] : []));
|
|
35
|
+
$selectClass = computed(() => hlm('w-full', this.selectClass()), ...(ngDevMode ? [{ debugName: "$selectClass" }] : []));
|
|
36
|
+
$errorClass = computed(() => hlm('mt-0', this.errorClass()), ...(ngDevMode ? [{ debugName: "$errorClass" }] : []));
|
|
37
|
+
$hintClass = computed(() => hlm('mt-0', this.hintClass()), ...(ngDevMode ? [{ debugName: "$hintClass" }] : []));
|
|
38
38
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: EgFormSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
39
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: EgFormSelect, isStandalone: true, selector: "eg-form-select", 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 }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionsLabel: { classPropertyName: "optionsLabel", publicName: "optionsLabel", 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 }, selectClass: { classPropertyName: "selectClass", publicName: "selectClass", 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: "
|
|
39
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: EgFormSelect, isStandalone: true, selector: "eg-form-select", 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 }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionsLabel: { classPropertyName: "optionsLabel", publicName: "optionsLabel", 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 }, selectClass: { classPropertyName: "selectClass", publicName: "selectClass", 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: "w-full" }, providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }], ngImport: i0, template: `
|
|
40
40
|
@let lbl = label();
|
|
41
41
|
@let nm = controlName();
|
|
42
42
|
@let err = error();
|
|
@@ -47,7 +47,7 @@ class EgFormSelect {
|
|
|
47
47
|
@if (lbl) {
|
|
48
48
|
<span hlmLabel [class]="$labelClass()">{{ lbl }}
|
|
49
49
|
@if (rqrd) {
|
|
50
|
-
<span class="
|
|
50
|
+
<span class="text-red-500">*</span>
|
|
51
51
|
}
|
|
52
52
|
</span>
|
|
53
53
|
}
|
|
@@ -94,7 +94,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
94
94
|
selector: 'eg-form-select',
|
|
95
95
|
standalone: true,
|
|
96
96
|
host: {
|
|
97
|
-
class: '
|
|
97
|
+
class: 'w-full',
|
|
98
98
|
},
|
|
99
99
|
imports: [ReactiveFormsModule, HlmFormField, HlmError, HlmHint, HlmLabel, BrnSelectImports, HlmSelectImports],
|
|
100
100
|
providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }],
|
|
@@ -110,7 +110,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
110
110
|
@if (lbl) {
|
|
111
111
|
<span hlmLabel [class]="$labelClass()">{{ lbl }}
|
|
112
112
|
@if (rqrd) {
|
|
113
|
-
<span class="
|
|
113
|
+
<span class="text-red-500">*</span>
|
|
114
114
|
}
|
|
115
115
|
</span>
|
|
116
116
|
}
|
|
@@ -66,13 +66,13 @@ class EgFormTextInput {
|
|
|
66
66
|
errorClass = input('', ...(ngDevMode ? [{ debugName: "errorClass" }] : []));
|
|
67
67
|
hintClass = input('', ...(ngDevMode ? [{ debugName: "hintClass" }] : []));
|
|
68
68
|
// Computed class bindings
|
|
69
|
-
$userClass = computed(() => hlm('
|
|
70
|
-
$labelClass = computed(() => hlm('
|
|
71
|
-
$inputClass = computed(() => hlm('
|
|
72
|
-
$errorClass = computed(() => hlm('
|
|
73
|
-
$hintClass = computed(() => hlm('
|
|
69
|
+
$userClass = computed(() => hlm('flex flex-col', this.userClass()), ...(ngDevMode ? [{ debugName: "$userClass" }] : []));
|
|
70
|
+
$labelClass = computed(() => hlm('mb-1 gap-0', this.labelClass()), ...(ngDevMode ? [{ debugName: "$labelClass" }] : []));
|
|
71
|
+
$inputClass = computed(() => hlm('mb-1', this.inputClass()), ...(ngDevMode ? [{ debugName: "$inputClass" }] : []));
|
|
72
|
+
$errorClass = computed(() => hlm('mt-0', this.errorClass()), ...(ngDevMode ? [{ debugName: "$errorClass" }] : []));
|
|
73
|
+
$hintClass = computed(() => hlm('mt-0', this.hintClass()), ...(ngDevMode ? [{ debugName: "$hintClass" }] : []));
|
|
74
74
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: EgFormTextInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
75
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: EgFormTextInput, isStandalone: true, selector: "eg-form-text-input", 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 }, type: { classPropertyName: "type", publicName: "type", 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 }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, pattern: { classPropertyName: "pattern", publicName: "pattern", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", 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 }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", 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: "
|
|
75
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: EgFormTextInput, isStandalone: true, selector: "eg-form-text-input", 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 }, type: { classPropertyName: "type", publicName: "type", 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 }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, pattern: { classPropertyName: "pattern", publicName: "pattern", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", 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 }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", 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: "w-full" }, providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }], ngImport: i0, template: `
|
|
76
76
|
@let lbl = label();
|
|
77
77
|
@let nm = controlName();
|
|
78
78
|
@let err = error();
|
|
@@ -83,7 +83,7 @@ class EgFormTextInput {
|
|
|
83
83
|
@if (lbl) {
|
|
84
84
|
<span hlmLabel [class]="$labelClass()">{{ lbl }}
|
|
85
85
|
@if (rqrd) {
|
|
86
|
-
<span class="
|
|
86
|
+
<span class="text-red-500">*</span>
|
|
87
87
|
}
|
|
88
88
|
</span>
|
|
89
89
|
}
|
|
@@ -128,7 +128,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
128
128
|
selector: 'eg-form-text-input',
|
|
129
129
|
standalone: true,
|
|
130
130
|
host: {
|
|
131
|
-
class: '
|
|
131
|
+
class: 'w-full',
|
|
132
132
|
},
|
|
133
133
|
imports: [ReactiveFormsModule, HlmFormField, HlmError, HlmHint, HlmLabel, HlmInput],
|
|
134
134
|
providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }],
|
|
@@ -144,7 +144,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
144
144
|
@if (lbl) {
|
|
145
145
|
<span hlmLabel [class]="$labelClass()">{{ lbl }}
|
|
146
146
|
@if (rqrd) {
|
|
147
|
-
<span class="
|
|
147
|
+
<span class="text-red-500">*</span>
|
|
148
148
|
}
|
|
149
149
|
</span>
|
|
150
150
|
}
|
|
@@ -33,13 +33,13 @@ class EgFormTextarea {
|
|
|
33
33
|
errorClass = input('', ...(ngDevMode ? [{ debugName: "errorClass" }] : []));
|
|
34
34
|
hintClass = input('', ...(ngDevMode ? [{ debugName: "hintClass" }] : []));
|
|
35
35
|
// Computed class bindings
|
|
36
|
-
$userClass = computed(() => hlm('
|
|
37
|
-
$labelClass = computed(() => hlm('
|
|
38
|
-
$textareaClass = computed(() => hlm('
|
|
39
|
-
$errorClass = computed(() => hlm('
|
|
40
|
-
$hintClass = computed(() => hlm('
|
|
36
|
+
$userClass = computed(() => hlm('flex flex-col', this.userClass()), ...(ngDevMode ? [{ debugName: "$userClass" }] : []));
|
|
37
|
+
$labelClass = computed(() => hlm('mb-1 gap-0', this.labelClass()), ...(ngDevMode ? [{ debugName: "$labelClass" }] : []));
|
|
38
|
+
$textareaClass = computed(() => hlm('mb-1', this.textareaClass()), ...(ngDevMode ? [{ debugName: "$textareaClass" }] : []));
|
|
39
|
+
$errorClass = computed(() => hlm('mt-0', this.errorClass()), ...(ngDevMode ? [{ debugName: "$errorClass" }] : []));
|
|
40
|
+
$hintClass = computed(() => hlm('mt-0', this.hintClass()), ...(ngDevMode ? [{ debugName: "$hintClass" }] : []));
|
|
41
41
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: EgFormTextarea, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
42
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", 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: "
|
|
42
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", 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: "w-full" }, providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }], ngImport: i0, template: `
|
|
43
43
|
@let lbl = label();
|
|
44
44
|
@let nm = controlName();
|
|
45
45
|
@let err = error();
|
|
@@ -50,7 +50,7 @@ class EgFormTextarea {
|
|
|
50
50
|
@if (lbl) {
|
|
51
51
|
<span hlmLabel [class]="$labelClass()">{{ lbl }}
|
|
52
52
|
@if (rqrd) {
|
|
53
|
-
<span class="
|
|
53
|
+
<span class="text-red-500">*</span>
|
|
54
54
|
}
|
|
55
55
|
</span>
|
|
56
56
|
}
|
|
@@ -91,7 +91,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
91
91
|
selector: 'eg-form-textarea',
|
|
92
92
|
standalone: true,
|
|
93
93
|
host: {
|
|
94
|
-
class: '
|
|
94
|
+
class: 'w-full',
|
|
95
95
|
},
|
|
96
96
|
imports: [ReactiveFormsModule, HlmFormField, HlmError, HlmHint, HlmLabel, HlmInput],
|
|
97
97
|
providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }],
|
|
@@ -107,7 +107,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
107
107
|
@if (lbl) {
|
|
108
108
|
<span hlmLabel [class]="$labelClass()">{{ lbl }}
|
|
109
109
|
@if (rqrd) {
|
|
110
|
-
<span class="
|
|
110
|
+
<span class="text-red-500">*</span>
|
|
111
111
|
}
|
|
112
112
|
</span>
|
|
113
113
|
}
|
package/input/fesm2022/input.mjs
CHANGED
|
@@ -6,11 +6,11 @@ import { ErrorStateMatcher, ErrorStateTracker } from '@spartan-ng/brain/forms';
|
|
|
6
6
|
import { hlm } from '@egose/shadcn-theme-ng/utils';
|
|
7
7
|
import { cva } from 'class-variance-authority';
|
|
8
8
|
|
|
9
|
-
const inputVariants = cva('
|
|
9
|
+
const inputVariants = cva('file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/10 border-input shadow-xs focus-visible:border-ring focus-visible:ring-ring/50 flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base outline-none transition-[color,box-shadow] file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', {
|
|
10
10
|
variants: {
|
|
11
11
|
error: {
|
|
12
|
-
auto: '
|
|
13
|
-
true: '
|
|
12
|
+
auto: '[&.ng-invalid.ng-touched]:text-destructive/20 dark:[&.ng-invalid.ng-touched]:text-destructive/40 [&.ng-invalid.ng-touched]:border-destructive [&.ng-invalid.ng-touched]:focus-visible:ring-destructive',
|
|
13
|
+
true: 'text-destructive/90 dark:text-destructive/60 border-destructive focus-visible:ring-destructive',
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
16
|
defaultVariants: {
|
package/label/fesm2022/label.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { hlm } from '@egose/shadcn-theme-ng/utils';
|
|
|
6
6
|
|
|
7
7
|
class HlmLabel {
|
|
8
8
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
9
|
-
_computedClass = computed(() => hlm('
|
|
9
|
+
_computedClass = computed(() => hlm('flex select-none items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 has-[[disabled]]:cursor-not-allowed has-[[disabled]]:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-data-[disabled]:cursor-not-allowed peer-data-[disabled]:opacity-50', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
10
10
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
11
11
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", 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
|
}
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ import { injectExposesStateProvider } from '@spartan-ng/brain/core';
|
|
|
5
5
|
|
|
6
6
|
class HlmPopoverClose {
|
|
7
7
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
8
|
-
_computedClass = computed(() => hlm('
|
|
8
|
+
_computedClass = computed(() => hlm('ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
9
9
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmPopoverClose, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
10
10
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmPopoverClose, isStandalone: true, selector: "[hlmPopoverClose],[brnPopoverClose][hlm]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
|
|
11
11
|
}
|
|
@@ -30,7 +30,7 @@ class HlmPopoverContent {
|
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
33
|
-
_computedClass = computed(() => hlm('
|
|
33
|
+
_computedClass = computed(() => hlm('border-border bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative w-72 rounded-md border p-4 shadow-md outline-none', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
34
34
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmPopoverContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
35
35
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmPopoverContent, isStandalone: true, selector: "[hlmPopoverContent],[brnPopoverContent][hlm]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
|
|
36
36
|
}
|
|
@@ -11,7 +11,7 @@ class HlmRadio {
|
|
|
11
11
|
_elementRef = inject(ElementRef);
|
|
12
12
|
_isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
13
13
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
14
|
-
_computedClass = computed(() => hlm('
|
|
14
|
+
_computedClass = computed(() => hlm('group flex items-center gap-x-3', this.userClass(), this._state().disabled() ? 'cursor-not-allowed opacity-50' : ''), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
15
15
|
/** Used to set the id on the underlying brn element. */
|
|
16
16
|
id = input(undefined, ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
17
17
|
/** Used to set the aria-label attribute on the underlying brn element. */
|
|
@@ -104,7 +104,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
104
104
|
|
|
105
105
|
class HlmRadioGroup {
|
|
106
106
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
107
|
-
_computedClass = computed(() => hlm('
|
|
107
|
+
_computedClass = computed(() => hlm('grid gap-3', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
108
108
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmRadioGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
109
109
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmRadioGroup, isStandalone: true, selector: "hlm-radio-group", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnRadioGroup, inputs: ["name", "name", "value", "value", "disabled", "disabled", "required", "required", "direction", "direction"], outputs: ["valueChange", "valueChange"] }], ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
110
110
|
}
|
|
@@ -129,9 +129,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
129
129
|
|
|
130
130
|
class HlmRadioIndicator {
|
|
131
131
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
132
|
-
_computedClass = computed(() => hlm('
|
|
132
|
+
_computedClass = computed(() => hlm('border-input text-primary group-has-[:focus-visible]:border-ring group-has-[:focus-visible]:ring-ring/50 dark:bg-input/10 shadow-xs group-data=[disabled=true]:cursor-not-allowed group-data=[disabled=true]:opacity-50 relative flex aspect-square size-4 shrink-0 items-center justify-center rounded-full border outline-none transition-[color,box-shadow] group-has-[:focus-visible]:ring-[3px]', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
133
133
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmRadioIndicator, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
134
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmRadioIndicator, isStandalone: true, selector: "hlm-radio-indicator", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0, template: ` <div class="
|
|
134
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmRadioIndicator, isStandalone: true, selector: "hlm-radio-indicator", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0, template: ` <div class="group-data-[checked=true]:bg-primary size-2 rounded-full bg-transparent"></div> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
135
135
|
}
|
|
136
136
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmRadioIndicator, decorators: [{
|
|
137
137
|
type: Component,
|
|
@@ -140,7 +140,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
140
140
|
host: {
|
|
141
141
|
'[class]': '_computedClass()',
|
|
142
142
|
},
|
|
143
|
-
template: ` <div class="
|
|
143
|
+
template: ` <div class="group-data-[checked=true]:bg-primary size-2 rounded-full bg-transparent"></div> `,
|
|
144
144
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
145
145
|
}]
|
|
146
146
|
}] });
|