@six-group/ui-library 0.0.0-insider.cbbb892 → 0.0.0-insider.ccdf415

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 (498) hide show
  1. package/README.md +9 -0
  2. package/dist/cjs/{form-control-d369af14.js → form-control-19303ed2.js} +11 -8
  3. package/dist/cjs/form-control-19303ed2.js.map +1 -0
  4. package/dist/cjs/{index-900437fc.js → index-7d73cbd6.js} +495 -122
  5. package/dist/cjs/index-7d73cbd6.js.map +1 -0
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/{scroll-03678de1.js → scroll-2c4200dc.js} +1 -2
  8. package/dist/cjs/scroll-2c4200dc.js.map +1 -0
  9. package/dist/cjs/set-attributes_2.cjs.entry.js +1 -1
  10. package/dist/cjs/six-alert.cjs.entry.js +1 -1
  11. package/dist/cjs/six-avatar.cjs.entry.js +1 -1
  12. package/dist/cjs/six-badge.cjs.entry.js +1 -1
  13. package/dist/cjs/six-button.cjs.entry.js +4 -4
  14. package/dist/cjs/six-button.cjs.entry.js.map +1 -1
  15. package/dist/cjs/six-card.cjs.entry.js +1 -1
  16. package/dist/cjs/six-checkbox.cjs.entry.js +7 -4
  17. package/dist/cjs/six-checkbox.cjs.entry.js.map +1 -1
  18. package/dist/cjs/six-datepicker.cjs.entry.js +3 -8
  19. package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
  20. package/dist/cjs/six-details.cjs.entry.js +2 -2
  21. package/dist/cjs/six-details.cjs.entry.js.map +1 -1
  22. package/dist/cjs/six-dialog.cjs.entry.js +2 -2
  23. package/dist/cjs/six-drawer.cjs.entry.js +3 -3
  24. package/dist/cjs/six-drawer.cjs.entry.js.map +1 -1
  25. package/dist/cjs/six-dropdown_2.cjs.entry.js +2 -2
  26. package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
  27. package/dist/cjs/six-error-page.cjs.entry.js +1 -1
  28. package/dist/cjs/six-error.cjs.entry.js +21 -0
  29. package/dist/cjs/six-error.cjs.entry.js.map +1 -0
  30. package/dist/cjs/six-file-list-item.cjs.entry.js +1 -1
  31. package/dist/cjs/six-file-list.cjs.entry.js +1 -1
  32. package/dist/cjs/six-file-upload.cjs.entry.js +1 -1
  33. package/dist/cjs/six-footer.cjs.entry.js +1 -1
  34. package/dist/cjs/six-group-label.cjs.entry.js +3 -3
  35. package/dist/cjs/six-group-label.cjs.entry.js.map +1 -1
  36. package/dist/cjs/six-header.cjs.entry.js +1 -1
  37. package/dist/cjs/six-icon-button.cjs.entry.js +2 -2
  38. package/dist/cjs/six-icon-button.cjs.entry.js.map +1 -1
  39. package/dist/cjs/six-icon.cjs.entry.js +1 -1
  40. package/dist/cjs/six-input.cjs.entry.js +7 -4
  41. package/dist/cjs/six-input.cjs.entry.js.map +1 -1
  42. package/dist/cjs/six-item-picker.cjs.entry.js +1 -1
  43. package/dist/cjs/six-language-switcher.cjs.entry.js +1 -1
  44. package/dist/cjs/six-layout-grid.cjs.entry.js +1 -1
  45. package/dist/cjs/six-main-container.cjs.entry.js +1 -1
  46. package/dist/cjs/six-menu-divider.cjs.entry.js +1 -1
  47. package/dist/cjs/six-menu-item.cjs.entry.js +1 -1
  48. package/dist/cjs/six-menu-label.cjs.entry.js +1 -1
  49. package/dist/cjs/six-picto.cjs.entry.js +1 -1
  50. package/dist/cjs/six-progress-bar.cjs.entry.js +1 -1
  51. package/dist/cjs/six-progress-ring.cjs.entry.js +1 -1
  52. package/dist/cjs/six-radio.cjs.entry.js +1 -1
  53. package/dist/cjs/six-range.cjs.entry.js +7 -4
  54. package/dist/cjs/six-range.cjs.entry.js.map +1 -1
  55. package/dist/cjs/six-root.cjs.entry.js +1 -1
  56. package/dist/cjs/six-search-field.cjs.entry.js +1 -1
  57. package/dist/cjs/six-select.cjs.entry.js +7 -4
  58. package/dist/cjs/six-select.cjs.entry.js.map +1 -1
  59. package/dist/cjs/six-sidebar-item-group.cjs.entry.js +14 -3
  60. package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -1
  61. package/dist/cjs/six-sidebar-item.cjs.entry.js +6 -4
  62. package/dist/cjs/six-sidebar-item.cjs.entry.js.map +1 -1
  63. package/dist/cjs/six-sidebar.cjs.entry.js +2 -2
  64. package/dist/cjs/six-spinner.cjs.entry.js +1 -1
  65. package/dist/cjs/six-switch.cjs.entry.js +23 -5
  66. package/dist/cjs/six-switch.cjs.entry.js.map +1 -1
  67. package/dist/cjs/six-tab-group.cjs.entry.js +46 -51
  68. package/dist/cjs/six-tab-group.cjs.entry.js.map +1 -1
  69. package/dist/cjs/six-tab-panel.cjs.entry.js +1 -1
  70. package/dist/cjs/six-tab.cjs.entry.js +20 -4
  71. package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
  72. package/dist/cjs/six-tag.cjs.entry.js +24 -2
  73. package/dist/cjs/six-tag.cjs.entry.js.map +1 -1
  74. package/dist/cjs/six-textarea.cjs.entry.js +7 -4
  75. package/dist/cjs/six-textarea.cjs.entry.js.map +1 -1
  76. package/dist/cjs/six-tile.cjs.entry.js +1 -1
  77. package/dist/cjs/six-timepicker.cjs.entry.js +5 -10
  78. package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -1
  79. package/dist/cjs/six-tooltip.cjs.entry.js +3 -3
  80. package/dist/cjs/six-tooltip.cjs.entry.js.map +1 -1
  81. package/dist/cjs/ui-library.cjs.js +3 -3
  82. package/dist/cjs/ui-library.cjs.js.map +1 -1
  83. package/dist/collection/collection-manifest.json +3 -2
  84. package/dist/collection/components/six-button/six-button.css +5 -30
  85. package/dist/collection/components/six-button/six-button.js +2 -2
  86. package/dist/collection/components/six-button/six-button.js.map +1 -1
  87. package/dist/collection/components/six-checkbox/six-checkbox.css +4 -1
  88. package/dist/collection/components/six-checkbox/six-checkbox.js +25 -4
  89. package/dist/collection/components/six-checkbox/six-checkbox.js.map +1 -1
  90. package/dist/collection/components/six-checkbox/test/six-checkbox.spec.js +6 -2
  91. package/dist/collection/components/six-checkbox/test/six-checkbox.spec.js.map +1 -1
  92. package/dist/collection/components/six-datepicker/six-datepicker.js +22 -11
  93. package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
  94. package/dist/collection/components/six-datepicker/test/six-datepicker.spec.js +1 -1
  95. package/dist/collection/components/six-datepicker/test/six-datepicker.spec.js.map +1 -1
  96. package/dist/collection/components/six-details/six-details.css +3 -1
  97. package/dist/collection/components/six-drawer/six-drawer.js +1 -1
  98. package/dist/collection/components/six-drawer/six-drawer.js.map +1 -1
  99. package/dist/collection/components/six-drawer/test/six-drawer.spec.js +1 -1
  100. package/dist/collection/components/six-drawer/test/six-drawer.spec.js.map +1 -1
  101. package/dist/collection/components/six-dropdown/six-dropdown.css +2 -1
  102. package/dist/collection/components/six-error/six-error.css +5 -0
  103. package/dist/collection/components/six-error/six-error.js +25 -0
  104. package/dist/collection/components/six-error/six-error.js.map +1 -0
  105. package/dist/collection/components/six-group-label/six-group-label.css +4 -1
  106. package/dist/collection/components/six-group-label/test/six-group-label.spec.js +3 -1
  107. package/dist/collection/components/six-group-label/test/six-group-label.spec.js.map +1 -1
  108. package/dist/collection/components/six-icon-button/six-icon-button.css +4 -4
  109. package/dist/collection/components/six-input/six-input.css +4 -1
  110. package/dist/collection/components/six-input/six-input.js +27 -4
  111. package/dist/collection/components/six-input/six-input.js.map +1 -1
  112. package/dist/collection/components/six-input/test/six-input.spec.js +3 -1
  113. package/dist/collection/components/six-input/test/six-input.spec.js.map +1 -1
  114. package/dist/collection/components/six-range/six-range.css +4 -1
  115. package/dist/collection/components/six-range/six-range.js +24 -3
  116. package/dist/collection/components/six-range/six-range.js.map +1 -1
  117. package/dist/collection/components/six-range/test/six-range.spec.js +3 -1
  118. package/dist/collection/components/six-range/test/six-range.spec.js.map +1 -1
  119. package/dist/collection/components/six-select/six-select.css +4 -1
  120. package/dist/collection/components/six-select/six-select.js +24 -3
  121. package/dist/collection/components/six-select/six-select.js.map +1 -1
  122. package/dist/collection/components/six-select/test/six-select.spec.js +6 -2
  123. package/dist/collection/components/six-select/test/six-select.spec.js.map +1 -1
  124. package/dist/collection/components/six-sidebar-item/six-sidebar-item.css +6 -1
  125. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +21 -2
  126. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js.map +1 -1
  127. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.css +11 -0
  128. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js +29 -1
  129. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js.map +1 -1
  130. package/dist/collection/components/six-sidebar-item-group/test/six-sidebar-item-group.spec.js +2 -2
  131. package/dist/collection/components/six-sidebar-item-group/test/six-sidebar-item-group.spec.js.map +1 -1
  132. package/dist/collection/components/six-switch/six-switch.css +4 -1
  133. package/dist/collection/components/six-switch/six-switch.js +45 -4
  134. package/dist/collection/components/six-switch/six-switch.js.map +1 -1
  135. package/dist/collection/components/six-switch/test/six-switch.spec.js +6 -2
  136. package/dist/collection/components/six-switch/test/six-switch.spec.js.map +1 -1
  137. package/dist/collection/components/six-tab/six-tab.css +54 -5
  138. package/dist/collection/components/six-tab/six-tab.js +18 -2
  139. package/dist/collection/components/six-tab/six-tab.js.map +1 -1
  140. package/dist/collection/components/six-tab-group/six-tab-group.css +0 -31
  141. package/dist/collection/components/six-tab-group/six-tab-group.js +10 -51
  142. package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -1
  143. package/dist/collection/components/six-tag/six-tag.js +23 -1
  144. package/dist/collection/components/six-tag/six-tag.js.map +1 -1
  145. package/dist/collection/components/six-tag/test/six-tag.spec.js +12 -0
  146. package/dist/collection/components/six-tag/test/six-tag.spec.js.map +1 -1
  147. package/dist/collection/components/six-textarea/six-textarea.css +4 -1
  148. package/dist/collection/components/six-textarea/six-textarea.js +25 -4
  149. package/dist/collection/components/six-textarea/six-textarea.js.map +1 -1
  150. package/dist/collection/components/six-textarea/test/six-textarea.spec.js +3 -1
  151. package/dist/collection/components/six-textarea/test/six-textarea.spec.js.map +1 -1
  152. package/dist/collection/components/six-timepicker/six-timepicker.js +24 -12
  153. package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -1
  154. package/dist/collection/components/six-timepicker/test/six-timepicker.spec.js +15 -15
  155. package/dist/collection/components/six-timepicker/test/six-timepicker.spec.js.map +1 -1
  156. package/dist/collection/components/six-tooltip/six-tooltip.css +1 -1
  157. package/dist/collection/components/six-tooltip/six-tooltip.js +1 -1
  158. package/dist/collection/components/six-tooltip/six-tooltip.js.map +1 -1
  159. package/dist/collection/functional-components/form-control/form-control.js +8 -6
  160. package/dist/collection/functional-components/form-control/form-control.js.map +1 -1
  161. package/dist/collection/utils/animation.js +34 -0
  162. package/dist/collection/utils/animation.js.map +1 -0
  163. package/dist/components/form-control.js +9 -6
  164. package/dist/components/form-control.js.map +1 -1
  165. package/dist/components/index.d.ts +6 -0
  166. package/dist/components/index.js +3 -1
  167. package/dist/components/index.js.map +1 -1
  168. package/dist/components/scroll.js +1 -1
  169. package/dist/components/set-attributes2.js +2 -0
  170. package/dist/components/set-attributes2.js.map +1 -1
  171. package/dist/components/six-alert.js +3 -0
  172. package/dist/components/six-alert.js.map +1 -1
  173. package/dist/components/six-button.js +3 -3
  174. package/dist/components/six-button.js.map +1 -1
  175. package/dist/components/six-checkbox.js +19 -3
  176. package/dist/components/six-checkbox.js.map +1 -1
  177. package/dist/components/six-datepicker.js +14 -9
  178. package/dist/components/six-datepicker.js.map +1 -1
  179. package/dist/components/six-details2.js +3 -1
  180. package/dist/components/six-details2.js.map +1 -1
  181. package/dist/components/six-dialog.js +2 -0
  182. package/dist/components/six-dialog.js.map +1 -1
  183. package/dist/components/six-drawer.js +3 -1
  184. package/dist/components/six-drawer.js.map +1 -1
  185. package/dist/components/six-dropdown2.js +15 -2
  186. package/dist/components/six-dropdown2.js.map +1 -1
  187. package/dist/components/six-error.d.ts +11 -0
  188. package/dist/components/six-error.js +8 -0
  189. package/dist/components/six-error.js.map +1 -0
  190. package/dist/components/six-error2.js +32 -0
  191. package/dist/components/six-error2.js.map +1 -0
  192. package/dist/components/six-group-label.js +11 -2
  193. package/dist/components/six-group-label.js.map +1 -1
  194. package/dist/components/six-header.js +10 -2
  195. package/dist/components/six-header.js.map +1 -1
  196. package/dist/components/six-icon-button2.js +1 -1
  197. package/dist/components/six-icon-button2.js.map +1 -1
  198. package/dist/components/six-input2.js +19 -3
  199. package/dist/components/six-input2.js.map +1 -1
  200. package/dist/components/six-item-picker2.js +4 -0
  201. package/dist/components/six-item-picker2.js.map +1 -1
  202. package/dist/components/six-language-switcher.js +2 -0
  203. package/dist/components/six-language-switcher.js.map +1 -1
  204. package/dist/components/six-layout-grid.js +2 -0
  205. package/dist/components/six-layout-grid.js.map +1 -1
  206. package/dist/components/six-progress-ring.js +2 -0
  207. package/dist/components/six-progress-ring.js.map +1 -1
  208. package/dist/components/six-radio.js +3 -0
  209. package/dist/components/six-radio.js.map +1 -1
  210. package/dist/components/six-range.js +21 -3
  211. package/dist/components/six-range.js.map +1 -1
  212. package/dist/components/six-root.js +2 -0
  213. package/dist/components/six-root.js.map +1 -1
  214. package/dist/components/six-search-field.js +9 -1
  215. package/dist/components/six-search-field.js.map +1 -1
  216. package/dist/components/six-select.js +40 -16
  217. package/dist/components/six-select.js.map +1 -1
  218. package/dist/components/six-sidebar-item-group.js +14 -2
  219. package/dist/components/six-sidebar-item-group.js.map +1 -1
  220. package/dist/components/six-sidebar-item.js +7 -4
  221. package/dist/components/six-sidebar-item.js.map +1 -1
  222. package/dist/components/six-sidebar.js +2 -0
  223. package/dist/components/six-sidebar.js.map +1 -1
  224. package/dist/components/six-switch.js +34 -4
  225. package/dist/components/six-switch.js.map +1 -1
  226. package/dist/components/six-tab-group.js +47 -50
  227. package/dist/components/six-tab-group.js.map +1 -1
  228. package/dist/components/six-tab.js +19 -3
  229. package/dist/components/six-tab.js.map +1 -1
  230. package/dist/components/six-tag2.js +33 -5
  231. package/dist/components/six-tag2.js.map +1 -1
  232. package/dist/components/six-textarea.js +20 -3
  233. package/dist/components/six-textarea.js.map +1 -1
  234. package/dist/components/six-timepicker2.js +15 -11
  235. package/dist/components/six-timepicker2.js.map +1 -1
  236. package/dist/components/six-tooltip2.js +4 -2
  237. package/dist/components/six-tooltip2.js.map +1 -1
  238. package/dist/components.json +475 -57
  239. package/dist/esm/{form-control-32cb533f.js → form-control-079f7fb6.js} +11 -8
  240. package/dist/esm/form-control-079f7fb6.js.map +1 -0
  241. package/dist/esm/{index-8a74f992.js → index-4ee8b33e.js} +495 -122
  242. package/dist/esm/index-4ee8b33e.js.map +1 -0
  243. package/dist/esm/loader.js +3 -3
  244. package/dist/esm/{scroll-3fb087a2.js → scroll-774762d6.js} +2 -2
  245. package/dist/esm/{scroll-3fb087a2.js.map → scroll-774762d6.js.map} +1 -1
  246. package/dist/esm/set-attributes_2.entry.js +1 -1
  247. package/dist/esm/six-alert.entry.js +1 -1
  248. package/dist/esm/six-avatar.entry.js +1 -1
  249. package/dist/esm/six-badge.entry.js +1 -1
  250. package/dist/esm/six-button.entry.js +4 -4
  251. package/dist/esm/six-button.entry.js.map +1 -1
  252. package/dist/esm/six-card.entry.js +1 -1
  253. package/dist/esm/six-checkbox.entry.js +7 -4
  254. package/dist/esm/six-checkbox.entry.js.map +1 -1
  255. package/dist/esm/six-datepicker.entry.js +3 -8
  256. package/dist/esm/six-datepicker.entry.js.map +1 -1
  257. package/dist/esm/six-details.entry.js +2 -2
  258. package/dist/esm/six-details.entry.js.map +1 -1
  259. package/dist/esm/six-dialog.entry.js +2 -2
  260. package/dist/esm/six-drawer.entry.js +3 -3
  261. package/dist/esm/six-drawer.entry.js.map +1 -1
  262. package/dist/esm/six-dropdown_2.entry.js +2 -2
  263. package/dist/esm/six-dropdown_2.entry.js.map +1 -1
  264. package/dist/esm/six-error-page.entry.js +1 -1
  265. package/dist/esm/six-error.entry.js +17 -0
  266. package/dist/esm/six-error.entry.js.map +1 -0
  267. package/dist/esm/six-file-list-item.entry.js +1 -1
  268. package/dist/esm/six-file-list.entry.js +1 -1
  269. package/dist/esm/six-file-upload.entry.js +1 -1
  270. package/dist/esm/six-footer.entry.js +1 -1
  271. package/dist/esm/six-group-label.entry.js +3 -3
  272. package/dist/esm/six-group-label.entry.js.map +1 -1
  273. package/dist/esm/six-header.entry.js +1 -1
  274. package/dist/esm/six-icon-button.entry.js +2 -2
  275. package/dist/esm/six-icon-button.entry.js.map +1 -1
  276. package/dist/esm/six-icon.entry.js +1 -1
  277. package/dist/esm/six-input.entry.js +7 -4
  278. package/dist/esm/six-input.entry.js.map +1 -1
  279. package/dist/esm/six-item-picker.entry.js +1 -1
  280. package/dist/esm/six-language-switcher.entry.js +1 -1
  281. package/dist/esm/six-layout-grid.entry.js +1 -1
  282. package/dist/esm/six-main-container.entry.js +1 -1
  283. package/dist/esm/six-menu-divider.entry.js +1 -1
  284. package/dist/esm/six-menu-item.entry.js +1 -1
  285. package/dist/esm/six-menu-label.entry.js +1 -1
  286. package/dist/esm/six-picto.entry.js +1 -1
  287. package/dist/esm/six-progress-bar.entry.js +1 -1
  288. package/dist/esm/six-progress-ring.entry.js +1 -1
  289. package/dist/esm/six-radio.entry.js +1 -1
  290. package/dist/esm/six-range.entry.js +7 -4
  291. package/dist/esm/six-range.entry.js.map +1 -1
  292. package/dist/esm/six-root.entry.js +1 -1
  293. package/dist/esm/six-search-field.entry.js +1 -1
  294. package/dist/esm/six-select.entry.js +7 -4
  295. package/dist/esm/six-select.entry.js.map +1 -1
  296. package/dist/esm/six-sidebar-item-group.entry.js +14 -3
  297. package/dist/esm/six-sidebar-item-group.entry.js.map +1 -1
  298. package/dist/esm/six-sidebar-item.entry.js +6 -4
  299. package/dist/esm/six-sidebar-item.entry.js.map +1 -1
  300. package/dist/esm/six-sidebar.entry.js +2 -2
  301. package/dist/esm/six-spinner.entry.js +1 -1
  302. package/dist/esm/six-switch.entry.js +23 -5
  303. package/dist/esm/six-switch.entry.js.map +1 -1
  304. package/dist/esm/six-tab-group.entry.js +46 -51
  305. package/dist/esm/six-tab-group.entry.js.map +1 -1
  306. package/dist/esm/six-tab-panel.entry.js +1 -1
  307. package/dist/esm/six-tab.entry.js +20 -4
  308. package/dist/esm/six-tab.entry.js.map +1 -1
  309. package/dist/esm/six-tag.entry.js +24 -2
  310. package/dist/esm/six-tag.entry.js.map +1 -1
  311. package/dist/esm/six-textarea.entry.js +7 -4
  312. package/dist/esm/six-textarea.entry.js.map +1 -1
  313. package/dist/esm/six-tile.entry.js +1 -1
  314. package/dist/esm/six-timepicker.entry.js +5 -10
  315. package/dist/esm/six-timepicker.entry.js.map +1 -1
  316. package/dist/esm/six-tooltip.entry.js +3 -3
  317. package/dist/esm/six-tooltip.entry.js.map +1 -1
  318. package/dist/esm/ui-library.js +4 -4
  319. package/dist/esm/ui-library.js.map +1 -1
  320. package/dist/types/components/six-checkbox/six-checkbox.d.ts +4 -1
  321. package/dist/types/components/six-datepicker/six-datepicker.d.ts +4 -2
  322. package/dist/types/components/six-error/six-error.d.ts +9 -0
  323. package/dist/types/components/six-input/six-input.d.ts +7 -2
  324. package/dist/types/components/six-range/six-range.d.ts +4 -1
  325. package/dist/types/components/six-select/six-select.d.ts +4 -1
  326. package/dist/types/components/six-sidebar-item/six-sidebar-item.d.ts +5 -0
  327. package/dist/types/components/six-sidebar-item-group/six-sidebar-item-group.d.ts +6 -0
  328. package/dist/types/components/six-switch/six-switch.d.ts +8 -1
  329. package/dist/types/components/six-tab-group/six-tab-group.d.ts +0 -3
  330. package/dist/types/components/six-tag/six-tag.d.ts +8 -0
  331. package/dist/types/components/six-textarea/six-textarea.d.ts +4 -1
  332. package/dist/types/components/six-timepicker/six-timepicker.d.ts +5 -2
  333. package/dist/types/components.d.ts +505 -16
  334. package/dist/types/functional-components/form-control/form-control.d.ts +6 -2
  335. package/dist/types/stencil-public-runtime.d.ts +26 -3
  336. package/dist/types/utils/animation.d.ts +12 -0
  337. package/dist/ui-library/{p-330a4988.entry.js → p-0416ec85.entry.js} +2 -2
  338. package/dist/ui-library/{p-1f18768a.js → p-052aa8d3.js} +2 -2
  339. package/dist/ui-library/{p-ae601a0f.entry.js → p-0d8154b1.entry.js} +2 -2
  340. package/dist/ui-library/p-120a1b66.entry.js +2 -0
  341. package/dist/ui-library/p-120a1b66.entry.js.map +1 -0
  342. package/dist/ui-library/{p-9c1be3fb.entry.js → p-16eb37cd.entry.js} +2 -2
  343. package/dist/ui-library/{p-878226a0.entry.js → p-1f7dac36.entry.js} +2 -2
  344. package/dist/ui-library/{p-a6a9ee96.entry.js → p-20cb60c9.entry.js} +2 -2
  345. package/dist/ui-library/{p-613283a7.entry.js → p-21606e14.entry.js} +2 -2
  346. package/dist/ui-library/{p-411ed539.entry.js → p-2280038f.entry.js} +2 -2
  347. package/dist/ui-library/p-24e80289.entry.js +2 -0
  348. package/dist/ui-library/p-24e80289.entry.js.map +1 -0
  349. package/dist/ui-library/{p-264d4ea8.entry.js → p-27987d45.entry.js} +2 -2
  350. package/dist/ui-library/{p-cd67da3d.entry.js → p-2945a132.entry.js} +2 -2
  351. package/dist/ui-library/{p-3cc5addb.entry.js → p-2e99f389.entry.js} +2 -2
  352. package/dist/ui-library/p-3d7678a8.entry.js +2 -0
  353. package/dist/ui-library/p-3d7678a8.entry.js.map +1 -0
  354. package/dist/ui-library/p-4196a75a.entry.js +2 -0
  355. package/dist/ui-library/p-4196a75a.entry.js.map +1 -0
  356. package/dist/ui-library/p-48b7c199.entry.js +2 -0
  357. package/dist/ui-library/p-48b7c199.entry.js.map +1 -0
  358. package/dist/ui-library/{p-37557787.entry.js → p-51630491.entry.js} +2 -2
  359. package/dist/ui-library/{p-ed381ad9.entry.js → p-5218986b.entry.js} +2 -2
  360. package/dist/ui-library/p-5218986b.entry.js.map +1 -0
  361. package/dist/ui-library/p-5904d3c3.entry.js +2 -0
  362. package/dist/ui-library/p-5904d3c3.entry.js.map +1 -0
  363. package/dist/ui-library/p-66a48dc4.entry.js +2 -0
  364. package/dist/ui-library/{p-d367f4f9.entry.js.map → p-66a48dc4.entry.js.map} +1 -1
  365. package/dist/ui-library/{p-91b51800.entry.js → p-66d1d93d.entry.js} +2 -2
  366. package/dist/ui-library/p-6aced322.entry.js +2 -0
  367. package/dist/ui-library/p-6aced322.entry.js.map +1 -0
  368. package/dist/ui-library/p-6e87aeea.entry.js +2 -0
  369. package/dist/ui-library/p-6e87aeea.entry.js.map +1 -0
  370. package/dist/ui-library/p-74179b03.entry.js +2 -0
  371. package/dist/ui-library/p-74179b03.entry.js.map +1 -0
  372. package/dist/ui-library/{p-1d5ee1a0.entry.js → p-77424c6b.entry.js} +2 -2
  373. package/dist/ui-library/{p-13b43e04.entry.js → p-7d00de3a.entry.js} +2 -2
  374. package/dist/ui-library/{p-cdaed936.entry.js → p-7e9257f3.entry.js} +2 -2
  375. package/dist/ui-library/p-8226e363.entry.js +2 -0
  376. package/dist/ui-library/p-8226e363.entry.js.map +1 -0
  377. package/dist/ui-library/{p-99e24daf.entry.js → p-8296e24c.entry.js} +2 -2
  378. package/dist/ui-library/{p-99e24daf.entry.js.map → p-8296e24c.entry.js.map} +1 -1
  379. package/dist/ui-library/{p-7e3ad38a.entry.js → p-93a9b693.entry.js} +2 -2
  380. package/dist/ui-library/{p-5af44076.entry.js → p-94bd8347.entry.js} +2 -2
  381. package/dist/ui-library/{p-ee950ce2.entry.js → p-9bec3e14.entry.js} +2 -2
  382. package/dist/ui-library/{p-9b354f5d.entry.js → p-a15928c4.entry.js} +2 -2
  383. package/dist/ui-library/p-a4348ad4.entry.js +2 -0
  384. package/dist/ui-library/p-a4348ad4.entry.js.map +1 -0
  385. package/dist/ui-library/{p-7afafb9d.entry.js → p-acd3ecfd.entry.js} +2 -2
  386. package/dist/ui-library/p-ae383f66.entry.js +2 -0
  387. package/dist/ui-library/p-ae383f66.entry.js.map +1 -0
  388. package/dist/ui-library/p-af0e163e.entry.js +2 -0
  389. package/dist/ui-library/p-af0e163e.entry.js.map +1 -0
  390. package/dist/ui-library/p-b3a14438.entry.js +2 -0
  391. package/dist/ui-library/p-b3a14438.entry.js.map +1 -0
  392. package/dist/ui-library/{p-dfed33c5.entry.js → p-b42fd9c3.entry.js} +2 -2
  393. package/dist/ui-library/p-b5fdfa6a.js +3 -0
  394. package/dist/ui-library/p-b5fdfa6a.js.map +1 -0
  395. package/dist/ui-library/p-b7597736.entry.js +2 -0
  396. package/dist/ui-library/p-b7597736.entry.js.map +1 -0
  397. package/dist/ui-library/{p-c03ebf7d.entry.js → p-b906a605.entry.js} +2 -2
  398. package/dist/ui-library/{p-ac099e6b.entry.js → p-b97764a1.entry.js} +2 -2
  399. package/dist/ui-library/p-bbefcec9.entry.js +2 -0
  400. package/dist/ui-library/p-bbefcec9.entry.js.map +1 -0
  401. package/dist/ui-library/{p-b351f889.entry.js → p-c75694df.entry.js} +2 -2
  402. package/dist/ui-library/p-cb32f8d2.entry.js +2 -0
  403. package/dist/ui-library/p-cb32f8d2.entry.js.map +1 -0
  404. package/dist/ui-library/{p-a0f290d0.entry.js → p-cd3281fb.entry.js} +2 -2
  405. package/dist/ui-library/{p-19ed7a4c.entry.js → p-cec8c149.entry.js} +2 -2
  406. package/dist/ui-library/{p-724875b0.entry.js → p-d1ba2ad5.entry.js} +2 -2
  407. package/dist/ui-library/{p-346f9557.entry.js → p-d2196113.entry.js} +2 -2
  408. package/dist/ui-library/p-de7a9448.entry.js +2 -0
  409. package/dist/ui-library/p-de7a9448.entry.js.map +1 -0
  410. package/dist/ui-library/{p-a55c7258.entry.js → p-df1c4a1f.entry.js} +2 -2
  411. package/dist/ui-library/{p-95fbdd0b.entry.js → p-e740215a.entry.js} +2 -2
  412. package/dist/ui-library/p-f3fdc121.js +2 -0
  413. package/dist/ui-library/p-f3fdc121.js.map +1 -0
  414. package/dist/ui-library/ui-library.css +2 -2
  415. package/dist/ui-library/ui-library.esm.js +1 -1
  416. package/dist/ui-library/ui-library.esm.js.map +1 -1
  417. package/package.json +14 -11
  418. package/dist/cjs/form-control-d369af14.js.map +0 -1
  419. package/dist/cjs/index-900437fc.js.map +0 -1
  420. package/dist/cjs/scroll-03678de1.js.map +0 -1
  421. package/dist/collection/components/six-tab/test/six-tab.spec.js +0 -20
  422. package/dist/collection/components/six-tab/test/six-tab.spec.js.map +0 -1
  423. package/dist/collection/components/six-tab-group/test/six-tab-group.spec.js +0 -45
  424. package/dist/collection/components/six-tab-group/test/six-tab-group.spec.js.map +0 -1
  425. package/dist/esm/form-control-32cb533f.js.map +0 -1
  426. package/dist/esm/index-8a74f992.js.map +0 -1
  427. package/dist/ui-library/p-02981b91.entry.js +0 -2
  428. package/dist/ui-library/p-02981b91.entry.js.map +0 -1
  429. package/dist/ui-library/p-1256cc0a.entry.js +0 -2
  430. package/dist/ui-library/p-1256cc0a.entry.js.map +0 -1
  431. package/dist/ui-library/p-21b3b321.entry.js +0 -2
  432. package/dist/ui-library/p-21b3b321.entry.js.map +0 -1
  433. package/dist/ui-library/p-29ac3d7d.entry.js +0 -2
  434. package/dist/ui-library/p-29ac3d7d.entry.js.map +0 -1
  435. package/dist/ui-library/p-314b2096.entry.js +0 -2
  436. package/dist/ui-library/p-314b2096.entry.js.map +0 -1
  437. package/dist/ui-library/p-3d9de119.entry.js +0 -2
  438. package/dist/ui-library/p-3d9de119.entry.js.map +0 -1
  439. package/dist/ui-library/p-4705a51e.entry.js +0 -2
  440. package/dist/ui-library/p-4705a51e.entry.js.map +0 -1
  441. package/dist/ui-library/p-4abed9df.entry.js +0 -2
  442. package/dist/ui-library/p-4abed9df.entry.js.map +0 -1
  443. package/dist/ui-library/p-5d6b7353.entry.js +0 -2
  444. package/dist/ui-library/p-5d6b7353.entry.js.map +0 -1
  445. package/dist/ui-library/p-6153045b.js +0 -3
  446. package/dist/ui-library/p-6153045b.js.map +0 -1
  447. package/dist/ui-library/p-6197fe2f.entry.js +0 -2
  448. package/dist/ui-library/p-6197fe2f.entry.js.map +0 -1
  449. package/dist/ui-library/p-72254eef.entry.js +0 -2
  450. package/dist/ui-library/p-72254eef.entry.js.map +0 -1
  451. package/dist/ui-library/p-83864cfe.entry.js +0 -2
  452. package/dist/ui-library/p-83864cfe.entry.js.map +0 -1
  453. package/dist/ui-library/p-9f0b43f9.entry.js +0 -2
  454. package/dist/ui-library/p-9f0b43f9.entry.js.map +0 -1
  455. package/dist/ui-library/p-b550a258.entry.js +0 -2
  456. package/dist/ui-library/p-b550a258.entry.js.map +0 -1
  457. package/dist/ui-library/p-bf87464b.entry.js +0 -2
  458. package/dist/ui-library/p-bf87464b.entry.js.map +0 -1
  459. package/dist/ui-library/p-d367f4f9.entry.js +0 -2
  460. package/dist/ui-library/p-d42c2025.js +0 -2
  461. package/dist/ui-library/p-d42c2025.js.map +0 -1
  462. package/dist/ui-library/p-ed381ad9.entry.js.map +0 -1
  463. package/dist/ui-library/p-ee8342e1.entry.js +0 -2
  464. package/dist/ui-library/p-ee8342e1.entry.js.map +0 -1
  465. package/dist/ui-library/p-ff90ffd1.entry.js +0 -2
  466. package/dist/ui-library/p-ff90ffd1.entry.js.map +0 -1
  467. package/readme.md +0 -156
  468. /package/dist/ui-library/{p-330a4988.entry.js.map → p-0416ec85.entry.js.map} +0 -0
  469. /package/dist/ui-library/{p-1f18768a.js.map → p-052aa8d3.js.map} +0 -0
  470. /package/dist/ui-library/{p-ae601a0f.entry.js.map → p-0d8154b1.entry.js.map} +0 -0
  471. /package/dist/ui-library/{p-9c1be3fb.entry.js.map → p-16eb37cd.entry.js.map} +0 -0
  472. /package/dist/ui-library/{p-878226a0.entry.js.map → p-1f7dac36.entry.js.map} +0 -0
  473. /package/dist/ui-library/{p-a6a9ee96.entry.js.map → p-20cb60c9.entry.js.map} +0 -0
  474. /package/dist/ui-library/{p-613283a7.entry.js.map → p-21606e14.entry.js.map} +0 -0
  475. /package/dist/ui-library/{p-411ed539.entry.js.map → p-2280038f.entry.js.map} +0 -0
  476. /package/dist/ui-library/{p-264d4ea8.entry.js.map → p-27987d45.entry.js.map} +0 -0
  477. /package/dist/ui-library/{p-cd67da3d.entry.js.map → p-2945a132.entry.js.map} +0 -0
  478. /package/dist/ui-library/{p-3cc5addb.entry.js.map → p-2e99f389.entry.js.map} +0 -0
  479. /package/dist/ui-library/{p-37557787.entry.js.map → p-51630491.entry.js.map} +0 -0
  480. /package/dist/ui-library/{p-91b51800.entry.js.map → p-66d1d93d.entry.js.map} +0 -0
  481. /package/dist/ui-library/{p-1d5ee1a0.entry.js.map → p-77424c6b.entry.js.map} +0 -0
  482. /package/dist/ui-library/{p-13b43e04.entry.js.map → p-7d00de3a.entry.js.map} +0 -0
  483. /package/dist/ui-library/{p-cdaed936.entry.js.map → p-7e9257f3.entry.js.map} +0 -0
  484. /package/dist/ui-library/{p-7e3ad38a.entry.js.map → p-93a9b693.entry.js.map} +0 -0
  485. /package/dist/ui-library/{p-5af44076.entry.js.map → p-94bd8347.entry.js.map} +0 -0
  486. /package/dist/ui-library/{p-ee950ce2.entry.js.map → p-9bec3e14.entry.js.map} +0 -0
  487. /package/dist/ui-library/{p-9b354f5d.entry.js.map → p-a15928c4.entry.js.map} +0 -0
  488. /package/dist/ui-library/{p-7afafb9d.entry.js.map → p-acd3ecfd.entry.js.map} +0 -0
  489. /package/dist/ui-library/{p-dfed33c5.entry.js.map → p-b42fd9c3.entry.js.map} +0 -0
  490. /package/dist/ui-library/{p-c03ebf7d.entry.js.map → p-b906a605.entry.js.map} +0 -0
  491. /package/dist/ui-library/{p-ac099e6b.entry.js.map → p-b97764a1.entry.js.map} +0 -0
  492. /package/dist/ui-library/{p-b351f889.entry.js.map → p-c75694df.entry.js.map} +0 -0
  493. /package/dist/ui-library/{p-a0f290d0.entry.js.map → p-cd3281fb.entry.js.map} +0 -0
  494. /package/dist/ui-library/{p-19ed7a4c.entry.js.map → p-cec8c149.entry.js.map} +0 -0
  495. /package/dist/ui-library/{p-724875b0.entry.js.map → p-d1ba2ad5.entry.js.map} +0 -0
  496. /package/dist/ui-library/{p-346f9557.entry.js.map → p-d2196113.entry.js.map} +0 -0
  497. /package/dist/ui-library/{p-a55c7258.entry.js.map → p-df1c4a1f.entry.js.map} +0 -0
  498. /package/dist/ui-library/{p-95fbdd0b.entry.js.map → p-e740215a.entry.js.map} +0 -0
@@ -11,12 +11,14 @@
11
11
  * @prop --hide-timing-function: The timing function (easing) to use for the hide transition.
12
12
  * @prop --show-duration: The length of the show transition.
13
13
  * @prop --show-timing-function: The timing function (easing) to use for the show transition.
14
+ * @prop --horizontal-padding: The horizontal padding
14
15
  */
15
16
  :host {
16
17
  --hide-duration: var(--six-transition-medium);
17
18
  --hide-timing-function: ease;
18
19
  --show-duration: var(--six-transition-medium);
19
20
  --show-timing-function: ease;
21
+ --horizontal-padding: var(--six-spacing-medium);
20
22
  font-family: var(--six-font-family);
21
23
  display: block;
22
24
  }
@@ -61,7 +63,7 @@
61
63
  display: flex;
62
64
  align-items: center;
63
65
  border-radius: inherit;
64
- padding: var(--six-spacing-medium);
66
+ padding: var(--six-spacing-medium) var(--horizontal-padding);
65
67
  user-select: none;
66
68
  cursor: pointer;
67
69
  }
@@ -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;AAGtC,MAAM,gBAAgB,GAAG,wBAAwB,EAAE,CAAC;AACpD,IAAI,EAAE,GAAG,CAAC,CAAC;AAEX;;;;;;;;;;;;;;;;;;GAkBG;AAOH,MAAM,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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"]}
1
+ {"version":3,"file":"six-drawer.js","sourceRoot":"","sources":["../../../src/components/six-drawer/six-drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAA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AAgB,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"]}
@@ -36,7 +36,8 @@
36
36
  border-radius: var(--six-border-radius-medium);
37
37
  box-shadow: var(--six-elevation-2dp);
38
38
  opacity: 0;
39
- overflow: auto;
39
+ overflow-y: auto;
40
+ overflow-x: hidden;
40
41
  overscroll-behavior: none;
41
42
  pointer-events: none;
42
43
  transform: scale(0.9);
@@ -0,0 +1,5 @@
1
+ .six-error-container {
2
+ text-align: left;
3
+ color: var(--six-color-danger-800);
4
+ width: 100%;
5
+ }
@@ -0,0 +1,25 @@
1
+ import { h } from "@stencil/core";
2
+ /**
3
+ * @since 4.0
4
+ * @status beta
5
+ *
6
+ * @slot default - The error's message content
7
+ */
8
+ export class SixError {
9
+ render() {
10
+ return (h("div", { class: "six-error-container" }, h("slot", null)));
11
+ }
12
+ static get is() { return "six-error"; }
13
+ static get encapsulation() { return "shadow"; }
14
+ static get originalStyleUrls() {
15
+ return {
16
+ "$": ["six-error.scss"]
17
+ };
18
+ }
19
+ static get styleUrls() {
20
+ return {
21
+ "$": ["six-error.css"]
22
+ };
23
+ }
24
+ }
25
+ //# sourceMappingURL=six-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"six-error.js","sourceRoot":"","sources":["../../../src/components/six-error/six-error.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAE7C;;;;;GAKG;AAOH,MAAM,OAAO,QAAQ;EACnB,MAAM;IACJ,OAAO,CACL,WAAK,KAAK,EAAC,qBAAqB;MAC9B,eAAQ,CACJ,CACP,CAAC;EACJ,CAAC;;;;;;;;;CACF","sourcesContent":["import { Component, h } from '@stencil/core';\n\n/**\n * @since 4.0\n * @status beta\n *\n * @slot default - The error's message content\n */\n\n@Component({\n tag: 'six-error',\n styleUrl: 'six-error.scss',\n shadow: true,\n})\nexport class SixError {\n render() {\n return (\n <div class=\"six-error-container\">\n <slot />\n </div>\n );\n }\n}\n"]}
@@ -14,6 +14,7 @@
14
14
  }
15
15
  .form-control .form-control__error-text {
16
16
  display: none;
17
+ text-align: left;
17
18
  }
18
19
 
19
20
  .form-control--has-label .form-control__label {
@@ -25,6 +26,9 @@
25
26
  .form-control--has-label .form-control__label__required::after {
26
27
  color: var(--six-color-danger-800);
27
28
  content: "*";
29
+ transform: scale(1.1);
30
+ margin-left: var(--six-spacing-xxx-small);
31
+ position: absolute;
28
32
  }
29
33
  .form-control--has-label.form-control--small .form-control__label {
30
34
  font-size: var(--six-input-label-font-size-small);
@@ -56,7 +60,6 @@
56
60
 
57
61
  .form-control--has-error-text .form-control__error-text {
58
62
  display: block;
59
- color: var(--six-color-danger-800);
60
63
  margin-top: var(--six-spacing-xxx-small);
61
64
  }
62
65
  .form-control--has-error-text .form-control__error-text ::slotted(*) {
@@ -26,7 +26,9 @@ describe('six-group-label', () => {
26
26
  <div class="form-control__input">
27
27
  <slot></slot>
28
28
  </div>
29
- <div aria-hidden="true" class="form-control__error-text" part="error-text"></div>
29
+ <div aria-hidden="true" class="form-control__error-text" part="error-text">
30
+ <slot name="error-text"></slot>
31
+ </div>
30
32
  <div aria-hidden="true" class="form-control__help-text" id="label-help-text-1" part="help-text">
31
33
  <slot name="help-text"></slot>
32
34
  </div>
@@ -1 +1 @@
1
- {"version":3,"file":"six-group-label.spec.js","sourceRoot":"","sources":["../../../../src/components/six-group-label/test/six-group-label.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;EAC/B,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,GAAG,EAAE,CAAC,CAAC;MAC1D,OAAO,EAAE,IAAI,CAAC,EAAE,EAAE;MAClB,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE;MACpB,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE;KACtB,CAAC,CAAC,CAAC;IACJ,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,aAAa,CAAC;MAC3B,IAAI,EAAE;;;;;gCAKoB;KAC3B,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;KAqB7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { SixGroupLabel } from '../six-group-label';\n\ndescribe('six-group-label', () => {\n it('renders', async () => {\n global.ResizeObserver = jest.fn().mockImplementation(() => ({\n observe: jest.fn(),\n unobserve: jest.fn(),\n disconnect: jest.fn(),\n }));\n const page = await newSpecPage({\n components: [SixGroupLabel],\n html: `<six-group-label>\n <six-layout-grid columns=\"2\">\n <six-radio name=\"option\" checked>Option 1</six-radio>\n <six-radio name=\"option\">Option 2</six-radio>\n </six-layout-grid>\n </six-group-label>`,\n });\n expect(page.root).toEqualHtml(`\n <six-group-label size=\"medium\">\n <mock:shadow-root>\n <div class=\"form-control form-control--medium\" part=\"form-control\">\n <label aria-hidden=\"true\" class=\"form-control__label\" htmlfor=\"label-1\" id=\"label-label-1\" part=\"label\">\n <slot name=\"label\"></slot>\n </label>\n <div class=\"form-control__input\">\n <slot></slot>\n </div>\n <div aria-hidden=\"true\" class=\"form-control__error-text\" part=\"error-text\"></div>\n <div aria-hidden=\"true\" class=\"form-control__help-text\" id=\"label-help-text-1\" part=\"help-text\">\n <slot name=\"help-text\"></slot>\n </div>\n </div>\n </mock:shadow-root>\n <six-layout-grid columns=\"2\">\n <six-radio checked=\"\" name=\"option\">Option 1</six-radio></mock:shadow-root>\n <six-radio name=\"option\">Option 2</six-radio>\n </six-layout-grid>\n </six-group-label>\n `);\n });\n});\n"]}
1
+ {"version":3,"file":"six-group-label.spec.js","sourceRoot":"","sources":["../../../../src/components/six-group-label/test/six-group-label.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;EAC/B,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,GAAG,EAAE,CAAC,CAAC;MAC1D,OAAO,EAAE,IAAI,CAAC,EAAE,EAAE;MAClB,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE;MACpB,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE;KACtB,CAAC,CAAC,CAAC;IACJ,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,aAAa,CAAC;MAC3B,IAAI,EAAE;;;;;gCAKoB;KAC3B,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;KAuB7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { SixGroupLabel } from '../six-group-label';\n\ndescribe('six-group-label', () => {\n it('renders', async () => {\n global.ResizeObserver = jest.fn().mockImplementation(() => ({\n observe: jest.fn(),\n unobserve: jest.fn(),\n disconnect: jest.fn(),\n }));\n const page = await newSpecPage({\n components: [SixGroupLabel],\n html: `<six-group-label>\n <six-layout-grid columns=\"2\">\n <six-radio name=\"option\" checked>Option 1</six-radio>\n <six-radio name=\"option\">Option 2</six-radio>\n </six-layout-grid>\n </six-group-label>`,\n });\n expect(page.root).toEqualHtml(`\n <six-group-label size=\"medium\">\n <mock:shadow-root>\n <div class=\"form-control form-control--medium\" part=\"form-control\">\n <label aria-hidden=\"true\" class=\"form-control__label\" htmlfor=\"label-1\" id=\"label-label-1\" part=\"label\">\n <slot name=\"label\"></slot>\n </label>\n <div class=\"form-control__input\">\n <slot></slot>\n </div>\n <div aria-hidden=\"true\" class=\"form-control__error-text\" part=\"error-text\">\n <slot name=\"error-text\"></slot>\n </div>\n <div aria-hidden=\"true\" class=\"form-control__help-text\" id=\"label-help-text-1\" part=\"help-text\">\n <slot name=\"help-text\"></slot>\n </div>\n </div>\n </mock:shadow-root>\n <six-layout-grid columns=\"2\">\n <six-radio checked=\"\" name=\"option\">Option 1</six-radio></mock:shadow-root>\n <six-radio name=\"option\">Option 2</six-radio>\n </six-layout-grid>\n </six-group-label>\n `);\n });\n});\n"]}
@@ -33,6 +33,10 @@
33
33
  .icon-button:focus {
34
34
  outline: none;
35
35
  }
36
+ .icon-button:focus-visible {
37
+ outline: var(--six-focus-ring);
38
+ outline-offset: var(--six-focus-ring-offset);
39
+ }
36
40
 
37
41
  .icon-button--disabled {
38
42
  opacity: 0.5;
@@ -43,10 +47,6 @@
43
47
  cursor: not-allowed;
44
48
  }
45
49
 
46
- .focus-visible.icon-button:focus {
47
- box-shadow: var(--six-button-focus-shadow);
48
- }
49
-
50
50
  .icon-button ::slotted(six-badge) {
51
51
  position: absolute;
52
52
  top: 0;
@@ -14,6 +14,7 @@
14
14
  }
15
15
  .form-control .form-control__error-text {
16
16
  display: none;
17
+ text-align: left;
17
18
  }
18
19
 
19
20
  .form-control--has-label .form-control__label {
@@ -25,6 +26,9 @@
25
26
  .form-control--has-label .form-control__label__required::after {
26
27
  color: var(--six-color-danger-800);
27
28
  content: "*";
29
+ transform: scale(1.1);
30
+ margin-left: var(--six-spacing-xxx-small);
31
+ position: absolute;
28
32
  }
29
33
  .form-control--has-label.form-control--small .form-control__label {
30
34
  font-size: var(--six-input-label-font-size-small);
@@ -56,7 +60,6 @@
56
60
 
57
61
  .form-control--has-error-text .form-control__error-text {
58
62
  display: block;
59
- color: var(--six-color-danger-800);
60
63
  margin-top: var(--six-spacing-xxx-small);
61
64
  }
62
65
  .form-control--has-error-text .form-control__error-text ::slotted(*) {
@@ -22,9 +22,10 @@ let id = 0;
22
22
  * @slot show-password-icon - An icon to use in lieu of the default show password icon.
23
23
  * @slot hide-password-icon - An icon to use in lieu of the default hide password icon.
24
24
  * @slot help-text - Help text that describes how to use the input. Alternatively, you can use the help-text prop.
25
+ * @slot error-text - Error text that is shown when the status is set to invalid. Alternatively, you can use the error-text prop.
25
26
  *
26
27
  * @part base - The component's base wrapper.
27
- * @part form-control - The form control that wraps the label, input, and help-text.
28
+ * @part form-control - The form control that wraps the label, input, error-text and help-text.
28
29
  * @part label - The input label.
29
30
  * @part input - The input control.
30
31
  * @part prefix - The input prefix container.
@@ -32,6 +33,7 @@ let id = 0;
32
33
  * @part password-toggle-button - The password toggle button.
33
34
  * @part suffix - The input suffix container.
34
35
  * @part help-text - The input help text.
36
+ * @part error-text - The input error text.
35
37
  */
36
38
  export class SixInput {
37
39
  constructor() {
@@ -88,10 +90,12 @@ export class SixInput {
88
90
  this.handleSlotChange = () => {
89
91
  this.hasHelpTextSlot = hasSlot(this.host, 'help-text');
90
92
  this.hasLabelSlot = hasSlot(this.host, 'label');
93
+ this.hasErrorSlot = hasSlot(this.host, 'error-text');
91
94
  };
92
95
  this.hasFocus = false;
93
96
  this.hasHelpTextSlot = false;
94
97
  this.hasLabelSlot = false;
98
+ this.hasErrorSlot = false;
95
99
  this.isPasswordVisible = false;
96
100
  this.type = 'text';
97
101
  this.size = 'medium';
@@ -116,6 +120,7 @@ export class SixInput {
116
120
  this.spellcheck = false;
117
121
  this.label = '';
118
122
  this.errorText = '';
123
+ this.errorTextCount = undefined;
119
124
  this.invalid = false;
120
125
  this.clearable = false;
121
126
  this.togglePassword = false;
@@ -184,7 +189,7 @@ export class SixInput {
184
189
  return ((_a = this.value) !== null && _a !== void 0 ? _a : '').toString();
185
190
  }
186
191
  render() {
187
- return (h(FormControl, { inputId: this.inputId, label: this.label, labelId: this.labelId, hasLabelSlot: this.hasLabelSlot, helpTextId: this.helpTextId, helpText: this.helpText, hasHelpTextSlot: this.hasHelpTextSlot, errorTextId: this.errorTextId, errorText: this.errorText, size: this.size, disabled: this.disabled, required: this.required, displayError: this.invalid }, h("div", { part: "base", class: {
192
+ return (h(FormControl, { inputId: this.inputId, label: this.label, labelId: this.labelId, hasLabelSlot: this.hasLabelSlot, helpTextId: this.helpTextId, helpText: this.helpText, hasHelpTextSlot: this.hasHelpTextSlot, errorTextId: this.errorTextId, errorText: this.errorText, errorTextCount: this.errorTextCount, hasErrorTextSlot: this.hasErrorSlot, size: this.size, disabled: this.disabled, required: this.required, displayError: this.invalid }, h("div", { part: "base", class: {
188
193
  input: true,
189
194
  // Sizes
190
195
  'input--small': this.size === 'small',
@@ -609,8 +614,8 @@ export class SixInput {
609
614
  "type": "string",
610
615
  "mutable": false,
611
616
  "complexType": {
612
- "original": "string",
613
- "resolved": "string",
617
+ "original": "string | string[]",
618
+ "resolved": "string | string[]",
614
619
  "references": {}
615
620
  },
616
621
  "required": false,
@@ -623,6 +628,23 @@ export class SixInput {
623
628
  "reflect": false,
624
629
  "defaultValue": "''"
625
630
  },
631
+ "errorTextCount": {
632
+ "type": "number",
633
+ "mutable": false,
634
+ "complexType": {
635
+ "original": "number",
636
+ "resolved": "number | undefined",
637
+ "references": {}
638
+ },
639
+ "required": false,
640
+ "optional": true,
641
+ "docs": {
642
+ "tags": [],
643
+ "text": "The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1"
644
+ },
645
+ "attribute": "error-text-count",
646
+ "reflect": false
647
+ },
626
648
  "invalid": {
627
649
  "type": "boolean",
628
650
  "mutable": false,
@@ -719,6 +741,7 @@ export class SixInput {
719
741
  "hasFocus": {},
720
742
  "hasHelpTextSlot": {},
721
743
  "hasLabelSlot": {},
744
+ "hasErrorSlot": {},
722
745
  "isPasswordVisible": {}
723
746
  };
724
747
  }
@@ -1 +1 @@
1
- {"version":3,"file":"six-input.js","sourceRoot":"","sources":["../../../src/components/six-input/six-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,WAAW,MAAM,uDAAuD,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,UAAU,GAAwE;EACtF,KAAK,EAAE,QAAQ;EACf,MAAM,EAAE,OAAO;EACf,KAAK,EAAE,QAAQ;CAChB,CAAC;AAEF,IAAI,EAAE,GAAG,CAAC,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAOH,MAAM,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport FormControl from '../../functional-components/form-control/form-control';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { submitForm } from '../../utils/form';\n\nconst ICON_SIZES: Record<'small' | 'medium' | 'large', 'xSmall' | 'small' | 'medium'> = {\n large: 'medium',\n medium: 'small',\n small: 'xSmall',\n};\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot label - The input's label. Alternatively, you can use the label prop.\n * @slot prefix - Used to prepend an icon or similar element to the input.\n * @slot suffix - Used to append an icon or similar element to the input.\n * @slot clear-icon - An icon to use in lieu of the default clear icon.\n * @slot show-password-icon - An icon to use in lieu of the default show password icon.\n * @slot hide-password-icon - An icon to use in lieu of the default hide password icon.\n * @slot help-text - Help text that describes how to use the input. Alternatively, you can use the help-text prop.\n *\n * @part base - The component's base wrapper.\n * @part form-control - The form control that wraps the label, input, and help-text.\n * @part label - The input label.\n * @part input - The input control.\n * @part prefix - The input prefix container.\n * @part clear-button - The clear button.\n * @part password-toggle-button - The password toggle button.\n * @part suffix - The input suffix container.\n * @part help-text - The input help text.\n */\n\n@Component({\n tag: 'six-input',\n styleUrl: 'six-input.scss',\n shadow: true,\n})\nexport class SixInput {\n private inputId = `input-${++id}`;\n private labelId = `input-label-${id}`;\n private helpTextId = `input-help-text-${id}`;\n private errorTextId = `input-error-text-${id}`;\n private nativeInput?: HTMLInputElement;\n private eventListeners = new EventListeners();\n\n @Element() host!: HTMLSixInputElement;\n\n @State() hasFocus = false;\n @State() hasHelpTextSlot = false;\n @State() hasLabelSlot = false;\n @State() isPasswordVisible = false;\n\n /** The input's type. */\n @Prop({ reflect: true }) type: 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url' = 'text';\n\n /** The input's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** The input's name attribute. */\n @Prop({ reflect: true }) name = '';\n\n /** The input's value attribute. */\n @Prop({ mutable: true, reflect: true }) value = '';\n\n /** Set to true to draw a pill-style input with rounded edges. */\n @Prop({ reflect: true }) pill = false;\n\n /** The input's help text. Alternatively, you can use the help-text slot. */\n @Prop() helpText = '';\n\n /** The input's placeholder text. */\n @Prop() placeholder?: string;\n\n /** Set to true to disable the input. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true to make the input readonly. */\n @Prop({ reflect: true }) readonly = false;\n\n /** The minimum length of input that will be considered valid. */\n @Prop({ reflect: true }) minlength?: number;\n\n /** The maximum length of input that will be considered valid. */\n @Prop({ reflect: true }) maxlength?: number;\n\n /** The input's minimum value. */\n @Prop({ reflect: true }) min?: number;\n\n /** The input's maximum value. */\n @Prop({ reflect: true }) max?: number;\n\n /** The input's step attribute. */\n @Prop({ reflect: true }) step?: number;\n\n /** A pattern to validate input against. */\n @Prop({ reflect: true }) pattern?: string;\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /** The input's autocaptialize attribute. */\n @Prop() autocapitalize = 'off';\n\n /** The input's autocorrect attribute. */\n @Prop() autocorrect: 'on' | 'off' = 'off';\n\n /** The input's autocomplete attribute. */\n @Prop() autocomplete = 'off';\n\n /** The input's autofocus attribute. */\n @Prop() autofocus = false;\n\n /** Enables spell checking on the input. */\n @Prop() spellcheck = false;\n\n /** The label text. */\n @Prop() label = '';\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText = '';\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n /** Set to true to add a clear button when the input is populated. */\n @Prop() clearable = false;\n\n /** Set to true to add a password toggle button for password inputs. */\n @Prop() togglePassword = false;\n\n /** The input's inputmode attribute. */\n @Prop() inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';\n\n /** Set to render as line */\n @Prop() line = false;\n\n @Watch('helpText')\n @Watch('errorText')\n @Watch('label')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n @Watch('value')\n handleValueChange() {\n this.value = this.getValue();\n if (this.nativeInput != null && this.nativeInput.value !== this.value) {\n this.nativeInput.value = this.value;\n }\n }\n\n /** Emitted when the control's value changes. Access the new value via event.target.value. */\n @Event({ eventName: 'six-input-change' }) sixChange!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the clear button is activated. */\n @Event({ eventName: 'six-input-clear' }) sixClear!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control receives input. Access the new value via event.target.value. */\n @Event({ eventName: 'six-input-input' }) sixInput!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-input-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control loses focus. Access the new value via event.target.value. */\n @Event({ eventName: 'six-input-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.forward('six-input-input', 'input', this.host);\n this.eventListeners.forward('six-input-change', 'change', this.host);\n this.eventListeners.forward('six-input-focus', 'focus', this.host);\n this.eventListeners.forward('six-input-blur', 'blur', this.host);\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n disconnectedCallback() {\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.removeAll();\n }\n\n /** Sets focus on the input. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeInput?.focus(options);\n }\n\n /** Removes focus from the input. */\n @Method()\n async removeFocus() {\n this.nativeInput?.blur();\n }\n\n /** Selects all the text in the input. */\n @Method()\n async select() {\n return this.nativeInput?.select();\n }\n\n /** Sets the start and end positions of the text selection (0-based). */\n @Method()\n async setSelectionRange(\n selectionStart: number,\n selectionEnd: number,\n selectionDirection: 'forward' | 'backward' | 'none' = 'none'\n ) {\n return this.nativeInput?.setSelectionRange(selectionStart, selectionEnd, selectionDirection);\n }\n\n /** Replaces a range of text with a new string. */\n @Method()\n async setRangeText(\n replacement: string,\n start: number,\n end: number,\n selectMode: 'select' | 'start' | 'end' | 'preserve' = 'preserve'\n ) {\n if (this.nativeInput == null) {\n return;\n }\n this.nativeInput.setRangeText(replacement, start, end, selectMode);\n if (this.getValue() !== this.nativeInput.value) {\n this.value = this.nativeInput.value;\n this.sixChange.emit();\n this.sixInput.emit();\n }\n }\n\n private handleChange = (event: Event) => {\n event.stopPropagation();\n if (this.nativeInput != null) {\n this.value = this.nativeInput.value;\n this.sixChange.emit();\n }\n };\n\n private handleInput = (event: Event) => {\n event.stopPropagation();\n if (this.nativeInput != null) {\n this.value = this.nativeInput.value;\n this.sixInput.emit();\n }\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit();\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleClearClick = (event: MouseEvent) => {\n this.value = '';\n this.sixClear.emit();\n this.sixInput.emit();\n this.sixChange.emit();\n if (this.nativeInput != null) {\n this.nativeInput.focus();\n }\n event.stopPropagation();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n const hasModifier = event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;\n if (event.key === 'Enter' && !hasModifier) {\n setTimeout(() => {\n if (!event.defaultPrevented && !event.isComposing) {\n submitForm(this.host);\n }\n });\n }\n };\n\n private handlePasswordToggle = () => {\n this.isPasswordVisible = !this.isPasswordVisible;\n };\n\n private handleSlotChange = () => {\n this.hasHelpTextSlot = hasSlot(this.host, 'help-text');\n this.hasLabelSlot = hasSlot(this.host, 'label');\n };\n\n private getValue(): string {\n return (this.value ?? '').toString();\n }\n\n render() {\n return (\n <FormControl\n inputId={this.inputId}\n label={this.label}\n labelId={this.labelId}\n hasLabelSlot={this.hasLabelSlot}\n helpTextId={this.helpTextId}\n helpText={this.helpText}\n hasHelpTextSlot={this.hasHelpTextSlot}\n errorTextId={this.errorTextId}\n errorText={this.errorText}\n size={this.size}\n disabled={this.disabled}\n required={this.required}\n displayError={this.invalid}\n >\n <div\n part=\"base\"\n class={{\n input: true,\n\n // Sizes\n 'input--small': this.size === 'small',\n 'input--medium': this.size === 'medium',\n 'input--large': this.size === 'large',\n\n // States\n 'input--line': this.line,\n 'input--pill': this.pill,\n 'input--disabled': this.disabled,\n 'input--focused': this.hasFocus,\n 'input--empty': this.getValue().length === 0,\n 'input--invalid': this.invalid,\n }}\n >\n <span part=\"prefix\" class=\"input__prefix\">\n <slot name=\"prefix\" />\n </span>\n\n <input\n part=\"input\"\n ref={(el) => (this.nativeInput = el)}\n id={this.inputId}\n size={1} // needed for firefox to overrule the default of 20\n class={{\n input__control: true,\n input__control__prefix: hasSlot(this.host, 'prefix'),\n }}\n type={this.type === 'password' && this.isPasswordVisible ? 'text' : this.type}\n name={this.name}\n placeholder={this.placeholder}\n disabled={this.disabled}\n readonly={this.readonly}\n minLength={this.minlength}\n maxLength={this.maxlength}\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.getValue()}\n autoCapitalize={this.autocapitalize}\n autoComplete={this.autocomplete}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n spellcheck={this.spellcheck}\n pattern={this.pattern}\n required={this.required}\n inputMode={this.inputmode}\n aria-labelledby={this.labelId}\n aria-describedby={this.helpTextId}\n aria-invalid={this.invalid ? 'true' : 'false'}\n onChange={this.handleChange}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n onKeyDown={this.handleKeyDown}\n data-testid=\"input-control\"\n />\n\n {this.clearable && (\n <button\n part=\"clear-button\"\n class=\"input__clear\"\n type=\"button\"\n onClick={this.handleClearClick}\n tabindex=\"-1\"\n data-testid=\"input-clear-button\"\n >\n <slot name=\"clear-icon\">\n <six-icon size={ICON_SIZES[this.size]}>clear</six-icon>\n </slot>\n </button>\n )}\n\n {this.togglePassword && (\n <button\n part=\"password-toggle-button\"\n class=\"input__password-toggle\"\n type=\"button\"\n onClick={this.handlePasswordToggle}\n tabindex=\"-1\"\n >\n {this.isPasswordVisible ? (\n <slot name=\"show-password-icon\">\n <six-icon size={ICON_SIZES[this.size]}>visibility_off</six-icon>\n </slot>\n ) : (\n <slot name=\"hide-password-icon\">\n <six-icon size={ICON_SIZES[this.size]}>visibility</six-icon>\n </slot>\n )}\n </button>\n )}\n\n <span part=\"suffix\" class=\"input__suffix\">\n <slot name=\"suffix\" />\n </span>\n </div>\n </FormControl>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"six-input.js","sourceRoot":"","sources":["../../../src/components/six-input/six-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,WAAW,MAAM,uDAAuD,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MA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AC,IAAI,CAAC,IAAI,CAAC,iBAAuB,CACvD,CACR,CACM,CACV;QAED,YAAM,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,eAAe;UACvC,YAAM,IAAI,EAAC,QAAQ,GAAG,CACjB,CACH,CACM,CACf,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport FormControl from '../../functional-components/form-control/form-control';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { submitForm } from '../../utils/form';\n\nconst ICON_SIZES: Record<'small' | 'medium' | 'large', 'xSmall' | 'small' | 'medium'> = {\n large: 'medium',\n medium: 'small',\n small: 'xSmall',\n};\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot label - The input's label. Alternatively, you can use the label prop.\n * @slot prefix - Used to prepend an icon or similar element to the input.\n * @slot suffix - Used to append an icon or similar element to the input.\n * @slot clear-icon - An icon to use in lieu of the default clear icon.\n * @slot show-password-icon - An icon to use in lieu of the default show password icon.\n * @slot hide-password-icon - An icon to use in lieu of the default hide password icon.\n * @slot help-text - Help text that describes how to use the input. Alternatively, you can use the help-text prop.\n * @slot error-text - Error text that is shown when the status is set to invalid. Alternatively, you can use the error-text prop.\n *\n * @part base - The component's base wrapper.\n * @part form-control - The form control that wraps the label, input, error-text and help-text.\n * @part label - The input label.\n * @part input - The input control.\n * @part prefix - The input prefix container.\n * @part clear-button - The clear button.\n * @part password-toggle-button - The password toggle button.\n * @part suffix - The input suffix container.\n * @part help-text - The input help text.\n * @part error-text - The input error text.\n */\n\n@Component({\n tag: 'six-input',\n styleUrl: 'six-input.scss',\n shadow: true,\n})\nexport class SixInput {\n private inputId = `input-${++id}`;\n private labelId = `input-label-${id}`;\n private helpTextId = `input-help-text-${id}`;\n private errorTextId = `input-error-text-${id}`;\n private nativeInput?: HTMLInputElement;\n private eventListeners = new EventListeners();\n\n @Element() host!: HTMLSixInputElement;\n\n @State() hasFocus = false;\n @State() hasHelpTextSlot = false;\n @State() hasLabelSlot = false;\n @State() hasErrorSlot = false;\n @State() isPasswordVisible = false;\n\n /** The input's type. */\n @Prop({ reflect: true }) type: 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url' = 'text';\n\n /** The input's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** The input's name attribute. */\n @Prop({ reflect: true }) name = '';\n\n /** The input's value attribute. */\n @Prop({ mutable: true, reflect: true }) value = '';\n\n /** Set to true to draw a pill-style input with rounded edges. */\n @Prop({ reflect: true }) pill = false;\n\n /** The input's help text. Alternatively, you can use the help-text slot. */\n @Prop() helpText = '';\n\n /** The input's placeholder text. */\n @Prop() placeholder?: string;\n\n /** Set to true to disable the input. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true to make the input readonly. */\n @Prop({ reflect: true }) readonly = false;\n\n /** The minimum length of input that will be considered valid. */\n @Prop({ reflect: true }) minlength?: number;\n\n /** The maximum length of input that will be considered valid. */\n @Prop({ reflect: true }) maxlength?: number;\n\n /** The input's minimum value. */\n @Prop({ reflect: true }) min?: number;\n\n /** The input's maximum value. */\n @Prop({ reflect: true }) max?: number;\n\n /** The input's step attribute. */\n @Prop({ reflect: true }) step?: number;\n\n /** A pattern to validate input against. */\n @Prop({ reflect: true }) pattern?: string;\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /** The input's autocaptialize attribute. */\n @Prop() autocapitalize = 'off';\n\n /** The input's autocorrect attribute. */\n @Prop() autocorrect: 'on' | 'off' = 'off';\n\n /** The input's autocomplete attribute. */\n @Prop() autocomplete = 'off';\n\n /** The input's autofocus attribute. */\n @Prop() autofocus = false;\n\n /** Enables spell checking on the input. */\n @Prop() spellcheck = false;\n\n /** The label text. */\n @Prop() label = '';\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText: string | string[] = '';\n\n /** The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1 */\n @Prop() errorTextCount?: number;\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n /** Set to true to add a clear button when the input is populated. */\n @Prop() clearable = false;\n\n /** Set to true to add a password toggle button for password inputs. */\n @Prop() togglePassword = false;\n\n /** The input's inputmode attribute. */\n @Prop() inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';\n\n /** Set to render as line */\n @Prop() line = false;\n\n @Watch('helpText')\n @Watch('errorText')\n @Watch('label')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n @Watch('value')\n handleValueChange() {\n this.value = this.getValue();\n if (this.nativeInput != null && this.nativeInput.value !== this.value) {\n this.nativeInput.value = this.value;\n }\n }\n\n /** Emitted when the control's value changes. Access the new value via event.target.value. */\n @Event({ eventName: 'six-input-change' }) sixChange!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the clear button is activated. */\n @Event({ eventName: 'six-input-clear' }) sixClear!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control receives input. Access the new value via event.target.value. */\n @Event({ eventName: 'six-input-input' }) sixInput!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-input-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control loses focus. Access the new value via event.target.value. */\n @Event({ eventName: 'six-input-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.forward('six-input-input', 'input', this.host);\n this.eventListeners.forward('six-input-change', 'change', this.host);\n this.eventListeners.forward('six-input-focus', 'focus', this.host);\n this.eventListeners.forward('six-input-blur', 'blur', this.host);\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n disconnectedCallback() {\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.removeAll();\n }\n\n /** Sets focus on the input. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeInput?.focus(options);\n }\n\n /** Removes focus from the input. */\n @Method()\n async removeFocus() {\n this.nativeInput?.blur();\n }\n\n /** Selects all the text in the input. */\n @Method()\n async select() {\n return this.nativeInput?.select();\n }\n\n /** Sets the start and end positions of the text selection (0-based). */\n @Method()\n async setSelectionRange(\n selectionStart: number,\n selectionEnd: number,\n selectionDirection: 'forward' | 'backward' | 'none' = 'none'\n ) {\n return this.nativeInput?.setSelectionRange(selectionStart, selectionEnd, selectionDirection);\n }\n\n /** Replaces a range of text with a new string. */\n @Method()\n async setRangeText(\n replacement: string,\n start: number,\n end: number,\n selectMode: 'select' | 'start' | 'end' | 'preserve' = 'preserve'\n ) {\n if (this.nativeInput == null) {\n return;\n }\n this.nativeInput.setRangeText(replacement, start, end, selectMode);\n if (this.getValue() !== this.nativeInput.value) {\n this.value = this.nativeInput.value;\n this.sixChange.emit();\n this.sixInput.emit();\n }\n }\n\n private handleChange = (event: Event) => {\n event.stopPropagation();\n if (this.nativeInput != null) {\n this.value = this.nativeInput.value;\n this.sixChange.emit();\n }\n };\n\n private handleInput = (event: Event) => {\n event.stopPropagation();\n if (this.nativeInput != null) {\n this.value = this.nativeInput.value;\n this.sixInput.emit();\n }\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit();\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleClearClick = (event: MouseEvent) => {\n this.value = '';\n this.sixClear.emit();\n this.sixInput.emit();\n this.sixChange.emit();\n if (this.nativeInput != null) {\n this.nativeInput.focus();\n }\n event.stopPropagation();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n const hasModifier = event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;\n if (event.key === 'Enter' && !hasModifier) {\n setTimeout(() => {\n if (!event.defaultPrevented && !event.isComposing) {\n submitForm(this.host);\n }\n });\n }\n };\n\n private handlePasswordToggle = () => {\n this.isPasswordVisible = !this.isPasswordVisible;\n };\n\n private handleSlotChange = () => {\n this.hasHelpTextSlot = hasSlot(this.host, 'help-text');\n this.hasLabelSlot = hasSlot(this.host, 'label');\n this.hasErrorSlot = hasSlot(this.host, 'error-text');\n };\n\n private getValue(): string {\n return (this.value ?? '').toString();\n }\n\n render() {\n return (\n <FormControl\n inputId={this.inputId}\n label={this.label}\n labelId={this.labelId}\n hasLabelSlot={this.hasLabelSlot}\n helpTextId={this.helpTextId}\n helpText={this.helpText}\n hasHelpTextSlot={this.hasHelpTextSlot}\n errorTextId={this.errorTextId}\n errorText={this.errorText}\n errorTextCount={this.errorTextCount}\n hasErrorTextSlot={this.hasErrorSlot}\n size={this.size}\n disabled={this.disabled}\n required={this.required}\n displayError={this.invalid}\n >\n <div\n part=\"base\"\n class={{\n input: true,\n\n // Sizes\n 'input--small': this.size === 'small',\n 'input--medium': this.size === 'medium',\n 'input--large': this.size === 'large',\n\n // States\n 'input--line': this.line,\n 'input--pill': this.pill,\n 'input--disabled': this.disabled,\n 'input--focused': this.hasFocus,\n 'input--empty': this.getValue().length === 0,\n 'input--invalid': this.invalid,\n }}\n >\n <span part=\"prefix\" class=\"input__prefix\">\n <slot name=\"prefix\" />\n </span>\n\n <input\n part=\"input\"\n ref={(el) => (this.nativeInput = el)}\n id={this.inputId}\n size={1} // needed for firefox to overrule the default of 20\n class={{\n input__control: true,\n input__control__prefix: hasSlot(this.host, 'prefix'),\n }}\n type={this.type === 'password' && this.isPasswordVisible ? 'text' : this.type}\n name={this.name}\n placeholder={this.placeholder}\n disabled={this.disabled}\n readonly={this.readonly}\n minLength={this.minlength}\n maxLength={this.maxlength}\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.getValue()}\n autoCapitalize={this.autocapitalize}\n autoComplete={this.autocomplete}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n spellcheck={this.spellcheck}\n pattern={this.pattern}\n required={this.required}\n inputMode={this.inputmode}\n aria-labelledby={this.labelId}\n aria-describedby={this.helpTextId}\n aria-invalid={this.invalid ? 'true' : 'false'}\n onChange={this.handleChange}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n onKeyDown={this.handleKeyDown}\n data-testid=\"input-control\"\n />\n\n {this.clearable && (\n <button\n part=\"clear-button\"\n class=\"input__clear\"\n type=\"button\"\n onClick={this.handleClearClick}\n tabindex=\"-1\"\n data-testid=\"input-clear-button\"\n >\n <slot name=\"clear-icon\">\n <six-icon size={ICON_SIZES[this.size]}>clear</six-icon>\n </slot>\n </button>\n )}\n\n {this.togglePassword && (\n <button\n part=\"password-toggle-button\"\n class=\"input__password-toggle\"\n type=\"button\"\n onClick={this.handlePasswordToggle}\n tabindex=\"-1\"\n >\n {this.isPasswordVisible ? (\n <slot name=\"show-password-icon\">\n <six-icon size={ICON_SIZES[this.size]}>visibility_off</six-icon>\n </slot>\n ) : (\n <slot name=\"hide-password-icon\">\n <six-icon size={ICON_SIZES[this.size]}>visibility</six-icon>\n </slot>\n )}\n </button>\n )}\n\n <span part=\"suffix\" class=\"input__suffix\">\n <slot name=\"suffix\" />\n </span>\n </div>\n </FormControl>\n );\n }\n}\n"]}
@@ -24,7 +24,9 @@ describe('six-input', () => {
24
24
  </span>
25
25
  </div>
26
26
  </div>
27
- <div aria-hidden="true" class="form-control__error-text" id="input-error-text-1" part="error-text"></div>
27
+ <div aria-hidden="true" class="form-control__error-text" id="input-error-text-1" part="error-text">
28
+ <slot name="error-text"></slot>
29
+ </div>
28
30
  <div aria-hidden="true" class="form-control__help-text" id="input-help-text-1" part="help-text">
29
31
  <slot name="help-text"></slot>
30
32
  </div>
@@ -1 +1 @@
1
- {"version":3,"file":"six-input.spec.js","sourceRoot":"","sources":["../../../../src/components/six-input/test/six-input.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;EACzB,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,QAAQ,CAAC;MACtB,IAAI,EAAE,yBAAyB;KAChC,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;KAyB7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { SixInput } from '../six-input';\n\ndescribe('six-input', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [SixInput],\n html: `<six-input></six-input>`,\n });\n expect(page.root).toEqualHtml(`\n <six-input size=\"medium\" type=\"text\" value=\"\">\n <mock:shadow-root>\n <div class=\"form-control form-control--medium\" part=\"form-control\">\n <label aria-hidden=\"true\" class=\"form-control__label\" htmlfor=\"input-1\" id=\"input-label-1\" part=\"label\">\n <slot name=\"label\"></slot>\n </label>\n <div class=\"form-control__input\">\n <div class=\"input input--empty input--medium\" part=\"base\">\n <span class=\"input__prefix\" part=\"prefix\">\n <slot name=\"prefix\"></slot>\n </span>\n <input aria-describedby=\"input-help-text-1\" aria-invalid=\"false\" aria-labelledby=\"input-label-1\" autocapitalize=\"off\" autocomplete=\"off\" autocorrect=\"off\" class=\"input__control\" data-testid=\"input-control\" id=\"input-1\" part=\"input\" size=\"1\" type=\"text\" value=\"\">\n <span class=\"input__suffix\" part=\"suffix\">\n <slot name=\"suffix\"></slot>\n </span>\n </div>\n </div>\n <div aria-hidden=\"true\" class=\"form-control__error-text\" id=\"input-error-text-1\" part=\"error-text\"></div>\n <div aria-hidden=\"true\" class=\"form-control__help-text\" id=\"input-help-text-1\" part=\"help-text\">\n <slot name=\"help-text\"></slot>\n </div>\n </div>\n </mock:shadow-root>\n </six-input>\n `);\n });\n});\n"]}
1
+ {"version":3,"file":"six-input.spec.js","sourceRoot":"","sources":["../../../../src/components/six-input/test/six-input.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;EACzB,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,QAAQ,CAAC;MACtB,IAAI,EAAE,yBAAyB;KAChC,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2B7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { SixInput } from '../six-input';\n\ndescribe('six-input', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [SixInput],\n html: `<six-input></six-input>`,\n });\n expect(page.root).toEqualHtml(`\n <six-input size=\"medium\" type=\"text\" value=\"\">\n <mock:shadow-root>\n <div class=\"form-control form-control--medium\" part=\"form-control\">\n <label aria-hidden=\"true\" class=\"form-control__label\" htmlfor=\"input-1\" id=\"input-label-1\" part=\"label\">\n <slot name=\"label\"></slot>\n </label>\n <div class=\"form-control__input\">\n <div class=\"input input--empty input--medium\" part=\"base\">\n <span class=\"input__prefix\" part=\"prefix\">\n <slot name=\"prefix\"></slot>\n </span>\n <input aria-describedby=\"input-help-text-1\" aria-invalid=\"false\" aria-labelledby=\"input-label-1\" autocapitalize=\"off\" autocomplete=\"off\" autocorrect=\"off\" class=\"input__control\" data-testid=\"input-control\" id=\"input-1\" part=\"input\" size=\"1\" type=\"text\" value=\"\">\n <span class=\"input__suffix\" part=\"suffix\">\n <slot name=\"suffix\"></slot>\n </span>\n </div>\n </div>\n <div aria-hidden=\"true\" class=\"form-control__error-text\" id=\"input-error-text-1\" part=\"error-text\">\n <slot name=\"error-text\"></slot>\n </div>\n <div aria-hidden=\"true\" class=\"form-control__help-text\" id=\"input-help-text-1\" part=\"help-text\">\n <slot name=\"help-text\"></slot>\n </div>\n </div>\n </mock:shadow-root>\n </six-input>\n `);\n });\n});\n"]}
@@ -14,6 +14,7 @@
14
14
  }
15
15
  .form-control .form-control__error-text {
16
16
  display: none;
17
+ text-align: left;
17
18
  }
18
19
 
19
20
  .form-control--has-label .form-control__label {
@@ -25,6 +26,9 @@
25
26
  .form-control--has-label .form-control__label__required::after {
26
27
  color: var(--six-color-danger-800);
27
28
  content: "*";
29
+ transform: scale(1.1);
30
+ margin-left: var(--six-spacing-xxx-small);
31
+ position: absolute;
28
32
  }
29
33
  .form-control--has-label.form-control--small .form-control__label {
30
34
  font-size: var(--six-input-label-font-size-small);
@@ -56,7 +60,6 @@
56
60
 
57
61
  .form-control--has-error-text .form-control__error-text {
58
62
  display: block;
59
- color: var(--six-color-danger-800);
60
63
  margin-top: var(--six-spacing-xxx-small);
61
64
  }
62
65
  .form-control--has-error-text .form-control__error-text ::slotted(*) {