@zanichelli/albe-web-components 2.33.4 → 2.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. package/CHANGELOG.md +1229 -0
  2. package/dist/cjs/_commonjsHelpers-119ffc74.js +17 -0
  3. package/dist/cjs/{hammer-6e321f0b.js → hammer-54230951.js} +2 -15
  4. package/dist/cjs/icons-74891aae.js +477 -0
  5. package/dist/cjs/index-9651dba8.js +60 -0
  6. package/dist/cjs/{index-11a8a536.js → index-de6c491e.js} +8 -8
  7. package/dist/cjs/index.cjs.js +2 -2
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/{utils-00e14fba.js → utils-12053886.js} +1 -1
  10. package/dist/cjs/web-components-library.cjs.js +1 -1
  11. package/dist/cjs/z-alert.cjs.entry.js +19 -0
  12. package/dist/cjs/z-app-switcher.cjs.entry.js +29 -0
  13. package/dist/cjs/z-app-topbar.cjs.entry.js +41 -0
  14. package/dist/cjs/z-aria-alert.cjs.entry.js +1 -1
  15. package/dist/cjs/z-avatar.cjs.entry.js +43 -0
  16. package/dist/cjs/z-body_14.cjs.entry.js +513 -0
  17. package/dist/cjs/z-button-filter_5.cjs.entry.js +620 -0
  18. package/dist/cjs/z-button-sort.cjs.entry.js +54 -0
  19. package/dist/cjs/z-card.cjs.entry.js +58 -0
  20. package/dist/cjs/z-chip.cjs.entry.js +24 -0
  21. package/dist/cjs/z-combobox.cjs.entry.js +170 -0
  22. package/dist/cjs/z-contextual-menu.cjs.entry.js +40 -0
  23. package/dist/cjs/z-cookiebar.cjs.entry.js +1 -1
  24. package/dist/cjs/z-divider.cjs.entry.js +26 -0
  25. package/dist/cjs/z-footer-link_3.cjs.entry.js +49 -0
  26. package/dist/cjs/z-footer.cjs.entry.js +102 -0
  27. package/dist/cjs/z-ghost-loading.cjs.entry.js +19 -0
  28. package/dist/cjs/z-icon-package.cjs.entry.js +23 -0
  29. package/dist/cjs/z-info-box.cjs.entry.js +25 -0
  30. package/dist/cjs/z-link.cjs.entry.js +71 -0
  31. package/dist/cjs/z-list_3.cjs.entry.js +226 -0
  32. package/dist/cjs/z-logo.cjs.entry.js +28 -0
  33. package/dist/cjs/z-menu-dropdown_2.cjs.entry.js +89 -0
  34. package/dist/cjs/z-menu-section.cjs.entry.js +46 -0
  35. package/dist/cjs/z-menu.cjs.entry.js +110 -0
  36. package/dist/cjs/z-messages-pocket.cjs.entry.js +1 -1
  37. package/dist/cjs/z-modal-login.cjs.entry.js +1 -1
  38. package/dist/cjs/z-modal.cjs.entry.js +36 -0
  39. package/dist/cjs/z-myz-card-alert.cjs.entry.js +63 -0
  40. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +1 -1
  41. package/dist/cjs/z-myz-card-footer.cjs.entry.js +52 -0
  42. package/dist/cjs/z-myz-card-icon.cjs.entry.js +21 -0
  43. package/dist/cjs/z-myz-card-info.cjs.entry.js +2 -2
  44. package/dist/cjs/z-myz-card-list.cjs.entry.js +37 -0
  45. package/dist/cjs/z-myz-card_4.cjs.entry.js +101 -0
  46. package/dist/cjs/z-myz-list-item.cjs.entry.js +37 -0
  47. package/dist/cjs/z-myz-topbar.cjs.entry.js +1 -1
  48. package/dist/cjs/z-navigation-tabs.cjs.entry.js +1 -1
  49. package/dist/cjs/z-notification.cjs.entry.js +42 -0
  50. package/dist/cjs/z-otp.cjs.entry.js +1 -1
  51. package/dist/cjs/z-pagination-bar.cjs.entry.js +128 -0
  52. package/dist/cjs/z-pagination-page.cjs.entry.js +25 -0
  53. package/dist/cjs/z-panel-elem.cjs.entry.js +30 -0
  54. package/dist/cjs/z-pocket_3.cjs.entry.js +4 -3
  55. package/dist/cjs/z-registro-table-expanded-row.cjs.entry.js +19 -0
  56. package/dist/cjs/z-slideshow.cjs.entry.js +2 -2
  57. package/dist/cjs/z-status-tag.cjs.entry.js +29 -0
  58. package/dist/cjs/z-stepper-item.cjs.entry.js +22 -0
  59. package/dist/cjs/z-stepper.cjs.entry.js +19 -0
  60. package/dist/cjs/z-toast-notification-list.cjs.entry.js +1 -1
  61. package/dist/cjs/z-toast-notification.cjs.entry.js +3 -2
  62. package/dist/cjs/z-toggle-button.cjs.entry.js +36 -0
  63. package/dist/cjs/z-tooltip.cjs.entry.js +274 -0
  64. package/dist/cjs/z-user-dropdown.cjs.entry.js +95 -0
  65. package/dist/collection/beans/index.js +8 -8
  66. package/dist/collection/snowflakes/registro-table/z-registro-table-cell/index.js +26 -1
  67. package/dist/collection/snowflakes/registro-table/z-registro-table-cell/styles.css +19 -1
  68. package/dist/collection/snowflakes/registro-table/z-registro-table-header/index.js +22 -18
  69. package/dist/collection/snowflakes/registro-table/z-registro-table-header/styles.css +9 -13
  70. package/dist/esm/_commonjsHelpers-8b28c6fa.js +15 -0
  71. package/dist/esm/{hammer-c807d0b5.js → hammer-501342a9.js} +2 -14
  72. package/dist/esm/icons-9a191d79.js +475 -0
  73. package/dist/esm/{index-4952bfe3.js → index-09b57d95.js} +9 -9
  74. package/dist/esm/index-aa3a4feb.js +58 -0
  75. package/dist/esm/index.js +2 -2
  76. package/dist/esm/loader.js +1 -1
  77. package/dist/esm/{utils-889efe17.js → utils-f0067254.js} +2 -2
  78. package/dist/esm/web-components-library.js +1 -1
  79. package/dist/esm/z-alert.entry.js +15 -0
  80. package/dist/esm/z-app-switcher.entry.js +25 -0
  81. package/dist/esm/z-app-topbar.entry.js +37 -0
  82. package/dist/esm/z-aria-alert.entry.js +1 -1
  83. package/dist/esm/z-avatar.entry.js +39 -0
  84. package/dist/esm/z-body_14.entry.js +496 -0
  85. package/dist/esm/z-button-filter_5.entry.js +612 -0
  86. package/dist/esm/z-button-sort.entry.js +50 -0
  87. package/dist/esm/z-card.entry.js +54 -0
  88. package/dist/esm/z-chip.entry.js +20 -0
  89. package/dist/esm/z-combobox.entry.js +166 -0
  90. package/dist/esm/z-contextual-menu.entry.js +36 -0
  91. package/dist/esm/z-cookiebar.entry.js +1 -1
  92. package/dist/esm/z-divider.entry.js +22 -0
  93. package/dist/esm/z-footer-link_3.entry.js +43 -0
  94. package/dist/esm/z-footer.entry.js +98 -0
  95. package/dist/esm/z-ghost-loading.entry.js +15 -0
  96. package/dist/esm/z-icon-package.entry.js +19 -0
  97. package/dist/esm/z-info-box.entry.js +21 -0
  98. package/dist/esm/z-link.entry.js +67 -0
  99. package/dist/esm/z-list_3.entry.js +220 -0
  100. package/dist/esm/z-logo.entry.js +24 -0
  101. package/dist/esm/z-menu-dropdown_2.entry.js +84 -0
  102. package/dist/esm/z-menu-section.entry.js +42 -0
  103. package/dist/esm/z-menu.entry.js +106 -0
  104. package/dist/esm/z-messages-pocket.entry.js +1 -1
  105. package/dist/esm/z-modal-login.entry.js +1 -1
  106. package/dist/esm/z-modal.entry.js +32 -0
  107. package/dist/esm/z-myz-card-alert.entry.js +59 -0
  108. package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
  109. package/dist/esm/z-myz-card-footer.entry.js +48 -0
  110. package/dist/esm/z-myz-card-icon.entry.js +17 -0
  111. package/dist/esm/z-myz-card-info.entry.js +2 -2
  112. package/dist/esm/z-myz-card-list.entry.js +33 -0
  113. package/dist/esm/z-myz-card_4.entry.js +94 -0
  114. package/dist/esm/z-myz-list-item.entry.js +33 -0
  115. package/dist/esm/z-myz-topbar.entry.js +1 -1
  116. package/dist/esm/z-navigation-tabs.entry.js +1 -1
  117. package/dist/esm/z-notification.entry.js +38 -0
  118. package/dist/esm/z-otp.entry.js +1 -1
  119. package/dist/esm/z-pagination-bar.entry.js +124 -0
  120. package/dist/esm/z-pagination-page.entry.js +21 -0
  121. package/dist/esm/z-panel-elem.entry.js +26 -0
  122. package/dist/esm/z-pocket_3.entry.js +4 -3
  123. package/dist/esm/z-registro-table-expanded-row.entry.js +15 -0
  124. package/dist/esm/z-slideshow.entry.js +2 -2
  125. package/dist/esm/z-status-tag.entry.js +25 -0
  126. package/dist/esm/z-stepper-item.entry.js +18 -0
  127. package/dist/esm/z-stepper.entry.js +15 -0
  128. package/dist/esm/z-toast-notification-list.entry.js +1 -1
  129. package/dist/esm/z-toast-notification.entry.js +3 -2
  130. package/dist/esm/z-toggle-button.entry.js +32 -0
  131. package/dist/esm/z-tooltip.entry.js +270 -0
  132. package/dist/esm/z-user-dropdown.entry.js +91 -0
  133. package/dist/types/beans/index.d.ts +7 -7
  134. package/dist/types/components.d.ts +17 -9
  135. package/dist/types/snowflakes/registro-table/z-registro-table-cell/index.d.ts +3 -0
  136. package/dist/types/snowflakes/registro-table/z-registro-table-header/index.d.ts +3 -3
  137. package/dist/web-components-library/index.esm.js +1 -1
  138. package/dist/web-components-library/p-01d11ec3.entry.js +1 -0
  139. package/dist/web-components-library/p-0455dc43.entry.js +1 -0
  140. package/dist/web-components-library/{p-fcf19092.entry.js → p-05f4fa42.entry.js} +1 -1
  141. package/dist/web-components-library/p-08158e57.entry.js +1 -0
  142. package/dist/web-components-library/p-0ce6293a.entry.js +1 -0
  143. package/dist/web-components-library/{p-65c08b33.js → p-0e6906af.js} +1 -1
  144. package/dist/web-components-library/p-0fe60379.entry.js +1 -0
  145. package/dist/web-components-library/p-10ad64bc.entry.js +1 -0
  146. package/dist/web-components-library/p-166a212e.entry.js +1 -0
  147. package/dist/web-components-library/p-18705ae9.entry.js +1 -0
  148. package/{www/build/p-9912e411.js → dist/web-components-library/p-1d371408.js} +2 -2
  149. package/dist/web-components-library/p-250926fe.entry.js +1 -0
  150. package/dist/web-components-library/p-255c9150.entry.js +1 -0
  151. package/dist/web-components-library/p-3247dee9.js +7 -0
  152. package/dist/web-components-library/{p-40972dfd.entry.js → p-34f4e805.entry.js} +1 -1
  153. package/dist/web-components-library/p-35fd465c.entry.js +1 -0
  154. package/dist/web-components-library/{p-d1fed95b.entry.js → p-400e26c7.entry.js} +1 -1
  155. package/dist/web-components-library/p-4a414eb2.entry.js +1 -0
  156. package/dist/web-components-library/p-4ce8c176.entry.js +1 -0
  157. package/dist/web-components-library/p-4f66fee4.js +1 -0
  158. package/dist/web-components-library/p-5bbbc979.entry.js +1 -0
  159. package/dist/web-components-library/{p-e64c06a4.entry.js → p-5e2762e6.entry.js} +1 -1
  160. package/dist/web-components-library/p-5fa8dc13.entry.js +1 -0
  161. package/dist/web-components-library/p-60e40371.entry.js +1 -0
  162. package/dist/web-components-library/p-6583cbec.entry.js +1 -0
  163. package/dist/web-components-library/p-71cc7ed0.entry.js +1 -0
  164. package/dist/web-components-library/p-74fb3d69.entry.js +1 -0
  165. package/dist/web-components-library/p-7e926220.entry.js +1 -0
  166. package/dist/web-components-library/p-80589729.entry.js +1 -0
  167. package/dist/web-components-library/p-82a59ded.entry.js +1 -0
  168. package/dist/web-components-library/p-880a50a6.entry.js +1 -0
  169. package/dist/web-components-library/p-94814f44.entry.js +1 -0
  170. package/dist/web-components-library/{p-8c24ac2e.entry.js → p-957f298f.entry.js} +1 -1
  171. package/dist/web-components-library/{p-d430b1aa.entry.js → p-9959e453.entry.js} +1 -1
  172. package/dist/web-components-library/p-9d9dc98f.entry.js +1 -0
  173. package/dist/web-components-library/p-a15f8b52.entry.js +1 -0
  174. package/dist/web-components-library/p-a7733104.entry.js +1 -0
  175. package/dist/web-components-library/{p-3ea97390.entry.js → p-a82c9a77.entry.js} +1 -1
  176. package/dist/web-components-library/p-aa0f7169.entry.js +1 -0
  177. package/dist/web-components-library/p-ac3bc4c2.entry.js +1 -0
  178. package/dist/web-components-library/p-b13d5b98.entry.js +1 -0
  179. package/dist/web-components-library/{p-6e8f444c.entry.js → p-b630127d.entry.js} +1 -1
  180. package/dist/web-components-library/p-b68038b5.js +1 -0
  181. package/dist/web-components-library/p-b78fb152.entry.js +1 -0
  182. package/dist/web-components-library/p-c92c3f20.entry.js +1 -0
  183. package/dist/web-components-library/p-cc6363b9.entry.js +1 -0
  184. package/dist/web-components-library/p-cf914ea7.entry.js +1 -0
  185. package/dist/web-components-library/p-cfebc80e.entry.js +1 -0
  186. package/dist/web-components-library/{p-0bf8988b.entry.js → p-d227a145.entry.js} +1 -1
  187. package/dist/web-components-library/p-d83eee10.entry.js +1 -0
  188. package/dist/web-components-library/p-db5863cf.entry.js +1 -0
  189. package/dist/web-components-library/p-e1f1f39e.entry.js +1 -0
  190. package/dist/web-components-library/{p-798d5c2f.entry.js → p-e29fe790.entry.js} +1 -1
  191. package/dist/web-components-library/p-ebcad010.entry.js +1 -0
  192. package/dist/web-components-library/p-f3354152.entry.js +1 -0
  193. package/dist/web-components-library/p-f77f6f60.entry.js +1 -0
  194. package/dist/web-components-library/p-f8446b1e.entry.js +1 -0
  195. package/dist/web-components-library/p-f90dd488.js +1 -0
  196. package/dist/web-components-library/p-fc47897e.entry.js +1 -0
  197. package/dist/web-components-library/p-fce08912.entry.js +1 -0
  198. package/dist/web-components-library/web-components-library.esm.js +1 -1
  199. package/package.json +1 -1
  200. package/www/build/index.esm.js +1 -1
  201. package/www/build/p-01d11ec3.entry.js +1 -0
  202. package/www/build/p-0455dc43.entry.js +1 -0
  203. package/www/build/{p-fcf19092.entry.js → p-05f4fa42.entry.js} +1 -1
  204. package/www/build/p-08158e57.entry.js +1 -0
  205. package/www/build/p-0ce6293a.entry.js +1 -0
  206. package/www/build/{p-65c08b33.js → p-0e6906af.js} +1 -1
  207. package/www/build/p-0fe60379.entry.js +1 -0
  208. package/www/build/p-10ad64bc.entry.js +1 -0
  209. package/www/build/p-166a212e.entry.js +1 -0
  210. package/www/build/p-18705ae9.entry.js +1 -0
  211. package/{dist/web-components-library/p-9912e411.js → www/build/p-1d371408.js} +2 -2
  212. package/www/build/p-250926fe.entry.js +1 -0
  213. package/www/build/p-255c9150.entry.js +1 -0
  214. package/www/build/p-3247dee9.js +7 -0
  215. package/www/build/{p-40972dfd.entry.js → p-34f4e805.entry.js} +1 -1
  216. package/www/build/p-35fd465c.entry.js +1 -0
  217. package/www/build/{p-d1fed95b.entry.js → p-400e26c7.entry.js} +1 -1
  218. package/www/build/p-4a414eb2.entry.js +1 -0
  219. package/www/build/p-4ce8c176.entry.js +1 -0
  220. package/www/build/p-4f66fee4.js +1 -0
  221. package/www/build/p-5bbbc979.entry.js +1 -0
  222. package/www/build/{p-e64c06a4.entry.js → p-5e2762e6.entry.js} +1 -1
  223. package/www/build/p-5fa8dc13.entry.js +1 -0
  224. package/www/build/p-60e40371.entry.js +1 -0
  225. package/www/build/p-6583cbec.entry.js +1 -0
  226. package/www/build/p-71cc7ed0.entry.js +1 -0
  227. package/www/build/p-74fb3d69.entry.js +1 -0
  228. package/www/build/p-7e926220.entry.js +1 -0
  229. package/www/build/p-80589729.entry.js +1 -0
  230. package/www/build/p-82a59ded.entry.js +1 -0
  231. package/www/build/p-880a50a6.entry.js +1 -0
  232. package/www/build/p-94814f44.entry.js +1 -0
  233. package/www/build/{p-8c24ac2e.entry.js → p-957f298f.entry.js} +1 -1
  234. package/www/build/{p-d430b1aa.entry.js → p-9959e453.entry.js} +1 -1
  235. package/www/build/p-9d9dc98f.entry.js +1 -0
  236. package/www/build/p-a15f8b52.entry.js +1 -0
  237. package/www/build/p-a7733104.entry.js +1 -0
  238. package/www/build/{p-3ea97390.entry.js → p-a82c9a77.entry.js} +1 -1
  239. package/www/build/p-aa0f7169.entry.js +1 -0
  240. package/www/build/p-ac3bc4c2.entry.js +1 -0
  241. package/www/build/p-b13d5b98.entry.js +1 -0
  242. package/www/build/{p-6e8f444c.entry.js → p-b630127d.entry.js} +1 -1
  243. package/www/build/p-b68038b5.js +1 -0
  244. package/www/build/p-b78fb152.entry.js +1 -0
  245. package/www/build/p-c92c3f20.entry.js +1 -0
  246. package/www/build/p-cc6363b9.entry.js +1 -0
  247. package/www/build/p-cf914ea7.entry.js +1 -0
  248. package/www/build/p-cfebc80e.entry.js +1 -0
  249. package/www/build/{p-0bf8988b.entry.js → p-d227a145.entry.js} +1 -1
  250. package/www/build/p-d83eee10.entry.js +1 -0
  251. package/www/build/p-db5863cf.entry.js +1 -0
  252. package/www/build/p-e1f1f39e.entry.js +1 -0
  253. package/www/build/{p-798d5c2f.entry.js → p-e29fe790.entry.js} +1 -1
  254. package/www/build/p-eaf64f7c.js +1 -0
  255. package/www/build/p-ebcad010.entry.js +1 -0
  256. package/www/build/p-f3354152.entry.js +1 -0
  257. package/www/build/p-f77f6f60.entry.js +1 -0
  258. package/www/build/p-f8446b1e.entry.js +1 -0
  259. package/www/build/p-f90dd488.js +1 -0
  260. package/www/build/p-fc47897e.entry.js +1 -0
  261. package/www/build/p-fce08912.entry.js +1 -0
  262. package/www/build/web-components-library.esm.js +1 -1
  263. package/www/index.html +2 -454
  264. package/dist/cjs/z-alert_66.cjs.entry.js +0 -3735
  265. package/dist/esm/z-alert_66.entry.js +0 -3666
  266. package/dist/web-components-library/p-04c73ec1.entry.js +0 -1
  267. package/dist/web-components-library/p-43d00d2f.entry.js +0 -1
  268. package/dist/web-components-library/p-57ceab75.entry.js +0 -7
  269. package/dist/web-components-library/p-881b4877.js +0 -1
  270. package/dist/web-components-library/p-b4420ba3.entry.js +0 -1
  271. package/www/build/p-002ed333.js +0 -1
  272. package/www/build/p-04c73ec1.entry.js +0 -1
  273. package/www/build/p-43d00d2f.entry.js +0 -1
  274. package/www/build/p-57ceab75.entry.js +0 -7
  275. package/www/build/p-881b4877.js +0 -1
  276. package/www/build/p-b4420ba3.entry.js +0 -1
@@ -0,0 +1,612 @@
1
+ import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-fa9e549c.js';
2
+ import { I as InputTypeEnum, k as keybordKeyCodeEnum, i as InputStatusEnum } from './index-09b57d95.js';
3
+ import { r as randomId, g as getElementTree, h as handleKeyboardSubmit, d as getClickedElement } from './utils-f0067254.js';
4
+ import './breakpoints-c386984e.js';
5
+
6
+ const stylesCss$4 = "button.container{min-height:32px;line-height:32px;border:var(--border-size-small) solid var(--bg-grey-200);border-radius:16px;box-shadow:0px 2px 5px 0px var(--bg-neutral-300);-webkit-box-shadow:0px 2px 5px 0px var(--bg-neutral-300);-moz-box-shadow:0px 2px 5px 0px var(--bg-neutral-300);text-align:center;padding:0 calc(var(--space-unit) * 2);cursor:pointer;letter-spacing:0.17px;font-family:var(--dashboard-font);font-size:12px;font-weight:var(--font-sb);opacity:1;transition:all 200ms linear}button.container.small{min-height:24px;line-height:24px}button.container:focus{outline:0}button.container::-moz-focus-inner{border:0}.text-container{margin-left:4px}button.container,button.container:focus,button.container:hover{background-color:var(--bg-white);color:var(--text-grey-700);fill:var(--text-grey-700)}button.container.isactive{background-color:var(--bg-white);color:var(--myz-blue);fill:var(--myz-blue)}button.container.isactive:hover{color:var(--myz-blue-dark);fill:var(--myz-blue-dark)}button.container.isactive:focus{background-color:var(--myz-blue-dark);border-color:var(--myz-blue-dark);box-shadow:0px 0px 4px 0px var(--text-grey-800);color:var(--bg-white);fill:var(--bg-white)}button z-icon{display:inline-block}";
7
+
8
+ const ZButtonFilter = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.removefilter = createEvent(this, "removefilter", 7);
12
+ /** disable action on button */
13
+ this.isfixed = false;
14
+ /** add icon to button */
15
+ this.hasicon = true;
16
+ /** reduce button size (optional) */
17
+ this.issmall = false;
18
+ this.handleRemovingFilterClick = this.handleRemovingFilterClick.bind(this);
19
+ }
20
+ handleRemovingFilterClick() {
21
+ this.removefilter.emit({
22
+ filterid: this.filterid,
23
+ });
24
+ }
25
+ renderFixedPillow(filtername) {
26
+ return (h("button", { class: `container ${this.issmall ? "small" : ""}` }, this.renderIcon(), this.renderContent(filtername)));
27
+ }
28
+ renderDynamicPillow(filtername) {
29
+ return (h("button", { class: `container isactive ${this.issmall ? "small" : ""}`, onClick: this.handleRemovingFilterClick }, this.renderIcon(), this.renderContent(filtername)));
30
+ }
31
+ renderIcon() {
32
+ if (!this.hasicon)
33
+ return null;
34
+ return (h("z-icon", { class: "close-icon-container", name: "multiply", height: 12, width: 12 }));
35
+ }
36
+ renderContent(filtername) {
37
+ return h("span", { class: "text-container" }, filtername);
38
+ }
39
+ render() {
40
+ if (this.isfixed) {
41
+ return this.renderFixedPillow(this.filtername);
42
+ }
43
+ return this.renderDynamicPillow(this.filtername);
44
+ }
45
+ };
46
+ ZButtonFilter.style = stylesCss$4;
47
+
48
+ const stylesCss$3 = ".sc-z-input-h{display:inline-block;width:inherit}input.sc-z-input::-ms-clear,input.sc-z-input::-ms-reveal{display:none}.sc-z-input-h input.sc-z-input::-ms-clear,.sc-z-input-h input.sc-z-input::-ms-reveal{display:none}input.sc-z-input,textarea.sc-z-input,.textareaWrapper.sc-z-input,ul[role=\"listbox\"].sc-z-input{background:var(--color-input-field01);border-radius:var(--border-radius-small);border:var(--border-size-small) solid var(--color-surface04);box-sizing:border-box;color:var(--color-text02);fill:var(--color-icon02);font-family:var(--font-family-sans);font-weight:var(--font-rg);font-size:var(--font-size-3);outline:none}input.sc-z-input:focus:focus-visible,li[role=\"option\"].sc-z-input:focus:focus-visible,.focus.sc-z-input{box-shadow:var(--shadow-focus-primary)}.filled.sc-z-input{border-color:var(--color-surface05)}.istyping.sc-z-input,.focus.istyping.sc-z-input,.input_selecting.sc-z-input{border-color:var(--color-primary01);color:var(--color-primary01)}.input_success.sc-z-input,.input_success.sc-z-input:hover,.input_success.hover.sc-z-input{background:var(--color-success-inverse);border-color:var(--color-success01);fill:var(--color-success01)}.input_error.sc-z-input,.input_error.sc-z-input:hover,.input_error.hover.sc-z-input{background:var(--color-error-inverse);border-color:var(--color-error01);fill:var(--color-error01)}.input_warning.sc-z-input,.input_warning.sc-z-input:hover,.input_warning.hover.sc-z-input{background:var(--color-warning-inverse);border-color:var(--color-warning01);fill:var(--color-warning01)}input[readonly].sc-z-input,.readonly.sc-z-input{border-color:var(--color-disabled01);fill:var(--color-disabled01);pointer-events:none}input.sc-z-input:disabled,.disabled.sc-z-input,.filled.sc-z-input:disabled{border-color:var(--color-disabled01);color:var(--color-disabled02);fill:var(--color-disabled01);pointer-events:none;box-shadow:none}input.sc-z-input::placeholder,textarea.sc-z-input::placeholder{color:var(--color-text05)}.sc-z-input::-webkit-input-placeholder,.sc-z-input::-webkit-textarea-placeholder{color:var(--color-text05)}.sc-z-input:-ms-input-placeholder,.sc-z-input:-ms-textarea-placeholder{color:var(--color-text05)}.sc-z-input::-moz-placeholder{color:var(--color-text05)}.sc-z-input:-moz-placeholder{color:var(--color-text05)}.textWrapper.sc-z-input>div.sc-z-input{fill:var(--color-icon02)}.textWrapper.sc-z-input>div.sc-z-input>input.sc-z-input{width:100%;height:calc(var(--space-unit) * 5.5);margin:0;padding:0 calc(var(--space-unit) * 4.5) 0 calc(var(--space-unit) * 1.5);box-sizing:border-box}.textWrapper.sc-z-input>div.sc-z-input>input.hasIcon.sc-z-input,.textWrapper.sc-z-input>div.sc-z-input>input.hasClearIcon.sc-z-input{padding-right:calc(var(--space-unit) * 4)}.textWrapper.sc-z-input>div.sc-z-input>input.hasIcon.hasClearIcon.sc-z-input{padding-right:calc(var(--space-unit) * 7)}.textWrapper.sc-z-input>div.sc-z-input{position:relative;z-index:1}.textWrapper.sc-z-input .iconsWrapper.sc-z-input{position:absolute;bottom:calc(var(--space-unit) * 1.5);right:calc(var(--space-unit) * 1.5);display:flex;z-index:2}.textWrapper.sc-z-input .iconsWrapper.sc-z-input>z-icon.sc-z-input{--z-icon-width:18px;--z-icon-height:18px;display:block;margin-left:calc(var(--space-unit) * 0.5)}.textWrapper.sc-z-input .iconsWrapper.sc-z-input>z-icon.resetIcon.sc-z-input,.textWrapper.sc-z-input .iconsWrapper.sc-z-input>z-icon.showHidePasswordIcon.sc-z-input{cursor:pointer}.textWrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill,.textWrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill:hover,.textWrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill:focus,.textWrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill:active{-webkit-background-clip:text !important}.textareaWrapper.sc-z-input{padding:calc(var(--space-unit) * 1.5);scrollbar-color:var(--color-primary01) transparent}textarea.sc-z-input::-webkit-scrollbar{background:linear-gradient(\n to right,\n transparent 0 3px,\n var(--gray200) 3px 7px,\n transparent 7px 10px\n );width:10px;border-radius:var(--border-radius)}textarea.sc-z-input::-webkit-scrollbar-track{background-color:transparent}textarea.sc-z-input::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}textarea.sc-z-input::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}textarea.sc-z-input{min-height:132px;width:100%;margin:0;padding:0;border:none;resize:none}.radioWrapper.sc-z-input,.checkboxWrapper.sc-z-input{display:inline-flex;flex-direction:row;align-items:center;font-family:var(--font-family-sans);position:relative;color:var(--color-text01);fill:var(--color-primary01)}.radioWrapper.sc-z-input:hover,.checkboxWrapper.sc-z-input:hover{color:var(--color-hover-primary);fill:currentColor}.radioWrapper.sc-z-input>input.sc-z-input,.checkboxWrapper.sc-z-input>input.sc-z-input{position:absolute;opacity:0;z-index:-1;pointer-events:none}.radioWrapper.sc-z-input .radioLabel.sc-z-input,.checkboxWrapper.sc-z-input .checkboxLabel.sc-z-input{display:inline-flex;align-items:center;margin:0;line-height:1;color:inherit;font-family:inherit;font-weight:inherit;font-size:inherit;text-transform:inherit}.radioWrapper.sc-z-input input.sc-z-input:not(:disabled)+.radioLabel.sc-z-input,.checkboxWrapper.sc-z-input input.sc-z-input:not(:disabled)+.checkboxLabel.sc-z-input{cursor:pointer}.radioWrapper.sc-z-input .radioLabel.sc-z-input z-icon.sc-z-input,.checkboxWrapper.sc-z-input .checkboxLabel.sc-z-input z-icon.sc-z-input{fill:inherit;cursor:pointer}.radioWrapper.sc-z-input .radioLabel.after.sc-z-input,.checkboxWrapper.sc-z-input .checkboxLabel.after.sc-z-input{flex-direction:row}.radioWrapper.sc-z-input .radioLabel.before.sc-z-input,.checkboxWrapper.sc-z-input .checkboxLabel.before.sc-z-input{flex-direction:row-reverse}.radioWrapper.sc-z-input .radioLabel.after.sc-z-input>span.sc-z-input,.checkboxWrapper.sc-z-input .checkboxLabel.after.sc-z-input>span.sc-z-input{margin-left:var(--space-unit)}.radioWrapper.sc-z-input .radioLabel.before.sc-z-input>span.sc-z-input,.checkboxWrapper.sc-z-input .checkboxLabel.before.sc-z-input>span.sc-z-input{margin-right:var(--space-unit)}.radioWrapper.sc-z-input>input.sc-z-input:focus:focus-visible+.radioLabel.sc-z-input>z-icon.sc-z-input,.checkboxWrapper.sc-z-input>input.sc-z-input:focus:focus-visible+.checkboxLabel.sc-z-input>z-icon.sc-z-input{box-shadow:var(--shadow-focus-primary);border-radius:var(--border-radius-small)}.radioWrapper.sc-z-input>input.sc-z-input:disabled+.radioLabel.sc-z-input,.checkboxWrapper.sc-z-input>input.sc-z-input:disabled+.checkboxLabel.sc-z-input{color:var(--color-disabled02)}.radioWrapper.sc-z-input>input.sc-z-input:disabled+.radioLabel.sc-z-input>z-icon.sc-z-input,.checkboxWrapper.sc-z-input>input.sc-z-input:disabled+.checkboxLabel.sc-z-input>z-icon.sc-z-input{fill:var(--color-disabled01);cursor:default}";
49
+
50
+ const ZInput = class {
51
+ constructor(hostRef) {
52
+ registerInstance(this, hostRef);
53
+ this.inputChange = createEvent(this, "inputChange", 7);
54
+ this.startTyping = createEvent(this, "startTyping", 7);
55
+ this.stopTyping = createEvent(this, "stopTyping", 7);
56
+ this.inputCheck = createEvent(this, "inputCheck", 7);
57
+ this.optionSelect = createEvent(this, "optionSelect", 7);
58
+ /** the id of the input element */
59
+ this.htmlid = `id-${randomId()}`;
60
+ /** the input is disabled */
61
+ this.disabled = false;
62
+ /** the input is readonly */
63
+ this.readonly = false;
64
+ /** the input is required (optional): available for text, password, number, email, textarea, checkbox */
65
+ this.required = false;
66
+ /** checked: available for checkbox, radio */
67
+ this.checked = false;
68
+ /** show input helper message (optional): available for text, password, number, email, textarea, select */
69
+ this.hasmessage = true;
70
+ /** the input label position: available for checkbox, radio */
71
+ this.labelafter = true;
72
+ /** timeout setting before trigger `inputChange` event (optional): available for text, textarea */
73
+ this.typingtimeout = 300;
74
+ /** multiple options can be selected (optional): available for select */
75
+ this.multiple = false;
76
+ /** render clear icon when typing (optional): available for text */
77
+ this.hasclearicon = true;
78
+ this.isTyping = false;
79
+ this.textareaWrapperHover = "";
80
+ this.textareaWrapperFocus = "";
81
+ this.passwordHidden = true;
82
+ }
83
+ inputCheckListener(e) {
84
+ const data = e.detail;
85
+ switch (this.type) {
86
+ case InputTypeEnum.radio:
87
+ if (data.type === InputTypeEnum.radio &&
88
+ data.name === this.name &&
89
+ data.id !== this.htmlid) {
90
+ this.checked = false;
91
+ }
92
+ default:
93
+ return;
94
+ }
95
+ }
96
+ /** get the input value */
97
+ async getValue() {
98
+ switch (this.type) {
99
+ case InputTypeEnum.select:
100
+ return this.selectElem.getValue();
101
+ default:
102
+ return this.value;
103
+ }
104
+ }
105
+ /** set the input value */
106
+ async setValue(value) {
107
+ switch (this.type) {
108
+ case InputTypeEnum.select:
109
+ this.selectElem.setValue(value);
110
+ break;
111
+ default:
112
+ if (typeof value === "string")
113
+ this.value = value;
114
+ break;
115
+ }
116
+ }
117
+ /** get checked status */
118
+ async isChecked() {
119
+ switch (this.type) {
120
+ case InputTypeEnum.checkbox:
121
+ case InputTypeEnum.radio:
122
+ return this.checked;
123
+ default:
124
+ return false;
125
+ }
126
+ }
127
+ emitInputChange(value, keycode) {
128
+ if (!this.isTyping) {
129
+ this.emitStartTyping();
130
+ }
131
+ let validity = {};
132
+ if (this.type === InputTypeEnum.textarea) {
133
+ validity = this.getValidity("textarea");
134
+ }
135
+ else {
136
+ validity = this.getValidity("input");
137
+ }
138
+ this.value = value;
139
+ this.inputChange.emit({ value, keycode, validity });
140
+ clearTimeout(this.timer);
141
+ this.timer = setTimeout(() => {
142
+ this.emitStopTyping(this.value, validity);
143
+ }, this.typingtimeout);
144
+ }
145
+ emitStartTyping() {
146
+ this.isTyping = true;
147
+ this.startTyping.emit();
148
+ }
149
+ emitStopTyping(value, validity) {
150
+ this.isTyping = false;
151
+ this.stopTyping.emit({
152
+ value: value,
153
+ validity: validity,
154
+ });
155
+ }
156
+ emitInputCheck(checked) {
157
+ this.inputCheck.emit({
158
+ id: this.htmlid,
159
+ checked: checked,
160
+ type: this.type,
161
+ name: this.name,
162
+ value: this.value,
163
+ validity: this.getValidity("input"),
164
+ });
165
+ }
166
+ getValidity(type) {
167
+ const input = this.hostElement.querySelector(type);
168
+ return input.validity;
169
+ }
170
+ /* START text/password/email/number */
171
+ getTextAttributes() {
172
+ const attr = {
173
+ id: this.htmlid,
174
+ name: this.name,
175
+ placeholder: this.placeholder,
176
+ value: this.value,
177
+ disabled: this.disabled,
178
+ readonly: this.readonly,
179
+ required: this.required,
180
+ title: this.htmltitle,
181
+ class: [
182
+ `input_${this.status || "default"}`,
183
+ this.isTyping && "istyping",
184
+ !this.isTyping && this.value && "filled",
185
+ ]
186
+ .filter(Boolean)
187
+ .join(" "),
188
+ onInput: (e) => this.emitInputChange(e.target.value, e.keyCode),
189
+ };
190
+ if (this.autocomplete) {
191
+ attr["autocomplete"] = this.autocomplete;
192
+ }
193
+ return attr;
194
+ }
195
+ renderInputText(type = InputTypeEnum.text) {
196
+ const attr = this.getTextAttributes();
197
+ if (this.icon || type === InputTypeEnum.password) {
198
+ attr.class += " hasIcon";
199
+ }
200
+ if (this.hasclearicon) {
201
+ attr.class += " hasClearIcon";
202
+ }
203
+ return (h("div", { class: "textWrapper" }, this.renderLabel(), h("div", null, h("input", Object.assign({ type: type === InputTypeEnum.password && !this.passwordHidden
204
+ ? InputTypeEnum.text
205
+ : type }, attr, { "aria-label": this.ariaLabel || this.label })), this.renderIcons()), this.renderMessage()));
206
+ }
207
+ renderLabel() {
208
+ if (!this.label)
209
+ return;
210
+ return (h("z-input-label", { htmlfor: this.htmlid, value: this.label, disabled: this.disabled, "aria-label": this.label, id: `${this.htmlid}_label` }));
211
+ }
212
+ renderIcons() {
213
+ return (h("span", { class: {
214
+ iconsWrapper: true,
215
+ disabled: this.disabled,
216
+ } }, this.renderResetIcon(), this.renderIcon()));
217
+ }
218
+ renderIcon() {
219
+ if (this.type === InputTypeEnum.password) {
220
+ return this.renderShowHidePassword();
221
+ }
222
+ if (!this.icon)
223
+ return;
224
+ return h("z-icon", { class: "inputIcon", name: this.icon });
225
+ }
226
+ renderResetIcon() {
227
+ if (!this.hasclearicon || !this.value || this.disabled || this.readonly)
228
+ return;
229
+ return (h("z-icon", { class: "resetIcon", name: "multiply", onClick: (e) => this.emitInputChange("", e.keyCode) }));
230
+ }
231
+ renderShowHidePassword() {
232
+ return (h("z-icon", { class: "showHidePasswordIcon", name: this.passwordHidden ? "view-filled" : "view-off-filled", onClick: () => (this.passwordHidden = !this.passwordHidden) }));
233
+ }
234
+ renderMessage() {
235
+ if (!this.hasmessage)
236
+ return;
237
+ return h("z-input-message", { message: this.message, status: this.status });
238
+ }
239
+ /* END text/password/email/number */
240
+ /* START textarea */
241
+ renderTextarea() {
242
+ const attributes = this.getTextAttributes();
243
+ return (h("div", { class: "textWrapper" }, this.renderLabel(), h("div", { class: [
244
+ "textareaWrapper",
245
+ attributes.class,
246
+ attributes.disabled && "disabled",
247
+ attributes.readonly && "readonly",
248
+ this.isTyping && "istyping",
249
+ this.textareaWrapperFocus,
250
+ this.textareaWrapperHover,
251
+ ]
252
+ .filter(Boolean)
253
+ .join(" ") }, h("textarea", Object.assign({}, attributes, { onFocus: () => (this.textareaWrapperFocus = "focus"), onBlur: () => (this.textareaWrapperFocus = ""), onMouseOver: () => (this.textareaWrapperHover = "hover"), onMouseOut: () => (this.textareaWrapperHover = ""), "aria-label": this.ariaLabel || this.label }))), this.renderMessage()));
254
+ }
255
+ /* END textarea */
256
+ handleCheck(ev) {
257
+ this.checked = ev.target.checked;
258
+ this.emitInputCheck(this.checked);
259
+ }
260
+ /* START checkbox */
261
+ renderCheckbox() {
262
+ return (h("div", { class: "checkboxWrapper" }, h("input", { id: this.htmlid, type: "checkbox", name: this.name, checked: this.checked, disabled: this.disabled, readonly: this.readonly, required: this.required, onChange: this.handleCheck.bind(this), value: this.value }), h("label", { htmlFor: this.htmlid, class: {
263
+ checkboxLabel: true,
264
+ after: this.labelafter,
265
+ before: !this.labelafter,
266
+ } }, h("z-icon", { name: this.checked ? "checkbox-checked" : "checkbox", "aria-hidden": "true" }), this.label && h("span", { innerHTML: this.label }))));
267
+ }
268
+ /* END checkbox */
269
+ /* START radio */
270
+ renderRadio() {
271
+ return (h("div", { class: "radioWrapper" }, h("input", { id: this.htmlid, type: "radio", name: this.name, checked: this.checked, disabled: this.disabled, readonly: this.readonly, onChange: this.handleCheck.bind(this), value: this.value }), h("label", { htmlFor: this.htmlid, class: {
272
+ radioLabel: true,
273
+ after: this.labelafter,
274
+ before: !this.labelafter,
275
+ } }, h("z-icon", { name: this.checked ? "radio-button-checked" : "radio-button", "aria-hidden": "true" }), this.label && h("span", { innerHTML: this.label }))));
276
+ }
277
+ /* END radio */
278
+ /* START select */
279
+ renderSelect() {
280
+ return (h("z-select", { htmlid: this.htmlid, items: this.items, name: this.name, label: this.label, "aria-label": this.ariaLabel, disabled: this.disabled, readonly: this.readonly, placeholder: this.placeholder, htmltitle: this.htmltitle, status: this.status, hasmessage: this.hasmessage, message: this.message, autocomplete: this.autocomplete, multiple: this.multiple, ref: (el) => (this.selectElem = el) }));
281
+ }
282
+ /* END select */
283
+ render() {
284
+ switch (this.type) {
285
+ case InputTypeEnum.text:
286
+ case InputTypeEnum.password:
287
+ case InputTypeEnum.number:
288
+ case InputTypeEnum.email:
289
+ return this.renderInputText(this.type);
290
+ case InputTypeEnum.textarea:
291
+ return this.renderTextarea();
292
+ case InputTypeEnum.checkbox:
293
+ return this.renderCheckbox();
294
+ case InputTypeEnum.radio:
295
+ return this.renderRadio();
296
+ case InputTypeEnum.select:
297
+ return this.renderSelect();
298
+ default:
299
+ return this.renderInputText();
300
+ }
301
+ }
302
+ get hostElement() { return getElement(this); }
303
+ };
304
+ ZInput.style = stylesCss$3;
305
+
306
+ const stylesCss$2 = "label{display:block;margin:var(--space-unit) 0;color:var(--color-text02);font-family:var(--font-family-sans);font-size:var(--font-size-1);font-weight:var(--font-sb);line-height:1.33;letter-spacing:0.32px;text-transform:uppercase;text-align:left}label.disabled{color:var(--color-disabled02)}";
307
+
308
+ const ZInputLabel = class {
309
+ constructor(hostRef) {
310
+ registerInstance(this, hostRef);
311
+ /** the label is disabled */
312
+ this.disabled = false;
313
+ }
314
+ render() {
315
+ return h("label", { htmlFor: this.htmlfor, class: { disabled: this.disabled } }, this.value);
316
+ }
317
+ };
318
+ ZInputLabel.style = stylesCss$2;
319
+
320
+ const stylesCss$1 = ":host{display:flex;align-items:start;min-height:calc(var(--space-unit) * 2);margin-top:var(--space-unit);color:var(--color-text05);fill:currentColor;font-family:var(--font-family-sans);font-size:var(--font-size-2);letter-spacing:0.16px}:host([status='success']){color:var(--color-text-success)}:host([status='error']){color:var(--color-text-error)}:host([status='warning']){color:var(--color-warning02)}:host(:focus){outline:none}:host>z-icon{--z-icon-width:calc(var(--space-unit) * 2);--z-icon-height:calc(var(--space-unit) * 2);margin:calc(var(--space-unit) / 3) var(--space-unit) 0 0}";
321
+
322
+ const ZInputMessage = class {
323
+ constructor(hostRef) {
324
+ registerInstance(this, hostRef);
325
+ this.statusIcons = {
326
+ success: "checkmark-circle",
327
+ error: "multiply-circled",
328
+ warning: "exclamation-circle",
329
+ };
330
+ }
331
+ render() {
332
+ return (h(Host, { role: "alert", "aria-label": this.message, tabindex: this.message ? 0 : -1 }, this.statusIcons[this.status] && this.message && (h("z-icon", { name: this.statusIcons[this.status] })), h("span", { innerHTML: this.message })));
333
+ }
334
+ };
335
+ ZInputMessage.style = stylesCss$1;
336
+
337
+ const stylesCss = ".sc-z-select-h{display:inline-block;width:inherit}li[role=\"option\"].sc-z-select:focus:focus-visible{border-color:transparent;box-shadow:var(--shadow-focus-primary);outline:none}.selectWrapper.sc-z-select>z-input.sc-z-select{width:100%}.selectWrapper.sc-z-select>div.sc-z-select{position:relative}.selectWrapper.sc-z-select>div.closed.sc-z-select{height:0;overflow:hidden}.selectWrapper.sc-z-select .ulScrollWrapper.sc-z-select{background:var(--color-surface01);position:absolute;padding:calc(var(--space-unit) * .5) var(--space-unit);border:var(--border-size-small) solid var(--gray200);border-top:none;width:100%;box-sizing:border-box;outline:none}.selectWrapper.sc-z-select .closed.sc-z-select .ulScrollWrapper.sc-z-select{z-index:10}.selectWrapper.sc-z-select .open.sc-z-select .ulScrollWrapper.sc-z-select{z-index:20}.selectWrapper.sc-z-select .ulScrollWrapper.sc-z-select>ul.sc-z-select{position:relative;margin:0;padding:0;list-style:none;border:0;max-height:240px;overflow:auto;outline:none;scrollbar-color:var(--color-primary01) transparent}.selectWrapper.sc-z-select .ulScrollWrapper.sc-z-select>ul.sc-z-select::-webkit-scrollbar{background:linear-gradient(\n to right,\n transparent 0 3px,\n var(--gray200) 3px 7px,\n transparent 7px 10px\n );width:10px;border-radius:var(--border-radius)}.selectWrapper.sc-z-select .ulScrollWrapper.sc-z-select>ul.sc-z-select::-webkit-scrollbar-track{background-color:transparent}.selectWrapper.sc-z-select .ulScrollWrapper.sc-z-select>ul.sc-z-select::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.selectWrapper.sc-z-select .ulScrollWrapper.sc-z-select>ul.sc-z-select::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.selectWrapper.sc-z-select .ulScrollWrapper.sc-z-select ul.sc-z-select li.sc-z-select{display:flex;align-items:center;min-height:calc(var(--space-unit) * 5.5);padding:calc(var(--space-unit) * 1.5);box-sizing:border-box;border-bottom:var(--border-size-small) solid var(--gray200);text-align:left;cursor:pointer}.selectWrapper.sc-z-select .ulScrollWrapper.sc-z-select ul.sc-z-select li.sc-z-select:hover{color:var(--color-hover-primary);background:var(--color-surface02)}.selectWrapper.sc-z-select .ulScrollWrapper.sc-z-select ul.sc-z-select li.sc-z-select:focus:focus-visible{margin:2px}.selectWrapper.sc-z-select .ulScrollWrapper.sc-z-select ul.sc-z-select li[aria-selected=\"\"].sc-z-select{font-weight:var(--font-sb)}.selectWrapper.sc-z-select .ulScrollWrapper.sc-z-select ul.sc-z-select li.disabled.sc-z-select{color:var(--color-disabled02);cursor:default;pointer-events:none}.selectWrapper.sc-z-select .ulScrollWrapper.sc-z-select ul.sc-z-select li.noResults.sc-z-select{color:var(--color-primary01);fill:currentColor;border:none}.selectWrapper.sc-z-select .ulScrollWrapper.sc-z-select .noResults.sc-z-select z-icon.sc-z-select{margin-right:var(--space-unit)}.selectWrapper.sc-z-select .chipsWrapper.sc-z-select{padding-bottom:var(--space-unit)}.selectWrapper.sc-z-select .chipsWrapper.sc-z-select z-button-filter.sc-z-select{display:inline-block;margin:calc(var(--space-unit) * 0.5)}";
338
+
339
+ const ZSelect = class {
340
+ constructor(hostRef) {
341
+ registerInstance(this, hostRef);
342
+ this.optionSelect = createEvent(this, "optionSelect", 7);
343
+ /** the id of the input element */
344
+ this.htmlid = `id-${randomId()}`;
345
+ /** the input is disabled */
346
+ this.disabled = false;
347
+ /** the input is readonly */
348
+ this.readonly = false;
349
+ /** show input helper message (optional): available for text, password, number, email, textarea, select */
350
+ this.hasmessage = true;
351
+ /** the input has autocomplete option */
352
+ this.autocomplete = false;
353
+ /** multiple options can be selected */
354
+ this.multiple = false;
355
+ /** no result text message */
356
+ this.noresultslabel = "Nessun risultato";
357
+ this.isOpen = false;
358
+ this.itemsList = [];
359
+ this.toggleSelectUl = this.toggleSelectUl.bind(this);
360
+ this.selectItem = this.selectItem.bind(this);
361
+ this.handleSelectFocus = this.handleSelectFocus.bind(this);
362
+ }
363
+ watchItems() {
364
+ this.itemsList = this.getInitialItemsArray();
365
+ this.selectedItems = this.itemsList.filter((item) => item.selected);
366
+ }
367
+ /** get the input selected options */
368
+ async getSelectedItems() {
369
+ return this.selectedItems;
370
+ }
371
+ /** get the input value */
372
+ async getValue() {
373
+ return this.getSelectedValues();
374
+ }
375
+ /** set the input value */
376
+ async setValue(value) {
377
+ let values = [];
378
+ if (typeof value === "string") {
379
+ values.push(value);
380
+ }
381
+ else {
382
+ values = value;
383
+ }
384
+ this.selectedItems = this.itemsList.filter((item) => values.includes(item.id));
385
+ }
386
+ emitOptionSelect() {
387
+ this.optionSelect.emit({
388
+ id: this.htmlid,
389
+ selected: this.getSelectedValues(),
390
+ });
391
+ }
392
+ componentWillLoad() {
393
+ this.watchItems();
394
+ }
395
+ componentWillRender() {
396
+ this.filterItems(this.searchString);
397
+ }
398
+ getInitialItemsArray() {
399
+ return typeof this.items === "string" ? JSON.parse(this.items) : this.items;
400
+ }
401
+ mapSelectedItemsToItemsArray() {
402
+ const initialItemsList = this.getInitialItemsArray();
403
+ return initialItemsList.map((item) => {
404
+ const found = this.selectedItems.find((selected) => selected.id === item.id);
405
+ item.selected = !!found;
406
+ return item;
407
+ });
408
+ }
409
+ getSelectedValues() {
410
+ if (this.multiple) {
411
+ return this.selectedItems.map((item) => item.id);
412
+ }
413
+ if (!this.multiple && this.selectedItems.length) {
414
+ return this.selectedItems[0].id;
415
+ }
416
+ return null;
417
+ }
418
+ filterItems(searchString) {
419
+ const prevList = this.mapSelectedItemsToItemsArray();
420
+ if (!(searchString === null || searchString === void 0 ? void 0 : searchString.length)) {
421
+ this.itemsList = prevList;
422
+ }
423
+ else {
424
+ this.itemsList = prevList
425
+ .filter((item) => {
426
+ return item.name.toUpperCase().includes(searchString.toUpperCase());
427
+ })
428
+ .map((item) => {
429
+ const start = item.name
430
+ .toUpperCase()
431
+ .indexOf(searchString.toUpperCase());
432
+ const end = start + searchString.length;
433
+ const newName = item.name.substring(0, start) +
434
+ item.name.substring(start, end).bold() +
435
+ item.name.substring(end, item.name.length);
436
+ item.name = newName;
437
+ return item;
438
+ });
439
+ }
440
+ }
441
+ hasAutcomplete() {
442
+ return (this.autocomplete === true ||
443
+ this.autocomplete === "true" ||
444
+ this.autocomplete === "on");
445
+ }
446
+ handleInputChange(e) {
447
+ this.searchString = e.detail.value;
448
+ if (!this.isOpen)
449
+ this.toggleSelectUl();
450
+ }
451
+ selectItem(item, selected) {
452
+ if (item && item.disabled)
453
+ return;
454
+ this.itemsList = this.mapSelectedItemsToItemsArray();
455
+ this.itemsList = this.itemsList.map((i) => {
456
+ if (!this.multiple)
457
+ i.selected = false;
458
+ if (i.id === (item ? item.id : null))
459
+ i.selected = selected;
460
+ return i;
461
+ });
462
+ this.selectedItems = this.itemsList.filter((item) => item.selected);
463
+ this.emitOptionSelect();
464
+ if (this.searchString)
465
+ this.searchString = null;
466
+ }
467
+ arrowsSelectNav(e, key) {
468
+ const arrows = [keybordKeyCodeEnum.ARROW_DOWN, keybordKeyCodeEnum.ARROW_UP];
469
+ if (!arrows.includes(e.keyCode))
470
+ return;
471
+ e.preventDefault();
472
+ e.stopPropagation();
473
+ if (!this.isOpen)
474
+ this.toggleSelectUl();
475
+ let index;
476
+ if (e.keyCode === keybordKeyCodeEnum.ARROW_DOWN) {
477
+ index = key + 1 === this.itemsList.length ? 0 : key + 1;
478
+ }
479
+ else if (e.keyCode === keybordKeyCodeEnum.ARROW_UP) {
480
+ index = key <= 0 ? this.itemsList.length - 1 : key - 1;
481
+ }
482
+ this.focusSelectItem(index);
483
+ }
484
+ focusSelectItem(index) {
485
+ const focusElem = this.element.querySelector(`#${this.htmlid}_${index}`);
486
+ if (focusElem)
487
+ focusElem.focus();
488
+ }
489
+ toggleSelectUl(selfFocusOnClose = false) {
490
+ if (this.disabled || this.readonly)
491
+ return;
492
+ if (!this.isOpen) {
493
+ document.addEventListener("click", this.handleSelectFocus);
494
+ document.addEventListener("keyup", this.handleSelectFocus);
495
+ }
496
+ else {
497
+ document.removeEventListener("click", this.handleSelectFocus);
498
+ document.removeEventListener("keyup", this.handleSelectFocus);
499
+ if (selfFocusOnClose) {
500
+ this.element
501
+ .querySelector(`#${this.htmlid}_input`)
502
+ .focus();
503
+ }
504
+ }
505
+ this.isOpen = !this.isOpen;
506
+ }
507
+ handleInputClick(e) {
508
+ const cp = e.composedPath();
509
+ const clearIcon = cp.find((item) => item.classList && item.classList.contains("resetIcon"));
510
+ if (clearIcon) {
511
+ e.stopPropagation();
512
+ return;
513
+ }
514
+ this.toggleSelectUl();
515
+ }
516
+ handleSelectFocus(e) {
517
+ if (e instanceof KeyboardEvent && e.keyCode === keybordKeyCodeEnum.ESC) {
518
+ e.stopPropagation();
519
+ return this.toggleSelectUl(true);
520
+ }
521
+ if (e instanceof KeyboardEvent &&
522
+ e.keyCode !== keybordKeyCodeEnum.TAB &&
523
+ e.keyCode !== keybordKeyCodeEnum.ENTER) {
524
+ return;
525
+ }
526
+ const tree = getElementTree(getClickedElement());
527
+ const parent = tree.find((elem) => {
528
+ return ((elem.nodeName.toLowerCase() === "z-input" &&
529
+ elem.id === `${this.htmlid}_input`) ||
530
+ (this.multiple &&
531
+ elem.nodeName.toLowerCase() === "ul" &&
532
+ elem.id === this.htmlid));
533
+ });
534
+ if (!parent) {
535
+ this.toggleSelectUl(e instanceof MouseEvent ? true : false);
536
+ }
537
+ }
538
+ scrollToLetter(letter) {
539
+ const foundItem = this.itemsList.find((item) => item.name.charAt(0) === letter);
540
+ if (foundItem)
541
+ this.focusSelectItem(this.itemsList.indexOf(foundItem));
542
+ }
543
+ renderLabel() {
544
+ if (!this.label)
545
+ return;
546
+ return (h("z-input-label", { htmlfor: this.htmlid, value: this.label, disabled: this.disabled, "aria-label": this.label, id: `${this.htmlid}_input_label` }));
547
+ }
548
+ renderInput() {
549
+ return (h("z-input", { id: `${this.htmlid}_input`, htmlid: `${this.htmlid}_input`, placeholder: this.placeholder, value: !this.isOpen && !this.multiple && this.selectedItems.length
550
+ ? this.selectedItems[0].name.replace(/<[^>]+>/g, "")
551
+ : null, "aria-label": this.ariaLabel, icon: this.isOpen ? "caret-up" : "caret-down", hasclearicon: this.hasAutcomplete(), hasmessage: false, disabled: this.disabled, readonly: this.readonly || (!this.hasAutcomplete() && this.isOpen), status: this.isOpen ? InputStatusEnum.selecting : this.status, onClick: (e) => {
552
+ this.handleInputClick(e);
553
+ }, onKeyUp: (e) => {
554
+ if (e.keyCode !== 13)
555
+ e.preventDefault();
556
+ handleKeyboardSubmit(e, this.toggleSelectUl);
557
+ }, onKeyDown: (e) => {
558
+ return this.arrowsSelectNav(e, this.selectedItems.length
559
+ ? this.itemsList.indexOf(this.selectedItems[0])
560
+ : -1);
561
+ }, onInputChange: (e) => {
562
+ this.handleInputChange(e);
563
+ }, onKeyPress: (e) => {
564
+ if (!this.hasAutcomplete()) {
565
+ e.preventDefault();
566
+ this.scrollToLetter(String.fromCharCode(e.keyCode));
567
+ }
568
+ } }));
569
+ }
570
+ renderChips() {
571
+ if (!this.multiple || !this.selectedItems.length)
572
+ return;
573
+ return (h("div", { class: `chipsWrapper ${this.isOpen ? "open" : ""}` }, this.selectedItems.map((item) => (h("z-button-filter", { filterid: item.id, filtername: item.name.replace(/<[^>]+>/g, ""), issmall: true, onRemovefilter: () => this.selectItem(item, false) })))));
574
+ }
575
+ renderSelectUl() {
576
+ return (h("div", { class: this.isOpen ? "open" : "closed", tabindex: "-1" }, h("div", { class: "ulScrollWrapper", tabindex: "-1" }, h("ul", { role: "listbox", tabindex: this.disabled || this.readonly || !this.isOpen ? -1 : 0, id: this.htmlid, "aria-activedescendant": !this.multiple && this.selectedItems.length
577
+ ? this.selectedItems[0].id
578
+ : null, "aria-multiselectable": !!this.multiple, class: `
579
+ ${this.disabled ? " disabled" : ""}
580
+ ${this.readonly ? " readonly" : ""}
581
+ ${!this.isOpen && this.status
582
+ ? " input_" + this.status
583
+ : " input_default"}
584
+ ${this.selectedItems.length ? " filled" : ""}
585
+ ` }, this.renderSelectUlItems()))));
586
+ }
587
+ renderSelectUlItems() {
588
+ if (!this.itemsList.length)
589
+ return this.renderNoSearchResults();
590
+ return this.itemsList.map((item, key) => {
591
+ return (h("li", { role: "option", tabindex: item.disabled || !this.isOpen ? -1 : 0, "aria-selected": !!item.selected, class: item.disabled && "disabled", id: `${this.htmlid}_${key}`, onClick: () => this.selectItem(item, true), onKeyUp: (e) => handleKeyboardSubmit(e, this.selectItem, item, true), onKeyDown: (e) => this.arrowsSelectNav(e, key) }, h("span", { innerHTML: item.name })));
592
+ });
593
+ }
594
+ renderNoSearchResults() {
595
+ return (h("li", { class: "noResults" }, h("z-icon", { name: "multiply-circle" }), this.noresultslabel));
596
+ }
597
+ renderMessage() {
598
+ if (!this.hasmessage)
599
+ return;
600
+ return h("z-input-message", { message: this.message, status: this.status });
601
+ }
602
+ render() {
603
+ return (h("div", { class: "selectWrapper" }, this.renderLabel(), this.renderChips(), this.renderInput(), this.renderSelectUl(), this.renderMessage()));
604
+ }
605
+ get element() { return getElement(this); }
606
+ static get watchers() { return {
607
+ "items": ["watchItems"]
608
+ }; }
609
+ };
610
+ ZSelect.style = stylesCss;
611
+
612
+ export { ZButtonFilter as z_button_filter, ZInput as z_input, ZInputLabel as z_input_label, ZInputMessage as z_input_message, ZSelect as z_select };
@@ -0,0 +1,50 @@
1
+ import { r as registerInstance, c as createEvent, h } from './index-fa9e549c.js';
2
+ import { t as tabletBreakpoint } from './breakpoints-c386984e.js';
3
+
4
+ const stylesCss = ":host,button{max-width:100%}button{height:36px;border:var(--border-size-medium) solid var(--myz-blue);border-radius:var(--border-radius);color:var(--myz-blue);fill:var(--myz-blue);background-color:var(--bg-white);outline:none;padding:0 var(--space-unit);cursor:pointer}button::-moz-focus-inner{border:0}button:hover{border-color:var(--myz-blue-dark);color:var(--myz-blue-dark);fill:var(--myz-blue-dark)}button:focus{border-color:var(--myz-blue);color:var(--myz-blue);fill:var(--myz-blue);box-shadow:0px 0px 2px 2px var(--accent-dark)}button:active{border-color:var(--myz-blue-light);color:var(--myz-blue-light);fill:var(--myz-blue-light);box-shadow:0px 2px 4px 0px rgba(0, 0, 0, 0.4)}button.selected{border-color:var(--myz-blue-dark);background-color:var(--myz-blue-dark);color:var(--bg-white);fill:var(--bg-white)}button>label{cursor:pointer;font-family:var(--dashboard-font);font-weight:var(--font-sb);font-size:14px;display:flex;align-items:center}button>label>span.ellipsis{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin:0;padding:0}button>label>span.counter{margin-left:calc(var(--space-unit) / 2);margin-right:calc(var(--space-unit) * 2)}button>label>span.sort{margin-right:var(--half-x1);white-space:nowrap}button>span{font-family:var(--dashboard-font);font-weight:var(--font-rg);font-size:14px;margin-right:calc(var(--space-unit) * 0.5)}button>z-icon{padding-top:calc(var(--space-unit) * 0.5)}@media only screen and (min-width: 768px){:host,button{max-width:325px}}@media only screen and (min-width: 1025px){:host,button{max-width:490px}}";
5
+
6
+ const ZButtonSort = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.buttonSortClick = createEvent(this, "buttonSortClick", 7);
10
+ /** sort label content (ascending) (optional) */
11
+ this.sortlabelasc = "A-Z";
12
+ /** sort label content (descending) (optional) */
13
+ this.sortlabeldesc = "Z-A";
14
+ /** selected flag (optional) */
15
+ this.isselected = false;
16
+ /** sortable flag (optional) */
17
+ this.sortasc = true;
18
+ this.allowTooltip = false;
19
+ }
20
+ emitButtonSortClick() {
21
+ if (!this.isselected) {
22
+ this.isselected = true;
23
+ }
24
+ else {
25
+ this.sortasc = !this.sortasc;
26
+ }
27
+ this.buttonSortClick.emit({
28
+ buttonid: this.buttonid,
29
+ sortAsc: this.sortasc,
30
+ });
31
+ }
32
+ componentDidLoad() {
33
+ if (this.elementHasEllipsis() && window.innerWidth > tabletBreakpoint)
34
+ this.allowTooltip = true;
35
+ }
36
+ setButtonTitle() {
37
+ return this.allowTooltip
38
+ ? `${this.sortasc ? this.label : this.desclabel}`
39
+ : "";
40
+ }
41
+ elementHasEllipsis() {
42
+ return this.ellipsis.offsetWidth < this.ellipsis.scrollWidth;
43
+ }
44
+ render() {
45
+ return (h("button", { title: this.setButtonTitle(), id: this.buttonid, class: this.isselected && "selected", onClick: () => this.emitButtonSortClick() }, h("label", null, h("span", { ref: (el) => (this.ellipsis = el), class: "ellipsis" }, !this.sortasc && this.desclabel ? this.desclabel : this.label), h("span", { class: "counter" }, this.counter && ` (${this.counter})`), h("span", { class: "sort" }, this.sortasc ? this.sortlabelasc : this.sortlabeldesc), h("z-icon", { name: "caret-up-down", width: 16, height: 16 }))));
46
+ }
47
+ };
48
+ ZButtonSort.style = stylesCss;
49
+
50
+ export { ZButtonSort as z_button_sort };