@zanichelli/albe-web-components 2.18.0 → 2.18.4
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/CHANGELOG.md +18 -0
- package/dist/cjs/{index-156c65fe.js → index-2e494cc2.js} +0 -12
- package/dist/cjs/{index-5c40f36c.js → index-66eb89b1.js} +36 -6
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{utils-2a89d30b.js → utils-2636e75b.js} +1 -1
- package/dist/cjs/web-components-library.cjs.js +2 -2
- package/dist/cjs/{contextual-menu_65.cjs.entry.js → z-alert_65.cjs.entry.js} +86 -90
- package/dist/cjs/z-app-header.cjs.entry.js +1 -1
- package/dist/cjs/z-candybar.cjs.entry.js +1 -1
- package/dist/cjs/z-cookiebar.cjs.entry.js +2 -2
- package/dist/cjs/z-header.cjs.entry.js +2 -2
- package/dist/cjs/z-heading.cjs.entry.js +1 -1
- package/dist/cjs/z-messages-pocket.cjs.entry.js +2 -2
- package/dist/cjs/z-modal-login.cjs.entry.js +3 -3
- package/dist/cjs/z-modal.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +2 -2
- package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-info.cjs.entry.js +3 -3
- package/dist/cjs/z-navigation-tab.cjs.entry.js +1 -1
- package/dist/cjs/z-navigation-tabs.cjs.entry.js +2 -2
- package/dist/cjs/z-otp.cjs.entry.js +2 -2
- package/dist/cjs/z-pocket-message.cjs.entry.js +1 -1
- package/dist/cjs/z-pocket_3.cjs.entry.js +3 -3
- package/dist/cjs/z-registro-table-footer.cjs.entry.js +1 -1
- package/dist/cjs/z-slideshow.cjs.entry.js +3 -3
- package/dist/cjs/z-toast-notification-list.cjs.entry.js +56 -0
- package/dist/cjs/z-toast-notification.cjs.entry.js +202 -0
- package/dist/collection/beans/index.js +36 -6
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/buttons/z-button/index.js +3 -3
- package/dist/collection/components/buttons/z-button/styles.css +33 -0
- package/dist/collection/components/list/z-list-element/index.js +2 -2
- package/dist/collection/components/list/z-toast-notification-list/index.js +97 -0
- package/dist/collection/components/list/z-toast-notification-list/styles.css +107 -0
- package/dist/collection/components/modal/z-modal-login/index.js +20 -3
- package/dist/collection/components/navigation/z-link/index.js +16 -16
- package/dist/collection/components/navigation/z-link/styles.css +10 -11
- package/dist/collection/components/navigation/z-user-dropdown/index.js +5 -7
- package/dist/collection/components/navigation/z-user-dropdown/styles.css +0 -6
- package/dist/collection/components/notification/z-toast-notification/index.js +402 -0
- package/dist/collection/components/notification/z-toast-notification/styles.css +247 -0
- package/dist/collection/components/{contextual-menu → z-contextual-menu}/index.js +9 -9
- package/dist/collection/components/{contextual-menu → z-contextual-menu}/styles.css +8 -14
- package/dist/collection/snowflakes/registro-table/z-registro-table-header/index.js +38 -15
- package/dist/collection/snowflakes/registro-table/z-registro-table-header/styles.css +0 -4
- package/dist/esm/{index-c46a98db.js → index-6eb9a735.js} +1 -12
- package/dist/esm/{index-967c7341.js → index-98ce8389.js} +37 -7
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{utils-a9ad5ffb.js → utils-c7b22832.js} +1 -1
- package/dist/esm/web-components-library.js +2 -2
- package/dist/esm/{contextual-menu_65.entry.js → z-alert_65.entry.js} +86 -90
- package/dist/esm/z-app-header.entry.js +1 -1
- package/dist/esm/z-candybar.entry.js +1 -1
- package/dist/esm/z-cookiebar.entry.js +2 -2
- package/dist/esm/z-header.entry.js +2 -2
- package/dist/esm/z-heading.entry.js +1 -1
- package/dist/esm/z-messages-pocket.entry.js +2 -2
- package/dist/esm/z-modal-login.entry.js +3 -3
- package/dist/esm/z-modal.entry.js +1 -1
- package/dist/esm/z-myz-card-dictionary.entry.js +2 -2
- package/dist/esm/z-myz-card-footer-sections.entry.js +1 -1
- package/dist/esm/z-myz-card-info.entry.js +3 -3
- package/dist/esm/z-navigation-tab.entry.js +1 -1
- package/dist/esm/z-navigation-tabs.entry.js +2 -2
- package/dist/esm/z-otp.entry.js +2 -2
- package/dist/esm/z-pocket-message.entry.js +1 -1
- package/dist/esm/z-pocket_3.entry.js +3 -3
- package/dist/esm/z-registro-table-footer.entry.js +1 -1
- package/dist/esm/z-slideshow.entry.js +3 -3
- package/dist/esm/z-toast-notification-list.entry.js +52 -0
- package/dist/esm/z-toast-notification.entry.js +198 -0
- package/dist/types/beans/index.d.ts +33 -2
- package/dist/types/components/buttons/z-button/index.d.ts +1 -1
- package/dist/types/components/list/z-list-element/index.d.ts +1 -1
- package/dist/types/components/list/z-toast-notification-list/index.d.ts +14 -0
- package/dist/types/components/modal/z-modal-login/index.d.ts +2 -0
- package/dist/types/components/navigation/z-link/index.d.ts +1 -2
- package/dist/types/components/navigation/z-user-dropdown/index.d.ts +1 -2
- package/dist/types/components/notification/z-toast-notification/index.d.ts +56 -0
- package/dist/types/components/{contextual-menu → z-contextual-menu}/index.d.ts +4 -4
- package/dist/types/components.d.ts +167 -39
- package/dist/types/snowflakes/registro-table/z-registro-table-header/index.d.ts +2 -2
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/{p-2d372576.entry.js → p-01ebd1c9.entry.js} +1 -1
- package/dist/web-components-library/{p-81aca7f9.entry.js → p-12ce5608.entry.js} +1 -1
- package/dist/web-components-library/{p-57c3d9ff.entry.js → p-2137b1fb.entry.js} +1 -1
- package/dist/web-components-library/{p-74c1c6e0.entry.js → p-251558f4.entry.js} +1 -1
- package/dist/web-components-library/p-26e91915.entry.js +7 -0
- package/dist/web-components-library/{p-e51658e2.entry.js → p-2a5adef6.entry.js} +1 -1
- package/dist/web-components-library/{p-6375145b.entry.js → p-337ace81.entry.js} +1 -1
- package/dist/web-components-library/{p-1cab68e1.entry.js → p-3c9ec157.entry.js} +1 -1
- package/dist/web-components-library/{p-dc5b4723.entry.js → p-40aff614.entry.js} +1 -1
- package/dist/web-components-library/{p-673631bf.entry.js → p-4c255df1.entry.js} +1 -1
- package/dist/web-components-library/p-504ff914.entry.js +1 -0
- package/dist/web-components-library/{p-df7cbc7e.entry.js → p-590be9d2.entry.js} +1 -1
- package/dist/web-components-library/{p-f2689b14.js → p-818c7395.js} +1 -1
- package/dist/web-components-library/p-859f6438.js +1 -0
- package/dist/web-components-library/{p-e32ebd79.entry.js → p-8a7841df.entry.js} +1 -1
- package/dist/web-components-library/{p-640cf406.entry.js → p-8c800c8c.entry.js} +1 -1
- package/dist/web-components-library/{p-e45b780b.entry.js → p-9c17ebe5.entry.js} +1 -1
- package/dist/web-components-library/{p-d9f4bef7.entry.js → p-b11b6985.entry.js} +1 -1
- package/dist/web-components-library/{p-1f02b80f.entry.js → p-b4ceb308.entry.js} +1 -1
- package/dist/web-components-library/{p-e2d6c4ae.entry.js → p-ba896238.entry.js} +1 -1
- package/dist/web-components-library/{p-c007fb63.entry.js → p-d428fe35.entry.js} +1 -1
- package/dist/web-components-library/p-e34dbabe.js +1 -0
- package/dist/web-components-library/{p-195cfc7e.entry.js → p-e7cd27ec.entry.js} +1 -1
- package/dist/web-components-library/p-fd7a7565.entry.js +1 -0
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/package.json +1 -1
- package/react/components.d.ts +3 -1
- package/react/components.js +5 -3
- package/react/components.js.map +1 -1
- package/www/build/index.esm.js +1 -1
- package/www/build/{p-2d372576.entry.js → p-01ebd1c9.entry.js} +1 -1
- package/www/build/{p-81aca7f9.entry.js → p-12ce5608.entry.js} +1 -1
- package/www/build/{p-57c3d9ff.entry.js → p-2137b1fb.entry.js} +1 -1
- package/www/build/{p-74c1c6e0.entry.js → p-251558f4.entry.js} +1 -1
- package/www/build/p-26e91915.entry.js +7 -0
- package/www/build/{p-e51658e2.entry.js → p-2a5adef6.entry.js} +1 -1
- package/www/build/{p-6375145b.entry.js → p-337ace81.entry.js} +1 -1
- package/www/build/{p-1cab68e1.entry.js → p-3c9ec157.entry.js} +1 -1
- package/www/build/{p-dc5b4723.entry.js → p-40aff614.entry.js} +1 -1
- package/www/build/{p-673631bf.entry.js → p-4c255df1.entry.js} +1 -1
- package/www/build/p-504ff914.entry.js +1 -0
- package/www/build/{p-df7cbc7e.entry.js → p-590be9d2.entry.js} +1 -1
- package/www/build/{p-f2689b14.js → p-818c7395.js} +1 -1
- package/www/build/p-859f6438.js +1 -0
- package/www/build/p-859fc437.js +1 -0
- package/www/build/{p-e32ebd79.entry.js → p-8a7841df.entry.js} +1 -1
- package/www/build/{p-640cf406.entry.js → p-8c800c8c.entry.js} +1 -1
- package/www/build/{p-e45b780b.entry.js → p-9c17ebe5.entry.js} +1 -1
- package/www/build/{p-d9f4bef7.entry.js → p-b11b6985.entry.js} +1 -1
- package/www/build/{p-1f02b80f.entry.js → p-b4ceb308.entry.js} +1 -1
- package/www/build/{p-e2d6c4ae.entry.js → p-ba896238.entry.js} +1 -1
- package/www/build/{p-c007fb63.entry.js → p-d428fe35.entry.js} +1 -1
- package/www/build/p-e34dbabe.js +1 -0
- package/www/build/p-e55724ae.css +1 -0
- package/www/build/{p-195cfc7e.entry.js → p-e7cd27ec.entry.js} +1 -1
- package/www/build/p-fd7a7565.entry.js +1 -0
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +34 -28
- package/www/pages/notification.html +247 -0
- package/dist/web-components-library/p-0e91a877.js +0 -1
- package/dist/web-components-library/p-4dbf0b2e.entry.js +0 -7
- package/dist/web-components-library/p-e51276a9.js +0 -1
- package/www/build/p-0e91a877.js +0 -1
- package/www/build/p-4dbf0b2e.entry.js +0 -7
- package/www/build/p-a28aa39d.css +0 -1
- package/www/build/p-e51276a9.js +0 -1
- package/www/build/p-f0b45c9d.js +0 -1
|
@@ -25,6 +25,7 @@ export var ButtonVariantEnum;
|
|
|
25
25
|
ButtonVariantEnum["primary"] = "primary";
|
|
26
26
|
ButtonVariantEnum["secondary"] = "secondary";
|
|
27
27
|
ButtonVariantEnum["tertiary"] = "tertiary";
|
|
28
|
+
ButtonVariantEnum["dark-bg"] = "dark-bg";
|
|
28
29
|
})(ButtonVariantEnum || (ButtonVariantEnum = {}));
|
|
29
30
|
export var ButtonTypeEnum;
|
|
30
31
|
(function (ButtonTypeEnum) {
|
|
@@ -144,12 +145,12 @@ export var TableHeaderSize;
|
|
|
144
145
|
TableHeaderSize["large"] = "large";
|
|
145
146
|
TableHeaderSize["special"] = "special";
|
|
146
147
|
})(TableHeaderSize || (TableHeaderSize = {}));
|
|
147
|
-
export var
|
|
148
|
-
(function (
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
})(
|
|
148
|
+
export var SortDirectionEnum;
|
|
149
|
+
(function (SortDirectionEnum) {
|
|
150
|
+
SortDirectionEnum["asc"] = "asc";
|
|
151
|
+
SortDirectionEnum["desc"] = "desc";
|
|
152
|
+
SortDirectionEnum["none"] = "none";
|
|
153
|
+
})(SortDirectionEnum || (SortDirectionEnum = {}));
|
|
153
154
|
export var AvatarSize;
|
|
154
155
|
(function (AvatarSize) {
|
|
155
156
|
AvatarSize["small"] = "small";
|
|
@@ -211,3 +212,32 @@ export var PocketStatusEnum;
|
|
|
211
212
|
PocketStatusEnum["open"] = "open";
|
|
212
213
|
PocketStatusEnum["closed"] = "closed";
|
|
213
214
|
})(PocketStatusEnum || (PocketStatusEnum = {}));
|
|
215
|
+
export var ToastNotificationEnum;
|
|
216
|
+
(function (ToastNotificationEnum) {
|
|
217
|
+
ToastNotificationEnum["dark"] = "dark";
|
|
218
|
+
ToastNotificationEnum["light"] = "light";
|
|
219
|
+
ToastNotificationEnum["accent"] = "accent";
|
|
220
|
+
ToastNotificationEnum["error"] = "error";
|
|
221
|
+
ToastNotificationEnum["success"] = "success";
|
|
222
|
+
ToastNotificationEnum["warning"] = "warning";
|
|
223
|
+
})(ToastNotificationEnum || (ToastNotificationEnum = {}));
|
|
224
|
+
export var ToastNotificationTransitionsEnum;
|
|
225
|
+
(function (ToastNotificationTransitionsEnum) {
|
|
226
|
+
ToastNotificationTransitionsEnum["slideInLeft"] = "slide-in-left";
|
|
227
|
+
ToastNotificationTransitionsEnum["slideInRight"] = "slide-in-right";
|
|
228
|
+
ToastNotificationTransitionsEnum["slideInDown"] = "slide-in-down";
|
|
229
|
+
ToastNotificationTransitionsEnum["slideInUp"] = "slide-in-up";
|
|
230
|
+
ToastNotificationTransitionsEnum["slideOutLeft"] = "slide-out-left";
|
|
231
|
+
ToastNotificationTransitionsEnum["slideOutRight"] = "slide-out-right";
|
|
232
|
+
ToastNotificationTransitionsEnum["slideOutDown"] = "slide-out-down";
|
|
233
|
+
ToastNotificationTransitionsEnum["slideOutUp"] = "slide-out-up";
|
|
234
|
+
})(ToastNotificationTransitionsEnum || (ToastNotificationTransitionsEnum = {}));
|
|
235
|
+
export var ToastNotificationPositionsEnum;
|
|
236
|
+
(function (ToastNotificationPositionsEnum) {
|
|
237
|
+
ToastNotificationPositionsEnum["topRight"] = "top-right";
|
|
238
|
+
ToastNotificationPositionsEnum["topLeft"] = "top-left";
|
|
239
|
+
ToastNotificationPositionsEnum["topCentre"] = "top-centre";
|
|
240
|
+
ToastNotificationPositionsEnum["bottomRight"] = "bottom-right";
|
|
241
|
+
ToastNotificationPositionsEnum["bottomLeft"] = "bottom-left";
|
|
242
|
+
ToastNotificationPositionsEnum["bottomCentre"] = "bottom-centre";
|
|
243
|
+
})(ToastNotificationPositionsEnum || (ToastNotificationPositionsEnum = {}));
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
"./components/buttons/z-button-sort/index.js",
|
|
7
7
|
"./components/buttons/z-chip/index.js",
|
|
8
8
|
"./components/buttons/z-toggle-button/index.js",
|
|
9
|
-
"./components/contextual-menu/index.js",
|
|
10
9
|
"./components/footer/z-footer/index.js",
|
|
11
10
|
"./components/footer/z-footer-link/index.js",
|
|
12
11
|
"./components/footer/z-footer-section/index.js",
|
|
@@ -23,6 +22,7 @@
|
|
|
23
22
|
"./components/list/z-list/index.js",
|
|
24
23
|
"./components/list/z-list-element/index.js",
|
|
25
24
|
"./components/list/z-list-group/index.js",
|
|
25
|
+
"./components/list/z-toast-notification-list/index.js",
|
|
26
26
|
"./components/logo/z-logo/index.js",
|
|
27
27
|
"./components/modal/z-modal/index.js",
|
|
28
28
|
"./components/modal/z-modal-login/index.js",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"./components/notification/z-cookiebar/index.js",
|
|
42
42
|
"./components/notification/z-info-box/index.js",
|
|
43
43
|
"./components/notification/z-notification/index.js",
|
|
44
|
+
"./components/notification/z-toast-notification/index.js",
|
|
44
45
|
"./components/notification/z-tooltip/index.js",
|
|
45
46
|
"./components/pagination/z-pagination-bar/index.js",
|
|
46
47
|
"./components/pagination/z-pagination-page/index.js",
|
|
@@ -49,6 +50,7 @@
|
|
|
49
50
|
"./components/typography/z-heading/index.js",
|
|
50
51
|
"./components/z-avatar/index.js",
|
|
51
52
|
"./components/z-card/index.js",
|
|
53
|
+
"./components/z-contextual-menu/index.js",
|
|
52
54
|
"./components/z-divider/index.js",
|
|
53
55
|
"./components/z-ghost-loading/index.js",
|
|
54
56
|
"./components/z-popover/index.js",
|
|
@@ -10,7 +10,7 @@ export class ZButton {
|
|
|
10
10
|
this.disabled = false;
|
|
11
11
|
/** HTML button type attribute. */
|
|
12
12
|
this.type = ButtonTypeEnum.button;
|
|
13
|
-
/** Graphical variant: `primary`, `secondary`
|
|
13
|
+
/** Graphical variant: `primary`, `secondary`, `tertiary`, `dark-bg`. Defaults to `primary`. */
|
|
14
14
|
this.variant = ButtonVariantEnum.primary;
|
|
15
15
|
/** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
|
|
16
16
|
this.size = ButtonSizeEnum.big;
|
|
@@ -117,7 +117,7 @@ export class ZButton {
|
|
|
117
117
|
"mutable": false,
|
|
118
118
|
"complexType": {
|
|
119
119
|
"original": "ButtonVariantBean",
|
|
120
|
-
"resolved": "ButtonVariantEnum.primary | ButtonVariantEnum.secondary | ButtonVariantEnum.tertiary",
|
|
120
|
+
"resolved": "ButtonVariantEnum.primary | ButtonVariantEnum.secondary | ButtonVariantEnum.tertiary | typeof ButtonVariantEnum[\"dark-bg\"]",
|
|
121
121
|
"references": {
|
|
122
122
|
"ButtonVariantBean": {
|
|
123
123
|
"location": "import",
|
|
@@ -129,7 +129,7 @@ export class ZButton {
|
|
|
129
129
|
"optional": true,
|
|
130
130
|
"docs": {
|
|
131
131
|
"tags": [],
|
|
132
|
-
"text": "Graphical variant: `primary`, `secondary`
|
|
132
|
+
"text": "Graphical variant: `primary`, `secondary`, `tertiary`, `dark-bg`. Defaults to `primary`."
|
|
133
133
|
},
|
|
134
134
|
"attribute": "variant",
|
|
135
135
|
"reflect": true,
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
--z-icon-width: 16px;
|
|
5
5
|
--z-icon-height: 16px;
|
|
6
6
|
--z-icon-right-margin: var(--space-unit);
|
|
7
|
+
--rgb-white: 240, 240, 240
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
button:disabled,
|
|
@@ -196,3 +197,35 @@ button.tertiary:disabled,
|
|
|
196
197
|
border-color: transparent;
|
|
197
198
|
color: var(--color-disabled02);
|
|
198
199
|
}
|
|
200
|
+
|
|
201
|
+
button.dark-bg,
|
|
202
|
+
:host([variant="dark-bg"]) ::slotted(button),
|
|
203
|
+
:host([variant="dark-bg"]) ::slotted(a) {
|
|
204
|
+
background-color: rgba(var(--rgb-white), 0.2);
|
|
205
|
+
border-color: transparent;
|
|
206
|
+
color: var(--color-text04);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
button.dark-bg.hasContent {
|
|
210
|
+
padding: 0 var(--space-unit);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
@media (hover: hover) {
|
|
214
|
+
button.dark-bg:hover,
|
|
215
|
+
:host([variant="dark-bg"]) ::slotted(button:hover),
|
|
216
|
+
:host([variant="dark-bg"]) ::slotted(a:hover) {
|
|
217
|
+
background-color: rgba(var(--rgb-white), 0.1);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
button.dark-bg:active,
|
|
222
|
+
:host([variant="dark-bg"]) ::slotted(button:active),
|
|
223
|
+
:host([variant="dark-bg"]) ::slotted(a:active) {
|
|
224
|
+
background-color: rgba(var(--rgb-white), 0.3);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
button.dark-bg:disabled,
|
|
228
|
+
:host([variant="dark-bg"]) ::slotted(button:disabled) {
|
|
229
|
+
color: var(--color-disabled03);
|
|
230
|
+
background-color: rgba(var(--rgb-white), 0.05);
|
|
231
|
+
}
|
|
@@ -46,7 +46,7 @@ export class ZListElement {
|
|
|
46
46
|
*/
|
|
47
47
|
this.disabled = false;
|
|
48
48
|
/**
|
|
49
|
-
* [optional] If is used in
|
|
49
|
+
* [optional] If is used in ZContextualMenu component
|
|
50
50
|
*/
|
|
51
51
|
this.isContextualMenu = false;
|
|
52
52
|
this.showInnerContent = false;
|
|
@@ -387,7 +387,7 @@ export class ZListElement {
|
|
|
387
387
|
"optional": true,
|
|
388
388
|
"docs": {
|
|
389
389
|
"tags": [],
|
|
390
|
-
"text": "[optional] If is used in
|
|
390
|
+
"text": "[optional] If is used in ZContextualMenu component"
|
|
391
391
|
},
|
|
392
392
|
"attribute": "is-contextual-menu",
|
|
393
393
|
"reflect": true,
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { Component, Prop, h, Element, Host, Watch } from "@stencil/core";
|
|
2
|
+
import { ToastNotificationPositionsEnum, } from "../../../beans";
|
|
3
|
+
export class ZToastNotificationList {
|
|
4
|
+
constructor() {
|
|
5
|
+
/**Set the entry position of new notification in the list */
|
|
6
|
+
this.newestontop = true;
|
|
7
|
+
this.slotChangeHandler = () => {
|
|
8
|
+
const difference = Array.from(this.hostElement.children).filter((elem) => !this.notificationArray.includes(elem));
|
|
9
|
+
if (difference) {
|
|
10
|
+
difference.forEach((elem) => {
|
|
11
|
+
this.notificationArray.push(elem);
|
|
12
|
+
const newElem = elem;
|
|
13
|
+
elem.remove();
|
|
14
|
+
this.hostElement.prepend(newElem);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
watchPropNewestontop(newValue) {
|
|
20
|
+
this.hostElement.append(...this.notificationArray.reverse());
|
|
21
|
+
if (newValue) {
|
|
22
|
+
this.hostElement.shadowRoot.addEventListener("slotchange", this.slotChangeHandler);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
this.hostElement.shadowRoot.removeEventListener("slotchange", this.slotChangeHandler);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
componentWillLoad() {
|
|
29
|
+
this.newestontop && this.handleNewestOnTop();
|
|
30
|
+
}
|
|
31
|
+
handleNewestOnTop() {
|
|
32
|
+
this.notificationArray = Array.from(this.hostElement.children);
|
|
33
|
+
this.hostElement.append(...this.notificationArray.reverse());
|
|
34
|
+
this.hostElement.shadowRoot.addEventListener("slotchange", this.slotChangeHandler);
|
|
35
|
+
}
|
|
36
|
+
render() {
|
|
37
|
+
return (h(Host, { class: this.position
|
|
38
|
+
? this.position
|
|
39
|
+
: ToastNotificationPositionsEnum.topRight },
|
|
40
|
+
h("slot", { name: "toasts" })));
|
|
41
|
+
}
|
|
42
|
+
static get is() { return "z-toast-notification-list"; }
|
|
43
|
+
static get encapsulation() { return "shadow"; }
|
|
44
|
+
static get originalStyleUrls() { return {
|
|
45
|
+
"$": ["styles.css"]
|
|
46
|
+
}; }
|
|
47
|
+
static get styleUrls() { return {
|
|
48
|
+
"$": ["styles.css"]
|
|
49
|
+
}; }
|
|
50
|
+
static get properties() { return {
|
|
51
|
+
"position": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"mutable": false,
|
|
54
|
+
"complexType": {
|
|
55
|
+
"original": "ToastNotificationPositionsTypes",
|
|
56
|
+
"resolved": "ToastNotificationPositionsEnum.bottomCentre | ToastNotificationPositionsEnum.bottomLeft | ToastNotificationPositionsEnum.bottomRight | ToastNotificationPositionsEnum.topCentre | ToastNotificationPositionsEnum.topLeft | ToastNotificationPositionsEnum.topRight",
|
|
57
|
+
"references": {
|
|
58
|
+
"ToastNotificationPositionsTypes": {
|
|
59
|
+
"location": "import",
|
|
60
|
+
"path": "../../../beans"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"required": false,
|
|
65
|
+
"optional": false,
|
|
66
|
+
"docs": {
|
|
67
|
+
"tags": [],
|
|
68
|
+
"text": "Set the position of toast notification list - top-left, top-centre, top-right, bottom-left, bottom-centre, bottom-right"
|
|
69
|
+
},
|
|
70
|
+
"attribute": "position",
|
|
71
|
+
"reflect": false
|
|
72
|
+
},
|
|
73
|
+
"newestontop": {
|
|
74
|
+
"type": "boolean",
|
|
75
|
+
"mutable": false,
|
|
76
|
+
"complexType": {
|
|
77
|
+
"original": "boolean",
|
|
78
|
+
"resolved": "boolean",
|
|
79
|
+
"references": {}
|
|
80
|
+
},
|
|
81
|
+
"required": false,
|
|
82
|
+
"optional": true,
|
|
83
|
+
"docs": {
|
|
84
|
+
"tags": [],
|
|
85
|
+
"text": "Set the entry position of new notification in the list"
|
|
86
|
+
},
|
|
87
|
+
"attribute": "newestontop",
|
|
88
|
+
"reflect": false,
|
|
89
|
+
"defaultValue": "true"
|
|
90
|
+
}
|
|
91
|
+
}; }
|
|
92
|
+
static get elementRef() { return "hostElement"; }
|
|
93
|
+
static get watchers() { return [{
|
|
94
|
+
"propName": "newestontop",
|
|
95
|
+
"methodName": "watchPropNewestontop"
|
|
96
|
+
}]; }
|
|
97
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
font-family: var(--font-family-sans);
|
|
3
|
+
font-weight: var(--font-rg);
|
|
4
|
+
position: fixed;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
flex-wrap: nowrap;
|
|
8
|
+
z-index: 10000;
|
|
9
|
+
margin-bottom: calc(var(--space-unit) * 2);
|
|
10
|
+
margin-top: calc(var(--space-unit) * 2);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
::slotted(z-toast-notification){
|
|
14
|
+
width: 100vw;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
::slotted(:not(:last-child)) {
|
|
18
|
+
margin-bottom: calc(var(--space-unit) * 1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host(.bottom-centre),
|
|
22
|
+
:host(.bottom-right),
|
|
23
|
+
:host(.bottom-left) {
|
|
24
|
+
justify-content: flex-end;
|
|
25
|
+
align-items: flex-end;
|
|
26
|
+
bottom: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:host(.top-left),
|
|
30
|
+
:host(.top-right),
|
|
31
|
+
:host(.top-centre) {
|
|
32
|
+
justify-content: flex-start;
|
|
33
|
+
align-items: flex-start;
|
|
34
|
+
top: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/* Tablet breakpoint */
|
|
39
|
+
@media only screen and (min-width: 768px) {
|
|
40
|
+
|
|
41
|
+
:host {
|
|
42
|
+
margin: calc(var(--space-unit) * 3);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:host(.top-centre) {
|
|
46
|
+
justify-content: flex-start;
|
|
47
|
+
align-items: center;
|
|
48
|
+
top: 0;
|
|
49
|
+
left: 50%;
|
|
50
|
+
transform: translateX(-50%);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:host(.top-left) {
|
|
54
|
+
justify-content: flex-start;
|
|
55
|
+
align-items: flex-start;
|
|
56
|
+
top: 0;
|
|
57
|
+
left: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host(.top-right) {
|
|
61
|
+
justify-content: flex-start;
|
|
62
|
+
align-items: flex-end;
|
|
63
|
+
top: 0;
|
|
64
|
+
right: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:host(.bottom-centre) {
|
|
68
|
+
justify-content: flex-end;
|
|
69
|
+
align-items: center;
|
|
70
|
+
bottom: 0;
|
|
71
|
+
left: 50%;
|
|
72
|
+
transform: translateX(-50%);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:host(.bottom-right) {
|
|
76
|
+
justify-content: flex-end;
|
|
77
|
+
align-items: flex-end;
|
|
78
|
+
bottom: 0;
|
|
79
|
+
right: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:host(.bottom-left) {
|
|
83
|
+
justify-content: flex-end;
|
|
84
|
+
align-items: flex-start;
|
|
85
|
+
bottom: 0;
|
|
86
|
+
left: 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
::slotted(z-toast-notification){
|
|
90
|
+
width: 50vw;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Desktop breakpoint */
|
|
95
|
+
@media only screen and (min-width: 1152px) {}
|
|
96
|
+
|
|
97
|
+
/* Wide breakpoint */
|
|
98
|
+
@media only screen and (min-width: 1366px) {
|
|
99
|
+
|
|
100
|
+
:host {
|
|
101
|
+
margin: calc(var(--space-unit) * 4);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
::slotted(z-toast-notification){
|
|
105
|
+
width: 33vw;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -81,7 +81,7 @@ export class zModalLogin {
|
|
|
81
81
|
h("div", { class: "password" },
|
|
82
82
|
h("slot", { name: "password" },
|
|
83
83
|
h("z-input", { id: "password", label: "password", placeholder: "Inserisci la tua password", type: "password", name: "password", autocomplete: "current-password", status: this.status, onKeyUp: (e) => this.handleInputKeyUp(e), onInputChange: () => (this.status = null) }))),
|
|
84
|
-
h("z-link", { class: "forget", href:
|
|
84
|
+
h("z-link", { class: "forget", href: this.forgotPasswordUrl }, "Password dimenticata?"),
|
|
85
85
|
h("div", { class: "login" },
|
|
86
86
|
h("slot", { name: "login" },
|
|
87
87
|
h("z-button", { variant: ButtonVariantEnum.primary, onClick: () => this.emitLoginSubmit() }, "Accedi")))),
|
|
@@ -90,9 +90,9 @@ export class zModalLogin {
|
|
|
90
90
|
h("div", { class: "signup" },
|
|
91
91
|
h("slot", { name: "signup" },
|
|
92
92
|
h("z-button", { variant: ButtonVariantEnum.secondary, onClick: () => this.emitSignupClick() }, "Registrati"))),
|
|
93
|
-
h("div", { class: "providers" },
|
|
93
|
+
!this.externalProviderCheck && (h("div", { class: "providers" },
|
|
94
94
|
h("z-body", { class: "provider", level: 5, variant: "regular" }, "OPPURE ACCEDI CON:"),
|
|
95
|
-
|
|
95
|
+
h("slot", { name: "provider" },
|
|
96
96
|
this.renderZainoDigitaleButton(),
|
|
97
97
|
h("z-link", { icon: "informationsource", href: "https://www.zainodigitale.it/#/landing" }, "Cos'\u00E8 Zaino Digitale?")))))));
|
|
98
98
|
}
|
|
@@ -105,6 +105,23 @@ export class zModalLogin {
|
|
|
105
105
|
"$": ["styles.css"]
|
|
106
106
|
}; }
|
|
107
107
|
static get properties() { return {
|
|
108
|
+
"forgotPasswordUrl": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"mutable": false,
|
|
111
|
+
"complexType": {
|
|
112
|
+
"original": "string",
|
|
113
|
+
"resolved": "string",
|
|
114
|
+
"references": {}
|
|
115
|
+
},
|
|
116
|
+
"required": false,
|
|
117
|
+
"optional": false,
|
|
118
|
+
"docs": {
|
|
119
|
+
"tags": [],
|
|
120
|
+
"text": "Forgot Password Url"
|
|
121
|
+
},
|
|
122
|
+
"attribute": "forgot-password-url",
|
|
123
|
+
"reflect": false
|
|
124
|
+
},
|
|
108
125
|
"heading": {
|
|
109
126
|
"type": "string",
|
|
110
127
|
"mutable": false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, Prop, h, Event, Element } from "@stencil/core";
|
|
2
|
-
import {
|
|
2
|
+
import { Host, State } from "@stencil/core/internal";
|
|
3
3
|
/**
|
|
4
4
|
* @slot - link content
|
|
5
5
|
*/
|
|
@@ -23,9 +23,9 @@ export class ZLink {
|
|
|
23
23
|
this.iconposition = "left";
|
|
24
24
|
/** draw underline on text (optional) */
|
|
25
25
|
this.underline = false;
|
|
26
|
+
this.iconSize = 18;
|
|
26
27
|
this.emitZLinkClick = this.emitZLinkClick.bind(this);
|
|
27
28
|
this.emitZLinkInteraction = this.emitZLinkInteraction.bind(this);
|
|
28
|
-
this.iconSize = 18;
|
|
29
29
|
}
|
|
30
30
|
componentWillRender() {
|
|
31
31
|
if (this.iswhite) {
|
|
@@ -41,26 +41,23 @@ export class ZLink {
|
|
|
41
41
|
emitZLinkInteraction(e, linkId) {
|
|
42
42
|
this.zLinkClick.emit({ e, linkId });
|
|
43
43
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
this.iconSize
|
|
49
|
-
|
|
44
|
+
componentDidRender() {
|
|
45
|
+
if (this.icon) {
|
|
46
|
+
const height = parseFloat(window.getComputedStyle(this.hostElement).getPropertyValue('font-size'));
|
|
47
|
+
const currentSize = this.big ? 18 : Math.round(height * 1.125);
|
|
48
|
+
if (!Number.isNaN(currentSize) && this.iconSize !== currentSize) {
|
|
49
|
+
this.iconSize = currentSize;
|
|
50
|
+
}
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
|
-
componentDidLoad() {
|
|
53
|
-
if (this.icon)
|
|
54
|
-
this.calculateIconSize();
|
|
55
|
-
}
|
|
56
53
|
render() {
|
|
57
54
|
const style = this.big ? { "--font-size-link": "16px", "--font-weight-link": "600" } : {};
|
|
58
55
|
return (h(Host, { style: style },
|
|
59
|
-
h("a", { id: this.htmlid, href: this.href ? this.href : null, class: `${this.isdisabled
|
|
60
|
-
${this.isactive
|
|
56
|
+
h("a", { id: this.htmlid, href: this.href ? this.href : null, class: `${this.isdisabled ? "disabled" : ""}
|
|
57
|
+
${this.isactive ? "active" : ""}
|
|
61
58
|
${this.textcolor}
|
|
62
|
-
${this.iswhite
|
|
63
|
-
${this.underline
|
|
59
|
+
${this.iswhite ? "white" : ""}
|
|
60
|
+
${this.underline ? "underline" : ""}`, target: this.target, role: this.href ? "link" : "button", tabindex: this.isdisabled ? -1 : this.htmltabindex, onClick: (e) => this.emitZLinkClick(e, this.htmlid) },
|
|
64
61
|
this.iconposition === "right" && h("slot", null),
|
|
65
62
|
this.icon &&
|
|
66
63
|
h("z-icon", { style: { "--z-icon-width": this.iconSize.toString(), "--z-icon-height": this.iconSize.toString() }, name: this.icon, height: this.iconSize, width: this.iconSize }),
|
|
@@ -289,6 +286,9 @@ export class ZLink {
|
|
|
289
286
|
"defaultValue": "false"
|
|
290
287
|
}
|
|
291
288
|
}; }
|
|
289
|
+
static get states() { return {
|
|
290
|
+
"iconSize": {}
|
|
291
|
+
}; }
|
|
292
292
|
static get events() { return [{
|
|
293
293
|
"method": "zLinkClick",
|
|
294
294
|
"name": "zLinkClick",
|