@six-group/ui-library 4.0.2 → 4.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (358) hide show
  1. package/dist/cjs/{form-control-9769b310.js → form-control-19303ed2.js} +2 -2
  2. package/dist/cjs/{form-control-9769b310.js.map → form-control-19303ed2.js.map} +1 -1
  3. package/dist/cjs/{index-900437fc.js → index-7d73cbd6.js} +281 -121
  4. package/dist/cjs/index-7d73cbd6.js.map +1 -0
  5. package/dist/cjs/index.cjs.js +15 -0
  6. package/dist/cjs/index.cjs.js.map +1 -1
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/set-attributes_2.cjs.entry.js +1 -1
  9. package/dist/cjs/six-alert.cjs.entry.js +1 -1
  10. package/dist/cjs/six-avatar.cjs.entry.js +1 -1
  11. package/dist/cjs/six-badge.cjs.entry.js +1 -1
  12. package/dist/cjs/six-button.cjs.entry.js +3 -3
  13. package/dist/cjs/six-button.cjs.entry.js.map +1 -1
  14. package/dist/cjs/six-card.cjs.entry.js +1 -1
  15. package/dist/cjs/six-checkbox.cjs.entry.js +3 -3
  16. package/dist/cjs/six-checkbox.cjs.entry.js.map +1 -1
  17. package/dist/cjs/six-datepicker.cjs.entry.js +1 -1
  18. package/dist/cjs/six-details.cjs.entry.js +1 -1
  19. package/dist/cjs/six-dialog.cjs.entry.js +1 -1
  20. package/dist/cjs/six-drawer.cjs.entry.js +2 -2
  21. package/dist/cjs/six-drawer.cjs.entry.js.map +1 -1
  22. package/dist/cjs/six-dropdown_2.cjs.entry.js +1 -1
  23. package/dist/cjs/six-error-page.cjs.entry.js +1 -1
  24. package/dist/cjs/six-error.cjs.entry.js +1 -1
  25. package/dist/cjs/six-file-list-item.cjs.entry.js +1 -1
  26. package/dist/cjs/six-file-list.cjs.entry.js +1 -1
  27. package/dist/cjs/six-file-upload.cjs.entry.js +1 -1
  28. package/dist/cjs/six-footer.cjs.entry.js +1 -1
  29. package/dist/cjs/six-group-label.cjs.entry.js +3 -3
  30. package/dist/cjs/six-group-label.cjs.entry.js.map +1 -1
  31. package/dist/cjs/six-header.cjs.entry.js +1 -1
  32. package/dist/cjs/six-icon-button.cjs.entry.js +1 -1
  33. package/dist/cjs/six-icon.cjs.entry.js +1 -1
  34. package/dist/cjs/six-input.cjs.entry.js +3 -3
  35. package/dist/cjs/six-input.cjs.entry.js.map +1 -1
  36. package/dist/cjs/six-item-picker.cjs.entry.js +1 -1
  37. package/dist/cjs/six-language-switcher.cjs.entry.js +1 -1
  38. package/dist/cjs/six-layout-grid.cjs.entry.js +1 -1
  39. package/dist/cjs/six-main-container.cjs.entry.js +1 -1
  40. package/dist/cjs/six-menu-divider.cjs.entry.js +1 -1
  41. package/dist/cjs/six-menu-item.cjs.entry.js +1 -1
  42. package/dist/cjs/six-menu-label.cjs.entry.js +1 -1
  43. package/dist/cjs/six-picto.cjs.entry.js +1 -1
  44. package/dist/cjs/six-progress-bar.cjs.entry.js +1 -1
  45. package/dist/cjs/six-progress-ring.cjs.entry.js +1 -1
  46. package/dist/cjs/six-radio.cjs.entry.js +1 -1
  47. package/dist/cjs/six-range.cjs.entry.js +3 -3
  48. package/dist/cjs/six-range.cjs.entry.js.map +1 -1
  49. package/dist/cjs/six-root.cjs.entry.js +1 -1
  50. package/dist/cjs/six-search-field.cjs.entry.js +1 -1
  51. package/dist/cjs/six-select.cjs.entry.js +3 -3
  52. package/dist/cjs/six-select.cjs.entry.js.map +1 -1
  53. package/dist/cjs/six-sidebar-item-group.cjs.entry.js +13 -3
  54. package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -1
  55. package/dist/cjs/six-sidebar-item.cjs.entry.js +6 -4
  56. package/dist/cjs/six-sidebar-item.cjs.entry.js.map +1 -1
  57. package/dist/cjs/six-sidebar.cjs.entry.js +1 -1
  58. package/dist/cjs/six-spinner.cjs.entry.js +1 -1
  59. package/dist/cjs/six-switch.cjs.entry.js +3 -3
  60. package/dist/cjs/six-switch.cjs.entry.js.map +1 -1
  61. package/dist/cjs/six-tab-group.cjs.entry.js +1 -1
  62. package/dist/cjs/six-tab-panel.cjs.entry.js +1 -1
  63. package/dist/cjs/six-tab.cjs.entry.js +1 -1
  64. package/dist/cjs/six-tag.cjs.entry.js +1 -1
  65. package/dist/cjs/six-textarea.cjs.entry.js +3 -3
  66. package/dist/cjs/six-textarea.cjs.entry.js.map +1 -1
  67. package/dist/cjs/six-tile.cjs.entry.js +1 -1
  68. package/dist/cjs/six-timepicker.cjs.entry.js +1 -1
  69. package/dist/cjs/six-tooltip.cjs.entry.js +1 -1
  70. package/dist/cjs/ui-library.cjs.js +3 -3
  71. package/dist/cjs/ui-library.cjs.js.map +1 -1
  72. package/dist/collection/collection-manifest.json +2 -2
  73. package/dist/collection/components/six-button/six-button.js +2 -2
  74. package/dist/collection/components/six-button/six-button.js.map +1 -1
  75. package/dist/collection/components/six-checkbox/six-checkbox.css +3 -0
  76. package/dist/collection/components/six-drawer/six-drawer.js +1 -1
  77. package/dist/collection/components/six-drawer/six-drawer.js.map +1 -1
  78. package/dist/collection/components/six-drawer/test/six-drawer.spec.js +1 -1
  79. package/dist/collection/components/six-drawer/test/six-drawer.spec.js.map +1 -1
  80. package/dist/collection/components/six-group-label/six-group-label.css +3 -0
  81. package/dist/collection/components/six-input/six-input.css +3 -0
  82. package/dist/collection/components/six-range/six-range.css +3 -0
  83. package/dist/collection/components/six-select/six-select.css +3 -0
  84. package/dist/collection/components/six-sidebar-item/six-sidebar-item.css +6 -1
  85. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +21 -2
  86. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js.map +1 -1
  87. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.css +7 -0
  88. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js +28 -1
  89. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js.map +1 -1
  90. package/dist/collection/components/six-switch/six-switch.css +3 -0
  91. package/dist/collection/components/six-textarea/six-textarea.css +3 -0
  92. package/dist/collection/utils/error-messages.js +14 -0
  93. package/dist/collection/utils/error-messages.js.map +1 -1
  94. package/dist/components/index.d.ts +6 -0
  95. package/dist/components/index.js +16 -2
  96. package/dist/components/index.js.map +1 -1
  97. package/dist/components/set-attributes2.js +2 -0
  98. package/dist/components/set-attributes2.js.map +1 -1
  99. package/dist/components/six-alert.js +3 -0
  100. package/dist/components/six-alert.js.map +1 -1
  101. package/dist/components/six-button.js +2 -2
  102. package/dist/components/six-button.js.map +1 -1
  103. package/dist/components/six-checkbox.js +6 -1
  104. package/dist/components/six-checkbox.js.map +1 -1
  105. package/dist/components/six-datepicker.js +4 -1
  106. package/dist/components/six-datepicker.js.map +1 -1
  107. package/dist/components/six-details2.js +2 -0
  108. package/dist/components/six-details2.js.map +1 -1
  109. package/dist/components/six-dialog.js +2 -0
  110. package/dist/components/six-dialog.js.map +1 -1
  111. package/dist/components/six-drawer.js +3 -1
  112. package/dist/components/six-drawer.js.map +1 -1
  113. package/dist/components/six-dropdown2.js +7 -0
  114. package/dist/components/six-dropdown2.js.map +1 -1
  115. package/dist/components/six-group-label.js +4 -1
  116. package/dist/components/six-group-label.js.map +1 -1
  117. package/dist/components/six-header.js +2 -0
  118. package/dist/components/six-header.js.map +1 -1
  119. package/dist/components/six-input2.js +6 -1
  120. package/dist/components/six-input2.js.map +1 -1
  121. package/dist/components/six-item-picker2.js +4 -0
  122. package/dist/components/six-item-picker2.js.map +1 -1
  123. package/dist/components/six-language-switcher.js +2 -0
  124. package/dist/components/six-language-switcher.js.map +1 -1
  125. package/dist/components/six-layout-grid.js +2 -0
  126. package/dist/components/six-layout-grid.js.map +1 -1
  127. package/dist/components/six-progress-ring.js +2 -0
  128. package/dist/components/six-progress-ring.js.map +1 -1
  129. package/dist/components/six-radio.js +3 -0
  130. package/dist/components/six-radio.js.map +1 -1
  131. package/dist/components/six-range.js +8 -1
  132. package/dist/components/six-range.js.map +1 -1
  133. package/dist/components/six-root.js +2 -0
  134. package/dist/components/six-root.js.map +1 -1
  135. package/dist/components/six-search-field.js +2 -0
  136. package/dist/components/six-search-field.js.map +1 -1
  137. package/dist/components/six-select.js +8 -1
  138. package/dist/components/six-select.js.map +1 -1
  139. package/dist/components/six-sidebar-item-group.js +13 -2
  140. package/dist/components/six-sidebar-item-group.js.map +1 -1
  141. package/dist/components/six-sidebar-item.js +7 -4
  142. package/dist/components/six-sidebar-item.js.map +1 -1
  143. package/dist/components/six-sidebar.js +2 -0
  144. package/dist/components/six-sidebar.js.map +1 -1
  145. package/dist/components/six-switch.js +5 -1
  146. package/dist/components/six-switch.js.map +1 -1
  147. package/dist/components/six-tab-group.js +2 -0
  148. package/dist/components/six-tab-group.js.map +1 -1
  149. package/dist/components/six-textarea.js +7 -1
  150. package/dist/components/six-textarea.js.map +1 -1
  151. package/dist/components/six-timepicker2.js +3 -1
  152. package/dist/components/six-timepicker2.js.map +1 -1
  153. package/dist/components/six-tooltip2.js +2 -0
  154. package/dist/components/six-tooltip2.js.map +1 -1
  155. package/dist/components.json +51 -3
  156. package/dist/esm/{form-control-b0febe88.js → form-control-079f7fb6.js} +2 -2
  157. package/dist/esm/{form-control-b0febe88.js.map → form-control-079f7fb6.js.map} +1 -1
  158. package/dist/esm/{index-8a74f992.js → index-4ee8b33e.js} +281 -121
  159. package/dist/esm/index-4ee8b33e.js.map +1 -0
  160. package/dist/esm/index.js +15 -1
  161. package/dist/esm/index.js.map +1 -1
  162. package/dist/esm/loader.js +3 -3
  163. package/dist/esm/set-attributes_2.entry.js +1 -1
  164. package/dist/esm/six-alert.entry.js +1 -1
  165. package/dist/esm/six-avatar.entry.js +1 -1
  166. package/dist/esm/six-badge.entry.js +1 -1
  167. package/dist/esm/six-button.entry.js +3 -3
  168. package/dist/esm/six-button.entry.js.map +1 -1
  169. package/dist/esm/six-card.entry.js +1 -1
  170. package/dist/esm/six-checkbox.entry.js +3 -3
  171. package/dist/esm/six-checkbox.entry.js.map +1 -1
  172. package/dist/esm/six-datepicker.entry.js +1 -1
  173. package/dist/esm/six-details.entry.js +1 -1
  174. package/dist/esm/six-dialog.entry.js +1 -1
  175. package/dist/esm/six-drawer.entry.js +2 -2
  176. package/dist/esm/six-drawer.entry.js.map +1 -1
  177. package/dist/esm/six-dropdown_2.entry.js +1 -1
  178. package/dist/esm/six-error-page.entry.js +1 -1
  179. package/dist/esm/six-error.entry.js +1 -1
  180. package/dist/esm/six-file-list-item.entry.js +1 -1
  181. package/dist/esm/six-file-list.entry.js +1 -1
  182. package/dist/esm/six-file-upload.entry.js +1 -1
  183. package/dist/esm/six-footer.entry.js +1 -1
  184. package/dist/esm/six-group-label.entry.js +3 -3
  185. package/dist/esm/six-group-label.entry.js.map +1 -1
  186. package/dist/esm/six-header.entry.js +1 -1
  187. package/dist/esm/six-icon-button.entry.js +1 -1
  188. package/dist/esm/six-icon.entry.js +1 -1
  189. package/dist/esm/six-input.entry.js +3 -3
  190. package/dist/esm/six-input.entry.js.map +1 -1
  191. package/dist/esm/six-item-picker.entry.js +1 -1
  192. package/dist/esm/six-language-switcher.entry.js +1 -1
  193. package/dist/esm/six-layout-grid.entry.js +1 -1
  194. package/dist/esm/six-main-container.entry.js +1 -1
  195. package/dist/esm/six-menu-divider.entry.js +1 -1
  196. package/dist/esm/six-menu-item.entry.js +1 -1
  197. package/dist/esm/six-menu-label.entry.js +1 -1
  198. package/dist/esm/six-picto.entry.js +1 -1
  199. package/dist/esm/six-progress-bar.entry.js +1 -1
  200. package/dist/esm/six-progress-ring.entry.js +1 -1
  201. package/dist/esm/six-radio.entry.js +1 -1
  202. package/dist/esm/six-range.entry.js +3 -3
  203. package/dist/esm/six-range.entry.js.map +1 -1
  204. package/dist/esm/six-root.entry.js +1 -1
  205. package/dist/esm/six-search-field.entry.js +1 -1
  206. package/dist/esm/six-select.entry.js +3 -3
  207. package/dist/esm/six-select.entry.js.map +1 -1
  208. package/dist/esm/six-sidebar-item-group.entry.js +13 -3
  209. package/dist/esm/six-sidebar-item-group.entry.js.map +1 -1
  210. package/dist/esm/six-sidebar-item.entry.js +6 -4
  211. package/dist/esm/six-sidebar-item.entry.js.map +1 -1
  212. package/dist/esm/six-sidebar.entry.js +1 -1
  213. package/dist/esm/six-spinner.entry.js +1 -1
  214. package/dist/esm/six-switch.entry.js +3 -3
  215. package/dist/esm/six-switch.entry.js.map +1 -1
  216. package/dist/esm/six-tab-group.entry.js +1 -1
  217. package/dist/esm/six-tab-panel.entry.js +1 -1
  218. package/dist/esm/six-tab.entry.js +1 -1
  219. package/dist/esm/six-tag.entry.js +1 -1
  220. package/dist/esm/six-textarea.entry.js +3 -3
  221. package/dist/esm/six-textarea.entry.js.map +1 -1
  222. package/dist/esm/six-tile.entry.js +1 -1
  223. package/dist/esm/six-timepicker.entry.js +1 -1
  224. package/dist/esm/six-tooltip.entry.js +1 -1
  225. package/dist/esm/ui-library.js +4 -4
  226. package/dist/esm/ui-library.js.map +1 -1
  227. package/dist/types/components/six-sidebar-item/six-sidebar-item.d.ts +5 -0
  228. package/dist/types/components/six-sidebar-item-group/six-sidebar-item-group.d.ts +6 -0
  229. package/dist/types/components.d.ts +396 -0
  230. package/dist/types/stencil-public-runtime.d.ts +26 -3
  231. package/dist/types/utils/error-messages.d.ts +2 -1
  232. package/dist/ui-library/index.esm.js +1 -1
  233. package/dist/ui-library/index.esm.js.map +1 -1
  234. package/dist/ui-library/{p-5800663b.entry.js → p-0416ec85.entry.js} +2 -2
  235. package/dist/ui-library/{p-ae601a0f.entry.js → p-0d8154b1.entry.js} +2 -2
  236. package/dist/ui-library/p-120a1b66.entry.js +2 -0
  237. package/dist/ui-library/{p-538f3c50.entry.js.map → p-120a1b66.entry.js.map} +1 -1
  238. package/dist/ui-library/{p-9c1be3fb.entry.js → p-16eb37cd.entry.js} +2 -2
  239. package/dist/ui-library/{p-878226a0.entry.js → p-1f7dac36.entry.js} +2 -2
  240. package/dist/ui-library/{p-a6a9ee96.entry.js → p-20cb60c9.entry.js} +2 -2
  241. package/dist/ui-library/{p-613283a7.entry.js → p-21606e14.entry.js} +2 -2
  242. package/dist/ui-library/{p-411ed539.entry.js → p-2280038f.entry.js} +2 -2
  243. package/dist/ui-library/{p-e775dcb4.entry.js → p-24e80289.entry.js} +2 -2
  244. package/dist/ui-library/{p-264d4ea8.entry.js → p-27987d45.entry.js} +2 -2
  245. package/dist/ui-library/{p-cd67da3d.entry.js → p-2945a132.entry.js} +2 -2
  246. package/dist/ui-library/{p-3cc5addb.entry.js → p-2e99f389.entry.js} +2 -2
  247. package/dist/ui-library/p-3d7678a8.entry.js +2 -0
  248. package/dist/ui-library/p-3d7678a8.entry.js.map +1 -0
  249. package/dist/ui-library/p-4196a75a.entry.js +2 -0
  250. package/dist/ui-library/{p-a457fee8.entry.js.map → p-4196a75a.entry.js.map} +1 -1
  251. package/dist/ui-library/{p-dc4f41d8.entry.js → p-48b7c199.entry.js} +2 -2
  252. package/dist/ui-library/{p-37557787.entry.js → p-51630491.entry.js} +2 -2
  253. package/dist/ui-library/{p-14c1ec31.entry.js → p-5218986b.entry.js} +2 -2
  254. package/dist/ui-library/{p-66fe54b3.entry.js → p-5904d3c3.entry.js} +2 -2
  255. package/dist/ui-library/p-66a48dc4.entry.js +2 -0
  256. package/dist/ui-library/{p-db936ad7.entry.js.map → p-66a48dc4.entry.js.map} +1 -1
  257. package/dist/ui-library/{p-91b51800.entry.js → p-66d1d93d.entry.js} +2 -2
  258. package/dist/ui-library/{p-25bb1752.entry.js → p-6aced322.entry.js} +2 -2
  259. package/dist/ui-library/{p-22c9b8c3.entry.js → p-6e87aeea.entry.js} +2 -2
  260. package/dist/ui-library/p-74179b03.entry.js +2 -0
  261. package/dist/ui-library/{p-ab91c2a9.entry.js.map → p-74179b03.entry.js.map} +1 -1
  262. package/dist/ui-library/{p-1d5ee1a0.entry.js → p-77424c6b.entry.js} +2 -2
  263. package/dist/ui-library/{p-13b43e04.entry.js → p-7d00de3a.entry.js} +2 -2
  264. package/dist/ui-library/{p-cdaed936.entry.js → p-7e9257f3.entry.js} +2 -2
  265. package/dist/ui-library/p-8226e363.entry.js +2 -0
  266. package/dist/ui-library/{p-b57afbe4.entry.js.map → p-8226e363.entry.js.map} +1 -1
  267. package/dist/ui-library/{p-a2035543.entry.js → p-8296e24c.entry.js} +2 -2
  268. package/dist/ui-library/{p-a2035543.entry.js.map → p-8296e24c.entry.js.map} +1 -1
  269. package/dist/ui-library/{p-7e3ad38a.entry.js → p-93a9b693.entry.js} +2 -2
  270. package/dist/ui-library/{p-5af44076.entry.js → p-94bd8347.entry.js} +2 -2
  271. package/dist/ui-library/{p-ee950ce2.entry.js → p-9bec3e14.entry.js} +2 -2
  272. package/dist/ui-library/{p-9b354f5d.entry.js → p-a15928c4.entry.js} +2 -2
  273. package/dist/ui-library/{p-cba69e9d.entry.js → p-a4348ad4.entry.js} +2 -2
  274. package/dist/ui-library/{p-7afafb9d.entry.js → p-acd3ecfd.entry.js} +2 -2
  275. package/dist/ui-library/{p-f1dc3a88.entry.js → p-ae383f66.entry.js} +2 -2
  276. package/dist/ui-library/{p-1286ab62.entry.js → p-af0e163e.entry.js} +2 -2
  277. package/dist/ui-library/{p-1286ab62.entry.js.map → p-af0e163e.entry.js.map} +1 -1
  278. package/dist/ui-library/{p-3f1a5ecb.entry.js → p-b3a14438.entry.js} +2 -2
  279. package/dist/ui-library/{p-dfed33c5.entry.js → p-b42fd9c3.entry.js} +2 -2
  280. package/dist/ui-library/p-b5fdfa6a.js +3 -0
  281. package/dist/ui-library/p-b5fdfa6a.js.map +1 -0
  282. package/dist/ui-library/p-b7597736.entry.js +2 -0
  283. package/dist/ui-library/{p-4435ff73.entry.js.map → p-b7597736.entry.js.map} +1 -1
  284. package/dist/ui-library/{p-c03ebf7d.entry.js → p-b906a605.entry.js} +2 -2
  285. package/dist/ui-library/{p-ac099e6b.entry.js → p-b97764a1.entry.js} +2 -2
  286. package/dist/ui-library/p-bbefcec9.entry.js +2 -0
  287. package/dist/ui-library/{p-db34a6cc.entry.js.map → p-bbefcec9.entry.js.map} +1 -1
  288. package/dist/ui-library/{p-b351f889.entry.js → p-c75694df.entry.js} +2 -2
  289. package/dist/ui-library/{p-b6f47c9d.entry.js → p-cb32f8d2.entry.js} +2 -2
  290. package/dist/ui-library/{p-a0f290d0.entry.js → p-cd3281fb.entry.js} +2 -2
  291. package/dist/ui-library/{p-d1bda563.entry.js → p-cec8c149.entry.js} +2 -2
  292. package/dist/ui-library/{p-724875b0.entry.js → p-d1ba2ad5.entry.js} +2 -2
  293. package/dist/ui-library/{p-346f9557.entry.js → p-d2196113.entry.js} +2 -2
  294. package/dist/ui-library/p-de7a9448.entry.js +2 -0
  295. package/dist/ui-library/p-de7a9448.entry.js.map +1 -0
  296. package/dist/ui-library/{p-a55c7258.entry.js → p-df1c4a1f.entry.js} +2 -2
  297. package/dist/ui-library/{p-95fbdd0b.entry.js → p-e740215a.entry.js} +2 -2
  298. package/dist/ui-library/{p-e5020f0d.js → p-f3fdc121.js} +2 -2
  299. package/dist/ui-library/ui-library.css +1 -1
  300. package/dist/ui-library/ui-library.esm.js +1 -1
  301. package/dist/ui-library/ui-library.esm.js.map +1 -1
  302. package/package.json +13 -10
  303. package/dist/cjs/index-900437fc.js.map +0 -1
  304. package/dist/esm/index-8a74f992.js.map +0 -1
  305. package/dist/ui-library/p-4435ff73.entry.js +0 -2
  306. package/dist/ui-library/p-538f3c50.entry.js +0 -2
  307. package/dist/ui-library/p-5ba3a0fe.entry.js +0 -2
  308. package/dist/ui-library/p-5ba3a0fe.entry.js.map +0 -1
  309. package/dist/ui-library/p-6153045b.js +0 -3
  310. package/dist/ui-library/p-6153045b.js.map +0 -1
  311. package/dist/ui-library/p-6197fe2f.entry.js +0 -2
  312. package/dist/ui-library/p-6197fe2f.entry.js.map +0 -1
  313. package/dist/ui-library/p-a457fee8.entry.js +0 -2
  314. package/dist/ui-library/p-ab91c2a9.entry.js +0 -2
  315. package/dist/ui-library/p-b57afbe4.entry.js +0 -2
  316. package/dist/ui-library/p-db34a6cc.entry.js +0 -2
  317. package/dist/ui-library/p-db936ad7.entry.js +0 -2
  318. /package/dist/ui-library/{p-5800663b.entry.js.map → p-0416ec85.entry.js.map} +0 -0
  319. /package/dist/ui-library/{p-ae601a0f.entry.js.map → p-0d8154b1.entry.js.map} +0 -0
  320. /package/dist/ui-library/{p-9c1be3fb.entry.js.map → p-16eb37cd.entry.js.map} +0 -0
  321. /package/dist/ui-library/{p-878226a0.entry.js.map → p-1f7dac36.entry.js.map} +0 -0
  322. /package/dist/ui-library/{p-a6a9ee96.entry.js.map → p-20cb60c9.entry.js.map} +0 -0
  323. /package/dist/ui-library/{p-613283a7.entry.js.map → p-21606e14.entry.js.map} +0 -0
  324. /package/dist/ui-library/{p-411ed539.entry.js.map → p-2280038f.entry.js.map} +0 -0
  325. /package/dist/ui-library/{p-e775dcb4.entry.js.map → p-24e80289.entry.js.map} +0 -0
  326. /package/dist/ui-library/{p-264d4ea8.entry.js.map → p-27987d45.entry.js.map} +0 -0
  327. /package/dist/ui-library/{p-cd67da3d.entry.js.map → p-2945a132.entry.js.map} +0 -0
  328. /package/dist/ui-library/{p-3cc5addb.entry.js.map → p-2e99f389.entry.js.map} +0 -0
  329. /package/dist/ui-library/{p-dc4f41d8.entry.js.map → p-48b7c199.entry.js.map} +0 -0
  330. /package/dist/ui-library/{p-37557787.entry.js.map → p-51630491.entry.js.map} +0 -0
  331. /package/dist/ui-library/{p-14c1ec31.entry.js.map → p-5218986b.entry.js.map} +0 -0
  332. /package/dist/ui-library/{p-66fe54b3.entry.js.map → p-5904d3c3.entry.js.map} +0 -0
  333. /package/dist/ui-library/{p-91b51800.entry.js.map → p-66d1d93d.entry.js.map} +0 -0
  334. /package/dist/ui-library/{p-25bb1752.entry.js.map → p-6aced322.entry.js.map} +0 -0
  335. /package/dist/ui-library/{p-22c9b8c3.entry.js.map → p-6e87aeea.entry.js.map} +0 -0
  336. /package/dist/ui-library/{p-1d5ee1a0.entry.js.map → p-77424c6b.entry.js.map} +0 -0
  337. /package/dist/ui-library/{p-13b43e04.entry.js.map → p-7d00de3a.entry.js.map} +0 -0
  338. /package/dist/ui-library/{p-cdaed936.entry.js.map → p-7e9257f3.entry.js.map} +0 -0
  339. /package/dist/ui-library/{p-7e3ad38a.entry.js.map → p-93a9b693.entry.js.map} +0 -0
  340. /package/dist/ui-library/{p-5af44076.entry.js.map → p-94bd8347.entry.js.map} +0 -0
  341. /package/dist/ui-library/{p-ee950ce2.entry.js.map → p-9bec3e14.entry.js.map} +0 -0
  342. /package/dist/ui-library/{p-9b354f5d.entry.js.map → p-a15928c4.entry.js.map} +0 -0
  343. /package/dist/ui-library/{p-cba69e9d.entry.js.map → p-a4348ad4.entry.js.map} +0 -0
  344. /package/dist/ui-library/{p-7afafb9d.entry.js.map → p-acd3ecfd.entry.js.map} +0 -0
  345. /package/dist/ui-library/{p-f1dc3a88.entry.js.map → p-ae383f66.entry.js.map} +0 -0
  346. /package/dist/ui-library/{p-3f1a5ecb.entry.js.map → p-b3a14438.entry.js.map} +0 -0
  347. /package/dist/ui-library/{p-dfed33c5.entry.js.map → p-b42fd9c3.entry.js.map} +0 -0
  348. /package/dist/ui-library/{p-c03ebf7d.entry.js.map → p-b906a605.entry.js.map} +0 -0
  349. /package/dist/ui-library/{p-ac099e6b.entry.js.map → p-b97764a1.entry.js.map} +0 -0
  350. /package/dist/ui-library/{p-b351f889.entry.js.map → p-c75694df.entry.js.map} +0 -0
  351. /package/dist/ui-library/{p-b6f47c9d.entry.js.map → p-cb32f8d2.entry.js.map} +0 -0
  352. /package/dist/ui-library/{p-a0f290d0.entry.js.map → p-cd3281fb.entry.js.map} +0 -0
  353. /package/dist/ui-library/{p-d1bda563.entry.js.map → p-cec8c149.entry.js.map} +0 -0
  354. /package/dist/ui-library/{p-724875b0.entry.js.map → p-d1ba2ad5.entry.js.map} +0 -0
  355. /package/dist/ui-library/{p-346f9557.entry.js.map → p-d2196113.entry.js.map} +0 -0
  356. /package/dist/ui-library/{p-a55c7258.entry.js.map → p-df1c4a1f.entry.js.map} +0 -0
  357. /package/dist/ui-library/{p-95fbdd0b.entry.js.map → p-e740215a.entry.js.map} +0 -0
  358. /package/dist/ui-library/{p-e5020f0d.js.map → p-f3fdc121.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"six-button.js","sourceRoot":"","sources":["../../../src/components/six-button/six-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChG,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;;;;;;;;;;;;;GAeG;AAOH,MAAM,OAAO,SAAS;;IA2EZ,qBAAgB,GAAG,GAAG,EAAE;MAC9B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;MACnC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;MAC9C,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAChD,CAAC,CAAC;IAEM,eAAU,GAAG,GAAG,EAAE;MACxB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;MACtB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACtB,CAAC,CAAC;IAEM,gBAAW,GAAG,GAAG,EAAE;MACzB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;MACrB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC,CAAC;IAEM,gBAAW,GAAG,CAAC,KAAiB,EAAE,EAAE;MAC1C,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,EAAE;QACjC,KAAK,CAAC,cAAc,EAAE,CAAC;QACv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AAM,EACX,MAAM,EAAC,cAAc,kBACR,GAAG,oBACD,OAAO,qBACN,OAAO;YAEvB,gBAAU,MAAM,EAAC,gBAAgB,GAAG,CAChC,CACD,CACR;QAEA,IAAI,CAAC,OAAO,IAAI,sBAAe,CACzB,CACL,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { submitForm } from '../../utils/form';\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 button's label.\n * @slot prefix - Used to prepend an icon or similar element to the button.\n * @slot suffix - Used to append an icon or similar element to the button.\n *\n * @part base - The component's base wrapper.\n * @part prefix - The prefix container.\n * @part label - The button's label.\n * @part suffix - The suffix container.\n * @part caret - The button's caret.\n */\n\n@Component({\n tag: 'six-button',\n styleUrl: 'six-button.scss',\n shadow: true,\n})\nexport class SixButton {\n private nativeButton?: HTMLButtonElement | HTMLAnchorElement;\n\n @Element() host!: HTMLSixButtonElement;\n\n @State() hasFocus = false;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasSuffix = false;\n\n /** The button's type. */\n @Prop({ reflect: true }) type: 'secondary' | 'primary' | 'link' | 'success' | 'warning' | 'danger' | 'action' =\n 'primary';\n\n /** The button's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to draw the button with a caret for use with dropdowns, popovers, etc. */\n @Prop() caret = false;\n\n /** Set to true to disable the button. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true to draw the button in a loading state. */\n @Prop({ reflect: true }) loading = false;\n\n /** Set to true to draw a pill-style button with rounded edges. */\n @Prop({ reflect: true }) pill = false;\n\n /** Set to true to draw a circle button. */\n @Prop({ reflect: true }) circle = false;\n\n /** Indicates if activating the button should submit the form. Ignored when `href` is set. */\n @Prop({ reflect: true }) submit = false;\n\n /** Indicates if activating the button should reset the form. */\n @Prop({ reflect: true }) reset = false;\n\n /** An optional name for the button. Ignored when `href` is set. */\n @Prop() name = '';\n\n /** An optional value for the button. Ignored when `href` is set. */\n @Prop() value = '';\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */\n @Prop() href?: string;\n\n /** Tells the browser where to open the link. Only used when `href` is set. */\n @Prop() target?: '_blank' | '_parent' | '_self' | '_top';\n\n /** Tells the browser to download the linked file as this filename. Only used when `href` is set. */\n @Prop() download?: string;\n\n /** Emitted when the button loses focus. */\n @Event({ eventName: 'six-button-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the button gains focus. */\n @Event({ eventName: 'six-button-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n /** Sets focus on the button. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeButton?.focus(options);\n }\n\n /** Removes focus from the button. */\n @Method()\n async removeFocus() {\n this.nativeButton?.blur();\n }\n\n private handleSlotChange = () => {\n this.hasLabel = hasSlot(this.host);\n this.hasPrefix = hasSlot(this.host, 'prefix');\n this.hasSuffix = hasSlot(this.host, 'suffix');\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit();\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleClick = (event: MouseEvent) => {\n if (this.disabled || this.loading) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n if (this.submit) {\n event.preventDefault();\n submitForm(this.host);\n }\n };\n\n render() {\n const isLink = this.href != null;\n const isButton = !isLink;\n const Button = isLink ? 'a' : 'button';\n\n return (\n <div class={{ 'button-wrapper--disabled': this.disabled }}>\n <Button\n ref={(el) => (this.nativeButton = el)}\n part=\"base\"\n class={{\n button: true,\n\n // Types\n 'button--secondary': this.type === 'secondary',\n 'button--primary': this.type === 'primary',\n 'button--link': this.type === 'link',\n 'button--success': this.type === 'success',\n 'button--warning': this.type === 'warning',\n 'button--danger': this.type === 'danger',\n 'button--action': this.type === 'action',\n\n // Sizes\n 'button--small': this.size === 'small',\n 'button--medium': this.size === 'medium',\n 'button--large': this.size === 'large',\n\n // Modifiers\n 'button--caret': this.caret,\n 'button--circle': this.circle,\n 'button--disabled': this.disabled,\n 'button--focused': this.hasFocus,\n 'button--loading': this.loading,\n 'button--pill': this.pill,\n 'button--has-label': this.hasLabel,\n 'button--has-prefix': this.hasPrefix,\n 'button--has-suffix': this.hasSuffix,\n }}\n disabled={isButton ? this.disabled : undefined}\n tabindex={this.disabled ? '-1' : undefined}\n type={isButton ? (this.submit ? 'submit' : this.reset ? 'reset' : 'button') : undefined}\n name={isButton ? this.name : undefined}\n value={isButton ? this.value : undefined}\n href={isLink ? this.href : undefined}\n target={isLink && this.target != null ? this.target : undefined}\n download={isLink && this.download != null ? this.download : undefined}\n rel={isLink && this.target != null ? 'noreferrer noopener' : undefined}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onClick={this.handleClick}\n data-testid=\"button\"\n >\n <span part=\"prefix\" class=\"button__prefix\">\n <slot onSlotchange={this.handleSlotChange} name=\"prefix\" />\n </span>\n <span part=\"label\" class=\"button__label\">\n <slot onSlotchange={this.handleSlotChange} />\n </span>\n <span part=\"suffix\" class=\"button__suffix\">\n <slot onSlotchange={this.handleSlotChange} name=\"suffix\" />\n </span>\n {this.caret && (\n <span part=\"caret\" class=\"button__caret\">\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n )}\n\n {this.loading && <six-spinner />}\n </Button>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"six-button.js","sourceRoot":"","sources":["../../../src/components/six-button/six-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChG,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;;;;;;;;;;;;;GAeG;AAOH,MAAM,OAAO,SAAS;;IA2EZ,qBAAgB,GAAG,GAAG,EAAE;MAC9B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;MACnC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;MAC9C,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAChD,CAAC,CAAC;IAEM,eAAU,GAAG,GAAG,EAAE;MACxB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;MACtB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACtB,CAAC,CAAC;IAEM,gBAAW,GAAG,GAAG,EAAE;MACzB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;MACrB,IAAI,CAAC,QAAQ,CAAC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I,CAAC,gBAAgB,EAAE,IAAI,EAAC,QAAQ,GAAG,CACtD;QACN,IAAI,CAAC,KAAK,IAAI,CACb,YAAM,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,eAAe;UACtC,WACE,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,kBACR,GAAG,oBACD,OAAO,qBACN,OAAO;YAEvB,gBAAU,MAAM,EAAC,gBAAgB,GAAG,CAChC,CACD,CACR;QAEA,IAAI,CAAC,OAAO,IAAI,sBAAe,CACzB,CACL,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { submitForm } from '../../utils/form';\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 button's label.\n * @slot prefix - Used to prepend an icon or similar element to the button.\n * @slot suffix - Used to append an icon or similar element to the button.\n *\n * @part base - The component's base wrapper.\n * @part prefix - The prefix container.\n * @part label - The button's label.\n * @part suffix - The suffix container.\n * @part caret - The button's caret.\n */\n\n@Component({\n tag: 'six-button',\n styleUrl: 'six-button.scss',\n shadow: true,\n})\nexport class SixButton {\n private nativeButton?: HTMLButtonElement | HTMLAnchorElement;\n\n @Element() host!: HTMLSixButtonElement;\n\n @State() hasFocus = false;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasSuffix = false;\n\n /** The button's type. */\n @Prop({ reflect: true }) type: 'secondary' | 'primary' | 'link' | 'success' | 'warning' | 'danger' | 'action' =\n 'primary';\n\n /** The button's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to draw the button with a caret for use with dropdowns, popovers, etc. */\n @Prop() caret = false;\n\n /** Set to true to disable the button. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true to draw the button in a loading state. */\n @Prop({ reflect: true }) loading = false;\n\n /** Set to true to draw a pill-style button with rounded edges. */\n @Prop({ reflect: true }) pill = false;\n\n /** Set to true to draw a circle button. */\n @Prop({ reflect: true }) circle = false;\n\n /** Indicates if activating the button should submit the form. Ignored when `href` is set. */\n @Prop({ reflect: true }) submit = false;\n\n /** Indicates if activating the button should reset the form. */\n @Prop({ reflect: true }) reset = false;\n\n /** An optional name for the button. Ignored when `href` is set. */\n @Prop() name = '';\n\n /** An optional value for the button. Ignored when `href` is set. */\n @Prop() value = '';\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */\n @Prop() href?: string;\n\n /** Tells the browser where to open the link. Only used when `href` is set. */\n @Prop() target?: '_blank' | '_parent' | '_self' | '_top';\n\n /** Tells the browser to download the linked file as this filename. Only used when `href` is set. */\n @Prop() download?: string;\n\n /** Emitted when the button loses focus. */\n @Event({ eventName: 'six-button-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the button gains focus. */\n @Event({ eventName: 'six-button-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n /** Sets focus on the button. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeButton?.focus(options);\n }\n\n /** Removes focus from the button. */\n @Method()\n async removeFocus() {\n this.nativeButton?.blur();\n }\n\n private handleSlotChange = () => {\n this.hasLabel = hasSlot(this.host);\n this.hasPrefix = hasSlot(this.host, 'prefix');\n this.hasSuffix = hasSlot(this.host, 'suffix');\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit();\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleClick = (event: MouseEvent) => {\n if (this.disabled || this.loading) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n if (this.submit) {\n event.preventDefault();\n submitForm(this.host);\n }\n };\n\n render() {\n const isLink = this.href != null;\n const isButton = !isLink;\n const Button = isLink ? 'a' : 'button';\n\n return (\n <div onClick={this.handleClick} class={{ 'button-wrapper--disabled': this.disabled }}>\n <Button\n ref={(el) => (this.nativeButton = el)}\n part=\"base\"\n class={{\n button: true,\n\n // Types\n 'button--secondary': this.type === 'secondary',\n 'button--primary': this.type === 'primary',\n 'button--link': this.type === 'link',\n 'button--success': this.type === 'success',\n 'button--warning': this.type === 'warning',\n 'button--danger': this.type === 'danger',\n 'button--action': this.type === 'action',\n\n // Sizes\n 'button--small': this.size === 'small',\n 'button--medium': this.size === 'medium',\n 'button--large': this.size === 'large',\n\n // Modifiers\n 'button--caret': this.caret,\n 'button--circle': this.circle,\n 'button--disabled': this.disabled,\n 'button--focused': this.hasFocus,\n 'button--loading': this.loading,\n 'button--pill': this.pill,\n 'button--has-label': this.hasLabel,\n 'button--has-prefix': this.hasPrefix,\n 'button--has-suffix': this.hasSuffix,\n }}\n disabled={isButton ? this.disabled : undefined}\n tabindex={this.disabled ? '-1' : undefined}\n type={isButton ? (this.submit ? 'submit' : this.reset ? 'reset' : 'button') : undefined}\n name={isButton ? this.name : undefined}\n value={isButton ? this.value : undefined}\n href={isLink ? this.href : undefined}\n target={isLink && this.target != null ? this.target : undefined}\n download={isLink && this.download != null ? this.download : undefined}\n rel={isLink && this.target != null ? 'noreferrer noopener' : undefined}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n data-testid=\"button\"\n >\n <span part=\"prefix\" class=\"button__prefix\">\n <slot onSlotchange={this.handleSlotChange} name=\"prefix\" />\n </span>\n <span part=\"label\" class=\"button__label\">\n <slot onSlotchange={this.handleSlotChange} />\n </span>\n <span part=\"suffix\" class=\"button__suffix\">\n <slot onSlotchange={this.handleSlotChange} name=\"suffix\" />\n </span>\n {this.caret && (\n <span part=\"caret\" class=\"button__caret\">\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n )}\n\n {this.loading && <six-spinner />}\n </Button>\n </div>\n );\n }\n}\n"]}
@@ -26,6 +26,9 @@
26
26
  .form-control--has-label .form-control__label__required::after {
27
27
  color: var(--six-color-danger-800);
28
28
  content: "*";
29
+ transform: scale(1.1);
30
+ margin-left: var(--six-spacing-xxx-small);
31
+ position: absolute;
29
32
  }
30
33
  .form-control--has-label.form-control--small .form-control__label {
31
34
  font-size: var(--six-input-label-font-size-small);
@@ -161,7 +161,7 @@ export class SixDrawer {
161
161
  'drawer--contained': this.contained,
162
162
  'drawer--fixed': !this.contained,
163
163
  'drawer--has-footer': this.hasFooter,
164
- }, onKeyDown: this.handleKeyDown, onTransitionEnd: this.handleTransitionEnd }, h("div", { part: "overlay", class: "drawer__overlay", onClick: this.handleOverlayClick, tabIndex: -1 }), h("div", { ref: (el) => (this.panel = el), part: "panel", class: "drawer__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 && (h("header", { part: "header", class: "drawer__header" }, h("span", { part: "title", class: "drawer__title", id: `${this.componentId}-title` }, h("slot", { name: "label" }, this.label || String.fromCharCode(65279))), h("six-icon-button", { exportparts: "base:close-button", class: "drawer__close", name: "x", onClick: this.handleCloseClick }))), h("div", { part: "body", class: "drawer__body" }, h("slot", null)), h("footer", { part: "footer", class: "drawer__footer" }, h("slot", { name: "footer", onSlotchange: this.handleSlotChange })))));
164
+ }, onKeyDown: this.handleKeyDown, onTransitionEnd: this.handleTransitionEnd }, h("div", { part: "overlay", class: "drawer__overlay", onClick: this.handleOverlayClick, tabIndex: -1 }), h("div", { ref: (el) => (this.panel = el), part: "panel", class: "drawer__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 && (h("header", { part: "header", class: "drawer__header" }, h("span", { part: "title", class: "drawer__title", id: `${this.componentId}-title` }, h("slot", { name: "label" }, this.label || String.fromCharCode(65279))), h("six-icon-button", { exportparts: "base:close-button", class: "drawer__close", name: "close", onClick: this.handleCloseClick }))), h("div", { part: "body", class: "drawer__body" }, h("slot", null)), h("footer", { part: "footer", class: "drawer__footer" }, h("slot", { name: "footer", onSlotchange: this.handleSlotChange })))));
165
165
  }
166
166
  static get is() { return "six-drawer"; }
167
167
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"six-drawer.js","sourceRoot":"","sources":["../../../src/components/six-drawer/six-drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,MAAM,mBAAmB,CAAC;AAGt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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } 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();\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 drawer's content.\n * @slot label - The drawer's label. Alternatively, you can use the label prop.\n * @slot footer - The drawer'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 drawer panel (where the drawer and its content is rendered).\n * @part header - The drawer header.\n * @part title - The drawer title.\n * @part close-button - The close button.\n * @part body - The drawer body.\n * @part footer - The drawer footer.\n */\n\n@Component({\n tag: 'six-drawer',\n styleUrl: 'six-drawer.scss',\n shadow: true,\n})\nexport class SixDrawer {\n private componentId = `drawer-${++id}`;\n private drawer?: HTMLElement;\n private modal?: Modal;\n private panel?: HTMLElement;\n private willShow = false;\n private willHide = false;\n\n @Element() host!: HTMLSixDrawerElement;\n\n @State() hasFooter = false;\n @State() isVisible = false;\n\n /** Indicates whether the drawer 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 drawer'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 /** The direction from which the drawer will open. */\n @Prop() placement: 'top' | 'right' | 'bottom' | 'left' = 'right';\n\n /**\n * By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of\n * its parent element, set this prop and add `position: relative` to the parent.\n */\n @Prop() contained = false;\n\n /**\n * Removes the header. This will also remove the default close button, so please ensure you provide an easy,\n * accessible way for users to dismiss the drawer.\n */\n @Prop() noHeader = false;\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n }\n\n /** Emitted when the drawer opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-drawer-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the drawer opens and all transitions are complete. */\n @Event({ eventName: 'six-drawer-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the drawer closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-drawer-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the drawer closes and all transitions are complete. */\n @Event({ eventName: 'six-drawer-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n /**\n * Emitted when the drawer 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 drawer, such as an input or button.\n */\n @Event({ eventName: 'six-drawer-initial-focus' }) sixInitialFocus!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the overlay is clicked. Calling `event.preventDefault()` will prevent the drawer from closing. */\n @Event({ eventName: 'six-drawer-overlay-dismiss' }) sixOverlayDismiss!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.modal = new Modal(this.host, {\n onFocusOut: () => (this.contained ? null : 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 // if the sidebar is open by default we need to manually reset the\n // transition variables since there will be no transition event\n this.resetTransitionVariables();\n }\n }\n\n disconnectedCallback() {\n unlockBodyScrolling(this.host);\n }\n\n /** Shows the drawer */\n @Method()\n async show() {\n if (this.willShow || this.modal == null || this.panel == null || this.drawer == null) {\n return;\n }\n const panel = this.panel;\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\n // Lock body scrolling only if the drawer isn't contained\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this.host);\n }\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 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.drawer.addEventListener(\n 'transitionend',\n () => {\n const sixInitialFocus = this.sixInitialFocus.emit();\n if (!sixInitialFocus.defaultPrevented) {\n panel.focus();\n }\n },\n { once: true }\n );\n }\n }\n }\n\n /** Hides the drawer */\n @Method()\n async hide() {\n if (this.willHide || this.modal == null) {\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 private handleCloseClick = () => {\n this.hide();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n this.hide();\n }\n };\n\n private handleOverlayClick = () => {\n const sixOverlayDismiss = this.sixOverlayDismiss.emit();\n\n if (!sixOverlayDismiss.defaultPrevented) {\n this.hide();\n }\n };\n\n private handleSlotChange = () => {\n this.hasFooter = hasSlot(this.host, 'footer');\n };\n\n private 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 === 'transform' && target.classList.contains('drawer__panel')) {\n this.resetTransitionVariables();\n }\n };\n\n private resetTransitionVariables() {\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 render() {\n return (\n <div\n ref={(el) => (this.drawer = el)}\n part=\"base\"\n class={{\n drawer: true,\n 'drawer--open': this.open,\n 'drawer--visible': this.isVisible,\n 'drawer--top': this.placement === 'top',\n 'drawer--right': this.placement === 'right',\n 'drawer--bottom': this.placement === 'bottom',\n 'drawer--left': this.placement === 'left',\n 'drawer--contained': this.contained,\n 'drawer--fixed': !this.contained,\n 'drawer--has-footer': this.hasFooter,\n }}\n onKeyDown={this.handleKeyDown}\n onTransitionEnd={this.handleTransitionEnd}\n >\n <div part=\"overlay\" class=\"drawer__overlay\" onClick={this.handleOverlayClick} tabIndex={-1} />\n\n <div\n ref={(el) => (this.panel = el)}\n part=\"panel\"\n class=\"drawer__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=\"drawer__header\">\n <span part=\"title\" class=\"drawer__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=\"drawer__close\"\n name=\"x\"\n onClick={this.handleCloseClick}\n />\n </header>\n )}\n\n <div part=\"body\" class=\"drawer__body\">\n <slot />\n </div>\n\n <footer part=\"footer\" class=\"drawer__footer\">\n <slot name=\"footer\" onSlotchange={this.handleSlotChange} />\n </footer>\n </div>\n </div>\n );\n }\n}\n"]}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,CACpC,CACF;UACP,uBACE,WAAW,EAAC,mBAAmB,EAC/B,KAAK,EAAC,eAAe,EACrB,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,IAAI,CAAC,gBAAgB,GAC9B,CACK,CACV;QAED,WAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,cAAc;UACnC,eAAQ,CACJ;QAEN,cAAQ,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,gBAAgB;UAC1C,YAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACpD,CACL,CACF,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } 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();\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 drawer's content.\n * @slot label - The drawer's label. Alternatively, you can use the label prop.\n * @slot footer - The drawer'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 drawer panel (where the drawer and its content is rendered).\n * @part header - The drawer header.\n * @part title - The drawer title.\n * @part close-button - The close button.\n * @part body - The drawer body.\n * @part footer - The drawer footer.\n */\n\n@Component({\n tag: 'six-drawer',\n styleUrl: 'six-drawer.scss',\n shadow: true,\n})\nexport class SixDrawer {\n private componentId = `drawer-${++id}`;\n private drawer?: HTMLElement;\n private modal?: Modal;\n private panel?: HTMLElement;\n private willShow = false;\n private willHide = false;\n\n @Element() host!: HTMLSixDrawerElement;\n\n @State() hasFooter = false;\n @State() isVisible = false;\n\n /** Indicates whether the drawer 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 drawer'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 /** The direction from which the drawer will open. */\n @Prop() placement: 'top' | 'right' | 'bottom' | 'left' = 'right';\n\n /**\n * By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of\n * its parent element, set this prop and add `position: relative` to the parent.\n */\n @Prop() contained = false;\n\n /**\n * Removes the header. This will also remove the default close button, so please ensure you provide an easy,\n * accessible way for users to dismiss the drawer.\n */\n @Prop() noHeader = false;\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n }\n\n /** Emitted when the drawer opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-drawer-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the drawer opens and all transitions are complete. */\n @Event({ eventName: 'six-drawer-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the drawer closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-drawer-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the drawer closes and all transitions are complete. */\n @Event({ eventName: 'six-drawer-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n /**\n * Emitted when the drawer 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 drawer, such as an input or button.\n */\n @Event({ eventName: 'six-drawer-initial-focus' }) sixInitialFocus!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the overlay is clicked. Calling `event.preventDefault()` will prevent the drawer from closing. */\n @Event({ eventName: 'six-drawer-overlay-dismiss' }) sixOverlayDismiss!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.modal = new Modal(this.host, {\n onFocusOut: () => (this.contained ? null : 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 // if the sidebar is open by default we need to manually reset the\n // transition variables since there will be no transition event\n this.resetTransitionVariables();\n }\n }\n\n disconnectedCallback() {\n unlockBodyScrolling(this.host);\n }\n\n /** Shows the drawer */\n @Method()\n async show() {\n if (this.willShow || this.modal == null || this.panel == null || this.drawer == null) {\n return;\n }\n const panel = this.panel;\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\n // Lock body scrolling only if the drawer isn't contained\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this.host);\n }\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 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.drawer.addEventListener(\n 'transitionend',\n () => {\n const sixInitialFocus = this.sixInitialFocus.emit();\n if (!sixInitialFocus.defaultPrevented) {\n panel.focus();\n }\n },\n { once: true }\n );\n }\n }\n }\n\n /** Hides the drawer */\n @Method()\n async hide() {\n if (this.willHide || this.modal == null) {\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 private handleCloseClick = () => {\n this.hide();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n this.hide();\n }\n };\n\n private handleOverlayClick = () => {\n const sixOverlayDismiss = this.sixOverlayDismiss.emit();\n\n if (!sixOverlayDismiss.defaultPrevented) {\n this.hide();\n }\n };\n\n private handleSlotChange = () => {\n this.hasFooter = hasSlot(this.host, 'footer');\n };\n\n private 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 === 'transform' && target.classList.contains('drawer__panel')) {\n this.resetTransitionVariables();\n }\n };\n\n private resetTransitionVariables() {\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 render() {\n return (\n <div\n ref={(el) => (this.drawer = el)}\n part=\"base\"\n class={{\n drawer: true,\n 'drawer--open': this.open,\n 'drawer--visible': this.isVisible,\n 'drawer--top': this.placement === 'top',\n 'drawer--right': this.placement === 'right',\n 'drawer--bottom': this.placement === 'bottom',\n 'drawer--left': this.placement === 'left',\n 'drawer--contained': this.contained,\n 'drawer--fixed': !this.contained,\n 'drawer--has-footer': this.hasFooter,\n }}\n onKeyDown={this.handleKeyDown}\n onTransitionEnd={this.handleTransitionEnd}\n >\n <div part=\"overlay\" class=\"drawer__overlay\" onClick={this.handleOverlayClick} tabIndex={-1} />\n\n <div\n ref={(el) => (this.panel = el)}\n part=\"panel\"\n class=\"drawer__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=\"drawer__header\">\n <span part=\"title\" class=\"drawer__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=\"drawer__close\"\n name=\"close\"\n onClick={this.handleCloseClick}\n />\n </header>\n )}\n\n <div part=\"body\" class=\"drawer__body\">\n <slot />\n </div>\n\n <footer part=\"footer\" class=\"drawer__footer\">\n <slot name=\"footer\" onSlotchange={this.handleSlotChange} />\n </footer>\n </div>\n </div>\n );\n }\n}\n"]}
@@ -16,7 +16,7 @@ describe('six-drawer', () => {
16
16
  <span class="drawer__title" id="drawer-1-title" part="title">
17
17
  <slot name="label"></slot>
18
18
  </span>
19
- <six-icon-button class="drawer__close" exportparts="base:close-button" name="x"></six-icon-button>
19
+ <six-icon-button class="drawer__close" exportparts="base:close-button" name="close"></six-icon-button>
20
20
  </header>
21
21
  <div class="drawer__body" part="body">
22
22
  <slot></slot>
@@ -1 +1 @@
1
- {"version":3,"file":"six-drawer.spec.js","sourceRoot":"","sources":["../../../../src/components/six-drawer/test/six-drawer.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;EAC1B,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,SAAS,CAAC;MACvB,IAAI,EAAE,2BAA2B;KAClC,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;KAsB7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { SixDrawer } from '../six-drawer';\n\ndescribe('six-drawer', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [SixDrawer],\n html: `<six-drawer></six-drawer>`,\n });\n expect(page.root).toEqualHtml(`\n <six-drawer>\n <mock:shadow-root>\n <div class=\"drawer drawer--fixed drawer--right\" part=\"base\">\n <div class=\"drawer__overlay\" part=\"overlay\" tabindex=\"-1\"></div>\n <div aria-hidden=\"true\" aria-labelledby=\"drawer-1-title\" aria-modal=\"true\" class=\"drawer__panel\" part=\"panel\" role=\"dialog\" tabindex=\"0\">\n <header class=\"drawer__header\" part=\"header\">\n <span class=\"drawer__title\" id=\"drawer-1-title\" part=\"title\">\n <slot name=\"label\"></slot>\n </span>\n <six-icon-button class=\"drawer__close\" exportparts=\"base:close-button\" name=\"x\"></six-icon-button>\n </header>\n <div class=\"drawer__body\" part=\"body\">\n <slot></slot>\n </div>\n <footer class=\"drawer__footer\" part=\"footer\">\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n </div>\n </mock:shadow-root>\n </six-drawer>\n `);\n });\n});\n"]}
1
+ {"version":3,"file":"six-drawer.spec.js","sourceRoot":"","sources":["../../../../src/components/six-drawer/test/six-drawer.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;EAC1B,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,SAAS,CAAC;MACvB,IAAI,EAAE,2BAA2B;KAClC,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;KAsB7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { SixDrawer } from '../six-drawer';\n\ndescribe('six-drawer', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [SixDrawer],\n html: `<six-drawer></six-drawer>`,\n });\n expect(page.root).toEqualHtml(`\n <six-drawer>\n <mock:shadow-root>\n <div class=\"drawer drawer--fixed drawer--right\" part=\"base\">\n <div class=\"drawer__overlay\" part=\"overlay\" tabindex=\"-1\"></div>\n <div aria-hidden=\"true\" aria-labelledby=\"drawer-1-title\" aria-modal=\"true\" class=\"drawer__panel\" part=\"panel\" role=\"dialog\" tabindex=\"0\">\n <header class=\"drawer__header\" part=\"header\">\n <span class=\"drawer__title\" id=\"drawer-1-title\" part=\"title\">\n <slot name=\"label\"></slot>\n </span>\n <six-icon-button class=\"drawer__close\" exportparts=\"base:close-button\" name=\"close\"></six-icon-button>\n </header>\n <div class=\"drawer__body\" part=\"body\">\n <slot></slot>\n </div>\n <footer class=\"drawer__footer\" part=\"footer\">\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n </div>\n </mock:shadow-root>\n </six-drawer>\n `);\n });\n});\n"]}
@@ -26,6 +26,9 @@
26
26
  .form-control--has-label .form-control__label__required::after {
27
27
  color: var(--six-color-danger-800);
28
28
  content: "*";
29
+ transform: scale(1.1);
30
+ margin-left: var(--six-spacing-xxx-small);
31
+ position: absolute;
29
32
  }
30
33
  .form-control--has-label.form-control--small .form-control__label {
31
34
  font-size: var(--six-input-label-font-size-small);
@@ -26,6 +26,9 @@
26
26
  .form-control--has-label .form-control__label__required::after {
27
27
  color: var(--six-color-danger-800);
28
28
  content: "*";
29
+ transform: scale(1.1);
30
+ margin-left: var(--six-spacing-xxx-small);
31
+ position: absolute;
29
32
  }
30
33
  .form-control--has-label.form-control--small .form-control__label {
31
34
  font-size: var(--six-input-label-font-size-small);
@@ -26,6 +26,9 @@
26
26
  .form-control--has-label .form-control__label__required::after {
27
27
  color: var(--six-color-danger-800);
28
28
  content: "*";
29
+ transform: scale(1.1);
30
+ margin-left: var(--six-spacing-xxx-small);
31
+ position: absolute;
29
32
  }
30
33
  .form-control--has-label.form-control--small .form-control__label {
31
34
  font-size: var(--six-input-label-font-size-small);
@@ -26,6 +26,9 @@
26
26
  .form-control--has-label .form-control__label__required::after {
27
27
  color: var(--six-color-danger-800);
28
28
  content: "*";
29
+ transform: scale(1.1);
30
+ margin-left: var(--six-spacing-xxx-small);
31
+ position: absolute;
29
32
  }
30
33
  .form-control--has-label.form-control--small .form-control__label {
31
34
  font-size: var(--six-input-label-font-size-small);
@@ -2,11 +2,16 @@
2
2
  display: block;
3
3
  }
4
4
 
5
+ a {
6
+ text-decoration: none;
7
+ display: block;
8
+ }
9
+
5
10
  .sidebar-item {
11
+ padding: 8px 8px 16px 16px;
6
12
  font-size: 0.9rem;
7
13
  color: var(--six-sidebar-color);
8
14
  cursor: pointer;
9
- padding: 8px 8px 16px 16px;
10
15
  font-family: var(--six-font-family);
11
16
  }
12
17
  .sidebar-item:hover:not(.sidebar-item--disabled) {
@@ -10,13 +10,15 @@ export class SixSidebarItem {
10
10
  this.value = '';
11
11
  this.selected = false;
12
12
  this.disabled = false;
13
+ this.href = undefined;
13
14
  }
14
15
  render() {
15
- return (h("div", { class: {
16
+ const Tag = this.href != null ? 'a' : 'div';
17
+ return (h(Tag, { class: {
16
18
  'sidebar-item': true,
17
19
  'sidebar-item--selected': this.selected,
18
20
  'sidebar-item--disabled': this.disabled,
19
- }, role: "menuitem", "aria-selected": this.selected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false' }, h("slot", null)));
21
+ }, role: "menuitem", href: this.href, "aria-selected": this.selected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false' }, h("slot", null)));
20
22
  }
21
23
  static get is() { return "six-sidebar-item"; }
22
24
  static get encapsulation() { return "shadow"; }
@@ -85,6 +87,23 @@ export class SixSidebarItem {
85
87
  "attribute": "disabled",
86
88
  "reflect": true,
87
89
  "defaultValue": "false"
90
+ },
91
+ "href": {
92
+ "type": "string",
93
+ "mutable": false,
94
+ "complexType": {
95
+ "original": "string | undefined",
96
+ "resolved": "string | undefined",
97
+ "references": {}
98
+ },
99
+ "required": false,
100
+ "optional": false,
101
+ "docs": {
102
+ "tags": [],
103
+ "text": "Provide if the item should be rendered as anchor tag.\nNote, that the href is added automatically when using routerLink in Angular."
104
+ },
105
+ "attribute": "href",
106
+ "reflect": true
88
107
  }
89
108
  };
90
109
  }
@@ -1 +1 @@
1
- {"version":3,"file":"six-sidebar-item.js","sourceRoot":"","sources":["../../../src/components/six-sidebar-item/six-sidebar-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;GAKG;AAOH,MAAM,OAAO,cAAc;;iBAEQ,EAAE;oBAGC,KAAK;oBAGL,KAAK;;EAEzC,MAAM;IACJ,OAAO,CACL,WACE,KAAK,EAAE;QACL,cAAc,EAAE,IAAI;QACpB,wBAAwB,EAAE,IAAI,CAAC,QAAQ;QACvC,wBAAwB,EAAE,IAAI,CAAC,QAAQ;OACxC,EACD,IAAI,EAAC,UAAU,mBACA,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,mBAChC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;MAE/C,eAAa,CACT,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
1
+ {"version":3,"file":"six-sidebar-item.js","sourceRoot":"","sources":["../../../src/components/six-sidebar-item/six-sidebar-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;GAKG;AAOH,MAAM,OAAO,cAAc;;iBAEQ,EAAE;oBAGC,KAAK;oBAGL,KAAK;;;EAQzC,MAAM;IACJ,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;IAC5C,OAAO,CACL,EAAC,GAAG,IACF,KAAK,EAAE;QACL,cAAc,EAAE,IAAI;QACpB,wBAAwB,EAAE,IAAI,CAAC,QAAQ;QACvC,wBAAwB,EAAE,IAAI,CAAC,QAAQ;OACxC,EACD,IAAI,EAAC,UAAU,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,mBACA,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,mBAChC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;MAE/C,eAAa,CACT,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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 /**\n * Provide if the item should be rendered as anchor tag.\n * Note, that the href is added automatically when using routerLink in Angular.\n */\n @Prop({ reflect: true }) href: string | undefined;\n\n render() {\n const Tag = this.href != null ? 'a' : 'div';\n return (\n <Tag\n class={{\n 'sidebar-item': true,\n 'sidebar-item--selected': this.selected,\n 'sidebar-item--disabled': this.disabled,\n }}\n role=\"menuitem\"\n href={this.href}\n aria-selected={this.selected ? 'true' : 'false'}\n aria-disabled={this.disabled ? 'true' : 'false'}\n >\n <slot></slot>\n </Tag>\n );\n }\n}\n"]}
@@ -33,4 +33,11 @@
33
33
 
34
34
  .six-sidebar-details__header-icon {
35
35
  margin-right: 1em;
36
+ }
37
+
38
+ .six-sidebar-details__link {
39
+ text-decoration: none;
40
+ display: block;
41
+ color: inherit;
42
+ width: 100%;
36
43
  }
@@ -27,6 +27,7 @@ export class SixSidebarItemGroup {
27
27
  this.open = false;
28
28
  this.summaryIcon = undefined;
29
29
  this.summaryIconHasContent = false;
30
+ this.href = undefined;
30
31
  }
31
32
  connectedCallback() {
32
33
  this.handleSlotChange = this.handleSlotChange.bind(this);
@@ -41,12 +42,21 @@ export class SixSidebarItemGroup {
41
42
  var _a;
42
43
  return ((_a = this.host.parentElement) === null || _a === void 0 ? void 0 : _a.closest('six-sidebar-item-group')) != null;
43
44
  }
45
+ renderAsHref() {
46
+ return this.href != null && !this.hasItems;
47
+ }
44
48
  render() {
45
- return (h("six-details", { class: {
49
+ const element = (h("six-details", { class: {
46
50
  'six-sidebar-item-group': true,
47
51
  'six-sidebar-item-group--childless': !this.hasItems,
48
52
  'six-sidebar-item-group--subgroup': this.isSubgroup(),
49
53
  }, inline: true, open: this.open, "summary-icon": this.summaryIcon, hasContent: this.hasItems }, h("div", { slot: "summary" }, h("div", { class: "six-sidebar-details__header" }, this.icon && h("six-icon", { class: "six-sidebar-details__header-icon" }, this.icon), this.name)), this.provideSlot('summary-icon'), h("slot", null)));
54
+ if (this.renderAsHref()) {
55
+ return (h("a", { class: "six-sidebar-details__link", href: this.href }, element));
56
+ }
57
+ else {
58
+ return element;
59
+ }
50
60
  }
51
61
  static get is() { return "six-sidebar-item-group"; }
52
62
  static get encapsulation() { return "shadow"; }
@@ -150,6 +160,23 @@ export class SixSidebarItemGroup {
150
160
  },
151
161
  "attribute": "summary-icon",
152
162
  "reflect": false
163
+ },
164
+ "href": {
165
+ "type": "string",
166
+ "mutable": false,
167
+ "complexType": {
168
+ "original": "string | undefined",
169
+ "resolved": "string | undefined",
170
+ "references": {}
171
+ },
172
+ "required": false,
173
+ "optional": false,
174
+ "docs": {
175
+ "tags": [],
176
+ "text": "Provide if the item should be rendered as anchor tag.\nNote, that the href is added automatically when using routerLink in Angular."
177
+ },
178
+ "attribute": "href",
179
+ "reflect": true
153
180
  }
154
181
  };
155
182
  }
@@ -1 +1 @@
1
- {"version":3,"file":"six-sidebar-item-group.js","sourceRoot":"","sources":["../../../src/components/six-sidebar-item-group/six-sidebar-item-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C;;;;;GAKG;AAOH,MAAM,OAAO,mBAAmB;;IAsCtB,gBAAW,GAAG,CAAC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C,IAAI,kBACD,IAAI,CAAC,WAAW,EAC9B,UAAU,EAAE,IAAI,CAAC,QAAQ;MAEzB,WAAK,IAAI,EAAC,SAAS;QACjB,WAAK,KAAK,EAAC,6BAA6B;UACrC,IAAI,CAAC,IAAI,IAAI,gBAAU,KAAK,EAAC,kCAAkC,IAAE,IAAI,CAAC,IAAI,CAAY;UACtF,IAAI,CAAC,IAAI,CACN,CACF;MACL,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC;MACjC,eAAQ,CACI,CACf,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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 sidebar [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 /** Indicates whether the sidebar is shown */\n @Prop({ reflect: true }) open = false;\n\n /** Custom summary icon name. */\n @Prop() summaryIcon?: string;\n\n @State() summaryIconHasContent = false;\n\n connectedCallback() {\n this.handleSlotChange = this.handleSlotChange.bind(this);\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n private handleSlotChange() {\n this.hasItems = hasSlot(this.host);\n }\n\n private isSubgroup() {\n return this.host.parentElement?.closest('six-sidebar-item-group') != null;\n }\n\n private 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 const slot = this.host.shadowRoot?.querySelector<HTMLSlotElement>(`slot[name=\"${name}\"]`);\n if (slot != null) {\n this.summaryIconHasContent = slot.assignedNodes().length > 0;\n }\n }}\n ></slot>\n );\n };\n\n render() {\n return (\n <six-details\n class={{\n 'six-sidebar-item-group': true,\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"]}
1
+ {"version":3,"file":"six-sidebar-item-group.js","sourceRoot":"","sources":["../../../src/components/six-sidebar-item-group/six-sidebar-item-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C;;;;;GAKG;AAOH,MAAM,OAAO,mBAAmB;;IAgDtB,gBAAW,GAAG,CAAC,IAAY,EAAE,EAAE;MACrC,IAAI,IAAI,CAAC,qBAAqB,EAAE;QAC9B,OAAO,CACL,WAAK,IAAI,EAAE,IAAI;UACb,YAAM,IAAI,EAAE,IAAI,GAAS,CACrB,CACP,CAAC;OACH;MAED,OAAO,CACL,YACE,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,GAAG,EAAE;;UACjB,MAAM,IAAI,GAAG,MAAA,IAAI,CAAC,IAAI,CAAC,UAAU,0CAAE,aAAa,CAAkB,cAAc,IAAI,IAAI,CAAC,CAAC;UAC1F,IAAI,IAAI,IAAI,IAAI,EAAE;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;MACL,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC;MACjC,eAAQ,CACI,CACf,CAAC;IAEF,IAAI,IAAI,CAAC,YAAY,EAAE,EAAE;MACvB,OAAO,CACL,SAAG,KAAK,EAAC,2BAA2B,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,IACjD,OAAO,CACN,CACL,CAAC;KACH;SAAM;MACL,OAAO,OAAO,CAAC;KAChB;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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 sidebar [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 /** Indicates whether the sidebar is shown */\n @Prop({ reflect: true }) open = false;\n\n /** Custom summary icon name. */\n @Prop() summaryIcon?: string;\n\n @State() summaryIconHasContent = false;\n\n /**\n * Provide if the item should be rendered as anchor tag.\n * Note, that the href is added automatically when using routerLink in Angular.\n */\n @Prop({ reflect: true }) href: string | undefined;\n\n connectedCallback() {\n this.handleSlotChange = this.handleSlotChange.bind(this);\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n private handleSlotChange() {\n this.hasItems = hasSlot(this.host);\n }\n\n private isSubgroup() {\n return this.host.parentElement?.closest('six-sidebar-item-group') != null;\n }\n\n private renderAsHref(): boolean {\n return this.href != null && !this.hasItems;\n }\n\n private 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 const slot = this.host.shadowRoot?.querySelector<HTMLSlotElement>(`slot[name=\"${name}\"]`);\n if (slot != null) {\n this.summaryIconHasContent = slot.assignedNodes().length > 0;\n }\n }}\n ></slot>\n );\n };\n\n render() {\n const element = (\n <six-details\n class={{\n 'six-sidebar-item-group': true,\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 if (this.renderAsHref()) {\n return (\n <a class=\"six-sidebar-details__link\" href={this.href}>\n {element}\n </a>\n );\n } else {\n return element;\n }\n }\n}\n"]}
@@ -26,6 +26,9 @@
26
26
  .form-control--has-label .form-control__label__required::after {
27
27
  color: var(--six-color-danger-800);
28
28
  content: "*";
29
+ transform: scale(1.1);
30
+ margin-left: var(--six-spacing-xxx-small);
31
+ position: absolute;
29
32
  }
30
33
  .form-control--has-label.form-control--small .form-control__label {
31
34
  font-size: var(--six-input-label-font-size-small);
@@ -26,6 +26,9 @@
26
26
  .form-control--has-label .form-control__label__required::after {
27
27
  color: var(--six-color-danger-800);
28
28
  content: "*";
29
+ transform: scale(1.1);
30
+ margin-left: var(--six-spacing-xxx-small);
31
+ position: absolute;
29
32
  }
30
33
  .form-control--has-label.form-control--small .form-control__label {
31
34
  font-size: var(--six-input-label-font-size-small);
@@ -1,3 +1,4 @@
1
+ export const languages = ['de', 'fr', 'it', 'en', 'es'];
1
2
  const dateFormat = new Intl.DateTimeFormat('de-CH');
2
3
  /**
3
4
  * Returns an error message for the given language and error.
@@ -87,5 +88,18 @@ const translation = {
87
88
  maxdate: 'Si prega di inserire una data il {maxdate} o precedente.',
88
89
  invaliddate: 'Inserisci una data valida.',
89
90
  },
91
+ es: {
92
+ required: 'Por favor, rellene este campo.',
93
+ minlength: 'Por favor, introduzca al menos {requiredLength} caracteres.',
94
+ maxlength: 'Por favor, introduzca no más de {requiredLength} caracteres.',
95
+ pattern: 'Por favor, introduzca un valor que coincida con el patrón: {pattern}.',
96
+ email: 'Por favor, introduzca una dirección de correo electrónico válida.',
97
+ min: 'Por favor, introduzca un valor mayor o igual a {min}.',
98
+ max: 'Por favor, introduzca un valor menor o igual a {max}.',
99
+ requiredtrue: 'Por favor, marque este campo.',
100
+ mindate: 'Por favor, introduzca una fecha igual o posterior a {mindate}.',
101
+ maxdate: 'Por favor, introduzca una fecha igual o anterior a {maxdate}.',
102
+ invaliddate: 'Por favor, introduzca una fecha válida.',
103
+ },
90
104
  };
91
105
  //# sourceMappingURL=error-messages.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"error-messages.js","sourceRoot":"","sources":["../../src/utils/error-messages.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AAgBpD;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,QAAkB,EAAE,KAAsB;EACxE,IAAI;IACF,MAAM,OAAO,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjD,QAAQ,KAAK,CAAC,GAAG,EAAE;MACjB,KAAK,UAAU,CAAC;MAChB,KAAK,cAAc,CAAC;MACpB,KAAK,OAAO;QACV,OAAO,OAAO,CAAC;MACjB,KAAK,WAAW,CAAC;MACjB,KAAK,WAAW;QACd,OAAO,OAAO,CAAC,OAAO,CAAC,kBAAkB,EAAE,MAAM,CAAC,KAAK,CAAC,cAAc,CA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AAE,4CAA4C;IACtD,SAAS,EAAE,uDAAuD;IAClE,SAAS,EAAE,yDAAyD;IACpE,OAAO,EAAE,kEAAkE;IAC3E,KAAK,EAAE,2CAA2C;IAClD,GAAG,EAAE,yDAAyD;IAC9D,GAAG,EAAE,yDAAyD;IAC9D,YAAY,EAAE,6CAA6C;IAC3D,OAAO,EAAE,iDAAiD;IAC1D,OAAO,EAAE,iDAAiD;IAC1D,WAAW,EAAE,kCAAkC;GAChD;EACD,EAAE,EAAE;IACF,QAAQ,EAAE,mCAAmC;IAC7C,SAAS,EAAE,0DAA0D;IACrE,SAAS,EAAE,yDAAyD;IACpE,OAAO,EAAE,uEAAuE;IAChF,KAAK,EAAE,kDAAkD;IACzD,GAAG,EAAE,0DAA0D;IAC/D,GAAG,EAAE,2DAA2D;IAChE,YAAY,EAAE,mCAAmC;IACjD,OAAO,EAAE,2DAA2D;IACpE,OAAO,EAAE,0DAA0D;IACnE,WAAW,EAAE,yCAAyC;GACvD;EACD,EAAE,EAAE;IACF,QAAQ,EAAE,qCAAqC;IAC/C,SAAS,EAAE,yDAAyD;IACpE,SAAS,EAAE,6DAA6D;IACxE,OAAO,EAAE,uEAAuE;IAChF,KAAK,EAAE,iDAAiD;IACxD,GAAG,EAAE,2DAA2D;IAChE,GAAG,EAAE,yDAAyD;IAC9D,YAAY,EAAE,oCAAoC;IAClD,OAAO,EAAE,0DAA0D;IACnE,OAAO,EAAE,0DAA0D;IACnE,WAAW,EAAE,4BAA4B;GAC1C;CACF,CAAC","sourcesContent":["export type Language = 'de' | 'fr' | 'it' | 'en';\n\nconst dateFormat = new Intl.DateTimeFormat('de-CH');\n\nexport type ValidationError =\n | { key: 'required' }\n | { key: 'requiredtrue' }\n | { key: 'email'; requiredPattern: string }\n | { key: 'minlength'; requiredLength: number }\n | { key: 'maxlength'; requiredLength: number }\n | { key: 'pattern'; requiredPattern: string }\n | { key: 'min'; min: number }\n | { key: 'max'; max: number }\n | { key: 'mindate'; mindate: Date; actual: Date }\n | { key: 'maxdate'; maxdate: Date; actual: Date }\n | { key: 'invaliddate'; actual: Date }\n | { key: 'custom'; text: string };\n\n/**\n * Returns an error message for the given language and error.\n */\nexport function getErrorMessage(language: Language, error: ValidationError): string | undefined {\n try {\n const message = translation[language][error.key];\n switch (error.key) {\n case 'required':\n case 'requiredtrue':\n case 'email':\n return message;\n case 'minlength':\n case 'maxlength':\n return message.replace('{requiredLength}', String(error.requiredLength));\n case 'pattern':\n return message.replace('{pattern}', String(error.requiredPattern));\n case 'min':\n return message.replace('{min}', String(error.min));\n case 'max':\n return message.replace('{max}', String(error.max));\n case 'mindate':\n return message.replace('{mindate}', dateFormat.format(error.mindate));\n case 'maxdate':\n return message.replace('{maxdate}', dateFormat.format(error.maxdate));\n case 'invaliddate':\n return message;\n case 'custom':\n return error.text;\n }\n } catch (e) {\n console.warn(`no error message in '${language}' for error:`, error);\n return undefined;\n }\n}\n\nconst translation: Record<Language, Record<string, string>> = {\n en: {\n required: 'Please fill out this field.',\n minlength: 'Please enter at least {requiredLength} characters.',\n maxlength: 'Please enter no more than {requiredLength} characters.',\n pattern: 'Please enter a value that matches the pattern: {pattern}.',\n email: 'Please enter a valid email address.',\n min: 'Please enter a value greater than or equal to {min}.',\n max: 'Please enter a value less than or equal to {max}.',\n requiredtrue: 'Please check this field.',\n mindate: 'Please enter a date on or after {mindate}.',\n maxdate: 'Please enter a date on or before {maxdate}.',\n invaliddate: 'Please enter a valid date.',\n },\n fr: {\n required: \"Veuillez remplir ce champ s'il vous plaît.\",\n minlength: 'Veuillez entrer au moins {requiredLength} caractères.',\n maxlength: 'Veuillez entrer au maximum {requiredLength} caractères.',\n pattern: 'Veuillez entrer une valeur qui correspond au format : {pattern}.',\n email: 'Veuillez entrer une adresse email valide.',\n min: 'Veuillez entrer une valeur supérieure ou égale à {min}.',\n max: 'Veuillez entrer une valeur inférieure ou égale à {max}.',\n requiredtrue: \"Veuillez cocher cette case s'il vous plaît.\",\n mindate: 'Veuillez entrer une date le {mindate} ou après.',\n maxdate: 'Veuillez entrer une date le {maxdate} ou avant.',\n invaliddate: 'Veuillez entrer une date valide.',\n },\n de: {\n required: 'Bitte füllen Sie dieses Feld aus.',\n minlength: 'Bitte geben Sie mindestens {requiredLength} Zeichen ein.',\n maxlength: 'Bitte geben Sie höchstens {requiredLength} Zeichen ein.',\n pattern: 'Bitte geben Sie einen Wert ein, der dem Muster entspricht: {pattern}.',\n email: 'Bitte geben Sie eine gültige E-Mail-Adresse ein.',\n min: 'Bitte geben Sie einen Wert größer oder gleich {min} ein.',\n max: 'Bitte geben Sie einen Wert kleiner oder gleich {max} ein.',\n requiredtrue: 'Bitte aktivieren Sie dieses Feld.',\n mindate: 'Bitte geben Sie ein Datum am oder nach dem {mindate} ein.',\n maxdate: 'Bitte geben Sie ein Datum am oder vor dem {maxdate} ein.',\n invaliddate: 'Bitte geben Sie ein gültiges Datum ein.',\n },\n it: {\n required: 'Si prega di compilare questo campo.',\n minlength: 'Si prega di inserire almeno {requiredLength} caratteri.',\n maxlength: 'Si prega di inserire al massimo {requiredLength} caratteri.',\n pattern: 'Si prega di inserire un valore che corrisponde al formato: {pattern}.',\n email: 'Si prega di inserire un indirizzo email valido.',\n min: 'Si prega di inserire un valore maggiore o uguale a {min}.',\n max: 'Si prega di inserire un valore minore o uguale a {max}.',\n requiredtrue: 'Si prega di spuntare questo campo.',\n mindate: 'Si prega di inserire una data il {mindate} o successiva.',\n maxdate: 'Si prega di inserire una data il {maxdate} o precedente.',\n invaliddate: 'Inserisci una data valida.',\n },\n};\n"]}
1
+ {"version":3,"file":"error-messages.js","sourceRoot":"","sources":["../../src/utils/error-messages.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;AAGjE,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AAgBpD;;GAEG;AACH,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ClD,OAAO,EAAE,0DAA0D;IACnE,OAAO,EAAE,0DAA0D;IACnE,WAAW,EAAE,4BAA4B;GAC1C;EAED,EAAE,EAAE;IACF,QAAQ,EAAE,gCAAgC;IAC1C,SAAS,EAAE,6DAA6D;IACxE,SAAS,EAAE,8DAA8D;IACzE,OAAO,EAAE,uEAAuE;IAChF,KAAK,EAAE,mEAAmE;IAC1E,GAAG,EAAE,uDAAuD;IAC5D,GAAG,EAAE,uDAAuD;IAC5D,YAAY,EAAE,+BAA+B;IAC7C,OAAO,EAAE,gEAAgE;IACzE,OAAO,EAAE,+DAA+D;IACxE,WAAW,EAAE,yCAAyC;GACvD;CACF,CAAC","sourcesContent":["export const languages = ['de', 'fr', 'it', 'en', 'es'] as const;\nexport type Language = (typeof languages)[number];\n\nconst dateFormat = new Intl.DateTimeFormat('de-CH');\n\nexport type ValidationError =\n | { key: 'required' }\n | { key: 'requiredtrue' }\n | { key: 'email'; requiredPattern: string }\n | { key: 'minlength'; requiredLength: number }\n | { key: 'maxlength'; requiredLength: number }\n | { key: 'pattern'; requiredPattern: string }\n | { key: 'min'; min: number }\n | { key: 'max'; max: number }\n | { key: 'mindate'; mindate: Date; actual: Date }\n | { key: 'maxdate'; maxdate: Date; actual: Date }\n | { key: 'invaliddate'; actual: Date }\n | { key: 'custom'; text: string };\n\n/**\n * Returns an error message for the given language and error.\n */\nexport function getErrorMessage(language: Language, error: ValidationError): string | undefined {\n try {\n const message = translation[language][error.key];\n switch (error.key) {\n case 'required':\n case 'requiredtrue':\n case 'email':\n return message;\n case 'minlength':\n case 'maxlength':\n return message.replace('{requiredLength}', String(error.requiredLength));\n case 'pattern':\n return message.replace('{pattern}', String(error.requiredPattern));\n case 'min':\n return message.replace('{min}', String(error.min));\n case 'max':\n return message.replace('{max}', String(error.max));\n case 'mindate':\n return message.replace('{mindate}', dateFormat.format(error.mindate));\n case 'maxdate':\n return message.replace('{maxdate}', dateFormat.format(error.maxdate));\n case 'invaliddate':\n return message;\n case 'custom':\n return error.text;\n }\n } catch (e) {\n console.warn(`no error message in '${language}' for error:`, error);\n return undefined;\n }\n}\n\nconst translation: Record<Language, Record<string, string>> = {\n en: {\n required: 'Please fill out this field.',\n minlength: 'Please enter at least {requiredLength} characters.',\n maxlength: 'Please enter no more than {requiredLength} characters.',\n pattern: 'Please enter a value that matches the pattern: {pattern}.',\n email: 'Please enter a valid email address.',\n min: 'Please enter a value greater than or equal to {min}.',\n max: 'Please enter a value less than or equal to {max}.',\n requiredtrue: 'Please check this field.',\n mindate: 'Please enter a date on or after {mindate}.',\n maxdate: 'Please enter a date on or before {maxdate}.',\n invaliddate: 'Please enter a valid date.',\n },\n fr: {\n required: \"Veuillez remplir ce champ s'il vous plaît.\",\n minlength: 'Veuillez entrer au moins {requiredLength} caractères.',\n maxlength: 'Veuillez entrer au maximum {requiredLength} caractères.',\n pattern: 'Veuillez entrer une valeur qui correspond au format : {pattern}.',\n email: 'Veuillez entrer une adresse email valide.',\n min: 'Veuillez entrer une valeur supérieure ou égale à {min}.',\n max: 'Veuillez entrer une valeur inférieure ou égale à {max}.',\n requiredtrue: \"Veuillez cocher cette case s'il vous plaît.\",\n mindate: 'Veuillez entrer une date le {mindate} ou après.',\n maxdate: 'Veuillez entrer une date le {maxdate} ou avant.',\n invaliddate: 'Veuillez entrer une date valide.',\n },\n de: {\n required: 'Bitte füllen Sie dieses Feld aus.',\n minlength: 'Bitte geben Sie mindestens {requiredLength} Zeichen ein.',\n maxlength: 'Bitte geben Sie höchstens {requiredLength} Zeichen ein.',\n pattern: 'Bitte geben Sie einen Wert ein, der dem Muster entspricht: {pattern}.',\n email: 'Bitte geben Sie eine gültige E-Mail-Adresse ein.',\n min: 'Bitte geben Sie einen Wert größer oder gleich {min} ein.',\n max: 'Bitte geben Sie einen Wert kleiner oder gleich {max} ein.',\n requiredtrue: 'Bitte aktivieren Sie dieses Feld.',\n mindate: 'Bitte geben Sie ein Datum am oder nach dem {mindate} ein.',\n maxdate: 'Bitte geben Sie ein Datum am oder vor dem {maxdate} ein.',\n invaliddate: 'Bitte geben Sie ein gültiges Datum ein.',\n },\n it: {\n required: 'Si prega di compilare questo campo.',\n minlength: 'Si prega di inserire almeno {requiredLength} caratteri.',\n maxlength: 'Si prega di inserire al massimo {requiredLength} caratteri.',\n pattern: 'Si prega di inserire un valore che corrisponde al formato: {pattern}.',\n email: 'Si prega di inserire un indirizzo email valido.',\n min: 'Si prega di inserire un valore maggiore o uguale a {min}.',\n max: 'Si prega di inserire un valore minore o uguale a {max}.',\n requiredtrue: 'Si prega di spuntare questo campo.',\n mindate: 'Si prega di inserire una data il {mindate} o successiva.',\n maxdate: 'Si prega di inserire una data il {maxdate} o precedente.',\n invaliddate: 'Inserisci una data valida.',\n },\n\n es: {\n required: 'Por favor, rellene este campo.',\n minlength: 'Por favor, introduzca al menos {requiredLength} caracteres.',\n maxlength: 'Por favor, introduzca no más de {requiredLength} caracteres.',\n pattern: 'Por favor, introduzca un valor que coincida con el patrón: {pattern}.',\n email: 'Por favor, introduzca una dirección de correo electrónico válida.',\n min: 'Por favor, introduzca un valor mayor o igual a {min}.',\n max: 'Por favor, introduzca un valor menor o igual a {max}.',\n requiredtrue: 'Por favor, marque este campo.',\n mindate: 'Por favor, introduzca una fecha igual o posterior a {mindate}.',\n maxdate: 'Por favor, introduzca una fecha igual o anterior a {maxdate}.',\n invaliddate: 'Por favor, introduzca una fecha válida.',\n },\n};\n"]}
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Get the base path to where the assets can be found. Use "setAssetPath(path)"
3
+ * if the path needs to be customized.
4
+ */
5
+ export declare const getAssetPath: (path: string) => string;
6
+
1
7
  /**
2
8
  * Used to manually set the base path where assets can be found.
3
9
  * If the script is used as "module", it's recommended to use "import.meta.url",
@@ -51,8 +51,9 @@ import { SixTextarea } from './six-textarea.js';
51
51
  import { SixTile } from './six-tile.js';
52
52
  import { SixTimepicker } from './six-timepicker.js';
53
53
  import { SixTooltip } from './six-tooltip.js';
54
- export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
54
+ export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
55
55
 
56
+ const languages = ['de', 'fr', 'it', 'en', 'es'];
56
57
  const dateFormat = new Intl.DateTimeFormat('de-CH');
57
58
  /**
58
59
  * Returns an error message for the given language and error.
@@ -142,6 +143,19 @@ const translation = {
142
143
  maxdate: 'Si prega di inserire una data il {maxdate} o precedente.',
143
144
  invaliddate: 'Inserisci una data valida.',
144
145
  },
146
+ es: {
147
+ required: 'Por favor, rellene este campo.',
148
+ minlength: 'Por favor, introduzca al menos {requiredLength} caracteres.',
149
+ maxlength: 'Por favor, introduzca no más de {requiredLength} caracteres.',
150
+ pattern: 'Por favor, introduzca un valor que coincida con el patrón: {pattern}.',
151
+ email: 'Por favor, introduzca una dirección de correo electrónico válida.',
152
+ min: 'Por favor, introduzca un valor mayor o igual a {min}.',
153
+ max: 'Por favor, introduzca un valor menor o igual a {max}.',
154
+ requiredtrue: 'Por favor, marque este campo.',
155
+ mindate: 'Por favor, introduzca una fecha igual o posterior a {mindate}.',
156
+ maxdate: 'Por favor, introduzca una fecha igual o anterior a {maxdate}.',
157
+ invaliddate: 'Por favor, introduzca una fecha válida.',
158
+ },
145
159
  };
146
160
 
147
161
  const defineCustomElements = (opts) => {
@@ -208,6 +222,6 @@ const defineCustomElements = (opts) => {
208
222
  }
209
223
  };
210
224
 
211
- export { defineCustomElements, getErrorMessage };
225
+ export { defineCustomElements, getErrorMessage, languages };
212
226
 
213
227
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AAgBpD;;;SAGgB,eAAe,CAAC,QAAkB,EAAE,KAAsB;EACxE,IAAI;IACF,MAAM,OAAO,GAAG,WAAW,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/utils/error-messages.ts"],"sourcesContent":["export type Language = 'de' | 'fr' | 'it' | 'en';\n\nconst dateFormat = new Intl.DateTimeFormat('de-CH');\n\nexport type ValidationError =\n | { key: 'required' }\n | { key: 'requiredtrue' }\n | { key: 'email'; requiredPattern: string }\n | { key: 'minlength'; requiredLength: number }\n | { key: 'maxlength'; requiredLength: number }\n | { key: 'pattern'; requiredPattern: string }\n | { key: 'min'; min: number }\n | { key: 'max'; max: number }\n | { key: 'mindate'; mindate: Date; actual: Date }\n | { key: 'maxdate'; maxdate: Date; actual: Date }\n | { key: 'invaliddate'; actual: Date }\n | { key: 'custom'; text: string };\n\n/**\n * Returns an error message for the given language and error.\n */\nexport function getErrorMessage(language: Language, error: ValidationError): string | undefined {\n try {\n const message = translation[language][error.key];\n switch (error.key) {\n case 'required':\n case 'requiredtrue':\n case 'email':\n return message;\n case 'minlength':\n case 'maxlength':\n return message.replace('{requiredLength}', String(error.requiredLength));\n case 'pattern':\n return message.replace('{pattern}', String(error.requiredPattern));\n case 'min':\n return message.replace('{min}', String(error.min));\n case 'max':\n return message.replace('{max}', String(error.max));\n case 'mindate':\n return message.replace('{mindate}', dateFormat.format(error.mindate));\n case 'maxdate':\n return message.replace('{maxdate}', dateFormat.format(error.maxdate));\n case 'invaliddate':\n return message;\n case 'custom':\n return error.text;\n }\n } catch (e) {\n console.warn(`no error message in '${language}' for error:`, error);\n return undefined;\n }\n}\n\nconst translation: Record<Language, Record<string, string>> = {\n en: {\n required: 'Please fill out this field.',\n minlength: 'Please enter at least {requiredLength} characters.',\n maxlength: 'Please enter no more than {requiredLength} characters.',\n pattern: 'Please enter a value that matches the pattern: {pattern}.',\n email: 'Please enter a valid email address.',\n min: 'Please enter a value greater than or equal to {min}.',\n max: 'Please enter a value less than or equal to {max}.',\n requiredtrue: 'Please check this field.',\n mindate: 'Please enter a date on or after {mindate}.',\n maxdate: 'Please enter a date on or before {maxdate}.',\n invaliddate: 'Please enter a valid date.',\n },\n fr: {\n required: \"Veuillez remplir ce champ s'il vous plaît.\",\n minlength: 'Veuillez entrer au moins {requiredLength} caractères.',\n maxlength: 'Veuillez entrer au maximum {requiredLength} caractères.',\n pattern: 'Veuillez entrer une valeur qui correspond au format : {pattern}.',\n email: 'Veuillez entrer une adresse email valide.',\n min: 'Veuillez entrer une valeur supérieure ou égale à {min}.',\n max: 'Veuillez entrer une valeur inférieure ou égale à {max}.',\n requiredtrue: \"Veuillez cocher cette case s'il vous plaît.\",\n mindate: 'Veuillez entrer une date le {mindate} ou après.',\n maxdate: 'Veuillez entrer une date le {maxdate} ou avant.',\n invaliddate: 'Veuillez entrer une date valide.',\n },\n de: {\n required: 'Bitte füllen Sie dieses Feld aus.',\n minlength: 'Bitte geben Sie mindestens {requiredLength} Zeichen ein.',\n maxlength: 'Bitte geben Sie höchstens {requiredLength} Zeichen ein.',\n pattern: 'Bitte geben Sie einen Wert ein, der dem Muster entspricht: {pattern}.',\n email: 'Bitte geben Sie eine gültige E-Mail-Adresse ein.',\n min: 'Bitte geben Sie einen Wert größer oder gleich {min} ein.',\n max: 'Bitte geben Sie einen Wert kleiner oder gleich {max} ein.',\n requiredtrue: 'Bitte aktivieren Sie dieses Feld.',\n mindate: 'Bitte geben Sie ein Datum am oder nach dem {mindate} ein.',\n maxdate: 'Bitte geben Sie ein Datum am oder vor dem {maxdate} ein.',\n invaliddate: 'Bitte geben Sie ein gültiges Datum ein.',\n },\n it: {\n required: 'Si prega di compilare questo campo.',\n minlength: 'Si prega di inserire almeno {requiredLength} caratteri.',\n maxlength: 'Si prega di inserire al massimo {requiredLength} caratteri.',\n pattern: 'Si prega di inserire un valore che corrisponde al formato: {pattern}.',\n email: 'Si prega di inserire un indirizzo email valido.',\n min: 'Si prega di inserire un valore maggiore o uguale a {min}.',\n max: 'Si prega di inserire un valore minore o uguale a {max}.',\n requiredtrue: 'Si prega di spuntare questo campo.',\n mindate: 'Si prega di inserire una data il {mindate} o successiva.',\n maxdate: 'Si prega di inserire una data il {maxdate} o precedente.',\n invaliddate: 'Inserisci una data valida.',\n },\n};\n"],"version":3}
1
+ {"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAa,SAAS,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAW;AAGjE,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AAgBpD;;;SAGgB,eAAe,CAAC,QAAkB,EAAE,KAAsB;EACxE,IAAI;IACF,MAAM,OAAO,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjD,QAAQ,KAAK,CAAC,GAAG;MACf,KAAK,UAAU,CAAC;MAChB,KAAK,cAAc,CAAC;MACpB,KAAK,OAAO;QACV,OAAO,OAAO,CAAC;MACjB,KAAK,WAAW,CAAC;MACjB,KAAK,WAAW;QACd,OAAO,OAAO,CAAC,OAAO,CAAC,kBAAkB,EAAE,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC;MAC3E,KAAK,SAAS;QACZ,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;MACrE,KAAK,KAAK;QACR,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;MACrD,KAAK,KAAK;QACR,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;MACrD,KAAK,SAAS;QACZ,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,C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;IAC/D,GAAG,EAAE,2DAA2D;IAChE,YAAY,EAAE,mCAAmC;IACjD,OAAO,EAAE,2DAA2D;IACpE,OAAO,EAAE,0DAA0D;IACnE,WAAW,EAAE,yCAAyC;GACvD;EACD,EAAE,EAAE;IACF,QAAQ,EAAE,qCAAqC;IAC/C,SAAS,EAAE,yDAAyD;IACpE,SAAS,EAAE,6DAA6D;IACxE,OAAO,EAAE,uEAAuE;IAChF,KAAK,EAAE,iDAAiD;IACxD,GAAG,EAAE,2DAA2D;IAChE,GAAG,EAAE,yDAAyD;IAC9D,YAAY,EAAE,oCAAoC;IAClD,OAAO,EAAE,0DAA0D;IACnE,OAAO,EAAE,0DAA0D;IACnE,WAAW,EAAE,4BAA4B;GAC1C;EAED,EAAE,EAAE;IACF,QAAQ,EAAE,gCAAgC;IAC1C,SAAS,EAAE,6DAA6D;IACxE,SAAS,EAAE,8DAA8D;IACzE,OAAO,EAAE,uEAAuE;IAChF,KAAK,EAAE,mEAAmE;IAC1E,GAAG,EAAE,uDAAuD;IAC5D,GAAG,EAAE,uDAAuD;IAC5D,YAAY,EAAE,+BAA+B;IAC7C,OAAO,EAAE,gEAAgE;IACzE,OAAO,EAAE,+DAA+D;IACxE,WAAW,EAAE,yCAAyC;GACvD;CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/utils/error-messages.ts"],"sourcesContent":["export const languages = ['de', 'fr', 'it', 'en', 'es'] as const;\nexport type Language = (typeof languages)[number];\n\nconst dateFormat = new Intl.DateTimeFormat('de-CH');\n\nexport type ValidationError =\n | { key: 'required' }\n | { key: 'requiredtrue' }\n | { key: 'email'; requiredPattern: string }\n | { key: 'minlength'; requiredLength: number }\n | { key: 'maxlength'; requiredLength: number }\n | { key: 'pattern'; requiredPattern: string }\n | { key: 'min'; min: number }\n | { key: 'max'; max: number }\n | { key: 'mindate'; mindate: Date; actual: Date }\n | { key: 'maxdate'; maxdate: Date; actual: Date }\n | { key: 'invaliddate'; actual: Date }\n | { key: 'custom'; text: string };\n\n/**\n * Returns an error message for the given language and error.\n */\nexport function getErrorMessage(language: Language, error: ValidationError): string | undefined {\n try {\n const message = translation[language][error.key];\n switch (error.key) {\n case 'required':\n case 'requiredtrue':\n case 'email':\n return message;\n case 'minlength':\n case 'maxlength':\n return message.replace('{requiredLength}', String(error.requiredLength));\n case 'pattern':\n return message.replace('{pattern}', String(error.requiredPattern));\n case 'min':\n return message.replace('{min}', String(error.min));\n case 'max':\n return message.replace('{max}', String(error.max));\n case 'mindate':\n return message.replace('{mindate}', dateFormat.format(error.mindate));\n case 'maxdate':\n return message.replace('{maxdate}', dateFormat.format(error.maxdate));\n case 'invaliddate':\n return message;\n case 'custom':\n return error.text;\n }\n } catch (e) {\n console.warn(`no error message in '${language}' for error:`, error);\n return undefined;\n }\n}\n\nconst translation: Record<Language, Record<string, string>> = {\n en: {\n required: 'Please fill out this field.',\n minlength: 'Please enter at least {requiredLength} characters.',\n maxlength: 'Please enter no more than {requiredLength} characters.',\n pattern: 'Please enter a value that matches the pattern: {pattern}.',\n email: 'Please enter a valid email address.',\n min: 'Please enter a value greater than or equal to {min}.',\n max: 'Please enter a value less than or equal to {max}.',\n requiredtrue: 'Please check this field.',\n mindate: 'Please enter a date on or after {mindate}.',\n maxdate: 'Please enter a date on or before {maxdate}.',\n invaliddate: 'Please enter a valid date.',\n },\n fr: {\n required: \"Veuillez remplir ce champ s'il vous plaît.\",\n minlength: 'Veuillez entrer au moins {requiredLength} caractères.',\n maxlength: 'Veuillez entrer au maximum {requiredLength} caractères.',\n pattern: 'Veuillez entrer une valeur qui correspond au format : {pattern}.',\n email: 'Veuillez entrer une adresse email valide.',\n min: 'Veuillez entrer une valeur supérieure ou égale à {min}.',\n max: 'Veuillez entrer une valeur inférieure ou égale à {max}.',\n requiredtrue: \"Veuillez cocher cette case s'il vous plaît.\",\n mindate: 'Veuillez entrer une date le {mindate} ou après.',\n maxdate: 'Veuillez entrer une date le {maxdate} ou avant.',\n invaliddate: 'Veuillez entrer une date valide.',\n },\n de: {\n required: 'Bitte füllen Sie dieses Feld aus.',\n minlength: 'Bitte geben Sie mindestens {requiredLength} Zeichen ein.',\n maxlength: 'Bitte geben Sie höchstens {requiredLength} Zeichen ein.',\n pattern: 'Bitte geben Sie einen Wert ein, der dem Muster entspricht: {pattern}.',\n email: 'Bitte geben Sie eine gültige E-Mail-Adresse ein.',\n min: 'Bitte geben Sie einen Wert größer oder gleich {min} ein.',\n max: 'Bitte geben Sie einen Wert kleiner oder gleich {max} ein.',\n requiredtrue: 'Bitte aktivieren Sie dieses Feld.',\n mindate: 'Bitte geben Sie ein Datum am oder nach dem {mindate} ein.',\n maxdate: 'Bitte geben Sie ein Datum am oder vor dem {maxdate} ein.',\n invaliddate: 'Bitte geben Sie ein gültiges Datum ein.',\n },\n it: {\n required: 'Si prega di compilare questo campo.',\n minlength: 'Si prega di inserire almeno {requiredLength} caratteri.',\n maxlength: 'Si prega di inserire al massimo {requiredLength} caratteri.',\n pattern: 'Si prega di inserire un valore che corrisponde al formato: {pattern}.',\n email: 'Si prega di inserire un indirizzo email valido.',\n min: 'Si prega di inserire un valore maggiore o uguale a {min}.',\n max: 'Si prega di inserire un valore minore o uguale a {max}.',\n requiredtrue: 'Si prega di spuntare questo campo.',\n mindate: 'Si prega di inserire una data il {mindate} o successiva.',\n maxdate: 'Si prega di inserire una data il {maxdate} o precedente.',\n invaliddate: 'Inserisci una data valida.',\n },\n\n es: {\n required: 'Por favor, rellene este campo.',\n minlength: 'Por favor, introduzca al menos {requiredLength} caracteres.',\n maxlength: 'Por favor, introduzca no más de {requiredLength} caracteres.',\n pattern: 'Por favor, introduzca un valor que coincida con el patrón: {pattern}.',\n email: 'Por favor, introduzca una dirección de correo electrónico válida.',\n min: 'Por favor, introduzca un valor mayor o igual a {min}.',\n max: 'Por favor, introduzca un valor menor o igual a {max}.',\n requiredtrue: 'Por favor, marque este campo.',\n mindate: 'Por favor, introduzca una fecha igual o posterior a {mindate}.',\n maxdate: 'Por favor, introduzca una fecha igual o anterior a {maxdate}.',\n invaliddate: 'Por favor, introduzca una fecha válida.',\n },\n};\n"],"version":3}
@@ -51,6 +51,8 @@ const SetAttributes = /*@__PURE__*/ proxyCustomElement(class SetAttributes exten
51
51
  }; }
52
52
  }, [4, "set-attributes", {
53
53
  "value": [16]
54
+ }, undefined, {
55
+ "value": ["attrsUpdated"]
54
56
  }]);
55
57
  function defineCustomElement() {
56
58
  if (typeof customElements === "undefined") {