wcs-core 7.0.0 → 7.1.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 (442) hide show
  1. package/design-tokens/dist/sncf-holding-root-scoped.css +589 -0
  2. package/design-tokens/dist/sncf-holding.css +13 -0
  3. package/design-tokens/dist/sncf-holding.json +54 -0
  4. package/design-tokens/dist/sncf-reseau-root-scoped.css +652 -0
  5. package/design-tokens/dist/sncf-reseau.css +10 -0
  6. package/design-tokens/dist/sncf-reseau.json +54 -0
  7. package/design-tokens/dist/sncf-voyageurs-root-scoped.css +550 -0
  8. package/design-tokens/dist/sncf-voyageurs.css +13 -0
  9. package/design-tokens/dist/sncf-voyageurs.json +54 -0
  10. package/dist/cjs/{com-nav-utils-9f6c99b8.js → com-nav-utils-ff4f0bef.js} +2 -2
  11. package/dist/cjs/{com-nav-utils-9f6c99b8.js.map → com-nav-utils-ff4f0bef.js.map} +1 -1
  12. package/dist/cjs/control-component-interface-d9b68f28.js +43 -0
  13. package/dist/cjs/control-component-interface-d9b68f28.js.map +1 -0
  14. package/dist/cjs/{grid-pagination-2c752b22.js → grid-pagination-e4f29c78.js} +3 -3
  15. package/dist/cjs/{grid-pagination-2c752b22.js.map → grid-pagination-e4f29c78.js.map} +1 -1
  16. package/dist/cjs/{helpers-871f5a3d.js → helpers-2f1a8ddc.js} +44 -1
  17. package/dist/cjs/helpers-2f1a8ddc.js.map +1 -0
  18. package/dist/cjs/{keyboard-event-d2c81ce0.js → keyboard-event-40ecdc27.js} +2 -2
  19. package/dist/cjs/{keyboard-event-d2c81ce0.js.map → keyboard-event-40ecdc27.js.map} +1 -1
  20. package/dist/cjs/loader.cjs.js +1 -1
  21. package/dist/cjs/wcs-accordion-panel.cjs.entry.js +1 -1
  22. package/dist/cjs/wcs-action-bar.cjs.entry.js +1 -1
  23. package/dist/cjs/wcs-action-bar.cjs.entry.js.map +1 -1
  24. package/dist/cjs/wcs-badge.cjs.entry.js +1 -1
  25. package/dist/cjs/wcs-badge.cjs.entry.js.map +1 -1
  26. package/dist/cjs/wcs-breadcrumb.cjs.entry.js +1 -1
  27. package/dist/cjs/wcs-button_2.cjs.entry.js +3 -3
  28. package/dist/cjs/wcs-button_2.cjs.entry.js.map +1 -1
  29. package/dist/cjs/wcs-checkbox.cjs.entry.js +6 -2
  30. package/dist/cjs/wcs-checkbox.cjs.entry.js.map +1 -1
  31. package/dist/cjs/wcs-com-nav-category.cjs.entry.js +2 -2
  32. package/dist/cjs/wcs-com-nav-item.cjs.entry.js +1 -1
  33. package/dist/cjs/wcs-com-nav-item.cjs.entry.js.map +1 -1
  34. package/dist/cjs/wcs-com-nav-submenu.cjs.entry.js +2 -2
  35. package/dist/cjs/wcs-com-nav.cjs.entry.js +2 -2
  36. package/dist/cjs/wcs-counter.cjs.entry.js +13 -5
  37. package/dist/cjs/wcs-counter.cjs.entry.js.map +1 -1
  38. package/dist/cjs/wcs-dropdown-item.cjs.entry.js +1 -1
  39. package/dist/cjs/wcs-dropdown.cjs.entry.js +3 -3
  40. package/dist/cjs/wcs-dropdown.cjs.entry.js.map +1 -1
  41. package/dist/cjs/wcs-editable-field.cjs.entry.js +81 -55
  42. package/dist/cjs/wcs-editable-field.cjs.entry.js.map +1 -1
  43. package/dist/cjs/wcs-error_3.cjs.entry.js +209 -0
  44. package/dist/cjs/wcs-error_3.cjs.entry.js.map +1 -0
  45. package/dist/cjs/wcs-field-content.cjs.entry.js +1 -1
  46. package/dist/cjs/wcs-field-label.cjs.entry.js +1 -1
  47. package/dist/cjs/wcs-field.cjs.entry.js +1 -1
  48. package/dist/cjs/wcs-footer.cjs.entry.js +1 -1
  49. package/dist/cjs/wcs-footer.cjs.entry.js.map +1 -1
  50. package/dist/cjs/wcs-galactic-menu.cjs.entry.js +4 -4
  51. package/dist/cjs/wcs-galactic-menu.cjs.entry.js.map +1 -1
  52. package/dist/cjs/wcs-galactic.cjs.entry.js +1 -1
  53. package/dist/cjs/wcs-grid-column.cjs.entry.js +2 -2
  54. package/dist/cjs/wcs-grid-column.cjs.entry.js.map +1 -1
  55. package/dist/cjs/wcs-grid-custom-cell.cjs.entry.js +1 -1
  56. package/dist/cjs/wcs-grid-pagination.cjs.entry.js +2 -2
  57. package/dist/cjs/wcs-grid.cjs.entry.js +6 -6
  58. package/dist/cjs/wcs-header.cjs.entry.js +2 -2
  59. package/dist/cjs/wcs-hint.cjs.entry.js +1 -1
  60. package/dist/cjs/wcs-horizontal-stepper.cjs.entry.js +1 -1
  61. package/dist/cjs/wcs-icon.cjs.entry.js +2 -2
  62. package/dist/cjs/wcs-input.cjs.entry.js +5 -3
  63. package/dist/cjs/wcs-input.cjs.entry.js.map +1 -1
  64. package/dist/cjs/wcs-list-item-properties.cjs.entry.js +1 -1
  65. package/dist/cjs/wcs-list-item-property.cjs.entry.js +1 -1
  66. package/dist/cjs/wcs-list-item.cjs.entry.js +1 -1
  67. package/dist/cjs/wcs-list-item.cjs.entry.js.map +1 -1
  68. package/dist/cjs/wcs-mat-icon.cjs.entry.js +2 -2
  69. package/dist/cjs/wcs-modal.cjs.entry.js +17 -3
  70. package/dist/cjs/wcs-modal.cjs.entry.js.map +1 -1
  71. package/dist/cjs/wcs-native-select.cjs.entry.js +1 -1
  72. package/dist/cjs/wcs-nav-item.cjs.entry.js +3 -3
  73. package/dist/cjs/wcs-nav-item.cjs.entry.js.map +1 -1
  74. package/dist/cjs/wcs-nav.cjs.entry.js +2 -2
  75. package/dist/cjs/wcs-progress-bar.cjs.entry.js +3 -3
  76. package/dist/cjs/wcs-progress-radial.cjs.entry.js +3 -3
  77. package/dist/cjs/wcs-radio-group.cjs.entry.js +5 -2
  78. package/dist/cjs/wcs-radio-group.cjs.entry.js.map +1 -1
  79. package/dist/cjs/wcs-radio.cjs.entry.js +2 -2
  80. package/dist/cjs/wcs-radio.cjs.entry.js.map +1 -1
  81. package/dist/cjs/wcs-select_2.cjs.entry.js +8 -7
  82. package/dist/cjs/wcs-select_2.cjs.entry.js.map +1 -1
  83. package/dist/cjs/wcs-skeleton-circle.cjs.entry.js +1 -1
  84. package/dist/cjs/wcs-skeleton-rectangle.cjs.entry.js +1 -1
  85. package/dist/cjs/wcs-skeleton-text.cjs.entry.js +1 -1
  86. package/dist/cjs/wcs-switch.cjs.entry.js +6 -2
  87. package/dist/cjs/wcs-switch.cjs.entry.js.map +1 -1
  88. package/dist/cjs/wcs-tab.cjs.entry.js +1 -1
  89. package/dist/cjs/wcs-tabs.cjs.entry.js +2 -2
  90. package/dist/cjs/wcs-tabs.cjs.entry.js.map +1 -1
  91. package/dist/cjs/wcs-textarea.cjs.entry.js +2 -2
  92. package/dist/cjs/wcs-textarea.cjs.entry.js.map +1 -1
  93. package/dist/cjs/wcs-tooltip.cjs.entry.js +8 -4
  94. package/dist/cjs/wcs-tooltip.cjs.entry.js.map +1 -1
  95. package/dist/cjs/wcs.cjs.js +1 -1
  96. package/dist/collection/components/action-bar/action-bar.js +2 -2
  97. package/dist/collection/components/action-bar/action-bar.js.map +1 -1
  98. package/dist/collection/components/badge/badge.css +1 -0
  99. package/dist/collection/components/button/button.js +2 -2
  100. package/dist/collection/components/button/button.js.map +1 -1
  101. package/dist/collection/components/checkbox/checkbox.js +22 -1
  102. package/dist/collection/components/checkbox/checkbox.js.map +1 -1
  103. package/dist/collection/components/com-nav-item/com-nav-item.css +2 -1
  104. package/dist/collection/components/counter/counter.css +3 -0
  105. package/dist/collection/components/counter/counter.js +13 -5
  106. package/dist/collection/components/counter/counter.js.map +1 -1
  107. package/dist/collection/components/dropdown/dropdown.js +2 -2
  108. package/dist/collection/components/dropdown/dropdown.js.map +1 -1
  109. package/dist/collection/components/editable-field/editable-field.css +31 -10
  110. package/dist/collection/components/editable-field/editable-field.e2e.js +176 -0
  111. package/dist/collection/components/editable-field/editable-field.e2e.js.map +1 -0
  112. package/dist/collection/components/editable-field/editable-field.js +83 -57
  113. package/dist/collection/components/editable-field/editable-field.js.map +1 -1
  114. package/dist/collection/components/error/error.js +1 -1
  115. package/dist/collection/components/field/field.js +1 -1
  116. package/dist/collection/components/field-content/field-content.js +1 -1
  117. package/dist/collection/components/field-label/field-label.js +1 -1
  118. package/dist/collection/components/footer/footer.js +1 -1
  119. package/dist/collection/components/footer/footer.js.map +1 -1
  120. package/dist/collection/components/form-field/form-field.css +39 -12
  121. package/dist/collection/components/form-field/form-field.e2e.js +122 -0
  122. package/dist/collection/components/form-field/form-field.e2e.js.map +1 -0
  123. package/dist/collection/components/form-field/form-field.js +29 -12
  124. package/dist/collection/components/form-field/form-field.js.map +1 -1
  125. package/dist/collection/components/galactic/galactic.js +1 -1
  126. package/dist/collection/components/galactic-menu/galactic-menu.css +1 -0
  127. package/dist/collection/components/galactic-menu/galactic-menu.js +2 -2
  128. package/dist/collection/components/grid/grid.js +3 -3
  129. package/dist/collection/components/grid-column/grid-column.js +2 -2
  130. package/dist/collection/components/grid-column/grid-column.js.map +1 -1
  131. package/dist/collection/components/grid-custom-cell/grid-custom-cell.js +1 -1
  132. package/dist/collection/components/grid-pagination/grid-pagination.js +1 -1
  133. package/dist/collection/components/header/header.js +1 -1
  134. package/dist/collection/components/hint/hint.js +1 -1
  135. package/dist/collection/components/horizontal-stepper/horizontal-stepper.js +1 -1
  136. package/dist/collection/components/icon/icon.js +1 -1
  137. package/dist/collection/components/input/input.css +10 -1
  138. package/dist/collection/components/input/input.js +42 -3
  139. package/dist/collection/components/input/input.js.map +1 -1
  140. package/dist/collection/components/label/label.js +1 -1
  141. package/dist/collection/components/list-item/list-item.js +7 -2
  142. package/dist/collection/components/list-item/list-item.js.map +1 -1
  143. package/dist/collection/components/list-item-properties/list-item-properties.js +1 -1
  144. package/dist/collection/components/list-item-property/list-item-property.js +1 -1
  145. package/dist/collection/components/mat-icon/mat-icon.js +1 -1
  146. package/dist/collection/components/modal/modal.js +58 -2
  147. package/dist/collection/components/modal/modal.js.map +1 -1
  148. package/dist/collection/components/native-select/native-select.js +1 -1
  149. package/dist/collection/components/nav/nav.js +1 -1
  150. package/dist/collection/components/nav-item/nav-item.css +24 -6
  151. package/dist/collection/components/nav-item/nav-item.js +1 -1
  152. package/dist/collection/components/progress-bar/progress-bar.js +2 -2
  153. package/dist/collection/components/progress-radial/progress-radial.js +2 -2
  154. package/dist/collection/components/radio/radio.js +2 -2
  155. package/dist/collection/components/radio/radio.js.map +1 -1
  156. package/dist/collection/components/radio-group/radio-group.js +39 -2
  157. package/dist/collection/components/radio-group/radio-group.js.map +1 -1
  158. package/dist/collection/components/select/select.js +22 -3
  159. package/dist/collection/components/select/select.js.map +1 -1
  160. package/dist/collection/components/select-option/select-option.js +2 -2
  161. package/dist/collection/components/skeleton-circle/skeleton-circle.js +1 -1
  162. package/dist/collection/components/skeleton-rectangle/skeleton-rectangle.js +1 -1
  163. package/dist/collection/components/skeleton-text/skeleton-text.js +1 -1
  164. package/dist/collection/components/spinner/spinner.js +1 -1
  165. package/dist/collection/components/switch/switch.js +23 -2
  166. package/dist/collection/components/switch/switch.js.map +1 -1
  167. package/dist/collection/components/tab/tab.js +1 -1
  168. package/dist/collection/components/tabs/tabs.js +2 -2
  169. package/dist/collection/components/tabs/tabs.js.map +1 -1
  170. package/dist/collection/components/textarea/textarea.js +3 -3
  171. package/dist/collection/components/textarea/textarea.js.map +1 -1
  172. package/dist/collection/components/tooltip/tooltip.js +10 -8
  173. package/dist/collection/components/tooltip/tooltip.js.map +1 -1
  174. package/dist/collection/utils/control-component-interface.js +37 -0
  175. package/dist/collection/utils/control-component-interface.js.map +1 -0
  176. package/dist/collection/utils/helpers.js +40 -0
  177. package/dist/collection/utils/helpers.js.map +1 -1
  178. package/dist/esm/{com-nav-utils-1366c701.js → com-nav-utils-ee7bf77c.js} +2 -2
  179. package/dist/esm/{com-nav-utils-1366c701.js.map → com-nav-utils-ee7bf77c.js.map} +1 -1
  180. package/dist/esm/control-component-interface-9f09e520.js +40 -0
  181. package/dist/esm/control-component-interface-9f09e520.js.map +1 -0
  182. package/dist/esm/{grid-pagination-421689be.js → grid-pagination-976a86e9.js} +3 -3
  183. package/dist/esm/{grid-pagination-421689be.js.map → grid-pagination-976a86e9.js.map} +1 -1
  184. package/dist/esm/{helpers-f137ec8d.js → helpers-ece6a2d3.js} +42 -2
  185. package/dist/esm/helpers-ece6a2d3.js.map +1 -0
  186. package/dist/esm/{keyboard-event-bdea408a.js → keyboard-event-26b65ae5.js} +2 -2
  187. package/dist/esm/{keyboard-event-bdea408a.js.map → keyboard-event-26b65ae5.js.map} +1 -1
  188. package/dist/esm/loader.js +1 -1
  189. package/dist/esm/wcs-accordion-panel.entry.js +1 -1
  190. package/dist/esm/wcs-action-bar.entry.js +1 -1
  191. package/dist/esm/wcs-action-bar.entry.js.map +1 -1
  192. package/dist/esm/wcs-badge.entry.js +1 -1
  193. package/dist/esm/wcs-badge.entry.js.map +1 -1
  194. package/dist/esm/wcs-breadcrumb.entry.js +1 -1
  195. package/dist/esm/wcs-button_2.entry.js +3 -3
  196. package/dist/esm/wcs-button_2.entry.js.map +1 -1
  197. package/dist/esm/wcs-checkbox.entry.js +6 -2
  198. package/dist/esm/wcs-checkbox.entry.js.map +1 -1
  199. package/dist/esm/wcs-com-nav-category.entry.js +2 -2
  200. package/dist/esm/wcs-com-nav-item.entry.js +1 -1
  201. package/dist/esm/wcs-com-nav-item.entry.js.map +1 -1
  202. package/dist/esm/wcs-com-nav-submenu.entry.js +2 -2
  203. package/dist/esm/wcs-com-nav.entry.js +2 -2
  204. package/dist/esm/wcs-counter.entry.js +13 -5
  205. package/dist/esm/wcs-counter.entry.js.map +1 -1
  206. package/dist/esm/wcs-dropdown-item.entry.js +1 -1
  207. package/dist/esm/wcs-dropdown.entry.js +3 -3
  208. package/dist/esm/wcs-dropdown.entry.js.map +1 -1
  209. package/dist/esm/wcs-editable-field.entry.js +81 -55
  210. package/dist/esm/wcs-editable-field.entry.js.map +1 -1
  211. package/dist/esm/wcs-error_3.entry.js +203 -0
  212. package/dist/esm/wcs-error_3.entry.js.map +1 -0
  213. package/dist/esm/wcs-field-content.entry.js +1 -1
  214. package/dist/esm/wcs-field-label.entry.js +1 -1
  215. package/dist/esm/wcs-field.entry.js +1 -1
  216. package/dist/esm/wcs-footer.entry.js +1 -1
  217. package/dist/esm/wcs-footer.entry.js.map +1 -1
  218. package/dist/esm/wcs-galactic-menu.entry.js +4 -4
  219. package/dist/esm/wcs-galactic-menu.entry.js.map +1 -1
  220. package/dist/esm/wcs-galactic.entry.js +1 -1
  221. package/dist/esm/wcs-grid-column.entry.js +2 -2
  222. package/dist/esm/wcs-grid-column.entry.js.map +1 -1
  223. package/dist/esm/wcs-grid-custom-cell.entry.js +1 -1
  224. package/dist/esm/wcs-grid-pagination.entry.js +2 -2
  225. package/dist/esm/wcs-grid.entry.js +6 -6
  226. package/dist/esm/wcs-header.entry.js +2 -2
  227. package/dist/esm/wcs-hint.entry.js +1 -1
  228. package/dist/esm/wcs-horizontal-stepper.entry.js +1 -1
  229. package/dist/esm/wcs-icon.entry.js +2 -2
  230. package/dist/esm/wcs-input.entry.js +5 -3
  231. package/dist/esm/wcs-input.entry.js.map +1 -1
  232. package/dist/esm/wcs-list-item-properties.entry.js +1 -1
  233. package/dist/esm/wcs-list-item-property.entry.js +1 -1
  234. package/dist/esm/wcs-list-item.entry.js +1 -1
  235. package/dist/esm/wcs-list-item.entry.js.map +1 -1
  236. package/dist/esm/wcs-mat-icon.entry.js +2 -2
  237. package/dist/esm/wcs-modal.entry.js +17 -3
  238. package/dist/esm/wcs-modal.entry.js.map +1 -1
  239. package/dist/esm/wcs-native-select.entry.js +1 -1
  240. package/dist/esm/wcs-nav-item.entry.js +3 -3
  241. package/dist/esm/wcs-nav-item.entry.js.map +1 -1
  242. package/dist/esm/wcs-nav.entry.js +2 -2
  243. package/dist/esm/wcs-progress-bar.entry.js +3 -3
  244. package/dist/esm/wcs-progress-radial.entry.js +3 -3
  245. package/dist/esm/wcs-radio-group.entry.js +5 -2
  246. package/dist/esm/wcs-radio-group.entry.js.map +1 -1
  247. package/dist/esm/wcs-radio.entry.js +2 -2
  248. package/dist/esm/wcs-radio.entry.js.map +1 -1
  249. package/dist/esm/wcs-select_2.entry.js +8 -7
  250. package/dist/esm/wcs-select_2.entry.js.map +1 -1
  251. package/dist/esm/wcs-skeleton-circle.entry.js +1 -1
  252. package/dist/esm/wcs-skeleton-rectangle.entry.js +1 -1
  253. package/dist/esm/wcs-skeleton-text.entry.js +1 -1
  254. package/dist/esm/wcs-switch.entry.js +6 -2
  255. package/dist/esm/wcs-switch.entry.js.map +1 -1
  256. package/dist/esm/wcs-tab.entry.js +1 -1
  257. package/dist/esm/wcs-tabs.entry.js +2 -2
  258. package/dist/esm/wcs-tabs.entry.js.map +1 -1
  259. package/dist/esm/wcs-textarea.entry.js +2 -2
  260. package/dist/esm/wcs-textarea.entry.js.map +1 -1
  261. package/dist/esm/wcs-tooltip.entry.js +8 -4
  262. package/dist/esm/wcs-tooltip.entry.js.map +1 -1
  263. package/dist/esm/wcs.js +1 -1
  264. package/dist/types/components/checkbox/checkbox.d.ts +3 -1
  265. package/dist/types/components/counter/counter.d.ts +6 -0
  266. package/dist/types/components/editable-field/editable-field.d.ts +23 -9
  267. package/dist/types/components/input/input.d.ts +3 -0
  268. package/dist/types/components/list-item/list-item.d.ts +5 -0
  269. package/dist/types/components/modal/modal.d.ts +23 -0
  270. package/dist/types/components/radio-group/radio-group.d.ts +3 -1
  271. package/dist/types/components/select/select.d.ts +4 -0
  272. package/dist/types/components/switch/switch.d.ts +3 -1
  273. package/dist/types/components/tooltip/tooltip.d.ts +3 -5
  274. package/dist/types/components.d.ts +87 -16
  275. package/dist/types/utils/control-component-interface.d.ts +22 -0
  276. package/dist/types/utils/helpers.d.ts +21 -0
  277. package/dist/wcs/p-0017d766.js +2 -0
  278. package/dist/wcs/{p-45a6934d.entry.js → p-0ffdfc10.entry.js} +2 -2
  279. package/dist/wcs/{p-9f23c49e.entry.js → p-13090618.entry.js} +2 -2
  280. package/dist/wcs/{p-8f0e093f.entry.js → p-13e50077.entry.js} +2 -2
  281. package/dist/wcs/p-1438530e.entry.js +2 -0
  282. package/dist/wcs/p-1438530e.entry.js.map +1 -0
  283. package/dist/wcs/{p-2305f257.entry.js → p-16dd21cf.entry.js} +2 -2
  284. package/dist/wcs/{p-85a5bbb7.entry.js → p-206c01d5.entry.js} +2 -2
  285. package/dist/wcs/{p-85a5bbb7.entry.js.map → p-206c01d5.entry.js.map} +1 -1
  286. package/dist/wcs/{p-09d0a296.entry.js → p-21b964cd.entry.js} +3 -3
  287. package/dist/wcs/p-21b964cd.entry.js.map +1 -0
  288. package/dist/wcs/p-21d2f06f.entry.js +2 -0
  289. package/dist/wcs/p-21d2f06f.entry.js.map +1 -0
  290. package/dist/wcs/{p-2add4d4d.entry.js → p-258855a1.entry.js} +2 -2
  291. package/dist/wcs/{p-2c9e20c1.entry.js → p-294732f7.entry.js} +2 -2
  292. package/dist/wcs/{p-15ff9f93.entry.js → p-29f5b974.entry.js} +2 -2
  293. package/dist/wcs/{p-1ab0d13b.entry.js → p-2adf00be.entry.js} +2 -2
  294. package/dist/wcs/p-2adf00be.entry.js.map +1 -0
  295. package/dist/wcs/p-37800935.entry.js +2 -0
  296. package/dist/wcs/{p-76f07dbd.entry.js → p-388e6d75.entry.js} +2 -2
  297. package/dist/wcs/{p-8bd1b9ce.entry.js → p-43d70995.entry.js} +2 -2
  298. package/dist/wcs/{p-9553d60e.entry.js → p-4661290b.entry.js} +2 -2
  299. package/dist/wcs/{p-9553d60e.entry.js.map → p-4661290b.entry.js.map} +1 -1
  300. package/dist/wcs/{p-d2a4f609.entry.js → p-4dc52a25.entry.js} +2 -2
  301. package/dist/wcs/{p-25b96cde.entry.js → p-50523b53.entry.js} +2 -2
  302. package/dist/wcs/p-50523b53.entry.js.map +1 -0
  303. package/dist/wcs/p-52d77e1f.js +2 -0
  304. package/dist/wcs/p-52d77e1f.js.map +1 -0
  305. package/dist/wcs/p-5974be61.entry.js +2 -0
  306. package/dist/wcs/p-5974be61.entry.js.map +1 -0
  307. package/dist/wcs/{p-0fa370d7.entry.js → p-5bf73e05.entry.js} +3 -3
  308. package/dist/wcs/{p-0fa370d7.entry.js.map → p-5bf73e05.entry.js.map} +1 -1
  309. package/dist/wcs/{p-e19308cf.entry.js → p-5d5f50ed.entry.js} +2 -2
  310. package/dist/wcs/{p-94ff8939.entry.js → p-5de993d7.entry.js} +2 -2
  311. package/dist/wcs/p-5de993d7.entry.js.map +1 -0
  312. package/dist/wcs/{p-a788b5bd.entry.js → p-619e1110.entry.js} +2 -2
  313. package/dist/wcs/{p-9e03b379.entry.js → p-694724a2.entry.js} +2 -2
  314. package/dist/wcs/{p-f8d2be83.entry.js → p-6b06d2e7.entry.js} +2 -2
  315. package/dist/wcs/p-6f5d570a.entry.js +2 -0
  316. package/dist/wcs/p-6f5d570a.entry.js.map +1 -0
  317. package/dist/wcs/p-71db0ed5.entry.js +2 -0
  318. package/dist/wcs/{p-209145de.entry.js → p-76c92e22.entry.js} +2 -2
  319. package/dist/wcs/{p-f06aa79d.entry.js → p-796e690d.entry.js} +2 -2
  320. package/dist/wcs/{p-f06aa79d.entry.js.map → p-796e690d.entry.js.map} +1 -1
  321. package/dist/wcs/{p-97cbbcfc.entry.js → p-7d665a7e.entry.js} +2 -2
  322. package/dist/wcs/p-89b8c724.js +2 -0
  323. package/dist/wcs/{p-412b0021.js → p-8fcceaf1.js} +2 -2
  324. package/dist/wcs/p-9243a323.entry.js +2 -0
  325. package/dist/wcs/p-9243a323.entry.js.map +1 -0
  326. package/dist/wcs/p-94aa269f.entry.js +2 -0
  327. package/dist/wcs/p-94aa269f.entry.js.map +1 -0
  328. package/dist/wcs/{p-87b69cac.entry.js → p-9554196c.entry.js} +2 -2
  329. package/dist/wcs/{p-80a23f9c.entry.js → p-96bff8fe.entry.js} +2 -2
  330. package/dist/wcs/{p-80a23f9c.entry.js.map → p-96bff8fe.entry.js.map} +1 -1
  331. package/dist/wcs/{p-fa507e06.entry.js → p-9ad23e83.entry.js} +2 -2
  332. package/dist/wcs/{p-5ea2aba5.entry.js → p-9c012aae.entry.js} +2 -2
  333. package/dist/wcs/p-9dc3f9a5.entry.js +2 -0
  334. package/dist/wcs/p-9dc3f9a5.entry.js.map +1 -0
  335. package/dist/wcs/p-9eb66fa9.entry.js +2 -0
  336. package/dist/wcs/p-a7468a3a.js +2 -0
  337. package/dist/wcs/p-a7468a3a.js.map +1 -0
  338. package/dist/wcs/{p-4982f96c.entry.js → p-a7891233.entry.js} +2 -2
  339. package/dist/wcs/p-b2080509.entry.js +2 -0
  340. package/dist/wcs/{p-806315e6.entry.js.map → p-b2080509.entry.js.map} +1 -1
  341. package/dist/wcs/p-b96f4921.entry.js +2 -0
  342. package/dist/wcs/p-b96f4921.entry.js.map +1 -0
  343. package/dist/wcs/{p-276b8125.entry.js → p-c2d35aa6.entry.js} +3 -3
  344. package/dist/wcs/{p-276b8125.entry.js.map → p-c2d35aa6.entry.js.map} +1 -1
  345. package/dist/wcs/p-c752b85a.entry.js +2 -0
  346. package/dist/wcs/{p-b0f8190f.entry.js → p-d895ffb4.entry.js} +2 -2
  347. package/dist/wcs/{p-1e5aa960.entry.js → p-d9525519.entry.js} +2 -2
  348. package/dist/wcs/p-d9525519.entry.js.map +1 -0
  349. package/dist/wcs/{p-db81b74f.entry.js → p-da4636fa.entry.js} +2 -2
  350. package/dist/wcs/p-da4636fa.entry.js.map +1 -0
  351. package/dist/wcs/p-dd60a6db.entry.js +2 -0
  352. package/dist/wcs/p-dd60a6db.entry.js.map +1 -0
  353. package/dist/wcs/p-dddcd685.entry.js +2 -0
  354. package/dist/wcs/p-dddcd685.entry.js.map +1 -0
  355. package/dist/wcs/p-e36b2ad1.entry.js +2 -0
  356. package/dist/wcs/p-f87636f6.entry.js +2 -0
  357. package/dist/wcs/p-f87636f6.entry.js.map +1 -0
  358. package/dist/wcs/p-fc115de4.entry.js +2 -0
  359. package/dist/wcs/wcs.esm.js +1 -1
  360. package/dist/wcs/wcs.esm.js.map +1 -1
  361. package/package.json +1 -1
  362. package/dist/cjs/helpers-871f5a3d.js.map +0 -1
  363. package/dist/cjs/wcs-error_2.cjs.entry.js +0 -168
  364. package/dist/cjs/wcs-error_2.cjs.entry.js.map +0 -1
  365. package/dist/cjs/wcs-label.cjs.entry.js +0 -33
  366. package/dist/cjs/wcs-label.cjs.entry.js.map +0 -1
  367. package/dist/esm/helpers-f137ec8d.js.map +0 -1
  368. package/dist/esm/wcs-error_2.entry.js +0 -163
  369. package/dist/esm/wcs-error_2.entry.js.map +0 -1
  370. package/dist/esm/wcs-label.entry.js +0 -29
  371. package/dist/esm/wcs-label.entry.js.map +0 -1
  372. package/dist/wcs/p-08e86d69.entry.js +0 -2
  373. package/dist/wcs/p-08e86d69.entry.js.map +0 -1
  374. package/dist/wcs/p-09d0a296.entry.js.map +0 -1
  375. package/dist/wcs/p-0fdaec9e.entry.js +0 -2
  376. package/dist/wcs/p-0fdaec9e.entry.js.map +0 -1
  377. package/dist/wcs/p-19c77b5c.entry.js +0 -2
  378. package/dist/wcs/p-1ab0d13b.entry.js.map +0 -1
  379. package/dist/wcs/p-1e5aa960.entry.js.map +0 -1
  380. package/dist/wcs/p-25b96cde.entry.js.map +0 -1
  381. package/dist/wcs/p-400a71d7.entry.js +0 -2
  382. package/dist/wcs/p-4ca7c59f.entry.js +0 -2
  383. package/dist/wcs/p-4ca7c59f.entry.js.map +0 -1
  384. package/dist/wcs/p-4d6d1d14.js +0 -2
  385. package/dist/wcs/p-52cd0abb.entry.js +0 -2
  386. package/dist/wcs/p-52cd0abb.entry.js.map +0 -1
  387. package/dist/wcs/p-5f517eb5.entry.js +0 -2
  388. package/dist/wcs/p-806315e6.entry.js +0 -2
  389. package/dist/wcs/p-8780a429.entry.js +0 -2
  390. package/dist/wcs/p-8780a429.entry.js.map +0 -1
  391. package/dist/wcs/p-94ff8939.entry.js.map +0 -1
  392. package/dist/wcs/p-985c4cf2.entry.js +0 -2
  393. package/dist/wcs/p-985c4cf2.entry.js.map +0 -1
  394. package/dist/wcs/p-a3aece7a.js +0 -2
  395. package/dist/wcs/p-a3aece7a.js.map +0 -1
  396. package/dist/wcs/p-a66a4289.entry.js +0 -2
  397. package/dist/wcs/p-bf31245c.entry.js +0 -2
  398. package/dist/wcs/p-bf31245c.entry.js.map +0 -1
  399. package/dist/wcs/p-cd592a00.entry.js +0 -2
  400. package/dist/wcs/p-cd592a00.entry.js.map +0 -1
  401. package/dist/wcs/p-d42831b2.entry.js +0 -2
  402. package/dist/wcs/p-d42831b2.entry.js.map +0 -1
  403. package/dist/wcs/p-d7acbf01.js +0 -2
  404. package/dist/wcs/p-db81b74f.entry.js.map +0 -1
  405. package/dist/wcs/p-dbbf0980.entry.js +0 -2
  406. package/dist/wcs/p-dbbf0980.entry.js.map +0 -1
  407. package/dist/wcs/p-e64d7437.entry.js +0 -2
  408. package/dist/wcs/p-e86575d3.entry.js +0 -2
  409. package/dist/wcs/p-e86575d3.entry.js.map +0 -1
  410. package/dist/wcs/p-f264d46f.entry.js +0 -2
  411. package/dist/wcs/p-fd9e731d.entry.js +0 -2
  412. package/dist/wcs/p-fd9e731d.entry.js.map +0 -1
  413. /package/dist/wcs/{p-d7acbf01.js.map → p-0017d766.js.map} +0 -0
  414. /package/dist/wcs/{p-45a6934d.entry.js.map → p-0ffdfc10.entry.js.map} +0 -0
  415. /package/dist/wcs/{p-9f23c49e.entry.js.map → p-13090618.entry.js.map} +0 -0
  416. /package/dist/wcs/{p-8f0e093f.entry.js.map → p-13e50077.entry.js.map} +0 -0
  417. /package/dist/wcs/{p-2305f257.entry.js.map → p-16dd21cf.entry.js.map} +0 -0
  418. /package/dist/wcs/{p-2add4d4d.entry.js.map → p-258855a1.entry.js.map} +0 -0
  419. /package/dist/wcs/{p-2c9e20c1.entry.js.map → p-294732f7.entry.js.map} +0 -0
  420. /package/dist/wcs/{p-15ff9f93.entry.js.map → p-29f5b974.entry.js.map} +0 -0
  421. /package/dist/wcs/{p-e64d7437.entry.js.map → p-37800935.entry.js.map} +0 -0
  422. /package/dist/wcs/{p-76f07dbd.entry.js.map → p-388e6d75.entry.js.map} +0 -0
  423. /package/dist/wcs/{p-8bd1b9ce.entry.js.map → p-43d70995.entry.js.map} +0 -0
  424. /package/dist/wcs/{p-d2a4f609.entry.js.map → p-4dc52a25.entry.js.map} +0 -0
  425. /package/dist/wcs/{p-e19308cf.entry.js.map → p-5d5f50ed.entry.js.map} +0 -0
  426. /package/dist/wcs/{p-a788b5bd.entry.js.map → p-619e1110.entry.js.map} +0 -0
  427. /package/dist/wcs/{p-9e03b379.entry.js.map → p-694724a2.entry.js.map} +0 -0
  428. /package/dist/wcs/{p-f8d2be83.entry.js.map → p-6b06d2e7.entry.js.map} +0 -0
  429. /package/dist/wcs/{p-5f517eb5.entry.js.map → p-71db0ed5.entry.js.map} +0 -0
  430. /package/dist/wcs/{p-209145de.entry.js.map → p-76c92e22.entry.js.map} +0 -0
  431. /package/dist/wcs/{p-97cbbcfc.entry.js.map → p-7d665a7e.entry.js.map} +0 -0
  432. /package/dist/wcs/{p-4d6d1d14.js.map → p-89b8c724.js.map} +0 -0
  433. /package/dist/wcs/{p-412b0021.js.map → p-8fcceaf1.js.map} +0 -0
  434. /package/dist/wcs/{p-87b69cac.entry.js.map → p-9554196c.entry.js.map} +0 -0
  435. /package/dist/wcs/{p-fa507e06.entry.js.map → p-9ad23e83.entry.js.map} +0 -0
  436. /package/dist/wcs/{p-5ea2aba5.entry.js.map → p-9c012aae.entry.js.map} +0 -0
  437. /package/dist/wcs/{p-19c77b5c.entry.js.map → p-9eb66fa9.entry.js.map} +0 -0
  438. /package/dist/wcs/{p-4982f96c.entry.js.map → p-a7891233.entry.js.map} +0 -0
  439. /package/dist/wcs/{p-400a71d7.entry.js.map → p-c752b85a.entry.js.map} +0 -0
  440. /package/dist/wcs/{p-b0f8190f.entry.js.map → p-d895ffb4.entry.js.map} +0 -0
  441. /package/dist/wcs/{p-f264d46f.entry.js.map → p-e36b2ad1.entry.js.map} +0 -0
  442. /package/dist/wcs/{p-a66a4289.entry.js.map → p-fc115de4.entry.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["WcsInputSizeValues","isWcsInputSize","size","includes","inputCss","WcsInputStyle0","INPUT_INHERITED_ATTRS","Input","this","inputId","inputIds","inheritedAttributes","iconPassword","onInput","ev","input","target","value","wcsInput","emit","onChange","_","wcsChange","nativeInput","onBlur","fireFocusEvents","wcsBlur","onFocus","wcsFocus","debounceChanged","debounceEvent","debounce","componentWillLoad","Object","assign","inheritAriaAttributes","el","inheritAttributes","console","warn","join","connectedCallback","document","dispatchEvent","CustomEvent","detail","disconnectedCallback","setBlur","blur","getInputElement","Promise","resolve","setAriaAttribute","attr","setOrRemoveAttribute","getValueAsString","toString","passwordRevealIconClick","passwordReveal","onPasswordRevealChange","render","labelId","label","findItemLabel","id","h","Host","key","disabled","prefixLabel","suffixLabel","class","part","icon","ref","accept","autoCapitalize","autocapitalize","autoComplete","autocomplete","autoCorrect","autocorrect","autoFocus","autofocus","enterKeyHint","enterkeyhint","inputMode","inputmode","min","max","minLength","minlength","maxLength","maxlength","multiple","name","pattern","placeholder","readOnly","readonly","required","spellcheck","step","type","title","hidePasswordButtonAriaLabel","showPasswordButtonAriaLabel","onClick"],"sources":["src/components/input/input-interface.ts","src/components/input/input.scss?tag=wcs-input&encapsulation=shadow","src/components/input/input.tsx"],"sourcesContent":["// From: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\nimport { WcsSize } from '../../shared-types';\n\nexport type AutocompleteTypes = (\n | 'on' | 'off' | 'name' | 'honorific-prefix' | 'given-name' | 'additional-name' | 'family-name' | 'honorific-suffix'\n | 'nickname' | 'email' | 'username' | 'new-password' | 'current-password' | 'one-time-code' | 'organization-title' | 'organization'\n | 'street-address' | 'address-line1' | 'address-line2' | 'address-line3' | 'address-level4' | 'address-level3' | 'address-level2'\n | 'address-level1' | 'country' | 'country-name' | 'postal-code' | 'cc-name' | 'cc-given-name' | 'cc-additional-name' | 'cc-family-name'\n | 'cc-family-name' | 'cc-number' | 'cc-exp' | 'cc-exp-month' | 'cc-exp-year' | 'cc-csc' | 'cc-type' | 'transaction-currency' | 'transaction-amount'\n | 'language' | 'bday' | 'bday-day' | 'bday-month' | 'bday-year' | 'sex' | 'tel' | 'tel-country-code' | 'tel-national' | 'tel-area-code' | 'tel-local'\n | 'tel-extension' | 'impp' | 'url' | 'photo');\n\nexport type TextFieldTypes = 'date' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url' | 'time' | 'week' | 'month' | 'datetime-local' | 'file';\n\nexport const WcsInputSizeValues = ['s', 'm', 'l'] as const; // as const keyword is used to infer and preserve the exact literal values of an array or object.\n\nexport type WcsInputSize = Extract<WcsSize, typeof WcsInputSizeValues[number]>;\n\nexport function isWcsInputSize(size: string): size is WcsInputSize {\n // @ts-ignore : ignore size type, as it is checked with WcsInputSizeValues\n return WcsInputSizeValues.includes(size);\n}\n\nexport type WcsInputAutocorrect = 'on' | 'off';\n\nexport type WcsInputEnterKeyHint = 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';\n\nexport type WcsInputInputMode = 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';\n\nexport type WcsInputState = 'initial' | 'error';\n\nexport interface InputChangeEventDetail {\n value: string | undefined | null;\n}\n","@import '../../style/focus-outline.scss';\n@import '../../style/placeholder.scss';\n\n:host {\n --wcs-input-icon-color-default: var(--wcs-semantic-color-foreground-brand);\n --wcs-input-icon-color-focus: var(--wcs-semantic-color-foreground-brand);\n --wcs-input-icon-color-disabled: var(--wcs-semantic-color-foreground-disabled);\n\n --wcs-input-background-color: var(--wcs-semantic-color-background-control-default);\n\n --wcs-input-border-radius-left: var(--wcs-semantic-border-radius-base); // Overridden from prefix suffix group in form-field\n --wcs-input-border-radius-right: var(--wcs-semantic-border-radius-base); // Overridden from prefix suffix group in form-field\n\n --wcs-input-border-width: var(--wcs-semantic-border-width-default);\n --wcs-input-border-width-focus: var(--wcs-semantic-border-width-large);\n\n --wcs-input-height-l: var(--wcs-semantic-size-l);\n --wcs-input-height-m: var(--wcs-semantic-size-m);\n --wcs-input-height-s: var(--wcs-semantic-size-s);\n --wcs-input-font-size-l: var(--wcs-semantic-font-size-l);\n --wcs-input-font-size-m: var(--wcs-semantic-font-size-m);\n --wcs-input-font-size-s: var(--wcs-semantic-font-size-s);\n\n --wcs-input-prefix-suffix-background-color: var(--wcs-semantic-color-background-surface-accent-lighter);\n --wcs-input-prefix-suffix-color: var(--wcs-semantic-color-foreground-on-accent);\n --wcs-input-prefix-suffix-color-disabled: var(--wcs-semantic-color-text-disabled);\n --wcs-input-prefix-suffix-font-weight: var(--wcs-semantic-font-weight-medium);\n\n --wcs-input-border-style-default: solid;\n --wcs-input-border-style-focus: var(--wcs-semantic-border-style-focus-control);\n\n --wcs-input-border-color-default: var(--wcs-semantic-color-border-primary);\n --wcs-input-border-color-disabled: var(--wcs-semantic-color-border-disabled);\n --wcs-input-border-color-focus: var(--wcs-semantic-color-border-control-focus);\n --wcs-input-reveal-password-button-border-color-focus: var(--wcs-semantic-color-border-focus-base);\n --wcs-input-border-color-error: var(--wcs-semantic-color-border-critical);\n\n --wcs-input-value-color: var(--wcs-semantic-color-text-primary);\n --wcs-input-value-font-weight: var(--wcs-semantic-font-weight-medium);\n\n --wcs-input-placeholder-color: var(--wcs-semantic-color-text-tertiary);\n --wcs-input-placeholder-font-weight: var(--wcs-semantic-font-weight-roman);\n --wcs-input-placeholder-font-style: var(--wcs-semantic-font-style-control-placeholder);\n\n --wcs-input-text-color-disabled: var(--wcs-semantic-color-text-disabled);\n\n --wcs-input-min-height: var(--wcs-semantic-size-s);\n --wcs-input-padding-horizontal-s: calc(1.5 * var(--wcs-semantic-spacing-base));\n --wcs-input-padding-horizontal-m: var(--wcs-semantic-spacing-large);\n --wcs-input-padding-horizontal-l: var(--wcs-semantic-spacing-large);\n --wcs-input-gap: var(--wcs-semantic-spacing-base);\n\n display: flex;\n width: 100%;\n height: var(--wcs-input-host-height);\n box-sizing: border-box;\n border-radius: var(--wcs-input-border-radius-left) var(--wcs-input-border-radius-right) var(--wcs-input-border-radius-right) var(--wcs-input-border-radius-left);\n background-color: var(--wcs-input-background-color);\n outline: var(--wcs-input-border-style-default) var(--wcs-input-border-width) var(--wcs-input-border-color-default);\n outline-offset: calc(var(--wcs-input-border-width) * -1);\n background-clip: padding-box;\n\n gap: var(--wcs-input-gap);\n\n input {\n overflow: hidden;\n height: var(--wcs-input-host-height);\n width: 100%;\n padding: 0; // Reset padding from user agent stylesheet, it's the container that will handle padding\n background-color: transparent;\n font-family: var(--wcs-font-sans-serif);\n color: var(--wcs-input-value-color);\n font-weight: var(--wcs-input-value-font-weight) !important;\n border: none;\n font-size: var(--wcs-input-font-size, 1rem);\n line-height: 1.5;\n\n &::placeholder {\n @include placeholder(var(--wcs-input-placeholder-color), var(--wcs-input-placeholder-font-weight), var(--wcs-input-placeholder-font-style));\n }\n }\n\n input:focus {\n box-shadow: none;\n outline: 0;\n }\n\n button.toggle_password {\n background: transparent;\n border: none;\n color: inherit;\n\n cursor: pointer;\n\n\n &:focus-visible {\n @include focus-outline(var(--wcs-input-reveal-password-button-border-color-focus), $outline-offset: calc(-2 * var(--wcs-input-border-width-focus)));\n }\n }\n\n .prefix, .suffix {\n color: var(--wcs-input-prefix-suffix-color);\n display: flex;\n white-space: nowrap;\n align-items: center;\n font-size: var(--wcs-input-font-size, 1rem);\n padding: 0 calc(var(--wcs-input-padding-horizontal-m) / 2);\n font-weight: var(--wcs-input-prefix-suffix-font-weight) !important;\n background-color: var(--wcs-input-prefix-suffix-background-color);\n }\n\n .prefix {\n border-radius: var(--wcs-internal-input-border-radius-left) 0 0 var(--wcs-internal-input-border-radius-left);\n }\n\n .suffix {\n border-radius: 0 var(--wcs-internal-input-border-radius-right) var(--wcs-internal-input-border-radius-right) 0;\n }\n\n wcs-mat-icon {\n color: var(--wcs-input-icon-color-default);\n }\n}\n\n:host([size=l]) {\n --wcs-input-host-height: var(--wcs-input-height-l);\n --wcs-input-font-size: var(--wcs-input-font-size-l);\n\n padding-left: calc(var(--wcs-input-padding-horizontal-l));\n padding-right: calc(var(--wcs-input-padding-horizontal-l));\n}\n\n:host([size=m]) { // Default\n --wcs-input-host-height: var(--wcs-input-height-m);\n --wcs-input-font-size: var(--wcs-input-font-size-m);\n\n padding-left: calc(var(--wcs-input-padding-horizontal-m));\n padding-right: calc(var(--wcs-input-padding-horizontal-m));\n}\n\n:host([size=s]) {\n --wcs-input-host-height: var(--wcs-input-height-s);\n --wcs-input-font-size: var(--wcs-input-font-size-s);\n\n padding-left: calc(var(--wcs-input-padding-horizontal-s));\n padding-right: calc(var(--wcs-input-padding-horizontal-s));\n}\n\n:host([state=error]) {\n outline-color: var(--wcs-input-border-color-error) !important;\n}\n\n:host([data-has-prefix]) {\n padding-left: 0;\n}\n\n:host([data-has-suffix]) {\n padding-right: 0;\n}\n\n:host([disabled]) {\n cursor: not-allowed; // padding is handled by the container, so we need to set cursor not allowed on it\n outline: var(--wcs-input-border-style-default) var(--wcs-input-border-width) var(--wcs-input-border-color-disabled);\n --wcs-input-background-color: var(--wcs-semantic-color-background-control-disabled);\n\n input {\n cursor: not-allowed;\n color: var(--wcs-input-text-color-disabled);\n\n &::placeholder {\n color: var(--wcs-input-text-color-disabled);\n }\n }\n\n .prefix, .suffix {\n color: var(--wcs-input-prefix-suffix-color-disabled);\n cursor: text; // reset cursor to text for prefix and suffix, to be able to select text\n }\n\n wcs-mat-icon {\n color: var(--wcs-input-icon-color-disabled);\n cursor: not-allowed;\n }\n}\n\n:host([readonly]) {\n --wcs-input-background-color: var(--wcs-semantic-color-background-control-readonly);\n --wcs-input-border-width: 0;\n}\n\n:host(:focus-within) {\n outline: var(--wcs-input-border-style-focus) var(--wcs-input-border-width-focus) var(--wcs-input-border-color-focus);\n outline-offset: calc(var(--wcs-input-border-width-focus) * -1);\n\n wcs-mat-icon {\n color: var(--wcs-input-icon-color-focus);\n }\n}\n","import {\n Build,\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n State,\n Watch\n} from '@stencil/core';\nimport {\n debounceEvent,\n findItemLabel,\n inheritAriaAttributes,\n inheritAttributes,\n setOrRemoveAttribute\n} from '../../utils/helpers';\nimport {\n AutocompleteTypes,\n InputChangeEventDetail,\n isWcsInputSize,\n TextFieldTypes,\n WcsInputSize,\n WcsInputSizeValues,\n WcsInputAutocorrect,\n WcsInputEnterKeyHint,\n WcsInputInputMode,\n WcsInputState\n} from './input-interface';\nimport { AriaAttributeName, MutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\n\nconst INPUT_INHERITED_ATTRS = ['tabindex', 'title'];\n\n/**\n * The input component is a form control that accepts a single line of text.\n * Implementation mainly inspired from Ionic Input Component.\n *\n * ## Accessibility guidelines 💡\n * > - If you use wcs-input outside a wcs-form-field, you have to manage the label and the error message yourself.\n * > You can use the `aria-label` attribute to provide a label for screen readers but adds no visual label.\n * \n * @cssprop --wcs-input-icon-color-default - default icon color when the input is not focused\n * @cssprop --wcs-input-icon-color-focus - icon color when the input is focused\n * @cssprop --wcs-input-icon-color-disabled - icon color when the input is disabled\n *\n * @cssprop --wcs-input-background-color - background color of the input\n *\n * @cssprop --wcs-input-border-radius-left - border radius of the left side of the input\n * @cssprop --wcs-input-border-radius-right - border radius of the right side of the input\n * \n * @cssprop --wcs-input-border-width - border width of the input\n * @cssprop --wcs-input-border-width-focus - border width of the input when focused\n *\n * @cssprop --wcs-input-height-l - large height of the input\n * @cssprop --wcs-input-height-m - medium height of the input\n * @cssprop --wcs-input-height-s - small height of the input\n * @cssprop --wcs-input-font-size-l - large font size of the input\n * @cssprop --wcs-input-font-size-m - medium font size of the input\n * @cssprop --wcs-input-font-size-s - small font size of the input\n *\n * @cssprop --wcs-input-border-style-default - default border style of the input\n * @cssprop --wcs-input-border-style-focus - border style of the input when focused\n * \n * @cssprop --wcs-input-prefix-suffix-background-color - background color of the suffix/prefix\n * @cssprop --wcs-input-prefix-suffix-color - color of the suffix/prefix\n * @cssprop --wcs-input-prefix-suffix-color-disabled - color of the suffix/prefix when the input is disabled\n * @cssprop --wcs-input-prefix-suffix-font-weight - font weight of the suffix/prefix\n *\n * @cssprop --wcs-input-border-color-default - default border color of the input when not focused\n * @cssprop --wcs-input-border-color-disabled - border color of the input when disabled\n * @cssprop --wcs-input-border-color-focus - border color of the input when focused\n * @cssprop --wcs-input-reveal-password-button-border-color-focus - border color of the show/hide password button when focused\n * @cssprop --wcs-input-border-color-error - border color of the input when in error state\n *\n * @cssprop --wcs-input-value-color - color of the input value\n * @cssprop --wcs-input-value-font-weight - font weight of the input value\n * \n * @cssprop --wcs-input-placeholder-color - color of the input placeholder\n * @cssprop --wcs-input-placeholder-font-weight - font weight of the input placeholder\n * @cssprop --wcs-input-placeholder-font-style - font style of the input placeholder\n * \n * @cssprop --wcs-input-text-color-disabled - color of the input when disabled\n *\n * @cssprop --wcs-input-padding-horizontal-s - horizontal padding of the input in small size\n * @cssprop --wcs-input-padding-horizontal-m - horizontal padding of the input in medium size\n * @cssprop --wcs-input-padding-horizontal-l - horizontal padding of the input in large size\n * \n * @cssprop --wcs-input-gap - gap between text input and icon\n */\n@Component({\n tag: 'wcs-input',\n styleUrl: 'input.scss',\n shadow: { delegatesFocus: true },\n})\nexport class Input implements ComponentInterface, MutableAriaAttribute {\n @Element() private el!: HTMLElement;\n private nativeInput?: HTMLInputElement;\n private inputId = `wcs-input-${inputIds++}`;\n private inheritedAttributes: { [k: string]: any } = {};\n private iconPassword = \"visibility\";\n\n /**\n * This is required for a WebKit bug which requires us to\n * blur and focus an input to properly focus the input in\n * an item with delegatesFocus. It will no longer be needed\n * with iOS 14.\n *\n * @internal\n */\n @Prop() fireFocusEvents = true;\n\n @State() private passwordReveal = false;\n\n /**\n * If the value of the type attribute is `\"file\"`, then this attribute will indicate the types of files that the\n * server accepts, otherwise it will be ignored. The value must be a comma-separated list of unique content type specifiers.\n */\n @Prop() accept?: string;\n\n /**\n * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\n * Available options: `\"off\"`, `\"none\"`, `\"on\"`, `\"sentences\"`, `\"words\"`, `\"characters\"`.\n */\n @Prop() autocapitalize = 'off';\n\n /**\n * Indicates whether the value of the control can be automatically completed by the browser.\n */\n @Prop() autocomplete: AutocompleteTypes = 'off';\n\n /**\n * Whether auto correction should be enabled when the user is entering/editing the text value.\n */\n @Prop() autocorrect: WcsInputAutocorrect = 'off';\n\n /**\n * This Boolean attribute lets you specify that a form control should have input focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `wcsInput` event after each keystroke.\n * This also impacts form bindings such as `ngModel` or `v-model`.\n */\n @Prop() debounce = 0;\n\n @Watch('debounce')\n protected debounceChanged() {\n this.wcsInput = debounceEvent(this.wcsInput, this.debounce);\n }\n\n /**\n * Prefix displayed before the text field contents. This is not included in the value.\n */\n @Prop() prefixLabel: string;\n\n /**\n * Suffix displayed after the text field contents. This is not included in the value.\n */\n @Prop() suffixLabel: string;\n\n /**\n * If `true`, the user cannot interact with the input.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * A hint to the browser for which enter key to display.\n */\n @Prop() enterkeyhint?: WcsInputEnterKeyHint;\n\n /**\n * Specify the size (height) of the input.\n */\n @Prop({reflect: true}) size: WcsInputSize = 'm';\n\n /**\n * Name of the material icon to add to the input\n */\n @Prop() icon: string;\n\n /**\n * A hint to the browser for which keyboard to display.\n */\n @Prop() inputmode?: WcsInputInputMode;\n\n /**\n * The maximum value, which must not be less than its minimum (min attribute) value.\n */\n @Prop() max?: string;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute\n * specifies the maximum number of characters that the user can enter.\n */\n @Prop() maxlength?: number;\n\n /**\n * The minimum value, which must not be greater than its maximum (max attribute) value.\n */\n @Prop() min?: string;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute\n * specifies the minimum number of characters that the user can enter.\n */\n @Prop() minlength?: number;\n\n /**\n * If `true`, the user can enter more than one value. This attribute applies when the type attribute is set to\n * `\"email\"` or `\"file\"`, otherwise it is ignored.\n */\n @Prop() multiple?: boolean;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n @Prop() hidePasswordButtonAriaLabel: string = \"Cacher le mot de passe\";\n @Prop() showPasswordButtonAriaLabel: string = \"Afficher le mot de passe\";\n\n /**\n * A regular expression that the value is checked against. The pattern must match the entire value, not just some\n * subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value\n * of the type attribute is `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, `\"date\"`, or `\"password\"`, otherwise\n * it is ignored. When the type attribute is `\"date\"`, `pattern` will only be used in browsers that do not support\n * the `\"date\"` input type natively. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date for\n * more information.\n */\n @Prop() pattern?: string;\n\n /**\n * Instructional text that shows before the input has a value.\n */\n @Prop() placeholder?: string | null;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop({ reflect: true }) readonly = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * If `true`, the element will have its spelling and grammar checked.\n */\n @Prop() spellcheck = false;\n\n /**\n * Specifies the state of the input. By default the input is in an normal state but you can to set it to 'error'\n * state if the data given by the user is not valid.\n */\n @Prop({reflect: true}) state: WcsInputState = 'initial';\n\n /**\n * Works with the min and max attributes to limit the increments at which a value can be set.\n * Possible values are: `\"any\"` or a positive floating point number.\n */\n @Prop() step?: string;\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: TextFieldTypes = 'text';\n\n /**\n * The value of the input.\n */\n @Prop({mutable: true}) value?: string | number | null = '';\n\n /**\n * Emitted when a keyboard input occurred. See https://developer.mozilla.org/en-US/docs/Web/Events/input\n */\n @Event() wcsInput!: EventEmitter<KeyboardEvent>;\n\n /**\n * Emitted when the value has changed. See https://developer.mozilla.org/en-US/docs/Web/Events/change\n */\n @Event() wcsChange!: EventEmitter<InputChangeEventDetail>;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() wcsBlur!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() wcsFocus!: EventEmitter<FocusEvent>;\n\n componentWillLoad() {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el, INPUT_INHERITED_ATTRS)\n };\n\n if (!isWcsInputSize(this.size)) {\n console.warn(`Invalid size value for wcs-input : \"${this.size}\". Must be one of \"${WcsInputSizeValues.join(', ')}\"`);\n this.size = \"m\"; // Default fallback value\n }\n }\n\n connectedCallback() {\n this.debounceChanged();\n if (Build.isBrowser) {\n document.dispatchEvent(new CustomEvent('wcsInputDidLoad', {\n detail: this.el\n }));\n }\n }\n\n disconnectedCallback() {\n if (Build.isBrowser) {\n document.dispatchEvent(new CustomEvent('wcsInputDidUnload', {\n detail: this.el\n }));\n }\n }\n\n /**\n * Sets blur on the native `input` in `wcs-input`. Use this method instead of the global\n * `input.blur()`.\n * @internal\n */\n @Method()\n async setBlur() {\n if (this.nativeInput) {\n this.nativeInput.blur();\n }\n }\n\n /**\n * Returns the native `<input>` element used under the hood.\n */\n @Method()\n getInputElement(): Promise<HTMLInputElement> {\n return Promise.resolve(this.nativeInput!);\n }\n\n @Method()\n async setAriaAttribute(attr: AriaAttributeName, value: string | null | undefined) {\n setOrRemoveAttribute(this.nativeInput, attr, value);\n }\n \n private getValueAsString(): string {\n return typeof this.value === 'number' ? this.value.toString() :\n (this.value || '').toString();\n }\n\n private onInput = (ev: Event) => {\n const input = ev.target as HTMLInputElement | null;\n if (input) {\n this.value = input.value || '';\n }\n this.wcsInput.emit(ev as KeyboardEvent);\n }\n\n private onChange = (_: Event) => {\n this.wcsChange.emit({value: this.nativeInput.value});\n }\n\n private onBlur = (ev: FocusEvent) => {\n if (this.fireFocusEvents) {\n this.wcsBlur.emit(ev);\n }\n }\n\n private onFocus = (ev: FocusEvent) => {\n if (this.fireFocusEvents) {\n this.wcsFocus.emit(ev);\n }\n }\n\n private passwordRevealIconClick(): void {\n this.passwordReveal = !this.passwordReveal;\n }\n\n @Watch('passwordReveal')\n onPasswordRevealChange(): void {\n this.iconPassword = this.passwordReveal ? 'visibility_off' : 'visibility';\n }\n\n render() {\n const value = this.getValueAsString();\n const labelId = this.inputId + '-lbl';\n const label = findItemLabel(this.el);\n if (label) {\n label.id = labelId;\n }\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n data-has-prefix={!!this.prefixLabel}\n data-has-suffix={!!this.suffixLabel}\n >\n {this.prefixLabel ? (<span class=\"prefix\" part=\"prefix\">{this.prefixLabel}</span>) : null}\n {this.icon ? (<wcs-mat-icon icon={this.icon} size=\"m\"></wcs-mat-icon>) : null}\n <input\n class=\"native-input\"\n ref={input => this.nativeInput = input}\n aria-labelledby={label ? labelId : null}\n disabled={this.disabled}\n accept={this.accept}\n autoCapitalize={this.autocapitalize}\n autoComplete={this.autocomplete}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n enterKeyHint={this.enterkeyhint}\n inputMode={this.inputmode}\n min={this.min}\n max={this.max}\n minLength={this.minlength}\n maxLength={this.maxlength}\n multiple={this.multiple}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder || ''}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n step={this.step}\n type={this.passwordReveal ? 'text' : this.type}\n value={value}\n onInput={this.onInput}\n onChange={this.onChange}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n {...this.inheritedAttributes}\n />\n {this.type === \"password\" ? (\n <button title={this.passwordReveal ? this.hidePasswordButtonAriaLabel : this.showPasswordButtonAriaLabel} class=\"toggle_password\" onClick={() => this.passwordRevealIconClick()}>\n <wcs-mat-icon icon={this.iconPassword} size=\"m\"></wcs-mat-icon>\n </button>\n ) : null}\n {this.suffixLabel ? (<span class=\"suffix\" part=\"suffix\">{this.suffixLabel}</span>) : null}\n </Host>\n );\n }\n}\n\nlet inputIds = 0;\n"],"mappings":"2HAcO,MAAMA,EAAqB,CAAC,IAAK,IAAK,K,SAI7BC,EAAeC,GAE3B,OAAOF,EAAmBG,SAASD,EACvC,CCrBA,MAAME,EAAW,yxMACjB,MAAAC,EAAeD,ECkCf,MAAME,EAAwB,CAAC,WAAY,S,MA+D9BC,EAAK,M,qKAGNC,KAAAC,QAAU,aAAaC,MACvBF,KAAAG,oBAA4C,GAC5CH,KAAAI,aAAe,aA8PfJ,KAAAK,QAAWC,IACf,MAAMC,EAAQD,EAAGE,OACjB,GAAID,EAAO,CACPP,KAAKS,MAAQF,EAAME,OAAS,E,CAEhCT,KAAKU,SAASC,KAAKL,EAAoB,EAGnCN,KAAAY,SAAYC,IAChBb,KAAKc,UAAUH,KAAK,CAACF,MAAOT,KAAKe,YAAYN,OAAO,EAGhDT,KAAAgB,OAAUV,IACd,GAAIN,KAAKiB,gBAAiB,CACtBjB,KAAKkB,QAAQP,KAAKL,E,GAIlBN,KAAAmB,QAAWb,IACf,GAAIN,KAAKiB,gBAAiB,CACtBjB,KAAKoB,SAAST,KAAKL,E,wBAxQD,K,oBAEQ,M,0CAYT,M,kBAKiB,M,iBAKC,M,eAKvB,M,cAMD,E,oEAoBiB,M,sCAUQ,I,uKA2CrBN,KAAKC,Q,iCAEkB,yB,iCACA,2B,gEAoBV,M,cAKjB,M,gBAKE,M,WAMyB,U,8BAWf,O,WAKyB,E,CA7H9C,eAAAoB,GACNrB,KAAKU,SAAWY,EAActB,KAAKU,SAAUV,KAAKuB,S,CAkJtD,iBAAAC,GACIxB,KAAKG,oBAAmBsB,OAAAC,OAAAD,OAAAC,OAAA,GACjBC,EAAsB3B,KAAK4B,KAC3BC,EAAkB7B,KAAK4B,GAAI9B,IAGlC,IAAKL,EAAeO,KAAKN,MAAO,CAC5BoC,QAAQC,KAAK,uCAAuC/B,KAAKN,0BAA0BF,EAAmBwC,KAAK,UAC3GhC,KAAKN,KAAO,G,EAIpB,iBAAAuC,GACIjC,KAAKqB,kBACgB,CACjBa,SAASC,cAAc,IAAIC,YAAY,kBAAmB,CACtDC,OAAQrC,KAAK4B,K,EAKzB,oBAAAU,GACyB,CACjBJ,SAASC,cAAc,IAAIC,YAAY,oBAAqB,CACxDC,OAAQrC,KAAK4B,K,EAWzB,aAAMW,GACF,GAAIvC,KAAKe,YAAa,CAClBf,KAAKe,YAAYyB,M,EAQzB,eAAAC,GACI,OAAOC,QAAQC,QAAQ3C,KAAKe,Y,CAIhC,sBAAM6B,CAAiBC,EAAyBpC,GAC5CqC,EAAqB9C,KAAKe,YAAa8B,EAAMpC,E,CAGzC,gBAAAsC,GACJ,cAAc/C,KAAKS,QAAU,SAAWT,KAAKS,MAAMuC,YAC9ChD,KAAKS,OAAS,IAAIuC,U,CA2BnB,uBAAAC,GACJjD,KAAKkD,gBAAkBlD,KAAKkD,c,CAIhC,sBAAAC,GACInD,KAAKI,aAAeJ,KAAKkD,eAAiB,iBAAmB,Y,CAGjE,MAAAE,GACI,MAAM3C,EAAQT,KAAK+C,mBACnB,MAAMM,EAAUrD,KAAKC,QAAU,OAC/B,MAAMqD,EAAQC,EAAcvD,KAAK4B,IACjC,GAAI0B,EAAO,CACPA,EAAME,GAAKH,C,CAGf,OACII,EAACC,EAAI,CAAAC,IAAA,2DACc3D,KAAK4D,SAAW,OAAS,KAAI,oBACzB5D,KAAK6D,YAAW,oBAChB7D,KAAK8D,aAEvB9D,KAAK6D,YAAeJ,EAAA,QAAMM,MAAM,SAASC,KAAK,UAAUhE,KAAK6D,aAAuB,KACpF7D,KAAKiE,KAAQR,EAAA,gBAAcQ,KAAMjE,KAAKiE,KAAMvE,KAAK,MAAuB,KACzE+D,EAAA,QAAAhC,OAAAC,OAAA,CAAAiC,IAAA,2CACII,MAAM,eACNG,IAAK3D,GAASP,KAAKe,YAAcR,EAAK,kBACrB+C,EAAQD,EAAU,KACnCO,SAAU5D,KAAK4D,SACfO,OAAQnE,KAAKmE,OACbC,eAAgBpE,KAAKqE,eACrBC,aAActE,KAAKuE,aACnBC,YAAaxE,KAAKyE,YAClBC,UAAW1E,KAAK2E,UAChBC,aAAc5E,KAAK6E,aACnBC,UAAW9E,KAAK+E,UAChBC,IAAKhF,KAAKgF,IACVC,IAAKjF,KAAKiF,IACVC,UAAWlF,KAAKmF,UAChBC,UAAWpF,KAAKqF,UAChBC,SAAUtF,KAAKsF,SACfC,KAAMvF,KAAKuF,KACXC,QAASxF,KAAKwF,QACdC,YAAazF,KAAKyF,aAAe,GACjCC,SAAU1F,KAAK2F,SACfC,SAAU5F,KAAK4F,SACfC,WAAY7F,KAAK6F,WACjBC,KAAM9F,KAAK8F,KACXC,KAAM/F,KAAKkD,eAAiB,OAASlD,KAAK+F,KAC1CtF,MAAOA,EACPJ,QAASL,KAAKK,QACdO,SAAUZ,KAAKY,SACfI,OAAQhB,KAAKgB,OACbG,QAASnB,KAAKmB,SACVnB,KAAKG,sBAEZH,KAAK+F,OAAS,WACXtC,EAAA,UAAQuC,MAAOhG,KAAKkD,eAAiBlD,KAAKiG,4BAA8BjG,KAAKkG,4BAA6BnC,MAAM,kBAAkBoC,QAAS,IAAMnG,KAAKiD,2BAClJQ,EAAA,gBAAcQ,KAAMjE,KAAKI,aAAcV,KAAK,OAEhD,KACHM,KAAK8D,YAAeL,EAAA,QAAMM,MAAM,SAASC,KAAK,UAAUhE,KAAK8D,aAAuB,K,wKAMrG,IAAI5D,EAAW,E"}
@@ -1,7 +1,7 @@
1
- import{r as t,h as n,H as e,g as r}from"./p-32e583ea.js";import{a as i,c as o}from"./p-0f864e86.js";import{b as a}from"./p-a3aece7a.js";import{i as u}from"./p-a0f32ead.js";
1
+ import{r as t,h as n,H as e,g as r}from"./p-32e583ea.js";import{a as i,c as o}from"./p-0f864e86.js";import{b as a}from"./p-52d77e1f.js";import{i as u}from"./p-a0f32ead.js";
2
2
  /**!
3
3
  * tippy.js v6.3.7
4
4
  * (c) 2017-2021 atomiks
5
5
  * MIT License
6
- */var f="tippy-box";var c="tippy-content";var s="tippy-backdrop";var l="tippy-arrow";var d="tippy-svg-arrow";var v={passive:true,capture:true};var p=function t(){return document.body};function h(t,n,e){if(Array.isArray(t)){var r=t[n];return r==null?Array.isArray(e)?e[n]:e:r}return t}function m(t,n){var e={}.toString.call(t);return e.indexOf("[object")===0&&e.indexOf(n+"]")>-1}function b(t,n){return typeof t==="function"?t.apply(void 0,n):t}function y(t,n){if(n===0){return t}var e;return function(r){clearTimeout(e);e=setTimeout((function(){t(r)}),n)}}function g(t){return t.split(/\s+/).filter(Boolean)}function w(t){return[].concat(t)}function T(t,n){if(t.indexOf(n)===-1){t.push(n)}}function O(t){return t.filter((function(n,e){return t.indexOf(n)===e}))}function j(t){return t.split("-")[0]}function x(t){return[].slice.call(t)}function k(t){return Object.keys(t).reduce((function(n,e){if(t[e]!==undefined){n[e]=t[e]}return n}),{})}function C(){return document.createElement("div")}function S(t){return["Element","Fragment"].some((function(n){return m(t,n)}))}function A(t){return m(t,"NodeList")}function P(t){return m(t,"MouseEvent")}function H(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function U(t){if(S(t)){return[t]}if(A(t)){return x(t)}if(Array.isArray(t)){return t}return x(document.querySelectorAll(t))}function W(t,n){t.forEach((function(t){if(t){t.style.transitionDuration=n+"ms"}}))}function B(t,n){t.forEach((function(t){if(t){t.setAttribute("data-state",n)}}))}function F(t){var n;var e=w(t),r=e[0];return r!=null&&(n=r.ownerDocument)!=null&&n.body?r.ownerDocument:document}function M(t,n){var e=n.clientX,r=n.clientY;return t.every((function(t){var n=t.popperRect,i=t.popperState,o=t.props;var a=o.interactiveBorder;var u=j(i.placement);var f=i.modifiersData.offset;if(!f){return true}var c=u==="bottom"?f.top.y:0;var s=u==="top"?f.bottom.y:0;var l=u==="right"?f.left.x:0;var d=u==="left"?f.right.x:0;var v=n.top-r+c>a;var p=r-n.bottom-s>a;var h=n.left-e+l>a;var m=e-n.right-d>a;return v||p||h||m}))}function D(t,n,e){var r=n+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(n){t[r](n,e)}))}function E(t,n){var e=n;while(e){var r;if(t.contains(e)){return true}e=e.getRootNode==null?void 0:(r=e.getRootNode())==null?void 0:r.host}return false}var L={isTouch:false};var R=0;function q(){if(L.isTouch){return}L.isTouch=true;if(window.performance){document.addEventListener("mousemove",I)}}function I(){var t=performance.now();if(t-R<20){L.isTouch=false;document.removeEventListener("mousemove",I)}R=t}function N(){var t=document.activeElement;if(H(t)){var n=t._tippy;if(t.blur&&!n.state.isVisible){t.blur()}}}function $(){document.addEventListener("touchstart",q,v);window.addEventListener("blur",N)}var z=typeof window!=="undefined"&&typeof document!=="undefined";var J=z?!!window.msCrypto:false;var K={animateFill:false,followCursor:false,inlinePositioning:false,sticky:false};var V={allowHTML:false,animation:"fade",arrow:true,content:"",inertia:false,maxWidth:350,role:"tooltip",theme:"",zIndex:9999};var _=Object.assign({appendTo:p,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:true,ignoreAttributes:false,interactive:false,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function t(){},onBeforeUpdate:function t(){},onCreate:function t(){},onDestroy:function t(){},onHidden:function t(){},onHide:function t(){},onMount:function t(){},onShow:function t(){},onShown:function t(){},onTrigger:function t(){},onUntrigger:function t(){},onClickOutside:function t(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:false,touch:true,trigger:"mouseenter focus",triggerTarget:null},K,V);var G=Object.keys(_);var Q=function t(n){var e=Object.keys(n);e.forEach((function(t){_[t]=n[t]}))};function X(t){var n=t.plugins||[];var e=n.reduce((function(n,e){var r=e.name,i=e.defaultValue;if(r){var o;n[r]=t[r]!==undefined?t[r]:(o=_[r])!=null?o:i}return n}),{});return Object.assign({},t,e)}function Y(t,n){var e=n?Object.keys(X(Object.assign({},_,{plugins:n}))):G;var r=e.reduce((function(n,e){var r=(t.getAttribute("data-tippy-"+e)||"").trim();if(!r){return n}if(e==="content"){n[e]=r}else{try{n[e]=JSON.parse(r)}catch(t){n[e]=r}}return n}),{});return r}function Z(t,n){var e=Object.assign({},n,{content:b(n.content,[t])},n.ignoreAttributes?{}:Y(t,n.plugins));e.aria=Object.assign({},_.aria,e.aria);e.aria={expanded:e.aria.expanded==="auto"?n.interactive:e.aria.expanded,content:e.aria.content==="auto"?n.interactive?null:"describedby":e.aria.content};return e}var tt=function t(){return"innerHTML"};function nt(t,n){t[tt()]=n}function et(t){var n=C();if(t===true){n.className=l}else{n.className=d;if(S(t)){n.appendChild(t)}else{nt(n,t)}}return n}function rt(t,n){if(S(n.content)){nt(t,"");t.appendChild(n.content)}else if(typeof n.content!=="function"){if(n.allowHTML){nt(t,n.content)}else{t.textContent=n.content}}}function it(t){var n=t.firstElementChild;var e=x(n.children);return{box:n,content:e.find((function(t){return t.classList.contains(c)})),arrow:e.find((function(t){return t.classList.contains(l)||t.classList.contains(d)})),backdrop:e.find((function(t){return t.classList.contains(s)}))}}function ot(t){var n=C();var e=C();e.className=f;e.setAttribute("data-state","hidden");e.setAttribute("tabindex","-1");var r=C();r.className=c;r.setAttribute("data-state","hidden");rt(r,t.props);n.appendChild(e);e.appendChild(r);i(t.props,t.props);function i(e,r){var i=it(n),o=i.box,a=i.content,u=i.arrow;if(r.theme){o.setAttribute("data-theme",r.theme)}else{o.removeAttribute("data-theme")}if(typeof r.animation==="string"){o.setAttribute("data-animation",r.animation)}else{o.removeAttribute("data-animation")}if(r.inertia){o.setAttribute("data-inertia","")}else{o.removeAttribute("data-inertia")}o.style.maxWidth=typeof r.maxWidth==="number"?r.maxWidth+"px":r.maxWidth;if(r.role){o.setAttribute("role",r.role)}else{o.removeAttribute("role")}if(e.content!==r.content||e.allowHTML!==r.allowHTML){rt(a,t.props)}if(r.arrow){if(!u){o.appendChild(et(r.arrow))}else if(e.arrow!==r.arrow){o.removeChild(u);o.appendChild(et(r.arrow))}}else if(u){o.removeChild(u)}}return{popper:n,onUpdate:i}}ot.$$tippy=true;var at=1;var ut=[];var ft=[];function ct(t,n){var e=Z(t,Object.assign({},_,X(k(n))));var r;var i;var a;var u=false;var f=false;var c=false;var s=false;var l;var d;var m;var j=[];var S=y(kt,e.interactiveDebounce);var A;var H=at++;var U=null;var R=O(e.plugins);var q={isEnabled:true,isVisible:false,isDestroyed:false,isMounted:false,isShown:false};var I={id:H,reference:t,popper:C(),popperInstance:U,props:e,state:q,plugins:R,clearDelayTimeouts:Et,setProps:Lt,setContent:Rt,show:qt,hide:It,hideWithInteractivity:Nt,enable:Mt,disable:Dt,unmount:$t,destroy:zt};if(!e.render){return I}var N=e.render(I),$=N.popper,z=N.onUpdate;$.setAttribute("data-tippy-root","");$.id="tippy-"+I.id;I.popper=$;t._tippy=I;$._tippy=I;var K=R.map((function(t){return t.fn(I)}));var V=t.hasAttribute("aria-expanded");Ot();lt();ot();ct("onCreate",[I]);if(e.showOnCreate){Bt()}$.addEventListener("mouseenter",(function(){if(I.props.interactive&&I.state.isVisible){I.clearDelayTimeouts()}}));$.addEventListener("mouseleave",(function(){if(I.props.interactive&&I.props.trigger.indexOf("mouseenter")>=0){nt().addEventListener("mousemove",S)}}));return I;function G(){var t=I.props.touch;return Array.isArray(t)?t:[t,0]}function Q(){return G()[0]==="hold"}function Y(){var t;return!!((t=I.props.render)!=null&&t.$$tippy)}function tt(){return A||t}function nt(){var t=tt().parentNode;return t?F(t):document}function et(){return it($)}function rt(t){if(I.state.isMounted&&!I.state.isVisible||L.isTouch||l&&l.type==="focus"){return 0}return h(I.props.delay,t?0:1,_.delay)}function ot(t){if(t===void 0){t=false}$.style.pointerEvents=I.props.interactive&&!t?"":"none";$.style.zIndex=""+I.props.zIndex}function ct(t,n,e){if(e===void 0){e=true}K.forEach((function(e){if(e[t]){e[t].apply(e,n)}}));if(e){var r;(r=I.props)[t].apply(r,n)}}function st(){var n=I.props.aria;if(!n.content){return}var e="aria-"+n.content;var r=$.id;var i=w(I.props.triggerTarget||t);i.forEach((function(t){var n=t.getAttribute(e);if(I.state.isVisible){t.setAttribute(e,n?n+" "+r:r)}else{var i=n&&n.replace(r,"").trim();if(i){t.setAttribute(e,i)}else{t.removeAttribute(e)}}}))}function lt(){if(V||!I.props.aria.expanded){return}var n=w(I.props.triggerTarget||t);n.forEach((function(t){if(I.props.interactive){t.setAttribute("aria-expanded",I.state.isVisible&&t===tt()?"true":"false")}else{t.removeAttribute("aria-expanded")}}))}function dt(){nt().removeEventListener("mousemove",S);ut=ut.filter((function(t){return t!==S}))}function vt(n){if(L.isTouch){if(c||n.type==="mousedown"){return}}var e=n.composedPath&&n.composedPath()[0]||n.target;if(I.props.interactive&&E($,e)){return}if(w(I.props.triggerTarget||t).some((function(t){return E(t,e)}))){if(L.isTouch){return}if(I.state.isVisible&&I.props.trigger.indexOf("click")>=0){return}}else{ct("onClickOutside",[I,n])}if(I.props.hideOnClick===true){I.clearDelayTimeouts();I.hide();f=true;setTimeout((function(){f=false}));if(!I.state.isMounted){bt()}}}function pt(){c=true}function ht(){c=false}function mt(){var t=nt();t.addEventListener("mousedown",vt,true);t.addEventListener("touchend",vt,v);t.addEventListener("touchstart",ht,v);t.addEventListener("touchmove",pt,v)}function bt(){var t=nt();t.removeEventListener("mousedown",vt,true);t.removeEventListener("touchend",vt,v);t.removeEventListener("touchstart",ht,v);t.removeEventListener("touchmove",pt,v)}function yt(t,n){wt(t,(function(){if(!I.state.isVisible&&$.parentNode&&$.parentNode.contains($)){n()}}))}function gt(t,n){wt(t,n)}function wt(t,n){var e=et().box;function r(t){if(t.target===e){D(e,"remove",r);n()}}if(t===0){return n()}D(e,"remove",d);D(e,"add",r);d=r}function Tt(n,e,r){if(r===void 0){r=false}var i=w(I.props.triggerTarget||t);i.forEach((function(t){t.addEventListener(n,e,r);j.push({node:t,eventType:n,handler:e,options:r})}))}function Ot(){if(Q()){Tt("touchstart",xt,{passive:true});Tt("touchend",Ct,{passive:true})}g(I.props.trigger).forEach((function(t){if(t==="manual"){return}Tt(t,xt);switch(t){case"mouseenter":Tt("mouseleave",Ct);break;case"focus":Tt(J?"focusout":"blur",St);break;case"focusin":Tt("focusout",St);break}}))}function jt(){j.forEach((function(t){var n=t.node,e=t.eventType,r=t.handler,i=t.options;n.removeEventListener(e,r,i)}));j=[]}function xt(t){var n;var e=false;if(!I.state.isEnabled||At(t)||f){return}var r=((n=l)==null?void 0:n.type)==="focus";l=t;A=t.currentTarget;lt();if(!I.state.isVisible&&P(t)){ut.forEach((function(n){return n(t)}))}if(t.type==="click"&&(I.props.trigger.indexOf("mouseenter")<0||u)&&I.props.hideOnClick!==false&&I.state.isVisible){e=true}else{Bt(t)}if(t.type==="click"){u=!e}if(e&&!r){Ft(t)}}function kt(t){var n=t.target;var r=tt().contains(n)||$.contains(n);if(t.type==="mousemove"&&r){return}var i=Wt().concat($).map((function(t){var n;var r=t._tippy;var i=(n=r.popperInstance)==null?void 0:n.state;if(i){return{popperRect:t.getBoundingClientRect(),popperState:i,props:e}}return null})).filter(Boolean);if(M(i,t)){dt();Ft(t)}}function Ct(t){var n=At(t)||I.props.trigger.indexOf("click")>=0&&u;if(n){return}if(I.props.interactive){I.hideWithInteractivity(t);return}Ft(t)}function St(t){if(I.props.trigger.indexOf("focusin")<0&&t.target!==tt()){return}if(I.props.interactive&&t.relatedTarget&&$.contains(t.relatedTarget)){return}Ft(t)}function At(t){return L.isTouch?Q()!==t.type.indexOf("touch")>=0:false}function Pt(){Ht();var n=I.props,e=n.popperOptions,r=n.placement,i=n.offset,a=n.getReferenceClientRect,u=n.moveTransition;var f=Y()?it($).arrow:null;var c=a?{getBoundingClientRect:a,contextElement:a.contextElement||tt()}:t;var s={name:"$$tippy",enabled:true,phase:"beforeWrite",requires:["computeStyles"],fn:function t(n){var e=n.state;if(Y()){var r=et(),i=r.box;["placement","reference-hidden","escaped"].forEach((function(t){if(t==="placement"){i.setAttribute("data-placement",e.placement)}else{if(e.attributes.popper["data-popper-"+t]){i.setAttribute("data-"+t,"")}else{i.removeAttribute("data-"+t)}}}));e.attributes.popper={}}}};var l=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!u}},s];if(Y()&&f){l.push({name:"arrow",options:{element:f,padding:3}})}l.push.apply(l,(e==null?void 0:e.modifiers)||[]);I.popperInstance=o(c,$,Object.assign({},e,{placement:r,onFirstUpdate:m,modifiers:l}))}function Ht(){if(I.popperInstance){I.popperInstance.destroy();I.popperInstance=null}}function Ut(){var t=I.props.appendTo;var n;var e=tt();if(I.props.interactive&&t===p||t==="parent"){n=e.parentNode}else{n=b(t,[e])}if(!n.contains($)){n.appendChild($)}I.state.isMounted=true;Pt()}function Wt(){return x($.querySelectorAll("[data-tippy-root]"))}function Bt(t){I.clearDelayTimeouts();if(t){ct("onTrigger",[I,t])}mt();var n=rt(true);var e=G(),i=e[0],o=e[1];if(L.isTouch&&i==="hold"&&o){n=o}if(n){r=setTimeout((function(){I.show()}),n)}else{I.show()}}function Ft(t){I.clearDelayTimeouts();ct("onUntrigger",[I,t]);if(!I.state.isVisible){bt();return}if(I.props.trigger.indexOf("mouseenter")>=0&&I.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&u){return}var n=rt(false);if(n){i=setTimeout((function(){if(I.state.isVisible){I.hide()}}),n)}else{a=requestAnimationFrame((function(){I.hide()}))}}function Mt(){I.state.isEnabled=true}function Dt(){I.hide();I.state.isEnabled=false}function Et(){clearTimeout(r);clearTimeout(i);cancelAnimationFrame(a)}function Lt(n){if(I.state.isDestroyed){return}ct("onBeforeUpdate",[I,n]);jt();var e=I.props;var r=Z(t,Object.assign({},e,k(n),{ignoreAttributes:true}));I.props=r;Ot();if(e.interactiveDebounce!==r.interactiveDebounce){dt();S=y(kt,r.interactiveDebounce)}if(e.triggerTarget&&!r.triggerTarget){w(e.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")}))}else if(r.triggerTarget){t.removeAttribute("aria-expanded")}lt();ot();if(z){z(e,r)}if(I.popperInstance){Pt();Wt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)}))}ct("onAfterUpdate",[I,n])}function Rt(t){I.setProps({content:t})}function qt(){var t=I.state.isVisible;var n=I.state.isDestroyed;var e=!I.state.isEnabled;var r=L.isTouch&&!I.props.touch;var i=h(I.props.duration,0,_.duration);if(t||n||e||r){return}if(tt().hasAttribute("disabled")){return}ct("onShow",[I],false);if(I.props.onShow(I)===false){return}I.state.isVisible=true;if(Y()){$.style.visibility="visible"}ot();mt();if(!I.state.isMounted){$.style.transition="none"}if(Y()){var o=et(),a=o.box,u=o.content;W([a,u],0)}m=function t(){var n;if(!I.state.isVisible||s){return}s=true;$.style.transition=I.props.moveTransition;if(Y()&&I.props.animation){var e=et(),r=e.box,o=e.content;W([r,o],i);B([r,o],"visible")}st();lt();T(ft,I);(n=I.popperInstance)==null?void 0:n.forceUpdate();ct("onMount",[I]);if(I.props.animation&&Y()){gt(i,(function(){I.state.isShown=true;ct("onShown",[I])}))}};Ut()}function It(){var t=!I.state.isVisible;var n=I.state.isDestroyed;var e=!I.state.isEnabled;var r=h(I.props.duration,1,_.duration);if(t||n||e){return}ct("onHide",[I],false);if(I.props.onHide(I)===false){return}I.state.isVisible=false;I.state.isShown=false;s=false;u=false;if(Y()){$.style.visibility="hidden"}dt();bt();ot(true);if(Y()){var i=et(),o=i.box,a=i.content;if(I.props.animation){W([o,a],r);B([o,a],"hidden")}}st();lt();if(I.props.animation){if(Y()){yt(r,I.unmount)}}else{I.unmount()}}function Nt(t){nt().addEventListener("mousemove",S);T(ut,S);S(t)}function $t(){if(I.state.isVisible){I.hide()}if(!I.state.isMounted){return}Ht();Wt().forEach((function(t){t._tippy.unmount()}));if($.parentNode){$.parentNode.removeChild($)}ft=ft.filter((function(t){return t!==I}));I.state.isMounted=false;ct("onHidden",[I])}function zt(){if(I.state.isDestroyed){return}I.clearDelayTimeouts();I.unmount();jt();delete t._tippy;I.state.isDestroyed=true;ct("onDestroy",[I])}}function st(t,n){if(n===void 0){n={}}var e=_.plugins.concat(n.plugins||[]);$();var r=Object.assign({},n,{plugins:e});var i=U(t);var o=i.reduce((function(t,n){var e=n&&ct(n,r);if(e){t.push(e)}return t}),[]);return S(t)?o[0]:o}st.defaultProps=_;st.setDefaultProps=Q;st.currentInput=L;Object.assign({},i,{effect:function t(n){var e=n.state;var r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,r.popper);e.styles=r;if(e.elements.arrow){Object.assign(e.elements.arrow.style,r.arrow)}}});st.setDefaultProps({render:ot});const lt=":host{display:none}";const dt=lt;const vt=["WCS-BUTTON"];const pt=class{constructor(n){t(this,n);this.for=undefined;this.position="bottom";this.interactive=false;this.maxWidth=350;this.delay=0;this.duration=[300,250];this.trigger="mouseenter focus";this.theme="dark";this.content=undefined;this.appendTo=undefined}componentWillLoad(){this.forElement=document.getElementById(this.for);if(!this.forElement){console.error('[wcs-tooltip]: The element with the id provided in the "for" property does not exist');return}this.tippyInstance=st(this.forElement,{appendTo:this.appendTo||(()=>document.body),theme:this.theme,allowHTML:true,content:this.getTooltipContentFromPropAndSlot(),maxWidth:this.maxWidth,placement:this.position,delay:this.delay,duration:this.duration,interactive:this.interactive,trigger:this.trigger,onShow:()=>this.onShow(),onHide:()=>this.onHide()})}onShow(){if(!this.forElement){return}if(this.forElement.tagName&&vt.indexOf(this.forElement.tagName)!==-1){if(u(this.forElement)){this.forElement.setAriaAttribute("aria-expanded","true")}}}onHide(){if(!this.forElement){return}if(this.forElement.tagName&&vt.indexOf(this.forElement.tagName)!==-1){if(u(this.forElement)){this.forElement.setAriaAttribute("aria-expanded","false")}}}async handleKeyDown(t){if(a(t)){if(this.tippyInstance.state.isShown){await this.hide()}}}getTooltipContentFromPropAndSlot(){if(this.content){return this.content+this.el.innerHTML}return this.el.innerHTML}updateProps(){var t;(t=this.tippyInstance)===null||t===void 0?void 0:t.setProps({interactive:this.interactive,placement:this.position,maxWidth:this.maxWidth,theme:this.theme,delay:this.delay,duration:this.duration,trigger:this.trigger})}updateTippyContent(){var t;(t=this.tippyInstance)===null||t===void 0?void 0:t.setProps({content:this.getTooltipContentFromPropAndSlot()})}async hide(){this.tippyInstance.hide()}async show(){this.tippyInstance.show()}async disable(){this.tippyInstance.disable()}async enable(){this.tippyInstance.enable()}disconnectedCallback(){var t;(t=this.tippyInstance)===null||t===void 0?void 0:t.destroy()}render(){return n(e,{key:"06de58e5ee996c471588dd36a2556f9c13b9aaa3",role:"tooltip"},n("slot",{key:"f1b6df619dbf24fc37216252a92e39b54f5874cb",onSlotchange:t=>this.updateTippyContent()}))}get el(){return r(this)}static get watchers(){return{interactive:["updateProps"],position:["updateProps"],maxWidth:["updateProps"],theme:["updateProps"],delay:["updateProps"],duration:["updateProps"],trigger:["updateProps"],content:["updateTippyContent"]}}};pt.style=dt;export{pt as wcs_tooltip};
7
- //# sourceMappingURL=p-0fa370d7.entry.js.map
6
+ */var f="tippy-box";var s="tippy-content";var c="tippy-backdrop";var l="tippy-arrow";var v="tippy-svg-arrow";var d={passive:true,capture:true};var p=function t(){return document.body};function h(t,n,e){if(Array.isArray(t)){var r=t[n];return r==null?Array.isArray(e)?e[n]:e:r}return t}function m(t,n){var e={}.toString.call(t);return e.indexOf("[object")===0&&e.indexOf(n+"]")>-1}function b(t,n){return typeof t==="function"?t.apply(void 0,n):t}function y(t,n){if(n===0){return t}var e;return function(r){clearTimeout(e);e=setTimeout((function(){t(r)}),n)}}function g(t){return t.split(/\s+/).filter(Boolean)}function w(t){return[].concat(t)}function T(t,n){if(t.indexOf(n)===-1){t.push(n)}}function O(t){return t.filter((function(n,e){return t.indexOf(n)===e}))}function j(t){return t.split("-")[0]}function x(t){return[].slice.call(t)}function k(t){return Object.keys(t).reduce((function(n,e){if(t[e]!==undefined){n[e]=t[e]}return n}),{})}function C(){return document.createElement("div")}function S(t){return["Element","Fragment"].some((function(n){return m(t,n)}))}function A(t){return m(t,"NodeList")}function P(t){return m(t,"MouseEvent")}function H(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function U(t){if(S(t)){return[t]}if(A(t)){return x(t)}if(Array.isArray(t)){return t}return x(document.querySelectorAll(t))}function W(t,n){t.forEach((function(t){if(t){t.style.transitionDuration=n+"ms"}}))}function B(t,n){t.forEach((function(t){if(t){t.setAttribute("data-state",n)}}))}function F(t){var n;var e=w(t),r=e[0];return r!=null&&(n=r.ownerDocument)!=null&&n.body?r.ownerDocument:document}function M(t,n){var e=n.clientX,r=n.clientY;return t.every((function(t){var n=t.popperRect,i=t.popperState,o=t.props;var a=o.interactiveBorder;var u=j(i.placement);var f=i.modifiersData.offset;if(!f){return true}var s=u==="bottom"?f.top.y:0;var c=u==="top"?f.bottom.y:0;var l=u==="right"?f.left.x:0;var v=u==="left"?f.right.x:0;var d=n.top-r+s>a;var p=r-n.bottom-c>a;var h=n.left-e+l>a;var m=e-n.right-v>a;return d||p||h||m}))}function D(t,n,e){var r=n+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(n){t[r](n,e)}))}function E(t,n){var e=n;while(e){var r;if(t.contains(e)){return true}e=e.getRootNode==null?void 0:(r=e.getRootNode())==null?void 0:r.host}return false}var L={isTouch:false};var R=0;function q(){if(L.isTouch){return}L.isTouch=true;if(window.performance){document.addEventListener("mousemove",I)}}function I(){var t=performance.now();if(t-R<20){L.isTouch=false;document.removeEventListener("mousemove",I)}R=t}function N(){var t=document.activeElement;if(H(t)){var n=t._tippy;if(t.blur&&!n.state.isVisible){t.blur()}}}function $(){document.addEventListener("touchstart",q,d);window.addEventListener("blur",N)}var z=typeof window!=="undefined"&&typeof document!=="undefined";var J=z?!!window.msCrypto:false;var K={animateFill:false,followCursor:false,inlinePositioning:false,sticky:false};var V={allowHTML:false,animation:"fade",arrow:true,content:"",inertia:false,maxWidth:350,role:"tooltip",theme:"",zIndex:9999};var _=Object.assign({appendTo:p,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:true,ignoreAttributes:false,interactive:false,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function t(){},onBeforeUpdate:function t(){},onCreate:function t(){},onDestroy:function t(){},onHidden:function t(){},onHide:function t(){},onMount:function t(){},onShow:function t(){},onShown:function t(){},onTrigger:function t(){},onUntrigger:function t(){},onClickOutside:function t(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:false,touch:true,trigger:"mouseenter focus",triggerTarget:null},K,V);var G=Object.keys(_);var Q=function t(n){var e=Object.keys(n);e.forEach((function(t){_[t]=n[t]}))};function X(t){var n=t.plugins||[];var e=n.reduce((function(n,e){var r=e.name,i=e.defaultValue;if(r){var o;n[r]=t[r]!==undefined?t[r]:(o=_[r])!=null?o:i}return n}),{});return Object.assign({},t,e)}function Y(t,n){var e=n?Object.keys(X(Object.assign({},_,{plugins:n}))):G;var r=e.reduce((function(n,e){var r=(t.getAttribute("data-tippy-"+e)||"").trim();if(!r){return n}if(e==="content"){n[e]=r}else{try{n[e]=JSON.parse(r)}catch(t){n[e]=r}}return n}),{});return r}function Z(t,n){var e=Object.assign({},n,{content:b(n.content,[t])},n.ignoreAttributes?{}:Y(t,n.plugins));e.aria=Object.assign({},_.aria,e.aria);e.aria={expanded:e.aria.expanded==="auto"?n.interactive:e.aria.expanded,content:e.aria.content==="auto"?n.interactive?null:"describedby":e.aria.content};return e}var tt=function t(){return"innerHTML"};function nt(t,n){t[tt()]=n}function et(t){var n=C();if(t===true){n.className=l}else{n.className=v;if(S(t)){n.appendChild(t)}else{nt(n,t)}}return n}function rt(t,n){if(S(n.content)){nt(t,"");t.appendChild(n.content)}else if(typeof n.content!=="function"){if(n.allowHTML){nt(t,n.content)}else{t.textContent=n.content}}}function it(t){var n=t.firstElementChild;var e=x(n.children);return{box:n,content:e.find((function(t){return t.classList.contains(s)})),arrow:e.find((function(t){return t.classList.contains(l)||t.classList.contains(v)})),backdrop:e.find((function(t){return t.classList.contains(c)}))}}function ot(t){var n=C();var e=C();e.className=f;e.setAttribute("data-state","hidden");e.setAttribute("tabindex","-1");var r=C();r.className=s;r.setAttribute("data-state","hidden");rt(r,t.props);n.appendChild(e);e.appendChild(r);i(t.props,t.props);function i(e,r){var i=it(n),o=i.box,a=i.content,u=i.arrow;if(r.theme){o.setAttribute("data-theme",r.theme)}else{o.removeAttribute("data-theme")}if(typeof r.animation==="string"){o.setAttribute("data-animation",r.animation)}else{o.removeAttribute("data-animation")}if(r.inertia){o.setAttribute("data-inertia","")}else{o.removeAttribute("data-inertia")}o.style.maxWidth=typeof r.maxWidth==="number"?r.maxWidth+"px":r.maxWidth;if(r.role){o.setAttribute("role",r.role)}else{o.removeAttribute("role")}if(e.content!==r.content||e.allowHTML!==r.allowHTML){rt(a,t.props)}if(r.arrow){if(!u){o.appendChild(et(r.arrow))}else if(e.arrow!==r.arrow){o.removeChild(u);o.appendChild(et(r.arrow))}}else if(u){o.removeChild(u)}}return{popper:n,onUpdate:i}}ot.$$tippy=true;var at=1;var ut=[];var ft=[];function st(t,n){var e=Z(t,Object.assign({},_,X(k(n))));var r;var i;var a;var u=false;var f=false;var s=false;var c=false;var l;var v;var m;var j=[];var S=y(kt,e.interactiveDebounce);var A;var H=at++;var U=null;var R=O(e.plugins);var q={isEnabled:true,isVisible:false,isDestroyed:false,isMounted:false,isShown:false};var I={id:H,reference:t,popper:C(),popperInstance:U,props:e,state:q,plugins:R,clearDelayTimeouts:Et,setProps:Lt,setContent:Rt,show:qt,hide:It,hideWithInteractivity:Nt,enable:Mt,disable:Dt,unmount:$t,destroy:zt};if(!e.render){return I}var N=e.render(I),$=N.popper,z=N.onUpdate;$.setAttribute("data-tippy-root","");$.id="tippy-"+I.id;I.popper=$;t._tippy=I;$._tippy=I;var K=R.map((function(t){return t.fn(I)}));var V=t.hasAttribute("aria-expanded");Ot();lt();ot();st("onCreate",[I]);if(e.showOnCreate){Bt()}$.addEventListener("mouseenter",(function(){if(I.props.interactive&&I.state.isVisible){I.clearDelayTimeouts()}}));$.addEventListener("mouseleave",(function(){if(I.props.interactive&&I.props.trigger.indexOf("mouseenter")>=0){nt().addEventListener("mousemove",S)}}));return I;function G(){var t=I.props.touch;return Array.isArray(t)?t:[t,0]}function Q(){return G()[0]==="hold"}function Y(){var t;return!!((t=I.props.render)!=null&&t.$$tippy)}function tt(){return A||t}function nt(){var t=tt().parentNode;return t?F(t):document}function et(){return it($)}function rt(t){if(I.state.isMounted&&!I.state.isVisible||L.isTouch||l&&l.type==="focus"){return 0}return h(I.props.delay,t?0:1,_.delay)}function ot(t){if(t===void 0){t=false}$.style.pointerEvents=I.props.interactive&&!t?"":"none";$.style.zIndex=""+I.props.zIndex}function st(t,n,e){if(e===void 0){e=true}K.forEach((function(e){if(e[t]){e[t].apply(e,n)}}));if(e){var r;(r=I.props)[t].apply(r,n)}}function ct(){var n=I.props.aria;if(!n.content){return}var e="aria-"+n.content;var r=$.id;var i=w(I.props.triggerTarget||t);i.forEach((function(t){var n=t.getAttribute(e);if(I.state.isVisible){t.setAttribute(e,n?n+" "+r:r)}else{var i=n&&n.replace(r,"").trim();if(i){t.setAttribute(e,i)}else{t.removeAttribute(e)}}}))}function lt(){if(V||!I.props.aria.expanded){return}var n=w(I.props.triggerTarget||t);n.forEach((function(t){if(I.props.interactive){t.setAttribute("aria-expanded",I.state.isVisible&&t===tt()?"true":"false")}else{t.removeAttribute("aria-expanded")}}))}function vt(){nt().removeEventListener("mousemove",S);ut=ut.filter((function(t){return t!==S}))}function dt(n){if(L.isTouch){if(s||n.type==="mousedown"){return}}var e=n.composedPath&&n.composedPath()[0]||n.target;if(I.props.interactive&&E($,e)){return}if(w(I.props.triggerTarget||t).some((function(t){return E(t,e)}))){if(L.isTouch){return}if(I.state.isVisible&&I.props.trigger.indexOf("click")>=0){return}}else{st("onClickOutside",[I,n])}if(I.props.hideOnClick===true){I.clearDelayTimeouts();I.hide();f=true;setTimeout((function(){f=false}));if(!I.state.isMounted){bt()}}}function pt(){s=true}function ht(){s=false}function mt(){var t=nt();t.addEventListener("mousedown",dt,true);t.addEventListener("touchend",dt,d);t.addEventListener("touchstart",ht,d);t.addEventListener("touchmove",pt,d)}function bt(){var t=nt();t.removeEventListener("mousedown",dt,true);t.removeEventListener("touchend",dt,d);t.removeEventListener("touchstart",ht,d);t.removeEventListener("touchmove",pt,d)}function yt(t,n){wt(t,(function(){if(!I.state.isVisible&&$.parentNode&&$.parentNode.contains($)){n()}}))}function gt(t,n){wt(t,n)}function wt(t,n){var e=et().box;function r(t){if(t.target===e){D(e,"remove",r);n()}}if(t===0){return n()}D(e,"remove",v);D(e,"add",r);v=r}function Tt(n,e,r){if(r===void 0){r=false}var i=w(I.props.triggerTarget||t);i.forEach((function(t){t.addEventListener(n,e,r);j.push({node:t,eventType:n,handler:e,options:r})}))}function Ot(){if(Q()){Tt("touchstart",xt,{passive:true});Tt("touchend",Ct,{passive:true})}g(I.props.trigger).forEach((function(t){if(t==="manual"){return}Tt(t,xt);switch(t){case"mouseenter":Tt("mouseleave",Ct);break;case"focus":Tt(J?"focusout":"blur",St);break;case"focusin":Tt("focusout",St);break}}))}function jt(){j.forEach((function(t){var n=t.node,e=t.eventType,r=t.handler,i=t.options;n.removeEventListener(e,r,i)}));j=[]}function xt(t){var n;var e=false;if(!I.state.isEnabled||At(t)||f){return}var r=((n=l)==null?void 0:n.type)==="focus";l=t;A=t.currentTarget;lt();if(!I.state.isVisible&&P(t)){ut.forEach((function(n){return n(t)}))}if(t.type==="click"&&(I.props.trigger.indexOf("mouseenter")<0||u)&&I.props.hideOnClick!==false&&I.state.isVisible){e=true}else{Bt(t)}if(t.type==="click"){u=!e}if(e&&!r){Ft(t)}}function kt(t){var n=t.target;var r=tt().contains(n)||$.contains(n);if(t.type==="mousemove"&&r){return}var i=Wt().concat($).map((function(t){var n;var r=t._tippy;var i=(n=r.popperInstance)==null?void 0:n.state;if(i){return{popperRect:t.getBoundingClientRect(),popperState:i,props:e}}return null})).filter(Boolean);if(M(i,t)){vt();Ft(t)}}function Ct(t){var n=At(t)||I.props.trigger.indexOf("click")>=0&&u;if(n){return}if(I.props.interactive){I.hideWithInteractivity(t);return}Ft(t)}function St(t){if(I.props.trigger.indexOf("focusin")<0&&t.target!==tt()){return}if(I.props.interactive&&t.relatedTarget&&$.contains(t.relatedTarget)){return}Ft(t)}function At(t){return L.isTouch?Q()!==t.type.indexOf("touch")>=0:false}function Pt(){Ht();var n=I.props,e=n.popperOptions,r=n.placement,i=n.offset,a=n.getReferenceClientRect,u=n.moveTransition;var f=Y()?it($).arrow:null;var s=a?{getBoundingClientRect:a,contextElement:a.contextElement||tt()}:t;var c={name:"$$tippy",enabled:true,phase:"beforeWrite",requires:["computeStyles"],fn:function t(n){var e=n.state;if(Y()){var r=et(),i=r.box;["placement","reference-hidden","escaped"].forEach((function(t){if(t==="placement"){i.setAttribute("data-placement",e.placement)}else{if(e.attributes.popper["data-popper-"+t]){i.setAttribute("data-"+t,"")}else{i.removeAttribute("data-"+t)}}}));e.attributes.popper={}}}};var l=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!u}},c];if(Y()&&f){l.push({name:"arrow",options:{element:f,padding:3}})}l.push.apply(l,(e==null?void 0:e.modifiers)||[]);I.popperInstance=o(s,$,Object.assign({},e,{placement:r,onFirstUpdate:m,modifiers:l}))}function Ht(){if(I.popperInstance){I.popperInstance.destroy();I.popperInstance=null}}function Ut(){var t=I.props.appendTo;var n;var e=tt();if(I.props.interactive&&t===p||t==="parent"){n=e.parentNode}else{n=b(t,[e])}if(!n.contains($)){n.appendChild($)}I.state.isMounted=true;Pt()}function Wt(){return x($.querySelectorAll("[data-tippy-root]"))}function Bt(t){I.clearDelayTimeouts();if(t){st("onTrigger",[I,t])}mt();var n=rt(true);var e=G(),i=e[0],o=e[1];if(L.isTouch&&i==="hold"&&o){n=o}if(n){r=setTimeout((function(){I.show()}),n)}else{I.show()}}function Ft(t){I.clearDelayTimeouts();st("onUntrigger",[I,t]);if(!I.state.isVisible){bt();return}if(I.props.trigger.indexOf("mouseenter")>=0&&I.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&u){return}var n=rt(false);if(n){i=setTimeout((function(){if(I.state.isVisible){I.hide()}}),n)}else{a=requestAnimationFrame((function(){I.hide()}))}}function Mt(){I.state.isEnabled=true}function Dt(){I.hide();I.state.isEnabled=false}function Et(){clearTimeout(r);clearTimeout(i);cancelAnimationFrame(a)}function Lt(n){if(I.state.isDestroyed){return}st("onBeforeUpdate",[I,n]);jt();var e=I.props;var r=Z(t,Object.assign({},e,k(n),{ignoreAttributes:true}));I.props=r;Ot();if(e.interactiveDebounce!==r.interactiveDebounce){vt();S=y(kt,r.interactiveDebounce)}if(e.triggerTarget&&!r.triggerTarget){w(e.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")}))}else if(r.triggerTarget){t.removeAttribute("aria-expanded")}lt();ot();if(z){z(e,r)}if(I.popperInstance){Pt();Wt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)}))}st("onAfterUpdate",[I,n])}function Rt(t){I.setProps({content:t})}function qt(){var t=I.state.isVisible;var n=I.state.isDestroyed;var e=!I.state.isEnabled;var r=L.isTouch&&!I.props.touch;var i=h(I.props.duration,0,_.duration);if(t||n||e||r){return}if(tt().hasAttribute("disabled")){return}st("onShow",[I],false);if(I.props.onShow(I)===false){return}I.state.isVisible=true;if(Y()){$.style.visibility="visible"}ot();mt();if(!I.state.isMounted){$.style.transition="none"}if(Y()){var o=et(),a=o.box,u=o.content;W([a,u],0)}m=function t(){var n;if(!I.state.isVisible||c){return}c=true;$.style.transition=I.props.moveTransition;if(Y()&&I.props.animation){var e=et(),r=e.box,o=e.content;W([r,o],i);B([r,o],"visible")}ct();lt();T(ft,I);(n=I.popperInstance)==null?void 0:n.forceUpdate();st("onMount",[I]);if(I.props.animation&&Y()){gt(i,(function(){I.state.isShown=true;st("onShown",[I])}))}};Ut()}function It(){var t=!I.state.isVisible;var n=I.state.isDestroyed;var e=!I.state.isEnabled;var r=h(I.props.duration,1,_.duration);if(t||n||e){return}st("onHide",[I],false);if(I.props.onHide(I)===false){return}I.state.isVisible=false;I.state.isShown=false;c=false;u=false;if(Y()){$.style.visibility="hidden"}vt();bt();ot(true);if(Y()){var i=et(),o=i.box,a=i.content;if(I.props.animation){W([o,a],r);B([o,a],"hidden")}}ct();lt();if(I.props.animation){if(Y()){yt(r,I.unmount)}}else{I.unmount()}}function Nt(t){nt().addEventListener("mousemove",S);T(ut,S);S(t)}function $t(){if(I.state.isVisible){I.hide()}if(!I.state.isMounted){return}Ht();Wt().forEach((function(t){t._tippy.unmount()}));if($.parentNode){$.parentNode.removeChild($)}ft=ft.filter((function(t){return t!==I}));I.state.isMounted=false;st("onHidden",[I])}function zt(){if(I.state.isDestroyed){return}I.clearDelayTimeouts();I.unmount();jt();delete t._tippy;I.state.isDestroyed=true;st("onDestroy",[I])}}function ct(t,n){if(n===void 0){n={}}var e=_.plugins.concat(n.plugins||[]);$();var r=Object.assign({},n,{plugins:e});var i=U(t);var o=i.reduce((function(t,n){var e=n&&st(n,r);if(e){t.push(e)}return t}),[]);return S(t)?o[0]:o}ct.defaultProps=_;ct.setDefaultProps=Q;ct.currentInput=L;Object.assign({},i,{effect:function t(n){var e=n.state;var r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,r.popper);e.styles=r;if(e.elements.arrow){Object.assign(e.elements.arrow.style,r.arrow)}}});ct.setDefaultProps({render:ot});const lt=":host{display:none}";const vt=lt;const dt=["WCS-BUTTON"];const pt=class{constructor(n){t(this,n);this.for=undefined;this.position="bottom";this.interactive=false;this.maxWidth=350;this.delay=0;this.duration=[300,250];this.trigger="mouseenter focus";this.theme="dark";this.content=undefined;this.appendTo=undefined}componentWillLoad(){this.forElement=document.getElementById(this.for);if(!this.forElement){console.error('[wcs-tooltip]: The element with the id provided in the "for" property does not exist');return}this.tippyInstance=ct(this.forElement,{appendTo:this.appendTo||(()=>document.body),theme:this.theme,allowHTML:true,content:this.getTooltipContentFromPropAndSlot(),maxWidth:this.maxWidth,placement:this.position,delay:this.delay,duration:this.duration,interactive:this.interactive,trigger:this.trigger,onShow:()=>this.onShow(),onHide:()=>this.onHide()})}onShow(){if(!this.forElement){return}if(this.forElement.tagName&&dt.indexOf(this.forElement.tagName)!==-1){if(u(this.forElement)){if(this.interactive){this.forElement.setAriaAttribute("aria-expanded","true")}}}}onHide(){if(!this.forElement){return}if(this.forElement.tagName&&dt.indexOf(this.forElement.tagName)!==-1){if(u(this.forElement)){if(this.interactive){this.forElement.setAriaAttribute("aria-expanded","false")}}}}async handleKeyDown(t){if(a(t)){if(this.tippyInstance.state.isShown){await this.hide()}}}getTooltipContentFromPropAndSlot(){if(this.content){return this.content+this.el.innerHTML}return this.el.innerHTML}updateProps(){var t;(t=this.tippyInstance)===null||t===void 0?void 0:t.setProps({interactive:this.interactive,placement:this.position,maxWidth:this.maxWidth,theme:this.theme,delay:this.delay,duration:this.duration,trigger:this.trigger})}updateTippyContent(){var t;(t=this.tippyInstance)===null||t===void 0?void 0:t.setProps({content:this.getTooltipContentFromPropAndSlot()})}async hide(){this.tippyInstance.hide()}async show(){this.tippyInstance.show()}async disable(){this.tippyInstance.disable()}async enable(){this.tippyInstance.enable()}disconnectedCallback(){var t;(t=this.tippyInstance)===null||t===void 0?void 0:t.destroy()}render(){return n(e,{key:"c64153818029a55af719bc87fa5ce413d310e8b7",role:"tooltip"},n("slot",{key:"2f24f867892089d93b41783977b470ab908063cd",onSlotchange:t=>this.updateTippyContent()}))}get el(){return r(this)}static get watchers(){return{interactive:["updateProps"],position:["updateProps"],maxWidth:["updateProps"],theme:["updateProps"],delay:["updateProps"],duration:["updateProps"],trigger:["updateProps"],content:["updateTippyContent"]}}};pt.style=vt;export{pt as wcs_tooltip};
7
+ //# sourceMappingURL=p-5bf73e05.entry.js.map