@zanichelli/albe-web-components 7.3.1 → 7.3.3

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 (235) hide show
  1. package/dist/cjs/index-e3299e0a.js +6 -30
  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 +1052 -0
  5. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +865 -2
  6. package/dist/cjs/z-menu-section.cjs.entry.js +1 -1
  7. package/dist/cjs/z-menu.cjs.entry.js +1 -1
  8. package/dist/cjs/z-popover.cjs.entry.js +2 -1
  9. package/dist/cjs/z-tooltip.cjs.entry.js +8 -2
  10. package/dist/collection/components/inputs/z-searchbar/index.js +6 -17
  11. package/dist/collection/components/inputs/z-searchbar/styles.css +46 -95
  12. package/dist/collection/components/modal/z-modal/index.js +8 -1
  13. package/dist/collection/components/modal/z-modal/styles.css +13 -0
  14. package/dist/collection/components/navigation/z-app-header/index.js +171 -47
  15. package/dist/collection/components/navigation/z-app-header/index.stories.js +393 -0
  16. package/dist/collection/components/navigation/z-app-header/styles.css +167 -166
  17. package/dist/collection/components/navigation/z-menu/index.js +1 -0
  18. package/dist/collection/components/navigation/z-menu/styles.css +7 -7
  19. package/dist/collection/components/navigation/z-menu-section/styles.css +8 -9
  20. package/dist/collection/components/notification/z-tooltip/index.js +28 -4
  21. package/dist/collection/components/notification/z-tooltip/styles.css +1 -0
  22. package/dist/collection/components/z-offcanvas/index.js +34 -50
  23. package/dist/collection/components/z-popover/index.js +3 -2
  24. package/dist/esm/index-a2ca4b97.js +6 -30
  25. package/dist/esm/index.js +1 -1
  26. package/dist/esm/loader.js +1 -1
  27. package/dist/esm/polyfills/css-shim.js +0 -0
  28. package/dist/esm/{utils-970ac457.js → utils-a52a81ba.js} +1 -1
  29. package/dist/esm/web-components-library.js +1 -1
  30. package/dist/esm/z-app-header_11.entry.js +1038 -0
  31. package/dist/esm/z-chip.entry.js +1 -1
  32. package/dist/esm/z-combobox.entry.js +1 -1
  33. package/dist/esm/z-dragdrop-area_2.entry.js +865 -2
  34. package/dist/esm/z-file-upload.entry.js +1 -1
  35. package/dist/esm/z-menu-section.entry.js +1 -1
  36. package/dist/esm/z-menu.entry.js +1 -1
  37. package/dist/esm/z-myz-card-info.entry.js +1 -1
  38. package/dist/esm/z-myz-list-item.entry.js +1 -1
  39. package/dist/esm/z-pocket_3.entry.js +1 -1
  40. package/dist/esm/z-popover.entry.js +2 -1
  41. package/dist/esm/z-select.entry.js +1 -1
  42. package/dist/esm/z-skip-to-content.entry.js +1 -1
  43. package/dist/esm/z-slideshow.entry.js +1 -1
  44. package/dist/esm/z-table-header.entry.js +1 -1
  45. package/dist/esm/z-toggle-switch.entry.js +1 -1
  46. package/dist/esm/z-tooltip.entry.js +8 -2
  47. package/dist/types/beans/index.d.ts +0 -0
  48. package/dist/types/components/buttons/z-button/index.d.ts +0 -0
  49. package/dist/types/components/buttons/z-button-sort/index.d.ts +0 -0
  50. package/dist/types/components/buttons/z-chip/index.d.ts +0 -0
  51. package/dist/types/components/buttons/z-toggle-button/index.d.ts +0 -0
  52. package/dist/types/components/buttons/z-toggle-switch/index.d.ts +0 -0
  53. package/dist/types/components/date-picker/utils.d.ts +0 -0
  54. package/dist/types/components/date-picker/z-date-picker/index.d.ts +0 -0
  55. package/dist/types/components/date-picker/z-range-picker/index.d.ts +0 -0
  56. package/dist/types/components/file-upload/z-dragdrop-area/index.d.ts +0 -0
  57. package/dist/types/components/file-upload/z-file/index.d.ts +0 -0
  58. package/dist/types/components/file-upload/z-file-upload/index.d.ts +0 -0
  59. package/dist/types/components/icons/icons.d.ts +0 -0
  60. package/dist/types/components/icons/z-icon/index.d.ts +0 -0
  61. package/dist/types/components/index.d.ts +0 -0
  62. package/dist/types/components/indicators/z-stepper/index.d.ts +0 -0
  63. package/dist/types/components/indicators/z-stepper-item/index.d.ts +0 -0
  64. package/dist/types/components/inputs/z-combobox/index.d.ts +0 -0
  65. package/dist/types/components/inputs/z-input/index.d.ts +0 -0
  66. package/dist/types/components/inputs/z-input-message/index.d.ts +0 -0
  67. package/dist/types/components/inputs/z-searchbar/index.d.ts +0 -2
  68. package/dist/types/components/inputs/z-select/index.d.ts +0 -0
  69. package/dist/types/components/list/z-list/index.d.ts +0 -0
  70. package/dist/types/components/list/z-list-element/index.d.ts +0 -0
  71. package/dist/types/components/list/z-list-group/index.d.ts +0 -0
  72. package/dist/types/components/list/z-toast-notification-list/index.d.ts +0 -0
  73. package/dist/types/components/logo/z-logo/index.d.ts +0 -0
  74. package/dist/types/components/modal/z-modal/index.d.ts +0 -0
  75. package/dist/types/components/navigation/tabs/z-navigation-tab/index.d.ts +0 -0
  76. package/dist/types/components/navigation/tabs/z-navigation-tab-link/index.d.ts +0 -0
  77. package/dist/types/components/navigation/tabs/z-navigation-tabs/index.d.ts +0 -0
  78. package/dist/types/components/navigation/z-app-header/index.d.ts +49 -17
  79. package/dist/types/components/navigation/z-link/index.d.ts +0 -0
  80. package/dist/types/components/navigation/z-menu/index.d.ts +1 -0
  81. package/dist/types/components/navigation/z-menu-section/index.d.ts +0 -0
  82. package/dist/types/components/notification/z-info-box/index.d.ts +0 -0
  83. package/dist/types/components/notification/z-notification/index.d.ts +0 -0
  84. package/dist/types/components/notification/z-toast-notification/index.d.ts +0 -0
  85. package/dist/types/components/notification/z-tooltip/index.d.ts +9 -3
  86. package/dist/types/components/panel/z-panel-elem/index.d.ts +0 -0
  87. package/dist/types/components/z-anchor-navigation/index.d.ts +0 -0
  88. package/dist/types/components/z-aria-alert/index.d.ts +0 -0
  89. package/dist/types/components/z-avatar/index.d.ts +0 -0
  90. package/dist/types/components/z-card/index.d.ts +0 -0
  91. package/dist/types/components/z-carousel/index.d.ts +0 -0
  92. package/dist/types/components/z-contextual-menu/index.d.ts +0 -0
  93. package/dist/types/components/z-cover-hero/index.d.ts +0 -0
  94. package/dist/types/components/z-divider/index.d.ts +0 -0
  95. package/dist/types/components/z-ghost-loading/index.d.ts +0 -0
  96. package/dist/types/components/z-info-reveal/index.d.ts +0 -0
  97. package/dist/types/components/z-offcanvas/index.d.ts +10 -12
  98. package/dist/types/components/z-pagination/index.d.ts +0 -0
  99. package/dist/types/components/z-popover/index.d.ts +2 -1
  100. package/dist/types/components/z-section-title/index.d.ts +0 -0
  101. package/dist/types/components/z-skip-to-content/index.d.ts +0 -0
  102. package/dist/types/components/z-table/z-table/index.d.ts +0 -0
  103. package/dist/types/components/z-table/z-table-body/index.d.ts +0 -0
  104. package/dist/types/components/z-table/z-table-cell/index.d.ts +0 -0
  105. package/dist/types/components/z-table/z-table-empty-box/index.d.ts +0 -0
  106. package/dist/types/components/z-table/z-table-expanded-row/index.d.ts +0 -0
  107. package/dist/types/components/z-table/z-table-footer/index.d.ts +0 -0
  108. package/dist/types/components/z-table/z-table-head/index.d.ts +0 -0
  109. package/dist/types/components/z-table/z-table-header/index.d.ts +0 -0
  110. package/dist/types/components/z-table/z-table-header-row/index.d.ts +0 -0
  111. package/dist/types/components/z-table/z-table-row/index.d.ts +0 -0
  112. package/dist/types/components/z-table/z-table-sticky-footer/index.d.ts +0 -0
  113. package/dist/types/components/z-tag/index.d.ts +0 -0
  114. package/dist/types/components/z-visually-hidden/index.d.ts +0 -0
  115. package/dist/types/components.d.ts +51 -15
  116. package/dist/types/constants/breakpoints.d.ts +0 -0
  117. package/dist/types/constants/icons.d.ts +0 -0
  118. package/dist/types/index.d.ts +0 -0
  119. package/dist/types/snowflakes/myz/card/z-myz-card/index.d.ts +0 -0
  120. package/dist/types/snowflakes/myz/card/z-myz-card-alert/index.d.ts +0 -0
  121. package/dist/types/snowflakes/myz/card/z-myz-card-body/index.d.ts +0 -0
  122. package/dist/types/snowflakes/myz/card/z-myz-card-cover/index.d.ts +0 -0
  123. package/dist/types/snowflakes/myz/card/z-myz-card-dictionary/index.d.ts +0 -0
  124. package/dist/types/snowflakes/myz/card/z-myz-card-footer/index.d.ts +0 -0
  125. package/dist/types/snowflakes/myz/card/z-myz-card-footer-sections/index.d.ts +0 -0
  126. package/dist/types/snowflakes/myz/card/z-myz-card-header/index.d.ts +0 -0
  127. package/dist/types/snowflakes/myz/card/z-myz-card-icon/index.d.ts +0 -0
  128. package/dist/types/snowflakes/myz/card/z-myz-card-info/index.d.ts +0 -0
  129. package/dist/types/snowflakes/myz/card/z-myz-card-list/index.d.ts +0 -0
  130. package/dist/types/snowflakes/myz/list/z-myz-list/index.d.ts +0 -0
  131. package/dist/types/snowflakes/myz/list/z-myz-list-item/index.d.ts +0 -0
  132. package/dist/types/snowflakes/myz/pocket/z-messages-pocket/index.d.ts +0 -0
  133. package/dist/types/snowflakes/myz/pocket/z-pocket/index.d.ts +0 -0
  134. package/dist/types/snowflakes/myz/pocket/z-pocket-body/index.d.ts +0 -0
  135. package/dist/types/snowflakes/myz/pocket/z-pocket-header/index.d.ts +0 -0
  136. package/dist/types/snowflakes/myz/pocket/z-pocket-message/index.d.ts +0 -0
  137. package/dist/types/snowflakes/myz/z-alert/index.d.ts +0 -0
  138. package/dist/types/snowflakes/myz/z-otp/index.d.ts +0 -0
  139. package/dist/types/snowflakes/myz/z-slideshow/index.d.ts +0 -0
  140. package/dist/types/stencil-public-runtime.d.ts +0 -0
  141. package/dist/types/utils/utils.d.ts +0 -0
  142. package/dist/web-components-library/index.esm.js +1 -1
  143. package/dist/web-components-library/{p-1f259ec0.entry.js → p-0bf3a704.entry.js} +1 -1
  144. package/{www/build/p-d982fc4c.entry.js → dist/web-components-library/p-10e036e4.entry.js} +1 -1
  145. package/dist/web-components-library/p-161a4e84.entry.js +1 -0
  146. package/dist/web-components-library/{p-dfc69cc3.js → p-1c6b0e09.js} +1 -1
  147. package/dist/web-components-library/{p-10625725.entry.js → p-1e71778f.entry.js} +1 -1
  148. package/dist/web-components-library/{p-068951a7.entry.js → p-1eaef57d.entry.js} +1 -1
  149. package/dist/web-components-library/p-27441384.entry.js +1 -0
  150. package/dist/web-components-library/{p-779c8d20.entry.js → p-378e3fd3.entry.js} +1 -1
  151. package/dist/web-components-library/{p-e2758870.entry.js → p-5c5a2680.entry.js} +1 -1
  152. package/dist/web-components-library/p-6d377fcb.entry.js +1 -0
  153. package/{www/build/p-191c9901.entry.js → dist/web-components-library/p-84b23d4b.entry.js} +1 -1
  154. package/dist/web-components-library/p-8ff45f5f.entry.js +1 -0
  155. package/dist/web-components-library/p-a7249453.entry.js +1 -0
  156. package/dist/web-components-library/p-b36fc3db.entry.js +1 -0
  157. package/dist/web-components-library/{p-bca446ef.entry.js → p-c9bb584c.entry.js} +1 -1
  158. package/dist/web-components-library/{p-59b1f1e9.entry.js → p-d986024a.entry.js} +1 -1
  159. package/dist/web-components-library/p-eefde77a.entry.js +1 -0
  160. package/dist/web-components-library/web-components-library.css +0 -0
  161. package/dist/web-components-library/web-components-library.esm.js +1 -1
  162. package/loader/cdn.js +0 -0
  163. package/loader/index.cjs.js +0 -0
  164. package/loader/index.d.ts +0 -0
  165. package/loader/index.es2017.js +0 -0
  166. package/loader/index.js +0 -0
  167. package/loader/package.json +0 -0
  168. package/package.json +3 -2
  169. package/www/build/index.esm.js +1 -1
  170. package/www/build/{p-1f259ec0.entry.js → p-0bf3a704.entry.js} +1 -1
  171. package/{dist/web-components-library/p-d982fc4c.entry.js → www/build/p-10e036e4.entry.js} +1 -1
  172. package/www/build/p-161a4e84.entry.js +1 -0
  173. package/www/build/{p-dfc69cc3.js → p-1c6b0e09.js} +1 -1
  174. package/www/build/{p-10625725.entry.js → p-1e71778f.entry.js} +1 -1
  175. package/www/build/{p-068951a7.entry.js → p-1eaef57d.entry.js} +1 -1
  176. package/www/build/p-27441384.entry.js +1 -0
  177. package/www/build/{p-779c8d20.entry.js → p-378e3fd3.entry.js} +1 -1
  178. package/www/build/{p-e2758870.entry.js → p-5c5a2680.entry.js} +1 -1
  179. package/www/build/p-6d377fcb.entry.js +1 -0
  180. package/www/build/p-70021fac.js +1 -0
  181. package/{dist/web-components-library/p-191c9901.entry.js → www/build/p-84b23d4b.entry.js} +1 -1
  182. package/www/build/p-8ff45f5f.entry.js +1 -0
  183. package/www/build/p-a7249453.entry.js +1 -0
  184. package/www/build/p-b36fc3db.entry.js +1 -0
  185. package/www/build/{p-bca446ef.entry.js → p-c9bb584c.entry.js} +1 -1
  186. package/www/build/{p-59b1f1e9.entry.js → p-d986024a.entry.js} +1 -1
  187. package/www/build/p-eefde77a.entry.js +1 -0
  188. package/www/build/web-components-library.css +0 -0
  189. package/www/build/web-components-library.esm.js +1 -1
  190. package/www/build/web-components-library.js +0 -0
  191. package/www/host.config.json +0 -0
  192. package/www/index.html +1 -1
  193. package/CHANGELOG.md +0 -2439
  194. package/dist/cjs/z-app-header_2.cjs.entry.js +0 -152
  195. package/dist/cjs/z-button.cjs.entry.js +0 -43
  196. package/dist/cjs/z-divider.cjs.entry.js +0 -26
  197. package/dist/cjs/z-input_2.cjs.entry.js +0 -273
  198. package/dist/cjs/z-list_3.cjs.entry.js +0 -261
  199. package/dist/cjs/z-offcanvas.cjs.entry.js +0 -57
  200. package/dist/cjs/z-searchbar.cjs.entry.js +0 -248
  201. package/dist/esm/z-app-header_2.entry.js +0 -147
  202. package/dist/esm/z-button.entry.js +0 -39
  203. package/dist/esm/z-divider.entry.js +0 -22
  204. package/dist/esm/z-input_2.entry.js +0 -268
  205. package/dist/esm/z-list_3.entry.js +0 -255
  206. package/dist/esm/z-offcanvas.entry.js +0 -53
  207. package/dist/esm/z-searchbar.entry.js +0 -244
  208. package/dist/web-components-library/p-1570917d.entry.js +0 -1
  209. package/dist/web-components-library/p-157aea3b.entry.js +0 -1
  210. package/dist/web-components-library/p-1c8e7c24.entry.js +0 -1
  211. package/dist/web-components-library/p-20682781.entry.js +0 -1
  212. package/dist/web-components-library/p-3d0f5e36.entry.js +0 -1
  213. package/dist/web-components-library/p-4f266607.entry.js +0 -1
  214. package/dist/web-components-library/p-51c946a5.entry.js +0 -1
  215. package/dist/web-components-library/p-975afabe.entry.js +0 -1
  216. package/dist/web-components-library/p-af283478.entry.js +0 -1
  217. package/dist/web-components-library/p-bae1911e.entry.js +0 -1
  218. package/dist/web-components-library/p-d0760bb1.entry.js +0 -1
  219. package/dist/web-components-library/p-deda8776.entry.js +0 -1
  220. package/dist/web-components-library/p-f3a8cc14.entry.js +0 -1
  221. package/src-react/index.ts +0 -1
  222. package/www/build/p-1570917d.entry.js +0 -1
  223. package/www/build/p-157aea3b.entry.js +0 -1
  224. package/www/build/p-1c8e7c24.entry.js +0 -1
  225. package/www/build/p-20682781.entry.js +0 -1
  226. package/www/build/p-3d0f5e36.entry.js +0 -1
  227. package/www/build/p-4f266607.entry.js +0 -1
  228. package/www/build/p-51c946a5.entry.js +0 -1
  229. package/www/build/p-77d28b14.js +0 -1
  230. package/www/build/p-975afabe.entry.js +0 -1
  231. package/www/build/p-af283478.entry.js +0 -1
  232. package/www/build/p-bae1911e.entry.js +0 -1
  233. package/www/build/p-d0760bb1.entry.js +0 -1
  234. package/www/build/p-deda8776.entry.js +0 -1
  235. package/www/build/p-f3a8cc14.entry.js +0 -1
@@ -1,147 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a2ca4b97.js';
2
- import { I as ICONS } from './icons-6cd265c6.js';
3
-
4
- const stylesCss$1 = ":host{--app-header-content-max-width:100%;--app-header-height:auto;--app-header-typography-1-size:24px;--app-header-typography-2-size:28px;--app-header-typography-3-size:32px;--app-header-typography-4-size:36px;--app-header-typography-5-size:42px;--app-header-typography-6-size:48px;--app-header-typography-7-size:54px;--app-header-typography-8-size:60px;--app-header-typography-9-size:68px;--app-header-typography-10-size:76px;--app-header-typography-11-size:84px;--app-header-typography-12-size:92px;--app-header-typography-1-lineheight:1.33;--app-header-typography-2-lineheight:1.29;--app-header-typography-3-lineheight:1.25;--app-header-typography-4-lineheight:1.24;--app-header-typography-5-lineheight:1.24;--app-header-typography-6-lineheight:1.25;--app-header-typography-7-lineheight:1.2;--app-header-typography-8-lineheight:1.26;--app-header-typography-9-lineheight:1.24;--app-header-typography-10-lineheight:1.26;--app-header-typography-11-lineheight:1.2;--app-header-typography-12-lineheight:1.2;--app-header-typography-1-tracking:calc(-0.2 / 1em);--app-header-typography-2-tracking:calc(-0.4 / 1em);--app-header-typography-3-tracking:calc(-0.6 / 1em);--app-header-typography-4-tracking:calc(-0.8 / 1em);--app-header-typography-5-tracking:calc(-1 / 1em);--app-header-typography-6-tracking:calc(-1.2 / 1em);--app-header-typography-7-tracking:calc(-1.4 / 1em);--app-header-typography-8-tracking:calc(-1.6 / 1em);--app-header-typography-9-tracking:calc(-1.8 / 1em);--app-header-typography-10-tracking:calc(-2 / 1em);--app-header-typography-11-tracking:calc(-2.2 / 1em);--app-header-typography-12-tracking:calc(-2.4 / 1em);--app-header-top-offset:48px;--app-header-drawer-trigger-size:calc(var(--space-unit) * 4);--app-header-bg:var(--color-white);--app-header-stucked-bg:var(--color-white);--app-header-text-color:var(--gray800);--app-header-stucked-text-color:var(--gray800);display:block;color:var(--app-header-text-color)}:host,*{box-sizing:border-box}.heading-panel{position:relative;display:flex;width:100%;max-width:var(--app-header-content-max-width);height:var(--app-header-height);flex-direction:column;flex-grow:0;flex-shrink:0;align-items:baseline;justify-content:flex-start;padding:var(--grid-margin);margin:0 auto;background:var(--app-header-bg)}:host(:empty) .heading-panel{padding:0}.heading-title{display:flex;max-width:100%;flex-direction:row;align-items:center}:host(:not([menu-length=\"0\"])) .heading-subtitle{padding-left:calc(var(--app-header-drawer-trigger-size) + (var(--space-unit) * 1.5))}.heading-stuck{position:fixed;z-index:20;top:var(--app-header-top-offset);left:0;width:100%;max-width:100%;animation:slide-stuck-heading-in 250ms ease-out;background:var(--app-header-stucked-bg);box-shadow:var(--shadow-2);color:var(--app-header-stucked-text-color)}.heading-stuck-content{display:flex;max-width:var(--app-header-content-max-width);padding:var(--space-unit) var(--grid-margin);margin:0 auto}.heading-stuck .heading-title,.heading-stuck .heading-title>*,.heading-stuck .heading-title ::slotted([slot=\"stucked-title\"]){display:block;overflow:hidden;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}.heading-stuck .heading-title>*,::slotted([slot=\"title\"]),::slotted([slot=\"stucked-title\"]){margin:0;font-family:\"IBM Plex Serif\", serif;font-size:var(--app-header-typography-3-size);font-weight:700;letter-spacing:var(--app-header-typography-3-tracking)}::slotted([slot=\"title\"]){line-height:1}::slotted([slot=\"subtitle\"]){margin:var(--space-unit) 0 0;font-family:var(--font-family-sans);font-size:20px;font-style:italic;font-weight:500;line-height:1.2}.heading-container{position:relative;z-index:1;display:flex;max-width:100%;flex-direction:column;align-items:flex-start;justify-content:flex-start;margin-right:auto}.menu-container{display:none;flex-flow:row wrap;align-items:baseline}.menu-container ::slotted([open]){position:relative;z-index:3}.menu-container ::slotted(*:not(:last-of-type)){margin-right:calc(var(--space-unit) * 4.5)}.drawer-trigger{padding:0;border:0;margin:0 calc(var(--space-unit) * 1.5) 0 0;appearance:none;background:none;border-radius:0;color:inherit;cursor:pointer}.drawer-trigger z-icon{--z-icon-width:var(--app-header-drawer-trigger-size);--z-icon-height:var(--app-header-drawer-trigger-size);fill:currentcolor}.drawer-container{position:fixed;z-index:100;top:var(--app-header-top-offset);left:0;width:100%;height:100%;pointer-events:none}.drawer-container .drawer-overlay{position:absolute;z-index:1;top:0;left:0;display:block;width:100%;height:100%;background:var(--gray900);opacity:0;pointer-events:none;transition:opacity 400ms ease-out}.drawer-panel{position:absolute;z-index:2;top:0;left:0;display:flex;width:375px;max-width:100%;height:100%;flex-direction:column;align-items:flex-start;padding:calc(var(--space-unit) * 2) var(--space-unit);background:var(--color-white);color:var(--gray800);pointer-events:none;transform:translate3d(-100%, 0, 0);transition:transform 400ms ease-out}.drawer-content{display:flex;overflow:auto;width:100%;flex:1 auto;flex-direction:column;padding:calc(var(--space-unit) * 0.5) var(--space-unit)}.drawer-content::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.drawer-content::-webkit-scrollbar-track{background-color:transparent}.drawer-content::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.drawer-content::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.drawer-content ::slotted(z-menu){width:100%}.drawer-content ::slotted(z-menu:not(:last-of-type)){margin-bottom:calc(var(--space-unit) * 2.5)}.drawer-close{--z-icon-width:var(--app-header-drawer-trigger-size);--z-icon-height:var(--app-header-drawer-trigger-size);padding:0;border:0;margin:0 0 calc(var(--space-unit) * 2.5) var(--space-unit);appearance:none;background:transparent;border-radius:0;color:inherit;cursor:pointer;fill:currentcolor;font-size:inherit;outline:none}.drawer-close:focus-visible{box-shadow:var(--shadow-focus-primary)}:host([drawer-open]) .drawer-container .drawer-overlay{opacity:0.7;pointer-events:all}:host([drawer-open]) .drawer-container .drawer-panel{pointer-events:all;transform:none}.hero-container{position:absolute;z-index:0;top:0;left:0;width:100%;height:100%}:host([overlay]) .heading-panel .drawer-trigger z-icon,:host([overlay]) .heading-panel .heading-container,:host([overlay]) .heading-panel .menu-container{color:var(--color-white);fill:var(--color-white)}:host([overlay]) .heading-panel .menu-container ::slotted(z-menu:not([open])){--color-surface05:var(--color-white)}:host([overlay]) .hero-container::after{position:absolute;z-index:0;top:0;left:0;width:100%;height:100%;background:var(--color-black);content:\"\";opacity:0.5}.hero-container img,.hero-container ::slotted(*){position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;object-position:top center;-webkit-user-drag:none}@media (min-width: 768px){:host(:not([flow=\"offcanvas\"])) .heading-subtitle{padding-left:0}:host(:not([flow=\"offcanvas\"])) .menu-container{display:flex}:host(:not([flow=\"offcanvas\"])) .heading-container .drawer-trigger{display:none}:host(:not([flow=\"offcanvas\"],[menu-length=\"0\"])) .heading-container:not(:last-child){margin-bottom:calc(var(--space-unit) * 3)}::slotted([slot=\"title\"]){font-size:var(--app-header-typography-6-size);letter-spacing:var(--app-header-typography-6-tracking)}::slotted([slot=\"subtitle\"]){margin-top:calc(var(--space-unit) * 1.5)}}@media (min-width: 1152px){:host(:not([flow=\"stack\"])) .heading-panel{flex-flow:row wrap}::slotted([slot=\"title\"]){margin-right:var(--grid-gutter);font-size:var(--app-header-typography-7-size);letter-spacing:var(--app-header-typography-7-tracking)}:host(:not([flow=\"offcanvas\"],[menu-length=\"0\"])) .heading-container:not(:last-child){margin-bottom:calc(var(--space-unit) * 2)}.menu-container{margin-top:var(--space-unit)}}@media (min-width: 1366px){::slotted([slot=\"title\"]){font-size:var(--app-header-typography-9-size);letter-spacing:var(--app-header-typography-9-tracking)}:host(:not([flow=\"offcanvas\"],[menu-length=\"0\"])) .heading-container:not(:last-child){margin-bottom:0}}@keyframes slide-stuck-heading-in{0%{transform:translate3d(0, -100%, 0)}100%{transform:none}}";
5
-
6
- const SUPPORT_INTERSECTION_OBSERVER = typeof IntersectionObserver !== "undefined";
7
- const ZAppHeader = class {
8
- constructor(hostRef) {
9
- registerInstance(this, hostRef);
10
- this.sticking = createEvent(this, "sticking", 7);
11
- /**
12
- * Stuck mode for the header.
13
- * You can programmatically set it using an IntersectionObserver.
14
- * **Optional**
15
- */
16
- this.stuck = false;
17
- /**
18
- * Should place an overlay over the hero image.
19
- * Useful for legibility purpose.
20
- * **Optional**
21
- */
22
- this.overlay = false;
23
- /**
24
- * Control menu bar position in the header.
25
- * - auto: the menu bar is positioned near the title
26
- * - stack: the menu bar is positioned below the title
27
- * - offcanvas: the menu bar is not displayed and a burger icon appears to open the offcanvas menu
28
- */
29
- this.flow = "auto";
30
- /**
31
- * The opening state of the drawer.
32
- */
33
- this.drawerOpen = false;
34
- /**
35
- * The stuck state of the bar.
36
- */
37
- this._stuck = false;
38
- this.observer = SUPPORT_INTERSECTION_OBSERVER &&
39
- new IntersectionObserver(([entry]) => {
40
- this._stuck = !entry.isIntersecting;
41
- }, {
42
- threshold: 0.5,
43
- });
44
- this.openDrawer = this.openDrawer.bind(this);
45
- this.closeDrawer = this.closeDrawer.bind(this);
46
- this.collectMenuElements = this.collectMenuElements.bind(this);
47
- }
48
- emitStickingEvent() {
49
- this.sticking.emit(this._stuck);
50
- }
51
- openDrawer() {
52
- this.drawerOpen = true;
53
- }
54
- closeDrawer() {
55
- this.drawerOpen = false;
56
- }
57
- componentDidLoad() {
58
- this.collectMenuElements();
59
- this.onStuckMode();
60
- }
61
- get title() {
62
- const titleElement = this.hostElement.querySelector('[slot="title"]');
63
- if (titleElement === null) {
64
- return "";
65
- }
66
- return titleElement.textContent.trim();
67
- }
68
- get scrollParent() {
69
- const parent = this.hostElement.offsetParent;
70
- if (parent === document.body || parent === document.documentElement) {
71
- return window;
72
- }
73
- return parent;
74
- }
75
- collectMenuElements() {
76
- const menuElements = (this.menuElements = this.hostElement.querySelectorAll('[slot="menu"]'));
77
- this.menuLength = menuElements.length;
78
- this.setMenuFloatingMode();
79
- }
80
- onStuckMode() {
81
- if (this.stuck) {
82
- this.enableStuckObserver();
83
- }
84
- else {
85
- this.disableStuckMode();
86
- }
87
- }
88
- enableStuckObserver() {
89
- if (this.observer) {
90
- this.observer.observe(this.container);
91
- }
92
- }
93
- disableStuckMode() {
94
- this._stuck = false;
95
- if (this.observer) {
96
- this.observer.unobserve(this.container);
97
- }
98
- }
99
- onStuck() {
100
- const scrollParent = this.scrollParent;
101
- if (!scrollParent) {
102
- return;
103
- }
104
- this.emitStickingEvent();
105
- }
106
- setMenuFloatingMode() {
107
- if (this.menuElements.length === 0) {
108
- return;
109
- }
110
- const elements = this.menuElements;
111
- elements.forEach((element) => {
112
- element.open = false;
113
- element.floating = !this.drawerOpen;
114
- element.verticalContext = this.drawerOpen;
115
- });
116
- }
117
- render() {
118
- return (h(Host, { "menu-length": this.menuLength }, h("div", { class: "heading-panel", ref: (el) => (this.container = el) }, h("div", { class: "hero-container" }, h("slot", { name: "hero" }, this.hero && (h("img", { alt: "", src: this.hero })))), h("div", { class: "heading-container" }, h("div", { class: "heading-title" }, this.menuLength > 0 && (h("button", { class: "drawer-trigger", "aria-label": "Apri menu", onClick: this.openDrawer }, h("z-icon", { name: "burger-menu" }))), h("slot", { name: "title" })), h("div", { class: "heading-subtitle" }, h("slot", { name: "subtitle" }))), h("div", { class: "menu-container" }, !this.drawerOpen && this.flow !== "offcanvas" && (h("slot", { name: "menu", onSlotchange: this.collectMenuElements })))), h("div", { class: "drawer-container" }, h("div", { class: "drawer-overlay", onClick: this.closeDrawer }), h("div", { class: "drawer-panel" }, h("button", { class: "drawer-close", "aria-label": "Chiudi menu", onClick: this.closeDrawer }, h("z-icon", { name: "close" })), h("div", { class: "drawer-content" }, this.drawerOpen && (h("slot", { name: "menu", onSlotchange: this.collectMenuElements }))))), this._stuck && (h("div", { class: "heading-stuck" }, h("div", { class: "heading-stuck-content" }, this.menuLength > 0 && (h("button", { class: "drawer-trigger", "aria-label": "Apri menu", onClick: this.openDrawer }, h("z-icon", { name: "burger-menu" }))), h("div", { class: "heading-title" }, h("slot", { name: "stucked-title" }, this.title)))))));
119
- }
120
- get hostElement() { return getElement(this); }
121
- static get watchers() { return {
122
- "stuck": ["onStuckMode"],
123
- "_stuck": ["onStuck"],
124
- "drawerOpen": ["setMenuFloatingMode"]
125
- }; }
126
- };
127
- ZAppHeader.style = stylesCss$1;
128
-
129
- const stylesCss = ":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)}";
130
-
131
- const ZIcon = class {
132
- constructor(hostRef) {
133
- registerInstance(this, hostRef);
134
- }
135
- selectPathOrPolygon(iconValue) {
136
- if (iconValue === null || iconValue === void 0 ? void 0 : iconValue.startsWith("M")) {
137
- return h("path", { d: ICONS[this.name] });
138
- }
139
- return h("polygon", { points: ICONS[this.name] });
140
- }
141
- render() {
142
- return (h(Host, { "aria-hidden": "true" }, 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[this.name]))));
143
- }
144
- };
145
- ZIcon.style = stylesCss;
146
-
147
- export { ZAppHeader as z_app_header, ZIcon as z_icon };
@@ -1,39 +0,0 @@
1
- import { r as registerInstance, h, g as getElement } from './index-a2ca4b97.js';
2
- import { b as ButtonType, B as ButtonVariant, d as ControlSize } from './index-e36ec4a4.js';
3
-
4
- const stylesCss = ".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:transparent;background-color:transparent;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-surface01);background-color:var(--color-surface01);color:var(--color-primary01)}[variant=\"tertiary\"].sc-z-button-h .z-button--container.sc-z-button:active{border-color:var(--color-surface01);background-color:var(--color-surface01);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:transparent;background-color:transparent;color:var(--color-disabled02)}";
5
-
6
- const ZButton = class {
7
- constructor(hostRef) {
8
- registerInstance(this, hostRef);
9
- /** defines a string value that labels an interactive element, used for accessibility. */
10
- this.ariaLabel = "";
11
- /** HTML button disabled attribute. */
12
- this.disabled = false;
13
- /** HTML button type attribute. */
14
- this.type = ButtonType.BUTTON;
15
- /** Graphical variant: `primary`, `secondary`, `tertiary`. Defaults to `primary`. */
16
- this.variant = ButtonVariant.PRIMARY;
17
- /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
18
- this.size = ControlSize.BIG;
19
- }
20
- getAttributes() {
21
- return {
22
- id: this.htmlid,
23
- class: {
24
- "z-button--container": true,
25
- "z-button--has-text": !!this.hostElement.textContent.trim(),
26
- },
27
- };
28
- }
29
- render() {
30
- if (this.href) {
31
- return (h("a", Object.assign({}, this.getAttributes(), { "aria-label": this.ariaLabel, href: this.href, target: this.target }), this.icon && (h("z-icon", { name: this.icon, width: 16, height: 16 })), h("slot", null)));
32
- }
33
- return (h("button", Object.assign({}, this.getAttributes(), { "aria-label": this.ariaLabel, name: this.name, type: this.type, disabled: this.disabled }), this.icon && (h("z-icon", { name: this.icon, width: 16, height: 16 })), h("slot", null)));
34
- }
35
- get hostElement() { return getElement(this); }
36
- };
37
- ZButton.style = stylesCss;
38
-
39
- export { ZButton as z_button };
@@ -1,22 +0,0 @@
1
- import { r as registerInstance, h, H as Host } from './index-a2ca4b97.js';
2
- import { D as DividerSize, g as DividerOrientation } from './index-e36ec4a4.js';
3
-
4
- const stylesCss = ".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)}";
5
-
6
- const ZDivider = class {
7
- constructor(hostRef) {
8
- registerInstance(this, hostRef);
9
- /** [optional] Divider size */
10
- this.size = DividerSize.SMALL;
11
- /** [optional] Divider color */
12
- this.color = "gray200";
13
- /** [optional] Divider orintation */
14
- this.orientation = DividerOrientation.HORIZONTAL;
15
- }
16
- render() {
17
- return (h(Host, { class: `divider-${this.size} divider-${this.orientation}`, style: { backgroundColor: `var(--${this.color})` } }));
18
- }
19
- };
20
- ZDivider.style = stylesCss;
21
-
22
- export { ZDivider as z_divider };
@@ -1,268 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-a2ca4b97.js';
2
- import { k as LabelPosition, d as ControlSize, I as InputType } from './index-e36ec4a4.js';
3
- import { r as randomId, b as boolean } from './utils-970ac457.js';
4
- import './breakpoints-c386984e.js';
5
-
6
- const stylesCss$1 = ".sc-z-input-h{display:inline-block;width:inherit}input.sc-z-input::-ms-clear,input.sc-z-input::-ms-reveal{display:none}.sc-z-input-h input.sc-z-input::-ms-clear,.sc-z-input-h input.sc-z-input::-ms-reveal{display:none}input.sc-z-input,textarea.sc-z-input,.textarea-wrapper.sc-z-input{box-sizing:border-box;border:var(--border-size-small) solid var(--color-surface04);background:var(--color-input-field01);border-radius:var(--border-radius-small);color:var(--color-text01);fill:var(--color-icon02);font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:var(--font-rg);outline:none}[size=\"small\"].sc-z-input-h input.sc-z-input,[size=\"small\"].sc-z-input-h textarea.sc-z-input,[size=\"small\"].sc-z-input-h .textarea-wrapper.sc-z-input,[size=\"x-small\"].sc-z-input-h input.sc-z-input,[size=\"x-small\"].sc-z-input-h textarea.sc-z-input,[size=\"x-small\"].sc-z-input-h .textarea-wrapper.sc-z-input{font-size:var(--font-size-2)}.cursor-select.sc-z-input-h input.sc-z-input{cursor:pointer}.sc-z-input-h:not(.active-select) input.sc-z-input:focus:focus-visible,.textarea-wrapper.sc-z-input:focus-within{box-shadow:var(--shadow-focus-primary)}input.sc-z-input:focus:focus-visible,textarea.sc-z-input:focus:focus-visible{color:var(--color-primary02)}.active-select.sc-z-input-h input.sc-z-input{border:var(--border-size-small) solid var(--blue500)}.cursor-select.sc-z-input-h input.sc-z-input:focus:focus-visible{box-shadow:var(--shadow-focus-primary)}.sc-z-input-h input[readonly].sc-z-input:focus:focus-visible{box-shadow:none}.filled.sc-z-input{border-color:var(--color-surface05)}.input-success.sc-z-input{border-color:var(--color-success01);background:var(--color-success-inverse);fill:var(--color-success01)}.input-error.sc-z-input{border-color:var(--color-error01);background:var(--color-error-inverse);fill:var(--color-error01)}.input-warning.sc-z-input{border-color:var(--color-warning01);background:var(--color-warning-inverse);fill:var(--color-warning01)}input.sc-z-input:hover,.textarea-wrapper.sc-z-input:hover{outline:var(--border-size-medium) solid var(--color-surface04);outline-offset:-2px}.sc-z-input-h:not(.active-select) input[readonly].sc-z-input,.readonly.sc-z-input{border-color:var(--color-disabled01);fill:var(--color-disabled01);pointer-events:none}[disabled].sc-z-input-h:not([disabled=\"false\"]) input.sc-z-input,[disabled].sc-z-input-h:not([disabled=\"false\"]) .textarea-wrapper.sc-z-input,[disabled].sc-z-input-h:not([disabled=\"false\"]) z-icon.sc-z-input{border-color:var(--color-disabled01);box-shadow:none;color:var(--color-disabled02);fill:var(--color-disabled01);pointer-events:none}[disabled].sc-z-input-h:not([disabled=\"false\"]) input.sc-z-input:hover{border-width:var(--border-size-small)}input.sc-z-input::placeholder,textarea.sc-z-input::placeholder{color:var(--color-text05)}.sc-z-input::-webkit-textarea-placeholder{color:var(--color-text05)}.sc-z-input:-ms-textarea-placeholder{color:var(--color-text05)}.sc-z-input::placeholder{color:var(--color-text05)}label.input-label.sc-z-input{display:block;padding-bottom:var(--space-unit);color:var(--color-text02);font-family:var(--font-family-sans);font-size:var(--font-size-1);font-weight:var(--font-sb);text-align:left;text-transform:uppercase}[disabled].sc-z-input-h:not([disabled=\"false\"]) label.input-label.sc-z-input{color:var(--color-disabled02)}.text-wrapper.sc-z-input>div.sc-z-input{position:relative;z-index:1;fill:var(--color-icon02)}.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input{width:100%;height:calc(var(--space-unit) * 5.5);box-sizing:border-box;padding:0 calc(var(--space-unit) * 1.5);margin:0}[size=\"small\"].sc-z-input-h .text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input{height:calc(var(--space-unit) * 4.5)}[size=\"x-small\"].sc-z-input-h .text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input{height:calc(var(--space-unit) * 4)}.text-wrapper.sc-z-input>div.sc-z-input>input.has-icon.sc-z-input,.text-wrapper.sc-z-input>div.sc-z-input>input.has-clear-icon.sc-z-input{padding-right:calc(var(--space-unit) * 5.25)}.text-wrapper.sc-z-input>div.sc-z-input>input.has-icon.has-clear-icon.sc-z-input{padding-right:calc(var(--space-unit) * 8)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input{position:absolute;z-index:2;top:50%;right:calc(var(--space-unit) * 1.5);display:flex;pointer-events:none;transform:translateY(-50%)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input{padding:0;border:0;background:none;color:inherit;font:inherit;pointer-events:initial}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input+button.icon-button.sc-z-input{margin-left:calc(var(--space-unit) * 0.5)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.reset-icon.sc-z-input,.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.toggle-password-icon.sc-z-input{cursor:pointer}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input>z-icon.sc-z-input{--z-icon-width:18px;--z-icon-height:18px;display:block}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input>z-icon.small.sc-z-input,.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input>z-icon.x-small.sc-z-input{--z-icon-width:16px;--z-icon-height:16px}.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill,.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill:hover,.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill:focus,.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill:active{background:var(--color-white) !important;background-clip:text !important;-webkit-transition-delay:99999s !important}.textarea-wrapper.sc-z-input{padding:calc(var(--space-unit) * 1.5);scrollbar-color:var(--color-primary01) transparent}textarea.sc-z-input::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}textarea.sc-z-input::-webkit-scrollbar-track{background-color:transparent}textarea.sc-z-input::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}textarea.sc-z-input::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}textarea.sc-z-input{width:100%;min-height:132px;padding:0;border:none;margin:0;resize:none}.radio-wrapper.sc-z-input,.checkbox-wrapper.sc-z-input{position:relative;display:inline-flex;flex-direction:row;align-items:center;color:var(--color-text01);fill:var(--color-primary01);font-family:var(--font-family-sans)}.radio-wrapper.sc-z-input:hover,.checkbox-wrapper.sc-z-input:hover{color:var(--color-hover-primary);fill:currentcolor}.radio-wrapper.sc-z-input>input.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input{position:absolute;z-index:-1;opacity:0;pointer-events:none}.radio-wrapper.sc-z-input .radio-label.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input{display:inline-flex;align-items:center;margin:0;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:1;text-transform:inherit}.radio-wrapper.sc-z-input input.sc-z-input:not(:disabled)+.radio-label.sc-z-input,.checkbox-wrapper.sc-z-input input.sc-z-input:not(:disabled)+.checkbox-label.sc-z-input{cursor:pointer}.radio-wrapper.sc-z-input .radio-label.sc-z-input z-icon.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input z-icon.sc-z-input{cursor:pointer;fill:inherit}[size=\"small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input z-icon.sc-z-input,[size=\"small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input z-icon.sc-z-input{--z-icon-width:16px;--z-icon-height:16px}[size=\"small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input,[size=\"small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input{font-size:var(--font-size-2)}[size=\"x-small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input z-icon.sc-z-input,[size=\"x-small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input z-icon.sc-z-input{--z-icon-width:14px;--z-icon-height:14px}[size=\"x-small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input,[size=\"x-small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input{font-size:var(--font-size-1)}.radio-wrapper.sc-z-input .radio-label.after.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input{flex-direction:row}.radio-wrapper.sc-z-input .radio-label.before.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input{flex-direction:row-reverse}.radio-wrapper.sc-z-input .radio-label.after.sc-z-input>span.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input>span.sc-z-input{margin-left:var(--space-unit)}.radio-wrapper.sc-z-input .radio-label.before.sc-z-input>span.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input>span.sc-z-input{margin-right:var(--space-unit)}[size=\"small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.after.sc-z-input>span.sc-z-input,[size=\"small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input>span.sc-z-input,[size=\"x-small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.after.sc-z-input>span.sc-z-input,[size=\"x-small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input>span.sc-z-input{margin-left:calc(var(--space-unit) * 0.5)}[size=\"small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.before.sc-z-input>span.sc-z-input,[size=\"small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input>span.sc-z-input,[size=\"x-small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.before.sc-z-input>span.sc-z-input,[size=\"x-small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input>span.sc-z-input{margin-right:calc(var(--space-unit) * 0.5)}.radio-wrapper.sc-z-input>input.sc-z-input:focus:focus-visible+.radio-label.sc-z-input>z-icon.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input:focus:focus-visible+.checkbox-label.sc-z-input>z-icon.sc-z-input{border-radius:var(--border-radius-small);box-shadow:var(--shadow-focus-primary)}.radio-wrapper.sc-z-input>input.sc-z-input:disabled+.radio-label.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input:disabled+.checkbox-label.sc-z-input{color:var(--color-disabled02)}.radio-wrapper.sc-z-input>input.sc-z-input:disabled+.radio-label.sc-z-input>z-icon.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input:disabled+.checkbox-label.sc-z-input>z-icon.sc-z-input{cursor:default;fill:var(--color-disabled01)}";
7
-
8
- const ZInput = class {
9
- constructor(hostRef) {
10
- registerInstance(this, hostRef);
11
- this.inputChange = createEvent(this, "inputChange", 7);
12
- this.startTyping = createEvent(this, "startTyping", 7);
13
- this.stopTyping = createEvent(this, "stopTyping", 7);
14
- this.inputCheck = createEvent(this, "inputCheck", 7);
15
- /** the id of the input element */
16
- this.htmlid = `id-${randomId()}`;
17
- /** the input aria-label */
18
- this.ariaLabel = "";
19
- /** the input is disabled */
20
- this.disabled = false;
21
- /** the input is readonly */
22
- this.readonly = false;
23
- /** the input is required (optional): available for text, password, number, email, textarea, checkbox */
24
- this.required = false;
25
- /** checked: available for checkbox, radio */
26
- this.checked = false;
27
- /** input helper message (optional): available for text, password, number, email, textarea - if set to `false` message won't be displayed */
28
- this.message = true;
29
- /** the input label position: available for checkbox, radio */
30
- this.labelPosition = LabelPosition.RIGHT;
31
- /** render clear icon when typing (optional): available for text */
32
- this.hasclearicon = true;
33
- /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
34
- this.size = ControlSize.BIG;
35
- this.isTyping = false;
36
- this.passwordHidden = true;
37
- this.typingtimeout = 300;
38
- }
39
- inputCheckListener(e) {
40
- const data = e.detail;
41
- switch (this.type) {
42
- case InputType.RADIO:
43
- if (data.type === InputType.RADIO && data.name === this.name && data.id !== this.htmlid) {
44
- this.checked = false;
45
- }
46
- break;
47
- }
48
- }
49
- /** get checked status */
50
- async isChecked() {
51
- switch (this.type) {
52
- case InputType.CHECKBOX:
53
- case InputType.RADIO:
54
- return this.checked;
55
- default:
56
- console.warn("`isChecked` method is only available for type `checkbox` and `radio`");
57
- return false;
58
- }
59
- }
60
- emitInputChange(value) {
61
- if (!this.isTyping) {
62
- this.emitStartTyping();
63
- }
64
- let validity;
65
- if (this.type === InputType.TEXTAREA) {
66
- validity = this.getValidity("textarea");
67
- }
68
- else {
69
- validity = this.getValidity("input");
70
- }
71
- this.value = value;
72
- this.inputChange.emit({ value, validity });
73
- clearTimeout(this.timer);
74
- this.timer = setTimeout(() => {
75
- this.emitStopTyping(this.value, validity);
76
- }, this.typingtimeout);
77
- }
78
- emitStartTyping() {
79
- this.isTyping = true;
80
- this.startTyping.emit();
81
- }
82
- emitStopTyping(value, validity) {
83
- this.isTyping = false;
84
- this.stopTyping.emit({
85
- value: value,
86
- validity: validity,
87
- });
88
- }
89
- emitInputCheck(checked) {
90
- this.inputCheck.emit({
91
- id: this.htmlid,
92
- checked: checked,
93
- type: this.type,
94
- name: this.name,
95
- value: this.value,
96
- validity: this.getValidity("input"),
97
- });
98
- }
99
- getValidity(type) {
100
- const input = this.hostElement.querySelector(type);
101
- return input.validity;
102
- }
103
- /* START text/password/email/number */
104
- getTextAttributes() {
105
- return {
106
- id: this.htmlid,
107
- name: this.name,
108
- placeholder: this.placeholder,
109
- value: this.value,
110
- disabled: this.disabled,
111
- readonly: this.readonly,
112
- required: this.required,
113
- title: this.htmltitle,
114
- class: {
115
- [`input-${this.status}`]: !!this.status,
116
- filled: !!this.value,
117
- },
118
- autocomplete: this.autocomplete,
119
- onInput: (e) => this.emitInputChange(e.target.value),
120
- };
121
- }
122
- getNumberAttributes(type) {
123
- if (type != InputType.NUMBER) {
124
- return;
125
- }
126
- return {
127
- min: this.min,
128
- max: this.max,
129
- step: this.step,
130
- };
131
- }
132
- getPatternAttribute(type) {
133
- if (type != InputType.PASSWORD &&
134
- type != InputType.TEXT &&
135
- type != InputType.TEL &&
136
- type != InputType.SEARCH &&
137
- type != InputType.URL &&
138
- type != InputType.EMAIL) {
139
- return;
140
- }
141
- return {
142
- pattern: this.pattern,
143
- };
144
- }
145
- renderInputText(type = InputType.TEXT) {
146
- const ariaLabel = this.ariaLabel ? { "aria-label": this.ariaLabel } : {};
147
- const attr = Object.assign(Object.assign(Object.assign(Object.assign({}, this.getTextAttributes()), this.getNumberAttributes(type)), this.getPatternAttribute(type)), ariaLabel);
148
- if (this.icon || type === InputType.PASSWORD) {
149
- Object.assign(attr.class, { "has-icon": true });
150
- }
151
- if (this.hasclearicon && type != InputType.NUMBER) {
152
- Object.assign(attr.class, { "has-clear-icon": true });
153
- }
154
- return (h("div", { class: "text-wrapper" }, this.renderLabel(), h("div", null, h("input", Object.assign({ type: type === InputType.PASSWORD && !this.passwordHidden ? InputType.TEXT : type }, attr)), this.renderIcons()), this.renderMessage()));
155
- }
156
- renderLabel() {
157
- if (!this.label) {
158
- return;
159
- }
160
- return (h("label", { class: "input-label body-5-sb", id: `${this.htmlid}_label`, htmlFor: this.htmlid }, this.label));
161
- }
162
- renderIcons() {
163
- return (h("span", { class: "icons-wrapper" }, this.renderResetIcon(), this.renderIcon()));
164
- }
165
- renderIcon() {
166
- if (this.type === InputType.PASSWORD) {
167
- return this.renderShowHidePassword();
168
- }
169
- if (!this.icon) {
170
- return;
171
- }
172
- return (h("button", { type: "button", class: "icon-button input-icon", tabIndex: -1 }, h("z-icon", { name: this.icon, class: this.size })));
173
- }
174
- renderResetIcon() {
175
- if (!this.hasclearicon || !this.value || this.disabled || this.readonly || this.type == InputType.NUMBER) {
176
- return;
177
- }
178
- return (h("button", { type: "button", class: "icon-button reset-icon", "aria-label": "cancella il contenuto dell'input", onClick: () => this.emitInputChange("") }, h("z-icon", { name: "multiply", class: this.size })));
179
- }
180
- renderShowHidePassword() {
181
- return (h("button", { type: "button", class: "icon-button toggle-password-icon", disabled: this.disabled, "aria-label": this.passwordHidden ? "mostra password" : "nascondi password", onClick: () => (this.passwordHidden = !this.passwordHidden) }, h("z-icon", { name: this.passwordHidden ? "view-filled" : "view-off-filled", class: this.size })));
182
- }
183
- renderMessage() {
184
- if (boolean(this.message) === false) {
185
- return;
186
- }
187
- return (h("z-input-message", { message: boolean(this.message) === true ? undefined : this.message, status: this.status, class: this.size }));
188
- }
189
- /* END text/password/email/number */
190
- /* START textarea */
191
- renderTextarea() {
192
- const attributes = this.getTextAttributes();
193
- const ariaLabel = this.ariaLabel ? { "aria-label": this.ariaLabel } : {};
194
- return (h("div", { class: "text-wrapper" }, this.renderLabel(), h("div", { class: Object.assign(Object.assign({}, attributes.class), { "textarea-wrapper": true, "readonly": attributes.readonly }) }, h("textarea", Object.assign({}, attributes, ariaLabel))), this.renderMessage()));
195
- }
196
- /* END textarea */
197
- handleCheck(ev) {
198
- this.checked = ev.target.checked;
199
- this.emitInputCheck(this.checked);
200
- }
201
- /* START checkbox */
202
- renderCheckbox() {
203
- return (h("div", { class: "checkbox-wrapper" }, h("input", { id: this.htmlid, type: "checkbox", name: this.name, checked: this.checked, disabled: this.disabled, readonly: this.readonly, required: this.required, onChange: this.handleCheck.bind(this), value: this.value }), h("label", { htmlFor: this.htmlid, class: {
204
- "checkbox-label": true,
205
- "after": this.labelPosition === LabelPosition.RIGHT,
206
- "before": this.labelPosition === LabelPosition.LEFT,
207
- } }, h("z-icon", { name: this.checked ? "checkbox-checked" : "checkbox", "aria-hidden": "true", class: this.size }), this.label && h("span", { innerHTML: this.label }))));
208
- }
209
- /* END checkbox */
210
- /* START radio */
211
- renderRadio() {
212
- return (h("div", { class: "radio-wrapper" }, h("input", { id: this.htmlid, type: "radio", name: this.name, checked: this.checked, disabled: this.disabled, readonly: this.readonly, onChange: this.handleCheck.bind(this), value: this.value }), h("label", { htmlFor: this.htmlid, class: {
213
- "radio-label": true,
214
- "after": this.labelPosition === LabelPosition.RIGHT,
215
- "before": this.labelPosition === LabelPosition.LEFT,
216
- } }, h("z-icon", { name: this.checked ? "radio-button-checked" : "radio-button", "aria-hidden": "true", class: this.size }), this.label && h("span", { innerHTML: this.label }))));
217
- }
218
- /* END radio */
219
- render() {
220
- let input;
221
- switch (this.type) {
222
- case InputType.TEXTAREA:
223
- input = this.renderTextarea();
224
- break;
225
- case InputType.CHECKBOX:
226
- input = this.renderCheckbox();
227
- break;
228
- case InputType.RADIO:
229
- input = this.renderRadio();
230
- break;
231
- default:
232
- input = this.renderInputText(this.type);
233
- }
234
- return h(Host, null, input);
235
- }
236
- get hostElement() { return getElement(this); }
237
- };
238
- ZInput.style = stylesCss$1;
239
-
240
- const stylesCss = ":host{display:flex;min-height:calc(var(--space-unit) * 2.5);align-items:start;margin-top:var(--space-unit);color:var(--color-text05);fill:currentcolor;font-family:var(--font-family-sans);font-size:var(--font-size-2);letter-spacing:0.16px}:host(.small),:host(.x-small){margin-top:calc(var(--space-unit) * 0.5);font-size:var(--font-size-1)}:host([status=\"success\"]){color:var(--color-text-success)}:host([status=\"error\"]){color:var(--color-text-error)}:host([status=\"warning\"]){color:var(--color-warning02)}:host(:focus){outline:none}:host>z-icon{--z-icon-width:calc(var(--space-unit) * 2);--z-icon-height:calc(var(--space-unit) * 2);--z-icon-right-margin:var(--space-unit);margin-top:calc(var(--space-unit) * 0.25)}:host(.small)>z-icon,:host(.x-small)>z-icon{--z-icon-width:14px;--z-icon-height:14px;--z-icon-right-margin:calc(var(--space-unit) * 0.5)}";
241
-
242
- const ZInputMessage = class {
243
- constructor(hostRef) {
244
- registerInstance(this, hostRef);
245
- this.statusIcons = {
246
- success: "checkmark-circle",
247
- error: "multiply-circled",
248
- warning: "exclamation-circle",
249
- };
250
- this.statusRole = {};
251
- }
252
- onMessageChange() {
253
- this.statusRole = this.message && this.status ? { role: "alert" } : {};
254
- }
255
- componentWillLoad() {
256
- this.onMessageChange();
257
- }
258
- render() {
259
- return (h(Host, Object.assign({}, this.statusRole, { "aria-label": this.message }), this.statusIcons[this.status] && this.message && h("z-icon", { name: this.statusIcons[this.status] }), h("span", { innerHTML: this.message })));
260
- }
261
- static get watchers() { return {
262
- "message": ["onMessageChange"],
263
- "status": ["onMessageChange"]
264
- }; }
265
- };
266
- ZInputMessage.style = stylesCss;
267
-
268
- export { ZInput as z_input, ZInputMessage as z_input_message };