@zanichelli/albe-web-components 2.48.1 → 3.1.1

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.
Files changed (111) hide show
  1. package/CHANGELOG.md +1647 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/web-components-library.cjs.js +1 -1
  4. package/dist/cjs/{z-app-switcher_11.cjs.entry.js → z-app-switcher_12.cjs.entry.js} +45 -6
  5. package/dist/cjs/z-cookiebar.cjs.entry.js +3 -3
  6. package/dist/cjs/z-date-picker.cjs.entry.js +104 -4
  7. package/dist/cjs/z-file-upload.cjs.entry.js +14 -11
  8. package/dist/cjs/z-footer.cjs.entry.js +12 -7
  9. package/dist/cjs/z-modal-login.cjs.entry.js +5 -4
  10. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +2 -2
  11. package/dist/cjs/z-myz-topbar.cjs.entry.js +2 -2
  12. package/dist/cjs/z-table-cell.cjs.entry.js +1 -1
  13. package/dist/cjs/z-table-header.cjs.entry.js +1 -1
  14. package/dist/cjs/z-table.cjs.entry.js +2 -2
  15. package/dist/cjs/z-toast-notification.cjs.entry.js +1 -1
  16. package/dist/collection/collection-manifest.json +1 -0
  17. package/dist/collection/components/buttons/z-button/index.js +75 -52
  18. package/dist/collection/components/buttons/z-button/styles.css +32 -111
  19. package/dist/collection/components/file-upload/z-file-upload/index.js +13 -10
  20. package/dist/collection/components/file-upload/z-file-upload/styles.css +2 -2
  21. package/dist/collection/components/footer/z-footer/index.js +19 -14
  22. package/dist/collection/components/footer/z-footer/styles.css +2 -2
  23. package/dist/collection/components/modal/z-modal-login/index.js +5 -4
  24. package/dist/collection/components/modal/z-modal-login/styles.css +8 -8
  25. package/dist/collection/components/notification/z-cookiebar/index.js +2 -2
  26. package/dist/collection/components/notification/z-cookiebar/styles.css +3 -3
  27. package/dist/collection/components/notification/z-toast-notification/styles.css +4 -2
  28. package/dist/collection/components/z-date-picker/index.js +111 -4
  29. package/dist/collection/components/z-date-picker/styles.css +14 -4
  30. package/dist/collection/components/z-table/z-table/index.js +4 -4
  31. package/dist/collection/components/z-table/z-table-cell/index.js +1 -1
  32. package/dist/collection/components/z-table/z-table-header/index.js +1 -1
  33. package/dist/collection/deprecated/z-button-deprecated/index.js +218 -0
  34. package/dist/collection/deprecated/z-button-deprecated/styles.css +231 -0
  35. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
  36. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/styles.css +1 -1
  37. package/dist/collection/snowflakes/myz/topbar/index.js +1 -1
  38. package/dist/collection/snowflakes/myz/topbar/styles.css +8 -8
  39. package/dist/esm/loader.js +1 -1
  40. package/dist/esm/web-components-library.js +1 -1
  41. package/dist/esm/{z-app-switcher_11.entry.js → z-app-switcher_12.entry.js} +45 -7
  42. package/dist/esm/z-cookiebar.entry.js +3 -3
  43. package/dist/esm/z-date-picker.entry.js +104 -4
  44. package/dist/esm/z-file-upload.entry.js +14 -11
  45. package/dist/esm/z-footer.entry.js +12 -7
  46. package/dist/esm/z-modal-login.entry.js +5 -4
  47. package/dist/esm/z-myz-card-dictionary.entry.js +2 -2
  48. package/dist/esm/z-myz-topbar.entry.js +2 -2
  49. package/dist/esm/z-table-cell.entry.js +1 -1
  50. package/dist/esm/z-table-header.entry.js +1 -1
  51. package/dist/esm/z-table.entry.js +2 -2
  52. package/dist/esm/z-toast-notification.entry.js +1 -1
  53. package/dist/types/components/buttons/z-button/index.d.ts +14 -7
  54. package/dist/types/components/z-date-picker/index.d.ts +6 -0
  55. package/dist/types/components.d.ts +95 -2
  56. package/dist/types/deprecated/z-button-deprecated/index.d.ts +28 -0
  57. package/dist/web-components-library/p-0b590426.entry.js +1 -0
  58. package/dist/web-components-library/p-2b8975b1.entry.js +1 -0
  59. package/dist/web-components-library/p-2ff952a3.entry.js +1 -0
  60. package/dist/web-components-library/p-459dab30.entry.js +1 -0
  61. package/dist/web-components-library/{p-791cbcab.entry.js → p-a391566a.entry.js} +1 -1
  62. package/dist/web-components-library/{p-ae2e17b4.entry.js → p-adad78fc.entry.js} +1 -1
  63. package/dist/web-components-library/{p-3dba3a83.entry.js → p-bbb0e7a7.entry.js} +2 -2
  64. package/dist/web-components-library/p-cce20009.entry.js +1 -0
  65. package/dist/web-components-library/p-cd2ca92b.entry.js +1 -0
  66. package/dist/web-components-library/p-da7760a3.entry.js +1 -0
  67. package/dist/web-components-library/p-dcf4d1b6.entry.js +1 -0
  68. package/dist/web-components-library/p-f6254eeb.entry.js +1 -0
  69. package/dist/web-components-library/web-components-library.esm.js +1 -1
  70. package/package.json +1 -1
  71. package/react/components.d.ts +1 -0
  72. package/react/components.js +4 -3
  73. package/react/components.js.map +1 -1
  74. package/src-react/index.ts +1 -0
  75. package/www/build/p-0b590426.entry.js +1 -0
  76. package/www/build/p-2b8975b1.entry.js +1 -0
  77. package/www/build/p-2ff952a3.entry.js +1 -0
  78. package/www/build/p-459dab30.entry.js +1 -0
  79. package/www/build/p-9ab0287a.js +129 -0
  80. package/www/build/{p-791cbcab.entry.js → p-a391566a.entry.js} +1 -1
  81. package/www/build/{p-ae2e17b4.entry.js → p-adad78fc.entry.js} +1 -1
  82. package/www/build/{p-3dba3a83.entry.js → p-bbb0e7a7.entry.js} +2 -2
  83. package/www/build/p-cce20009.entry.js +1 -0
  84. package/www/build/p-cd2ca92b.entry.js +1 -0
  85. package/www/build/p-da7760a3.entry.js +1 -0
  86. package/www/build/p-dcf4d1b6.entry.js +1 -0
  87. package/www/build/p-f6254eeb.entry.js +1 -0
  88. package/www/build/p-fcff1237.css +812 -0
  89. package/www/build/web-components-library.esm.js +1 -1
  90. package/www/index.html +2 -2
  91. package/www/pages/notification.html +10 -7
  92. package/dist/web-components-library/p-114f3a85.entry.js +0 -1
  93. package/dist/web-components-library/p-29f07a9b.entry.js +0 -1
  94. package/dist/web-components-library/p-3edd463d.entry.js +0 -1
  95. package/dist/web-components-library/p-4b166956.entry.js +0 -1
  96. package/dist/web-components-library/p-6ef6464c.entry.js +0 -1
  97. package/dist/web-components-library/p-8188846a.entry.js +0 -1
  98. package/dist/web-components-library/p-a15db194.entry.js +0 -1
  99. package/dist/web-components-library/p-a2a3a537.entry.js +0 -1
  100. package/dist/web-components-library/p-b60fe58c.entry.js +0 -1
  101. package/www/build/p-114f3a85.entry.js +0 -1
  102. package/www/build/p-29f07a9b.entry.js +0 -1
  103. package/www/build/p-3edd463d.entry.js +0 -1
  104. package/www/build/p-4b166956.entry.js +0 -1
  105. package/www/build/p-6ef6464c.entry.js +0 -1
  106. package/www/build/p-8188846a.entry.js +0 -1
  107. package/www/build/p-88b56b6e.css +0 -1
  108. package/www/build/p-a15db194.entry.js +0 -1
  109. package/www/build/p-a2a3a537.entry.js +0 -1
  110. package/www/build/p-b60fe58c.entry.js +0 -1
  111. package/www/build/p-f8ba306b.js +0 -1
@@ -58,9 +58,9 @@ const ZTable = class {
58
58
  : index$1.ButtonSizeEnum.big;
59
59
  const tableContentClass = `${!!this.hasTableBody ? "table-content" : ""}`;
60
60
  if (this.hasTableBody) {
61
- return (index.h(index.Host, null, index.h("div", { class: tableClass }, index.h("slot", { name: "table-header" }), index.h("div", { class: tableContentClass }, index.h("slot", { name: "table-body" }), index.h("z-table-empty-box", { class: this.bordered && "bordered", message: this.message, subtitle: this.subtitle }, !!this.callToActionLabel && (index.h("z-button", { slot: "cta1", variant: index$1.ButtonVariantEnum.tertiary, onClick: () => this.callToAction.emit(), size: buttonSize }, this.callToActionLabel)), !!this.callToActionTwoLabel && (index.h("z-button", { slot: "cta2", variant: index$1.ButtonVariantEnum.tertiary, onClick: () => this.callToActionTwo.emit(), size: buttonSize }, this.callToActionTwoLabel)))))));
61
+ return (index.h(index.Host, null, index.h("div", { class: tableClass }, index.h("slot", { name: "table-header" }), index.h("div", { class: tableContentClass }, index.h("slot", { name: "table-body" }), index.h("z-table-empty-box", { class: this.bordered && "bordered", message: this.message, subtitle: this.subtitle }, !!this.callToActionLabel && (index.h("z-button-deprecated", { slot: "cta1", variant: index$1.ButtonVariantEnum.tertiary, onClick: () => this.callToAction.emit(), size: buttonSize }, this.callToActionLabel)), !!this.callToActionTwoLabel && (index.h("z-button-deprecated", { slot: "cta2", variant: index$1.ButtonVariantEnum.tertiary, onClick: () => this.callToActionTwo.emit(), size: buttonSize }, this.callToActionTwoLabel)))))));
62
62
  }
63
- return (index.h(index.Host, null, index.h("div", { class: tableClass }, index.h("slot", { name: "table-header" })), index.h("z-table-empty-box", { class: this.bordered && "bordered", message: this.message, subtitle: this.subtitle }, !!this.callToActionLabel && (index.h("z-button", { slot: "cta1", variant: index$1.ButtonVariantEnum.tertiary, onClick: () => this.callToAction.emit(), size: buttonSize }, this.callToActionLabel)), !!this.callToActionTwoLabel && (index.h("z-button", { slot: "cta2", variant: index$1.ButtonVariantEnum.tertiary, onClick: () => this.callToActionTwo.emit(), size: buttonSize }, this.callToActionTwoLabel)))));
63
+ return (index.h(index.Host, null, index.h("div", { class: tableClass }, index.h("slot", { name: "table-header" })), index.h("z-table-empty-box", { class: this.bordered && "bordered", message: this.message, subtitle: this.subtitle }, !!this.callToActionLabel && (index.h("z-button-deprecated", { slot: "cta1", variant: index$1.ButtonVariantEnum.tertiary, onClick: () => this.callToAction.emit(), size: buttonSize }, this.callToActionLabel)), !!this.callToActionTwoLabel && (index.h("z-button-deprecated", { slot: "cta2", variant: index$1.ButtonVariantEnum.tertiary, onClick: () => this.callToActionTwo.emit(), size: buttonSize }, this.callToActionTwoLabel)))));
64
64
  }
65
65
  render() {
66
66
  const tableClass = `table ${this.empty ? "table-empty" : ""} ${this.bordered ? "table-bordered" : ""}
@@ -8,7 +8,7 @@ const breakpoints = require('./breakpoints-88c4fd6c.js');
8
8
  const hammer = require('./hammer-4f20813e.js');
9
9
  require('./_commonjsHelpers-537d719a.js');
10
10
 
11
- const stylesCss = ":host{display:inline-block;min-width:200px;width:100vw}: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%{transform:translateY(100%);opacity:0}100%{transform:translateY(0);opacity:100%}}@keyframes slideindown{0%{transform:translateY(-100%);opacity:0}100%{transform:translateY(0);opacity:100%}}@keyframes slideoutleft{0%{transform:translateX(var(--percentuale));opacity:calc(100-var(--percentuale))}100%{transform:translateX(-100%);opacity:0%}}@keyframes slideoutright{0%{transform:translateX(var(--percentuale));opacity:calc(100-var(--percentuale))}100%{transform:translateX(100%);opacity:0%}}@keyframes slideoutup{0%{transform:translateY(var(--percentuale));opacity:100%}100%{transform:translateY(-100%);opacity:0}}@keyframes slideoutdown{0%{transform:translateY(var(--percentuale));opacity:100%}100%{transform:translateY(100%);opacity:0}}:host>#external-container{font-family:var(--font-family-sans);font-weight:var(--font-rg);border-radius:4px;font-size:14px;letter-spacing:0.16px;box-sizing:border-box;min-height:52px;padding:calc(var(--space-unit) * 1) calc(var(--space-unit) * 2);display:flex;align-items:center;justify-content:space-between;box-shadow:var(--shadow-3)}:host>#external-container.mobile-wrapped>#icon{align-self:flex-start}:host>#external-container.several-lines-padding{padding:calc(var(--space-unit) * 2)}:host>#external-container>#flex-container{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;width:100%}:host>#external-container #text{color:var(--color-white);line-height:20px;margin-right:calc(var(--space-unit) * 2);letter-spacing:0.16px;text-align:left}:host>#external-container #text>.title{margin-right:4px;font-weight:600}:host>#external-container.mobile-wrapped #button ::slotted(z-button){margin-top:calc(var(--space-unit) * 2)}:host>#external-container #icon{cursor:pointer;fill:var(--color-white);margin-left:calc(var(--space-unit) * 2)}:host>#external-container.dark{background:var(--gray800)}:host>#external-container.light{background:var(--color-background)}:host>#external-container.light #icon,:host>#external-container.warning #text,:host>#external-container.warning #icon{fill:var(--color-icon01)}:host>#external-container.light #text,:host>#external-container.warning #text{color:var(--grey800)}:host>#external-container.accent{background:var(--color-primary01)}:host>#external-container.error{background:var(--color-error-default)}:host>#external-container.success{background:var(--color-success-default)}:host>#external-container.warning{background:var(--color-warning-default)}@media only screen and (min-width: 768px){:host{width:unset;max-width:50vw}:host>#external-container>#flex-container{flex-wrap:nowrap}:host>#external-container #text{width:100%}}@media only screen and (min-width: 1366px){:host{width:unset;max-width:33vw}}";
11
+ const stylesCss = ":host{display:inline-block;min-width:200px;width:100vw}: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%{transform:translateY(100%);opacity:0}100%{transform:translateY(0);opacity:100%}}@keyframes slideindown{0%{transform:translateY(-100%);opacity:0}100%{transform:translateY(0);opacity:100%}}@keyframes slideoutleft{0%{transform:translateX(var(--percentuale));opacity:calc(100-var(--percentuale))}100%{transform:translateX(-100%);opacity:0%}}@keyframes slideoutright{0%{transform:translateX(var(--percentuale));opacity:calc(100-var(--percentuale))}100%{transform:translateX(100%);opacity:0%}}@keyframes slideoutup{0%{transform:translateY(var(--percentuale));opacity:100%}100%{transform:translateY(-100%);opacity:0}}@keyframes slideoutdown{0%{transform:translateY(var(--percentuale));opacity:100%}100%{transform:translateY(100%);opacity:0}}:host>#external-container{font-family:var(--font-family-sans);font-weight:var(--font-rg);border-radius:4px;font-size:14px;letter-spacing:0.16px;box-sizing:border-box;min-height:52px;padding:calc(var(--space-unit) * 1) calc(var(--space-unit) * 2);display:flex;align-items:center;justify-content:space-between;box-shadow:var(--shadow-3)}:host>#external-container.mobile-wrapped>#icon{align-self:flex-start}:host>#external-container.several-lines-padding{padding:calc(var(--space-unit) * 2)}:host>#external-container>#flex-container{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;width:100%}:host>#external-container #text{color:var(--color-white);line-height:20px;margin-right:calc(var(--space-unit) * 2);letter-spacing:0.16px;text-align:left}:host>#external-container #text>.title{margin-right:4px;font-weight:600}:host>#external-container.mobile-wrapped #button ::slotted(z-button-deprecated){margin-top:calc(var(--space-unit) * 2)}:host>#external-container #icon{cursor:pointer;fill:var(--color-white);margin-left:calc(var(--space-unit) * 2)}:host>#external-container.dark{background:var(--gray800)}:host>#external-container.light{background:var(--color-background)}:host>#external-container.light #icon,:host>#external-container.warning #text,:host>#external-container.warning #icon{fill:var(--color-icon01)}:host>#external-container.light #text,:host>#external-container.warning #text{color:var(--grey800)}:host>#external-container.accent{background:var(--color-primary01)}:host>#external-container.error{background:var(--color-error-default)}:host>#external-container.success{background:var(--color-success-default)}:host>#external-container.warning{background:var(--color-warning-default)}@media only screen and (min-width: 768px){:host{width:unset;max-width:50vw}:host>#external-container>#flex-container{flex-wrap:nowrap}:host>#external-container #text{width:100%}}@media only screen and (min-width: 1366px){:host{width:unset;max-width:33vw}}";
12
12
 
13
13
  const ZToastNotification = class {
14
14
  constructor(hostRef) {
@@ -76,6 +76,7 @@
76
76
  "./components/z-table/z-table-sticky-footer/index.js",
77
77
  "./components/z-tag/index.js",
78
78
  "./components/z-visually-hidden/index.js",
79
+ "./deprecated/z-button-deprecated/index.js",
79
80
  "./deprecated/z-button-filter/index.js",
80
81
  "./deprecated/z-chip-deprecated/index.js",
81
82
  "./deprecated/z-status-tag/index.js",
@@ -10,26 +10,37 @@ 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`, `tertiary`, `dark-bg`. Defaults to `primary`. */
13
+ /** Graphical variant: `primary`, `secondary`, `tertiary`. 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;
17
- /** Reduce button size (deprecated).
18
- * @deprecated Use `size` prop.
19
- */
20
- this.issmall = false;
21
- /** Spy to render square button. */
22
- this.square = false;
23
17
  }
24
- render() {
18
+ getAttributes() {
19
+ return {
20
+ id: this.htmlid,
21
+ class: classNames(this.variant, this.size),
22
+ "aria-label": this.ariaLabel,
23
+ };
24
+ }
25
+ componentDidLoad() {
26
+ if (this.hostElement.innerText) {
27
+ this.hostElement.classList.add("with-text");
28
+ }
29
+ }
30
+ componentWillRender() {
25
31
  this.hostElement.style.pointerEvents = this.disabled ? "none" : "auto";
26
- return (h("slot", { name: "element" },
27
- h("button", { id: this.htmlid, name: this.name, type: this.type, disabled: this.disabled, class: classNames(this.variant, this.size, { issmall: this.issmall }, { square: this.square }) },
32
+ }
33
+ render() {
34
+ if (this.href)
35
+ return (h("a", Object.assign({ href: this.href, target: this.target }, this.getAttributes()),
28
36
  this.icon && h("z-icon", { name: this.icon, width: 16, height: 16 }),
29
- h("slot", null))));
37
+ h("slot", null)));
38
+ return (h("button", Object.assign({ name: this.name, type: this.type, disabled: this.disabled }, this.getAttributes()),
39
+ this.icon && h("z-icon", { name: this.icon, width: 16, height: 16 }),
40
+ h("slot", null)));
30
41
  }
31
42
  static get is() { return "z-button"; }
32
- static get encapsulation() { return "shadow"; }
43
+ static get encapsulation() { return "scoped"; }
33
44
  static get originalStyleUrls() { return {
34
45
  "$": ["styles.css"]
35
46
  }; }
@@ -37,6 +48,57 @@ export class ZButton {
37
48
  "$": ["styles.css"]
38
49
  }; }
39
50
  static get properties() { return {
51
+ "ariaLabel": {
52
+ "type": "string",
53
+ "mutable": false,
54
+ "complexType": {
55
+ "original": "string",
56
+ "resolved": "string",
57
+ "references": {}
58
+ },
59
+ "required": false,
60
+ "optional": true,
61
+ "docs": {
62
+ "tags": [],
63
+ "text": "defines a string value that labels an interactive element, used for accessibility."
64
+ },
65
+ "attribute": "aria-label",
66
+ "reflect": true
67
+ },
68
+ "href": {
69
+ "type": "string",
70
+ "mutable": false,
71
+ "complexType": {
72
+ "original": "string",
73
+ "resolved": "string",
74
+ "references": {}
75
+ },
76
+ "required": false,
77
+ "optional": true,
78
+ "docs": {
79
+ "tags": [],
80
+ "text": "HTML a href attribute. If it is set, it renders an HTML a tag."
81
+ },
82
+ "attribute": "href",
83
+ "reflect": true
84
+ },
85
+ "target": {
86
+ "type": "string",
87
+ "mutable": false,
88
+ "complexType": {
89
+ "original": "string",
90
+ "resolved": "string",
91
+ "references": {}
92
+ },
93
+ "required": false,
94
+ "optional": true,
95
+ "docs": {
96
+ "tags": [],
97
+ "text": "HTML a target attribute."
98
+ },
99
+ "attribute": "target",
100
+ "reflect": true
101
+ },
40
102
  "htmlid": {
41
103
  "type": "string",
42
104
  "mutable": false,
@@ -128,7 +190,7 @@ export class ZButton {
128
190
  "optional": true,
129
191
  "docs": {
130
192
  "tags": [],
131
- "text": "Graphical variant: `primary`, `secondary`, `tertiary`, `dark-bg`. Defaults to `primary`."
193
+ "text": "Graphical variant: `primary`, `secondary`, `tertiary`. Defaults to `primary`."
132
194
  },
133
195
  "attribute": "variant",
134
196
  "reflect": true,
@@ -173,45 +235,6 @@ export class ZButton {
173
235
  "attribute": "size",
174
236
  "reflect": true,
175
237
  "defaultValue": "ButtonSizeEnum.big"
176
- },
177
- "issmall": {
178
- "type": "boolean",
179
- "mutable": false,
180
- "complexType": {
181
- "original": "boolean",
182
- "resolved": "boolean",
183
- "references": {}
184
- },
185
- "required": false,
186
- "optional": true,
187
- "docs": {
188
- "tags": [{
189
- "name": "deprecated",
190
- "text": "Use `size` prop."
191
- }],
192
- "text": "Reduce button size (deprecated)."
193
- },
194
- "attribute": "issmall",
195
- "reflect": true,
196
- "defaultValue": "false"
197
- },
198
- "square": {
199
- "type": "boolean",
200
- "mutable": false,
201
- "complexType": {
202
- "original": "boolean",
203
- "resolved": "boolean",
204
- "references": {}
205
- },
206
- "required": false,
207
- "optional": true,
208
- "docs": {
209
- "tags": [],
210
- "text": "Spy to render square button."
211
- },
212
- "attribute": "square",
213
- "reflect": true,
214
- "defaultValue": "false"
215
238
  }
216
239
  }; }
217
240
  static get elementRef() { return "hostElement"; }
@@ -1,26 +1,22 @@
1
1
  :host {
2
2
  display: inline-block;
3
-
4
3
  --z-icon-width: 16px;
5
4
  --z-icon-height: 16px;
6
- --z-icon-right-margin: var(--space-unit);
7
- --rgb-white: 240, 240, 240
5
+ --z-icon-right-margin: 0;
6
+ --rgb-white: 240, 240, 240;
8
7
  }
9
8
 
10
9
  button:disabled,
11
- ::slotted(button:disabled) {
10
+ a:disabled {
12
11
  pointer-events: none;
13
12
  }
14
13
 
15
14
  button,
16
- ::slotted(button),
17
- ::slotted(a) {
15
+ a {
18
16
  box-sizing: border-box;
19
17
  display: inline-flex;
20
- flex-direction: row;
21
18
  align-items: center;
22
19
  justify-content: center;
23
- width: 100%;
24
20
  font-family: var(--dashboard-font);
25
21
  font-weight: var(--font-sb);
26
22
  font-size: 14px;
@@ -29,67 +25,48 @@ button,
29
25
  border-width: var(--border-size-medium);
30
26
  border-style: solid;
31
27
  border-radius: var(--border-radius);
32
- vertical-align: middle;
33
28
  text-transform: uppercase;
34
29
  text-decoration: none;
35
30
  cursor: pointer;
31
+ width: 100%;
36
32
  white-space: nowrap;
37
33
  outline: none;
38
34
  fill: currentColor;
39
35
  }
40
36
 
41
- button.big,
42
- :host([size="big"]) ::slotted(button),
43
- :host([size="big"]) ::slotted(a) {
44
- height: 44px;
45
- min-width: 44px;
37
+ :host.with-text z-icon {
38
+ --z-icon-right-margin: var(--space-unit);
46
39
  }
47
40
 
48
- button.small,
49
- :host([size="small"]) ::slotted(button),
50
- :host([size="small"]) ::slotted(a) {
51
- height: 36px;
52
- min-width: 36px;
41
+ :host.with-text button,
42
+ :host.with-text a {
43
+ min-width: calc(var(--space-unit) * 8);
44
+ padding: 0 calc(var(--space-unit) * 2);
53
45
  }
54
46
 
55
- button.issmall,
56
- :host([issmall]) ::slotted(button),
57
- :host([issmall]) ::slotted(a) {
47
+ .big {
48
+ height: 44px;
49
+ min-width: 44px;
50
+ }
51
+
52
+ .small {
58
53
  height: 36px;
59
54
  min-width: 36px;
60
55
  }
61
56
 
62
- button.x-small,
63
- :host([size="x-small"]) ::slotted(button),
64
- :host([size="x-small"]) ::slotted(a) {
57
+ .x-small {
65
58
  height: 32px;
66
59
  min-width: 32px;
67
60
  }
68
61
 
69
- button:not(.square),
70
- :host(:not([square])) ::slotted(button),
71
- :host(:not([square])) ::slotted(a) {
72
- min-width: calc(var(--space-unit) * 8);
73
- padding: 0 calc(var(--space-unit) * 2);
74
- }
75
-
76
- button.square,
77
- :host([square]) {
78
- --z-icon-right-margin: 0;
79
- }
80
-
81
- button.primary,
82
- :host([variant="primary"]) ::slotted(button),
83
- :host([variant="primary"]) ::slotted(a) {
62
+ .primary {
84
63
  background-color: var(--color-primary01);
85
64
  border-color: var(--color-primary01);
86
65
  color: var(--color-text-inverse);
87
66
  }
88
67
 
89
68
  @media (hover: hover) {
90
- button.primary:hover,
91
- :host([variant="primary"]) ::slotted(button:hover),
92
- :host([variant="primary"]) ::slotted(a:hover) {
69
+ .primary:hover {
93
70
  background-color: var(--color-hover-primary);
94
71
  border-color: var(--color-hover-primary);
95
72
  color: var(--color-text-inverse);
@@ -97,135 +74,79 @@ button.primary,
97
74
  }
98
75
 
99
76
  button:focus:focus-visible,
100
- ::slotted(button:focus:focus-visible),
101
- ::slotted(a:focus:focus-visible) {
77
+ a:focus:focus-visible {
102
78
  box-shadow: var(--shadow-focus-primary);
103
79
  }
104
80
 
105
- button.primary:active,
106
- :host([variant="primary"]) ::slotted(button:active),
107
- :host([variant="primary"]) ::slotted(a:active) {
81
+ .primary:active {
108
82
  background-color: var(--color-pressed-primary);
109
83
  border-color: var(--color-pressed-primary);
110
84
  color: var(--color-text-inverse);
111
85
  box-shadow: var(--shadow-2);
112
86
  }
113
87
 
114
- button.primary:disabled,
115
- :host([variant="primary"]) ::slotted(button:disabled) {
88
+ .primary:disabled {
116
89
  background-color: var(--color-disabled01);
117
90
  border-color: var(--color-disabled01);
118
91
  color: var(--color-disabled02);
119
92
  }
120
93
 
121
- button.secondary,
122
- :host([variant="secondary"]) ::slotted(button),
123
- :host([variant="secondary"]) ::slotted(a) {
94
+ .secondary {
124
95
  background-color: var(--color-surface01);
125
96
  border-color: var(--color-primary01);
126
97
  color: var(--color-primary01);
127
98
  }
128
99
 
129
100
  @media (hover: hover) {
130
- button.secondary:hover,
131
- :host([variant="secondary"]) ::slotted(button:hover),
132
- :host([variant="secondary"]) ::slotted(a:hover) {
101
+ .secondary:hover {
133
102
  background-color: var(--color-surface01);
134
103
  border-color: var(--color-hover-primary);
135
104
  color: var(--color-hover-primary);
136
105
  }
137
106
  }
138
107
 
139
- button.secondary:active,
140
- :host([variant="secondary"]) ::slotted(button:active),
141
- :host([variant="secondary"]) ::slotted(a:active) {
108
+ .secondary:active {
142
109
  background-color: var(--color-surface01);
143
110
  border-color: var(--color-pressed-primary);
144
111
  color: var(--color-pressed-primary);
145
112
  box-shadow: var(--shadow-2);
146
113
  }
147
114
 
148
- button.secondary:disabled,
149
- :host([variant="secondary"]) ::slotted(button:disabled) {
115
+ .secondary:disabled {
150
116
  background-color: var(--color-surface01);
151
117
  border-color: var(--color-disabled01);
152
118
  color: var(--color-disabled02);
153
119
  }
154
120
 
155
- button.tertiary,
156
- :host([variant="tertiary"]) ::slotted(button),
157
- :host([variant="tertiary"]) ::slotted(a) {
121
+ .tertiary {
158
122
  background-color: transparent;
159
123
  border-color: transparent;
160
124
  color: var(--color-primary01);
161
125
  }
162
126
 
163
- button.tertiary.hasContent {
164
- padding: 0 var(--space-unit);
165
- }
166
-
167
127
  @media (hover: hover) {
168
- button.tertiary:hover,
169
- :host([variant="tertiary"]) ::slotted(button:hover),
170
- :host([variant="tertiary"]) ::slotted(a:hover) {
128
+ .tertiary:hover {
171
129
  background-color: var(--color-primary03);
172
130
  border-color: var(--color-primary03);
173
131
  color: var(--color-hover-primary);
174
132
  }
175
133
  }
176
134
 
177
- button.tertiary:focus:focus-visible,
178
- :host([variant="tertiary"]) ::slotted(button:focus:focus-visible),
179
- :host([variant="tertiary"]) ::slotted(a:focus:focus-visible) {
135
+ .tertiary:focus:focus-visible {
180
136
  background-color: var(--color-surface01);
181
137
  border-color: var(--color-surface01);
182
138
  color: var(--color-primary01);
183
139
  }
184
140
 
185
- button.tertiary:active,
186
- :host([variant="tertiary"]) ::slotted(button:active),
187
- :host([variant="tertiary"]) ::slotted(a:active) {
141
+ .tertiary:active {
188
142
  background-color: var(--color-surface01);
189
143
  border-color: var(--color-surface01);
190
144
  color: var(--color-primary01);
191
145
  box-shadow: var(--shadow-2);
192
146
  }
193
147
 
194
- button.tertiary:disabled,
195
- :host([variant="tertiary"]) ::slotted(button:disabled) {
148
+ .tertiary:disabled {
196
149
  background-color: transparent;
197
150
  border-color: transparent;
198
151
  color: var(--color-disabled02);
199
152
  }
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
- }
@@ -39,10 +39,12 @@ export class ZFileUpload {
39
39
  }
40
40
  handleAccessibility() {
41
41
  if (this.filesNumber > 0) {
42
- this.el.querySelector('z-file:last-child z-chip button').focus();
42
+ this.el.querySelector("z-file:last-child z-chip button").focus();
43
43
  }
44
44
  else {
45
- this.type === ZFileUploadTypeEnum.default ? this.button.shadowRoot.querySelector('button').focus() : this.uploadLink.focus();
45
+ this.type === ZFileUploadTypeEnum.default
46
+ ? this.button.shadowRoot.querySelector("button").focus()
47
+ : this.uploadLink.focus();
46
48
  }
47
49
  }
48
50
  checkFiles(files) {
@@ -81,9 +83,10 @@ export class ZFileUpload {
81
83
  let fileFormatString = "";
82
84
  let fileWeightString = "";
83
85
  if (this.acceptedFormat) {
84
- const fileFormat = this.acceptedFormat.split(', ')
86
+ const fileFormat = this.acceptedFormat
87
+ .split(", ")
85
88
  .map((string) => string.substring(1).toUpperCase())
86
- .join(', ');
89
+ .join(", ");
87
90
  fileFormatString = ` nei formati ${fileFormat}`;
88
91
  }
89
92
  if (this.fileMaxSize) {
@@ -105,12 +108,12 @@ export class ZFileUpload {
105
108
  renderUploadButton() {
106
109
  return [
107
110
  this.renderInput(),
108
- h("z-button", { onClick: () => this.input.click(), onKeyPress: (e) => {
109
- if (e.code == 'Space' || e.code == 'Enter') {
111
+ h("z-button-deprecated", { onClick: () => this.input.click(), onKeyPress: (e) => {
112
+ if (e.code == "Space" || e.code == "Enter") {
110
113
  e.preventDefault();
111
114
  this.input.click();
112
115
  }
113
- }, id: "fileSelect", variant: this.buttonVariant, icon: "upload", ref: (val) => this.button = val }, "Allega"),
116
+ }, id: "fileSelect", variant: this.buttonVariant, icon: "upload", ref: (val) => (this.button = val) }, "Allega"),
114
117
  ];
115
118
  }
116
119
  renderUploadLink() {
@@ -120,11 +123,11 @@ export class ZFileUpload {
120
123
  "Trascinalo qui o",
121
124
  " ",
122
125
  h("z-body", { tabIndex: 0, class: "upload-link", onClick: () => this.input.click(), onKeyPress: (e) => {
123
- if (e.code == 'Space' || e.code == 'Enter') {
126
+ if (e.code == "Space" || e.code == "Enter") {
124
127
  e.preventDefault();
125
128
  this.input.click();
126
129
  }
127
- }, variant: "semibold", level: 1, ref: (val) => this.uploadLink = val }, "caricalo"),
130
+ }, variant: "semibold", level: 1, ref: (val) => (this.uploadLink = val) }, "caricalo"),
128
131
  " ",
129
132
  "dal tuo computer"),
130
133
  ];
@@ -166,7 +169,7 @@ export class ZFileUpload {
166
169
  this.type == ZFileUploadTypeEnum.default
167
170
  ? this.renderDefaultMode()
168
171
  : this.renderDragDropMode()),
169
- !!this.invalidFiles.size && (h("z-modal", { tabIndex: 0, ref: (val) => this.errorModal = val, modaltitle: "Attenzione", onModalClose: () => this.invalidFiles = new Map(), onModalBackgroundClick: () => this.invalidFiles = new Map() }, this.handleErrorModalContent()))
172
+ !!this.invalidFiles.size && (h("z-modal", { tabIndex: 0, ref: (val) => (this.errorModal = val), modaltitle: "Attenzione", onModalClose: () => (this.invalidFiles = new Map()), onModalBackgroundClick: () => (this.invalidFiles = new Map()) }, this.handleErrorModalContent())),
170
173
  ];
171
174
  }
172
175
  static get is() { return "z-file-upload"; }
@@ -50,7 +50,7 @@ input#fileElem {
50
50
  margin-bottom: var(--space-unit);
51
51
  }
52
52
 
53
- :host > .container > z-button {
53
+ :host > .container > z-button-deprecated {
54
54
  display: inline-block;
55
55
  margin-top: calc(var(--space-unit) * 3);
56
56
  }
@@ -73,7 +73,7 @@ input#fileElem {
73
73
 
74
74
  /* Tablet breakpoint */
75
75
  @media only screen and (min-width: 768px) {
76
- :host > .container > z-button {
76
+ :host > .container > z-button-deprecated {
77
77
  align-self: flex-start;
78
78
  }
79
79
  }
@@ -8,7 +8,8 @@ import { ButtonSizeEnum, ButtonVariantEnum } from "../../../beans";
8
8
  export class ZFooter {
9
9
  constructor() {
10
10
  this.creditsLinkId = "creditsLinkId";
11
- this.emitReportAProblemButtonClick = this.emitReportAProblemButtonClick.bind(this);
11
+ this.emitReportAProblemButtonClick =
12
+ this.emitReportAProblemButtonClick.bind(this);
12
13
  }
13
14
  componentWillLoad() {
14
15
  if (this.data) {
@@ -81,21 +82,25 @@ export class ZFooter {
81
82
  }
82
83
  renderFooterProductInfo() {
83
84
  var _a;
84
- if (this.productName || this.productVersion || this.productCreditsLink != null || this.showReportAProblemButton) {
85
- const versionString = `${this.productName ? ' versione' : 'Versione'} ${this.productVersion}`;
86
- const creditsObject = h("z-body", { level: 5 },
87
- (this.productName || this.productVersion) && ' - ',
88
- h("z-link", { htmlid: this.creditsLinkId, href: (_a = this.productCreditsLink) === null || _a === void 0 ? void 0 : _a.trim(), target: "_blank", textcolor: "white" }, "Credits"));
85
+ if (this.productName ||
86
+ this.productVersion ||
87
+ this.productCreditsLink != null ||
88
+ this.showReportAProblemButton) {
89
+ const versionString = `${this.productName ? " versione" : "Versione"} ${this.productVersion}`;
90
+ const creditsObject = (h("z-body", { level: 5 },
91
+ (this.productName || this.productVersion) && " - ",
92
+ h("z-link", { htmlid: this.creditsLinkId, href: (_a = this.productCreditsLink) === null || _a === void 0 ? void 0 : _a.trim(), target: "_blank", textcolor: "white" }, "Credits")));
89
93
  return (h("div", { id: "extension" },
90
- h("div", { class: { "limited-width": !!this.contentMaxWidth }, style: this.contentMaxWidth ? { "--mw": `${this.contentMaxWidth}px` } : {} },
94
+ h("div", { class: { "limited-width": !!this.contentMaxWidth }, style: this.contentMaxWidth
95
+ ? { "--mw": `${this.contentMaxWidth}px` }
96
+ : {} },
91
97
  h("span", null,
92
- this.productName && h("z-body", { level: 5, variant: "semibold" }, this.productName),
93
- this.productVersion && h("z-body", { level: 5 }, versionString),
98
+ this.productName && (h("z-body", { level: 5, variant: "semibold" }, this.productName)),
99
+ this.productVersion && (h("z-body", { level: 5 }, versionString)),
94
100
  this.productCreditsLink != null && creditsObject),
95
- this.showReportAProblemButton &&
96
- h("div", null,
97
- h("z-body", { level: 5 }, "Hai bisogno di aiuto?"),
98
- h("z-button", { variant: ButtonVariantEnum["dark-bg"], size: ButtonSizeEnum.small, onClick: this.emitReportAProblemButtonClick }, "SEGNALA UN PROBLEMA")),
101
+ this.showReportAProblemButton && (h("div", null,
102
+ h("z-body", { level: 5 }, "Hai bisogno di aiuto?"),
103
+ h("z-button-deprecated", { variant: ButtonVariantEnum["dark-bg"], size: ButtonSizeEnum.small, onClick: this.emitReportAProblemButtonClick }, "SEGNALA UN PROBLEMA"))),
99
104
  h("z-divider", { color: "gray500" }))));
100
105
  }
101
106
  }
@@ -205,7 +210,7 @@ export class ZFooter {
205
210
  "optional": true,
206
211
  "docs": {
207
212
  "tags": [],
208
- "text": "'undefined' or 'null' means 'don't show Credits',\nempty string means 'emit creditsLinkClick event', \nnot empty string means 'open the url and emit creditsLinkClick event'"
213
+ "text": "'undefined' or 'null' means 'don't show Credits',\nempty string means 'emit creditsLinkClick event',\nnot empty string means 'open the url and emit creditsLinkClick event'"
209
214
  },
210
215
  "attribute": "product-credits-link",
211
216
  "reflect": false
@@ -103,7 +103,7 @@ footer > section > div {
103
103
  margin-top: var(--space-unit);
104
104
  }
105
105
 
106
- #extension z-button {
106
+ #extension z-button-deprecated {
107
107
  margin-left: var(--space-unit);
108
108
  }
109
109
 
@@ -239,4 +239,4 @@ div.limited-width {
239
239
  #extension {
240
240
  padding: calc(var(--space-unit) * 2) calc(var(--space-unit) * 4) 0;
241
241
  }
242
- }
242
+ }
@@ -15,7 +15,8 @@ export class zModalLogin {
15
15
  this.externalProviderCheck = false;
16
16
  }
17
17
  componentDidLoad() {
18
- this.externalProviderCheck = !!this.hostElement.querySelectorAll('[slot="provider"]').length;
18
+ this.externalProviderCheck =
19
+ !!this.hostElement.querySelectorAll('[slot="provider"]').length;
19
20
  }
20
21
  emitLoginSubmit() {
21
22
  const usernameInput = this.hostElement.querySelector("z-input#username");
@@ -65,7 +66,7 @@ export class zModalLogin {
65
66
  return username;
66
67
  }
67
68
  renderZainoDigitaleButton() {
68
- return (h("z-button", { variant: ButtonVariantEnum.secondary, onClick: () => this.emitZainoDigitaleClick(), class: "zainoDigitale" },
69
+ return (h("z-button-deprecated", { variant: ButtonVariantEnum.secondary, onClick: () => this.emitZainoDigitaleClick(), class: "zainoDigitale" },
69
70
  h("div", { class: "zd" },
70
71
  h("svg", { width: "18px", height: "24px", viewBox: "0 0 18 24" },
71
72
  h("g", { stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd" },
@@ -91,12 +92,12 @@ export class zModalLogin {
91
92
  h("z-link", { class: "forget", href: this.forgotPasswordUrl }, "Password dimenticata?"),
92
93
  h("div", { class: "login" },
93
94
  h("slot", { name: "login" },
94
- h("z-button", { variant: ButtonVariantEnum.primary, onClick: () => this.emitLoginSubmit() }, "Accedi")))),
95
+ h("z-button-deprecated", { variant: ButtonVariantEnum.primary, onClick: () => this.emitLoginSubmit() }, "Accedi")))),
95
96
  h("hr", null),
96
97
  h("z-body", { class: "signup", level: 4, variant: "semibold" }, "Non hai ancora un account?"),
97
98
  h("div", { class: "signup" },
98
99
  h("slot", { name: "signup" },
99
- h("z-button", { variant: ButtonVariantEnum.secondary, onClick: () => this.emitSignupClick() }, "Registrati"))),
100
+ h("z-button-deprecated", { variant: ButtonVariantEnum.secondary, onClick: () => this.emitSignupClick() }, "Registrati"))),
100
101
  !this.externalProviderCheck && (h("div", { class: "providers" },
101
102
  h("z-body", { class: "provider", level: 5, variant: "regular" }, "OPPURE ACCEDI CON:"),
102
103
  h("slot", { name: "provider" },