@six-group/ui-library 0.0.0-insider.a9875a1 → 0.0.0-insider.ad9373a

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 (611) hide show
  1. package/dist/cjs/error-messages-6e8049a4.js +119 -0
  2. package/dist/cjs/error-messages-6e8049a4.js.map +1 -0
  3. package/dist/cjs/{form-control-f9bc25dd.js → form-control-72186fcc.js} +2 -2
  4. package/dist/cjs/{form-control-f9bc25dd.js.map → form-control-72186fcc.js.map} +1 -1
  5. package/dist/cjs/{index-3baddcdc.js → index-5dd19c4b.js} +63 -44
  6. package/dist/cjs/index-5dd19c4b.js.map +1 -0
  7. package/dist/cjs/index.cjs.js +6 -106
  8. package/dist/cjs/index.cjs.js.map +1 -1
  9. package/dist/cjs/loader.cjs.js +2 -2
  10. package/dist/cjs/set-attributes_2.cjs.entry.js +2 -2
  11. package/dist/cjs/set-attributes_2.cjs.entry.js.map +1 -1
  12. package/dist/cjs/six-alert.cjs.entry.js +2 -2
  13. package/dist/cjs/six-alert.cjs.entry.js.map +1 -1
  14. package/dist/cjs/six-avatar.cjs.entry.js +2 -2
  15. package/dist/cjs/six-avatar.cjs.entry.js.map +1 -1
  16. package/dist/cjs/six-badge.cjs.entry.js +2 -2
  17. package/dist/cjs/six-badge.cjs.entry.js.map +1 -1
  18. package/dist/cjs/six-button.cjs.entry.js +3 -3
  19. package/dist/cjs/six-button.cjs.entry.js.map +1 -1
  20. package/dist/cjs/six-card.cjs.entry.js +2 -2
  21. package/dist/cjs/six-card.cjs.entry.js.map +1 -1
  22. package/dist/cjs/six-checkbox_2.cjs.entry.js +190 -0
  23. package/dist/cjs/six-checkbox_2.cjs.entry.js.map +1 -0
  24. package/dist/cjs/six-datepicker.cjs.entry.js +4 -3
  25. package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
  26. package/dist/cjs/six-details.cjs.entry.js +2 -2
  27. package/dist/cjs/six-details.cjs.entry.js.map +1 -1
  28. package/dist/cjs/six-dialog.cjs.entry.js +3 -3
  29. package/dist/cjs/six-dialog.cjs.entry.js.map +1 -1
  30. package/dist/cjs/six-drawer.cjs.entry.js +3 -3
  31. package/dist/cjs/six-drawer.cjs.entry.js.map +1 -1
  32. package/dist/cjs/six-dropdown_2.cjs.entry.js +195 -125
  33. package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
  34. package/dist/cjs/six-error-page.cjs.entry.js +1 -1
  35. package/dist/cjs/six-error.cjs.entry.js +1 -1
  36. package/dist/cjs/six-file-list-item.cjs.entry.js +1 -1
  37. package/dist/cjs/six-file-list.cjs.entry.js +1 -1
  38. package/dist/cjs/six-file-upload.cjs.entry.js +2 -2
  39. package/dist/cjs/six-file-upload.cjs.entry.js.map +1 -1
  40. package/dist/cjs/six-footer.cjs.entry.js +2 -2
  41. package/dist/cjs/six-footer.cjs.entry.js.map +1 -1
  42. package/dist/cjs/six-group-label.cjs.entry.js +4 -4
  43. package/dist/cjs/six-group-label.cjs.entry.js.map +1 -1
  44. package/dist/cjs/six-header.cjs.entry.js +7 -5
  45. package/dist/cjs/six-header.cjs.entry.js.map +1 -1
  46. package/dist/cjs/six-icon-button.cjs.entry.js +2 -2
  47. package/dist/cjs/six-icon-button.cjs.entry.js.map +1 -1
  48. package/dist/cjs/six-icon.cjs.entry.js +2 -2
  49. package/dist/cjs/six-icon.cjs.entry.js.map +1 -1
  50. package/dist/cjs/six-input.cjs.entry.js +6 -4
  51. package/dist/cjs/six-input.cjs.entry.js.map +1 -1
  52. package/dist/cjs/six-item-picker.cjs.entry.js +2 -2
  53. package/dist/cjs/six-item-picker.cjs.entry.js.map +1 -1
  54. package/dist/cjs/six-language-switcher.cjs.entry.js +1 -1
  55. package/dist/cjs/six-layout-grid.cjs.entry.js +1 -1
  56. package/dist/cjs/six-main-container.cjs.entry.js +1 -1
  57. package/dist/cjs/six-main-container.cjs.entry.js.map +1 -1
  58. package/dist/cjs/six-menu-divider.cjs.entry.js +2 -2
  59. package/dist/cjs/six-menu-divider.cjs.entry.js.map +1 -1
  60. package/dist/cjs/six-menu-label.cjs.entry.js +2 -2
  61. package/dist/cjs/six-menu-label.cjs.entry.js.map +1 -1
  62. package/dist/cjs/six-picto.cjs.entry.js +1 -1
  63. package/dist/cjs/six-progress-bar.cjs.entry.js +2 -2
  64. package/dist/cjs/six-progress-bar.cjs.entry.js.map +1 -1
  65. package/dist/cjs/six-progress-ring.cjs.entry.js +2 -2
  66. package/dist/cjs/six-progress-ring.cjs.entry.js.map +1 -1
  67. package/dist/cjs/six-radio.cjs.entry.js +2 -2
  68. package/dist/cjs/six-radio.cjs.entry.js.map +1 -1
  69. package/dist/cjs/six-range.cjs.entry.js +4 -4
  70. package/dist/cjs/six-range.cjs.entry.js.map +1 -1
  71. package/dist/cjs/six-root.cjs.entry.js +1 -1
  72. package/dist/cjs/six-root.cjs.entry.js.map +1 -1
  73. package/dist/cjs/six-search-field.cjs.entry.js +2 -2
  74. package/dist/cjs/six-search-field.cjs.entry.js.map +1 -1
  75. package/dist/cjs/six-select.cjs.entry.js +300 -169
  76. package/dist/cjs/six-select.cjs.entry.js.map +1 -1
  77. package/dist/cjs/six-sidebar-item-group.cjs.entry.js +3 -3
  78. package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -1
  79. package/dist/cjs/six-sidebar-item.cjs.entry.js +1 -1
  80. package/dist/cjs/six-sidebar.cjs.entry.js +2 -2
  81. package/dist/cjs/six-sidebar.cjs.entry.js.map +1 -1
  82. package/dist/cjs/six-spinner.cjs.entry.js +2 -2
  83. package/dist/cjs/six-spinner.cjs.entry.js.map +1 -1
  84. package/dist/cjs/six-switch.cjs.entry.js +4 -4
  85. package/dist/cjs/six-switch.cjs.entry.js.map +1 -1
  86. package/dist/cjs/six-tab-group.cjs.entry.js +2 -2
  87. package/dist/cjs/six-tab-group.cjs.entry.js.map +1 -1
  88. package/dist/cjs/six-tab-panel.cjs.entry.js +2 -2
  89. package/dist/cjs/six-tab-panel.cjs.entry.js.map +1 -1
  90. package/dist/cjs/six-tab.cjs.entry.js +2 -2
  91. package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
  92. package/dist/cjs/six-tag.cjs.entry.js +3 -3
  93. package/dist/cjs/six-tag.cjs.entry.js.map +1 -1
  94. package/dist/cjs/six-textarea.cjs.entry.js +4 -4
  95. package/dist/cjs/six-textarea.cjs.entry.js.map +1 -1
  96. package/dist/cjs/six-tile.cjs.entry.js +3 -3
  97. package/dist/cjs/six-tile.cjs.entry.js.map +1 -1
  98. package/dist/cjs/six-timepicker.cjs.entry.js +4 -4
  99. package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -1
  100. package/dist/cjs/six-tooltip.cjs.entry.js +2 -2
  101. package/dist/cjs/six-tooltip.cjs.entry.js.map +1 -1
  102. package/dist/cjs/{slot-9821749e.js → slot-1b1232a1.js} +1 -3
  103. package/dist/cjs/slot-1b1232a1.js.map +1 -0
  104. package/dist/cjs/{types-0a6d66f6.js → types-d3da200b.js} +3 -1
  105. package/dist/cjs/types-d3da200b.js.map +1 -0
  106. package/dist/cjs/ui-library.cjs.js +3 -3
  107. package/dist/cjs/ui-library.cjs.js.map +1 -1
  108. package/dist/collection/collection-manifest.json +1 -1
  109. package/dist/collection/components/six-alert/six-alert.css +1 -1
  110. package/dist/collection/components/six-avatar/six-avatar.css +2 -2
  111. package/dist/collection/components/six-badge/six-badge.css +1 -1
  112. package/dist/collection/components/six-button/six-button.css +1 -1
  113. package/dist/collection/components/six-button/six-button.js +3 -2
  114. package/dist/collection/components/six-button/six-button.js.map +1 -1
  115. package/dist/collection/components/six-card/six-card.css +4 -5
  116. package/dist/collection/components/six-checkbox/six-checkbox.css +1 -1
  117. package/dist/collection/components/six-checkbox/six-checkbox.js +3 -2
  118. package/dist/collection/components/six-checkbox/six-checkbox.js.map +1 -1
  119. package/dist/collection/components/six-datepicker/six-date-formats.js +1 -0
  120. package/dist/collection/components/six-datepicker/six-date-formats.js.map +1 -1
  121. package/dist/collection/components/six-datepicker/six-datepicker.css +1 -1
  122. package/dist/collection/components/six-datepicker/six-datepicker.js +6 -4
  123. package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
  124. package/dist/collection/components/six-details/six-details.css +1 -1
  125. package/dist/collection/components/six-details/six-details.js.map +1 -1
  126. package/dist/collection/components/six-dialog/six-dialog.css +2 -2
  127. package/dist/collection/components/six-drawer/six-drawer.css +2 -2
  128. package/dist/collection/components/six-dropdown/six-dropdown.css +22 -7
  129. package/dist/collection/components/six-dropdown/six-dropdown.js +213 -123
  130. package/dist/collection/components/six-dropdown/six-dropdown.js.map +1 -1
  131. package/dist/collection/components/six-dropdown/test/six-dropdown.spec.js +54 -29
  132. package/dist/collection/components/six-dropdown/test/six-dropdown.spec.js.map +1 -1
  133. package/dist/collection/components/six-file-upload/six-file-upload.css +1 -4
  134. package/dist/collection/components/six-footer/six-footer.css +2 -2
  135. package/dist/collection/components/six-group-label/six-group-label.css +1 -1
  136. package/dist/collection/components/six-header/six-header.css +6 -2
  137. package/dist/collection/components/six-header/six-header.js +25 -4
  138. package/dist/collection/components/six-header/six-header.js.map +1 -1
  139. package/dist/collection/components/six-header/test/six-header.spec.js +38 -2
  140. package/dist/collection/components/six-header/test/six-header.spec.js.map +1 -1
  141. package/dist/collection/components/six-icon/six-icon.css +1 -1
  142. package/dist/collection/components/six-icon-button/six-icon-button.css +1 -1
  143. package/dist/collection/components/six-input/six-input.css +10 -1
  144. package/dist/collection/components/six-input/six-input.js +44 -16
  145. package/dist/collection/components/six-input/six-input.js.map +1 -1
  146. package/dist/collection/components/six-item-picker/six-item-picker.js.map +1 -1
  147. package/dist/collection/components/six-item-picker/types.js +2 -0
  148. package/dist/collection/components/six-item-picker/types.js.map +1 -1
  149. package/dist/collection/components/six-main-container/six-main-container.js.map +1 -1
  150. package/dist/collection/components/six-menu/six-menu.css +8 -7
  151. package/dist/collection/components/six-menu/six-menu.js +28 -6
  152. package/dist/collection/components/six-menu/six-menu.js.map +1 -1
  153. package/dist/collection/components/six-menu/test/six-menu.spec.js +6 -6
  154. package/dist/collection/components/six-menu/test/six-menu.spec.js.map +1 -1
  155. package/dist/collection/components/six-menu-divider/six-menu-divider.css +3 -2
  156. package/dist/collection/components/six-menu-item/six-menu-item.css +13 -2
  157. package/dist/collection/components/six-menu-item/six-menu-item.js +36 -7
  158. package/dist/collection/components/six-menu-item/six-menu-item.js.map +1 -1
  159. package/dist/collection/components/six-menu-label/six-menu-label.css +1 -1
  160. package/dist/collection/components/six-progress-bar/six-progress-bar.css +1 -1
  161. package/dist/collection/components/six-progress-ring/six-progress-ring.css +1 -1
  162. package/dist/collection/components/six-radio/six-radio.css +1 -1
  163. package/dist/collection/components/six-radio/six-radio.js +3 -2
  164. package/dist/collection/components/six-radio/six-radio.js.map +1 -1
  165. package/dist/collection/components/six-range/six-range.css +1 -1
  166. package/dist/collection/components/six-range/six-range.js +3 -2
  167. package/dist/collection/components/six-range/six-range.js.map +1 -1
  168. package/dist/collection/components/six-root/six-root.js.map +1 -1
  169. package/dist/collection/components/six-search-field/six-search-field.css +1 -1
  170. package/dist/collection/components/six-select/six-select.css +54 -66
  171. package/dist/collection/components/six-select/six-select.js +343 -168
  172. package/dist/collection/components/six-select/six-select.js.map +1 -1
  173. package/dist/collection/components/six-select/test/six-select.spec.js +31 -15
  174. package/dist/collection/components/six-select/test/six-select.spec.js.map +1 -1
  175. package/dist/collection/components/six-sidebar/six-sidebar.css +2 -2
  176. package/dist/collection/components/six-sidebar/six-sidebar.js +6 -4
  177. package/dist/collection/components/six-sidebar/six-sidebar.js.map +1 -1
  178. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.css +1 -1
  179. package/dist/collection/components/six-spinner/six-spinner.css +1 -1
  180. package/dist/collection/components/six-stage-indicator/six-stage-indicator.css +1 -1
  181. package/dist/collection/components/six-switch/six-switch.css +1 -1
  182. package/dist/collection/components/six-switch/six-switch.js +3 -2
  183. package/dist/collection/components/six-switch/six-switch.js.map +1 -1
  184. package/dist/collection/components/six-tab/six-tab.css +1 -1
  185. package/dist/collection/components/six-tab/six-tab.js +3 -2
  186. package/dist/collection/components/six-tab/six-tab.js.map +1 -1
  187. package/dist/collection/components/six-tab-group/six-tab-group.css +1 -1
  188. package/dist/collection/components/six-tab-group/six-tab-group.js +3 -2
  189. package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -1
  190. package/dist/collection/components/six-tab-panel/six-tab-panel.css +1 -1
  191. package/dist/collection/components/six-tag/six-tag.css +1 -1
  192. package/dist/collection/components/six-textarea/six-textarea.css +1 -1
  193. package/dist/collection/components/six-textarea/six-textarea.js +24 -16
  194. package/dist/collection/components/six-textarea/six-textarea.js.map +1 -1
  195. package/dist/collection/components/six-tile/six-tile.css +2 -2
  196. package/dist/collection/components/six-tile/six-tile.js.map +1 -1
  197. package/dist/collection/components/six-timepicker/six-timepicker.css +1 -1
  198. package/dist/collection/components/six-timepicker/six-timepicker.js +3 -2
  199. package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -1
  200. package/dist/collection/components/six-tooltip/six-tooltip.css +1 -1
  201. package/dist/collection/utils/error-messages.js +7 -0
  202. package/dist/collection/utils/error-messages.js.map +1 -1
  203. package/dist/collection/utils/slot.js +0 -1
  204. package/dist/collection/utils/slot.js.map +1 -1
  205. package/dist/components/index.js +2 -106
  206. package/dist/components/index.js.map +1 -1
  207. package/dist/components/six-alert.js +1 -1
  208. package/dist/components/six-alert.js.map +1 -1
  209. package/dist/components/six-avatar.js +1 -1
  210. package/dist/components/six-avatar.js.map +1 -1
  211. package/dist/components/six-badge.js +1 -1
  212. package/dist/components/six-badge.js.map +1 -1
  213. package/dist/components/six-button.js +1 -142
  214. package/dist/components/six-button.js.map +1 -1
  215. package/dist/components/six-button2.js +146 -0
  216. package/dist/components/six-button2.js.map +1 -0
  217. package/dist/components/six-card.js +1 -1
  218. package/dist/components/six-card.js.map +1 -1
  219. package/dist/components/six-checkbox.js +1 -161
  220. package/dist/components/six-checkbox.js.map +1 -1
  221. package/dist/components/six-checkbox2.js +165 -0
  222. package/dist/components/six-checkbox2.js.map +1 -0
  223. package/dist/components/six-datepicker.js +2 -1
  224. package/dist/components/six-datepicker.js.map +1 -1
  225. package/dist/components/six-details2.js +1 -1
  226. package/dist/components/six-details2.js.map +1 -1
  227. package/dist/components/six-dialog.js +1 -1
  228. package/dist/components/six-dialog.js.map +1 -1
  229. package/dist/components/six-drawer.js +1 -1
  230. package/dist/components/six-drawer.js.map +1 -1
  231. package/dist/components/six-dropdown2.js +199 -125
  232. package/dist/components/six-dropdown2.js.map +1 -1
  233. package/dist/components/six-file-upload.js +1 -1
  234. package/dist/components/six-file-upload.js.map +1 -1
  235. package/dist/components/six-footer.js +1 -1
  236. package/dist/components/six-footer.js.map +1 -1
  237. package/dist/components/six-group-label.js +1 -1
  238. package/dist/components/six-group-label.js.map +1 -1
  239. package/dist/components/six-header.js +13 -4
  240. package/dist/components/six-header.js.map +1 -1
  241. package/dist/components/six-icon-button2.js +1 -1
  242. package/dist/components/six-icon-button2.js.map +1 -1
  243. package/dist/components/six-icon2.js +1 -1
  244. package/dist/components/six-icon2.js.map +1 -1
  245. package/dist/components/six-input2.js +4 -1
  246. package/dist/components/six-input2.js.map +1 -1
  247. package/dist/components/six-item-picker2.js +2 -0
  248. package/dist/components/six-item-picker2.js.map +1 -1
  249. package/dist/components/six-main-container.js.map +1 -1
  250. package/dist/components/six-menu-divider.js +1 -1
  251. package/dist/components/six-menu-divider.js.map +1 -1
  252. package/dist/components/six-menu-item2.js +28 -5
  253. package/dist/components/six-menu-item2.js.map +1 -1
  254. package/dist/components/six-menu-label.js +1 -1
  255. package/dist/components/six-menu-label.js.map +1 -1
  256. package/dist/components/six-menu2.js +22 -6
  257. package/dist/components/six-menu2.js.map +1 -1
  258. package/dist/components/six-progress-bar.js +1 -1
  259. package/dist/components/six-progress-bar.js.map +1 -1
  260. package/dist/components/six-progress-ring.js +1 -1
  261. package/dist/components/six-progress-ring.js.map +1 -1
  262. package/dist/components/six-radio.js +1 -1
  263. package/dist/components/six-radio.js.map +1 -1
  264. package/dist/components/six-range.js +1 -1
  265. package/dist/components/six-range.js.map +1 -1
  266. package/dist/components/six-root.js.map +1 -1
  267. package/dist/components/six-search-field.js +1 -1
  268. package/dist/components/six-search-field.js.map +1 -1
  269. package/dist/components/six-select.js +435 -185
  270. package/dist/components/six-select.js.map +1 -1
  271. package/dist/components/six-sidebar-item-group.js +1 -1
  272. package/dist/components/six-sidebar-item-group.js.map +1 -1
  273. package/dist/components/six-sidebar.js +1 -1
  274. package/dist/components/six-sidebar.js.map +1 -1
  275. package/dist/components/six-spinner2.js +1 -1
  276. package/dist/components/six-spinner2.js.map +1 -1
  277. package/dist/components/six-stage-indicator2.js +1 -1
  278. package/dist/components/six-stage-indicator2.js.map +1 -1
  279. package/dist/components/six-switch.js +1 -1
  280. package/dist/components/six-switch.js.map +1 -1
  281. package/dist/components/six-tab-group.js +1 -1
  282. package/dist/components/six-tab-group.js.map +1 -1
  283. package/dist/components/six-tab-panel.js +1 -1
  284. package/dist/components/six-tab-panel.js.map +1 -1
  285. package/dist/components/six-tab.js +1 -1
  286. package/dist/components/six-tab.js.map +1 -1
  287. package/dist/components/six-tag.js +98 -1
  288. package/dist/components/six-tag.js.map +1 -1
  289. package/dist/components/six-textarea.js +1 -1
  290. package/dist/components/six-textarea.js.map +1 -1
  291. package/dist/components/six-tile.js +1 -1
  292. package/dist/components/six-tile.js.map +1 -1
  293. package/dist/components/six-timepicker2.js +1 -1
  294. package/dist/components/six-timepicker2.js.map +1 -1
  295. package/dist/components/six-tooltip2.js +1 -1
  296. package/dist/components/six-tooltip2.js.map +1 -1
  297. package/dist/components/slot.js +1 -2
  298. package/dist/components/slot.js.map +1 -1
  299. package/dist/components.d.ts +1 -21
  300. package/dist/components.json +545 -115
  301. package/dist/esm/error-messages-1eaaad23.js +115 -0
  302. package/dist/esm/error-messages-1eaaad23.js.map +1 -0
  303. package/dist/esm/{form-control-6b30894f.js → form-control-77fcccd0.js} +2 -2
  304. package/dist/esm/{form-control-6b30894f.js.map → form-control-77fcccd0.js.map} +1 -1
  305. package/dist/esm/{index-17d8173e.js → index-6c10d50b.js} +63 -44
  306. package/dist/esm/index-6c10d50b.js.map +1 -0
  307. package/dist/esm/index.js +1 -106
  308. package/dist/esm/index.js.map +1 -1
  309. package/dist/esm/loader.js +3 -3
  310. package/dist/esm/set-attributes_2.entry.js +2 -2
  311. package/dist/esm/set-attributes_2.entry.js.map +1 -1
  312. package/dist/esm/six-alert.entry.js +2 -2
  313. package/dist/esm/six-alert.entry.js.map +1 -1
  314. package/dist/esm/six-avatar.entry.js +2 -2
  315. package/dist/esm/six-avatar.entry.js.map +1 -1
  316. package/dist/esm/six-badge.entry.js +2 -2
  317. package/dist/esm/six-badge.entry.js.map +1 -1
  318. package/dist/esm/six-button.entry.js +3 -3
  319. package/dist/esm/six-button.entry.js.map +1 -1
  320. package/dist/esm/six-card.entry.js +2 -2
  321. package/dist/esm/six-card.entry.js.map +1 -1
  322. package/dist/esm/six-checkbox_2.entry.js +185 -0
  323. package/dist/esm/six-checkbox_2.entry.js.map +1 -0
  324. package/dist/esm/six-datepicker.entry.js +4 -3
  325. package/dist/esm/six-datepicker.entry.js.map +1 -1
  326. package/dist/esm/six-details.entry.js +2 -2
  327. package/dist/esm/six-details.entry.js.map +1 -1
  328. package/dist/esm/six-dialog.entry.js +3 -3
  329. package/dist/esm/six-dialog.entry.js.map +1 -1
  330. package/dist/esm/six-drawer.entry.js +3 -3
  331. package/dist/esm/six-drawer.entry.js.map +1 -1
  332. package/dist/esm/six-dropdown_2.entry.js +196 -126
  333. package/dist/esm/six-dropdown_2.entry.js.map +1 -1
  334. package/dist/esm/six-error-page.entry.js +1 -1
  335. package/dist/esm/six-error.entry.js +1 -1
  336. package/dist/esm/six-file-list-item.entry.js +1 -1
  337. package/dist/esm/six-file-list.entry.js +1 -1
  338. package/dist/esm/six-file-upload.entry.js +2 -2
  339. package/dist/esm/six-file-upload.entry.js.map +1 -1
  340. package/dist/esm/six-footer.entry.js +2 -2
  341. package/dist/esm/six-footer.entry.js.map +1 -1
  342. package/dist/esm/six-group-label.entry.js +4 -4
  343. package/dist/esm/six-group-label.entry.js.map +1 -1
  344. package/dist/esm/six-header.entry.js +7 -5
  345. package/dist/esm/six-header.entry.js.map +1 -1
  346. package/dist/esm/six-icon-button.entry.js +2 -2
  347. package/dist/esm/six-icon-button.entry.js.map +1 -1
  348. package/dist/esm/six-icon.entry.js +2 -2
  349. package/dist/esm/six-icon.entry.js.map +1 -1
  350. package/dist/esm/six-input.entry.js +6 -4
  351. package/dist/esm/six-input.entry.js.map +1 -1
  352. package/dist/esm/six-item-picker.entry.js +2 -2
  353. package/dist/esm/six-item-picker.entry.js.map +1 -1
  354. package/dist/esm/six-language-switcher.entry.js +1 -1
  355. package/dist/esm/six-layout-grid.entry.js +1 -1
  356. package/dist/esm/six-main-container.entry.js +1 -1
  357. package/dist/esm/six-main-container.entry.js.map +1 -1
  358. package/dist/esm/six-menu-divider.entry.js +2 -2
  359. package/dist/esm/six-menu-divider.entry.js.map +1 -1
  360. package/dist/esm/six-menu-label.entry.js +2 -2
  361. package/dist/esm/six-menu-label.entry.js.map +1 -1
  362. package/dist/esm/six-picto.entry.js +1 -1
  363. package/dist/esm/six-progress-bar.entry.js +2 -2
  364. package/dist/esm/six-progress-bar.entry.js.map +1 -1
  365. package/dist/esm/six-progress-ring.entry.js +2 -2
  366. package/dist/esm/six-progress-ring.entry.js.map +1 -1
  367. package/dist/esm/six-radio.entry.js +2 -2
  368. package/dist/esm/six-radio.entry.js.map +1 -1
  369. package/dist/esm/six-range.entry.js +4 -4
  370. package/dist/esm/six-range.entry.js.map +1 -1
  371. package/dist/esm/six-root.entry.js +1 -1
  372. package/dist/esm/six-root.entry.js.map +1 -1
  373. package/dist/esm/six-search-field.entry.js +2 -2
  374. package/dist/esm/six-search-field.entry.js.map +1 -1
  375. package/dist/esm/six-select.entry.js +300 -169
  376. package/dist/esm/six-select.entry.js.map +1 -1
  377. package/dist/esm/six-sidebar-item-group.entry.js +3 -3
  378. package/dist/esm/six-sidebar-item-group.entry.js.map +1 -1
  379. package/dist/esm/six-sidebar-item.entry.js +1 -1
  380. package/dist/esm/six-sidebar.entry.js +2 -2
  381. package/dist/esm/six-sidebar.entry.js.map +1 -1
  382. package/dist/esm/six-spinner.entry.js +2 -2
  383. package/dist/esm/six-spinner.entry.js.map +1 -1
  384. package/dist/esm/six-switch.entry.js +4 -4
  385. package/dist/esm/six-switch.entry.js.map +1 -1
  386. package/dist/esm/six-tab-group.entry.js +2 -2
  387. package/dist/esm/six-tab-group.entry.js.map +1 -1
  388. package/dist/esm/six-tab-panel.entry.js +2 -2
  389. package/dist/esm/six-tab-panel.entry.js.map +1 -1
  390. package/dist/esm/six-tab.entry.js +2 -2
  391. package/dist/esm/six-tab.entry.js.map +1 -1
  392. package/dist/esm/six-tag.entry.js +3 -3
  393. package/dist/esm/six-tag.entry.js.map +1 -1
  394. package/dist/esm/six-textarea.entry.js +4 -4
  395. package/dist/esm/six-textarea.entry.js.map +1 -1
  396. package/dist/esm/six-tile.entry.js +3 -3
  397. package/dist/esm/six-tile.entry.js.map +1 -1
  398. package/dist/esm/six-timepicker.entry.js +4 -4
  399. package/dist/esm/six-timepicker.entry.js.map +1 -1
  400. package/dist/esm/six-tooltip.entry.js +2 -2
  401. package/dist/esm/six-tooltip.entry.js.map +1 -1
  402. package/dist/esm/{slot-41bc439a.js → slot-56531341.js} +2 -3
  403. package/dist/esm/slot-56531341.js.map +1 -0
  404. package/dist/esm/{types-07748c42.js → types-a07bb999.js} +3 -1
  405. package/dist/esm/types-a07bb999.js.map +1 -0
  406. package/dist/esm/ui-library.js +4 -4
  407. package/dist/esm/ui-library.js.map +1 -1
  408. package/dist/types/components/six-dropdown/six-dropdown.d.ts +28 -9
  409. package/dist/types/components/six-header/six-header.d.ts +2 -0
  410. package/dist/types/components/six-input/six-input.d.ts +4 -0
  411. package/dist/types/components/six-menu/six-menu.d.ts +4 -0
  412. package/dist/types/components/six-menu-item/six-menu-item.d.ts +7 -1
  413. package/dist/types/components/six-select/six-select.d.ts +27 -12
  414. package/dist/types/components.d.ts +62 -3
  415. package/dist/types/utils/error-messages.d.ts +1 -0
  416. package/dist/types/utils/slot.d.ts +0 -1
  417. package/dist/ui-library/index.esm.js +1 -1
  418. package/dist/ui-library/index.esm.js.map +1 -1
  419. package/dist/ui-library/{p-c86aa5b3.entry.js → p-01ae4500.entry.js} +2 -2
  420. package/dist/ui-library/p-021f6da9.entry.js +2 -0
  421. package/dist/ui-library/{p-6aa2929a.entry.js.map → p-021f6da9.entry.js.map} +1 -1
  422. package/dist/ui-library/p-0274c52c.entry.js +2 -0
  423. package/dist/ui-library/{p-882fbf6f.entry.js.map → p-0274c52c.entry.js.map} +1 -1
  424. package/dist/ui-library/{p-f73a6bdc.entry.js → p-0cb135aa.entry.js} +2 -2
  425. package/dist/ui-library/p-0cebf1d2.js +2 -0
  426. package/dist/ui-library/p-0cebf1d2.js.map +1 -0
  427. package/dist/ui-library/p-1431a2a8.entry.js +2 -0
  428. package/dist/ui-library/p-1431a2a8.entry.js.map +1 -0
  429. package/dist/ui-library/p-1aa28025.entry.js +2 -0
  430. package/dist/ui-library/p-1aa28025.entry.js.map +1 -0
  431. package/dist/ui-library/p-1b135e1c.entry.js +2 -0
  432. package/dist/ui-library/{p-ce373da5.entry.js.map → p-1b135e1c.entry.js.map} +1 -1
  433. package/dist/ui-library/{p-1d0c5929.entry.js → p-1be990f9.entry.js} +2 -2
  434. package/dist/ui-library/{p-1d0c5929.entry.js.map → p-1be990f9.entry.js.map} +1 -1
  435. package/dist/ui-library/p-2008636b.entry.js +2 -0
  436. package/dist/ui-library/{p-19a61686.entry.js.map → p-2008636b.entry.js.map} +1 -1
  437. package/dist/ui-library/p-2132da0a.entry.js +2 -0
  438. package/dist/ui-library/{p-479d8087.entry.js.map → p-2132da0a.entry.js.map} +1 -1
  439. package/dist/ui-library/p-2cd674e0.entry.js +2 -0
  440. package/dist/ui-library/{p-ee71e3a3.entry.js.map → p-2cd674e0.entry.js.map} +1 -1
  441. package/dist/ui-library/p-2d86ba99.entry.js +2 -0
  442. package/dist/ui-library/p-2d86ba99.entry.js.map +1 -0
  443. package/dist/ui-library/p-31a4a74c.entry.js +2 -0
  444. package/dist/ui-library/p-31a4a74c.entry.js.map +1 -0
  445. package/dist/ui-library/p-3783aed0.entry.js +2 -0
  446. package/dist/ui-library/p-3783aed0.entry.js.map +1 -0
  447. package/dist/ui-library/p-391f10f1.entry.js +2 -0
  448. package/dist/ui-library/p-391f10f1.entry.js.map +1 -0
  449. package/dist/ui-library/p-3dd28dc0.entry.js +2 -0
  450. package/dist/ui-library/{p-23c02c98.entry.js.map → p-3dd28dc0.entry.js.map} +1 -1
  451. package/dist/ui-library/p-3f0f59b6.entry.js +2 -0
  452. package/dist/ui-library/{p-49aa8d1e.entry.js.map → p-3f0f59b6.entry.js.map} +1 -1
  453. package/dist/ui-library/p-46ee280d.entry.js +2 -0
  454. package/dist/ui-library/{p-c2df8c27.entry.js.map → p-46ee280d.entry.js.map} +1 -1
  455. package/dist/ui-library/p-4752a63c.entry.js +2 -0
  456. package/dist/ui-library/{p-7432d409.entry.js.map → p-4752a63c.entry.js.map} +1 -1
  457. package/dist/ui-library/p-4772a9d3.entry.js +2 -0
  458. package/dist/ui-library/{p-a4e4620c.entry.js.map → p-4772a9d3.entry.js.map} +1 -1
  459. package/dist/ui-library/p-48c453f1.entry.js +2 -0
  460. package/dist/ui-library/{p-0e7332db.entry.js.map → p-48c453f1.entry.js.map} +1 -1
  461. package/dist/ui-library/p-4a3ba956.entry.js +2 -0
  462. package/dist/ui-library/{p-fcd57e0a.entry.js.map → p-4a3ba956.entry.js.map} +1 -1
  463. package/dist/ui-library/p-4b154936.entry.js +2 -0
  464. package/dist/ui-library/p-4b154936.entry.js.map +1 -0
  465. package/dist/ui-library/p-5a5f6869.entry.js +2 -0
  466. package/dist/ui-library/{p-a0658b26.entry.js.map → p-5a5f6869.entry.js.map} +1 -1
  467. package/dist/ui-library/{p-c1675a45.entry.js → p-621c2742.entry.js} +2 -2
  468. package/dist/ui-library/p-65778e3d.entry.js +2 -0
  469. package/dist/ui-library/p-65778e3d.entry.js.map +1 -0
  470. package/dist/ui-library/{p-6907a7dc.js → p-67496e8c.js} +2 -2
  471. package/dist/ui-library/p-78529c8c.entry.js +2 -0
  472. package/dist/ui-library/{p-b5ac1219.entry.js.map → p-78529c8c.entry.js.map} +1 -1
  473. package/dist/ui-library/{p-74a714c0.entry.js → p-7eb4bbe7.entry.js} +2 -2
  474. package/dist/ui-library/{p-d310a6dd.entry.js → p-831517cd.entry.js} +2 -2
  475. package/dist/ui-library/{p-0861899a.js → p-862d474e.js} +1 -1
  476. package/dist/ui-library/p-862d474e.js.map +1 -0
  477. package/dist/ui-library/{p-816f857d.entry.js → p-87e197ee.entry.js} +2 -2
  478. package/dist/ui-library/p-88767c27.entry.js +2 -0
  479. package/dist/ui-library/{p-ada23fe3.entry.js.map → p-88767c27.entry.js.map} +1 -1
  480. package/dist/ui-library/p-8c38a7bd.entry.js +2 -0
  481. package/dist/ui-library/{p-c12a94ce.entry.js.map → p-8c38a7bd.entry.js.map} +1 -1
  482. package/dist/ui-library/p-943ce0f2.entry.js +2 -0
  483. package/dist/ui-library/p-943ce0f2.entry.js.map +1 -0
  484. package/dist/ui-library/{p-bee65dd9.entry.js → p-98ce9502.entry.js} +2 -2
  485. package/dist/ui-library/p-98ce9502.entry.js.map +1 -0
  486. package/dist/ui-library/p-a036cc6f.entry.js +2 -0
  487. package/dist/ui-library/{p-3d54ecf2.entry.js.map → p-a036cc6f.entry.js.map} +1 -1
  488. package/dist/ui-library/p-a29f6a0e.entry.js +2 -0
  489. package/dist/ui-library/p-a29f6a0e.entry.js.map +1 -0
  490. package/dist/ui-library/p-a3fd8c74.entry.js +2 -0
  491. package/dist/ui-library/p-a3fd8c74.entry.js.map +1 -0
  492. package/dist/ui-library/p-a919b557.entry.js +2 -0
  493. package/dist/ui-library/p-a919b557.entry.js.map +1 -0
  494. package/dist/ui-library/p-ace4ec84.entry.js +2 -0
  495. package/dist/ui-library/p-ace4ec84.entry.js.map +1 -0
  496. package/dist/ui-library/{p-cd35b3c6.entry.js → p-adf5a4da.entry.js} +2 -2
  497. package/dist/ui-library/{p-9b1ff147.entry.js → p-b5f844f7.entry.js} +2 -2
  498. package/dist/ui-library/p-b5f844f7.entry.js.map +1 -0
  499. package/dist/ui-library/p-b8ea574b.entry.js +2 -0
  500. package/dist/ui-library/p-b8ea574b.entry.js.map +1 -0
  501. package/dist/ui-library/p-ca63a6fa.js +3 -0
  502. package/dist/ui-library/p-ca63a6fa.js.map +1 -0
  503. package/dist/ui-library/{p-d2cf4280.entry.js → p-d221d86a.entry.js} +2 -2
  504. package/dist/ui-library/p-d702b6ec.entry.js +2 -0
  505. package/dist/ui-library/{p-58661675.entry.js.map → p-d702b6ec.entry.js.map} +1 -1
  506. package/dist/ui-library/p-db9d2fde.entry.js +2 -0
  507. package/dist/ui-library/{p-bdb79948.entry.js.map → p-db9d2fde.entry.js.map} +1 -1
  508. package/dist/ui-library/p-e080d5b6.js +2 -0
  509. package/dist/ui-library/p-e080d5b6.js.map +1 -0
  510. package/dist/ui-library/p-e0dd0307.entry.js +2 -0
  511. package/dist/ui-library/{p-3187bc23.entry.js.map → p-e0dd0307.entry.js.map} +1 -1
  512. package/dist/ui-library/p-e340a0ad.entry.js +2 -0
  513. package/dist/ui-library/{p-c07b1240.entry.js.map → p-e340a0ad.entry.js.map} +1 -1
  514. package/dist/ui-library/p-efa14ac2.entry.js +2 -0
  515. package/dist/ui-library/{p-5d43ea07.entry.js.map → p-efa14ac2.entry.js.map} +1 -1
  516. package/dist/ui-library/p-fce214eb.entry.js +2 -0
  517. package/dist/ui-library/{p-911eb578.entry.js.map → p-fce214eb.entry.js.map} +1 -1
  518. package/dist/ui-library/p-fe87f64b.entry.js +2 -0
  519. package/dist/ui-library/p-fe87f64b.entry.js.map +1 -0
  520. package/dist/ui-library/ui-library.css +1 -10
  521. package/dist/ui-library/ui-library.esm.js +1 -1
  522. package/dist/ui-library/ui-library.esm.js.map +1 -1
  523. package/package.json +5 -8
  524. package/dist/cjs/index-3baddcdc.js.map +0 -1
  525. package/dist/cjs/six-checkbox.cjs.entry.js +0 -127
  526. package/dist/cjs/six-checkbox.cjs.entry.js.map +0 -1
  527. package/dist/cjs/six-menu-item.cjs.entry.js +0 -63
  528. package/dist/cjs/six-menu-item.cjs.entry.js.map +0 -1
  529. package/dist/cjs/slot-9821749e.js.map +0 -1
  530. package/dist/cjs/types-0a6d66f6.js.map +0 -1
  531. package/dist/components/six-tag2.js +0 -102
  532. package/dist/components/six-tag2.js.map +0 -1
  533. package/dist/esm/index-17d8173e.js.map +0 -1
  534. package/dist/esm/six-checkbox.entry.js +0 -123
  535. package/dist/esm/six-checkbox.entry.js.map +0 -1
  536. package/dist/esm/six-menu-item.entry.js +0 -59
  537. package/dist/esm/six-menu-item.entry.js.map +0 -1
  538. package/dist/esm/slot-41bc439a.js.map +0 -1
  539. package/dist/esm/types-07748c42.js.map +0 -1
  540. package/dist/ui-library/p-0861899a.js.map +0 -1
  541. package/dist/ui-library/p-0a81b42c.entry.js +0 -2
  542. package/dist/ui-library/p-0a81b42c.entry.js.map +0 -1
  543. package/dist/ui-library/p-0beec94f.js +0 -3
  544. package/dist/ui-library/p-0beec94f.js.map +0 -1
  545. package/dist/ui-library/p-0e7332db.entry.js +0 -2
  546. package/dist/ui-library/p-178f5782.entry.js +0 -2
  547. package/dist/ui-library/p-178f5782.entry.js.map +0 -1
  548. package/dist/ui-library/p-19a61686.entry.js +0 -2
  549. package/dist/ui-library/p-23c02c98.entry.js +0 -2
  550. package/dist/ui-library/p-28221447.entry.js +0 -2
  551. package/dist/ui-library/p-28221447.entry.js.map +0 -1
  552. package/dist/ui-library/p-2eed9d8d.entry.js +0 -2
  553. package/dist/ui-library/p-2eed9d8d.entry.js.map +0 -1
  554. package/dist/ui-library/p-3187bc23.entry.js +0 -2
  555. package/dist/ui-library/p-32e1a5ab.entry.js +0 -2
  556. package/dist/ui-library/p-32e1a5ab.entry.js.map +0 -1
  557. package/dist/ui-library/p-32fed3c7.entry.js +0 -2
  558. package/dist/ui-library/p-32fed3c7.entry.js.map +0 -1
  559. package/dist/ui-library/p-3d54ecf2.entry.js +0 -2
  560. package/dist/ui-library/p-4229f7e8.entry.js +0 -2
  561. package/dist/ui-library/p-4229f7e8.entry.js.map +0 -1
  562. package/dist/ui-library/p-479d8087.entry.js +0 -2
  563. package/dist/ui-library/p-49aa8d1e.entry.js +0 -2
  564. package/dist/ui-library/p-58661675.entry.js +0 -2
  565. package/dist/ui-library/p-5d43ea07.entry.js +0 -2
  566. package/dist/ui-library/p-6aa2929a.entry.js +0 -2
  567. package/dist/ui-library/p-7432d409.entry.js +0 -2
  568. package/dist/ui-library/p-76825395.entry.js +0 -2
  569. package/dist/ui-library/p-76825395.entry.js.map +0 -1
  570. package/dist/ui-library/p-882fbf6f.entry.js +0 -2
  571. package/dist/ui-library/p-88fd4973.entry.js +0 -2
  572. package/dist/ui-library/p-88fd4973.entry.js.map +0 -1
  573. package/dist/ui-library/p-8b750c9e.entry.js +0 -2
  574. package/dist/ui-library/p-8b750c9e.entry.js.map +0 -1
  575. package/dist/ui-library/p-911eb578.entry.js +0 -2
  576. package/dist/ui-library/p-93fcda4a.entry.js +0 -2
  577. package/dist/ui-library/p-93fcda4a.entry.js.map +0 -1
  578. package/dist/ui-library/p-981b3228.entry.js +0 -2
  579. package/dist/ui-library/p-981b3228.entry.js.map +0 -1
  580. package/dist/ui-library/p-9b1ff147.entry.js.map +0 -1
  581. package/dist/ui-library/p-a0658b26.entry.js +0 -2
  582. package/dist/ui-library/p-a4e4620c.entry.js +0 -2
  583. package/dist/ui-library/p-ada23fe3.entry.js +0 -2
  584. package/dist/ui-library/p-b5ac1219.entry.js +0 -2
  585. package/dist/ui-library/p-ba247565.entry.js +0 -2
  586. package/dist/ui-library/p-ba247565.entry.js.map +0 -1
  587. package/dist/ui-library/p-bdb79948.entry.js +0 -2
  588. package/dist/ui-library/p-bee65dd9.entry.js.map +0 -1
  589. package/dist/ui-library/p-c07b1240.entry.js +0 -2
  590. package/dist/ui-library/p-c12a94ce.entry.js +0 -2
  591. package/dist/ui-library/p-c2df8c27.entry.js +0 -2
  592. package/dist/ui-library/p-ce373da5.entry.js +0 -2
  593. package/dist/ui-library/p-dfb6bff6.entry.js +0 -2
  594. package/dist/ui-library/p-dfb6bff6.entry.js.map +0 -1
  595. package/dist/ui-library/p-ee71e3a3.entry.js +0 -2
  596. package/dist/ui-library/p-ef317d69.entry.js +0 -2
  597. package/dist/ui-library/p-ef317d69.entry.js.map +0 -1
  598. package/dist/ui-library/p-f385f1c2.entry.js +0 -2
  599. package/dist/ui-library/p-f385f1c2.entry.js.map +0 -1
  600. package/dist/ui-library/p-faa04bb5.js +0 -2
  601. package/dist/ui-library/p-faa04bb5.js.map +0 -1
  602. package/dist/ui-library/p-fcd57e0a.entry.js +0 -2
  603. /package/dist/ui-library/{p-c86aa5b3.entry.js.map → p-01ae4500.entry.js.map} +0 -0
  604. /package/dist/ui-library/{p-f73a6bdc.entry.js.map → p-0cb135aa.entry.js.map} +0 -0
  605. /package/dist/ui-library/{p-c1675a45.entry.js.map → p-621c2742.entry.js.map} +0 -0
  606. /package/dist/ui-library/{p-6907a7dc.js.map → p-67496e8c.js.map} +0 -0
  607. /package/dist/ui-library/{p-74a714c0.entry.js.map → p-7eb4bbe7.entry.js.map} +0 -0
  608. /package/dist/ui-library/{p-d310a6dd.entry.js.map → p-831517cd.entry.js.map} +0 -0
  609. /package/dist/ui-library/{p-816f857d.entry.js.map → p-87e197ee.entry.js.map} +0 -0
  610. /package/dist/ui-library/{p-cd35b3c6.entry.js.map → p-adf5a4da.entry.js.map} +0 -0
  611. /package/dist/ui-library/{p-d2cf4280.entry.js.map → p-d221d86a.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"six-header.js","sourceRoot":"","sources":["../../../src/components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,CAAC,EAAC,gNAAgN,GAAG;oBAC3N,YAAM,CAAC,EAAC,+BAA+B,GAAG;oBAC1C,YAAM,CAAC,EAAC,2bAA2b,GAAG,CACpc,CACA,CACE,CACX,CAAC;QAEF,OAAO,CACL,EAAC,IAAI;YACH,cAAQ,KAAK,EAAC,YAAY;gBACxB,eAAS,KAAK,EAAC,kBAAkB;oBAC/B,uBAAiB,IAAI,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,GAAI,CACrF;gBAET,IAAI;gBAEL,eAAS,KAAK,EAAC,yBAAyB,GAAG;gBAE3C,eAAS,KAAK,EAAC,oBAAoB;oBACjC,eAAQ,CACA;gBAET,MAAM;gBAEN,aAAa;gBAEb,WAAW;gBAEX,OAAO,CACD;YAET,WACE,KAAK,EAAE;oBACL,0BAA0B,EAAE,IAAI;oBAChC,mCAAmC,EAAE,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC;oBAC3E,yCAAyC,EAAE,IAAI,CAAC,YAAY;iBAC7D;gBAED,YAAM,IAAI,EAAE,IAAI,CAAC,MAAM,GAAI,CACvB,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { getSlot, hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\n\nexport interface SixHeaderAppSwitcherSelectPayload {\n selectedLabel: string;\n name: string;\n item: HTMLSixMenuItemElement;\n}\n\nexport interface SixHeaderProfileSelectPayload {\n selectedLabel: string;\n name: string;\n item: HTMLSixMenuItemElement;\n}\n\nexport interface SixHeaderSearchFieldToggle {\n visible: boolean;\n}\n\nenum Section {\n None,\n Search,\n AppSwitcher,\n Profile,\n}\n\nenum Slot {\n Search = 'search-field',\n Notifications = 'notifications',\n AppSwitcher = 'app-switcher-menu',\n Profile = 'profile-menu',\n Logo = 'logo',\n}\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define a custom component that is included in the header.\n * @slot search-field - Used to define the search field component in the header.\n * @slot notifications - Used to define the notification component in the header.\n * @slot app-switcher-menu - Used to define the application switcher menu in the header.\n * @slot profile-menu - Used to define the profile menu in the header.\n * @slot profile-avatar - Used to define the avator in the header.\n */\n\n@Component({\n tag: 'six-header',\n styleUrl: 'six-header.scss',\n shadow: true,\n assetsDirs: ['assets'],\n})\nexport class SixHeader {\n /** Indicates if content should be shifted down when search field is visible. */\n @Prop() shiftContent = false;\n\n /** Set the hamburger menu icon to open or closed state */\n @Prop() openHamburgerMenu = false;\n\n /** Set the header search to be in an open or closed state */\n @Prop() openSearch = false;\n\n /** Set whether the logo should be clickable */\n @Prop() clickableLogo = false;\n\n @Watch('openSearch')\n handleOpenSearchChange() {\n this.computeSearchOpenState();\n }\n\n /** Sets open state for search */\n @Method()\n async setSearchOpenState(openState: boolean) {\n if (this.selectedSection === Section.Search && !openState) {\n this.selectedSection = Section.None;\n } else if (openState && this.selectedSection !== Section.Search) {\n this.selectedSection = Section.Search;\n }\n }\n\n /** Get open state for search */\n @Method()\n async getIsSearchOpen() {\n return this.selectedSection === Section.Search;\n }\n\n /** Emitted when the name of the selected app is clicked. */\n @Event({ eventName: 'six-header-app-name-clicked' }) sixAppNameClicked!: EventEmitter<EmptyPayload>;\n\n /** Emitted when a menu item is in the app switcher menu is selected. */\n @Event({ eventName: 'six-header-app-switcher-select' })\n sixAppSwitcherSelect!: EventEmitter<SixHeaderAppSwitcherSelectPayload>;\n\n /** Emitted when a menu item is in the profile menu is selected. */\n @Event({ eventName: 'six-header-profile-select' }) sixProfileSelect!: EventEmitter<SixHeaderProfileSelectPayload>;\n\n /** Emitted when the hamburger menu is clicked. */\n @Event({ eventName: 'six-header-hamburger-menu-clicked' }) sixHamburgerClick!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the header logo is clicked. */\n @Event({ eventName: 'six-header-logo-clicked' }) sixLogoClick!: EventEmitter<EmptyPayload>;\n\n /** Emitted when search field is toggled. */\n @Event({ eventName: 'six-header-search-field-toggle' })\n sixSearchFieldToggle!: EventEmitter<SixHeaderSearchFieldToggle>;\n\n @Element() host!: HTMLSixHeaderElement;\n\n private eventListeners = new EventListeners();\n\n private slots?: Record<Slot, boolean>;\n\n private mutationObserver?: MutationObserver;\n\n @State() selectedApp?: string;\n @State() selectedSection?: Section;\n\n private hasSlot(slot: Slot): boolean {\n if (this.slots == null) {\n return false;\n }\n return this.slots[slot];\n }\n\n private isSectionSelected(value: Section) {\n return value === this.selectedSection;\n }\n\n private selectSection(section: Section) {\n return () => (this.selectedSection = section);\n }\n\n private toggleSearch() {\n const visible = this.selectedSection !== Section.Search;\n this.selectedSection = this.selectedSection === Section.Search ? Section.None : Section.Search;\n this.sixSearchFieldToggle.emit({ visible });\n if (this.selectedSection === Section.Search) {\n // setFocus deferred due to https://github.com/ionic-team/stencil/issues/3772\n setTimeout(async () => {\n const slot = getSlot(this.host, Slot.Search);\n slot?.shadowRoot?.querySelector('six-input')?.setFocus();\n }, 50);\n }\n }\n\n private setupMenu = (el?: HTMLSixIconButtonElement) => {\n if (el == null) return;\n\n this.eventListeners.add(el, 'click', () => this.sixHamburgerClick.emit());\n };\n\n private setupLogo = (el?: HTMLElement) => {\n if (!this.clickableLogo || el == null) return;\n\n this.eventListeners.add(el, 'click', () => this.sixLogoClick.emit());\n };\n\n private setupProfile = (el?: HTMLSixDropdownElement) => {\n if (el == null) return;\n\n this.eventListeners.add(el, 'six-dropdown-show', this.selectSection(Section.Profile));\n this.eventListeners.add(el, 'six-dropdown-hide', this.selectSection(Section.None));\n this.eventListeners.add(el, 'six-menu-item-selected', (event: Event) => {\n const { name, item } = (event as CustomEvent).detail;\n this.sixProfileSelect.emit({ selectedLabel: item.innerText, name, item });\n });\n };\n\n private setupAppSwitcher = (el?: HTMLSixDropdownElement) => {\n if (el == null) return;\n\n this.eventListeners.add(el, 'six-dropdown-show', this.selectSection(Section.AppSwitcher));\n this.eventListeners.add(el, 'six-dropdown-hide', this.selectSection(Section.None));\n this.eventListeners.add(el, 'six-menu-item-selected', (event: Event) => {\n const { name, item } = (event as CustomEvent).detail;\n this.selectedApp = item.innerText;\n this.sixAppSwitcherSelect.emit({ selectedLabel: item.innerText, name, item });\n });\n };\n\n private appNameClicked = () => this.sixAppNameClicked.emit();\n\n private computeSearchOpenState = () => {\n this.selectedSection = this.openSearch ? Section.Search : Section.None;\n };\n\n componentWillLoad() {\n this.slots = {\n [Slot.Search]: hasSlot(this.host, Slot.Search),\n [Slot.Notifications]: hasSlot(this.host, Slot.Notifications),\n [Slot.AppSwitcher]: hasSlot(this.host, Slot.AppSwitcher),\n [Slot.Profile]: hasSlot(this.host, Slot.Profile),\n [Slot.Logo]: hasSlot(this.host, Slot.Logo),\n };\n\n if (this.hasSlot(Slot.AppSwitcher)) {\n this.updateSelectedApp();\n }\n\n if (this.hasSlot(Slot.Search)) {\n this.computeSearchOpenState();\n }\n }\n\n connectedCallback() {\n const appSwitcherSlot = getSlot(this.host, Slot.AppSwitcher);\n if (appSwitcherSlot) {\n this.mutationObserver = new MutationObserver((mutations) => {\n if (mutations.some((mutation) => mutation.type === 'childList' || mutation.type === 'attributes')) {\n this.updateSelectedApp();\n }\n });\n this.mutationObserver.observe(appSwitcherSlot, { attributes: true, childList: true, subtree: true });\n }\n }\n\n private updateSelectedApp() {\n // there are more concise ways to select the first checked menu item, but this is one that works for jest\n const element = getSlot(this.host, Slot.AppSwitcher);\n if (element == null) {\n return undefined;\n }\n const items = Array.from(element.querySelectorAll('six-menu-item'));\n const firstCheckedMenuItem = items.find(\n (item) => item.hasAttribute('checked') && item.getAttribute('checked') !== 'false'\n );\n this.selectedApp = firstCheckedMenuItem?.textContent ?? undefined;\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n this.mutationObserver?.disconnect();\n }\n\n render() {\n const search = this.hasSlot(Slot.Search) && (\n <section\n class={{\n 'six-header__search': true,\n 'six-header__search--open': this.isSectionSelected(Section.Search),\n }}\n >\n <six-icon-button name=\"search\" onClick={() => this.toggleSearch()} data-testid=\"search-trigger\" />\n </section>\n );\n\n const notifications = this.hasSlot(Slot.Notifications) && (\n <section class=\"six-header__notification\">\n <slot name={Slot.Notifications} />\n </section>\n );\n\n const appSwitcher = this.hasSlot(Slot.AppSwitcher) && (\n <section\n class={{\n 'six-header__app-switcher': true,\n 'six-header__app-switcher--open': this.isSectionSelected(Section.AppSwitcher),\n }}\n >\n <a onClick={this.appNameClicked} class=\"six-header__selected-app\">\n {this.selectedApp}\n </a>\n <six-dropdown distance={13} skidding={20} placement=\"bottom-end\" ref={this.setupAppSwitcher}>\n <six-icon-button name=\"apps\" slot=\"trigger\" />\n <slot name={Slot.AppSwitcher} />\n </six-dropdown>\n </section>\n );\n\n const profile = this.hasSlot(Slot.Profile) && (\n <section\n class={{\n 'six-header__profile': true,\n 'six-header__profile--open': this.isSectionSelected(Section.Profile),\n }}\n >\n <six-dropdown distance={17} skidding={20} placement=\"bottom-end\" ref={this.setupProfile}>\n <slot name=\"profile-avatar\" slot=\"trigger\" />\n <slot name=\"profile-menu\" />\n </six-dropdown>\n </section>\n );\n\n const logo = this.hasSlot(Slot.Logo) ? (\n <section>\n <slot name=\"logo\" />\n </section>\n ) : (\n <section\n class={{\n 'six-header__logo': true,\n 'six-header__logo--clickable': this.clickableLogo,\n }}\n ref={this.setupLogo}\n >\n <svg height=\"20\" viewBox=\"0 0 90 26\" xmlns=\"http://www.w3.org/2000/svg\">\n <title>SIX</title>\n <g fill=\"#DE3919\" fill-rule=\"nonzero\">\n <path d=\"m22.798 3.869c1.82-2.168 4.549-3.545 7.6-3.545h6.807v4.961h-6.807c-1.526 0-2.89.689-3.8 1.771l-12.19 14.526c-1.82 2.166-4.549 3.545-7.6 3.545h-6.808v-4.961h6.808c1.525 0 2.889-.689 3.799-1.773l12.191-14.525\" />\n <path d=\"m42.16.324h5.21v24.806h-5.21z\" />\n <path d=\"m66.743 3.869l4.195 4.999 4.195-4.999c1.819-2.168 4.549-3.545 7.6-3.545h6.806v4.961h-6.806c-1.526 0-2.89.689-3.8 1.771l-4.758 5.669 4.758 5.669c.91 1.084 2.274 1.773 3.8 1.773h6.806v4.961h-6.806c-3.051 0-5.781-1.379-7.6-3.545l-4.195-4.999-4.195 4.999c-1.82 2.166-4.55 3.545-7.6 3.545h-6.807v-4.961h6.807c1.525 0 2.889-.689 3.799-1.773l4.758-5.669-4.758-5.669c-.91-1.083-2.274-1.771-3.799-1.771h-6.807v-4.961h6.807c3.05 0 5.78 1.378 7.6 3.545\" />\n </g>\n </svg>\n </section>\n );\n\n return (\n <Host>\n <header class=\"six-header\">\n <section class=\"six-header__menu\">\n <six-icon-button name={this.openHamburgerMenu ? 'menu_open' : 'menu'} ref={this.setupMenu} />\n </section>\n\n {logo}\n\n <section class=\"six-header__placeholder\" />\n\n <section class=\"six-header__custom\">\n <slot />\n </section>\n\n {search}\n\n {notifications}\n\n {appSwitcher}\n\n {profile}\n </header>\n\n <div\n class={{\n 'six-header__search-field': true,\n 'six-header__search-field--visible': this.isSectionSelected(Section.Search),\n 'six-header__search-field--shift-content': this.shiftContent,\n }}\n >\n <slot name={Slot.Search} />\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"six-header.js","sourceRoot":"","sources":["../../../src/components/six-header/six-header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAA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ventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { getSlot, hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\n\nexport interface SixHeaderAppSwitcherSelectPayload {\n selectedLabel: string;\n name: string;\n item: HTMLSixMenuItemElement;\n}\n\nexport interface SixHeaderProfileSelectPayload {\n selectedLabel: string;\n name: string;\n item: HTMLSixMenuItemElement;\n}\n\nexport interface SixHeaderSearchFieldToggle {\n visible: boolean;\n}\n\nenum Section {\n None,\n Search,\n AppSwitcher,\n Profile,\n}\n\nenum Slot {\n Search = 'search-field',\n Notifications = 'notifications',\n AppSwitcher = 'app-switcher-menu',\n Profile = 'profile-menu',\n Logo = 'logo',\n}\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define a custom component that is included in the header.\n * @slot search-field - Used to define the search field component in the header.\n * @slot notifications - Used to define the notification component in the header.\n * @slot app-switcher-menu - Used to define the application switcher menu in the header.\n * @slot profile-menu - Used to define the profile menu in the header.\n * @slot profile-avatar - Used to define the avator in the header.\n */\n\n@Component({\n tag: 'six-header',\n styleUrl: 'six-header.scss',\n shadow: true,\n assetsDirs: ['assets'],\n})\nexport class SixHeader {\n /** Indicates if content should be shifted down when search field is visible. */\n @Prop() shiftContent = false;\n\n /** Set whether the hamburger menu should be visible or not */\n @Prop() hideHamburgerMenu = false;\n\n /** Set the hamburger menu icon to open or closed state */\n @Prop() openHamburgerMenu = false;\n\n /** Set the header search to be in an open or closed state */\n @Prop() openSearch = false;\n\n /** Set whether the logo should be clickable */\n @Prop() clickableLogo = false;\n\n @Watch('openSearch')\n handleOpenSearchChange() {\n this.computeSearchOpenState();\n }\n\n /** Sets open state for search */\n @Method()\n async setSearchOpenState(openState: boolean) {\n if (this.selectedSection === Section.Search && !openState) {\n this.selectedSection = Section.None;\n } else if (openState && this.selectedSection !== Section.Search) {\n this.selectedSection = Section.Search;\n }\n }\n\n /** Get open state for search */\n @Method()\n async getIsSearchOpen() {\n return this.selectedSection === Section.Search;\n }\n\n /** Emitted when the name of the selected app is clicked. */\n @Event({ eventName: 'six-header-app-name-clicked' }) sixAppNameClicked!: EventEmitter<EmptyPayload>;\n\n /** Emitted when a menu item is in the app switcher menu is selected. */\n @Event({ eventName: 'six-header-app-switcher-select' })\n sixAppSwitcherSelect!: EventEmitter<SixHeaderAppSwitcherSelectPayload>;\n\n /** Emitted when a menu item is in the profile menu is selected. */\n @Event({ eventName: 'six-header-profile-select' }) sixProfileSelect!: EventEmitter<SixHeaderProfileSelectPayload>;\n\n /** Emitted when the hamburger menu is clicked. */\n @Event({ eventName: 'six-header-hamburger-menu-clicked' }) sixHamburgerClick!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the header logo is clicked. */\n @Event({ eventName: 'six-header-logo-clicked' }) sixLogoClick!: EventEmitter<EmptyPayload>;\n\n /** Emitted when search field is toggled. */\n @Event({ eventName: 'six-header-search-field-toggle' })\n sixSearchFieldToggle!: EventEmitter<SixHeaderSearchFieldToggle>;\n\n @Element() host!: HTMLSixHeaderElement;\n\n private eventListeners = new EventListeners();\n\n private slots?: Record<Slot, boolean>;\n\n private mutationObserver?: MutationObserver;\n\n @State() selectedApp?: string;\n @State() selectedSection?: Section;\n\n private hasSlot(slot: Slot): boolean {\n if (this.slots == null) {\n return false;\n }\n return this.slots[slot];\n }\n\n private isSectionSelected(value: Section) {\n return value === this.selectedSection;\n }\n\n private selectSection(section: Section) {\n return () => (this.selectedSection = section);\n }\n\n private toggleSearch() {\n const visible = this.selectedSection !== Section.Search;\n this.selectedSection = this.selectedSection === Section.Search ? Section.None : Section.Search;\n this.sixSearchFieldToggle.emit({ visible });\n if (this.selectedSection === Section.Search) {\n // setFocus deferred due to https://github.com/ionic-team/stencil/issues/3772\n setTimeout(async () => {\n const slot = getSlot(this.host, Slot.Search);\n slot?.shadowRoot?.querySelector('six-input')?.setFocus();\n }, 50);\n }\n }\n\n private setupMenu = (el?: HTMLSixIconButtonElement) => {\n if (el == null) return;\n\n this.eventListeners.add(el, 'click', () => this.sixHamburgerClick.emit());\n };\n\n private setupLogo = (el?: HTMLElement) => {\n if (!this.clickableLogo || el == null) return;\n\n this.eventListeners.add(el, 'click', () => this.sixLogoClick.emit());\n };\n\n private setupProfile = (el?: HTMLSixDropdownElement) => {\n if (el == null) return;\n\n this.eventListeners.add(el, 'six-dropdown-show', this.selectSection(Section.Profile));\n this.eventListeners.add(el, 'six-dropdown-hide', this.selectSection(Section.None));\n this.eventListeners.add(el, 'six-menu-item-selected', (event: Event) => {\n const { name, item } = (event as CustomEvent).detail;\n this.sixProfileSelect.emit({ selectedLabel: item.innerText, name, item });\n });\n };\n\n private setupAppSwitcher = (el?: HTMLSixDropdownElement) => {\n if (el == null) return;\n\n this.eventListeners.add(el, 'six-dropdown-show', this.selectSection(Section.AppSwitcher));\n this.eventListeners.add(el, 'six-dropdown-hide', this.selectSection(Section.None));\n this.eventListeners.add(el, 'six-menu-item-selected', (event: Event) => {\n const { name, item } = (event as CustomEvent).detail;\n this.selectedApp = item.innerText;\n this.sixAppSwitcherSelect.emit({ selectedLabel: item.innerText, name, item });\n });\n };\n\n private appNameClicked = () => this.sixAppNameClicked.emit();\n\n private computeSearchOpenState = () => {\n this.selectedSection = this.openSearch ? Section.Search : Section.None;\n };\n\n componentWillLoad() {\n this.slots = {\n [Slot.Search]: hasSlot(this.host, Slot.Search),\n [Slot.Notifications]: hasSlot(this.host, Slot.Notifications),\n [Slot.AppSwitcher]: hasSlot(this.host, Slot.AppSwitcher),\n [Slot.Profile]: hasSlot(this.host, Slot.Profile),\n [Slot.Logo]: hasSlot(this.host, Slot.Logo),\n };\n\n if (this.hasSlot(Slot.AppSwitcher)) {\n this.updateSelectedApp();\n }\n\n if (this.hasSlot(Slot.Search)) {\n this.computeSearchOpenState();\n }\n }\n\n connectedCallback() {\n const appSwitcherSlot = getSlot(this.host, Slot.AppSwitcher);\n if (appSwitcherSlot) {\n this.mutationObserver = new MutationObserver((mutations) => {\n if (mutations.some((mutation) => mutation.type === 'childList' || mutation.type === 'attributes')) {\n this.updateSelectedApp();\n }\n });\n this.mutationObserver.observe(appSwitcherSlot, { attributes: true, childList: true, subtree: true });\n }\n }\n\n private updateSelectedApp() {\n // there are more concise ways to select the first checked menu item, but this is one that works for jest\n const element = getSlot(this.host, Slot.AppSwitcher);\n if (element == null) {\n return undefined;\n }\n const items = Array.from(element.querySelectorAll('six-menu-item'));\n const firstCheckedMenuItem = items.find(\n (item) => item.hasAttribute('checked') && item.getAttribute('checked') !== 'false'\n );\n this.selectedApp = firstCheckedMenuItem?.textContent ?? undefined;\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n this.mutationObserver?.disconnect();\n }\n\n render() {\n const hamburgerMenu = !this.hideHamburgerMenu && (\n <section class=\"six-header__menu\">\n <six-icon-button name={this.openHamburgerMenu ? 'menu_open' : 'menu'} ref={this.setupMenu} />\n </section>\n );\n\n const search = this.hasSlot(Slot.Search) && (\n <section\n class={{\n 'six-header__search': true,\n 'six-header__search--open': this.isSectionSelected(Section.Search),\n }}\n >\n <six-icon-button name=\"search\" onClick={() => this.toggleSearch()} data-testid=\"search-trigger\" />\n </section>\n );\n\n const notifications = this.hasSlot(Slot.Notifications) && (\n <section class=\"six-header__notification\">\n <slot name={Slot.Notifications} />\n </section>\n );\n\n const appSwitcher = this.hasSlot(Slot.AppSwitcher) && (\n <section\n class={{\n 'six-header__app-switcher': true,\n 'six-header__app-switcher--open': this.isSectionSelected(Section.AppSwitcher),\n }}\n >\n <six-dropdown distance={13} skidding={20} placement=\"bottom-end\" ref={this.setupAppSwitcher}>\n <div slot=\"trigger\" class=\"six-header__app-switcher-dropdown\">\n <a onClick={this.appNameClicked} class=\"six-header__selected-app\">\n {this.selectedApp}\n </a>\n <six-icon-button name=\"apps\" />\n </div>\n <slot name={Slot.AppSwitcher} />\n </six-dropdown>\n </section>\n );\n\n const profile = this.hasSlot(Slot.Profile) && (\n <section\n class={{\n 'six-header__profile': true,\n 'six-header__profile--open': this.isSectionSelected(Section.Profile),\n }}\n >\n <six-dropdown distance={17} skidding={20} placement=\"bottom-end\" ref={this.setupProfile}>\n <slot name=\"profile-avatar\" slot=\"trigger\" />\n <slot name=\"profile-menu\" />\n </six-dropdown>\n </section>\n );\n\n const logo = this.hasSlot(Slot.Logo) ? (\n <section>\n <slot name=\"logo\" />\n </section>\n ) : (\n <section\n class={{\n 'six-header__logo': true,\n 'six-header__logo--clickable': this.clickableLogo,\n }}\n ref={this.setupLogo}\n >\n <svg height=\"20\" viewBox=\"0 0 90 26\" xmlns=\"http://www.w3.org/2000/svg\">\n <title>SIX</title>\n <g fill=\"#DE3919\" fill-rule=\"nonzero\">\n <path d=\"m22.798 3.869c1.82-2.168 4.549-3.545 7.6-3.545h6.807v4.961h-6.807c-1.526 0-2.89.689-3.8 1.771l-12.19 14.526c-1.82 2.166-4.549 3.545-7.6 3.545h-6.808v-4.961h6.808c1.525 0 2.889-.689 3.799-1.773l12.191-14.525\" />\n <path d=\"m42.16.324h5.21v24.806h-5.21z\" />\n <path d=\"m66.743 3.869l4.195 4.999 4.195-4.999c1.819-2.168 4.549-3.545 7.6-3.545h6.806v4.961h-6.806c-1.526 0-2.89.689-3.8 1.771l-4.758 5.669 4.758 5.669c.91 1.084 2.274 1.773 3.8 1.773h6.806v4.961h-6.806c-3.051 0-5.781-1.379-7.6-3.545l-4.195-4.999-4.195 4.999c-1.82 2.166-4.55 3.545-7.6 3.545h-6.807v-4.961h6.807c1.525 0 2.889-.689 3.799-1.773l4.758-5.669-4.758-5.669c-.91-1.083-2.274-1.771-3.799-1.771h-6.807v-4.961h6.807c3.05 0 5.78 1.378 7.6 3.545\" />\n </g>\n </svg>\n </section>\n );\n\n return (\n <Host>\n <header class=\"six-header\">\n {hamburgerMenu}\n\n {logo}\n\n <section class=\"six-header__placeholder\" />\n\n <section class=\"six-header__custom\">\n <slot />\n </section>\n\n {search}\n\n {notifications}\n\n {appSwitcher}\n\n {profile}\n </header>\n\n <div\n class={{\n 'six-header__search-field': true,\n 'six-header__search-field--visible': this.isSectionSelected(Section.Search),\n 'six-header__search-field--shift-content': this.shiftContent,\n }}\n >\n <slot name={Slot.Search} />\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -119,9 +119,11 @@ describe('six-header', () => {
119
119
  <slot></slot>
120
120
  </section>
121
121
  <section class="six-header__app-switcher">
122
- <a class="six-header__selected-app">Swiss Interbank Clearing</a>
123
122
  <six-dropdown distance="13" placement="bottom-end" skidding="20">
124
- <six-icon-button name="apps" slot="trigger"></six-icon-button>
123
+ <div class="six-header__app-switcher-dropdown" slot="trigger">
124
+ <a class="six-header__selected-app">Swiss Interbank Clearing</a>
125
+ <six-icon-button name="apps"></six-icon-button>
126
+ </div>
125
127
  <slot name="app-switcher-menu"></slot>
126
128
  </six-dropdown>
127
129
  </section>
@@ -137,5 +139,39 @@ describe('six-header', () => {
137
139
  </six-header>
138
140
  `);
139
141
  });
142
+ it('renders without hamburger menu', async () => {
143
+ const page = await newSpecPage({
144
+ components: [SixHeader],
145
+ html: `<six-header hide-hamburger-menu="true"></six-header>`,
146
+ });
147
+ expect(page.root).toEqualHtml(`
148
+ <six-header hide-hamburger-menu="true">
149
+ <mock:shadow-root>
150
+ <header class="six-header">
151
+ <section class="six-header__logo">
152
+ <svg height="20" viewBox="0 0 90 26" xmlns="http://www.w3.org/2000/svg">
153
+ <title>
154
+ SIX
155
+ </title>
156
+ <g fill="#DE3919" fill-rule="nonzero">
157
+ <path d="m22.798 3.869c1.82-2.168 4.549-3.545 7.6-3.545h6.807v4.961h-6.807c-1.526 0-2.89.689-3.8 1.771l-12.19 14.526c-1.82 2.166-4.549 3.545-7.6 3.545h-6.808v-4.961h6.808c1.525 0 2.889-.689 3.799-1.773l12.191-14.525"></path>
158
+ <path d="m42.16.324h5.21v24.806h-5.21z"></path>
159
+ <path d="m66.743 3.869l4.195 4.999 4.195-4.999c1.819-2.168 4.549-3.545 7.6-3.545h6.806v4.961h-6.806c-1.526 0-2.89.689-3.8 1.771l-4.758 5.669 4.758 5.669c.91 1.084 2.274 1.773 3.8 1.773h6.806v4.961h-6.806c-3.051 0-5.781-1.379-7.6-3.545l-4.195-4.999-4.195 4.999c-1.82 2.166-4.55 3.545-7.6 3.545h-6.807v-4.961h6.807c1.525 0 2.889-.689 3.799-1.773l4.758-5.669-4.758-5.669c-.91-1.083-2.274-1.771-3.799-1.771h-6.807v-4.961h6.807c3.05 0 5.78 1.378 7.6 3.545"></path>
160
+ </g>
161
+ </svg>
162
+
163
+ </section>
164
+ <section class="six-header__placeholder"></section>
165
+ <section class="six-header__custom">
166
+ <slot></slot>
167
+ </section>
168
+ </header>
169
+ <div class="six-header__search-field">
170
+ <slot name="search-field"></slot>
171
+ </div>
172
+ </mock:shadow-root>
173
+ </six-header>
174
+ `);
175
+ });
140
176
  });
141
177
  //# sourceMappingURL=six-header.spec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"six-header.spec.js","sourceRoot":"","sources":["../../../../src/components/six-header/test/six-header.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,UAAU,CAAC,GAAG,EAAE;QACd,MAAM,oBAAoB,GAAG,IAAI,CAAC,EAAE,CAAC,SAAS,gBAAgB;YAC5D,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;YACzB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;YAC5B,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,gBAAgB,GAAG,oBAAoB,CAAC;IACjD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,SAAS,CAAC;YACvB,IAAI,EAAE,2BAA2B;SAClC,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8B7B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4BAA4B,EAAE,KAAK,IAAI,EAAE;QAC1C,QAAQ;QACR,MAAM,IAAI,GAAG,6DAA6D,CAAC;QAE3E,OAAO;QACP,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,SAAS,CAAC;YACvB,IAAI,EAAE,IAAI;SACX,CAAC,CAAC;QAEH,OAAO;QACP,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;KAuB7B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4BAA4B,EAAE,KAAK,IAAI,EAAE;QAC1C,QAAQ;QACR,MAAM,IAAI,GAAG;;;;;gCAKe,CAAC;QAE7B,OAAO;QACP,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,SAAS,CAAC;YACvB,IAAI,EAAE,IAAI;SACX,CAAC,CAAC;QAEH,OAAO;QACP,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAyC7B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { SixHeader } from '../six-header';\n\ndescribe('six-header', () => {\n beforeEach(() => {\n const mutationObserverMock = jest.fn(function MutationObserver(this: MutationObserver): MutationObserver {\n this.observe = jest.fn();\n this.disconnect = jest.fn();\n return this;\n });\n global.MutationObserver = mutationObserverMock;\n });\n\n it('renders', async () => {\n const page = await newSpecPage({\n components: [SixHeader],\n html: `<six-header></six-header>`,\n });\n expect(page.root).toEqualHtml(`\n <six-header>\n <mock:shadow-root>\n <header class=\"six-header\">\n <section class=\"six-header__menu\">\n <six-icon-button name=\"menu\"></six-icon-button>\n </section>\n <section class=\"six-header__logo\">\n <svg height=\"20\" viewBox=\"0 0 90 26\" xmlns=\"http://www.w3.org/2000/svg\">\n <title>\n SIX\n </title>\n <g fill=\"#DE3919\" fill-rule=\"nonzero\">\n <path d=\"m22.798 3.869c1.82-2.168 4.549-3.545 7.6-3.545h6.807v4.961h-6.807c-1.526 0-2.89.689-3.8 1.771l-12.19 14.526c-1.82 2.166-4.549 3.545-7.6 3.545h-6.808v-4.961h6.808c1.525 0 2.889-.689 3.799-1.773l12.191-14.525\"></path>\n <path d=\"m42.16.324h5.21v24.806h-5.21z\"></path>\n <path d=\"m66.743 3.869l4.195 4.999 4.195-4.999c1.819-2.168 4.549-3.545 7.6-3.545h6.806v4.961h-6.806c-1.526 0-2.89.689-3.8 1.771l-4.758 5.669 4.758 5.669c.91 1.084 2.274 1.773 3.8 1.773h6.806v4.961h-6.806c-3.051 0-5.781-1.379-7.6-3.545l-4.195-4.999-4.195 4.999c-1.82 2.166-4.55 3.545-7.6 3.545h-6.807v-4.961h6.807c1.525 0 2.889-.689 3.799-1.773l4.758-5.669-4.758-5.669c-.91-1.083-2.274-1.771-3.799-1.771h-6.807v-4.961h6.807c3.05 0 5.78 1.378 7.6 3.545\"></path>\n </g>\n </svg>\n\n </section>\n <section class=\"six-header__placeholder\"></section>\n <section class=\"six-header__custom\">\n <slot></slot>\n </section>\n </header>\n <div class=\"six-header__search-field\">\n <slot name=\"search-field\"></slot>\n </div>\n </mock:shadow-root>\n </six-header>\n `);\n });\n\n it('should render custom logo ', async () => {\n // given\n const html = `<six-header><div slot=\"logo\">custom logo</div></six-header>`;\n\n // when\n const page = await newSpecPage({\n components: [SixHeader],\n html: html,\n });\n\n // then\n expect(page.root).toEqualHtml(`\n <six-header>\n <mock:shadow-root>\n <header class=\"six-header\">\n <section class=\"six-header__menu\">\n <six-icon-button name=\"menu\"></six-icon-button>\n </section>\n <section>\n <slot name=\"logo\"></slot>\n </section>\n <section class=\"six-header__placeholder\"></section>\n <section class=\"six-header__custom\">\n <slot></slot>\n </section>\n </header>\n <div class=\"six-header__search-field\">\n <slot name=\"search-field\"></slot>\n </div>\n </mock:shadow-root>\n <div slot=\"logo\">\n custom logo\n </div>\n </six-header>\n `);\n });\n\n it('should render app switcher', async () => {\n // given\n const html = `<six-header>\n <six-menu slot=\"app-switcher-menu\">\n <six-menu-item checked=\"false\">Custody</six-menu-item>\n <six-menu-item checked=\"true\">Swiss Interbank Clearing</six-menu-item>\n </six-menu>\n </six-header>`;\n\n // when\n const page = await newSpecPage({\n components: [SixHeader],\n html: html,\n });\n\n // then\n expect(page.root).toEqualHtml(`\n <six-header>\n <mock:shadow-root>\n <header class=\"six-header\">\n <section class=\"six-header__menu\">\n <six-icon-button name=\"menu\"></six-icon-button>\n </section>\n <section class=\"six-header__logo\">\n <svg height=\"20\" viewBox=\"0 0 90 26\" xmlns=\"http://www.w3.org/2000/svg\">\n <title>\n SIX\n </title>\n <g fill=\"#DE3919\" fill-rule=\"nonzero\">\n <path d=\"m22.798 3.869c1.82-2.168 4.549-3.545 7.6-3.545h6.807v4.961h-6.807c-1.526 0-2.89.689-3.8 1.771l-12.19 14.526c-1.82 2.166-4.549 3.545-7.6 3.545h-6.808v-4.961h6.808c1.525 0 2.889-.689 3.799-1.773l12.191-14.525\"></path>\n <path d=\"m42.16.324h5.21v24.806h-5.21z\"></path>\n <path d=\"m66.743 3.869l4.195 4.999 4.195-4.999c1.819-2.168 4.549-3.545 7.6-3.545h6.806v4.961h-6.806c-1.526 0-2.89.689-3.8 1.771l-4.758 5.669 4.758 5.669c.91 1.084 2.274 1.773 3.8 1.773h6.806v4.961h-6.806c-3.051 0-5.781-1.379-7.6-3.545l-4.195-4.999-4.195 4.999c-1.82 2.166-4.55 3.545-7.6 3.545h-6.807v-4.961h6.807c1.525 0 2.889-.689 3.799-1.773l4.758-5.669-4.758-5.669c-.91-1.083-2.274-1.771-3.799-1.771h-6.807v-4.961h6.807c3.05 0 5.78 1.378 7.6 3.545\"></path>\n </g>\n </svg>\n\n </section>\n <section class=\"six-header__placeholder\"></section>\n <section class=\"six-header__custom\">\n <slot></slot>\n </section>\n <section class=\"six-header__app-switcher\">\n <a class=\"six-header__selected-app\">Swiss Interbank Clearing</a>\n <six-dropdown distance=\"13\" placement=\"bottom-end\" skidding=\"20\">\n <six-icon-button name=\"apps\" slot=\"trigger\"></six-icon-button>\n <slot name=\"app-switcher-menu\"></slot>\n </six-dropdown>\n </section>\n </header>\n <div class=\"six-header__search-field\">\n <slot name=\"search-field\"></slot>\n </div>\n </mock:shadow-root>\n <six-menu slot=\"app-switcher-menu\">\n <six-menu-item checked=\"false\">Custody</six-menu-item>\n <six-menu-item checked=\"true\">Swiss Interbank Clearing</six-menu-item>\n </six-menu>\n </six-header>\n `);\n });\n});\n"]}
1
+ {"version":3,"file":"six-header.spec.js","sourceRoot":"","sources":["../../../../src/components/six-header/test/six-header.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,UAAU,CAAC,GAAG,EAAE;QACd,MAAM,oBAAoB,GAAG,IAAI,CAAC,EAAE,CAAC,SAAS,gBAAgB;YAC5D,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;YACzB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;YAC5B,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,gBAAgB,GAAG,oBAAoB,CAAC;IACjD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,SAAS,EAA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AAC;QAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2B/B,CAAC,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { SixHeader } from '../six-header';\n\ndescribe('six-header', () => {\n beforeEach(() => {\n const mutationObserverMock = jest.fn(function MutationObserver(this: MutationObserver): MutationObserver {\n this.observe = jest.fn();\n this.disconnect = jest.fn();\n return this;\n });\n global.MutationObserver = mutationObserverMock;\n });\n\n it('renders', async () => {\n const page = await newSpecPage({\n components: [SixHeader],\n html: `<six-header></six-header>`,\n });\n expect(page.root).toEqualHtml(`\n <six-header>\n <mock:shadow-root>\n <header class=\"six-header\">\n <section class=\"six-header__menu\">\n <six-icon-button name=\"menu\"></six-icon-button>\n </section>\n <section class=\"six-header__logo\">\n <svg height=\"20\" viewBox=\"0 0 90 26\" xmlns=\"http://www.w3.org/2000/svg\">\n <title>\n SIX\n </title>\n <g fill=\"#DE3919\" fill-rule=\"nonzero\">\n <path d=\"m22.798 3.869c1.82-2.168 4.549-3.545 7.6-3.545h6.807v4.961h-6.807c-1.526 0-2.89.689-3.8 1.771l-12.19 14.526c-1.82 2.166-4.549 3.545-7.6 3.545h-6.808v-4.961h6.808c1.525 0 2.889-.689 3.799-1.773l12.191-14.525\"></path>\n <path d=\"m42.16.324h5.21v24.806h-5.21z\"></path>\n <path d=\"m66.743 3.869l4.195 4.999 4.195-4.999c1.819-2.168 4.549-3.545 7.6-3.545h6.806v4.961h-6.806c-1.526 0-2.89.689-3.8 1.771l-4.758 5.669 4.758 5.669c.91 1.084 2.274 1.773 3.8 1.773h6.806v4.961h-6.806c-3.051 0-5.781-1.379-7.6-3.545l-4.195-4.999-4.195 4.999c-1.82 2.166-4.55 3.545-7.6 3.545h-6.807v-4.961h6.807c1.525 0 2.889-.689 3.799-1.773l4.758-5.669-4.758-5.669c-.91-1.083-2.274-1.771-3.799-1.771h-6.807v-4.961h6.807c3.05 0 5.78 1.378 7.6 3.545\"></path>\n </g>\n </svg>\n\n </section>\n <section class=\"six-header__placeholder\"></section>\n <section class=\"six-header__custom\">\n <slot></slot>\n </section>\n </header>\n <div class=\"six-header__search-field\">\n <slot name=\"search-field\"></slot>\n </div>\n </mock:shadow-root>\n </six-header>\n `);\n });\n\n it('should render custom logo ', async () => {\n // given\n const html = `<six-header><div slot=\"logo\">custom logo</div></six-header>`;\n\n // when\n const page = await newSpecPage({\n components: [SixHeader],\n html: html,\n });\n\n // then\n expect(page.root).toEqualHtml(`\n <six-header>\n <mock:shadow-root>\n <header class=\"six-header\">\n <section class=\"six-header__menu\">\n <six-icon-button name=\"menu\"></six-icon-button>\n </section>\n <section>\n <slot name=\"logo\"></slot>\n </section>\n <section class=\"six-header__placeholder\"></section>\n <section class=\"six-header__custom\">\n <slot></slot>\n </section>\n </header>\n <div class=\"six-header__search-field\">\n <slot name=\"search-field\"></slot>\n </div>\n </mock:shadow-root>\n <div slot=\"logo\">\n custom logo\n </div>\n </six-header>\n `);\n });\n\n it('should render app switcher', async () => {\n // given\n const html = `<six-header>\n <six-menu slot=\"app-switcher-menu\">\n <six-menu-item checked=\"false\">Custody</six-menu-item>\n <six-menu-item checked=\"true\">Swiss Interbank Clearing</six-menu-item>\n </six-menu>\n </six-header>`;\n\n // when\n const page = await newSpecPage({\n components: [SixHeader],\n html: html,\n });\n\n // then\n expect(page.root).toEqualHtml(`\n <six-header>\n <mock:shadow-root>\n <header class=\"six-header\">\n <section class=\"six-header__menu\">\n <six-icon-button name=\"menu\"></six-icon-button>\n </section>\n <section class=\"six-header__logo\">\n <svg height=\"20\" viewBox=\"0 0 90 26\" xmlns=\"http://www.w3.org/2000/svg\">\n <title>\n SIX\n </title>\n <g fill=\"#DE3919\" fill-rule=\"nonzero\">\n <path d=\"m22.798 3.869c1.82-2.168 4.549-3.545 7.6-3.545h6.807v4.961h-6.807c-1.526 0-2.89.689-3.8 1.771l-12.19 14.526c-1.82 2.166-4.549 3.545-7.6 3.545h-6.808v-4.961h6.808c1.525 0 2.889-.689 3.799-1.773l12.191-14.525\"></path>\n <path d=\"m42.16.324h5.21v24.806h-5.21z\"></path>\n <path d=\"m66.743 3.869l4.195 4.999 4.195-4.999c1.819-2.168 4.549-3.545 7.6-3.545h6.806v4.961h-6.806c-1.526 0-2.89.689-3.8 1.771l-4.758 5.669 4.758 5.669c.91 1.084 2.274 1.773 3.8 1.773h6.806v4.961h-6.806c-3.051 0-5.781-1.379-7.6-3.545l-4.195-4.999-4.195 4.999c-1.82 2.166-4.55 3.545-7.6 3.545h-6.807v-4.961h6.807c1.525 0 2.889-.689 3.799-1.773l4.758-5.669-4.758-5.669c-.91-1.083-2.274-1.771-3.799-1.771h-6.807v-4.961h6.807c3.05 0 5.78 1.378 7.6 3.545\"></path>\n </g>\n </svg>\n\n </section>\n <section class=\"six-header__placeholder\"></section>\n <section class=\"six-header__custom\">\n <slot></slot>\n </section>\n <section class=\"six-header__app-switcher\">\n <six-dropdown distance=\"13\" placement=\"bottom-end\" skidding=\"20\">\n <div class=\"six-header__app-switcher-dropdown\" slot=\"trigger\">\n <a class=\"six-header__selected-app\">Swiss Interbank Clearing</a>\n <six-icon-button name=\"apps\"></six-icon-button>\n </div>\n <slot name=\"app-switcher-menu\"></slot>\n </six-dropdown>\n </section>\n </header>\n <div class=\"six-header__search-field\">\n <slot name=\"search-field\"></slot>\n </div>\n </mock:shadow-root>\n <six-menu slot=\"app-switcher-menu\">\n <six-menu-item checked=\"false\">Custody</six-menu-item>\n <six-menu-item checked=\"true\">Swiss Interbank Clearing</six-menu-item>\n </six-menu>\n </six-header>\n `);\n });\n\n it('renders without hamburger menu', async () => {\n const page = await newSpecPage({\n components: [SixHeader],\n html: `<six-header hide-hamburger-menu=\"true\"></six-header>`,\n });\n\n expect(page.root).toEqualHtml(`\n <six-header hide-hamburger-menu=\"true\">\n <mock:shadow-root>\n <header class=\"six-header\">\n <section class=\"six-header__logo\">\n <svg height=\"20\" viewBox=\"0 0 90 26\" xmlns=\"http://www.w3.org/2000/svg\">\n <title>\n SIX\n </title>\n <g fill=\"#DE3919\" fill-rule=\"nonzero\">\n <path d=\"m22.798 3.869c1.82-2.168 4.549-3.545 7.6-3.545h6.807v4.961h-6.807c-1.526 0-2.89.689-3.8 1.771l-12.19 14.526c-1.82 2.166-4.549 3.545-7.6 3.545h-6.808v-4.961h6.808c1.525 0 2.889-.689 3.799-1.773l12.191-14.525\"></path>\n <path d=\"m42.16.324h5.21v24.806h-5.21z\"></path>\n <path d=\"m66.743 3.869l4.195 4.999 4.195-4.999c1.819-2.168 4.549-3.545 7.6-3.545h6.806v4.961h-6.806c-1.526 0-2.89.689-3.8 1.771l-4.758 5.669 4.758 5.669c.91 1.084 2.274 1.773 3.8 1.773h6.806v4.961h-6.806c-3.051 0-5.781-1.379-7.6-3.545l-4.195-4.999-4.195 4.999c-1.82 2.166-4.55 3.545-7.6 3.545h-6.807v-4.961h6.807c1.525 0 2.889-.689 3.799-1.773l4.758-5.669-4.758-5.669c-.91-1.083-2.274-1.771-3.799-1.771h-6.807v-4.961h6.807c3.05 0 5.78 1.378 7.6 3.545\"></path>\n </g>\n </svg>\n\n </section>\n <section class=\"six-header__placeholder\"></section>\n <section class=\"six-header__custom\">\n <slot></slot>\n </section>\n </header>\n <div class=\"six-header__search-field\">\n <slot name=\"search-field\"></slot>\n </div>\n </mock:shadow-root>\n </six-header>\n `);\n });\n});\n"]}
@@ -3,7 +3,7 @@
3
3
  box-sizing: border-box;
4
4
  }
5
5
  :host *, :host *:before, :host *:after {
6
- box-sizing: inherit;
6
+ box-sizing: border-box;
7
7
  }
8
8
 
9
9
  :host {
@@ -3,7 +3,7 @@
3
3
  box-sizing: border-box;
4
4
  }
5
5
  :host *, :host *:before, :host *:after {
6
- box-sizing: inherit;
6
+ box-sizing: border-box;
7
7
  }
8
8
 
9
9
  :host {
@@ -3,7 +3,7 @@
3
3
  box-sizing: border-box;
4
4
  }
5
5
  :host *, :host *:before, :host *:after {
6
- box-sizing: inherit;
6
+ box-sizing: border-box;
7
7
  }
8
8
 
9
9
  .form-control .form-control__label {
@@ -117,6 +117,15 @@
117
117
  .input:hover:not(.input--disabled) .input__control {
118
118
  color: var(--six-input-color-hover);
119
119
  }
120
+ .input:hover.input--dropdown-search {
121
+ border-color: transparent;
122
+ }
123
+ .input--dropdown-search {
124
+ border-color: transparent;
125
+ }
126
+ .input--dropdown-search.input--focused {
127
+ border-color: var(--six-input-border-color);
128
+ }
120
129
  .input.input--focused:not(.input--disabled) {
121
130
  background-color: var(--six-input-background-color-focus);
122
131
  border-bottom-color: var(--six-input-border-color-focus);
@@ -112,6 +112,7 @@ export class SixInput {
112
112
  this.max = undefined;
113
113
  this.step = undefined;
114
114
  this.pattern = undefined;
115
+ this.dropdownSearch = false;
115
116
  this.required = false;
116
117
  this.autocapitalize = 'off';
117
118
  this.autocorrect = 'off';
@@ -199,6 +200,7 @@ export class SixInput {
199
200
  'input--line': this.line,
200
201
  'input--pill': this.pill,
201
202
  'input--disabled': this.disabled,
203
+ 'input--dropdown-search': this.dropdownSearch,
202
204
  'input--focused': this.hasFocus,
203
205
  'input--empty': this.getValue().length === 0,
204
206
  'input--invalid': this.invalid,
@@ -484,6 +486,24 @@ export class SixInput {
484
486
  "attribute": "pattern",
485
487
  "reflect": true
486
488
  },
489
+ "dropdownSearch": {
490
+ "type": "boolean",
491
+ "mutable": false,
492
+ "complexType": {
493
+ "original": "boolean",
494
+ "resolved": "boolean",
495
+ "references": {}
496
+ },
497
+ "required": false,
498
+ "optional": false,
499
+ "docs": {
500
+ "tags": [],
501
+ "text": "Internal: Styles the input for the dropdown filter search."
502
+ },
503
+ "attribute": "dropdown-search",
504
+ "reflect": false,
505
+ "defaultValue": "false"
506
+ },
487
507
  "required": {
488
508
  "type": "boolean",
489
509
  "mutable": false,
@@ -859,8 +879,9 @@ export class SixInput {
859
879
  "complexType": {
860
880
  "signature": "(options?: FocusOptions) => Promise<void>",
861
881
  "parameters": [{
862
- "tags": [],
863
- "text": ""
882
+ "name": "options",
883
+ "type": "FocusOptions | undefined",
884
+ "docs": ""
864
885
  }],
865
886
  "references": {
866
887
  "Promise": {
@@ -917,14 +938,17 @@ export class SixInput {
917
938
  "complexType": {
918
939
  "signature": "(selectionStart: number, selectionEnd: number, selectionDirection?: 'forward' | 'backward' | 'none') => Promise<void | undefined>",
919
940
  "parameters": [{
920
- "tags": [],
921
- "text": ""
941
+ "name": "selectionStart",
942
+ "type": "number",
943
+ "docs": ""
922
944
  }, {
923
- "tags": [],
924
- "text": ""
945
+ "name": "selectionEnd",
946
+ "type": "number",
947
+ "docs": ""
925
948
  }, {
926
- "tags": [],
927
- "text": ""
949
+ "name": "selectionDirection",
950
+ "type": "\"none\" | \"forward\" | \"backward\"",
951
+ "docs": ""
928
952
  }],
929
953
  "references": {
930
954
  "Promise": {
@@ -943,17 +967,21 @@ export class SixInput {
943
967
  "complexType": {
944
968
  "signature": "(replacement: string, start: number, end: number, selectMode?: 'select' | 'start' | 'end' | 'preserve') => Promise<void>",
945
969
  "parameters": [{
946
- "tags": [],
947
- "text": ""
970
+ "name": "replacement",
971
+ "type": "string",
972
+ "docs": ""
948
973
  }, {
949
- "tags": [],
950
- "text": ""
974
+ "name": "start",
975
+ "type": "number",
976
+ "docs": ""
951
977
  }, {
952
- "tags": [],
953
- "text": ""
978
+ "name": "end",
979
+ "type": "number",
980
+ "docs": ""
954
981
  }, {
955
- "tags": [],
956
- "text": ""
982
+ "name": "selectMode",
983
+ "type": "\"select\" | \"start\" | \"end\" | \"preserve\"",
984
+ "docs": ""
957
985
  }],
958
986
  "references": {
959
987
  "Promise": {
@@ -1 +1 @@
1
- {"version":3,"file":"six-input.js","sourceRoot":"","sources":["../../../src/components/six-input/six-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,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;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport FormControl from '../../functional-components/form-control/form-control';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { submitForm } from '../../utils/form';\n\nconst ICON_SIZES: Record<'small' | 'medium' | 'large', 'xSmall' | 'small' | 'medium'> = {\n large: 'medium',\n medium: 'small',\n small: 'xSmall',\n};\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 label - The input's label. Alternatively, you can use the label prop.\n * @slot prefix - Used to prepend an icon or similar element to the input.\n * @slot suffix - Used to append an icon or similar element to the input.\n * @slot clear-icon - An icon to use in lieu of the default clear icon.\n * @slot show-password-icon - An icon to use in lieu of the default show password icon.\n * @slot hide-password-icon - An icon to use in lieu of the default hide password icon.\n * @slot help-text - Help text that describes how to use the input. Alternatively, you can use the help-text prop.\n * @slot error-text - Error text that is shown when the status is set to invalid. Alternatively, you can use the error-text prop.\n *\n * @part base - The component's base wrapper.\n * @part form-control - The form control that wraps the label, input, error-text and help-text.\n * @part label - The input label.\n * @part input - The input control.\n * @part prefix - The input prefix container.\n * @part clear-button - The clear button.\n * @part password-toggle-button - The password toggle button.\n * @part suffix - The input suffix container.\n * @part help-text - The input help text.\n * @part error-text - The input error text.\n */\n\n@Component({\n tag: 'six-input',\n styleUrl: 'six-input.scss',\n shadow: true,\n})\nexport class SixInput {\n private inputId = `input-${++id}`;\n private labelId = `input-label-${id}`;\n private helpTextId = `input-help-text-${id}`;\n private errorTextId = `input-error-text-${id}`;\n private nativeInput?: HTMLInputElement;\n private eventListeners = new EventListeners();\n\n @Element() host!: HTMLSixInputElement;\n\n @State() hasFocus = false;\n @State() hasHelpTextSlot = false;\n @State() hasLabelSlot = false;\n @State() hasErrorSlot = false;\n @State() isPasswordVisible = false;\n\n /** The input's type. */\n @Prop({ reflect: true }) type: 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url' = 'text';\n\n /** The input's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** The input's name attribute. */\n @Prop({ reflect: true }) name = '';\n\n /** The input's value attribute. */\n @Prop({ mutable: true, reflect: true }) value = '';\n\n /** Set to true to draw a pill-style input with rounded edges. */\n @Prop({ reflect: true }) pill = false;\n\n /** The input's help text. Alternatively, you can use the help-text slot. */\n @Prop() helpText = '';\n\n /** The input's placeholder text. */\n @Prop() placeholder?: string;\n\n /** Set to true to disable the input. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true to make the input readonly. */\n @Prop({ reflect: true }) readonly = false;\n\n /** The minimum length of input that will be considered valid. */\n @Prop({ reflect: true }) minlength?: number;\n\n /** The maximum length of input that will be considered valid. */\n @Prop({ reflect: true }) maxlength?: number;\n\n /** The input's minimum value. */\n @Prop({ reflect: true }) min?: number;\n\n /** The input's maximum value. */\n @Prop({ reflect: true }) max?: number;\n\n /** The input's step attribute. */\n @Prop({ reflect: true }) step?: number;\n\n /** A pattern to validate input against. */\n @Prop({ reflect: true }) pattern?: string;\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /** The input's autocaptialize attribute. */\n @Prop() autocapitalize = 'off';\n\n /** The input's autocorrect attribute. */\n @Prop() autocorrect: 'on' | 'off' = 'off';\n\n /** The input's autocomplete attribute. */\n @Prop() autocomplete = 'off';\n\n /** The input's autofocus attribute. */\n @Prop() autofocus = false;\n\n /** Enables spell checking on the input. */\n @Prop() spellcheck = false;\n\n /** The label text. */\n @Prop() label = '';\n\n /** The error message shown, if `invalid` is set to true. */\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 /** 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 /** Set to true to add a clear button when the input is populated. */\n @Prop() clearable = false;\n\n /** Set to true to add a password toggle button for password inputs. */\n @Prop() togglePassword = false;\n\n /** The input's inputmode attribute. */\n @Prop() inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';\n\n /** Set to render as line */\n @Prop() line = false;\n\n @Watch('helpText')\n @Watch('errorText')\n @Watch('label')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n @Watch('value')\n handleValueChange() {\n this.value = this.getValue();\n if (this.nativeInput != null && this.nativeInput.value !== this.value) {\n this.nativeInput.value = this.value;\n }\n }\n\n /** Emitted when the control's value changes. Access the new value via event.target.value. */\n @Event({ eventName: 'six-input-change' }) sixChange!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the clear button is activated. */\n @Event({ eventName: 'six-input-clear' }) sixClear!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control receives input. Access the new value via event.target.value. */\n @Event({ eventName: 'six-input-input' }) sixInput!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-input-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control loses focus. Access the new value via event.target.value. */\n @Event({ eventName: 'six-input-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.forward('six-input-input', 'input', this.host);\n this.eventListeners.forward('six-input-change', 'change', this.host);\n this.eventListeners.forward('six-input-focus', 'focus', this.host);\n this.eventListeners.forward('six-input-blur', 'blur', this.host);\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n disconnectedCallback() {\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.removeAll();\n }\n\n /** Sets focus on the input. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeInput?.focus(options);\n }\n\n /** Removes focus from the input. */\n @Method()\n async removeFocus() {\n this.nativeInput?.blur();\n }\n\n /** Selects all the text in the input. */\n @Method()\n async select() {\n return this.nativeInput?.select();\n }\n\n /** Sets the start and end positions of the text selection (0-based). */\n @Method()\n async setSelectionRange(\n selectionStart: number,\n selectionEnd: number,\n selectionDirection: 'forward' | 'backward' | 'none' = 'none'\n ) {\n return this.nativeInput?.setSelectionRange(selectionStart, selectionEnd, selectionDirection);\n }\n\n /** Replaces a range of text with a new string. */\n @Method()\n async setRangeText(\n replacement: string,\n start: number,\n end: number,\n selectMode: 'select' | 'start' | 'end' | 'preserve' = 'preserve'\n ) {\n if (this.nativeInput == null) {\n return;\n }\n this.nativeInput.setRangeText(replacement, start, end, selectMode);\n if (this.getValue() !== this.nativeInput.value) {\n this.value = this.nativeInput.value;\n this.sixChange.emit();\n this.sixInput.emit();\n }\n }\n\n private handleChange = (event: Event) => {\n event.stopPropagation();\n if (this.nativeInput != null) {\n this.value = this.nativeInput.value;\n this.sixChange.emit();\n }\n };\n\n private handleInput = (event: Event) => {\n event.stopPropagation();\n if (this.nativeInput != null) {\n this.value = this.nativeInput.value;\n this.sixInput.emit();\n }\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit();\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleClearClick = (event: MouseEvent) => {\n this.value = '';\n this.sixClear.emit();\n this.sixInput.emit();\n this.sixChange.emit();\n if (this.nativeInput != null) {\n this.nativeInput.focus();\n }\n event.stopPropagation();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n const hasModifier = event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;\n if (event.key === 'Enter' && !hasModifier) {\n setTimeout(() => {\n if (!event.defaultPrevented && !event.isComposing) {\n submitForm(this.host);\n }\n });\n }\n };\n\n private handlePasswordToggle = () => {\n this.isPasswordVisible = !this.isPasswordVisible;\n };\n\n private handleSlotChange = () => {\n this.hasHelpTextSlot = hasSlot(this.host, 'help-text');\n this.hasLabelSlot = hasSlot(this.host, 'label');\n this.hasErrorSlot = hasSlot(this.host, 'error-text');\n };\n\n private getValue(): string {\n return (this.value ?? '').toString();\n }\n\n render() {\n return (\n <FormControl\n inputId={this.inputId}\n label={this.label}\n labelId={this.labelId}\n hasLabelSlot={this.hasLabelSlot}\n helpTextId={this.helpTextId}\n helpText={this.helpText}\n hasHelpTextSlot={this.hasHelpTextSlot}\n errorTextId={this.errorTextId}\n errorText={this.errorText}\n errorTextCount={this.errorTextCount}\n hasErrorTextSlot={this.hasErrorSlot}\n size={this.size}\n disabled={this.disabled}\n required={this.required}\n displayError={this.invalid}\n >\n <div\n part=\"base\"\n class={{\n input: true,\n\n // Sizes\n 'input--small': this.size === 'small',\n 'input--medium': this.size === 'medium',\n 'input--large': this.size === 'large',\n\n // States\n 'input--line': this.line,\n 'input--pill': this.pill,\n 'input--disabled': this.disabled,\n 'input--focused': this.hasFocus,\n 'input--empty': this.getValue().length === 0,\n 'input--invalid': this.invalid,\n }}\n >\n <span part=\"prefix\" class=\"input__prefix\">\n <slot name=\"prefix\" />\n </span>\n\n <input\n part=\"input\"\n ref={(el) => (this.nativeInput = el)}\n id={this.inputId}\n size={1} // needed for firefox to overrule the default of 20\n class={{\n input__control: true,\n input__control__prefix: hasSlot(this.host, 'prefix'),\n }}\n type={this.type === 'password' && this.isPasswordVisible ? 'text' : this.type}\n name={this.name}\n placeholder={this.placeholder}\n disabled={this.disabled}\n readonly={this.readonly}\n minLength={this.minlength}\n maxLength={this.maxlength}\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.getValue()}\n autoCapitalize={this.autocapitalize}\n autoComplete={this.autocomplete}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n spellcheck={this.spellcheck}\n pattern={this.pattern}\n required={this.required}\n inputMode={this.inputmode}\n aria-labelledby={this.labelId}\n aria-describedby={this.helpTextId}\n aria-invalid={this.invalid ? 'true' : 'false'}\n onChange={this.handleChange}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n onKeyDown={this.handleKeyDown}\n data-testid=\"input-control\"\n />\n\n {this.clearable && (\n <button\n part=\"clear-button\"\n class=\"input__clear\"\n type=\"button\"\n onClick={this.handleClearClick}\n tabindex=\"-1\"\n data-testid=\"input-clear-button\"\n >\n <slot name=\"clear-icon\">\n <six-icon size={ICON_SIZES[this.size]}>clear</six-icon>\n </slot>\n </button>\n )}\n\n {this.togglePassword && (\n <button\n part=\"password-toggle-button\"\n class=\"input__password-toggle\"\n type=\"button\"\n onClick={this.handlePasswordToggle}\n tabindex=\"-1\"\n >\n {this.isPasswordVisible ? (\n <slot name=\"show-password-icon\">\n <six-icon size={ICON_SIZES[this.size]}>visibility_off</six-icon>\n </slot>\n ) : (\n <slot name=\"hide-password-icon\">\n <six-icon size={ICON_SIZES[this.size]}>visibility</six-icon>\n </slot>\n )}\n </button>\n )}\n\n <span part=\"suffix\" class=\"input__suffix\">\n <slot name=\"suffix\" />\n </span>\n </div>\n </FormControl>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"six-input.js","sourceRoot":"","sources":["../../../src/components/six-input/six-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,WAAW,MAAM,uDAAuD,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,UAAU,GAAwE;IACtF,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,QAAQ;CAChB,CAAC;AAEF,IAAI,EAAE,GAAG,CAAC,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;;;GAy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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport FormControl from '../../functional-components/form-control/form-control';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { submitForm } from '../../utils/form';\n\nconst ICON_SIZES: Record<'small' | 'medium' | 'large', 'xSmall' | 'small' | 'medium'> = {\n large: 'medium',\n medium: 'small',\n small: 'xSmall',\n};\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 label - The input's label. Alternatively, you can use the label prop.\n * @slot prefix - Used to prepend an icon or similar element to the input.\n * @slot suffix - Used to append an icon or similar element to the input.\n * @slot clear-icon - An icon to use in lieu of the default clear icon.\n * @slot show-password-icon - An icon to use in lieu of the default show password icon.\n * @slot hide-password-icon - An icon to use in lieu of the default hide password icon.\n * @slot help-text - Help text that describes how to use the input. Alternatively, you can use the help-text prop.\n * @slot error-text - Error text that is shown when the status is set to invalid. Alternatively, you can use the error-text prop.\n *\n * @part base - The component's base wrapper.\n * @part form-control - The form control that wraps the label, input, error-text and help-text.\n * @part label - The input label.\n * @part input - The input control.\n * @part prefix - The input prefix container.\n * @part clear-button - The clear button.\n * @part password-toggle-button - The password toggle button.\n * @part suffix - The input suffix container.\n * @part help-text - The input help text.\n * @part error-text - The input error text.\n */\n\n@Component({\n tag: 'six-input',\n styleUrl: 'six-input.scss',\n shadow: true,\n})\nexport class SixInput {\n private inputId = `input-${++id}`;\n private labelId = `input-label-${id}`;\n private helpTextId = `input-help-text-${id}`;\n private errorTextId = `input-error-text-${id}`;\n private nativeInput?: HTMLInputElement;\n private eventListeners = new EventListeners();\n\n @Element() host!: HTMLSixInputElement;\n\n @State() hasFocus = false;\n @State() hasHelpTextSlot = false;\n @State() hasLabelSlot = false;\n @State() hasErrorSlot = false;\n @State() isPasswordVisible = false;\n\n /** The input's type. */\n @Prop({ reflect: true }) type: 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url' = 'text';\n\n /** The input's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** The input's name attribute. */\n @Prop({ reflect: true }) name = '';\n\n /** The input's value attribute. */\n @Prop({ mutable: true, reflect: true }) value = '';\n\n /** Set to true to draw a pill-style input with rounded edges. */\n @Prop({ reflect: true }) pill = false;\n\n /** The input's help text. Alternatively, you can use the help-text slot. */\n @Prop() helpText = '';\n\n /** The input's placeholder text. */\n @Prop() placeholder?: string;\n\n /** Set to true to disable the input. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true to make the input readonly. */\n @Prop({ reflect: true }) readonly = false;\n\n /** The minimum length of input that will be considered valid. */\n @Prop({ reflect: true }) minlength?: number;\n\n /** The maximum length of input that will be considered valid. */\n @Prop({ reflect: true }) maxlength?: number;\n\n /** The input's minimum value. */\n @Prop({ reflect: true }) min?: number;\n\n /** The input's maximum value. */\n @Prop({ reflect: true }) max?: number;\n\n /** The input's step attribute. */\n @Prop({ reflect: true }) step?: number;\n\n /** A pattern to validate input against. */\n @Prop({ reflect: true }) pattern?: string;\n\n /**\n * Internal: Styles the input for the dropdown filter search.\n */\n @Prop() dropdownSearch = false;\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /** The input's autocaptialize attribute. */\n @Prop() autocapitalize = 'off';\n\n /** The input's autocorrect attribute. */\n @Prop() autocorrect: 'on' | 'off' = 'off';\n\n /** The input's autocomplete attribute. */\n @Prop() autocomplete = 'off';\n\n /** The input's autofocus attribute. */\n @Prop() autofocus = false;\n\n /** Enables spell checking on the input. */\n @Prop() spellcheck = false;\n\n /** The label text. */\n @Prop() label = '';\n\n /** The error message shown, if `invalid` is set to true. */\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 /** 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 /** Set to true to add a clear button when the input is populated. */\n @Prop() clearable = false;\n\n /** Set to true to add a password toggle button for password inputs. */\n @Prop() togglePassword = false;\n\n /** The input's inputmode attribute. */\n @Prop() inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';\n\n /** Set to render as line */\n @Prop() line = false;\n\n @Watch('helpText')\n @Watch('errorText')\n @Watch('label')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n @Watch('value')\n handleValueChange() {\n this.value = this.getValue();\n if (this.nativeInput != null && this.nativeInput.value !== this.value) {\n this.nativeInput.value = this.value;\n }\n }\n\n /** Emitted when the control's value changes. Access the new value via event.target.value. */\n @Event({ eventName: 'six-input-change' }) sixChange!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the clear button is activated. */\n @Event({ eventName: 'six-input-clear' }) sixClear!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control receives input. Access the new value via event.target.value. */\n @Event({ eventName: 'six-input-input' }) sixInput!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-input-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control loses focus. Access the new value via event.target.value. */\n @Event({ eventName: 'six-input-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.forward('six-input-input', 'input', this.host);\n this.eventListeners.forward('six-input-change', 'change', this.host);\n this.eventListeners.forward('six-input-focus', 'focus', this.host);\n this.eventListeners.forward('six-input-blur', 'blur', this.host);\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n disconnectedCallback() {\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.removeAll();\n }\n\n /** Sets focus on the input. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeInput?.focus(options);\n }\n\n /** Removes focus from the input. */\n @Method()\n async removeFocus() {\n this.nativeInput?.blur();\n }\n\n /** Selects all the text in the input. */\n @Method()\n async select() {\n return this.nativeInput?.select();\n }\n\n /** Sets the start and end positions of the text selection (0-based). */\n @Method()\n async setSelectionRange(\n selectionStart: number,\n selectionEnd: number,\n selectionDirection: 'forward' | 'backward' | 'none' = 'none'\n ) {\n return this.nativeInput?.setSelectionRange(selectionStart, selectionEnd, selectionDirection);\n }\n\n /** Replaces a range of text with a new string. */\n @Method()\n async setRangeText(\n replacement: string,\n start: number,\n end: number,\n selectMode: 'select' | 'start' | 'end' | 'preserve' = 'preserve'\n ) {\n if (this.nativeInput == null) {\n return;\n }\n this.nativeInput.setRangeText(replacement, start, end, selectMode);\n if (this.getValue() !== this.nativeInput.value) {\n this.value = this.nativeInput.value;\n this.sixChange.emit();\n this.sixInput.emit();\n }\n }\n\n private handleChange = (event: Event) => {\n event.stopPropagation();\n if (this.nativeInput != null) {\n this.value = this.nativeInput.value;\n this.sixChange.emit();\n }\n };\n\n private handleInput = (event: Event) => {\n event.stopPropagation();\n if (this.nativeInput != null) {\n this.value = this.nativeInput.value;\n this.sixInput.emit();\n }\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit();\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleClearClick = (event: MouseEvent) => {\n this.value = '';\n this.sixClear.emit();\n this.sixInput.emit();\n this.sixChange.emit();\n if (this.nativeInput != null) {\n this.nativeInput.focus();\n }\n event.stopPropagation();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n const hasModifier = event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;\n if (event.key === 'Enter' && !hasModifier) {\n setTimeout(() => {\n if (!event.defaultPrevented && !event.isComposing) {\n submitForm(this.host);\n }\n });\n }\n };\n\n private handlePasswordToggle = () => {\n this.isPasswordVisible = !this.isPasswordVisible;\n };\n\n private handleSlotChange = () => {\n this.hasHelpTextSlot = hasSlot(this.host, 'help-text');\n this.hasLabelSlot = hasSlot(this.host, 'label');\n this.hasErrorSlot = hasSlot(this.host, 'error-text');\n };\n\n private getValue(): string {\n return (this.value ?? '').toString();\n }\n\n render() {\n return (\n <FormControl\n inputId={this.inputId}\n label={this.label}\n labelId={this.labelId}\n hasLabelSlot={this.hasLabelSlot}\n helpTextId={this.helpTextId}\n helpText={this.helpText}\n hasHelpTextSlot={this.hasHelpTextSlot}\n errorTextId={this.errorTextId}\n errorText={this.errorText}\n errorTextCount={this.errorTextCount}\n hasErrorTextSlot={this.hasErrorSlot}\n size={this.size}\n disabled={this.disabled}\n required={this.required}\n displayError={this.invalid}\n >\n <div\n part=\"base\"\n class={{\n input: true,\n\n // Sizes\n 'input--small': this.size === 'small',\n 'input--medium': this.size === 'medium',\n 'input--large': this.size === 'large',\n\n // States\n 'input--line': this.line,\n 'input--pill': this.pill,\n 'input--disabled': this.disabled,\n 'input--dropdown-search': this.dropdownSearch,\n 'input--focused': this.hasFocus,\n 'input--empty': this.getValue().length === 0,\n 'input--invalid': this.invalid,\n }}\n >\n <span part=\"prefix\" class=\"input__prefix\">\n <slot name=\"prefix\" />\n </span>\n\n <input\n part=\"input\"\n ref={(el) => (this.nativeInput = el)}\n id={this.inputId}\n size={1} // needed for firefox to overrule the default of 20\n class={{\n input__control: true,\n input__control__prefix: hasSlot(this.host, 'prefix'),\n }}\n type={this.type === 'password' && this.isPasswordVisible ? 'text' : this.type}\n name={this.name}\n placeholder={this.placeholder}\n disabled={this.disabled}\n readonly={this.readonly}\n minLength={this.minlength}\n maxLength={this.maxlength}\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.getValue()}\n autoCapitalize={this.autocapitalize}\n autoComplete={this.autocomplete}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n spellcheck={this.spellcheck}\n pattern={this.pattern}\n required={this.required}\n inputMode={this.inputmode}\n aria-labelledby={this.labelId}\n aria-describedby={this.helpTextId}\n aria-invalid={this.invalid ? 'true' : 'false'}\n onChange={this.handleChange}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n onKeyDown={this.handleKeyDown}\n data-testid=\"input-control\"\n />\n\n {this.clearable && (\n <button\n part=\"clear-button\"\n class=\"input__clear\"\n type=\"button\"\n onClick={this.handleClearClick}\n tabindex=\"-1\"\n data-testid=\"input-clear-button\"\n >\n <slot name=\"clear-icon\">\n <six-icon size={ICON_SIZES[this.size]}>clear</six-icon>\n </slot>\n </button>\n )}\n\n {this.togglePassword && (\n <button\n part=\"password-toggle-button\"\n class=\"input__password-toggle\"\n type=\"button\"\n onClick={this.handlePasswordToggle}\n tabindex=\"-1\"\n >\n {this.isPasswordVisible ? (\n <slot name=\"show-password-icon\">\n <six-icon size={ICON_SIZES[this.size]}>visibility_off</six-icon>\n </slot>\n ) : (\n <slot name=\"hide-password-icon\">\n <six-icon size={ICON_SIZES[this.size]}>visibility</six-icon>\n </slot>\n )}\n </button>\n )}\n\n <span part=\"suffix\" class=\"input__suffix\">\n <slot name=\"suffix\" />\n </span>\n </div>\n </FormControl>\n );\n }\n}\n"]}