@oiz/stzh-components 2.12.0-beta2 → 2.13.0-beta1

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 (233) hide show
  1. package/dist/cjs/{app-globals-b9d20033.js → app-globals-6831ae97.js} +2 -2
  2. package/dist/cjs/{app-globals-b9d20033.js.map → app-globals-6831ae97.js.map} +1 -1
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/stzh-actionset_4.cjs.entry.js +4 -2
  5. package/dist/cjs/stzh-actionset_4.cjs.entry.js.map +1 -1
  6. package/dist/cjs/stzh-badge_3.cjs.entry.js +2 -1
  7. package/dist/cjs/stzh-badge_3.cjs.entry.js.map +1 -1
  8. package/dist/cjs/stzh-chip_2.cjs.entry.js +2 -1
  9. package/dist/cjs/stzh-chip_2.cjs.entry.js.map +1 -1
  10. package/dist/cjs/stzh-components.cjs.js +2 -2
  11. package/dist/cjs/stzh-datalist_2.cjs.entry.js +1 -1
  12. package/dist/cjs/stzh-datalist_2.cjs.entry.js.map +1 -1
  13. package/dist/cjs/stzh-dropdown.cjs.entry.js +37 -4
  14. package/dist/cjs/stzh-dropdown.cjs.entry.js.map +1 -1
  15. package/dist/cjs/stzh-input.cjs.entry.js +2 -2
  16. package/dist/cjs/stzh-input.cjs.entry.js.map +1 -1
  17. package/dist/cjs/stzh-link.cjs.entry.js +2 -1
  18. package/dist/cjs/stzh-link.cjs.entry.js.map +1 -1
  19. package/dist/cjs/stzh-menu_2.cjs.entry.js +2 -1
  20. package/dist/cjs/stzh-menu_2.cjs.entry.js.map +1 -1
  21. package/dist/cjs/stzh-progressbar-item.cjs.entry.js +2 -1
  22. package/dist/cjs/stzh-progressbar-item.cjs.entry.js.map +1 -1
  23. package/dist/cjs/stzh-skiplink.cjs.entry.js +2 -1
  24. package/dist/cjs/stzh-skiplink.cjs.entry.js.map +1 -1
  25. package/dist/cjs/stzh-upload.cjs.entry.js +16 -2
  26. package/dist/cjs/stzh-upload.cjs.entry.js.map +1 -1
  27. package/dist/collection/components/stzh-actionset/stzh-actionset.js.map +1 -1
  28. package/dist/collection/components/stzh-button/stzh-button.js +2 -1
  29. package/dist/collection/components/stzh-button/stzh-button.js.map +1 -1
  30. package/dist/collection/components/stzh-card/stzh-card.css +3 -3
  31. package/dist/collection/components/stzh-card/stzh-card.js +3 -1
  32. package/dist/collection/components/stzh-card/stzh-card.js.map +1 -1
  33. package/dist/collection/components/stzh-chip/stzh-chip.js +2 -1
  34. package/dist/collection/components/stzh-chip/stzh-chip.js.map +1 -1
  35. package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.css +1 -0
  36. package/dist/collection/components/stzh-dropdown/stzh-dropdown.js +53 -1
  37. package/dist/collection/components/stzh-dropdown/stzh-dropdown.js.map +1 -1
  38. package/dist/collection/components/stzh-input/stzh-input.css +6 -0
  39. package/dist/collection/components/stzh-input/stzh-input.js +4 -4
  40. package/dist/collection/components/stzh-input/stzh-input.js.map +1 -1
  41. package/dist/collection/components/stzh-link/stzh-link.js +2 -1
  42. package/dist/collection/components/stzh-link/stzh-link.js.map +1 -1
  43. package/dist/collection/components/stzh-menu-item/stzh-menu-item.js +2 -1
  44. package/dist/collection/components/stzh-menu-item/stzh-menu-item.js.map +1 -1
  45. package/dist/collection/components/stzh-progressbar-item/stzh-progressbar-item.js +2 -1
  46. package/dist/collection/components/stzh-progressbar-item/stzh-progressbar-item.js.map +1 -1
  47. package/dist/collection/components/stzh-skiplink/stzh-skiplink.js +2 -1
  48. package/dist/collection/components/stzh-skiplink/stzh-skiplink.js.map +1 -1
  49. package/dist/collection/components/stzh-upload/stzh-upload.css +1 -1
  50. package/dist/collection/components/stzh-upload/stzh-upload.js +15 -3
  51. package/dist/collection/components/stzh-upload/stzh-upload.js.map +1 -1
  52. package/dist/collection/libraries/dropzone/dropzone-amd-module.js +7 -1
  53. package/dist/collection/libraries/dropzone/dropzone.js +7 -1
  54. package/dist/collection/libraries/dropzone/min/dropzone-amd-module.min.js +1 -1
  55. package/dist/collection/libraries/dropzone/min/dropzone.min.js +1 -1
  56. package/dist/collection/libraries/tom-select/cjs/tom-select.complete.js +8 -4
  57. package/dist/collection/libraries/tom-select/cjs/tom-select.js +8 -4
  58. package/dist/collection/libraries/tom-select/cjs/tom-select.popular.js +8 -4
  59. package/dist/collection/libraries/tom-select/esm/tom-select.complete.js +8 -4
  60. package/dist/collection/libraries/tom-select/esm/tom-select.js +8 -4
  61. package/dist/collection/libraries/tom-select/esm/tom-select.popular.js +8 -4
  62. package/dist/collection/libraries/tom-select/js/tom-select.base.js +8 -4
  63. package/dist/collection/libraries/tom-select/js/tom-select.base.min.js +34 -34
  64. package/dist/collection/libraries/tom-select/js/tom-select.complete.js +8 -4
  65. package/dist/collection/libraries/tom-select/js/tom-select.complete.min.js +19 -19
  66. package/dist/collection/libraries/tom-select/js/tom-select.popular.js +8 -4
  67. package/dist/collection/libraries/tom-select/js/tom-select.popular.min.js +31 -31
  68. package/dist/components/index.js +1 -1
  69. package/dist/components/stzh-actionset2.js.map +1 -1
  70. package/dist/components/stzh-button2.js +2 -1
  71. package/dist/components/stzh-button2.js.map +1 -1
  72. package/dist/components/stzh-card2.js +4 -2
  73. package/dist/components/stzh-card2.js.map +1 -1
  74. package/dist/components/stzh-chip2.js +2 -1
  75. package/dist/components/stzh-chip2.js.map +1 -1
  76. package/dist/components/stzh-datalist-item2.js +1 -1
  77. package/dist/components/stzh-datalist-item2.js.map +1 -1
  78. package/dist/components/stzh-dropdown2.js +39 -5
  79. package/dist/components/stzh-dropdown2.js.map +1 -1
  80. package/dist/components/stzh-input2.js +3 -3
  81. package/dist/components/stzh-input2.js.map +1 -1
  82. package/dist/components/stzh-link2.js +2 -1
  83. package/dist/components/stzh-link2.js.map +1 -1
  84. package/dist/components/stzh-menu-item2.js +2 -1
  85. package/dist/components/stzh-menu-item2.js.map +1 -1
  86. package/dist/components/stzh-progressbar-item2.js +2 -1
  87. package/dist/components/stzh-progressbar-item2.js.map +1 -1
  88. package/dist/components/stzh-skiplink.js +2 -1
  89. package/dist/components/stzh-skiplink.js.map +1 -1
  90. package/dist/components/stzh-upload.js +18 -2
  91. package/dist/components/stzh-upload.js.map +1 -1
  92. package/dist/esm/{app-globals-0cf2577d.js → app-globals-c1cfb228.js} +2 -2
  93. package/dist/esm/{app-globals-0cf2577d.js.map → app-globals-c1cfb228.js.map} +1 -1
  94. package/dist/esm/loader.js +2 -2
  95. package/dist/esm/stzh-actionset_4.entry.js +4 -2
  96. package/dist/esm/stzh-actionset_4.entry.js.map +1 -1
  97. package/dist/esm/stzh-badge_3.entry.js +2 -1
  98. package/dist/esm/stzh-badge_3.entry.js.map +1 -1
  99. package/dist/esm/stzh-chip_2.entry.js +2 -1
  100. package/dist/esm/stzh-chip_2.entry.js.map +1 -1
  101. package/dist/esm/stzh-components.js +2 -2
  102. package/dist/esm/stzh-datalist_2.entry.js +1 -1
  103. package/dist/esm/stzh-datalist_2.entry.js.map +1 -1
  104. package/dist/esm/stzh-dropdown.entry.js +37 -4
  105. package/dist/esm/stzh-dropdown.entry.js.map +1 -1
  106. package/dist/esm/stzh-input.entry.js +2 -2
  107. package/dist/esm/stzh-input.entry.js.map +1 -1
  108. package/dist/esm/stzh-link.entry.js +2 -1
  109. package/dist/esm/stzh-link.entry.js.map +1 -1
  110. package/dist/esm/stzh-menu_2.entry.js +2 -1
  111. package/dist/esm/stzh-menu_2.entry.js.map +1 -1
  112. package/dist/esm/stzh-progressbar-item.entry.js +2 -1
  113. package/dist/esm/stzh-progressbar-item.entry.js.map +1 -1
  114. package/dist/esm/stzh-skiplink.entry.js +2 -1
  115. package/dist/esm/stzh-skiplink.entry.js.map +1 -1
  116. package/dist/esm/stzh-upload.entry.js +16 -2
  117. package/dist/esm/stzh-upload.entry.js.map +1 -1
  118. package/dist/esm-es5/{app-globals-0cf2577d.js → app-globals-c1cfb228.js} +2 -2
  119. package/dist/esm-es5/loader.js +1 -1
  120. package/dist/esm-es5/loader.js.map +1 -1
  121. package/dist/esm-es5/stzh-actionset_4.entry.js +1 -1
  122. package/dist/esm-es5/stzh-actionset_4.entry.js.map +1 -1
  123. package/dist/esm-es5/stzh-badge_3.entry.js +1 -1
  124. package/dist/esm-es5/stzh-badge_3.entry.js.map +1 -1
  125. package/dist/esm-es5/stzh-chip_2.entry.js +1 -1
  126. package/dist/esm-es5/stzh-chip_2.entry.js.map +1 -1
  127. package/dist/esm-es5/stzh-components.js +1 -1
  128. package/dist/esm-es5/stzh-components.js.map +1 -1
  129. package/dist/esm-es5/stzh-datalist_2.entry.js +1 -1
  130. package/dist/esm-es5/stzh-datalist_2.entry.js.map +1 -1
  131. package/dist/esm-es5/stzh-dropdown.entry.js +3 -3
  132. package/dist/esm-es5/stzh-dropdown.entry.js.map +1 -1
  133. package/dist/esm-es5/stzh-input.entry.js +1 -1
  134. package/dist/esm-es5/stzh-input.entry.js.map +1 -1
  135. package/dist/esm-es5/stzh-link.entry.js +1 -1
  136. package/dist/esm-es5/stzh-link.entry.js.map +1 -1
  137. package/dist/esm-es5/stzh-menu_2.entry.js +1 -1
  138. package/dist/esm-es5/stzh-menu_2.entry.js.map +1 -1
  139. package/dist/esm-es5/stzh-progressbar-item.entry.js +1 -1
  140. package/dist/esm-es5/stzh-progressbar-item.entry.js.map +1 -1
  141. package/dist/esm-es5/stzh-skiplink.entry.js +1 -1
  142. package/dist/esm-es5/stzh-skiplink.entry.js.map +1 -1
  143. package/dist/esm-es5/stzh-upload.entry.js +1 -1
  144. package/dist/esm-es5/stzh-upload.entry.js.map +1 -1
  145. package/dist/stzh-components/{p-7873a639.entry.js → p-01e9b3b5.entry.js} +2 -2
  146. package/dist/stzh-components/p-01e9b3b5.entry.js.map +1 -0
  147. package/dist/stzh-components/{p-0db27707.entry.js → p-03fc4d3d.entry.js} +2 -2
  148. package/dist/stzh-components/p-03fc4d3d.entry.js.map +1 -0
  149. package/dist/stzh-components/{p-3ab3a5a7.system.entry.js → p-1a420f1c.system.entry.js} +2 -2
  150. package/dist/stzh-components/p-1a420f1c.system.entry.js.map +1 -0
  151. package/dist/stzh-components/{p-aa9975e6.entry.js → p-24d82258.entry.js} +2 -2
  152. package/dist/stzh-components/p-24d82258.entry.js.map +1 -0
  153. package/dist/stzh-components/p-2653562a.entry.js +9 -0
  154. package/dist/stzh-components/p-2653562a.entry.js.map +1 -0
  155. package/dist/stzh-components/{p-42e25ae1.system.entry.js → p-3048d3ea.system.entry.js} +2 -2
  156. package/dist/stzh-components/p-3048d3ea.system.entry.js.map +1 -0
  157. package/dist/stzh-components/p-376b64c8.system.entry.js +9 -0
  158. package/dist/stzh-components/p-376b64c8.system.entry.js.map +1 -0
  159. package/dist/stzh-components/{p-6233fc4f.system.js → p-50faf5a6.system.js} +2 -2
  160. package/dist/stzh-components/{p-9d0fedfe.system.entry.js → p-710d15c1.system.entry.js} +2 -2
  161. package/dist/stzh-components/p-710d15c1.system.entry.js.map +1 -0
  162. package/dist/stzh-components/p-8438088e.system.js +2 -0
  163. package/dist/stzh-components/{p-ae0e530e.system.js.map → p-8438088e.system.js.map} +1 -1
  164. package/dist/stzh-components/{p-b2b9d87e.js → p-8e02ecc8.js} +2 -2
  165. package/dist/stzh-components/{p-68feffea.entry.js → p-919e700b.entry.js} +2 -2
  166. package/dist/stzh-components/p-919e700b.entry.js.map +1 -0
  167. package/dist/stzh-components/p-990141f4.entry.js +2 -0
  168. package/dist/stzh-components/p-990141f4.entry.js.map +1 -0
  169. package/dist/stzh-components/{p-d5ee8b1a.entry.js → p-a0d3ec11.entry.js} +2 -2
  170. package/dist/stzh-components/p-a0d3ec11.entry.js.map +1 -0
  171. package/dist/stzh-components/{p-188dd49d.system.entry.js → p-aa0660d8.system.entry.js} +2 -2
  172. package/dist/stzh-components/p-aa0660d8.system.entry.js.map +1 -0
  173. package/dist/stzh-components/p-c1f89d5c.system.entry.js +2 -0
  174. package/dist/stzh-components/p-c1f89d5c.system.entry.js.map +1 -0
  175. package/dist/stzh-components/{p-f73af272.entry.js → p-c70b4f1b.entry.js} +2 -2
  176. package/dist/stzh-components/p-c70b4f1b.entry.js.map +1 -0
  177. package/dist/stzh-components/{p-af33b013.entry.js → p-c90cf7f4.entry.js} +2 -2
  178. package/dist/stzh-components/p-c90cf7f4.entry.js.map +1 -0
  179. package/dist/stzh-components/{p-54a1fdcc.system.entry.js → p-cf18eff2.system.entry.js} +2 -2
  180. package/dist/stzh-components/p-cf18eff2.system.entry.js.map +1 -0
  181. package/dist/stzh-components/{p-135d2e40.system.entry.js → p-d80b87dd.system.entry.js} +2 -2
  182. package/dist/stzh-components/p-d80b87dd.system.entry.js.map +1 -0
  183. package/dist/stzh-components/{p-b3d76f2a.system.entry.js → p-df045b3b.system.entry.js} +2 -2
  184. package/dist/stzh-components/p-df045b3b.system.entry.js.map +1 -0
  185. package/dist/stzh-components/{p-7c2aa5e8.entry.js → p-dfa8f780.entry.js} +2 -2
  186. package/dist/stzh-components/p-dfa8f780.entry.js.map +1 -0
  187. package/dist/stzh-components/{p-2d88c544.system.entry.js → p-e6444356.system.entry.js} +2 -2
  188. package/dist/stzh-components/p-e6444356.system.entry.js.map +1 -0
  189. package/dist/stzh-components/{p-509f90d0.system.entry.js → p-ee4f0a17.system.entry.js} +2 -2
  190. package/dist/stzh-components/p-ee4f0a17.system.entry.js.map +1 -0
  191. package/dist/stzh-components/{p-0164f9d1.entry.js → p-f63cc727.entry.js} +2 -2
  192. package/dist/stzh-components/p-f63cc727.entry.js.map +1 -0
  193. package/dist/stzh-components/stzh-components.esm.js +1 -1
  194. package/dist/stzh-components/stzh-components.esm.js.map +1 -1
  195. package/dist/stzh-components/stzh-components.js +1 -1
  196. package/dist/types/components/stzh-dropdown/stzh-dropdown.d.ts +4 -0
  197. package/dist/types/components/stzh-input/stzh-input.d.ts +1 -1
  198. package/dist/types/components/stzh-upload/stzh-upload.d.ts +7 -1
  199. package/dist/types/components.d.ts +18 -6
  200. package/dist/types/libraries/tom-select/types/defaults.d.ts +2 -0
  201. package/dist/types/libraries/tom-select/types/types/settings.d.ts +2 -0
  202. package/dist/vscode-data.json +7537 -0
  203. package/package.json +1 -1
  204. package/dist/stzh-components/p-0164f9d1.entry.js.map +0 -1
  205. package/dist/stzh-components/p-0db27707.entry.js.map +0 -1
  206. package/dist/stzh-components/p-135d2e40.system.entry.js.map +0 -1
  207. package/dist/stzh-components/p-188dd49d.system.entry.js.map +0 -1
  208. package/dist/stzh-components/p-2d88c544.system.entry.js.map +0 -1
  209. package/dist/stzh-components/p-3ab3a5a7.system.entry.js.map +0 -1
  210. package/dist/stzh-components/p-42e25ae1.system.entry.js.map +0 -1
  211. package/dist/stzh-components/p-4ad49ece.entry.js +0 -2
  212. package/dist/stzh-components/p-4ad49ece.entry.js.map +0 -1
  213. package/dist/stzh-components/p-509f90d0.system.entry.js.map +0 -1
  214. package/dist/stzh-components/p-54a1fdcc.system.entry.js.map +0 -1
  215. package/dist/stzh-components/p-68feffea.entry.js.map +0 -1
  216. package/dist/stzh-components/p-7873a639.entry.js.map +0 -1
  217. package/dist/stzh-components/p-7c2aa5e8.entry.js.map +0 -1
  218. package/dist/stzh-components/p-97704eb0.system.entry.js +0 -9
  219. package/dist/stzh-components/p-97704eb0.system.entry.js.map +0 -1
  220. package/dist/stzh-components/p-9d0fedfe.system.entry.js.map +0 -1
  221. package/dist/stzh-components/p-a0b350c2.system.entry.js +0 -2
  222. package/dist/stzh-components/p-a0b350c2.system.entry.js.map +0 -1
  223. package/dist/stzh-components/p-aa9975e6.entry.js.map +0 -1
  224. package/dist/stzh-components/p-ae0e530e.system.js +0 -2
  225. package/dist/stzh-components/p-af33b013.entry.js.map +0 -1
  226. package/dist/stzh-components/p-b3d76f2a.system.entry.js.map +0 -1
  227. package/dist/stzh-components/p-d5ee8b1a.entry.js.map +0 -1
  228. package/dist/stzh-components/p-f73af272.entry.js.map +0 -1
  229. package/dist/stzh-components/p-f91187c8.entry.js +0 -9
  230. package/dist/stzh-components/p-f91187c8.entry.js.map +0 -1
  231. /package/dist/esm-es5/{app-globals-0cf2577d.js.map → app-globals-c1cfb228.js.map} +0 -0
  232. /package/dist/stzh-components/{p-6233fc4f.system.js.map → p-50faf5a6.system.js.map} +0 -0
  233. /package/dist/stzh-components/{p-b2b9d87e.js.map → p-8e02ecc8.js.map} +0 -0
@@ -1,2 +0,0 @@
1
- import{r as t,c as s,h as i,a as n,g as h}from"./p-c92165bd.js";import{h as e}from"./p-cfdb06e4.js";import{S as p}from"./p-bac917cc.js";import"./p-9b063923.js";const u='.sc-stzh-input-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular);color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-input-h{display:none}.sc-stzh-input-h *.sc-stzh-input,.sc-stzh-input-h *.sc-stzh-input::before,.sc-stzh-input-h *.sc-stzh-input::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-input-h .has-focus.sc-stzh-input{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-input-h .stzh-fylingfocus-focused.sc-stzh-input{outline-style:none !important}.sc-stzh-input-h .stzh-fylingfocus-focused.sc-stzh-input::-moz-focus-inner{border:0 !important}.sc-stzh-input-h{--text-align:left;--input-width:100%;--padding:var(--stzh-space-xsmall) var(--stzh-space-medium);width:100%}.sc-stzh-input-h .sc-stzh-input-s>[slot=button-right],.stzh-input__button-right.sc-stzh-input{position:absolute;top:0;right:0}.sc-stzh-input-h .sc-stzh-input-s>stzh-button[slot=button-right][variant=input],.sc-stzh-input-h .sc-stzh-input-s>[slot=button-right] stzh-button[variant=input],.stzh-input__button-right[variant=input].sc-stzh-input{--border-color:transparent;--hover-border-color:transparent}.stzh-input.sc-stzh-input{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing)}.stzh-input__marker-symbol.sc-stzh-input{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular)}.stzh-input__marker-text.sc-stzh-input{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-input__description-wrapper.sc-stzh-input{display:-ms-flexbox;display:flex;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.stzh-input__error.sc-stzh-input,.stzh-input__description.sc-stzh-input{font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height);color:var(--stzh-base-color)}.stzh-input__error.sc-stzh-input{color:var(--stzh-color-error)}.stzh-input__error-list.sc-stzh-input{list-style:none;margin:0;padding:0}.stzh-input__description.sc-stzh-input{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.stzh-input__description-long.sc-stzh-input{margin-left:var(--stzh-space-xxsmall);margin-top:0.1875rem}.stzh-input__description-long-popover.sc-stzh-input{--width:auto;--max-width:27.3125rem}.stzh-input__description-long-popover[open].sc-stzh-input:not([open=false]) .stzh-input__description-long-button.sc-stzh-input{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-input__description-long-button.sc-stzh-input{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-family:inherit;padding:0;border:none;background-color:transparent;border-radius:0.5rem;cursor:pointer;-webkit-transition:color var(--stzh-base-transition-animation-speed);transition:color var(--stzh-base-transition-animation-speed);color:var(--stzh-base-lead-color)}.stzh-input__description-long-button.sc-stzh-input:hover{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-input.sc-stzh-input stzh-icon.stzh-input__description-long-icon.sc-stzh-input{--size:var(--stzh-icon-size-xsmall)}.stzh-input--has-error.sc-stzh-input .stzh-input__error.sc-stzh-input,.stzh-input--has-description.sc-stzh-input .stzh-input__description.sc-stzh-input{margin-top:var(--stzh-space-xxsmall)}.stzh-input__field-wrapper.sc-stzh-input{position:relative;display:-ms-flexbox;display:flex;width:var(--input-width)}.stzh-input__input.sc-stzh-input{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular);font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);border:0.0625rem solid var(--stzh-color-grey61);-webkit-transition-property:color, border-color;transition-property:color, border-color;-webkit-transition-duration:var(--stzh-base-transition-animation-speed);transition-duration:var(--stzh-base-transition-animation-speed);border-radius:var(--stzh-form-input-border-radius);padding:var(--padding);margin:0;width:100%;color:var(--stzh-color-primary, var(--stzh-color-zueriblue));background:var(--stzh-color-white);-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:var(--text-align)}.stzh-input__input.sc-stzh-input::-webkit-input-placeholder{color:var(--stzh-color-grey61)}.stzh-input__input.sc-stzh-input:-moz-placeholder{color:var(--stzh-color-grey61)}.stzh-input__input.sc-stzh-input::-moz-placeholder{color:var(--stzh-color-grey61)}.stzh-input__input.sc-stzh-input:-ms-input-placeholder{color:var(--stzh-color-grey61)}.stzh-input__input.sc-stzh-input:hover,.stzh-input__input.sc-stzh-input:focus{color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark));border-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.stzh-input__input.sc-stzh-input::-ms-clear{display:none}.stzh-input__input.sc-stzh-input:-webkit-autofill{-webkit-background-clip:text;background-clip:text}.stzh-input__input.sc-stzh-input:-moz-placeholder-shown{text-overflow:ellipsis}.stzh-input__input.sc-stzh-input:-ms-input-placeholder{text-overflow:ellipsis}.stzh-input__input.sc-stzh-input:placeholder-shown{text-overflow:ellipsis}.stzh-input__input[type=search].sc-stzh-input::-webkit-search-decoration,.stzh-input__input[type=search].sc-stzh-input::-webkit-search-cancel-button,.stzh-input__input[type=search].sc-stzh-input::-webkit-search-results-button,.stzh-input__input[type=search].sc-stzh-input::-webkit-search-results-decoration{-webkit-appearance:none}.stzh-input__input--input.sc-stzh-input{height:var(--stzh-form-input-height)}.stzh-input__input--textarea.sc-stzh-input{min-height:var(--stzh-form-input-height);resize:vertical}.stzh-input__label.sc-stzh-input{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color:var(--stzh-color-grey61);width:auto;position:absolute;top:calc(var(--stzh-form-input-height) / 2);left:calc(var(--stzh-space-medium) + 0.0625rem);max-width:calc(100% - var(--stzh-space-medium) * 2);-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-transition:all var(--stzh-base-transition-animation-speed);transition:all var(--stzh-base-transition-animation-speed);pointer-events:none}.stzh-input__label.sc-stzh-input:empty{display:none}.stzh-input__label.sc-stzh-input::before{content:"";display:none;background:var(--stzh-color-white);position:absolute;width:100%;z-index:-1;left:0;top:50%;margin-top:-0.5px;height:0.125rem}.stzh-input__input.sc-stzh-input:hover+.stzh-input__label.sc-stzh-input,.stzh-input__input.sc-stzh-input:focus+.stzh-input__label.sc-stzh-input{color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.stzh-input__button-right.sc-stzh-input{display:none}.stzh-input__button-right[disabled].sc-stzh-input:not([disabled=false])[variant=input]{--color:var(--stzh-color-grey61);--background-color:transparent;--border-color:transparent;--hover-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark));--hover-background-color:transparent;--hover-border-color:transparent}.stzh-input--is-clearable.stzh-input--is-filled.sc-stzh-input:not(.stzh-input--is-readonly):not(.stzh-input--is-disabled) .stzh-input__button-right.sc-stzh-input,.stzh-input--type-search.sc-stzh-input .stzh-input__button-right.sc-stzh-input{display:block}.stzh-input--type-search.sc-stzh-input:not(.stzh-input--is-filled) .stzh-input__button-right.sc-stzh-input,.stzh-input--type-search.stzh-input--is-readonly.sc-stzh-input .stzh-input__button-right.sc-stzh-input,.stzh-input--type-search.stzh-input--is-disabled.sc-stzh-input .stzh-input__button-right.sc-stzh-input{pointer-events:none}.stzh-input--is-filled.sc-stzh-input .stzh-input__button-right.is-search.sc-stzh-input{pointer-events:initial}.stzh-input.sc-stzh-input:not(.stzh-input--is-readonly):not(.stzh-input--is-disabled) .stzh-input__input.sc-stzh-input:focus+.stzh-input__label.sc-stzh-input,.stzh-input--has-fixed-label.sc-stzh-input .stzh-input__label.sc-stzh-input,.stzh-input--is-filled.sc-stzh-input .stzh-input__label.sc-stzh-input,.stzh-input--is-readonly.sc-stzh-input .stzh-input__label.sc-stzh-input,.stzh-input--is-disabled.sc-stzh-input .stzh-input__label.sc-stzh-input,.stzh-input--is-invalid.sc-stzh-input .stzh-input__label.sc-stzh-input{display:block;top:0;left:calc(var(--stzh-space-medium) - var(--stzh-space-xxsmall));height:1.25rem;line-height:1.25rem;padding:0 var(--stzh-space-xxsmall);max-width:calc(100% - var(--stzh-space-small) * 2);pointer-events:all}.stzh-input.sc-stzh-input:not(.stzh-input--is-readonly):not(.stzh-input--is-disabled) .stzh-input__input.sc-stzh-input:focus+.stzh-input__label.sc-stzh-input:not(:empty)::before,.stzh-input--has-fixed-label.sc-stzh-input .stzh-input__label.sc-stzh-input:not(:empty)::before,.stzh-input--is-filled.sc-stzh-input .stzh-input__label.sc-stzh-input:not(:empty)::before,.stzh-input--is-readonly.sc-stzh-input .stzh-input__label.sc-stzh-input:not(:empty)::before,.stzh-input--is-disabled.sc-stzh-input .stzh-input__label.sc-stzh-input:not(:empty)::before,.stzh-input--is-invalid.sc-stzh-input .stzh-input__label.sc-stzh-input:not(:empty)::before{display:block}.stzh-input--has-button-right.sc-stzh-input .stzh-input__input.sc-stzh-input{padding-right:calc(var(--stzh-space-xsmall) + var(--stzh-form-input-height))}.stzh-input--has-button-right.sc-stzh-input .stzh-input__label.sc-stzh-input{max-width:calc(100% - (var(--stzh-space-medium) + 0.0625rem) * 2 - var(--stzh-form-input-height))}.stzh-input--has-button-right.stzh-input.sc-stzh-input:not(.stzh-input--is-readonly):not(.stzh-input--is-disabled) .stzh-input__input.sc-stzh-input:focus+.stzh-input__label.sc-stzh-input,.stzh-input--has-button-right.stzh-input--has-fixed-label.sc-stzh-input .stzh-input__label.sc-stzh-input,.stzh-input--has-button-right.stzh-input--is-filled.sc-stzh-input .stzh-input__label.sc-stzh-input,.stzh-input--has-button-right.stzh-input--is-readonly.sc-stzh-input .stzh-input__label.sc-stzh-input,.stzh-input--has-button-right.stzh-input--is-disabled.sc-stzh-input .stzh-input__label.sc-stzh-input,.stzh-input--has-button-right.stzh-input--is-invalid.sc-stzh-input .stzh-input__label.sc-stzh-input{max-width:calc(100% - var(--stzh-space-medium) - var(--stzh-space-xxsmall) - 0.0625rem + var(--stzh-space-xxsmall) - var(--stzh-form-input-height))}.stzh-input--size-small.sc-stzh-input{font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height)}.stzh-input--size-small.sc-stzh-input .stzh-input__input.sc-stzh-input{font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height)}.stzh-input--size-small.sc-stzh-input .stzh-input__input--input.sc-stzh-input{height:var(--stzh-form-input-small-height)}.stzh-input--size-small.sc-stzh-input .stzh-input__input--textarea.sc-stzh-input{min-height:var(--stzh-form-input-small-height)}.stzh-input--size-small.sc-stzh-input .stzh-input__label.sc-stzh-input{top:calc(var(--stzh-form-input-small-height) / 2)}.stzh-input--size-small.stzh-input.sc-stzh-input:not(.stzh-input--is-readonly):not(.stzh-input--is-disabled) .stzh-input__input.sc-stzh-input:focus+.stzh-input__label.sc-stzh-input,.stzh-input--size-small.stzh-input--has-fixed-label.sc-stzh-input .stzh-input__label.sc-stzh-input,.stzh-input--size-small.stzh-input--is-filled.sc-stzh-input .stzh-input__label.sc-stzh-input,.stzh-input--size-small.stzh-input--is-readonly.sc-stzh-input .stzh-input__label.sc-stzh-input,.stzh-input--size-small.stzh-input--is-disabled.sc-stzh-input .stzh-input__label.sc-stzh-input,.stzh-input--size-small.stzh-input--is-invalid.sc-stzh-input .stzh-input__label.sc-stzh-input{top:0}.stzh-input--size-small.stzh-input--has-button-right.sc-stzh-input .stzh-input__input.sc-stzh-input{padding-right:calc(var(--stzh-space-xxsmall) + var(--stzh-form-input-small-height))}.stzh-input--size-small.stzh-input--has-button-right.sc-stzh-input .stzh-input__label.sc-stzh-input{max-width:calc(100% - (var(--stzh-space-medium) + 0.0625rem) * 2 - var(--stzh-form-input-small-height))}.stzh-input--size-small.stzh-input--has-button-right.stzh-input.sc-stzh-input:not(.stzh-input--is-readonly):not(.stzh-input--is-disabled) .stzh-input__input.sc-stzh-input:focus+.stzh-input__label.sc-stzh-input,.stzh-input--size-small.stzh-input--has-button-right.stzh-input--has-fixed-label.sc-stzh-input .stzh-input__label.sc-stzh-input,.stzh-input--size-small.stzh-input--has-button-right.stzh-input--is-filled.sc-stzh-input .stzh-input__label.sc-stzh-input,.stzh-input--size-small.stzh-input--has-button-right.stzh-input--is-readonly.sc-stzh-input .stzh-input__label.sc-stzh-input,.stzh-input--size-small.stzh-input--has-button-right.stzh-input--is-disabled.sc-stzh-input .stzh-input__label.sc-stzh-input,.stzh-input--size-small.stzh-input--has-button-right.stzh-input--is-invalid.sc-stzh-input .stzh-input__label.sc-stzh-input{max-width:calc(100% - var(--stzh-space-medium) - var(--stzh-space-xxsmall) - 0.0625rem + var(--stzh-space-xsmall) - var(--stzh-form-input-small-height))}.stzh-input.sc-stzh-input:not(.stzh-input--has-spin) .stzh-input__input.sc-stzh-input::-webkit-outer-spin-button,.stzh-input.sc-stzh-input:not(.stzh-input--has-spin) .stzh-input__input.sc-stzh-input::-webkit-inner-spin-button{-webkit-appearance:none;appearance:none;margin:0}.stzh-input.sc-stzh-input:not(.stzh-input--has-spin) .stzh-input__input[type=number].sc-stzh-input{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.stzh-input--has-label-hidden.sc-stzh-input .stzh-input__label.sc-stzh-input{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-input--is-invalid.sc-stzh-input .stzh-input__input.sc-stzh-input,.stzh-input--is-invalid.sc-stzh-input .stzh-input__label.sc-stzh-input,.stzh-input--is-invalid.sc-stzh-input .stzh-input__input.sc-stzh-input+.stzh-input__label.sc-stzh-input{color:var(--stzh-color-error)}.stzh-input--is-invalid.sc-stzh-input .stzh-input__input.sc-stzh-input{border-color:var(--stzh-color-error)}.stzh-input--is-invalid.sc-stzh-input .stzh-input__input.sc-stzh-input::-webkit-input-placeholder{color:var(--stzh-color-error)}.stzh-input--is-invalid.sc-stzh-input .stzh-input__input.sc-stzh-input:-moz-placeholder{color:var(--stzh-color-error)}.stzh-input--is-invalid.sc-stzh-input .stzh-input__input.sc-stzh-input::-moz-placeholder{color:var(--stzh-color-error)}.stzh-input--is-invalid.sc-stzh-input .stzh-input__input.sc-stzh-input:-ms-input-placeholder{color:var(--stzh-color-error)}.stzh-input--is-readonly.sc-stzh-input .stzh-input__input.sc-stzh-input,.stzh-input--is-readonly.sc-stzh-input .stzh-input__input.sc-stzh-input+.stzh-input__label.sc-stzh-input,.stzh-input--is-disabled.sc-stzh-input .stzh-input__input.sc-stzh-input,.stzh-input--is-disabled.sc-stzh-input .stzh-input__input.sc-stzh-input+.stzh-input__label.sc-stzh-input{color:var(--stzh-color-grey61)}.stzh-input--is-readonly.sc-stzh-input .stzh-input__input.sc-stzh-input,.stzh-input--is-disabled.sc-stzh-input .stzh-input__input.sc-stzh-input{color:var(--stzh-color-grey61);border-color:transparent;background-color:var(--stzh-color-black8);cursor:not-allowed}.stzh-input--is-readonly.sc-stzh-input .stzh-input__input.sc-stzh-input::-webkit-input-placeholder,.stzh-input--is-disabled.sc-stzh-input .stzh-input__input.sc-stzh-input::-webkit-input-placeholder{color:var(--stzh-color-grey61)}.stzh-input--is-readonly.sc-stzh-input .stzh-input__input.sc-stzh-input:-moz-placeholder,.stzh-input--is-disabled.sc-stzh-input .stzh-input__input.sc-stzh-input:-moz-placeholder{color:var(--stzh-color-grey61)}.stzh-input--is-readonly.sc-stzh-input .stzh-input__input.sc-stzh-input::-moz-placeholder,.stzh-input--is-disabled.sc-stzh-input .stzh-input__input.sc-stzh-input::-moz-placeholder{color:var(--stzh-color-grey61)}.stzh-input--is-readonly.sc-stzh-input .stzh-input__input.sc-stzh-input:-ms-input-placeholder,.stzh-input--is-disabled.sc-stzh-input .stzh-input__input.sc-stzh-input:-ms-input-placeholder{color:var(--stzh-color-grey61)}.stzh-input--is-readonly.sc-stzh-input .stzh-input__input.sc-stzh-input:hover,.stzh-input--is-readonly.sc-stzh-input .stzh-input__input.sc-stzh-input:focus,.stzh-input--is-disabled.sc-stzh-input .stzh-input__input.sc-stzh-input:hover,.stzh-input--is-disabled.sc-stzh-input .stzh-input__input.sc-stzh-input:focus{border-color:transparent}.stzh-input--is-readonly.sc-stzh-input .stzh-input__label.sc-stzh-input,.stzh-input--is-disabled.sc-stzh-input .stzh-input__label.sc-stzh-input{cursor:not-allowed}.stzh-input--is-readonly.sc-stzh-input .stzh-input__label.sc-stzh-input::before,.stzh-input--is-disabled.sc-stzh-input .stzh-input__label.sc-stzh-input::before{background:transparent}.stzh-input--is-readonly.sc-stzh-input .stzh-input__button-right[disabled].sc-stzh-input:not([disabled=false])[variant=input],.stzh-input--is-disabled.sc-stzh-input .stzh-input__button-right[disabled].sc-stzh-input:not([disabled=false])[variant=input]{--color:var(--stzh-color-grey61);--hover-color:var(--stzh-color-grey61)}';let r=0;const a=class{constructor(i){t(this,i);this.stzhChange=s(this,"stzhChange",7);this.stzhChanged=s(this,"stzhChanged",7);this.stzhFocus=s(this,"stzhFocus",7);this.stzhBlur=s(this,"stzhBlur",7);this.focusedByInput=false;this.onClearClick=t=>{this.value="";this.input.focus();this.stzhChange.emit({component:"stzh-input",originalEvent:t,value:this.value});this.stzhChanged.emit({component:"stzh-input",originalEvent:t,value:this.value})};this.onInput=t=>{this.value=this.input.value;this.stzhChange.emit({component:"stzh-input",originalEvent:t,value:this.value})};this.onChange=t=>{this.value=this.input.value;this.stzhChanged.emit({component:"stzh-input",originalEvent:t,value:this.value})};this.onRootFocus=()=>{if(!this.focusedByInput){this.setFocus()}this.focusedByInput=false};this.onFocus=t=>{this.focusedByInput=true;const s=new FocusEvent("focus",{view:window,bubbles:false,cancelable:false});this.element.dispatchEvent(s);this.stzhFocus.emit({component:"stzh-input",originalEvent:t})};this.onBlur=t=>{this.input.value=this.input.value;const s=new FocusEvent("blur",{view:window,bubbles:false,cancelable:false});this.element.dispatchEvent(s);this.stzhBlur.emit({component:"stzh-input",originalEvent:t})};this.localization=undefined;this.multiline=false;this.rows=undefined;this.type="text";this.step=1;this.min=undefined;this.max=undefined;this.showSpin=false;this.readonly=false;this.disabled=false;this.clearable=false;this.showMarker=false;this.minlength=undefined;this.maxlength=undefined;this.name=undefined;this.value="";this.description=undefined;this.descriptionLong=undefined;this.error=undefined;this.invalid=false;this.required=false;this.inputmode=undefined;this.autocomplete="on";this.noAutocomplete=false;this.label="";this.labelHidden=false;this.size="default";this.a11yDescribedby="";this.filled=undefined}async setFocus(){this.input.focus()}valueWatcher(t){this.filled=t!==""}errorWatcher(t){if(typeof t==="string"){try{this._error=JSON.parse(t)}catch(s){if(t){this._error=[t]}else{this._error=[]}}}else if(t){this._error=t}else{this._error=[]}this.invalid=this._error.length>0}typeWatcher(t){const s=["text","search","password","email","url","tel","number"];if(!this.multiline&&!s.includes(t)){throw new Error(`Type ${t} not supported`)}}renderTextarea(){return i("textarea",{class:"stzh-input__input stzh-input__input--textarea",ref:t=>this.input=t,id:this.inputId,name:this.name,value:this.value,rows:this.rows,disabled:this.disabled,readonly:this.readonly,minlength:this.minlength,maxlength:this.maxlength,"aria-describedby":`${this.inputId}-description ${this.a11yDescribedby}`,"aria-required":this.required?"true":"false","aria-invalid":this.invalid?"true":"false",onChange:this.onChange,onInput:this.onInput,onFocus:this.onFocus,onBlur:this.onBlur})}renderInput(){return i("input",{class:"stzh-input__input stzh-input__input--input",ref:t=>this.input=t,id:this.inputId,type:this.type,name:this.name,value:this.value,min:this.min,max:this.max,step:this.step,inputmode:this.inputmode,disabled:this.disabled,readonly:this.readonly,minlength:this.minlength,maxlength:this.maxlength,autocomplete:this.noAutocomplete?"off":this.autocomplete,"aria-autocomplete":this.noAutocomplete?"none":undefined,"aria-describedby":`${this.inputId}-description ${this.a11yDescribedby}`,"aria-required":this.required?"true":"false","aria-invalid":this.invalid?"true":"false",onChange:this.onChange,onInput:this.onInput,onFocus:this.onFocus,onBlur:this.onBlur})}async componentWillLoad(){this.inputId=`stzh-input-${r++}`;this.typeWatcher(this.type);this.valueWatcher(this.value);this.errorWatcher(this.error);if(!this.localization){this.localization=await window.stzhComponents.utils.fetchTranslations(this.element,"input")}}render(){var t;const s=e(this.element,"button-right");const h=e(this.element,"description")||!!this.description;const u=e(this.element,"description-long")||!!this.descriptionLong;const r=e(this.element,"error")||!!this.error;const a={"stzh-input":true,"stzh-input--has-button-right":s||this.type==="search"||this.clearable&&this.filled&&!this.readonly&&!this.disabled,"stzh-input--has-description":h,"stzh-input--has-description-long":u,"stzh-input--has-error":r,"stzh-input--has-spin":this.showSpin,"stzh-input--is-invalid":this.invalid,"stzh-input--is-disabled":this.disabled,"stzh-input--is-readonly":this.readonly,"stzh-input--is-required":this.required,"stzh-input--is-filled":this.filled,"stzh-input--is-clearable":this.clearable,"stzh-input--has-fixed-label":((t=window===null||window===void 0?void 0:window.stzhComponents)===null||t===void 0?void 0:t.labels)==="fixed","stzh-input--has-label-hidden":this.labelHidden,[`stzh-input--size-${this.size}`]:!!this.size,[`stzh-input--type-${this.type}`]:!!this.type};return i(n,{tabindex:this.disabled?null:"-1",onFocus:this.onRootFocus},i("div",{class:a},i("div",{class:"stzh-input__field-wrapper"},this.multiline?this.renderTextarea():this.renderInput(),i("label",{class:"stzh-input__label",htmlFor:this.inputId},this.label?this.label:i("slot",null),this.showMarker&&i("span",{class:"stzh-input__marker"},i("span",{class:"stzh-input__marker-symbol","aria-hidden":"true"},this.required?this.localization.$globals.requiredFieldMarker:this.localization.$globals.optionalFieldMarker),i("span",{class:"stzh-input__marker-text"},this.required?this.localization.$globals.requiredFieldText:this.localization.$globals.optionalFieldText))),this.clearable||this.type==="search"?i("stzh-button",{class:"stzh-input__button-right",icon:this.disabled||this.readonly||!this.filled?"search":"close-circle","icon-only":true,variant:"input",onClick:this.onClearClick,disabled:this.disabled||this.readonly||!this.filled,a11yLabel:this.localization.$globals.clearButtonLabel,"aria-controls":this.inputId}):i("slot",{name:"button-right"})),i(p,{classPrefix:"stzh-input",id:`${this.inputId}-description`,error:this._error,description:this.description,descriptionLong:this.descriptionLong,descriptionLongUsed:u,moreInfoButtonLabel:this.localization.$globals.moreInfoButtonLabel})))}get element(){return h(this)}static get watchers(){return{value:["valueWatcher"],error:["errorWatcher"],type:["typeWatcher"]}}};a.style=u;export{a as stzh_input};
2
- //# sourceMappingURL=p-4ad49ece.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["stzhInputCss","inputCounter","StzhInput","this","focusedByInput","onClearClick","event","value","input","focus","stzhChange","emit","component","originalEvent","stzhChanged","onInput","onChange","onRootFocus","setFocus","onFocus","focusEvent","FocusEvent","view","window","bubbles","cancelable","element","dispatchEvent","stzhFocus","onBlur","blurEvent","stzhBlur","valueWatcher","newValue","filled","errorWatcher","_error","JSON","parse","e","invalid","length","typeWatcher","types","multiline","includes","Error","renderTextarea","h","class","ref","el","id","inputId","name","rows","disabled","readonly","minlength","maxlength","a11yDescribedby","required","renderInput","type","min","max","step","inputmode","autocomplete","noAutocomplete","undefined","componentWillLoad","error","localization","stzhComponents","utils","fetchTranslations","render","buttonRightSlotUsed","hasSlot","descriptionUsed","description","descriptionLongUsed","descriptionLong","errorUsed","classes","clearable","showSpin","_a","labels","labelHidden","size","Host","tabindex","htmlFor","label","showMarker","$globals","requiredFieldMarker","optionalFieldMarker","requiredFieldText","optionalFieldText","icon","variant","onClick","a11yLabel","clearButtonLabel","StzhInputDescription","classPrefix","moreInfoButtonLabel"],"sources":["src/components/stzh-input/stzh-input.scss?tag=stzh-input&encapsulation=scoped","src/components/stzh-input/stzh-input.tsx"],"sourcesContent":["/**\n * @prop --text-align: Text align of field\n * @prop --input-width: Width of of field\n * @prop --padding: Padding of field\n *\n * @prop --stzh-form-input-height: **Global**: Height of fields & buttons\n * @prop --stzh-form-input-small-height: **Global**: Height of fields & buttons when small variant is used\n * @prop --stzh-form-input-tiny-height: **Global**: Height of fields & buttons when tiny variant is used\n */\n\n:host {\n --text-align: left;\n --input-width: 100%;\n --padding: #{space('xsmall')} #{space('medium')};\n\n width: 100%;\n}\n\n:host ::slotted([slot=\"button-right\"]),\n.stzh-input__button-right {\n position: absolute;\n top: 0;\n right: 0;\n}\n\n:host ::slotted(stzh-button[slot=\"button-right\"][variant=\"input\"]),\n:host ::slotted([slot=\"button-right\"]) stzh-button[variant=\"input\"],\n.stzh-input__button-right[variant=\"input\"] {\n --border-color: transparent;\n --hover-border-color: transparent;\n}\n\n.stzh-input {\n\t@include input-description;\n\t@include fontSize('milli');\n\n &__field-wrapper {\n position: relative;\n display: flex;\n width: var(--input-width);\n }\n\n &__input {\n @include font;\n @include fontSize('milli');\n border: 1px solid $formBorderColor;\n transition-property: color, border-color;\n transition-duration: $baseTransitionAnimationSpeed;\n border-radius: $formInputBorderRadius;\n padding: var(--padding);\n margin: 0;\n width: 100%;\n color: $colorPrimary;\n background: $colorWhite;\n appearance: none;\n text-align: var(--text-align);\n\n @include placeholder {\n color: $formInputPlaceholderColor;\n }\n\n &:hover,\n &:focus {\n color: $colorPrimaryHover;\n border-color: $colorPrimaryHover;\n }\n\n // remove clear button for IE11\n &::-ms-clear {\n display: none;\n }\n\n // prevent ugly autofill background color in chrome\n &:-webkit-autofill {\n background-clip: text;\n }\n\n // show ellipsis for placeholders that are too long\n &:placeholder-shown {\n text-overflow: ellipsis;\n }\n\n // hide search clear icon on chrome\n &[type=\"search\"]::-webkit-search-decoration,\n &[type=\"search\"]::-webkit-search-cancel-button,\n &[type=\"search\"]::-webkit-search-results-button,\n &[type=\"search\"]::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n\n /* Normal inputs */\n\n &--input {\n height: $formInputHeight;\n }\n\n /* Textarea */\n\n &--textarea {\n min-height: $formInputHeight;\n resize: vertical;\n }\n }\n\n &__label {\n @include font('heavy');\n @include fontSize('nano');\n @include truncate;\n color: $formColor;\n width: auto;\n position: absolute;\n top: calc(#{$formInputHeight} / 2);\n // padding-left (medium) + border-left\n left: calc(#{space('medium')} + 1px);\n max-width: calc(100% - #{space('medium')} * 2);\n transform: translateY(-50%);\n transition: all $baseTransitionAnimationSpeed;\n pointer-events: none;\n\n &:empty {\n display: none;\n }\n\n &::before {\n content: '';\n display: none;\n background: $colorWhite;\n position: absolute;\n width: 100%;\n z-index: -1;\n left: 0;\n top: 50%;\n // prevent white line not fully overlaping border of input\n margin-top: -0.5px;\n height: 2px;\n }\n }\n\n &__input:hover + &__label,\n &__input:focus + &__label {\n color: $colorPrimaryHover;\n }\n\n &__button-right {\n display: none;\n\n &[disabled]:not([disabled=\"false\"])[variant=\"input\"] {\n --color: #{$formColor};\n --background-color: transparent;\n --border-color: transparent;\n\n --hover-color: #{$colorPrimaryHover};\n --hover-background-color: transparent;\n --hover-border-color: transparent;\n }\n }\n\n /* Clearable / Search input */\n\n &--is-clearable#{&}--is-filled:not(#{&}--is-readonly):not(#{&}--is-disabled) &__button-right,\n &--type-search &__button-right {\n display: block;\n }\n\n &--type-search:not(#{&}--is-filled) &__button-right,\n &--type-search#{&}--is-readonly &__button-right,\n &--type-search#{&}--is-disabled &__button-right {\n pointer-events: none;\n }\n\n /* Filled variant */\n\n &--is-filled &__button-right {\n &.is-search {\n pointer-events: initial;\n }\n }\n\n /* Styles for floating label */\n\n &:not(#{&}--is-readonly):not(#{&}--is-disabled) &__input:focus + &__label,\n &--has-fixed-label &__label,\n &--is-filled &__label,\n &--is-readonly &__label,\n &--is-disabled &__label,\n &--is-invalid &__label {\n display: block;\n top: 0;\n // padding-left (input field medium) - padding-left\n left: calc(#{space('medium')} - #{space('xxsmall')});\n height: 20px; // dividable by two (so before element is always positioned correctly)\n line-height: 20px;\n padding: 0 space('xxsmall');\n max-width: calc(100% - #{space('small')} * 2);\n pointer-events: all;\n\n &:not(:empty)::before {\n display: block;\n }\n }\n\n /* Button Right Variant */\n\n &--has-button-right &__input {\n // distance to icon + icon button width\n padding-right: calc(#{space('xsmall')} + #{$formInputHeight});\n }\n\n &--has-button-right &__label {\n // 100% - ((padding left of normal variant + border 1px) * 2) - icon button width\n max-width: calc(100% - (#{space('medium')} + 1px) * 2 - #{$formInputHeight});\n }\n\n &--has-button-right#{&}:not(#{&}--is-readonly):not(#{&}--is-disabled) &__input:focus + &__label,\n &--has-button-right#{&}--has-fixed-label &__label,\n &--has-button-right#{&}--is-filled &__label,\n &--has-button-right#{&}--is-readonly &__label,\n &--has-button-right#{&}--is-disabled &__label,\n &--has-button-right#{&}--is-invalid &__label {\n // 100% - left distance to text + 1px border + padding label right side - icon button width\n max-width: calc(100% - #{space('medium')} - #{space('xxsmall')} - 1px + #{space('xxsmall')} - #{$formInputHeight});\n }\n\n /* Size variants */\n\n &--size-small {\n @include fontSize('micro');\n }\n\n &--size-small &__input {\n @include fontSize('micro');\n\n &--input {\n height: $formInputHeightSmall;\n }\n\n &--textarea {\n min-height: $formInputHeightSmall;\n }\n }\n\n &--size-small &__label {\n top: calc(#{$formInputHeightSmall} / 2);\n }\n\n &--size-small#{&}:not(#{&}--is-readonly):not(#{&}--is-disabled) &__input:focus + &__label,\n &--size-small#{&}--has-fixed-label &__label,\n &--size-small#{&}--is-filled &__label,\n &--size-small#{&}--is-readonly &__label,\n &--size-small#{&}--is-disabled &__label,\n &--size-small#{&}--is-invalid &__label {\n top: 0;\n }\n\n &--size-small#{&}--has-button-right &__input {\n padding-right: calc(#{space('xxsmall')} + #{$formInputHeightSmall});\n }\n\n &--size-small#{&}--has-button-right &__label {\n max-width: calc(100% - (#{space('medium')} + 1px) * 2 - #{$formInputHeightSmall});\n }\n\n &--size-small#{&}--has-button-right#{&}:not(#{&}--is-readonly):not(#{&}--is-disabled) &__input:focus + &__label,\n &--size-small#{&}--has-button-right#{&}--has-fixed-label &__label,\n &--size-small#{&}--has-button-right#{&}--is-filled &__label,\n &--size-small#{&}--has-button-right#{&}--is-readonly &__label,\n &--size-small#{&}--has-button-right#{&}--is-disabled &__label,\n &--size-small#{&}--has-button-right#{&}--is-invalid &__label {\n max-width: calc(100% - #{space('medium')} - #{space('xxsmall')} - 1px + #{space('xsmall')} - #{$formInputHeightSmall});\n }\n\n /* Spin button */\n\n &:not(#{&}--has-spin) &__input {\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n appearance: none;\n margin: 0;\n }\n\n &[type=number] {\n appearance: textfield;\n }\n }\n\n /* Hidden label */\n &--has-label-hidden &__label {\n @include visuallyhidden;\n }\n\n /* Invalid */\n\n &--is-invalid &__input,\n &--is-invalid &__label,\n &--is-invalid &__input + &__label {\n color: $colorError;\n }\n\n &--is-invalid &__input {\n border-color: $colorError;\n\n @include placeholder {\n color: $colorError;\n }\n }\n\n /* Readonly / Disabled */\n\n &--is-readonly &__input,\n &--is-readonly &__input + &__label,\n &--is-disabled &__input,\n &--is-disabled &__input + &__label {\n color: $formDisabledColor;\n }\n\n &--is-readonly &__input,\n &--is-disabled &__input {\n color: $formDisabledColor;\n border-color: $formDisabledBorderColor;\n background-color: $formDisabledBackgroundColor;\n cursor: not-allowed;\n\n @include placeholder {\n color: $formDisabledColor;\n }\n\n &:hover,\n &:focus {\n border-color: $formDisabledBorderColor;\n }\n }\n\n &--is-readonly &__label,\n &--is-disabled &__label {\n cursor: not-allowed;\n\n &::before {\n background: transparent;\n }\n }\n\n &--is-readonly &__button-right,\n &--is-disabled &__button-right {\n &[disabled]:not([disabled=\"false\"])[variant=\"input\"] {\n --color: #{$formDisabledColor};\n --hover-color: #{$formDisabledColor};\n }\n }\n}\n","import {\n Component,\n Prop,\n Host,\n Event,\n EventEmitter,\n State,\n Method,\n Element,\n h,\n Watch\n} from \"@stencil/core\";\n\nimport {\n StzhInputChangeEvent,\n StzhInputChangedEvent,\n StzhInputFocusEvent,\n StzhInputBlurEvent\n} from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\nimport { StzhInputDescription } from \"./stzh-input-description\";\n\nlet inputCounter = 0;\n\n/**\n * @slot - Slot for label content\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot error - Slot for error\n * @slot button-right - Slot for right button\n */\n@Component({\n tag: \"stzh-input\",\n styleUrl: \"stzh-input.scss\",\n scoped: true\n})\nexport class StzhInput {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Whether the input is a textarea or an input field */\n @Prop() multiline: boolean = false;\n\n /** Rows attribute if input element is textarea */\n @Prop() rows: number;\n\n /** If input field, this defines the type (if `search`, a search icon will be displayed) */\n @Prop() type: \"text\" | \"search\" | \"password\" | \"email\" | \"url\" | \"tel\" | \"number\" = \"text\";\n\n /** If input type is number, this will be the step size */\n @Prop() step: number = 1;\n\n /** If input type is number, this will be the minimum step number */\n @Prop() min: number;\n\n /** If input type is number, this will be the maximum step number */\n @Prop() max: number;\n\n /** If input type is number and this property is true, this will show the spin buttons on hover/focus */\n @Prop({ reflect: true }) showSpin: boolean = false;\n\n /** Whether the element is readonly or not */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Whether clearable button is showing when input field has value and is enabled (button-right slot not usable anymore when true) */\n @Prop({ reflect: true }) clearable: boolean = false;\n\n /** Append text to label depending if field is optional/required. true -> show \"(optional)\", false -> show nothing */\n @Prop({ reflect: true }) showMarker: boolean = false;\n\n /** Minimum of characters */\n @Prop() minlength: number;\n\n /** Maxlength of characters */\n @Prop() maxlength: number;\n\n /** The name of the input element */\n @Prop({ reflect: true }) name: string;\n\n /** The value of the input element */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /**\n * Specify inputmode.\n * See [MDN](https://developer.mozilla.org/de/docs/Web/HTML/Global_attributes/inputmode) for possible values\n */\n @Prop() inputmode: string;\n\n /**\n * Specify what the user agent has to provide as automated assistance.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for possible values\n */\n @Prop() autocomplete: string = \"on\";\n\n /** Whether autocomplete should be turned off */\n @Prop() noAutocomplete: boolean = false;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Whether label should be visually hidden. */\n @Prop() labelHidden: boolean = false;\n\n /** Size variant */\n @Prop({ reflect: true }) size: \"default\" | \"small\" = \"default\";\n\n /** Id for element which describes the input (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n /** Whether the input is filled or not */\n @State() filled: boolean;\n\n @Element() element: HTMLStzhInputElement;\n\n /** Focus input field */\n @Method()\n async setFocus() {\n this.input.focus();\n }\n\n /** Input change event */\n @Event() stzhChange: EventEmitter<StzhInputChangeEvent>;\n\n /** Input changed event */\n @Event() stzhChanged: EventEmitter<StzhInputChangedEvent>;\n\n /** Input focus event */\n @Event() stzhFocus: EventEmitter<StzhInputFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhInputBlurEvent>;\n\n @Watch(\"value\")\n valueWatcher(newValue: string) {\n this.filled = newValue !== \"\";\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n\n this.invalid = this._error.length > 0;\n }\n\n @Watch(\"type\")\n typeWatcher(newValue: string) {\n const types = [\n \"text\", \"search\", \"password\", \"email\", \"url\", \"tel\", \"number\"\n ];\n\n if (!this.multiline && !types.includes(newValue)) {\n throw new Error(`Type ${newValue} not supported`);\n }\n }\n\n private input: HTMLInputElement | HTMLTextAreaElement;\n private inputId: string;\n private focusedByInput: boolean = false;\n\n private onClearClick = (event: MouseEvent) => {\n this.value = \"\";\n this.input.focus();\n\n this.stzhChange.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value\n });\n\n this.stzhChanged.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value\n });\n }\n\n private onInput = (event: InputEvent) => {\n this.value = this.input.value;\n\n this.stzhChange.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value\n });\n }\n\n private onChange = (event: InputEvent) => {\n this.value = this.input.value;\n\n this.stzhChanged.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value\n });\n }\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.setFocus();\n }\n\n this.focusedByInput = false;\n }\n\n private onFocus = (event: FocusEvent) => {\n this.focusedByInput = true;\n\n const focusEvent = new FocusEvent('focus', {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(focusEvent);\n this.stzhFocus.emit({\n component: \"stzh-input\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\n // fixes weird bug where autofill selection doesn't get removed\n this.input.value = this.input.value;\n\n const blurEvent = new FocusEvent('blur', {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(blurEvent);\n this.stzhBlur.emit({\n component: \"stzh-input\",\n originalEvent: event\n });\n }\n\n private renderTextarea(): HTMLTextAreaElement {\n return (\n <textarea\n class=\"stzh-input__input stzh-input__input--textarea\"\n ref={(el) => (this.input = el as HTMLTextAreaElement)}\n id={this.inputId}\n name={this.name}\n value={this.value}\n rows={this.rows}\n disabled={this.disabled}\n readonly={this.readonly}\n minlength={this.minlength}\n maxlength={this.maxlength}\n aria-describedby={`${this.inputId}-description ${this.a11yDescribedby}`}\n aria-required={this.required ? \"true\" : \"false\"}\n aria-invalid={this.invalid ? \"true\" : \"false\"}\n onChange={this.onChange}\n onInput={this.onInput}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n ></textarea>\n );\n }\n\n private renderInput(): HTMLInputElement {\n return (\n <input\n class=\"stzh-input__input stzh-input__input--input\"\n ref={(el) => (this.input = el as HTMLInputElement)}\n id={this.inputId}\n type={this.type}\n name={this.name}\n value={this.value}\n min={this.min}\n max={this.max}\n step={this.step}\n inputmode={this.inputmode}\n disabled={this.disabled}\n readonly={this.readonly}\n minlength={this.minlength}\n maxlength={this.maxlength}\n autocomplete={this.noAutocomplete ? \"off\" : this.autocomplete}\n aria-autocomplete={this.noAutocomplete ? \"none\" : undefined}\n aria-describedby={`${this.inputId}-description ${this.a11yDescribedby}`}\n aria-required={this.required ? \"true\" : \"false\"}\n aria-invalid={this.invalid ? \"true\" : \"false\"}\n onChange={this.onChange}\n onInput={this.onInput}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n />\n );\n }\n\n async componentWillLoad() {\n this.inputId = `stzh-input-${inputCounter++}`;\n this.typeWatcher(this.type);\n this.valueWatcher(this.value);\n this.errorWatcher(this.error);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"input\");\n }\n }\n\n render() {\n const buttonRightSlotUsed = hasSlot(this.element, 'button-right');\n const descriptionUsed = hasSlot(this.element, 'description') || !!this.description;\n const descriptionLongUsed = hasSlot(this.element, 'description-long') || !!this.descriptionLong;\n const errorUsed = hasSlot(this.element, 'error') || !!this.error;\n const classes = {\n \"stzh-input\": true,\n \"stzh-input--has-button-right\": buttonRightSlotUsed\n || this.type === \"search\"\n || (this.clearable && this.filled && !this.readonly && !this.disabled),\n \"stzh-input--has-description\": descriptionUsed,\n \"stzh-input--has-description-long\": descriptionLongUsed,\n \"stzh-input--has-error\": errorUsed,\n \"stzh-input--has-spin\": this.showSpin,\n \"stzh-input--is-invalid\": this.invalid,\n \"stzh-input--is-disabled\": this.disabled,\n \"stzh-input--is-readonly\": this.readonly,\n \"stzh-input--is-required\": this.required,\n \"stzh-input--is-filled\": this.filled,\n \"stzh-input--is-clearable\": this.clearable,\n \"stzh-input--has-fixed-label\": window?.stzhComponents?.labels === \"fixed\",\n \"stzh-input--has-label-hidden\": this.labelHidden,\n [`stzh-input--size-${this.size}`]: !!this.size,\n [`stzh-input--type-${this.type}`]: !!this.type,\n };\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n <div class={classes}>\n <div class=\"stzh-input__field-wrapper\">\n {this.multiline ? this.renderTextarea() : this.renderInput()}\n <label class=\"stzh-input__label\" htmlFor={this.inputId}>\n {this.label ? this.label : <slot></slot>}\n {this.showMarker &&\n <span class=\"stzh-input__marker\">\n <span class=\"stzh-input__marker-symbol\" aria-hidden=\"true\">\n {this.required\n ? this.localization.$globals.requiredFieldMarker\n : this.localization.$globals.optionalFieldMarker\n }\n </span>\n <span class=\"stzh-input__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText\n }\n </span>\n </span>\n }\n </label>\n {this.clearable || this.type === \"search\"\n ?\n <stzh-button\n class=\"stzh-input__button-right\"\n icon={this.disabled || this.readonly || !this.filled ? \"search\" : \"close-circle\"}\n icon-only\n variant=\"input\"\n onClick={this.onClearClick}\n disabled={this.disabled || this.readonly || !this.filled}\n a11yLabel={this.localization.$globals.clearButtonLabel}\n aria-controls={this.inputId}\n ></stzh-button>\n :\n <slot name=\"button-right\"></slot>\n }\n </div>\n <StzhInputDescription\n classPrefix=\"stzh-input\"\n id={`${this.inputId}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButtonLabel}\n />\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"gKAAA,MAAMA,EAAe,m/iBCyBrB,IAAIC,EAAe,E,MAcNC,EAAS,M,iLA0JZC,KAAAC,eAA0B,MAE1BD,KAAAE,aAAgBC,IACtBH,KAAKI,MAAQ,GACbJ,KAAKK,MAAMC,QAEXN,KAAKO,WAAWC,KAAK,CACnBC,UAAW,aACXC,cAAeP,EACfC,MAAOJ,KAAKI,QAGdJ,KAAKW,YAAYH,KAAK,CACpBC,UAAW,aACXC,cAAeP,EACfC,MAAOJ,KAAKI,OACZ,EAGIJ,KAAAY,QAAWT,IACjBH,KAAKI,MAAQJ,KAAKK,MAAMD,MAExBJ,KAAKO,WAAWC,KAAK,CACnBC,UAAW,aACXC,cAAeP,EACfC,MAAOJ,KAAKI,OACZ,EAGIJ,KAAAa,SAAYV,IAClBH,KAAKI,MAAQJ,KAAKK,MAAMD,MAExBJ,KAAKW,YAAYH,KAAK,CACpBC,UAAW,aACXC,cAAeP,EACfC,MAAOJ,KAAKI,OACZ,EAGIJ,KAAAc,YAAc,KACpB,IAAKd,KAAKC,eAAgB,CACxBD,KAAKe,U,CAGPf,KAAKC,eAAiB,KAAK,EAGrBD,KAAAgB,QAAWb,IACjBH,KAAKC,eAAiB,KAEtB,MAAMgB,EAAa,IAAIC,WAAW,QAAS,CACzCC,KAAMC,OACNC,QAAS,MACTC,WAAY,QAGdtB,KAAKuB,QAAQC,cAAcP,GAC3BjB,KAAKyB,UAAUjB,KAAK,CAClBC,UAAW,aACXC,cAAeP,GACf,EAGIH,KAAA0B,OAAUv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2BACT9C,KAAK0D,SACF1D,KAAKsE,aAAawB,SAASG,kBAC3BjG,KAAKsE,aAAawB,SAASI,qBAMtClG,KAAKmF,WAAanF,KAAK4D,OAAS,SAE/Bf,EAAA,eACEC,MAAM,2BACNqD,KAAMnG,KAAKqD,UAAYrD,KAAKsD,WAAatD,KAAK+B,OAAS,SAAW,eAAc,iBAEhFqE,QAAQ,QACRC,QAASrG,KAAKE,aACdmD,SAAUrD,KAAKqD,UAAYrD,KAAKsD,WAAatD,KAAK+B,OAClDuE,UAAWtG,KAAKsE,aAAawB,SAASS,iBAAgB,gBACvCvG,KAAKkD,UAGtBL,EAAA,QAAMM,KAAK,kBAGfN,EAAC2D,EAAoB,CACnBC,YAAY,aACZxD,GAAI,GAAGjD,KAAKkD,sBACZmB,MAAOrE,KAAKiC,OACZ6C,YAAa9E,KAAK8E,YAClBE,gBAAiBhF,KAAKgF,gBACtBD,oBAAqBA,EACrB2B,oBAAqB1G,KAAKsE,aAAawB,SAASY,uB"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["stzhChipCss","StzhChip","exports","this","focusedByInput","onRootFocus","_this","setFocus","onFocus","event","focusEvent","FocusEvent","view","window","bubbles","cancelable","element","dispatchEvent","stzhFocus","emit","component","originalEvent","onBlur","blurEvent","stzhBlur","onClick","stzhClick","onRemoveClick","stzhRemove","class_1","prototype","chip","focus","componentDidRender","requestAnimationFrame","setAttribute","analyticsId","text","innerText","renderInner","h","Fragment","class","icon","name","lines","ref","el","label","counter","render","classes","_a","active","disabled","removable","concat","type","size","variant","Chip","nonInteractive","href","Host","tabindex","removeLabel","removeAnalyticsId","target","a11yTabindex","a11yLabel","a11yDescribedby","stzhClampCss","StzhClamp","updateClamped","textCloneElement","beforeClamped","clamped","scrollHeight","clientHeight","stzhClamp","handleResize","debounceResize","cancelAnimationFrame","handleMutaton","update","handleExpandClick","__awaiter","expanded","waitForNextRender","sent","stzhExpand","class_2","innerHTML","textElement","Promise","resolve","renderPromiseResolve","componentWillLoad","localization","stzhComponents","utils","fetchTranslations","_b","componentDidLoad","mutationObserver","MutationObserver","observe","childList","subtree","connectedCallback","resizeObserver","ResizeObserver","disconnectedCallback","disconnect","style","toString","linesSmall","linesMedium","linesLarge","linesUltra","showExpandLink","showMore","showLess"],"sources":["src/components/stzh-chip/stzh-chip.scss?tag=stzh-chip&encapsulation=scoped","src/components/stzh-chip/stzh-chip.tsx","src/components/stzh-clamp/stzh-clamp.scss?tag=stzh-clamp","src/components/stzh-clamp/stzh-clamp.tsx"],"sourcesContent":[":host {\n --color: #{$colorPrimary};\n --height: 32px;\n --padding: 0 #{space('medium')};\n --border-color: #{$baseBorderColor};\n --border-radius: 16px;\n --remove-color: #{$baseLeadColor};\n --remove-border-radius: 24px;\n --background-color: #{$colorWhite};\n --icon-size: #{iconSize('small')};\n --icon-color: #{$colorPrimary};\n --icon-gap: #{space('xsmall')};\n --counter-color: #{$colorPrimary60op};\n --counter-gap: #{space('xsmall')};\n\n --hover-color: #{$colorPrimaryHover};\n --hover-border-color: var(--border-color);\n --hover-background-color: #{$colorPrimary8};\n --hover-remove-color: var(--hover-color);\n --hover-remove-background-color: var(--hover-background-color);\n --hover-icon-color: #{$colorPrimaryHover};\n --hover-counter-color: #{$colorPrimaryHover};\n\n display: inline-flex;\n\n @include highContrast() {\n --hover-color: Highlight;\n --hover-border-color: Highlight;\n --hover-background-color: Canvas;\n --hover-remove-color: Highlight;\n --hover-remove-background-color: Canvas;\n --hover-icon-color: Highlight;\n --hover-counter-color: Highlight;\n }\n\n &[size=\"large\"] {\n --height: 40px;\n --border-radius: 20px;\n --padding: 0 #{space('xlarge')};\n }\n\n &[size=\"small\"] {\n --height: 24px;\n --icon-size: #{iconSize('xsmall')};\n --counter-gap: #{space('xxsmall')};\n }\n\n &[variant=\"input\"] {\n --border-color: transparent;\n --background-color: #{$colorGrey5};\n\n --hover-border-color: transparent;\n }\n\n &[variant=\"tag\"] {\n --color: #{$baseColor};\n --icon-color: #{$baseColor};\n --counter-color: #{$baseColor};\n --border-color: transparent;\n --background-color: #{$colorBlack8};\n\n --hover-color: #{$baseColor};\n --hover-border-color: transparent;\n --hover-background-color: #{$colorBlack8};\n --hover-icon-color: #{$baseColor};\n --hover-counter-color: #{$baseColor};\n }\n\n &[variant=\"input\"][size=\"small\"] {\n --padding: 0 #{space('small')};\n --icon-gap: #{space('xxsmall')};\n }\n\n &[variant=\"tag\"][size=\"small\"] {\n --padding: 0 #{space('xsmall')};\n --icon-gap: #{space('xxsmall')};\n }\n\n &[type=\"secondary\"] {\n --color: #{$baseLeadColor};\n --counter-color: #{$colorGrey40};\n }\n\n &[type=\"important\"] {\n --color: #{$colorError};\n --icon-color: #{$colorError};\n --counter-color: #{$colorError};\n\n --hover-color: #{$colorError};\n --hover-icon-color: #{$colorError};\n --hover-counter-color: #{$colorError};\n\n @include highContrast() {\n --hover-color: Highlight;\n --hover-icon-color: Highlight;\n --hover-counter-color: Highlight;\n }\n }\n\n &[active]:not([active=\"false\"]) {\n --color: #{$colorWhite};\n --border-color: transparent;\n --remove-color: #{$colorWhite};\n --background-color: #{$colorPrimary};\n --icon-color: #{$colorWhite};\n --counter-color: #{$colorWhite56};\n\n --hover-color: #{$colorWhite};\n --hover-border-color: transparent;\n --hover-background-color: #{$colorPrimaryHover};\n --hover-remove-color: #{$colorWhite};\n --hover-remove-background-color: #{$colorPrimaryHover};\n --hover-icon-color: #{$colorWhite};\n --hover-counter-color: #{$colorWhite56};\n\n @include highContrast() {\n --color: SelectedItem;\n --border-color: SelectedItem;\n --remove-color: SelectedItem;\n --background-color: Canvas;\n --icon-color: SelectedItem;\n --counter-color: SelectedItem;\n\n --hover-color: Highlight;\n --hover-border-color: Highlight;\n --hover-background-color: Canvas;\n --hover-remove-color: Highlight;\n --hover-remove-background-color: Canvas;\n --hover-icon-color: Highlight;\n --hover-counter-color: Highlight;\n }\n }\n\n &[non-interactive]:not([non-interactive=\"false\"]) {\n --hover-color: var(--color);\n --hover-border-color: var(--border-color);\n --hover-background-color: var(--background-color);\n --hover-icon-color: var(--icon-color);\n --hover-counter-color: var(--counter-color);\n }\n\n &[disabled]:not([disabled=\"false\"]) {\n --color: #{$colorGrey25};\n --border-color: #{$baseBorderColor};\n --remove-color: #{$colorGrey13};\n --background-color: #{$colorWhite};\n --icon-color: #{$colorGrey25};\n --counter-color: #{$colorGrey25};\n\n --hover-color: #{$colorGrey25};\n --hover-border-color: #{$baseBorderColor};\n --hover-background-color: #{$colorWhite};\n --hover-remove-color: #{$colorGrey13};\n --hover-remove-background-color: transparent;\n --hover-icon-color: #{$colorGrey25};\n --hover-counter-color: #{$colorGrey25};\n }\n}\n\n:host ::slotted(stzh-icon),\n.stzh-chip__icon {\n --size: var(--icon-size);\n}\n\n.stzh-chip {\n position: relative;\n\n &__vhidden {\n @include visuallyhidden;\n }\n\n &__button {\n @include fontSize('micro');\n font-family: inherit;\n height: var(--height);\n display: flex;\n flex-direction: row;\n align-items: center;\n border-radius: var(--border-radius);\n padding: var(--padding);\n color: var(--color);\n appearance: none;\n border-width: 1px;\n border-style: solid;\n border-color: var(--border-color);\n background-color: var(--background-color);\n transition-duration: $baseTransitionAnimationSpeed;\n transition-property: color, background-color, border-color;\n text-decoration-line: none;\n\n &.is-button,\n &.is-link {\n cursor: pointer;\n }\n }\n\n &__label {\n text-align: left;\n }\n\n &__icon-wrapper {\n display: flex;\n color: var(--icon-color);\n transition: color $baseTransitionAnimationSpeed;\n flex-shrink: 0;\n\n &:not(:empty) {\n margin-right: var(--icon-gap);\n }\n }\n\n &__counter {\n display: flex;\n font-variant-numeric: tabular-nums;\n margin-left: var(--counter-gap);\n color: var(--counter-color);\n transition: color $baseTransitionAnimationSpeed;\n }\n\n &__remove {\n position: absolute;\n top: 0;\n right: 0;\n appearance: none;\n font-family: inherit;\n border: none;\n background: none;\n padding: 0;\n width: var(--height);\n height: var(--height);\n border-radius: var(--remove-border-radius);\n display: flex;\n justify-content: center;\n align-items: center;\n margin-left: space('xxsmall');\n color: var(--remove-color);\n transition-duration: $baseTransitionAnimationSpeed;\n transition-property: color, background-color, border-color;\n cursor: pointer;\n\n &:hover {\n color: var(--hover-remove-color);\n background-color: var(--hover-remove-background-color);\n }\n }\n\n &__remove-icon {\n --size: #{iconSize('xxsmall')};\n }\n\n &__button:hover,\n &__remove:hover + &__button {\n color: var(--hover-color);\n background-color: var(--hover-background-color);\n border-color: var(--hover-border-color);\n }\n\n &__button:hover &__counter,\n &__remove:hover + &__button &__counter {\n color: var(--hover-counter-color);\n }\n\n &__button:hover &__icon-wrapper,\n &__remove:hover + &__button &__icon-wrapper {\n color: var(--hover-icon-color);\n }\n\n /* Size */\n\n &--size-small &__button {\n @include fontSize('nano');\n }\n\n /* Removeable */\n\n &--is-removable &__button {\n padding-right: calc(var(--height) + #{space('xxsmall')});\n }\n\n /* Disabled */\n\n &--is-disabled &__button,\n &--is-disabled &__remove {\n cursor: not-allowed;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n Method,\n Fragment\n} from \"@stencil/core\";\n\nimport {\n StzhChipClickEvent,\n StzhChipRemoveEvent,\n StzhChipFocusEvent,\n StzhChipBlurEvent\n} from \"../../index\";\n\n/**\n * @slot - Slot for label\n * @slot icon - Slot for icon\n */\n@Component({\n tag: \"stzh-chip\",\n styleUrl: \"stzh-chip.scss\",\n scoped: true\n})\nexport class StzhChip {\n /** Label */\n @Prop() label: string = \"\";\n\n /** Icon (use instead of icon slot) */\n @Prop() icon: string = \"\";\n\n /** `href` if the chip should be used as link */\n @Prop() href: string = \"\";\n\n /** Target if the button is used as link (if `href` used) */\n @Prop() target: string = \"\";\n\n /** Whether chip is not interactive */\n @Prop({ reflect: true }) nonInteractive: boolean = false;\n\n /** Whether remove button should be shown */\n @Prop({ reflect: true }) removable: boolean = false;\n\n /** Variant */\n @Prop({ reflect: true }) variant: \"tag\" | \"filter\" | \"input\" = \"tag\";\n\n /** Size */\n @Prop({ reflect: true }) size: \"default\" | \"small\" | \"large\" = \"default\";\n\n /** Type */\n @Prop({ reflect: true }) type: \"default\" | \"secondary\" | \"important\" = \"default\";\n\n /** Counter */\n @Prop() counter: string = \"\";\n\n /** Label of remove button for screenreaders */\n @Prop() removeLabel: string = \"\";\n\n /** Active */\n @Prop({ reflect: true }) active: boolean = false;\n\n /** Disabled */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Tabindex of link/button */\n @Prop({ attribute: \"a11y-tabindex\" }) a11yTabindex: string;\n\n /** Accessible label for screen readers to replace visible text */\n @Prop({ attribute: \"a11y-label\" }) a11yLabel: string;\n\n /** Id for element which describes the link/button */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link/button element.\n * Default value will be taken from `label` prop or default slot.\n */\n @Prop() analyticsId: string;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the remove button element.\n * Default value will be taken from `removeLabel` prop.\n */\n @Prop() removeAnalyticsId: string;\n\n @Element() element: HTMLStzhChipElement;\n\n /** Focus menu item */\n @Method()\n async setFocus() {\n this.chip.focus();\n }\n\n /** Chip click event */\n @Event() stzhClick: EventEmitter<StzhChipClickEvent>;\n\n /** Chip remove event */\n @Event() stzhRemove: EventEmitter<StzhChipRemoveEvent>;\n\n /** Focus event */\n @Event() stzhFocus: EventEmitter<StzhChipFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhChipBlurEvent>;\n\n private chip: HTMLButtonElement | HTMLAnchorElement;\n private text: HTMLElement;\n private focusedByInput: boolean = false;\n\n componentDidRender() {\n requestAnimationFrame(() => {\n this.chip.setAttribute(\"s-object-id\", this.analyticsId || this.text.innerText);\n });\n }\n\n private renderInner(): DocumentFragment {\n return (\n <Fragment>\n <div class=\"stzh-chip__icon-wrapper\">\n {this.icon ?\n <stzh-icon class=\"stzh-chip__icon\" name={this.icon}></stzh-icon>\n :\n <slot name=\"icon\"></slot>\n }\n </div>\n\n <stzh-clamp\n lines={1}\n class=\"stzh-chip__label\"\n ref={(el) => (this.text = el as HTMLElement)}\n >\n {this.label ? this.label : <slot></slot>}\n {this.counter &&\n <span class=\"stzh-chip__vhidden\">\n &nbsp;({this.counter})\n </span>\n }\n </stzh-clamp>\n\n {this.counter &&\n <div class=\"stzh-chip__counter\" aria-hidden=\"true\">\n {this.counter}\n </div>\n }\n </Fragment>\n );\n }\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.setFocus();\n }\n\n this.focusedByInput = false;\n }\n\n private onFocus = (event: FocusEvent) => {\n this.focusedByInput = true;\n\n const focusEvent = new FocusEvent(\"focus\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(focusEvent);\n this.stzhFocus.emit({\n component: \"stzh-chip\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\n const blurEvent = new FocusEvent(\"blur\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(blurEvent);\n this.stzhBlur.emit({\n component: \"stzh-chip\",\n originalEvent: event\n });\n }\n\n private onClick = (event: MouseEvent) => {\n this.stzhClick.emit({\n component: \"stzh-chip\",\n originalEvent: event\n });\n }\n\n private onRemoveClick = (event: MouseEvent) => {\n this.stzhRemove.emit({\n component: \"stzh-chip\",\n originalEvent: event\n });\n }\n\n render() {\n const classes = {\n \"stzh-chip\": true,\n \"stzh-chip--is-active\": this.active,\n \"stzh-chip--is-disabled\": this.disabled,\n \"stzh-chip--is-removable\": this.removable,\n \"stzh-chip--has-counter\": !!this.counter,\n [`stzh-chip--type-${this.type}`]: !!this.type,\n [`stzh-chip--size-${this.size}`]: !!this.size,\n [`stzh-chip--${this.variant}`]: !!this.variant\n };\n\n const Chip = this.nonInteractive ? \"div\" :\n this.href ? \"a\" : \"button\";\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n <div class={classes}>\n {this.removable &&\n <button\n class=\"stzh-chip__remove\"\n onClick={this.onRemoveClick}\n disabled={this.disabled}\n aria-label={this.removeLabel}\n type=\"button\"\n s-object-id={this.removeAnalyticsId || this.removeLabel}\n >\n <stzh-icon class=\"stzh-chip__remove-icon\" name=\"close\"></stzh-icon>\n </button>\n }\n\n {this.href ?\n <Chip\n ref={(el) => (this.chip = el as HTMLAnchorElement)}\n class={{\n \"stzh-chip__button\": true,\n \"is-button\": !this.nonInteractive && !this.href,\n \"is-link\": !this.nonInteractive && !!this.href\n }}\n href={this.disabled ? null : this.href}\n target={this.target}\n tabindex={this.a11yTabindex}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n onClick={this.onClick}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner()}\n </Chip>\n :\n <Chip\n ref={(el) => (this.chip = el as HTMLButtonElement)}\n class={{\n \"stzh-chip__button\": true,\n \"is-button\": !this.nonInteractive && !this.href,\n \"is-link\": !this.nonInteractive && !!this.href\n }}\n disabled={this.disabled}\n type=\"button\"\n tabindex={this.a11yTabindex}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n onClick={this.onClick}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner()}\n </Chip>\n }\n </div>\n </Host>\n );\n }\n}\n","/**\n * @prop --current-lines: Currently clamped lines number (can be used instead of `lines-{BREAKPOINT}` attributes)\n */\n\nstzh-clamp {\n @include host;\n --current-lines: var(--lines, 0);\n\n @include mq($from: small) {\n --current-lines: var(--lines-small, var(--lines, 0));\n }\n\n @include mq($from: medium) {\n --current-lines: var(--lines-medium, var(--lines-small, var(--lines, 0)));\n }\n\n @include mq($from: large) {\n --current-lines: var(--lines-large, var(--lines-medium, var(--lines-small, var(--lines, 0))));\n }\n\n @include mq($from: ultra) {\n --current-lines: var(--lines-ultra, var(--lines-large, var(--lines-medium, var(--lines-small, var(--lines, 0)))));\n }\n\n width: 100%;\n color: inherit;\n font-family: inherit;\n font-weight: inherit;\n font-style: inherit;\n font-size: inherit;\n line-height: inherit;\n}\n\n.stzh-clamp {\n position: relative;\n\n &__text {\n @include wordWrap;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n overflow: hidden;\n\n & > *:first-child {\n margin-top: 0 !important;\n }\n\n & > *:last-child {\n margin-bottom: 0 !important;\n }\n\n &.is-clone {\n position: absolute;\n visibility: hidden;\n opacity: 0;\n top: 0;\n left: 0;\n width: 100%;\n }\n }\n\n &__trigger {\n margin-top: space('xxsmall');\n }\n\n &--is-not-expanded &__text,\n &__text.is-clone {\n -webkit-line-clamp: var(--current-lines);\n line-clamp: var(--current-lines);\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Method,\n Element,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n\nimport {\n StzhClampClampEvent,\n StzhClampExpandEvent\n} from \"../../index\";\n\nimport { StzhClampLocalizedText } from \"./stzh-clamp.localization\";\n\n/**\n *\n */\n@Component({\n tag: \"stzh-clamp\",\n styleUrl: \"stzh-clamp.scss\"\n})\nexport class StzhClamp {\n /** Translation strings */\n @Prop() localization: StzhClampLocalizedText;\n\n /** Line number */\n @Prop() lines: number = 1;\n /** Line number above small breakpoint */\n @Prop() linesSmall: number = 0;\n /** Line number above medium breakpoint */\n @Prop() linesMedium: number = 0;\n /** Line number above large breakpoint */\n @Prop() linesLarge: number = 0;\n /** Line number above ultra breakpoint */\n @Prop() linesUltra: number = 0;\n\n /** Whether expand link is shown */\n @Prop() showExpandLink: boolean = false;\n\n /** Whether clamping is expanded */\n @Prop({ mutable: true, reflect: true }) expanded: boolean = false;\n\n /** Whether the text is currently clamped (readonly) */\n @Prop({ mutable: true, reflect: true }) clamped: boolean = false;\n\n @Element() element: HTMLStzhClampElement;\n\n /** Event when clamping state changed */\n @Event() stzhClamp: EventEmitter<StzhClampClampEvent>;\n\n /** Event when expanding state changed */\n @Event() stzhExpand: EventEmitter<StzhClampExpandEvent>;\n\n @Method()\n async update() {\n this.textCloneElement.innerHTML = this.textElement.innerHTML;\n this.updateClamped();\n }\n\n private textElement: HTMLElement;\n private textCloneElement: HTMLElement;\n\n private debounceResize: number;\n private resizeObserver: ResizeObserver;\n private mutationObserver: MutationObserver;\n private renderPromiseResolve: (value?: unknown) => void;\n\n private updateClamped = () => {\n if (!this.textCloneElement) {\n return;\n }\n\n const beforeClamped = this.clamped;\n this.clamped = this.textCloneElement.scrollHeight > this.textCloneElement.clientHeight;\n\n if (beforeClamped !== this.clamped) {\n this.stzhClamp.emit({\n component: \"stzh-clamp\",\n clamped: this.clamped\n });\n }\n }\n\n private handleResize = () => {\n if (this.debounceResize) {\n window.cancelAnimationFrame(this.debounceResize);\n }\n\n this.debounceResize = requestAnimationFrame(this.updateClamped);\n }\n\n private handleMutaton = () => {\n this.update();\n }\n\n private handleExpandClick = async () => {\n this.expanded = !this.expanded;\n await this.waitForNextRender();\n\n this.stzhExpand.emit({\n component: \"stzh-clamp\",\n expanded: this.expanded\n });\n }\n\n waitForNextRender() {\n return new Promise(resolve => this.renderPromiseResolve = resolve);\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"clamp\");\n }\n }\n\n componentDidLoad() {\n this.mutationObserver = new MutationObserver(this.handleMutaton);\n this.mutationObserver.observe(this.textElement, {\n childList: true,\n subtree: true,\n });\n }\n\n componentDidRender() {\n if (this.renderPromiseResolve) {\n this.renderPromiseResolve();\n }\n\n this.update();\n }\n\n connectedCallback() {\n this.resizeObserver = new ResizeObserver(this.handleResize);\n this.resizeObserver.observe(this.element);\n }\n\n disconnectedCallback() {\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n }\n }\n\n render() {\n const classes = {\n \"stzh-clamp\": true,\n \"stzh-clamp--is-not-expanded\": !this.expanded\n };\n\n return (\n <Host\n style={{\n '--lines': this.lines ? this.lines.toString() : null,\n '--lines-small': this.linesSmall ? this.linesSmall.toString() : null,\n '--lines-medium': this.linesMedium ? this.linesMedium.toString() : null,\n '--lines-large': this.linesLarge ? this.linesLarge.toString() : null,\n '--lines-ultra': this.linesUltra ? this.linesUltra.toString() : null,\n }}\n >\n <div class={classes}>\n <div\n ref={(el) => (this.textElement = el as HTMLDivElement)}\n class=\"stzh-clamp__text\"\n >\n <slot></slot>\n </div>\n\n <div\n ref={(el) => (this.textCloneElement = el as HTMLDivElement)}\n class=\"stzh-clamp__text is-clone\"\n aria-hidden=\"true\"\n ></div>\n\n {this.showExpandLink && this.clamped &&\n <stzh-link\n class=\"stzh-clamp__trigger\"\n a11yTabindex=\"-1\"\n aria-hidden=\"true\"\n onClick={this.handleExpandClick}\n >\n {!this.expanded ? this.localization.showMore : this.localization.showLess}\n </stzh-link>\n }\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"wnDAAA,IAAMA,EAAc,kiT,IC4BPC,EAAQC,EAAA,uB,uLAqFXC,KAAAC,eAA0B,MAyC1BD,KAAAE,YAAc,WACpB,IAAKC,EAAKF,eAAgB,CACxBE,EAAKC,U,CAGPD,EAAKF,eAAiB,K,EAGhBD,KAAAK,QAAU,SAACC,GACjBH,EAAKF,eAAiB,KAEtB,IAAMM,EAAa,IAAIC,WAAW,QAAS,CACzCC,KAAMC,OACNC,QAAS,MACTC,WAAY,QAGdT,EAAKU,QAAQC,cAAcP,GAC3BJ,EAAKY,UAAUC,KAAK,CAClBC,UAAW,YACXC,cAAeZ,G,EAIXN,KAAAmB,OAAS,SAACb,GAChB,IAAMc,EAAY,IAAIZ,WAAW,OAAQ,CACvCC,KAAMC,OACNC,QAAS,MACTC,WAAY,QAGdT,EAAKU,QAAQC,cAAcM,GAC3BjB,EAAKkB,SAASL,KAAK,CACjBC,UAAW,YACXC,cAAeZ,G,EAIXN,KAAAsB,QAAU,SAAChB,GACjBH,EAAKoB,UAAUP,KAAK,CAClBC,UAAW,YACXC,cAAeZ,G,EAIXN,KAAAwB,cAAgB,SAAClB,GACvBH,EAAKsB,W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