@mgremy/ng-primitives 0.5.0 → 0.7.0
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/fesm2022/mgremy-ng-primitives-toast.mjs +34 -0
- package/fesm2022/mgremy-ng-primitives-toast.mjs.map +1 -0
- package/package.json +5 -13
- package/theme/components/accordion.css +9 -5
- package/theme/components/button.css +29 -1
- package/theme/components/combobox.css +5 -5
- package/theme/components/input.css +1 -1
- package/theme/components/menu.css +2 -2
- package/theme/components/pagination.css +48 -44
- package/theme/components/toast.css +124 -0
- package/theme/components/tooltip.css +2 -2
- package/theme/mgnp.css +15 -0
- package/theme/ngp_tw.css +1 -0
- package/{table → toast}/README.md +2 -2
- package/types/mgremy-ng-primitives-toast.d.ts +11 -0
- package/fesm2022/mgremy-ng-primitives-loader.mjs +0 -59
- package/fesm2022/mgremy-ng-primitives-loader.mjs.map +0 -1
- package/fesm2022/mgremy-ng-primitives-table.mjs +0 -50
- package/fesm2022/mgremy-ng-primitives-table.mjs.map +0 -1
- package/loader/README.md +0 -4
- package/types/mgremy-ng-primitives-loader.d.ts +0 -8
- package/types/mgremy-ng-primitives-table.d.ts +0 -28
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, Directive } from '@angular/core';
|
|
3
|
+
import { NgpToast } from 'ng-primitives/toast';
|
|
4
|
+
|
|
5
|
+
const options = ['ngpToast'];
|
|
6
|
+
const error = new Error(`MgnpToast must be used with ${options.join(' / ')}`);
|
|
7
|
+
class MgnpToast {
|
|
8
|
+
ngpToast = inject(NgpToast, { optional: true });
|
|
9
|
+
constructor() {
|
|
10
|
+
if (!this.ngpToast) {
|
|
11
|
+
console.error(this);
|
|
12
|
+
throw error;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MgnpToast, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
16
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.1", type: MgnpToast, isStandalone: true, selector: "[ngpToast][mgnpToast]", host: { attributes: { "data-mgnp-component": "mgnp-toast" } }, ngImport: i0 });
|
|
17
|
+
}
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MgnpToast, decorators: [{
|
|
19
|
+
type: Directive,
|
|
20
|
+
args: [{
|
|
21
|
+
selector: '[ngpToast][mgnpToast]',
|
|
22
|
+
standalone: true,
|
|
23
|
+
host: {
|
|
24
|
+
'data-mgnp-component': 'mgnp-toast'
|
|
25
|
+
},
|
|
26
|
+
}]
|
|
27
|
+
}], ctorParameters: () => [] });
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Generated bundle index. Do not edit.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
export { MgnpToast };
|
|
34
|
+
//# sourceMappingURL=mgremy-ng-primitives-toast.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mgremy-ng-primitives-toast.mjs","sources":["../../../../libs/ng-primitives/toast/src/lib/mgnp-toast/mgnp-toast.directive.ts","../../../../libs/ng-primitives/toast/src/mgremy-ng-primitives-toast.ts"],"sourcesContent":["import { Directive, inject } from '@angular/core';\nimport { NgpToast } from 'ng-primitives/toast';\n\nconst options = ['ngpToast'];\n\nconst error = new Error(`MgnpToast must be used with ${options.join(' / ')}`);\n\n@Directive({\n selector: '[ngpToast][mgnpToast]',\n standalone: true,\n host: {\n 'data-mgnp-component': 'mgnp-toast'\n },\n})\nexport class MgnpToast {\n protected readonly ngpToast = inject(NgpToast, { optional: true });\n\n constructor() {\n if (!this.ngpToast) {\n console.error(this);\n throw error;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA,MAAM,OAAO,GAAG,CAAC,UAAU,CAAC;AAE5B,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,CAAA,4BAAA,EAA+B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA,CAAE,CAAC;MAShE,SAAS,CAAA;IACD,QAAQ,GAAG,MAAM,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAElE,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;AAClB,YAAA,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;AACnB,YAAA,MAAM,KAAK;QACb;IACF;uGARW,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAT,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,qBAAA,EAAA,YAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBAPrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACJ,wBAAA,qBAAqB,EAAE;AACxB,qBAAA;AACF,iBAAA;;;ACbD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mgremy/ng-primitives",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"homepage": "https://doc.mgremy.xyz/ng-primitives",
|
|
6
6
|
"publishConfig": {
|
|
@@ -10,13 +10,9 @@
|
|
|
10
10
|
"url": "https://github.com/MGREMY/nx_source"
|
|
11
11
|
},
|
|
12
12
|
"peerDependencies": {
|
|
13
|
-
"@angular/common": "^21.1.0",
|
|
14
13
|
"@angular/core": "^21.1.0",
|
|
15
14
|
"ng-primitives": "^0.110.0",
|
|
16
|
-
"tailwindcss": "^4.0.0"
|
|
17
|
-
"@ng-icons/core": "^33.0.0",
|
|
18
|
-
"@ng-icons/flag-icons": "^33.0.0",
|
|
19
|
-
"@ng-icons/heroicons": "^33.0.0"
|
|
15
|
+
"tailwindcss": "^4.0.0"
|
|
20
16
|
},
|
|
21
17
|
"sideEffects": false,
|
|
22
18
|
"exports": {
|
|
@@ -46,10 +42,6 @@
|
|
|
46
42
|
"types": "./types/mgremy-ng-primitives-input.d.ts",
|
|
47
43
|
"default": "./fesm2022/mgremy-ng-primitives-input.mjs"
|
|
48
44
|
},
|
|
49
|
-
"./loader": {
|
|
50
|
-
"types": "./types/mgremy-ng-primitives-loader.d.ts",
|
|
51
|
-
"default": "./fesm2022/mgremy-ng-primitives-loader.mjs"
|
|
52
|
-
},
|
|
53
45
|
"./menu": {
|
|
54
46
|
"types": "./types/mgremy-ng-primitives-menu.d.ts",
|
|
55
47
|
"default": "./fesm2022/mgremy-ng-primitives-menu.mjs"
|
|
@@ -58,9 +50,9 @@
|
|
|
58
50
|
"types": "./types/mgremy-ng-primitives-pagination.d.ts",
|
|
59
51
|
"default": "./fesm2022/mgremy-ng-primitives-pagination.mjs"
|
|
60
52
|
},
|
|
61
|
-
"./
|
|
62
|
-
"types": "./types/mgremy-ng-primitives-
|
|
63
|
-
"default": "./fesm2022/mgremy-ng-primitives-
|
|
53
|
+
"./toast": {
|
|
54
|
+
"types": "./types/mgremy-ng-primitives-toast.d.ts",
|
|
55
|
+
"default": "./fesm2022/mgremy-ng-primitives-toast.mjs"
|
|
64
56
|
},
|
|
65
57
|
"./tooltip": {
|
|
66
58
|
"types": "./types/mgremy-ng-primitives-tooltip.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
@utility mgnp-accordion-content {
|
|
12
12
|
overflow: hidden;
|
|
13
13
|
font-size: --spacing(3.5);
|
|
14
|
-
color: var(--
|
|
14
|
+
color: var(--ngp-text-secondary);
|
|
15
15
|
|
|
16
16
|
@variant data-open {
|
|
17
17
|
animation: accordion-show var(--default-transition-duration) var(--default-transition-timing-function) forwards;
|
|
@@ -61,6 +61,10 @@
|
|
|
61
61
|
color: var(--ngp-text-secondary);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
ng-icon {
|
|
65
|
+
transition: transform var(--default-transition-duration) var(--default-transition-timing-function);
|
|
66
|
+
}
|
|
67
|
+
|
|
64
68
|
@variant data-open {
|
|
65
69
|
ng-icon {
|
|
66
70
|
transform: rotate(180deg);
|
|
@@ -70,19 +74,19 @@
|
|
|
70
74
|
|
|
71
75
|
@layer base {
|
|
72
76
|
[mgnpAccordion][data-mgnp-component='mgnp-accordion'] {
|
|
73
|
-
@apply mgnp-accordion;
|
|
77
|
+
@apply mgnp-accordion transition;
|
|
74
78
|
}
|
|
75
79
|
|
|
76
80
|
[mgnpAccordionContent][data-mgnp-component='mgnp-accordion-content'] {
|
|
77
|
-
@apply mgnp-accordion-content;
|
|
81
|
+
@apply mgnp-accordion-content transition;
|
|
78
82
|
}
|
|
79
83
|
|
|
80
84
|
[mgnpAccordionItem][data-mgnp-component='mgnp-accordion-item'] {
|
|
81
|
-
@apply mgnp-accordion-item;
|
|
85
|
+
@apply mgnp-accordion-item transition;
|
|
82
86
|
}
|
|
83
87
|
|
|
84
88
|
[ngpAccordionTrigger][mgnpButton][data-mgnp-component='mgnp-button'] {
|
|
85
|
-
@apply mgnp-accordion-trigger;
|
|
89
|
+
@apply mgnp-accordion-trigger transition;
|
|
86
90
|
}
|
|
87
91
|
}
|
|
88
92
|
|
|
@@ -120,6 +120,10 @@
|
|
|
120
120
|
--ngp-background: var(--mg-background-ui-inverse);
|
|
121
121
|
--ngp-text-primary: var(--mg-text-inverse);
|
|
122
122
|
}
|
|
123
|
+
|
|
124
|
+
@variant data-press {
|
|
125
|
+
--ngp-background: var(--mg-background-ui-inverse-active);
|
|
126
|
+
}
|
|
123
127
|
}
|
|
124
128
|
|
|
125
129
|
@variant data-[mgnp-color=primary] {
|
|
@@ -130,6 +134,10 @@
|
|
|
130
134
|
@variant data-hover {
|
|
131
135
|
--ngp-background: var(--mg-background-primary);
|
|
132
136
|
}
|
|
137
|
+
|
|
138
|
+
@variant data-press {
|
|
139
|
+
--ngp-background: var(--mg-background-primary-inverse-active);
|
|
140
|
+
}
|
|
133
141
|
}
|
|
134
142
|
|
|
135
143
|
@variant data-[mgnp-color=secondary] {
|
|
@@ -140,6 +148,10 @@
|
|
|
140
148
|
@variant data-hover {
|
|
141
149
|
--ngp-background: var(--mg-background-secondary);
|
|
142
150
|
}
|
|
151
|
+
|
|
152
|
+
@variant data-press {
|
|
153
|
+
--ngp-background: var(--mg-background-secondary-inverse-active);
|
|
154
|
+
}
|
|
143
155
|
}
|
|
144
156
|
|
|
145
157
|
@variant data-[mgnp-color=info] {
|
|
@@ -150,6 +162,10 @@
|
|
|
150
162
|
@variant data-hover {
|
|
151
163
|
--ngp-background: var(--mg-background-info);
|
|
152
164
|
}
|
|
165
|
+
|
|
166
|
+
@variant data-press {
|
|
167
|
+
--ngp-background: var(--mg-background-info-inverse-active);
|
|
168
|
+
}
|
|
153
169
|
}
|
|
154
170
|
|
|
155
171
|
@variant data-[mgnp-color=success] {
|
|
@@ -160,6 +176,10 @@
|
|
|
160
176
|
@variant data-hover {
|
|
161
177
|
--ngp-background: var(--mg-background-success);
|
|
162
178
|
}
|
|
179
|
+
|
|
180
|
+
@variant data-press {
|
|
181
|
+
--ngp-background: var(--mg-background-success-inverse-active);
|
|
182
|
+
}
|
|
163
183
|
}
|
|
164
184
|
|
|
165
185
|
@variant data-[mgnp-color=warning] {
|
|
@@ -170,6 +190,10 @@
|
|
|
170
190
|
@variant data-hover {
|
|
171
191
|
--ngp-background: var(--mg-background-warning);
|
|
172
192
|
}
|
|
193
|
+
|
|
194
|
+
@variant data-press {
|
|
195
|
+
--ngp-background: var(--mg-background-warning-inverse-active);
|
|
196
|
+
}
|
|
173
197
|
}
|
|
174
198
|
|
|
175
199
|
@variant data-[mgnp-color=danger] {
|
|
@@ -180,12 +204,16 @@
|
|
|
180
204
|
@variant data-hover {
|
|
181
205
|
--ngp-background: var(--mg-background-danger);
|
|
182
206
|
}
|
|
207
|
+
|
|
208
|
+
@variant data-press {
|
|
209
|
+
--ngp-background: var(--mg-background-danger-inverse-active);
|
|
210
|
+
}
|
|
183
211
|
}
|
|
184
212
|
}
|
|
185
213
|
}
|
|
186
214
|
|
|
187
215
|
@layer base {
|
|
188
216
|
[mgnpButton][data-mgnp-component='mgnp-button'] {
|
|
189
|
-
@apply mgnp-button;
|
|
217
|
+
@apply mgnp-button transition;
|
|
190
218
|
}
|
|
191
219
|
}
|
|
@@ -103,23 +103,23 @@
|
|
|
103
103
|
|
|
104
104
|
@layer base {
|
|
105
105
|
[mgnpCombobox][data-mgnp-component='mgnp-combobox'] {
|
|
106
|
-
@apply mgnp-combobox;
|
|
106
|
+
@apply mgnp-combobox transition;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
[mgnpComboboxInput][data-mgnp-component='mgnp-combobox-input'] {
|
|
110
|
-
@apply mgnp-combobox-input;
|
|
110
|
+
@apply mgnp-combobox-input transition;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
[ngpComboboxButton][mgnpButton][data-mgnp-component='mgnp-button'] {
|
|
114
|
-
@apply mgnp-combobox-button;
|
|
114
|
+
@apply mgnp-combobox-button transition;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
[mgnpComboboxDropdown][data-mgnp-component='mgnp-combobox-dropdown'] {
|
|
118
|
-
@apply mgnp-combobox-dropdown;
|
|
118
|
+
@apply mgnp-combobox-dropdown transition;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
[mgnpComboboxOption][data-mgnp-component='mgnp-combobox-option'] {
|
|
122
|
-
@apply mgnp-combobox-option;
|
|
122
|
+
@apply mgnp-combobox-option transition;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
|
|
53
53
|
@layer base {
|
|
54
54
|
[mgnpMenu][data-mgnp-component='mgnp-menu'] {
|
|
55
|
-
@apply mgnp-menu;
|
|
55
|
+
@apply mgnp-menu transition;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
[mgnpMenuItem][data-mgnp-component='mgnp-menu-item'] {
|
|
59
|
-
@apply mgnp-menu-item;
|
|
59
|
+
@apply mgnp-menu-item transition;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -4,65 +4,69 @@
|
|
|
4
4
|
align-items: center;
|
|
5
5
|
gap: --spacing(2);
|
|
6
6
|
}
|
|
7
|
+
}
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
font-weight: var(--font-weight-medium);
|
|
24
|
-
background-color: var(--ngp-background);
|
|
25
|
-
color: var(--ngp-text-primary);
|
|
26
|
-
box-shadow: var(--ngp-button-shadow);
|
|
9
|
+
@utility mgnp-pagination-button {
|
|
10
|
+
all: unset;
|
|
11
|
+
display: flex;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
outline-style: none;
|
|
16
|
+
width: --spacing(8);
|
|
17
|
+
height: --spacing(8);
|
|
18
|
+
border-radius: var(--radius-lg);
|
|
19
|
+
font-size: var(--text-sm);
|
|
20
|
+
font-weight: var(--font-weight-medium);
|
|
21
|
+
background-color: var(--ngp-background);
|
|
22
|
+
color: var(--ngp-text-primary);
|
|
23
|
+
box-shadow: var(--ngp-button-shadow);
|
|
27
24
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
25
|
+
@variant data-hover {
|
|
26
|
+
@variant not-data-disabled {
|
|
27
|
+
@variant not-data-selected {
|
|
28
|
+
background-color: var(--ngp-background-hover);
|
|
33
29
|
}
|
|
34
30
|
}
|
|
31
|
+
}
|
|
35
32
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
33
|
+
@variant data-focus-visible {
|
|
34
|
+
@variant not-data-disabled {
|
|
35
|
+
outline: 2px solid var(--ngp-focus-ring);
|
|
40
36
|
}
|
|
37
|
+
}
|
|
41
38
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
39
|
+
@variant data-press {
|
|
40
|
+
@variant not-data-disabled {
|
|
41
|
+
@variant not-data-selected {
|
|
42
|
+
background-color: var(--ngp-background-active);
|
|
47
43
|
}
|
|
48
44
|
}
|
|
45
|
+
}
|
|
49
46
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
@variant data-disabled {
|
|
48
|
+
cursor: not-allowed;
|
|
49
|
+
color: #d2d2d2;
|
|
50
|
+
box-shadow: none;
|
|
51
|
+
background-color: var(--ngp-background-disabled);
|
|
52
|
+
}
|
|
56
53
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
54
|
+
@variant data-selected {
|
|
55
|
+
background-color: var(--ngp-background-inverse);
|
|
56
|
+
color: var(--ngp-text-inverse);
|
|
61
57
|
}
|
|
62
58
|
}
|
|
63
59
|
|
|
64
60
|
@layer base {
|
|
65
61
|
[ngpPagination][data-mgnp-component='mgnp-pagination'] {
|
|
66
|
-
@apply mgnp-pagination;
|
|
62
|
+
@apply mgnp-pagination transition;
|
|
63
|
+
|
|
64
|
+
[ngpPaginationFirst],
|
|
65
|
+
[ngpPaginationPrevious],
|
|
66
|
+
[ngpPaginationButton],
|
|
67
|
+
[ngpPaginationNext],
|
|
68
|
+
[ngpPaginationLast] {
|
|
69
|
+
@apply mgnp-pagination-button transition;
|
|
70
|
+
}
|
|
67
71
|
}
|
|
68
72
|
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
@utility mgnp-toast {
|
|
2
|
+
position: absolute;
|
|
3
|
+
touch-action: none;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: space-between;
|
|
8
|
+
height: fit-content;
|
|
9
|
+
padding: --spacing(3) --spacing(4);
|
|
10
|
+
border-radius: --spacing(2);
|
|
11
|
+
width: --spacing(87.5);
|
|
12
|
+
border: 1px solid var(--ngp-border);
|
|
13
|
+
background: var(--ngp-background);
|
|
14
|
+
box-shadow: var(--ngp-shadow);
|
|
15
|
+
z-index: var(--ngp-toast-z-index);
|
|
16
|
+
transform: var(--y);
|
|
17
|
+
|
|
18
|
+
@variant data-enter {
|
|
19
|
+
opacity: 1;
|
|
20
|
+
--y: translateY(0);
|
|
21
|
+
animation: toast-slide-in var(--default-transition-duration) var(--default-transition-timing-function);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@variant data-exit {
|
|
25
|
+
opacity: 0;
|
|
26
|
+
transform: translateY(100%);
|
|
27
|
+
transition:
|
|
28
|
+
opacity var(--default-transition-duration) var(--default-transition-timing-function),
|
|
29
|
+
transform var(--default-transition-duration) var(--default-transition-timing-function);
|
|
30
|
+
--y: translateY(calc(calc(var(--lift) * var(--ngp-toast-gap)) * -1));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@variant data-[visible=false] {
|
|
34
|
+
opacity: 0;
|
|
35
|
+
pointer-events: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@variant data-[position-x=end] {
|
|
39
|
+
right: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@variant data-[position-x=start] {
|
|
43
|
+
left: 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@variant data-[position-y=top] {
|
|
47
|
+
top: 0;
|
|
48
|
+
--lift: 1;
|
|
49
|
+
--lift-amount: calc(var(--lift) * var(--ngp-toast-gap));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@variant data-[position-y=bottom] {
|
|
53
|
+
bottom: 0;
|
|
54
|
+
--lift: -1;
|
|
55
|
+
--lift-amount: calc(var(--lift) * var(--ngp-toast-gap));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@variant data-[expanded=true] {
|
|
59
|
+
--y: translateY(calc(var(--lift) * var(--ngp-toast-offset)));
|
|
60
|
+
height: auto;
|
|
61
|
+
|
|
62
|
+
::after {
|
|
63
|
+
content: '';
|
|
64
|
+
position: absolute;
|
|
65
|
+
left: 0;
|
|
66
|
+
height: calc(var(--ngp-toast-gap) + 1px);
|
|
67
|
+
bottom: 100%;
|
|
68
|
+
width: 100%;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@variant data-[expanded=false] {
|
|
73
|
+
@variant data-[front=false] {
|
|
74
|
+
--scale: var(--ngp-toasts-before) * 0.05 + 1;
|
|
75
|
+
--y: translateY(calc(var(--lift-amount) * var(--ngp-toasts-before)))
|
|
76
|
+
scale(calc(-1 * var(--scale)));
|
|
77
|
+
height: var(--ngp-toast-front-height);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@variant data-[swiping=true] {
|
|
82
|
+
transform: var(--y) translateY(var(--ngp-toast-swipe-amount-y, 0))
|
|
83
|
+
translateX(var(--ngp-toast-swipe-amount-x, 0));
|
|
84
|
+
|
|
85
|
+
@variant data-[swipe-direction=left] {
|
|
86
|
+
/* Fade out from -45px to -100px swipe */
|
|
87
|
+
opacity: calc(1 - clamp(0, ((-1 * var(--ngp-toast-swipe-x, 0px)) - 45) / 55, 1));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@variant data-[swipe-direction=right] {
|
|
91
|
+
/* Fade out from 45px to 100px swipe */
|
|
92
|
+
opacity: calc(1 - clamp(0, (var(--ngp-toast-swipe-x, 0px) - 45) / 55, 1));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@variant data-[swipe-direction=top] {
|
|
96
|
+
/* Fade out from -45px to -100px swipe */
|
|
97
|
+
opacity: calc(1 - clamp(0, ((-1 * var(--ngp-toast-swipe-y, 0px)) - 45) / 55, 1));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@variant data-[swipe-direction=bottom] {
|
|
101
|
+
/* Fade out from 45px to 100px swipe */
|
|
102
|
+
opacity: calc(1 - clamp(0, (var(--ngp-toast-swipe-y, 0px) - 45) / 55, 1));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@layer base {
|
|
108
|
+
[mgnpToast][data-mgnp-component='mgnp-toast'] {
|
|
109
|
+
@apply mgnp-toast transition;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@theme {
|
|
114
|
+
@keyframes toast-slide-in {
|
|
115
|
+
from {
|
|
116
|
+
opacity: 0;
|
|
117
|
+
transform: translateY(100%);
|
|
118
|
+
}
|
|
119
|
+
to {
|
|
120
|
+
opacity: 1;
|
|
121
|
+
transform: translateY(0);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
|
|
38
38
|
@layer base {
|
|
39
39
|
[mgnpTooltip][data-mgnp-component='mgnp-tooltip'] {
|
|
40
|
-
@apply mgnp-tooltip;
|
|
40
|
+
@apply mgnp-tooltip transition;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
[mgnpTooltipArrow][data-mgnp-component='mgnp-tooltip-arrow'] {
|
|
44
|
-
@apply mgnp-tooltip-arrow;
|
|
44
|
+
@apply mgnp-tooltip-arrow transition;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
package/theme/mgnp.css
CHANGED
|
@@ -11,42 +11,49 @@
|
|
|
11
11
|
--mg-background-ui-hover: var(--color-stone-100);
|
|
12
12
|
--mg-background-ui-active: var(--color-stone-200);
|
|
13
13
|
--mg-background-ui-inverse: var(--color-stone-900);
|
|
14
|
+
--mg-background-ui-inverse-active: var(--color-stone-700);
|
|
14
15
|
--mg-background-ui-disabled: var(--color-stone-100);
|
|
15
16
|
/* Primary */
|
|
16
17
|
--mg-background-primary: var(--color-blue-400);
|
|
17
18
|
--mg-background-primary-hover: var(--color-blue-500);
|
|
18
19
|
--mg-background-primary-active: var(--color-blue-600);
|
|
19
20
|
--mg-background-primary-inverse: var(--color-blue-900);
|
|
21
|
+
--mg-background-primary-inverse-active: var(--color-blue-700);
|
|
20
22
|
--mg-background-primary-disabled: var(--color-blue-100);
|
|
21
23
|
/* Secondary */
|
|
22
24
|
--mg-background-secondary: var(--color-emerald-400);
|
|
23
25
|
--mg-background-secondary-hover: var(--color-emerald-500);
|
|
24
26
|
--mg-background-secondary-active: var(--color-emerald-600);
|
|
25
27
|
--mg-background-secondary-inverse: var(--color-emerald-900);
|
|
28
|
+
--mg-background-secondary-inverse-active: var(--color-emerald-700);
|
|
26
29
|
--mg-background-secondary-disabled: var(--color-emerald-100);
|
|
27
30
|
/* Info */
|
|
28
31
|
--mg-background-info: var(--color-blue-400);
|
|
29
32
|
--mg-background-info-hover: var(--color-blue-500);
|
|
30
33
|
--mg-background-info-active: var(--color-blue-600);
|
|
31
34
|
--mg-background-info-inverse: var(--color-blue-900);
|
|
35
|
+
--mg-background-info-inverse-active: var(--color-blue-700);
|
|
32
36
|
--mg-background-info-disabled: var(--color-blue-100);
|
|
33
37
|
/* Success */
|
|
34
38
|
--mg-background-success: var(--color-green-400);
|
|
35
39
|
--mg-background-success-hover: var(--color-green-500);
|
|
36
40
|
--mg-background-success-active: var(--color-green-600);
|
|
37
41
|
--mg-background-success-inverse: var(--color-green-900);
|
|
42
|
+
--mg-background-success-inverse-active: var(--color-green-700);
|
|
38
43
|
--mg-background-success-disabled: var(--color-green-100);
|
|
39
44
|
/* Warning */
|
|
40
45
|
--mg-background-warning: var(--color-yellow-400);
|
|
41
46
|
--mg-background-warning-hover: var(--color-yellow-500);
|
|
42
47
|
--mg-background-warning-active: var(--color-yellow-600);
|
|
43
48
|
--mg-background-warning-inverse: var(--color-yellow-900);
|
|
49
|
+
--mg-background-warning-inverse-active: var(--color-yellow-700);
|
|
44
50
|
--mg-background-warning-disabled: var(--color-yellow-100);
|
|
45
51
|
/* Danger */
|
|
46
52
|
--mg-background-danger: var(--color-red-400);
|
|
47
53
|
--mg-background-danger-hover: var(--color-red-500);
|
|
48
54
|
--mg-background-danger-active: var(--color-red-600);
|
|
49
55
|
--mg-background-danger-inverse: var(--color-red-900);
|
|
56
|
+
--mg-background-danger-inverse-active: var(--color-red-700);
|
|
50
57
|
--mg-background-danger-disabled: var(--color-red-100);
|
|
51
58
|
|
|
52
59
|
/* Border */
|
|
@@ -138,6 +145,7 @@
|
|
|
138
145
|
--background-color-ui-hover: var(--mg-background-ui-hover);
|
|
139
146
|
--background-color-ui-active: var(--mg-background-ui-active);
|
|
140
147
|
--background-color-ui-inverse: var(--mg-background-ui-inverse);
|
|
148
|
+
--background-color-ui-inverse-active: var(--mg-background-ui-inverse-active);
|
|
141
149
|
--background-color-ui-disabled: var(--mg-background-ui-disabled);
|
|
142
150
|
/* Primary */
|
|
143
151
|
--background-color-primary: var(--mg-background-primary);
|
|
@@ -296,42 +304,49 @@
|
|
|
296
304
|
--mg-background-ui-hover: var(--color-stone-800);
|
|
297
305
|
--mg-background-ui-active: var(--color-stone-700);
|
|
298
306
|
--mg-background-ui-inverse: var(--color-stone-50);
|
|
307
|
+
--mg-background-ui-inverse-active: var(--color-stone-200);
|
|
299
308
|
--mg-background-ui-disabled: var(--color-stone-900);
|
|
300
309
|
/* Primary */
|
|
301
310
|
--mg-background-primary: var(--color-blue-900);
|
|
302
311
|
--mg-background-primary-hover: var(--color-blue-800);
|
|
303
312
|
--mg-background-primary-active: var(--color-blue-700);
|
|
304
313
|
--mg-background-primary-inverse: var(--color-blue-50);
|
|
314
|
+
--mg-background-primary-inverse-active: var(--color-blue-600);
|
|
305
315
|
--mg-background-primary-disabled: var(--color-blue-900);
|
|
306
316
|
/* Secondary */
|
|
307
317
|
--mg-background-secondary: var(--color-emerald-900);
|
|
308
318
|
--mg-background-secondary-hover: var(--color-emerald-800);
|
|
309
319
|
--mg-background-secondary-active: var(--color-emerald-700);
|
|
310
320
|
--mg-background-secondary-inverse: var(--color-emerald-50);
|
|
321
|
+
--mg-background-secondary-inverse-active: var(--color-emerald-600);
|
|
311
322
|
--mg-background-secondary-disabled: var(--color-emerald-900);
|
|
312
323
|
/* Info */
|
|
313
324
|
--mg-background-info: var(--color-blue-900);
|
|
314
325
|
--mg-background-info-hover: var(--color-blue-800);
|
|
315
326
|
--mg-background-info-active: var(--color-blue-700);
|
|
316
327
|
--mg-background-info-inverse: var(--color-blue-50);
|
|
328
|
+
--mg-background-info-inverse-active: var(--color-blue-600);
|
|
317
329
|
--mg-background-info-disabled: var(--color-blue-900);
|
|
318
330
|
/* Success */
|
|
319
331
|
--mg-background-success: var(--color-green-900);
|
|
320
332
|
--mg-background-success-hover: var(--color-green-800);
|
|
321
333
|
--mg-background-success-active: var(--color-green-700);
|
|
322
334
|
--mg-background-success-inverse: var(--color-green-50);
|
|
335
|
+
--mg-background-success-inverse-active: var(--color-green-600);
|
|
323
336
|
--mg-background-success-disabled: var(--color-green-900);
|
|
324
337
|
/* Warning */
|
|
325
338
|
--mg-background-warning: var(--color-yellow-900);
|
|
326
339
|
--mg-background-warning-hover: var(--color-yellow-800);
|
|
327
340
|
--mg-background-warning-active: var(--color-yellow-700);
|
|
328
341
|
--mg-background-warning-inverse: var(--color-yellow-50);
|
|
342
|
+
--mg-background-warning-inverse-active: var(--color-yellow-600);
|
|
329
343
|
--mg-background-warning-disabled: var(--color-yellow-900);
|
|
330
344
|
/* Danger */
|
|
331
345
|
--mg-background-danger: var(--color-red-900);
|
|
332
346
|
--mg-background-danger-hover: var(--color-red-800);
|
|
333
347
|
--mg-background-danger-active: var(--color-red-700);
|
|
334
348
|
--mg-background-danger-inverse: var(--color-red-50);
|
|
349
|
+
--mg-background-danger-inverse-active: var(--color-red-600);
|
|
335
350
|
--mg-background-danger-disabled: var(--color-red-900);
|
|
336
351
|
|
|
337
352
|
--mg-background-avatar: rgb(24, 24, 27);
|
package/theme/ngp_tw.css
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NgpToast } from 'ng-primitives/toast';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
|
|
4
|
+
declare class MgnpToast {
|
|
5
|
+
protected readonly ngpToast: NgpToast | null;
|
|
6
|
+
constructor();
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MgnpToast, never>;
|
|
8
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MgnpToast, "[ngpToast][mgnpToast]", never, {}, {}, never, never, true, never>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { MgnpToast };
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
class MgnpLoader {
|
|
5
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MgnpLoader, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: MgnpLoader, isStandalone: true, selector: "mgnp-loader", host: { attributes: { "data-mgnp-component": "mgnp-loader", "role": "status" } }, providers: [], ngImport: i0, template: `
|
|
7
|
-
<svg
|
|
8
|
-
aria-hidden="true"
|
|
9
|
-
viewBox="0 0 100 101"
|
|
10
|
-
fill="none"
|
|
11
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
12
|
-
class="size-8 animate-spin fill-(--text-primary) text-(--bg-ui)">
|
|
13
|
-
<path
|
|
14
|
-
d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
|
|
15
|
-
fill="currentColor" />
|
|
16
|
-
<path
|
|
17
|
-
d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
|
|
18
|
-
fill="currentFill" />
|
|
19
|
-
</svg>
|
|
20
|
-
<span class="sr-only">Loading...</span>
|
|
21
|
-
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
22
|
-
}
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MgnpLoader, decorators: [{
|
|
24
|
-
type: Component,
|
|
25
|
-
args: [{
|
|
26
|
-
selector: 'mgnp-loader',
|
|
27
|
-
imports: [],
|
|
28
|
-
standalone: true,
|
|
29
|
-
template: `
|
|
30
|
-
<svg
|
|
31
|
-
aria-hidden="true"
|
|
32
|
-
viewBox="0 0 100 101"
|
|
33
|
-
fill="none"
|
|
34
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
35
|
-
class="size-8 animate-spin fill-(--text-primary) text-(--bg-ui)">
|
|
36
|
-
<path
|
|
37
|
-
d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
|
|
38
|
-
fill="currentColor" />
|
|
39
|
-
<path
|
|
40
|
-
d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
|
|
41
|
-
fill="currentFill" />
|
|
42
|
-
</svg>
|
|
43
|
-
<span class="sr-only">Loading...</span>
|
|
44
|
-
`,
|
|
45
|
-
providers: [],
|
|
46
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
47
|
-
host: {
|
|
48
|
-
'data-mgnp-component': 'mgnp-loader',
|
|
49
|
-
role: 'status',
|
|
50
|
-
},
|
|
51
|
-
}]
|
|
52
|
-
}] });
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Generated bundle index. Do not edit.
|
|
56
|
-
*/
|
|
57
|
-
|
|
58
|
-
export { MgnpLoader };
|
|
59
|
-
//# sourceMappingURL=mgremy-ng-primitives-loader.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mgremy-ng-primitives-loader.mjs","sources":["../../../../libs/ng-primitives/loader/src/lib/mgnp-loader/mgnp-loader.component.ts","../../../../libs/ng-primitives/loader/src/mgremy-ng-primitives-loader.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'mgnp-loader',\n imports: [],\n standalone: true,\n template: `\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 100 101\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"size-8 animate-spin fill-(--text-primary) text-(--bg-ui)\">\n <path\n d=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\"\n fill=\"currentColor\" />\n <path\n d=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\"\n fill=\"currentFill\" />\n </svg>\n <span class=\"sr-only\">Loading...</span>\n `,\n providers: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'data-mgnp-component': 'mgnp-loader',\n role: 'status',\n },\n})\nexport class MgnpLoader {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MA6Ba,UAAU,CAAA;uGAAV,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAV,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,qBAAA,EAAA,aAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,EAAA,SAAA,EAPV,EAAE,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAhBH;;;;;;;;;;;;;;;AAeT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAQU,UAAU,EAAA,UAAA,EAAA,CAAA;kBA3BtB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;AAeT,EAAA,CAAA;AACD,oBAAA,SAAS,EAAE,EAAE;oBACb,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,qBAAqB,EAAE,aAAa;AACpC,wBAAA,IAAI,EAAE,QAAQ;AACf,qBAAA;AACF,iBAAA;;;AC5BD;;AAEG;;;;"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
-
|
|
5
|
-
class MgnpTable {
|
|
6
|
-
tableHeader = input(...(ngDevMode ? [undefined, { debugName: "tableHeader" }] : []));
|
|
7
|
-
tableBody = input(...(ngDevMode ? [undefined, { debugName: "tableBody" }] : []));
|
|
8
|
-
tableFooter = input(...(ngDevMode ? [undefined, { debugName: "tableFooter" }] : []));
|
|
9
|
-
data = input(...(ngDevMode ? [undefined, { debugName: "data" }] : []));
|
|
10
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MgnpTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: MgnpTable, isStandalone: true, selector: "mgnp-table, table[mgnpTable]", inputs: { tableHeader: { classPropertyName: "tableHeader", publicName: "tableHeader", isSignal: true, isRequired: false, transformFunction: null }, tableBody: { classPropertyName: "tableBody", publicName: "tableBody", isSignal: true, isRequired: false, transformFunction: null }, tableFooter: { classPropertyName: "tableFooter", publicName: "tableFooter", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, providers: [], ngImport: i0, template: "<thead>\n <ng-container [ngTemplateOutlet]=\"tableHeader()\" />\n</thead>\n<tbody>\n @for (item of data(); track $index) {\n <ng-container\n [ngTemplateOutlet]=\"tableBody()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n }\n</tbody>\n<tfoot>\n <ng-container [ngTemplateOutlet]=\"tableFooter()\" />\n</tfoot>\n", styles: ["@reference \"#mgnp.css\";:host{@apply w-full table-auto text-left text-sm;}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12
|
-
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MgnpTable, decorators: [{
|
|
14
|
-
type: Component,
|
|
15
|
-
args: [{ selector: 'mgnp-table, table[mgnpTable]', imports: [NgTemplateOutlet], standalone: true, providers: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<thead>\n <ng-container [ngTemplateOutlet]=\"tableHeader()\" />\n</thead>\n<tbody>\n @for (item of data(); track $index) {\n <ng-container\n [ngTemplateOutlet]=\"tableBody()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n }\n</tbody>\n<tfoot>\n <ng-container [ngTemplateOutlet]=\"tableFooter()\" />\n</tfoot>\n", styles: ["@reference \"#mgnp.css\";:host{@apply w-full table-auto text-left text-sm;}\n"] }]
|
|
16
|
-
}], propDecorators: { tableHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableHeader", required: false }] }], tableBody: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableBody", required: false }] }], tableFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableFooter", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
|
|
17
|
-
|
|
18
|
-
class MgnpTableBody {
|
|
19
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MgnpTableBody, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
20
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: MgnpTableBody, isStandalone: true, selector: "mgnp-table-body, tr[mgnpTableBody]", providers: [], ngImport: i0, template: "<ng-content />\n", styles: ["@reference \"#mgnp.css\";:host{@apply border-b border-b-(--border-secondary);}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
21
|
-
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MgnpTableBody, decorators: [{
|
|
23
|
-
type: Component,
|
|
24
|
-
args: [{ selector: 'mgnp-table-body, tr[mgnpTableBody]', imports: [], standalone: true, providers: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content />\n", styles: ["@reference \"#mgnp.css\";:host{@apply border-b border-b-(--border-secondary);}\n"] }]
|
|
25
|
-
}] });
|
|
26
|
-
|
|
27
|
-
class MgnpTableFooter {
|
|
28
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MgnpTableFooter, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: MgnpTableFooter, isStandalone: true, selector: "mgnp-table-footer, tr[mgnpTableFooter]", providers: [], ngImport: i0, template: "<ng-content />\n", styles: ["@reference \"#mgnp.css\";:host{@apply font-semibold;}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
30
|
-
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MgnpTableFooter, decorators: [{
|
|
32
|
-
type: Component,
|
|
33
|
-
args: [{ selector: 'mgnp-table-footer, tr[mgnpTableFooter]', imports: [], standalone: true, providers: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content />\n", styles: ["@reference \"#mgnp.css\";:host{@apply font-semibold;}\n"] }]
|
|
34
|
-
}] });
|
|
35
|
-
|
|
36
|
-
class MgnpTableHeader {
|
|
37
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MgnpTableHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
38
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: MgnpTableHeader, isStandalone: true, selector: "mgnp-table-header, tr[mgnpTableHeader]", providers: [], ngImport: i0, template: "<ng-content />\n", styles: ["@reference \"#mgnp.css\";:host{@apply bg-hover text-xs uppercase;}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
39
|
-
}
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MgnpTableHeader, decorators: [{
|
|
41
|
-
type: Component,
|
|
42
|
-
args: [{ selector: 'mgnp-table-header, tr[mgnpTableHeader]', imports: [], standalone: true, providers: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content />\n", styles: ["@reference \"#mgnp.css\";:host{@apply bg-hover text-xs uppercase;}\n"] }]
|
|
43
|
-
}] });
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Generated bundle index. Do not edit.
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
export { MgnpTable, MgnpTableBody, MgnpTableFooter, MgnpTableHeader };
|
|
50
|
-
//# sourceMappingURL=mgremy-ng-primitives-table.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mgremy-ng-primitives-table.mjs","sources":["../../../../libs/ng-primitives/table/src/lib/mgnp-table/mgnp-table.component.ts","../../../../libs/ng-primitives/table/src/lib/mgnp-table/mgnp-table.component.html","../../../../libs/ng-primitives/table/src/lib/mgnp-table-body/mgnp-table-body.component.ts","../../../../libs/ng-primitives/table/src/lib/mgnp-table-body/mgnp-table-body.component.html","../../../../libs/ng-primitives/table/src/lib/mgnp-table-footer/mgnp-table-footer.component.ts","../../../../libs/ng-primitives/table/src/lib/mgnp-table-footer/mgnp-table-footer.component.html","../../../../libs/ng-primitives/table/src/lib/mgnp-table-header/mgnp-table-header.component.ts","../../../../libs/ng-primitives/table/src/lib/mgnp-table-header/mgnp-table-header.component.html","../../../../libs/ng-primitives/table/src/mgremy-ng-primitives-table.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, input, TemplateRef } from '@angular/core';\n\n@Component({\n selector: 'mgnp-table, table[mgnpTable]',\n imports: [NgTemplateOutlet],\n standalone: true,\n templateUrl: './mgnp-table.component.html',\n styleUrl: './mgnp-table.component.css',\n providers: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MgnpTable {\n readonly tableHeader = input<TemplateRef<unknown>>();\n readonly tableBody = input<TemplateRef<unknown>>();\n readonly tableFooter = input<TemplateRef<unknown>>();\n\n readonly data = input<unknown[]>();\n}\n","<thead>\n <ng-container [ngTemplateOutlet]=\"tableHeader()\" />\n</thead>\n<tbody>\n @for (item of data(); track $index) {\n <ng-container\n [ngTemplateOutlet]=\"tableBody()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n }\n</tbody>\n<tfoot>\n <ng-container [ngTemplateOutlet]=\"tableFooter()\" />\n</tfoot>\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'mgnp-table-body, tr[mgnpTableBody]',\n imports: [],\n standalone: true,\n templateUrl: './mgnp-table-body.component.html',\n styleUrl: './mgnp-table-body.component.css',\n providers: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MgnpTableBody {}\n","<ng-content />\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'mgnp-table-footer, tr[mgnpTableFooter]',\n imports: [],\n standalone: true,\n templateUrl: './mgnp-table-footer.component.html',\n styleUrl: './mgnp-table-footer.component.css',\n providers: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MgnpTableFooter {}\n","<ng-content />\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'mgnp-table-header, tr[mgnpTableHeader]',\n imports: [],\n standalone: true,\n templateUrl: './mgnp-table-header.component.html',\n styleUrl: './mgnp-table-header.component.css',\n providers: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MgnpTableHeader {}\n","<ng-content />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
|
package/loader/README.md
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
|
|
3
|
-
declare class MgnpLoader {
|
|
4
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MgnpLoader, never>;
|
|
5
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MgnpLoader, "mgnp-loader", never, {}, {}, never, never, true, never>;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export { MgnpLoader };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { TemplateRef } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
declare class MgnpTable {
|
|
5
|
-
readonly tableHeader: i0.InputSignal<TemplateRef<unknown> | undefined>;
|
|
6
|
-
readonly tableBody: i0.InputSignal<TemplateRef<unknown> | undefined>;
|
|
7
|
-
readonly tableFooter: i0.InputSignal<TemplateRef<unknown> | undefined>;
|
|
8
|
-
readonly data: i0.InputSignal<unknown[] | undefined>;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MgnpTable, never>;
|
|
10
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MgnpTable, "mgnp-table, table[mgnpTable]", never, { "tableHeader": { "alias": "tableHeader"; "required": false; "isSignal": true; }; "tableBody": { "alias": "tableBody"; "required": false; "isSignal": true; }; "tableFooter": { "alias": "tableFooter"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
declare class MgnpTableBody {
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MgnpTableBody, never>;
|
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MgnpTableBody, "mgnp-table-body, tr[mgnpTableBody]", never, {}, {}, never, ["*"], true, never>;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
declare class MgnpTableFooter {
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MgnpTableFooter, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MgnpTableFooter, "mgnp-table-footer, tr[mgnpTableFooter]", never, {}, {}, never, ["*"], true, never>;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
declare class MgnpTableHeader {
|
|
24
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MgnpTableHeader, never>;
|
|
25
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MgnpTableHeader, "mgnp-table-header, tr[mgnpTableHeader]", never, {}, {}, never, ["*"], true, never>;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { MgnpTable, MgnpTableBody, MgnpTableFooter, MgnpTableHeader };
|