@ngbase/adk 0.1.14 → 0.1.16
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/package.json +49 -49
- package/schematics/components/files/alert/alert-llm.md.template +14 -26
- package/schematics/components/files/alert/alert.ts.template +34 -53
- package/schematics/components/files/confirmation/confirmation-llm.md.template +34 -0
- package/schematics/components/files/confirmation/confirmation.ts.template +62 -0
- package/schematics/components/files/confirmation/index.ts.template +1 -0
- package/schematics/components/files/datepicker/datepicker.ts.template +2 -1
- package/schematics/components/files/form-field/form-field.ts.template +1 -1
- package/schematics/components/files/icon/icon.ts.template +3 -2
- package/schematics/components/files/spinner/spinner.ts.template +3 -3
- package/schematics/components/schema.json +4 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngbase/adk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/ng-base/ngbase.git"
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"types": "./accordion/index.d.ts",
|
|
49
49
|
"default": "./fesm2022/ngbase-adk-accordion.mjs"
|
|
50
50
|
},
|
|
51
|
-
"./breadcrumb": {
|
|
52
|
-
"types": "./breadcrumb/index.d.ts",
|
|
53
|
-
"default": "./fesm2022/ngbase-adk-breadcrumb.mjs"
|
|
54
|
-
},
|
|
55
51
|
"./bidi": {
|
|
56
52
|
"types": "./bidi/index.d.ts",
|
|
57
53
|
"default": "./fesm2022/ngbase-adk-bidi.mjs"
|
|
58
54
|
},
|
|
55
|
+
"./breadcrumb": {
|
|
56
|
+
"types": "./breadcrumb/index.d.ts",
|
|
57
|
+
"default": "./fesm2022/ngbase-adk-breadcrumb.mjs"
|
|
58
|
+
},
|
|
59
59
|
"./cache": {
|
|
60
60
|
"types": "./cache/index.d.ts",
|
|
61
61
|
"default": "./fesm2022/ngbase-adk-cache.mjs"
|
|
@@ -64,22 +64,22 @@
|
|
|
64
64
|
"types": "./carousel/index.d.ts",
|
|
65
65
|
"default": "./fesm2022/ngbase-adk-carousel.mjs"
|
|
66
66
|
},
|
|
67
|
-
"./checkbox": {
|
|
68
|
-
"types": "./checkbox/index.d.ts",
|
|
69
|
-
"default": "./fesm2022/ngbase-adk-checkbox.mjs"
|
|
70
|
-
},
|
|
71
67
|
"./chip": {
|
|
72
68
|
"types": "./chip/index.d.ts",
|
|
73
69
|
"default": "./fesm2022/ngbase-adk-chip.mjs"
|
|
74
70
|
},
|
|
75
|
-
"./collections": {
|
|
76
|
-
"types": "./collections/index.d.ts",
|
|
77
|
-
"default": "./fesm2022/ngbase-adk-collections.mjs"
|
|
78
|
-
},
|
|
79
71
|
"./clipboard": {
|
|
80
72
|
"types": "./clipboard/index.d.ts",
|
|
81
73
|
"default": "./fesm2022/ngbase-adk-clipboard.mjs"
|
|
82
74
|
},
|
|
75
|
+
"./checkbox": {
|
|
76
|
+
"types": "./checkbox/index.d.ts",
|
|
77
|
+
"default": "./fesm2022/ngbase-adk-checkbox.mjs"
|
|
78
|
+
},
|
|
79
|
+
"./collections": {
|
|
80
|
+
"types": "./collections/index.d.ts",
|
|
81
|
+
"default": "./fesm2022/ngbase-adk-collections.mjs"
|
|
82
|
+
},
|
|
83
83
|
"./color-picker": {
|
|
84
84
|
"types": "./color-picker/index.d.ts",
|
|
85
85
|
"default": "./fesm2022/ngbase-adk-color-picker.mjs"
|
|
@@ -92,14 +92,14 @@
|
|
|
92
92
|
"types": "./dialog/index.d.ts",
|
|
93
93
|
"default": "./fesm2022/ngbase-adk-dialog.mjs"
|
|
94
94
|
},
|
|
95
|
-
"./drag": {
|
|
96
|
-
"types": "./drag/index.d.ts",
|
|
97
|
-
"default": "./fesm2022/ngbase-adk-drag.mjs"
|
|
98
|
-
},
|
|
99
95
|
"./datepicker": {
|
|
100
96
|
"types": "./datepicker/index.d.ts",
|
|
101
97
|
"default": "./fesm2022/ngbase-adk-datepicker.mjs"
|
|
102
98
|
},
|
|
99
|
+
"./drag": {
|
|
100
|
+
"types": "./drag/index.d.ts",
|
|
101
|
+
"default": "./fesm2022/ngbase-adk-drag.mjs"
|
|
102
|
+
},
|
|
103
103
|
"./form-field": {
|
|
104
104
|
"types": "./form-field/index.d.ts",
|
|
105
105
|
"default": "./fesm2022/ngbase-adk-form-field.mjs"
|
|
@@ -112,6 +112,10 @@
|
|
|
112
112
|
"types": "./icon/index.d.ts",
|
|
113
113
|
"default": "./fesm2022/ngbase-adk-icon.mjs"
|
|
114
114
|
},
|
|
115
|
+
"./jwt": {
|
|
116
|
+
"types": "./jwt/index.d.ts",
|
|
117
|
+
"default": "./fesm2022/ngbase-adk-jwt.mjs"
|
|
118
|
+
},
|
|
115
119
|
"./inline-edit": {
|
|
116
120
|
"types": "./inline-edit/index.d.ts",
|
|
117
121
|
"default": "./fesm2022/ngbase-adk-inline-edit.mjs"
|
|
@@ -120,54 +124,50 @@
|
|
|
120
124
|
"types": "./layout/index.d.ts",
|
|
121
125
|
"default": "./fesm2022/ngbase-adk-layout.mjs"
|
|
122
126
|
},
|
|
123
|
-
"./
|
|
124
|
-
"types": "./
|
|
125
|
-
"default": "./fesm2022/ngbase-adk-
|
|
127
|
+
"./keys": {
|
|
128
|
+
"types": "./keys/index.d.ts",
|
|
129
|
+
"default": "./fesm2022/ngbase-adk-keys.mjs"
|
|
126
130
|
},
|
|
127
131
|
"./list": {
|
|
128
132
|
"types": "./list/index.d.ts",
|
|
129
133
|
"default": "./fesm2022/ngbase-adk-list.mjs"
|
|
130
134
|
},
|
|
131
|
-
"./keys": {
|
|
132
|
-
"types": "./keys/index.d.ts",
|
|
133
|
-
"default": "./fesm2022/ngbase-adk-keys.mjs"
|
|
134
|
-
},
|
|
135
135
|
"./mask": {
|
|
136
136
|
"types": "./mask/index.d.ts",
|
|
137
137
|
"default": "./fesm2022/ngbase-adk-mask.mjs"
|
|
138
138
|
},
|
|
139
|
-
"./menu": {
|
|
140
|
-
"types": "./menu/index.d.ts",
|
|
141
|
-
"default": "./fesm2022/ngbase-adk-menu.mjs"
|
|
142
|
-
},
|
|
143
139
|
"./network": {
|
|
144
140
|
"types": "./network/index.d.ts",
|
|
145
141
|
"default": "./fesm2022/ngbase-adk-network.mjs"
|
|
146
142
|
},
|
|
143
|
+
"./menu": {
|
|
144
|
+
"types": "./menu/index.d.ts",
|
|
145
|
+
"default": "./fesm2022/ngbase-adk-menu.mjs"
|
|
146
|
+
},
|
|
147
147
|
"./otp": {
|
|
148
148
|
"types": "./otp/index.d.ts",
|
|
149
149
|
"default": "./fesm2022/ngbase-adk-otp.mjs"
|
|
150
150
|
},
|
|
151
|
+
"./pagination": {
|
|
152
|
+
"types": "./pagination/index.d.ts",
|
|
153
|
+
"default": "./fesm2022/ngbase-adk-pagination.mjs"
|
|
154
|
+
},
|
|
151
155
|
"./popover": {
|
|
152
156
|
"types": "./popover/index.d.ts",
|
|
153
157
|
"default": "./fesm2022/ngbase-adk-popover.mjs"
|
|
154
158
|
},
|
|
155
|
-
"./portal": {
|
|
156
|
-
"types": "./portal/index.d.ts",
|
|
157
|
-
"default": "./fesm2022/ngbase-adk-portal.mjs"
|
|
158
|
-
},
|
|
159
159
|
"./progress": {
|
|
160
160
|
"types": "./progress/index.d.ts",
|
|
161
161
|
"default": "./fesm2022/ngbase-adk-progress.mjs"
|
|
162
162
|
},
|
|
163
|
-
"./pagination": {
|
|
164
|
-
"types": "./pagination/index.d.ts",
|
|
165
|
-
"default": "./fesm2022/ngbase-adk-pagination.mjs"
|
|
166
|
-
},
|
|
167
163
|
"./radio": {
|
|
168
164
|
"types": "./radio/index.d.ts",
|
|
169
165
|
"default": "./fesm2022/ngbase-adk-radio.mjs"
|
|
170
166
|
},
|
|
167
|
+
"./portal": {
|
|
168
|
+
"types": "./portal/index.d.ts",
|
|
169
|
+
"default": "./fesm2022/ngbase-adk-portal.mjs"
|
|
170
|
+
},
|
|
171
171
|
"./resizable": {
|
|
172
172
|
"types": "./resizable/index.d.ts",
|
|
173
173
|
"default": "./fesm2022/ngbase-adk-resizable.mjs"
|
|
@@ -176,6 +176,10 @@
|
|
|
176
176
|
"types": "./scroll-area/index.d.ts",
|
|
177
177
|
"default": "./fesm2022/ngbase-adk-scroll-area.mjs"
|
|
178
178
|
},
|
|
179
|
+
"./selectable": {
|
|
180
|
+
"types": "./selectable/index.d.ts",
|
|
181
|
+
"default": "./fesm2022/ngbase-adk-selectable.mjs"
|
|
182
|
+
},
|
|
179
183
|
"./select": {
|
|
180
184
|
"types": "./select/index.d.ts",
|
|
181
185
|
"default": "./fesm2022/ngbase-adk-select.mjs"
|
|
@@ -184,10 +188,6 @@
|
|
|
184
188
|
"types": "./sheet/index.d.ts",
|
|
185
189
|
"default": "./fesm2022/ngbase-adk-sheet.mjs"
|
|
186
190
|
},
|
|
187
|
-
"./selectable": {
|
|
188
|
-
"types": "./selectable/index.d.ts",
|
|
189
|
-
"default": "./fesm2022/ngbase-adk-selectable.mjs"
|
|
190
|
-
},
|
|
191
191
|
"./sidenav": {
|
|
192
192
|
"types": "./sidenav/index.d.ts",
|
|
193
193
|
"default": "./fesm2022/ngbase-adk-sidenav.mjs"
|
|
@@ -208,22 +208,22 @@
|
|
|
208
208
|
"types": "./switch/index.d.ts",
|
|
209
209
|
"default": "./fesm2022/ngbase-adk-switch.mjs"
|
|
210
210
|
},
|
|
211
|
-
"./test": {
|
|
212
|
-
"types": "./test/index.d.ts",
|
|
213
|
-
"default": "./fesm2022/ngbase-adk-test.mjs"
|
|
214
|
-
},
|
|
215
|
-
"./tabs": {
|
|
216
|
-
"types": "./tabs/index.d.ts",
|
|
217
|
-
"default": "./fesm2022/ngbase-adk-tabs.mjs"
|
|
218
|
-
},
|
|
219
211
|
"./table": {
|
|
220
212
|
"types": "./table/index.d.ts",
|
|
221
213
|
"default": "./fesm2022/ngbase-adk-table.mjs"
|
|
222
214
|
},
|
|
215
|
+
"./test": {
|
|
216
|
+
"types": "./test/index.d.ts",
|
|
217
|
+
"default": "./fesm2022/ngbase-adk-test.mjs"
|
|
218
|
+
},
|
|
223
219
|
"./toggle": {
|
|
224
220
|
"types": "./toggle/index.d.ts",
|
|
225
221
|
"default": "./fesm2022/ngbase-adk-toggle.mjs"
|
|
226
222
|
},
|
|
223
|
+
"./tabs": {
|
|
224
|
+
"types": "./tabs/index.d.ts",
|
|
225
|
+
"default": "./fesm2022/ngbase-adk-tabs.mjs"
|
|
226
|
+
},
|
|
227
227
|
"./toggle-group": {
|
|
228
228
|
"types": "./toggle-group/index.d.ts",
|
|
229
229
|
"default": "./fesm2022/ngbase-adk-toggle-group.mjs"
|
|
@@ -253,4 +253,4 @@
|
|
|
253
253
|
"default": "./fesm2022/ngbase-adk-virtualizer.mjs"
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
-
}
|
|
256
|
+
}
|
|
@@ -1,34 +1,22 @@
|
|
|
1
1
|
# MEE Alert
|
|
2
2
|
|
|
3
3
|
```typescript
|
|
4
|
-
import {
|
|
4
|
+
import { Alert } from '@/ui/alert';
|
|
5
5
|
```
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Components
|
|
8
|
+
|
|
9
|
+
### `<<%= name %>-alert>`
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
description: 'This is an alert',
|
|
14
|
-
actions: [
|
|
15
|
-
{
|
|
16
|
-
text: 'Cancel',
|
|
17
|
-
type: 'secondary', // ButtonVariant
|
|
18
|
-
handler: close => close(),
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
text: 'OK',
|
|
22
|
-
type: 'primary', // ButtonVariant
|
|
23
|
-
handler: close => {
|
|
24
|
-
okHandler();
|
|
25
|
-
close();
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
-
});
|
|
11
|
+
- **Inputs:**
|
|
12
|
+
- `variant`: 'error' | 'default' | 'success' | 'info' = 'default' - The variant of the alert
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
30
15
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
16
|
+
```html
|
|
17
|
+
<<%= name %>-alert variant="info">
|
|
18
|
+
<ng-container class="a-title">Info</ng-container>
|
|
19
|
+
This is an info alert
|
|
20
|
+
</<%= name %>-alert>
|
|
21
|
+
<<%= name %>-alert variant="success"> This is a success alert </<%= name %>-alert>
|
|
34
22
|
```
|
|
@@ -1,62 +1,43 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { dialogPortal } from '<%= basepath %>/dialog';
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
2
|
+
import { Icon } from '<%= basepath %>/icon';
|
|
3
|
+
import { lucideInfo, lucideCircleCheck, lucideCircleAlert } from '@ng-icons/lucide';
|
|
5
4
|
|
|
6
|
-
export
|
|
7
|
-
title?: string;
|
|
8
|
-
description?: string;
|
|
9
|
-
actions?: {
|
|
10
|
-
text: string;
|
|
11
|
-
type?: ButtonVariant;
|
|
12
|
-
handler: (fn: (v?: any) => any) => any;
|
|
13
|
-
}[];
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function alertPortal() {
|
|
17
|
-
const base = dialogPortal();
|
|
18
|
-
|
|
19
|
-
function open<T>(opt: AlertOptions, comp?: DialogInput<T>) {
|
|
20
|
-
const options: DialogOptions = {
|
|
21
|
-
...new DialogOptions(),
|
|
22
|
-
data: opt,
|
|
23
|
-
title: opt.title,
|
|
24
|
-
width: '32rem',
|
|
25
|
-
maxWidth: '95vw',
|
|
26
|
-
disableClose: true,
|
|
27
|
-
header: true,
|
|
28
|
-
focusTrap: true,
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const diaRef = base.open(comp || Alert, options);
|
|
32
|
-
|
|
33
|
-
return diaRef;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function closeAll() {
|
|
37
|
-
base.closeAll();
|
|
38
|
-
}
|
|
39
|
-
return { open, closeAll };
|
|
40
|
-
}
|
|
5
|
+
export type AlertVariant = 'error' | 'default' | 'success' | 'info';
|
|
41
6
|
|
|
42
7
|
@Component({
|
|
43
8
|
selector: '<%= name %>-alert',
|
|
44
9
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
45
|
-
imports: [
|
|
46
|
-
template:
|
|
47
|
-
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
<button [<%= name %>Button]="action.type || 'primary'" (click)="action.handler(diaRef.close)">
|
|
52
|
-
{{ action.text }}
|
|
53
|
-
</button>
|
|
54
|
-
}
|
|
10
|
+
imports: [Icon],
|
|
11
|
+
template: `<div class="flex items-start space-x-2">
|
|
12
|
+
<<%= name %>-icon [svg]="i[variant()]" size="16" class="mt-0.5 text-blue-600" />
|
|
13
|
+
<div class="text-sm text-blue-800">
|
|
14
|
+
<p class="mb-1 font-medium empty:hidden"><ng-content select=".a-title" /></p>
|
|
15
|
+
<p><ng-content /></p>
|
|
55
16
|
</div>
|
|
56
|
-
|
|
17
|
+
</div>`,
|
|
18
|
+
host: {
|
|
19
|
+
class: 'block rounded-lg p-3',
|
|
20
|
+
'[class]': 'hostClass()',
|
|
21
|
+
role: 'status',
|
|
22
|
+
},
|
|
57
23
|
})
|
|
58
24
|
export class Alert {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
25
|
+
readonly variant = input<AlertVariant>('default');
|
|
26
|
+
readonly i = {
|
|
27
|
+
default: lucideInfo,
|
|
28
|
+
info: lucideInfo,
|
|
29
|
+
success: lucideCircleCheck,
|
|
30
|
+
error: lucideCircleAlert,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
readonly hostClass = computed(() => {
|
|
34
|
+
const base = 'block rounded-md p-4';
|
|
35
|
+
const variants: Record<AlertVariant, string> = {
|
|
36
|
+
error: 'bg-red-50 text-red-800 border border-red-200',
|
|
37
|
+
success: 'bg-green-50 text-green-800 border border-green-200',
|
|
38
|
+
info: 'bg-blue-50 text-blue-800 border border-blue-200',
|
|
39
|
+
default: 'bg-slate-50 text-slate-800 border border-slate-200',
|
|
40
|
+
};
|
|
41
|
+
return `${base} ${variants[this.variant()] ?? variants.default}`;
|
|
42
|
+
});
|
|
62
43
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# MEE Confirmation
|
|
2
|
+
|
|
3
|
+
```typescript
|
|
4
|
+
import { confirmationPortal } from '@/ui/confirmation';
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
const confirmation = confirmationPortal();
|
|
11
|
+
confirmation.open({
|
|
12
|
+
title: 'Confirmation',
|
|
13
|
+
description: 'This is a confirmation dialog.',
|
|
14
|
+
actions: [
|
|
15
|
+
{
|
|
16
|
+
text: 'Cancel',
|
|
17
|
+
type: 'secondary', // ButtonVariant
|
|
18
|
+
handler: close => close(),
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
text: 'OK',
|
|
22
|
+
type: 'primary', // ButtonVariant
|
|
23
|
+
handler: close => {
|
|
24
|
+
okHandler();
|
|
25
|
+
close();
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
function okHandler() {
|
|
32
|
+
console.log('OK');
|
|
33
|
+
}
|
|
34
|
+
```
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
|
|
2
|
+
import { DialogInput, DialogOptions, DialogRef } from '@ngbase/adk/portal';
|
|
3
|
+
import { Button, ButtonVariant } from '<%= basepath %>/button';
|
|
4
|
+
import { dialogPortal } from '<%= basepath %>/dialog';
|
|
5
|
+
|
|
6
|
+
export interface ConfirmationOptions {
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
actions?: {
|
|
10
|
+
text: string;
|
|
11
|
+
type?: ButtonVariant;
|
|
12
|
+
handler: (fn: (v?: any) => any) => any;
|
|
13
|
+
}[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function ConfirmationPortal() {
|
|
17
|
+
const base = dialogPortal();
|
|
18
|
+
|
|
19
|
+
function open<T>(opt: ConfirmationOptions, comp?: DialogInput<T>) {
|
|
20
|
+
const options: DialogOptions = {
|
|
21
|
+
...new DialogOptions(),
|
|
22
|
+
data: opt,
|
|
23
|
+
title: opt.title,
|
|
24
|
+
width: '32rem',
|
|
25
|
+
maxWidth: '95vw',
|
|
26
|
+
disableClose: true,
|
|
27
|
+
header: true,
|
|
28
|
+
focusTrap: true,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const diaRef = base.open(comp || Confirmation, options);
|
|
32
|
+
|
|
33
|
+
return diaRef;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function closeAll() {
|
|
37
|
+
base.closeAll();
|
|
38
|
+
}
|
|
39
|
+
return { open, closeAll };
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@Component({
|
|
43
|
+
selector: '<%= name %>-confirmation',
|
|
44
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
45
|
+
imports: [Button],
|
|
46
|
+
template: `
|
|
47
|
+
<!-- <h4 class="mb-2 text-base font-bold">{{ data?.title }}</h4> -->
|
|
48
|
+
<p class="text-muted-foreground pb-3">{{ data?.description }}</p>
|
|
49
|
+
<div class="flex justify-end gap-4 pt-1">
|
|
50
|
+
@for (action of data?.actions; track action) {
|
|
51
|
+
<button [<%= name %>Button]="action.type || 'primary'" (click)="action.handler(diaRef.close)">
|
|
52
|
+
{{ action.text }}
|
|
53
|
+
</button>
|
|
54
|
+
}
|
|
55
|
+
</div>
|
|
56
|
+
`,
|
|
57
|
+
})
|
|
58
|
+
export class Confirmation {
|
|
59
|
+
diaRef = inject<DialogRef<ConfirmationOptions>>(DialogRef);
|
|
60
|
+
|
|
61
|
+
data = this.diaRef.options?.data;
|
|
62
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './confirmation';
|
|
@@ -40,7 +40,8 @@ export class DatePicker<D> extends NgbDatePicker<D> {}
|
|
|
40
40
|
exportAs: '<%= name %>DatepickerTrigger',
|
|
41
41
|
providers: [registerDatePicker(DatePicker), aliasDatePickerTrigger(DatepickerTrigger)],
|
|
42
42
|
host: {
|
|
43
|
-
class:
|
|
43
|
+
class:
|
|
44
|
+
'cursor-pointer hover:bg-muted outline-none w-full bg-transparent placeholder:text-gray-400',
|
|
44
45
|
},
|
|
45
46
|
})
|
|
46
47
|
export class DatepickerTrigger<D> extends NgbDatepickerTrigger<D> {}
|
|
@@ -49,7 +49,7 @@ export class FormField {
|
|
|
49
49
|
selector: '[<%= name %>Input]',
|
|
50
50
|
hostDirectives: [{ directive: InputBase, inputs: ['value'], outputs: ['valueChange'] }],
|
|
51
51
|
host: {
|
|
52
|
-
class: 'outline-none w-full bg-transparent',
|
|
52
|
+
class: 'outline-none w-full bg-transparent placeholder:text-gray-400',
|
|
53
53
|
'[class.border-red-500]': 'formField?.hasErrors()',
|
|
54
54
|
},
|
|
55
55
|
})
|
|
@@ -5,12 +5,13 @@ import { IconType, NgIconComponent } from '@ng-icons/core';
|
|
|
5
5
|
selector: '<%= name %>-icon',
|
|
6
6
|
imports: [NgIconComponent],
|
|
7
7
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8
|
-
template: `<ng-icon [name]="name()" [size]="size()"></ng-icon>`,
|
|
8
|
+
template: `<ng-icon [name]="name()" [svg]="svg()" [size]="size()"></ng-icon>`,
|
|
9
9
|
host: {
|
|
10
10
|
class: 'inline-flex items-center justify-center',
|
|
11
11
|
},
|
|
12
12
|
})
|
|
13
13
|
export class Icon {
|
|
14
|
-
readonly name = input
|
|
14
|
+
readonly name = input<IconType>();
|
|
15
15
|
readonly size = input<string>('1rem');
|
|
16
|
+
readonly svg = input<string>();
|
|
16
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, input } from '@angular/core';
|
|
1
|
+
import { Component, input, numberAttribute } from '@angular/core';
|
|
2
2
|
|
|
3
3
|
@Component({
|
|
4
4
|
selector: '<%= name %>-spinner',
|
|
@@ -45,7 +45,7 @@ import { Component, input } from '@angular/core';
|
|
|
45
45
|
})
|
|
46
46
|
export class Spinner {
|
|
47
47
|
readonly mode = input<'light' | 'dark' | ''>('light');
|
|
48
|
-
readonly diameter = input
|
|
49
|
-
readonly strokeWidth = input
|
|
48
|
+
readonly diameter = input(35, { transform: numberAttribute });
|
|
49
|
+
readonly strokeWidth = input(3, { transform: numberAttribute });
|
|
50
50
|
readonly root = input<boolean>(false);
|
|
51
51
|
}
|
|
@@ -7,21 +7,22 @@
|
|
|
7
7
|
"name": {
|
|
8
8
|
"description": "The name of the component prefix.",
|
|
9
9
|
"x-prompt": "What is the name of the component prefix?",
|
|
10
|
-
"type": "string"
|
|
10
|
+
"type": "string",
|
|
11
|
+
"default": "mee"
|
|
11
12
|
},
|
|
12
13
|
"path": {
|
|
13
14
|
"description": "Where should be created the file",
|
|
14
15
|
"type": "string",
|
|
15
16
|
"format": "path",
|
|
16
17
|
"x-prompt": "Where should be created the file?",
|
|
17
|
-
"default": "src/app"
|
|
18
|
+
"default": "src/app/ui"
|
|
18
19
|
},
|
|
19
20
|
"basepath": {
|
|
20
21
|
"description": "The base path of the UI library.",
|
|
21
22
|
"type": "string",
|
|
22
23
|
"format": "path",
|
|
23
24
|
"x-prompt": "What is the base path of the UI library?",
|
|
24
|
-
"default": "
|
|
25
|
+
"default": "@/ui"
|
|
25
26
|
},
|
|
26
27
|
"component": {
|
|
27
28
|
"description": "The file extension or preprocessor to use for style files.",
|