@zanichelli/albe-web-components 18.2.1 → 18.3.1-rc1
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 +2 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-anchor-navigation.cjs.entry.js +2 -1
- package/dist/cjs/z-anchor-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/z-book-card-app.cjs.entry.js +1 -1
- package/dist/cjs/z-book-card-app.cjs.entry.js.map +1 -1
- package/dist/cjs/z-book-card.cjs.entry.js +1 -1
- package/dist/cjs/z-book-card.cjs.entry.js.map +1 -1
- package/dist/cjs/z-toast-notification.cjs.entry.js +7 -43
- package/dist/cjs/z-toast-notification.cjs.entry.js.map +1 -1
- package/dist/collection/components/z-anchor-navigation/index.js +20 -1
- package/dist/collection/components/z-anchor-navigation/index.js.map +1 -1
- package/dist/collection/components/z-anchor-navigation/index.stories.js +6 -1
- package/dist/collection/components/z-anchor-navigation/index.stories.js.map +1 -1
- package/dist/collection/components/z-toast-notification/index.js +7 -43
- package/dist/collection/components/z-toast-notification/index.js.map +1 -1
- package/dist/collection/components/z-toast-notification/index.stories.js +30 -2
- package/dist/collection/components/z-toast-notification/index.stories.js.map +1 -1
- package/dist/collection/components/z-toast-notification/styles.css +25 -34
- package/dist/collection/tokens/typography.css +88 -0
- package/dist/components/z-anchor-navigation.js +3 -1
- package/dist/components/z-anchor-navigation.js.map +1 -1
- package/dist/components/z-book-card-app.js +1 -1
- package/dist/components/z-book-card-app.js.map +1 -1
- package/dist/components/z-book-card.js +1 -1
- package/dist/components/z-book-card.js.map +1 -1
- package/dist/components/z-toast-notification.js +8 -44
- package/dist/components/z-toast-notification.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-anchor-navigation.entry.js +2 -1
- package/dist/esm/z-anchor-navigation.entry.js.map +1 -1
- package/dist/esm/z-book-card-app.entry.js +1 -1
- package/dist/esm/z-book-card-app.entry.js.map +1 -1
- package/dist/esm/z-book-card.entry.js +1 -1
- package/dist/esm/z-book-card.entry.js.map +1 -1
- package/dist/esm/z-toast-notification.entry.js +8 -44
- package/dist/esm/z-toast-notification.entry.js.map +1 -1
- package/dist/types/components/z-anchor-navigation/index.d.ts +4 -0
- package/dist/types/components/z-anchor-navigation/index.stories.d.ts +1 -0
- package/dist/types/components/z-toast-notification/index.d.ts +1 -10
- package/dist/types/components/z-toast-notification/index.stories.d.ts +10 -2
- package/dist/types/components.d.ts +8 -0
- package/dist/web-components-library/p-1dd6dff4.entry.js +7 -0
- package/dist/web-components-library/p-1dd6dff4.entry.js.map +1 -0
- package/dist/web-components-library/{p-82d52ee6.entry.js → p-1ef90472.entry.js} +2 -2
- package/dist/web-components-library/p-1ef90472.entry.js.map +1 -0
- package/dist/web-components-library/{p-6a6d30ae.entry.js → p-a3860bef.entry.js} +2 -2
- package/dist/web-components-library/p-a3860bef.entry.js.map +1 -0
- package/dist/web-components-library/{p-64f5da5f.entry.js → p-b0856b23.entry.js} +2 -2
- package/dist/web-components-library/p-b0856b23.entry.js.map +1 -0
- package/dist/web-components-library/web-components-library.css +88 -0
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/dist/web-components-library/web-components-library.esm.js.map +1 -1
- package/package.json +1 -1
- package/www/build/p-1dd6dff4.entry.js +7 -0
- package/www/build/p-1dd6dff4.entry.js.map +1 -0
- package/www/build/{p-82d52ee6.entry.js → p-1ef90472.entry.js} +2 -2
- package/www/build/p-1ef90472.entry.js.map +1 -0
- package/www/build/{p-11df33c9.js → p-28efbaa8.js} +1 -1
- package/www/build/{p-4f4ec223.css → p-56d35027.css} +88 -0
- package/www/build/{p-6a6d30ae.entry.js → p-a3860bef.entry.js} +2 -2
- package/www/build/p-a3860bef.entry.js.map +1 -0
- package/www/build/{p-64f5da5f.entry.js → p-b0856b23.entry.js} +2 -2
- package/www/build/p-b0856b23.entry.js.map +1 -0
- package/www/build/web-components-library.css +88 -0
- package/www/build/web-components-library.esm.js +1 -1
- package/www/build/web-components-library.esm.js.map +1 -1
- package/www/index.html +1 -1
- package/dist/web-components-library/p-64f5da5f.entry.js.map +0 -1
- package/dist/web-components-library/p-6a6d30ae.entry.js.map +0 -1
- package/dist/web-components-library/p-72c07bbd.entry.js +0 -7
- package/dist/web-components-library/p-72c07bbd.entry.js.map +0 -1
- package/dist/web-components-library/p-82d52ee6.entry.js.map +0 -1
- package/www/build/p-64f5da5f.entry.js.map +0 -1
- package/www/build/p-6a6d30ae.entry.js.map +0 -1
- package/www/build/p-72c07bbd.entry.js +0 -7
- package/www/build/p-72c07bbd.entry.js.map +0 -1
- package/www/build/p-82d52ee6.entry.js.map +0 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { r as ToastNotificationTransition } from './index2.js';
|
|
3
|
-
import { B as Breakpoints } from './breakpoints.js';
|
|
2
|
+
import { r as ToastNotificationTransition, g as KeyboardCode } from './index2.js';
|
|
4
3
|
import { d as defineCustomElement$2 } from './index9.js';
|
|
5
4
|
|
|
6
5
|
var hammer = {exports: {}};
|
|
@@ -2653,7 +2652,7 @@ if (typeof undefined$1 === 'function' && undefined$1.amd) {
|
|
|
2653
2652
|
|
|
2654
2653
|
const Hammer = hammer.exports;
|
|
2655
2654
|
|
|
2656
|
-
const stylesCss = ":host{display:inline-block;width:100vw;min-width:200px;--percentuale:0}:host(.slide-in-left){animation:slideinleft 1s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-in-right){animation:slideinright 1s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-in-down){animation:slideindown 1s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-in-up){animation:slideinup 1s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-out-left){animation:slideoutleft 0.5s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-out-right){animation:slideoutright 0.5s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-out-down){animation:slideoutdown 0.5s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-out-up){animation:slideoutup 0.5s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}@keyframes slideinleft{0%{transform:translateX(100%)}100%{transform:translateX(0)}}@keyframes slideinright{0%{transform:translateX(-100%)}100%{transform:translateX(0)}}@keyframes slideinup{0%{opacity:0;transform:translateY(100%)}100%{opacity:1;transform:translateY(0)}}@keyframes slideindown{0%{opacity:0;transform:translateY(-100%)}100%{opacity:1;transform:translateY(0)}}@keyframes slideoutleft{0%{opacity:calc(100% - var(--percentuale));transform:translateX(var(--percentuale))}100%{opacity:0;transform:translateX(-100%)}}@keyframes slideoutright{0%{opacity:calc(100% - var(--percentuale));transform:translateX(var(--percentuale))}100%{opacity:0;transform:translateX(100%)}}@keyframes slideoutup{0%{opacity:1;transform:translateY(var(--percentuale))}100%{opacity:0;transform:translateY(-100%)}}@keyframes slideoutdown{0%{opacity:1;transform:translateY(var(--percentuale))}100%{opacity:0;transform:translateY(100%)}}:host>#external-container{display:flex;box-sizing:border-box;
|
|
2655
|
+
const stylesCss = ":host{display:inline-block;width:100vw;min-width:200px;--percentuale:0}:host(.slide-in-left){animation:slideinleft 1s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-in-right){animation:slideinright 1s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-in-down){animation:slideindown 1s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-in-up){animation:slideinup 1s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-out-left){animation:slideoutleft 0.5s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-out-right){animation:slideoutright 0.5s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-out-down){animation:slideoutdown 0.5s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-out-up){animation:slideoutup 0.5s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}@keyframes slideinleft{0%{transform:translateX(100%)}100%{transform:translateX(0)}}@keyframes slideinright{0%{transform:translateX(-100%)}100%{transform:translateX(0)}}@keyframes slideinup{0%{opacity:0;transform:translateY(100%)}100%{opacity:1;transform:translateY(0)}}@keyframes slideindown{0%{opacity:0;transform:translateY(-100%)}100%{opacity:1;transform:translateY(0)}}@keyframes slideoutleft{0%{opacity:calc(100% - var(--percentuale));transform:translateX(var(--percentuale))}100%{opacity:0;transform:translateX(-100%)}}@keyframes slideoutright{0%{opacity:calc(100% - var(--percentuale));transform:translateX(var(--percentuale))}100%{opacity:0;transform:translateX(100%)}}@keyframes slideoutup{0%{opacity:1;transform:translateY(var(--percentuale))}100%{opacity:0;transform:translateY(-100%)}}@keyframes slideoutdown{0%{opacity:1;transform:translateY(var(--percentuale))}100%{opacity:0;transform:translateY(100%)}}:host>#external-container{display:flex;min-height:calc(var(--space-unit) * 8.5);box-sizing:border-box;justify-content:space-between;padding:calc(var(--space-unit) * 2) 14px calc(var(--space-unit) * 2) calc(var(--space-unit) * 2);border-radius:var(--border-size-large);box-shadow:var(--shadow-3);font-family:var(--font-family-sans);font-size:var(--font-size-2);font-weight:var(--font-rg);letter-spacing:0.16px}:host>#external-container>#inner-container{display:flex;width:100%;flex-direction:column;justify-content:space-between}:host>#external-container #inner-container #text{padding:var(--space-unit) 0;color:var(--color-text-inverse);letter-spacing:0.16px;line-height:20px;text-align:start}:host>#external-container #inner-container #text>.title{margin-right:calc(var(--space-unit) / 2);font-weight:var(--font-sb)}:host>#external-container #inner-container ::slotted([slot=\"button\"]){margin-top:var(--space-unit)}:host>#external-container #icon{padding-top:var(--space-unit);margin:0 calc(var(--space-unit) / 4);cursor:pointer;fill:var(--color-inverse-icon)}:host>#external-container #icon:focus-within{margin:0}:host>#external-container #icon z-icon{margin:0 0 0 14px}:host>#external-container #icon z-icon:focus{display:inline-block;padding:calc(var(--space-unit) / 4);border-radius:50%;box-shadow:var(--shadow-focus-primary)}:host>#external-container.dark{background:var(--color-surface05)}:host>#external-container.light{background:var(--color-surface01)}:host>#external-container.light #icon{fill:var(--color-primary01-icon)}:host>#external-container.light #text,:host>#external-container.warning #text{color:var(--color-default-text)}:host>#external-container.accent{background:var(--color-primary01)}:host>#external-container.error{background:var(--color-default-error)}:host>#external-container.success{background:var(--color-default-success)}:host>#external-container.warning{background:var(--color-default-warning)}:host>#external-container.warning #icon{fill:var(--color-default-icon)}@media (min-width: 768px){:host{width:unset;max-width:50vw}:host>#external-container #inner-container{flex-direction:row}:host>#external-container #inner-container ::slotted([slot=\"button\"]){margin:0 0 0 calc(var(--space-unit) * 2)}}@media (min-width: 1366px){:host{max-width:33vw}}";
|
|
2657
2656
|
const ZToastNotificationStyle0 = stylesCss;
|
|
2658
2657
|
|
|
2659
2658
|
const ZToastNotification$1 = /*@__PURE__*/ proxyCustomElement(class ZToastNotification extends HTMLElement {
|
|
@@ -2703,12 +2702,10 @@ const ZToastNotification$1 = /*@__PURE__*/ proxyCustomElement(class ZToastNotifi
|
|
|
2703
2702
|
this.toastClose.emit();
|
|
2704
2703
|
}
|
|
2705
2704
|
componentWillLoad() {
|
|
2706
|
-
this.isMobile = window.innerWidth <= Breakpoints.MOBILE;
|
|
2707
2705
|
this.validateAutoclose();
|
|
2708
2706
|
this.percentage = 0;
|
|
2709
2707
|
}
|
|
2710
2708
|
componentDidLoad() {
|
|
2711
|
-
this.isTextLong = this.detectWrap() || this.toastText.offsetHeight > 20;
|
|
2712
2709
|
this.startTime = Date.now();
|
|
2713
2710
|
if (this.autoclose && this.pauseonfocusloss) {
|
|
2714
2711
|
document.addEventListener("visibilitychange", this.visibilityChangeEventHandler);
|
|
@@ -2789,56 +2786,23 @@ const ZToastNotification$1 = /*@__PURE__*/ proxyCustomElement(class ZToastNotifi
|
|
|
2789
2786
|
startClosingTimeout(time) {
|
|
2790
2787
|
this.timeoutHandle = window.setTimeout(() => this.emitToastClose(this.mapSlideOutClass()), time);
|
|
2791
2788
|
}
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
let totalWidth = 0;
|
|
2796
|
-
for (let i = 0; i < children.length; i++) {
|
|
2797
|
-
totalWidth += children[i].offsetWidth;
|
|
2798
|
-
}
|
|
2799
|
-
return totalWidth > parentWidth;
|
|
2800
|
-
}
|
|
2801
|
-
renderText() {
|
|
2802
|
-
return (h("div", { id: "text", ref: (el) => (this.toastText = el) }, this.heading && h("span", { class: "title" }, this.heading), h("span", { class: "message" }, this.message)));
|
|
2803
|
-
}
|
|
2804
|
-
renderButton() {
|
|
2805
|
-
return (h("div", { id: "button" }, h("slot", { name: "button" })));
|
|
2806
|
-
}
|
|
2807
|
-
renderCloseIcon() {
|
|
2808
|
-
if (!this.closebutton) {
|
|
2809
|
-
return;
|
|
2810
|
-
}
|
|
2811
|
-
return (h("div", { id: "icon" }, h("z-icon", { tabIndex: 0, name: "multiply-circled", width: 15, height: 15, onClick: () => this.emitToastClose(this.mapSlideOutClass()), onKeyPress: (e) => {
|
|
2812
|
-
if (e.keyCode == 32 || e.keyCode == 13) {
|
|
2789
|
+
renderContent() {
|
|
2790
|
+
return (h("div", { id: "external-container", tabIndex: 0, class: { [this.type]: !!this.type } }, h("div", { id: "inner-container" }, h("div", { id: "text" }, this.heading && h("span", { class: "title" }, this.heading), h("span", { class: "message" }, this.message)), h("div", { id: "button" }, h("slot", { name: "button" }))), h("div", { id: "icon" }, this.closebutton && (h("z-icon", { tabIndex: 0, name: "multiply-circled", width: 15, height: 15, onClick: () => this.emitToastClose(this.mapSlideOutClass()), onKeyPress: (e) => {
|
|
2791
|
+
if (e.code == KeyboardCode.SPACE || e.code == KeyboardCode.ENTER) {
|
|
2813
2792
|
e.preventDefault();
|
|
2814
2793
|
this.emitToastClose(this.mapSlideOutClass());
|
|
2815
2794
|
}
|
|
2816
|
-
} })));
|
|
2817
|
-
}
|
|
2818
|
-
renderContainer() {
|
|
2819
|
-
return (h("div", { tabIndex: 0, id: "external-container", class: {
|
|
2820
|
-
[this.type]: !!this.type,
|
|
2821
|
-
"several-lines-padding": this.isTextLong,
|
|
2822
|
-
}, ref: (el) => (this.container = el) }, this.renderText(), this.renderButton(), this.renderCloseIcon()));
|
|
2823
|
-
}
|
|
2824
|
-
renderMobileContainer() {
|
|
2825
|
-
return (h("div", { id: "external-container", class: {
|
|
2826
|
-
[this.type]: !!this.type,
|
|
2827
|
-
"several-lines-padding": this.isTextLong,
|
|
2828
|
-
"mobile-wrapped": this.isTextLong,
|
|
2829
|
-
} }, h("div", { id: "flex-container", ref: (el) => (this.container = el) }, this.renderText(), this.renderButton()), this.renderCloseIcon()));
|
|
2795
|
+
} })))));
|
|
2830
2796
|
}
|
|
2831
2797
|
render() {
|
|
2832
|
-
return (h(Host, { key: '
|
|
2833
|
-
"--percentuale": `${this.percentage}%`,
|
|
2834
|
-
}, class: this.transition ? this.transition : ToastNotificationTransition.SLIDE_IN_DOWN, onAnimationEnd: (e) => {
|
|
2798
|
+
return (h(Host, { key: 'f9b4a2fe7d3642b1cbbe6f2e433ddbbde49568fd', style: { "--percentuale": `${this.percentage}%` }, class: this.transition ? this.transition : ToastNotificationTransition.SLIDE_IN_DOWN, onAnimationEnd: (e) => {
|
|
2835
2799
|
if (this.autoclose && e.animationName.includes("slidein")) {
|
|
2836
2800
|
this.startClosingTimeout(this.autoclose);
|
|
2837
2801
|
}
|
|
2838
2802
|
if (e.animationName.includes("slideout")) {
|
|
2839
2803
|
this.hostElement.parentNode.removeChild(this.hostElement);
|
|
2840
2804
|
}
|
|
2841
|
-
} }, this.
|
|
2805
|
+
} }, this.renderContent()));
|
|
2842
2806
|
}
|
|
2843
2807
|
get hostElement() { return this; }
|
|
2844
2808
|
static get watchers() { return {
|