@zanichelli/albe-web-components 12.4.0-RC → 12.4.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.
Files changed (117) hide show
  1. package/dist/cjs/index-195ca522.js +10 -18
  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-header_11.cjs.entry.js +1077 -0
  5. package/dist/cjs/{z-button_6.cjs.entry.js → z-dragdrop-area_2.cjs.entry.js} +2 -259
  6. package/dist/cjs/z-file-upload.cjs.entry.js +189 -0
  7. package/dist/cjs/z-select.cjs.entry.js +3 -3
  8. package/dist/collection/components/file-upload/z-file-upload/index.js +3 -3
  9. package/dist/collection/components/inputs/z-select/index.js +2 -2
  10. package/dist/collection/components/inputs/z-select/styles.css +43 -5
  11. package/dist/esm/index-4968ce56.js +10 -18
  12. package/dist/esm/{index-df06f147.js → index-4d1853ea.js} +1 -1
  13. package/dist/esm/{index-e44342f3.js → index-fb19ca57.js} +1 -1
  14. package/dist/esm/index.js +1 -1
  15. package/dist/esm/loader.js +1 -1
  16. package/dist/esm/{utils-3d2372eb.js → utils-2a4ef29d.js} +1 -1
  17. package/dist/esm/web-components-library.js +1 -1
  18. package/dist/esm/z-app-header_11.entry.js +1063 -0
  19. package/dist/esm/z-book-card.entry.js +1 -1
  20. package/dist/esm/z-breadcrumb.entry.js +1 -1
  21. package/dist/esm/z-combobox.entry.js +1 -1
  22. package/dist/esm/{z-button_6.entry.js → z-dragdrop-area_2.entry.js} +5 -258
  23. package/dist/esm/z-file-upload.entry.js +185 -0
  24. package/dist/esm/z-myz-card-info.entry.js +1 -1
  25. package/dist/esm/z-myz-list-item.entry.js +1 -1
  26. package/dist/esm/z-pocket_3.entry.js +1 -1
  27. package/dist/esm/z-select.entry.js +4 -4
  28. package/dist/esm/z-skip-to-content.entry.js +1 -1
  29. package/dist/esm/z-slideshow.entry.js +1 -1
  30. package/dist/esm/z-table-deprecated.entry.js +2 -2
  31. package/dist/esm/z-table-header.entry.js +2 -2
  32. package/dist/esm/z-table.entry.js +2 -2
  33. package/dist/esm/z-toggle-switch.entry.js +1 -1
  34. package/dist/esm/z-tr.entry.js +2 -2
  35. package/dist/types/beans/index.d.ts +1 -0
  36. package/dist/web-components-library/index.esm.js +1 -1
  37. package/dist/web-components-library/p-03b13390.entry.js +1 -0
  38. package/dist/web-components-library/{p-0495fb84.entry.js → p-100207d8.entry.js} +1 -1
  39. package/dist/web-components-library/p-3327e5f0.entry.js +1 -0
  40. package/dist/web-components-library/{p-6f281905.entry.js → p-485fd3db.entry.js} +1 -1
  41. package/dist/web-components-library/{p-29377b57.entry.js → p-5944a8f2.entry.js} +1 -1
  42. package/dist/web-components-library/p-5c63b09c.entry.js +1 -0
  43. package/dist/web-components-library/p-5d19e5ef.entry.js +1 -0
  44. package/dist/web-components-library/p-7907bdf7.entry.js +1 -0
  45. package/dist/web-components-library/p-8053b752.entry.js +1 -0
  46. package/dist/web-components-library/{p-d51d7b44.entry.js → p-8c31e60b.entry.js} +1 -1
  47. package/dist/web-components-library/{p-28b2868e.js → p-98badafc.js} +1 -1
  48. package/dist/web-components-library/p-9b0bcd43.entry.js +1 -0
  49. package/dist/web-components-library/{p-b921dc8d.js → p-a01baa71.js} +1 -1
  50. package/{www/build/p-76e7d402.entry.js → dist/web-components-library/p-a1663ab1.entry.js} +1 -1
  51. package/dist/web-components-library/{p-17d4f729.entry.js → p-cc009af8.entry.js} +1 -1
  52. package/dist/web-components-library/{p-d12d4dcd.js → p-cd561d69.js} +1 -1
  53. package/dist/web-components-library/p-ed42ceca.entry.js +1 -0
  54. package/dist/web-components-library/{p-b0f9cf23.entry.js → p-f3cc3f27.entry.js} +1 -1
  55. package/dist/web-components-library/{p-a6af3c1d.entry.js → p-f5bc7dda.entry.js} +1 -1
  56. package/dist/web-components-library/p-ff5a6e34.entry.js +1 -0
  57. package/dist/web-components-library/web-components-library.esm.js +1 -1
  58. package/package.json +1 -1
  59. package/www/build/index.esm.js +1 -1
  60. package/www/build/p-03b13390.entry.js +1 -0
  61. package/www/build/{p-0495fb84.entry.js → p-100207d8.entry.js} +1 -1
  62. package/www/build/p-21a94605.css +3 -0
  63. package/www/build/p-3327e5f0.entry.js +1 -0
  64. package/www/build/{p-6f281905.entry.js → p-485fd3db.entry.js} +1 -1
  65. package/www/build/{p-29377b57.entry.js → p-5944a8f2.entry.js} +1 -1
  66. package/www/build/p-5c63b09c.entry.js +1 -0
  67. package/www/build/p-5d19e5ef.entry.js +1 -0
  68. package/www/build/p-7907bdf7.entry.js +1 -0
  69. package/www/build/p-8053b752.entry.js +1 -0
  70. package/www/build/{p-d51d7b44.entry.js → p-8c31e60b.entry.js} +1 -1
  71. package/www/build/p-8c5fa7fd.js +1 -0
  72. package/www/build/{p-28b2868e.js → p-98badafc.js} +1 -1
  73. package/www/build/p-9b0bcd43.entry.js +1 -0
  74. package/www/build/{p-b921dc8d.js → p-a01baa71.js} +1 -1
  75. package/{dist/web-components-library/p-76e7d402.entry.js → www/build/p-a1663ab1.entry.js} +1 -1
  76. package/www/build/{p-17d4f729.entry.js → p-cc009af8.entry.js} +1 -1
  77. package/www/build/{p-d12d4dcd.js → p-cd561d69.js} +1 -1
  78. package/www/build/p-ed42ceca.entry.js +1 -0
  79. package/www/build/{p-b0f9cf23.entry.js → p-f3cc3f27.entry.js} +1 -1
  80. package/www/build/{p-a6af3c1d.entry.js → p-f5bc7dda.entry.js} +1 -1
  81. package/www/build/p-ff5a6e34.entry.js +1 -0
  82. package/www/build/web-components-library.esm.js +1 -1
  83. package/www/index.html +1 -10
  84. package/CHANGELOG.md +0 -2865
  85. package/dist/cjs/z-app-header.cjs.entry.js +0 -185
  86. package/dist/cjs/z-input_2.cjs.entry.js +0 -289
  87. package/dist/cjs/z-list_3.cjs.entry.js +0 -270
  88. package/dist/cjs/z-offcanvas_2.cjs.entry.js +0 -281
  89. package/dist/esm/z-app-header.entry.js +0 -181
  90. package/dist/esm/z-input_2.entry.js +0 -284
  91. package/dist/esm/z-list_3.entry.js +0 -264
  92. package/dist/esm/z-offcanvas_2.entry.js +0 -276
  93. package/dist/web-components-library/p-07854026.entry.js +0 -1
  94. package/dist/web-components-library/p-13762a32.entry.js +0 -1
  95. package/dist/web-components-library/p-1b342136.entry.js +0 -1
  96. package/dist/web-components-library/p-1c541078.entry.js +0 -1
  97. package/dist/web-components-library/p-207467d2.entry.js +0 -1
  98. package/dist/web-components-library/p-285ec5fc.entry.js +0 -1
  99. package/dist/web-components-library/p-29d45fe5.entry.js +0 -1
  100. package/dist/web-components-library/p-49d22e92.entry.js +0 -1
  101. package/dist/web-components-library/p-570e1a2e.entry.js +0 -1
  102. package/dist/web-components-library/p-8aaa0c34.entry.js +0 -1
  103. package/dist/web-components-library/p-d00d2e95.entry.js +0 -1
  104. package/src-react/index.ts +0 -1
  105. package/www/build/p-07854026.entry.js +0 -1
  106. package/www/build/p-13762a32.entry.js +0 -1
  107. package/www/build/p-1b342136.entry.js +0 -1
  108. package/www/build/p-1c541078.entry.js +0 -1
  109. package/www/build/p-207467d2.entry.js +0 -1
  110. package/www/build/p-285ec5fc.entry.js +0 -1
  111. package/www/build/p-29d45fe5.entry.js +0 -1
  112. package/www/build/p-49d22e92.entry.js +0 -1
  113. package/www/build/p-4a7a94e2.css +0 -1576
  114. package/www/build/p-570e1a2e.entry.js +0 -1
  115. package/www/build/p-8aaa0c34.entry.js +0 -1
  116. package/www/build/p-ce656c1c.js +0 -129
  117. package/www/build/p-d00d2e95.entry.js +0 -1
@@ -4,64 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-195ca522.js');
6
6
  const index$1 = require('./index-cf9497bc.js');
7
- const utils = require('./utils-ee86db4f.js');
8
- const icons = require('./icons-d385b990.js');
9
- require('./breakpoints-ebe1a437.js');
10
7
 
11
- const stylesCss$5 = ".sc-z-button-h{display:inline-block;--z-icon-width:16px;--z-icon-height:16px;--z-icon-right-margin:0}[disabled].sc-z-button-h:not([disabled=\"false\"]){pointer-events:none}.sc-z-button-h .z-button--container.sc-z-button{display:inline-flex;width:100%;box-sizing:border-box;align-items:center;justify-content:center;padding:0;border-width:var(--border-size-medium);border-style:solid;border-radius:var(--border-radius);cursor:pointer;fill:currentcolor;font-family:var(--font-family-sans);font-size:14px;font-weight:var(--font-sb);letter-spacing:0.3px;line-height:1;outline:none;text-decoration:none;text-transform:uppercase;white-space:nowrap}.sc-z-button-h .z-button--container.sc-z-button:focus:focus-visible{box-shadow:var(--shadow-focus-primary)}.sc-z-button-h .z-button--container.z-button--has-text.sc-z-button{min-width:calc(var(--space-unit) * 8);padding:0 calc(var(--space-unit) * 2)}.sc-z-button-h .z-button--container.z-button--has-text.sc-z-button z-icon.sc-z-button{--z-icon-right-margin:var(--space-unit)}[size=\"big\"].sc-z-button-h .z-button--container.sc-z-button{min-width:44px;height:44px}[size=\"small\"].sc-z-button-h .z-button--container.sc-z-button{min-width:36px;height:36px}[size=\"x-small\"].sc-z-button-h .z-button--container.sc-z-button{min-width:32px;height:32px}[variant=\"primary\"].sc-z-button-h .z-button--container.sc-z-button{border-color:var(--color-primary01);background-color:var(--color-primary01);color:var(--color-text-inverse)}@media (hover: hover){[variant=\"primary\"].sc-z-button-h .z-button--container.sc-z-button:hover{border-color:var(--color-hover-primary);background-color:var(--color-hover-primary);color:var(--color-text-inverse)}}[variant=\"primary\"].sc-z-button-h .z-button--container.sc-z-button:active{border-color:var(--color-pressed-primary);background-color:var(--color-pressed-primary);box-shadow:var(--shadow-2);color:var(--color-text-inverse)}[variant=\"primary\"][disabled].sc-z-button-h:not([disabled=\"false\"]) .z-button--container.sc-z-button{border-color:var(--color-disabled01);background-color:var(--color-disabled01);color:var(--color-disabled02)}[variant=\"secondary\"].sc-z-button-h .z-button--container.sc-z-button{border-color:var(--color-primary01);background-color:var(--color-surface01);color:var(--color-primary01)}@media (hover: hover){[variant=\"secondary\"].sc-z-button-h .z-button--container.sc-z-button:hover{border-color:var(--color-hover-primary);background-color:var(--color-surface01);color:var(--color-hover-primary)}}[variant=\"secondary\"].sc-z-button-h .z-button--container.sc-z-button:active{border-color:var(--color-pressed-primary);background-color:var(--color-surface01);box-shadow:var(--shadow-2);color:var(--color-pressed-primary)}[variant=\"secondary\"][disabled].sc-z-button-h:not([disabled=\"false\"]) .z-button--container.sc-z-button{border-color:var(--color-disabled01);background-color:var(--color-surface01);color:var(--color-disabled02)}[variant=\"tertiary\"].sc-z-button-h .z-button--container.sc-z-button{border-color:var(--color-primary02);background-color:var(--color-primary02);color:var(--color-primary01)}@media (hover: hover){[variant=\"tertiary\"].sc-z-button-h .z-button--container.sc-z-button:hover{border-color:var(--color-primary03);background-color:var(--color-primary03);color:var(--color-hover-primary)}}[variant=\"tertiary\"].sc-z-button-h .z-button--container.sc-z-button:focus:focus-visible{border-color:var(--color-primary02);background-color:var(--color-primary02);color:var(--color-primary01)}[variant=\"tertiary\"].sc-z-button-h .z-button--container.sc-z-button:active{border-color:var(--color-primary02);background-color:var(--color-primary02);box-shadow:var(--shadow-2);color:var(--color-primary01)}[variant=\"tertiary\"][disabled].sc-z-button-h:not([disabled=\"false\"]) .z-button--container.sc-z-button{border-color:var(--color-disabled01);background-color:var(--color-disabled01);color:var(--color-disabled02)}";
12
-
13
- const ZButton = class {
14
- constructor(hostRef) {
15
- index.registerInstance(this, hostRef);
16
- /** defines a string value that labels an interactive element, used for accessibility. */
17
- this.ariaLabel = "";
18
- /** HTML button disabled attribute. */
19
- this.disabled = false;
20
- /** HTML button type attribute. */
21
- this.type = index$1.ButtonType.BUTTON;
22
- /** Graphical variant: `primary`, `secondary`, `tertiary`. Defaults to `primary`. */
23
- this.variant = index$1.ButtonVariant.PRIMARY;
24
- /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
25
- this.size = index$1.ControlSize.BIG;
26
- }
27
- getAttributes() {
28
- return {
29
- id: this.htmlid,
30
- class: {
31
- "z-button--container": true,
32
- "z-button--has-text": !!this.hostElement.textContent.trim(),
33
- },
34
- };
35
- }
36
- render() {
37
- if (this.href) {
38
- return (index.h("a", Object.assign({}, this.getAttributes(), { "aria-label": this.ariaLabel, href: this.href, target: this.target }), this.icon && (index.h("z-icon", { name: this.icon, width: 16, height: 16 })), index.h("slot", null)));
39
- }
40
- return (index.h("button", Object.assign({}, this.getAttributes(), { "aria-label": this.ariaLabel, name: this.name, type: this.type, role: this.role, disabled: this.disabled }), this.icon && (index.h("z-icon", { name: this.icon, width: 16, height: 16 })), index.h("slot", null)));
41
- }
42
- get hostElement() { return index.getElement(this); }
43
- };
44
- ZButton.style = stylesCss$5;
45
-
46
- const stylesCss$4 = ".sc-z-divider-h{display:block;padding:0;margin:0}.divider-horizontal.sc-z-divider-h{width:100%}.divider-vertical.sc-z-divider-h{height:100%}.divider-small.divider-horizontal.sc-z-divider-h{height:var(--border-size-small)}.divider-medium.divider-horizontal.sc-z-divider-h{height:var(--border-size-medium)}.divider-large.divider-horizontal.sc-z-divider-h{height:var(--border-size-large)}.divider-small.divider-vertical.sc-z-divider-h{width:var(--border-size-small)}.divider-medium.divider-vertical.sc-z-divider-h{width:var(--border-size-medium)}.divider-large.divider-vertical.sc-z-divider-h{width:var(--border-size-large)}";
47
-
48
- const ZDivider = class {
49
- constructor(hostRef) {
50
- index.registerInstance(this, hostRef);
51
- /** [optional] Divider size */
52
- this.size = index$1.DividerSize.SMALL;
53
- /** [optional] Divider color */
54
- this.color = "gray200";
55
- /** [optional] Divider orintation */
56
- this.orientation = index$1.DividerOrientation.HORIZONTAL;
57
- }
58
- render() {
59
- return (index.h(index.Host, { class: `divider-${this.size} divider-${this.orientation}`, style: { backgroundColor: `var(--${this.color})` } }));
60
- }
61
- };
62
- ZDivider.style = stylesCss$4;
63
-
64
- const stylesCss$3 = ":host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.dragdrop{position:relative;display:flex;height:228px;flex-direction:column;padding:calc(var(--space-unit) * 2);border-color:var(--color-surface04);background-color:var(--color-surface02);background-image:url(\"data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='2' ry='2' stroke='%23CACCCEFF' stroke-width='2' stroke-dasharray='15%2c 10%2c 14%2c 11' stroke-dashoffset='3' stroke-linecap='square'/%3e%3c/svg%3e\");border-radius:2px;color:var(--color-text01)}:host>.dragdrop.dragover *{pointer-events:none}:host>.dragdrop .dragover-container{position:absolute;z-index:10;top:0;left:0;display:none;width:100%;height:100%;background-color:var(--color-primary03);box-shadow:var(--shadow-focus-primary)}:host>.dragdrop .dragover-container .dragover-message{padding:10px 28px;background-color:var(--color-link-primary);color:var(--color-text04)}:host>.dragdrop.dragover .dragover-container{display:flex;align-items:center;justify-content:center}";
8
+ const stylesCss$1 = ":host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.dragdrop{position:relative;display:flex;height:228px;flex-direction:column;padding:calc(var(--space-unit) * 2);border-color:var(--color-surface04);background-color:var(--color-surface02);background-image:url(\"data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='2' ry='2' stroke='%23CACCCEFF' stroke-width='2' stroke-dasharray='15%2c 10%2c 14%2c 11' stroke-dashoffset='3' stroke-linecap='square'/%3e%3c/svg%3e\");border-radius:2px;color:var(--color-text01)}:host>.dragdrop.dragover *{pointer-events:none}:host>.dragdrop .dragover-container{position:absolute;z-index:10;top:0;left:0;display:none;width:100%;height:100%;background-color:var(--color-primary03);box-shadow:var(--shadow-focus-primary)}:host>.dragdrop .dragover-container .dragover-message{padding:10px 28px;background-color:var(--color-link-primary);color:var(--color-text04)}:host>.dragdrop.dragover .dragover-container{display:flex;align-items:center;justify-content:center}";
65
9
 
66
10
  const ZDragdropArea = class {
67
11
  constructor(hostRef) {
@@ -89,204 +33,7 @@ const ZDragdropArea = class {
89
33
  } }, this.renderOnDragOverMessage(), index.h("slot", null)));
90
34
  }
91
35
  };
92
- ZDragdropArea.style = stylesCss$3;
93
-
94
- const stylesCss$2 = ":host{color:var(--color-text01);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.container{display:flex;flex-direction:column}:host .modal-wrapper{display:flex;align-items:center;justify-content:center;padding:calc(var(--space-unit) * 2)}:host .modal-wrapper>.files-wrapper{display:flex;flex-direction:column;margin:calc(var(--space-unit) * 4);gap:var(--space-unit)}:host .text-container{display:flex;flex-direction:column;margin:auto}:host .text-container .body-1{text-align:center}:host .text-container .upload-link{color:var(--color-link-primary);cursor:pointer}:host .text-container .upload-link-text{margin-bottom:var(--space-unit)}input#file-elem{display:none}#title{display:inline-block;margin:calc(var(--space-unit) * 2.5) 0 calc(var(--space-unit) * 4);font-size:calc(var(--space-unit) * 3);font-weight:var(--font-sb)}:host>.container>z-button{display:inline-block;margin-top:calc(var(--space-unit) * 3)}:host>.container>.files-container.hidden{display:none}:host>.container>.files-container>.heading-4-sb{display:inline-block;margin:calc(var(--space-unit) * 3) 0;font-size:calc(var(--space-unit) * 2);font-weight:var(--font-sb)}:host([type=\"dragdrop\"])>.container>.files-container>.heading-4-sb{margin-top:0;margin-bottom:calc(var(--space-unit) * 3)}:host>.container>.files-container>.files-wrapper{display:flex;flex-wrap:wrap;column-gap:calc(var(--space-unit) * 2);row-gap:calc(var(--space-unit) * 2)}:host>.container>.files-container>z-divider{margin-top:calc(var(--space-unit) * 3);margin-bottom:0}:host([type=\"dragdrop\"])>.container>.files-container>z-divider{margin:calc(var(--space-unit) * 3) 0}@media only screen and (min-width: 768px){:host>.container>z-button{align-self:flex-start}:host .modal-wrapper{padding:calc(var(--space-unit) * 3)}}@media only screen and (min-width: 1152px){:host .modal-wrapper{padding:calc(var(--space-unit) * 4)}}";
95
-
96
- const ZFileUpload = class {
97
- constructor(hostRef) {
98
- index.registerInstance(this, hostRef);
99
- this.fileInput = index.createEvent(this, "fileInput", 7);
100
- /** Prop indicating the file upload type - can be default or dragdrop */
101
- this.type = index$1.ZFileUploadType.DEFAULT;
102
- /** Files added by the user */
103
- this.files = [];
104
- /** upoload button label */
105
- this.uploadBtnLabel = "allega";
106
- /** drag & drop button label */
107
- this.dragAndDropLabel = "Rilascia i file in questa area per allegarli.";
108
- this.inputAttributes = {
109
- type: "file",
110
- id: "file-elem",
111
- multiple: true,
112
- };
113
- }
114
- /** Listen removeFile event sent from z-file component */
115
- removeFileListener(e) {
116
- const files = this.files;
117
- const file = files.find((file) => file.name === e.detail.fileName);
118
- if (file) {
119
- const index = files.indexOf(file);
120
- if (index >= 0) {
121
- files.splice(index, 1);
122
- this.files = [...files];
123
- }
124
- }
125
- }
126
- /** Listen fileDropped event sent from z-dragdrop-area component */
127
- fileDroppedListener(e) {
128
- this.input.files = e.detail;
129
- this.fileInputHandler();
130
- }
131
- componentDidUpdate() {
132
- this.handleAccessibility();
133
- this.invalidFiles.size && this.errorModal.focus();
134
- }
135
- componentWillLoad() {
136
- this.invalidFiles = new Map();
137
- }
138
- fileInputHandler() {
139
- if (this.input.files.length) {
140
- this.invalidFiles = this.checkFiles(Array.from(this.input.files));
141
- }
142
- }
143
- /** get array of uploaded files */
144
- async getFiles() {
145
- return this.files;
146
- }
147
- getType() {
148
- if (utils.getDevice() !== index$1.Device.DESKTOP && utils.getDevice() !== index$1.Device.DESKTOP_WIDE) {
149
- return index$1.ZFileUploadType.DEFAULT;
150
- }
151
- return this.type;
152
- }
153
- handleAccessibility() {
154
- const lastFile = this.el.querySelector("z-file:last-child z-chip button");
155
- if (this.files.length > 0 && lastFile) {
156
- lastFile.focus();
157
- }
158
- else {
159
- this.getType() === index$1.ZFileUploadType.DEFAULT
160
- ? this.button.querySelector("button").focus()
161
- : this.uploadLink.focus();
162
- }
163
- }
164
- checkFiles(files) {
165
- const errors = new Map();
166
- const sizeErrorString = `supera i ${this.fileMaxSize}MB`;
167
- const formatErrorString = " ha un'estensione non prevista";
168
- files.forEach((file) => {
169
- const fileSize = file.size / 1024 / 1024;
170
- const fileFormatOk = this.acceptedFormat
171
- .split(",")
172
- .some((ext) => file.name.toLowerCase().endsWith(ext.trim()));
173
- const fileSizeOk = fileSize <= this.fileMaxSize;
174
- if (fileSizeOk && fileFormatOk) {
175
- if (!this.files.find((f) => f.name === file.name)) {
176
- this.files.push(file);
177
- this.fileInput.emit(file);
178
- this.input.value = "";
179
- }
180
- return;
181
- }
182
- errors.set(file.name, []);
183
- if (!fileSizeOk) {
184
- errors.get(file.name).push(sizeErrorString);
185
- }
186
- if (!fileFormatOk) {
187
- errors.get(file.name).push(formatErrorString);
188
- }
189
- });
190
- return errors;
191
- }
192
- renderTitle() {
193
- return index.h("span", { id: "title" }, this.mainTitle);
194
- }
195
- renderDescription(cssClass) {
196
- return index.h("span", { class: cssClass }, this.description);
197
- }
198
- renderAllowedFileExtensions() {
199
- let fileFormatString = "";
200
- let fileWeightString = "";
201
- if (this.acceptedFormat) {
202
- const fileFormat = this.acceptedFormat
203
- .split(", ")
204
- .map((string) => string.substring(1).toUpperCase())
205
- .join(", ");
206
- fileFormatString = ` nei formati ${fileFormat}`;
207
- }
208
- if (this.fileMaxSize) {
209
- fileWeightString = ` per un massimo di ${this.fileMaxSize}MB di peso`;
210
- }
211
- const finalString = `Puoi allegare file${fileFormatString}${fileWeightString}.`;
212
- return index.h("span", { class: "body-3" }, fileFormatString || fileWeightString ? finalString : null);
213
- }
214
- renderFileSection() {
215
- return (index.h("section", { class: `files-container ${!this.files.length ? "hidden" : ""}` }, index.h("span", { class: "heading-4-sb" }, "File appena caricati"), index.h("div", { class: "files-wrapper" }, index.h("slot", { name: "files" })), index.h("z-divider", { size: index$1.DividerSize.MEDIUM })));
216
- }
217
- renderInput() {
218
- return (index.h("input", Object.assign({}, this.inputAttributes, { onChange: () => this.fileInputHandler(), accept: this.acceptedFormat, ref: (val) => (this.input = val) })));
219
- }
220
- renderUploadButton() {
221
- return [
222
- this.renderInput(),
223
- index.h("z-button", { onClick: () => this.input.click(), onKeyPress: (e) => {
224
- if (e.code == "Space" || e.code == "Enter") {
225
- e.preventDefault();
226
- this.input.click();
227
- }
228
- }, id: "fileSelect", variant: this.buttonVariant, icon: "upload", ref: (val) => (this.button = val) }, this.uploadBtnLabel),
229
- ];
230
- }
231
- renderUploadLink() {
232
- return [
233
- this.renderInput(),
234
- index.h("span", { class: "body-1 upload-link-text" }, "Trascina o", " ", index.h("span", { tabIndex: 0, class: "body-1-sb upload-link", onClick: () => this.input.click(), onKeyPress: (e) => {
235
- if (e.code == "Space" || e.code == "Enter") {
236
- e.preventDefault();
237
- this.input.click();
238
- }
239
- }, ref: (val) => (this.uploadLink = val) }, "carica"), " ", "dal tuo computer"),
240
- ];
241
- }
242
- renderDefaultMode() {
243
- return [
244
- this.renderDescription("body-3-sb"),
245
- this.renderAllowedFileExtensions(),
246
- this.renderFileSection(),
247
- this.renderUploadButton(),
248
- ];
249
- }
250
- renderDragDropMode() {
251
- return [
252
- this.renderFileSection(),
253
- index.h("z-dragdrop-area", { "drag-and-drop-label": this.dragAndDropLabel }, index.h("div", { class: "text-container" }, this.renderDescription("body-1"), this.renderUploadLink(), this.renderAllowedFileExtensions())),
254
- ];
255
- }
256
- formatErrorString(key, value) {
257
- var _a, _b;
258
- const bothErrors = value[0] && value[1] ? ", " : "";
259
- return `Il file ${key} ${(_a = value[0]) !== null && _a !== void 0 ? _a : ""}${bothErrors} ${(_b = value[1]) !== null && _b !== void 0 ? _b : ""} e non può quindi essere caricato.`;
260
- }
261
- handleErrorModalContent() {
262
- return (index.h("div", { slot: "modalContent" }, index.h("div", { class: "modal-wrapper" }, index.h("div", { class: "files" }, Array.from(this.invalidFiles).map(([key, value]) => {
263
- return index.h("span", { class: "body-3" }, this.formatErrorString(key, value));
264
- })))));
265
- }
266
- render() {
267
- return (index.h(index.Host, null, index.h("div", { tabIndex: 0, class: `container ${this.getType()}` }, this.mainTitle && this.renderTitle(), this.getType() == index$1.ZFileUploadType.DEFAULT ? this.renderDefaultMode() : this.renderDragDropMode()), !!this.invalidFiles.size && (index.h("z-modal", { modalid: `file-upload-${this.type}-error-modal`, tabIndex: 0, ref: (val) => (this.errorModal = val), modaltitle: "Attenzione", onModalClose: () => (this.invalidFiles = new Map()), onModalBackgroundClick: () => (this.invalidFiles = new Map()) }, this.handleErrorModalContent()))));
268
- }
269
- get el() { return index.getElement(this); }
270
- };
271
- ZFileUpload.style = stylesCss$2;
272
-
273
- const stylesCss$1 = ":host{margin-right:var(--z-icon-right-margin, 0);margin-left:var(--z-icon-left-margin, 0);line-height:0;vertical-align:middle}:host svg:not([width]){width:var(--z-icon-width, 18px)}:host svg:not([height]){height:var(--z-icon-height, 18px)}";
274
-
275
- const ZIcon = class {
276
- constructor(hostRef) {
277
- index.registerInstance(this, hostRef);
278
- }
279
- selectPathOrPolygon(iconValue) {
280
- if (iconValue === null || iconValue === void 0 ? void 0 : iconValue.startsWith("M")) {
281
- return index.h("path", { d: icons.ICONS[this.name] });
282
- }
283
- return index.h("polygon", { points: icons.ICONS[this.name] });
284
- }
285
- render() {
286
- return (index.h(index.Host, { "aria-hidden": "true" }, index.h("svg", { viewBox: "0 0 1000 1000", width: this.width, height: this.height, id: this.iconid, fill: this.fill ? `var(--${this.fill})` : "" }, this.selectPathOrPolygon(icons.ICONS[this.name]))));
287
- }
288
- };
289
- ZIcon.style = stylesCss$1;
36
+ ZDragdropArea.style = stylesCss$1;
290
37
 
291
38
  // nb. This is for IE10 and lower _only_.
292
39
  var supportCustomEvent = window.CustomEvent;
@@ -1265,9 +1012,5 @@ const ZModal = class {
1265
1012
  };
1266
1013
  ZModal.style = stylesCss;
1267
1014
 
1268
- exports.z_button = ZButton;
1269
- exports.z_divider = ZDivider;
1270
1015
  exports.z_dragdrop_area = ZDragdropArea;
1271
- exports.z_file_upload = ZFileUpload;
1272
- exports.z_icon = ZIcon;
1273
1016
  exports.z_modal = ZModal;
@@ -0,0 +1,189 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-195ca522.js');
6
+ const index$1 = require('./index-cf9497bc.js');
7
+ const utils = require('./utils-ee86db4f.js');
8
+ require('./breakpoints-ebe1a437.js');
9
+
10
+ const stylesCss = ":host{color:var(--color-text01);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.container{display:flex;flex-direction:column}:host .modal-wrapper{display:flex;align-items:center;justify-content:center;padding:calc(var(--space-unit) * 2)}:host .modal-wrapper>.files-wrapper{display:flex;flex-direction:column;margin:calc(var(--space-unit) * 4);gap:var(--space-unit)}:host .text-container{display:flex;flex-direction:column;margin:auto}:host .text-container .body-1{text-align:center}:host .text-container .upload-link{color:var(--color-link-primary);cursor:pointer}:host .text-container .upload-link-text{margin-bottom:var(--space-unit)}input#file-elem{display:none}#title{display:inline-block;margin:calc(var(--space-unit) * 2.5) 0 calc(var(--space-unit) * 4);font-size:calc(var(--space-unit) * 3);font-weight:var(--font-sb)}:host>.container>z-button{display:inline-block;margin-top:calc(var(--space-unit) * 3)}:host>.container>.files-container.hidden{display:none}:host>.container>.files-container>.heading-4-sb{display:inline-block;margin:calc(var(--space-unit) * 3) 0;font-size:calc(var(--space-unit) * 2);font-weight:var(--font-sb)}:host([type=\"dragdrop\"])>.container>.files-container>.heading-4-sb{margin-top:0;margin-bottom:calc(var(--space-unit) * 3)}:host>.container>.files-container>.files-wrapper{display:flex;flex-wrap:wrap;column-gap:calc(var(--space-unit) * 2);row-gap:calc(var(--space-unit) * 2)}:host>.container>.files-container>z-divider{margin-top:calc(var(--space-unit) * 3);margin-bottom:0}:host([type=\"dragdrop\"])>.container>.files-container>z-divider{margin:calc(var(--space-unit) * 3) 0}@media only screen and (min-width: 768px){:host>.container>z-button{align-self:flex-start}:host .modal-wrapper{padding:calc(var(--space-unit) * 3)}}@media only screen and (min-width: 1152px){:host .modal-wrapper{padding:calc(var(--space-unit) * 4)}}";
11
+
12
+ const ZFileUpload = class {
13
+ constructor(hostRef) {
14
+ index.registerInstance(this, hostRef);
15
+ this.fileInput = index.createEvent(this, "fileInput", 7);
16
+ /** Prop indicating the file upload type - can be default or dragdrop */
17
+ this.type = index$1.ZFileUploadType.DEFAULT;
18
+ /** Files added by the user */
19
+ this.files = [];
20
+ /** upoload button label */
21
+ this.uploadBtnLabel = "allega";
22
+ /** drag & drop button label */
23
+ this.dragAndDropLabel = "Rilascia i file in questa area per allegarli.";
24
+ this.inputAttributes = {
25
+ type: "file",
26
+ id: "file-elem",
27
+ multiple: true,
28
+ };
29
+ }
30
+ /** Listen removeFile event sent from z-file component */
31
+ removeFileListener(e) {
32
+ const files = this.files;
33
+ const file = files.find((file) => file.name === e.detail.fileName);
34
+ if (file) {
35
+ const index = files.indexOf(file);
36
+ if (index >= 0) {
37
+ files.splice(index, 1);
38
+ this.files = [...files];
39
+ }
40
+ }
41
+ }
42
+ /** Listen fileDropped event sent from z-dragdrop-area component */
43
+ fileDroppedListener(e) {
44
+ this.input.files = e.detail;
45
+ this.fileInputHandler();
46
+ }
47
+ componentDidUpdate() {
48
+ this.handleAccessibility();
49
+ this.invalidFiles.size && this.errorModal.focus();
50
+ }
51
+ componentWillLoad() {
52
+ this.invalidFiles = new Map();
53
+ }
54
+ fileInputHandler() {
55
+ if (this.input.files.length) {
56
+ this.invalidFiles = this.checkFiles(Array.from(this.input.files));
57
+ }
58
+ }
59
+ /** get array of uploaded files */
60
+ async getFiles() {
61
+ return this.files;
62
+ }
63
+ getType() {
64
+ if (utils.getDevice() !== index$1.Device.DESKTOP && utils.getDevice() !== index$1.Device.DESKTOP_WIDE) {
65
+ return index$1.ZFileUploadType.DEFAULT;
66
+ }
67
+ return this.type;
68
+ }
69
+ handleAccessibility() {
70
+ const lastFile = this.el.querySelector("z-file:last-child z-chip button");
71
+ if (this.files.length > 0 && lastFile) {
72
+ lastFile.focus();
73
+ }
74
+ else {
75
+ this.getType() === index$1.ZFileUploadType.DEFAULT
76
+ ? this.button.querySelector("button").focus()
77
+ : this.uploadLink.focus();
78
+ }
79
+ }
80
+ checkFiles(files) {
81
+ const errors = new Map();
82
+ const sizeErrorString = `supera il limite di ${this.fileMaxSize}MB`;
83
+ const formatErrorString = " ha un'estensione non prevista";
84
+ files.forEach((file) => {
85
+ const fileSize = file.size / 1024 / 1024;
86
+ const fileFormatOk = this.acceptedFormat
87
+ .split(",")
88
+ .some((ext) => file.name.toLowerCase().endsWith(ext.trim()));
89
+ const fileSizeOk = fileSize <= this.fileMaxSize;
90
+ if (fileSizeOk && fileFormatOk) {
91
+ if (!this.files.find((f) => f.name === file.name)) {
92
+ this.files.push(file);
93
+ this.fileInput.emit(file);
94
+ this.input.value = "";
95
+ }
96
+ return;
97
+ }
98
+ errors.set(file.name, []);
99
+ if (!fileSizeOk) {
100
+ errors.get(file.name).push(sizeErrorString);
101
+ }
102
+ if (!fileFormatOk) {
103
+ errors.get(file.name).push(formatErrorString);
104
+ }
105
+ });
106
+ return errors;
107
+ }
108
+ renderTitle() {
109
+ return index.h("span", { id: "title" }, this.mainTitle);
110
+ }
111
+ renderDescription(cssClass) {
112
+ return index.h("span", { class: cssClass }, this.description);
113
+ }
114
+ renderAllowedFileExtensions() {
115
+ let fileFormatString = "";
116
+ let fileWeightString = "";
117
+ if (this.acceptedFormat) {
118
+ const fileFormat = this.acceptedFormat
119
+ .split(", ")
120
+ .map((string) => string.substring(1).toUpperCase())
121
+ .join(", ");
122
+ fileFormatString = ` nei formati ${fileFormat}`;
123
+ }
124
+ if (this.fileMaxSize) {
125
+ fileWeightString = ` per un massimo di ${this.fileMaxSize}MB di peso`;
126
+ }
127
+ const finalString = `Puoi allegare file${fileFormatString}${fileWeightString}.`;
128
+ return index.h("span", { class: "body-3" }, fileFormatString || fileWeightString ? finalString : null);
129
+ }
130
+ renderFileSection() {
131
+ return (index.h("section", { class: `files-container ${!this.files.length ? "hidden" : ""}` }, index.h("span", { class: "heading-4-sb" }, "File appena caricati"), index.h("div", { class: "files-wrapper" }, index.h("slot", { name: "files" })), index.h("z-divider", { size: index$1.DividerSize.MEDIUM })));
132
+ }
133
+ renderInput() {
134
+ return (index.h("input", Object.assign({}, this.inputAttributes, { onChange: () => this.fileInputHandler(), accept: this.acceptedFormat, ref: (val) => (this.input = val) })));
135
+ }
136
+ renderUploadButton() {
137
+ return [
138
+ this.renderInput(),
139
+ index.h("z-button", { onClick: () => this.input.click(), onKeyPress: (e) => {
140
+ if (e.code == "Space" || e.code == "Enter") {
141
+ e.preventDefault();
142
+ this.input.click();
143
+ }
144
+ }, id: "fileSelect", variant: this.buttonVariant, icon: "upload", ref: (val) => (this.button = val) }, this.uploadBtnLabel),
145
+ ];
146
+ }
147
+ renderUploadLink() {
148
+ return [
149
+ this.renderInput(),
150
+ index.h("span", { class: "body-1 upload-link-text" }, "Trascina o", " ", index.h("span", { tabIndex: 0, class: "body-1-sb upload-link", onClick: () => this.input.click(), onKeyPress: (e) => {
151
+ if (e.code == "Space" || e.code == "Enter") {
152
+ e.preventDefault();
153
+ this.input.click();
154
+ }
155
+ }, ref: (val) => (this.uploadLink = val) }, "carica"), " ", "dal tuo computer"),
156
+ ];
157
+ }
158
+ renderDefaultMode() {
159
+ return [
160
+ this.renderDescription("body-3-sb"),
161
+ this.renderAllowedFileExtensions(),
162
+ this.renderFileSection(),
163
+ this.renderUploadButton(),
164
+ ];
165
+ }
166
+ renderDragDropMode() {
167
+ return [
168
+ this.renderFileSection(),
169
+ index.h("z-dragdrop-area", { "drag-and-drop-label": this.dragAndDropLabel }, index.h("div", { class: "text-container" }, this.renderDescription("body-1"), this.renderUploadLink(), this.renderAllowedFileExtensions())),
170
+ ];
171
+ }
172
+ formatErrorString(key, value) {
173
+ var _a, _b;
174
+ const bothErrors = value[0] && value[1] ? ", ed " : "";
175
+ return `Il file ${key} ${(_a = value[0]) !== null && _a !== void 0 ? _a : ""}${bothErrors}${(_b = value[1]) !== null && _b !== void 0 ? _b : ""}.`;
176
+ }
177
+ handleErrorModalContent() {
178
+ return (index.h("div", { slot: "modalContent" }, index.h("div", { class: "modal-wrapper" }, index.h("div", { class: "files" }, Array.from(this.invalidFiles).map(([key, value]) => {
179
+ return index.h("span", { class: "body-3" }, this.formatErrorString(key, value));
180
+ })))));
181
+ }
182
+ render() {
183
+ return (index.h(index.Host, null, index.h("div", { tabIndex: 0, class: `container ${this.getType()}` }, this.mainTitle && this.renderTitle(), this.getType() == index$1.ZFileUploadType.DEFAULT ? this.renderDefaultMode() : this.renderDragDropMode()), !!this.invalidFiles.size && (index.h("z-modal", { modalid: `file-upload-${this.type}-error-modal`, tabIndex: 0, ref: (val) => (this.errorModal = val), modaltitle: "Attenzione", onModalClose: () => (this.invalidFiles = new Map()), onModalBackgroundClick: () => (this.invalidFiles = new Map()) }, this.handleErrorModalContent()))));
184
+ }
185
+ get el() { return index.getElement(this); }
186
+ };
187
+ ZFileUpload.style = stylesCss;
188
+
189
+ exports.z_file_upload = ZFileUpload;
@@ -7,7 +7,7 @@ const index$1 = require('./index-cf9497bc.js');
7
7
  const utils = require('./utils-ee86db4f.js');
8
8
  require('./breakpoints-ebe1a437.js');
9
9
 
10
- const stylesCss = ".sc-z-select-h{display:inline-block;width:inherit;color:var(--color-text02);font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:var(--font-rg)}[size=\"small\"].sc-z-select-h,[size=\"x-small\"].sc-z-select-h{font-size:var(--font-size-2)}.select-wrapper.sc-z-select>z-input.sc-z-select{width:100%}.select-wrapper.sc-z-select>div.sc-z-select{position:relative}.select-wrapper.sc-z-select>div.closed.sc-z-select{overflow:hidden;height:0}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select{position:absolute;width:100%;box-sizing:border-box;padding:calc(var(--space-unit) * 0.5) var(--space-unit);border:var(--border-size-small) solid var(--gray200);border-top:none;background:var(--color-surface01);outline:none}.select-wrapper.sc-z-select .closed.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:10}.select-wrapper.sc-z-select .open.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:20}.select-wrapper.sc-z-select .ul-scroll-wrapper.fixed.sc-z-select{position:static}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select{position:relative;overflow:auto;max-height:240px;padding:calc(var(--space-unit) * 0.5);outline:none;scrollbar-color:var(--color-primary01) transparent}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-track{background-color:transparent}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-content.sc-z-select{display:block;padding:calc(var(--space-unit) * 0.5) calc(var(--space-unit) * 1.5)}[size=\"x-small\"].sc-z-select-h .select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-content.sc-z-select{padding:0 calc(var(--space-unit) * 1.5)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-content.selected.sc-z-select{font-weight:bold}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select .no-results.sc-z-select z-icon.sc-z-select{margin-right:var(--space-unit)}.z-list-group-title.sc-z-select{color:var(--gray800)}.reset-item.sc-z-select{color:var(--color-primary01);fill:var(--color-primary01)}.reset-item-content.sc-z-select{display:flex;align-items:center}.reset-item.reset-item-margin.sc-z-select .reset-item-content.sc-z-select{margin-left:calc(var(--space-unit))}.reset-item.sc-z-select .reset-item-content.sc-z-select>z-icon.sc-z-select{margin-right:var(--space-unit)}.reset-item.hide.sc-z-select{display:none}";
10
+ const stylesCss = ".sc-z-select-h{display:inline-block;width:inherit;color:var(--color-text02);font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:var(--font-rg)}[size=\"small\"].sc-z-select-h,[size=\"x-small\"].sc-z-select-h{font-size:var(--font-size-2)}.select-wrapper.sc-z-select>z-input.sc-z-select{width:100%}.select-wrapper.sc-z-select>div.sc-z-select{position:relative}.select-wrapper.sc-z-select>div.closed.sc-z-select{overflow:hidden;height:0}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select{position:absolute;width:100%;box-sizing:border-box;padding:calc(var(--space-unit) * 0.5) var(--space-unit);border:var(--border-size-small) solid var(--gray200);border-top:none;background:var(--color-surface01);outline:none}.select-wrapper.sc-z-select .closed.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:10}.select-wrapper.sc-z-select .open.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:20}.select-wrapper.sc-z-select .ul-scroll-wrapper.fixed.sc-z-select{position:static}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select{position:relative;overflow:auto;max-height:240px;padding:calc(var(--space-unit) * 0.5);outline:none;scrollbar-color:var(--color-primary01) transparent}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-track{background-color:transparent}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select{display:flex;align-items:center;padding-left:calc(var(--space-unit) * 1.5)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select .list-element-content.sc-z-select{display:block;padding:calc(var(--space-unit) * 0.5) 0}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select>z-icon.sc-z-select+.list-element-content.sc-z-select{display:block;padding:calc(var(--space-unit) * 0.5) var(--space-unit)}[size=\"x-small\"].sc-z-select-h .select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select .list-element-content.sc-z-select{padding:0}[size=\"small\"].sc-z-select-h .select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select>z-icon.sc-z-select{--z-icon-width:16px;--z-icon-height:16px}[size=\"x-small\"].sc-z-select-h .select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select>z-icon.sc-z-select{--z-icon-width:14px;--z-icon-height:14px}[size=\"x-small\"].sc-z-select-h .select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select>z-icon.sc-z-select+.list-element-content.sc-z-select{padding:0 var(--space-unit)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select .list-element-content.selected.sc-z-select{font-weight:bold}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select .no-results.sc-z-select z-icon.sc-z-select{margin-right:var(--space-unit)}.z-list-group-title.sc-z-select{color:var(--gray800)}.reset-item.sc-z-select{color:var(--color-primary01);fill:var(--color-primary01)}.reset-item-content.sc-z-select{display:flex;align-items:center}.reset-item.reset-item-margin.sc-z-select .reset-item-content.sc-z-select{margin-left:calc(var(--space-unit))}.reset-item.sc-z-select .reset-item-content.sc-z-select>z-icon.sc-z-select{margin-right:var(--space-unit)}.reset-item.hide.sc-z-select{display:none}";
11
11
 
12
12
  const ZSelect = class {
13
13
  constructor(hostRef) {
@@ -275,10 +275,10 @@ const ZSelect = class {
275
275
  }, onKeyDown: (e) => this.arrowsSelectNav(e, 0) }, index.h("div", { class: "reset-item-content" }, index.h("z-icon", { name: "multiply-circled" }), index.h("span", null, this.resetItem))));
276
276
  }
277
277
  renderItem(item, key, lastItem) {
278
- return (index.h("z-list-element", { clickable: !item.disabled, disabled: item.disabled, dividerType: lastItem ? index$1.ListDividerType.HEADER : index$1.ListDividerType.ELEMENT, role: "option", tabindex: item.disabled || !this.isOpen ? -1 : 0, "aria-selected": item.selected ? "true" : "false", id: `${this.htmlid}_${key}`, size: this.listSizeType(), onClickItem: () => this.selectItem(item, true), onKeyDown: (e) => this.arrowsSelectNav(e, key) }, index.h("span", { class: {
278
+ return (index.h("z-list-element", { clickable: !item.disabled, disabled: item.disabled, dividerType: lastItem ? index$1.ListDividerType.HEADER : index$1.ListDividerType.ELEMENT, role: "option", tabindex: item.disabled || !this.isOpen ? -1 : 0, "aria-selected": item.selected ? "true" : "false", id: `${this.htmlid}_${key}`, size: this.listSizeType(), onClickItem: () => this.selectItem(item, true), onKeyDown: (e) => this.arrowsSelectNav(e, key) }, index.h("div", { class: "list-element-container" }, item.icon && index.h("z-icon", { name: item.icon }), index.h("span", { class: {
279
279
  "selected": !!item.selected,
280
280
  "list-element-content": true,
281
- }, innerHTML: item.name })));
281
+ }, innerHTML: item.name }))));
282
282
  }
283
283
  listSizeType() {
284
284
  if (this.size === index$1.ControlSize.SMALL || this.size === index$1.ControlSize.X_SMALL) {
@@ -69,7 +69,7 @@ export class ZFileUpload {
69
69
  }
70
70
  checkFiles(files) {
71
71
  const errors = new Map();
72
- const sizeErrorString = `supera i ${this.fileMaxSize}MB`;
72
+ const sizeErrorString = `supera il limite di ${this.fileMaxSize}MB`;
73
73
  const formatErrorString = " ha un'estensione non prevista";
74
74
  files.forEach((file) => {
75
75
  const fileSize = file.size / 1024 / 1024;
@@ -161,8 +161,8 @@ export class ZFileUpload {
161
161
  }
162
162
  formatErrorString(key, value) {
163
163
  var _a, _b;
164
- const bothErrors = value[0] && value[1] ? ", " : "";
165
- return `Il file ${key} ${(_a = value[0]) !== null && _a !== void 0 ? _a : ""}${bothErrors} ${(_b = value[1]) !== null && _b !== void 0 ? _b : ""} e non può quindi essere caricato.`;
164
+ const bothErrors = value[0] && value[1] ? ", ed " : "";
165
+ return `Il file ${key} ${(_a = value[0]) !== null && _a !== void 0 ? _a : ""}${bothErrors}${(_b = value[1]) !== null && _b !== void 0 ? _b : ""}.`;
166
166
  }
167
167
  handleErrorModalContent() {
168
168
  return (h("div", { slot: "modalContent" }, h("div", { class: "modal-wrapper" }, h("div", { class: "files" }, Array.from(this.invalidFiles).map(([key, value]) => {
@@ -264,10 +264,10 @@ export class ZSelect {
264
264
  }, onKeyDown: (e) => this.arrowsSelectNav(e, 0) }, h("div", { class: "reset-item-content" }, h("z-icon", { name: "multiply-circled" }), h("span", null, this.resetItem))));
265
265
  }
266
266
  renderItem(item, key, lastItem) {
267
- return (h("z-list-element", { clickable: !item.disabled, disabled: item.disabled, dividerType: lastItem ? ListDividerType.HEADER : ListDividerType.ELEMENT, role: "option", tabindex: item.disabled || !this.isOpen ? -1 : 0, "aria-selected": item.selected ? "true" : "false", id: `${this.htmlid}_${key}`, size: this.listSizeType(), onClickItem: () => this.selectItem(item, true), onKeyDown: (e) => this.arrowsSelectNav(e, key) }, h("span", { class: {
267
+ return (h("z-list-element", { clickable: !item.disabled, disabled: item.disabled, dividerType: lastItem ? ListDividerType.HEADER : ListDividerType.ELEMENT, role: "option", tabindex: item.disabled || !this.isOpen ? -1 : 0, "aria-selected": item.selected ? "true" : "false", id: `${this.htmlid}_${key}`, size: this.listSizeType(), onClickItem: () => this.selectItem(item, true), onKeyDown: (e) => this.arrowsSelectNav(e, key) }, h("div", { class: "list-element-container" }, item.icon && h("z-icon", { name: item.icon }), h("span", { class: {
268
268
  "selected": !!item.selected,
269
269
  "list-element-content": true,
270
- }, innerHTML: item.name })));
270
+ }, innerHTML: item.name }))));
271
271
  }
272
272
  listSizeType() {
273
273
  if (this.size === ControlSize.SMALL || this.size === ControlSize.X_SMALL) {
@@ -79,16 +79,54 @@
79
79
  background-color: var(--color-hover-primary);
80
80
  }
81
81
 
82
- .select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-content {
82
+ .select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container {
83
+ display: flex;
84
+ align-items: center;
85
+ padding-left: calc(var(--space-unit) * 1.5);
86
+ }
87
+
88
+ .select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container .list-element-content {
89
+ display: block;
90
+ padding: calc(var(--space-unit) * 0.5) 0;
91
+ }
92
+
93
+ .select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container > z-icon + .list-element-content {
83
94
  display: block;
84
- padding: calc(var(--space-unit) * 0.5) calc(var(--space-unit) * 1.5);
95
+ padding: calc(var(--space-unit) * 0.5) var(--space-unit);
96
+ }
97
+
98
+ :host([size="x-small"])
99
+ .select-wrapper
100
+ .ul-scroll-wrapper
101
+ z-list
102
+ z-list-element
103
+ .list-element-container
104
+ .list-element-content {
105
+ padding: 0;
106
+ }
107
+
108
+ :host([size="small"]) .select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container > z-icon {
109
+ --z-icon-width: 16px;
110
+ --z-icon-height: 16px;
111
+ }
112
+
113
+ :host([size="x-small"]) .select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container > z-icon {
114
+ --z-icon-width: 14px;
115
+ --z-icon-height: 14px;
85
116
  }
86
117
 
87
- :host([size="x-small"]) .select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-content {
88
- padding: 0 calc(var(--space-unit) * 1.5);
118
+ :host([size="x-small"])
119
+ .select-wrapper
120
+ .ul-scroll-wrapper
121
+ z-list
122
+ z-list-element
123
+ .list-element-container
124
+ > z-icon
125
+ + .list-element-content {
126
+ padding: 0 var(--space-unit);
89
127
  }
90
128
 
91
- .select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-content.selected {
129
+ .select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container .list-element-content.selected {
92
130
  font-weight: bold;
93
131
  }
94
132