@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
@@ -27,20 +27,32 @@ export namespace Components {
27
27
  * The opening state of the drawer.
28
28
  */
29
29
  "drawerOpen": boolean;
30
+ /**
31
+ * Enable the search bar.
32
+ */
33
+ "enableSearch": boolean;
30
34
  /**
31
35
  * Control menu bar position in the header. - auto: the menu bar is positioned near the title - stack: the menu bar is positioned below the title - offcanvas: the menu bar is not displayed and a burger icon appears to open the offcanvas menu
32
36
  */
33
37
  "flow": "auto" | "stack" | "offcanvas";
34
38
  /**
35
- * Set the hero image source for the header. You can also use a slot="hero" node for advanced customisation. **Optional**
39
+ * Set the hero image source for the header. You can also use a [slot="hero"] node for advanced customization.
36
40
  */
37
41
  "hero": string;
38
42
  /**
39
- * Should place an overlay over the hero image. Useful for legibility purpose. **Optional**
43
+ * Should place an overlay over the hero image. Useful for legibility purpose.
40
44
  */
41
45
  "overlay": boolean;
42
46
  /**
43
- * Stuck mode for the header. You can programmatically set it using an IntersectionObserver. **Optional**
47
+ * Url to the search page. Set this prop and `enableSearch` to show a link-button on mobile and tablet viewports, instead of the normal searchbar. The link will also appear on the sticky header.
48
+ */
49
+ "searchPageUrl": string;
50
+ /**
51
+ * Placeholder text for the search bar.
52
+ */
53
+ "searchPlaceholder": string;
54
+ /**
55
+ * Stuck mode for the header. You can programmatically set it using an IntersectionObserver.
44
56
  */
45
57
  "stuck": boolean;
46
58
  }
@@ -1117,19 +1129,19 @@ export namespace Components {
1117
1129
  }
1118
1130
  interface ZOffcanvas {
1119
1131
  /**
1120
- * open component. Default: false
1132
+ * Whether the offcanvas is open. Default: false
1121
1133
  */
1122
1134
  "open": boolean;
1123
1135
  /**
1124
- * this method allows you to skip the page loading animation, to be used with the prop set to true
1136
+ * Whether to skip the initial animation. Useful when the initial value of the `open` prop is set to `true`.
1125
1137
  */
1126
- "setSkipAanimationOnLoad": (value: boolean) => Promise<void>;
1138
+ "skipLoadAnimation": boolean;
1127
1139
  /**
1128
1140
  * open content transitioning in a specified direction left | right. Default: left
1129
1141
  */
1130
1142
  "transitiondirection"?: TransitionDirection;
1131
1143
  /**
1132
- * Offcanvas variant. Can be one of "overlay", "pushcontent" Default variant: pushcontent
1144
+ * Offcanvas variant. Can be one `overlay` or `pushcontent`. Default variant: pushcontent
1133
1145
  */
1134
1146
  "variant"?: OffCanvasVariant;
1135
1147
  }
@@ -1269,7 +1281,7 @@ export namespace Components {
1269
1281
  */
1270
1282
  "center": boolean;
1271
1283
  /**
1272
- * Whether the popover should be closed when the user clicks outside of it or hit "ESC".
1284
+ * If true, the popover can be closed by clicking outside of it or pressing the escape key. Otherwise, it will be closed only programmatically (by setting `open` to `false`).
1273
1285
  */
1274
1286
  "closable": boolean;
1275
1287
  /**
@@ -1724,6 +1736,10 @@ export namespace Components {
1724
1736
  * The selector or the element bound with the tooltip.
1725
1737
  */
1726
1738
  "bindTo"?: string | HTMLElement;
1739
+ /**
1740
+ * Reflects `closable` prop of the popover. "If true, the popover can be closed by clicking outside of it or pressing the escape key. Otherwise, it will be closed only programmatically (by setting `open` to `false`)."
1741
+ */
1742
+ "closable": boolean;
1727
1743
  /**
1728
1744
  * Enable tooltip dark mode.
1729
1745
  */
@@ -2552,12 +2568,16 @@ declare namespace LocalJSX {
2552
2568
  * The opening state of the drawer.
2553
2569
  */
2554
2570
  "drawerOpen"?: boolean;
2571
+ /**
2572
+ * Enable the search bar.
2573
+ */
2574
+ "enableSearch"?: boolean;
2555
2575
  /**
2556
2576
  * Control menu bar position in the header. - auto: the menu bar is positioned near the title - stack: the menu bar is positioned below the title - offcanvas: the menu bar is not displayed and a burger icon appears to open the offcanvas menu
2557
2577
  */
2558
2578
  "flow"?: "auto" | "stack" | "offcanvas";
2559
2579
  /**
2560
- * Set the hero image source for the header. You can also use a slot="hero" node for advanced customisation. **Optional**
2580
+ * Set the hero image source for the header. You can also use a [slot="hero"] node for advanced customization.
2561
2581
  */
2562
2582
  "hero"?: string;
2563
2583
  /**
@@ -2565,11 +2585,19 @@ declare namespace LocalJSX {
2565
2585
  */
2566
2586
  "onSticking"?: (event: ZAppHeaderCustomEvent<any>) => void;
2567
2587
  /**
2568
- * Should place an overlay over the hero image. Useful for legibility purpose. **Optional**
2588
+ * Should place an overlay over the hero image. Useful for legibility purpose.
2569
2589
  */
2570
2590
  "overlay"?: boolean;
2571
2591
  /**
2572
- * Stuck mode for the header. You can programmatically set it using an IntersectionObserver. **Optional**
2592
+ * Url to the search page. Set this prop and `enableSearch` to show a link-button on mobile and tablet viewports, instead of the normal searchbar. The link will also appear on the sticky header.
2593
+ */
2594
+ "searchPageUrl"?: string;
2595
+ /**
2596
+ * Placeholder text for the search bar.
2597
+ */
2598
+ "searchPlaceholder"?: string;
2599
+ /**
2600
+ * Stuck mode for the header. You can programmatically set it using an IntersectionObserver.
2573
2601
  */
2574
2602
  "stuck"?: boolean;
2575
2603
  }
@@ -3766,19 +3794,23 @@ declare namespace LocalJSX {
3766
3794
  }
3767
3795
  interface ZOffcanvas {
3768
3796
  /**
3769
- * emitted when open prop changes
3797
+ * emitted when `open` prop changes
3770
3798
  */
3771
3799
  "onCanvasOpenStatusChanged"?: (event: ZOffcanvasCustomEvent<any>) => void;
3772
3800
  /**
3773
- * open component. Default: false
3801
+ * Whether the offcanvas is open. Default: false
3774
3802
  */
3775
3803
  "open"?: boolean;
3804
+ /**
3805
+ * Whether to skip the initial animation. Useful when the initial value of the `open` prop is set to `true`.
3806
+ */
3807
+ "skipLoadAnimation"?: boolean;
3776
3808
  /**
3777
3809
  * open content transitioning in a specified direction left | right. Default: left
3778
3810
  */
3779
3811
  "transitiondirection"?: TransitionDirection;
3780
3812
  /**
3781
- * Offcanvas variant. Can be one of "overlay", "pushcontent" Default variant: pushcontent
3813
+ * Offcanvas variant. Can be one `overlay` or `pushcontent`. Default variant: pushcontent
3782
3814
  */
3783
3815
  "variant"?: OffCanvasVariant;
3784
3816
  }
@@ -3930,7 +3962,7 @@ declare namespace LocalJSX {
3930
3962
  */
3931
3963
  "center"?: boolean;
3932
3964
  /**
3933
- * Whether the popover should be closed when the user clicks outside of it or hit "ESC".
3965
+ * If true, the popover can be closed by clicking outside of it or pressing the escape key. Otherwise, it will be closed only programmatically (by setting `open` to `false`).
3934
3966
  */
3935
3967
  "closable"?: boolean;
3936
3968
  /**
@@ -4433,6 +4465,10 @@ declare namespace LocalJSX {
4433
4465
  * The selector or the element bound with the tooltip.
4434
4466
  */
4435
4467
  "bindTo"?: string | HTMLElement;
4468
+ /**
4469
+ * Reflects `closable` prop of the popover. "If true, the popover can be closed by clicking outside of it or pressing the escape key. Otherwise, it will be closed only programmatically (by setting `open` to `false`)."
4470
+ */
4471
+ "closable"?: boolean;
4436
4472
  /**
4437
4473
  * Enable tooltip dark mode.
4438
4474
  */
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1 +1 @@
1
- import{c as V}from"./p-dfc69cc3.js";export{o as AlertType,A as AvatarSize,c as ButtonSize,b as ButtonType,B as ButtonVariant,C as CardVariant,R as CarouselArrowsPosition,U as CarouselProgressMode,d as ControlSize,Q as CoverHeroContentPosition,M as CoverHeroVariant,p as Device,g as DividerOrientation,D as DividerSize,j as ExpandableListButtonAlign,E as ExpandableListStyle,J as InfoRevealPosition,e as InputStatus,I as InputType,f as KeyboardCode,K as KeyboardKeyCode,k as LabelPosition,L as LicenseType,l as ListDividerType,h as ListSize,m as ListType,N as NavigationTabsOrientation,a as NavigationTabsSize,n as NotificationType,O as OffCanvasVariant,q as PocketStatus,P as PopoverPosition,i as Size,S as SortDirection,T as ThemeVariant,r as ToastNotification,t as ToastNotificationPosition,s as ToastNotificationTransition,v as TransitionDirection,u as ZAriaAlertMode,x as ZChipType,z as ZDatePickerMode,F as ZDatePickerModeValue,G as ZDatePickerPosition,w as ZFileUploadType,H as ZRangePickerMode,y as ZSectionTitleDividerPosition,Z as ZTableRowExpandedType}from"./p-e1ac5c4e.js";import"./p-d69e14fb.js";const W={colorFromId:V};export{W as Utils}
1
+ import{c as V}from"./p-1c6b0e09.js";export{o as AlertType,A as AvatarSize,c as ButtonSize,b as ButtonType,B as ButtonVariant,C as CardVariant,R as CarouselArrowsPosition,U as CarouselProgressMode,d as ControlSize,Q as CoverHeroContentPosition,M as CoverHeroVariant,p as Device,g as DividerOrientation,D as DividerSize,j as ExpandableListButtonAlign,E as ExpandableListStyle,J as InfoRevealPosition,e as InputStatus,I as InputType,f as KeyboardCode,K as KeyboardKeyCode,k as LabelPosition,L as LicenseType,l as ListDividerType,h as ListSize,m as ListType,N as NavigationTabsOrientation,a as NavigationTabsSize,n as NotificationType,O as OffCanvasVariant,q as PocketStatus,P as PopoverPosition,i as Size,S as SortDirection,T as ThemeVariant,r as ToastNotification,t as ToastNotificationPosition,s as ToastNotificationTransition,v as TransitionDirection,u as ZAriaAlertMode,x as ZChipType,z as ZDatePickerMode,F as ZDatePickerModeValue,G as ZDatePickerPosition,w as ZFileUploadType,H as ZRangePickerMode,y as ZSectionTitleDividerPosition,Z as ZTableRowExpandedType}from"./p-e1ac5c4e.js";import"./p-d69e14fb.js";const W={colorFromId:V};export{W as Utils}
@@ -1 +1 @@
1
- import{r as t,c as i,h as e,H as s,g as n}from"./p-d17ebc2f.js";import{w as a,p as r,D as o}from"./p-e1ac5c4e.js";import{g as l}from"./p-dfc69cc3.js";import"./p-d69e14fb.js";const c=class{constructor(e){t(this,e),this.fileInput=i(this,"fileInput",7),this.type=a.DEFAULT,this.files=[],this.inputAttributes={type:"file",id:"file-elem",multiple:!0}}removeFileListener(t){const i=this.files,e=i.find((i=>i.name===t.detail.fileName));if(e){const t=i.indexOf(e);t>=0&&(i.splice(t,1),this.files=[...i])}}fileDroppedListener(t){this.input.files=t.detail,this.fileInputHandler()}componentDidUpdate(){this.handleAccessibility(),this.invalidFiles.size&&this.errorModal.focus()}componentWillLoad(){this.invalidFiles=new Map}fileInputHandler(){this.input.files.length&&(this.invalidFiles=this.checkFiles(Array.from(this.input.files)))}async getFiles(){return this.files}getType(){return l()!==r.DESKTOP?a.DEFAULT:this.type}handleAccessibility(){const t=this.el.querySelector("z-file:last-child z-chip button");this.files.length>0&&t?t.focus():this.getType()===a.DEFAULT?this.button.querySelector("button").focus():this.uploadLink.focus()}checkFiles(t){const i=new Map,e=`supera i ${this.fileMaxSize}MB`;return t.forEach((t=>{const s=t.size/1024/1024,n=this.acceptedFormat.split(",").some((i=>t.name.toLowerCase().endsWith(i.trim()))),a=s<=this.fileMaxSize;a&&n?this.files.find((i=>i.name===t.name))||(this.files.push(t),this.fileInput.emit(t),this.input.value=""):(i.set(t.name,[]),a||i.get(t.name).push(e),n||i.get(t.name).push(" ha un'estensione non prevista"))})),i}renderTitle(){return e("h2",{class:"heading-2-sb",id:"title"},this.mainTitle)}renderDescription(t){return e("span",{class:t},this.description)}renderAllowedFileExtensions(){let t="",i="";return this.acceptedFormat&&(t=` nei formati ${this.acceptedFormat.split(", ").map((t=>t.substring(1).toUpperCase())).join(", ")}`),this.fileMaxSize&&(i=` per un massimo di ${this.fileMaxSize}MB di peso`),e("span",{class:"body-3"},t||i?`Puoi allegare file${t}${i}.`:null)}renderFileSection(){return e("section",{class:"files-container "+(this.files.length?"":"hidden")},e("h4",{class:"heading-4-sb"},"File appena caricati"),e("div",{class:"files-wrapper"},e("slot",{name:"files"})),e("z-divider",{size:o.MEDIUM}))}renderInput(){return e("input",Object.assign({},this.inputAttributes,{onChange:()=>this.fileInputHandler(),accept:this.acceptedFormat,ref:t=>this.input=t}))}renderUploadButton(){return[this.renderInput(),e("z-button",{onClick:()=>this.input.click(),onKeyPress:t=>{"Space"!=t.code&&"Enter"!=t.code||(t.preventDefault(),this.input.click())},id:"fileSelect",variant:this.buttonVariant,icon:"upload",ref:t=>this.button=t},"Allega")]}renderUploadLink(){return[this.renderInput(),e("span",{class:"body-1 upload-link-text"},"Trascinalo qui o"," ",e("span",{tabIndex:0,class:"body-1-sb upload-link",onClick:()=>this.input.click(),onKeyPress:t=>{"Space"!=t.code&&"Enter"!=t.code||(t.preventDefault(),this.input.click())},ref:t=>this.uploadLink=t},"caricalo")," ","dal tuo computer")]}renderDefaultMode(){return[this.renderDescription("body-3-sb"),this.renderAllowedFileExtensions(),this.renderFileSection(),this.renderUploadButton()]}renderDragDropMode(){return[this.renderFileSection(),e("z-dragdrop-area",null,e("div",{class:"text-container"},this.renderDescription("body-1"),this.renderUploadLink(),this.renderAllowedFileExtensions()))]}formatErrorString(t,i){var e,s;return`Il file ${t} ${null!==(e=i[0])&&void 0!==e?e:""}${i[0]&&i[1]?", ":""} ${null!==(s=i[1])&&void 0!==s?s:""} e non può quindi essere caricato.`}handleErrorModalContent(){return e("div",{slot:"modalContent"},e("div",{class:"modal-wrapper"},e("div",{class:"files"},Array.from(this.invalidFiles).map((([t,i])=>e("span",{class:"body-3"},this.formatErrorString(t,i)))))))}render(){return e(s,null,e("div",{tabIndex:0,class:`container ${this.getType()}`},this.renderTitle(),this.getType()==a.DEFAULT?this.renderDefaultMode():this.renderDragDropMode()),!!this.invalidFiles.size&&e("z-modal",{tabIndex:0,ref:t=>this.errorModal=t,modaltitle:"Attenzione",onModalClose:()=>this.invalidFiles=new Map,onModalBackgroundClick:()=>this.invalidFiles=new Map},this.handleErrorModalContent()))}get el(){return n(this)}};c.style=":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}: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-bottom:var(--space-unit)}: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}: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}@media only screen and (min-width: 768px){:host>.container>z-button{align-self:flex-start}}";export{c as z_file_upload}
1
+ import{r as t,c as i,h as e,H as s,g as n}from"./p-d17ebc2f.js";import{w as a,p as r,D as o}from"./p-e1ac5c4e.js";import{g as l}from"./p-1c6b0e09.js";import"./p-d69e14fb.js";const c=class{constructor(e){t(this,e),this.fileInput=i(this,"fileInput",7),this.type=a.DEFAULT,this.files=[],this.inputAttributes={type:"file",id:"file-elem",multiple:!0}}removeFileListener(t){const i=this.files,e=i.find((i=>i.name===t.detail.fileName));if(e){const t=i.indexOf(e);t>=0&&(i.splice(t,1),this.files=[...i])}}fileDroppedListener(t){this.input.files=t.detail,this.fileInputHandler()}componentDidUpdate(){this.handleAccessibility(),this.invalidFiles.size&&this.errorModal.focus()}componentWillLoad(){this.invalidFiles=new Map}fileInputHandler(){this.input.files.length&&(this.invalidFiles=this.checkFiles(Array.from(this.input.files)))}async getFiles(){return this.files}getType(){return l()!==r.DESKTOP?a.DEFAULT:this.type}handleAccessibility(){const t=this.el.querySelector("z-file:last-child z-chip button");this.files.length>0&&t?t.focus():this.getType()===a.DEFAULT?this.button.querySelector("button").focus():this.uploadLink.focus()}checkFiles(t){const i=new Map,e=`supera i ${this.fileMaxSize}MB`;return t.forEach((t=>{const s=t.size/1024/1024,n=this.acceptedFormat.split(",").some((i=>t.name.toLowerCase().endsWith(i.trim()))),a=s<=this.fileMaxSize;a&&n?this.files.find((i=>i.name===t.name))||(this.files.push(t),this.fileInput.emit(t),this.input.value=""):(i.set(t.name,[]),a||i.get(t.name).push(e),n||i.get(t.name).push(" ha un'estensione non prevista"))})),i}renderTitle(){return e("h2",{class:"heading-2-sb",id:"title"},this.mainTitle)}renderDescription(t){return e("span",{class:t},this.description)}renderAllowedFileExtensions(){let t="",i="";return this.acceptedFormat&&(t=` nei formati ${this.acceptedFormat.split(", ").map((t=>t.substring(1).toUpperCase())).join(", ")}`),this.fileMaxSize&&(i=` per un massimo di ${this.fileMaxSize}MB di peso`),e("span",{class:"body-3"},t||i?`Puoi allegare file${t}${i}.`:null)}renderFileSection(){return e("section",{class:"files-container "+(this.files.length?"":"hidden")},e("h4",{class:"heading-4-sb"},"File appena caricati"),e("div",{class:"files-wrapper"},e("slot",{name:"files"})),e("z-divider",{size:o.MEDIUM}))}renderInput(){return e("input",Object.assign({},this.inputAttributes,{onChange:()=>this.fileInputHandler(),accept:this.acceptedFormat,ref:t=>this.input=t}))}renderUploadButton(){return[this.renderInput(),e("z-button",{onClick:()=>this.input.click(),onKeyPress:t=>{"Space"!=t.code&&"Enter"!=t.code||(t.preventDefault(),this.input.click())},id:"fileSelect",variant:this.buttonVariant,icon:"upload",ref:t=>this.button=t},"Allega")]}renderUploadLink(){return[this.renderInput(),e("span",{class:"body-1 upload-link-text"},"Trascinalo qui o"," ",e("span",{tabIndex:0,class:"body-1-sb upload-link",onClick:()=>this.input.click(),onKeyPress:t=>{"Space"!=t.code&&"Enter"!=t.code||(t.preventDefault(),this.input.click())},ref:t=>this.uploadLink=t},"caricalo")," ","dal tuo computer")]}renderDefaultMode(){return[this.renderDescription("body-3-sb"),this.renderAllowedFileExtensions(),this.renderFileSection(),this.renderUploadButton()]}renderDragDropMode(){return[this.renderFileSection(),e("z-dragdrop-area",null,e("div",{class:"text-container"},this.renderDescription("body-1"),this.renderUploadLink(),this.renderAllowedFileExtensions()))]}formatErrorString(t,i){var e,s;return`Il file ${t} ${null!==(e=i[0])&&void 0!==e?e:""}${i[0]&&i[1]?", ":""} ${null!==(s=i[1])&&void 0!==s?s:""} e non può quindi essere caricato.`}handleErrorModalContent(){return e("div",{slot:"modalContent"},e("div",{class:"modal-wrapper"},e("div",{class:"files"},Array.from(this.invalidFiles).map((([t,i])=>e("span",{class:"body-3"},this.formatErrorString(t,i)))))))}render(){return e(s,null,e("div",{tabIndex:0,class:`container ${this.getType()}`},this.renderTitle(),this.getType()==a.DEFAULT?this.renderDefaultMode():this.renderDragDropMode()),!!this.invalidFiles.size&&e("z-modal",{tabIndex:0,ref:t=>this.errorModal=t,modaltitle:"Attenzione",onModalClose:()=>this.invalidFiles=new Map,onModalBackgroundClick:()=>this.invalidFiles=new Map},this.handleErrorModalContent()))}get el(){return n(this)}};c.style=":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}: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-bottom:var(--space-unit)}: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}: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}@media only screen and (min-width: 768px){:host>.container>z-button{align-self:flex-start}}";export{c as z_file_upload}
@@ -1 +1 @@
1
- import{r as i,c as t,h as n}from"./p-d17ebc2f.js";import{P as e}from"./p-e1ac5c4e.js";import{h as s}from"./p-dfc69cc3.js";import"./p-d69e14fb.js";const o=class{constructor(n){i(this,n),this.flipCard=t(this,"flipCard",7),this.htmltabindex=0,this.hiddenContent=!1,this.tooltip=!1,this.emitFlipCard=this.emitFlipCard.bind(this)}emitFlipCard(i=!1){this.flipCard.emit(i)}componentWillLoad(){this.setStringOrArray()}componentWillUpdate(){this.setStringOrArray()}componentDidRender(){this.handleContentHeight()}handleContentHeight(){if(this.contentWrapper||this.infoWrapper){if(this.contentWrapper.scrollHeight>this.contentWrapper.offsetHeight||this.infoWrapper.scrollHeight>this.infoWrapper.offsetHeight)return this.infoWrapper.style.height=this.contentWrapper.offsetHeight-this.onlineLicenseWrapper.offsetHeight-this.offlineLicenseWrapper.offsetHeight+"px",void(this.hiddenContent=!0);this.hiddenContent=!1}else this.hiddenContent=!1}setStringOrArray(){this.cardData="string"==typeof this.data?JSON.parse(this.data):this.data}renderCloseIcon(){return n("z-icon",{name:"multiply-circled-filled",height:18,width:18,onClick:()=>this.emitFlipCard(!1),tabindex:this.htmltabindex,onKeyUp:i=>{s(i,this.emitFlipCard,!1)}})}renderGeneralSection(){var i,t;const e=null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.title,s=null===(t=null==this?void 0:this.cardData)||void 0===t?void 0:t.description;return n("section",{class:"info-wrapper "+(this.hiddenContent?"hidden":""),onClick:()=>{this.hiddenContent&&(this.tooltip=!this.tooltip)},ref:i=>this.infoWrapper=i},this.renderAuthor(),this.renderYear(),e,n("br",null),s)}renderAuthor(){var i;const t=null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.author;return t?n("span",null,"Autore: ",n("b",null,t),n("br",null)):null}renderYear(){var i;const t=null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.year;return t?n("span",null,"Anno: ",n("b",null,t),n("br",null)):null}renderTooltip(){if(!this.tooltip)return;if(!this.cardData)return;const{title:i,year:t,author:s,description:o}=this.cardData;return n("z-popover",{position:e.RIGHT,onClick:()=>this.tooltip=!1},`${i} ${t} ${s} ${o}`)}setExpirationLicenseMessage(i){return"online"===i&&this.cardData.onlineLicense.expired||"offline"===i&&this.cardData.offlineLicense.expired?n("span",{class:"expired"},"SCADUTA"):"online"===i&&this.cardData.onlineLicense.expiring||"offline"===i&&this.cardData.offlineLicense.expiring?n("span",{class:"expiring"},"IN SCADENZA"):void 0}renderOnlineLicenseSection(){var i;if(null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.onlineLicense)return n("section",{ref:i=>this.onlineLicenseWrapper=i},n("span",{class:"license-heading"},n("span",null,"Licenza online"),this.setExpirationLicenseMessage("online")),"Scadenza il ",n("b",null,this.cardData.onlineLicense.expiration),n("br",null))}renderOfflineLicenseSection(){var i;if(null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.offlineLicense)return n("section",{ref:i=>this.offlineLicenseWrapper=i},n("span",{class:"license-heading"},n("span",null,"Licenza offline"),this.setExpirationLicenseMessage("offline")),"Scadenza il ",n("b",null,this.cardData.offlineLicense.expiration),n("br",null),"Installazioni disponibili: ",n("b",null,this.cardData.offlineLicense.installations))}render(){return n("div",null,this.renderCloseIcon(),n("div",{class:"content-wrapper",ref:i=>this.contentWrapper=i},this.renderGeneralSection(),this.renderTooltip(),this.renderOnlineLicenseSection(),this.renderOfflineLicenseSection()),n("div",{class:"cta-wrapper"},n("slot",null)))}};o.style=':host{width:100%;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{position:relative;display:grid;width:calc(100% + calc(var(--space-unit) * 2));height:402px;box-sizing:border-box;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 3);border:var(--border-size-small) solid var(--color-primary01);margin-left:calc(-1 * var(--space-unit));background:var(--color-surface01);border-radius:0;box-shadow:0 2px 4px 0 rgb(66 69 72 / 35%)}:host>div>z-icon{position:absolute;top:var(--space-unit);right:var(--space-unit);cursor:pointer;fill:var(--color-primary01)}:host>div>div.cta-wrapper{display:flex;flex-flow:column nowrap;align-self:end;justify-content:space-between}:host>div>div.content-wrapper{position:relative;overflow:hidden;align-self:stretch}:host>div>div.content-wrapper>section{box-sizing:border-box;padding:var(--space-unit) 0;border-bottom:var(--border-size-small) solid var(--color-surface04);color:var(--color-surface05);font-size:14px;line-height:20px}:host>div>div.content-wrapper>section:last-child{border-bottom:none}:host>div>div.content-wrapper>section.info-wrapper{position:relative;overflow:hidden;box-sizing:border-box}:host>div>div.content-wrapper>section.info-wrapper.hidden::after{position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(180deg, rgb(255 0 0 / 0%), rgb(255 0 0 / 0%) 60%, white);content:"";pointer-events:none}:host>div>div.content-wrapper>section>span.license-heading{display:flex;justify-content:space-between}:host>div>div.content-wrapper>section>span.license-heading>span.expired{color:var(--color-secondary02);font-size:12px;font-weight:600}:host>div>div.content-wrapper>section>span.license-heading>span.expiring{color:var(--color-warning01);font-size:12px;font-weight:600}:host>div>div.content-wrapper>z-popover{position:absolute;top:0;left:calc(var(--space-unit) * 4)}';export{o as z_myz_card_info}
1
+ import{r as i,c as t,h as n}from"./p-d17ebc2f.js";import{P as e}from"./p-e1ac5c4e.js";import{a as s}from"./p-1c6b0e09.js";import"./p-d69e14fb.js";const o=class{constructor(n){i(this,n),this.flipCard=t(this,"flipCard",7),this.htmltabindex=0,this.hiddenContent=!1,this.tooltip=!1,this.emitFlipCard=this.emitFlipCard.bind(this)}emitFlipCard(i=!1){this.flipCard.emit(i)}componentWillLoad(){this.setStringOrArray()}componentWillUpdate(){this.setStringOrArray()}componentDidRender(){this.handleContentHeight()}handleContentHeight(){if(this.contentWrapper||this.infoWrapper){if(this.contentWrapper.scrollHeight>this.contentWrapper.offsetHeight||this.infoWrapper.scrollHeight>this.infoWrapper.offsetHeight)return this.infoWrapper.style.height=this.contentWrapper.offsetHeight-this.onlineLicenseWrapper.offsetHeight-this.offlineLicenseWrapper.offsetHeight+"px",void(this.hiddenContent=!0);this.hiddenContent=!1}else this.hiddenContent=!1}setStringOrArray(){this.cardData="string"==typeof this.data?JSON.parse(this.data):this.data}renderCloseIcon(){return n("z-icon",{name:"multiply-circled-filled",height:18,width:18,onClick:()=>this.emitFlipCard(!1),tabindex:this.htmltabindex,onKeyUp:i=>{s(i,this.emitFlipCard,!1)}})}renderGeneralSection(){var i,t;const e=null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.title,s=null===(t=null==this?void 0:this.cardData)||void 0===t?void 0:t.description;return n("section",{class:"info-wrapper "+(this.hiddenContent?"hidden":""),onClick:()=>{this.hiddenContent&&(this.tooltip=!this.tooltip)},ref:i=>this.infoWrapper=i},this.renderAuthor(),this.renderYear(),e,n("br",null),s)}renderAuthor(){var i;const t=null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.author;return t?n("span",null,"Autore: ",n("b",null,t),n("br",null)):null}renderYear(){var i;const t=null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.year;return t?n("span",null,"Anno: ",n("b",null,t),n("br",null)):null}renderTooltip(){if(!this.tooltip)return;if(!this.cardData)return;const{title:i,year:t,author:s,description:o}=this.cardData;return n("z-popover",{position:e.RIGHT,onClick:()=>this.tooltip=!1},`${i} ${t} ${s} ${o}`)}setExpirationLicenseMessage(i){return"online"===i&&this.cardData.onlineLicense.expired||"offline"===i&&this.cardData.offlineLicense.expired?n("span",{class:"expired"},"SCADUTA"):"online"===i&&this.cardData.onlineLicense.expiring||"offline"===i&&this.cardData.offlineLicense.expiring?n("span",{class:"expiring"},"IN SCADENZA"):void 0}renderOnlineLicenseSection(){var i;if(null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.onlineLicense)return n("section",{ref:i=>this.onlineLicenseWrapper=i},n("span",{class:"license-heading"},n("span",null,"Licenza online"),this.setExpirationLicenseMessage("online")),"Scadenza il ",n("b",null,this.cardData.onlineLicense.expiration),n("br",null))}renderOfflineLicenseSection(){var i;if(null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.offlineLicense)return n("section",{ref:i=>this.offlineLicenseWrapper=i},n("span",{class:"license-heading"},n("span",null,"Licenza offline"),this.setExpirationLicenseMessage("offline")),"Scadenza il ",n("b",null,this.cardData.offlineLicense.expiration),n("br",null),"Installazioni disponibili: ",n("b",null,this.cardData.offlineLicense.installations))}render(){return n("div",null,this.renderCloseIcon(),n("div",{class:"content-wrapper",ref:i=>this.contentWrapper=i},this.renderGeneralSection(),this.renderTooltip(),this.renderOnlineLicenseSection(),this.renderOfflineLicenseSection()),n("div",{class:"cta-wrapper"},n("slot",null)))}};o.style=':host{width:100%;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{position:relative;display:grid;width:calc(100% + calc(var(--space-unit) * 2));height:402px;box-sizing:border-box;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 3);border:var(--border-size-small) solid var(--color-primary01);margin-left:calc(-1 * var(--space-unit));background:var(--color-surface01);border-radius:0;box-shadow:0 2px 4px 0 rgb(66 69 72 / 35%)}:host>div>z-icon{position:absolute;top:var(--space-unit);right:var(--space-unit);cursor:pointer;fill:var(--color-primary01)}:host>div>div.cta-wrapper{display:flex;flex-flow:column nowrap;align-self:end;justify-content:space-between}:host>div>div.content-wrapper{position:relative;overflow:hidden;align-self:stretch}:host>div>div.content-wrapper>section{box-sizing:border-box;padding:var(--space-unit) 0;border-bottom:var(--border-size-small) solid var(--color-surface04);color:var(--color-surface05);font-size:14px;line-height:20px}:host>div>div.content-wrapper>section:last-child{border-bottom:none}:host>div>div.content-wrapper>section.info-wrapper{position:relative;overflow:hidden;box-sizing:border-box}:host>div>div.content-wrapper>section.info-wrapper.hidden::after{position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(180deg, rgb(255 0 0 / 0%), rgb(255 0 0 / 0%) 60%, white);content:"";pointer-events:none}:host>div>div.content-wrapper>section>span.license-heading{display:flex;justify-content:space-between}:host>div>div.content-wrapper>section>span.license-heading>span.expired{color:var(--color-secondary02);font-size:12px;font-weight:600}:host>div>div.content-wrapper>section>span.license-heading>span.expiring{color:var(--color-warning01);font-size:12px;font-weight:600}:host>div>div.content-wrapper>z-popover{position:absolute;top:0;left:calc(var(--space-unit) * 4)}';export{o as z_myz_card_info}
@@ -0,0 +1 @@
1
+ import{r as t,c as o,h as i,g as e}from"./p-d17ebc2f.js";import{f as n}from"./p-e1ac5c4e.js";const a=class{constructor(i){t(this,i),this.fileDropped=o(this,"fileDropped",7)}fileDroppedHandler(t){this.fileDropped.emit(t)}renderOnDragOverMessage(){return i("div",{class:"dragover-container"},i("div",{class:"dragover-message"},i("span",{class:"body-2-sb"},"Rilascia i file in questa area per allegarli.")))}render(){return i("div",{tabIndex:0,ref:t=>this.dragDropContainer=t,class:"dragdrop",onDragOver:t=>{t.preventDefault(),this.dragDropContainer.classList.add("dragover")},onDragLeave:()=>{this.dragDropContainer.classList.remove("dragover")},onDrop:t=>{t.preventDefault(),t.dataTransfer.files.length&&(this.dragDropContainer.classList.remove("dragover"),this.fileDroppedHandler(t.dataTransfer.files))}},this.renderOnDragOverMessage(),i("slot",null))}};a.style=":host{margin-top:calc(var(--space-unit) * 3);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.dragdrop{position:relative;display:flex;height:228px;flex-direction:column;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}";var r=window.CustomEvent;function s(t,o){var i="on"+o.type.toLowerCase();return"function"==typeof t[i]&&t[i](o),t.dispatchEvent(o)}function d(t){for(;t;){if("dialog"===t.localName)return t;t=t.parentElement?t.parentElement:t.parentNode?t.parentNode.host:null}return null}function l(t){for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;t&&t.blur&&t!==document.body&&t.blur()}function c(t,o){for(var i=0;i<t.length;++i)if(t[i]===o)return!0;return!1}function h(t){return!(!t||!t.hasAttribute("method"))&&"dialog"===t.getAttribute("method").toLowerCase()}function u(t){var o=["button","input","keygen","select","textarea"].map((function(t){return t+":not([disabled])"}));o.push('[tabindex]:not([disabled]):not([tabindex=""])');var i=t.querySelector(o.join(", "));if(!i&&"attachShadow"in Element.prototype)for(var e=t.querySelectorAll("*"),n=0;n<e.length&&!(e[n].tagName&&e[n].shadowRoot&&(i=u(e[n].shadowRoot)));n++);return i}function m(t){return t.isConnected||document.body.contains(t)}function f(t){if(t.submitter)return t.submitter;var o=t.target;if(!(o instanceof HTMLFormElement))return null;var i=p.formSubmitter;if(!i){var e=t.target;i=("getRootNode"in e&&e.getRootNode()||document).activeElement}return i&&i.form===o?i:null}function v(t){if(!t.defaultPrevented){var o=t.target,i=p.imagemapUseValue,e=f(t);null===i&&e&&(i=e.value);var n=d(o);n&&"dialog"===(e&&e.getAttribute("formmethod")||o.getAttribute("method"))&&(t.preventDefault(),null!=i?n.close(i):n.close())}}function g(t){if(this.dialog_=t,this.replacedStyleTop_=!1,this.openAsModal_=!1,t.hasAttribute("role")||t.setAttribute("role","dialog"),t.show=this.show.bind(this),t.showModal=this.showModal.bind(this),t.close=this.close.bind(this),t.addEventListener("submit",v,!1),"returnValue"in t||(t.returnValue=""),"MutationObserver"in window)new MutationObserver(this.maybeHideModal.bind(this)).observe(t,{attributes:!0,attributeFilter:["open"]});else{var o,i=!1,e=function(){i?this.downgradeModal():this.maybeHideModal(),i=!1}.bind(this),n=function(n){if(n.target===t){var a="DOMNodeRemoved";i|=n.type.substr(0,a.length)===a,window.clearTimeout(o),o=window.setTimeout(e,0)}};["DOMAttrModified","DOMNodeRemoved","DOMNodeRemovedFromDocument"].forEach((function(o){t.addEventListener(o,n)}))}Object.defineProperty(t,"open",{set:this.setOpen.bind(this),get:t.hasAttribute.bind(t,"open")}),this.backdrop_=document.createElement("div"),this.backdrop_.className="backdrop",this.backdrop_.addEventListener("mouseup",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("mousedown",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("click",this.backdropMouseEvent_.bind(this))}r&&"object"!=typeof r||((r=function(t,o){o=o||{};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,!!o.bubbles,!!o.cancelable,o.detail||null),i}).prototype=window.Event.prototype),g.prototype={get dialog(){return this.dialog_},maybeHideModal:function(){this.dialog_.hasAttribute("open")&&m(this.dialog_)||this.downgradeModal()},downgradeModal:function(){this.openAsModal_&&(this.openAsModal_=!1,this.dialog_.style.zIndex="",this.replacedStyleTop_&&(this.dialog_.style.top="",this.replacedStyleTop_=!1),this.backdrop_.parentNode&&this.backdrop_.parentNode.removeChild(this.backdrop_),p.dm.removeDialog(this))},setOpen:function(t){t?this.dialog_.hasAttribute("open")||this.dialog_.setAttribute("open",""):(this.dialog_.removeAttribute("open"),this.maybeHideModal())},backdropMouseEvent_:function(t){if(this.dialog_.hasAttribute("tabindex"))this.dialog_.focus();else{var o=document.createElement("div");this.dialog_.insertBefore(o,this.dialog_.firstChild),o.tabIndex=-1,o.focus(),this.dialog_.removeChild(o)}var i=document.createEvent("MouseEvents");i.initMouseEvent(t.type,t.bubbles,t.cancelable,window,t.detail,t.screenX,t.screenY,t.clientX,t.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget),this.dialog_.dispatchEvent(i),t.stopPropagation()},focus_:function(){var t=this.dialog_.querySelector("[autofocus]:not([disabled])");!t&&this.dialog_.tabIndex>=0&&(t=this.dialog_),t||(t=u(this.dialog_)),l(document.activeElement),t&&t.focus()},updateZIndex:function(t,o){if(t<o)throw new Error("dialogZ should never be < backdropZ");this.dialog_.style.zIndex=t,this.backdrop_.style.zIndex=o},show:function(){this.dialog_.open||(this.setOpen(!0),this.focus_())},showModal:function(){if(this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");if(!m(this.dialog_))throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");if(!p.dm.pushDialog(this))throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");(function(t){for(;t&&t!==document.body;){var o=window.getComputedStyle(t),i=function(t,i){return!(void 0===o[t]||o[t]===i)};if(o.opacity<1||i("zIndex","auto")||i("transform","none")||i("mixBlendMode","normal")||i("filter","none")||i("perspective","none")||"isolate"===o.isolation||"fixed"===o.position||"touch"===o.webkitOverflowScrolling)return!0;t=t.parentElement}return!1})(this.dialog_.parentElement)&&console.warn("A dialog is being shown inside a stacking context. This may cause it to be unusable. For more information, see this link: https://github.com/GoogleChrome/dialog-polyfill/#stacking-context"),this.setOpen(!0),this.openAsModal_=!0,p.needsCentering(this.dialog_)?(p.reposition(this.dialog_),this.replacedStyleTop_=!0):this.replacedStyleTop_=!1,this.dialog_.parentNode.insertBefore(this.backdrop_,this.dialog_.nextSibling),this.focus_()},close:function(t){if(!this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");this.setOpen(!1),void 0!==t&&(this.dialog_.returnValue=t);var o=new r("close",{bubbles:!1,cancelable:!1});s(this.dialog_,o)}};var p={reposition:function(t){var o=document.body.scrollTop||document.documentElement.scrollTop,i=o+(window.innerHeight-t.offsetHeight)/2;t.style.top=Math.max(o,i)+"px"},isInlinePositionSetByStylesheet:function(t){for(var o=0;o<document.styleSheets.length;++o){var i=document.styleSheets[o],e=null;try{e=i.cssRules}catch(t){}if(e)for(var n=0;n<e.length;++n){var a=e[n],r=null;try{r=document.querySelectorAll(a.selectorText)}catch(t){}if(r&&c(r,t)){var s=a.style.getPropertyValue("top"),d=a.style.getPropertyValue("bottom");if(s&&"auto"!==s||d&&"auto"!==d)return!0}}}return!1},needsCentering:function(t){return!("absolute"!==window.getComputedStyle(t).position||"auto"!==t.style.top&&""!==t.style.top||"auto"!==t.style.bottom&&""!==t.style.bottom||p.isInlinePositionSetByStylesheet(t))},forceRegisterDialog:function(t){if((window.HTMLDialogElement||t.showModal)&&console.warn("This browser already supports <dialog>, the polyfill may not work correctly",t),"dialog"!==t.localName)throw new Error("Failed to register dialog: The element is not a dialog.");new g(t)},registerDialog:function(t){t.showModal||p.forceRegisterDialog(t)},DialogManager:function(){this.pendingDialogStack=[];var t=this.checkDOM_.bind(this);this.overlay=document.createElement("div"),this.overlay.className="_dialog_overlay",this.overlay.addEventListener("click",function(o){this.forwardTab_=void 0,o.stopPropagation(),t([])}.bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=100150,this.forwardTab_=void 0,"MutationObserver"in window&&(this.mo_=new MutationObserver((function(o){var i=[];o.forEach((function(t){for(var o,e=0;o=t.removedNodes[e];++e)o instanceof Element&&("dialog"===o.localName&&i.push(o),i=i.concat(o.querySelectorAll("dialog")))})),i.length&&t(i)})))}};if(p.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener("focus",this.handleFocus_,!0),document.addEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.observe(document,{childList:!0,subtree:!0})},p.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,!0),document.removeEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.disconnect()},p.DialogManager.prototype.updateStacking=function(){for(var t,o=this.zIndexHigh_,i=0;t=this.pendingDialogStack[i];++i)t.updateZIndex(--o,--o),0===i&&(this.overlay.style.zIndex=--o);var e=this.pendingDialogStack[0];e?(e.dialog.parentNode||document.body).appendChild(this.overlay):this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)},p.DialogManager.prototype.containedByTopDialog_=function(t){for(;t=d(t);){for(var o,i=0;o=this.pendingDialogStack[i];++i)if(o.dialog===t)return 0===i;t=t.parentElement}return!1},p.DialogManager.prototype.handleFocus_=function(t){var o=t.composedPath?t.composedPath()[0]:t.target;if(!this.containedByTopDialog_(o)&&document.activeElement!==document.documentElement&&(t.preventDefault(),t.stopPropagation(),l(o),void 0!==this.forwardTab_)){var i=this.pendingDialogStack[0];return i.dialog.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?i.focus_():o!==document.documentElement&&document.documentElement.focus()),!1}},p.DialogManager.prototype.handleKey_=function(t){if(this.forwardTab_=void 0,27===t.keyCode){t.preventDefault(),t.stopPropagation();var o=new r("cancel",{bubbles:!1,cancelable:!0}),i=this.pendingDialogStack[0];i&&s(i.dialog,o)&&i.dialog.close()}else 9===t.keyCode&&(this.forwardTab_=!t.shiftKey)},p.DialogManager.prototype.checkDOM_=function(t){this.pendingDialogStack.slice().forEach((function(o){-1!==t.indexOf(o.dialog)?o.downgradeModal():o.maybeHideModal()}))},p.DialogManager.prototype.pushDialog=function(t){return!(this.pendingDialogStack.length>=(this.zIndexHigh_-this.zIndexLow_)/2-1||(1===this.pendingDialogStack.unshift(t)&&this.blockDocument(),this.updateStacking(),0))},p.DialogManager.prototype.removeDialog=function(t){var o=this.pendingDialogStack.indexOf(t);-1!==o&&(this.pendingDialogStack.splice(o,1),0===this.pendingDialogStack.length&&this.unblockDocument(),this.updateStacking())},p.dm=new p.DialogManager,p.formSubmitter=null,p.imagemapUseValue=null,void 0===window.HTMLDialogElement){var b=document.createElement("form");if(b.setAttribute("method","dialog"),"dialog"!==b.method){var w=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method");if(w){var y=w.get;w.get=function(){return h(this)?"dialog":y.call(this)};var x=w.set;w.set=function(t){return"string"==typeof t&&"dialog"===t.toLowerCase()?this.setAttribute("method",t):x.call(this,t)},Object.defineProperty(HTMLFormElement.prototype,"method",w)}}document.addEventListener("click",(function(t){if(p.formSubmitter=null,p.imagemapUseValue=null,!t.defaultPrevented){var o=t.target;if("composedPath"in t&&(o=t.composedPath().shift()||o),o&&h(o.form)){if(!("submit"===o.type&&["button","input"].indexOf(o.localName)>-1)){if("input"!==o.localName||"image"!==o.type)return;p.imagemapUseValue=t.offsetX+","+t.offsetY}d(o)&&(p.formSubmitter=o)}}}),!1),document.addEventListener("submit",(function(t){var o=t.target;if(!d(o)){var i=f(t);"dialog"===(i&&i.getAttribute("formmethod")||o.getAttribute("method"))&&t.preventDefault()}}));var k=HTMLFormElement.prototype.submit;HTMLFormElement.prototype.submit=function(){if(!h(this))return k.call(this);var t=d(this);t&&t.close()}}const M=':is(button, input, select, textarea, [contenteditable=""], [contenteditable="true"], a[href], [tabindex], summary):not([disabled], [disabled=""], [tabindex="-1"], [aria-hidden="true"], [hidden])',z=class{constructor(i){t(this,i),this.modalClose=o(this,"modalClose",7),this.modalHeaderActive=o(this,"modalHeaderActive",7),this.modalBackgroundClick=o(this,"modalBackgroundClick",7),this.closeButtonLabel="chiudi modale",this.alertdialog=!1,this.closable=!0}emitModalClose(){this.closable&&this.modalClose.emit({modalid:this.modalid})}emitModalHeaderActive(){this.modalHeaderActive.emit({modalid:this.modalid})}emitBackgroundClick(){this.closable&&this.modalBackgroundClick.emit({modalid:this.modalid})}componentDidLoad(){"function"!=typeof HTMLDialogElement?(p.registerDialog(this.dialog),this.dialog.setAttribute("open","true")):this.open()}async open(){var t;null===(t=this.dialog)||void 0===t||t.showModal()}async close(){var t;this.closable&&(null===(t=this.dialog)||void 0===t||t.close())}get focusableElements(){return[...Array.from(this.host.shadowRoot.querySelectorAll(M)),...Array.from(this.host.querySelectorAll(M))].filter((t=>"none"!==getComputedStyle(t).display))}handleKeyDown(t){if(t.code!==n.TAB)return;const o=this.focusableElements,i=this.host.shadowRoot.activeElement,e=this.host.ownerDocument.activeElement,a=o[0],r=o[o.length-1];!t.shiftKey||i!=a&&e!=a?t.shiftKey||i!=r&&e!=r||(t.preventDefault(),a.focus()):(t.preventDefault(),r.focus())}closeButtonSlot(){if(this.closable)return i("slot",{name:"modalCloseButton"},i("button",{"aria-label":this.closeButtonLabel,onClick:()=>this.close()},i("z-icon",{name:"multiply-circle-filled"})))}handleEscape(t){this.closable||t.preventDefault()}render(){return i("dialog",{"aria-labelledby":"modal-title","aria-describedby":"modal-content",role:this.alertdialog?"alertdialog":void 0,ref:t=>this.dialog=t,onClose:()=>this.emitModalClose(),onCancel:t=>this.handleEscape(t)},i("div",{class:"modal-container",id:this.modalid},i("header",{onClick:this.emitModalHeaderActive.bind(this)},i("div",null,this.modaltitle&&i("h1",{id:"modal-title"},this.modaltitle),this.modalsubtitle&&i("h2",{id:"modal-subtitle"},this.modalsubtitle)),this.closeButtonSlot()),i("div",{class:"modal-content",id:"modal-content"},i("slot",{name:"modalContent"}))),i("div",{class:"modal-background","data-action":"modalBackground","data-modal":this.modalid,onClick:()=>{this.emitBackgroundClick(),this.close()}}))}get host(){return e(this)}};z.style=":host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>dialog{padding:0;border:none;margin:0}:host>dialog:modal{width:100%;max-width:100%;max-height:100%}:host>dialog::backdrop{display:none}:host>dialog+.backdrop{display:none}:host>dialog:not([open]){display:none}:host>dialog[open]{display:block}.modal-container{z-index:1010;display:flex;overflow:-moz-scrollbars-none;overflow:hidden;width:100%;height:100vh;flex-direction:column}.modal-container>header{display:flex;flex-flow:row nowrap;align-items:flex-start;justify-content:flex-start;padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 2);background:var(--color-surface02)}.modal-container>header button{padding:0;border:none;margin:0;margin-left:auto;background:transparent;cursor:pointer}.modal-container>header z-icon{--z-icon-width:calc(var(--space-unit) * 2.5);--z-icon-height:calc(var(--space-unit) * 2.5);display:flex;fill:var(--color-icon01)}.modal-container>header>div{display:flex;width:100%;flex-direction:column;margin-right:calc(var(--space-unit) * 2)}.modal-container>header h1,.modal-container>header h2{padding:0;margin:0;color:var(--color-text01);font-weight:var(--font-rg)}.modal-container>header h1{font-size:var(--font-size-5);letter-spacing:0;line-height:1.4}.modal-container>header h2{font-size:var(--font-size-3);letter-spacing:0;line-height:1.5}.modal-container>header>div *:empty{display:none}.modal-container>header h1+h2{margin-top:calc(var(--space-unit) * 0.5)}.modal-container>.modal-content{overflow:auto;flex:1 auto;background:var(--color-surface01);overflow-x:hidden}.modal-container .modal-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)}.modal-container .modal-content::-webkit-scrollbar-track{background-color:transparent}.modal-container .modal-content::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.modal-container .modal-content::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.modal-container .modal-content{scrollbar-color:var(--color-primary01) transparent}@media only screen and (min-width: 768px){.modal-background{position:fixed;top:0;left:0;width:100%;height:100%;background-color:var(--gray900);opacity:0.7}.modal-container{position:fixed;top:calc(var(--space-unit) * 6);left:50%;width:auto;min-width:calc(var(--space-unit) * 40);height:auto;min-height:calc(var(--space-unit) * 40);max-height:calc(100vh - calc(var(--space-unit) * 6 * 2));border-radius:var(--border-radius);transform:translateX(-50%)}.modal-container>header z-icon{--z-icon-width:calc(var(--space-unit) * 3);--z-icon-height:calc(var(--space-unit) * 3)}}@media only screen and (min-width: 768px) and (max-width: 1151px){.modal-container>header{padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 3)}}@media only screen and (min-width: 1152px){.modal-container>header{padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 4)}.modal-container>header h1{font-size:var(--font-size-6);letter-spacing:0;line-height:1.33}.modal-container>header h2{font-size:var(--font-size-4);letter-spacing:0;line-height:1.5}.modal-container>header h1+h2{margin-top:0}}";export{a as z_dragdrop_area,z as z_modal}
@@ -1 +1 @@
1
- import{f as a,p as t}from"./p-e1ac5c4e.js";import{t as e,m as n}from"./p-d69e14fb.js";function s(a){switch(a){case!0:case"true":case 1:case"1":case"on":case"yes":return!0;case!1:case"false":case 0:case"0":case"off":case"no":return!1;default:return a}}function r(){return Math.random().toString(36).replace("0.","")}function c(t,e,...n){t.code!==a.ENTER&&t.code!==a.SPACE||(t.preventDefault(),e(...n))}function u(t,e,...n){t.code===a.ENTER&&(t.preventDefault(),e(...n))}function o(a=null){return a||(a=document.activeElement),a&&a.shadowRoot&&a.shadowRoot.activeElement?o(a=a.shadowRoot.activeElement):a}function f(a,t=[]){return t.push(a),a.parentElement?f(a=a.parentElement,t):a.parentNode&&a.parentNode.host?f(a=a.parentNode.host,t):t}function i(){switch(!0){case window.innerWidth<=n:return t.MOBILE;case window.innerWidth<=e:return t.TABLET;default:return t.DESKTOP}}function d(a){try{return JSON.parse(a)}catch(a){return!1}}function h(a){const t=Math.ceil(2**31-1)*parseFloat(`0.${a}`);let e=Math.ceil(t%1*19);return 0===e&&(e=1),`avatar-C${e.toString().padStart(2,"0")}`}export{u as a,s as b,h as c,f as d,o as e,d as f,i as g,c as h,r}
1
+ import{f as a,p as t}from"./p-e1ac5c4e.js";import{t as e,m as n}from"./p-d69e14fb.js";function s(a){switch(a){case!0:case"true":case 1:case"1":case"on":case"yes":return!0;case!1:case"false":case 0:case"0":case"off":case"no":return!1;default:return a}}function r(){return Math.random().toString(36).replace("0.","")}function c(t,e,...n){t.code!==a.ENTER&&t.code!==a.SPACE||(t.preventDefault(),e(...n))}function u(t,e,...n){t.code===a.ENTER&&(t.preventDefault(),e(...n))}function o(a=null){return a||(a=document.activeElement),a&&a.shadowRoot&&a.shadowRoot.activeElement?o(a=a.shadowRoot.activeElement):a}function f(a,t=[]){return t.push(a),a.parentElement?f(a=a.parentElement,t):a.parentNode&&a.parentNode.host?f(a=a.parentNode.host,t):t}function i(){switch(!0){case window.innerWidth<=n:return t.MOBILE;case window.innerWidth<=e:return t.TABLET;default:return t.DESKTOP}}function d(a){try{return JSON.parse(a)}catch(a){return!1}}function h(a){const t=Math.ceil(2**31-1)*parseFloat(`0.${a}`);let e=Math.ceil(t%1*19);return 0===e&&(e=1),`avatar-C${e.toString().padStart(2,"0")}`}export{c as a,s as b,h as c,f as d,o as e,d as f,i as g,u as h,r}
@@ -1 +1 @@
1
- import{r as t,h as i,H as n,g as o}from"./p-d17ebc2f.js";import{d as s,h as c}from"./p-dfc69cc3.js";import{T as e}from"./p-e1ac5c4e.js";import"./p-d69e14fb.js";const l=class{constructor(i){t(this,i),this.links=[],this.visible=!1,this.visibleLink=""}handleFocusOutSkipToContent(t){this.isInSkipToContent(t.target)&&(this.visible=!1)}handleFocusSkipToContent(t){this.isInSkipToContent(t.target)&&(this.visible=!0)}componentDidLoad(){this.showFirstChild()}componentWillRender(){this.links&&(this.links="string"==typeof this.links?JSON.parse(this.links):this.links)}isInSkipToContent(t){return!!s(t).find((t=>"z-skip-to-content"===t.nodeName.toLowerCase()))}showFirstChild(){var t;const i=null===(t=this.hostElement.children)||void 0===t?void 0:t[0];i&&(this.visibleLink=i.id)}handleLinkClick(){this.visible=!1}render(){return i(n,{class:{[this.variant]:!0,"skip-to-content-visible":this.visible}},this.links.map(((t,n)=>{const o=`skip-to-content-${n}`;return i("z-link",{id:o,underline:!0,"aria-label":t.ariaLabel||t.label,class:"body-1-sb "+(o==this.visibleLink?"link-visible":"link-invisible"),href:t.href,textcolor:this.variant===e.DARK?"white":"black",onFocus:()=>this.visibleLink=o,onClick:()=>this.handleLinkClick(),onKeyUp:t=>c(t,this.handleLinkClick.bind(this))},t.label)})))}get hostElement(){return o(this)}};l.style=".sc-z-skip-to-content-h{position:absolute;left:-100%;height:60px;box-sizing:border-box;padding:calc(var(--space-unit) * 1.25) calc(var(--space-unit) * 3);background-color:#24f4ff;font-family:var(--font-family-sans);font-weight:var(--font-rg)}.skip-to-content-visible.sc-z-skip-to-content-h,.sc-z-skip-to-content-h:focus{position:static;display:block}.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content{display:block;text-align:center}.sc-z-skip-to-content-h>z-link.link-invisible.sc-z-skip-to-content{overflow:hidden;width:0;height:0}.sc-z-skip-to-content-h>z-link.link-visible.sc-z-skip-to-content{width:initial;height:initial}.dark.sc-z-skip-to-content-h{background-color:var(--bg-grey-800);color:var(--color-white)}.light.sc-z-skip-to-content-h{border:2px solid var(--text-grey-800);background-color:var(--bg-white);color:var(--text-grey-800)}@media (min-width: 768px){.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content{text-align:left}}@media (min-width: 1152px){.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content{display:inline-block;padding:0 calc(var(--space-unit) * 3);border-right:1px solid var(--bg-grey-800)}.sc-z-skip-to-content-h>z-link.link-invisible.sc-z-skip-to-content{overflow:initial;width:initial;height:initial}.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content:first-child{padding-left:0}.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content:last-child,.dark.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content:last-child,.light.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content:last-child{padding-right:0;border-right:none}.dark.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content{border-right:1px solid var(--bg-white)}}";export{l as z_skip_to_content}
1
+ import{r as t,h as i,H as n,g as o}from"./p-d17ebc2f.js";import{d as s,a as e}from"./p-1c6b0e09.js";import{T as c}from"./p-e1ac5c4e.js";import"./p-d69e14fb.js";const l=class{constructor(i){t(this,i),this.links=[],this.visible=!1,this.visibleLink=""}handleFocusOutSkipToContent(t){this.isInSkipToContent(t.target)&&(this.visible=!1)}handleFocusSkipToContent(t){this.isInSkipToContent(t.target)&&(this.visible=!0)}componentDidLoad(){this.showFirstChild()}componentWillRender(){this.links&&(this.links="string"==typeof this.links?JSON.parse(this.links):this.links)}isInSkipToContent(t){return!!s(t).find((t=>"z-skip-to-content"===t.nodeName.toLowerCase()))}showFirstChild(){var t;const i=null===(t=this.hostElement.children)||void 0===t?void 0:t[0];i&&(this.visibleLink=i.id)}handleLinkClick(){this.visible=!1}render(){return i(n,{class:{[this.variant]:!0,"skip-to-content-visible":this.visible}},this.links.map(((t,n)=>{const o=`skip-to-content-${n}`;return i("z-link",{id:o,underline:!0,"aria-label":t.ariaLabel||t.label,class:"body-1-sb "+(o==this.visibleLink?"link-visible":"link-invisible"),href:t.href,textcolor:this.variant===c.DARK?"white":"black",onFocus:()=>this.visibleLink=o,onClick:()=>this.handleLinkClick(),onKeyUp:t=>e(t,this.handleLinkClick.bind(this))},t.label)})))}get hostElement(){return o(this)}};l.style=".sc-z-skip-to-content-h{position:absolute;left:-100%;height:60px;box-sizing:border-box;padding:calc(var(--space-unit) * 1.25) calc(var(--space-unit) * 3);background-color:#24f4ff;font-family:var(--font-family-sans);font-weight:var(--font-rg)}.skip-to-content-visible.sc-z-skip-to-content-h,.sc-z-skip-to-content-h:focus{position:static;display:block}.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content{display:block;text-align:center}.sc-z-skip-to-content-h>z-link.link-invisible.sc-z-skip-to-content{overflow:hidden;width:0;height:0}.sc-z-skip-to-content-h>z-link.link-visible.sc-z-skip-to-content{width:initial;height:initial}.dark.sc-z-skip-to-content-h{background-color:var(--bg-grey-800);color:var(--color-white)}.light.sc-z-skip-to-content-h{border:2px solid var(--text-grey-800);background-color:var(--bg-white);color:var(--text-grey-800)}@media (min-width: 768px){.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content{text-align:left}}@media (min-width: 1152px){.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content{display:inline-block;padding:0 calc(var(--space-unit) * 3);border-right:1px solid var(--bg-grey-800)}.sc-z-skip-to-content-h>z-link.link-invisible.sc-z-skip-to-content{overflow:initial;width:initial;height:initial}.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content:first-child{padding-left:0}.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content:last-child,.dark.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content:last-child,.light.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content:last-child{padding-right:0;border-right:none}.dark.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content{border-right:1px solid var(--bg-white)}}";export{l as z_skip_to_content}
@@ -1 +1 @@
1
- import{r as i,c,h,g as s}from"./p-d17ebc2f.js";import{x as r,p as a}from"./p-e1ac5c4e.js";import{g as t}from"./p-dfc69cc3.js";import"./p-d69e14fb.js";const e=class{constructor(h){i(this,h),this.interactiveIconClick=c(this,"interactiveIconClick",7),this.type=r.DEFAULT,this.disabled=!1,this.ariaLabel=""}emitinteractiveIconClick(){this.interactiveIconClick.emit()}getIconSize(){return t()!==a.DESKTOP?22:14}render(){return this.interactiveIcon?h("div",{class:`z-chip-container ${this.type}`,"aria-disabled":this.disabled},this.icon&&h("z-icon",{class:"icon-sx",name:this.icon,width:this.getIconSize(),height:this.getIconSize()}),h("slot",null),h("button",{type:"button",onClick:()=>this.emitinteractiveIconClick(),onKeyUp:()=>{},"aria-label":this.ariaLabel,disabled:this.disabled},h("z-icon",{name:this.interactiveIcon,width:this.getIconSize(),height:this.getIconSize()}))):h("div",{class:`${this.type}`},this.icon&&h("z-icon",{name:this.icon,width:this.getIconSize(),height:this.getIconSize()}),h("slot",null))}get el(){return s(this)}};e.style=".sc-z-chip-h>.z-chip-container.sc-z-chip{display:inline-flex;align-items:center;padding:0 calc(var(--space-unit) * 1.5);border:var(--border-size-small) solid var(--gray400);background-color:var(--bg-white);border-radius:14px;color:var(--text-grey-800);fill:var(--text-grey-800);font-family:var(--dashboard-font);font-size:14px;font-weight:var(--font-sb)}.sc-z-chip-h>.z-chip-container.sc-z-chip:not([aria-disabled]) button.sc-z-chip>z-icon.sc-z-chip:last-child:hover{color:var(--color-hover-primary);fill:var(--color-hover-primary)}.sc-z-chip-h>.z-chip-container.sc-z-chip:hover:not([aria-disabled])>z-icon.sc-z-chip:first-child{fill:var(--color-icon02)}.sc-z-chip-h>.z-chip-container.sc-z-chip>button.sc-z-chip{padding:0;border:none;margin-left:var(--space-unit);background-color:transparent;cursor:pointer}.sc-z-chip-h>.z-chip-container.sc-z-chip>z-icon.icon-sx.sc-z-chip{margin-right:calc(var(--space-unit) / 2)}.sc-z-chip-h>.z-chip-container.sc-z-chip>button.sc-z-chip>z-icon.sc-z-chip:last-child{fill:var(--color-primary01)}.sc-z-chip-h>.z-chip-container[aria-disabled].sc-z-chip,.sc-z-chip-h>.z-chip-container[aria-disabled].sc-z-chip>z-icon.sc-z-chip,.sc-z-chip-h>.z-chip-container[aria-disabled].sc-z-chip>button.sc-z-chip>z-icon.sc-z-chip{color:var(--color-disabled03);fill:var(--color-disabled03)}.sc-z-chip-h>.z-chip-container[aria-disabled].sc-z-chip>button.sc-z-chip>z-icon.sc-z-chip{cursor:auto}.sc-z-chip-h>.z-chip-container[aria-disabled].sc-z-chip{border:var(--border-size-small) solid var(--color-disabled01)}.sc-z-chip-h>.z-chip-container.sc-z-chip>button.sc-z-chip:focus:focus-visible{border-radius:100%;box-shadow:var(--shadow-focus-primary);outline:none}.sc-z-chip-h>button.sc-z-chip:hover:not(:disabled):active:hover>button.sc-z-chip>z-icon.sc-z-chip:last-child{color:var(--color-primary01);fill:var(--color-primary01)}.sc-z-chip-h>div.sc-z-chip{display:inline-flex;min-height:28px;align-items:center;padding:0 calc(var(--space-unit) * 1.5);border:var(--border-size-small) solid var(--bg-grey-200);background-color:var(--bg-white);border-radius:14px;color:var(--text-grey-800);fill:var(--text-grey-800);font-family:var(--dashboard-font);font-size:14px;line-height:28px}.sc-z-chip-h>div.sc-z-chip>z-icon.sc-z-chip{margin-right:calc(var(--space-unit) / 2)}.sc-z-chip-h>.z-chip-container.default.sc-z-chip,.sc-z-chip-h>div.default.sc-z-chip{min-height:44px;border-radius:22px;line-height:44px}.sc-z-chip-h>.z-chip-container.medium.sc-z-chip,.sc-z-chip-h>div.medium.sc-z-chip{min-height:40px;border-radius:22px;line-height:40px}.sc-z-chip-h>.z-chip-container.small.sc-z-chip,.sc-z-chip-h>div.small.sc-z-chip{min-height:36px;border-radius:22px;line-height:36px}@media only screen and (min-width: 1152px){.sc-z-chip-h>.z-chip-container.sc-z-chip{font-size:12px}.sc-z-chip-h>div.sc-z-chip{font-size:12px}.sc-z-chip-h>.z-chip-container.default.sc-z-chip,.sc-z-chip-h>div.default.sc-z-chip{min-height:32px;border-radius:16px;line-height:32px}.sc-z-chip-h>.z-chip-container.medium.sc-z-chip,.sc-z-chip-h>div.medium.sc-z-chip{min-height:28px;border-radius:16px;line-height:28px}.sc-z-chip-h>.z-chip-container.small.sc-z-chip,.sc-z-chip-h>div.small.sc-z-chip{min-height:24px;border-radius:16px;line-height:24px}}";export{e as z_chip}
1
+ import{r as i,c,h,g as s}from"./p-d17ebc2f.js";import{x as r,p as a}from"./p-e1ac5c4e.js";import{g as e}from"./p-1c6b0e09.js";import"./p-d69e14fb.js";const t=class{constructor(h){i(this,h),this.interactiveIconClick=c(this,"interactiveIconClick",7),this.type=r.DEFAULT,this.disabled=!1,this.ariaLabel=""}emitinteractiveIconClick(){this.interactiveIconClick.emit()}getIconSize(){return e()!==a.DESKTOP?22:14}render(){return this.interactiveIcon?h("div",{class:`z-chip-container ${this.type}`,"aria-disabled":this.disabled},this.icon&&h("z-icon",{class:"icon-sx",name:this.icon,width:this.getIconSize(),height:this.getIconSize()}),h("slot",null),h("button",{type:"button",onClick:()=>this.emitinteractiveIconClick(),onKeyUp:()=>{},"aria-label":this.ariaLabel,disabled:this.disabled},h("z-icon",{name:this.interactiveIcon,width:this.getIconSize(),height:this.getIconSize()}))):h("div",{class:`${this.type}`},this.icon&&h("z-icon",{name:this.icon,width:this.getIconSize(),height:this.getIconSize()}),h("slot",null))}get el(){return s(this)}};t.style=".sc-z-chip-h>.z-chip-container.sc-z-chip{display:inline-flex;align-items:center;padding:0 calc(var(--space-unit) * 1.5);border:var(--border-size-small) solid var(--gray400);background-color:var(--bg-white);border-radius:14px;color:var(--text-grey-800);fill:var(--text-grey-800);font-family:var(--dashboard-font);font-size:14px;font-weight:var(--font-sb)}.sc-z-chip-h>.z-chip-container.sc-z-chip:not([aria-disabled]) button.sc-z-chip>z-icon.sc-z-chip:last-child:hover{color:var(--color-hover-primary);fill:var(--color-hover-primary)}.sc-z-chip-h>.z-chip-container.sc-z-chip:hover:not([aria-disabled])>z-icon.sc-z-chip:first-child{fill:var(--color-icon02)}.sc-z-chip-h>.z-chip-container.sc-z-chip>button.sc-z-chip{padding:0;border:none;margin-left:var(--space-unit);background-color:transparent;cursor:pointer}.sc-z-chip-h>.z-chip-container.sc-z-chip>z-icon.icon-sx.sc-z-chip{margin-right:calc(var(--space-unit) / 2)}.sc-z-chip-h>.z-chip-container.sc-z-chip>button.sc-z-chip>z-icon.sc-z-chip:last-child{fill:var(--color-primary01)}.sc-z-chip-h>.z-chip-container[aria-disabled].sc-z-chip,.sc-z-chip-h>.z-chip-container[aria-disabled].sc-z-chip>z-icon.sc-z-chip,.sc-z-chip-h>.z-chip-container[aria-disabled].sc-z-chip>button.sc-z-chip>z-icon.sc-z-chip{color:var(--color-disabled03);fill:var(--color-disabled03)}.sc-z-chip-h>.z-chip-container[aria-disabled].sc-z-chip>button.sc-z-chip>z-icon.sc-z-chip{cursor:auto}.sc-z-chip-h>.z-chip-container[aria-disabled].sc-z-chip{border:var(--border-size-small) solid var(--color-disabled01)}.sc-z-chip-h>.z-chip-container.sc-z-chip>button.sc-z-chip:focus:focus-visible{border-radius:100%;box-shadow:var(--shadow-focus-primary);outline:none}.sc-z-chip-h>button.sc-z-chip:hover:not(:disabled):active:hover>button.sc-z-chip>z-icon.sc-z-chip:last-child{color:var(--color-primary01);fill:var(--color-primary01)}.sc-z-chip-h>div.sc-z-chip{display:inline-flex;min-height:28px;align-items:center;padding:0 calc(var(--space-unit) * 1.5);border:var(--border-size-small) solid var(--bg-grey-200);background-color:var(--bg-white);border-radius:14px;color:var(--text-grey-800);fill:var(--text-grey-800);font-family:var(--dashboard-font);font-size:14px;line-height:28px}.sc-z-chip-h>div.sc-z-chip>z-icon.sc-z-chip{margin-right:calc(var(--space-unit) / 2)}.sc-z-chip-h>.z-chip-container.default.sc-z-chip,.sc-z-chip-h>div.default.sc-z-chip{min-height:44px;border-radius:22px;line-height:44px}.sc-z-chip-h>.z-chip-container.medium.sc-z-chip,.sc-z-chip-h>div.medium.sc-z-chip{min-height:40px;border-radius:22px;line-height:40px}.sc-z-chip-h>.z-chip-container.small.sc-z-chip,.sc-z-chip-h>div.small.sc-z-chip{min-height:36px;border-radius:22px;line-height:36px}@media only screen and (min-width: 1152px){.sc-z-chip-h>.z-chip-container.sc-z-chip{font-size:12px}.sc-z-chip-h>div.sc-z-chip{font-size:12px}.sc-z-chip-h>.z-chip-container.default.sc-z-chip,.sc-z-chip-h>div.default.sc-z-chip{min-height:32px;border-radius:16px;line-height:32px}.sc-z-chip-h>.z-chip-container.medium.sc-z-chip,.sc-z-chip-h>div.medium.sc-z-chip{min-height:28px;border-radius:16px;line-height:28px}.sc-z-chip-h>.z-chip-container.small.sc-z-chip,.sc-z-chip-h>div.small.sc-z-chip{min-height:24px;border-radius:16px;line-height:24px}}";export{t as z_chip}
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as e}from"./p-d17ebc2f.js";import{d as s,I as r,K as a,l as o}from"./p-e1ac5c4e.js";import{a as h}from"./p-1c6b0e09.js";import"./p-d69e14fb.js";const d=class{constructor(e){i(this,e),this.comboboxChange=t(this,"comboboxChange",7),this.disabled=!1,this.hassearch=!1,this.noresultslabel="Nessun risultato",this.isopen=!1,this.isfixed=!1,this.closesearchtext="Chiudi",this.hascheckall=!1,this.checkalltext="Seleziona tutti",this.uncheckalltext="Deseleziona tutti",this.maxcheckableitems=0,this.size=s.BIG,this.renderItemsList=[],this.itemsList=[],this.inputType=r.TEXT,this.toggleComboBox=this.toggleComboBox.bind(this),this.closeFilterItems=this.closeFilterItems.bind(this)}watchItems(){this.itemsList="string"==typeof this.items?JSON.parse(this.items):this.items,this.selectedCounter=this.itemsList.filter((i=>i.checked)).length,this.updateRenderItemsList()}watchSearchValue(){this.filterItems(this.searchValue)}inputCheckListener(i){const t=i.detail.id.replace(`combo-checkbox-${this.inputid}-`,"");if("check-all"===t&&(!this.maxcheckableitems||this.maxcheckableitems>=this.itemsList.length))return this.checkAll(i.detail.checked);this.itemsList=this.itemsList.map((e=>(e.id===t&&(e.checked=i.detail.checked),e))),this.updateRenderItemsList(),this.emitComboboxChange()}emitComboboxChange(){this.comboboxChange.emit({id:this.inputid,items:this.itemsList})}componentWillLoad(){this.watchItems()}componentWillRender(){this.selectedCounter=this.itemsList.filter((i=>i.checked)).length}updateRenderItemsList(){this.searchValue?this.filterItems(this.searchValue):this.resetRenderItemsList()}resetRenderItemsList(){const i=[];this.itemsList.forEach((t=>{i.push(Object.assign({},t))})),this.renderItemsList=i}filterItems(i){if(!i)return this.closeFilterItems();this.resetRenderItemsList(),this.renderItemsList=this.renderItemsList.filter((t=>{const e=t.name.toUpperCase().indexOf(i.toUpperCase()),s=e+i.length,r=t.name.substring(0,e)+t.name.substring(e,s).bold()+t.name.substring(s,t.name.length);return t.name=r,e>=0}))}checkAll(i=!0){this.itemsList=this.itemsList.map((t=>Object.assign(Object.assign({},t),{checked:i}))),this.resetRenderItemsList(),this.emitComboboxChange()}closeFilterItems(){this.searchValue="",this.resetRenderItemsList()}toggleComboBox(){this.isopen=!this.isopen}renderHeader(){return e("div",{class:"header",onClick:()=>this.toggleComboBox(),onKeyDown:i=>{i.keyCode===a.SPACE&&i.preventDefault()},onKeyUp:i=>h(i,this.toggleComboBox),role:"button",tabindex:0},e("p",{class:"body-3"},this.label,e("span",null,this.selectedCounter>0&&` (${this.selectedCounter})`)),e("z-icon",{name:"caret-down",class:this.size}))}renderContent(){if(this.isopen)return e("div",{class:"open-combo-data"},this.hassearch&&this.renderSearchInput(),this.hascheckall&&this.renderCheckAll(),this.renderItems())}renderItems(){if(this.isopen)return e("div",{class:this.searchValue&&"search",tabindex:-1},this.renderList(this.renderItemsList),this.searchValue&&this.renderCloseButton())}renderItem(i,t,a){return e("z-myz-list-item",{id:i.id,listitemid:i.id,action:`combo-li-${this.inputid}`,underlined:t!==a-1,class:this.size},e("z-input",{type:r.CHECKBOX,checked:i.checked,htmlid:`combo-checkbox-${this.inputid}-${i.id}`,label:i.name,disabled:!i.checked&&this.maxcheckableitems&&this.maxcheckableitems===this.selectedCounter,size:this.size===s.X_SMALL?s.SMALL:this.size}))}renderList(i){if(i)return!i.length&&this.searchValue?this.renderNoSearchResults():this.hasgroupitems?this.renderGroups(this.itemsList):e("ul",null,i.map(((t,e)=>this.renderItem(t,e,i.length))))}renderGroups(i){const t=i.reduce(((t,e,s)=>{var r;const{category:a}=e,o=this.renderItem(e,s,i.length);return t[a]=null!==(r=t[a])&&void 0!==r?r:[],t[a].push(o),t}),{}),s=Object.entries(t).map((([i,t])=>e("z-list-group",{"divider-type":o.ELEMENT},e("span",{class:"body-3-sb z-list-group-title",slot:"header-title"},i),t.map((i=>i)))));return e("ul",null,s)}renderNoSearchResults(){return e("ul",null,e("z-myz-list-item",{id:"no-results",text:this.noresultslabel,listitemid:"no-results",icon:"multiply-circle",class:this.size}))}renderCloseButton(){return e("div",null,e("a",{onClick:()=>this.closeFilterItems(),onKeyUp:i=>h(i,this.closeFilterItems),role:"button",tabindex:0},this.closesearchtext))}renderSearchInput(){if(this.isopen)return e("z-input",{htmlid:`${this.inputid}_search`,label:this.searchlabel,placeholder:this.searchplaceholder,htmltitle:this.searchtitle,type:this.inputType,value:this.searchValue,message:!1,size:this.size,onInputChange:i=>{if(27===i.detail.keycode)return this.closeFilterItems();this.searchValue=i.detail.value}})}renderCheckAll(){if(this.searchValue)return;const i=this.selectedCounter===this.itemsList.length;return e("div",{class:"check-all-wrapper"},e("z-input",{type:r.CHECKBOX,checked:i,htmlid:`combo-checkbox-${this.inputid}-check-all`,label:i?this.uncheckalltext:this.checkalltext,disabled:this.maxcheckableitems&&this.maxcheckableitems<this.itemsList.length,size:this.size===s.X_SMALL?s.SMALL:this.size}))}render(){return e("div",{"data-action":`combo-${this.inputid}`,class:{open:this.isopen,fixed:this.isfixed,disabled:this.disabled},id:this.inputid},this.renderHeader(),!this.disabled&&this.renderContent())}static get watchers(){return{items:["watchItems"],searchValue:["watchSearchValue"]}}};d.style=':host{display:block}:host>div.fixed{position:relative}:host>div>.header{position:relative;z-index:10;display:flex;min-height:42px;align-items:center;justify-content:space-between;padding:0 calc(var(--space-unit) * 1.5);border:var(--border-size-small) solid var(--bg-grey-700);margin:0;background-color:var(--bg-white);border-radius:var(--border-radius-small);cursor:pointer}:host([size="small"])>div>.header{min-height:34px;font-size:var(--font-size-2)}:host([size="x-small"])>div>.header{min-height:30px;font-size:var(--font-size-2)}:host([size="x-small"])>div>.header p.body-3{padding:calc(var(--space-unit) * 0.5) 0}:host>div>.header:hover{outline:var(--border-size-medium) solid var(--gray700);outline-offset:-2px}:host>div.open>div.header:focus:focus-visible{box-shadow:none}:host>div>div.header:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}:host>div>.header>p.body-3{padding:var(--space-unit) 0;margin:0;color:var(--text-grey-800)}:host>div>.header>p.body-3>span{font-weight:var(--font-sb)}:host>div>.header>z-icon{fill:var(--text-grey-800);transform:rotate(360deg);transition:all 200ms linear}:host>div>.header>z-icon.small,:host>div>.header>z-icon.x-small{--z-icon-width:16px;--z-icon-height:16px}:host>div.open>.header{border:var(--border-size-small) solid var(--blue500);border-radius:var(--border-radius-small) var(--border-radius-small) 0 0}:host>div.disabled{pointer-events:none}:host>div.disabled .header{border-color:var(--color-disabled01);fill:var(--color-disabled01)}:host>div.disabled .header>p.body-3{color:var(--text-grey-700)}:host>div.disabled .header>z-icon:last-child{fill:var(--color-disabled01)}:host>div.open>.header>z-icon{fill:var(--text-grey-800);transform:rotate(180deg);transition:all 200ms linear}:host>div.open>div.open-combo-data{position:relative;z-index:12;padding:var(--space-unit) calc(var(--space-unit) * 2);border:var(--border-size-small) solid var(--gray200);border-top:0;background-color:var(--bg-white);border-radius:0}:host>div.open>div.open-combo-data>div{overflow:auto;max-height:235px;padding:0;scrollbar-color:var(--myz-blue) var(--gray200);scrollbar-width:thin}:host>div.open>div.open-combo-data>z-input{width:100%;margin-bottom:calc(var(--space-unit) * 2)}:host>div.open>div.open-combo-data>div>ul{max-height:235px;padding:0 3px;margin:0}::-webkit-scrollbar{width:10px;background:linear-gradient(90deg, var(--bg-white) 2px, var(--bg-grey-200) 4px, var(--bg-white) 8px);border-radius:var(--border-radius)}::-webkit-scrollbar-thumb{width:10px;background-color:var(--myz-blue);border-radius:var(--border-radius)}:host>div.open>z-input{position:relative;z-index:1;width:238px;margin:0 calc(var(--space-unit) * 2);color:var(--myz-blue)}:host>div.open>div.open-combo-data>div.search{overflow:hidden;max-height:auto;margin-top:0;box-shadow:1px 1px 4px 2px rgb(217 222 227 / 50%)}:host>div.open>div.open-combo-data>div.search>ul{overflow:auto;max-height:180px;padding:var(--space-unit) calc(var(--space-unit) * 2);scrollbar-color:var(--myz-blue) var(--bg-grey-200);scrollbar-width:thin}:host>div.open>div.open-combo-data>div.search>div{display:flex;justify-content:center}:host>div.open>div.open-combo-data>div.search>div>a{display:inline-block;height:44px;color:var(--myz-blue);cursor:pointer;font-family:var(--dashboard-font);font-size:14px;font-weight:var(--font-sb);line-height:44px;text-align:center;text-transform:uppercase}:host>div.open>div.open-combo-data>div.check-all-wrapper{padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5);border-bottom:var(--border-size-small) solid var(--gray800);margin-bottom:var(--space-unit);text-align:left}:host([size="small"])>div.open>div.open-combo-data>div.check-all-wrapper{padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 0.5)}:host([size="x-small"])>div.open>div.open-combo-data>div.check-all-wrapper{padding:var(--space-unit) calc(var(--space-unit) * 0.5)}';export{d as z_combobox}
@@ -1 +1 @@
1
- import{r as e,c as t,h as s,g as i}from"./p-d17ebc2f.js";import{d as l,f as r,l as c,h as a}from"./p-e1ac5c4e.js";import{r as n,b as h,d as o,h as p,e as d}from"./p-dfc69cc3.js";import"./p-d69e14fb.js";const u=class{constructor(s){e(this,s),this.optionSelect=t(this,"optionSelect",7),this.resetSelect=t(this,"resetSelect",7),this.htmlid=`id-${n()}`,this.ariaLabel="",this.disabled=!1,this.readonly=!1,this.message=!0,this.autocomplete=!1,this.noresultslabel="Nessun risultato",this.isfixed=!1,this.size=l.BIG,this.isOpen=!1,this.selectedItem=null,this.itemsList=[],this.toggleSelectUl=this.toggleSelectUl.bind(this),this.selectItem=this.selectItem.bind(this),this.handleSelectFocus=this.handleSelectFocus.bind(this)}watchItems(){this.itemsList=this.getInitialItemsArray(),this.selectedItem=this.itemsList.find((e=>e.selected))}async getSelectedItem(){return this.selectedItem}async getValue(){return this.getSelectedValue()}async setValue(e){let t=[];"string"==typeof e?t.push(e):t=e,this.selectedItem=this.itemsList.find((e=>t.includes(e.id)))}emitOptionSelect(){this.optionSelect.emit({id:this.htmlid,selected:this.getSelectedValue()})}emitResetSelect(){this.resetSelect.emit({id:this.htmlid})}componentWillLoad(){this.watchItems()}componentWillRender(){this.filterItems(this.searchString)}getInitialItemsArray(){return"string"==typeof this.items?JSON.parse(this.items):this.items}mapSelectedItemToItemsArray(){return this.getInitialItemsArray().map((e=>{var t;return e.selected=e.id===(null===(t=this.selectedItem)||void 0===t?void 0:t.id),e}))}getSelectedValue(){var e;return null===(e=this.selectedItem)||void 0===e?void 0:e.id}filterItems(e){const t=this.mapSelectedItemToItemsArray();this.itemsList=(null==e?void 0:e.length)?t.filter((t=>t.name.toUpperCase().includes(e.toUpperCase()))).map((t=>{const s=t.name.toUpperCase().indexOf(e.toUpperCase()),i=s+e.length,l=t.name.substring(0,s)+`<strong>${t.name.substring(s,i)}</strong>`+t.name.substring(i,t.name.length);return t.name=l,t})):t}hasAutocomplete(){return!0===h(this.autocomplete)}handleInputChange(e){this.searchString=e.detail.value,this.isOpen||this.toggleSelectUl()}selectItem(e,t){e&&e.disabled||(this.itemsList=this.mapSelectedItemToItemsArray(),this.itemsList=this.itemsList.map((s=>(s.selected=!1,s.id===(null==e?void 0:e.id)&&(s.selected=t),s))),this.selectedItem=this.itemsList.find((e=>e.selected)),this.emitOptionSelect(),this.searchString&&(this.searchString=null))}arrowsSelectNav(e,t){const s=this.resetItem&&!!this.selectedItem;if(![r.ARROW_DOWN,r.ARROW_UP].includes(e.key))return;let i;e.preventDefault(),e.stopPropagation(),this.isOpen||this.toggleSelectUl(),this.resetItem&&(e.key===r.ARROW_DOWN?i=t+1===this.itemsList.length+1?+!s:t+1:e.key===r.ARROW_UP&&(i=t<=+!s?this.itemsList.length:t-1)),this.resetItem||(e.key===r.ARROW_DOWN?i=t+1===this.itemsList.length?0:t+1:e.key===r.ARROW_UP&&(i=t<=0?this.itemsList.length-1:t-1)),this.focusSelectItem(i)}focusSelectItem(e){const t=this.element.querySelector(`#${this.htmlid}_${e}`);t&&t.focus()}toggleSelectUl(e=!1){this.disabled||this.readonly||(this.isOpen?(document.removeEventListener("click",this.handleSelectFocus),document.removeEventListener("keyup",this.handleSelectFocus),e&&this.element.querySelector(`#${this.htmlid}_input`).focus()):(document.addEventListener("click",this.handleSelectFocus),document.addEventListener("keyup",this.handleSelectFocus)),this.isOpen=!this.isOpen)}handleInputClick(e){e.composedPath().find((e=>e.classList&&e.classList.contains("reset-icon")))?e.stopPropagation():this.toggleSelectUl()}handleSelectFocus(e){if(e instanceof KeyboardEvent&&e.key===r.ESC)return e.stopPropagation(),this.toggleSelectUl(!0);e instanceof KeyboardEvent&&e.key!==r.TAB&&e.key!==r.ENTER||o(d()).find((e=>"z-input"===e.nodeName.toLowerCase()&&e.id===`${this.htmlid}_input`))||this.toggleSelectUl(e instanceof MouseEvent)}scrollToLetter(e){const t=this.itemsList.find((t=>t.name.charAt(0)===e));t&&this.focusSelectItem(this.itemsList.indexOf(t))}renderInput(){return s("z-input",{class:{"active-select":this.isOpen,"cursor-select":!this.autocomplete},id:`${this.htmlid}_input`,htmlid:`${this.htmlid}_input`,placeholder:this.placeholder,value:!this.isOpen&&this.selectedItem?this.selectedItem.name.replace(/<[^>]+>/g,""):null,label:this.label,"aria-label":this.ariaLabel,icon:this.isOpen?"caret-up":"caret-down",hasclearicon:this.hasAutocomplete(),message:!1,disabled:this.disabled,readonly:this.readonly||!this.hasAutocomplete()&&this.isOpen,status:this.isOpen?void 0:this.status,autocomplete:"off",size:this.size,onClick:e=>{this.handleInputClick(e)},onKeyUp:e=>{13!==e.keyCode&&e.preventDefault(),p(e,this.toggleSelectUl)},onKeyDown:e=>this.arrowsSelectNav(e,this.selectedItem?this.itemsList.indexOf(this.selectedItem):this.resetItem?0:-1),onInputChange:e=>{this.handleInputChange(e)},onKeyPress:e=>{this.hasAutocomplete()||(e.preventDefault(),this.scrollToLetter(String.fromCharCode(e.keyCode)))}})}renderSelectUl(){var e;return s("div",{class:this.isOpen?"open":"closed",tabindex:"-1"},s("div",{class:{"ul-scroll-wrapper":!0,fixed:this.isfixed},tabindex:"-1"},s("z-list",{role:"listbox",tabindex:this.disabled||this.readonly||!this.isOpen?-1:0,id:this.htmlid,"aria-activedescendant":null===(e=this.selectedItem)||void 0===e?void 0:e.id,"aria-multiselectable":!1,size:this.listSizeType(),class:{disabled:this.disabled,readonly:this.readonly,filled:!!this.selectedItem,[`input-${this.status}`]:!this.isOpen&&!!this.status}},this.resetItem&&this.renderResetItem(),this.renderSelectUlItems())))}renderResetItem(){return s("z-list-element",{class:{hide:!this.selectedItem||!this.resetItem,"reset-item":!0,"reset-item-margin":!this.hasGroupItems},clickable:!0,disabled:!1,dividerType:c.ELEMENT,role:"option",tabindex:"0","aria-selected":"false",id:`${this.htmlid}_${this.resetItem?"0":"none"}`,size:this.listSizeType(),onClickItem:()=>{this.selectedItem=null,this.searchString=null,this.emitResetSelect()},onKeyDown:e=>this.arrowsSelectNav(e,0)},s("div",{class:"reset-item-content"},s("z-icon",{name:"multiply-circled"}),s("span",null,this.resetItem)))}renderItem(e,t,i){return s("z-list-element",{clickable:!e.disabled,disabled:e.disabled,dividerType:i?c.HEADER:c.ELEMENT,role:"option",tabindex:e.disabled||!this.isOpen?-1:0,"aria-selected":!!e.selected,id:`${this.htmlid}_${t}`,size:this.listSizeType(),onClickItem:()=>this.selectItem(e,!0),onKeyDown:e=>this.arrowsSelectNav(e,t)},s("span",{class:{selected:!!e.selected,"list-element-content":!0},innerHTML:e.name}))}listSizeType(){return this.size===l.SMALL||this.size===l.X_SMALL?a.SMALL:a.MEDIUM}renderSelectUlItems(){return this.itemsList.length?this.hasGroupItems?this.renderSelectGroupItems():this.itemsList.map(((e,t,s)=>this.renderItem(e,this.resetItem?t+1:t,s.length===t+1))):this.renderNoSearchResults()}renderSelectGroupItems(){const e=this.itemsList.reduce(((e,t,s,i)=>{var l;const{category:r}=t,c=this.renderItem(t,this.resetItem?s+1:s,i.length===s+1);return e[r]=null!==(l=e[r])&&void 0!==l?l:[],e[r].push(c),e}),{});return Object.entries(e).map((([e,t])=>s("z-list-group",{"divider-type":c.ELEMENT},s("span",{class:"body-3-sb z-list-group-title",slot:"header-title"},e),t.map((e=>e)))))}renderNoSearchResults(){return s("z-list-element",{color:"blue500",class:"no-results",size:this.listSizeType()},s("z-icon",{name:"multiply-circle",fill:"blue500"}),this.noresultslabel)}renderMessage(){if(!1!==h(this.message))return s("z-input-message",{message:!0===h(this.message)?void 0:this.message,status:this.status,class:this.size})}render(){return s("div",{class:"select-wrapper"},this.renderInput(),this.renderSelectUl(),this.renderMessage())}get element(){return i(this)}static get watchers(){return{items:["watchItems"]}}};u.style='.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}';export{u as z_select}
1
+ import{r as e,c as t,h as s,g as i}from"./p-d17ebc2f.js";import{d as l,f as r,l as c,h as a}from"./p-e1ac5c4e.js";import{r as n,b as o,d as h,a as p,e as d}from"./p-1c6b0e09.js";import"./p-d69e14fb.js";const u=class{constructor(s){e(this,s),this.optionSelect=t(this,"optionSelect",7),this.resetSelect=t(this,"resetSelect",7),this.htmlid=`id-${n()}`,this.ariaLabel="",this.disabled=!1,this.readonly=!1,this.message=!0,this.autocomplete=!1,this.noresultslabel="Nessun risultato",this.isfixed=!1,this.size=l.BIG,this.isOpen=!1,this.selectedItem=null,this.itemsList=[],this.toggleSelectUl=this.toggleSelectUl.bind(this),this.selectItem=this.selectItem.bind(this),this.handleSelectFocus=this.handleSelectFocus.bind(this)}watchItems(){this.itemsList=this.getInitialItemsArray(),this.selectedItem=this.itemsList.find((e=>e.selected))}async getSelectedItem(){return this.selectedItem}async getValue(){return this.getSelectedValue()}async setValue(e){let t=[];"string"==typeof e?t.push(e):t=e,this.selectedItem=this.itemsList.find((e=>t.includes(e.id)))}emitOptionSelect(){this.optionSelect.emit({id:this.htmlid,selected:this.getSelectedValue()})}emitResetSelect(){this.resetSelect.emit({id:this.htmlid})}componentWillLoad(){this.watchItems()}componentWillRender(){this.filterItems(this.searchString)}getInitialItemsArray(){return"string"==typeof this.items?JSON.parse(this.items):this.items}mapSelectedItemToItemsArray(){return this.getInitialItemsArray().map((e=>{var t;return e.selected=e.id===(null===(t=this.selectedItem)||void 0===t?void 0:t.id),e}))}getSelectedValue(){var e;return null===(e=this.selectedItem)||void 0===e?void 0:e.id}filterItems(e){const t=this.mapSelectedItemToItemsArray();this.itemsList=(null==e?void 0:e.length)?t.filter((t=>t.name.toUpperCase().includes(e.toUpperCase()))).map((t=>{const s=t.name.toUpperCase().indexOf(e.toUpperCase()),i=s+e.length,l=t.name.substring(0,s)+`<strong>${t.name.substring(s,i)}</strong>`+t.name.substring(i,t.name.length);return t.name=l,t})):t}hasAutocomplete(){return!0===o(this.autocomplete)}handleInputChange(e){this.searchString=e.detail.value,this.isOpen||this.toggleSelectUl()}selectItem(e,t){e&&e.disabled||(this.itemsList=this.mapSelectedItemToItemsArray(),this.itemsList=this.itemsList.map((s=>(s.selected=!1,s.id===(null==e?void 0:e.id)&&(s.selected=t),s))),this.selectedItem=this.itemsList.find((e=>e.selected)),this.emitOptionSelect(),this.searchString&&(this.searchString=null))}arrowsSelectNav(e,t){const s=this.resetItem&&!!this.selectedItem;if(![r.ARROW_DOWN,r.ARROW_UP].includes(e.key))return;let i;e.preventDefault(),e.stopPropagation(),this.isOpen||this.toggleSelectUl(),this.resetItem&&(e.key===r.ARROW_DOWN?i=t+1===this.itemsList.length+1?+!s:t+1:e.key===r.ARROW_UP&&(i=t<=+!s?this.itemsList.length:t-1)),this.resetItem||(e.key===r.ARROW_DOWN?i=t+1===this.itemsList.length?0:t+1:e.key===r.ARROW_UP&&(i=t<=0?this.itemsList.length-1:t-1)),this.focusSelectItem(i)}focusSelectItem(e){const t=this.element.querySelector(`#${this.htmlid}_${e}`);t&&t.focus()}toggleSelectUl(e=!1){this.disabled||this.readonly||(this.isOpen?(document.removeEventListener("click",this.handleSelectFocus),document.removeEventListener("keyup",this.handleSelectFocus),e&&this.element.querySelector(`#${this.htmlid}_input`).focus()):(document.addEventListener("click",this.handleSelectFocus),document.addEventListener("keyup",this.handleSelectFocus)),this.isOpen=!this.isOpen)}handleInputClick(e){e.composedPath().find((e=>e.classList&&e.classList.contains("reset-icon")))?e.stopPropagation():this.toggleSelectUl()}handleSelectFocus(e){if(e instanceof KeyboardEvent&&e.key===r.ESC)return e.stopPropagation(),this.toggleSelectUl(!0);e instanceof KeyboardEvent&&e.key!==r.TAB&&e.key!==r.ENTER||h(d()).find((e=>"z-input"===e.nodeName.toLowerCase()&&e.id===`${this.htmlid}_input`))||this.toggleSelectUl(e instanceof MouseEvent)}scrollToLetter(e){const t=this.itemsList.find((t=>t.name.charAt(0)===e));t&&this.focusSelectItem(this.itemsList.indexOf(t))}renderInput(){return s("z-input",{class:{"active-select":this.isOpen,"cursor-select":!this.autocomplete},id:`${this.htmlid}_input`,htmlid:`${this.htmlid}_input`,placeholder:this.placeholder,value:!this.isOpen&&this.selectedItem?this.selectedItem.name.replace(/<[^>]+>/g,""):null,label:this.label,"aria-label":this.ariaLabel,icon:this.isOpen?"caret-up":"caret-down",hasclearicon:this.hasAutocomplete(),message:!1,disabled:this.disabled,readonly:this.readonly||!this.hasAutocomplete()&&this.isOpen,status:this.isOpen?void 0:this.status,autocomplete:"off",size:this.size,onClick:e=>{this.handleInputClick(e)},onKeyUp:e=>{13!==e.keyCode&&e.preventDefault(),p(e,this.toggleSelectUl)},onKeyDown:e=>this.arrowsSelectNav(e,this.selectedItem?this.itemsList.indexOf(this.selectedItem):this.resetItem?0:-1),onInputChange:e=>{this.handleInputChange(e)},onKeyPress:e=>{this.hasAutocomplete()||(e.preventDefault(),this.scrollToLetter(String.fromCharCode(e.keyCode)))}})}renderSelectUl(){var e;return s("div",{class:this.isOpen?"open":"closed",tabindex:"-1"},s("div",{class:{"ul-scroll-wrapper":!0,fixed:this.isfixed},tabindex:"-1"},s("z-list",{role:"listbox",tabindex:this.disabled||this.readonly||!this.isOpen?-1:0,id:this.htmlid,"aria-activedescendant":null===(e=this.selectedItem)||void 0===e?void 0:e.id,"aria-multiselectable":!1,size:this.listSizeType(),class:{disabled:this.disabled,readonly:this.readonly,filled:!!this.selectedItem,[`input-${this.status}`]:!this.isOpen&&!!this.status}},this.resetItem&&this.renderResetItem(),this.renderSelectUlItems())))}renderResetItem(){return s("z-list-element",{class:{hide:!this.selectedItem||!this.resetItem,"reset-item":!0,"reset-item-margin":!this.hasGroupItems},clickable:!0,disabled:!1,dividerType:c.ELEMENT,role:"option",tabindex:"0","aria-selected":"false",id:`${this.htmlid}_${this.resetItem?"0":"none"}`,size:this.listSizeType(),onClickItem:()=>{this.selectedItem=null,this.searchString=null,this.emitResetSelect()},onKeyDown:e=>this.arrowsSelectNav(e,0)},s("div",{class:"reset-item-content"},s("z-icon",{name:"multiply-circled"}),s("span",null,this.resetItem)))}renderItem(e,t,i){return s("z-list-element",{clickable:!e.disabled,disabled:e.disabled,dividerType:i?c.HEADER:c.ELEMENT,role:"option",tabindex:e.disabled||!this.isOpen?-1:0,"aria-selected":!!e.selected,id:`${this.htmlid}_${t}`,size:this.listSizeType(),onClickItem:()=>this.selectItem(e,!0),onKeyDown:e=>this.arrowsSelectNav(e,t)},s("span",{class:{selected:!!e.selected,"list-element-content":!0},innerHTML:e.name}))}listSizeType(){return this.size===l.SMALL||this.size===l.X_SMALL?a.SMALL:a.MEDIUM}renderSelectUlItems(){return this.itemsList.length?this.hasGroupItems?this.renderSelectGroupItems():this.itemsList.map(((e,t,s)=>this.renderItem(e,this.resetItem?t+1:t,s.length===t+1))):this.renderNoSearchResults()}renderSelectGroupItems(){const e=this.itemsList.reduce(((e,t,s,i)=>{var l;const{category:r}=t,c=this.renderItem(t,this.resetItem?s+1:s,i.length===s+1);return e[r]=null!==(l=e[r])&&void 0!==l?l:[],e[r].push(c),e}),{});return Object.entries(e).map((([e,t])=>s("z-list-group",{"divider-type":c.ELEMENT},s("span",{class:"body-3-sb z-list-group-title",slot:"header-title"},e),t.map((e=>e)))))}renderNoSearchResults(){return s("z-list-element",{color:"blue500",class:"no-results",size:this.listSizeType()},s("z-icon",{name:"multiply-circle",fill:"blue500"}),this.noresultslabel)}renderMessage(){if(!1!==o(this.message))return s("z-input-message",{message:!0===o(this.message)?void 0:this.message,status:this.status,class:this.size})}render(){return s("div",{class:"select-wrapper"},this.renderInput(),this.renderSelectUl(),this.renderMessage())}get element(){return i(this)}static get watchers(){return{items:["watchItems"]}}};u.style='.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}';export{u as z_select}
@@ -1 +1 @@
1
- import{r as s,c as t,h as c,H as e}from"./p-d17ebc2f.js";import{r as i}from"./p-dfc69cc3.js";import{k as l}from"./p-e1ac5c4e.js";import"./p-d69e14fb.js";const o=class{constructor(c){s(this,c),this.toggleClick=t(this,"toggleClick",7),this.disabled=!1,this.labelPosition=l.LEFT,this.checked=!1,this.htmlid=`toggle-switch-id-${i()}`}emitToggleClick(){this.toggleClick.emit({id:this.htmlid,checked:this.checked})}handleClick(s){this.disabled||(this.checked=s.target.checked,this.emitToggleClick())}render(){return c(e,null,c("input",{id:this.htmlid,type:"checkbox",checked:this.checked,disabled:this.disabled,onChange:this.handleClick.bind(this)}),c("label",{htmlFor:this.htmlid,class:{[this.labelPosition]:!0,disabled:this.disabled}},c("span",null,c("slot",null)),c("span",{class:{container:!0,disabled:this.disabled,checked:this.checked}},c("span",{class:"circle"},this.checked&&c("z-icon",{width:12,height:12,name:"checkmark"})))))}};o.style='.sc-z-toggle-switch-h{position:relative;display:inline-flex;font-family:var(--font-family-sans);font-weight:var(--font-rg)}label.sc-z-toggle-switch{display:flex;flex-direction:row;align-items:center;cursor:pointer}label.disabled.sc-z-toggle-switch{cursor:default}label.right.sc-z-toggle-switch{flex-direction:row-reverse}label.sc-z-toggle-switch>span.sc-z-toggle-switch:first-child{color:var(--color-text01);letter-spacing:0}label.left.sc-z-toggle-switch>span.sc-z-toggle-switch:first-child{margin-right:var(--space-unit)}label.right.sc-z-toggle-switch>span.sc-z-toggle-switch:first-child{margin-left:var(--space-unit)}label.sc-z-toggle-switch>span.container.sc-z-toggle-switch{position:relative;top:1px;left:1px;display:flex;width:calc(var(--space-unit) * 4);height:18px;align-items:center;background-color:var(--gray500);border-radius:var(--space-unit);color:var(--gray500);cursor:pointer}label.sc-z-toggle-switch>span.container.disabled.sc-z-toggle-switch,label.sc-z-toggle-switch>span.container.checked.disabled.sc-z-toggle-switch{background-color:var(--color-disabled01);cursor:default}label.sc-z-toggle-switch>span.container.checked.disabled.sc-z-toggle-switch>span.circle.sc-z-toggle-switch>z-icon.sc-z-toggle-switch{fill:var(--color-disabled01)}label.sc-z-toggle-switch>span.container.checked.sc-z-toggle-switch{background-color:var(--color-primary01);fill:var(--color-primary01)}input.sc-z-toggle-switch:focus:focus-visible+label.sc-z-toggle-switch>span.container.sc-z-toggle-switch:not(.disabled){box-shadow:var(--shadow-focus-primary);outline:none}input.sc-z-toggle-switch:focus:focus-visible+label.sc-z-toggle-switch>span.container.disabled.sc-z-toggle-switch{outline:none}label.sc-z-toggle-switch>span.container.sc-z-toggle-switch:not(.disabled):hover{background-color:var(--color-hover-primary);fill:var(--color-hover-primary)}label.sc-z-toggle-switch>span.container.sc-z-toggle-switch>span.circle.sc-z-toggle-switch{position:absolute;top:1px;left:1px;display:flex;width:calc(var(--space-unit) * 2);height:calc(var(--space-unit) * 2);align-items:center;justify-content:center;margin:0;background-color:var(--color-white);border-radius:7px;box-shadow:var(--shadow-1);transition:transform 0.3s ease}label.sc-z-toggle-switch>span.container.checked.sc-z-toggle-switch>span.circle.sc-z-toggle-switch{transform:translateX(calc(100% - 2px))}input[type="checkbox"].sc-z-toggle-switch{position:absolute;z-index:-1;opacity:0;pointer-events:none}';export{o as z_toggle_switch}
1
+ import{r as s,c as t,h as e,H as c}from"./p-d17ebc2f.js";import{r as i}from"./p-1c6b0e09.js";import{k as l}from"./p-e1ac5c4e.js";import"./p-d69e14fb.js";const o=class{constructor(e){s(this,e),this.toggleClick=t(this,"toggleClick",7),this.disabled=!1,this.labelPosition=l.LEFT,this.checked=!1,this.htmlid=`toggle-switch-id-${i()}`}emitToggleClick(){this.toggleClick.emit({id:this.htmlid,checked:this.checked})}handleClick(s){this.disabled||(this.checked=s.target.checked,this.emitToggleClick())}render(){return e(c,null,e("input",{id:this.htmlid,type:"checkbox",checked:this.checked,disabled:this.disabled,onChange:this.handleClick.bind(this)}),e("label",{htmlFor:this.htmlid,class:{[this.labelPosition]:!0,disabled:this.disabled}},e("span",null,e("slot",null)),e("span",{class:{container:!0,disabled:this.disabled,checked:this.checked}},e("span",{class:"circle"},this.checked&&e("z-icon",{width:12,height:12,name:"checkmark"})))))}};o.style='.sc-z-toggle-switch-h{position:relative;display:inline-flex;font-family:var(--font-family-sans);font-weight:var(--font-rg)}label.sc-z-toggle-switch{display:flex;flex-direction:row;align-items:center;cursor:pointer}label.disabled.sc-z-toggle-switch{cursor:default}label.right.sc-z-toggle-switch{flex-direction:row-reverse}label.sc-z-toggle-switch>span.sc-z-toggle-switch:first-child{color:var(--color-text01);letter-spacing:0}label.left.sc-z-toggle-switch>span.sc-z-toggle-switch:first-child{margin-right:var(--space-unit)}label.right.sc-z-toggle-switch>span.sc-z-toggle-switch:first-child{margin-left:var(--space-unit)}label.sc-z-toggle-switch>span.container.sc-z-toggle-switch{position:relative;top:1px;left:1px;display:flex;width:calc(var(--space-unit) * 4);height:18px;align-items:center;background-color:var(--gray500);border-radius:var(--space-unit);color:var(--gray500);cursor:pointer}label.sc-z-toggle-switch>span.container.disabled.sc-z-toggle-switch,label.sc-z-toggle-switch>span.container.checked.disabled.sc-z-toggle-switch{background-color:var(--color-disabled01);cursor:default}label.sc-z-toggle-switch>span.container.checked.disabled.sc-z-toggle-switch>span.circle.sc-z-toggle-switch>z-icon.sc-z-toggle-switch{fill:var(--color-disabled01)}label.sc-z-toggle-switch>span.container.checked.sc-z-toggle-switch{background-color:var(--color-primary01);fill:var(--color-primary01)}input.sc-z-toggle-switch:focus:focus-visible+label.sc-z-toggle-switch>span.container.sc-z-toggle-switch:not(.disabled){box-shadow:var(--shadow-focus-primary);outline:none}input.sc-z-toggle-switch:focus:focus-visible+label.sc-z-toggle-switch>span.container.disabled.sc-z-toggle-switch{outline:none}label.sc-z-toggle-switch>span.container.sc-z-toggle-switch:not(.disabled):hover{background-color:var(--color-hover-primary);fill:var(--color-hover-primary)}label.sc-z-toggle-switch>span.container.sc-z-toggle-switch>span.circle.sc-z-toggle-switch{position:absolute;top:1px;left:1px;display:flex;width:calc(var(--space-unit) * 2);height:calc(var(--space-unit) * 2);align-items:center;justify-content:center;margin:0;background-color:var(--color-white);border-radius:7px;box-shadow:var(--shadow-1);transition:transform 0.3s ease}label.sc-z-toggle-switch>span.container.checked.sc-z-toggle-switch>span.circle.sc-z-toggle-switch{transform:translateX(calc(100% - 2px))}input[type="checkbox"].sc-z-toggle-switch{position:absolute;z-index:-1;opacity:0;pointer-events:none}';export{o as z_toggle_switch}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e,g as s}from"./p-d17ebc2f.js";import{q as o}from"./p-e1ac5c4e.js";import{a}from"./p-1c6b0e09.js";import{h as r}from"./p-e43e61ac.js";import"./p-d69e14fb.js";import"./p-112455b1.js";const n=class{constructor(e){t(this,e),this.pocketToggle=i(this,"pocketToggle",7),this.status=o.PREVIEW}async open(){this.status=o.OPEN}async close(){this.status=o.CLOSED}emitPocketToggle(t,i){this.pocketToggle.emit({id:t,status:i})}handlePocketHeaderClick(t){if(t.detail.id&&t.detail.id===this.pocketid)switch(this.status){case o.PREVIEW:case o.CLOSED:this.status=o.OPEN;break;case o.OPEN:this.status=o.CLOSED}}handlePocketHeaderPan(t){t.detail.id&&t.detail.id===this.pocketid&&("up"===t.detail.direction?this.status=o.OPEN:"down"===t.detail.direction&&(this.status=o.CLOSED))}watchStatusHandler(t){this.emitPocketToggle(this.pocketid,t)}componentWillLoad(){this.emitPocketToggle(this.pocketid,this.status)}handleBackgroundClick(t){"pocketBackground"==t.target.dataset.action&&this.close()}render(){return e("div",null,e("div",{"data-action":"pocketBackground","data-pocket":this.pocketid,class:`background ${this.status}`,onClick:t=>this.handleBackgroundClick(t)}),e("div",{id:this.pocketid,class:"content-wrapper"},e("div",null,e("slot",null))))}get hostElement(){return s(this)}static get watchers(){return{status:["watchStatusHandler"]}}};n.style=":host{width:inherit;height:100%;margin:inherit;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{width:inherit;height:100%;margin:inherit}:host>div>div.background{position:fixed;z-index:998;top:0;right:0;bottom:0;left:0;width:0;height:0}:host>div>div.background.open{width:100%;height:100%}:host>div>div.content-wrapper{position:fixed;z-index:999;bottom:0;left:0;width:inherit;margin:inherit}:host>div>div.content-wrapper>div{margin:calc(var(--space-unit) * 0.5) calc(var(--space-unit) * 0.5) 0 calc(var(--space-unit) * 0.5);border-radius:var(--space-unit) var(--space-unit) 0 0;box-shadow:0 -2px calc(var(--space-unit) * 0.5) 0 rgb(66 69 72 / 40%)}";const h=class{constructor(i){t(this,i),this.status=o.PREVIEW}handlePocketToggle(t){t.detail.id&&t.detail.id===this.pocketid&&(this.status=t.detail.status)}render(){return e("main",{class:this.status},e("slot",null))}};h.style=":host{display:block;width:100%;box-sizing:border-box;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>main{overflow:auto;border-right:var(--border-size-small) solid var(--color-surface03);border-left:var(--border-size-small) solid var(--color-surface03);background:var(--color-surface01);scrollbar-width:none}:host>main.preview{max-height:225px;transition:all 200ms ease-in-out, top 200ms ease-in-out}:host>main.open{max-height:calc(100vh - 48px);transition:all 200ms ease-in-out, top 200ms ease-in-out}:host>main.closed{height:0;transition:all 200ms ease-in-out, top 200ms ease-in-out}:host ::-webkit-scrollbar{width:0}@media only screen and (min-width: 768px){:host>main.preview{max-height:157px}}";const c=class{constructor(e){t(this,e),this.pocketHeaderClick=i(this,"pocketHeaderClick",7),this.pocketHeaderPan=i(this,"pocketHeaderPan",7),this.emitPocketHeaderClick=this.emitPocketHeaderClick.bind(this)}emitPocketHeaderClick(){this.pocketHeaderClick.emit({id:this.pocketid})}emitPocketHeaderPan(t){this.pocketHeaderPan.emit({id:this.pocketid,direction:t})}componentDidLoad(){const t=new r(this.swipeWrap);t.get("pan").set({direction:r.DIRECTION_VERTICAL}),t.on("panup",(()=>this.emitPocketHeaderPan("up"))),t.on("pandown",(()=>this.emitPocketHeaderPan("down")))}render(){return e("header",{role:"button",tabindex:0,onClick:()=>this.emitPocketHeaderClick(),onKeyPress:t=>a(t,this.emitPocketHeaderClick),ref:t=>this.swipeWrap=t},e("slot",null))}};c.style=":host{display:block;width:100%;box-sizing:border-box;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>header{display:flex;height:36px;flex-flow:row nowrap;align-items:center;justify-content:center;border:var(--border-size-small) solid var(--color-surface03);background:var(--color-surface01);border-radius:var(--space-unit) var(--space-unit) 0 0;cursor:pointer}:host>header:focus{outline:none}:host>header::-moz-focus-inner{border:0}";export{n as z_pocket,h as z_pocket_body,c as z_pocket_header}
@@ -1 +1 @@
1
- import{r as t,h as e,g as i}from"./p-d17ebc2f.js";import{p as r}from"./p-e1ac5c4e.js";import{f as s,g as o,h as n}from"./p-dfc69cc3.js";import"./p-d69e14fb.js";const a=class{constructor(e){t(this,e),this.currentSlide=0}watchData(){this.parseLinks()}componentWillLoad(){this.parseLinks(),this.setDevice(),window.addEventListener("resize",this.handleResize.bind(this))}componentDidRender(){this.setStyle()}handleResize(){this.setDevice(),this.setStyle()}parseLinks(){var t,e;switch(typeof this.data){case"string":{const i=null!==(t=s(this.data))&&void 0!==t?t:[];if(e=i,!Array.isArray(e)||!e.every((t=>"string"==typeof t)))throw new Error("Passed data is invalid");this.links=i;break}default:this.links=this.data}}setStyle(){const t=this.el.shadowRoot.querySelector("#slides");if(!t)return;const e=this.el.shadowRoot.querySelectorAll(".slide"),i=this.el.offsetWidth;t.style.width=i*this.links.length+"px",t.style.transform=`translate(-${i*this.currentSlide}px)`,e.forEach((t=>{t.querySelector("img").style.width=`${i}px`}))}setDevice(){this.device=o()}setCurrentSlide(t){this.currentSlide=t}getBulletDimension(){switch(this.device){case r.MOBILE:return 24;case r.TABLET:return 32;default:return 40}}renderSlides(t){return e("div",{id:"slides"},t.map(((t,i)=>e("div",{id:"slide"+i,class:`slide ${this.currentSlide!==i&&"hide"}`},e("img",{src:t})))))}renderScroll(t){let i=!1,r=this.currentSlide;return"left"===t?(i=0===this.currentSlide,r--):"right"===t&&(i=this.currentSlide===this.links.length-1,r++),e("z-icon",{class:`scroll ${t} ${i&&"disabled"}`,width:this.getBulletDimension(),height:this.getBulletDimension(),name:`chevron-${t}-circle`,onClick:()=>{!i&&this.setCurrentSlide(r)},onKeyUp:t=>!i&&n(t,(()=>{this.setCurrentSlide(r)})),tabindex:0,role:"button"})}renderSlideshowMain(){return e("main",null,this.renderScroll("left"),this.renderSlides(this.links),this.renderScroll("right"))}renderBullet(t){return e("a",{class:`bullet ${this.currentSlide===t&&"selected"}`,onClick:()=>this.setCurrentSlide(t),onKeyUp:e=>n(e,(()=>this.setCurrentSlide(t))),tabindex:0,role:"button"})}renderSlideshowFooter(){return e("footer",null,e("div",{class:"footer-left"},e("slot",{name:"footer-left"})),e("div",{class:"footer-center"},e("div",{class:"bullet-container"},Object.keys(this.links).map((t=>this.renderBullet(parseInt(t)))))),e("div",{class:"footer-right"},e("slot",{name:"footer-right"})))}render(){return this.links&&this.links.length?e("div",{id:this.slideshowid},this.renderSlideshowMain(),this.renderSlideshowFooter()):e("div",null)}get el(){return i(this)}static get watchers(){return{data:["watchData"]}}};a.style=':host{display:block;width:inherit;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{display:flex;width:inherit;flex-direction:column}main{position:relative;overflow:hidden;width:100%}main z-icon.scroll{position:absolute;z-index:10;top:50%;width:auto;margin:0 var(--space-unit);cursor:pointer;fill:var(--color-primary01);transition:0.6s ease}main .scroll.disabled{opacity:0.5;pointer-events:none}main .scroll.right{right:0}#slides{display:flex;flex-wrap:wrap;line-height:0px;overflow-y:hidden;transition:all 300ms}footer{display:grid;width:100%;height:56px;align-items:center;border-top:var(--border-base) solid var(--color-surface02);grid-template:2 / 2;grid-template-areas:"center center" "left right"}footer>div{width:100%;align-items:center}footer .footer-center{grid-area:center}footer .footer-left{grid-area:left}footer .footer-right{grid-area:right}footer .bullet-container{display:flex;min-height:60px;align-items:center;justify-content:center;margin:0 auto}footer .bullet-container .bullet{width:8px;height:8px;margin:var(--space-unit) 2px;background-color:var(--bg-neutral-150);border-radius:50%;pointer-events:none}footer .bullet-container .bullet.selected{background-color:var(--bg-neutral-400)}@media only screen and (min-width: 768px){footer{height:76px;border-top:var(--border-base) solid var(--color-surface02);grid-template:1 / 1fr 2fr 1fr;grid-template-areas:"left center right"}footer .bullet-container .bullet{width:10px;height:10px;margin:var(--space-unit) 3px}}@media only screen and (min-width: 1025px){main z-icon.scroll{margin:0 10px}footer .bullet-container .bullet{width:16px;height:16px;margin:var(--space-unit) calc(var(--space-unit) * 0.5);cursor:pointer;pointer-events:auto}}';export{a as z_slideshow}
1
+ import{r as t,h as e,g as i}from"./p-d17ebc2f.js";import{p as r}from"./p-e1ac5c4e.js";import{f as s,g as o,a as n}from"./p-1c6b0e09.js";import"./p-d69e14fb.js";const a=class{constructor(e){t(this,e),this.currentSlide=0}watchData(){this.parseLinks()}componentWillLoad(){this.parseLinks(),this.setDevice(),window.addEventListener("resize",this.handleResize.bind(this))}componentDidRender(){this.setStyle()}handleResize(){this.setDevice(),this.setStyle()}parseLinks(){var t,e;switch(typeof this.data){case"string":{const i=null!==(t=s(this.data))&&void 0!==t?t:[];if(e=i,!Array.isArray(e)||!e.every((t=>"string"==typeof t)))throw new Error("Passed data is invalid");this.links=i;break}default:this.links=this.data}}setStyle(){const t=this.el.shadowRoot.querySelector("#slides");if(!t)return;const e=this.el.shadowRoot.querySelectorAll(".slide"),i=this.el.offsetWidth;t.style.width=i*this.links.length+"px",t.style.transform=`translate(-${i*this.currentSlide}px)`,e.forEach((t=>{t.querySelector("img").style.width=`${i}px`}))}setDevice(){this.device=o()}setCurrentSlide(t){this.currentSlide=t}getBulletDimension(){switch(this.device){case r.MOBILE:return 24;case r.TABLET:return 32;default:return 40}}renderSlides(t){return e("div",{id:"slides"},t.map(((t,i)=>e("div",{id:"slide"+i,class:`slide ${this.currentSlide!==i&&"hide"}`},e("img",{src:t})))))}renderScroll(t){let i=!1,r=this.currentSlide;return"left"===t?(i=0===this.currentSlide,r--):"right"===t&&(i=this.currentSlide===this.links.length-1,r++),e("z-icon",{class:`scroll ${t} ${i&&"disabled"}`,width:this.getBulletDimension(),height:this.getBulletDimension(),name:`chevron-${t}-circle`,onClick:()=>{!i&&this.setCurrentSlide(r)},onKeyUp:t=>!i&&n(t,(()=>{this.setCurrentSlide(r)})),tabindex:0,role:"button"})}renderSlideshowMain(){return e("main",null,this.renderScroll("left"),this.renderSlides(this.links),this.renderScroll("right"))}renderBullet(t){return e("a",{class:`bullet ${this.currentSlide===t&&"selected"}`,onClick:()=>this.setCurrentSlide(t),onKeyUp:e=>n(e,(()=>this.setCurrentSlide(t))),tabindex:0,role:"button"})}renderSlideshowFooter(){return e("footer",null,e("div",{class:"footer-left"},e("slot",{name:"footer-left"})),e("div",{class:"footer-center"},e("div",{class:"bullet-container"},Object.keys(this.links).map((t=>this.renderBullet(parseInt(t)))))),e("div",{class:"footer-right"},e("slot",{name:"footer-right"})))}render(){return this.links&&this.links.length?e("div",{id:this.slideshowid},this.renderSlideshowMain(),this.renderSlideshowFooter()):e("div",null)}get el(){return i(this)}static get watchers(){return{data:["watchData"]}}};a.style=':host{display:block;width:inherit;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{display:flex;width:inherit;flex-direction:column}main{position:relative;overflow:hidden;width:100%}main z-icon.scroll{position:absolute;z-index:10;top:50%;width:auto;margin:0 var(--space-unit);cursor:pointer;fill:var(--color-primary01);transition:0.6s ease}main .scroll.disabled{opacity:0.5;pointer-events:none}main .scroll.right{right:0}#slides{display:flex;flex-wrap:wrap;line-height:0px;overflow-y:hidden;transition:all 300ms}footer{display:grid;width:100%;height:56px;align-items:center;border-top:var(--border-base) solid var(--color-surface02);grid-template:2 / 2;grid-template-areas:"center center" "left right"}footer>div{width:100%;align-items:center}footer .footer-center{grid-area:center}footer .footer-left{grid-area:left}footer .footer-right{grid-area:right}footer .bullet-container{display:flex;min-height:60px;align-items:center;justify-content:center;margin:0 auto}footer .bullet-container .bullet{width:8px;height:8px;margin:var(--space-unit) 2px;background-color:var(--bg-neutral-150);border-radius:50%;pointer-events:none}footer .bullet-container .bullet.selected{background-color:var(--bg-neutral-400)}@media only screen and (min-width: 768px){footer{height:76px;border-top:var(--border-base) solid var(--color-surface02);grid-template:1 / 1fr 2fr 1fr;grid-template-areas:"left center right"}footer .bullet-container .bullet{width:10px;height:10px;margin:var(--space-unit) 3px}}@media only screen and (min-width: 1025px){main z-icon.scroll{margin:0 10px}footer .bullet-container .bullet{width:16px;height:16px;margin:var(--space-unit) calc(var(--space-unit) * 0.5);cursor:pointer;pointer-events:auto}}';export{a as z_slideshow}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as n,H as i,g as o}from"./p-d17ebc2f.js";const a=class{constructor(n){t(this,n),this.opened=e(this,"opened",7),this.closed=e(this,"closed",7),this.floating=!1,this.open=!1,this.verticalContext=!1,this.toggle=this.toggle.bind(this),this.checkContent=this.checkContent.bind(this),this.onLabelSlotChange=this.onLabelSlotChange.bind(this),this.onItemsChange=this.onItemsChange.bind(this)}toggle(){this.hasContent&&(this.open=!this.open,this.open?this.opened.emit():this.closed.emit())}handleClick(t){this.floating&&this.open&&!this.hostElement.contains(t.target)&&(this.reflow(),this.open=!1,this.closed.emit())}onOpenChanged(){this.open?this.reflow(!0):cancelAnimationFrame(this.raf)}componentWillLoad(){this.checkContent()}onLabelSlotChange(t){const e=t.target.assignedElements()[0];e.dataset.text=null==e?void 0:e.textContent}reflow(t=!1){if(this.content){const{style:t}=this.content,{left:e}=this.hostElement.getBoundingClientRect(),n=getComputedStyle(this.content).width,i=n?parseFloat(n.replace("px","")):375;t.left=`${Math.min(window.innerWidth-e-i-30,0)}px`}t&&(this.raf=requestAnimationFrame(this.reflow.bind(this,t)))}checkContent(){this.hasHeader=!!this.hostElement.querySelectorAll("[slot=header]").length,this.hasContent=!!this.hostElement.querySelectorAll("[slot=item]").length||this.hasHeader}onItemsChange(){this.checkContent(),this.hostElement.querySelectorAll("[slot=item]").forEach((t=>{t.setAttribute("role","menuitem"),t.dataset.text=t.textContent}))}renderMenuLabel(){return this.hasContent?n("button",{class:"menu-label","aria-expanded":this.open?"true":"false","aria-label":this.open?"Chiudi menù":"Apri menù",onClick:this.toggle},n("div",{class:"menu-label-content"},n("slot",{onSlotchange:this.onLabelSlotChange}),n("z-icon",{name:this.open?"chevron-up":"chevron-down"}))):n("div",{class:"menu-label"},n("div",{class:"menu-label-content"},n("slot",{onSlotchange:this.onLabelSlotChange})))}render(){return n(i,null,this.renderMenuLabel(),this.hasContent&&n("div",{class:"content",ref:t=>this.content=t},this.hasHeader&&n("header",{class:"header"},n("slot",{name:"header",onSlotchange:this.checkContent})),n("div",{class:"items",role:"menu"},n("slot",{name:"item",onSlotchange:this.onItemsChange}))))}get hostElement(){return o(this)}static get watchers(){return{open:["onOpenChanged"]}}};a.style=':host,::slotted(*),*{box-sizing:border-box}:host{position:relative;display:inline-flex;flex-direction:column;--z-menu-label-color:var(--color-text01)}::slotted(a){text-decoration:none}::slotted(*){color:var(--color-text01);font-family:var(--font-family-sans);font-weight:var(--font-rg)}.menu-label{padding:0;border:0;margin:0;background:transparent;border-radius:0;color:inherit;outline:none;text-align:left}button.menu-label{cursor:pointer}.menu-label:focus-within{z-index:1;padding-right:calc(var(--space-unit) * 0.5);padding-left:calc(var(--space-unit) * 0.5);margin-right:calc(var(--space-unit) * -0.5);margin-left:calc(var(--space-unit) * -0.5);box-shadow:var(--shadow-focus-primary)}.menu-label .menu-label-content{position:relative;display:flex;align-items:center}:host(:is([active],[open])) .menu-label-content,.menu-label:focus-within .menu-label-content{font-weight:var(--font-bd)}:host(:is([active],[open])) .menu-label-content ::slotted(*),.menu-label:focus-within .menu-label-content ::slotted(*){letter-spacing:normal}:host(:is([active],[open],[vertical-context])) .menu-label .menu-label-content::after,.menu-label .menu-label-content:hover::after,.menu-label:focus-within .menu-label-content::after{position:absolute;bottom:0;left:0;width:100%;content:"";pointer-events:none}:host([vertical-context]) .menu-label-content::after{height:var(--border-size-small);background-color:var(--color-surface03)}:host(:is([active],[open])) .menu-label .menu-label-content::after,.menu-label .menu-label-content:hover::after,.menu-label:focus-within .menu-label-content::after{height:var(--border-size-large);background-color:var(--color-secondary01)}::slotted([data-text])::after{height:0;content:attr(data-text);content:attr(data-text) / "";font-weight:var(--font-bd);letter-spacing:normal;pointer-events:none;user-select:none;visibility:hidden}@media speech{::slotted([data-text])::after{display:none}}::slotted([data-text]){display:inline-flex;flex-direction:column}.menu-label .menu-label-content ::slotted(*){display:inline-flex;width:100%;margin:0;appearance:none;color:var(--z-menu-label-color);font-family:var(--font-family-sans);font-size:var(--font-size-5);font-weight:inherit;letter-spacing:0.36px;line-height:1.2;outline:none}.menu-label .menu-label-content ::slotted(*),.menu-label .menu-label-content z-icon{padding:var(--space-unit) 0}.menu-label .menu-label-content z-icon{margin-left:calc(var(--space-unit) * 1.5);fill:currentcolor}.content{background:var(--color-surface01)}:host(:not([open])) .content{display:none}:host([floating]) .content{position:absolute;top:100%;left:0;width:375px;min-width:100%;max-width:100vw;padding:var(--space-unit) var(--space-unit) calc(var(--space-unit) * 2);box-shadow:var(--shadow-2)}:host(:not([floating])) .content{width:100%}.header{display:flex;align-items:center;padding:var(--space-unit) 0 calc(var(--space-unit) * 2)}.header ::slotted(img[slot="header"]){width:calc(var(--space-unit) * 11.25);height:auto;object-fit:contain}.header ::slotted([slot="header"]:not(:first-child)){margin:auto 0;margin-left:calc(var(--space-unit) * 2.5);font-size:var(--font-size-3);font-weight:var(--font-sb);line-height:1.5}.items{display:flex;flex-direction:column;align-items:flex-start;background:inherit}.items>::slotted([slot="item"]){width:100%;margin:0;font-size:var(--font-size-3);line-height:1.25;outline:none}.items>::slotted([slot="item"]:focus:focus-visible){box-shadow:var(--shadow-focus-primary)}.items>::slotted([slot="item"]:not(z-menu-section)){padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5);border-bottom:var(--border-size-small) solid var(--color-surface05)}.items>::slotted([slot="item"]:hover),.items>::slotted([slot="item"]:focus:focus-visible),.items>::slotted([slot="item"]:active){border-color:var(--color-secondary01);font-weight:var(--font-bd)}';export{a as z_menu}
@@ -0,0 +1 @@
1
+ import{r as o,h as t}from"./p-d17ebc2f.js";import{P as e}from"./p-e1ac5c4e.js";const r=class{constructor(t){o(this,t),this.position=e.AUTO,this.dark=!1,this.open=!1,this.closable=!0}onPopoverOpenChange(){this.open=this.popover.open}render(){return t("z-popover",{ref:o=>this.popover=o,bindTo:this.bindTo,open:this.open,position:this.position,closable:this.closable,center:!0,showArrow:!0},t("slot",null))}};r.style=":host{--z-tooltip-theme--surface:var(--color-surface01);--z-tooltip-theme--text:var(--color-text01);--z-tooltip-shadow-filter:drop-shadow(0 1px 2px var(--shadow-color-base))}:host([dark]) z-popover{--z-popover-theme--surface:var(--color-surface05);--z-popover-theme--text:var(--color-text-inverse)}z-popover{--z-popover-padding:var(--space-unit);--z-popover-theme--surface:var(--z-tooltip-theme--surface);--z-popover-theme--text:var(--z-tooltip-theme--text);--z-popover-shadow-filter:var(--z-tooltip-shadow-filter)}";export{r as z_tooltip}