@egose/shadcn-theme-ng 0.0.16 → 0.0.18
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/alert/fesm2022/alert.mjs +1 -1
- package/alert/fesm2022/alert.mjs.map +1 -1
- package/button/fesm2022/button.mjs +1 -0
- package/button/fesm2022/button.mjs.map +1 -1
- package/checkbox/fesm2022/checkbox.mjs +1 -1
- package/checkbox/fesm2022/checkbox.mjs.map +1 -1
- package/exports.json +1 -1
- package/form-checkbox/fesm2022/form-checkbox.mjs +13 -10
- package/form-checkbox/fesm2022/form-checkbox.mjs.map +1 -1
- package/form-checkbox/index.d.ts +2 -1
- package/form-date-picker/fesm2022/form-date-picker.mjs +11 -8
- package/form-date-picker/fesm2022/form-date-picker.mjs.map +1 -1
- package/form-date-picker/index.d.ts +2 -1
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +11 -5
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs.map +1 -1
- package/form-searchable-multiselect/index.d.ts +3 -1
- package/form-select/fesm2022/form-select.mjs +11 -5
- package/form-select/fesm2022/form-select.mjs.map +1 -1
- package/form-select/index.d.ts +3 -1
- package/form-text-input/fesm2022/form-text-input.mjs +12 -9
- package/form-text-input/fesm2022/form-text-input.mjs.map +1 -1
- package/form-text-input/index.d.ts +2 -1
- package/form-textarea/fesm2022/form-textarea.mjs +12 -9
- package/form-textarea/fesm2022/form-textarea.mjs.map +1 -1
- package/form-textarea/index.d.ts +2 -1
- package/package.json +5 -5
- package/{switch → sheet}/README.md +4 -4
- package/sheet/fesm2022/sheet.mjs +271 -0
- package/sheet/fesm2022/sheet.mjs.map +1 -0
- package/sheet/index.d.ts +79 -0
- package/switch/fesm2022/switch.mjs +0 -139
- package/switch/fesm2022/switch.mjs.map +0 -1
- package/switch/index.d.ts +0 -56
package/form-textarea/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { ClassValue } from 'clsx';
|
|
|
3
3
|
|
|
4
4
|
declare class EgFormTextarea {
|
|
5
5
|
label: _angular_core.InputSignal<string | undefined>;
|
|
6
|
+
controlId: _angular_core.InputSignal<string | undefined>;
|
|
6
7
|
controlName: _angular_core.InputSignal<string>;
|
|
7
8
|
error: _angular_core.InputSignal<string | undefined>;
|
|
8
9
|
hint: _angular_core.InputSignal<string | undefined>;
|
|
@@ -27,7 +28,7 @@ declare class EgFormTextarea {
|
|
|
27
28
|
$errorClass: _angular_core.Signal<string>;
|
|
28
29
|
$hintClass: _angular_core.Signal<string>;
|
|
29
30
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EgFormTextarea, never>;
|
|
30
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EgFormTextarea, "eg-form-textarea", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "controlName": { "alias": "controlName"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "maxlength": { "alias": "maxlength"; "required": false; "isSignal": true; }; "minlength": { "alias": "minlength"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "cols": { "alias": "cols"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "labelClass": { "alias": "labelClass"; "required": false; "isSignal": true; }; "textareaClass": { "alias": "textareaClass"; "required": false; "isSignal": true; }; "errorClass": { "alias": "errorClass"; "required": false; "isSignal": true; }; "hintClass": { "alias": "hintClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
31
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EgFormTextarea, "eg-form-textarea", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "controlId": { "alias": "controlId"; "required": false; "isSignal": true; }; "controlName": { "alias": "controlName"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "maxlength": { "alias": "maxlength"; "required": false; "isSignal": true; }; "minlength": { "alias": "minlength"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "cols": { "alias": "cols"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "labelClass": { "alias": "labelClass"; "required": false; "isSignal": true; }; "textareaClass": { "alias": "textareaClass"; "required": false; "isSignal": true; }; "errorClass": { "alias": "errorClass"; "required": false; "isSignal": true; }; "hintClass": { "alias": "hintClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
export { EgFormTextarea };
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.0.
|
|
2
|
+
"version": "0.0.18",
|
|
3
3
|
"description": "Angular shadcn UI theme",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
@@ -51,10 +51,6 @@
|
|
|
51
51
|
"types": "./alert/index.d.ts",
|
|
52
52
|
"default": "./alert/fesm2022/alert.mjs"
|
|
53
53
|
},
|
|
54
|
-
"./switch": {
|
|
55
|
-
"types": "./switch/index.d.ts",
|
|
56
|
-
"default": "./switch/fesm2022/switch.mjs"
|
|
57
|
-
},
|
|
58
54
|
"./label": {
|
|
59
55
|
"types": "./label/index.d.ts",
|
|
60
56
|
"default": "./label/fesm2022/label.mjs"
|
|
@@ -95,6 +91,10 @@
|
|
|
95
91
|
"types": "./separator/index.d.ts",
|
|
96
92
|
"default": "./separator/fesm2022/separator.mjs"
|
|
97
93
|
},
|
|
94
|
+
"./sheet": {
|
|
95
|
+
"types": "./sheet/index.d.ts",
|
|
96
|
+
"default": "./sheet/fesm2022/sheet.mjs"
|
|
97
|
+
},
|
|
98
98
|
"./tabs": {
|
|
99
99
|
"types": "./tabs/index.d.ts",
|
|
100
100
|
"default": "./tabs/fesm2022/tabs.mjs"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Sheet
|
|
2
2
|
|
|
3
|
-
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.
|
|
3
|
+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.3.0.
|
|
4
4
|
|
|
5
5
|
## Code scaffolding
|
|
6
6
|
|
|
@@ -21,7 +21,7 @@ ng generate --help
|
|
|
21
21
|
To build the library, run:
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
ng build
|
|
24
|
+
ng build sheet
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
@@ -33,7 +33,7 @@ Once the project is built, you can publish your library by following these steps
|
|
|
33
33
|
1. Navigate to the `dist` directory:
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
cd dist/
|
|
36
|
+
cd dist/sheet
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, computed, effect, untracked, Directive, forwardRef, ChangeDetectionStrategy, ViewEncapsulation, Component, signal, inject, Renderer2, ElementRef, NgModule } from '@angular/core';
|
|
3
|
+
import { BrnDialog, provideBrnDialogDefaultOptions } from '@spartan-ng/brain/dialog';
|
|
4
|
+
import * as i1 from '@spartan-ng/brain/sheet';
|
|
5
|
+
import { BrnSheet, BrnSheetOverlay, BrnSheetClose, BrnSheetDescription, BrnSheetTitle } from '@spartan-ng/brain/sheet';
|
|
6
|
+
import { injectCustomClassSettable, injectExposesStateProvider, injectExposedSideProvider } from '@spartan-ng/brain/core';
|
|
7
|
+
import { hlm } from '@egose/shadcn-theme-ng/utils';
|
|
8
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
9
|
+
import { lucideX } from '@ng-icons/lucide';
|
|
10
|
+
import { HlmIcon } from '@egose/shadcn-theme-ng/icon';
|
|
11
|
+
import { cva } from 'class-variance-authority';
|
|
12
|
+
|
|
13
|
+
class HlmSheetOverlay {
|
|
14
|
+
_classSettable = injectCustomClassSettable({ optional: true, host: true });
|
|
15
|
+
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
16
|
+
_computedClass = computed(() => hlm('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', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
17
|
+
constructor() {
|
|
18
|
+
effect(() => {
|
|
19
|
+
const classValue = this._computedClass();
|
|
20
|
+
untracked(() => this._classSettable?.setClassToCustomElement(classValue));
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetOverlay, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
24
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmSheetOverlay, isStandalone: true, selector: "[hlmSheetOverlay],brn-sheet-overlay[hlm]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
|
|
25
|
+
}
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetOverlay, decorators: [{
|
|
27
|
+
type: Directive,
|
|
28
|
+
args: [{
|
|
29
|
+
selector: '[hlmSheetOverlay],brn-sheet-overlay[hlm]',
|
|
30
|
+
host: {
|
|
31
|
+
'[class]': '_computedClass()',
|
|
32
|
+
},
|
|
33
|
+
}]
|
|
34
|
+
}], ctorParameters: () => [] });
|
|
35
|
+
|
|
36
|
+
class HlmSheet extends BrnSheet {
|
|
37
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheet, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
38
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.1", type: HlmSheet, isStandalone: true, selector: "hlm-sheet", providers: [
|
|
39
|
+
{
|
|
40
|
+
provide: BrnDialog,
|
|
41
|
+
useExisting: forwardRef(() => BrnSheet),
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
provide: BrnSheet,
|
|
45
|
+
useExisting: forwardRef(() => HlmSheet),
|
|
46
|
+
},
|
|
47
|
+
provideBrnDialogDefaultOptions({
|
|
48
|
+
// add custom options here
|
|
49
|
+
}),
|
|
50
|
+
], exportAs: ["hlmSheet"], usesInheritance: true, ngImport: i0, template: `
|
|
51
|
+
<brn-sheet-overlay hlm />
|
|
52
|
+
<ng-content />
|
|
53
|
+
`, isInline: true, dependencies: [{ kind: "component", type: BrnSheetOverlay, selector: "brn-sheet-overlay" }, { kind: "directive", type: HlmSheetOverlay, selector: "[hlmSheetOverlay],brn-sheet-overlay[hlm]", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
54
|
+
}
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheet, decorators: [{
|
|
56
|
+
type: Component,
|
|
57
|
+
args: [{
|
|
58
|
+
selector: 'hlm-sheet',
|
|
59
|
+
imports: [BrnSheetOverlay, HlmSheetOverlay],
|
|
60
|
+
providers: [
|
|
61
|
+
{
|
|
62
|
+
provide: BrnDialog,
|
|
63
|
+
useExisting: forwardRef(() => BrnSheet),
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
provide: BrnSheet,
|
|
67
|
+
useExisting: forwardRef(() => HlmSheet),
|
|
68
|
+
},
|
|
69
|
+
provideBrnDialogDefaultOptions({
|
|
70
|
+
// add custom options here
|
|
71
|
+
}),
|
|
72
|
+
],
|
|
73
|
+
template: `
|
|
74
|
+
<brn-sheet-overlay hlm />
|
|
75
|
+
<ng-content />
|
|
76
|
+
`,
|
|
77
|
+
encapsulation: ViewEncapsulation.None,
|
|
78
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
79
|
+
exportAs: 'hlmSheet',
|
|
80
|
+
}]
|
|
81
|
+
}] });
|
|
82
|
+
|
|
83
|
+
class HlmSheetClose {
|
|
84
|
+
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
85
|
+
_computedClass = computed(() => hlm('ring-offset-background focus:ring-ring data-[state=open]:bg-secondary rounded-xs focus:outline-hidden absolute right-4 top-4 opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
86
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetClose, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
87
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmSheetClose, isStandalone: true, selector: "[hlmSheetClose],[brnSheetClose][hlm]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
|
|
88
|
+
}
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetClose, decorators: [{
|
|
90
|
+
type: Directive,
|
|
91
|
+
args: [{
|
|
92
|
+
selector: '[hlmSheetClose],[brnSheetClose][hlm]',
|
|
93
|
+
host: {
|
|
94
|
+
'[class]': '_computedClass()',
|
|
95
|
+
},
|
|
96
|
+
}]
|
|
97
|
+
}] });
|
|
98
|
+
|
|
99
|
+
const sheetVariants = cva('bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500', {
|
|
100
|
+
variants: {
|
|
101
|
+
side: {
|
|
102
|
+
top: 'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b',
|
|
103
|
+
bottom: 'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t',
|
|
104
|
+
left: 'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',
|
|
105
|
+
right: 'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
defaultVariants: {
|
|
109
|
+
side: 'right',
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
class HlmSheetContent {
|
|
113
|
+
_stateProvider = injectExposesStateProvider({ host: true });
|
|
114
|
+
_sideProvider = injectExposedSideProvider({ host: true });
|
|
115
|
+
state = this._stateProvider.state ?? signal('closed');
|
|
116
|
+
_renderer = inject(Renderer2);
|
|
117
|
+
_element = inject(ElementRef);
|
|
118
|
+
constructor() {
|
|
119
|
+
effect(() => {
|
|
120
|
+
this._renderer.setAttribute(this._element.nativeElement, 'data-state', this.state());
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
124
|
+
_computedClass = computed(() => hlm(sheetVariants({ side: this._sideProvider.side() }), this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
125
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
126
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmSheetContent, isStandalone: true, selector: "hlm-sheet-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: `
|
|
127
|
+
<ng-content />
|
|
128
|
+
<button brnSheetClose hlm class="cursor-pointer">
|
|
129
|
+
<span class="sr-only">Close</span>
|
|
130
|
+
<ng-icon hlm size="sm" name="lucideX" />
|
|
131
|
+
</button>
|
|
132
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: HlmSheetClose, selector: "[hlmSheetClose],[brnSheetClose][hlm]", inputs: ["class"] }, { kind: "directive", type: BrnSheetClose, selector: "button[brnSheetClose]" }, { 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 });
|
|
133
|
+
}
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetContent, decorators: [{
|
|
135
|
+
type: Component,
|
|
136
|
+
args: [{
|
|
137
|
+
selector: 'hlm-sheet-content',
|
|
138
|
+
imports: [HlmSheetClose, BrnSheetClose, NgIcon, HlmIcon],
|
|
139
|
+
providers: [provideIcons({ lucideX })],
|
|
140
|
+
host: {
|
|
141
|
+
'[class]': '_computedClass()',
|
|
142
|
+
'[attr.data-state]': 'state()',
|
|
143
|
+
},
|
|
144
|
+
template: `
|
|
145
|
+
<ng-content />
|
|
146
|
+
<button brnSheetClose hlm class="cursor-pointer">
|
|
147
|
+
<span class="sr-only">Close</span>
|
|
148
|
+
<ng-icon hlm size="sm" name="lucideX" />
|
|
149
|
+
</button>
|
|
150
|
+
`,
|
|
151
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
152
|
+
}]
|
|
153
|
+
}], ctorParameters: () => [] });
|
|
154
|
+
|
|
155
|
+
class HlmSheetDescription {
|
|
156
|
+
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
157
|
+
_computedClass = computed(() => hlm('text-muted-foreground text-sm', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
158
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
159
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmSheetDescription, isStandalone: true, selector: "[hlmSheetDescription]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnSheetDescription }], ngImport: i0 });
|
|
160
|
+
}
|
|
161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetDescription, decorators: [{
|
|
162
|
+
type: Directive,
|
|
163
|
+
args: [{
|
|
164
|
+
selector: '[hlmSheetDescription]',
|
|
165
|
+
host: {
|
|
166
|
+
'[class]': '_computedClass()',
|
|
167
|
+
},
|
|
168
|
+
hostDirectives: [BrnSheetDescription],
|
|
169
|
+
}]
|
|
170
|
+
}] });
|
|
171
|
+
|
|
172
|
+
class HlmSheetFooter {
|
|
173
|
+
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
174
|
+
_computedClass = computed(() => hlm('mt-auto flex flex-col gap-2 p-4', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
175
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetFooter, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
176
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmSheetFooter, isStandalone: true, selector: "hlm-sheet-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 });
|
|
177
|
+
}
|
|
178
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetFooter, decorators: [{
|
|
179
|
+
type: Component,
|
|
180
|
+
args: [{
|
|
181
|
+
selector: 'hlm-sheet-footer',
|
|
182
|
+
template: ` <ng-content /> `,
|
|
183
|
+
host: {
|
|
184
|
+
'[class]': '_computedClass()',
|
|
185
|
+
},
|
|
186
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
187
|
+
}]
|
|
188
|
+
}] });
|
|
189
|
+
|
|
190
|
+
class HlmSheetHeader {
|
|
191
|
+
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
192
|
+
_computedClass = computed(() => hlm('flex flex-col gap-1.5 p-4', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
193
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
194
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmSheetHeader, isStandalone: true, selector: "hlm-sheet-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 });
|
|
195
|
+
}
|
|
196
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetHeader, decorators: [{
|
|
197
|
+
type: Component,
|
|
198
|
+
args: [{
|
|
199
|
+
selector: 'hlm-sheet-header',
|
|
200
|
+
template: ` <ng-content /> `,
|
|
201
|
+
host: {
|
|
202
|
+
'[class]': '_computedClass()',
|
|
203
|
+
},
|
|
204
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
205
|
+
}]
|
|
206
|
+
}] });
|
|
207
|
+
|
|
208
|
+
class HlmSheetTitle {
|
|
209
|
+
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
210
|
+
_computedClass = computed(() => hlm('text-foreground font-semibold', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
211
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
212
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmSheetTitle, isStandalone: true, selector: "[hlmSheetTitle]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnSheetTitle }], ngImport: i0 });
|
|
213
|
+
}
|
|
214
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetTitle, decorators: [{
|
|
215
|
+
type: Directive,
|
|
216
|
+
args: [{
|
|
217
|
+
selector: '[hlmSheetTitle]',
|
|
218
|
+
host: {
|
|
219
|
+
'[class]': '_computedClass()',
|
|
220
|
+
},
|
|
221
|
+
hostDirectives: [BrnSheetTitle],
|
|
222
|
+
}]
|
|
223
|
+
}] });
|
|
224
|
+
|
|
225
|
+
/*
|
|
226
|
+
* Public API Surface of sheet
|
|
227
|
+
*/
|
|
228
|
+
const HlmSheetImports = [
|
|
229
|
+
HlmSheet,
|
|
230
|
+
HlmSheetClose,
|
|
231
|
+
HlmSheetContent,
|
|
232
|
+
HlmSheetDescription,
|
|
233
|
+
HlmSheetFooter,
|
|
234
|
+
HlmSheetHeader,
|
|
235
|
+
HlmSheetOverlay,
|
|
236
|
+
HlmSheetTitle,
|
|
237
|
+
];
|
|
238
|
+
class HlmSheetModule {
|
|
239
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
240
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetModule, imports: [HlmSheet,
|
|
241
|
+
HlmSheetClose,
|
|
242
|
+
HlmSheetContent,
|
|
243
|
+
HlmSheetDescription,
|
|
244
|
+
HlmSheetFooter,
|
|
245
|
+
HlmSheetHeader,
|
|
246
|
+
HlmSheetOverlay,
|
|
247
|
+
HlmSheetTitle], exports: [HlmSheet,
|
|
248
|
+
HlmSheetClose,
|
|
249
|
+
HlmSheetContent,
|
|
250
|
+
HlmSheetDescription,
|
|
251
|
+
HlmSheetFooter,
|
|
252
|
+
HlmSheetHeader,
|
|
253
|
+
HlmSheetOverlay,
|
|
254
|
+
HlmSheetTitle] });
|
|
255
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetModule, imports: [HlmSheet,
|
|
256
|
+
HlmSheetContent] });
|
|
257
|
+
}
|
|
258
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetModule, decorators: [{
|
|
259
|
+
type: NgModule,
|
|
260
|
+
args: [{
|
|
261
|
+
imports: [...HlmSheetImports],
|
|
262
|
+
exports: [...HlmSheetImports],
|
|
263
|
+
}]
|
|
264
|
+
}] });
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Generated bundle index. Do not edit.
|
|
268
|
+
*/
|
|
269
|
+
|
|
270
|
+
export { HlmSheet, HlmSheetClose, HlmSheetContent, HlmSheetDescription, HlmSheetFooter, HlmSheetHeader, HlmSheetImports, HlmSheetModule, HlmSheetOverlay, HlmSheetTitle, sheetVariants };
|
|
271
|
+
//# sourceMappingURL=sheet.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet.mjs","sources":["../../../projects/sheet/src/lib/sheet-overlay.ts","../../../projects/sheet/src/lib/sheet.ts","../../../projects/sheet/src/lib/sheet-close.ts","../../../projects/sheet/src/lib/sheet-content.ts","../../../projects/sheet/src/lib/sheet-description.ts","../../../projects/sheet/src/lib/sheet-footer.ts","../../../projects/sheet/src/lib/sheet-header.ts","../../../projects/sheet/src/lib/sheet-title.ts","../../../projects/sheet/src/public-api.ts","../../../projects/sheet/src/sheet.ts"],"sourcesContent":["import { Directive, computed, effect, input, untracked } from '@angular/core';\nimport { injectCustomClassSettable } from '@spartan-ng/brain/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmSheetOverlay],brn-sheet-overlay[hlm]',\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmSheetOverlay {\n private readonly _classSettable = injectCustomClassSettable({ optional: true, host: true });\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out tw:data-[state=closed]:fade-out-0 tw:data-[state=open]:fade-in-0 tw:bg-black/50',\n this.userClass(),\n ),\n );\n\n constructor() {\n effect(() => {\n const classValue = this._computedClass();\n untracked(() => this._classSettable?.setClassToCustomElement(classValue));\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, forwardRef, ViewEncapsulation } from '@angular/core';\nimport { BrnDialog, provideBrnDialogDefaultOptions } from '@spartan-ng/brain/dialog';\nimport { BrnSheet, BrnSheetOverlay } from '@spartan-ng/brain/sheet';\nimport { HlmSheetOverlay } from './sheet-overlay';\n\n@Component({\n selector: 'hlm-sheet',\n imports: [BrnSheetOverlay, HlmSheetOverlay],\n providers: [\n {\n provide: BrnDialog,\n useExisting: forwardRef(() => BrnSheet),\n },\n {\n provide: BrnSheet,\n useExisting: forwardRef(() => HlmSheet),\n },\n provideBrnDialogDefaultOptions({\n // add custom options here\n }),\n ],\n template: `\n <brn-sheet-overlay hlm />\n <ng-content />\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: 'hlmSheet',\n})\nexport class HlmSheet extends BrnSheet {}\n","import { Directive, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmSheetClose],[brnSheetClose][hlm]',\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmSheetClose {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:ring-offset-background tw:focus:ring-ring tw:data-[state=open]:bg-secondary tw:rounded-xs tw:focus:outline-hidden tw:absolute tw:right-4 tw:top-4 tw:opacity-70 tw:transition-opacity tw:hover:opacity-100 tw:focus:ring-2 tw:focus:ring-offset-2 tw:disabled:pointer-events-none',\n this.userClass(),\n ),\n );\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Renderer2,\n computed,\n effect,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { NgIcon, provideIcons } from '@ng-icons/core';\nimport { lucideX } from '@ng-icons/lucide';\nimport { injectExposedSideProvider, injectExposesStateProvider } from '@spartan-ng/brain/core';\nimport { BrnSheetClose } from '@spartan-ng/brain/sheet';\nimport { HlmIcon } from '@egose/shadcn-theme-ng/icon';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport { cva } from 'class-variance-authority';\nimport type { ClassValue } from 'clsx';\nimport { HlmSheetClose } from './sheet-close';\n\nexport const sheetVariants = cva(\n 'tw:bg-background tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out tw:fixed tw:z-50 tw:flex tw:flex-col tw:gap-4 tw:shadow-lg tw:transition tw:ease-in-out tw:data-[state=closed]:duration-300 tw:data-[state=open]:duration-500',\n {\n variants: {\n side: {\n top: 'tw:data-[state=closed]:slide-out-to-top tw:data-[state=open]:slide-in-from-top tw:inset-x-0 tw:top-0 tw:h-auto tw:border-b',\n bottom:\n 'tw:data-[state=closed]:slide-out-to-bottom tw:data-[state=open]:slide-in-from-bottom tw:inset-x-0 tw:bottom-0 tw:h-auto tw:border-t',\n left: 'tw:data-[state=closed]:slide-out-to-left tw:data-[state=open]:slide-in-from-left tw:inset-y-0 tw:left-0 tw:h-full tw:w-3/4 tw:border-r tw:sm:max-w-sm',\n right:\n 'tw:data-[state=closed]:slide-out-to-right tw:data-[state=open]:slide-in-from-right tw:inset-y-0 tw:right-0 tw:h-full tw:w-3/4 tw:border-l tw:sm:max-w-sm',\n },\n },\n defaultVariants: {\n side: 'right',\n },\n },\n);\n\n@Component({\n selector: 'hlm-sheet-content',\n imports: [HlmSheetClose, BrnSheetClose, NgIcon, HlmIcon],\n providers: [provideIcons({ lucideX })],\n host: {\n '[class]': '_computedClass()',\n '[attr.data-state]': 'state()',\n },\n template: `\n <ng-content />\n <button brnSheetClose hlm class=\"tw:cursor-pointer\">\n <span class=\"tw:sr-only\">Close</span>\n <ng-icon hlm size=\"sm\" name=\"lucideX\" />\n </button>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmSheetContent {\n private readonly _stateProvider = injectExposesStateProvider({ host: true });\n private readonly _sideProvider = injectExposedSideProvider({ host: true });\n public readonly state = this._stateProvider.state ?? signal('closed');\n private readonly _renderer = inject(Renderer2);\n private readonly _element = inject(ElementRef);\n\n constructor() {\n effect(() => {\n this._renderer.setAttribute(this._element.nativeElement, 'data-state', this.state());\n });\n }\n\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(sheetVariants({ side: this._sideProvider.side() }), this.userClass()),\n );\n}\n","import { Directive, computed, input } from '@angular/core';\nimport { BrnSheetDescription } from '@spartan-ng/brain/sheet';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmSheetDescription]',\n host: {\n '[class]': '_computedClass()',\n },\n hostDirectives: [BrnSheetDescription],\n})\nexport class HlmSheetDescription {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() => hlm('tw:text-muted-foreground tw:text-sm', this.userClass()));\n}\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Component({\n selector: 'hlm-sheet-footer',\n template: ` <ng-content /> `,\n host: {\n '[class]': '_computedClass()',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmSheetFooter {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected _computedClass = computed(() => hlm('tw:mt-auto tw:flex tw:flex-col tw:gap-2 tw:p-4', this.userClass()));\n}\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Component({\n selector: 'hlm-sheet-header',\n template: ` <ng-content /> `,\n host: {\n '[class]': '_computedClass()',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmSheetHeader {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected _computedClass = computed(() => hlm('tw:flex tw:flex-col tw:gap-1.5 tw:p-4', this.userClass()));\n}\n","import { Directive, computed, input } from '@angular/core';\nimport { BrnSheetTitle } from '@spartan-ng/brain/sheet';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmSheetTitle]',\n host: {\n '[class]': '_computedClass()',\n },\n hostDirectives: [BrnSheetTitle],\n})\nexport class HlmSheetTitle {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() => hlm('tw:text-foreground tw:font-semibold', this.userClass()));\n}\n","/*\n * Public API Surface of sheet\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmSheet } from './lib/sheet';\nimport { HlmSheetClose } from './lib/sheet-close';\nimport { HlmSheetContent } from './lib/sheet-content';\nimport { HlmSheetDescription } from './lib/sheet-description';\nimport { HlmSheetFooter } from './lib/sheet-footer';\nimport { HlmSheetHeader } from './lib/sheet-header';\nimport { HlmSheetOverlay } from './lib/sheet-overlay';\nimport { HlmSheetTitle } from './lib/sheet-title';\n\nexport * from './lib/sheet';\nexport * from './lib/sheet-close';\nexport * from './lib/sheet-content';\nexport * from './lib/sheet-description';\nexport * from './lib/sheet-footer';\nexport * from './lib/sheet-header';\nexport * from './lib/sheet-overlay';\nexport * from './lib/sheet-title';\n\nexport const HlmSheetImports = [\n HlmSheet,\n HlmSheetClose,\n HlmSheetContent,\n HlmSheetDescription,\n HlmSheetFooter,\n HlmSheetHeader,\n HlmSheetOverlay,\n HlmSheetTitle,\n] as const;\n\n@NgModule({\n imports: [...HlmSheetImports],\n exports: [...HlmSheetImports],\n})\nexport class HlmSheetModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAWa,eAAe,CAAA;AACT,IAAA,cAAc,GAAG,yBAAyB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC3E,IAAA,SAAS,GAAG,KAAK,CAAa,EAAE,6CAAI,KAAK,EAAE,OAAO,EAAA,CAAA,GAAA,CAAhB,EAAE,KAAK,EAAE,OAAO,EAAE,GAAC;AAClD,IAAA,cAAc,GAAG,QAAQ,CAAC,MAC3C,GAAG,CACD,oJAAoJ,EACpJ,IAAI,CAAC,SAAS,EAAE,CACjB,0DACF;AAED,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,EAAE;AACxC,YAAA,SAAS,CAAC,MAAM,IAAI,CAAC,cAAc,EAAE,uBAAuB,CAAC,UAAU,CAAC,CAAC;AAC3E,QAAA,CAAC,CAAC;IACJ;uGAfW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0CAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,O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ACf,YAAA,aAAa,aAPb,QAAQ;YACR,aAAa;YACb,eAAe;YACf,mBAAmB;YACnB,cAAc;YACd,cAAc;YACd,eAAe;YACf,aAAa,CAAA,EAAA,CAAA;AAOF,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAdzB,QAAQ;YAER,eAAe,CAAA,EAAA,CAAA;;2FAYJ,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,eAAe,CAAC;AAC7B,oBAAA,OAAO,EAAE,CAAC,GAAG,eAAe,CAAC;AAC9B,iBAAA;;;ACtCD;;AAEG;;;;"}
|
package/sheet/index.d.ts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import * as i1 from '@spartan-ng/brain/sheet';
|
|
2
|
+
import { BrnSheet } from '@spartan-ng/brain/sheet';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { ClassValue } from 'clsx';
|
|
5
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
|
+
|
|
7
|
+
declare class HlmSheet extends BrnSheet {
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmSheet, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HlmSheet, "hlm-sheet", ["hlmSheet"], {}, {}, never, ["*"], true, never>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare class HlmSheetClose {
|
|
13
|
+
readonly userClass: i0.InputSignal<ClassValue>;
|
|
14
|
+
protected readonly _computedClass: i0.Signal<string>;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmSheetClose, never>;
|
|
16
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmSheetClose, "[hlmSheetClose],[brnSheetClose][hlm]", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare const sheetVariants: (props?: ({
|
|
20
|
+
side?: "top" | "bottom" | "left" | "right" | null | undefined;
|
|
21
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
22
|
+
declare class HlmSheetContent {
|
|
23
|
+
private readonly _stateProvider;
|
|
24
|
+
private readonly _sideProvider;
|
|
25
|
+
readonly state: i0.Signal<"closed" | "open">;
|
|
26
|
+
private readonly _renderer;
|
|
27
|
+
private readonly _element;
|
|
28
|
+
constructor();
|
|
29
|
+
readonly userClass: i0.InputSignal<ClassValue>;
|
|
30
|
+
protected readonly _computedClass: i0.Signal<string>;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmSheetContent, never>;
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HlmSheetContent, "hlm-sheet-content", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare class HlmSheetDescription {
|
|
36
|
+
readonly userClass: i0.InputSignal<ClassValue>;
|
|
37
|
+
protected readonly _computedClass: i0.Signal<string>;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmSheetDescription, never>;
|
|
39
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmSheetDescription, "[hlmSheetDescription]", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.BrnSheetDescription; inputs: {}; outputs: {}; }]>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare class HlmSheetFooter {
|
|
43
|
+
readonly userClass: i0.InputSignal<ClassValue>;
|
|
44
|
+
protected _computedClass: i0.Signal<string>;
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmSheetFooter, never>;
|
|
46
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HlmSheetFooter, "hlm-sheet-footer", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
declare class HlmSheetHeader {
|
|
50
|
+
readonly userClass: i0.InputSignal<ClassValue>;
|
|
51
|
+
protected _computedClass: i0.Signal<string>;
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmSheetHeader, never>;
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HlmSheetHeader, "hlm-sheet-header", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
declare class HlmSheetOverlay {
|
|
57
|
+
private readonly _classSettable;
|
|
58
|
+
readonly userClass: i0.InputSignal<ClassValue>;
|
|
59
|
+
protected readonly _computedClass: i0.Signal<string>;
|
|
60
|
+
constructor();
|
|
61
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmSheetOverlay, never>;
|
|
62
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmSheetOverlay, "[hlmSheetOverlay],brn-sheet-overlay[hlm]", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
declare class HlmSheetTitle {
|
|
66
|
+
readonly userClass: i0.InputSignal<ClassValue>;
|
|
67
|
+
protected readonly _computedClass: i0.Signal<string>;
|
|
68
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmSheetTitle, never>;
|
|
69
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmSheetTitle, "[hlmSheetTitle]", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.BrnSheetTitle; inputs: {}; outputs: {}; }]>;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
declare const HlmSheetImports: readonly [typeof HlmSheet, typeof HlmSheetClose, typeof HlmSheetContent, typeof HlmSheetDescription, typeof HlmSheetFooter, typeof HlmSheetHeader, typeof HlmSheetOverlay, typeof HlmSheetTitle];
|
|
73
|
+
declare class HlmSheetModule {
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmSheetModule, never>;
|
|
75
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<HlmSheetModule, never, [typeof HlmSheet, typeof HlmSheetClose, typeof HlmSheetContent, typeof HlmSheetDescription, typeof HlmSheetFooter, typeof HlmSheetHeader, typeof HlmSheetOverlay, typeof HlmSheetTitle], [typeof HlmSheet, typeof HlmSheetClose, typeof HlmSheetContent, typeof HlmSheetDescription, typeof HlmSheetFooter, typeof HlmSheetHeader, typeof HlmSheetOverlay, typeof HlmSheetTitle]>;
|
|
76
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<HlmSheetModule>;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export { HlmSheet, HlmSheetClose, HlmSheetContent, HlmSheetDescription, HlmSheetFooter, HlmSheetHeader, HlmSheetImports, HlmSheetModule, HlmSheetOverlay, HlmSheetTitle, sheetVariants };
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed, Directive, forwardRef, model, booleanAttribute, output, linkedSignal, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
-
import { BrnSwitchThumb, BrnSwitch } from '@spartan-ng/brain/switch';
|
|
5
|
-
import { hlm } from '@egose/shadcn-theme-ng/utils';
|
|
6
|
-
|
|
7
|
-
class HlmSwitchThumb {
|
|
8
|
-
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
9
|
-
_computedClass = computed(() => hlm('bg-background dark:group-data-[state=unchecked]:bg-foreground dark:group-data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=unchecked]:translate-x-0 group-data-[state=checked]:translate-x-[calc(100%-2px)]', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
10
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSwitchThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
11
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmSwitchThumb, isStandalone: true, selector: "brn-switch-thumb[hlm],[hlmSwitchThumb]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
|
|
12
|
-
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSwitchThumb, decorators: [{
|
|
14
|
-
type: Directive,
|
|
15
|
-
args: [{
|
|
16
|
-
selector: 'brn-switch-thumb[hlm],[hlmSwitchThumb]',
|
|
17
|
-
host: {
|
|
18
|
-
'[class]': '_computedClass()',
|
|
19
|
-
},
|
|
20
|
-
}]
|
|
21
|
-
}] });
|
|
22
|
-
|
|
23
|
-
const EG_SWITCH_VALUE_ACCESSOR = {
|
|
24
|
-
provide: NG_VALUE_ACCESSOR,
|
|
25
|
-
useExisting: forwardRef(() => HlmSwitch),
|
|
26
|
-
multi: true,
|
|
27
|
-
};
|
|
28
|
-
class HlmSwitch {
|
|
29
|
-
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
30
|
-
_computedClass = computed(() => hlm('data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 shadow-xs group inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent outline-none transition-all focus-visible:ring-[3px] data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
31
|
-
/** The checked state of the switch. */
|
|
32
|
-
checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : []));
|
|
33
|
-
/** The disabled state of the switch. */
|
|
34
|
-
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{
|
|
35
|
-
transform: booleanAttribute,
|
|
36
|
-
}]));
|
|
37
|
-
/** Used to set the id on the underlying brn element. */
|
|
38
|
-
id = input(null, ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
39
|
-
/** Used to set the aria-label attribute on the underlying brn element. */
|
|
40
|
-
ariaLabel = input(null, ...(ngDevMode ? [{ debugName: "ariaLabel", alias: 'aria-label' }] : [{ alias: 'aria-label' }]));
|
|
41
|
-
/** Used to set the aria-labelledby attribute on the underlying brn element. */
|
|
42
|
-
ariaLabelledby = input(null, ...(ngDevMode ? [{ debugName: "ariaLabelledby", alias: 'aria-labelledby' }] : [{ alias: 'aria-labelledby' }]));
|
|
43
|
-
/** Used to set the aria-describedby attribute on the underlying brn element. */
|
|
44
|
-
ariaDescribedby = input(null, ...(ngDevMode ? [{ debugName: "ariaDescribedby", alias: 'aria-describedby' }] : [{ alias: 'aria-describedby' }]));
|
|
45
|
-
/** Emits when the checked state of the switch changes. */
|
|
46
|
-
changed = output();
|
|
47
|
-
_disabled = linkedSignal(this.disabled);
|
|
48
|
-
_onChange;
|
|
49
|
-
_onTouched;
|
|
50
|
-
handleChange(value) {
|
|
51
|
-
this.checked.set(value);
|
|
52
|
-
this._onChange?.(value);
|
|
53
|
-
this.changed.emit(value);
|
|
54
|
-
}
|
|
55
|
-
/** CONROL VALUE ACCESSOR */
|
|
56
|
-
writeValue(value) {
|
|
57
|
-
this.checked.set(Boolean(value));
|
|
58
|
-
}
|
|
59
|
-
registerOnChange(fn) {
|
|
60
|
-
this._onChange = fn;
|
|
61
|
-
}
|
|
62
|
-
registerOnTouched(fn) {
|
|
63
|
-
this._onTouched = fn;
|
|
64
|
-
}
|
|
65
|
-
setDisabledState(isDisabled) {
|
|
66
|
-
this._disabled.set(isDisabled);
|
|
67
|
-
}
|
|
68
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSwitch, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
69
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmSwitch, isStandalone: true, selector: "hlm-switch", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", changed: "changed" }, host: { properties: { "attr.id": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null" }, classAttribute: "contents" }, providers: [EG_SWITCH_VALUE_ACCESSOR], ngImport: i0, template: `
|
|
70
|
-
<brn-switch
|
|
71
|
-
[class]="_computedClass()"
|
|
72
|
-
[checked]="checked()"
|
|
73
|
-
(changed)="handleChange($event)"
|
|
74
|
-
(touched)="_onTouched?.()"
|
|
75
|
-
[disabled]="_disabled()"
|
|
76
|
-
[id]="id()"
|
|
77
|
-
[aria-label]="ariaLabel()"
|
|
78
|
-
[aria-labelledby]="ariaLabelledby()"
|
|
79
|
-
[aria-describedby]="ariaDescribedby()"
|
|
80
|
-
>
|
|
81
|
-
<brn-switch-thumb hlm />
|
|
82
|
-
</brn-switch>
|
|
83
|
-
`, isInline: true, dependencies: [{ kind: "component", type: BrnSwitchThumb, selector: "brn-switch-thumb" }, { kind: "component", type: BrnSwitch, selector: "brn-switch", inputs: ["checked", "id", "name", "class", "aria-label", "aria-labelledby", "aria-describedby", "required", "disabled", "tabIndex"], outputs: ["checkedChange", "changed", "touched"] }, { kind: "directive", type: HlmSwitchThumb, selector: "brn-switch-thumb[hlm],[hlmSwitchThumb]", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
84
|
-
}
|
|
85
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSwitch, decorators: [{
|
|
86
|
-
type: Component,
|
|
87
|
-
args: [{
|
|
88
|
-
selector: 'hlm-switch',
|
|
89
|
-
imports: [BrnSwitchThumb, BrnSwitch, HlmSwitchThumb],
|
|
90
|
-
host: {
|
|
91
|
-
class: 'contents',
|
|
92
|
-
'[attr.id]': 'null',
|
|
93
|
-
'[attr.aria-label]': 'null',
|
|
94
|
-
'[attr.aria-labelledby]': 'null',
|
|
95
|
-
'[attr.aria-describedby]': 'null',
|
|
96
|
-
},
|
|
97
|
-
template: `
|
|
98
|
-
<brn-switch
|
|
99
|
-
[class]="_computedClass()"
|
|
100
|
-
[checked]="checked()"
|
|
101
|
-
(changed)="handleChange($event)"
|
|
102
|
-
(touched)="_onTouched?.()"
|
|
103
|
-
[disabled]="_disabled()"
|
|
104
|
-
[id]="id()"
|
|
105
|
-
[aria-label]="ariaLabel()"
|
|
106
|
-
[aria-labelledby]="ariaLabelledby()"
|
|
107
|
-
[aria-describedby]="ariaDescribedby()"
|
|
108
|
-
>
|
|
109
|
-
<brn-switch-thumb hlm />
|
|
110
|
-
</brn-switch>
|
|
111
|
-
`,
|
|
112
|
-
providers: [EG_SWITCH_VALUE_ACCESSOR],
|
|
113
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
114
|
-
}]
|
|
115
|
-
}] });
|
|
116
|
-
|
|
117
|
-
/*
|
|
118
|
-
* Public API Surface of switch
|
|
119
|
-
*/
|
|
120
|
-
const HlmSwitchImports = [HlmSwitch, HlmSwitchThumb];
|
|
121
|
-
class HlmSwitchModule {
|
|
122
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
123
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: HlmSwitchModule, imports: [HlmSwitch, HlmSwitchThumb], exports: [HlmSwitch, HlmSwitchThumb] });
|
|
124
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSwitchModule, imports: [HlmSwitch] });
|
|
125
|
-
}
|
|
126
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSwitchModule, decorators: [{
|
|
127
|
-
type: NgModule,
|
|
128
|
-
args: [{
|
|
129
|
-
imports: [...HlmSwitchImports],
|
|
130
|
-
exports: [...HlmSwitchImports],
|
|
131
|
-
}]
|
|
132
|
-
}] });
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Generated bundle index. Do not edit.
|
|
136
|
-
*/
|
|
137
|
-
|
|
138
|
-
export { EG_SWITCH_VALUE_ACCESSOR, HlmSwitch, HlmSwitchImports, HlmSwitchModule, HlmSwitchThumb };
|
|
139
|
-
//# sourceMappingURL=switch.mjs.map
|