@six-group/ui-library 3.0.0-beta.1.7 → 4.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1002) hide show
  1. package/dist/cjs/{event-listeners-4a8d66d5.js → event-listeners-74715e62.js} +40 -38
  2. package/dist/cjs/event-listeners-74715e62.js.map +1 -0
  3. package/dist/cjs/{execution-control-3bc9c7c4.js → execution-control-46f388e0.js} +37 -35
  4. package/dist/cjs/execution-control-46f388e0.js.map +1 -0
  5. package/dist/cjs/{focus-visible-b08d956f.js → focus-visible-0b352c74.js} +42 -40
  6. package/dist/cjs/focus-visible-0b352c74.js.map +1 -0
  7. package/dist/cjs/{form-control-9e4dffd1.js → form-control-8e2ae807.js} +28 -26
  8. package/dist/cjs/form-control-8e2ae807.js.map +1 -0
  9. package/dist/cjs/{index-341df120.js → index-b3257a77.js} +603 -279
  10. package/dist/cjs/index-b3257a77.js.map +1 -0
  11. package/dist/cjs/index.cjs.js +2 -0
  12. package/dist/cjs/index.cjs.js.map +1 -0
  13. package/dist/cjs/loader.cjs.js +6 -3
  14. package/dist/cjs/loader.cjs.js.map +1 -0
  15. package/dist/cjs/{modal-a9679ddf.js → modal-48d42228.js} +43 -41
  16. package/dist/cjs/modal-48d42228.js.map +1 -0
  17. package/dist/cjs/{popover-e3781f5a.js → popover-f743f62b.js} +100 -99
  18. package/dist/cjs/popover-f743f62b.js.map +1 -0
  19. package/dist/cjs/{scroll-5b8676ba.js → scroll-76e6f5d7.js} +59 -57
  20. package/dist/cjs/scroll-76e6f5d7.js.map +1 -0
  21. package/dist/cjs/set-attributes_2.cjs.entry.js +58 -58
  22. package/dist/cjs/set-attributes_2.cjs.entry.js.map +1 -0
  23. package/dist/cjs/six-alert.cjs.entry.js +127 -132
  24. package/dist/cjs/six-alert.cjs.entry.js.map +1 -0
  25. package/dist/cjs/six-avatar.cjs.entry.js +27 -29
  26. package/dist/cjs/six-avatar.cjs.entry.js.map +1 -0
  27. package/dist/cjs/six-badge.cjs.entry.js +26 -27
  28. package/dist/cjs/six-badge.cjs.entry.js.map +1 -0
  29. package/dist/cjs/six-button.cjs.entry.js +96 -98
  30. package/dist/cjs/six-button.cjs.entry.js.map +1 -0
  31. package/dist/cjs/six-card.cjs.entry.js +11 -9
  32. package/dist/cjs/six-card.cjs.entry.js.map +1 -0
  33. package/dist/cjs/six-checkbox.cjs.entry.js +149 -153
  34. package/dist/cjs/six-checkbox.cjs.entry.js.map +1 -0
  35. package/dist/cjs/six-datepicker.cjs.entry.js +1137 -1190
  36. package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -0
  37. package/dist/cjs/six-details.cjs.entry.js +137 -140
  38. package/dist/cjs/six-details.cjs.entry.js.map +1 -0
  39. package/dist/cjs/six-dialog.cjs.entry.js +146 -153
  40. package/dist/cjs/six-dialog.cjs.entry.js.map +1 -0
  41. package/dist/cjs/six-drawer.cjs.entry.js +163 -175
  42. package/dist/cjs/six-drawer.cjs.entry.js.map +1 -0
  43. package/dist/cjs/six-dropdown_3.cjs.entry.js +682 -729
  44. package/dist/cjs/six-dropdown_3.cjs.entry.js.map +1 -0
  45. package/dist/cjs/six-error-page.cjs.entry.js +98 -95
  46. package/dist/cjs/six-error-page.cjs.entry.js.map +1 -0
  47. package/dist/cjs/six-file-list-item.cjs.entry.js +37 -39
  48. package/dist/cjs/six-file-list-item.cjs.entry.js.map +1 -0
  49. package/dist/cjs/six-file-list.cjs.entry.js +11 -9
  50. package/dist/cjs/six-file-list.cjs.entry.js.map +1 -0
  51. package/dist/cjs/six-file-upload.cjs.entry.js +110 -97
  52. package/dist/cjs/six-file-upload.cjs.entry.js.map +1 -0
  53. package/dist/cjs/six-footer.cjs.entry.js +11 -9
  54. package/dist/cjs/six-footer.cjs.entry.js.map +1 -0
  55. package/dist/cjs/six-form.cjs.entry.js +221 -220
  56. package/dist/cjs/six-form.cjs.entry.js.map +1 -0
  57. package/dist/cjs/six-group-label.cjs.entry.js +46 -47
  58. package/dist/cjs/six-group-label.cjs.entry.js.map +1 -0
  59. package/dist/cjs/six-header.cjs.entry.js +150 -150
  60. package/dist/cjs/six-header.cjs.entry.js.map +1 -0
  61. package/dist/cjs/six-icon-button.cjs.entry.js +37 -34
  62. package/dist/cjs/six-icon-button.cjs.entry.js.map +1 -0
  63. package/dist/cjs/six-icon.cjs.entry.js +25 -25
  64. package/dist/cjs/six-icon.cjs.entry.js.map +1 -0
  65. package/dist/cjs/six-input.cjs.entry.js +229 -231
  66. package/dist/cjs/six-input.cjs.entry.js.map +1 -0
  67. package/dist/cjs/six-item-picker.cjs.entry.js +347 -362
  68. package/dist/cjs/six-item-picker.cjs.entry.js.map +1 -0
  69. package/dist/cjs/six-language-switcher.cjs.entry.js +55 -53
  70. package/dist/cjs/six-language-switcher.cjs.entry.js.map +1 -0
  71. package/dist/cjs/six-layout-grid.cjs.entry.js +23 -20
  72. package/dist/cjs/six-layout-grid.cjs.entry.js.map +1 -0
  73. package/dist/cjs/six-main-container.cjs.entry.js +13 -12
  74. package/dist/cjs/six-main-container.cjs.entry.js.map +1 -0
  75. package/dist/cjs/six-menu-divider.cjs.entry.js +11 -9
  76. package/dist/cjs/six-menu-divider.cjs.entry.js.map +1 -0
  77. package/dist/cjs/six-menu-label.cjs.entry.js +11 -9
  78. package/dist/cjs/six-menu-label.cjs.entry.js.map +1 -0
  79. package/dist/cjs/six-picto.cjs.entry.js +15 -16
  80. package/dist/cjs/six-picto.cjs.entry.js.map +1 -0
  81. package/dist/cjs/six-progress-bar.cjs.entry.js +18 -18
  82. package/dist/cjs/six-progress-bar.cjs.entry.js.map +1 -0
  83. package/dist/cjs/six-progress-ring.cjs.entry.js +33 -32
  84. package/dist/cjs/six-progress-ring.cjs.entry.js.map +1 -0
  85. package/dist/cjs/six-radio.cjs.entry.js +120 -122
  86. package/dist/cjs/six-radio.cjs.entry.js.map +1 -0
  87. package/dist/cjs/six-range.cjs.entry.js +188 -199
  88. package/dist/cjs/six-range.cjs.entry.js.map +1 -0
  89. package/dist/cjs/six-root.cjs.entry.js +34 -35
  90. package/dist/cjs/six-root.cjs.entry.js.map +1 -0
  91. package/dist/cjs/six-search-field.cjs.entry.js +43 -44
  92. package/dist/cjs/six-search-field.cjs.entry.js.map +1 -0
  93. package/dist/cjs/six-select.cjs.entry.js +422 -448
  94. package/dist/cjs/six-select.cjs.entry.js.map +1 -0
  95. package/dist/cjs/six-sidebar-item-group.cjs.entry.js +44 -43
  96. package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -0
  97. package/dist/cjs/six-sidebar-item.cjs.entry.js +18 -19
  98. package/dist/cjs/six-sidebar-item.cjs.entry.js.map +1 -0
  99. package/dist/cjs/six-sidebar.cjs.entry.js +170 -172
  100. package/dist/cjs/six-sidebar.cjs.entry.js.map +1 -0
  101. package/dist/cjs/six-spinner.cjs.entry.js +18 -17
  102. package/dist/cjs/six-spinner.cjs.entry.js.map +1 -0
  103. package/dist/cjs/six-switch.cjs.entry.js +101 -101
  104. package/dist/cjs/six-switch.cjs.entry.js.map +1 -0
  105. package/dist/cjs/six-tab-group.cjs.entry.js +227 -227
  106. package/dist/cjs/six-tab-group.cjs.entry.js.map +1 -0
  107. package/dist/cjs/six-tab-panel.cjs.entry.js +18 -18
  108. package/dist/cjs/six-tab-panel.cjs.entry.js.map +1 -0
  109. package/dist/cjs/six-tab.cjs.entry.js +41 -43
  110. package/dist/cjs/six-tab.cjs.entry.js.map +1 -0
  111. package/dist/cjs/six-table-cell_4.cjs.entry.js +77 -72
  112. package/dist/cjs/six-table-cell_4.cjs.entry.js.map +1 -0
  113. package/dist/cjs/six-table.cjs.entry.js +145 -146
  114. package/dist/cjs/six-table.cjs.entry.js.map +1 -0
  115. package/dist/cjs/six-tag.cjs.entry.js +39 -41
  116. package/dist/cjs/six-tag.cjs.entry.js.map +1 -0
  117. package/dist/cjs/six-textarea.cjs.entry.js +209 -212
  118. package/dist/cjs/six-textarea.cjs.entry.js.map +1 -0
  119. package/dist/cjs/six-tile.cjs.entry.js +87 -90
  120. package/dist/cjs/six-tile.cjs.entry.js.map +1 -0
  121. package/dist/cjs/six-timepicker.cjs.entry.js +441 -490
  122. package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -0
  123. package/dist/cjs/{six-timepicker.types-c58cc88b.js → six-timepicker.types-c19ebff3.js} +45 -43
  124. package/dist/cjs/six-timepicker.types-c19ebff3.js.map +1 -0
  125. package/dist/cjs/six-tooltip.cjs.entry.js +163 -173
  126. package/dist/cjs/six-tooltip.cjs.entry.js.map +1 -0
  127. package/dist/cjs/{slot-8abe833c.js → slot-ad537f24.js} +44 -42
  128. package/dist/cjs/slot-ad537f24.js.map +1 -0
  129. package/dist/cjs/{types-0c28e484.js → types-64878648.js} +14 -12
  130. package/dist/cjs/types-64878648.js.map +1 -0
  131. package/dist/cjs/ui-library.cjs.js +12 -3
  132. package/dist/cjs/ui-library.cjs.js.map +1 -0
  133. package/dist/collection/collection-manifest.json +2 -2
  134. package/dist/collection/components/six-alert/six-alert.js +368 -366
  135. package/dist/collection/components/six-alert/six-alert.js.map +1 -0
  136. package/dist/collection/components/six-avatar/six-avatar.js +131 -131
  137. package/dist/collection/components/six-avatar/six-avatar.js.map +1 -0
  138. package/dist/collection/components/six-badge/six-badge.js +104 -101
  139. package/dist/collection/components/six-badge/six-badge.js.map +1 -0
  140. package/dist/collection/components/six-button/six-button.js +464 -466
  141. package/dist/collection/components/six-button/six-button.js.map +1 -0
  142. package/dist/collection/components/six-card/six-card.js +25 -21
  143. package/dist/collection/components/six-card/six-card.js.map +1 -0
  144. package/dist/collection/components/six-checkbox/six-checkbox.js +541 -550
  145. package/dist/collection/components/six-checkbox/six-checkbox.js.map +1 -0
  146. package/dist/collection/components/six-datepicker/components/day-selection.js +12 -13
  147. package/dist/collection/components/six-datepicker/components/day-selection.js.map +1 -0
  148. package/dist/collection/components/six-datepicker/components/month-selection.js +12 -12
  149. package/dist/collection/components/six-datepicker/components/month-selection.js.map +1 -0
  150. package/dist/collection/components/six-datepicker/components/year-selection.js +10 -10
  151. package/dist/collection/components/six-datepicker/components/year-selection.js.map +1 -0
  152. package/dist/collection/components/six-datepicker/six-date-formats.js +24 -23
  153. package/dist/collection/components/six-datepicker/six-date-formats.js.map +1 -0
  154. package/dist/collection/components/six-datepicker/six-datepicker.js +1271 -1343
  155. package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -0
  156. package/dist/collection/components/six-datepicker/test/six-datepicker.test-helpers.js +17 -16
  157. package/dist/collection/components/six-datepicker/test/six-datepicker.test-helpers.js.map +1 -0
  158. package/dist/collection/components/six-details/six-details.js +434 -432
  159. package/dist/collection/components/six-details/six-details.js.map +1 -0
  160. package/dist/collection/components/six-dialog/six-dialog.js +397 -401
  161. package/dist/collection/components/six-dialog/six-dialog.js.map +1 -0
  162. package/dist/collection/components/six-drawer/six-drawer.js +449 -458
  163. package/dist/collection/components/six-drawer/six-drawer.js.map +1 -0
  164. package/dist/collection/components/six-dropdown/six-dropdown.js +919 -939
  165. package/dist/collection/components/six-dropdown/six-dropdown.js.map +1 -0
  166. package/dist/collection/components/six-error-page/six-error-page.js +203 -199
  167. package/dist/collection/components/six-error-page/six-error-page.js.map +1 -0
  168. package/dist/collection/components/six-file-list/six-file-list.js +24 -20
  169. package/dist/collection/components/six-file-list/six-file-list.js.map +1 -0
  170. package/dist/collection/components/six-file-list-item/six-file-list-item.js +204 -203
  171. package/dist/collection/components/six-file-list-item/six-file-list-item.js.map +1 -0
  172. package/dist/collection/components/six-file-upload/six-file-upload.js +307 -272
  173. package/dist/collection/components/six-file-upload/six-file-upload.js.map +1 -0
  174. package/dist/collection/components/six-footer/six-footer.js +25 -21
  175. package/dist/collection/components/six-footer/six-footer.js.map +1 -0
  176. package/dist/collection/components/six-form/six-form.js +419 -408
  177. package/dist/collection/components/six-form/six-form.js.map +1 -0
  178. package/dist/collection/components/six-group-label/six-group-label.js +173 -166
  179. package/dist/collection/components/six-group-label/six-group-label.js.map +1 -0
  180. package/dist/collection/components/six-header/six-header.js +412 -420
  181. package/dist/collection/components/six-header/six-header.js.map +1 -0
  182. package/dist/collection/components/six-icon/six-icon.js +81 -77
  183. package/dist/collection/components/six-icon/six-icon.js.map +1 -0
  184. package/dist/collection/components/six-icon-button/six-icon-button.js +146 -142
  185. package/dist/collection/components/six-icon-button/six-icon-button.js.map +1 -0
  186. package/dist/collection/components/six-input/six-input.js +1140 -1141
  187. package/dist/collection/components/six-input/six-input.js.map +1 -0
  188. package/dist/collection/components/six-item-picker/six-item-picker.js +681 -688
  189. package/dist/collection/components/six-item-picker/six-item-picker.js.map +1 -0
  190. package/dist/collection/components/six-item-picker/types.js +14 -13
  191. package/dist/collection/components/six-item-picker/types.js.map +1 -0
  192. package/dist/collection/components/six-language-switcher/six-language-switcher.js +139 -128
  193. package/dist/collection/components/six-language-switcher/six-language-switcher.js.map +1 -0
  194. package/dist/collection/components/six-layout-grid/six-layout-grid.js +63 -52
  195. package/dist/collection/components/six-layout-grid/six-layout-grid.js.map +1 -0
  196. package/dist/collection/components/six-main-container/six-main-container.js +55 -53
  197. package/dist/collection/components/six-main-container/six-main-container.js.map +1 -0
  198. package/dist/collection/components/six-menu/six-menu.js +398 -406
  199. package/dist/collection/components/six-menu/six-menu.js.map +1 -0
  200. package/dist/collection/components/six-menu-divider/six-menu-divider.js +27 -22
  201. package/dist/collection/components/six-menu-divider/six-menu-divider.js.map +1 -0
  202. package/dist/collection/components/six-menu-item/six-menu-item.js +198 -177
  203. package/dist/collection/components/six-menu-item/six-menu-item.js.map +1 -0
  204. package/dist/collection/components/six-menu-label/six-menu-label.js +29 -25
  205. package/dist/collection/components/six-menu-label/six-menu-label.js.map +1 -0
  206. package/dist/collection/components/six-picto/six-picto.js +53 -50
  207. package/dist/collection/components/six-picto/six-picto.js.map +1 -0
  208. package/dist/collection/components/six-progress-bar/six-progress-bar.js +80 -77
  209. package/dist/collection/components/six-progress-bar/six-progress-bar.js.map +1 -0
  210. package/dist/collection/components/six-progress-ring/six-progress-ring.js +114 -111
  211. package/dist/collection/components/six-progress-ring/six-progress-ring.js.map +1 -0
  212. package/dist/collection/components/six-radio/six-radio.js +412 -410
  213. package/dist/collection/components/six-radio/six-radio.js.map +1 -0
  214. package/dist/collection/components/six-range/six-range.js +619 -620
  215. package/dist/collection/components/six-range/six-range.js.map +1 -0
  216. package/dist/collection/components/six-root/six-root.js +165 -167
  217. package/dist/collection/components/six-root/six-root.js.map +1 -0
  218. package/dist/collection/components/six-search-field/six-search-field.js +177 -171
  219. package/dist/collection/components/six-search-field/six-search-field.js.map +1 -0
  220. package/dist/collection/components/six-select/six-select.css +1 -2
  221. package/dist/collection/components/six-select/six-select.js +1081 -1105
  222. package/dist/collection/components/six-select/six-select.js.map +1 -0
  223. package/dist/collection/components/six-sidebar/six-sidebar.js +464 -455
  224. package/dist/collection/components/six-sidebar/six-sidebar.js.map +1 -0
  225. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +92 -89
  226. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js.map +1 -0
  227. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js +159 -158
  228. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js.map +1 -0
  229. package/dist/collection/components/six-spinner/six-spinner.js +58 -55
  230. package/dist/collection/components/six-spinner/six-spinner.js.map +1 -0
  231. package/dist/collection/components/six-stage-indicator/six-stage-indicator.js +49 -46
  232. package/dist/collection/components/six-stage-indicator/six-stage-indicator.js.map +1 -0
  233. package/dist/collection/components/six-switch/six-switch.js +401 -393
  234. package/dist/collection/components/six-switch/six-switch.js.map +1 -0
  235. package/dist/collection/components/six-tab/six-tab.js +202 -198
  236. package/dist/collection/components/six-tab/six-tab.js.map +1 -0
  237. package/dist/collection/components/six-tab-group/six-tab-group.js +368 -362
  238. package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -0
  239. package/dist/collection/components/six-tab-panel/six-tab-panel.js +78 -75
  240. package/dist/collection/components/six-tab-panel/six-tab-panel.js.map +1 -0
  241. package/dist/collection/components/six-table/six-table.js +219 -209
  242. package/dist/collection/components/six-table/six-table.js.map +1 -0
  243. package/dist/collection/components/six-table/test/helpers.js +14 -13
  244. package/dist/collection/components/six-table/test/helpers.js.map +1 -0
  245. package/dist/collection/components/six-table/types.js +9 -8
  246. package/dist/collection/components/six-table/types.js.map +1 -0
  247. package/dist/collection/components/six-table/util/filter-by.js +34 -34
  248. package/dist/collection/components/six-table/util/filter-by.js.map +1 -0
  249. package/dist/collection/components/six-table/util/from-data.js +32 -33
  250. package/dist/collection/components/six-table/util/from-data.js.map +1 -0
  251. package/dist/collection/components/six-table/util/is.js +4 -3
  252. package/dist/collection/components/six-table/util/is.js.map +1 -0
  253. package/dist/collection/components/six-table/util/quick-filter-by.js +14 -13
  254. package/dist/collection/components/six-table/util/quick-filter-by.js.map +1 -0
  255. package/dist/collection/components/six-table/util/sort-by.js +25 -25
  256. package/dist/collection/components/six-table/util/sort-by.js.map +1 -0
  257. package/dist/collection/components/six-table-cell/six-table-cell.js +25 -21
  258. package/dist/collection/components/six-table-cell/six-table-cell.js.map +1 -0
  259. package/dist/collection/components/six-table-header/six-table-header.js +25 -21
  260. package/dist/collection/components/six-table-header/six-table-header.js.map +1 -0
  261. package/dist/collection/components/six-table-header-cell/get-next-state.js +7 -7
  262. package/dist/collection/components/six-table-header-cell/get-next-state.js.map +1 -0
  263. package/dist/collection/components/six-table-header-cell/icons.js +12 -12
  264. package/dist/collection/components/six-table-header-cell/icons.js.map +1 -0
  265. package/dist/collection/components/six-table-header-cell/six-table-header-cell.js +179 -174
  266. package/dist/collection/components/six-table-header-cell/six-table-header-cell.js.map +1 -0
  267. package/dist/collection/components/six-table-header-cell/types.js +2 -13
  268. package/dist/collection/components/six-table-header-cell/types.js.map +1 -0
  269. package/dist/collection/components/six-table-header-cell/util/create-model.js +7 -6
  270. package/dist/collection/components/six-table-header-cell/util/create-model.js.map +1 -0
  271. package/dist/collection/components/six-table-header-cell/util/get-next-state.js +7 -7
  272. package/dist/collection/components/six-table-header-cell/util/get-next-state.js.map +1 -0
  273. package/dist/collection/components/six-table-row/six-table-row.js +25 -21
  274. package/dist/collection/components/six-table-row/six-table-row.js.map +1 -0
  275. package/dist/collection/components/six-tag/six-tag.js +159 -157
  276. package/dist/collection/components/six-tag/six-tag.js.map +1 -0
  277. package/dist/collection/components/six-textarea/six-textarea.js +920 -912
  278. package/dist/collection/components/six-textarea/six-textarea.js.map +1 -0
  279. package/dist/collection/components/six-tile/six-tile.js +314 -315
  280. package/dist/collection/components/six-tile/six-tile.js.map +1 -0
  281. package/dist/collection/components/six-timepicker/six-time-format.js +15 -14
  282. package/dist/collection/components/six-timepicker/six-time-format.js.map +1 -0
  283. package/dist/collection/components/six-timepicker/six-timepicker.js +936 -980
  284. package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -0
  285. package/dist/collection/components/six-timepicker/six-timepicker.types.js +41 -40
  286. package/dist/collection/components/six-timepicker/six-timepicker.types.js.map +1 -0
  287. package/dist/collection/components/six-tooltip/six-tooltip.js +432 -435
  288. package/dist/collection/components/six-tooltip/six-tooltip.js.map +1 -0
  289. package/dist/collection/functional-components/form-control/form-control.js +23 -28
  290. package/dist/collection/functional-components/form-control/form-control.js.map +1 -0
  291. package/dist/collection/index.js +2 -1
  292. package/dist/collection/index.js.map +1 -0
  293. package/dist/collection/testUtil/delay.js +4 -3
  294. package/dist/collection/testUtil/delay.js.map +1 -0
  295. package/dist/collection/utils/as-array.js +2 -1
  296. package/dist/collection/utils/as-array.js.map +1 -0
  297. package/dist/collection/utils/date-util.js +713 -712
  298. package/dist/collection/utils/date-util.js.map +1 -0
  299. package/dist/collection/utils/event-listeners.js +40 -39
  300. package/dist/collection/utils/event-listeners.js.map +1 -0
  301. package/dist/collection/utils/execution-control.js +39 -38
  302. package/dist/collection/utils/execution-control.js.map +1 -0
  303. package/dist/collection/utils/focus-visible.js +42 -41
  304. package/dist/collection/utils/focus-visible.js.map +1 -0
  305. package/dist/collection/utils/matchers.js +3 -2
  306. package/dist/collection/utils/matchers.js.map +1 -0
  307. package/dist/collection/utils/modal.js +29 -28
  308. package/dist/collection/utils/modal.js.map +1 -0
  309. package/dist/collection/utils/offset.js +14 -13
  310. package/dist/collection/utils/offset.js.map +1 -0
  311. package/dist/collection/utils/popover.js +114 -113
  312. package/dist/collection/utils/popover.js.map +1 -0
  313. package/dist/collection/utils/scroll.js +48 -47
  314. package/dist/collection/utils/scroll.js.map +1 -0
  315. package/dist/collection/utils/slot.js +60 -59
  316. package/dist/collection/utils/slot.js.map +1 -0
  317. package/dist/collection/utils/support.js +16 -15
  318. package/dist/collection/utils/support.js.map +1 -0
  319. package/dist/collection/utils/tabbable.js +23 -22
  320. package/dist/collection/utils/tabbable.js.map +1 -0
  321. package/dist/collection/utils/testing.js +39 -38
  322. package/dist/collection/utils/testing.js.map +1 -0
  323. package/dist/collection/utils/time.util.js +75 -74
  324. package/dist/collection/utils/time.util.js.map +1 -0
  325. package/dist/collection/utils/type-check.js +6 -5
  326. package/dist/collection/utils/type-check.js.map +1 -0
  327. package/dist/collection/utils/types.js +2 -1
  328. package/dist/collection/utils/types.js.map +1 -0
  329. package/dist/collection/wrappers/set-attributes/set-attributes.js +72 -68
  330. package/dist/collection/wrappers/set-attributes/set-attributes.js.map +1 -0
  331. package/dist/{esm/event-listeners-1bef934e.js → components/event-listeners.js} +40 -38
  332. package/dist/components/event-listeners.js.map +1 -0
  333. package/dist/{esm/execution-control-235f5126.js → components/execution-control.js} +37 -35
  334. package/dist/components/execution-control.js.map +1 -0
  335. package/dist/{esm/focus-visible-4b7946aa.js → components/focus-visible.js} +42 -40
  336. package/dist/components/focus-visible.js.map +1 -0
  337. package/dist/components/form-control.js +32 -0
  338. package/dist/components/form-control.js.map +1 -0
  339. package/dist/components/index.d.ts +39 -0
  340. package/dist/components/index.js +132 -0
  341. package/dist/components/index.js.map +1 -0
  342. package/dist/{esm/modal-e5709f6b.js → components/modal.js} +43 -41
  343. package/dist/components/modal.js.map +1 -0
  344. package/dist/{esm/popover-5a51f84d.js → components/popover.js} +100 -99
  345. package/dist/components/popover.js.map +1 -0
  346. package/dist/{esm/scroll-99b214c2.js → components/scroll.js} +59 -57
  347. package/dist/components/scroll.js.map +1 -0
  348. package/dist/components/set-attributes.d.ts +11 -0
  349. package/dist/components/set-attributes.js +8 -0
  350. package/dist/components/set-attributes.js.map +1 -0
  351. package/dist/components/set-attributes2.js +69 -0
  352. package/dist/components/set-attributes2.js.map +1 -0
  353. package/dist/components/six-alert.d.ts +11 -0
  354. package/dist/components/six-alert.js +172 -0
  355. package/dist/components/six-alert.js.map +1 -0
  356. package/dist/components/six-avatar.d.ts +11 -0
  357. package/dist/components/six-avatar.js +63 -0
  358. package/dist/components/six-avatar.js.map +1 -0
  359. package/dist/components/six-badge.d.ts +11 -0
  360. package/dist/components/six-badge.js +54 -0
  361. package/dist/components/six-badge.js.map +1 -0
  362. package/dist/components/six-button.d.ts +11 -0
  363. package/dist/components/six-button.js +147 -0
  364. package/dist/components/six-button.js.map +1 -0
  365. package/dist/components/six-card.d.ts +11 -0
  366. package/dist/components/six-card.js +35 -0
  367. package/dist/components/six-card.js.map +1 -0
  368. package/dist/components/six-checkbox.d.ts +11 -0
  369. package/dist/components/six-checkbox.js +193 -0
  370. package/dist/components/six-checkbox.js.map +1 -0
  371. package/dist/components/six-datepicker.d.ts +11 -0
  372. package/dist/components/six-datepicker.js +1229 -0
  373. package/dist/components/six-datepicker.js.map +1 -0
  374. package/dist/components/six-details.d.ts +11 -0
  375. package/dist/components/six-details.js +8 -0
  376. package/dist/components/six-details.js.map +1 -0
  377. package/dist/components/six-details2.js +176 -0
  378. package/dist/components/six-details2.js.map +1 -0
  379. package/dist/components/six-dialog.d.ts +11 -0
  380. package/dist/components/six-dialog.js +190 -0
  381. package/dist/components/six-dialog.js.map +1 -0
  382. package/dist/components/six-drawer.d.ts +11 -0
  383. package/dist/components/six-drawer.js +209 -0
  384. package/dist/components/six-drawer.js.map +1 -0
  385. package/dist/components/six-dropdown.d.ts +11 -0
  386. package/dist/components/six-dropdown.js +8 -0
  387. package/dist/components/six-dropdown.js.map +1 -0
  388. package/dist/components/six-dropdown2.js +499 -0
  389. package/dist/components/six-dropdown2.js.map +1 -0
  390. package/dist/components/six-error-page.d.ts +11 -0
  391. package/dist/components/six-error-page.js +134 -0
  392. package/dist/components/six-error-page.js.map +1 -0
  393. package/dist/components/six-file-list-item.d.ts +11 -0
  394. package/dist/components/six-file-list-item.js +74 -0
  395. package/dist/components/six-file-list-item.js.map +1 -0
  396. package/dist/components/six-file-list.d.ts +11 -0
  397. package/dist/components/six-file-list.js +35 -0
  398. package/dist/components/six-file-list.js.map +1 -0
  399. package/dist/components/six-file-upload.d.ts +11 -0
  400. package/dist/components/six-file-upload.js +147 -0
  401. package/dist/components/six-file-upload.js.map +1 -0
  402. package/dist/components/six-footer.d.ts +11 -0
  403. package/dist/components/six-footer.js +35 -0
  404. package/dist/components/six-footer.js.map +1 -0
  405. package/dist/components/six-form.d.ts +11 -0
  406. package/dist/components/six-form.js +252 -0
  407. package/dist/components/six-form.js.map +1 -0
  408. package/dist/components/six-group-label.d.ts +11 -0
  409. package/dist/components/six-group-label.js +78 -0
  410. package/dist/components/six-group-label.js.map +1 -0
  411. package/dist/components/six-header.d.ts +11 -0
  412. package/dist/components/six-header.js +219 -0
  413. package/dist/components/six-header.js.map +1 -0
  414. package/dist/components/six-icon-button.d.ts +11 -0
  415. package/dist/components/six-icon-button.js +8 -0
  416. package/dist/components/six-icon-button.js.map +1 -0
  417. package/dist/components/six-icon-button2.js +70 -0
  418. package/dist/components/six-icon-button2.js.map +1 -0
  419. package/dist/components/six-icon.d.ts +11 -0
  420. package/dist/components/six-icon.js +8 -0
  421. package/dist/components/six-icon.js.map +1 -0
  422. package/dist/components/six-icon2.js +49 -0
  423. package/dist/components/six-icon2.js.map +1 -0
  424. package/dist/components/six-input.d.ts +11 -0
  425. package/dist/components/six-input.js +8 -0
  426. package/dist/components/six-input.js.map +1 -0
  427. package/dist/components/six-input2.js +303 -0
  428. package/dist/components/six-input2.js.map +1 -0
  429. package/dist/components/six-item-picker.d.ts +11 -0
  430. package/dist/components/six-item-picker.js +8 -0
  431. package/dist/components/six-item-picker.js.map +1 -0
  432. package/dist/components/six-item-picker2.js +404 -0
  433. package/dist/components/six-item-picker2.js.map +1 -0
  434. package/dist/components/six-language-switcher.d.ts +11 -0
  435. package/dist/components/six-language-switcher.js +82 -0
  436. package/dist/components/six-language-switcher.js.map +1 -0
  437. package/dist/components/six-layout-grid.d.ts +11 -0
  438. package/dist/components/six-layout-grid.js +49 -0
  439. package/dist/components/six-layout-grid.js.map +1 -0
  440. package/dist/components/six-main-container.d.ts +11 -0
  441. package/dist/components/six-main-container.js +39 -0
  442. package/dist/components/six-main-container.js.map +1 -0
  443. package/dist/components/six-menu-divider.d.ts +11 -0
  444. package/dist/components/six-menu-divider.js +35 -0
  445. package/dist/components/six-menu-divider.js.map +1 -0
  446. package/dist/components/six-menu-item.d.ts +11 -0
  447. package/dist/components/six-menu-item.js +8 -0
  448. package/dist/components/six-menu-item.js.map +1 -0
  449. package/dist/components/six-menu-item2.js +86 -0
  450. package/dist/components/six-menu-item2.js.map +1 -0
  451. package/dist/components/six-menu-label.d.ts +11 -0
  452. package/dist/components/six-menu-label.js +35 -0
  453. package/dist/components/six-menu-label.js.map +1 -0
  454. package/dist/components/six-menu.d.ts +11 -0
  455. package/dist/components/six-menu.js +8 -0
  456. package/dist/components/six-menu.js.map +1 -0
  457. package/dist/components/six-menu2.js +252 -0
  458. package/dist/components/six-menu2.js.map +1 -0
  459. package/dist/components/six-picto.d.ts +11 -0
  460. package/dist/components/six-picto.js +8 -0
  461. package/dist/components/six-picto.js.map +1 -0
  462. package/dist/{custom-elements/index.js → components/six-picto2.js} +30 -9749
  463. package/dist/components/six-picto2.js.map +1 -0
  464. package/dist/components/six-progress-bar.d.ts +11 -0
  465. package/dist/components/six-progress-bar.js +45 -0
  466. package/dist/components/six-progress-bar.js.map +1 -0
  467. package/dist/components/six-progress-ring.d.ts +11 -0
  468. package/dist/components/six-progress-ring.js +61 -0
  469. package/dist/components/six-progress-ring.js.map +1 -0
  470. package/dist/components/six-radio.d.ts +11 -0
  471. package/dist/components/six-radio.js +157 -0
  472. package/dist/components/six-radio.js.map +1 -0
  473. package/dist/components/six-range.d.ts +11 -0
  474. package/dist/components/six-range.js +236 -0
  475. package/dist/components/six-range.js.map +1 -0
  476. package/dist/components/six-root.d.ts +11 -0
  477. package/dist/components/six-root.js +82 -0
  478. package/dist/components/six-root.js.map +1 -0
  479. package/dist/components/six-search-field.d.ts +11 -0
  480. package/dist/components/six-search-field.js +85 -0
  481. package/dist/components/six-search-field.js.map +1 -0
  482. package/dist/components/six-select.d.ts +11 -0
  483. package/dist/components/six-select.js +526 -0
  484. package/dist/components/six-select.js.map +1 -0
  485. package/dist/components/six-sidebar-item-group.d.ts +11 -0
  486. package/dist/components/six-sidebar-item-group.js +88 -0
  487. package/dist/components/six-sidebar-item-group.js.map +1 -0
  488. package/dist/components/six-sidebar-item.d.ts +11 -0
  489. package/dist/components/six-sidebar-item.js +46 -0
  490. package/dist/components/six-sidebar-item.js.map +1 -0
  491. package/dist/components/six-sidebar.d.ts +11 -0
  492. package/dist/components/six-sidebar.js +205 -0
  493. package/dist/components/six-sidebar.js.map +1 -0
  494. package/dist/components/six-spinner.d.ts +11 -0
  495. package/dist/components/six-spinner.js +8 -0
  496. package/dist/components/six-spinner.js.map +1 -0
  497. package/dist/components/six-spinner2.js +41 -0
  498. package/dist/components/six-spinner2.js.map +1 -0
  499. package/dist/components/six-stage-indicator.d.ts +11 -0
  500. package/dist/components/six-stage-indicator.js +8 -0
  501. package/dist/components/six-stage-indicator.js.map +1 -0
  502. package/dist/components/six-stage-indicator2.js +41 -0
  503. package/dist/components/six-stage-indicator2.js.map +1 -0
  504. package/dist/components/six-switch.d.ts +11 -0
  505. package/dist/components/six-switch.js +139 -0
  506. package/dist/components/six-switch.js.map +1 -0
  507. package/dist/components/six-tab-group.d.ts +11 -0
  508. package/dist/components/six-tab-group.js +268 -0
  509. package/dist/components/six-tab-group.js.map +1 -0
  510. package/dist/components/six-tab-panel.d.ts +11 -0
  511. package/dist/components/six-tab-panel.js +45 -0
  512. package/dist/components/six-tab-panel.js.map +1 -0
  513. package/dist/components/six-tab.d.ts +11 -0
  514. package/dist/components/six-tab.js +84 -0
  515. package/dist/components/six-tab.js.map +1 -0
  516. package/dist/components/six-table-cell.d.ts +11 -0
  517. package/dist/components/six-table-cell.js +8 -0
  518. package/dist/components/six-table-cell.js.map +1 -0
  519. package/dist/components/six-table-cell2.js +32 -0
  520. package/dist/components/six-table-cell2.js.map +1 -0
  521. package/dist/components/six-table-header-cell.d.ts +11 -0
  522. package/dist/components/six-table-header-cell.js +8 -0
  523. package/dist/components/six-table-header-cell.js.map +1 -0
  524. package/dist/components/six-table-header-cell2.js +120 -0
  525. package/dist/components/six-table-header-cell2.js.map +1 -0
  526. package/dist/components/six-table-header.d.ts +11 -0
  527. package/dist/components/six-table-header.js +8 -0
  528. package/dist/components/six-table-header.js.map +1 -0
  529. package/dist/components/six-table-header2.js +32 -0
  530. package/dist/components/six-table-header2.js.map +1 -0
  531. package/dist/components/six-table-row.d.ts +11 -0
  532. package/dist/components/six-table-row.js +8 -0
  533. package/dist/components/six-table-row.js.map +1 -0
  534. package/dist/components/six-table-row2.js +32 -0
  535. package/dist/components/six-table-row2.js.map +1 -0
  536. package/dist/components/six-table.d.ts +11 -0
  537. package/dist/components/six-table.js +252 -0
  538. package/dist/components/six-table.js.map +1 -0
  539. package/dist/components/six-tag.d.ts +11 -0
  540. package/dist/components/six-tag.js +8 -0
  541. package/dist/components/six-tag.js.map +1 -0
  542. package/dist/components/six-tag2.js +77 -0
  543. package/dist/components/six-tag2.js.map +1 -0
  544. package/dist/components/six-textarea.d.ts +11 -0
  545. package/dist/components/six-textarea.js +269 -0
  546. package/dist/components/six-textarea.js.map +1 -0
  547. package/dist/components/six-tile.d.ts +11 -0
  548. package/dist/components/six-tile.js +142 -0
  549. package/dist/components/six-tile.js.map +1 -0
  550. package/dist/components/six-timepicker.d.ts +11 -0
  551. package/dist/components/six-timepicker.js +8 -0
  552. package/dist/components/six-timepicker.js.map +1 -0
  553. package/dist/components/six-timepicker2.js +559 -0
  554. package/dist/components/six-timepicker2.js.map +1 -0
  555. package/dist/components/six-tooltip.d.ts +11 -0
  556. package/dist/components/six-tooltip.js +8 -0
  557. package/dist/components/six-tooltip.js.map +1 -0
  558. package/dist/components/six-tooltip2.js +194 -0
  559. package/dist/components/six-tooltip2.js.map +1 -0
  560. package/dist/{esm/slot-5253e199.js → components/slot.js} +44 -42
  561. package/dist/components/slot.js.map +1 -0
  562. package/dist/components.d.ts +27 -0
  563. package/dist/components.json +61 -28
  564. package/dist/esm/event-listeners-570a24ea.js +43 -0
  565. package/dist/esm/event-listeners-570a24ea.js.map +1 -0
  566. package/dist/esm/execution-control-1a60d709.js +40 -0
  567. package/dist/esm/execution-control-1a60d709.js.map +1 -0
  568. package/dist/esm/focus-visible-97933ea9.js +45 -0
  569. package/dist/esm/focus-visible-97933ea9.js.map +1 -0
  570. package/dist/esm/{form-control-17478ad2.js → form-control-bdd1478a.js} +28 -26
  571. package/dist/esm/form-control-bdd1478a.js.map +1 -0
  572. package/dist/esm/{index-a2605a62.js → index-96b1af5d.js} +603 -279
  573. package/dist/esm/index-96b1af5d.js.map +1 -0
  574. package/dist/esm/index.js +2 -0
  575. package/dist/esm/index.js.map +1 -0
  576. package/dist/esm/loader.js +6 -3
  577. package/dist/esm/loader.js.map +1 -0
  578. package/dist/esm/modal-5ebdc320.js +48 -0
  579. package/dist/esm/modal-5ebdc320.js.map +1 -0
  580. package/dist/esm/polyfills/core-js.js +0 -0
  581. package/dist/esm/polyfills/css-shim.js +1 -1
  582. package/dist/esm/polyfills/dom.js +0 -0
  583. package/dist/esm/polyfills/es5-html-element.js +0 -0
  584. package/dist/esm/polyfills/index.js +0 -0
  585. package/dist/esm/polyfills/system.js +0 -0
  586. package/dist/esm/popover-bd2c2fca.js +1897 -0
  587. package/dist/esm/popover-bd2c2fca.js.map +1 -0
  588. package/dist/esm/scroll-180b53fd.js +64 -0
  589. package/dist/esm/scroll-180b53fd.js.map +1 -0
  590. package/dist/esm/set-attributes_2.entry.js +58 -58
  591. package/dist/esm/set-attributes_2.entry.js.map +1 -0
  592. package/dist/esm/six-alert.entry.js +127 -132
  593. package/dist/esm/six-alert.entry.js.map +1 -0
  594. package/dist/esm/six-avatar.entry.js +27 -29
  595. package/dist/esm/six-avatar.entry.js.map +1 -0
  596. package/dist/esm/six-badge.entry.js +26 -27
  597. package/dist/esm/six-badge.entry.js.map +1 -0
  598. package/dist/esm/six-button.entry.js +96 -98
  599. package/dist/esm/six-button.entry.js.map +1 -0
  600. package/dist/esm/six-card.entry.js +11 -9
  601. package/dist/esm/six-card.entry.js.map +1 -0
  602. package/dist/esm/six-checkbox.entry.js +149 -153
  603. package/dist/esm/six-checkbox.entry.js.map +1 -0
  604. package/dist/esm/six-datepicker.entry.js +1137 -1190
  605. package/dist/esm/six-datepicker.entry.js.map +1 -0
  606. package/dist/esm/six-details.entry.js +137 -140
  607. package/dist/esm/six-details.entry.js.map +1 -0
  608. package/dist/esm/six-dialog.entry.js +146 -153
  609. package/dist/esm/six-dialog.entry.js.map +1 -0
  610. package/dist/esm/six-drawer.entry.js +163 -175
  611. package/dist/esm/six-drawer.entry.js.map +1 -0
  612. package/dist/esm/six-dropdown_3.entry.js +682 -729
  613. package/dist/esm/six-dropdown_3.entry.js.map +1 -0
  614. package/dist/esm/six-error-page.entry.js +98 -95
  615. package/dist/esm/six-error-page.entry.js.map +1 -0
  616. package/dist/esm/six-file-list-item.entry.js +37 -39
  617. package/dist/esm/six-file-list-item.entry.js.map +1 -0
  618. package/dist/esm/six-file-list.entry.js +11 -9
  619. package/dist/esm/six-file-list.entry.js.map +1 -0
  620. package/dist/esm/six-file-upload.entry.js +110 -97
  621. package/dist/esm/six-file-upload.entry.js.map +1 -0
  622. package/dist/esm/six-footer.entry.js +11 -9
  623. package/dist/esm/six-footer.entry.js.map +1 -0
  624. package/dist/esm/six-form.entry.js +221 -220
  625. package/dist/esm/six-form.entry.js.map +1 -0
  626. package/dist/esm/six-group-label.entry.js +46 -47
  627. package/dist/esm/six-group-label.entry.js.map +1 -0
  628. package/dist/esm/six-header.entry.js +150 -150
  629. package/dist/esm/six-header.entry.js.map +1 -0
  630. package/dist/esm/six-icon-button.entry.js +37 -34
  631. package/dist/esm/six-icon-button.entry.js.map +1 -0
  632. package/dist/esm/six-icon.entry.js +25 -25
  633. package/dist/esm/six-icon.entry.js.map +1 -0
  634. package/dist/esm/six-input.entry.js +229 -231
  635. package/dist/esm/six-input.entry.js.map +1 -0
  636. package/dist/esm/six-item-picker.entry.js +347 -362
  637. package/dist/esm/six-item-picker.entry.js.map +1 -0
  638. package/dist/esm/six-language-switcher.entry.js +55 -53
  639. package/dist/esm/six-language-switcher.entry.js.map +1 -0
  640. package/dist/esm/six-layout-grid.entry.js +23 -20
  641. package/dist/esm/six-layout-grid.entry.js.map +1 -0
  642. package/dist/esm/six-main-container.entry.js +13 -12
  643. package/dist/esm/six-main-container.entry.js.map +1 -0
  644. package/dist/esm/six-menu-divider.entry.js +11 -9
  645. package/dist/esm/six-menu-divider.entry.js.map +1 -0
  646. package/dist/esm/six-menu-label.entry.js +11 -9
  647. package/dist/esm/six-menu-label.entry.js.map +1 -0
  648. package/dist/esm/six-picto.entry.js +15 -16
  649. package/dist/esm/six-picto.entry.js.map +1 -0
  650. package/dist/esm/six-progress-bar.entry.js +18 -18
  651. package/dist/esm/six-progress-bar.entry.js.map +1 -0
  652. package/dist/esm/six-progress-ring.entry.js +33 -32
  653. package/dist/esm/six-progress-ring.entry.js.map +1 -0
  654. package/dist/esm/six-radio.entry.js +120 -122
  655. package/dist/esm/six-radio.entry.js.map +1 -0
  656. package/dist/esm/six-range.entry.js +188 -199
  657. package/dist/esm/six-range.entry.js.map +1 -0
  658. package/dist/esm/six-root.entry.js +34 -35
  659. package/dist/esm/six-root.entry.js.map +1 -0
  660. package/dist/esm/six-search-field.entry.js +43 -44
  661. package/dist/esm/six-search-field.entry.js.map +1 -0
  662. package/dist/esm/six-select.entry.js +422 -448
  663. package/dist/esm/six-select.entry.js.map +1 -0
  664. package/dist/esm/six-sidebar-item-group.entry.js +44 -43
  665. package/dist/esm/six-sidebar-item-group.entry.js.map +1 -0
  666. package/dist/esm/six-sidebar-item.entry.js +18 -19
  667. package/dist/esm/six-sidebar-item.entry.js.map +1 -0
  668. package/dist/esm/six-sidebar.entry.js +170 -172
  669. package/dist/esm/six-sidebar.entry.js.map +1 -0
  670. package/dist/esm/six-spinner.entry.js +18 -17
  671. package/dist/esm/six-spinner.entry.js.map +1 -0
  672. package/dist/esm/six-switch.entry.js +101 -101
  673. package/dist/esm/six-switch.entry.js.map +1 -0
  674. package/dist/esm/six-tab-group.entry.js +227 -227
  675. package/dist/esm/six-tab-group.entry.js.map +1 -0
  676. package/dist/esm/six-tab-panel.entry.js +18 -18
  677. package/dist/esm/six-tab-panel.entry.js.map +1 -0
  678. package/dist/esm/six-tab.entry.js +41 -43
  679. package/dist/esm/six-tab.entry.js.map +1 -0
  680. package/dist/esm/six-table-cell_4.entry.js +77 -72
  681. package/dist/esm/six-table-cell_4.entry.js.map +1 -0
  682. package/dist/esm/six-table.entry.js +145 -146
  683. package/dist/esm/six-table.entry.js.map +1 -0
  684. package/dist/esm/six-tag.entry.js +39 -41
  685. package/dist/esm/six-tag.entry.js.map +1 -0
  686. package/dist/esm/six-textarea.entry.js +209 -212
  687. package/dist/esm/six-textarea.entry.js.map +1 -0
  688. package/dist/esm/six-tile.entry.js +87 -90
  689. package/dist/esm/six-tile.entry.js.map +1 -0
  690. package/dist/esm/six-timepicker.entry.js +441 -490
  691. package/dist/esm/six-timepicker.entry.js.map +1 -0
  692. package/dist/esm/{six-timepicker.types-cd6bac03.js → six-timepicker.types-e161a447.js} +45 -43
  693. package/dist/esm/six-timepicker.types-e161a447.js.map +1 -0
  694. package/dist/esm/six-tooltip.entry.js +163 -173
  695. package/dist/esm/six-tooltip.entry.js.map +1 -0
  696. package/dist/esm/slot-6f3984c7.js +47 -0
  697. package/dist/esm/slot-6f3984c7.js.map +1 -0
  698. package/dist/esm/{types-a37c1695.js → types-4b10b413.js} +14 -12
  699. package/dist/esm/types-4b10b413.js.map +1 -0
  700. package/dist/esm/ui-library.js +9 -3
  701. package/dist/esm/ui-library.js.map +1 -0
  702. package/dist/types/components/six-alert/six-alert.d.ts +60 -60
  703. package/dist/types/components/six-avatar/six-avatar.d.ts +27 -27
  704. package/dist/types/components/six-badge/six-badge.d.ts +20 -20
  705. package/dist/types/components/six-button/six-button.d.ts +69 -69
  706. package/dist/types/components/six-card/six-card.d.ts +9 -9
  707. package/dist/types/components/six-checkbox/six-checkbox.d.ts +86 -86
  708. package/dist/types/components/six-datepicker/components/day-selection.d.ts +5 -5
  709. package/dist/types/components/six-datepicker/components/month-selection.d.ts +5 -5
  710. package/dist/types/components/six-datepicker/components/year-selection.d.ts +5 -5
  711. package/dist/types/components/six-datepicker/six-date-formats.d.ts +22 -22
  712. package/dist/types/components/six-datepicker/six-datepicker.d.ts +214 -214
  713. package/dist/types/components/six-datepicker/test/six-datepicker.test-helpers.d.ts +1 -1
  714. package/dist/types/components/six-details/six-details.d.ts +61 -61
  715. package/dist/types/components/six-dialog/six-dialog.d.ts +75 -75
  716. package/dist/types/components/six-drawer/six-drawer.d.ts +82 -82
  717. package/dist/types/components/six-dropdown/six-dropdown.d.ts +140 -140
  718. package/dist/types/components/six-error-page/six-error-page.d.ts +27 -27
  719. package/dist/types/components/six-file-list/six-file-list.d.ts +8 -8
  720. package/dist/types/components/six-file-list-item/six-file-list-item.d.ts +35 -35
  721. package/dist/types/components/six-file-upload/six-file-upload.d.ts +49 -42
  722. package/dist/types/components/six-footer/six-footer.d.ts +9 -9
  723. package/dist/types/components/six-form/six-form.d.ts +69 -69
  724. package/dist/types/components/six-group-label/six-group-label.d.ts +37 -37
  725. package/dist/types/components/six-header/six-header.d.ts +90 -90
  726. package/dist/types/components/six-icon/six-icon.d.ts +13 -13
  727. package/dist/types/components/six-icon-button/six-icon-button.d.ts +28 -28
  728. package/dist/types/components/six-input/six-input.d.ts +165 -165
  729. package/dist/types/components/six-item-picker/six-item-picker.d.ts +106 -106
  730. package/dist/types/components/six-item-picker/types.d.ts +11 -11
  731. package/dist/types/components/six-language-switcher/six-language-switcher.d.ts +25 -25
  732. package/dist/types/components/six-layout-grid/six-layout-grid.d.ts +14 -14
  733. package/dist/types/components/six-main-container/six-main-container.d.ts +16 -16
  734. package/dist/types/components/six-menu/six-menu.d.ts +81 -81
  735. package/dist/types/components/six-menu-divider/six-menu-divider.d.ts +11 -11
  736. package/dist/types/components/six-menu-item/six-menu-item.d.ts +39 -36
  737. package/dist/types/components/six-menu-label/six-menu-label.d.ts +13 -13
  738. package/dist/types/components/six-picto/six-picto.d.ts +14 -14
  739. package/dist/types/components/six-progress-bar/six-progress-bar.d.ts +19 -19
  740. package/dist/types/components/six-progress-ring/six-progress-ring.d.ts +24 -24
  741. package/dist/types/components/six-radio/six-radio.d.ts +66 -66
  742. package/dist/types/components/six-range/six-range.d.ts +101 -101
  743. package/dist/types/components/six-root/six-root.d.ts +34 -34
  744. package/dist/types/components/six-search-field/six-search-field.d.ts +32 -32
  745. package/dist/types/components/six-select/six-select.d.ts +164 -163
  746. package/dist/types/components/six-sidebar/six-sidebar.d.ts +55 -55
  747. package/dist/types/components/six-sidebar-item/six-sidebar-item.d.ts +15 -15
  748. package/dist/types/components/six-sidebar-item-group/six-sidebar-item-group.d.ts +26 -26
  749. package/dist/types/components/six-spinner/six-spinner.d.ts +15 -15
  750. package/dist/types/components/six-stage-indicator/six-stage-indicator.d.ts +6 -6
  751. package/dist/types/components/six-switch/six-switch.d.ts +62 -62
  752. package/dist/types/components/six-tab/six-tab.d.ts +35 -35
  753. package/dist/types/components/six-tab-group/six-tab-group.d.ts +62 -62
  754. package/dist/types/components/six-tab-panel/six-tab-panel.d.ts +19 -19
  755. package/dist/types/components/six-table/six-table.d.ts +30 -30
  756. package/dist/types/components/six-table/test/helpers.d.ts +2 -2
  757. package/dist/types/components/six-table/types.d.ts +33 -33
  758. package/dist/types/components/six-table/util/filter-by.d.ts +2 -2
  759. package/dist/types/components/six-table/util/from-data.d.ts +8 -8
  760. package/dist/types/components/six-table/util/is.d.ts +3 -3
  761. package/dist/types/components/six-table/util/quick-filter-by.d.ts +2 -2
  762. package/dist/types/components/six-table/util/sort-by.d.ts +2 -2
  763. package/dist/types/components/six-table-cell/six-table-cell.d.ts +9 -9
  764. package/dist/types/components/six-table-header/six-table-header.d.ts +9 -9
  765. package/dist/types/components/six-table-header-cell/get-next-state.d.ts +2 -2
  766. package/dist/types/components/six-table-header-cell/icons.d.ts +3 -3
  767. package/dist/types/components/six-table-header-cell/six-table-header-cell.d.ts +32 -32
  768. package/dist/types/components/six-table-header-cell/types.d.ts +2 -11
  769. package/dist/types/components/six-table-header-cell/util/create-model.d.ts +4 -4
  770. package/dist/types/components/six-table-header-cell/util/get-next-state.d.ts +3 -3
  771. package/dist/types/components/six-table-row/six-table-row.d.ts +9 -9
  772. package/dist/types/components/six-tag/six-tag.d.ts +30 -30
  773. package/dist/types/components/six-textarea/six-textarea.d.ts +134 -134
  774. package/dist/types/components/six-tile/six-tile.d.ts +40 -40
  775. package/dist/types/components/six-timepicker/six-time-format.d.ts +13 -13
  776. package/dist/types/components/six-timepicker/six-timepicker.d.ts +184 -184
  777. package/dist/types/components/six-timepicker/six-timepicker.types.d.ts +36 -36
  778. package/dist/types/components/six-tooltip/six-tooltip.d.ts +72 -72
  779. package/dist/types/components.d.ts +1254 -106
  780. package/dist/types/functional-components/form-control/form-control.d.ts +34 -34
  781. package/dist/types/index.d.ts +1 -1
  782. package/dist/types/stencil-public-runtime.d.ts +91 -19
  783. package/dist/types/testUtil/delay.d.ts +1 -1
  784. package/dist/types/utils/as-array.d.ts +1 -1
  785. package/dist/types/utils/date-util.d.ts +194 -194
  786. package/dist/types/utils/event-listeners.d.ts +15 -15
  787. package/dist/types/utils/execution-control.d.ts +26 -26
  788. package/dist/types/utils/focus-visible.d.ts +6 -6
  789. package/dist/types/utils/matchers.d.ts +2 -2
  790. package/dist/types/utils/modal.d.ts +13 -13
  791. package/dist/types/utils/offset.d.ts +4 -4
  792. package/dist/types/utils/popover.d.ts +27 -27
  793. package/dist/types/utils/scroll.d.ts +3 -3
  794. package/dist/types/utils/slot.d.ts +9 -9
  795. package/dist/types/utils/support.d.ts +1 -1
  796. package/dist/types/utils/tabbable.d.ts +2 -2
  797. package/dist/types/utils/testing.d.ts +2 -2
  798. package/dist/types/utils/time.util.d.ts +10 -10
  799. package/dist/types/utils/type-check.d.ts +4 -4
  800. package/dist/types/utils/types.d.ts +4 -4
  801. package/dist/types/wrappers/set-attributes/set-attributes.d.ts +9 -9
  802. package/dist/ui-library/index.esm.js +2 -0
  803. package/dist/ui-library/index.esm.js.map +1 -0
  804. package/dist/ui-library/p-00507165.entry.js +2 -0
  805. package/dist/ui-library/p-00507165.entry.js.map +1 -0
  806. package/dist/ui-library/p-028a2c54.entry.js +2 -0
  807. package/dist/ui-library/p-028a2c54.entry.js.map +1 -0
  808. package/dist/ui-library/p-028a2f77.entry.js +2 -0
  809. package/dist/ui-library/p-028a2f77.entry.js.map +1 -0
  810. package/dist/ui-library/p-0786fa7c.js +2 -0
  811. package/dist/ui-library/p-0786fa7c.js.map +1 -0
  812. package/dist/ui-library/p-0c89817e.entry.js +2 -0
  813. package/dist/ui-library/p-0c89817e.entry.js.map +1 -0
  814. package/dist/ui-library/p-0d1fdc4e.entry.js +2 -0
  815. package/dist/ui-library/p-0d1fdc4e.entry.js.map +1 -0
  816. package/dist/ui-library/p-0d9cbb51.entry.js +2 -0
  817. package/dist/ui-library/p-0d9cbb51.entry.js.map +1 -0
  818. package/dist/ui-library/p-12000282.entry.js +2 -0
  819. package/dist/ui-library/p-12000282.entry.js.map +1 -0
  820. package/dist/ui-library/p-1414a242.entry.js +2 -0
  821. package/dist/ui-library/p-1414a242.entry.js.map +1 -0
  822. package/dist/ui-library/p-14db57aa.entry.js +2 -0
  823. package/dist/ui-library/p-14db57aa.entry.js.map +1 -0
  824. package/dist/ui-library/p-16732ac1.entry.js +2 -0
  825. package/dist/ui-library/p-16732ac1.entry.js.map +1 -0
  826. package/dist/ui-library/p-16b99232.js +3 -0
  827. package/dist/ui-library/p-16b99232.js.map +1 -0
  828. package/dist/ui-library/p-18ea0c56.js +2 -0
  829. package/dist/ui-library/p-18ea0c56.js.map +1 -0
  830. package/dist/ui-library/p-232d43a6.entry.js +2 -0
  831. package/dist/ui-library/p-232d43a6.entry.js.map +1 -0
  832. package/dist/ui-library/p-25a3bf57.js +2 -0
  833. package/dist/ui-library/p-25a3bf57.js.map +1 -0
  834. package/dist/ui-library/p-28e6c2eb.entry.js +2 -0
  835. package/dist/ui-library/p-28e6c2eb.entry.js.map +1 -0
  836. package/dist/ui-library/p-2a02734a.entry.js +2 -0
  837. package/dist/ui-library/p-2a02734a.entry.js.map +1 -0
  838. package/dist/ui-library/p-2a61cc66.entry.js +2 -0
  839. package/dist/ui-library/p-2a61cc66.entry.js.map +1 -0
  840. package/dist/ui-library/p-3c100309.js +2 -0
  841. package/dist/ui-library/p-3c100309.js.map +1 -0
  842. package/dist/ui-library/p-3d5cad2d.entry.js +2 -0
  843. package/dist/ui-library/p-3d5cad2d.entry.js.map +1 -0
  844. package/dist/ui-library/p-3e3edcbc.entry.js +2 -0
  845. package/dist/ui-library/p-3e3edcbc.entry.js.map +1 -0
  846. package/dist/ui-library/p-3efe46cf.entry.js +2 -0
  847. package/dist/ui-library/p-3efe46cf.entry.js.map +1 -0
  848. package/dist/ui-library/p-4b44fa83.entry.js +2 -0
  849. package/dist/ui-library/p-4b44fa83.entry.js.map +1 -0
  850. package/dist/ui-library/p-4bcebd5a.entry.js +2 -0
  851. package/dist/ui-library/p-4bcebd5a.entry.js.map +1 -0
  852. package/dist/ui-library/p-4d4829db.entry.js +2 -0
  853. package/dist/ui-library/p-4d4829db.entry.js.map +1 -0
  854. package/dist/ui-library/p-4f8394d7.js +2 -0
  855. package/dist/ui-library/p-4f8394d7.js.map +1 -0
  856. package/dist/ui-library/p-524e5804.entry.js +2 -0
  857. package/dist/ui-library/p-524e5804.entry.js.map +1 -0
  858. package/dist/ui-library/p-52cb61bd.entry.js +2 -0
  859. package/dist/ui-library/p-52cb61bd.entry.js.map +1 -0
  860. package/dist/ui-library/p-55dc28ad.entry.js +2 -0
  861. package/dist/ui-library/p-55dc28ad.entry.js.map +1 -0
  862. package/dist/ui-library/p-57a84d7f.entry.js +2 -0
  863. package/dist/ui-library/p-57a84d7f.entry.js.map +1 -0
  864. package/dist/ui-library/p-5eb21538.entry.js +2 -0
  865. package/dist/ui-library/p-5eb21538.entry.js.map +1 -0
  866. package/dist/ui-library/p-60c5395c.entry.js +2 -0
  867. package/dist/ui-library/p-60c5395c.entry.js.map +1 -0
  868. package/dist/ui-library/p-694829b8.entry.js +2 -0
  869. package/dist/ui-library/p-694829b8.entry.js.map +1 -0
  870. package/dist/ui-library/p-6cc82df5.entry.js +2 -0
  871. package/dist/ui-library/p-6cc82df5.entry.js.map +1 -0
  872. package/dist/ui-library/p-7115416e.entry.js +2 -0
  873. package/dist/ui-library/p-7115416e.entry.js.map +1 -0
  874. package/dist/ui-library/p-788281d0.entry.js +2 -0
  875. package/dist/ui-library/p-788281d0.entry.js.map +1 -0
  876. package/dist/ui-library/p-7cbc261b.entry.js +2 -0
  877. package/dist/ui-library/p-7cbc261b.entry.js.map +1 -0
  878. package/dist/ui-library/p-80f32909.entry.js +2 -0
  879. package/dist/ui-library/p-80f32909.entry.js.map +1 -0
  880. package/dist/ui-library/p-8187701c.entry.js +2 -0
  881. package/dist/ui-library/p-8187701c.entry.js.map +1 -0
  882. package/dist/ui-library/p-94ab37b2.entry.js +2 -0
  883. package/dist/ui-library/p-94ab37b2.entry.js.map +1 -0
  884. package/dist/ui-library/p-9a860acc.js +2 -0
  885. package/dist/ui-library/p-9a860acc.js.map +1 -0
  886. package/dist/ui-library/p-9eba5c71.entry.js +2 -0
  887. package/dist/ui-library/p-9eba5c71.entry.js.map +1 -0
  888. package/dist/ui-library/p-9f9bef35.entry.js +2 -0
  889. package/dist/ui-library/p-9f9bef35.entry.js.map +1 -0
  890. package/dist/ui-library/p-b1683e9c.entry.js +2 -0
  891. package/dist/ui-library/p-b1683e9c.entry.js.map +1 -0
  892. package/dist/ui-library/p-b1e66136.js +2 -0
  893. package/dist/ui-library/p-b1e66136.js.map +1 -0
  894. package/dist/ui-library/p-b3974ad4.entry.js +2 -0
  895. package/dist/ui-library/p-b3974ad4.entry.js.map +1 -0
  896. package/dist/ui-library/p-b4dfb7cf.js +2 -0
  897. package/dist/ui-library/p-b4dfb7cf.js.map +1 -0
  898. package/dist/ui-library/p-b66c5c48.entry.js +2 -0
  899. package/dist/ui-library/p-b66c5c48.entry.js.map +1 -0
  900. package/dist/ui-library/p-ba6e1f0e.entry.js +2 -0
  901. package/dist/ui-library/p-ba6e1f0e.entry.js.map +1 -0
  902. package/dist/ui-library/p-c799a6bf.entry.js +2 -0
  903. package/dist/ui-library/p-c799a6bf.entry.js.map +1 -0
  904. package/dist/ui-library/p-ccee090e.entry.js +2 -0
  905. package/dist/ui-library/p-ccee090e.entry.js.map +1 -0
  906. package/dist/ui-library/p-cf2bdd34.entry.js +2 -0
  907. package/dist/ui-library/p-cf2bdd34.entry.js.map +1 -0
  908. package/dist/ui-library/p-d12c6092.js +2 -0
  909. package/dist/ui-library/p-d12c6092.js.map +1 -0
  910. package/dist/ui-library/p-dd0ac344.entry.js +2 -0
  911. package/dist/ui-library/p-dd0ac344.entry.js.map +1 -0
  912. package/dist/ui-library/p-def4a925.entry.js +2 -0
  913. package/dist/ui-library/p-def4a925.entry.js.map +1 -0
  914. package/dist/ui-library/p-e0bda772.entry.js +2 -0
  915. package/dist/ui-library/p-e0bda772.entry.js.map +1 -0
  916. package/dist/ui-library/p-e1aed7ed.entry.js +2 -0
  917. package/dist/ui-library/p-e1aed7ed.entry.js.map +1 -0
  918. package/dist/ui-library/p-e4b6264b.entry.js +2 -0
  919. package/dist/ui-library/p-e4b6264b.entry.js.map +1 -0
  920. package/dist/ui-library/p-eb1ec1b7.entry.js +2 -0
  921. package/dist/ui-library/p-eb1ec1b7.entry.js.map +1 -0
  922. package/dist/ui-library/p-eb8f05a9.js +2 -0
  923. package/dist/ui-library/p-eb8f05a9.js.map +1 -0
  924. package/dist/ui-library/p-f65aa796.entry.js +2 -0
  925. package/dist/ui-library/p-f65aa796.entry.js.map +1 -0
  926. package/dist/ui-library/p-f68b5c54.entry.js +2 -0
  927. package/dist/ui-library/p-f68b5c54.entry.js.map +1 -0
  928. package/dist/ui-library/p-f9c50f81.entry.js +2 -0
  929. package/dist/ui-library/p-f9c50f81.entry.js.map +1 -0
  930. package/dist/ui-library/ui-library.esm.js +2 -1
  931. package/dist/ui-library/ui-library.esm.js.map +1 -0
  932. package/loader/index.d.ts +9 -0
  933. package/loader/package.json +1 -0
  934. package/package.json +8 -12
  935. package/readme.md +41 -39
  936. package/dist/cjs/types-65e5c95b.js +0 -15
  937. package/dist/custom-elements/index.d.ts +0 -387
  938. package/dist/esm/types-33d15673.js +0 -15
  939. package/dist/ui-library/p-044c6bf9.js +0 -1
  940. package/dist/ui-library/p-0493c926.entry.js +0 -1
  941. package/dist/ui-library/p-1005d1a8.entry.js +0 -1
  942. package/dist/ui-library/p-12cc24c3.js +0 -1
  943. package/dist/ui-library/p-191f958b.js +0 -1
  944. package/dist/ui-library/p-19543c96.entry.js +0 -1
  945. package/dist/ui-library/p-19ff1079.entry.js +0 -1
  946. package/dist/ui-library/p-1b92cc7a.entry.js +0 -1
  947. package/dist/ui-library/p-1c9f0dc6.js +0 -1
  948. package/dist/ui-library/p-2053c61a.entry.js +0 -1
  949. package/dist/ui-library/p-2ff97cdf.entry.js +0 -1
  950. package/dist/ui-library/p-30ebc1e7.js +0 -1
  951. package/dist/ui-library/p-34e6d8e8.js +0 -1
  952. package/dist/ui-library/p-354704e5.entry.js +0 -1
  953. package/dist/ui-library/p-376b8f30.entry.js +0 -1
  954. package/dist/ui-library/p-3a7daff8.entry.js +0 -1
  955. package/dist/ui-library/p-3f577392.entry.js +0 -1
  956. package/dist/ui-library/p-48ea4419.entry.js +0 -1
  957. package/dist/ui-library/p-4cc01afc.entry.js +0 -1
  958. package/dist/ui-library/p-572e3690.js +0 -1
  959. package/dist/ui-library/p-5ead7b2f.entry.js +0 -1
  960. package/dist/ui-library/p-60491176.entry.js +0 -1
  961. package/dist/ui-library/p-6494e92d.entry.js +0 -1
  962. package/dist/ui-library/p-66601906.entry.js +0 -1
  963. package/dist/ui-library/p-68d31736.js +0 -1
  964. package/dist/ui-library/p-6a4f0542.entry.js +0 -1
  965. package/dist/ui-library/p-6f67f986.entry.js +0 -1
  966. package/dist/ui-library/p-76bfa55f.entry.js +0 -1
  967. package/dist/ui-library/p-7735d99f.js +0 -1
  968. package/dist/ui-library/p-7fe09462.entry.js +0 -1
  969. package/dist/ui-library/p-88e1e390.entry.js +0 -1
  970. package/dist/ui-library/p-89f68e76.entry.js +0 -1
  971. package/dist/ui-library/p-8bd0873f.entry.js +0 -1
  972. package/dist/ui-library/p-8e8e922b.entry.js +0 -1
  973. package/dist/ui-library/p-968c5169.entry.js +0 -1
  974. package/dist/ui-library/p-9f2dc381.entry.js +0 -1
  975. package/dist/ui-library/p-a77a6442.entry.js +0 -1
  976. package/dist/ui-library/p-a8c225f2.entry.js +0 -1
  977. package/dist/ui-library/p-a98198bd.entry.js +0 -1
  978. package/dist/ui-library/p-af3d757c.js +0 -1
  979. package/dist/ui-library/p-b391f704.entry.js +0 -1
  980. package/dist/ui-library/p-b9377445.entry.js +0 -1
  981. package/dist/ui-library/p-b9fb8455.entry.js +0 -1
  982. package/dist/ui-library/p-bf110ea9.entry.js +0 -1
  983. package/dist/ui-library/p-c09dc3a9.js +0 -1
  984. package/dist/ui-library/p-c4b22513.entry.js +0 -1
  985. package/dist/ui-library/p-c536792e.entry.js +0 -1
  986. package/dist/ui-library/p-c733dead.js +0 -1
  987. package/dist/ui-library/p-c948d3db.entry.js +0 -1
  988. package/dist/ui-library/p-ce02c34f.entry.js +0 -1
  989. package/dist/ui-library/p-d724bbc9.entry.js +0 -1
  990. package/dist/ui-library/p-e96dcf96.entry.js +0 -1
  991. package/dist/ui-library/p-ea1fcff2.entry.js +0 -1
  992. package/dist/ui-library/p-ea781e94.entry.js +0 -1
  993. package/dist/ui-library/p-eae232c3.entry.js +0 -1
  994. package/dist/ui-library/p-eb0956d2.entry.js +0 -1
  995. package/dist/ui-library/p-ebaea182.entry.js +0 -1
  996. package/dist/ui-library/p-ec1ecc2a.entry.js +0 -1
  997. package/dist/ui-library/p-ed21cc57.entry.js +0 -1
  998. package/dist/ui-library/p-f00c1783.entry.js +0 -1
  999. package/dist/ui-library/p-f0e91e17.entry.js +0 -1
  1000. package/dist/ui-library/p-f9c0cfb7.entry.js +0 -1
  1001. package/dist/ui-library/p-fcd2356c.entry.js +0 -1
  1002. package/dist/ui-library/p-fdb455d7.entry.js +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixDetailsCss","id","SixDetails","this","componentId","isVisible","handleOpenChange","body","open","show","hide","connectedCallback","handleBodyTransitionEnd","bind","handleSummaryClick","handleSummaryKeyDown","componentDidLoad","focusVisible","observe","details","hidden","disconnectedCallback","unobserve","async","sixShow","emit","defaultPrevented","scrollHeight","style","height","overflow","sixHide","requestAnimationFrame","event","target","propertyName","classList","contains","sixAfterShow","sixAfterHide","disabled","hasContent","selectableEmpty","header","focus","key","preventDefault","render","summaryIcon","h","ref","el","part","class","inline","role","tabIndex","onClick","onKeyDown","name","summary","animateSummaryIcon","onSlotchange","size","summaryIconSize","onTransitionEnd"],"sources":["./src/components/six-details/six-details.scss?tag=six-details&encapsulation=shadow","./src/components/six-details/six-details.tsx"],"sourcesContent":["@import 'src/global/component';\n\n/**\n * @prop --hide-duration: The length of the hide transition.\n * @prop --hide-timing-function: The timing function (easing) to use for the hide transition.\n * @prop --show-duration: The length of the show transition.\n * @prop --show-timing-function: The timing function (easing) to use for the show transition.\n */\n:host {\n --hide-duration: var(--six-transition-medium);\n --hide-timing-function: ease;\n --show-duration: var(--six-transition-medium);\n --show-timing-function: ease;\n\n font-family: var(--six-font-family);\n display: block;\n}\n\n.details {\n border: solid var(--six-border-width) var(--six-input-border-color);\n border-radius: var(--six-border-radius-medium);\n color: var(--six-details-color);\n overflow-anchor: none;\n font-size: var(--six-input-font-size-medium);\n\n &:hover:not(.details--disabled):not(.details--open) {\n border-color: var(--six-input-border-color-hover);\n }\n\n &.inline {\n border: none;\n color: var(--six-sidebar-color);\n\n &:hover {\n background-color: var(--six-sidebar-hover-background-color);\n }\n\n &.details--open {\n background-color: var(--six-color-web-rock-50);\n\n &:hover {\n border: none;\n box-shadow: none;\n }\n\n & > .details__header {\n color: var(--six-sidebar-color);\n font-weight: var(--six-font-weight-bold);\n background-color: var(--six-sidebar-header-background-color);\n }\n }\n }\n}\n\n.details--disabled {\n background-color: var(--six-input-background-color-disabled);\n border-color: var(--six-input-border-color-disabled);\n color: var(--six-input-color-disabled);\n}\n\n.details__header {\n display: flex;\n align-items: center;\n border-radius: inherit;\n padding: var(--six-spacing-medium);\n user-select: none;\n cursor: pointer;\n\n &:focus {\n outline: none;\n }\n}\n\n.focus-visible .details__header:focus {\n}\n\n.details--disabled .details__header {\n cursor: not-allowed;\n border-width: 1px;\n\n &:focus {\n outline: none;\n box-shadow: none;\n }\n}\n\n.details__summary {\n flex: 1 1 auto;\n display: flex;\n align-items: center;\n}\n\n.details__summary-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: 1.2em;\n transition: var(--six-transition-medium) transform ease;\n}\n\n.details--open .details__summary-icon--animate {\n transform: rotate(-180deg);\n}\n\n.details--open:hover {\n color: var(--six-input-color-focus);\n}\n\n.details__body {\n height: 0;\n overflow: hidden;\n transition-property: height;\n transition-duration: var(--hide-duration);\n transition-timing-function: var(--hide-timing-function);\n}\n\n.details--open .details__body {\n transition-duration: var(--show-duration);\n transition-timing-function: var(--show-timing-function);\n}\n\n.details__content {\n padding: var(--six-spacing-medium);\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { focusVisible } from '../../utils/focus-visible';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The details' content.\n * @slot summary - The details' summary. Alternatively, you can use the summary prop.\n *\n * @part base - The component's base wrapper.\n * @part header - The summary header.\n * @part summary - The details summary.\n * @part summary-icon - The expand/collapse summary icon.\n * @part content - The details content.\n */\n\n@Component({\n tag: 'six-details',\n styleUrl: 'six-details.scss',\n shadow: true,\n})\nexport class SixDetails {\n @Element() readonly host: HTMLSixDetailsElement;\n\n @State() animateSummaryIcon = true;\n\n body: HTMLElement;\n componentId = `details-${++id}`;\n details: HTMLElement;\n header: HTMLElement;\n isVisible = false;\n\n /** Indicates whether or not the details is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** The summary to show in the details header. If you need to display HTML, use the `summary` slot instead. */\n @Prop() summary = '';\n\n /** The summary icon to show in the details header. If you need to display HTML, use the `summary-icon` slot instead. */\n @Prop() summaryIcon: string;\n\n /** The icon's size. */\n @Prop({ reflect: true }) summaryIconSize:\n | 'inherit'\n | 'xSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'xLarge'\n | 'xxLarge'\n | 'xxxLarge' = 'inherit';\n\n /** Set to true to prevent the user from toggling the details. */\n @Prop() disabled = false;\n\n /** Set to true when you want to use six-details inline e.g. in a sidebar */\n @Prop() inline = false;\n\n /** Set to true when you want details without content to be selectable. This is important if you e.g. have a toggled sidebar where some menus have no children */\n @Prop() selectableEmpty = false;\n\n @Prop() readonly hasContent: boolean = true;\n\n @Watch('open')\n handleOpenChange() {\n if (this.body) {\n this.open ? this.show() : this.hide();\n }\n }\n\n /** Emitted when the details opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-details-show' }) sixShow: EventEmitter<EmptyPayload>;\n\n /** Emitted after the details opens and all transitions are complete. */\n @Event({ eventName: 'six-details-after-show' }) sixAfterShow: EventEmitter<EmptyPayload>;\n\n /** Emitted when the details closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-details-hide' }) sixHide: EventEmitter<EmptyPayload>;\n\n /** Emitted after the details closes and all transitions are complete. */\n @Event({ eventName: 'six-details-after-hide' }) sixAfterHide: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.handleBodyTransitionEnd = this.handleBodyTransitionEnd.bind(this);\n this.handleSummaryClick = this.handleSummaryClick.bind(this);\n this.handleSummaryKeyDown = this.handleSummaryKeyDown.bind(this);\n }\n\n componentDidLoad() {\n focusVisible.observe(this.details);\n\n this.body.hidden = !this.open;\n\n // Show on init if open\n if (this.open) {\n this.show();\n }\n }\n\n disconnectedCallback() {\n focusVisible.unobserve(this.details);\n }\n\n /** Shows the detail body */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible) {\n return;\n }\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.body.hidden = false;\n\n if (this.body.scrollHeight === 0) {\n // When the scroll height can't be measured, use auto. This prevents a borked open state when the details is open\n // intiially, but not immediately visible (i.e. in a tab panel).\n this.body.style.height = 'auto';\n this.body.style.overflow = 'visible';\n } else {\n this.body.style.height = `${this.body.scrollHeight}px`;\n this.body.style.overflow = 'hidden';\n }\n\n this.isVisible = true;\n this.open = true;\n }\n\n /** Hides the detail body */\n @Method()\n async hide() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n // We can't transition out of `height: auto`, so let's set it to the current height first\n this.body.style.height = `${this.body.scrollHeight}px`;\n this.body.style.overflow = 'hidden';\n\n requestAnimationFrame(() => {\n // tslint:disable-next-line: no-unused-expression\n this.body.clientWidth; // force a reflow\n this.body.style.height = '0';\n });\n\n this.isVisible = false;\n this.open = false;\n }\n\n handleBodyTransitionEnd(event: TransitionEvent) {\n const target = event.target as HTMLElement;\n\n // Ensure we only emit one event when the target element is no longer visible\n if (event.propertyName === 'height' && target.classList.contains('details__body')) {\n this.body.style.overflow = this.open ? 'visible' : 'hidden';\n this.body.style.height = this.open ? 'auto' : '0';\n this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();\n this.body.hidden = !this.open;\n }\n }\n\n handleSummaryClick() {\n if (!this.disabled && (this.hasContent || this.selectableEmpty)) {\n this.open ? this.hide() : this.show();\n this.header.focus();\n }\n }\n\n handleSummaryKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.open ? this.hide() : this.show();\n }\n\n if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {\n event.preventDefault();\n this.hide();\n }\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {\n event.preventDefault();\n this.show();\n }\n }\n\n render() {\n const summaryIcon = this.hasContent && (this.summaryIcon || 'expand_more');\n\n return (\n <div\n ref={(el) => (this.details = el)}\n part=\"base\"\n class={{\n details: true,\n 'details--open': this.open,\n 'details--disabled': this.disabled,\n inline: this.inline,\n }}\n >\n <header\n ref={(el) => (this.header = el)}\n part=\"header\"\n id={`${this.componentId}-header`}\n class=\"details__header\"\n role=\"button\"\n aria-expanded={this.open ? 'true' : 'false'}\n aria-controls={`${this.componentId}-content`}\n aria-disabled={this.disabled ? 'true' : 'false'}\n tabIndex={this.disabled ? -1 : 0}\n onClick={this.handleSummaryClick}\n onKeyDown={this.handleSummaryKeyDown}\n >\n <div part=\"summary\" class=\"details__summary\">\n <slot name=\"summary\">{this.summary}</slot>\n </div>\n\n <span\n part=\"summary-icon\"\n class={{\n 'details__summary-icon': true,\n 'details__summary-icon--animate': this.animateSummaryIcon,\n }}\n >\n <slot name=\"summary-icon\" onSlotchange={() => (this.animateSummaryIcon = false)}>\n {summaryIcon && <six-icon size={this.summaryIconSize}>{summaryIcon}</six-icon>}\n </slot>\n </span>\n </header>\n\n <div ref={(el) => (this.body = el)} class=\"details__body\" onTransitionEnd={this.handleBodyTransitionEnd}>\n <div\n part=\"content\"\n id={`${this.componentId}-content`}\n class=\"details__content\"\n role=\"region\"\n aria-labelledby={`${this.componentId}-header`}\n >\n <slot />\n </div>\n </div>\n </div>\n );\n }\n}\n"],"mappings":"6FAAA,MAAMA,EAAgB,ysECItB,IAAIC,EAAK,E,MAuBIC,EAAU,M,uNAMrBC,KAAAC,YAAc,aAAaH,IAG3BE,KAAAE,UAAY,M,wBANkB,K,UASiB,M,aAG7B,G,gDAcD,U,cAGE,M,YAGF,M,qBAGS,M,gBAEa,I,CAGvCC,mBACE,GAAIH,KAAKI,KAAM,CACbJ,KAAKK,KAAOL,KAAKM,OAASN,KAAKO,M,EAgBnCC,oBACER,KAAKS,wBAA0BT,KAAKS,wBAAwBC,KAAKV,MACjEA,KAAKW,mBAAqBX,KAAKW,mBAAmBD,KAAKV,MACvDA,KAAKY,qBAAuBZ,KAAKY,qBAAqBF,KAAKV,K,CAG7Da,mBACEC,EAAaC,QAAQf,KAAKgB,SAE1BhB,KAAKI,KAAKa,QAAUjB,KAAKK,KAGzB,GAAIL,KAAKK,KAAM,CACbL,KAAKM,M,EAITY,uBACEJ,EAAaK,UAAUnB,KAAKgB,Q,CAK9BI,aAEE,GAAIpB,KAAKE,UAAW,CAClB,M,CAGF,MAAMmB,EAAUrB,KAAKqB,QAAQC,OAC7B,GAAID,EAAQE,iBAAkB,CAC5BvB,KAAKK,KAAO,MACZ,M,CAGFL,KAAKI,KAAKa,OAAS,MAEnB,GAAIjB,KAAKI,KAAKoB,eAAiB,E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as s}from"./p-16b99232.js";import{h as l}from"./p-b4dfb7cf.js";const a=':host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{display:inline-block}.tile{min-height:var(--tile-size);width:var(--tile-size);background-color:var(--six-color-clay-50);display:inline-grid;grid-template-columns:100%;grid-template-areas:"header" "middle" "footer"}.tile--small{--tile-size:80px;--tile-padding-size:var(--six-spacing-medium)}.tile--medium{--tile-size:120px;--tile-padding-size:var(--six-spacing-large)}.tile--large{--tile-size:160px;--tile-padding-size:var(--six-spacing-x-large)}.tile:not(.tile--visible){visibility:hidden}.tile--elevated{border:0;box-shadow:var(--six-elevation-8dp)}.tile__header{grid-area:header;height:5%;justify-self:right;display:flex;justify-content:right;opacity:0;transition:var(--six-transition-fast) opacity}.tile:hover>.tile__header{opacity:1}.tile__header--hidden{visibility:hidden}.tile__header six-icon-button{margin-top:-6px;margin-right:-6px;margin-bottom:-16px}.tile__body,.tile__body--large,.tile__body--medium,.tile__body--small{grid-area:middle;display:grid;place-items:center;cursor:pointer;padding-left:var(--tile-padding-size);padding-right:var(--tile-padding-size)}.tile__body six-icon::part(base),.tile__body--large six-icon::part(base),.tile__body--medium six-icon::part(base),.tile__body--small six-icon::part(base){padding:0}.tile__body--small{--tile-padding-size:var(--six-spacing-medium)}.tile__body--medium{--tile-padding-size:var(--six-spacing-large)}.tile__body--large{--tile-padding-size:var(--six-spacing-x-large)}.tile__footer,.tile__footer--large,.tile__footer--medium,.tile__footer--small{grid-area:footer;display:flex;justify-content:center;cursor:pointer;font-weight:var(--six-font-weight-normal);color:var(--six-color-web-rock-900)}.tile__footer--small{font-size:var(--six-font-size-xxx-small)}.tile__footer--medium{font-size:var(--six-font-size-xx-small)}.tile__footer--large{font-size:var(--six-font-size-small)}.tile__footer .label__footer,.tile__footer--small .label__footer,.tile__footer--medium .label__footer,.tile__footer--large .label__footer{overflow:hidden;text-overflow:ellipsis;width:calc(var(--tile-size) - 2em);text-align:center}';const o=class{constructor(t){i(this,t);this.sixTileClose=e(this,"six-tile-closed",7);this.sixTileSelected=e(this,"six-tile-selected",7);this.handleCloseClickEvent=()=>{this.visible=false;this.sixTileClose.emit()};this.handleClickEvent=()=>{this.sixTileSelected.emit()};this.label="";this.iconName=undefined;this.closeable=true;this.elevated=false;this.disableTooltip=true;this.disabled=false;this.size="medium";this.visible=true;this.hasIconSlot=false;this.hasLabelSlot=false}async hide(){this.visible=false}async show(){this.visible=true}connectedCallback(){this.handleSlotChange=this.handleSlotChange.bind(this)}componentWillLoad(){this.handleSlotChange()}handleSlotChange(){this.hasIconSlot=l(this.host,"icon");this.hasLabelSlot=l(this.host,"label");if(this.hasIconSlot){let i=this.host.querySelector(`[slot="icon"]`);i.addEventListener("click",this.handleClickEvent)}if(this.hasLabelSlot){let i=this.host.querySelector(`[slot="label"]`);i.addEventListener("click",this.handleClickEvent)}}render(){return t("six-tooltip",{disabled:this.disableTooltip||this.label==="",content:this.label},t("div",{part:"base",class:{tile:true,"tile--visible":this.visible,"tile--small":this.size==="small","tile--medium":this.size==="medium","tile--large":this.size==="large","tile--elevated":this.elevated}},t("div",{part:"header",class:"tile__header"},t("six-icon-button",{class:{"tile__header--hidden":!this.closeable},name:"close",size:r(this.size),onClick:this.handleCloseClickEvent})),t("div",{part:"body",class:"tile__body"},this.iconName&&t("six-icon",{onClick:this.handleClickEvent,size:d(this.size)},this.iconName),this.hasIconSlot&&t("slot",{name:"icon"})),t("div",{part:"footer",class:{"tile__footer--small":this.size==="small","tile__footer--medium":this.size==="medium","tile__footer--large":this.size==="large"}},this.label&&t("div",{class:{".label__footer":true},onClick:this.handleClickEvent},this.label),this.hasLabelSlot&&t("slot",{name:"label"}))))}get host(){return s(this)}};const r=i=>({small:"xxSmall",medium:"medium",large:"medium"}[i]);const d=i=>({small:"xLarge",medium:"xxLarge",large:"xxxLarge"}[i]);o.style=a;export{o as six_tile};
2
+ //# sourceMappingURL=p-80f32909.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixTileCss","SixTile","this","handleCloseClickEvent","visible","sixTileClose","emit","handleClickEvent","sixTileSelected","async","connectedCallback","handleSlotChange","bind","componentWillLoad","hasIconSlot","hasSlot","host","hasLabelSlot","slot","querySelector","addEventListener","render","h","disabled","disableTooltip","label","content","part","class","tile","size","elevated","closeable","name","closeIconSize","onClick","iconName","iconSize","small","medium","large"],"sources":["./src/components/six-tile/six-tile.scss?tag=six-tile&encapsulation=shadow","./src/components/six-tile/six-tile.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: inline-block;\n}\n\n.tile {\n &--small {\n --tile-size: 80px;\n --tile-padding-size: var(--six-spacing-medium);\n }\n\n &--medium {\n --tile-size: 120px;\n --tile-padding-size: var(--six-spacing-large);\n }\n\n &--large {\n --tile-size: 160px;\n --tile-padding-size: var(--six-spacing-x-large);\n }\n\n min-height: var(--tile-size);\n width: var(--tile-size);\n\n background-color: var(--six-color-clay-50);\n\n display: inline-grid;\n grid-template-columns: 100%;\n grid-template-areas:\n 'header'\n 'middle'\n 'footer';\n\n &:not(.tile--visible) {\n visibility: hidden;\n }\n\n &--elevated {\n border: 0;\n box-shadow: var(--six-elevation-8dp);\n }\n}\n\n.tile__header {\n grid-area: header;\n height: 5%;\n justify-self: right;\n display: flex;\n justify-content: right;\n opacity: 0;\n transition: var(--six-transition-fast) opacity;\n\n .tile:hover > & {\n opacity: 1;\n }\n\n &--hidden {\n visibility: hidden;\n }\n\n six-icon-button {\n margin-top: -6px;\n margin-right: -6px;\n margin-bottom: -16px;\n }\n}\n\n.tile__body {\n grid-area: middle;\n display: grid;\n place-items: center;\n cursor: pointer;\n\n six-icon::part(base) {\n padding: 0;\n }\n\n &--small {\n @extend .tile__body;\n --tile-padding-size: var(--six-spacing-medium);\n }\n\n &--medium {\n @extend .tile__body;\n --tile-padding-size: var(--six-spacing-large);\n }\n\n &--large {\n @extend .tile__body;\n --tile-padding-size: var(--six-spacing-x-large);\n }\n\n padding-left: var(--tile-padding-size);\n padding-right: var(--tile-padding-size);\n}\n\n.tile__footer {\n grid-area: footer;\n display: flex;\n justify-content: center;\n cursor: pointer;\n font-weight: var(--six-font-weight-normal);\n color: var(--six-color-web-rock-900);\n\n &--small {\n @extend .tile__footer;\n font-size: var(--six-font-size-xxx-small);\n }\n\n &--medium {\n @extend .tile__footer;\n font-size: var(--six-font-size-xx-small);\n }\n\n &--large {\n @extend .tile__footer;\n font-size: var(--six-font-size-small);\n }\n\n .label__footer {\n overflow: hidden;\n text-overflow: ellipsis;\n width: calc(var(--tile-size) - 2em);\n text-align: center;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\nimport { hasSlot } from '../../utils/slot';\n\n/**\n * @since 1.0\n * @status stable\n */\n\n@Component({\n tag: 'six-tile',\n styleUrl: 'six-tile.scss',\n shadow: true,\n})\nexport class SixTile {\n @Element() host: HTMLSixTileElement;\n\n /** The tile's label. */\n @Prop() label = '';\n\n /** The icon's name. */\n @Prop() iconName;\n\n /** Flag, whether the tile is closeable. */\n @Prop() closeable = true;\n\n /** Flag, whether the tile should cast a shadow. */\n @Prop() elevated = false;\n\n /** Enables tile tooltip for tiles */\n @Prop() disableTooltip: boolean = true;\n\n /** Set to true to disable the tile. */\n @Prop({ reflect: true }) disabled = false;\n\n /** The tile's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n @State() visible = true;\n\n /** Emitted when the tile was closed. */\n @Event({ eventName: 'six-tile-closed' }) sixTileClose: EventEmitter<EmptyPayload>;\n\n /** Emitted when the tile is selected. */\n @Event({ eventName: 'six-tile-selected' }) sixTileSelected: EventEmitter<EmptyPayload>;\n\n /** Hides the tile */\n @Method()\n async hide() {\n this.visible = false;\n }\n\n /** Shows the tile */\n @Method()\n async show() {\n this.visible = true;\n }\n\n @State() hasIconSlot = false;\n\n @State() hasLabelSlot = false;\n\n connectedCallback() {\n this.handleSlotChange = this.handleSlotChange.bind(this);\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n handleSlotChange() {\n this.hasIconSlot = hasSlot(this.host, 'icon');\n this.hasLabelSlot = hasSlot(this.host, 'label');\n\n if (this.hasIconSlot) {\n let slot: HTMLElement = this.host.querySelector(`[slot=\"icon\"]`);\n slot.addEventListener('click', this.handleClickEvent);\n }\n\n if (this.hasLabelSlot) {\n let slot: HTMLElement = this.host.querySelector(`[slot=\"label\"]`);\n slot.addEventListener('click', this.handleClickEvent);\n }\n }\n\n render() {\n return (\n <six-tooltip disabled={this.disableTooltip || this.label === ''} content={this.label}>\n <div\n part=\"base\"\n class={{\n tile: true,\n 'tile--visible': this.visible,\n 'tile--small': this.size === 'small',\n 'tile--medium': this.size === 'medium',\n 'tile--large': this.size === 'large',\n 'tile--elevated': this.elevated,\n }}\n >\n <div part=\"header\" class=\"tile__header\">\n <six-icon-button\n class={{\n 'tile__header--hidden': !this.closeable,\n }}\n name=\"close\"\n size={closeIconSize(this.size)}\n onClick={this.handleCloseClickEvent}\n />\n </div>\n\n <div part=\"body\" class=\"tile__body\">\n {this.iconName && (\n <six-icon onClick={this.handleClickEvent} size={iconSize(this.size)}>\n {this.iconName}\n </six-icon>\n )}\n {this.hasIconSlot && <slot name=\"icon\"></slot>}\n </div>\n\n <div\n part=\"footer\"\n class={{\n 'tile__footer--small': this.size === 'small',\n 'tile__footer--medium': this.size === 'medium',\n 'tile__footer--large': this.size === 'large',\n }}\n >\n {this.label && (\n <div\n class={{\n '.label__footer': true,\n }}\n onClick={this.handleClickEvent}\n >\n {this.label}\n </div>\n )}\n {this.hasLabelSlot && <slot name=\"label\"></slot>}\n </div>\n </div>\n </six-tooltip>\n );\n }\n\n private handleCloseClickEvent = () => {\n this.visible = false;\n this.sixTileClose.emit();\n };\n\n private handleClickEvent = () => {\n this.sixTileSelected.emit();\n };\n}\n\nconst closeIconSize = (size: string) => {\n return {\n small: 'xxSmall',\n medium: 'medium',\n large: 'medium',\n }[size] as 'xSmall' | 'medium';\n};\n\nconst iconSize = (size: string) => {\n return {\n small: 'xLarge',\n medium: 'xxLarge',\n large: 'xxxLarge',\n }[size] as 'xLarge' | 'xxLarge' | 'xxxLarge';\n};\n"],"mappings":"6FAAA,MAAMA,EAAa,moE,MCcNC,EAAO,M,0HAkIVC,KAAAC,sBAAwB,KAC9BD,KAAKE,QAAU,MACfF,KAAKG,aAAaC,MAAM,EAGlBJ,KAAAK,iBAAmB,KACzBL,KAAKM,gBAAgBF,MAAM,E,WApIb,G,uCAMI,K,cAGD,M,oBAGe,K,cAGE,M,UAG0B,S,aAE3C,K,iBAoBI,M,kBAEC,K,CAZxBG,aACEP,KAAKE,QAAU,K,CAKjBK,aACEP,KAAKE,QAAU,I,CAOjBM,oBACER,KAAKS,iBAAmBT,KAAKS,iBAAiBC,KAAKV,K,CAGrDW,oBACEX,KAAKS,kB,CAGPA,mBACET,KAAKY,YAAcC,EAAQb,KAAKc,KAAM,QACtCd,KAAKe,aAAeF,EAAQb,KAAKc,KAAM,SAEvC,GAAId,KAAKY,YAAa,CACpB,IAAII,EAAoBhB,KAAKc,KAAKG,cAAc,iBAChDD,EAAKE,iBAAiB,QAASlB,KAAKK,iB,CAGtC,GAAIL,KAAKe,aAAc,CACrB,IAAIC,EAAoBhB,KAAKc,KAAKG,cAAc,kBAChDD,EAAKE,iBAAiB,QAASlB,KAAKK,iB,EAIxCc,SACE,OACEC,EAAA,eAAaC,SAAUrB,KAAKsB,gBAAkBtB,KAAKuB,QAAU,GAAIC,QAASxB,KAAKuB,OAC7EH,EAAA,OACEK,KAAK,OACLC,MAAO,CACLC,KAAM,KACN,gBAAiB3B,KAAKE,QACtB,cAAeF,KAAK4B,OAAS,QAC7B,eAAgB5B,KAAK4B,OAAS,SAC9B,cAAe5B,KAAK4B,OAAS,QAC7B,iBAAkB5B,KAAK6B,WAGzBT,EAAA,OAAKK,KAAK,SAASC,MAAM,gBACvBN,EAAA,mBACEM,MAAO,CACL,wBAAyB1B,KAAK8B,WAEhCC,KAAK,QACLH,KAAMI,EAAchC,KAAK4B,MACzBK,QAASjC,KAAKC,yBAIlBmB,EAAA,OAAKK,KAAK,OAAOC,MAAM,cACpB1B,KAAKkC,UACJd,EAAA,YAAUa,QAASjC,KAAKK,iBAAkBuB,KAAMO,EAASnC,KAAK4B,OAC3D5B,KAAKkC,UAGTlC,KAAKY,aAAeQ,EAAA,QAAMW,KAAK,UAGlCX,EAAA,OACEK,KAAK,SACLC,MAAO,CACL,sBAAuB1B,KAAK4B,OAAS,QACrC,uBAAwB5B,KAAK4B,OAAS,SACtC,sBAAuB5B,KAAK4B,OAAS,UAGtC5B,KAAKuB,OACJH,EAAA,OACEM,MAAO,CACL,iBAAkB,MAEpBO,QAASjC,KAAKK,kBAEbL,KAAKuB,OAGTvB,KAAKe,cAAgBK,EAAA,QAAMW,KAAK,Y,6BAiB7C,MAAMC,EAAiBJ,IACd,CACLQ,MAAO,UACPC,OAAQ,SACRC,MAAO,UACPV,IAGJ,MAAMO,EAAYP,IACT,CACLQ,MAAO,SACPC,OAAQ,UACRC,MAAO,YACPV,I"}
@@ -0,0 +1,2 @@
1
+ import{r as e,h as i}from"./p-16b99232.js";const s=":host{display:block}.sidebar-item{font-size:0.9rem;color:var(--six-sidebar-color);cursor:pointer;padding:8px 8px 16px 16px;font-family:var(--six-font-family)}.sidebar-item:hover:not(.sidebar-item--disabled){color:var(--six-color-web-rock-600)}.sidebar-item.sidebar-item--disabled{outline:none;color:var(--six-input-color-disabled);cursor:not-allowed}.sidebar-item.sidebar-item--selected{font-weight:var(--six-font-weight-bold)}";const r=class{constructor(i){e(this,i);this.value="";this.selected=false;this.disabled=false}render(){return i("div",{class:{"sidebar-item":true,"sidebar-item--selected":this.selected,"sidebar-item--disabled":this.disabled},role:"menuitem","aria-selected":this.selected?"true":"false","aria-disabled":this.disabled?"true":"false"},i("slot",null))}};r.style=s;export{r as six_sidebar_item};
2
+ //# sourceMappingURL=p-8187701c.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixSidebarItemCss","SixSidebarItem","render","h","class","this","selected","disabled","role"],"sources":["./src/components/six-sidebar-item/six-sidebar-item.scss?tag=six-sidebar-item&encapsulation=shadow","./src/components/six-sidebar-item/six-sidebar-item.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.sidebar-item {\n font-size: 0.9rem;\n color: var(--six-sidebar-color);\n cursor: pointer;\n padding: 8px 8px 16px 16px;\n font-family: var(--six-font-family);\n\n &:hover:not(.sidebar-item--disabled) {\n color: var(--six-color-web-rock-600);\n }\n\n &.sidebar-item--disabled {\n outline: none;\n color: var(--six-input-color-disabled);\n cursor: not-allowed;\n }\n\n &.sidebar-item--selected {\n font-weight: var(--six-font-weight-bold);\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define the nested displayed text of the item.\n */\n\n@Component({\n tag: 'six-sidebar-item',\n styleUrl: 'six-sidebar-item.scss',\n shadow: true,\n})\nexport class SixSidebarItem {\n /** A unique value to store in the sidebar item. This can be used as a way to identify sidebar items when selected. */\n @Prop({ reflect: true }) value = '';\n\n /** Set to true to draw the item in a selected state. */\n @Prop({ reflect: true }) selected = false;\n\n /** Set to true to draw the sidebar item in a disabled state. */\n @Prop({ reflect: true }) disabled = false;\n\n render() {\n return (\n <div\n class={{\n 'sidebar-item': true,\n 'sidebar-item--selected': this.selected,\n 'sidebar-item--disabled': this.disabled,\n }}\n role=\"menuitem\"\n aria-selected={this.selected ? 'true' : 'false'}\n aria-disabled={this.disabled ? 'true' : 'false'}\n >\n <slot></slot>\n </div>\n );\n }\n}\n"],"mappings":"2CAAA,MAAMA,EAAoB,8a,MCcbC,EAAc,M,oCAEQ,G,cAGG,M,cAGA,K,CAEpCC,SACE,OACEC,EAAA,OACEC,MAAO,CACL,eAAgB,KAChB,yBAA0BC,KAAKC,SAC/B,yBAA0BD,KAAKE,UAEjCC,KAAK,WAAU,gBACAH,KAAKC,SAAW,OAAS,QAAO,gBAChCD,KAAKE,SAAW,OAAS,SAExCJ,EAAA,a"}
@@ -0,0 +1,2 @@
1
+ import{r as i,c as s,h as e}from"./p-16b99232.js";const t=".six-files-list-item{padding-bottom:0.5rem}.six-files-list-item__name{color:var(--six-color-action-600);cursor:pointer}.six-files-list-item__name--disabled{cursor:inherit;color:var(--six-color-web-rock-500)}.six-files-list-item__name:hover:not(.six-files-list-item__name--disabled){color:var(--six-color-action-500)}.six-files-list-item__date{padding-left:1rem;color:var(--six-color-web-rock-600)}.six-files-list-item__size{padding-left:1rem;color:var(--six-color-web-rock-600)}.six-files-list-item__icon{padding-left:0.5rem;display:inline-block;transform:translateY(-1px);cursor:pointer;color:var(--six-color-web-rock-600)}.six-files-list-item__icon--disabled{cursor:not-allowed;color:var(--six-color-web-rock-500)}.six-files-list-item__icon:hover:not(.six-files-list-item__icon--disabled){color:var(--six-color-web-rock-900)}";const l=class{constructor(e){i(this,e);this.downloadEvent=s(this,"six-file-list-item-download",7);this.removeEvent=s(this,"six-file-list-item-remove",7);this.downloadFile=()=>{if(this.nodownload){return}this.downloadEvent.emit({fileId:this.identifier,name:this.name})};this.removeFile=()=>{if(this.nodelete){return}this.removeEvent.emit({fileId:this.identifier,name:this.name})};this.identifier="";this.name="";this.date="";this.size=undefined;this.nodownload=false;this.nodelete=false}render(){return e("div",{class:"six-files-list-item"},e("span",{class:{"six-files-list-item__name":true,"six-files-list-item__name--disabled":this.nodownload},onClick:this.downloadFile},this.name),e("span",{class:"six-files-list-item__date"},this.date),this.size!==undefined&&e("span",{class:"six-files-list-item__size"},Math.round(this.size/1024)," KB"),e("six-icon",{class:{"six-files-list-item__icon":true,"six-files-list-item__icon--disabled":this.nodelete},size:"small",onClick:this.removeFile},"delete"))}};l.style=t;export{l as six_file_list_item};
2
+ //# sourceMappingURL=p-94ab37b2.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixFileListItemCss","SixFileListItem","this","downloadFile","nodownload","downloadEvent","emit","fileId","identifier","name","removeFile","nodelete","removeEvent","render","h","class","onClick","date","size","undefined","Math","round"],"sources":["./src/components/six-file-list-item/six-file-list-item.scss?tag=six-file-list-item&encapsulation=shadow","./src/components/six-file-list-item/six-file-list-item.tsx"],"sourcesContent":[".six-files-list-item {\n padding-bottom: 0.5rem;\n\n &__name {\n color: var(--six-color-action-600);\n cursor: pointer;\n\n &--disabled {\n cursor: inherit;\n color: var(--six-color-web-rock-500);\n }\n\n &:hover:not(&--disabled) {\n color: var(--six-color-action-500);\n }\n }\n\n &__date {\n padding-left: 1rem;\n color: var(--six-color-web-rock-600);\n }\n\n &__size {\n padding-left: 1rem;\n color: var(--six-color-web-rock-600);\n }\n\n &__icon {\n padding-left: 0.5rem;\n display: inline-block;\n transform: translateY(-1px);\n cursor: pointer;\n color: var(--six-color-web-rock-600);\n\n &--disabled {\n cursor: not-allowed;\n color: var(--six-color-web-rock-500);\n }\n\n &:hover:not(&--disabled) {\n color: var(--six-color-web-rock-900);\n }\n }\n}\n","import { Component, Event, EventEmitter, h, Prop } from '@stencil/core';\n\nexport interface SixFileListDownloadPayload {\n fileId: string;\n name: string;\n}\n\nexport interface SixFileListRemovePayload {\n fileId: string;\n name: string;\n}\n\n/**\n * @since 2.0.0\n * @status experimental\n *\n */\n@Component({\n tag: 'six-file-list-item',\n styleUrl: 'six-file-list-item.scss',\n shadow: true,\n})\nexport class SixFileListItem {\n /** An id to clearly identify the file */\n @Prop({ reflect: true }) identifier = '';\n\n /** The filename */\n @Prop({ reflect: true }) name = '';\n\n /** The date when the file was uploaded */\n @Prop({ reflect: true }) date = '';\n\n /** The file size. This number will be divided by 1024 to show the filesize in KB */\n @Prop({ reflect: true }) size: number;\n\n /** Set to true if you don't want to allow to download this file */\n @Prop({ reflect: true }) nodownload = false;\n\n /** Set to true if you don't want to allow to delete this file */\n @Prop({ reflect: true }) nodelete = false;\n\n /** Triggered on file download. */\n @Event({ eventName: 'six-file-list-item-download' }) downloadEvent: EventEmitter<SixFileListDownloadPayload>;\n\n /** Triggered on file remove. */\n @Event({ eventName: 'six-file-list-item-remove' }) removeEvent: EventEmitter<SixFileListRemovePayload>;\n\n downloadFile = () => {\n if (this.nodownload) {\n return;\n }\n\n this.downloadEvent.emit({ fileId: this.identifier, name: this.name });\n };\n\n removeFile = () => {\n if (this.nodelete) {\n return;\n }\n\n this.removeEvent.emit({ fileId: this.identifier, name: this.name });\n };\n\n render() {\n return (\n <div class=\"six-files-list-item\">\n <span\n class={{\n 'six-files-list-item__name': true,\n 'six-files-list-item__name--disabled': this.nodownload,\n }}\n onClick={this.downloadFile}\n >\n {this.name}\n </span>\n <span class=\"six-files-list-item__date\">{this.date}</span>\n {this.size !== undefined && <span class=\"six-files-list-item__size\">{Math.round(this.size / 1024)} KB</span>}\n <six-icon\n class={{\n 'six-files-list-item__icon': true,\n 'six-files-list-item__icon--disabled': this.nodelete,\n }}\n size=\"small\"\n onClick={this.removeFile}\n >\n delete\n </six-icon>\n </div>\n );\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAqB,8zB,MCsBdC,EAAe,M,2IAyB1BC,KAAAC,aAAe,KACb,GAAID,KAAKE,WAAY,CACnB,M,CAGFF,KAAKG,cAAcC,KAAK,CAAEC,OAAQL,KAAKM,WAAYC,KAAMP,KAAKO,MAAO,EAGvEP,KAAAQ,WAAa,KACX,GAAIR,KAAKS,SAAU,CACjB,M,CAGFT,KAAKU,YAAYN,KAAK,CAAEC,OAAQL,KAAKM,WAAYC,KAAMP,KAAKO,MAAO,E,gBApC/B,G,UAGN,G,UAGA,G,oCAMM,M,cAGF,K,CAwBpCI,SACE,OACEC,EAAA,OAAKC,MAAM,uBACTD,EAAA,QACEC,MAAO,CACL,4BAA6B,KAC7B,sCAAuCb,KAAKE,YAE9CY,QAASd,KAAKC,cAEbD,KAAKO,MAERK,EAAA,QAAMC,MAAM,6BAA6Bb,KAAKe,MAC7Cf,KAAKgB,OAASC,WAAaL,EAAA,QAAMC,MAAM,6BAA6BK,KAAKC,MAAMnB,KAAKgB,KAAO,MAAK,OACjGJ,EAAA,YACEC,MAAO,CACL,4BAA6B,KAC7B,sCAAuCb,KAAKS,UAE9CO,KAAK,QACLF,QAASd,KAAKQ,YAAU,U"}
@@ -0,0 +1,2 @@
1
+ const t=t=>e=>Object.keys(t).every((s=>t[s]===e[s]));class e{constructor(){this.eventListeners=[];this.add=(t,e,s,i=null)=>{this.eventListeners.push({el:t,name:e,listener:s,identifier:i});t.addEventListener(e,s)};this.remove=(e,s,i)=>{const n=t({el:e,name:s,listener:i});this.eventListeners=this.getFilteredEventListeners(n)};this.removeByIdentifier=t=>{const e=e=>e.identifier===t;const s=this.eventListeners.find(e)!==undefined;if(!s){return}this.eventListeners=this.getFilteredEventListeners(e)};this.removeAll=()=>{while(this.eventListeners.length){const{el:t,name:e,listener:s}=this.eventListeners.pop();t.removeEventListener(e,s)}}}getFilteredEventListeners(t){return this.eventListeners.filter((e=>{if(t(e)){e.el.removeEventListener(e.name,e.listener);return false}else{return true}}))}}export{e as E};
2
+ //# sourceMappingURL=p-9a860acc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["equals","a","b","Object","keys","every","key","EventListeners","constructor","this","eventListeners","add","el","name","listener","identifier","push","addEventListener","remove","sameItem","getFilteredEventListeners","removeByIdentifier","foundListener","find","undefined","removeAll","length","pop","removeEventListener","filter","item"],"sources":["./src/utils/event-listeners.ts"],"sourcesContent":["interface EventListener {\n el: DocumentAndElementEventHandlers;\n name: string;\n listener: EventListenerOrEventListenerObject;\n identifier?: string | null;\n}\n\nconst equals =\n <A extends Object>(a: A) =>\n <B extends Object>(b: B) =>\n Object.keys(a).every((key) => a[key] === b[key]);\n\nexport class EventListeners {\n eventListeners: EventListener[] = [];\n\n add = <T extends DocumentAndElementEventHandlers>(\n el: T,\n name: string,\n listener: EventListenerOrEventListenerObject,\n identifier = null\n ) => {\n this.eventListeners.push({ el, name, listener, identifier });\n el.addEventListener(name, listener);\n };\n\n remove = <T extends DocumentAndElementEventHandlers>(\n el: T,\n name: string,\n listener: EventListenerOrEventListenerObject\n ) => {\n const sameItem = equals({ el, name, listener });\n this.eventListeners = this.getFilteredEventListeners(sameItem);\n };\n\n removeByIdentifier = (identifier: string) => {\n const sameItem = (el) => el.identifier === identifier;\n const foundListener = this.eventListeners.find(sameItem) !== undefined;\n\n if (!foundListener) {\n return;\n }\n\n this.eventListeners = this.getFilteredEventListeners(sameItem);\n };\n\n private getFilteredEventListeners(sameItem: (el) => boolean) {\n return this.eventListeners.filter((item) => {\n if (sameItem(item)) {\n item.el.removeEventListener(item.name, item.listener);\n return false;\n } else {\n return true;\n }\n });\n }\n\n removeAll = () => {\n while (this.eventListeners.length) {\n const { el, name, listener } = this.eventListeners.pop();\n el.removeEventListener(name, listener);\n }\n };\n}\n"],"mappings":"AAOA,MAAMA,EACeC,GACAC,GACjBC,OAAOC,KAAKH,GAAGI,OAAOC,GAAQL,EAAEK,KAASJ,EAAEI,K,MAElCC,EAAbC,cACEC,KAAAC,eAAkC,GAElCD,KAAAE,IAAM,CACJC,EACAC,EACAC,EACAC,EAAa,QAEbN,KAAKC,eAAeM,KAAK,CAAEJ,KAAIC,OAAMC,WAAUC,eAC/CH,EAAGK,iBAAiBJ,EAAMC,EAAS,EAGrCL,KAAAS,OAAS,CACPN,EACAC,EACAC,KAEA,MAAMK,EAAWnB,EAAO,CAAEY,KAAIC,OAAMC,aACpCL,KAAKC,eAAiBD,KAAKW,0BAA0BD,EAAS,EAGhEV,KAAAY,mBAAsBN,IACpB,MAAMI,EAAYP,GAAOA,EAAGG,aAAeA,EAC3C,MAAMO,EAAgBb,KAAKC,eAAea,KAAKJ,KAAcK,UAE7D,IAAKF,EAAe,CAClB,M,CAGFb,KAAKC,eAAiBD,KAAKW,0BAA0BD,EAAS,EAchEV,KAAAgB,UAAY,KACV,MAAOhB,KAAKC,eAAegB,OAAQ,CACjC,MAAMd,GAAEA,EAAEC,KAAEA,EAAIC,SAAEA,GAAaL,KAAKC,eAAeiB,MACnDf,EAAGgB,oBAAoBf,EAAMC,E,GAdzBM,0BAA0BD,GAChC,OAAOV,KAAKC,eAAemB,QAAQC,IACjC,GAAIX,EAASW,GAAO,CAClBA,EAAKlB,GAAGgB,oBAAoBE,EAAKjB,KAAMiB,EAAKhB,UAC5C,OAAO,K,KACF,CACL,OAAO,I"}
@@ -0,0 +1,2 @@
1
+ import{r as i,c as t,h as s,g as o}from"./p-16b99232.js";import{F as r}from"./p-3c100309.js";import{h as e}from"./p-b4dfb7cf.js";import{E as n}from"./p-9a860acc.js";const l=':host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control .form-control__error-text{display:none}.form-control--has-label .form-control__label{display:inline-block;color:var(--six-input-label-color);font-weight:var(--six-font-weight-bold);margin-bottom:var(--six-spacing-x-small)}.form-control--has-label .form-control__label__required::after{color:var(--six-color-danger-800);content:"*"}.form-control--has-label.form-control--small .form-control__label{font-size:var(--six-input-label-font-size-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--six-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control_label{font-size:var(--six-input-label-font-size-large)}.form-control--has-help-text .form-control__help-text{display:block;color:var(--six-input-help-text-color);margin-top:var(--six-spacing-x-small)}.form-control--has-help-text .form-control__help-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--has-error-text .form-control__error-text{display:block;color:var(--six-color-danger-800);margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text .form-control__error-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text.form-control--small .form-control__error-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-error-text.form-control--medium .form-control__error-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-error-text.form-control--large .form-control__error-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--disabled .form-control__help-text{color:var(--six-input-help-text-color-disabled)}.form-control--disabled .form-control__label{color:var(--six-input-label-color-disabled)}.form-control--invalid:not(.form-control--disabled) .form-control__label{color:var(--six-input-label-color)}:host{display:block}.input{display:inline-flex;align-items:stretch;justify-content:start;position:relative;width:100%;font-family:var(--six-font-family);font-weight:var(--six-input-font-weight);letter-spacing:var(--six-input-letter-spacing);background-color:var(--six-input-background-color);border:solid var(--six-border-width) var(--six-input-border-color);vertical-align:middle;overflow:hidden;transition:var(--six-transition-fast) color, var(--six-transition-fast) border, var(--six-transition-fast) box-shadow;cursor:text}.input--line{border:none;border-bottom:solid var(--six-border-width) var(--six-input-border-color)}.input:hover:not(.input--disabled){background-color:var(--six-input-background-color-hover);border-color:var(--six-input-border-color-hover)}.input:hover:not(.input--disabled) .input__control{color:var(--six-input-color-hover)}.input.input--focused:not(.input--disabled){background-color:var(--six-input-background-color-focus);border-bottom-color:var(--six-input-border-color-focus);box-shadow:0 1px 0 0 var(--six-input-border-color-focus)}.input.input--focused:not(.input--disabled):not(.input--line){border-color:var(--six-input-border-color-focus);box-shadow:var(--six-input-focus-shadow)}.input.input--focused:not(.input--disabled) .input__control{color:var(--six-input-color-focus)}.input.input--disabled{background-color:var(--six-input-background-color-disabled);border-color:var(--six-input-border-color-disabled);cursor:not-allowed}.input.input--disabled .input__control{color:var(--six-input-color-disabled)}.input.input--disabled .input__control::placeholder{color:var(--six-input-placeholder-color-disabled)}.input.input--invalid:not(.input--disabled):not(.input--focused){border-bottom-color:var(--six-input-border-color-danger)}.input.input--invalid:not(.input--disabled):not(.input--focused):not(.input--line){border-color:var(--six-input-border-color-danger)}.input__control{flex:1 1 auto;font-family:inherit;font-size:var(--six-input-font-size-medium);font-weight:inherit;min-width:0;color:var(--six-input-color);border:none;background:none;box-shadow:none;padding:0;margin:0;cursor:inherit;-webkit-appearance:none}.input__control::-webkit-search-decoration,.input__control::-webkit-search-cancel-button,.input__control::-webkit-search-results-button,.input__control::-webkit-search-results-decoration{-webkit-appearance:none}.input__control:-webkit-autofill,.input__control:-webkit-autofill:hover,.input__control:-webkit-autofill:focus,.input__control:-webkit-autofill:active{box-shadow:0 0 0 var(--six-height-large) var(--six-input-background-color-hover) inset !important;-webkit-text-fill-color:var(--six-color-primary-500)}.input__control::placeholder{color:var(--six-input-placeholder-color);user-select:none}.input__control:focus{outline:none}.input__control::-ms-reveal{display:none}.input__prefix,.input__suffix{display:inline-flex;flex:0 0 auto;align-items:center;cursor:default}.input__prefix ::slotted(six-icon),.input__suffix ::slotted(six-icon){color:var(--six-input-icon-color)}.input.input--disabled ::slotted(six-icon){cursor:not-allowed}.input--small{border-radius:var(--six-input-border-radius-small);font-size:var(--six-input-font-size-small);height:var(--six-height-small)}.input--small .input__control{height:calc(var(--six-height-small) - var(--six-border-width) * 2);margin:0 var(--six-input-spacing-small)}.input--small .input__control__prefix{margin:0 var(--six-input-prefix-spacing-small)}.input--small .input__clear,.input--small .input__password-toggle{margin-right:var(--six-input-spacing-small)}.input--small .input__prefix ::slotted(*){margin-left:var(--six-input-prefix-spacing-small)}.input--small .input__suffix ::slotted(*){margin-right:var(--six-input-prefix-spacing-small)}.input--medium{border-radius:var(--six-input-border-radius-medium);font-size:var(--six-input-font-size-medium);height:var(--six-height-medium)}.input--medium .input__control{height:calc(var(--six-height-medium) - var(--six-border-width) * 2);margin:0 var(--six-input-spacing-medium)}.input--medium .input__control__prefix{margin:0 var(--six-input-prefix-spacing-medium)}.input--medium .input__clear,.input--medium .input__password-toggle{margin-right:var(--six-input-spacing-medium)}.input--medium .input__prefix ::slotted(*){margin-left:var(--six-input-prefix-spacing-medium)}.input--medium .input__suffix ::slotted(*){margin-right:var(--six-input-prefix-spacing-medium)}.input--large{border-radius:var(--six-input-border-radius-large);font-size:var(--six-input-font-size-large);height:var(--six-height-large)}.input--large .input__control{height:calc(var(--six-height-large) - var(--six-border-width) * 2);margin:0 var(--six-input-spacing-large)}.input--large .input__control__prefix{margin:0 var(--six-input-prefix-spacing-large)}.input--large .input__clear,.input--large .input__password-toggle{margin-right:var(--six-input-spacing-large)}.input--large .input__prefix ::slotted(*){margin-left:var(--six-input-prefix-spacing-large)}.input--large .input__suffix ::slotted(*){margin-right:var(--six-input-prefix-spacing-large)}.input--pill.input--small{border-radius:var(--six-height-small)}.input--pill.input--medium{border-radius:var(--six-height-medium)}.input--pill.input--large{border-radius:var(--six-height-large)}.input__clear,.input__password-toggle{display:inline-flex;align-items:center;font-size:inherit;color:var(--six-input-icon-color);border:none;background:none;padding:0;transition:var(--six-transition-fast) color;cursor:pointer}.input__clear:hover,.input__password-toggle:hover{color:var(--six-input-icon-color-hover)}.input__clear:focus,.input__password-toggle:focus{outline:none}.input--empty .input__clear{visibility:hidden}';const a={large:"medium",medium:"small",small:"xSmall"};let h=0;const u=class{constructor(s){i(this,s);this.sixChange=t(this,"six-input-change",7);this.sixClear=t(this,"six-input-clear",7);this.sixInput=t(this,"six-input-input",7);this.sixFocus=t(this,"six-input-focus",7);this.sixBlur=t(this,"six-input-blur",7);this.sixValueChange=t(this,"six-input-value-change",7);this.inputId=`input-${++h}`;this.labelId=`input-label-${h}`;this.helpTextId=`input-help-text-${h}`;this.errorTextId=`input-error-text-${h}`;this.customErrorText="";this.customValidation=false;this.eventListeners=new n;this.defaultValue="";this.hasFocus=false;this.hasHelpTextSlot=false;this.hasErrorTextSlot=false;this.hasLabelSlot=false;this.isPasswordVisible=false;this.type="text";this.size="medium";this.name="";this.value="";this.pill=false;this.label="";this.helpText="";this.errorText="";this.placeholder=undefined;this.disabled=false;this.readonly=false;this.minlength=undefined;this.maxlength=undefined;this.min=undefined;this.max=undefined;this.step=undefined;this.pattern=undefined;this.required=undefined;this.autocapitalize=undefined;this.autocorrect=undefined;this.autocomplete=undefined;this.autofocus=undefined;this.spellcheck=undefined;this.invalid=false;this.clearable=false;this.togglePassword=false;this.inputmode=undefined;this.line=false;this.errorOnBlur=false}handleLabelChange(){this.handleSlotChange()}handleValueChange(){if(!this.input){return}this.input.value=this.value;this.invalid=!this.input.checkValidity();this.sixValueChange.emit()}connectedCallback(){this.handleChange=this.handleChange.bind(this);this.handleInput=this.handleInput.bind(this);this.handleInvalid=this.handleInvalid.bind(this);this.handleBlur=this.handleBlur.bind(this);this.handleFocus=this.handleFocus.bind(this);this.handleClearClick=this.handleClearClick.bind(this);this.handlePasswordToggle=this.handlePasswordToggle.bind(this);this.handleSlotChange=this.handleSlotChange.bind(this);this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}componentWillLoad(){this.defaultValue=this.value;this.handleSlotChange()}componentDidLoad(){this.eventListeners.add(this.input,"invalid",(i=>{if(this.customValidation||!this.hasErrorTextSlot&&!this.errorText&&!this.customErrorText){this.customErrorText=this.input.validationMessage}i.preventDefault()}))}disconnectedCallback(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange);this.eventListeners.removeAll()}async setFocus(i){this.input.focus(i)}async removeFocus(){this.input.blur()}async select(){return this.input.select()}async setSelectionRange(i,t,s="none"){return this.input.setSelectionRange(i,t,s)}async setRangeText(i,t,s,o="preserve"){this.input.setRangeText(i,t,s,o);if(this.value!==this.input.value){this.value=this.input.value;this.sixChange.emit();this.sixInput.emit()}}async reportValidity(){return this.input.reportValidity()}async checkValidity(){return this.input.validity.valid}async setCustomValidity(i){this.customErrorText="";this.customValidation=i!=="";this.input.setCustomValidity(i);this.invalid=!this.input.checkValidity()}async getValidity(){return this.input.validity}async isValid(){return this.input.validity.valid}async getValidationMessage(){return this.input.validationMessage}async reset(){this.value=this.defaultValue;this.customErrorText="";this.customValidation=false;this.input.setCustomValidity("");this.invalid=false}handleChange(){this.value=this.input.value;this.sixChange.emit()}handleInput(){this.value=this.input.value;this.sixInput.emit()}handleInvalid(){this.invalid=true}handleBlur(){this.hasFocus=false;this.sixBlur.emit()}handleFocus(){this.hasFocus=true;this.sixFocus.emit()}handleClearClick(i){this.value="";this.sixClear.emit();this.sixInput.emit();this.sixChange.emit();this.input.focus();i.stopPropagation()}handlePasswordToggle(){this.isPasswordVisible=!this.isPasswordVisible}handleSlotChange(){this.hasHelpTextSlot=e(this.host,"help-text");this.hasErrorTextSlot=e(this.host,"error-text");this.hasLabelSlot=e(this.host,"label")}displayError(){return this.invalid&&(!this.errorOnBlur||!this.hasFocus)}render(){var i;return s(r,{inputId:this.inputId,label:this.label,labelId:this.labelId,hasLabelSlot:this.hasLabelSlot,helpTextId:this.helpTextId,helpText:this.helpText,hasHelpTextSlot:this.hasHelpTextSlot,errorTextId:this.errorTextId,errorText:this.customErrorText?this.customErrorText:this.errorText,hasErrorTextSlot:this.hasErrorTextSlot,size:this.size,disabled:this.disabled,required:this.required,displayError:this.displayError()},s("div",{part:"base",class:{input:true,"input--small":this.size==="small","input--medium":this.size==="medium","input--large":this.size==="large","input--line":this.line,"input--pill":this.pill,"input--disabled":this.disabled,"input--focused":this.hasFocus,"input--empty":((i=this.value)===null||i===void 0?void 0:i.length)===0,"input--invalid":this.invalid}},s("span",{part:"prefix",class:"input__prefix"},s("slot",{name:"prefix"})),s("input",{part:"input",ref:i=>this.input=i,id:this.inputId,size:1,class:{input__control:true,input__control__prefix:e(this.host,"prefix")},type:this.type==="password"&&this.isPasswordVisible?"text":this.type,name:this.name,placeholder:this.placeholder,disabled:this.disabled,readonly:this.readonly,minLength:this.minlength,maxLength:this.maxlength,min:this.min,max:this.max,step:this.step,value:this.value,autoCapitalize:this.autocapitalize,autoComplete:this.autocomplete,autoCorrect:this.autocorrect,autoFocus:this.autofocus,spellcheck:this.spellcheck,pattern:this.pattern,required:this.required,inputMode:this.inputmode,"aria-labelledby":this.labelId,"aria-describedby":this.helpTextId,"aria-invalid":this.invalid?"true":"false",onChange:this.handleChange,onInput:this.handleInput,onInvalid:this.handleInvalid,onFocus:this.handleFocus,onBlur:this.handleBlur,"data-testid":"input-control"}),this.clearable&&s("button",{part:"clear-button",class:"input__clear",type:"button",onClick:this.handleClearClick,tabindex:"-1","data-testid":"input-clear-button"},s("slot",{name:"clear-icon"},s("six-icon",{size:a[this.size]},"clear"))),this.togglePassword&&s("button",{part:"password-toggle-button",class:"input__password-toggle",type:"button",onClick:this.handlePasswordToggle,tabindex:"-1"},this.isPasswordVisible?s("slot",{name:"show-password-icon"},s("six-icon",{size:a[this.size]},"visibility_off")):s("slot",{name:"hide-password-icon"},s("six-icon",{size:a[this.size]},"visibility"))),s("span",{part:"suffix",class:"input__suffix"},s("slot",{name:"suffix"}))))}get host(){return o(this)}static get watchers(){return{helpText:["handleLabelChange"],errorText:["handleLabelChange"],label:["handleLabelChange"],value:["handleValueChange"]}}};u.style=l;export{u as six_input};
2
+ //# sourceMappingURL=p-9eba5c71.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixInputCss","ICON_SIZES","large","medium","small","id","SixInput","this","inputId","labelId","helpTextId","errorTextId","customErrorText","customValidation","eventListeners","EventListeners","defaultValue","handleLabelChange","handleSlotChange","handleValueChange","input","value","invalid","checkValidity","sixValueChange","emit","connectedCallback","handleChange","bind","handleInput","handleInvalid","handleBlur","handleFocus","handleClearClick","handlePasswordToggle","host","shadowRoot","addEventListener","componentWillLoad","componentDidLoad","add","event","hasErrorTextSlot","errorText","validationMessage","preventDefault","disconnectedCallback","removeEventListener","removeAll","async","options","focus","blur","select","selectionStart","selectionEnd","selectionDirection","setSelectionRange","replacement","start","end","selectMode","setRangeText","sixChange","sixInput","reportValidity","validity","valid","message","setCustomValidity","hasFocus","sixBlur","sixFocus","sixClear","stopPropagation","isPasswordVisible","hasHelpTextSlot","hasSlot","hasLabelSlot","displayError","errorOnBlur","render","h","FormControl","label","helpText","size","disabled","required","part","class","line","pill","_a","length","name","ref","el","input__control","input__control__prefix","type","placeholder","readonly","minLength","minlength","maxLength","maxlength","min","max","step","autoCapitalize","autocapitalize","autoComplete","autocomplete","autoCorrect","autocorrect","autoFocus","autofocus","spellcheck","pattern","inputMode","inputmode","onChange","onInput","onInvalid","onFocus","onBlur","clearable","onClick","tabindex","togglePassword"],"sources":["./src/components/six-input/six-input.scss?tag=six-input&encapsulation=shadow","./src/components/six-input/six-input.tsx"],"sourcesContent":["@import 'src/global/component';\n@import '../../functional-components/form-control/form-control';\n\n:host {\n display: block;\n}\n\n.input {\n display: inline-flex;\n align-items: stretch;\n justify-content: start;\n position: relative;\n width: 100%;\n font-family: var(--six-font-family);\n font-weight: var(--six-input-font-weight);\n letter-spacing: var(--six-input-letter-spacing);\n background-color: var(--six-input-background-color);\n border: solid var(--six-border-width) var(--six-input-border-color);\n vertical-align: middle;\n overflow: hidden;\n transition: var(--six-transition-fast) color, var(--six-transition-fast) border, var(--six-transition-fast) box-shadow;\n cursor: text;\n\n &--line {\n border: none;\n border-bottom: solid var(--six-border-width) var(--six-input-border-color);\n }\n\n &:hover:not(.input--disabled) {\n background-color: var(--six-input-background-color-hover);\n border-color: var(--six-input-border-color-hover);\n\n .input__control {\n color: var(--six-input-color-hover);\n }\n }\n\n &.input--focused:not(.input--disabled) {\n background-color: var(--six-input-background-color-focus);\n\n border-bottom-color: var(--six-input-border-color-focus);\n box-shadow: 0 1px 0 0 var(--six-input-border-color-focus);\n\n &:not(.input--line) {\n border-color: var(--six-input-border-color-focus);\n box-shadow: var(--six-input-focus-shadow);\n }\n\n .input__control {\n color: var(--six-input-color-focus);\n }\n }\n\n &.input--disabled {\n background-color: var(--six-input-background-color-disabled);\n border-color: var(--six-input-border-color-disabled);\n cursor: not-allowed;\n\n .input__control {\n color: var(--six-input-color-disabled);\n\n &::placeholder {\n color: var(--six-input-placeholder-color-disabled);\n }\n }\n }\n\n &.input--invalid:not(.input--disabled):not(.input--focused) {\n border-bottom-color: var(--six-input-border-color-danger);\n\n &:not(.input--line) {\n border-color: var(--six-input-border-color-danger);\n }\n }\n}\n\n.input__control {\n flex: 1 1 auto;\n font-family: inherit;\n font-size: var(--six-input-font-size-medium);\n font-weight: inherit;\n min-width: 0;\n color: var(--six-input-color);\n border: none;\n background: none;\n box-shadow: none;\n padding: 0;\n margin: 0;\n cursor: inherit;\n -webkit-appearance: none;\n\n &::-webkit-search-decoration,\n &::-webkit-search-cancel-button,\n &::-webkit-search-results-button,\n &::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n box-shadow: 0 0 0 var(--six-height-large) var(--six-input-background-color-hover) inset !important;\n -webkit-text-fill-color: var(--six-color-primary-500);\n }\n\n &::placeholder {\n color: var(--six-input-placeholder-color);\n user-select: none;\n }\n\n &:focus {\n outline: none;\n }\n\n &::-ms-reveal {\n display: none;\n }\n}\n\n.input__prefix,\n.input__suffix {\n display: inline-flex;\n flex: 0 0 auto;\n align-items: center;\n cursor: default;\n\n ::slotted(six-icon) {\n color: var(--six-input-icon-color);\n }\n}\n\n.input {\n &.input--disabled {\n ::slotted(six-icon) {\n cursor: not-allowed;\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Size modifiers\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.input--small {\n border-radius: var(--six-input-border-radius-small);\n font-size: var(--six-input-font-size-small);\n height: var(--six-height-small);\n\n .input__control {\n height: calc(var(--six-height-small) - var(--six-border-width) * 2);\n margin: 0 var(--six-input-spacing-small);\n }\n\n .input__control__prefix {\n margin: 0 var(--six-input-prefix-spacing-small);\n }\n\n .input__clear,\n .input__password-toggle {\n margin-right: var(--six-input-spacing-small);\n }\n\n .input__prefix ::slotted(*) {\n margin-left: var(--six-input-prefix-spacing-small);\n }\n\n .input__suffix ::slotted(*) {\n margin-right: var(--six-input-prefix-spacing-small);\n }\n}\n\n.input--medium {\n border-radius: var(--six-input-border-radius-medium);\n font-size: var(--six-input-font-size-medium);\n height: var(--six-height-medium);\n\n .input__control {\n height: calc(var(--six-height-medium) - var(--six-border-width) * 2);\n margin: 0 var(--six-input-spacing-medium);\n }\n\n .input__control__prefix {\n margin: 0 var(--six-input-prefix-spacing-medium);\n }\n\n .input__clear,\n .input__password-toggle {\n margin-right: var(--six-input-spacing-medium);\n }\n\n .input__prefix ::slotted(*) {\n margin-left: var(--six-input-prefix-spacing-medium);\n }\n\n .input__suffix ::slotted(*) {\n margin-right: var(--six-input-prefix-spacing-medium);\n }\n}\n\n.input--large {\n border-radius: var(--six-input-border-radius-large);\n font-size: var(--six-input-font-size-large);\n height: var(--six-height-large);\n\n .input__control {\n height: calc(var(--six-height-large) - var(--six-border-width) * 2);\n margin: 0 var(--six-input-spacing-large);\n }\n\n .input__control__prefix {\n margin: 0 var(--six-input-prefix-spacing-large);\n }\n\n .input__clear,\n .input__password-toggle {\n margin-right: var(--six-input-spacing-large);\n }\n\n .input__prefix ::slotted(*) {\n margin-left: var(--six-input-prefix-spacing-large);\n }\n\n .input__suffix ::slotted(*) {\n margin-right: var(--six-input-prefix-spacing-large);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Pill modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.input--pill {\n &.input--small {\n border-radius: var(--six-height-small);\n }\n\n &.input--medium {\n border-radius: var(--six-height-medium);\n }\n\n &.input--large {\n border-radius: var(--six-height-large);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Clearable + Password Toggle\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.input__clear,\n.input__password-toggle {\n display: inline-flex;\n align-items: center;\n font-size: inherit;\n color: var(--six-input-icon-color);\n border: none;\n background: none;\n padding: 0;\n transition: var(--six-transition-fast) color;\n cursor: pointer;\n\n &:hover {\n color: var(--six-input-icon-color-hover);\n }\n\n &:focus {\n outline: none;\n }\n}\n\n.input--empty .input__clear {\n visibility: hidden;\n}\n","import { Component, Element, Event, EventEmitter, Method, Prop, State, Watch, h } 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';\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 for validation errors. 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, 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 */\n\n@Component({\n tag: 'six-input',\n styleUrl: 'six-input.scss',\n shadow: true,\n})\nexport class SixInput {\n inputId = `input-${++id}`;\n labelId = `input-label-${id}`;\n helpTextId = `input-help-text-${id}`;\n errorTextId = `input-error-text-${id}`;\n input: HTMLInputElement;\n customErrorText = '';\n customValidation = false;\n\n readonly eventListeners = new EventListeners();\n\n @Element() host: HTMLSixInputElement;\n\n @State() hasFocus = false;\n @State() hasHelpTextSlot = false;\n @State() hasErrorTextSlot = false;\n @State() hasLabelSlot = 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 label. Alternatively, you can use the label slot. */\n @Prop() label = '';\n\n /** The input's help text. Alternatively, you can use the help-text slot. */\n @Prop() helpText = '';\n\n /** The input's error text. Alternatively, you can use the error-text slot. */\n @Prop() errorText = '';\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 make the input a required field. */\n @Prop({ reflect: true }) required: boolean;\n\n /** The input's autocaptialize attribute. */\n @Prop() autocapitalize: string;\n\n /** The input's autocorrect attribute. */\n @Prop() autocorrect: string;\n\n /** The input's autocomplete attribute. */\n @Prop() autocomplete: string;\n\n /** The input's autofocus attribute. */\n @Prop() autofocus: boolean;\n\n /** Enables spell checking on the input. */\n @Prop() spellcheck: boolean;\n\n /**\n * This will be true when the control is in an invalid state. Validity is determined by props such as `type`,\n * `required`, `minlength`, `maxlength`, and `pattern` using the browser's constraint validation API.\n */\n @Prop({ mutable: true, 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 /** Set to display the error text on blur and not when typing */\n @Prop() errorOnBlur = false;\n\n @Watch('helpText')\n @Watch('errorText')\n @Watch('label')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n @Watch('value')\n handleValueChange() {\n if (!this.input) {\n return;\n }\n this.input.value = this.value;\n this.invalid = !this.input.checkValidity();\n this.sixValueChange.emit();\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 /**\n * Emitted whenever the value changes. Access the new value via event.target.value.\n * six-input-value-change will emit whenever the value changes.\n * So be it on input or when dynamically set. six-input-input will only be emitted when the user enters data,\n * but not when a value is dynamically set. six-input-change will only be emitted when the user either presses enter\n * or leaves the input field after entering some data.\n * */\n @Event({ eventName: 'six-input-value-change' }) sixValueChange: EventEmitter<EmptyPayload>;\n\n /** defaultValue which the input will be reverted to when executing reset */\n private defaultValue = '';\n\n connectedCallback() {\n this.handleChange = this.handleChange.bind(this);\n this.handleInput = this.handleInput.bind(this);\n this.handleInvalid = this.handleInvalid.bind(this);\n this.handleBlur = this.handleBlur.bind(this);\n this.handleFocus = this.handleFocus.bind(this);\n this.handleClearClick = this.handleClearClick.bind(this);\n this.handlePasswordToggle = this.handlePasswordToggle.bind(this);\n this.handleSlotChange = this.handleSlotChange.bind(this);\n\n this.host.shadowRoot.addEventListener('slotchange', this.handleSlotChange);\n }\n\n componentWillLoad() {\n this.defaultValue = this.value;\n this.handleSlotChange();\n }\n\n componentDidLoad() {\n this.eventListeners.add(this.input, 'invalid', (event) => {\n if (this.customValidation || (!this.hasErrorTextSlot && !this.errorText && !this.customErrorText)) {\n this.customErrorText = this.input.validationMessage;\n }\n event.preventDefault();\n });\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.input.focus(options);\n }\n\n /** Removes focus from the input. */\n @Method()\n async removeFocus() {\n this.input.blur();\n }\n\n /** Selects all the text in the input. */\n @Method()\n async select() {\n return this.input.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.input.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 this.input.setRangeText(replacement, start, end, selectMode);\n\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n this.sixChange.emit();\n this.sixInput.emit();\n }\n }\n\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n @Method()\n async reportValidity() {\n return this.input.reportValidity();\n }\n\n /** Checks for validity. */\n @Method()\n async checkValidity() {\n return this.input.validity.valid;\n }\n\n /** Sets a custom validation message. If `message` is not empty, the field will be considered invalid. */\n @Method()\n async setCustomValidity(message: string) {\n this.customErrorText = '';\n this.customValidation = message !== '';\n this.input.setCustomValidity(message);\n this.invalid = !this.input.checkValidity();\n }\n\n /** Returns the native input's validity */\n @Method()\n async getValidity() {\n return this.input.validity;\n }\n\n /** Returns the native input's validity */\n @Method()\n async isValid() {\n return this.input.validity.valid;\n }\n\n /** Returns the native input's validationMessage */\n @Method()\n async getValidationMessage() {\n return this.input.validationMessage;\n }\n\n /** Resets the formcontrol */\n @Method()\n async reset() {\n this.value = this.defaultValue;\n this.customErrorText = '';\n this.customValidation = false;\n this.input.setCustomValidity('');\n this.invalid = false;\n }\n\n handleChange() {\n this.value = this.input.value;\n this.sixChange.emit();\n }\n\n handleInput() {\n this.value = this.input.value;\n this.sixInput.emit();\n }\n\n handleInvalid() {\n this.invalid = true;\n }\n\n handleBlur() {\n this.hasFocus = false;\n this.sixBlur.emit();\n }\n\n handleFocus() {\n this.hasFocus = true;\n this.sixFocus.emit();\n }\n\n handleClearClick(event: MouseEvent) {\n this.value = '';\n this.sixClear.emit();\n this.sixInput.emit();\n this.sixChange.emit();\n this.input.focus();\n\n event.stopPropagation();\n }\n\n handlePasswordToggle() {\n this.isPasswordVisible = !this.isPasswordVisible;\n }\n\n handleSlotChange() {\n this.hasHelpTextSlot = hasSlot(this.host, 'help-text');\n this.hasErrorTextSlot = hasSlot(this.host, 'error-text');\n this.hasLabelSlot = hasSlot(this.host, 'label');\n }\n\n displayError() {\n return this.invalid && (!this.errorOnBlur || !this.hasFocus);\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.customErrorText ? this.customErrorText : this.errorText}\n hasErrorTextSlot={this.hasErrorTextSlot}\n size={this.size}\n disabled={this.disabled}\n required={this.required}\n displayError={this.displayError()}\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.value?.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.input = 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.value}\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 onInvalid={this.handleInvalid}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\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>\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H,WACJ7C,EAAA,UACEO,KAAK,eACLC,MAAM,eACNU,KAAK,SACL4B,QAASzH,KAAK0B,iBACdgG,SAAS,KAAI,cACD,sBAEZ/C,EAAA,QAAMa,KAAK,cACTb,EAAA,YAAUI,KAAMrF,EAAWM,KAAK+E,OAAK,WAK1C/E,KAAK2H,gBACJhD,EAAA,UACEO,KAAK,yBACLC,MAAM,yBACNU,KAAK,SACL4B,QAASzH,KAAK2B,qBACd+F,SAAS,MAER1H,KAAKoE,kBACJO,EAAA,QAAMa,KAAK,sBACTb,EAAA,YAAUI,KAAMrF,EAAWM,KAAK+E,OAAK,mBAGvCJ,EAAA,QAAMa,KAAK,sBACTb,EAAA,YAAUI,KAAMrF,EAAWM,KAAK+E,OAAK,gBAM7CJ,EAAA,QAAMO,KAAK,SAASC,MAAM,iBACxBR,EAAA,QAAMa,KAAK,a"}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as o,h as r,g as i}from"./p-16b99232.js";import{F as s}from"./p-3c100309.js";import{h as e}from"./p-b4dfb7cf.js";import{E as a}from"./p-9a860acc.js";const l=':host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control .form-control__error-text{display:none}.form-control--has-label .form-control__label{display:inline-block;color:var(--six-input-label-color);font-weight:var(--six-font-weight-bold);margin-bottom:var(--six-spacing-x-small)}.form-control--has-label .form-control__label__required::after{color:var(--six-color-danger-800);content:"*"}.form-control--has-label.form-control--small .form-control__label{font-size:var(--six-input-label-font-size-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--six-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control_label{font-size:var(--six-input-label-font-size-large)}.form-control--has-help-text .form-control__help-text{display:block;color:var(--six-input-help-text-color);margin-top:var(--six-spacing-x-small)}.form-control--has-help-text .form-control__help-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--has-error-text .form-control__error-text{display:block;color:var(--six-color-danger-800);margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text .form-control__error-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text.form-control--small .form-control__error-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-error-text.form-control--medium .form-control__error-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-error-text.form-control--large .form-control__error-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--disabled .form-control__help-text{color:var(--six-input-help-text-color-disabled)}.form-control--disabled .form-control__label{color:var(--six-input-label-color-disabled)}.form-control--invalid:not(.form-control--disabled) .form-control__label{color:var(--six-input-label-color)}:host{--thumb-size:14px;--tooltip-offset-y:10px;--track-color:var(--six-color-web-rock-900);--thumb-color:var(--six-color-web-rock-900);--track-height:3px;display:block}.range{position:relative}.range .range__control{-webkit-appearance:none;width:100%;height:var(--six-input-height-medium);background:transparent;line-height:var(--six-input-height-medium);vertical-align:middle}.range .range__control::-webkit-slider-runnable-track{width:100%;height:var(--track-height);border-radius:3px;border:none}.range .range__control::-webkit-slider-thumb{border:none;width:var(--thumb-size);height:var(--thumb-size);border-radius:50%;background-color:var(--thumb-color);-webkit-appearance:none;margin-top:calc(var(--thumb-size) / -2 + var(--track-height) / 2);transition:var(--six-transition-fast) border-color, var(--six-transition-fast) background-color, var(--six-transition-fast) color, var(--six-transition-fast) box-shadow, var(--six-transition-fast) transform;cursor:pointer}.range .range__control:not(:disabled)::-webkit-slider-thumb:hover{background-color:var(--thumb-color)}.range .range__control:not(:disabled):focus::-webkit-slider-thumb{background-color:var(--thumb-color)}.range .range__control:not(:disabled)::-webkit-slider-thumb:active{background-color:var(--thumb-color);cursor:grabbing}.range .range__control::-moz-focus-outer{border:0}.range .range__control::-moz-range-track{width:100%;height:var(--track-height);background-color:var(--six-progress-track-color);border-radius:3px;border:none}.range .range__control::-moz-range-progress{height:var(--track-height);border-radius:3px;background-color:var(--track-color);border:none}.range .range__control::-moz-range-thumb{border:none;height:var(--thumb-size);width:var(--thumb-size);border-radius:50%;background-color:var(--thumb-color);transition:var(--six-transition-fast) border-color, var(--six-transition-fast) background-color, var(--six-transition-fast) color, var(--six-transition-fast) box-shadow, var(--six-transition-fast) transform;cursor:pointer}.range .range__control:not(:disabled)::-moz-range-thumb:hover{background-color:var(--thumb-color)}.range .range__control:not(:disabled):focus::-moz-range-thumb{background-color:var(--thumb-color)}.range .range__control:not(:disabled)::-moz-range-thumb:active{background-color:var(--thumb-color);cursor:grabbing}.range .range__control:focus{outline:none}.range .range__control:disabled::-webkit-slider-thumb{cursor:not-allowed;color:var(--six-color-web-rock-300);border-color:var(--six-color-web-rock-300);background-color:var(--six-color-web-rock-300)}.range .range__control:disabled::-moz-range-thumb{cursor:not-allowed;color:var(--six-color-web-rock-300);border-color:var(--six-color-web-rock-300);background-color:var(--six-color-web-rock-300)}.range__tooltip{position:absolute;z-index:var(--six-z-index-tooltip);left:1px;border-radius:var(--six-border-radius-medium);background-color:var(--six-color-web-rock-900);font-family:var(--six-font-family);font-size:var(--six-tooltip-font-size);font-weight:var(--six-tooltip-font-weight);line-height:var(--six-tooltip-line-height);color:var(--six-color-white);opacity:0;padding:var(--six-spacing-xxx-small) var(--six-spacing-xx-small);transition:var(--six-transition-fast) opacity;pointer-events:none}.range__tooltip::after{content:"";position:absolute;width:0;height:0;left:50%;margin-left:calc(-1 * var(--six-tooltip-arrow-size))}.range--tooltip-visible .range__tooltip{opacity:1}.range--tooltip-top .range__tooltip{top:calc(-1 * var(--thumb-size) - var(--tooltip-offset-y))}.range--tooltip-top .range__tooltip::after{border-top:var(--six-tooltip-arrow-size) solid var(--six-color-web-rock-900);border-left:var(--six-tooltip-arrow-size) solid transparent;border-right:var(--six-tooltip-arrow-size) solid transparent;top:100%}.range--tooltip-bottom .range__tooltip{bottom:calc(-1 * var(--thumb-size) - var(--tooltip-offset-y))}.range--tooltip-bottom .range__tooltip::after{border-bottom:var(--six-tooltip-arrow-size) solid var(--six-color-web-rock-900);border-left:var(--six-tooltip-arrow-size) solid transparent;border-right:var(--six-tooltip-arrow-size) solid transparent;bottom:100%}';let n=0;const h=class{constructor(r){t(this,r);this.sixChange=o(this,"six-range-change",7);this.sixBlur=o(this,"six-range-blur",7);this.sixFocus=o(this,"six-range-focus",7);this.inputId=`input-${++n}`;this.labelId=`input-label-${n}`;this.helpTextId=`input-help-text-${n}`;this.errorTextId=`input-error-text-${n}`;this.customErrorText="";this.customValidation=false;this.eventListeners=new a;this.defaultValue=0;this.hasFocus=false;this.hasHelpTextSlot=false;this.hasLabelSlot=false;this.hasErrorTextSlot=false;this.hasTooltip=false;this.name="";this.value=undefined;this.required=undefined;this.label="";this.helpText="";this.errorText="";this.disabled=false;this.invalid=false;this.min=0;this.max=100;this.step=1;this.tooltip="top";this.tooltipFormatter=t=>t.toString();this.errorOnBlur=false}handleLabelChange(){this.handleSlotChange()}handleValueChange(){if(this.input){this.input.value=this.value;this.calculateColorRunnableTrack()}this.invalid=this.input?!this.input.checkValidity():false}connectedCallback(){this.handleInput=this.handleInput.bind(this);this.handleBlur=this.handleBlur.bind(this);this.handleFocus=this.handleFocus.bind(this);this.handleSlotChange=this.handleSlotChange.bind(this);this.handleTouchStart=this.handleTouchStart.bind(this);this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}componentWillLoad(){if(this.value===undefined||this.value===null)this.value=this.min;if(this.value<this.min)this.value=this.min;if(this.value>this.max)this.value=this.max;this.defaultValue=this.value;this.handleSlotChange()}componentDidLoad(){this.syncTooltip();this.calculateColorRunnableTrack();this.resizeObserver=new ResizeObserver((()=>this.syncTooltip()));this.eventListeners.add(this.input,"invalid",(t=>{if(this.customValidation||!this.hasErrorTextSlot&&!this.errorText&&!this.customErrorText){this.customErrorText=this.input.validationMessage}t.preventDefault()}))}disconnectedCallback(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange);this.eventListeners.removeAll()}async setFocus(t){this.input.focus(t)}async removeFocus(){this.input.blur()}async setCustomValidity(t){this.customErrorText="";this.customValidation=t!=="";this.input.setCustomValidity(t);this.invalid=!this.input.checkValidity()}async reset(){this.value=this.defaultValue;this.customErrorText="";this.customValidation=false;this.input.setCustomValidity("");this.invalid=false}handleInput(){this.value=Number(this.input.value);this.sixChange.emit();requestAnimationFrame((()=>this.syncTooltip()));requestAnimationFrame((()=>this.calculateColorRunnableTrack()))}handleBlur(){this.hasFocus=false;this.hasTooltip=false;this.sixBlur.emit();this.resizeObserver.unobserve(this.input)}handleFocus(){this.hasFocus=true;this.hasTooltip=true;this.sixFocus.emit();this.resizeObserver.observe(this.input)}handleSlotChange(){this.hasHelpTextSlot=e(this.host,"help-text");this.hasErrorTextSlot=e(this.host,"error-text");this.hasLabelSlot=e(this.host,"label")}handleTouchStart(){this.setFocus()}displayError(){return this.invalid&&(!this.errorOnBlur||!this.hasFocus)}syncTooltip(){if(this.tooltip!=="none"){const t=Math.max(0,(this.value-this.min)/(this.max-this.min));const o=this.input.offsetWidth;const r=this.output.offsetWidth;const i=getComputedStyle(this.input).getPropertyValue("--thumb-size");const s=`calc(${o*t}px - calc(calc(${t} * ${i}) - calc(${i} / 2)))`;this.output.style.transform=`translateX(${s})`;this.output.style.marginLeft=`-${r/2}px`}}calculateColorRunnableTrack(){if(!this.isFirefox()){const t=parseInt(this.input.value,10);const o=parseInt(this.input.min,10);const r=parseInt(this.input.max,10);const i=Math.ceil((t-o)/(r-o)*100);this.input.style.background="-webkit-linear-gradient(left, var(--track-color) 0%, var(--track-color) "+i+"%, var(--six-color-web-rock-300) "+i+"%)"}}isFirefox(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}render(){return r(s,{inputId:this.inputId,label:this.label,labelId:this.labelId,hasLabelSlot:this.hasLabelSlot,helpTextId:this.helpTextId,helpText:this.helpText,hasHelpTextSlot:this.hasHelpTextSlot,size:"medium",errorTextId:this.errorTextId,errorText:this.customErrorText?this.customErrorText:this.errorText,hasErrorTextSlot:this.hasErrorTextSlot,disabled:this.disabled,required:this.required,displayError:this.displayError()},r("div",{part:"base",class:{range:true,"range--disabled":this.disabled,"range--focused":this.hasFocus,"range--tooltip-visible":this.hasTooltip,"range--tooltip-top":this.tooltip==="top","range--tooltip-bottom":this.tooltip==="bottom"},onTouchStart:this.handleTouchStart},r("input",{part:"input",ref:t=>this.input=t,type:"range",class:"range__control",name:this.name,disabled:this.disabled,min:this.min,max:this.max,step:this.step,value:this.value,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur}),this.tooltip!=="none"&&r("output",{part:"tooltip",ref:t=>this.output=t,class:"range__tooltip"},this.tooltipFormatter(this.value))))}get host(){return i(this)}static get watchers(){return{label:["handleLabelChange"],errorText:["handleLabelChange"],helpText:["handleLabelChange"],value:["handleValueChange"]}}};h.style=l;export{h as six_range};
2
+ //# sourceMappingURL=p-9f9bef35.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixRangeCss","id","SixRange","this","inputId","labelId","helpTextId","errorTextId","customErrorText","customValidation","eventListeners","EventListeners","defaultValue","value","toString","handleLabelChange","handleSlotChange","handleValueChange","input","calculateColorRunnableTrack","invalid","checkValidity","connectedCallback","handleInput","bind","handleBlur","handleFocus","handleTouchStart","host","shadowRoot","addEventListener","componentWillLoad","undefined","min","max","componentDidLoad","syncTooltip","resizeObserver","ResizeObserver","add","event","hasErrorTextSlot","errorText","validationMessage","preventDefault","disconnectedCallback","removeEventListener","removeAll","async","options","focus","blur","message","setCustomValidity","Number","sixChange","emit","requestAnimationFrame","hasFocus","hasTooltip","sixBlur","unobserve","sixFocus","observe","hasHelpTextSlot","hasSlot","hasLabelSlot","setFocus","displayError","errorOnBlur","tooltip","percent","Math","inputWidth","offsetWidth","tooltipWidth","output","thumbSize","getComputedStyle","getPropertyValue","x","style","transform","marginLeft","isFirefox","parseInt","ceil","background","navigator","userAgent","toLowerCase","indexOf","render","h","FormControl","label","helpText","size","disabled","required","part","class","range","onTouchStart","ref","el","type","name","step","onInput","onFocus","onBlur","tooltipFormatter"],"sources":["./src/components/six-range/six-range.scss?tag=six-range&encapsulation=shadow","./src/components/six-range/six-range.tsx"],"sourcesContent":["@import 'src/global/component';\n@import '../../functional-components/form-control/form-control';\n\n:host {\n --thumb-size: 14px;\n --tooltip-offset-y: 10px;\n --track-color: var(--six-color-web-rock-900);\n --thumb-color: var(--six-color-web-rock-900);\n --track-height: 3px;\n\n display: block;\n}\n\n.range {\n position: relative;\n\n .range__control {\n -webkit-appearance: none;\n width: 100%;\n height: var(--six-input-height-medium);\n background: transparent;\n line-height: var(--six-input-height-medium);\n vertical-align: middle;\n\n &::-webkit-slider-runnable-track {\n width: 100%;\n height: var(--track-height);\n border-radius: 3px;\n border: none;\n }\n\n &::-webkit-slider-thumb {\n border: none;\n width: var(--thumb-size);\n height: var(--thumb-size);\n border-radius: 50%;\n background-color: var(--thumb-color);\n -webkit-appearance: none;\n margin-top: calc(var(--thumb-size) / -2 + var(--track-height) / 2);\n transition: var(--six-transition-fast) border-color, var(--six-transition-fast) background-color,\n var(--six-transition-fast) color, var(--six-transition-fast) box-shadow, var(--six-transition-fast) transform;\n cursor: pointer;\n }\n\n &:not(:disabled)::-webkit-slider-thumb:hover {\n background-color: var(--thumb-color);\n }\n\n &:not(:disabled):focus::-webkit-slider-thumb {\n background-color: var(--thumb-color);\n }\n\n &:not(:disabled)::-webkit-slider-thumb:active {\n background-color: var(--thumb-color);\n cursor: grabbing;\n }\n\n // Firefox\n &::-moz-focus-outer {\n border: 0;\n }\n\n &::-moz-range-track {\n width: 100%;\n height: var(--track-height);\n background-color: var(--six-progress-track-color);\n border-radius: 3px;\n border: none;\n }\n\n &::-moz-range-progress {\n height: var(--track-height);\n border-radius: 3px;\n background-color: var(--track-color);\n border: none;\n }\n\n &::-moz-range-thumb {\n border: none;\n height: var(--thumb-size);\n width: var(--thumb-size);\n border-radius: 50%;\n background-color: var(--thumb-color);\n transition: var(--six-transition-fast) border-color, var(--six-transition-fast) background-color,\n var(--six-transition-fast) color, var(--six-transition-fast) box-shadow, var(--six-transition-fast) transform;\n cursor: pointer;\n }\n\n &:not(:disabled)::-moz-range-thumb:hover {\n background-color: var(--thumb-color);\n }\n\n &:not(:disabled):focus::-moz-range-thumb {\n background-color: var(--thumb-color);\n }\n\n &:not(:disabled)::-moz-range-thumb:active {\n background-color: var(--thumb-color);\n cursor: grabbing;\n }\n\n // States\n &:focus {\n outline: none;\n }\n\n &:disabled {\n &::-webkit-slider-thumb {\n cursor: not-allowed;\n color: var(--six-color-web-rock-300);\n border-color: var(--six-color-web-rock-300);\n background-color: var(--six-color-web-rock-300);\n }\n\n &::-moz-range-thumb {\n cursor: not-allowed;\n color: var(--six-color-web-rock-300);\n border-color: var(--six-color-web-rock-300);\n background-color: var(--six-color-web-rock-300);\n }\n }\n }\n}\n\n// Tooltip\n.range__tooltip {\n position: absolute;\n z-index: var(--six-z-index-tooltip);\n left: 1px;\n border-radius: var(--six-border-radius-medium);\n background-color: var(--six-color-web-rock-900);\n font-family: var(--six-font-family);\n font-size: var(--six-tooltip-font-size);\n font-weight: var(--six-tooltip-font-weight);\n line-height: var(--six-tooltip-line-height);\n color: var(--six-color-white);\n opacity: 0;\n padding: var(--six-spacing-xxx-small) var(--six-spacing-xx-small);\n transition: var(--six-transition-fast) opacity;\n pointer-events: none;\n\n &::after {\n content: '';\n position: absolute;\n width: 0;\n height: 0;\n left: 50%;\n margin-left: calc(-1 * var(--six-tooltip-arrow-size));\n }\n}\n\n.range--tooltip-visible .range__tooltip {\n opacity: 1;\n}\n\n// Tooltip on top\n.range--tooltip-top .range__tooltip {\n top: calc(-1 * var(--thumb-size) - var(--tooltip-offset-y));\n\n &::after {\n border-top: var(--six-tooltip-arrow-size) solid var(--six-color-web-rock-900);\n border-left: var(--six-tooltip-arrow-size) solid transparent;\n border-right: var(--six-tooltip-arrow-size) solid transparent;\n top: 100%;\n }\n}\n\n// Tooltip on bottom\n.range--tooltip-bottom .range__tooltip {\n bottom: calc(-1 * var(--thumb-size) - var(--tooltip-offset-y));\n\n &::after {\n border-bottom: var(--six-tooltip-arrow-size) solid var(--six-color-web-rock-900);\n border-left: var(--six-tooltip-arrow-size) solid transparent;\n border-right: var(--six-tooltip-arrow-size) solid transparent;\n bottom: 100%;\n }\n}\n","import { Component, Element, Event, EventEmitter, Method, Prop, State, Watch, h } 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';\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 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 for validation errors. Alternatively, you can use the error-text prop.\n *\n * @part base - The component's base wrapper.\n * @part input - The native range input.\n * @part tooltip - The range tooltip.\n */\n@Component({\n tag: 'six-range',\n styleUrl: 'six-range.scss',\n shadow: true,\n})\nexport class SixRange {\n inputId = `input-${++id}`;\n labelId = `input-label-${id}`;\n helpTextId = `input-help-text-${id}`;\n errorTextId = `input-error-text-${id}`;\n resizeObserver: ResizeObserver;\n\n output: HTMLElement;\n input: HTMLInputElement;\n customErrorText = '';\n customValidation = false;\n\n readonly eventListeners = new EventListeners();\n\n @Element() host: HTMLSixRangeElement;\n\n @State() hasFocus = false;\n @State() hasHelpTextSlot = false;\n @State() hasLabelSlot = false;\n @State() hasErrorTextSlot = false;\n @State() hasTooltip = false;\n\n /** The input's name attribute. */\n @Prop() name = '';\n\n /** The input's value attribute. */\n @Prop({ mutable: true }) value: number;\n\n /** Set to true to make the input a required field. */\n @Prop({ reflect: true }) required: boolean;\n\n /** The range's label. Alternatively, you can use the label slot. */\n @Prop() label = '';\n\n /** The range's help text. Alternatively, you can use the help-text slot. */\n @Prop() helpText = '';\n\n /** The input's error text. Alternatively, you can use the error-text slot. */\n @Prop() errorText = '';\n\n /** Set to true to disable the input. */\n @Prop() disabled = false;\n\n /**\n * This will be true when the control is in an invalid state. Validity in range inputs is determined by the message\n * provided by the `setCustomValidity` method.\n */\n @Prop({ mutable: true, reflect: true }) invalid = false;\n\n /** The input's min attribute. */\n @Prop() min = 0;\n\n /** The input's max attribute. */\n @Prop() max = 100;\n\n /** The input's step attribute. */\n @Prop() step = 1;\n\n /** The preferred placedment of the tooltip. */\n @Prop() tooltip: 'top' | 'bottom' | 'none' = 'top';\n\n /** A function used to format the tooltip's value. */\n @Prop() tooltipFormatter = (value: number) => value.toString();\n\n /** Set to display the error text on blur and not when typing */\n @Prop() errorOnBlur = false;\n\n /** Emitted when the control's value changes. */\n @Event({ eventName: 'six-range-change' }) sixChange: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control loses focus. */\n @Event({ eventName: 'six-range-blur' }) sixBlur: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-range-focus' }) sixFocus: EventEmitter<EmptyPayload>;\n\n /** default value the slider will be reverted to when reset is executed */\n private defaultValue = 0;\n\n @Watch('label')\n @Watch('errorText')\n @Watch('helpText')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n @Watch('value')\n handleValueChange() {\n if (this.input) {\n this.input.value = this.value as any;\n this.calculateColorRunnableTrack();\n }\n // In rare cases, the watcher may be called before render so we need to make sure the input exists\n this.invalid = this.input ? !this.input.checkValidity() : false;\n }\n\n connectedCallback() {\n this.handleInput = this.handleInput.bind(this);\n this.handleBlur = this.handleBlur.bind(this);\n this.handleFocus = this.handleFocus.bind(this);\n this.handleSlotChange = this.handleSlotChange.bind(this);\n this.handleTouchStart = this.handleTouchStart.bind(this);\n\n this.host.shadowRoot.addEventListener('slotchange', this.handleSlotChange);\n }\n\n componentWillLoad() {\n if (this.value === undefined || this.value === null) this.value = this.min;\n if (this.value < this.min) this.value = this.min;\n if (this.value > this.max) this.value = this.max;\n this.defaultValue = this.value;\n\n this.handleSlotChange();\n }\n\n componentDidLoad() {\n this.syncTooltip();\n this.calculateColorRunnableTrack();\n this.resizeObserver = new ResizeObserver(() => this.syncTooltip());\n this.eventListeners.add(this.input, 'invalid', (event) => {\n if (this.customValidation || (!this.hasErrorTextSlot && !this.errorText && !this.customErrorText)) {\n this.customErrorText = this.input.validationMessage;\n }\n event.preventDefault();\n });\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.input.focus(options);\n }\n\n /** Removes focus from the input. */\n @Method()\n async removeFocus() {\n this.input.blur();\n }\n\n /** Sets a custom validation message. If `message` is not empty, the field will be considered invalid. */\n @Method()\n async setCustomValidity(message: string) {\n this.customErrorText = '';\n this.customValidation = message !== '';\n this.input.setCustomValidity(message);\n this.invalid = !this.input.checkValidity();\n }\n\n /** Resets the formcontrol */\n @Method()\n async reset() {\n this.value = this.defaultValue;\n this.customErrorText = '';\n this.customValidation = false;\n this.input.setCustomValidity('');\n this.invalid = false;\n }\n\n handleInput() {\n this.value = Number(this.input.value);\n this.sixChange.emit();\n\n requestAnimationFrame(() => this.syncTooltip());\n requestAnimationFrame(() => this.calculateColorRunnableTrack());\n }\n\n handleBlur() {\n this.hasFocus = false;\n this.hasTooltip = false;\n this.sixBlur.emit();\n this.resizeObserver.unobserve(this.input);\n }\n\n handleFocus() {\n this.hasFocus = true;\n this.hasTooltip = true;\n this.sixFocus.emit();\n this.resizeObserver.observe(this.input);\n }\n\n handleSlotChange() {\n this.hasHelpTextSlot = hasSlot(this.host, 'help-text');\n this.hasErrorTextSlot = hasSlot(this.host, 'error-text');\n this.hasLabelSlot = hasSlot(this.host, 'label');\n }\n\n handleTouchStart() {\n this.setFocus();\n }\n\n displayError() {\n return this.invalid && (!this.errorOnBlur || !this.hasFocus);\n }\n\n syncTooltip() {\n if (this.tooltip !== 'none') {\n const percent = Math.max(0, (this.value - this.min) / (this.max - this.min));\n const inputWidth = this.input.offsetWidth;\n const tooltipWidth = this.output.offsetWidth;\n const thumbSize = getComputedStyle(this.input).getPropertyValue('--thumb-size');\n const x = `calc(${inputWidth * percent}px - calc(calc(${percent} * ${thumbSize}) - calc(${thumbSize} / 2)))`;\n this.output.style.transform = `translateX(${x})`;\n this.output.style.marginLeft = `-${tooltipWidth / 2}px`;\n }\n }\n\n /**\n * For Firefox this functionality is not needed because it is supported by standard CSS.\n */\n calculateColorRunnableTrack() {\n if (!this.isFirefox()) {\n const value = parseInt(this.input.value, 10);\n const min = parseInt(this.input.min, 10);\n const max = parseInt(this.input.max, 10);\n const percent = Math.ceil(((value - min) / (max - min)) * 100);\n this.input.style.background =\n '-webkit-linear-gradient(left, var(--track-color) 0%, var(--track-color) ' +\n percent +\n '%, var(--six-color-web-rock-300) ' +\n percent +\n '%)';\n }\n }\n\n isFirefox() {\n return navigator.userAgent.toLowerCase().indexOf('firefox') > -1;\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 size=\"medium\"\n errorTextId={this.errorTextId}\n errorText={this.customErrorText ? this.customErrorText : this.errorText}\n hasErrorTextSlot={this.hasErrorTextSlot}\n disabled={this.disabled}\n required={this.required}\n displayError={this.displayError()}\n >\n <div\n part=\"base\"\n class={{\n range: true,\n\n // States\n 'range--disabled': this.disabled,\n 'range--focused': this.hasFocus,\n 'range--tooltip-visible': this.hasTooltip,\n 'range--tooltip-top': this.tooltip === 'top',\n 'range--tooltip-bottom': this.tooltip === 'bottom',\n }}\n onTouchStart={this.handleTouchStart}\n >\n <input\n part=\"input\"\n ref={(el) => (this.input = el)}\n type=\"range\"\n class=\"range__control\"\n name={this.name}\n disabled={this.disabled}\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.value}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n {this.tooltip !== 'none' && (\n <output part=\"tooltip\" ref={(el) => (this.output = el)} class=\"range__tooltip\">\n {this.tooltipFormatter(this.value)}\n </output>\n )}\n </div>\n </FormControl>\n );\n }\n}\n"],"mappings":"qKAAA,MAAMA,EAAc,29MCMpB,IAAIC,EAAK,E,MAqBIC,EAAQ,M,uJACnBC,KAAAC,QAAU,WAAWH,IACrBE,KAAAE,QAAU,eAAeJ,IACzBE,KAAAG,WAAa,mBAAmBL,IAChCE,KAAAI,YAAc,oBAAoBN,IAKlCE,KAAAK,gBAAkB,GAClBL,KAAAM,iBAAmB,MAEVN,KAAAO,eAAiB,IAAIC,EAiEtBR,KAAAS,aAAe,E,cA7DH,M,qBACO,M,kBACH,M,sBACI,M,gBACN,M,UAGP,G,wDASC,G,cAGG,G,eAGC,G,cAGD,M,aAM+B,M,SAGpC,E,SAGA,I,UAGC,E,aAG8B,M,sBAGjBC,GAAkBA,EAAMC,W,iBAG9B,K,CAiBtBC,oBACEZ,KAAKa,kB,CAIPC,oBACE,GAAId,KAAKe,MAAO,CACdf,KAAKe,MAAML,MAAQV,KAAKU,MACxBV,KAAKgB,6B,CAGPhB,KAAKiB,QAAUjB,KAAKe,OAASf,KAAKe,MAAMG,gBAAkB,K,CAG5DC,oBACEnB,KAAKoB,YAAcpB,KAAKoB,YAAYC,KAAKrB,MACzCA,KAAKsB,WAAatB,KAAKsB,WAAWD,KAAKrB,MACvCA,KAAKuB,YAAcvB,KAAKuB,YAAYF,KAAKrB,MACzCA,KAAKa,iBAAmBb,KAAKa,iBAAiBQ,KAAKrB,MACnDA,KAAKwB,iBAAmBxB,KAAKwB,iBAAiBH,KAAKrB,MAEnDA,KAAKyB,KAAKC,WAAWC,iBAAi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fb7cf.js";import{i as n,M as r}from"./p-4f8394d7.js";const h=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{--width:31rem;display:contents}.dialog{display:flex;align-items:center;justify-content:center;position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--six-z-index-dialog);color:var(--six-color-web-rock-900)}.dialog:not(.dialog--visible){position:absolute;width:1px;height:1px;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden;pointer-events:none;visibility:hidden}.dialog__panel{display:flex;flex-direction:column;z-index:2;width:var(--width);max-width:calc(100% - var(--six-spacing-xx-large));max-height:calc(100% - var(--six-spacing-xx-large));background-color:var(--six-panel-background-color);border-radius:var(--six-border-radius-medium);box-shadow:var(--six-shadow-x-large);opacity:0;transform:scale(0.8);transition:var(--six-transition-medium) opacity, var(--six-transition-medium) transform}.dialog__panel:focus{outline:none}@media screen and (max-width: 420px){.dialog__panel{max-height:80vh}}.dialog--open .dialog__panel{display:flex;opacity:1;transform:none}.dialog__header{flex:0 0 auto;display:flex}.dialog__title{flex:1 1 auto;font-size:var(--six-font-size-x-large);font-weight:var(--six-font-weight-bold);line-height:var(--six-line-height-dense);padding:var(--six-spacing-large) var(--six-spacing-large) var(--six-spacing-small)}.dialog__close{flex:0 0 auto;display:flex;align-items:center;font-size:var(--six-font-size-x-large);padding:0 var(--six-spacing-x-small)}.dialog__body{flex:1 1 auto;padding:var(--six-spacing-small) var(--six-spacing-large) var(--six-spacing-large);overflow:auto;-webkit-overflow-scrolling:touch}.dialog__footer{flex:0 0 auto;text-align:right;padding:var(--six-spacing-large)}.dialog__footer ::slotted(six-button:not(:first-of-type)){margin-left:var(--six-spacing-xx-small)}.dialog:not(.dialog--has-footer) .dialog__footer{display:none}.dialog__overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--six-overlay-background-color);opacity:0;transition:var(--six-transition-medium) opacity}.dialog--open .dialog__overlay{opacity:0.8}";const d=n();let c=0;const g=class{constructor(s){i(this,s);this.sixShow=t(this,"six-dialog-show",7);this.sixAfterShow=t(this,"six-dialog-after-show",7);this.sixHide=t(this,"six-dialog-hide",7);this.sixAfterHide=t(this,"six-dialog-after-hide",7);this.sixInitialFocus=t(this,"six-dialog-initial-focus",7);this.sixOverlayDismiss=t(this,"six-dialog-overlay-dismiss",7);this.componentId=`dialog-${++c}`;this.willShow=false;this.willHide=false;this.hasFooter=false;this.isVisible=false;this.open=false;this.label="";this.noHeader=false}handleOpenChange(){this.open?this.show():this.hide()}connectedCallback(){this.handleCloseClick=this.handleCloseClick.bind(this);this.handleTransitionEnd=this.handleTransitionEnd.bind(this);this.handleKeyDown=this.handleKeyDown.bind(this);this.handleOverlayClick=this.handleOverlayClick.bind(this);this.handleSlotChange=this.handleSlotChange.bind(this);this.modal=new r(this.host,{onFocusOut:()=>this.panel.focus()})}componentWillLoad(){this.handleSlotChange();if(this.open){this.show()}}disconnectedCallback(){o(this.host)}async show(){if(this.willShow){return}const i=this.sixShow.emit();if(i.defaultPrevented){this.open=false;return}this.willShow=true;this.isVisible=true;this.open=true;this.modal.activate();e(this.host);if(this.open){if(d){requestAnimationFrame((()=>{const i=this.sixInitialFocus.emit();if(!i.defaultPrevented){this.panel.focus({preventScroll:true})}}))}else{this.dialog.addEventListener("transitionend",(()=>{const i=this.sixInitialFocus.emit();if(!i.defaultPrevented){this.panel.focus()}}),{once:true})}}}async hide(){if(this.willHide){return}const i=this.sixHide.emit();if(i.defaultPrevented){this.open=true;return}this.willHide=true;this.open=false;this.modal.deactivate();o(this.host)}handleCloseClick(){this.hide()}handleKeyDown(i){if(i.key==="Escape"){this.hide()}}handleOverlayClick(){const i=this.sixOverlayDismiss.emit();if(!i.defaultPrevented){this.hide()}}handleSlotChange(){this.hasFooter=l(this.host,"footer")}handleTransitionEnd(i){const t=i.target;if(i.propertyName==="opacity"&&t.classList.contains("dialog__panel")){this.isVisible=this.open;this.willShow=false;this.willHide=false;this.open?this.sixAfterShow.emit():this.sixAfterHide.emit()}}render(){return s("div",{ref:i=>this.dialog=i,part:"base",class:{dialog:true,"dialog--open":this.open,"dialog--visible":this.isVisible,"dialog--has-footer":this.hasFooter},onKeyDown:this.handleKeyDown,onTransitionEnd:this.handleTransitionEnd},s("div",{part:"overlay",class:"dialog__overlay",onClick:this.handleOverlayClick}),s("div",{ref:i=>this.panel=i,part:"panel",class:"dialog__panel",role:"dialog","aria-modal":"true","aria-hidden":this.open?"false":"true","aria-label":this.noHeader?this.label:null,"aria-labelledby":!this.noHeader?`${this.componentId}-title`:null,tabIndex:0},!this.noHeader&&s("header",{part:"header",class:"dialog__header"},s("span",{part:"title",class:"dialog__title",id:`${this.componentId}-title`},s("slot",{name:"label"},this.label||String.fromCharCode(65279))),s("six-icon-button",{exportparts:"base:close-button",class:"dialog__close",name:"close",onClick:this.handleCloseClick})),s("div",{part:"body",class:"dialog__body"},s("slot",null)),s("footer",{part:"footer",class:"dialog__footer"},s("slot",{name:"footer",onSlotchange:this.handleSlotChange}))))}get host(){return a(this)}static get watchers(){return{open:["handleOpenChange"]}}};g.style=h;export{g as six_dialog};
2
+ //# sourceMappingURL=p-b1683e9c.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixDialogCss","hasPreventScroll","isPreventScrollSupported","id","SixDialog","this","componentId","willShow","willHide","handleOpenChange","open","show","hide","connectedCallback","handleCloseClick","bind","handleTransitionEnd","handleKeyDown","handleOverlayClick","handleSlotChange","modal","Modal","host","onFocusOut","panel","focus","componentWillLoad","disconnectedCallback","unlockBodyScrolling","async","sixShow","emit","defaultPrevented","isVisible","activate","lockBodyScrolling","requestAnimationFrame","sixInitialFocus","preventScroll","dialog","addEventListener","once","sixHide","deactivate","event","key","sixOverlayDismiss","hasFooter","hasSlot","target","propertyName","classList","contains","sixAfterShow","sixAfterHide","render","h","ref","el","part","class","onKeyDown","onTransitionEnd","onClick","role","noHeader","label","tabIndex","name","String","fromCharCode","exportparts","onSlotchange"],"sources":["./src/components/six-dialog/six-dialog.scss?tag=six-dialog&encapsulation=shadow","./src/components/six-dialog/six-dialog.tsx"],"sourcesContent":["@import 'src/global/component';\n@import 'src/global/mixins/hidden';\n\n/**\n * @prop --width: The preferred width of the dialog. Note that the dialog will shrink to accommodate smaller screens.\n */\n:host {\n --width: 31rem;\n\n display: contents;\n}\n\n.dialog {\n display: flex;\n align-items: center;\n justify-content: center;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: var(--six-z-index-dialog);\n color: var(--six-color-web-rock-900);\n\n &:not(.dialog--visible) {\n @include hidden;\n }\n}\n\n.dialog__panel {\n display: flex;\n flex-direction: column;\n z-index: 2;\n width: var(--width);\n max-width: calc(100% - var(--six-spacing-xx-large));\n max-height: calc(100% - var(--six-spacing-xx-large));\n background-color: var(--six-panel-background-color);\n border-radius: var(--six-border-radius-medium);\n box-shadow: var(--six-shadow-x-large);\n opacity: 0;\n transform: scale(0.8);\n transition: var(--six-transition-medium) opacity, var(--six-transition-medium) transform;\n\n &:focus {\n outline: none;\n }\n}\n\n// Ensure there's enough vertical padding for phones that don't update vh when chrome appears (e.g. iPhone)\n@media screen and (max-width: 420px) {\n .dialog__panel {\n max-height: 80vh;\n }\n}\n\n.dialog--open .dialog__panel {\n display: flex;\n opacity: 1;\n transform: none;\n}\n\n.dialog__header {\n flex: 0 0 auto;\n display: flex;\n}\n\n.dialog__title {\n flex: 1 1 auto;\n font-size: var(--six-font-size-x-large);\n font-weight: var(--six-font-weight-bold);\n line-height: var(--six-line-height-dense);\n padding: var(--six-spacing-large) var(--six-spacing-large) var(--six-spacing-small);\n}\n\n.dialog__close {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: var(--six-font-size-x-large);\n padding: 0 var(--six-spacing-x-small);\n}\n\n.dialog__body {\n flex: 1 1 auto;\n padding: var(--six-spacing-small) var(--six-spacing-large) var(--six-spacing-large);\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.dialog__footer {\n flex: 0 0 auto;\n text-align: right;\n padding: var(--six-spacing-large);\n\n ::slotted(six-button:not(:first-of-type)) {\n margin-left: var(--six-spacing-xx-small);\n }\n}\n\n.dialog:not(.dialog--has-footer) .dialog__footer {\n display: none;\n}\n\n.dialog__overlay {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: var(--six-overlay-background-color);\n opacity: 0;\n transition: var(--six-transition-medium) opacity;\n}\n\n.dialog--open .dialog__overlay {\n opacity: 0.8;\n}\n","import { Component, Element, Event, EventEmitter, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { lockBodyScrolling, unlockBodyScrolling } from '../../utils/scroll';\nimport { hasSlot } from '../../utils/slot';\nimport { isPreventScrollSupported } from '../../utils/support';\nimport Modal from '../../utils/modal';\nimport { EmptyPayload } from '../../utils/types';\n\nconst hasPreventScroll = isPreventScrollSupported();\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The dialog's content.\n * @slot label - The dialog's label. Alternatively, you can use the label prop.\n * @slot footer - The dialog's footer, usually one or more buttons representing various options.\n *\n * @part base - The component's base wrapper.\n * @part overlay - The overlay.\n * @part panel - The dialog panel (where the dialog and its content is rendered).\n * @part header - The dialog header.\n * @part title - The dialog title.\n * @part close-button - The close button.\n * @part body - The dialog body.\n * @part footer - The dialog footer.\n *\n */\n@Component({\n tag: 'six-dialog',\n styleUrl: 'six-dialog.scss',\n shadow: true,\n})\nexport class SixDialog {\n componentId = `dialog-${++id}`;\n dialog: HTMLElement;\n modal: Modal;\n panel: HTMLElement;\n willShow = false;\n willHide = false;\n\n @Element() host: HTMLSixDialogElement;\n\n @State() hasFooter = false;\n @State() isVisible = false;\n\n /** Indicates whether or not the dialog is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /**\n * The dialog's label as displayed in the header. You should always include a relevant label even when using\n * `no-header`, as it is required for proper accessibility.\n */\n @Prop() label = '';\n\n /**\n * Set to true to disable the header. This will also remove the default close button, so please ensure you provide an\n * easy, accessible way for users to dismiss the dialog.\n */\n @Prop() noHeader = false;\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n }\n\n /** Emitted when the dialog opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-dialog-show' }) sixShow: EventEmitter<EmptyPayload>;\n\n /** Emitted after the dialog opens and all transitions are complete. */\n @Event({ eventName: 'six-dialog-after-show' }) sixAfterShow: EventEmitter<EmptyPayload>;\n\n /** Emitted when the dialog closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-dialog-hide' }) sixHide: EventEmitter<EmptyPayload>;\n\n /** Emitted after the dialog closes and all transitions are complete. */\n @Event({ eventName: 'six-dialog-after-hide' }) sixAfterHide: EventEmitter<EmptyPayload>;\n\n /**\n * Emitted when the dialog opens and the panel gains focus. Calling `event.preventDefault()` will prevent focus and\n * allow you to set it on a different element in the dialog, such as an input or button.\n */\n @Event({ eventName: 'six-dialog-initial-focus' }) sixInitialFocus: EventEmitter<EmptyPayload>;\n\n /** Emitted when the overlay is clicked. Calling `event.preventDefault()` will prevent the dialog from closing. */\n @Event({ eventName: 'six-dialog-overlay-dismiss' }) sixOverlayDismiss: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.handleCloseClick = this.handleCloseClick.bind(this);\n this.handleTransitionEnd = this.handleTransitionEnd.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleOverlayClick = this.handleOverlayClick.bind(this);\n this.handleSlotChange = this.handleSlotChange.bind(this);\n\n this.modal = new Modal(this.host, {\n onFocusOut: () => this.panel.focus(),\n });\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n\n // Show on init if open\n if (this.open) {\n this.show();\n }\n }\n\n disconnectedCallback() {\n unlockBodyScrolling(this.host);\n }\n\n /** Shows the dialog */\n @Method()\n async show() {\n if (this.willShow) {\n return;\n }\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.willShow = true;\n this.isVisible = true;\n this.open = true;\n this.modal.activate();\n\n lockBodyScrolling(this.host);\n\n if (this.open) {\n if (hasPreventScroll) {\n // Wait for the next frame before setting initial focus so the dialog is technically visible\n requestAnimationFrame(() => {\n const sixInitialFocus = this.sixInitialFocus.emit();\n if (!sixInitialFocus.defaultPrevented) {\n this.panel.focus({ preventScroll: true });\n }\n });\n } else {\n // Once Safari supports { preventScroll: true } we can remove this nasty little hack, but until then we need to\n // wait for the transition to complete before setting focus, otherwise the panel may render in a buggy way its\n // out of view initially.\n //\n // Fiddle: https://jsfiddle.net/g6buoafq/1/\n // Safari: https://bugs.webkit.org/show_bug.cgi?id=178583\n //\n this.dialog.addEventListener(\n 'transitionend',\n () => {\n const sixInitialFocus = this.sixInitialFocus.emit();\n if (!sixInitialFocus.defaultPrevented) {\n this.panel.focus();\n }\n },\n { once: true }\n );\n }\n }\n }\n\n /** Hides the dialog */\n @Method()\n async hide() {\n if (this.willHide) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n this.willHide = true;\n this.open = false;\n this.modal.deactivate();\n\n unlockBodyScrolling(this.host);\n }\n\n handleCloseClick() {\n this.hide();\n }\n\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Escape') {\n this.hide();\n }\n }\n\n handleOverlayClick() {\n const sixOverlayDismiss = this.sixOverlayDismiss.emit();\n\n if (!sixOverlayDismiss.defaultPrevented) {\n this.hide();\n }\n }\n\n handleSlotChange() {\n this.hasFooter = hasSlot(this.host, 'footer');\n }\n\n handleTransitionEnd(event: TransitionEvent) {\n const target = event.target as HTMLElement;\n\n // Ensure we only emit one event when the target element is no longer visible\n if (event.propertyName === 'opacity' && target.classList.contains('dialog__panel')) {\n this.isVisible = this.open;\n this.willShow = false;\n this.willHide = false;\n this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();\n }\n }\n\n render() {\n return (\n <div\n ref={(el) => (this.dialog = el)}\n part=\"base\"\n class={{\n dialog: true,\n 'dialog--open': this.open,\n 'dialog--visible': this.isVisible,\n 'dialog--has-footer': this.hasFooter,\n }}\n onKeyDown={this.handleKeyDown}\n onTransitionEnd={this.handleTransitionEnd}\n >\n <div part=\"overlay\" class=\"dialog__overlay\" onClick={this.handleOverlayClick} />\n\n <div\n ref={(el) => (this.panel = el)}\n part=\"panel\"\n class=\"dialog__panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-hidden={this.open ? 'false' : 'true'}\n aria-label={this.noHeader ? this.label : null}\n aria-labelledby={!this.noHeader ? `${this.componentId}-title` : null}\n tabIndex={0}\n >\n {!this.noHeader && (\n <header part=\"header\" class=\"dialog__header\">\n <span part=\"title\" class=\"dialog__title\" id={`${this.componentId}-title`}>\n <slot name=\"label\">\n {/* If there's no label, use an invisible character to prevent the heading from collapsing */}\n {this.label || String.fromCharCode(65279)}\n </slot>\n </span>\n <six-icon-button\n exportparts=\"base:close-button\"\n class=\"dialog__close\"\n name=\"close\"\n onClick={this.handleCloseClick}\n />\n </header>\n )}\n\n <div part=\"body\" class=\"dialog__body\">\n <slot />\n </div>\n\n <footer part=\"footer\" class=\"dialog__footer\">\n <slot name=\"footer\" onSlotchange={this.handleSlotChange} />\n </footer>\n </div>\n </div>\n );\n }\n}\n"],"mappings":"mLAAA,MAAMA,EAAe,kkECOrB,MAAMC,EAAmBC,IAEzB,IAAIC,EAAK,E,MA2BIC,EAAS,M,2UACpBC,KAAAC,YAAc,YAAYH,IAI1BE,KAAAE,SAAW,MACXF,KAAAG,SAAW,M,eAIU,M,eACA,M,UAG0B,M,WAM/B,G,cAMG,K,CAGnBC,mBACEJ,KAAKK,KAAOL,KAAKM,OAASN,KAAKO,M,CAwBjCC,oBACER,KAAKS,iBAAmBT,KAAKS,iBAAiBC,KAAKV,MACnDA,KAAKW,oBAAsBX,KAAKW,oBAAoBD,KAAKV,MACzDA,KAAKY,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KAAKS,oBAKpB0C,EAAA,OAAKG,KAAK,OAAOC,MAAM,gBACrBJ,EAAA,cAGFA,EAAA,UAAQG,KAAK,SAASC,MAAM,kBAC1BJ,EAAA,QAAMY,KAAK,SAASI,aAAcnE,KAAKc,qB"}
@@ -0,0 +1,2 @@
1
+ const o=new WeakMap;function e(e){if(!e)return;const n=["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageDown","PageUp"];const s=o=>{if(n.includes(o.key)){e.classList.add("focus-visible")}};const i=()=>e.classList.remove("focus-visible");o.set(e,{is:s,isNot:i});e.addEventListener("keydown",s);e.addEventListener("keyup",s);e.addEventListener("mousedown",i);e.addEventListener("mousedown",i)}function n(e){if(!e)return;const n=o.get(e);if(!n){return}const{is:s,isNot:i}=n;e.classList.remove("focus-visible");e.removeEventListener("keydown",s);e.removeEventListener("keyup",s);e.removeEventListener("mousedown",i);e.removeEventListener("mousedown",i)}const s={observe:e,unobserve:n};export{s as f};
2
+ //# sourceMappingURL=p-b1e66136.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["listeners","WeakMap","observe","el","keys","is","event","includes","key","classList","add","isNot","remove","set","addEventListener","unobserve","listener","get","removeEventListener","focusVisible"],"sources":["./src/utils/focus-visible.ts"],"sourcesContent":["//\n// Simulates :focus-visible behavior on an element by watching for certain keyboard and mouse heuristics and toggling a\n// `focus-visible` class. Works at the component level so no global polyfill is necessary.\n//\n// This will eventually be removed pending better :focus-visible support: https://caniuse.com/#search=focus-visible\n//\nconst listeners = new WeakMap();\n\nexport function observe(el: HTMLElement) {\n if (!el) return;\n\n const keys = ['Tab', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Home', 'End', 'PageDown', 'PageUp'];\n const is = (event: KeyboardEvent) => {\n if (keys.includes(event.key)) {\n el.classList.add('focus-visible');\n }\n };\n const isNot = () => el.classList.remove('focus-visible');\n listeners.set(el, { is, isNot });\n\n el.addEventListener('keydown', is);\n el.addEventListener('keyup', is);\n el.addEventListener('mousedown', isNot);\n el.addEventListener('mousedown', isNot);\n}\n\nexport function unobserve(el: HTMLElement) {\n if (!el) return;\n\n const listener = listeners.get(el);\n\n if (!listener) {\n return;\n }\n\n const { is, isNot } = listener;\n\n el.classList.remove('focus-visible');\n el.removeEventListener('keydown', is);\n el.removeEventListener('keyup', is);\n el.removeEventListener('mousedown', isNot);\n el.removeEventListener('mousedown', isNot);\n}\n\nexport const focusVisible = {\n observe,\n unobserve,\n};\n"],"mappings":"AAMA,MAAMA,EAAY,IAAIC,Q,SAENC,EAAQC,GACtB,IAAKA,EAAI,OAET,MAAMC,EAAO,CAAC,MAAO,UAAW,YAAa,YAAa,aAAc,OAAQ,MAAO,WAAY,UACnG,MAAMC,EAAMC,IACV,GAAIF,EAAKG,SAASD,EAAME,KAAM,CAC5BL,EAAGM,UAAUC,IAAI,gB,GAGrB,MAAMC,EAAQ,IAAMR,EAAGM,UAAUG,OAAO,iBACxCZ,EAAUa,IAAIV,EAAI,CAAEE,KAAIM,UAExBR,EAAGW,iBAAiB,UAAWT,GAC/BF,EAAGW,iBAAiB,QAAST,GAC7BF,EAAGW,iBAAiB,YAAaH,GACjCR,EAAGW,iBAAiB,YAAaH,EACnC,C,SAEgBI,EAAUZ,GACxB,IAAKA,EAAI,OAET,MAAMa,EAAWhB,EAAUiB,IAAId,GAE/B,IAAKa,EAAU,CACb,M,CAGF,MAAMX,GAAEA,EAAEM,MAAEA,GAAUK,EAEtBb,EAAGM,UAAUG,OAAO,iBACpBT,EAAGe,oBAAoB,UAAWb,GAClCF,EAAGe,oBAAoB,QAASb,GAChCF,EAAGe,oBAAoB,YAAaP,GACpCR,EAAGe,oBAAoB,YAAaP,EACtC,C,MAEaQ,EAAe,CAC1BjB,UACAa,oB"}
@@ -0,0 +1,2 @@
1
+ import{r as o,h as r,H as s}from"./p-16b99232.js";const t=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{display:inline-block;box-shadow:var(--six-elevation-8dp);border-radius:0;padding:1rem;margin-bottom:0.6rem}";const i=class{constructor(r){o(this,r)}render(){return r(s,null,r("slot",null))}};i.style=t;export{i as six_card};
2
+ //# sourceMappingURL=p-b3974ad4.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixCardCss","SixCard","render","h","Host"],"sources":["./src/components/six-card/six-card.scss?tag=six-card&encapsulation=shadow","./src/components/six-card/six-card.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: inline-block;\n box-shadow: var(--six-elevation-8dp);\n border-radius: 0;\n padding: 1rem;\n margin-bottom: 0.6rem;\n}\n","import { Component, Host, h } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define the content of the card.\n */\n\n@Component({\n tag: 'six-card',\n styleUrl: 'six-card.scss',\n shadow: true,\n})\nexport class SixCard {\n render() {\n return (\n <Host>\n <slot />\n </Host>\n );\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAa,0N,MCcNC,EAAO,M,yBAClBC,SACE,OACEC,EAACC,EAAI,KACHD,EAAA,a"}
@@ -0,0 +1,2 @@
1
+ function t(t){const r=t?t.assignedNodes({flatten:true}):[];let e="";[...r].map((t=>{if(t.nodeType===Node.TEXT_NODE){e+=t.textContent}}));return e}function r(t,r){if(r){return t.querySelector(`[slot="${r}"]`)!==null}return Array.from(t.childNodes).some((t=>{if(t.nodeType===t.TEXT_NODE&&t.textContent.trim()!==""){return true}if(t.nodeType===t.ELEMENT_NODE){const r=t;if(!r.hasAttribute("slot")){return true}}return false}))}const e=(t,[r,e])=>Object.assign(Object.assign({},t),{[r]:e});const n=t=>n=>Object.values(t).map((t=>[t,r(n,t)])).reduce(e,{});const u=t=>{var r;return(r=t.querySelector("slot"))===null||r===void 0?void 0:r.assignedElements({flatten:true})};export{t as a,u as b,n as g,r as h};
2
+ //# sourceMappingURL=p-b4dfb7cf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getTextContent","slot","nodes","assignedNodes","flatten","text","map","node","nodeType","Node","TEXT_NODE","textContent","hasSlot","el","name","querySelector","Array","from","childNodes","some","trim","ELEMENT_NODE","hasAttribute","fromPairs","acc","k","v","Object","assign","getAvailableSlots","slots","host","values","reduce","getSlotChildren","_a","assignedElements"],"sources":["./src/utils/slot.ts"],"sourcesContent":["//\n// Given a slot, this function iterates over all of its assigned element and text nodes and returns the concatenated\n// HTML as a string. This is useful because we can't use slot.innerHTML as an alternative.\n//\nexport function getInnerHTML(slot: HTMLSlotElement): string {\n const nodes = slot.assignedNodes({ flatten: true });\n let html = '';\n\n [...nodes].map((node) => {\n if (node.nodeType === Node.ELEMENT_NODE) {\n html += (node as HTMLElement).outerHTML;\n }\n\n if (node.nodeType === Node.TEXT_NODE) {\n html += node.textContent;\n }\n });\n\n return html;\n}\n\n//\n// Given a slot, this function iterates over all of its assigned text nodes and returns the concatenated text as a\n// string. This is useful because we can't use slot.textContent as an alternative.\n//\nexport function getTextContent(slot: HTMLSlotElement): string {\n const nodes = slot ? slot.assignedNodes({ flatten: true }) : [];\n let text = '';\n\n [...nodes].map((node) => {\n if (node.nodeType === Node.TEXT_NODE) {\n text += node.textContent;\n }\n });\n\n return text;\n}\n\n//\n// Determines whether an element has a slot. If name is specified, the function will look for a corresponding named\n// slot, otherwise it will look for a \"default\" slot (e.g. a non-empty text node or an element with no slot attribute).\n//\nexport function hasSlot(el: HTMLElement, name?: string) {\n // Look for a named slot\n if (name) {\n return el.querySelector(`[slot=\"${name}\"]`) !== null;\n }\n\n // Look for a default slot\n return Array.from(el.childNodes).some((node) => {\n if (node.nodeType === node.TEXT_NODE && node.textContent.trim() !== '') {\n return true;\n }\n\n if (node.nodeType === node.ELEMENT_NODE) {\n const el = node as HTMLElement;\n if (!el.hasAttribute('slot')) {\n return true;\n }\n }\n\n return false;\n });\n}\n\ntype AvailableSlots<T> = { readonly [K in keyof T]: boolean };\n\nconst fromPairs = <T extends string>(acc, [k, v]: [T, boolean]) => ({ ...acc, [k]: v });\n\nexport const getAvailableSlots =\n <T extends object>(slots: T) =>\n <E extends HTMLElement>(host: E): AvailableSlots<T> =>\n Object.values(slots)\n .map((name) => [name, hasSlot(host, name)])\n .reduce(fromPairs, {} as AvailableSlots<T>);\n\nexport const getSlotChildren = <T extends HTMLElement>(el: HTMLElement) =>\n el.querySelector('slot')?.assignedElements({ flatten: true }) as T[];\n"],"mappings":"SAyBgBA,EAAeC,GAC7B,MAAMC,EAAQD,EAAOA,EAAKE,cAAc,CAAEC,QAAS,OAAU,GAC7D,IAAIC,EAAO,GAEX,IAAIH,GAAOI,KAAKC,IACd,GAAIA,EAAKC,WAAaC,KAAKC,UAAW,CACpCL,GAAQE,EAAKI,W,KAIjB,OAAON,CACT,C,SAMgBO,EAAQC,EAAiBC,GAEvC,GAAIA,EAAM,CACR,OAAOD,EAAGE,cAAc,UAAUD,SAAc,I,CAIlD,OAAOE,MAAMC,KAAKJ,EAAGK,YAAYC,MAAMZ,IACrC,GAAIA,EAAKC,WAAaD,EAAKG,WAAaH,EAAKI,YAAYS,SAAW,GAAI,CACtE,OAAO,I,CAGT,GAAIb,EAAKC,WAAaD,EAAKc,aAAc,CACvC,MAAMR,EAAKN,EACX,IAAKM,EAAGS,aAAa,QAAS,CAC5B,OAAO,I,EAIX,OAAO,KAAK,GAEhB,CAIA,MAAMC,EAAY,CAAmBC,GAAMC,EAAGC,KAAgBC,OAAAC,OAAAD,OAAAC,OAAA,GAAWJ,GAAG,CAAEC,CAACA,GAAIC,I,MAEtEG,EACQC,GACKC,GACtBJ,OAAOK,OAAOF,GACXxB,KAAKQ,GAAS,CAACA,EAAMF,EAAQmB,EAAMjB,MACnCmB,OAAOV,EAAW,I,MAEZW,EAA0CrB,IAAe,IAAAsB,EACpE,OAAAA,EAAAtB,EAAGE,cAAc,WAAO,MAAAoB,SAAA,SAAAA,EAAEC,iBAAiB,CAAEhC,QAAS,MAAc,S"}
@@ -0,0 +1,2 @@
1
+ import{r as s,h as i,g as t}from"./p-16b99232.js";import{h as e}from"./p-b4dfb7cf.js";const r=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{display:block}.six-sidebar-item-group--childless::part(content){padding:0 !important}.six-sidebar-item-group--subgroup::part(header){background-color:transparent !important}.six-sidebar-item-group__header-icon{margin-left:16px;transform:translate(0px, -3px)}.six-sidebar-details__header{display:flex}.six-sidebar-details__header-icon{margin-right:1em}";const a=class{constructor(t){s(this,t);this.provideSlot=s=>{if(this.summaryIconHasContent){return i("div",{slot:s},i("slot",{name:s}))}return i("slot",{name:s,onSlotchange:()=>{this.summaryIconHasContent=this.host.shadowRoot.querySelector(`slot[name="${s}"]`).assignedNodes().length>0}})};this.hasItems=false;this.name="";this.icon="";this.value="";this.open=false;this.summaryIcon=undefined;this.summaryIconHasContent=undefined}connectedCallback(){this.handleSlotChange=this.handleSlotChange.bind(this)}componentWillLoad(){this.handleSlotChange()}handleSlotChange(){this.hasItems=e(this.host)}isSubgroup(){return!!this.host.parentElement.closest("six-sidebar-item-group")}render(){return i("six-details",{class:{"six-sidebar-item-group--childless":!this.hasItems,"six-sidebar-item-group--subgroup":this.isSubgroup()},inline:true,open:this.open,"summary-icon":this.summaryIcon,hasContent:this.hasItems},i("div",{slot:"summary"},i("div",{class:"six-sidebar-details__header"},this.icon&&i("six-icon",{class:"six-sidebar-details__header-icon"},this.icon),this.name)),this.provideSlot("summary-icon"),i("slot",null))}get host(){return t(this)}};a.style=r;export{a as six_sidebar_item_group};
2
+ //# sourceMappingURL=p-b66c5c48.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixSidebarItemGroupCss","SixSidebarItemGroup","this","provideSlot","name","summaryIconHasContent","h","slot","onSlotchange","host","shadowRoot","querySelector","assignedNodes","length","connectedCallback","handleSlotChange","bind","componentWillLoad","hasItems","hasSlot","isSubgroup","parentElement","closest","render","class","inline","open","summaryIcon","hasContent","icon"],"sources":["./src/components/six-sidebar-item-group/six-sidebar-item-group.scss?tag=six-sidebar-item-group&encapsulation=shadow","./src/components/six-sidebar-item-group/six-sidebar-item-group.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: block;\n}\n\n.six-sidebar-item-group--childless::part(content) {\n padding: 0 !important;\n}\n\n.six-sidebar-item-group--subgroup::part(header) {\n background-color: transparent !important;\n}\n\n.six-sidebar-item-group__header-icon {\n margin-left: 16px;\n transform: translate(0px, -3px);\n}\n\n.six-sidebar-details__header {\n display: flex;\n}\n\n.six-sidebar-details__header-icon {\n margin-right: 1em;\n}\n","import { Component, Element, h, Prop, State } from '@stencil/core';\nimport { hasSlot } from '../../utils/slot';\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define the nested side bar [group] items.\n */\n\n@Component({\n tag: 'six-sidebar-item-group',\n styleUrl: 'six-sidebar-item-group.scss',\n shadow: true,\n})\nexport class SixSidebarItemGroup {\n @Element() readonly host: HTMLSixSidebarItemGroupElement;\n\n @State() hasItems = false;\n\n /** Title of item group */\n @Prop() name = '';\n\n /** Icon of the group */\n @Prop() icon = '';\n\n /** A unique value to store in the sidebar item of the group label. This can be used as a way to identify sidebar items when selected. */\n @Prop({ reflect: true }) value = '';\n\n @Prop({ reflect: true }) open = false;\n\n /** Custom summary icon name. */\n @Prop() summaryIcon: string;\n\n connectedCallback() {\n this.handleSlotChange = this.handleSlotChange.bind(this);\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n handleSlotChange() {\n this.hasItems = hasSlot(this.host);\n }\n\n isSubgroup() {\n return !!this.host.parentElement.closest('six-sidebar-item-group');\n }\n\n @State() summaryIconHasContent: boolean;\n\n provideSlot = (name: string) => {\n if (this.summaryIconHasContent) {\n return (\n <div slot={name}>\n <slot name={name}></slot>\n </div>\n );\n }\n\n return (\n <slot\n name={name}\n onSlotchange={() => {\n this.summaryIconHasContent =\n this.host.shadowRoot.querySelector<HTMLSlotElement>(`slot[name=\"${name}\"]`).assignedNodes().length > 0;\n }}\n ></slot>\n );\n };\n\n render() {\n return (\n <six-details\n class={{\n 'six-sidebar-item-group--childless': !this.hasItems,\n 'six-sidebar-item-group--subgroup': this.isSubgroup(),\n }}\n inline={true}\n open={this.open}\n summary-icon={this.summaryIcon}\n hasContent={this.hasItems}\n >\n <div slot=\"summary\">\n <div class=\"six-sidebar-details__header\">\n {this.icon && <six-icon class=\"six-sidebar-details__header-icon\">{this.icon}</six-icon>}\n {this.name}\n </div>\n </div>\n {this.provideSlot('summary-icon')}\n <slot />\n </six-details>\n );\n }\n}\n"],"mappings":"sFAAA,MAAMA,EAAyB,8c,MCelBC,EAAmB,M,yBAqC9BC,KAAAC,YAAeC,IACb,GAAIF,KAAKG,sBAAuB,CAC9B,OACEC,EAAA,OAAKC,KAAMH,GACTE,EAAA,QAAMF,KAAMA,I,CAKlB,OACEE,EAAA,QACEF,KAAMA,EACNI,aAAc,KACZN,KAAKG,sBACHH,KAAKO,KAAKC,WAAWC,cAA+B,cAAcP,OAAUQ,gBAAgBC,OAAS,CAAC,GAEpG,E,cAlDQ,M,UAGL,G,UAGA,G,WAGkB,G,UAED,M,gEAKhCC,oBACEZ,KAAKa,iBAAmBb,KAAKa,iBAAiBC,KAAKd,K,CAGrDe,oBACEf,KAAKa,kB,CAGPA,mBACEb,KAAKgB,SAAWC,EAAQjB,KAAKO,K,CAG/BW,aACE,QAASlB,KAAKO,KAAKY,cAAcC,QAAQ,yB,CAyB3CC,SACE,OACEjB,EAAA,eACEkB,MAAO,CACL,qCAAsCtB,KAAKgB,SAC3C,mCAAoChB,KAAKkB,cAE3CK,OAAQ,KACRC,KAAMxB,KAAKwB,KAAI,eACDxB,KAAKyB,YACnBC,WAAY1B,KAAKgB,UAEjBZ,EAAA,OAAKC,KAAK,WACRD,EAAA,OAAKkB,MAAM,+BACRtB,KAAK2B,MAAQvB,EAAA,YAAUkB,MAAM,oCAAoCtB,KAAK2B,MACtE3B,KAAKE,OAGTF,KAAKC,YAAY,gBAClBG,EAAA,a"}
@@ -0,0 +1,2 @@
1
+ import{r as i,c as o,h as t,g as s}from"./p-16b99232.js";const r=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{display:inline-block}.radio{display:inline-flex;align-items:center;font-family:var(--six-font-family);font-size:var(--six-input-font-size-medium);font-weight:var(--six-input-font-weight);color:var(--six-input-color);vertical-align:middle;cursor:pointer}.radio__icon{display:inline-flex;width:var(--six-selection-control-toggle-size);height:var(--six-selection-control-toggle-size)}.radio__icon svg{width:100%;height:100%}.radio__control{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--six-selection-control-toggle-size);height:var(--six-selection-control-toggle-size);border:solid var(--six-border-width) var(--six-input-border-color);border-radius:50%;background-color:var(--six-input-background-color);color:transparent;transition:var(--six-transition-fast) border-color, var(--six-transition-fast) background-color, var(--six-transition-fast) color, var(--six-transition-fast) box-shadow}.radio__control input[type=radio]{position:absolute;opacity:0;padding:0;margin:0;pointer-events:none}.radio:not(.radio--checked):not(.radio--disabled) .radio__control:hover{border-color:var(--six-input-border-color-hover)}.radio--checked .radio__control{color:var(--six-selection-control-color);border-color:var(--six-selection-control-color)}.radio.radio--checked:not(.radio--disabled) .radio__control:hover{color:var(--six-input-border-color-focus);border-color:var(--six-input-border-color-focus)}.radio--disabled{cursor:not-allowed;color:var(--six-input-color-disabled)}.radio--disabled .radio__control{border-color:var(--six-input-border-color-disabled)}.radio--disabled.radio--checked .radio__control{color:var(--six-selection-control-color-disabled)}.radio__label{line-height:var(--six-selection-control-toggle-size);margin-left:0.5em;user-select:none}";let e=0;const a=class{constructor(t){i(this,t);this.sixBlur=o(this,"six-radio-blur",7);this.sixChange=o(this,"six-radio-change",7);this.sixFocus=o(this,"six-radio-focus",7);this.inputId=`radio-${++e}`;this.labelId=`radio-label-${e}`;this.defaultState=false;this.hasFocus=false;this.name=undefined;this.value=undefined;this.disabled=false;this.checked=false;this.invalid=false}handleCheckedChange(){if(this.checked){this.getSiblingRadios().map((i=>i.checked=false))}if(this.input){this.input.checked=this.checked;this.sixChange.emit()}}connectedCallback(){this.handleClick=this.handleClick.bind(this);this.handleBlur=this.handleBlur.bind(this);this.handleFocus=this.handleFocus.bind(this);this.handleKeyDown=this.handleKeyDown.bind(this);this.handleMouseDown=this.handleMouseDown.bind(this)}componentWillLoad(){this.defaultState=this.checked}async setFocus(i){this.input.focus(i)}async removeFocus(){this.input.blur()}async reportValidity(){return this.input.reportValidity()}async checkValidity(){return this.input.validity.valid}async setCustomValidity(i){this.input.setCustomValidity(i);this.invalid=!this.input.checkValidity()}async reset(){this.checked=this.defaultState;this.input.setCustomValidity("");this.invalid=false}getAllRadios(){const i=this.host.closest("six-form, form")||document.body;if(!this.name)return[];return[...i.querySelectorAll("six-radio")].filter((i=>i.name===this.name))}getSiblingRadios(){return this.getAllRadios().filter((i=>i!==this.host))}handleClick(){this.checked=this.input.checked}handleBlur(){this.hasFocus=false;this.sixBlur.emit()}handleFocus(){this.hasFocus=true;this.sixFocus.emit()}handleKeyDown(i){if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(i.key)){const o=this.getAllRadios().filter((i=>!i.disabled));const t=["ArrowUp","ArrowLeft"].includes(i.key)?-1:1;let s=o.indexOf(this.host)+t;if(s<0)s=o.length-1;if(s>o.length-1)s=0;this.getAllRadios().map((i=>i.checked=false));o[s].setFocus();o[s].checked=true;i.preventDefault()}}handleMouseDown(i){i.preventDefault();this.input.focus()}render(){return t("label",{part:"base",class:{radio:true,"radio--checked":this.checked,"radio--disabled":this.disabled,"radio--focused":this.hasFocus},htmlFor:this.inputId,onKeyDown:this.handleKeyDown,onMouseDown:this.handleMouseDown},t("span",{part:"control",class:"radio__control"},t("span",{part:"checked-icon",class:"radio__icon"},t("svg",{viewBox:"0 0 16 16"},t("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},t("g",{fill:"currentColor"},t("circle",{cx:"8",cy:"8",r:"5"}))))),t("input",{ref:i=>this.input=i,id:this.inputId,type:"radio",name:this.name,value:this.value,checked:this.checked,disabled:this.disabled,role:"radio","aria-checked":this.checked?"true":"false","aria-labelledby":this.labelId,onClick:this.handleClick,onBlur:this.handleBlur,onFocus:this.handleFocus})),t("span",{part:"label",id:this.labelId,class:"radio__label"},t("slot",null)))}get host(){return s(this)}static get watchers(){return{checked:["handleCheckedChange"]}}};a.style=r;export{a as six_radio};
2
+ //# sourceMappingURL=p-ba6e1f0e.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixRadioCss","id","SixRadio","this","inputId","labelId","defaultState","handleCheckedChange","checked","getSiblingRadios","map","radio","input","sixChange","emit","connectedCallback","handleClick","bind","handleBlur","handleFocus","handleKeyDown","handleMouseDown","componentWillLoad","async","options","focus","blur","reportValidity","validity","valid","message","setCustomValidity","invalid","checkValidity","getAllRadios","form","host","closest","document","body","name","querySelectorAll","filter","hasFocus","sixBlur","sixFocus","event","includes","key","radios","disabled","incr","index","indexOf","length","setFocus","preventDefault","render","h","part","class","htmlFor","onKeyDown","onMouseDown","viewBox","stroke","fill","cx","cy","r","ref","el","type","value","role","onClick","onBlur","onFocus"],"sources":["./src/components/six-radio/six-radio.scss?tag=six-radio&encapsulation=shadow","./src/components/six-radio/six-radio.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: inline-block;\n}\n\n.radio {\n display: inline-flex;\n align-items: center;\n font-family: var(--six-font-family);\n font-size: var(--six-input-font-size-medium);\n font-weight: var(--six-input-font-weight);\n color: var(--six-input-color);\n vertical-align: middle;\n cursor: pointer;\n}\n\n.radio__icon {\n display: inline-flex;\n width: var(--six-selection-control-toggle-size);\n height: var(--six-selection-control-toggle-size);\n\n svg {\n width: 100%;\n height: 100%;\n }\n}\n\n.radio__control {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--six-selection-control-toggle-size);\n height: var(--six-selection-control-toggle-size);\n border: solid var(--six-border-width) var(--six-input-border-color);\n border-radius: 50%;\n background-color: var(--six-input-background-color);\n color: transparent;\n transition: var(--six-transition-fast) border-color, var(--six-transition-fast) background-color,\n var(--six-transition-fast) color, var(--six-transition-fast) box-shadow;\n\n input[type='radio'] {\n position: absolute;\n opacity: 0;\n padding: 0;\n margin: 0;\n pointer-events: none;\n }\n}\n\n// Hover\n.radio:not(.radio--checked):not(.radio--disabled) .radio__control:hover {\n border-color: var(--six-input-border-color-hover);\n}\n\n// Checked\n.radio--checked .radio__control {\n color: var(--six-selection-control-color);\n border-color: var(--six-selection-control-color);\n}\n\n// Checked + hover\n.radio.radio--checked:not(.radio--disabled) .radio__control:hover {\n color: var(--six-input-border-color-focus);\n border-color: var(--six-input-border-color-focus);\n}\n\n// Disabled\n.radio--disabled {\n cursor: not-allowed;\n color: var(--six-input-color-disabled);\n\n .radio__control {\n border-color: var(--six-input-border-color-disabled);\n }\n\n &.radio--checked .radio__control {\n color: var(--six-selection-control-color-disabled);\n }\n}\n\n.radio__label {\n line-height: var(--six-selection-control-toggle-size);\n margin-left: 0.5em;\n user-select: none;\n}\n","import { Component, Element, Event, EventEmitter, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The radio's label.\n *\n * @part base - The component's base wrapper.\n * @part control - The radio control.\n * @part checked-icon - The container the wraps the checked icon.\n * @part label - The radio label.\n */\n\n@Component({\n tag: 'six-radio',\n styleUrl: 'six-radio.scss',\n shadow: true,\n})\nexport class SixRadio {\n inputId = `radio-${++id}`;\n labelId = `radio-label-${id}`;\n input: HTMLInputElement;\n\n @Element() host: HTMLSixRadioElement;\n\n @State() hasFocus = false;\n\n /** The radio's name attribute. */\n @Prop() name: string;\n\n /** The radio's value attribute. */\n @Prop() value: string;\n\n /** Set to true to disable the radio. */\n @Prop() disabled = false;\n\n /** Set to true to draw the radio in a checked state. */\n @Prop({ mutable: true, reflect: true }) checked = false;\n\n /**\n * This will be true when the control is in an invalid state. Validity in range inputs is determined by the message\n * provided by the `setCustomValidity` method.\n */\n @Prop({ mutable: true, reflect: true }) invalid = false;\n\n @Watch('checked')\n handleCheckedChange() {\n if (this.checked) {\n this.getSiblingRadios().map((radio) => (radio.checked = false));\n }\n if (this.input) {\n this.input.checked = this.checked;\n this.sixChange.emit();\n }\n }\n\n /** Emitted when the control loses focus. */\n @Event({ eventName: 'six-radio-blur' }) sixBlur: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control's checked state changes. */\n @Event({ eventName: 'six-radio-change' }) sixChange: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-radio-focus' }) sixFocus: EventEmitter<EmptyPayload>;\n\n /** default state whether the radio button should be checked or not when resetting */\n private defaultState = false;\n\n connectedCallback() {\n this.handleClick = this.handleClick.bind(this);\n this.handleBlur = this.handleBlur.bind(this);\n this.handleFocus = this.handleFocus.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleMouseDown = this.handleMouseDown.bind(this);\n }\n\n componentWillLoad() {\n this.defaultState = this.checked;\n }\n\n /** Sets focus on the radio. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the radio. */\n @Method()\n async removeFocus() {\n this.input.blur();\n }\n\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n @Method()\n async reportValidity() {\n return this.input.reportValidity();\n }\n\n /** Checks for validity. */\n @Method()\n async checkValidity() {\n return this.input.validity.valid;\n }\n\n /** Sets a custom validation message. If `message` is not empty, the field will be considered invalid. */\n @Method()\n async setCustomValidity(message: string) {\n this.input.setCustomValidity(message);\n this.invalid = !this.input.checkValidity();\n }\n\n /** Resets the formcontrol */\n @Method()\n async reset() {\n this.checked = this.defaultState;\n this.input.setCustomValidity('');\n this.invalid = false;\n }\n\n getAllRadios() {\n const form = this.host.closest('six-form, form') || document.body;\n\n if (!this.name) return [];\n\n return [...form.querySelectorAll('six-radio')].filter(\n (radio: HTMLSixRadioElement) => radio.name === this.name\n ) as HTMLSixRadioElement[];\n }\n\n getSiblingRadios() {\n return this.getAllRadios().filter((radio) => radio !== this.host) as HTMLSixRadioElement[];\n }\n\n handleClick() {\n this.checked = this.input.checked;\n }\n\n handleBlur() {\n this.hasFocus = false;\n this.sixBlur.emit();\n }\n\n handleFocus() {\n this.hasFocus = true;\n this.sixFocus.emit();\n }\n\n handleKeyDown(event: KeyboardEvent) {\n if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(event.key)) {\n const radios = this.getAllRadios().filter((radio) => !radio.disabled);\n const incr = ['ArrowUp', 'ArrowLeft'].includes(event.key) ? -1 : 1;\n let index = radios.indexOf(this.host) + incr;\n if (index < 0) index = radios.length - 1;\n if (index > radios.length - 1) index = 0;\n\n this.getAllRadios().map((radio) => (radio.checked = false));\n radios[index].setFocus();\n radios[index].checked = true;\n\n event.preventDefault();\n }\n }\n\n handleMouseDown(event: MouseEvent) {\n // Prevent clicks on the label from briefly blurring the input\n event.preventDefault();\n this.input.focus();\n }\n\n render() {\n return (\n <label\n part=\"base\"\n class={{\n radio: true,\n 'radio--checked': this.checked,\n 'radio--disabled': this.disabled,\n 'radio--focused': this.hasFocus,\n }}\n htmlFor={this.inputId}\n onKeyDown={this.handleKeyDown}\n onMouseDown={this.handleMouseDown}\n >\n <span part=\"control\" class=\"radio__control\">\n <span part=\"checked-icon\" class=\"radio__icon\">\n <svg viewBox=\"0 0 16 16\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g fill=\"currentColor\">\n <circle cx=\"8\" cy=\"8\" r=\"5\"></circle>\n </g>\n </g>\n </svg>\n </span>\n\n <input\n ref={(el) => (this.input = el)}\n id={this.inputId}\n type=\"radio\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n role=\"radio\"\n aria-checked={this.checked ? 'true' : 'false'}\n aria-labelledby={this.labelId}\n onClick={this.handleClick}\n onBlur={this.handleBlur}\n onFocus={this.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AA,KAAGQ,KAAK,gBACNR,EAAA,UAAQS,GAAG,IAAIC,GAAG,IAAIC,EAAE,UAMhCX,EAAA,SACEY,IAAMC,GAAQpE,KAAKS,MAAQ2D,EAC3BtE,GAAIE,KAAKC,QACToE,KAAK,QACLhC,KAAMrC,KAAKqC,KACXiC,MAAOtE,KAAKsE,MACZjE,QAASL,KAAKK,QACd0C,SAAU/C,KAAK+C,SACfwB,KAAK,QAAO,eACEvE,KAAKK,QAAU,OAAS,QAAO,kBAC5BL,KAAKE,QACtBsE,QAASxE,KAAKa,YACd4D,OAAQzE,KAAKe,WACb2D,QAAS1E,KAAKgB,eAIlBuC,EAAA,QAAMC,KAAK,QAAQ1D,GAAIE,KAAKE,QAASuD,MAAM,gBACzCF,EAAA,c"}
@@ -0,0 +1,2 @@
1
+ import{r as s,c as i,h as t}from"./p-16b99232.js";import{D as e,a as h}from"./p-0786fa7c.js";import{E as a}from"./p-9a860acc.js";const o=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{display:block}.search-box{z-index:var(--six-z-index-search-field)}.search-box__icon{cursor:pointer}";const r=class{constructor(t){s(this,t);this.searchFieldChange=i(this,"six-search-field-change",7);this.eventListeners=new a;this.handleInputChange=()=>{this.searchFieldChange.emit({value:this.inputElement.value})};this.placeholder=undefined;this.debounce=e;this.disabled=false;this.value="";this.clearable=false}handleValueChange(){if(this.inputElement){this.inputElement.value=this.value}}componentDidLoad(){this.eventListeners.add(this.inputElement,"six-input-input",h(this.handleInputChange,this.debounce));this.eventListeners.add(this.inputElement,"keydown",(s=>{if(s.key==="Enter"){this.handleInputChange()}}))}disconnectedCallback(){this.eventListeners.removeAll()}render(){return t("div",{class:"search-box"},t("six-input",{ref:s=>this.inputElement=s,placeholder:this.placeholder,value:this.value,disabled:this.disabled,clearable:this.clearable},t("six-icon",{class:"search-box__icon",slot:"prefix",size:"small",onClick:this.handleInputChange},"search")),t("slot",null))}static get watchers(){return{value:["handleValueChange"]}}};r.style=o;export{r as six_search_field};
2
+ //# sourceMappingURL=p-c799a6bf.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixSearchFieldCss","SixSearchField","this","eventListeners","EventListeners","handleInputChange","searchFieldChange","emit","value","inputElement","DEFAULT_DEBOUNCE_FAST","handleValueChange","componentDidLoad","add","debounce","event","key","disconnectedCallback","removeAll","render","h","class","ref","el","placeholder","disabled","clearable","slot","size","onClick"],"sources":["./src/components/six-search-field/six-search-field.scss?tag=six-search-field&encapsulation=shadow","./src/components/six-search-field/six-search-field.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: block;\n}\n\n.search-box {\n z-index: var(--six-z-index-search-field);\n\n &__icon {\n cursor: pointer;\n }\n}\n","import { Component, Event, EventEmitter, h, Prop, Watch } from '@stencil/core';\nimport { debounce, DEFAULT_DEBOUNCE_FAST } from '../../utils/execution-control';\nimport { EventListeners } from '../../utils/event-listeners';\n\nexport interface SixSearchFieldChangePayload {\n value: string;\n}\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define the results below the search component.\n */\n\n@Component({\n tag: 'six-search-field',\n styleUrl: 'six-search-field.scss',\n shadow: true,\n})\nexport class SixSearchField {\n /** The input's placeholder text. */\n @Prop() placeholder: string;\n\n /** Debounce time in milliseconds, default is 300 ms */\n @Prop({ reflect: true }) debounce = DEFAULT_DEBOUNCE_FAST;\n\n /** Set to true to disable the input. */\n @Prop({ reflect: true }) disabled = false;\n\n /** The input's value attribute. */\n @Prop({ reflect: true }) value = '';\n\n /** Set to true to add a clear button when the input is populated. */\n @Prop() clearable = false;\n\n /** Emitted when a search is triggered */\n @Event({ eventName: 'six-search-field-change' }) searchFieldChange: EventEmitter<SixSearchFieldChangePayload>;\n\n inputElement: HTMLSixInputElement;\n\n readonly eventListeners = new EventListeners();\n\n handleInputChange = () => {\n this.searchFieldChange.emit({ value: this.inputElement.value });\n };\n\n @Watch('value')\n handleValueChange() {\n if (this.inputElement) {\n this.inputElement.value = this.value;\n }\n }\n\n componentDidLoad() {\n this.eventListeners.add(this.inputElement, 'six-input-input', debounce(this.handleInputChange, this.debounce));\n this.eventListeners.add(this.inputElement, 'keydown', (event: KeyboardEvent) => {\n if (event.key === 'Enter') {\n // emit immediately\n this.handleInputChange();\n }\n });\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n }\n\n render() {\n return (\n <div class=\"search-box\">\n <six-input\n ref={(el) => (this.inputElement = el)}\n placeholder={this.placeholder}\n value={this.value}\n disabled={this.disabled}\n clearable={this.clearable}\n >\n <six-icon class=\"search-box__icon\" slot=\"prefix\" size=\"small\" onClick={this.handleInputChange}>\n search\n </six-icon>\n </six-input>\n <slot />\n </div>\n );\n }\n}\n"],"mappings":"iIAAA,MAAMA,EAAoB,kN,MCoBbC,EAAc,M,oFAqBhBC,KAAAC,eAAiB,IAAIC,EAE9BF,KAAAG,kBAAoB,KAClBH,KAAKI,kBAAkBC,KAAK,CAAEC,MAAON,KAAKO,aAAaD,OAAQ,E,yCAnB7BE,E,cAGA,M,WAGH,G,eAGb,K,CAcpBC,oBACE,GAAIT,KAAKO,aAAc,CACrBP,KAAKO,aAAaD,MAAQN,KAAKM,K,EAInCI,mBACEV,KAAKC,eAAeU,IAAIX,KAAKO,aAAc,kBAAmBK,EAASZ,KAAKG,kBAAmBH,KAAKY,WACpGZ,KAAKC,eAAeU,IAAIX,KAAKO,aAAc,WAAYM,IACrD,GAAIA,EAAMC,MAAQ,QAAS,CAEzBd,KAAKG,mB,KAKXY,uBACEf,KAAKC,eAAee,W,CAGtBC,SACE,OACEC,EAAA,OAAKC,MAAM,cACTD,EAAA,aACEE,IAAMC,GAAQrB,KAAKO,aAAec,EAClCC,YAAatB,KAAKsB,YAClBhB,MAAON,KAAKM,MACZiB,SAAUvB,KAAKuB,SACfC,UAAWxB,KAAKwB,WAEhBN,EAAA,YAAUC,MAAM,mBAAmBM,KAAK,SAASC,KAAK,QAAQC,QAAS3B,KAAKG,mBAAiB,WAI/Fe,EAAA,a"}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as s,h as a,H as i,g as o}from"./p-16b99232.js";const e=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{display:inline-block}.tab{display:inline-flex;align-items:center;font-family:var(--six-font-family);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-semibold);border-radius:4px;color:var(--six-tab-color);padding:var(--six-spacing-medium) var(--six-spacing-large);white-space:nowrap;user-select:none;cursor:pointer;transition:var(--six-transition-fast) box-shadow, var(--six-transition-fast) color}.tab:focus{outline:none}.tab:focus:not(.tab--disabled){color:var(--six-tab-color-active)}.tab.tab--active:not(.tab--disabled){color:var(--six-tab-color-active);font-weight:var(--six-font-weight-bold)}.tab.tab--closable{padding-right:var(--six-spacing-small)}.tab.tab--disabled{color:var(--six-tab-color-disabled);cursor:not-allowed}.tab:hover:not(.tab--disabled){color:var(--six-tab-color-hover)}.tab__close-button{font-size:var(--six-font-size-large);margin-left:var(--six-spacing-xx-small)}.tab__close-button::part(base){padding:var(--six-spacing-xxx-small)}";let r=0;const l=class{constructor(a){t(this,a);this.sixClose=s(this,"six-tab-close",7);this.componentId=`tab-${++r}`;this.panel="";this.active=false;this.closable=false;this.disabled=false}connectedCallback(){this.handleCloseClick=this.handleCloseClick.bind(this)}async setFocus(t){this.tab.focus(t)}async removeFocus(){this.tab.blur()}handleCloseClick(){this.sixClose.emit()}render(){return a(i,{id:this.host.id||this.componentId},a("div",{part:"base",ref:t=>this.tab=t,class:{tab:true,"tab--active":this.active,"tab--closable":this.closable,"tab--disabled":this.disabled},role:"tab","aria-disabled":this.disabled?"true":"false","aria-selected":this.active?"true":"false",tabindex:this.disabled||!this.active?"-1":"0"},a("slot",null),this.closable&&a("six-icon-button",{name:"close",size:"xSmall",exportparts:"base:close-button",class:"tab__close-button",onClick:this.handleCloseClick,tabIndex:-1,"aria-hidden":"true"})))}get host(){return o(this)}};l.style=e;export{l as six_tab};
2
+ //# sourceMappingURL=p-ccee090e.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixTabCss","id","SixTab","this","componentId","connectedCallback","handleCloseClick","bind","async","options","tab","focus","blur","sixClose","emit","render","h","Host","host","part","ref","el","class","active","closable","disabled","role","tabindex","name","size","exportparts","onClick","tabIndex"],"sources":["./src/components/six-tab/six-tab.scss?tag=six-tab&encapsulation=shadow","./src/components/six-tab/six-tab.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: inline-block;\n}\n\n.tab {\n display: inline-flex;\n align-items: center;\n font-family: var(--six-font-family);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-semibold);\n border-radius: 4px;\n color: var(--six-tab-color);\n padding: var(--six-spacing-medium) var(--six-spacing-large);\n white-space: nowrap;\n user-select: none;\n cursor: pointer;\n transition: var(--six-transition-fast) box-shadow, var(--six-transition-fast) color;\n\n &:focus {\n outline: none;\n }\n\n &:focus:not(.tab--disabled) {\n color: var(--six-tab-color-active);\n }\n\n &.tab--active:not(.tab--disabled) {\n color: var(--six-tab-color-active);\n font-weight: var(--six-font-weight-bold);\n }\n\n &.tab--closable {\n padding-right: var(--six-spacing-small);\n }\n\n &.tab--disabled {\n color: var(--six-tab-color-disabled);\n cursor: not-allowed;\n }\n\n &:hover:not(.tab--disabled) {\n color: var(--six-tab-color-hover);\n }\n}\n\n.tab__close-button {\n font-size: var(--six-font-size-large);\n margin-left: var(--six-spacing-xx-small);\n\n &::part(base) {\n padding: var(--six-spacing-xxx-small);\n }\n}\n","import { Component, Element, Event, EventEmitter, Host, Method, Prop, h } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The tab's label.\n *\n * @part base - The component's base wrapper.\n * @part close-button - The close button, which is the icon button's base wrapper.\n */\n\n@Component({\n tag: 'six-tab',\n styleUrl: 'six-tab.scss',\n shadow: true,\n})\nexport class SixTab {\n componentId = `tab-${++id}`;\n tab: HTMLElement;\n\n @Element() host: HTMLSixTabElement;\n\n /** The name of the tab panel the tab will control. The panel must be located in the same tab group. */\n @Prop({ reflect: true }) panel = '';\n\n /** Set to true to draw the tab in an active state. */\n @Prop({ reflect: true }) active = false;\n\n /** When true, the tab will be rendered with a close icon. */\n @Prop() closable = false;\n\n /** Set to true to draw the tab in a disabled state. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Emitted when the tab is closable and the close button is activated. */\n @Event({ eventName: 'six-tab-close' }) sixClose: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.handleCloseClick = this.handleCloseClick.bind(this);\n }\n\n /** Sets focus to the tab. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.tab.focus(options);\n }\n\n /** Removes focus from the tab. */\n @Method()\n async removeFocus() {\n this.tab.blur();\n }\n\n handleCloseClick() {\n this.sixClose.emit();\n }\n\n render() {\n return (\n // If the user didn't provide an ID, we'll set one so we can link tabs and tab panels with aria labels\n <Host id={this.host.id || this.componentId}>\n <div\n part=\"base\"\n ref={(el) => (this.tab = el)}\n class={{\n tab: true,\n\n // States\n 'tab--active': this.active,\n 'tab--closable': this.closable,\n 'tab--disabled': this.disabled,\n }}\n role=\"tab\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-selected={this.active ? 'true' : 'false'}\n tabindex={this.disabled || !this.active ? '-1' : '0'}\n >\n <slot />\n {this.closable && (\n <six-icon-button\n name=\"close\"\n size=\"xSmall\"\n exportparts=\"base:close-button\"\n class=\"tab__close-button\"\n onClick={this.handleCloseClick}\n tabIndex={-1}\n aria-hidden=\"true\"\n />\n )}\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"gEAAA,MAAMA,EAAY,kkCCGlB,IAAIC,EAAK,E,MAmBIC,EAAM,M,iEACjBC,KAAAC,YAAc,SAASH,I,WAMU,G,YAGC,M,cAGf,M,cAGiB,K,CAKpCI,oBACEF,KAAKG,iBAAmBH,KAAKG,iBAAiBC,KAAKJ,K,CAKrDK,eAAeC,GACbN,KAAKO,IAAIC,MAAMF,E,CAKjBD,oBACEL,KAAKO,IAAIE,M,CAGXN,mBACEH,KAAKU,SAASC,M,CAGhBC,SACE,OAEEC,EAACC,EAAI,CAAChB,GAAIE,KAAKe,KAAKjB,IAAME,KAAKC,aAC7BY,EAAA,OACEG,KAAK,OACLC,IAAMC,GAAQlB,KAAKO,IAAMW,EACzBC,MAAO,CACLZ,IAAK,KAGL,cAAeP,KAAKoB,OACpB,gBAAiBpB,KAAKqB,SACtB,gBAAiBrB,KAAKsB,UAExBC,KAAK,MAAK,gBACKvB,KAAKsB,SAAW,OAAS,QAAO,gBAChCtB,KAAKoB,OAAS,OAAS,QACtCI,SAAUxB,KAAKsB,WAAatB,KAAKoB,OAAS,KAAO,KAEjDP,EAAA,aACCb,KAAKqB,UACJR,EAAA,mBACEY,KAAK,QACLC,KAAK,SACLC,YAAY,oBACZR,MAAM,oBACNS,QAAS5B,KAAKG,iBACd0B,UAAW,EAAC,cACA,U"}