@six-group/ui-library 4.0.2 → 4.0.4

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 (358) hide show
  1. package/dist/cjs/{form-control-9769b310.js → form-control-19303ed2.js} +2 -2
  2. package/dist/cjs/{form-control-9769b310.js.map → form-control-19303ed2.js.map} +1 -1
  3. package/dist/cjs/{index-900437fc.js → index-7d73cbd6.js} +281 -121
  4. package/dist/cjs/index-7d73cbd6.js.map +1 -0
  5. package/dist/cjs/index.cjs.js +15 -0
  6. package/dist/cjs/index.cjs.js.map +1 -1
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/set-attributes_2.cjs.entry.js +1 -1
  9. package/dist/cjs/six-alert.cjs.entry.js +1 -1
  10. package/dist/cjs/six-avatar.cjs.entry.js +1 -1
  11. package/dist/cjs/six-badge.cjs.entry.js +1 -1
  12. package/dist/cjs/six-button.cjs.entry.js +3 -3
  13. package/dist/cjs/six-button.cjs.entry.js.map +1 -1
  14. package/dist/cjs/six-card.cjs.entry.js +1 -1
  15. package/dist/cjs/six-checkbox.cjs.entry.js +3 -3
  16. package/dist/cjs/six-checkbox.cjs.entry.js.map +1 -1
  17. package/dist/cjs/six-datepicker.cjs.entry.js +1 -1
  18. package/dist/cjs/six-details.cjs.entry.js +1 -1
  19. package/dist/cjs/six-dialog.cjs.entry.js +1 -1
  20. package/dist/cjs/six-drawer.cjs.entry.js +2 -2
  21. package/dist/cjs/six-drawer.cjs.entry.js.map +1 -1
  22. package/dist/cjs/six-dropdown_2.cjs.entry.js +1 -1
  23. package/dist/cjs/six-error-page.cjs.entry.js +1 -1
  24. package/dist/cjs/six-error.cjs.entry.js +1 -1
  25. package/dist/cjs/six-file-list-item.cjs.entry.js +1 -1
  26. package/dist/cjs/six-file-list.cjs.entry.js +1 -1
  27. package/dist/cjs/six-file-upload.cjs.entry.js +1 -1
  28. package/dist/cjs/six-footer.cjs.entry.js +1 -1
  29. package/dist/cjs/six-group-label.cjs.entry.js +3 -3
  30. package/dist/cjs/six-group-label.cjs.entry.js.map +1 -1
  31. package/dist/cjs/six-header.cjs.entry.js +1 -1
  32. package/dist/cjs/six-icon-button.cjs.entry.js +1 -1
  33. package/dist/cjs/six-icon.cjs.entry.js +1 -1
  34. package/dist/cjs/six-input.cjs.entry.js +3 -3
  35. package/dist/cjs/six-input.cjs.entry.js.map +1 -1
  36. package/dist/cjs/six-item-picker.cjs.entry.js +1 -1
  37. package/dist/cjs/six-language-switcher.cjs.entry.js +1 -1
  38. package/dist/cjs/six-layout-grid.cjs.entry.js +1 -1
  39. package/dist/cjs/six-main-container.cjs.entry.js +1 -1
  40. package/dist/cjs/six-menu-divider.cjs.entry.js +1 -1
  41. package/dist/cjs/six-menu-item.cjs.entry.js +1 -1
  42. package/dist/cjs/six-menu-label.cjs.entry.js +1 -1
  43. package/dist/cjs/six-picto.cjs.entry.js +1 -1
  44. package/dist/cjs/six-progress-bar.cjs.entry.js +1 -1
  45. package/dist/cjs/six-progress-ring.cjs.entry.js +1 -1
  46. package/dist/cjs/six-radio.cjs.entry.js +1 -1
  47. package/dist/cjs/six-range.cjs.entry.js +3 -3
  48. package/dist/cjs/six-range.cjs.entry.js.map +1 -1
  49. package/dist/cjs/six-root.cjs.entry.js +1 -1
  50. package/dist/cjs/six-search-field.cjs.entry.js +1 -1
  51. package/dist/cjs/six-select.cjs.entry.js +3 -3
  52. package/dist/cjs/six-select.cjs.entry.js.map +1 -1
  53. package/dist/cjs/six-sidebar-item-group.cjs.entry.js +13 -3
  54. package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -1
  55. package/dist/cjs/six-sidebar-item.cjs.entry.js +6 -4
  56. package/dist/cjs/six-sidebar-item.cjs.entry.js.map +1 -1
  57. package/dist/cjs/six-sidebar.cjs.entry.js +1 -1
  58. package/dist/cjs/six-spinner.cjs.entry.js +1 -1
  59. package/dist/cjs/six-switch.cjs.entry.js +3 -3
  60. package/dist/cjs/six-switch.cjs.entry.js.map +1 -1
  61. package/dist/cjs/six-tab-group.cjs.entry.js +1 -1
  62. package/dist/cjs/six-tab-panel.cjs.entry.js +1 -1
  63. package/dist/cjs/six-tab.cjs.entry.js +1 -1
  64. package/dist/cjs/six-tag.cjs.entry.js +1 -1
  65. package/dist/cjs/six-textarea.cjs.entry.js +3 -3
  66. package/dist/cjs/six-textarea.cjs.entry.js.map +1 -1
  67. package/dist/cjs/six-tile.cjs.entry.js +1 -1
  68. package/dist/cjs/six-timepicker.cjs.entry.js +1 -1
  69. package/dist/cjs/six-tooltip.cjs.entry.js +1 -1
  70. package/dist/cjs/ui-library.cjs.js +3 -3
  71. package/dist/cjs/ui-library.cjs.js.map +1 -1
  72. package/dist/collection/collection-manifest.json +2 -2
  73. package/dist/collection/components/six-button/six-button.js +2 -2
  74. package/dist/collection/components/six-button/six-button.js.map +1 -1
  75. package/dist/collection/components/six-checkbox/six-checkbox.css +3 -0
  76. package/dist/collection/components/six-drawer/six-drawer.js +1 -1
  77. package/dist/collection/components/six-drawer/six-drawer.js.map +1 -1
  78. package/dist/collection/components/six-drawer/test/six-drawer.spec.js +1 -1
  79. package/dist/collection/components/six-drawer/test/six-drawer.spec.js.map +1 -1
  80. package/dist/collection/components/six-group-label/six-group-label.css +3 -0
  81. package/dist/collection/components/six-input/six-input.css +3 -0
  82. package/dist/collection/components/six-range/six-range.css +3 -0
  83. package/dist/collection/components/six-select/six-select.css +3 -0
  84. package/dist/collection/components/six-sidebar-item/six-sidebar-item.css +6 -1
  85. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +21 -2
  86. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js.map +1 -1
  87. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.css +7 -0
  88. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js +28 -1
  89. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js.map +1 -1
  90. package/dist/collection/components/six-switch/six-switch.css +3 -0
  91. package/dist/collection/components/six-textarea/six-textarea.css +3 -0
  92. package/dist/collection/utils/error-messages.js +14 -0
  93. package/dist/collection/utils/error-messages.js.map +1 -1
  94. package/dist/components/index.d.ts +6 -0
  95. package/dist/components/index.js +16 -2
  96. package/dist/components/index.js.map +1 -1
  97. package/dist/components/set-attributes2.js +2 -0
  98. package/dist/components/set-attributes2.js.map +1 -1
  99. package/dist/components/six-alert.js +3 -0
  100. package/dist/components/six-alert.js.map +1 -1
  101. package/dist/components/six-button.js +2 -2
  102. package/dist/components/six-button.js.map +1 -1
  103. package/dist/components/six-checkbox.js +6 -1
  104. package/dist/components/six-checkbox.js.map +1 -1
  105. package/dist/components/six-datepicker.js +4 -1
  106. package/dist/components/six-datepicker.js.map +1 -1
  107. package/dist/components/six-details2.js +2 -0
  108. package/dist/components/six-details2.js.map +1 -1
  109. package/dist/components/six-dialog.js +2 -0
  110. package/dist/components/six-dialog.js.map +1 -1
  111. package/dist/components/six-drawer.js +3 -1
  112. package/dist/components/six-drawer.js.map +1 -1
  113. package/dist/components/six-dropdown2.js +7 -0
  114. package/dist/components/six-dropdown2.js.map +1 -1
  115. package/dist/components/six-group-label.js +4 -1
  116. package/dist/components/six-group-label.js.map +1 -1
  117. package/dist/components/six-header.js +2 -0
  118. package/dist/components/six-header.js.map +1 -1
  119. package/dist/components/six-input2.js +6 -1
  120. package/dist/components/six-input2.js.map +1 -1
  121. package/dist/components/six-item-picker2.js +4 -0
  122. package/dist/components/six-item-picker2.js.map +1 -1
  123. package/dist/components/six-language-switcher.js +2 -0
  124. package/dist/components/six-language-switcher.js.map +1 -1
  125. package/dist/components/six-layout-grid.js +2 -0
  126. package/dist/components/six-layout-grid.js.map +1 -1
  127. package/dist/components/six-progress-ring.js +2 -0
  128. package/dist/components/six-progress-ring.js.map +1 -1
  129. package/dist/components/six-radio.js +3 -0
  130. package/dist/components/six-radio.js.map +1 -1
  131. package/dist/components/six-range.js +8 -1
  132. package/dist/components/six-range.js.map +1 -1
  133. package/dist/components/six-root.js +2 -0
  134. package/dist/components/six-root.js.map +1 -1
  135. package/dist/components/six-search-field.js +2 -0
  136. package/dist/components/six-search-field.js.map +1 -1
  137. package/dist/components/six-select.js +8 -1
  138. package/dist/components/six-select.js.map +1 -1
  139. package/dist/components/six-sidebar-item-group.js +13 -2
  140. package/dist/components/six-sidebar-item-group.js.map +1 -1
  141. package/dist/components/six-sidebar-item.js +7 -4
  142. package/dist/components/six-sidebar-item.js.map +1 -1
  143. package/dist/components/six-sidebar.js +2 -0
  144. package/dist/components/six-sidebar.js.map +1 -1
  145. package/dist/components/six-switch.js +5 -1
  146. package/dist/components/six-switch.js.map +1 -1
  147. package/dist/components/six-tab-group.js +2 -0
  148. package/dist/components/six-tab-group.js.map +1 -1
  149. package/dist/components/six-textarea.js +7 -1
  150. package/dist/components/six-textarea.js.map +1 -1
  151. package/dist/components/six-timepicker2.js +3 -1
  152. package/dist/components/six-timepicker2.js.map +1 -1
  153. package/dist/components/six-tooltip2.js +2 -0
  154. package/dist/components/six-tooltip2.js.map +1 -1
  155. package/dist/components.json +51 -3
  156. package/dist/esm/{form-control-b0febe88.js → form-control-079f7fb6.js} +2 -2
  157. package/dist/esm/{form-control-b0febe88.js.map → form-control-079f7fb6.js.map} +1 -1
  158. package/dist/esm/{index-8a74f992.js → index-4ee8b33e.js} +281 -121
  159. package/dist/esm/index-4ee8b33e.js.map +1 -0
  160. package/dist/esm/index.js +15 -1
  161. package/dist/esm/index.js.map +1 -1
  162. package/dist/esm/loader.js +3 -3
  163. package/dist/esm/set-attributes_2.entry.js +1 -1
  164. package/dist/esm/six-alert.entry.js +1 -1
  165. package/dist/esm/six-avatar.entry.js +1 -1
  166. package/dist/esm/six-badge.entry.js +1 -1
  167. package/dist/esm/six-button.entry.js +3 -3
  168. package/dist/esm/six-button.entry.js.map +1 -1
  169. package/dist/esm/six-card.entry.js +1 -1
  170. package/dist/esm/six-checkbox.entry.js +3 -3
  171. package/dist/esm/six-checkbox.entry.js.map +1 -1
  172. package/dist/esm/six-datepicker.entry.js +1 -1
  173. package/dist/esm/six-details.entry.js +1 -1
  174. package/dist/esm/six-dialog.entry.js +1 -1
  175. package/dist/esm/six-drawer.entry.js +2 -2
  176. package/dist/esm/six-drawer.entry.js.map +1 -1
  177. package/dist/esm/six-dropdown_2.entry.js +1 -1
  178. package/dist/esm/six-error-page.entry.js +1 -1
  179. package/dist/esm/six-error.entry.js +1 -1
  180. package/dist/esm/six-file-list-item.entry.js +1 -1
  181. package/dist/esm/six-file-list.entry.js +1 -1
  182. package/dist/esm/six-file-upload.entry.js +1 -1
  183. package/dist/esm/six-footer.entry.js +1 -1
  184. package/dist/esm/six-group-label.entry.js +3 -3
  185. package/dist/esm/six-group-label.entry.js.map +1 -1
  186. package/dist/esm/six-header.entry.js +1 -1
  187. package/dist/esm/six-icon-button.entry.js +1 -1
  188. package/dist/esm/six-icon.entry.js +1 -1
  189. package/dist/esm/six-input.entry.js +3 -3
  190. package/dist/esm/six-input.entry.js.map +1 -1
  191. package/dist/esm/six-item-picker.entry.js +1 -1
  192. package/dist/esm/six-language-switcher.entry.js +1 -1
  193. package/dist/esm/six-layout-grid.entry.js +1 -1
  194. package/dist/esm/six-main-container.entry.js +1 -1
  195. package/dist/esm/six-menu-divider.entry.js +1 -1
  196. package/dist/esm/six-menu-item.entry.js +1 -1
  197. package/dist/esm/six-menu-label.entry.js +1 -1
  198. package/dist/esm/six-picto.entry.js +1 -1
  199. package/dist/esm/six-progress-bar.entry.js +1 -1
  200. package/dist/esm/six-progress-ring.entry.js +1 -1
  201. package/dist/esm/six-radio.entry.js +1 -1
  202. package/dist/esm/six-range.entry.js +3 -3
  203. package/dist/esm/six-range.entry.js.map +1 -1
  204. package/dist/esm/six-root.entry.js +1 -1
  205. package/dist/esm/six-search-field.entry.js +1 -1
  206. package/dist/esm/six-select.entry.js +3 -3
  207. package/dist/esm/six-select.entry.js.map +1 -1
  208. package/dist/esm/six-sidebar-item-group.entry.js +13 -3
  209. package/dist/esm/six-sidebar-item-group.entry.js.map +1 -1
  210. package/dist/esm/six-sidebar-item.entry.js +6 -4
  211. package/dist/esm/six-sidebar-item.entry.js.map +1 -1
  212. package/dist/esm/six-sidebar.entry.js +1 -1
  213. package/dist/esm/six-spinner.entry.js +1 -1
  214. package/dist/esm/six-switch.entry.js +3 -3
  215. package/dist/esm/six-switch.entry.js.map +1 -1
  216. package/dist/esm/six-tab-group.entry.js +1 -1
  217. package/dist/esm/six-tab-panel.entry.js +1 -1
  218. package/dist/esm/six-tab.entry.js +1 -1
  219. package/dist/esm/six-tag.entry.js +1 -1
  220. package/dist/esm/six-textarea.entry.js +3 -3
  221. package/dist/esm/six-textarea.entry.js.map +1 -1
  222. package/dist/esm/six-tile.entry.js +1 -1
  223. package/dist/esm/six-timepicker.entry.js +1 -1
  224. package/dist/esm/six-tooltip.entry.js +1 -1
  225. package/dist/esm/ui-library.js +4 -4
  226. package/dist/esm/ui-library.js.map +1 -1
  227. package/dist/types/components/six-sidebar-item/six-sidebar-item.d.ts +5 -0
  228. package/dist/types/components/six-sidebar-item-group/six-sidebar-item-group.d.ts +6 -0
  229. package/dist/types/components.d.ts +396 -0
  230. package/dist/types/stencil-public-runtime.d.ts +26 -3
  231. package/dist/types/utils/error-messages.d.ts +2 -1
  232. package/dist/ui-library/index.esm.js +1 -1
  233. package/dist/ui-library/index.esm.js.map +1 -1
  234. package/dist/ui-library/{p-5800663b.entry.js → p-0416ec85.entry.js} +2 -2
  235. package/dist/ui-library/{p-ae601a0f.entry.js → p-0d8154b1.entry.js} +2 -2
  236. package/dist/ui-library/p-120a1b66.entry.js +2 -0
  237. package/dist/ui-library/{p-538f3c50.entry.js.map → p-120a1b66.entry.js.map} +1 -1
  238. package/dist/ui-library/{p-9c1be3fb.entry.js → p-16eb37cd.entry.js} +2 -2
  239. package/dist/ui-library/{p-878226a0.entry.js → p-1f7dac36.entry.js} +2 -2
  240. package/dist/ui-library/{p-a6a9ee96.entry.js → p-20cb60c9.entry.js} +2 -2
  241. package/dist/ui-library/{p-613283a7.entry.js → p-21606e14.entry.js} +2 -2
  242. package/dist/ui-library/{p-411ed539.entry.js → p-2280038f.entry.js} +2 -2
  243. package/dist/ui-library/{p-e775dcb4.entry.js → p-24e80289.entry.js} +2 -2
  244. package/dist/ui-library/{p-264d4ea8.entry.js → p-27987d45.entry.js} +2 -2
  245. package/dist/ui-library/{p-cd67da3d.entry.js → p-2945a132.entry.js} +2 -2
  246. package/dist/ui-library/{p-3cc5addb.entry.js → p-2e99f389.entry.js} +2 -2
  247. package/dist/ui-library/p-3d7678a8.entry.js +2 -0
  248. package/dist/ui-library/p-3d7678a8.entry.js.map +1 -0
  249. package/dist/ui-library/p-4196a75a.entry.js +2 -0
  250. package/dist/ui-library/{p-a457fee8.entry.js.map → p-4196a75a.entry.js.map} +1 -1
  251. package/dist/ui-library/{p-dc4f41d8.entry.js → p-48b7c199.entry.js} +2 -2
  252. package/dist/ui-library/{p-37557787.entry.js → p-51630491.entry.js} +2 -2
  253. package/dist/ui-library/{p-14c1ec31.entry.js → p-5218986b.entry.js} +2 -2
  254. package/dist/ui-library/{p-66fe54b3.entry.js → p-5904d3c3.entry.js} +2 -2
  255. package/dist/ui-library/p-66a48dc4.entry.js +2 -0
  256. package/dist/ui-library/{p-db936ad7.entry.js.map → p-66a48dc4.entry.js.map} +1 -1
  257. package/dist/ui-library/{p-91b51800.entry.js → p-66d1d93d.entry.js} +2 -2
  258. package/dist/ui-library/{p-25bb1752.entry.js → p-6aced322.entry.js} +2 -2
  259. package/dist/ui-library/{p-22c9b8c3.entry.js → p-6e87aeea.entry.js} +2 -2
  260. package/dist/ui-library/p-74179b03.entry.js +2 -0
  261. package/dist/ui-library/{p-ab91c2a9.entry.js.map → p-74179b03.entry.js.map} +1 -1
  262. package/dist/ui-library/{p-1d5ee1a0.entry.js → p-77424c6b.entry.js} +2 -2
  263. package/dist/ui-library/{p-13b43e04.entry.js → p-7d00de3a.entry.js} +2 -2
  264. package/dist/ui-library/{p-cdaed936.entry.js → p-7e9257f3.entry.js} +2 -2
  265. package/dist/ui-library/p-8226e363.entry.js +2 -0
  266. package/dist/ui-library/{p-b57afbe4.entry.js.map → p-8226e363.entry.js.map} +1 -1
  267. package/dist/ui-library/{p-a2035543.entry.js → p-8296e24c.entry.js} +2 -2
  268. package/dist/ui-library/{p-a2035543.entry.js.map → p-8296e24c.entry.js.map} +1 -1
  269. package/dist/ui-library/{p-7e3ad38a.entry.js → p-93a9b693.entry.js} +2 -2
  270. package/dist/ui-library/{p-5af44076.entry.js → p-94bd8347.entry.js} +2 -2
  271. package/dist/ui-library/{p-ee950ce2.entry.js → p-9bec3e14.entry.js} +2 -2
  272. package/dist/ui-library/{p-9b354f5d.entry.js → p-a15928c4.entry.js} +2 -2
  273. package/dist/ui-library/{p-cba69e9d.entry.js → p-a4348ad4.entry.js} +2 -2
  274. package/dist/ui-library/{p-7afafb9d.entry.js → p-acd3ecfd.entry.js} +2 -2
  275. package/dist/ui-library/{p-f1dc3a88.entry.js → p-ae383f66.entry.js} +2 -2
  276. package/dist/ui-library/{p-1286ab62.entry.js → p-af0e163e.entry.js} +2 -2
  277. package/dist/ui-library/{p-1286ab62.entry.js.map → p-af0e163e.entry.js.map} +1 -1
  278. package/dist/ui-library/{p-3f1a5ecb.entry.js → p-b3a14438.entry.js} +2 -2
  279. package/dist/ui-library/{p-dfed33c5.entry.js → p-b42fd9c3.entry.js} +2 -2
  280. package/dist/ui-library/p-b5fdfa6a.js +3 -0
  281. package/dist/ui-library/p-b5fdfa6a.js.map +1 -0
  282. package/dist/ui-library/p-b7597736.entry.js +2 -0
  283. package/dist/ui-library/{p-4435ff73.entry.js.map → p-b7597736.entry.js.map} +1 -1
  284. package/dist/ui-library/{p-c03ebf7d.entry.js → p-b906a605.entry.js} +2 -2
  285. package/dist/ui-library/{p-ac099e6b.entry.js → p-b97764a1.entry.js} +2 -2
  286. package/dist/ui-library/p-bbefcec9.entry.js +2 -0
  287. package/dist/ui-library/{p-db34a6cc.entry.js.map → p-bbefcec9.entry.js.map} +1 -1
  288. package/dist/ui-library/{p-b351f889.entry.js → p-c75694df.entry.js} +2 -2
  289. package/dist/ui-library/{p-b6f47c9d.entry.js → p-cb32f8d2.entry.js} +2 -2
  290. package/dist/ui-library/{p-a0f290d0.entry.js → p-cd3281fb.entry.js} +2 -2
  291. package/dist/ui-library/{p-d1bda563.entry.js → p-cec8c149.entry.js} +2 -2
  292. package/dist/ui-library/{p-724875b0.entry.js → p-d1ba2ad5.entry.js} +2 -2
  293. package/dist/ui-library/{p-346f9557.entry.js → p-d2196113.entry.js} +2 -2
  294. package/dist/ui-library/p-de7a9448.entry.js +2 -0
  295. package/dist/ui-library/p-de7a9448.entry.js.map +1 -0
  296. package/dist/ui-library/{p-a55c7258.entry.js → p-df1c4a1f.entry.js} +2 -2
  297. package/dist/ui-library/{p-95fbdd0b.entry.js → p-e740215a.entry.js} +2 -2
  298. package/dist/ui-library/{p-e5020f0d.js → p-f3fdc121.js} +2 -2
  299. package/dist/ui-library/ui-library.css +1 -1
  300. package/dist/ui-library/ui-library.esm.js +1 -1
  301. package/dist/ui-library/ui-library.esm.js.map +1 -1
  302. package/package.json +13 -10
  303. package/dist/cjs/index-900437fc.js.map +0 -1
  304. package/dist/esm/index-8a74f992.js.map +0 -1
  305. package/dist/ui-library/p-4435ff73.entry.js +0 -2
  306. package/dist/ui-library/p-538f3c50.entry.js +0 -2
  307. package/dist/ui-library/p-5ba3a0fe.entry.js +0 -2
  308. package/dist/ui-library/p-5ba3a0fe.entry.js.map +0 -1
  309. package/dist/ui-library/p-6153045b.js +0 -3
  310. package/dist/ui-library/p-6153045b.js.map +0 -1
  311. package/dist/ui-library/p-6197fe2f.entry.js +0 -2
  312. package/dist/ui-library/p-6197fe2f.entry.js.map +0 -1
  313. package/dist/ui-library/p-a457fee8.entry.js +0 -2
  314. package/dist/ui-library/p-ab91c2a9.entry.js +0 -2
  315. package/dist/ui-library/p-b57afbe4.entry.js +0 -2
  316. package/dist/ui-library/p-db34a6cc.entry.js +0 -2
  317. package/dist/ui-library/p-db936ad7.entry.js +0 -2
  318. /package/dist/ui-library/{p-5800663b.entry.js.map → p-0416ec85.entry.js.map} +0 -0
  319. /package/dist/ui-library/{p-ae601a0f.entry.js.map → p-0d8154b1.entry.js.map} +0 -0
  320. /package/dist/ui-library/{p-9c1be3fb.entry.js.map → p-16eb37cd.entry.js.map} +0 -0
  321. /package/dist/ui-library/{p-878226a0.entry.js.map → p-1f7dac36.entry.js.map} +0 -0
  322. /package/dist/ui-library/{p-a6a9ee96.entry.js.map → p-20cb60c9.entry.js.map} +0 -0
  323. /package/dist/ui-library/{p-613283a7.entry.js.map → p-21606e14.entry.js.map} +0 -0
  324. /package/dist/ui-library/{p-411ed539.entry.js.map → p-2280038f.entry.js.map} +0 -0
  325. /package/dist/ui-library/{p-e775dcb4.entry.js.map → p-24e80289.entry.js.map} +0 -0
  326. /package/dist/ui-library/{p-264d4ea8.entry.js.map → p-27987d45.entry.js.map} +0 -0
  327. /package/dist/ui-library/{p-cd67da3d.entry.js.map → p-2945a132.entry.js.map} +0 -0
  328. /package/dist/ui-library/{p-3cc5addb.entry.js.map → p-2e99f389.entry.js.map} +0 -0
  329. /package/dist/ui-library/{p-dc4f41d8.entry.js.map → p-48b7c199.entry.js.map} +0 -0
  330. /package/dist/ui-library/{p-37557787.entry.js.map → p-51630491.entry.js.map} +0 -0
  331. /package/dist/ui-library/{p-14c1ec31.entry.js.map → p-5218986b.entry.js.map} +0 -0
  332. /package/dist/ui-library/{p-66fe54b3.entry.js.map → p-5904d3c3.entry.js.map} +0 -0
  333. /package/dist/ui-library/{p-91b51800.entry.js.map → p-66d1d93d.entry.js.map} +0 -0
  334. /package/dist/ui-library/{p-25bb1752.entry.js.map → p-6aced322.entry.js.map} +0 -0
  335. /package/dist/ui-library/{p-22c9b8c3.entry.js.map → p-6e87aeea.entry.js.map} +0 -0
  336. /package/dist/ui-library/{p-1d5ee1a0.entry.js.map → p-77424c6b.entry.js.map} +0 -0
  337. /package/dist/ui-library/{p-13b43e04.entry.js.map → p-7d00de3a.entry.js.map} +0 -0
  338. /package/dist/ui-library/{p-cdaed936.entry.js.map → p-7e9257f3.entry.js.map} +0 -0
  339. /package/dist/ui-library/{p-7e3ad38a.entry.js.map → p-93a9b693.entry.js.map} +0 -0
  340. /package/dist/ui-library/{p-5af44076.entry.js.map → p-94bd8347.entry.js.map} +0 -0
  341. /package/dist/ui-library/{p-ee950ce2.entry.js.map → p-9bec3e14.entry.js.map} +0 -0
  342. /package/dist/ui-library/{p-9b354f5d.entry.js.map → p-a15928c4.entry.js.map} +0 -0
  343. /package/dist/ui-library/{p-cba69e9d.entry.js.map → p-a4348ad4.entry.js.map} +0 -0
  344. /package/dist/ui-library/{p-7afafb9d.entry.js.map → p-acd3ecfd.entry.js.map} +0 -0
  345. /package/dist/ui-library/{p-f1dc3a88.entry.js.map → p-ae383f66.entry.js.map} +0 -0
  346. /package/dist/ui-library/{p-3f1a5ecb.entry.js.map → p-b3a14438.entry.js.map} +0 -0
  347. /package/dist/ui-library/{p-dfed33c5.entry.js.map → p-b42fd9c3.entry.js.map} +0 -0
  348. /package/dist/ui-library/{p-c03ebf7d.entry.js.map → p-b906a605.entry.js.map} +0 -0
  349. /package/dist/ui-library/{p-ac099e6b.entry.js.map → p-b97764a1.entry.js.map} +0 -0
  350. /package/dist/ui-library/{p-b351f889.entry.js.map → p-c75694df.entry.js.map} +0 -0
  351. /package/dist/ui-library/{p-b6f47c9d.entry.js.map → p-cb32f8d2.entry.js.map} +0 -0
  352. /package/dist/ui-library/{p-a0f290d0.entry.js.map → p-cd3281fb.entry.js.map} +0 -0
  353. /package/dist/ui-library/{p-d1bda563.entry.js.map → p-cec8c149.entry.js.map} +0 -0
  354. /package/dist/ui-library/{p-724875b0.entry.js.map → p-d1ba2ad5.entry.js.map} +0 -0
  355. /package/dist/ui-library/{p-346f9557.entry.js.map → p-d2196113.entry.js.map} +0 -0
  356. /package/dist/ui-library/{p-a55c7258.entry.js.map → p-df1c4a1f.entry.js.map} +0 -0
  357. /package/dist/ui-library/{p-95fbdd0b.entry.js.map → p-e740215a.entry.js.map} +0 -0
  358. /package/dist/ui-library/{p-e5020f0d.js.map → p-f3fdc121.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"six-timepicker2.js","mappings":";;;;;;;;;AAAA;;;;SAIgB,sBAAsB,CACpC,KAAc,EACd,KAA8B,EAC9B,YAAqC,EACrC,OAAgC,EAChC,cAAsB,EACtB,wBAAiD;EAEjD,IAAI,CAAC,KAAK,IAAI,KAAK,IAAI,IAAI,IAAI,YAAY,IAAI,IAAI,IAAI,OAAO,IAAI,IAAI,EAAE;IACtE,OAAO;GACR;;EAED,MAAM,eAAe,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;EACrD,MAAM,eAAe,GAAG,YAAY,CAAC,qBAAqB,EAAE,CAAC;EAC7D,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC;EACrC,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC;EAErC,MAAM,IAAI,GAAG,uBAAuB,CAAC,YAAY,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;;EAE5E,IAAI,IAAI,IAAI,QAAQ,GAAG,QAAQ,EAAE;;IAE/B,KAAK,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,QAAQ,GAAG,eAAe,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,IAAI,CAAC;GACrF;EACD,wBAAwB,CAAC,IAAI,CAAC,CAAC;AACjC,CAAC;AAED;;;;;SAKgB,0BAA0B,CAAC,KAAmB;;EAE5D,UAAU,CAAC;IACT,IAAI,KAAK,IAAI,IAAI,EAAE;MACjB,OAAO;KACR;IACD,MAAM,eAAe,GAAG,KAAK,CAAC,qBAAqB,EAAE,CAAC;IACtD,IACE,eAAe,CAAC,CAAC,GAAG,CAAC;MACrB,MAAM,CAAC,WAAW,GAAG,eAAe,CAAC,MAAM,GAAG,CAAC;MAC/C,IAAI,CAAC,GAAG,CAAC,eA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CAAC,eAAe,EAAE,EACtB,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,IAC1B,YAAM,IAAI,EAAC,OAAO,IAChB,YAAM,IAAI,EAAC,OAAO,GAAG,CAChB,IACL,IAAI,EACP,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,IAC/B,YAAM,IAAI,EAAC,YAAY,IACrB,YAAM,IAAI,EAAC,YAAY,GAAG,CACrB,IACL,IAAI,CACE,EACX,IAAI,CAAC,IAAI,KACR,WACE,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,EAC9B,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE;QACL,iBAAiB,EAAE,IAAI;QACvB,0BAA0B,EAAE,IAAI,CAAC,SAAS,IAAI,IAAI,GAAG,IAAI,CAAC,SAAS,KAAK,KAAK,GAAG,IAAI,CAAC,gBAAgB;QACrG,8BAA8B,EAAE,IAAI,CAAC,MAAM;OAC5C,OAEG,IAAI,CAAC,UAAU,EAAE,EACpB,IAAI,CAAC,aAAa,EAAE,CACjB,CACP,CACG,EACN;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/utils/popup.ts","src/utils/time.util.ts","src/components/six-timepicker/six-timepicker.scss?tag=six-timepicker&encapsulation=shadow","src/components/six-timepicker/six-timepicker.tsx"],"sourcesContent":["/**\n * If the popup is hoisted we popup is hoisted its position will change to fix to not be clipped of by a containing container.\n * To render the popup correctly we render it normally, and then assign this screenposition to the fixed popup\n */\nexport function adjustPopupForHoisting(\n hoist: boolean,\n popup: HTMLElement | undefined,\n inputElement: HTMLElement | undefined,\n wrapper: HTMLElement | undefined,\n minPopupHeight: number,\n dropdownDirectionChanged: (isUp: boolean) => void\n) {\n if (!hoist || popup == null || inputElement == null || wrapper == null) {\n return;\n }\n // take a snapshot of normally rendered popup\n const popupDimensions = setPopupAsFixPosition(popup);\n const inputDimensions = inputElement.getBoundingClientRect();\n const inputTop = inputDimensions.top;\n const popupTop = popupDimensions.top;\n\n const isUp = calcIsDropDownContentUp(inputElement, wrapper, minPopupHeight);\n // check screen position to check whether the popup should be moved above or below the trigger element\n if (isUp && inputTop < popupTop) {\n // move popup above input field if datepicker is at bottom of screen\n popup.style.top = `${popupTop - popupDimensions.height - inputDimensions.height}px`;\n }\n dropdownDirectionChanged(isUp);\n}\n\n/*\n * For small screens the datepicker popup could be cut-off even though there might still be space within the viewport.\n * This is because the popup is always aligned with the trigger input field. However in the scenario of small screens\n * we should reposition the popup to use the space available.\n */\nexport function adjustPopupForSmallScreens(popup?: HTMLElement) {\n // execute after dropdown has been rendered to make sure the popup reference is correctly set\n setTimeout(() => {\n if (popup == null) {\n return;\n }\n const popupDimensions = popup.getBoundingClientRect();\n if (\n popupDimensions.y < 0 &&\n window.innerHeight - popupDimensions.height > 0 &&\n Math.abs(popupDimensions.y) <= popupDimensions.height\n ) {\n // handle case where popup is cut-off on top but there is still space available\n setPopupAsFixPosition(popup);\n popup.style.top = '0px';\n } else if (\n window.innerHeight < popupDimensions.y + popupDimensions.height &&\n window.innerHeight > popupDimensions.height &&\n Math.abs(popupDimensions.y - window.innerHeight) <= popupDimensions.height\n ) {\n // handle case where popup is cut-off at the bottom but there is still space available above\n // apply screen position to fixed popup\n setPopupAsFixPosition(popup);\n popup.style.top = `${window.innerHeight - popupDimensions.height}px`;\n }\n\n if (\n window.innerWidth < popupDimensions.x + popupDimensions.width &&\n window.innerWidth > popupDimensions.width &&\n Math.abs(popupDimensions.x - window.innerWidth) <= popupDimensions.width\n ) {\n // handle case where popup is cut-off to the right\n setPopupAsFixPosition(popup);\n popup.style.left = `${window.innerWidth - popupDimensions.width}px`;\n }\n }, 0);\n}\n\nexport function calcIsDropDownContentUp(\n inputElement: HTMLElement,\n wrapper: HTMLElement,\n minPopupHeight: number\n): boolean {\n const inputBoundingRect = inputElement.getBoundingClientRect();\n const wrapperBoundingRect = wrapper.getBoundingClientRect();\n const popupHeight = Math.max(wrapperBoundingRect.height, minPopupHeight);\n const moreSpaceInTop = inputBoundingRect.y > window.innerHeight / 2;\n return moreSpaceInTop && window.innerHeight < inputBoundingRect.bottom + popupHeight;\n}\n\nexport function setPopupAsFixPosition(popup: HTMLElement): DOMRect {\n const popupDimensions = popup.getBoundingClientRect();\n popup.style.position = 'fixed';\n popup.style.top = popupDimensions['top'] + 'px';\n popup.style.left = popupDimensions['left'] + 'px';\n popup.style.width = popupDimensions['width'] + 'px';\n popup.style.height = popupDimensions['height'] + 'px';\n return popupDimensions;\n}\n\n/*\n * The position of the hoisted datepicker needs to be correctly calculated since the position changes to fixed.\n * Thus if the user scrolls or adjusts the screen size we need to recalculate the datepicker position.\n */\nexport function movePopup(\n hoist: boolean,\n open: boolean,\n popup: HTMLElement | undefined,\n inputElement: HTMLElement | undefined,\n wrapper: HTMLElement | undefined,\n minPopupHeight: number\n) {\n if (!hoist || !open || popup == null || inputElement == null || wrapper == null) {\n return;\n }\n const popupBoundingClientRect = popup.getBoundingClientRect();\n const popupHeight = popupBoundingClientRect.height;\n const inputBoundingClientRect = inputElement.getBoundingClientRect();\n const inputTop = inputBoundingClientRect.top;\n const inputHeight = inputBoundingClientRect.height;\n\n const isUp = calcIsDropDownContentUp(inputElement, wrapper, minPopupHeight);\n\n if (isUp) {\n popup.style.top = `${inputTop - popupHeight}px`;\n } else {\n popup.style.top = `${inputTop + inputHeight}px`;\n }\n}\n","export type TimePeriod = 'AM' | 'PM';\n\nexport interface Time {\n hours?: number;\n minutes?: number;\n seconds?: number;\n milliseconds?: number;\n has24Hours?: boolean; // true => 24h, false => 12h\n period?: TimePeriod; // only needed for 12-hour clock\n}\n\nexport type TimeProperties = keyof Time;\n\nexport type TimeFormatChar =\n | 'HH' // 24h\n | 'hh' // 12h\n | 'mm' // minutes\n | 'ss' // seconds\n | 'ms' // milliseconds\n | 'aa'; // period (AM/PM)\n\n/*\n * Supported time formats\n */\nexport type TimeFormat =\n | 'HH:mm:ss'\n | 'hh:mm:ss:aa'\n | 'HH:mm:ss:ms'\n | 'hh:mm:ss:ms:aa'\n | 'HH:mm'\n | 'hh:mm:aa'\n | 'HH'\n | 'hh:aa'\n | 'mm'\n | 'ss'\n | 'ms';\n\nexport const getCurrentTimeIn24Hours = (): Time => {\n const now = new Date();\n return {\n hours: now.getHours(),\n minutes: now.getMinutes(),\n seconds: now.getSeconds(),\n milliseconds: now.getMilliseconds(),\n has24Hours: true,\n };\n};\n\nconst HOURS_IN_12_HOUR_CLOCK_FORMAT = 12;\n\nexport const getHoursIn12HourFormat = (hours: number) =>\n hours > HOURS_IN_12_HOUR_CLOCK_FORMAT ? hours - HOURS_IN_12_HOUR_CLOCK_FORMAT : hours;\n\nexport const getCurrentTimeIn12Hours = (): Time => {\n const now = new Date();\n const hours = now.getHours();\n return {\n hours: getHoursIn12HourFormat(hours),\n minutes: now.getMinutes(),\n seconds: now.getSeconds(),\n milliseconds: now.getMilliseconds(),\n has24Hours: false,\n period: hours >= HOURS_IN_12_HOUR_CLOCK_FORMAT ? 'PM' : 'AM',\n };\n};\n\nexport const getCurrentTime = (has24Hours = true): Time => {\n return has24Hours ? getCurrentTimeIn24Hours() : getCurrentTimeIn12Hours();\n};\n\nexport const isValidTimeString = (timeStr: string, format: TimeFormat) => {\n const timeStringParts = timeStr.split(':');\n const timeFormatParts = format.split(':');\n return timeStringParts.length === timeFormatParts.length;\n};\n\nexport const parseTimeString = (timeStr: string, format: TimeFormat): Time => {\n const timeParts = timeStr.split(':');\n const formatParts = format.split(':') as TimeFormatChar[];\n\n if (!isValidTimeString(timeStr, format)) {\n console.error(\n `Timestring did not match expected format.\\nExpected format: ${format}\\nReceived timestring: ${timeStr}`\n );\n }\n\n const time: Time = {};\n\n timeParts.forEach((timeStringPart, i) => {\n const formatStringPart: TimeFormatChar = formatParts[i];\n switch (formatStringPart) {\n case 'HH':\n time.hours = Number(timeStringPart);\n time.has24Hours = true;\n break;\n case 'hh':\n time.hours = Number(timeStringPart);\n time.has24Hours = false;\n break;\n case 'mm':\n time.minutes = Number(timeStringPart);\n break;\n case 'ss':\n time.seconds = Number(timeStringPart);\n break;\n case 'ms':\n time.milliseconds = Number(timeStringPart);\n break;\n case 'aa':\n time.period = timeStringPart.toUpperCase() === 'PM' ? 'PM' : 'AM';\n }\n });\n return time;\n};\n\nexport const createTimeString = (time: Time | undefined, format: TimeFormat): string => {\n if (time == null) {\n return '';\n }\n\n const formatParts = format.split(':') as TimeFormatChar[];\n\n return formatParts\n .map((timeFormatPart) => {\n switch (timeFormatPart) {\n case 'HH':\n case 'hh':\n return String(time.hours).padStart(2, '0');\n case 'mm':\n return String(time.minutes).padStart(2, '0');\n case 'ss':\n return String(time.seconds).padStart(2, '0');\n case 'ms':\n return String(time.milliseconds).padStart(3, '0');\n case 'aa':\n return String(time.period);\n }\n })\n .join(':');\n};\n","@import 'src/global/component';\n\n:host {\n display: block;\n font-family: var(--six-font-family);\n}\n\n.timepicker {\n &_clear {\n display: inline-flex;\n align-items: center;\n font-size: inherit;\n color: var(--six-input-icon-color);\n border: none;\n background: none;\n padding: 0;\n transition: var(--six-transition-fast) color;\n cursor: pointer;\n\n &:hover {\n color: var(--six-input-icon-color-hover);\n }\n\n &:focus {\n outline: none;\n }\n\n &--right {\n right: 0;\n position: absolute;\n }\n\n &--left {\n right: 35px;\n position: absolute;\n }\n }\n\n &__container {\n position: relative;\n }\n\n &__popup {\n display: flex;\n justify-content: center;\n min-width: min-content;\n min-height: 145px;\n background-color: white;\n padding: 0.5em 0.5em 1.5em;\n box-shadow: 0 2px 4px -1px rgb(0 0 0 / 20%), 0 4px 5px 0 rgb(0 0 0 / 14%), 0 1px 10px 0 rgb(0 0 0 / 12%);\n user-select: none;\n position: absolute;\n z-index: var(--six-z-index-dropdown);\n right: 0;\n left: 0;\n\n &--is-up {\n bottom: 100%;\n }\n\n &--is-inline {\n position: initial;\n box-shadow: none;\n border: 1px solid var(--six-color-web-rock-400);\n }\n }\n\n &__separator {\n display: flex;\n align-items: center;\n }\n\n &__item {\n &--wide {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n }\n }\n}\n\n.input--empty .timepicker_clear {\n visibility: hidden;\n}\n\n.input--hide {\n display: none;\n}\n\n// Icon position\n.prefix {\n cursor: pointer;\n\n &--right {\n right: 0;\n display: inline-flex;\n position: absolute;\n font-size: inherit;\n color: var(--six-input-icon-color);\n border: none;\n background: none;\n margin-right: var(--six-input-spacing-medium);\n transition: var(--six-transition-fast) color;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport { ItemPickerType } from '../six-item-picker/types';\nimport {\n createTimeString,\n getCurrentTime,\n isValidTimeString,\n parseTimeString,\n Time,\n TimeFormat,\n TimeProperties,\n} from '../../utils/time.util';\nimport { debounce, DEFAULT_DEBOUNCE_FAST, DEFAULT_DEBOUNCE_INSANELY_FAST } from '../../utils/execution-control';\nimport { SixItemPickerChangePayload } from '../six-item-picker/six-item-picker';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { adjustPopupForHoisting, movePopup } from '../../utils/popup';\n\nexport interface SixTimepickerChange {\n value?: Time;\n valueAsString: string;\n changedProperty?: string;\n}\n\ninterface SixTimeUnitPickerParams {\n min?: number;\n max?: number;\n items?: string[];\n type?: ItemPickerType;\n class?: string;\n paddingLength?: number;\n propertyName: TimeProperties;\n}\n\nconst MIN_POPUP_HEIGHT = 145;\n\n/**\n * @since 2.0.0\n * @status experimental\n *\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n *\n * @part input - The input field\n * @part container - The container of whole component\n * @part popup - The popup of the timepicker component\n *\n */\n@Component({\n tag: 'six-timepicker',\n styleUrl: 'six-timepicker.scss',\n shadow: true,\n})\nexport class SixTimepicker {\n private eventListeners = new EventListeners();\n private popup?: HTMLElement;\n private wrapper?: HTMLElement;\n private inputElement?: HTMLSixInputElement;\n\n @Element() host!: HTMLSixTimepickerElement;\n\n /**\n * Define the time format. Valid formats are:\n *\n * HH:mm:ss\n * hh:mm:ss:aa\n * HH:mm:ss:ms\n * hh:mm:ss:ms:aa\n * HH:mm\n * hh:mm:aa\n * HH\n * hh:aa\n * mm\n * ss\n * ms\n *\n * where HH is the 24 hour format\n * and hh is the 12 hour format\n *\n * Please notice that when using the 12-hour-clock (hh)\n * you always need a period indicator (aa). So the time can be parsed as either am or pm\n * */\n @Prop() format: TimeFormat = 'HH:mm:ss';\n\n /**\n * Define the separator to be shown between the time unit pickers.\n * Please be aware that this property will modify the displayed separator only.\n * The separator for a timestring is always expected to be a colon (eg. '13:52:20')\n * */\n @Prop() separator = ':';\n\n /**\n * The value of the timepicker provided as a string. The string mast match the provided format (or default format)\n */\n @Prop({ mutable: true }) value = '';\n\n /** Indicates whether the timepicker dropdown is open on startup. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** Indicates whether the timepicker should be shown as an inline (always open) component */\n @Prop({ reflect: true }) inline = false;\n\n /**\n * If `true` the user can only select a time via the timepicker but not directly edit the input field.\n */\n @Prop() readonly = false;\n\n /**\n * If `true` the component is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * The enforced placement of the dropdown panel.\n */\n @Prop() placement?: 'top' | 'bottom';\n\n /** Timepicker size. */\n @Prop() size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /**\n * The placeholder defines what text to be shown on the input element\n */\n @Prop() placeholder?: string;\n\n /** The input's error text. Alternatively, you can use the error-text slot. */\n @Prop() errorText: string | string[] = '';\n\n /** The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1 */\n @Prop() errorTextCount?: number;\n\n /** The input's label. Alternatively, you can use the label slot. */\n @Prop() label = '';\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n /** The input's name attribute. */\n @Prop({ reflect: true }) name = '';\n\n /** Set to true to add a clear button when the input is populated. */\n @Prop() clearable = false;\n\n /** Set the position of the icon */\n @Prop() iconPosition: 'left' | 'right' = 'left';\n\n /**\n * Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n * `overflow: auto|scroll`.\n */\n @Prop() hoist = false;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger faster switching between timeunits (e.g. hours).\n */\n @Prop() timeout = DEFAULT_DEBOUNCE_FAST;\n\n /**\n * Set the amount of time, in milliseconds, to wait between switching to next timeunit (e.g. next hour) when mouse button is held pressed.\n */\n @Prop() interval = DEFAULT_DEBOUNCE_INSANELY_FAST;\n\n /**\n * The defaultTime defines the default setting for the timepicker when you open the popup. Default time must match the provided format.\n */\n @Prop() defaultTime?: string;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `six-timepicker-change-debounced` event.\n * If you want your change debounce event to not trigger when keeping the nav button pressed before, make sure debounce\n * is a bit bigger than timeout, otherwise keeping the button pressed will trigger the event twice: once you click\n * (and keep pressed) and once you release\n */\n @Prop() debounce = DEFAULT_DEBOUNCE_FAST;\n\n /**\n * Emitted when the timepicker's value changes\n */\n @Event({ eventName: 'six-timepicker-change' }) sixChange!: EventEmitter<SixTimepickerChange>;\n\n /**\n * Emitted when the timepicker's value changes, but debounced\n */\n @Event({ eventName: 'six-timepicker-change-debounced' }) sixChangeDebounced!: EventEmitter<SixTimepickerChange>;\n\n /**\n * Emitted when the clear button is activated.\n */\n @Event({ eventName: 'six-timepicker-clear' }) sixClear!: EventEmitter<EmptyPayload>;\n\n @State() isPopupContentUp = false;\n\n @State() isDropDownContentUp = false;\n\n @Listen('resize', { target: 'window' })\n async resizeHandler() {\n this.calcIsPopupContentUp();\n this.moveOpenHoistedPopup();\n }\n\n @Listen('scroll', { target: 'window' })\n async scrollHandler() {\n this.calcIsPopupContentUp();\n this.moveOpenHoistedPopup();\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n this.updateValue();\n }\n\n /** Sets focus on the datepickers input. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.inputElement?.setFocus(options);\n }\n\n /*\n * Internally the six-timepicker uses a standardized representation of time, so we don't have a mess,\n * when switching between formats\n */\n @State() private popupValue: Time = {};\n\n connectedCallback() {\n this.eventListeners.forward('six-timepicker-change', 'change', this.host);\n }\n\n componentWillLoad() {\n this.updateValue();\n\n if (this.inline) {\n this.open = true;\n }\n\n if (this.open) {\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n }\n }\n\n componentDidLoad() {\n if (this.inputElement == null) return;\n const inputElement = this.inputElement;\n\n // emit debounced change event\n this.eventListeners.add(\n this.host,\n 'six-timepicker-change',\n debounce((event: Event) => this.sixChangeDebounced.emit((event as CustomEvent).detail), this.debounce)\n );\n\n // update value and popup value based on input-element value\n this.eventListeners.add(\n inputElement,\n 'six-input-input',\n debounce((event: Event) => {\n event.stopPropagation();\n\n // emit empty event if time string is invalid\n if (!isValidTimeString(inputElement.value, this.format)) {\n this.value = inputElement.value;\n this.sixChange.emit({\n value: {},\n valueAsString: '',\n });\n return;\n }\n\n // update value and popup value, and emit the new value\n this.value = inputElement.value;\n this.popupValue = parseTimeString(inputElement.value, this.format);\n this.sixChange.emit({\n value: this.popupValue,\n valueAsString: createTimeString(this.popupValue, this.format),\n });\n }, this.debounce)\n );\n }\n\n componentDidRender() {\n adjustPopupForHoisting(\n this.hoist,\n this.popup,\n this.inputElement,\n this.wrapper,\n MIN_POPUP_HEIGHT,\n (isUp) => (this.isDropDownContentUp = isUp)\n );\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n }\n private updateValue() {\n // normalize value\n if (typeof this.value !== 'string' || !isValidTimeString(this.value, this.format)) {\n this.value = '';\n }\n\n // update popup value\n if (this.value === '') {\n if (this.defaultTime == null) {\n this.popupValue = getCurrentTime(this.is24HourClock());\n } else {\n this.popupValue = parseTimeString(this.defaultTime, this.format);\n }\n } else {\n this.popupValue = parseTimeString(this.value, this.format);\n }\n }\n\n private calcIsPopupContentUp() {\n if (this.inputElement == null || this.wrapper == null) {\n return;\n }\n\n const inputBoundingRect = this.inputElement.getBoundingClientRect();\n const wrapperBoundingRect = this.wrapper.getBoundingClientRect();\n const minPopupHeight = Math.max(wrapperBoundingRect.height, MIN_POPUP_HEIGHT);\n\n const moreSpaceInTop = inputBoundingRect.y > window.innerHeight / 2;\n this.isPopupContentUp = moreSpaceInTop && window.innerHeight < inputBoundingRect.bottom + minPopupHeight;\n }\n\n private moveOpenHoistedPopup() {\n movePopup(this.hoist, this.open, this.popup, this.inputElement, this.wrapper, MIN_POPUP_HEIGHT);\n }\n\n private handlePickerChange = (event: CustomEvent<SixItemPickerChangePayload>, property: TimeProperties) => {\n // stop propagation, since the timepicker should not expose the events of the underlying item-picker\n event.stopPropagation();\n if (this.popupValue == null) {\n return;\n }\n\n // update the internal state\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.popupValue[property] = event.detail;\n\n const timeString = createTimeString(this.popupValue, this.format);\n\n // update the input value\n this.value = timeString;\n\n // emit change event\n this.sixChange.emit({\n changedProperty: property,\n value: this.popupValue,\n valueAsString: timeString,\n });\n };\n\n private getSixTimeUnitPicker(params: SixTimeUnitPickerParams) {\n return (\n <six-item-picker\n class={params.class}\n timeout={this.timeout}\n interval={this.interval}\n padded\n min={params.min}\n max={params.max}\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n value={this.popupValue[params.propertyName]}\n items={params.items}\n type={params.type || ItemPickerType.NUMBER}\n padding-length={params.paddingLength}\n onSix-item-picker-change={(event) => this.handlePickerChange(event, params.propertyName)}\n ></six-item-picker>\n );\n }\n\n private getHour24Picker() {\n if (!this.is24HourClock()) {\n return;\n }\n return this.getSixTimeUnitPicker({ min: 0, max: 23, propertyName: 'hours' });\n }\n\n private is24HourClock() {\n return this.format.includes('HH');\n }\n\n private getHour12Picker() {\n if (!this.is12HourClock()) {\n return;\n }\n return this.getSixTimeUnitPicker({ min: 0, max: 11, propertyName: 'hours' });\n }\n\n private is12HourClock() {\n return this.format.includes('hh');\n }\n\n private getAmPmPicker() {\n if (!this.is12HourClock()) {\n return;\n }\n const items = ['AM', 'PM'];\n return this.getSixTimeUnitPicker({\n items,\n type: ItemPickerType.CUSTOM,\n propertyName: 'period',\n });\n }\n\n private getMinutePicker() {\n if (!this.format.includes('mm')) {\n return;\n }\n\n return this.getSixTimeUnitPicker({ min: 0, max: 59, propertyName: 'minutes' });\n }\n\n private getSecondsPicker() {\n if (!this.format.includes('ss')) {\n return;\n }\n\n return this.getSixTimeUnitPicker({ min: 0, max: 59, propertyName: 'seconds' });\n }\n\n private getMillisecondsPicker() {\n if (!this.format.includes('ms')) {\n return;\n }\n\n return this.getSixTimeUnitPicker({\n min: 0,\n max: 999,\n class: 'timepicker__item--wide',\n paddingLength: 3,\n propertyName: 'milliseconds',\n });\n }\n\n private getSeparator() {\n return (\n <div class=\"timepicker__separator\">\n <span>{this.separator}</span>\n </div>\n );\n }\n\n private getContent() {\n const elementsInOrder = [\n this.getHour24Picker(),\n this.getHour12Picker(),\n this.getMinutePicker(),\n this.getSecondsPicker(),\n this.getMillisecondsPicker(),\n ];\n\n const visibleElements = elementsInOrder.filter((el) => el !== undefined);\n\n return visibleElements.map((el, idx) => {\n if (idx === visibleElements.length - 1) {\n return [el];\n }\n\n return [el, this.getSeparator()];\n });\n }\n\n private openPopup() {\n if (!this.open && !this.disabled) {\n this.open = true;\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n }\n }\n\n private closePopup() {\n if (this.inline) {\n return;\n }\n\n this.open = false;\n this.eventListeners.remove(document, 'mousedown', this.handleDocumentMouseDown);\n }\n\n private handleDocumentMouseDown = (event: Event) => {\n // Close when clicking outside the containing element\n const path = event.composedPath() as EventTarget[];\n if (!path.includes(this.host)) {\n this.closePopup();\n return;\n }\n };\n\n private handleClearClick = (event: MouseEvent) => {\n event.stopPropagation();\n this.value = '';\n this.sixClear.emit();\n this.sixChange.emit({\n value: {},\n valueAsString: '',\n });\n };\n\n private renderClearable() {\n return (\n this.clearable && (\n <button\n slot=\"suffix\"\n class={{\n timepicker_clear: true,\n 'timepicker_clear--right': this.iconPosition === 'left',\n 'timepicker_clear--left': this.iconPosition === 'right',\n }}\n type=\"button\"\n onClick={this.handleClearClick}\n tabindex=\"-1\"\n >\n <six-icon size=\"small\">clear</six-icon>\n </button>\n )\n );\n }\n\n private renderCustomIcon() {\n const icon = hasSlot(this.host, 'custom-icon') ? (\n <slot name=\"custom-icon\"></slot>\n ) : (\n <six-icon size={this.size === 'large' ? 'medium' : this.size}>watch_later</six-icon>\n );\n\n return (\n <span\n slot=\"prefix\"\n part=\"icon\"\n class={{\n prefix: true,\n 'prefix--right': this.iconPosition === 'right',\n }}\n >\n {icon}\n </span>\n );\n }\n\n render() {\n return (\n <div part=\"container\" ref={(el) => (this.wrapper = el)} class=\"timepicker__container\">\n <six-input\n ref={(el) => (this.inputElement = el)}\n part=\"input\"\n onClick={() => this.openPopup()}\n value={this.value}\n placeholder={this.placeholder}\n readonly={this.readonly}\n disabled={this.disabled}\n errorTextCount={this.errorTextCount}\n errorText={this.errorText}\n invalid={this.invalid}\n size={this.size}\n name={this.name}\n label={this.label}\n required={this.required}\n class={{\n 'input--empty': this.value === '',\n 'input--hide': this.inline,\n }}\n >\n {this.renderCustomIcon()}\n {this.renderClearable()}\n {hasSlot(this.host, 'label') ? (\n <span slot=\"label\">\n <slot name=\"label\" />\n </span>\n ) : null}\n {hasSlot(this.host, 'error-text') ? (\n <span slot=\"error-text\">\n <slot name=\"error-text\" />\n </span>\n ) : null}\n </six-input>\n {this.open && (\n <div\n ref={(el) => (this.popup = el)}\n part=\"popup\"\n class={{\n timepicker__popup: true,\n 'timepicker__popup--is-up': this.placement == null ? this.placement === 'top' : this.isPopupContentUp,\n 'timepicker__popup--is-inline': this.inline,\n }}\n >\n {...this.getContent()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I,EAAC,OAAO,IAChB,YAAM,IAAI,EAAC,OAAO,GAAG,CAChB,IACL,IAAI,EACP,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,IAC/B,YAAM,IAAI,EAAC,YAAY,IACrB,YAAM,IAAI,EAAC,YAAY,GAAG,CACrB,IACL,IAAI,CACE,EACX,IAAI,CAAC,IAAI,KACR,WACE,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,EAC9B,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE;QACL,iBAAiB,EAAE,IAAI;QACvB,0BAA0B,EAAE,IAAI,CAAC,SAAS,IAAI,IAAI,GAAG,IAAI,CAAC,SAAS,KAAK,KAAK,GAAG,IAAI,CAAC,gBAAgB;QACrG,8BAA8B,EAAE,IAAI,CAAC,MAAM;OAC5C,OAEG,IAAI,CAAC,UAAU,EAAE,EACpB,IAAI,CAAC,aAAa,EAAE,CACjB,CACP,CACG,EACN;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/utils/popup.ts","src/utils/time.util.ts","src/components/six-timepicker/six-timepicker.scss?tag=six-timepicker&encapsulation=shadow","src/components/six-timepicker/six-timepicker.tsx"],"sourcesContent":["/**\n * If the popup is hoisted we popup is hoisted its position will change to fix to not be clipped of by a containing container.\n * To render the popup correctly we render it normally, and then assign this screenposition to the fixed popup\n */\nexport function adjustPopupForHoisting(\n hoist: boolean,\n popup: HTMLElement | undefined,\n inputElement: HTMLElement | undefined,\n wrapper: HTMLElement | undefined,\n minPopupHeight: number,\n dropdownDirectionChanged: (isUp: boolean) => void\n) {\n if (!hoist || popup == null || inputElement == null || wrapper == null) {\n return;\n }\n // take a snapshot of normally rendered popup\n const popupDimensions = setPopupAsFixPosition(popup);\n const inputDimensions = inputElement.getBoundingClientRect();\n const inputTop = inputDimensions.top;\n const popupTop = popupDimensions.top;\n\n const isUp = calcIsDropDownContentUp(inputElement, wrapper, minPopupHeight);\n // check screen position to check whether the popup should be moved above or below the trigger element\n if (isUp && inputTop < popupTop) {\n // move popup above input field if datepicker is at bottom of screen\n popup.style.top = `${popupTop - popupDimensions.height - inputDimensions.height}px`;\n }\n dropdownDirectionChanged(isUp);\n}\n\n/*\n * For small screens the datepicker popup could be cut-off even though there might still be space within the viewport.\n * This is because the popup is always aligned with the trigger input field. However in the scenario of small screens\n * we should reposition the popup to use the space available.\n */\nexport function adjustPopupForSmallScreens(popup?: HTMLElement) {\n // execute after dropdown has been rendered to make sure the popup reference is correctly set\n setTimeout(() => {\n if (popup == null) {\n return;\n }\n const popupDimensions = popup.getBoundingClientRect();\n if (\n popupDimensions.y < 0 &&\n window.innerHeight - popupDimensions.height > 0 &&\n Math.abs(popupDimensions.y) <= popupDimensions.height\n ) {\n // handle case where popup is cut-off on top but there is still space available\n setPopupAsFixPosition(popup);\n popup.style.top = '0px';\n } else if (\n window.innerHeight < popupDimensions.y + popupDimensions.height &&\n window.innerHeight > popupDimensions.height &&\n Math.abs(popupDimensions.y - window.innerHeight) <= popupDimensions.height\n ) {\n // handle case where popup is cut-off at the bottom but there is still space available above\n // apply screen position to fixed popup\n setPopupAsFixPosition(popup);\n popup.style.top = `${window.innerHeight - popupDimensions.height}px`;\n }\n\n if (\n window.innerWidth < popupDimensions.x + popupDimensions.width &&\n window.innerWidth > popupDimensions.width &&\n Math.abs(popupDimensions.x - window.innerWidth) <= popupDimensions.width\n ) {\n // handle case where popup is cut-off to the right\n setPopupAsFixPosition(popup);\n popup.style.left = `${window.innerWidth - popupDimensions.width}px`;\n }\n }, 0);\n}\n\nexport function calcIsDropDownContentUp(\n inputElement: HTMLElement,\n wrapper: HTMLElement,\n minPopupHeight: number\n): boolean {\n const inputBoundingRect = inputElement.getBoundingClientRect();\n const wrapperBoundingRect = wrapper.getBoundingClientRect();\n const popupHeight = Math.max(wrapperBoundingRect.height, minPopupHeight);\n const moreSpaceInTop = inputBoundingRect.y > window.innerHeight / 2;\n return moreSpaceInTop && window.innerHeight < inputBoundingRect.bottom + popupHeight;\n}\n\nexport function setPopupAsFixPosition(popup: HTMLElement): DOMRect {\n const popupDimensions = popup.getBoundingClientRect();\n popup.style.position = 'fixed';\n popup.style.top = popupDimensions['top'] + 'px';\n popup.style.left = popupDimensions['left'] + 'px';\n popup.style.width = popupDimensions['width'] + 'px';\n popup.style.height = popupDimensions['height'] + 'px';\n return popupDimensions;\n}\n\n/*\n * The position of the hoisted datepicker needs to be correctly calculated since the position changes to fixed.\n * Thus if the user scrolls or adjusts the screen size we need to recalculate the datepicker position.\n */\nexport function movePopup(\n hoist: boolean,\n open: boolean,\n popup: HTMLElement | undefined,\n inputElement: HTMLElement | undefined,\n wrapper: HTMLElement | undefined,\n minPopupHeight: number\n) {\n if (!hoist || !open || popup == null || inputElement == null || wrapper == null) {\n return;\n }\n const popupBoundingClientRect = popup.getBoundingClientRect();\n const popupHeight = popupBoundingClientRect.height;\n const inputBoundingClientRect = inputElement.getBoundingClientRect();\n const inputTop = inputBoundingClientRect.top;\n const inputHeight = inputBoundingClientRect.height;\n\n const isUp = calcIsDropDownContentUp(inputElement, wrapper, minPopupHeight);\n\n if (isUp) {\n popup.style.top = `${inputTop - popupHeight}px`;\n } else {\n popup.style.top = `${inputTop + inputHeight}px`;\n }\n}\n","export type TimePeriod = 'AM' | 'PM';\n\nexport interface Time {\n hours?: number;\n minutes?: number;\n seconds?: number;\n milliseconds?: number;\n has24Hours?: boolean; // true => 24h, false => 12h\n period?: TimePeriod; // only needed for 12-hour clock\n}\n\nexport type TimeProperties = keyof Time;\n\nexport type TimeFormatChar =\n | 'HH' // 24h\n | 'hh' // 12h\n | 'mm' // minutes\n | 'ss' // seconds\n | 'ms' // milliseconds\n | 'aa'; // period (AM/PM)\n\n/*\n * Supported time formats\n */\nexport type TimeFormat =\n | 'HH:mm:ss'\n | 'hh:mm:ss:aa'\n | 'HH:mm:ss:ms'\n | 'hh:mm:ss:ms:aa'\n | 'HH:mm'\n | 'hh:mm:aa'\n | 'HH'\n | 'hh:aa'\n | 'mm'\n | 'ss'\n | 'ms';\n\nexport const getCurrentTimeIn24Hours = (): Time => {\n const now = new Date();\n return {\n hours: now.getHours(),\n minutes: now.getMinutes(),\n seconds: now.getSeconds(),\n milliseconds: now.getMilliseconds(),\n has24Hours: true,\n };\n};\n\nconst HOURS_IN_12_HOUR_CLOCK_FORMAT = 12;\n\nexport const getHoursIn12HourFormat = (hours: number) =>\n hours > HOURS_IN_12_HOUR_CLOCK_FORMAT ? hours - HOURS_IN_12_HOUR_CLOCK_FORMAT : hours;\n\nexport const getCurrentTimeIn12Hours = (): Time => {\n const now = new Date();\n const hours = now.getHours();\n return {\n hours: getHoursIn12HourFormat(hours),\n minutes: now.getMinutes(),\n seconds: now.getSeconds(),\n milliseconds: now.getMilliseconds(),\n has24Hours: false,\n period: hours >= HOURS_IN_12_HOUR_CLOCK_FORMAT ? 'PM' : 'AM',\n };\n};\n\nexport const getCurrentTime = (has24Hours = true): Time => {\n return has24Hours ? getCurrentTimeIn24Hours() : getCurrentTimeIn12Hours();\n};\n\nexport const isValidTimeString = (timeStr: string, format: TimeFormat) => {\n const timeStringParts = timeStr.split(':');\n const timeFormatParts = format.split(':');\n return timeStringParts.length === timeFormatParts.length;\n};\n\nexport const parseTimeString = (timeStr: string, format: TimeFormat): Time => {\n const timeParts = timeStr.split(':');\n const formatParts = format.split(':') as TimeFormatChar[];\n\n if (!isValidTimeString(timeStr, format)) {\n console.error(\n `Timestring did not match expected format.\\nExpected format: ${format}\\nReceived timestring: ${timeStr}`\n );\n }\n\n const time: Time = {};\n\n timeParts.forEach((timeStringPart, i) => {\n const formatStringPart: TimeFormatChar = formatParts[i];\n switch (formatStringPart) {\n case 'HH':\n time.hours = Number(timeStringPart);\n time.has24Hours = true;\n break;\n case 'hh':\n time.hours = Number(timeStringPart);\n time.has24Hours = false;\n break;\n case 'mm':\n time.minutes = Number(timeStringPart);\n break;\n case 'ss':\n time.seconds = Number(timeStringPart);\n break;\n case 'ms':\n time.milliseconds = Number(timeStringPart);\n break;\n case 'aa':\n time.period = timeStringPart.toUpperCase() === 'PM' ? 'PM' : 'AM';\n }\n });\n return time;\n};\n\nexport const createTimeString = (time: Time | undefined, format: TimeFormat): string => {\n if (time == null) {\n return '';\n }\n\n const formatParts = format.split(':') as TimeFormatChar[];\n\n return formatParts\n .map((timeFormatPart) => {\n switch (timeFormatPart) {\n case 'HH':\n case 'hh':\n return String(time.hours).padStart(2, '0');\n case 'mm':\n return String(time.minutes).padStart(2, '0');\n case 'ss':\n return String(time.seconds).padStart(2, '0');\n case 'ms':\n return String(time.milliseconds).padStart(3, '0');\n case 'aa':\n return String(time.period);\n }\n })\n .join(':');\n};\n","@import 'src/global/component';\n\n:host {\n display: block;\n font-family: var(--six-font-family);\n}\n\n.timepicker {\n &_clear {\n display: inline-flex;\n align-items: center;\n font-size: inherit;\n color: var(--six-input-icon-color);\n border: none;\n background: none;\n padding: 0;\n transition: var(--six-transition-fast) color;\n cursor: pointer;\n\n &:hover {\n color: var(--six-input-icon-color-hover);\n }\n\n &:focus {\n outline: none;\n }\n\n &--right {\n right: 0;\n position: absolute;\n }\n\n &--left {\n right: 35px;\n position: absolute;\n }\n }\n\n &__container {\n position: relative;\n }\n\n &__popup {\n display: flex;\n justify-content: center;\n min-width: min-content;\n min-height: 145px;\n background-color: white;\n padding: 0.5em 0.5em 1.5em;\n box-shadow: 0 2px 4px -1px rgb(0 0 0 / 20%), 0 4px 5px 0 rgb(0 0 0 / 14%), 0 1px 10px 0 rgb(0 0 0 / 12%);\n user-select: none;\n position: absolute;\n z-index: var(--six-z-index-dropdown);\n right: 0;\n left: 0;\n\n &--is-up {\n bottom: 100%;\n }\n\n &--is-inline {\n position: initial;\n box-shadow: none;\n border: 1px solid var(--six-color-web-rock-400);\n }\n }\n\n &__separator {\n display: flex;\n align-items: center;\n }\n\n &__item {\n &--wide {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n }\n }\n}\n\n.input--empty .timepicker_clear {\n visibility: hidden;\n}\n\n.input--hide {\n display: none;\n}\n\n// Icon position\n.prefix {\n cursor: pointer;\n\n &--right {\n right: 0;\n display: inline-flex;\n position: absolute;\n font-size: inherit;\n color: var(--six-input-icon-color);\n border: none;\n background: none;\n margin-right: var(--six-input-spacing-medium);\n transition: var(--six-transition-fast) color;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport { ItemPickerType } from '../six-item-picker/types';\nimport {\n createTimeString,\n getCurrentTime,\n isValidTimeString,\n parseTimeString,\n Time,\n TimeFormat,\n TimeProperties,\n} from '../../utils/time.util';\nimport { debounce, DEFAULT_DEBOUNCE_FAST, DEFAULT_DEBOUNCE_INSANELY_FAST } from '../../utils/execution-control';\nimport { SixItemPickerChangePayload } from '../six-item-picker/six-item-picker';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { adjustPopupForHoisting, movePopup } from '../../utils/popup';\n\nexport interface SixTimepickerChange {\n value?: Time;\n valueAsString: string;\n changedProperty?: string;\n}\n\ninterface SixTimeUnitPickerParams {\n min?: number;\n max?: number;\n items?: string[];\n type?: ItemPickerType;\n class?: string;\n paddingLength?: number;\n propertyName: TimeProperties;\n}\n\nconst MIN_POPUP_HEIGHT = 145;\n\n/**\n * @since 2.0.0\n * @status experimental\n *\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n *\n * @part input - The input field\n * @part container - The container of whole component\n * @part popup - The popup of the timepicker component\n *\n */\n@Component({\n tag: 'six-timepicker',\n styleUrl: 'six-timepicker.scss',\n shadow: true,\n})\nexport class SixTimepicker {\n private eventListeners = new EventListeners();\n private popup?: HTMLElement;\n private wrapper?: HTMLElement;\n private inputElement?: HTMLSixInputElement;\n\n @Element() host!: HTMLSixTimepickerElement;\n\n /**\n * Define the time format. Valid formats are:\n *\n * HH:mm:ss\n * hh:mm:ss:aa\n * HH:mm:ss:ms\n * hh:mm:ss:ms:aa\n * HH:mm\n * hh:mm:aa\n * HH\n * hh:aa\n * mm\n * ss\n * ms\n *\n * where HH is the 24 hour format\n * and hh is the 12 hour format\n *\n * Please notice that when using the 12-hour-clock (hh)\n * you always need a period indicator (aa). So the time can be parsed as either am or pm\n * */\n @Prop() format: TimeFormat = 'HH:mm:ss';\n\n /**\n * Define the separator to be shown between the time unit pickers.\n * Please be aware that this property will modify the displayed separator only.\n * The separator for a timestring is always expected to be a colon (eg. '13:52:20')\n * */\n @Prop() separator = ':';\n\n /**\n * The value of the timepicker provided as a string. The string mast match the provided format (or default format)\n */\n @Prop({ mutable: true }) value = '';\n\n /** Indicates whether the timepicker dropdown is open on startup. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** Indicates whether the timepicker should be shown as an inline (always open) component */\n @Prop({ reflect: true }) inline = false;\n\n /**\n * If `true` the user can only select a time via the timepicker but not directly edit the input field.\n */\n @Prop() readonly = false;\n\n /**\n * If `true` the component is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * The enforced placement of the dropdown panel.\n */\n @Prop() placement?: 'top' | 'bottom';\n\n /** Timepicker size. */\n @Prop() size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /**\n * The placeholder defines what text to be shown on the input element\n */\n @Prop() placeholder?: string;\n\n /** The input's error text. Alternatively, you can use the error-text slot. */\n @Prop() errorText: string | string[] = '';\n\n /** The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1 */\n @Prop() errorTextCount?: number;\n\n /** The input's label. Alternatively, you can use the label slot. */\n @Prop() label = '';\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n /** The input's name attribute. */\n @Prop({ reflect: true }) name = '';\n\n /** Set to true to add a clear button when the input is populated. */\n @Prop() clearable = false;\n\n /** Set the position of the icon */\n @Prop() iconPosition: 'left' | 'right' = 'left';\n\n /**\n * Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n * `overflow: auto|scroll`.\n */\n @Prop() hoist = false;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger faster switching between timeunits (e.g. hours).\n */\n @Prop() timeout = DEFAULT_DEBOUNCE_FAST;\n\n /**\n * Set the amount of time, in milliseconds, to wait between switching to next timeunit (e.g. next hour) when mouse button is held pressed.\n */\n @Prop() interval = DEFAULT_DEBOUNCE_INSANELY_FAST;\n\n /**\n * The defaultTime defines the default setting for the timepicker when you open the popup. Default time must match the provided format.\n */\n @Prop() defaultTime?: string;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `six-timepicker-change-debounced` event.\n * If you want your change debounce event to not trigger when keeping the nav button pressed before, make sure debounce\n * is a bit bigger than timeout, otherwise keeping the button pressed will trigger the event twice: once you click\n * (and keep pressed) and once you release\n */\n @Prop() debounce = DEFAULT_DEBOUNCE_FAST;\n\n /**\n * Emitted when the timepicker's value changes\n */\n @Event({ eventName: 'six-timepicker-change' }) sixChange!: EventEmitter<SixTimepickerChange>;\n\n /**\n * Emitted when the timepicker's value changes, but debounced\n */\n @Event({ eventName: 'six-timepicker-change-debounced' }) sixChangeDebounced!: EventEmitter<SixTimepickerChange>;\n\n /**\n * Emitted when the clear button is activated.\n */\n @Event({ eventName: 'six-timepicker-clear' }) sixClear!: EventEmitter<EmptyPayload>;\n\n @State() isPopupContentUp = false;\n\n @State() isDropDownContentUp = false;\n\n @Listen('resize', { target: 'window' })\n async resizeHandler() {\n this.calcIsPopupContentUp();\n this.moveOpenHoistedPopup();\n }\n\n @Listen('scroll', { target: 'window' })\n async scrollHandler() {\n this.calcIsPopupContentUp();\n this.moveOpenHoistedPopup();\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n this.updateValue();\n }\n\n /** Sets focus on the datepickers input. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.inputElement?.setFocus(options);\n }\n\n /*\n * Internally the six-timepicker uses a standardized representation of time, so we don't have a mess,\n * when switching between formats\n */\n @State() private popupValue: Time = {};\n\n connectedCallback() {\n this.eventListeners.forward('six-timepicker-change', 'change', this.host);\n }\n\n componentWillLoad() {\n this.updateValue();\n\n if (this.inline) {\n this.open = true;\n }\n\n if (this.open) {\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n }\n }\n\n componentDidLoad() {\n if (this.inputElement == null) return;\n const inputElement = this.inputElement;\n\n // emit debounced change event\n this.eventListeners.add(\n this.host,\n 'six-timepicker-change',\n debounce((event: Event) => this.sixChangeDebounced.emit((event as CustomEvent).detail), this.debounce)\n );\n\n // update value and popup value based on input-element value\n this.eventListeners.add(\n inputElement,\n 'six-input-input',\n debounce((event: Event) => {\n event.stopPropagation();\n\n // emit empty event if time string is invalid\n if (!isValidTimeString(inputElement.value, this.format)) {\n this.value = inputElement.value;\n this.sixChange.emit({\n value: {},\n valueAsString: '',\n });\n return;\n }\n\n // update value and popup value, and emit the new value\n this.value = inputElement.value;\n this.popupValue = parseTimeString(inputElement.value, this.format);\n this.sixChange.emit({\n value: this.popupValue,\n valueAsString: createTimeString(this.popupValue, this.format),\n });\n }, this.debounce)\n );\n }\n\n componentDidRender() {\n adjustPopupForHoisting(\n this.hoist,\n this.popup,\n this.inputElement,\n this.wrapper,\n MIN_POPUP_HEIGHT,\n (isUp) => (this.isDropDownContentUp = isUp)\n );\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n }\n private updateValue() {\n // normalize value\n if (typeof this.value !== 'string' || !isValidTimeString(this.value, this.format)) {\n this.value = '';\n }\n\n // update popup value\n if (this.value === '') {\n if (this.defaultTime == null) {\n this.popupValue = getCurrentTime(this.is24HourClock());\n } else {\n this.popupValue = parseTimeString(this.defaultTime, this.format);\n }\n } else {\n this.popupValue = parseTimeString(this.value, this.format);\n }\n }\n\n private calcIsPopupContentUp() {\n if (this.inputElement == null || this.wrapper == null) {\n return;\n }\n\n const inputBoundingRect = this.inputElement.getBoundingClientRect();\n const wrapperBoundingRect = this.wrapper.getBoundingClientRect();\n const minPopupHeight = Math.max(wrapperBoundingRect.height, MIN_POPUP_HEIGHT);\n\n const moreSpaceInTop = inputBoundingRect.y > window.innerHeight / 2;\n this.isPopupContentUp = moreSpaceInTop && window.innerHeight < inputBoundingRect.bottom + minPopupHeight;\n }\n\n private moveOpenHoistedPopup() {\n movePopup(this.hoist, this.open, this.popup, this.inputElement, this.wrapper, MIN_POPUP_HEIGHT);\n }\n\n private handlePickerChange = (event: CustomEvent<SixItemPickerChangePayload>, property: TimeProperties) => {\n // stop propagation, since the timepicker should not expose the events of the underlying item-picker\n event.stopPropagation();\n if (this.popupValue == null) {\n return;\n }\n\n // update the internal state\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.popupValue[property] = event.detail;\n\n const timeString = createTimeString(this.popupValue, this.format);\n\n // update the input value\n this.value = timeString;\n\n // emit change event\n this.sixChange.emit({\n changedProperty: property,\n value: this.popupValue,\n valueAsString: timeString,\n });\n };\n\n private getSixTimeUnitPicker(params: SixTimeUnitPickerParams) {\n return (\n <six-item-picker\n class={params.class}\n timeout={this.timeout}\n interval={this.interval}\n padded\n min={params.min}\n max={params.max}\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n value={this.popupValue[params.propertyName]}\n items={params.items}\n type={params.type || ItemPickerType.NUMBER}\n padding-length={params.paddingLength}\n onSix-item-picker-change={(event) => this.handlePickerChange(event, params.propertyName)}\n ></six-item-picker>\n );\n }\n\n private getHour24Picker() {\n if (!this.is24HourClock()) {\n return;\n }\n return this.getSixTimeUnitPicker({ min: 0, max: 23, propertyName: 'hours' });\n }\n\n private is24HourClock() {\n return this.format.includes('HH');\n }\n\n private getHour12Picker() {\n if (!this.is12HourClock()) {\n return;\n }\n return this.getSixTimeUnitPicker({ min: 0, max: 11, propertyName: 'hours' });\n }\n\n private is12HourClock() {\n return this.format.includes('hh');\n }\n\n private getAmPmPicker() {\n if (!this.is12HourClock()) {\n return;\n }\n const items = ['AM', 'PM'];\n return this.getSixTimeUnitPicker({\n items,\n type: ItemPickerType.CUSTOM,\n propertyName: 'period',\n });\n }\n\n private getMinutePicker() {\n if (!this.format.includes('mm')) {\n return;\n }\n\n return this.getSixTimeUnitPicker({ min: 0, max: 59, propertyName: 'minutes' });\n }\n\n private getSecondsPicker() {\n if (!this.format.includes('ss')) {\n return;\n }\n\n return this.getSixTimeUnitPicker({ min: 0, max: 59, propertyName: 'seconds' });\n }\n\n private getMillisecondsPicker() {\n if (!this.format.includes('ms')) {\n return;\n }\n\n return this.getSixTimeUnitPicker({\n min: 0,\n max: 999,\n class: 'timepicker__item--wide',\n paddingLength: 3,\n propertyName: 'milliseconds',\n });\n }\n\n private getSeparator() {\n return (\n <div class=\"timepicker__separator\">\n <span>{this.separator}</span>\n </div>\n );\n }\n\n private getContent() {\n const elementsInOrder = [\n this.getHour24Picker(),\n this.getHour12Picker(),\n this.getMinutePicker(),\n this.getSecondsPicker(),\n this.getMillisecondsPicker(),\n ];\n\n const visibleElements = elementsInOrder.filter((el) => el !== undefined);\n\n return visibleElements.map((el, idx) => {\n if (idx === visibleElements.length - 1) {\n return [el];\n }\n\n return [el, this.getSeparator()];\n });\n }\n\n private openPopup() {\n if (!this.open && !this.disabled) {\n this.open = true;\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n }\n }\n\n private closePopup() {\n if (this.inline) {\n return;\n }\n\n this.open = false;\n this.eventListeners.remove(document, 'mousedown', this.handleDocumentMouseDown);\n }\n\n private handleDocumentMouseDown = (event: Event) => {\n // Close when clicking outside the containing element\n const path = event.composedPath() as EventTarget[];\n if (!path.includes(this.host)) {\n this.closePopup();\n return;\n }\n };\n\n private handleClearClick = (event: MouseEvent) => {\n event.stopPropagation();\n this.value = '';\n this.sixClear.emit();\n this.sixChange.emit({\n value: {},\n valueAsString: '',\n });\n };\n\n private renderClearable() {\n return (\n this.clearable && (\n <button\n slot=\"suffix\"\n class={{\n timepicker_clear: true,\n 'timepicker_clear--right': this.iconPosition === 'left',\n 'timepicker_clear--left': this.iconPosition === 'right',\n }}\n type=\"button\"\n onClick={this.handleClearClick}\n tabindex=\"-1\"\n >\n <six-icon size=\"small\">clear</six-icon>\n </button>\n )\n );\n }\n\n private renderCustomIcon() {\n const icon = hasSlot(this.host, 'custom-icon') ? (\n <slot name=\"custom-icon\"></slot>\n ) : (\n <six-icon size={this.size === 'large' ? 'medium' : this.size}>watch_later</six-icon>\n );\n\n return (\n <span\n slot=\"prefix\"\n part=\"icon\"\n class={{\n prefix: true,\n 'prefix--right': this.iconPosition === 'right',\n }}\n >\n {icon}\n </span>\n );\n }\n\n render() {\n return (\n <div part=\"container\" ref={(el) => (this.wrapper = el)} class=\"timepicker__container\">\n <six-input\n ref={(el) => (this.inputElement = el)}\n part=\"input\"\n onClick={() => this.openPopup()}\n value={this.value}\n placeholder={this.placeholder}\n readonly={this.readonly}\n disabled={this.disabled}\n errorTextCount={this.errorTextCount}\n errorText={this.errorText}\n invalid={this.invalid}\n size={this.size}\n name={this.name}\n label={this.label}\n required={this.required}\n class={{\n 'input--empty': this.value === '',\n 'input--hide': this.inline,\n }}\n >\n {this.renderCustomIcon()}\n {this.renderClearable()}\n {hasSlot(this.host, 'label') ? (\n <span slot=\"label\">\n <slot name=\"label\" />\n </span>\n ) : null}\n {hasSlot(this.host, 'error-text') ? (\n <span slot=\"error-text\">\n <slot name=\"error-text\" />\n </span>\n ) : null}\n </six-input>\n {this.open && (\n <div\n ref={(el) => (this.popup = el)}\n part=\"popup\"\n class={{\n timepicker__popup: true,\n 'timepicker__popup--is-up': this.placement == null ? this.placement === 'top' : this.isPopupContentUp,\n 'timepicker__popup--is-inline': this.inline,\n }}\n >\n {...this.getContent()}\n {this.getAmPmPicker()}\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
@@ -171,6 +171,8 @@ const SixTooltip = /*@__PURE__*/ proxyCustomElement(class SixTooltip extends HTM
171
171
  "trigger": [1],
172
172
  "show": [64],
173
173
  "hide": [64]
174
+ }, undefined, {
175
+ "open": ["handleOpenChange"]
174
176
  }]);
175
177
  function defineCustomElement() {
176
178
  if (typeof customElements === "undefined") {
@@ -1 +1 @@
1
- {"file":"six-tooltip2.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,uxHAAuxH;;ACI7yH,IAAI,EAAE,GAAG,CAAC,CAAC;MAmBE,UAAU;;;;;;;;;IACb,gBAAW,GAAG,WAAW,EAAE,EAAE,EAAE,CAAC;IAChC,cAAS,GAAG,KAAK,CAAC;IAmJlB,eAAU,GAAG;MACnB,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;QAC5B,IAAI,CAAC,IAAI,EAAE,CAAC;OACb;KACF,CAAC;IAEM,gBAAW,GAAG;MACpB,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;OACvC;KACF,CAAC;IAEM,gBAAW,GAAG;MACpB,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;QAC5B,IAAI,CAAC,IAAI,EAAE,CAAC;OACb;KACF,CAAC;IAEM,kBAAa,GAAG,CAAC,KAAoB;;MAE3C,IAAI,IAAI,CAAC,IAAI,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,EAAE;QACvC,KAAK,CAAC,eAAe,EAAE,CAAC;QACxB,IAAI,CAAC,IAAI,EAAE,CAAC;OACb;KACF,CAAC;IAEM,oBAAe,GAAG;MACxB,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;QAC5B,IAAI,CAAC,IAAI,EAAE,CAAC;OACb;KACF,CAAC;IAEM,mBAAc,GAAG;MACvB,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;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AAI,CAAC,eAAe,EAAE,UAAU,EAAE,IAAI,CAAC,cAAc,IACrG,YAAM,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,EAC7C,WAAK,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC,EAAE,KAAK,EAAC,oBAAoB,IACzE,WACE,IAAI,EAAC,MAAM,EACX,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,EAChC,EAAE,EAAE,IAAI,CAAC,WAAW,EACpB,KAAK,EAAE;QACL,OAAO,EAAE,IAAI;QACb,eAAe,EAAE,IAAI,CAAC,IAAI;OAC3B,EACD,IAAI,EAAC,SAAS,iBACD,IAAI,CAAC,IAAI,GAAG,OAAO,GAAG,MAAM,IAEzC,YAAM,IAAI,EAAC,SAAS,IAAE,IAAI,CAAC,OAAO,CAAQ,CACtC,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/six-tooltip/six-tooltip.scss?tag=six-tooltip&encapsulation=shadow","src/components/six-tooltip/six-tooltip.tsx"],"sourcesContent":["@import 'src/global/component';\n\n/**\n * @prop --hide-delay: The amount of time to wait before hiding the tooltip.\n * @prop --hide-duration: The amount of time the hide transition takes to complete.\n * @prop --hide-timing-function: The timing function (easing) to use for the hide transition.\n * @prop --max-width: The maximum width of the tooltip.\n * @prop --show-delay: The amount of time to wait before showing the tooltip.\n * @prop --show-duration: The amount of time the show transition takes to complete.\n * @prop --show-timing-function: The timing function (easing) to use for the show transition.\n */\n:host {\n --max-width: 20rem;\n --hide-delay: 0s;\n --hide-duration: 0.125s;\n --hide-timing-function: ease;\n --show-delay: 0.125s;\n --show-duration: 0.125s;\n --show-timing-function: ease;\n\n display: contents;\n}\n\n.tooltip-positioner {\n position: fixed;\n z-index: var(--six-z-index-tooltip);\n pointer-events: none;\n}\n\n.tooltip {\n max-width: var(--max-width);\n border-radius: var(--six-border-radius-medium);\n background-color: var(--six-tooltip-background-color);\n font-family: var(--six-font-family);\n font-size: var(--six-tooltip-font-size);\n font-weight: var(--six-tooltip-font-weight);\n line-height: var(--six-tooltip-line-height);\n color: var(--six-tooltip-color);\n opacity: 0;\n padding: var(--six-spacing-xxx-small) var(--six-spacing-x-small);\n transform: scale(0.8);\n transform-origin: bottom;\n transition-property: opacity, transform;\n transition-delay: var(--hide-delay);\n transition-duration: var(--hide-duration);\n transition-timing-function: var(--hide-timing-function);\n\n &::after {\n content: '';\n position: absolute;\n width: 0;\n height: 0;\n }\n}\n\n.tooltip-positioner {\n &[data-popper-placement^='top'] .tooltip {\n transform-origin: bottom;\n }\n\n &[data-popper-placement^='bottom'] .tooltip {\n transform-origin: top;\n }\n\n &[data-popper-placement^='left'] .tooltip {\n transform-origin: right;\n }\n\n &[data-popper-placement^='right'] .tooltip {\n transform-origin: left;\n }\n\n &.popover-visible .tooltip {\n opacity: 1;\n transform: none;\n transition-delay: var(--show-delay);\n transition-duration: var(--show-duration);\n transition-timing-function: var(--show-timing-function);\n }\n}\n\n// Arrow + bottom\n.tooltip-positioner[data-popper-placement^='bottom'] .tooltip::after {\n bottom: 100%;\n left: calc(50% - var(--six-tooltip-arrow-size));\n border-bottom: var(--six-tooltip-arrow-size) solid var(--six-tooltip-background-color);\n border-left: var(--six-tooltip-arrow-size) solid transparent;\n border-right: var(--six-tooltip-arrow-size) solid transparent;\n}\n\n.tooltip-positioner[data-popper-placement='bottom-start'] .tooltip::after {\n left: var(--six-tooltip-arrow-start-end-offset);\n}\n\n.tooltip-positioner[data-popper-placement='bottom-end'] .tooltip::after {\n right: var(--six-tooltip-arrow-start-end-offset);\n left: auto;\n}\n\n// Arrow + top\n.tooltip-positioner[data-popper-placement^='top'] .tooltip::after {\n top: 100%;\n left: calc(50% - var(--six-tooltip-arrow-size));\n border-top: var(--six-tooltip-arrow-size) solid var(--six-tooltip-background-color);\n border-left: var(--six-tooltip-arrow-size) solid transparent;\n border-right: var(--six-tooltip-arrow-size) solid transparent;\n}\n\n.tooltip-positioner[data-popper-placement='top-start'] .tooltip::after {\n left: var(--six-tooltip-arrow-start-end-offset);\n}\n\n.tooltip-positioner[data-popper-placement='top-end'] .tooltip::after {\n right: var(--six-tooltip-arrow-start-end-offset);\n left: auto;\n}\n\n// Arrow + left\n.tooltip-positioner[data-popper-placement^='left'] .tooltip::after {\n top: calc(50% - var(--six-tooltip-arrow-size));\n left: 100%;\n border-left: var(--six-tooltip-arrow-size) solid var(--six-tooltip-background-color);\n border-top: var(--six-tooltip-arrow-size) solid transparent;\n border-bottom: var(--six-tooltip-arrow-size) solid transparent;\n}\n\n.tooltip-positioner[data-popper-placement='left-start'] .tooltip::after {\n top: var(--six-tooltip-arrow-start-end-offset);\n}\n\n.tooltip-positioner[data-popper-placement='left-end'] .tooltip::after {\n top: auto;\n bottom: var(--six-tooltip-arrow-start-end-offset);\n}\n\n// Arrow + right\n.tooltip-positioner[data-popper-placement^='right'] .tooltip::after {\n top: calc(50% - var(--six-tooltip-arrow-size));\n right: 100%;\n border-right: var(--six-tooltip-arrow-size) solid var(--six-tooltip-background-color);\n border-top: var(--six-tooltip-arrow-size) solid transparent;\n border-bottom: var(--six-tooltip-arrow-size) solid transparent;\n}\n\n.tooltip-positioner[data-popper-placement='right-start'] .tooltip::after {\n top: var(--six-tooltip-arrow-start-end-offset);\n}\n\n.tooltip-positioner[data-popper-placement='right-end'] .tooltip::after {\n top: auto;\n bottom: var(--six-tooltip-arrow-start-end-offset);\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from '@stencil/core';\nimport Popover from '../../utils/popover';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The tooltip's target element. Only the first element will be used as the target.\n * @slot content - The tooltip's content. Alternatively, you can use the content prop.\n *\n * @part base - The component's base wrapper.\n */\n\n@Component({\n tag: 'six-tooltip',\n styleUrl: 'six-tooltip.scss',\n shadow: true,\n})\nexport class SixTooltip {\n private componentId = `tooltip-${++id}`;\n private isVisible = false;\n private popover?: Popover;\n private tooltipPositioner?: HTMLElement;\n private target?: HTMLElement;\n private tooltip?: HTMLElement;\n\n @Element() host!: HTMLSixTooltipElement;\n\n /** The tooltip's content. Alternatively, you can use the content slot. */\n @Prop() content = '';\n\n /**\n * The preferred placement of the tooltip. Note that the actual placement may vary as needed to keep the tooltip\n * inside the viewport.\n */\n @Prop() placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'top';\n\n /** Set to true to disable the tooltip, so it won't show when triggered. */\n @Prop() disabled = false;\n\n /** The distance in pixels from which to offset the tooltip away from its target. */\n @Prop() distance = 10;\n\n /** Indicates whether the tooltip is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** The distance in pixels from which to offset the tooltip along its target. */\n @Prop() skidding = 0;\n\n /**\n * Controls how the tooltip is activated. Possible options include `click`, `hover`, `focus`, and `manual`. Multiple\n * options can be passed by separating them with a space. When manual is used, the tooltip must be activated\n * programmatically.\n */\n @Prop() trigger = 'hover focus';\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n }\n\n /** Emitted when the tooltip begins to show. Calling `event.preventDefault()` will prevent it from being shown. */\n @Event({ eventName: 'six-tooltip-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the tooltip has shown and all transitions are complete. */\n @Event({ eventName: 'six-tooltip-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the tooltip begins to hide. Calling `event.preventDefault()` will prevent it from being hidden. */\n @Event({ eventName: 'six-tooltip-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the tooltip has hidden and all transitions are complete. */\n @Event({ eventName: 'six-tooltip-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n componentDidLoad() {\n if (this.tooltipPositioner == null) return;\n this.target = this.getTarget();\n this.popover = new Popover(this.target, this.tooltipPositioner, { strategy: 'fixed' });\n this.syncOptions();\n\n this.host.addEventListener('blur', this.handleBlur, true);\n this.host.addEventListener('click', this.handleClick, true);\n this.host.addEventListener('focus', this.handleFocus, true);\n\n // Show on init if open\n this.tooltipPositioner.hidden = !this.open;\n if (this.open) {\n this.show();\n }\n }\n\n componentDidUpdate() {\n this.syncOptions();\n }\n\n disconnectedCallback() {\n if (this.popover != null) {\n this.popover.destroy();\n }\n\n this.host.removeEventListener('blur', this.handleBlur, true);\n this.host.removeEventListener('click', this.handleClick, true);\n this.host.removeEventListener('focus', this.handleFocus, true);\n }\n\n /** Shows the tooltip. */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible || this.disabled) {\n return;\n }\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.isVisible = true;\n this.open = true;\n this.popover?.show();\n }\n\n /** Shows the tooltip. */\n @Method()\n async hide() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible || this.disabled) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n this.isVisible = false;\n this.open = false;\n this.popover?.hide();\n }\n\n private getTarget() {\n // Get the first child that isn't a <style> or content slot\n const target = [...this.host.children].find(\n (el) => el.tagName.toLowerCase() !== 'style' && el.getAttribute('slot') !== 'content'\n ) as HTMLElement;\n\n if (target == null) {\n throw new Error('Invalid tooltip target: no child element was found.');\n }\n\n return target;\n }\n\n private handleBlur = () => {\n if (this.hasTrigger('focus')) {\n this.hide();\n }\n };\n\n private handleClick = () => {\n if (this.hasTrigger('click')) {\n this.open ? this.hide() : this.show();\n }\n };\n\n private handleFocus = () => {\n if (this.hasTrigger('focus')) {\n this.show();\n }\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n // Pressing escape when the target element has focus should dismiss the tooltip\n if (this.open && event.key === 'Escape') {\n event.stopPropagation();\n this.hide();\n }\n };\n\n private handleMouseOver = () => {\n if (this.hasTrigger('hover')) {\n this.show();\n }\n };\n\n private handleMouseOut = () => {\n if (this.hasTrigger('hover')) {\n this.hide();\n }\n };\n\n private handleSlotChange = () => {\n const oldTarget = this.target;\n const newTarget = this.getTarget();\n\n if (newTarget !== oldTarget) {\n if (oldTarget != null) {\n oldTarget.removeAttribute('aria-describedby');\n }\n newTarget.setAttribute('aria-describedby', this.componentId);\n }\n };\n\n private hasTrigger(triggerType: string) {\n const triggers = this.trigger.split(' ');\n return triggers.includes(triggerType);\n }\n\n private syncOptions() {\n if (this.popover == null) return;\n\n this.popover.setOptions({\n placement: this.placement,\n distance: this.distance,\n skidding: this.skidding,\n transitionElement: this.tooltip,\n onAfterHide: () => this.sixAfterHide.emit(),\n onAfterShow: () => this.sixAfterShow.emit(),\n });\n }\n\n render() {\n return (\n <Host onKeyDown={this.handleKeyDown} onMouseOver={this.handleMouseOver} onMouseOut={this.handleMouseOut}>\n <slot onSlotchange={this.handleSlotChange} />\n <div ref={(el) => (this.tooltipPositioner = el)} class=\"tooltip-positioner\">\n <div\n part=\"base\"\n ref={(el) => (this.tooltip = el)}\n id={this.componentId}\n class={{\n tooltip: true,\n 'tooltip--open': this.open,\n }}\n role=\"tooltip\"\n aria-hidden={this.open ? 'false' : 'true'}\n >\n <slot name=\"content\">{this.content}</slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"six-tooltip2.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,uxHAAuxH;;ACI7yH,IAAI,EAAE,GAAG,CAAC,CAAC;MAmBE,UAAU;;;;;;;;;IACb,gBAAW,GAAG,WAAW,EAAE,EAAE,EAAE,CAAC;IAChC,cAAS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,IAAI;QACb,eAAe,EAAE,IAAI,CAAC,IAAI;OAC3B,EACD,IAAI,EAAC,SAAS,iBACD,IAAI,CAAC,IAAI,GAAG,OAAO,GAAG,MAAM,IAEzC,YAAM,IAAI,EAAC,SAAS,IAAE,IAAI,CAAC,OAAO,CAAQ,CACtC,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/six-tooltip/six-tooltip.scss?tag=six-tooltip&encapsulation=shadow","src/components/six-tooltip/six-tooltip.tsx"],"sourcesContent":["@import 'src/global/component';\n\n/**\n * @prop --hide-delay: The amount of time to wait before hiding the tooltip.\n * @prop --hide-duration: The amount of time the hide transition takes to complete.\n * @prop --hide-timing-function: The timing function (easing) to use for the hide transition.\n * @prop --max-width: The maximum width of the tooltip.\n * @prop --show-delay: The amount of time to wait before showing the tooltip.\n * @prop --show-duration: The amount of time the show transition takes to complete.\n * @prop --show-timing-function: The timing function (easing) to use for the show transition.\n */\n:host {\n --max-width: 20rem;\n --hide-delay: 0s;\n --hide-duration: 0.125s;\n --hide-timing-function: ease;\n --show-delay: 0.125s;\n --show-duration: 0.125s;\n --show-timing-function: ease;\n\n display: contents;\n}\n\n.tooltip-positioner {\n position: fixed;\n z-index: var(--six-z-index-tooltip);\n pointer-events: none;\n}\n\n.tooltip {\n max-width: var(--max-width);\n border-radius: var(--six-border-radius-medium);\n background-color: var(--six-tooltip-background-color);\n font-family: var(--six-font-family);\n font-size: var(--six-tooltip-font-size);\n font-weight: var(--six-tooltip-font-weight);\n line-height: var(--six-tooltip-line-height);\n color: var(--six-tooltip-color);\n opacity: 0;\n padding: var(--six-spacing-xxx-small) var(--six-spacing-x-small);\n transform: scale(0.8);\n transform-origin: bottom;\n transition-property: opacity, transform;\n transition-delay: var(--hide-delay);\n transition-duration: var(--hide-duration);\n transition-timing-function: var(--hide-timing-function);\n\n &::after {\n content: '';\n position: absolute;\n width: 0;\n height: 0;\n }\n}\n\n.tooltip-positioner {\n &[data-popper-placement^='top'] .tooltip {\n transform-origin: bottom;\n }\n\n &[data-popper-placement^='bottom'] .tooltip {\n transform-origin: top;\n }\n\n &[data-popper-placement^='left'] .tooltip {\n transform-origin: right;\n }\n\n &[data-popper-placement^='right'] .tooltip {\n transform-origin: left;\n }\n\n &.popover-visible .tooltip {\n opacity: 1;\n transform: none;\n transition-delay: var(--show-delay);\n transition-duration: var(--show-duration);\n transition-timing-function: var(--show-timing-function);\n }\n}\n\n// Arrow + bottom\n.tooltip-positioner[data-popper-placement^='bottom'] .tooltip::after {\n bottom: 100%;\n left: calc(50% - var(--six-tooltip-arrow-size));\n border-bottom: var(--six-tooltip-arrow-size) solid var(--six-tooltip-background-color);\n border-left: var(--six-tooltip-arrow-size) solid transparent;\n border-right: var(--six-tooltip-arrow-size) solid transparent;\n}\n\n.tooltip-positioner[data-popper-placement='bottom-start'] .tooltip::after {\n left: var(--six-tooltip-arrow-start-end-offset);\n}\n\n.tooltip-positioner[data-popper-placement='bottom-end'] .tooltip::after {\n right: var(--six-tooltip-arrow-start-end-offset);\n left: auto;\n}\n\n// Arrow + top\n.tooltip-positioner[data-popper-placement^='top'] .tooltip::after {\n top: 100%;\n left: calc(50% - var(--six-tooltip-arrow-size));\n border-top: var(--six-tooltip-arrow-size) solid var(--six-tooltip-background-color);\n border-left: var(--six-tooltip-arrow-size) solid transparent;\n border-right: var(--six-tooltip-arrow-size) solid transparent;\n}\n\n.tooltip-positioner[data-popper-placement='top-start'] .tooltip::after {\n left: var(--six-tooltip-arrow-start-end-offset);\n}\n\n.tooltip-positioner[data-popper-placement='top-end'] .tooltip::after {\n right: var(--six-tooltip-arrow-start-end-offset);\n left: auto;\n}\n\n// Arrow + left\n.tooltip-positioner[data-popper-placement^='left'] .tooltip::after {\n top: calc(50% - var(--six-tooltip-arrow-size));\n left: 100%;\n border-left: var(--six-tooltip-arrow-size) solid var(--six-tooltip-background-color);\n border-top: var(--six-tooltip-arrow-size) solid transparent;\n border-bottom: var(--six-tooltip-arrow-size) solid transparent;\n}\n\n.tooltip-positioner[data-popper-placement='left-start'] .tooltip::after {\n top: var(--six-tooltip-arrow-start-end-offset);\n}\n\n.tooltip-positioner[data-popper-placement='left-end'] .tooltip::after {\n top: auto;\n bottom: var(--six-tooltip-arrow-start-end-offset);\n}\n\n// Arrow + right\n.tooltip-positioner[data-popper-placement^='right'] .tooltip::after {\n top: calc(50% - var(--six-tooltip-arrow-size));\n right: 100%;\n border-right: var(--six-tooltip-arrow-size) solid var(--six-tooltip-background-color);\n border-top: var(--six-tooltip-arrow-size) solid transparent;\n border-bottom: var(--six-tooltip-arrow-size) solid transparent;\n}\n\n.tooltip-positioner[data-popper-placement='right-start'] .tooltip::after {\n top: var(--six-tooltip-arrow-start-end-offset);\n}\n\n.tooltip-positioner[data-popper-placement='right-end'] .tooltip::after {\n top: auto;\n bottom: var(--six-tooltip-arrow-start-end-offset);\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from '@stencil/core';\nimport Popover from '../../utils/popover';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The tooltip's target element. Only the first element will be used as the target.\n * @slot content - The tooltip's content. Alternatively, you can use the content prop.\n *\n * @part base - The component's base wrapper.\n */\n\n@Component({\n tag: 'six-tooltip',\n styleUrl: 'six-tooltip.scss',\n shadow: true,\n})\nexport class SixTooltip {\n private componentId = `tooltip-${++id}`;\n private isVisible = false;\n private popover?: Popover;\n private tooltipPositioner?: HTMLElement;\n private target?: HTMLElement;\n private tooltip?: HTMLElement;\n\n @Element() host!: HTMLSixTooltipElement;\n\n /** The tooltip's content. Alternatively, you can use the content slot. */\n @Prop() content = '';\n\n /**\n * The preferred placement of the tooltip. Note that the actual placement may vary as needed to keep the tooltip\n * inside the viewport.\n */\n @Prop() placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'top';\n\n /** Set to true to disable the tooltip, so it won't show when triggered. */\n @Prop() disabled = false;\n\n /** The distance in pixels from which to offset the tooltip away from its target. */\n @Prop() distance = 10;\n\n /** Indicates whether the tooltip is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** The distance in pixels from which to offset the tooltip along its target. */\n @Prop() skidding = 0;\n\n /**\n * Controls how the tooltip is activated. Possible options include `click`, `hover`, `focus`, and `manual`. Multiple\n * options can be passed by separating them with a space. When manual is used, the tooltip must be activated\n * programmatically.\n */\n @Prop() trigger = 'hover focus';\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n }\n\n /** Emitted when the tooltip begins to show. Calling `event.preventDefault()` will prevent it from being shown. */\n @Event({ eventName: 'six-tooltip-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the tooltip has shown and all transitions are complete. */\n @Event({ eventName: 'six-tooltip-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the tooltip begins to hide. Calling `event.preventDefault()` will prevent it from being hidden. */\n @Event({ eventName: 'six-tooltip-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the tooltip has hidden and all transitions are complete. */\n @Event({ eventName: 'six-tooltip-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n componentDidLoad() {\n if (this.tooltipPositioner == null) return;\n this.target = this.getTarget();\n this.popover = new Popover(this.target, this.tooltipPositioner, { strategy: 'fixed' });\n this.syncOptions();\n\n this.host.addEventListener('blur', this.handleBlur, true);\n this.host.addEventListener('click', this.handleClick, true);\n this.host.addEventListener('focus', this.handleFocus, true);\n\n // Show on init if open\n this.tooltipPositioner.hidden = !this.open;\n if (this.open) {\n this.show();\n }\n }\n\n componentDidUpdate() {\n this.syncOptions();\n }\n\n disconnectedCallback() {\n if (this.popover != null) {\n this.popover.destroy();\n }\n\n this.host.removeEventListener('blur', this.handleBlur, true);\n this.host.removeEventListener('click', this.handleClick, true);\n this.host.removeEventListener('focus', this.handleFocus, true);\n }\n\n /** Shows the tooltip. */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible || this.disabled) {\n return;\n }\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.isVisible = true;\n this.open = true;\n this.popover?.show();\n }\n\n /** Shows the tooltip. */\n @Method()\n async hide() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible || this.disabled) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n this.isVisible = false;\n this.open = false;\n this.popover?.hide();\n }\n\n private getTarget() {\n // Get the first child that isn't a <style> or content slot\n const target = [...this.host.children].find(\n (el) => el.tagName.toLowerCase() !== 'style' && el.getAttribute('slot') !== 'content'\n ) as HTMLElement;\n\n if (target == null) {\n throw new Error('Invalid tooltip target: no child element was found.');\n }\n\n return target;\n }\n\n private handleBlur = () => {\n if (this.hasTrigger('focus')) {\n this.hide();\n }\n };\n\n private handleClick = () => {\n if (this.hasTrigger('click')) {\n this.open ? this.hide() : this.show();\n }\n };\n\n private handleFocus = () => {\n if (this.hasTrigger('focus')) {\n this.show();\n }\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n // Pressing escape when the target element has focus should dismiss the tooltip\n if (this.open && event.key === 'Escape') {\n event.stopPropagation();\n this.hide();\n }\n };\n\n private handleMouseOver = () => {\n if (this.hasTrigger('hover')) {\n this.show();\n }\n };\n\n private handleMouseOut = () => {\n if (this.hasTrigger('hover')) {\n this.hide();\n }\n };\n\n private handleSlotChange = () => {\n const oldTarget = this.target;\n const newTarget = this.getTarget();\n\n if (newTarget !== oldTarget) {\n if (oldTarget != null) {\n oldTarget.removeAttribute('aria-describedby');\n }\n newTarget.setAttribute('aria-describedby', this.componentId);\n }\n };\n\n private hasTrigger(triggerType: string) {\n const triggers = this.trigger.split(' ');\n return triggers.includes(triggerType);\n }\n\n private syncOptions() {\n if (this.popover == null) return;\n\n this.popover.setOptions({\n placement: this.placement,\n distance: this.distance,\n skidding: this.skidding,\n transitionElement: this.tooltip,\n onAfterHide: () => this.sixAfterHide.emit(),\n onAfterShow: () => this.sixAfterShow.emit(),\n });\n }\n\n render() {\n return (\n <Host onKeyDown={this.handleKeyDown} onMouseOver={this.handleMouseOver} onMouseOut={this.handleMouseOut}>\n <slot onSlotchange={this.handleSlotChange} />\n <div ref={(el) => (this.tooltipPositioner = el)} class=\"tooltip-positioner\">\n <div\n part=\"base\"\n ref={(el) => (this.tooltip = el)}\n id={this.componentId}\n class={{\n tooltip: true,\n 'tooltip--open': this.open,\n }}\n role=\"tooltip\"\n aria-hidden={this.open ? 'false' : 'true'}\n >\n <slot name=\"content\">{this.content}</slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,9 +1,9 @@
1
1
  {
2
- "timestamp": "2023-09-13T13:04:00",
2
+ "timestamp": "2023-11-15T08:50:39",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
- "version": "4.0.5",
6
- "typescriptVersion": "5.0.4"
5
+ "version": "4.7.0",
6
+ "typescriptVersion": "5.2.2"
7
7
  },
8
8
  "components": [
9
9
  {
@@ -11712,6 +11712,30 @@
11712
11712
  "optional": false,
11713
11713
  "required": false
11714
11714
  },
11715
+ {
11716
+ "name": "href",
11717
+ "type": "string | undefined",
11718
+ "complexType": {
11719
+ "original": "string | undefined",
11720
+ "resolved": "string | undefined",
11721
+ "references": {}
11722
+ },
11723
+ "mutable": false,
11724
+ "attr": "href",
11725
+ "reflectToAttr": true,
11726
+ "docs": "Provide if the item should be rendered as anchor tag.\nNote, that the href is added automatically when using routerLink in Angular.",
11727
+ "docsTags": [],
11728
+ "values": [
11729
+ {
11730
+ "type": "string"
11731
+ },
11732
+ {
11733
+ "type": "undefined"
11734
+ }
11735
+ ],
11736
+ "optional": false,
11737
+ "required": false
11738
+ },
11715
11739
  {
11716
11740
  "name": "selected",
11717
11741
  "type": "boolean",
@@ -11794,6 +11818,30 @@
11794
11818
  ],
11795
11819
  "usage": {},
11796
11820
  "props": [
11821
+ {
11822
+ "name": "href",
11823
+ "type": "string | undefined",
11824
+ "complexType": {
11825
+ "original": "string | undefined",
11826
+ "resolved": "string | undefined",
11827
+ "references": {}
11828
+ },
11829
+ "mutable": false,
11830
+ "attr": "href",
11831
+ "reflectToAttr": true,
11832
+ "docs": "Provide if the item should be rendered as anchor tag.\nNote, that the href is added automatically when using routerLink in Angular.",
11833
+ "docsTags": [],
11834
+ "values": [
11835
+ {
11836
+ "type": "string"
11837
+ },
11838
+ {
11839
+ "type": "undefined"
11840
+ }
11841
+ ],
11842
+ "optional": false,
11843
+ "required": false
11844
+ },
11797
11845
  {
11798
11846
  "name": "icon",
11799
11847
  "type": "string",
@@ -1,4 +1,4 @@
1
- import { h } from './index-8a74f992.js';
1
+ import { h } from './index-4ee8b33e.js';
2
2
 
3
3
  const FormControl = (props, children) => {
4
4
  var _a, _b, _c, _d, _e, _f, _g, _h;
@@ -31,4 +31,4 @@ const FormControl = (props, children) => {
31
31
 
32
32
  export { FormControl as F };
33
33
 
34
- //# sourceMappingURL=form-control-b0febe88.js.map
34
+ //# sourceMappingURL=form-control-079f7fb6.js.map
@@ -1 +1 @@
1
- {"file":"form-control-b0febe88.js","mappings":";;MAoDM,WAAW,GAAG,CAAC,KAAuB,EAAE,QAAiB;;EAC7D,MAAM,aAAa,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,SAAS,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,MAAM,CACjG,CAAC,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,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,GAAG,OAAO,GAAG,MAAM,EACxC,OAAO,EAAE,KAAK,CAAC,YAAY;MAE3B,YAAM,IAAI,EAAC,OAAO,IAAE,KAAK,CAAC,KAAK,CAAQ,CACjC;IAER,WAAK,KAAK,EAAC,qBAAqB,IAAE,QAAQ,CAAO;IAEjD,WACE,IAAI,EAAC,YAAY,EACjB,EAAE,EAAE,KAAK,CAAC,WAAW,EACrB,KAAK,EAAC,0BAA0B,iBACnB,YAAY,GAAG,OAAO,GAAG,MAAM;MAE5C,YAAM,IAAI,EAAC,YAAY,IACpB,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE,MAAA,KAAK,CAAC,cAAc,mCAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,MAC1D,qBAAY,IAAI,CAAa,CAC9B,CAAC,CACG,CACH;IAEN,WACE,IAAI,EAAC,WAAW,EAChB,EAAE,EAAE,KAAK,CAAC,UAAU,EACpB,KAAK,EAAC,yBAAyB,iBAClB,WAAW,GAAG,OAAO,GAAG,MAAM;MAE3C,YAAM,IAAI,EAAC,WAAW,IAAE,KAAK,CAAC,QAAQ,CAAQ,CAC1C,CACF,EACN;AACJ;;;;","names":[],"sources":["src/functional-components/form-control/form-control.tsx"],"sourcesContent":["import { h, VNode } from '@stencil/core';\n\nexport interface FormControlProps {\n /** The input id, used to map the input to the label */\n inputId: string;\n\n /** The size of the form control */\n size: 'small' | 'medium' | 'large';\n\n /** The label id, used to map the label to the input */\n labelId?: string;\n\n /** The label text (if the label slot isn't used) */\n label?: string;\n\n /** Whether a label slot has been provided. */\n hasLabelSlot?: boolean;\n\n /** The help text id, used to map the input to the help text */\n helpTextId?: string;\n\n /** The help text (if the help-text slot isn't used) */\n helpText?: string;\n\n /** Whether a help text slot has been provided. */\n hasHelpTextSlot?: boolean;\n\n /** Whether an error text slot has been provided. */\n hasErrorTextSlot?: boolean;\n\n /** The error text id, used to map the input to the help text */\n errorTextId?: string;\n\n /** The error text (if the error-text slot isn't used) */\n errorText?: string | string[];\n\n /** The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1 */\n errorTextCount?: number;\n\n /** Set to true to disable the input. */\n disabled?: boolean;\n\n /** Set if the value is required. */\n required?: boolean;\n\n /** Set if the error text is displayed. */\n displayError?: boolean;\n\n /** A function that gets called when the label is clicked. */\n onLabelClick?: (event: MouseEvent) => void;\n}\n\nconst FormControl = (props: FormControlProps, children: VNode[]) => {\n const errorMessages = (Array.isArray(props.errorText) ? props.errorText : [props.errorText]).filter(\n (text) => text != null && text.trim() !== ''\n );\n\n const hasLabel = props.label != null && props.label.trim() !== '' ? true : props.hasLabelSlot ?? false;\n const hasHelpText = props.helpText != null && props.helpText.trim() !== '' ? true : props.hasHelpTextSlot ?? false;\n const hasErrorText = (errorMessages.length > 0 || (props.hasErrorTextSlot ?? false)) && (props.displayError ?? false);\n\n return (\n <div\n part=\"form-control\"\n class={{\n 'form-control': true,\n 'form-control--small': props.size === 'small',\n 'form-control--medium': props.size === 'medium',\n 'form-control--large': props.size === 'large',\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n 'form-control--has-error-text': hasErrorText,\n 'form-control--disabled': props.disabled ?? false,\n 'form-control--invalid': (props.displayError ?? false) && !props.disabled,\n }}\n >\n <label\n part=\"label\"\n id={props.labelId}\n class={{\n 'form-control__label': true,\n 'form-control__label__required': props.required ?? false,\n }}\n htmlFor={props.inputId}\n aria-hidden={hasLabel ? 'false' : 'true'}\n onClick={props.onLabelClick}\n >\n <slot name=\"label\">{props.label}</slot>\n </label>\n\n <div class=\"form-control__input\">{children}</div>\n\n <div\n part=\"error-text\"\n id={props.errorTextId}\n class=\"form-control__error-text\"\n aria-hidden={hasErrorText ? 'false' : 'true'}\n >\n <slot name=\"error-text\">\n {errorMessages.slice(0, props.errorTextCount ?? 1).map((text) => (\n <six-error>{text}</six-error>\n ))}\n </slot>\n </div>\n\n <div\n part=\"help-text\"\n id={props.helpTextId}\n class=\"form-control__help-text\"\n aria-hidden={hasHelpText ? 'false' : 'true'}\n >\n <slot name=\"help-text\">{props.helpText}</slot>\n </div>\n </div>\n );\n};\n\nexport default FormControl;\n"],"version":3}
1
+ {"file":"form-control-079f7fb6.js","mappings":";;MAoDM,WAAW,GAAG,CAAC,KAAuB,EAAE,QAAiB;;EAC7D,MAAM,aAAa,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,SAAS,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,MAAM,CACjG,CAAC,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CAC7C,CAAC;EAEF,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,IAAI,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,GAAG,MAAA,KAAK,CAAC,YAAY,mCAAI,KAAK,CAAC;EACvG,MAAM,WAAW,GAAG,KAAK,CAAC,QAAQ,IAAI,IAAI,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,GAAG,MAAA,KAAK,CAAC,eAAe,mCAAI,KAAK,CAAC;EACnH,MAAM,YAAY,GAAG,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,KAAK,MAAA,KAAK,CAAC,gBAAgB,mCAAI,KAAK,CAAC,MAAM,MAAA,KAAK,CAAC,YAAY,mCAAI,KAAK,CAAC,CAAC;EAEtH,QACE,WACE,IAAI,EAAC,cAAc,EACnB,KAAK,EAAE;MACL,cAAc,EAAE,IAAI;MACpB,qBAAqB,EAAE,KAAK,CAAC,IAAI,KAAK,OAAO;MAC7C,sBAAsB,EAAE,KAAK,CAAC,IAAI,KAAK,QAAQ;MAC/C,qBAAqB,EAAE,KAAK,CAAC,IAAI,KAAK,OAAO;MAC7C,yBAAyB,EAAE,QAAQ;MACnC,6BAA6B,EAAE,WAAW;MAC1C,8BAA8B,EAAE,YAAY;MAC5C,wBAAwB,EAAE,MAAA,KAAK,CAAC,QAAQ,mCAAI,KAAK;MACjD,uBAAuB,EAAE,CAAC,MAAA,KAAK,CAAC,YAAY,mCAAI,KAAK,KAAK,CAAC,KAAK,CAAC,QAAQ;KAC1E;IAED,aACE,IAAI,EAAC,OAAO,EACZ,EAAE,EAAE,KAAK,CAAC,OAAO,EACjB,KAAK,EAAE;QACL,qBAAqB,EAAE,IAAI;QAC3B,+BAA+B,EAAE,MAAA,KAAK,CAAC,QAAQ,mCAAI,KAAK;OACzD,EACD,OAAO,EAAE,KAAK,CAAC,OAAO,iBACT,QAAQ,GAAG,OAAO,GAAG,MAAM,EACxC,OAAO,EAAE,KAAK,CAAC,YAAY;MAE3B,YAAM,IAAI,EAAC,OAAO,IAAE,KAAK,CAAC,KAAK,CAAQ,CACjC;IAER,WAAK,KAAK,EAAC,qBAAqB,IAAE,QAAQ,CAAO;IAEjD,WACE,IAAI,EAAC,YAAY,EACjB,EAAE,EAAE,KAAK,CAAC,WAAW,EACrB,KAAK,EAAC,0BAA0B,iBACnB,YAAY,GAAG,OAAO,GAAG,MAAM;MAE5C,YAAM,IAAI,EAAC,YAAY,IACpB,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE,MAAA,KAAK,CAAC,cAAc,mCAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,MAC1D,qBAAY,IAAI,CAAa,CAC9B,CAAC,CACG,CACH;IAEN,WACE,IAAI,EAAC,WAAW,EAChB,EAAE,EAAE,KAAK,CAAC,UAAU,EACpB,KAAK,EAAC,yBAAyB,iBAClB,WAAW,GAAG,OAAO,GAAG,MAAM;MAE3C,YAAM,IAAI,EAAC,WAAW,IAAE,KAAK,CAAC,QAAQ,CAAQ,CAC1C,CACF,EACN;AACJ;;;;","names":[],"sources":["src/functional-components/form-control/form-control.tsx"],"sourcesContent":["import { h, VNode } from '@stencil/core';\n\nexport interface FormControlProps {\n /** The input id, used to map the input to the label */\n inputId: string;\n\n /** The size of the form control */\n size: 'small' | 'medium' | 'large';\n\n /** The label id, used to map the label to the input */\n labelId?: string;\n\n /** The label text (if the label slot isn't used) */\n label?: string;\n\n /** Whether a label slot has been provided. */\n hasLabelSlot?: boolean;\n\n /** The help text id, used to map the input to the help text */\n helpTextId?: string;\n\n /** The help text (if the help-text slot isn't used) */\n helpText?: string;\n\n /** Whether a help text slot has been provided. */\n hasHelpTextSlot?: boolean;\n\n /** Whether an error text slot has been provided. */\n hasErrorTextSlot?: boolean;\n\n /** The error text id, used to map the input to the help text */\n errorTextId?: string;\n\n /** The error text (if the error-text slot isn't used) */\n errorText?: string | string[];\n\n /** The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1 */\n errorTextCount?: number;\n\n /** Set to true to disable the input. */\n disabled?: boolean;\n\n /** Set if the value is required. */\n required?: boolean;\n\n /** Set if the error text is displayed. */\n displayError?: boolean;\n\n /** A function that gets called when the label is clicked. */\n onLabelClick?: (event: MouseEvent) => void;\n}\n\nconst FormControl = (props: FormControlProps, children: VNode[]) => {\n const errorMessages = (Array.isArray(props.errorText) ? props.errorText : [props.errorText]).filter(\n (text) => text != null && text.trim() !== ''\n );\n\n const hasLabel = props.label != null && props.label.trim() !== '' ? true : props.hasLabelSlot ?? false;\n const hasHelpText = props.helpText != null && props.helpText.trim() !== '' ? true : props.hasHelpTextSlot ?? false;\n const hasErrorText = (errorMessages.length > 0 || (props.hasErrorTextSlot ?? false)) && (props.displayError ?? false);\n\n return (\n <div\n part=\"form-control\"\n class={{\n 'form-control': true,\n 'form-control--small': props.size === 'small',\n 'form-control--medium': props.size === 'medium',\n 'form-control--large': props.size === 'large',\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n 'form-control--has-error-text': hasErrorText,\n 'form-control--disabled': props.disabled ?? false,\n 'form-control--invalid': (props.displayError ?? false) && !props.disabled,\n }}\n >\n <label\n part=\"label\"\n id={props.labelId}\n class={{\n 'form-control__label': true,\n 'form-control__label__required': props.required ?? false,\n }}\n htmlFor={props.inputId}\n aria-hidden={hasLabel ? 'false' : 'true'}\n onClick={props.onLabelClick}\n >\n <slot name=\"label\">{props.label}</slot>\n </label>\n\n <div class=\"form-control__input\">{children}</div>\n\n <div\n part=\"error-text\"\n id={props.errorTextId}\n class=\"form-control__error-text\"\n aria-hidden={hasErrorText ? 'false' : 'true'}\n >\n <slot name=\"error-text\">\n {errorMessages.slice(0, props.errorTextCount ?? 1).map((text) => (\n <six-error>{text}</six-error>\n ))}\n </slot>\n </div>\n\n <div\n part=\"help-text\"\n id={props.helpTextId}\n class=\"form-control__help-text\"\n aria-hidden={hasHelpText ? 'false' : 'true'}\n >\n <slot name=\"help-text\">{props.helpText}</slot>\n </div>\n </div>\n );\n};\n\nexport default FormControl;\n"],"version":3}