@egose/shadcn-theme-ng 0.0.13 → 0.0.15
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/checkbox/README.md +64 -0
- package/checkbox/fesm2022/checkbox.mjs +146 -0
- package/checkbox/fesm2022/checkbox.mjs.map +1 -0
- package/checkbox/index.d.ts +55 -0
- 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/exports.json +1 -1
- package/form-checkbox/README.md +64 -0
- package/form-checkbox/fesm2022/form-checkbox.mjs +134 -0
- package/form-checkbox/fesm2022/form-checkbox.mjs.map +1 -0
- package/form-checkbox/index.d.ts +26 -0
- package/form-date-picker/fesm2022/form-date-picker.mjs +9 -9
- package/form-field/fesm2022/form-field.mjs +3 -3
- package/form-field-simple/README.md +64 -0
- package/form-field-simple/fesm2022/form-field-simple.mjs +82 -0
- package/form-field-simple/fesm2022/form-field-simple.mjs.map +1 -0
- package/form-field-simple/index.d.ts +22 -0
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +27 -20
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs.map +1 -1
- 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 +13 -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
|
@@ -10,7 +10,7 @@ import { provideHlmIconConfig } from '@egose/shadcn-theme-ng/icon';
|
|
|
10
10
|
class HlmAccordion {
|
|
11
11
|
_brn = inject(BrnAccordion);
|
|
12
12
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
13
|
-
_computedClass = computed(() => hlm('
|
|
13
|
+
_computedClass = computed(() => hlm('flex', this._brn.orientation() === 'horizontal' ? 'flex-row' : 'flex-col', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
14
14
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmAccordion, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
15
15
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmAccordion, isStandalone: true, selector: "[hlmAccordion], hlm-accordion", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnAccordion, inputs: ["type", "type", "dir", "dir", "orientation", "orientation"] }], ngImport: i0 });
|
|
16
16
|
}
|
|
@@ -28,13 +28,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
28
28
|
class HlmAccordionContent extends BrnAccordionContent {
|
|
29
29
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
30
30
|
_computedClass = computed(() => {
|
|
31
|
-
const gridRows = this.state() === 'open' ? '
|
|
32
|
-
return hlm('
|
|
31
|
+
const gridRows = this.state() === 'open' ? 'grid-rows-[1fr]' : 'hidden';
|
|
32
|
+
return hlm('grid text-sm transition-all', gridRows, this.userClass());
|
|
33
33
|
}, ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
34
34
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmAccordionContent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
35
35
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmAccordionContent, isStandalone: true, selector: "hlm-accordion-content", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, usesInheritance: true, ngImport: i0, template: `
|
|
36
|
-
<div [attr.inert]="_addInert()" style="
|
|
37
|
-
<div class="
|
|
36
|
+
<div [attr.inert]="_addInert()" style="overflow:hidden">
|
|
37
|
+
<div class="flex flex-col gap-4 text-balance pb-4 pt-0">
|
|
38
38
|
<ng-content />
|
|
39
39
|
</div>
|
|
40
40
|
</div>
|
|
@@ -45,8 +45,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
45
45
|
args: [{
|
|
46
46
|
selector: 'hlm-accordion-content',
|
|
47
47
|
template: `
|
|
48
|
-
<div [attr.inert]="_addInert()" style="
|
|
49
|
-
<div class="
|
|
48
|
+
<div [attr.inert]="_addInert()" style="overflow:hidden">
|
|
49
|
+
<div class="flex flex-col gap-4 text-balance pb-4 pt-0">
|
|
50
50
|
<ng-content />
|
|
51
51
|
</div>
|
|
52
52
|
</div>
|
|
@@ -61,7 +61,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
61
61
|
|
|
62
62
|
class HlmAccordionIcon {
|
|
63
63
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
64
|
-
_computedClass = computed(() => hlm('
|
|
64
|
+
_computedClass = computed(() => hlm('text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
65
65
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmAccordionIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
66
66
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmAccordionIcon, isStandalone: true, selector: "ng-icon[egAccordionIcon], ng-icon[hlmAccIcon]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, providers: [provideIcons({ lucideChevronDown }), provideHlmIconConfig({ size: 'sm' })], ngImport: i0 });
|
|
67
67
|
}
|
|
@@ -78,7 +78,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
78
78
|
|
|
79
79
|
class HlmAccordionItem {
|
|
80
80
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
81
|
-
_computedClass = computed(() => hlm('
|
|
81
|
+
_computedClass = computed(() => hlm('border-border flex flex-1 flex-col border-b', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
82
82
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmAccordionItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
83
83
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmAccordionItem, isStandalone: true, selector: "[hlmAccordionItem],brn-accordion-item[hlm],hlm-accordion-item", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnAccordionItem, inputs: ["isOpened", "isOpened"] }], ngImport: i0 });
|
|
84
84
|
}
|
|
@@ -100,7 +100,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
100
100
|
|
|
101
101
|
class HlmAccordionTrigger {
|
|
102
102
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
103
|
-
_computedClass = computed(() => hlm('
|
|
103
|
+
_computedClass = computed(() => hlm('focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium outline-none transition-all hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>[egAccIcon]]:rotate-180', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
104
104
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmAccordionTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
105
105
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmAccordionTrigger, isStandalone: true, selector: "[hlmAccordionTrigger]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--tw-ring-offset-shadow": "\"0 0 #000\"", "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnAccordionTrigger }], ngImport: i0 });
|
|
106
106
|
}
|
package/alert/fesm2022/alert.mjs
CHANGED
|
@@ -4,93 +4,93 @@ import { hlm } from '@egose/shadcn-theme-ng/utils';
|
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
5
|
import { provideHlmIconConfig } from '@egose/shadcn-theme-ng/icon';
|
|
6
6
|
|
|
7
|
-
const alertVariants = cva('
|
|
7
|
+
const alertVariants = cva('relative w-full items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>[hlmAlertIcon]]:grid has-[>[hlmAlertIcon]]:grid-cols-[calc(theme(spacing.1)*4)_1fr] has-[>[hlmAlertIcon]]:gap-x-3 [&>[hlmAlertIcon]]:size-4 [&>[hlmAlertIcon]]:translate-y-0.5 [&>[hlmAlertIcon]]:text-current', {
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
|
-
primary: '
|
|
11
|
-
secondary: '
|
|
12
|
-
success: '
|
|
13
|
-
warning: '
|
|
14
|
-
danger: '
|
|
15
|
-
info: '
|
|
16
|
-
light: '
|
|
17
|
-
dark: '
|
|
18
|
-
accent: '
|
|
19
|
-
destructive: '
|
|
20
|
-
muted: '
|
|
21
|
-
link: '
|
|
22
|
-
ghost: '
|
|
10
|
+
primary: 'bg-primary text-primary-foreground [&>[hlmAlertDescription]]:text-primary-foreground/90',
|
|
11
|
+
secondary: 'bg-secondary text-secondary-foreground [&>[hlmAlertDescription]]:text-secondary-foreground/90',
|
|
12
|
+
success: 'bg-success text-success-foreground [&>[hlmAlertDescription]]:text-success-foreground/90',
|
|
13
|
+
warning: 'bg-warning text-warning-foreground [&>[hlmAlertDescription]]:text-warning-foreground/90',
|
|
14
|
+
danger: 'bg-danger text-danger-foreground [&>[hlmAlertDescription]]:text-danger-foreground/90',
|
|
15
|
+
info: 'bg-info text-info-foreground [&>[hlmAlertDescription]]:text-info-foreground/90',
|
|
16
|
+
light: 'bg-light text-light-foreground [&>[hlmAlertDescription]]:text-light-foreground/90',
|
|
17
|
+
dark: 'bg-dark text-dark-foreground [&>[hlmAlertDescription]]:text-dark-foreground/90',
|
|
18
|
+
accent: 'bg-accent text-accent-foreground [&>[hlmAlertDescription]]:text-accent-foreground/90',
|
|
19
|
+
destructive: 'bg-destructive text-destructive-foreground [&>[hlmAlertDescription]]:text-destructive-foreground/90',
|
|
20
|
+
muted: 'bg-muted text-muted-foreground [&>[hlmAlertDescription]]:text-muted-foreground/90',
|
|
21
|
+
link: 'text-primary underline-offset-4 [&>[hlmAlertDescription]]:text-primary/90',
|
|
22
|
+
ghost: '[&>[hlmAlertDescription]]:text-muted-foreground',
|
|
23
23
|
},
|
|
24
24
|
appearance: {
|
|
25
25
|
solid: '',
|
|
26
|
-
light: '
|
|
26
|
+
light: 'text-semibold',
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
29
|
compoundVariants: [
|
|
30
30
|
{
|
|
31
31
|
variant: 'primary',
|
|
32
32
|
appearance: 'light',
|
|
33
|
-
class: '
|
|
33
|
+
class: 'bg-primary/20 text-primary [&>[hlmAlertDescription]]:text-primary',
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
variant: 'secondary',
|
|
37
37
|
appearance: 'light',
|
|
38
|
-
class: '
|
|
38
|
+
class: 'bg-secondary/20 text-secondary [&>[hlmAlertDescription]]:text-secondary',
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
variant: 'success',
|
|
42
42
|
appearance: 'light',
|
|
43
|
-
class: '
|
|
43
|
+
class: 'bg-success/20 text-success [&>[hlmAlertDescription]]:text-success',
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
variant: 'warning',
|
|
47
47
|
appearance: 'light',
|
|
48
|
-
class: '
|
|
48
|
+
class: 'bg-warning/20 text-warning [&>[hlmAlertDescription]]:text-warning',
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
variant: 'danger',
|
|
52
52
|
appearance: 'light',
|
|
53
|
-
class: '
|
|
53
|
+
class: 'bg-danger/20 text-danger [&>[hlmAlertDescription]]:text-danger',
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
variant: 'info',
|
|
57
57
|
appearance: 'light',
|
|
58
|
-
class: '
|
|
58
|
+
class: 'bg-info/20 text-info [&>[hlmAlertDescription]]:text-info',
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
variant: 'light',
|
|
62
62
|
appearance: 'light',
|
|
63
|
-
class: '
|
|
63
|
+
class: 'bg-light/20 text-light [&>[hlmAlertDescription]]:text-light',
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
variant: 'dark',
|
|
67
67
|
appearance: 'light',
|
|
68
|
-
class: '
|
|
68
|
+
class: 'bg-dark/20 text-dark [&>[hlmAlertDescription]]:text-dark',
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
variant: 'accent',
|
|
72
72
|
appearance: 'light',
|
|
73
|
-
class: '
|
|
73
|
+
class: 'bg-accent/20 text-accent [&>[hlmAlertDescription]]:text-accent',
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
variant: 'destructive',
|
|
77
77
|
appearance: 'light',
|
|
78
|
-
class: '
|
|
78
|
+
class: 'bg-destructive/20 text-destructive [&>[hlmAlertDescription]]:text-destructive',
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
variant: 'muted',
|
|
82
82
|
appearance: 'light',
|
|
83
|
-
class: '
|
|
83
|
+
class: 'bg-muted/20 text-muted [&>[hlmAlertDescription]]:text-muted',
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
variant: 'link',
|
|
87
87
|
appearance: 'light',
|
|
88
|
-
class: '
|
|
88
|
+
class: 'bg-primary/10 text-primary [&>[hlmAlertDescription]]:text-primary',
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
variant: 'ghost',
|
|
92
92
|
appearance: 'light',
|
|
93
|
-
class: '
|
|
93
|
+
class: 'bg-muted/10 text-muted-foreground [&>[hlmAlertDescription]]:text-muted-foreground',
|
|
94
94
|
},
|
|
95
95
|
],
|
|
96
96
|
defaultVariants: {
|
|
@@ -122,7 +122,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
122
122
|
|
|
123
123
|
class HlmAlertDescription {
|
|
124
124
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
125
|
-
_computedClass = computed(() => hlm('
|
|
125
|
+
_computedClass = computed(() => hlm('text-current col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
126
126
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmAlertDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
127
127
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmAlertDescription, isStandalone: true, selector: "[hlmAlertDesc],[hlmAlertDescription]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
|
|
128
128
|
}
|
|
@@ -150,7 +150,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
150
150
|
|
|
151
151
|
class HlmAlertTitle {
|
|
152
152
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
153
|
-
_computedClass = computed(() => hlm('
|
|
153
|
+
_computedClass = computed(() => hlm('col-start-2 line-clamp-1 min-h-4 text-md font-semibold tracking-tight', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
154
154
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmAlertTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
155
155
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmAlertTitle, isStandalone: true, selector: "[hlmAlertTitle]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
|
|
156
156
|
}
|
|
@@ -14,7 +14,7 @@ import { BrnDialog } from '@spartan-ng/brain/dialog';
|
|
|
14
14
|
|
|
15
15
|
class HlmAutocompleteEmpty {
|
|
16
16
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
17
|
-
_computedClass = computed(() => hlm('
|
|
17
|
+
_computedClass = computed(() => hlm('py-2 text-center text-sm', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
18
18
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmAutocompleteEmpty, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
19
19
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmAutocompleteEmpty, isStandalone: true, selector: "[hlmAutocompleteEmpty]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
|
|
20
20
|
}
|
|
@@ -32,7 +32,7 @@ class HlmAutocompleteGroup {
|
|
|
32
32
|
/** The user defined class */
|
|
33
33
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
34
34
|
/** The styles to apply */
|
|
35
|
-
_computedClass = computed(() => hlm('
|
|
35
|
+
_computedClass = computed(() => hlm('text-foreground block overflow-hidden p-1', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
36
36
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmAutocompleteGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
37
37
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmAutocompleteGroup, isStandalone: true, selector: "hlm-autocomplete-group", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnAutocompleteGroup, inputs: ["id", "id"] }], ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
38
38
|
}
|
|
@@ -58,7 +58,7 @@ class HlmAutocompleteItem {
|
|
|
58
58
|
/** The user defined class */
|
|
59
59
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
60
60
|
/** The styles to apply */
|
|
61
|
-
_computedClass = computed(() => hlm('
|
|
61
|
+
_computedClass = computed(() => hlm('data-[selected]:bg-accent data-[selected]:text-accent-foreground [&>ng-icon]:text-muted-foreground outline-hidden relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[hidden]:hidden data-[disabled]:opacity-50 [&>ng-icon]:pointer-events-none [&>ng-icon]:shrink-0 [&>ng-icon]:text-base', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
62
62
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmAutocompleteItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
63
63
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmAutocompleteItem, isStandalone: true, selector: "button[hlm-autocomplete-item]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnAutocompleteItem, inputs: ["value", "value", "disabled", "disabled", "id", "id"], outputs: ["selected", "selected"] }], ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
64
64
|
}
|
|
@@ -85,7 +85,7 @@ class HlmAutocompleteList {
|
|
|
85
85
|
/** The user defined class */
|
|
86
86
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
87
87
|
/** The styles to apply */
|
|
88
|
-
_computedClass = computed(() => hlm('
|
|
88
|
+
_computedClass = computed(() => hlm('block max-h-60 overflow-y-auto overflow-x-hidden', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
89
89
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmAutocompleteList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
90
90
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmAutocompleteList, isStandalone: true, selector: "hlm-autocomplete-list", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnAutocompleteList, inputs: ["id", "id"] }], ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
91
91
|
}
|
|
@@ -111,7 +111,7 @@ class HlmAutocompleteSearch {
|
|
|
111
111
|
/** The user defined class */
|
|
112
112
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
113
113
|
/** The styles to apply */
|
|
114
|
-
_computedClass = computed(() => hlm('
|
|
114
|
+
_computedClass = computed(() => hlm('border-input focus-within:border-ring bg-background focus-within:ring-ring/50 shadow-xs dark:bg-input/10 flex h-9 min-w-0 items-center gap-2 rounded-md border px-3 focus-within:ring-[3px] [&>_ng-icon]:flex-none [&>_ng-icon]:opacity-50', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
115
115
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmAutocompleteSearch, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
116
116
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmAutocompleteSearch, isStandalone: true, selector: "hlm-autocomplete-search", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, providers: [provideHlmIconConfig({ size: 'sm' })], ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
117
117
|
}
|
|
@@ -132,7 +132,7 @@ class HlmAutocompleteSearchInput {
|
|
|
132
132
|
/** The user defined class */
|
|
133
133
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
134
134
|
/** The styles to apply */
|
|
135
|
-
_computedClass = computed(() => hlm('
|
|
135
|
+
_computedClass = computed(() => hlm('placeholder:text-muted-foreground flex h-9 w-full bg-transparent py-1 text-base outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
136
136
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmAutocompleteSearchInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
137
137
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmAutocompleteSearchInput, isStandalone: true, selector: "input[hlm-autocomplete-search-input]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnAutocompleteSearchInput, inputs: ["value", "value"] }], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
138
138
|
}
|
|
@@ -206,7 +206,7 @@ class HlmAutocomplete {
|
|
|
206
206
|
onSelect = input(...(ngDevMode ? [undefined, { debugName: "onSelect" }] : []));
|
|
207
207
|
/** The user defined class */
|
|
208
208
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
209
|
-
_computedClass = computed(() => hlm('
|
|
209
|
+
_computedClass = computed(() => hlm('block w-full', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
210
210
|
/** Custom class for the autocomplete list. */
|
|
211
211
|
autocompleteListClass = input('', ...(ngDevMode ? [{ debugName: "autocompleteListClass" }] : []));
|
|
212
212
|
_computedAutocompleteListClass = computed(() => hlm('', this.autocompleteListClass()), ...(ngDevMode ? [{ debugName: "_computedAutocompleteListClass" }] : []));
|
|
@@ -348,7 +348,7 @@ class HlmAutocomplete {
|
|
|
348
348
|
/>
|
|
349
349
|
|
|
350
350
|
<button
|
|
351
|
-
class="
|
|
351
|
+
class="flex items-center justify-center outline-none disabled:cursor-not-allowed [&>_ng-icon]:opacity-50"
|
|
352
352
|
tabindex="-1"
|
|
353
353
|
type="button"
|
|
354
354
|
[attr.aria-label]="ariaLabelToggleButton()"
|
|
@@ -362,7 +362,7 @@ class HlmAutocomplete {
|
|
|
362
362
|
<div
|
|
363
363
|
*brnPopoverContent="let ctx"
|
|
364
364
|
hlmPopoverContent
|
|
365
|
-
class="
|
|
365
|
+
class="p-0"
|
|
366
366
|
[style.width.px]="_elementRef.nativeElement.offsetWidth"
|
|
367
367
|
>
|
|
368
368
|
<hlm-autocomplete-list
|
|
@@ -443,7 +443,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
443
443
|
/>
|
|
444
444
|
|
|
445
445
|
<button
|
|
446
|
-
class="
|
|
446
|
+
class="flex items-center justify-center outline-none disabled:cursor-not-allowed [&>_ng-icon]:opacity-50"
|
|
447
447
|
tabindex="-1"
|
|
448
448
|
type="button"
|
|
449
449
|
[attr.aria-label]="ariaLabelToggleButton()"
|
|
@@ -457,7 +457,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
457
457
|
<div
|
|
458
458
|
*brnPopoverContent="let ctx"
|
|
459
459
|
hlmPopoverContent
|
|
460
|
-
class="
|
|
460
|
+
class="p-0"
|
|
461
461
|
[style.width.px]="_elementRef.nativeElement.offsetWidth"
|
|
462
462
|
>
|
|
463
463
|
<hlm-autocomplete-list
|
package/badge/fesm2022/badge.mjs
CHANGED
|
@@ -4,41 +4,41 @@ import { cva } from 'class-variance-authority';
|
|
|
4
4
|
import { hlm } from '@egose/shadcn-theme-ng/utils';
|
|
5
5
|
|
|
6
6
|
const badgeVariants = cva([
|
|
7
|
-
'
|
|
8
|
-
'
|
|
9
|
-
'
|
|
10
|
-
'
|
|
11
|
-
'
|
|
12
|
-
'
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
7
|
+
'inline-flex',
|
|
8
|
+
'items-center',
|
|
9
|
+
'rounded-sm',
|
|
10
|
+
'font-medium',
|
|
11
|
+
'whitespace-nowrap',
|
|
12
|
+
'transition-colors',
|
|
13
|
+
'focus-visible:outline-none',
|
|
14
|
+
'focus-visible:ring-1',
|
|
15
|
+
'focus-visible:ring-ring',
|
|
16
16
|
], {
|
|
17
17
|
variants: {
|
|
18
18
|
variant: {
|
|
19
|
-
primary: '
|
|
20
|
-
secondary: '
|
|
21
|
-
success: '
|
|
22
|
-
warning: '
|
|
23
|
-
danger: '
|
|
24
|
-
info: '
|
|
25
|
-
light: '
|
|
26
|
-
dark: '
|
|
27
|
-
accent: '
|
|
28
|
-
destructive: '
|
|
29
|
-
muted: '
|
|
30
|
-
link: '
|
|
31
|
-
ghost: '
|
|
19
|
+
primary: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
|
20
|
+
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/90',
|
|
21
|
+
success: 'bg-success text-success-foreground hover:bg-success/90',
|
|
22
|
+
warning: 'bg-warning text-warning-foreground hover:bg-warning/90',
|
|
23
|
+
danger: 'bg-danger text-danger-foreground hover:bg-danger/90',
|
|
24
|
+
info: 'bg-info text-info-foreground hover:bg-info/90',
|
|
25
|
+
light: 'bg-light text-light-foreground hover:bg-light/90',
|
|
26
|
+
dark: 'bg-dark text-dark-foreground hover:bg-dark/90',
|
|
27
|
+
accent: 'bg-accent text-accent-foreground hover:bg-accent/90',
|
|
28
|
+
destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
|
|
29
|
+
muted: 'bg-muted text-muted-foreground hover:bg-muted/90',
|
|
30
|
+
link: 'text-primary underline-offset-4 hover:underline',
|
|
31
|
+
ghost: 'hover:bg-light hover:text-light-foreground',
|
|
32
32
|
},
|
|
33
33
|
size: {
|
|
34
|
-
sm: '
|
|
35
|
-
default: '
|
|
36
|
-
lg: '
|
|
34
|
+
sm: 'h-5 px-2 text-xs',
|
|
35
|
+
default: 'h-6 px-3 text-sm',
|
|
36
|
+
lg: 'h-7 px-4 text-base',
|
|
37
37
|
},
|
|
38
38
|
appearance: {
|
|
39
39
|
solid: '',
|
|
40
|
-
outline: '
|
|
41
|
-
'outline-filled': '
|
|
40
|
+
outline: 'bg-white border',
|
|
41
|
+
'outline-filled': 'bg-white border',
|
|
42
42
|
},
|
|
43
43
|
},
|
|
44
44
|
defaultVariants: {
|
|
@@ -75,37 +75,37 @@ class HlmBadge {
|
|
|
75
75
|
/** Helper functions */
|
|
76
76
|
getOutlineClasses(variant) {
|
|
77
77
|
const colors = {
|
|
78
|
-
primary: '
|
|
79
|
-
secondary: '
|
|
80
|
-
success: '
|
|
81
|
-
warning: '
|
|
82
|
-
danger: '
|
|
83
|
-
info: '
|
|
84
|
-
light: '
|
|
85
|
-
dark: '
|
|
86
|
-
accent: '
|
|
87
|
-
destructive: '
|
|
88
|
-
muted: '
|
|
89
|
-
link: '
|
|
90
|
-
ghost: '
|
|
78
|
+
primary: 'border-primary text-primary hover:bg-primary/10',
|
|
79
|
+
secondary: 'border-secondary text-secondary hover:bg-secondary/10',
|
|
80
|
+
success: 'border-success text-success hover:bg-success/10',
|
|
81
|
+
warning: 'border-warning text-warning hover:bg-warning/10',
|
|
82
|
+
danger: 'border-danger text-danger hover:bg-danger/10',
|
|
83
|
+
info: 'border-info text-info hover:bg-info/10',
|
|
84
|
+
light: 'border-light text-light-foreground hover:bg-light/10',
|
|
85
|
+
dark: 'border-dark text-dark hover:bg-dark/10',
|
|
86
|
+
accent: 'border-accent text-accent hover:bg-accent/10',
|
|
87
|
+
destructive: 'border-destructive text-destructive hover:bg-destructive/10',
|
|
88
|
+
muted: 'border-muted text-muted-foreground hover:bg-muted/10',
|
|
89
|
+
link: 'text-primary',
|
|
90
|
+
ghost: 'text-light-foreground',
|
|
91
91
|
};
|
|
92
92
|
return colors[variant];
|
|
93
93
|
}
|
|
94
94
|
getOutlineFilledClasses(variant) {
|
|
95
95
|
const colors = {
|
|
96
|
-
primary: '
|
|
97
|
-
secondary: '
|
|
98
|
-
success: '
|
|
99
|
-
warning: '
|
|
100
|
-
danger: '
|
|
101
|
-
info: '
|
|
102
|
-
light: '
|
|
103
|
-
dark: '
|
|
104
|
-
accent: '
|
|
105
|
-
destructive: '
|
|
106
|
-
muted: '
|
|
107
|
-
link: '
|
|
108
|
-
ghost: '
|
|
96
|
+
primary: 'hover:bg-primary hover:text-primary-foreground',
|
|
97
|
+
secondary: 'hover:bg-secondary hover:text-secondary-foreground',
|
|
98
|
+
success: 'hover:bg-success hover:text-success-foreground',
|
|
99
|
+
warning: 'hover:bg-warning hover:text-warning-foreground',
|
|
100
|
+
danger: 'hover:bg-danger hover:text-danger-foreground',
|
|
101
|
+
info: 'hover:bg-info hover:text-info-foreground',
|
|
102
|
+
light: 'hover:bg-light hover:text-light-foreground',
|
|
103
|
+
dark: 'hover:bg-dark hover:text-dark-foreground',
|
|
104
|
+
accent: 'hover:bg-accent hover:text-accent-foreground',
|
|
105
|
+
destructive: 'hover:bg-destructive hover:text-destructive-foreground',
|
|
106
|
+
muted: 'hover:bg-muted hover:text-muted-foreground',
|
|
107
|
+
link: 'hover:underline',
|
|
108
|
+
ghost: 'hover:bg-light',
|
|
109
109
|
};
|
|
110
110
|
return colors[variant];
|
|
111
111
|
}
|
|
@@ -56,7 +56,7 @@ class EgBasicAlert {
|
|
|
56
56
|
], ngImport: i0, template: `
|
|
57
57
|
<div hlmAlert [variant]="variant()" [appearance]="appearance()" class="">
|
|
58
58
|
<ng-icon hlm hlmAlertIcon [name]="getIconName(variant())" />
|
|
59
|
-
<h4 hlmAlertTitle class="
|
|
59
|
+
<h4 hlmAlertTitle class="capitalize">{{ title() }}</h4>
|
|
60
60
|
<p hlmAlertDescription>{{ description() }}</p>
|
|
61
61
|
</div>
|
|
62
62
|
`, isInline: true, dependencies: [{ kind: "directive", type: HlmAlert, selector: "[hlmAlert]", inputs: ["class", "variant", "appearance"] }, { kind: "directive", type: HlmAlertIcon, selector: "[hlmAlertIcon]" }, { kind: "directive", type: HlmAlertTitle, selector: "[hlmAlertTitle]", inputs: ["class"] }, { kind: "directive", type: HlmAlertDescription, selector: "[hlmAlertDesc],[hlmAlertDescription]", 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"] }] });
|
|
@@ -84,7 +84,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
84
84
|
template: `
|
|
85
85
|
<div hlmAlert [variant]="variant()" [appearance]="appearance()" class="">
|
|
86
86
|
<ng-icon hlm hlmAlertIcon [name]="getIconName(variant())" />
|
|
87
|
-
<h4 hlmAlertTitle class="
|
|
87
|
+
<h4 hlmAlertTitle class="capitalize">{{ title() }}</h4>
|
|
88
88
|
<p hlmAlertDescription>{{ description() }}</p>
|
|
89
89
|
</div>
|
|
90
90
|
`,
|