@six-group/ui-library 0.0.0-insider.e148618 → 0.0.0-insider.e5360cd

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 (337) hide show
  1. package/README.md +9 -0
  2. package/dist/cjs/{form-control-d369af14.js → form-control-9769b310.js} +10 -7
  3. package/dist/cjs/form-control-9769b310.js.map +1 -0
  4. package/dist/cjs/index-900437fc.js +214 -1
  5. package/dist/cjs/index-900437fc.js.map +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  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/six-button.cjs.entry.js +3 -3
  10. package/dist/cjs/six-button.cjs.entry.js.map +1 -1
  11. package/dist/cjs/six-checkbox.cjs.entry.js +6 -3
  12. package/dist/cjs/six-checkbox.cjs.entry.js.map +1 -1
  13. package/dist/cjs/six-datepicker.cjs.entry.js +2 -7
  14. package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
  15. package/dist/cjs/six-details.cjs.entry.js +1 -1
  16. package/dist/cjs/six-details.cjs.entry.js.map +1 -1
  17. package/dist/cjs/six-dialog.cjs.entry.js +1 -1
  18. package/dist/cjs/six-drawer.cjs.entry.js +1 -1
  19. package/dist/cjs/six-dropdown_2.cjs.entry.js +1 -1
  20. package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
  21. package/dist/cjs/six-error.cjs.entry.js +21 -0
  22. package/dist/cjs/six-error.cjs.entry.js.map +1 -0
  23. package/dist/cjs/six-group-label.cjs.entry.js +2 -2
  24. package/dist/cjs/six-group-label.cjs.entry.js.map +1 -1
  25. package/dist/cjs/six-icon-button.cjs.entry.js +1 -1
  26. package/dist/cjs/six-icon-button.cjs.entry.js.map +1 -1
  27. package/dist/cjs/six-input.cjs.entry.js +6 -3
  28. package/dist/cjs/six-input.cjs.entry.js.map +1 -1
  29. package/dist/cjs/six-range.cjs.entry.js +6 -3
  30. package/dist/cjs/six-range.cjs.entry.js.map +1 -1
  31. package/dist/cjs/six-select.cjs.entry.js +8 -5
  32. package/dist/cjs/six-select.cjs.entry.js.map +1 -1
  33. package/dist/cjs/six-sidebar-item-group.cjs.entry.js +2 -1
  34. package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -1
  35. package/dist/cjs/six-sidebar.cjs.entry.js +1 -1
  36. package/dist/cjs/six-switch.cjs.entry.js +22 -4
  37. package/dist/cjs/six-switch.cjs.entry.js.map +1 -1
  38. package/dist/cjs/six-tab-group.cjs.entry.js +45 -50
  39. package/dist/cjs/six-tab-group.cjs.entry.js.map +1 -1
  40. package/dist/cjs/six-tab.cjs.entry.js +19 -3
  41. package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
  42. package/dist/cjs/six-tag.cjs.entry.js +24 -2
  43. package/dist/cjs/six-tag.cjs.entry.js.map +1 -1
  44. package/dist/cjs/six-textarea.cjs.entry.js +6 -3
  45. package/dist/cjs/six-textarea.cjs.entry.js.map +1 -1
  46. package/dist/cjs/six-timepicker.cjs.entry.js +4 -9
  47. package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -1
  48. package/dist/cjs/six-tooltip.cjs.entry.js +2 -2
  49. package/dist/cjs/six-tooltip.cjs.entry.js.map +1 -1
  50. package/dist/cjs/ui-library.cjs.js +2 -2
  51. package/dist/cjs/ui-library.cjs.js.map +1 -1
  52. package/dist/collection/collection-manifest.json +2 -1
  53. package/dist/collection/components/six-button/six-button.css +5 -30
  54. package/dist/collection/components/six-button/six-button.js +2 -2
  55. package/dist/collection/components/six-button/six-button.js.map +1 -1
  56. package/dist/collection/components/six-checkbox/six-checkbox.css +1 -1
  57. package/dist/collection/components/six-checkbox/six-checkbox.js +25 -4
  58. package/dist/collection/components/six-checkbox/six-checkbox.js.map +1 -1
  59. package/dist/collection/components/six-checkbox/test/six-checkbox.spec.js +6 -2
  60. package/dist/collection/components/six-checkbox/test/six-checkbox.spec.js.map +1 -1
  61. package/dist/collection/components/six-datepicker/six-datepicker.js +22 -11
  62. package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
  63. package/dist/collection/components/six-datepicker/test/six-datepicker.spec.js +1 -1
  64. package/dist/collection/components/six-datepicker/test/six-datepicker.spec.js.map +1 -1
  65. package/dist/collection/components/six-details/six-details.css +3 -1
  66. package/dist/collection/components/six-dropdown/six-dropdown.css +2 -1
  67. package/dist/collection/components/six-error/six-error.css +5 -0
  68. package/dist/collection/components/six-error/six-error.js +25 -0
  69. package/dist/collection/components/six-error/six-error.js.map +1 -0
  70. package/dist/collection/components/six-group-label/six-group-label.css +1 -1
  71. package/dist/collection/components/six-group-label/test/six-group-label.spec.js +3 -1
  72. package/dist/collection/components/six-group-label/test/six-group-label.spec.js.map +1 -1
  73. package/dist/collection/components/six-icon-button/six-icon-button.css +4 -4
  74. package/dist/collection/components/six-input/six-input.css +2 -2
  75. package/dist/collection/components/six-input/six-input.js +27 -4
  76. package/dist/collection/components/six-input/six-input.js.map +1 -1
  77. package/dist/collection/components/six-input/test/six-input.spec.js +3 -1
  78. package/dist/collection/components/six-input/test/six-input.spec.js.map +1 -1
  79. package/dist/collection/components/six-range/six-range.css +1 -1
  80. package/dist/collection/components/six-range/six-range.js +24 -3
  81. package/dist/collection/components/six-range/six-range.js.map +1 -1
  82. package/dist/collection/components/six-range/test/six-range.spec.js +3 -1
  83. package/dist/collection/components/six-range/test/six-range.spec.js.map +1 -1
  84. package/dist/collection/components/six-select/six-select.css +7 -10
  85. package/dist/collection/components/six-select/six-select.js +26 -5
  86. package/dist/collection/components/six-select/six-select.js.map +1 -1
  87. package/dist/collection/components/six-select/test/six-select.spec.js +8 -4
  88. package/dist/collection/components/six-select/test/six-select.spec.js.map +1 -1
  89. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.css +4 -0
  90. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js +1 -0
  91. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js.map +1 -1
  92. package/dist/collection/components/six-sidebar-item-group/test/six-sidebar-item-group.spec.js +2 -2
  93. package/dist/collection/components/six-sidebar-item-group/test/six-sidebar-item-group.spec.js.map +1 -1
  94. package/dist/collection/components/six-switch/six-switch.css +1 -1
  95. package/dist/collection/components/six-switch/six-switch.js +45 -4
  96. package/dist/collection/components/six-switch/six-switch.js.map +1 -1
  97. package/dist/collection/components/six-switch/test/six-switch.spec.js +6 -2
  98. package/dist/collection/components/six-switch/test/six-switch.spec.js.map +1 -1
  99. package/dist/collection/components/six-tab/six-tab.css +54 -5
  100. package/dist/collection/components/six-tab/six-tab.js +18 -2
  101. package/dist/collection/components/six-tab/six-tab.js.map +1 -1
  102. package/dist/collection/components/six-tab-group/six-tab-group.css +0 -31
  103. package/dist/collection/components/six-tab-group/six-tab-group.js +10 -51
  104. package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -1
  105. package/dist/collection/components/six-tag/six-tag.css +6 -0
  106. package/dist/collection/components/six-tag/six-tag.js +23 -1
  107. package/dist/collection/components/six-tag/six-tag.js.map +1 -1
  108. package/dist/collection/components/six-tag/test/six-tag.spec.js +12 -0
  109. package/dist/collection/components/six-tag/test/six-tag.spec.js.map +1 -1
  110. package/dist/collection/components/six-textarea/six-textarea.css +1 -1
  111. package/dist/collection/components/six-textarea/six-textarea.js +25 -4
  112. package/dist/collection/components/six-textarea/six-textarea.js.map +1 -1
  113. package/dist/collection/components/six-textarea/test/six-textarea.spec.js +3 -1
  114. package/dist/collection/components/six-textarea/test/six-textarea.spec.js.map +1 -1
  115. package/dist/collection/components/six-timepicker/six-timepicker.js +24 -12
  116. package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -1
  117. package/dist/collection/components/six-timepicker/test/six-timepicker.spec.js +15 -15
  118. package/dist/collection/components/six-timepicker/test/six-timepicker.spec.js.map +1 -1
  119. package/dist/collection/components/six-tooltip/six-tooltip.css +1 -1
  120. package/dist/collection/components/six-tooltip/six-tooltip.js +1 -1
  121. package/dist/collection/components/six-tooltip/six-tooltip.js.map +1 -1
  122. package/dist/collection/functional-components/form-control/form-control.js +8 -6
  123. package/dist/collection/functional-components/form-control/form-control.js.map +1 -1
  124. package/dist/collection/utils/animation.js +34 -0
  125. package/dist/collection/utils/animation.js.map +1 -0
  126. package/dist/components/form-control.js +9 -6
  127. package/dist/components/form-control.js.map +1 -1
  128. package/dist/components/index.js +2 -0
  129. package/dist/components/index.js.map +1 -1
  130. package/dist/components/scroll.js +1 -1
  131. package/dist/components/six-button.js +3 -3
  132. package/dist/components/six-button.js.map +1 -1
  133. package/dist/components/six-checkbox.js +14 -3
  134. package/dist/components/six-checkbox.js.map +1 -1
  135. package/dist/components/six-datepicker.js +10 -8
  136. package/dist/components/six-datepicker.js.map +1 -1
  137. package/dist/components/six-details2.js +1 -1
  138. package/dist/components/six-details2.js.map +1 -1
  139. package/dist/components/six-dropdown2.js +8 -2
  140. package/dist/components/six-dropdown2.js.map +1 -1
  141. package/dist/components/six-error.d.ts +11 -0
  142. package/dist/components/six-error.js +8 -0
  143. package/dist/components/six-error.js.map +1 -0
  144. package/dist/components/six-error2.js +32 -0
  145. package/dist/components/six-error2.js.map +1 -0
  146. package/dist/components/six-group-label.js +8 -2
  147. package/dist/components/six-group-label.js.map +1 -1
  148. package/dist/components/six-header.js +8 -2
  149. package/dist/components/six-header.js.map +1 -1
  150. package/dist/components/six-icon-button2.js +1 -1
  151. package/dist/components/six-icon-button2.js.map +1 -1
  152. package/dist/components/six-input2.js +14 -3
  153. package/dist/components/six-input2.js.map +1 -1
  154. package/dist/components/six-range.js +14 -3
  155. package/dist/components/six-range.js.map +1 -1
  156. package/dist/components/six-search-field.js +7 -1
  157. package/dist/components/six-search-field.js.map +1 -1
  158. package/dist/components/six-select.js +35 -18
  159. package/dist/components/six-select.js.map +1 -1
  160. package/dist/components/six-sidebar-item-group.js +2 -1
  161. package/dist/components/six-sidebar-item-group.js.map +1 -1
  162. package/dist/components/six-switch.js +30 -4
  163. package/dist/components/six-switch.js.map +1 -1
  164. package/dist/components/six-tab-group.js +45 -50
  165. package/dist/components/six-tab-group.js.map +1 -1
  166. package/dist/components/six-tab.js +19 -3
  167. package/dist/components/six-tab.js.map +1 -1
  168. package/dist/components/six-tag2.js +34 -6
  169. package/dist/components/six-tag2.js.map +1 -1
  170. package/dist/components/six-textarea.js +14 -3
  171. package/dist/components/six-textarea.js.map +1 -1
  172. package/dist/components/six-timepicker2.js +12 -10
  173. package/dist/components/six-timepicker2.js.map +1 -1
  174. package/dist/components/six-tooltip2.js +2 -2
  175. package/dist/components/six-tooltip2.js.map +1 -1
  176. package/dist/components.json +426 -56
  177. package/dist/esm/{form-control-32cb533f.js → form-control-b0febe88.js} +10 -7
  178. package/dist/esm/form-control-b0febe88.js.map +1 -0
  179. package/dist/esm/index-8a74f992.js +214 -1
  180. package/dist/esm/index-8a74f992.js.map +1 -1
  181. package/dist/esm/loader.js +1 -1
  182. package/dist/esm/{scroll-3fb087a2.js → scroll-774762d6.js} +2 -2
  183. package/dist/esm/{scroll-3fb087a2.js.map → scroll-774762d6.js.map} +1 -1
  184. package/dist/esm/six-button.entry.js +3 -3
  185. package/dist/esm/six-button.entry.js.map +1 -1
  186. package/dist/esm/six-checkbox.entry.js +6 -3
  187. package/dist/esm/six-checkbox.entry.js.map +1 -1
  188. package/dist/esm/six-datepicker.entry.js +2 -7
  189. package/dist/esm/six-datepicker.entry.js.map +1 -1
  190. package/dist/esm/six-details.entry.js +1 -1
  191. package/dist/esm/six-details.entry.js.map +1 -1
  192. package/dist/esm/six-dialog.entry.js +1 -1
  193. package/dist/esm/six-drawer.entry.js +1 -1
  194. package/dist/esm/six-dropdown_2.entry.js +1 -1
  195. package/dist/esm/six-dropdown_2.entry.js.map +1 -1
  196. package/dist/esm/six-error.entry.js +17 -0
  197. package/dist/esm/six-error.entry.js.map +1 -0
  198. package/dist/esm/six-group-label.entry.js +2 -2
  199. package/dist/esm/six-group-label.entry.js.map +1 -1
  200. package/dist/esm/six-icon-button.entry.js +1 -1
  201. package/dist/esm/six-icon-button.entry.js.map +1 -1
  202. package/dist/esm/six-input.entry.js +6 -3
  203. package/dist/esm/six-input.entry.js.map +1 -1
  204. package/dist/esm/six-range.entry.js +6 -3
  205. package/dist/esm/six-range.entry.js.map +1 -1
  206. package/dist/esm/six-select.entry.js +8 -5
  207. package/dist/esm/six-select.entry.js.map +1 -1
  208. package/dist/esm/six-sidebar-item-group.entry.js +2 -1
  209. package/dist/esm/six-sidebar-item-group.entry.js.map +1 -1
  210. package/dist/esm/six-sidebar.entry.js +1 -1
  211. package/dist/esm/six-switch.entry.js +22 -4
  212. package/dist/esm/six-switch.entry.js.map +1 -1
  213. package/dist/esm/six-tab-group.entry.js +45 -50
  214. package/dist/esm/six-tab-group.entry.js.map +1 -1
  215. package/dist/esm/six-tab.entry.js +19 -3
  216. package/dist/esm/six-tab.entry.js.map +1 -1
  217. package/dist/esm/six-tag.entry.js +24 -2
  218. package/dist/esm/six-tag.entry.js.map +1 -1
  219. package/dist/esm/six-textarea.entry.js +6 -3
  220. package/dist/esm/six-textarea.entry.js.map +1 -1
  221. package/dist/esm/six-timepicker.entry.js +4 -9
  222. package/dist/esm/six-timepicker.entry.js.map +1 -1
  223. package/dist/esm/six-tooltip.entry.js +2 -2
  224. package/dist/esm/six-tooltip.entry.js.map +1 -1
  225. package/dist/esm/ui-library.js +2 -2
  226. package/dist/esm/ui-library.js.map +1 -1
  227. package/dist/types/components/six-checkbox/six-checkbox.d.ts +4 -1
  228. package/dist/types/components/six-datepicker/six-datepicker.d.ts +4 -2
  229. package/dist/types/components/six-error/six-error.d.ts +9 -0
  230. package/dist/types/components/six-input/six-input.d.ts +7 -2
  231. package/dist/types/components/six-range/six-range.d.ts +4 -1
  232. package/dist/types/components/six-select/six-select.d.ts +4 -1
  233. package/dist/types/components/six-switch/six-switch.d.ts +8 -1
  234. package/dist/types/components/six-tab-group/six-tab-group.d.ts +0 -3
  235. package/dist/types/components/six-tag/six-tag.d.ts +8 -0
  236. package/dist/types/components/six-textarea/six-textarea.d.ts +4 -1
  237. package/dist/types/components/six-timepicker/six-timepicker.d.ts +5 -2
  238. package/dist/types/components.d.ts +109 -16
  239. package/dist/types/functional-components/form-control/form-control.d.ts +6 -2
  240. package/dist/types/utils/animation.d.ts +12 -0
  241. package/dist/ui-library/{p-1f18768a.js → p-052aa8d3.js} +2 -2
  242. package/dist/ui-library/{p-ed381ad9.entry.js → p-14c1ec31.entry.js} +2 -2
  243. package/dist/ui-library/p-14c1ec31.entry.js.map +1 -0
  244. package/dist/ui-library/p-22c9b8c3.entry.js +2 -0
  245. package/dist/ui-library/p-22c9b8c3.entry.js.map +1 -0
  246. package/dist/ui-library/p-25bb1752.entry.js +2 -0
  247. package/dist/ui-library/p-25bb1752.entry.js.map +1 -0
  248. package/dist/ui-library/p-3f1a5ecb.entry.js +2 -0
  249. package/dist/ui-library/p-3f1a5ecb.entry.js.map +1 -0
  250. package/dist/ui-library/p-4435ff73.entry.js +2 -0
  251. package/dist/ui-library/p-4435ff73.entry.js.map +1 -0
  252. package/dist/ui-library/p-538f3c50.entry.js +2 -0
  253. package/dist/ui-library/p-538f3c50.entry.js.map +1 -0
  254. package/dist/ui-library/{p-330a4988.entry.js → p-5800663b.entry.js} +2 -2
  255. package/dist/ui-library/p-5ba3a0fe.entry.js +2 -0
  256. package/dist/ui-library/p-5ba3a0fe.entry.js.map +1 -0
  257. package/dist/ui-library/p-6153045b.js.map +1 -1
  258. package/dist/ui-library/p-658d9f79.entry.js +2 -0
  259. package/dist/ui-library/p-658d9f79.entry.js.map +1 -0
  260. package/dist/ui-library/p-66fe54b3.entry.js +2 -0
  261. package/dist/ui-library/p-66fe54b3.entry.js.map +1 -0
  262. package/dist/ui-library/{p-99e24daf.entry.js → p-a2035543.entry.js} +2 -2
  263. package/dist/ui-library/p-a457fee8.entry.js +2 -0
  264. package/dist/ui-library/p-a457fee8.entry.js.map +1 -0
  265. package/dist/ui-library/p-ab91c2a9.entry.js +2 -0
  266. package/dist/ui-library/p-ab91c2a9.entry.js.map +1 -0
  267. package/dist/ui-library/p-b57afbe4.entry.js +2 -0
  268. package/dist/ui-library/p-b57afbe4.entry.js.map +1 -0
  269. package/dist/ui-library/p-b6f47c9d.entry.js +2 -0
  270. package/dist/ui-library/p-b6f47c9d.entry.js.map +1 -0
  271. package/dist/ui-library/p-cba69e9d.entry.js +2 -0
  272. package/dist/ui-library/p-cba69e9d.entry.js.map +1 -0
  273. package/dist/ui-library/{p-19ed7a4c.entry.js → p-d1bda563.entry.js} +2 -2
  274. package/dist/ui-library/p-db34a6cc.entry.js +2 -0
  275. package/dist/ui-library/p-db34a6cc.entry.js.map +1 -0
  276. package/dist/ui-library/p-db936ad7.entry.js +2 -0
  277. package/dist/ui-library/{p-d367f4f9.entry.js.map → p-db936ad7.entry.js.map} +1 -1
  278. package/dist/ui-library/p-dc4f41d8.entry.js +2 -0
  279. package/dist/ui-library/p-dc4f41d8.entry.js.map +1 -0
  280. package/dist/ui-library/p-e5020f0d.js +2 -0
  281. package/dist/ui-library/p-e5020f0d.js.map +1 -0
  282. package/dist/ui-library/p-e775dcb4.entry.js +2 -0
  283. package/dist/ui-library/p-e775dcb4.entry.js.map +1 -0
  284. package/dist/ui-library/p-f1dc3a88.entry.js +2 -0
  285. package/dist/ui-library/p-f1dc3a88.entry.js.map +1 -0
  286. package/dist/ui-library/ui-library.css +2 -2
  287. package/dist/ui-library/ui-library.esm.js +1 -1
  288. package/dist/ui-library/ui-library.esm.js.map +1 -1
  289. package/package.json +6 -3
  290. package/dist/cjs/form-control-d369af14.js.map +0 -1
  291. package/dist/cjs/scroll-03678de1.js.map +0 -1
  292. package/dist/collection/components/six-tab/test/six-tab.spec.js +0 -20
  293. package/dist/collection/components/six-tab/test/six-tab.spec.js.map +0 -1
  294. package/dist/collection/components/six-tab-group/test/six-tab-group.spec.js +0 -45
  295. package/dist/collection/components/six-tab-group/test/six-tab-group.spec.js.map +0 -1
  296. package/dist/esm/form-control-32cb533f.js.map +0 -1
  297. package/dist/ui-library/p-1256cc0a.entry.js +0 -2
  298. package/dist/ui-library/p-1256cc0a.entry.js.map +0 -1
  299. package/dist/ui-library/p-1d0bee53.entry.js +0 -2
  300. package/dist/ui-library/p-1d0bee53.entry.js.map +0 -1
  301. package/dist/ui-library/p-21b3b321.entry.js +0 -2
  302. package/dist/ui-library/p-21b3b321.entry.js.map +0 -1
  303. package/dist/ui-library/p-2451cfdc.entry.js +0 -2
  304. package/dist/ui-library/p-2451cfdc.entry.js.map +0 -1
  305. package/dist/ui-library/p-29ac3d7d.entry.js +0 -2
  306. package/dist/ui-library/p-29ac3d7d.entry.js.map +0 -1
  307. package/dist/ui-library/p-314b2096.entry.js +0 -2
  308. package/dist/ui-library/p-314b2096.entry.js.map +0 -1
  309. package/dist/ui-library/p-3d9de119.entry.js +0 -2
  310. package/dist/ui-library/p-3d9de119.entry.js.map +0 -1
  311. package/dist/ui-library/p-4705a51e.entry.js +0 -2
  312. package/dist/ui-library/p-4705a51e.entry.js.map +0 -1
  313. package/dist/ui-library/p-4abed9df.entry.js +0 -2
  314. package/dist/ui-library/p-4abed9df.entry.js.map +0 -1
  315. package/dist/ui-library/p-5d6b7353.entry.js +0 -2
  316. package/dist/ui-library/p-5d6b7353.entry.js.map +0 -1
  317. package/dist/ui-library/p-6eb24bcb.entry.js +0 -2
  318. package/dist/ui-library/p-6eb24bcb.entry.js.map +0 -1
  319. package/dist/ui-library/p-72254eef.entry.js +0 -2
  320. package/dist/ui-library/p-72254eef.entry.js.map +0 -1
  321. package/dist/ui-library/p-83864cfe.entry.js +0 -2
  322. package/dist/ui-library/p-83864cfe.entry.js.map +0 -1
  323. package/dist/ui-library/p-bf87464b.entry.js +0 -2
  324. package/dist/ui-library/p-bf87464b.entry.js.map +0 -1
  325. package/dist/ui-library/p-d367f4f9.entry.js +0 -2
  326. package/dist/ui-library/p-d42c2025.js +0 -2
  327. package/dist/ui-library/p-d42c2025.js.map +0 -1
  328. package/dist/ui-library/p-ed381ad9.entry.js.map +0 -1
  329. package/dist/ui-library/p-ee8342e1.entry.js +0 -2
  330. package/dist/ui-library/p-ee8342e1.entry.js.map +0 -1
  331. package/dist/ui-library/p-ff90ffd1.entry.js +0 -2
  332. package/dist/ui-library/p-ff90ffd1.entry.js.map +0 -1
  333. package/readme.md +0 -156
  334. /package/dist/ui-library/{p-1f18768a.js.map → p-052aa8d3.js.map} +0 -0
  335. /package/dist/ui-library/{p-330a4988.entry.js.map → p-5800663b.entry.js.map} +0 -0
  336. /package/dist/ui-library/{p-99e24daf.entry.js.map → p-a2035543.entry.js.map} +0 -0
  337. /package/dist/ui-library/{p-19ed7a4c.entry.js.map → p-d1bda563.entry.js.map} +0 -0
@@ -23,6 +23,7 @@
23
23
  "components/six-details/six-details.js",
24
24
  "components/six-dialog/six-dialog.js",
25
25
  "components/six-drawer/six-drawer.js",
26
+ "components/six-error/six-error.js",
26
27
  "components/six-error-page/six-error-page.js",
27
28
  "components/six-file-list/six-file-list.js",
28
29
  "components/six-footer/six-footer.js",
@@ -55,7 +56,7 @@
55
56
  ],
56
57
  "compiler": {
57
58
  "name": "@stencil/core",
58
- "version": "4.0.4",
59
+ "version": "4.0.5",
59
60
  "typescriptVersion": "5.0.4"
60
61
  },
61
62
  "collections": [],
@@ -54,6 +54,10 @@
54
54
  align-items: center;
55
55
  }
56
56
 
57
+ .button:focus-visible {
58
+ outline: var(--six-focus-ring);
59
+ outline-offset: var(--six-focus-ring-offset);
60
+ }
57
61
  .button.button--secondary {
58
62
  background-color: var(--six-color-white);
59
63
  border-color: var(--six-color-web-rock-900);
@@ -70,12 +74,11 @@
70
74
  .button.button--secondary:focus:not(.button--disabled) {
71
75
  background-color: var(--six-color-web-rock-100);
72
76
  border-color: var(--six-color-web-rock-400);
73
- box-shadow: var(--six-button-focus-shadow);
74
77
  }
75
78
  .button.button--secondary:active:not(.button--disabled) {
76
79
  background-color: var(--six-color-web-rock-300);
77
80
  border-color: var(--six-color-web-rock-900);
78
- border-width: var(--six-focus-ring-width);
81
+ border-width: 1px;
79
82
  }
80
83
  .button.button--primary {
81
84
  background-color: var(--six-color-web-rock-900);
@@ -91,11 +94,6 @@
91
94
  background-color: var(--six-color-web-rock-800);
92
95
  border-color: var(--six-color-web-rock-800);
93
96
  }
94
- .button.button--primary:focus:not(.button--disabled) {
95
- background-color: var(--six-color-web-rock-900);
96
- border-color: var(--six-color-web-rock-400);
97
- box-shadow: var(--six-button-focus-shadow);
98
- }
99
97
  .button.button--primary:active:not(.button--disabled) {
100
98
  background-color: var(--six-color-web-rock-900);
101
99
  border-color: var(--six-color-web-rock-900);
@@ -112,9 +110,6 @@
112
110
  .button.button--link:hover:not(.button--disabled) {
113
111
  color: var(--six-color-action-600);
114
112
  }
115
- .button.button--link:focus:not(.button--disabled) {
116
- border-color: var(--six-color-web-rock-400);
117
- }
118
113
  .button.button--link:active:not(.button--disabled) {
119
114
  color: var(--six-color-action-light-to-be-defined);
120
115
  }
@@ -132,11 +127,6 @@
132
127
  background-color: var(--six-color-danger-900);
133
128
  border-color: var(--six-color-danger-900);
134
129
  }
135
- .button.button--danger:focus:not(.button--disabled) {
136
- background-color: var(--six-color-danger-800);
137
- border-color: var(--six-color-web-rock-400);
138
- box-shadow: var(--six-button-focus-shadow);
139
- }
140
130
  .button.button--danger:active:not(.button--disabled) {
141
131
  background-color: var(--six-color-danger-800);
142
132
  border-color: var(--six-color-danger-800);
@@ -156,11 +146,6 @@
156
146
  background-color: var(--six-color-warning-800);
157
147
  border-color: var(--six-color-warning-800);
158
148
  }
159
- .button.button--warning:focus:not(.button--disabled) {
160
- background-color: var(--six-color-warning-700);
161
- border-color: var(--six-color-web-rock-400);
162
- box-shadow: var(--six-button-focus-shadow);
163
- }
164
149
  .button.button--warning:active:not(.button--disabled) {
165
150
  background-color: var(--six-color-warning-700);
166
151
  border-color: var(--six-color-warning-700);
@@ -180,11 +165,6 @@
180
165
  background-color: var(--six-color-success-600);
181
166
  border-color: var(--six-color-success-600);
182
167
  }
183
- .button.button--success:focus:not(.button--disabled) {
184
- background-color: var(--six-color-success-500);
185
- border-color: var(--six-color-web-rock-400);
186
- box-shadow: var(--six-button-focus-shadow);
187
- }
188
168
  .button.button--success:active:not(.button--disabled) {
189
169
  background-color: var(--six-color-success-500);
190
170
  border-color: var(--six-color-success-500);
@@ -204,11 +184,6 @@
204
184
  background-color: var(--six-color-action-600);
205
185
  border-color: var(--six-color-action-600);
206
186
  }
207
- .button.button--action:focus:not(.button--disabled) {
208
- background-color: var(--six-color-action-500);
209
- border-color: var(--six-color-web-rock-400);
210
- box-shadow: var(--six-button-focus-shadow);
211
- }
212
187
  .button.button--action:active:not(.button--disabled) {
213
188
  background-color: var(--six-color-action-500);
214
189
  border-color: var(--six-color-action-500);
@@ -79,7 +79,7 @@ export class SixButton {
79
79
  const isLink = this.href != null;
80
80
  const isButton = !isLink;
81
81
  const Button = isLink ? 'a' : 'button';
82
- return (h("div", { class: { 'button-wrapper--disabled': this.disabled } }, h(Button, { ref: (el) => (this.nativeButton = el), part: "base", class: {
82
+ return (h("div", { onClick: this.handleClick, class: { 'button-wrapper--disabled': this.disabled } }, h(Button, { ref: (el) => (this.nativeButton = el), part: "base", class: {
83
83
  button: true,
84
84
  // Types
85
85
  'button--secondary': this.type === 'secondary',
@@ -103,7 +103,7 @@ export class SixButton {
103
103
  'button--has-label': this.hasLabel,
104
104
  'button--has-prefix': this.hasPrefix,
105
105
  'button--has-suffix': this.hasSuffix,
106
- }, disabled: isButton ? this.disabled : undefined, type: isButton ? (this.submit ? 'submit' : this.reset ? 'reset' : 'button') : undefined, name: isButton ? this.name : undefined, value: isButton ? this.value : undefined, href: isLink ? this.href : undefined, target: isLink && this.target != null ? this.target : undefined, download: isLink && this.download != null ? this.download : undefined, rel: isLink && this.target != null ? 'noreferrer noopener' : undefined, onBlur: this.handleBlur, onFocus: this.handleFocus, onClick: this.handleClick, "data-testid": "button" }, h("span", { part: "prefix", class: "button__prefix" }, h("slot", { onSlotchange: this.handleSlotChange, name: "prefix" })), h("span", { part: "label", class: "button__label" }, h("slot", { onSlotchange: this.handleSlotChange })), h("span", { part: "suffix", class: "button__suffix" }, h("slot", { onSlotchange: this.handleSlotChange, name: "suffix" })), this.caret && (h("span", { part: "caret", class: "button__caret" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("polyline", { points: "6 9 12 15 18 9" })))), this.loading && h("six-spinner", null))));
106
+ }, disabled: isButton ? this.disabled : undefined, tabindex: this.disabled ? '-1' : undefined, type: isButton ? (this.submit ? 'submit' : this.reset ? 'reset' : 'button') : undefined, name: isButton ? this.name : undefined, value: isButton ? this.value : undefined, href: isLink ? this.href : undefined, target: isLink && this.target != null ? this.target : undefined, download: isLink && this.download != null ? this.download : undefined, rel: isLink && this.target != null ? 'noreferrer noopener' : undefined, onBlur: this.handleBlur, onFocus: this.handleFocus, "data-testid": "button" }, h("span", { part: "prefix", class: "button__prefix" }, h("slot", { onSlotchange: this.handleSlotChange, name: "prefix" })), h("span", { part: "label", class: "button__label" }, h("slot", { onSlotchange: this.handleSlotChange })), h("span", { part: "suffix", class: "button__suffix" }, h("slot", { onSlotchange: this.handleSlotChange, name: "suffix" })), this.caret && (h("span", { part: "caret", class: "button__caret" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("polyline", { points: "6 9 12 15 18 9" })))), this.loading && h("six-spinner", null))));
107
107
  }
108
108
  static get is() { return "six-button"; }
109
109
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"six-button.js","sourceRoot":"","sources":["../../../src/components/six-button/six-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChG,OAAO,EAAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { submitForm } from '../../utils/form';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The button's label.\n * @slot prefix - Used to prepend an icon or similar element to the button.\n * @slot suffix - Used to append an icon or similar element to the button.\n *\n * @part base - The component's base wrapper.\n * @part prefix - The prefix container.\n * @part label - The button's label.\n * @part suffix - The suffix container.\n * @part caret - The button's caret.\n */\n\n@Component({\n tag: 'six-button',\n styleUrl: 'six-button.scss',\n shadow: true,\n})\nexport class SixButton {\n private nativeButton?: HTMLButtonElement | HTMLAnchorElement;\n\n @Element() host!: HTMLSixButtonElement;\n\n @State() hasFocus = false;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasSuffix = false;\n\n /** The button's type. */\n @Prop({ reflect: true }) type: 'secondary' | 'primary' | 'link' | 'success' | 'warning' | 'danger' | 'action' =\n 'primary';\n\n /** The button's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to draw the button with a caret for use with dropdowns, popovers, etc. */\n @Prop() caret = false;\n\n /** Set to true to disable the button. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true to draw the button in a loading state. */\n @Prop({ reflect: true }) loading = false;\n\n /** Set to true to draw a pill-style button with rounded edges. */\n @Prop({ reflect: true }) pill = false;\n\n /** Set to true to draw a circle button. */\n @Prop({ reflect: true }) circle = false;\n\n /** Indicates if activating the button should submit the form. Ignored when `href` is set. */\n @Prop({ reflect: true }) submit = false;\n\n /** Indicates if activating the button should reset the form. */\n @Prop({ reflect: true }) reset = false;\n\n /** An optional name for the button. Ignored when `href` is set. */\n @Prop() name = '';\n\n /** An optional value for the button. Ignored when `href` is set. */\n @Prop() value = '';\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */\n @Prop() href?: string;\n\n /** Tells the browser where to open the link. Only used when `href` is set. */\n @Prop() target?: '_blank' | '_parent' | '_self' | '_top';\n\n /** Tells the browser to download the linked file as this filename. Only used when `href` is set. */\n @Prop() download?: string;\n\n /** Emitted when the button loses focus. */\n @Event({ eventName: 'six-button-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the button gains focus. */\n @Event({ eventName: 'six-button-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n /** Sets focus on the button. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeButton?.focus(options);\n }\n\n /** Removes focus from the button. */\n @Method()\n async removeFocus() {\n this.nativeButton?.blur();\n }\n\n private handleSlotChange = () => {\n this.hasLabel = hasSlot(this.host);\n this.hasPrefix = hasSlot(this.host, 'prefix');\n this.hasSuffix = hasSlot(this.host, 'suffix');\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit();\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleClick = (event: MouseEvent) => {\n if (this.disabled || this.loading) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n if (this.submit) {\n event.preventDefault();\n submitForm(this.host);\n }\n };\n\n render() {\n const isLink = this.href != null;\n const isButton = !isLink;\n const Button = isLink ? 'a' : 'button';\n\n return (\n <div class={{ 'button-wrapper--disabled': this.disabled }}>\n <Button\n ref={(el) => (this.nativeButton = el)}\n part=\"base\"\n class={{\n button: true,\n\n // Types\n 'button--secondary': this.type === 'secondary',\n 'button--primary': this.type === 'primary',\n 'button--link': this.type === 'link',\n 'button--success': this.type === 'success',\n 'button--warning': this.type === 'warning',\n 'button--danger': this.type === 'danger',\n 'button--action': this.type === 'action',\n\n // Sizes\n 'button--small': this.size === 'small',\n 'button--medium': this.size === 'medium',\n 'button--large': this.size === 'large',\n\n // Modifiers\n 'button--caret': this.caret,\n 'button--circle': this.circle,\n 'button--disabled': this.disabled,\n 'button--focused': this.hasFocus,\n 'button--loading': this.loading,\n 'button--pill': this.pill,\n 'button--has-label': this.hasLabel,\n 'button--has-prefix': this.hasPrefix,\n 'button--has-suffix': this.hasSuffix,\n }}\n disabled={isButton ? this.disabled : undefined}\n type={isButton ? (this.submit ? 'submit' : this.reset ? 'reset' : 'button') : undefined}\n name={isButton ? this.name : undefined}\n value={isButton ? this.value : undefined}\n href={isLink ? this.href : undefined}\n target={isLink && this.target != null ? this.target : undefined}\n download={isLink && this.download != null ? this.download : undefined}\n rel={isLink && this.target != null ? 'noreferrer noopener' : undefined}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onClick={this.handleClick}\n data-testid=\"button\"\n >\n <span part=\"prefix\" class=\"button__prefix\">\n <slot onSlotchange={this.handleSlotChange} name=\"prefix\" />\n </span>\n <span part=\"label\" class=\"button__label\">\n <slot onSlotchange={this.handleSlotChange} />\n </span>\n <span part=\"suffix\" class=\"button__suffix\">\n <slot onSlotchange={this.handleSlotChange} name=\"suffix\" />\n </span>\n {this.caret && (\n <span part=\"caret\" class=\"button__caret\">\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n )}\n\n {this.loading && <six-spinner />}\n </Button>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"six-button.js","sourceRoot":"","sources":["../../../src/components/six-button/six-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { submitForm } from '../../utils/form';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The button's label.\n * @slot prefix - Used to prepend an icon or similar element to the button.\n * @slot suffix - Used to append an icon or similar element to the button.\n *\n * @part base - The component's base wrapper.\n * @part prefix - The prefix container.\n * @part label - The button's label.\n * @part suffix - The suffix container.\n * @part caret - The button's caret.\n */\n\n@Component({\n tag: 'six-button',\n styleUrl: 'six-button.scss',\n shadow: true,\n})\nexport class SixButton {\n private nativeButton?: HTMLButtonElement | HTMLAnchorElement;\n\n @Element() host!: HTMLSixButtonElement;\n\n @State() hasFocus = false;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasSuffix = false;\n\n /** The button's type. */\n @Prop({ reflect: true }) type: 'secondary' | 'primary' | 'link' | 'success' | 'warning' | 'danger' | 'action' =\n 'primary';\n\n /** The button's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to draw the button with a caret for use with dropdowns, popovers, etc. */\n @Prop() caret = false;\n\n /** Set to true to disable the button. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true to draw the button in a loading state. */\n @Prop({ reflect: true }) loading = false;\n\n /** Set to true to draw a pill-style button with rounded edges. */\n @Prop({ reflect: true }) pill = false;\n\n /** Set to true to draw a circle button. */\n @Prop({ reflect: true }) circle = false;\n\n /** Indicates if activating the button should submit the form. Ignored when `href` is set. */\n @Prop({ reflect: true }) submit = false;\n\n /** Indicates if activating the button should reset the form. */\n @Prop({ reflect: true }) reset = false;\n\n /** An optional name for the button. Ignored when `href` is set. */\n @Prop() name = '';\n\n /** An optional value for the button. Ignored when `href` is set. */\n @Prop() value = '';\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */\n @Prop() href?: string;\n\n /** Tells the browser where to open the link. Only used when `href` is set. */\n @Prop() target?: '_blank' | '_parent' | '_self' | '_top';\n\n /** Tells the browser to download the linked file as this filename. Only used when `href` is set. */\n @Prop() download?: string;\n\n /** Emitted when the button loses focus. */\n @Event({ eventName: 'six-button-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the button gains focus. */\n @Event({ eventName: 'six-button-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n /** Sets focus on the button. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeButton?.focus(options);\n }\n\n /** Removes focus from the button. */\n @Method()\n async removeFocus() {\n this.nativeButton?.blur();\n }\n\n private handleSlotChange = () => {\n this.hasLabel = hasSlot(this.host);\n this.hasPrefix = hasSlot(this.host, 'prefix');\n this.hasSuffix = hasSlot(this.host, 'suffix');\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit();\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleClick = (event: MouseEvent) => {\n if (this.disabled || this.loading) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n if (this.submit) {\n event.preventDefault();\n submitForm(this.host);\n }\n };\n\n render() {\n const isLink = this.href != null;\n const isButton = !isLink;\n const Button = isLink ? 'a' : 'button';\n\n return (\n <div onClick={this.handleClick} class={{ 'button-wrapper--disabled': this.disabled }}>\n <Button\n ref={(el) => (this.nativeButton = el)}\n part=\"base\"\n class={{\n button: true,\n\n // Types\n 'button--secondary': this.type === 'secondary',\n 'button--primary': this.type === 'primary',\n 'button--link': this.type === 'link',\n 'button--success': this.type === 'success',\n 'button--warning': this.type === 'warning',\n 'button--danger': this.type === 'danger',\n 'button--action': this.type === 'action',\n\n // Sizes\n 'button--small': this.size === 'small',\n 'button--medium': this.size === 'medium',\n 'button--large': this.size === 'large',\n\n // Modifiers\n 'button--caret': this.caret,\n 'button--circle': this.circle,\n 'button--disabled': this.disabled,\n 'button--focused': this.hasFocus,\n 'button--loading': this.loading,\n 'button--pill': this.pill,\n 'button--has-label': this.hasLabel,\n 'button--has-prefix': this.hasPrefix,\n 'button--has-suffix': this.hasSuffix,\n }}\n disabled={isButton ? this.disabled : undefined}\n tabindex={this.disabled ? '-1' : undefined}\n type={isButton ? (this.submit ? 'submit' : this.reset ? 'reset' : 'button') : undefined}\n name={isButton ? this.name : undefined}\n value={isButton ? this.value : undefined}\n href={isLink ? this.href : undefined}\n target={isLink && this.target != null ? this.target : undefined}\n download={isLink && this.download != null ? this.download : undefined}\n rel={isLink && this.target != null ? 'noreferrer noopener' : undefined}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n data-testid=\"button\"\n >\n <span part=\"prefix\" class=\"button__prefix\">\n <slot onSlotchange={this.handleSlotChange} name=\"prefix\" />\n </span>\n <span part=\"label\" class=\"button__label\">\n <slot onSlotchange={this.handleSlotChange} />\n </span>\n <span part=\"suffix\" class=\"button__suffix\">\n <slot onSlotchange={this.handleSlotChange} name=\"suffix\" />\n </span>\n {this.caret && (\n <span part=\"caret\" class=\"button__caret\">\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n )}\n\n {this.loading && <six-spinner />}\n </Button>\n </div>\n );\n }\n}\n"]}
@@ -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 {
@@ -56,7 +57,6 @@
56
57
 
57
58
  .form-control--has-error-text .form-control__error-text {
58
59
  display: block;
59
- color: var(--six-color-danger-800);
60
60
  margin-top: var(--six-spacing-xxx-small);
61
61
  }
62
62
  .form-control--has-error-text .form-control__error-text ::slotted(*) {
@@ -48,12 +48,14 @@ export class SixCheckbox {
48
48
  };
49
49
  this.hasFocus = false;
50
50
  this.hasLabelSlot = false;
51
+ this.hasErrorSlot = false;
51
52
  this.name = '';
52
53
  this.value = 'on';
53
54
  this.disabled = false;
54
55
  this.required = false;
55
56
  this.label = '';
56
57
  this.errorText = '';
58
+ this.errorTextCount = undefined;
57
59
  this.invalid = false;
58
60
  this.checked = false;
59
61
  this.indeterminate = false;
@@ -102,9 +104,10 @@ export class SixCheckbox {
102
104
  }
103
105
  handleSlotChange() {
104
106
  this.hasLabelSlot = hasSlot(this.host, 'label');
107
+ this.hasErrorSlot = hasSlot(this.host, 'error-text');
105
108
  }
106
109
  render() {
107
- return (h(FormControl, { inputId: this.inputId, label: this.label, labelId: this.labelId, hasLabelSlot: this.hasLabelSlot, errorTextId: this.errorTextId, errorText: this.errorText, size: "medium", disabled: this.disabled, required: this.required, displayError: this.invalid }, h("label", { part: "base", class: {
110
+ return (h(FormControl, { inputId: this.inputId, label: this.label, labelId: this.labelId, hasLabelSlot: this.hasLabelSlot, errorTextId: this.errorTextId, hasErrorTextSlot: this.hasErrorSlot, errorText: this.errorText, errorTextCount: this.errorTextCount, size: "medium", disabled: this.disabled, required: this.required, displayError: this.invalid }, h("label", { part: "base", class: {
108
111
  checkbox: true,
109
112
  'checkbox--checked': this.checked,
110
113
  'checkbox--disabled': this.disabled,
@@ -221,8 +224,8 @@ export class SixCheckbox {
221
224
  "type": "string",
222
225
  "mutable": false,
223
226
  "complexType": {
224
- "original": "string",
225
- "resolved": "string",
227
+ "original": "string | string[]",
228
+ "resolved": "string | string[]",
226
229
  "references": {}
227
230
  },
228
231
  "required": false,
@@ -235,6 +238,23 @@ export class SixCheckbox {
235
238
  "reflect": false,
236
239
  "defaultValue": "''"
237
240
  },
241
+ "errorTextCount": {
242
+ "type": "number",
243
+ "mutable": false,
244
+ "complexType": {
245
+ "original": "number",
246
+ "resolved": "number | undefined",
247
+ "references": {}
248
+ },
249
+ "required": false,
250
+ "optional": true,
251
+ "docs": {
252
+ "tags": [],
253
+ "text": "The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1"
254
+ },
255
+ "attribute": "error-text-count",
256
+ "reflect": false
257
+ },
238
258
  "invalid": {
239
259
  "type": "boolean",
240
260
  "mutable": false,
@@ -294,7 +314,8 @@ export class SixCheckbox {
294
314
  static get states() {
295
315
  return {
296
316
  "hasFocus": {},
297
- "hasLabelSlot": {}
317
+ "hasLabelSlot": {},
318
+ "hasErrorSlot": {}
298
319
  };
299
320
  }
300
321
  static get events() {
@@ -1 +1 @@
1
- {"version":3,"file":"six-checkbox.js","sourceRoot":"","sources":["../../../src/components/six-checkbox/six-checkbox.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;AAE7D,IAAI,EAAE,GAAG,CAAC,CAAC;AAEX;;;;;;;;;;;;;;GAcG;AAOH,MAAM,OAAO,WAAW;;IACd,YAAO,GAAG,YAAY,EAAE,EAAE,EAAE,CAAC;IAC7B,YAAO,GAAG,kBAAkB,EAAE,EAAE,CAAC;IACjC,WAAM,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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';\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 checkbox label.\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n *\n * @part base - The component's base wrapper.\n * @part control - The checkbox control.\n * @part checked-icon - The container the wraps the checked icon.\n * @part indeterminate-icon - The container that wraps the indeterminate icon.\n * @part text - The checkbox text rendered to the right.\n */\n\n@Component({\n tag: 'six-checkbox',\n styleUrl: 'six-checkbox.scss',\n shadow: true,\n})\nexport class SixCheckbox {\n private inputId = `checkbox-${++id}`;\n private labelId = `checkbox-label-${id}`;\n private textId = `checkbox-text-${id}`;\n private errorTextId = `input-error-text-${id}`;\n private nativeInput?: HTMLInputElement;\n private eventListeners = new EventListeners();\n\n @Element() host!: HTMLSixCheckboxElement;\n\n @State() hasFocus = false;\n @State() hasLabelSlot = false;\n\n /** The checkbox's name attribute. */\n @Prop() name = '';\n\n /**\n * The value of the checkbox does not mean if it's checked or not, use the `checked`\n * property for that.\n *\n * The value of a checkbox is analogous to the value of an `<input type=\"checkbox\">`,\n * it's only used when the checkbox participates in a native `<form>`.\n */\n @Prop() value = 'on';\n\n /** Set to true to disable the checkbox. */\n @Prop() disabled = false;\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = 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 draw the checkbox in a checked state. */\n @Prop({ mutable: true, reflect: true }) checked = false;\n\n /** Set to true to draw the checkbox in an indeterminate state. */\n @Prop({ mutable: true, reflect: true }) indeterminate = false;\n\n /** Emitted when the control loses focus. */\n @Event({ eventName: 'six-checkbox-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control's checked state changes. */\n @Event({ eventName: 'six-checkbox-change' }) sixChange!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-checkbox-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n @Watch('checked')\n @Watch('indeterminate')\n handleCheckedChange() {\n if (this.nativeInput == null) return;\n\n this.nativeInput.checked = this.checked;\n this.checked = this.nativeInput.checked;\n this.nativeInput.indeterminate = this.indeterminate;\n }\n\n @Watch('errorText')\n @Watch('label')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n connectedCallback() {\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.forward('six-checkbox-change', 'change', this.host);\n this.eventListeners.forward('six-checkbox-blur', 'blur', this.host);\n this.eventListeners.forward('six-checkbox-focus', 'focus', this.host);\n }\n\n disconnectedCallback() {\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.removeAll();\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n componentDidLoad() {\n const nativeInput = this.nativeInput;\n if (nativeInput == null) {\n return;\n }\n\n nativeInput.indeterminate = this.indeterminate;\n }\n\n /** Sets focus on the checkbox. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeInput?.focus(options);\n }\n\n /** Removes focus from the checkbox. */\n @Method()\n async removeFocus() {\n this.nativeInput?.blur();\n }\n\n private handleChange = () => {\n if (this.nativeInput != null) {\n this.checked = this.nativeInput.checked;\n this.indeterminate = false;\n this.sixChange.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 handleMouseDown = (event: MouseEvent) => {\n // Prevent clicks on the label from briefly blurring the input\n event.preventDefault();\n this.nativeInput?.focus();\n };\n\n private handleSlotChange() {\n this.hasLabelSlot = hasSlot(this.host, 'label');\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 errorTextId={this.errorTextId}\n errorText={this.errorText}\n size=\"medium\"\n disabled={this.disabled}\n required={this.required}\n displayError={this.invalid}\n >\n <label\n part=\"base\"\n class={{\n checkbox: true,\n 'checkbox--checked': this.checked,\n 'checkbox--disabled': this.disabled,\n 'checkbox--focused': this.hasFocus,\n 'checkbox--invalid': this.invalid,\n 'checkbox--indeterminate': this.indeterminate,\n }}\n htmlFor={this.inputId}\n onMouseDown={this.handleMouseDown}\n >\n <span part=\"control\" class=\"checkbox__control\">\n {this.checked && (\n <span part=\"checked-icon\" class=\"checkbox__icon\">\n <svg viewBox=\"0 0 16 16\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" stroke-linecap=\"round\">\n <g stroke=\"currentColor\" stroke-width=\"2\">\n <g transform=\"translate(3.428571, 3.428571)\">\n <path d=\"M0,5.71428571 L3.42857143,9.14285714\"></path>\n <path d=\"M9.14285714,0 L3.42857143,9.14285714\"></path>\n </g>\n </g>\n </g>\n </svg>\n </span>\n )}\n\n {!this.checked && this.indeterminate && (\n <span part=\"indeterminate-icon\" class=\"checkbox__icon\">\n <svg viewBox=\"0 0 16 16\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" stroke-linecap=\"round\">\n <g stroke=\"currentColor\" stroke-width=\"2\">\n <g transform=\"translate(2.285714, 6.857143)\">\n <path d=\"M10.2857143,1.14285714 L1.14285714,1.14285714\"></path>\n </g>\n </g>\n </g>\n </svg>\n </span>\n )}\n\n <input\n ref={(el) => (this.nativeInput = el)}\n id={this.inputId}\n type=\"checkbox\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n required={this.required}\n role=\"checkbox\"\n aria-checked={this.checked ? 'true' : 'false'}\n aria-labelledby={this.labelId}\n onChange={this.handleChange}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n />\n </span>\n\n <span part=\"text\" id={this.textId} class=\"checkbox__text\">\n <slot />\n </span>\n </label>\n </FormControl>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"six-checkbox.js","sourceRoot":"","sources":["../../../src/components/six-checkbox/six-checkbox.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;AAE7D,IAAI,EAAE,GAAG,CAAC,CAAC;AAEX;;;;;;;;;;;;;;GAcG;AAOH,MAAM,OAAO,WAAW;;IACd,YAAO,GAAG,YAAY,EAAE,EAAE,EAAE,CAAC;IAC7B,YAAO,GAAG,kBAAkB,EAAE,EAAE,CAAC;IACjC,WAAM,GAAG,iBAAiB,EAAE,EAAE,CAAC;IAC/B,gBAAW,GAAG,oBAAoB,EAAE,EAAE,CAAC;IAEvC,mBAAc,GAAG,IAAI,cAAc,EAAE,CAAC;IA0GtC,iBAAY,GAAG,GAAG,EAAE;MAC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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';\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 checkbox label.\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n *\n * @part base - The component's base wrapper.\n * @part control - The checkbox control.\n * @part checked-icon - The container the wraps the checked icon.\n * @part indeterminate-icon - The container that wraps the indeterminate icon.\n * @part text - The checkbox text rendered to the right.\n */\n\n@Component({\n tag: 'six-checkbox',\n styleUrl: 'six-checkbox.scss',\n shadow: true,\n})\nexport class SixCheckbox {\n private inputId = `checkbox-${++id}`;\n private labelId = `checkbox-label-${id}`;\n private textId = `checkbox-text-${id}`;\n private errorTextId = `input-error-text-${id}`;\n private nativeInput?: HTMLInputElement;\n private eventListeners = new EventListeners();\n\n @Element() host!: HTMLSixCheckboxElement;\n\n @State() hasFocus = false;\n @State() hasLabelSlot = false;\n @State() hasErrorSlot = false;\n\n /** The checkbox's name attribute. */\n @Prop() name = '';\n\n /**\n * The value of the checkbox does not mean if it's checked or not, use the `checked`\n * property for that.\n *\n * The value of a checkbox is analogous to the value of an `<input type=\"checkbox\">`,\n * it's only used when the checkbox participates in a native `<form>`.\n */\n @Prop() value = 'on';\n\n /** Set to true to disable the checkbox. */\n @Prop() disabled = false;\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = 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 draw the checkbox in a checked state. */\n @Prop({ mutable: true, reflect: true }) checked = false;\n\n /** Set to true to draw the checkbox in an indeterminate state. */\n @Prop({ mutable: true, reflect: true }) indeterminate = false;\n\n /** Emitted when the control loses focus. */\n @Event({ eventName: 'six-checkbox-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control's checked state changes. */\n @Event({ eventName: 'six-checkbox-change' }) sixChange!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-checkbox-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n @Watch('checked')\n @Watch('indeterminate')\n handleCheckedChange() {\n if (this.nativeInput == null) return;\n\n this.nativeInput.checked = this.checked;\n this.checked = this.nativeInput.checked;\n this.nativeInput.indeterminate = this.indeterminate;\n }\n\n @Watch('errorText')\n @Watch('label')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n connectedCallback() {\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.forward('six-checkbox-change', 'change', this.host);\n this.eventListeners.forward('six-checkbox-blur', 'blur', this.host);\n this.eventListeners.forward('six-checkbox-focus', 'focus', this.host);\n }\n\n disconnectedCallback() {\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.removeAll();\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n componentDidLoad() {\n const nativeInput = this.nativeInput;\n if (nativeInput == null) {\n return;\n }\n\n nativeInput.indeterminate = this.indeterminate;\n }\n\n /** Sets focus on the checkbox. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeInput?.focus(options);\n }\n\n /** Removes focus from the checkbox. */\n @Method()\n async removeFocus() {\n this.nativeInput?.blur();\n }\n\n private handleChange = () => {\n if (this.nativeInput != null) {\n this.checked = this.nativeInput.checked;\n this.indeterminate = false;\n this.sixChange.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 handleMouseDown = (event: MouseEvent) => {\n // Prevent clicks on the label from briefly blurring the input\n event.preventDefault();\n this.nativeInput?.focus();\n };\n\n private handleSlotChange() {\n this.hasLabelSlot = hasSlot(this.host, 'label');\n this.hasErrorSlot = hasSlot(this.host, 'error-text');\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 errorTextId={this.errorTextId}\n hasErrorTextSlot={this.hasErrorSlot}\n errorText={this.errorText}\n errorTextCount={this.errorTextCount}\n size=\"medium\"\n disabled={this.disabled}\n required={this.required}\n displayError={this.invalid}\n >\n <label\n part=\"base\"\n class={{\n checkbox: true,\n 'checkbox--checked': this.checked,\n 'checkbox--disabled': this.disabled,\n 'checkbox--focused': this.hasFocus,\n 'checkbox--invalid': this.invalid,\n 'checkbox--indeterminate': this.indeterminate,\n }}\n htmlFor={this.inputId}\n onMouseDown={this.handleMouseDown}\n >\n <span part=\"control\" class=\"checkbox__control\">\n {this.checked && (\n <span part=\"checked-icon\" class=\"checkbox__icon\">\n <svg viewBox=\"0 0 16 16\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" stroke-linecap=\"round\">\n <g stroke=\"currentColor\" stroke-width=\"2\">\n <g transform=\"translate(3.428571, 3.428571)\">\n <path d=\"M0,5.71428571 L3.42857143,9.14285714\"></path>\n <path d=\"M9.14285714,0 L3.42857143,9.14285714\"></path>\n </g>\n </g>\n </g>\n </svg>\n </span>\n )}\n\n {!this.checked && this.indeterminate && (\n <span part=\"indeterminate-icon\" class=\"checkbox__icon\">\n <svg viewBox=\"0 0 16 16\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" stroke-linecap=\"round\">\n <g stroke=\"currentColor\" stroke-width=\"2\">\n <g transform=\"translate(2.285714, 6.857143)\">\n <path d=\"M10.2857143,1.14285714 L1.14285714,1.14285714\"></path>\n </g>\n </g>\n </g>\n </svg>\n </span>\n )}\n\n <input\n ref={(el) => (this.nativeInput = el)}\n id={this.inputId}\n type=\"checkbox\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n required={this.required}\n role=\"checkbox\"\n aria-checked={this.checked ? 'true' : 'false'}\n aria-labelledby={this.labelId}\n onChange={this.handleChange}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n />\n </span>\n\n <span part=\"text\" id={this.textId} class=\"checkbox__text\">\n <slot />\n </span>\n </label>\n </FormControl>\n );\n }\n}\n"]}
@@ -23,7 +23,9 @@ describe('six-checkbox', () => {
23
23
  </span>
24
24
  </label>
25
25
  </div>
26
- <div aria-hidden="true" class="form-control__error-text" id="input-error-text-1" part="error-text"></div>
26
+ <div aria-hidden="true" class="form-control__error-text" id="input-error-text-1" part="error-text">
27
+ <slot name="error-text"></slot>
28
+ </div>
27
29
  <div aria-hidden="true" class="form-control__help-text" part="help-text">
28
30
  <slot name="help-text"></slot>
29
31
  </div>
@@ -66,7 +68,9 @@ describe('six-checkbox', () => {
66
68
  </span>
67
69
  </label>
68
70
  </div>
69
- <div aria-hidden="true" class="form-control__error-text" id="input-error-text-2" part="error-text"></div>
71
+ <div aria-hidden="true" class="form-control__error-text" id="input-error-text-2" part="error-text">
72
+ <slot name="error-text"></slot>
73
+ </div>
70
74
  <div aria-hidden="true" class="form-control__help-text" part="help-text">
71
75
  <slot name="help-text"></slot>
72
76
  </div>
@@ -1 +1 @@
1
- {"version":3,"file":"six-checkbox.spec.js","sourceRoot":"","sources":["../../../../src/components/six-checkbox/test/six-checkbox.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;EAC5B,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,WAAW,CAAC;MACzB,IAAI,EAAE,+BAA+B;KACtC,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;KAwB7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,WAAW,CAAC;MACzB,IAAI,EAAE,uCAAuC;KAC9C,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoC7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { SixCheckbox } from '../six-checkbox';\n\ndescribe('six-checkbox', () => {\n it('default', async () => {\n const page = await newSpecPage({\n components: [SixCheckbox],\n html: `<six-checkbox></six-checkbox>`,\n });\n expect(page.root).toEqualHtml(`\n <six-checkbox>\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=\"checkbox-1\" id=\"checkbox-label-1\" part=\"label\">\n <slot name=\"label\"></slot>\n </label>\n <div class=\"form-control__input\">\n <label class=\"checkbox\" htmlfor=\"checkbox-1\" part=\"base\">\n <span class=\"checkbox__control\" part=\"control\">\n <input aria-checked=\"false\" aria-labelledby=\"checkbox-label-1\" id=\"checkbox-1\" role=\"checkbox\" type=\"checkbox\" value=\"on\">\n </span>\n <span class=\"checkbox__text\" id=\"checkbox-text-1\" part=\"text\">\n <slot></slot>\n </span>\n </label>\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\" part=\"help-text\">\n <slot name=\"help-text\"></slot>\n </div>\n </div>\n </mock:shadow-root>\n </six-checkbox>\n `);\n });\n\n it('checked', async () => {\n const page = await newSpecPage({\n components: [SixCheckbox],\n html: `<six-checkbox checked></six-checkbox>`,\n });\n expect(page.root).toEqualHtml(`\n <six-checkbox checked=\"\">\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=\"checkbox-2\" id=\"checkbox-label-2\" part=\"label\">\n <slot name=\"label\"></slot>\n </label>\n <div class=\"form-control__input\">\n <label class=\"checkbox checkbox--checked\" htmlfor=\"checkbox-2\" part=\"base\">\n <span part=\"control\" class=\"checkbox__control\">\n <span part=\"checked-icon\" class=\"checkbox__icon\">\n <svg viewBox=\"0 0 16 16\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" stroke-linecap=\"round\">\n <g stroke=\"currentColor\" stroke-width=\"2\">\n <g transform=\"translate(3.428571, 3.428571)\">\n <path d=\"M0,5.71428571 L3.42857143,9.14285714\"></path>\n <path d=\"M9.14285714,0 L3.42857143,9.14285714\"></path>\n </g>\n </g>\n </g>\n </svg>\n </span>\n <input id=\"checkbox-2\" type=\"checkbox\" role=\"checkbox\" aria-checked=\"true\" aria-labelledby=\"checkbox-label-2\" checked=\"\" value=\"on\">\n </span>\n <span part=\"text\" id=\"checkbox-text-2\" class=\"checkbox__text\">\n <slot></slot>\n </span>\n </label>\n </div>\n <div aria-hidden=\"true\" class=\"form-control__error-text\" id=\"input-error-text-2\" part=\"error-text\"></div>\n <div aria-hidden=\"true\" class=\"form-control__help-text\" part=\"help-text\">\n <slot name=\"help-text\"></slot>\n </div>\n </div>\n </mock:shadow-root>\n </six-checkbox>\n `);\n });\n});\n"]}
1
+ {"version":3,"file":"six-checkbox.spec.js","sourceRoot":"","sources":["../../../../src/components/six-checkbox/test/six-checkbox.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;EAC5B,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,WAAW,CAAC;MACzB,IAAI,EAAE,+BAA+B;KACtC,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;KA0B7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,WAAW,CAAC;MACzB,IAAI,EAAE,uCAAuC;KAC9C,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsC7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { SixCheckbox } from '../six-checkbox';\n\ndescribe('six-checkbox', () => {\n it('default', async () => {\n const page = await newSpecPage({\n components: [SixCheckbox],\n html: `<six-checkbox></six-checkbox>`,\n });\n expect(page.root).toEqualHtml(`\n <six-checkbox>\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=\"checkbox-1\" id=\"checkbox-label-1\" part=\"label\">\n <slot name=\"label\"></slot>\n </label>\n <div class=\"form-control__input\">\n <label class=\"checkbox\" htmlfor=\"checkbox-1\" part=\"base\">\n <span class=\"checkbox__control\" part=\"control\">\n <input aria-checked=\"false\" aria-labelledby=\"checkbox-label-1\" id=\"checkbox-1\" role=\"checkbox\" type=\"checkbox\" value=\"on\">\n </span>\n <span class=\"checkbox__text\" id=\"checkbox-text-1\" part=\"text\">\n <slot></slot>\n </span>\n </label>\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\" part=\"help-text\">\n <slot name=\"help-text\"></slot>\n </div>\n </div>\n </mock:shadow-root>\n </six-checkbox>\n `);\n });\n\n it('checked', async () => {\n const page = await newSpecPage({\n components: [SixCheckbox],\n html: `<six-checkbox checked></six-checkbox>`,\n });\n expect(page.root).toEqualHtml(`\n <six-checkbox checked=\"\">\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=\"checkbox-2\" id=\"checkbox-label-2\" part=\"label\">\n <slot name=\"label\"></slot>\n </label>\n <div class=\"form-control__input\">\n <label class=\"checkbox checkbox--checked\" htmlfor=\"checkbox-2\" part=\"base\">\n <span part=\"control\" class=\"checkbox__control\">\n <span part=\"checked-icon\" class=\"checkbox__icon\">\n <svg viewBox=\"0 0 16 16\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" stroke-linecap=\"round\">\n <g stroke=\"currentColor\" stroke-width=\"2\">\n <g transform=\"translate(3.428571, 3.428571)\">\n <path d=\"M0,5.71428571 L3.42857143,9.14285714\"></path>\n <path d=\"M9.14285714,0 L3.42857143,9.14285714\"></path>\n </g>\n </g>\n </g>\n </svg>\n </span>\n <input id=\"checkbox-2\" type=\"checkbox\" role=\"checkbox\" aria-checked=\"true\" aria-labelledby=\"checkbox-label-2\" checked=\"\" value=\"on\">\n </span>\n <span part=\"text\" id=\"checkbox-text-2\" class=\"checkbox__text\">\n <slot></slot>\n </span>\n </label>\n </div>\n <div aria-hidden=\"true\" class=\"form-control__error-text\" id=\"input-error-text-2\" part=\"error-text\">\n <slot name=\"error-text\"></slot>\n </div>\n <div aria-hidden=\"true\" class=\"form-control__help-text\" part=\"help-text\">\n <slot name=\"help-text\"></slot>\n </div>\n </div>\n </mock:shadow-root>\n </six-checkbox>\n `);\n });\n});\n"]}
@@ -21,6 +21,7 @@ var SelectionMode;
21
21
  * @status stable
22
22
  *
23
23
  * @slot - Used to define a footer for the date picker.
24
+ * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.
24
25
  */
25
26
  export class SixDatepicker {
26
27
  constructor() {
@@ -168,6 +169,7 @@ export class SixDatepicker {
168
169
  this.value = undefined;
169
170
  this.label = '';
170
171
  this.errorText = '';
172
+ this.errorTextCount = undefined;
171
173
  this.invalid = false;
172
174
  this.containingElement = undefined;
173
175
  this.dateFormat = SixDateFormats.DDMMYYY_DOT;
@@ -180,11 +182,6 @@ export class SixDatepicker {
180
182
  debounceChanged() {
181
183
  this.sixSelect = debounceEvent(this.sixSelect, this.debounce);
182
184
  }
183
- invalidChanged(invalid) {
184
- if (this.inputElement) {
185
- this.inputElement.invalid = invalid;
186
- }
187
- }
188
185
  /**
189
186
  * Update the native input element when the value changes
190
187
  */
@@ -413,7 +410,7 @@ export class SixDatepicker {
413
410
  render() {
414
411
  var _a, _b, _c;
415
412
  this.adjustPopupPosition();
416
- return (h("div", { ref: (el) => (this.wrapper = el), class: "datepicker__container" }, h("six-input", { part: "base", value: formatDate(this.value, this.dateFormat), ref: (el) => (this.inputElement = el), placeholder: this.placeholder, readonly: this.readonly, disabled: this.disabled, name: this.name, label: this.label, required: this.required, "error-text": this.errorText, onClick: () => this.openCalendar(), size: this.size, class: { 'input--empty': this.value == null } }, this.renderCustomIcon(), this.renderClearable(), hasSlot(this.host, 'label') ? (h("span", { slot: "label" }, h("slot", { name: "label" }))) : null), this.open && (h("div", { part: "popup", ref: (el) => (this.popup = el), class: {
413
+ return (h("div", { ref: (el) => (this.wrapper = el), class: "datepicker__container" }, h("six-input", { part: "base", value: formatDate(this.value, this.dateFormat), ref: (el) => (this.inputElement = el), placeholder: this.placeholder, readonly: this.readonly, disabled: this.disabled, name: this.name, label: this.label, required: this.required, errorText: this.errorText, errorTextCount: this.errorTextCount, invalid: this.invalid, onClick: () => this.openCalendar(), size: this.size, class: { 'input--empty': this.value == null } }, this.renderCustomIcon(), this.renderClearable(), hasSlot(this.host, 'label') ? (h("span", { slot: "label" }, h("slot", { name: "label" }))) : null, hasSlot(this.host, 'error-text') ? (h("span", { slot: "error-text" }, h("slot", { name: "error-text" }))) : null), this.open && (h("div", { part: "popup", ref: (el) => (this.popup = el), class: {
417
414
  datepicker__popup: true,
418
415
  'datepicker__popup--is-up': this.placement != null ? this.placement === 'top' : this.isDropDownContentUp,
419
416
  'datepicker__popup--is-inline': this.inline,
@@ -774,8 +771,8 @@ export class SixDatepicker {
774
771
  "type": "string",
775
772
  "mutable": false,
776
773
  "complexType": {
777
- "original": "string",
778
- "resolved": "string",
774
+ "original": "string | string[]",
775
+ "resolved": "string | string[]",
779
776
  "references": {}
780
777
  },
781
778
  "required": false,
@@ -788,6 +785,23 @@ export class SixDatepicker {
788
785
  "reflect": false,
789
786
  "defaultValue": "''"
790
787
  },
788
+ "errorTextCount": {
789
+ "type": "number",
790
+ "mutable": false,
791
+ "complexType": {
792
+ "original": "number",
793
+ "resolved": "number | undefined",
794
+ "references": {}
795
+ },
796
+ "required": false,
797
+ "optional": true,
798
+ "docs": {
799
+ "tags": [],
800
+ "text": "The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1"
801
+ },
802
+ "attribute": "error-text-count",
803
+ "reflect": false
804
+ },
791
805
  "invalid": {
792
806
  "type": "boolean",
793
807
  "mutable": false,
@@ -1068,9 +1082,6 @@ export class SixDatepicker {
1068
1082
  return [{
1069
1083
  "propName": "debounce",
1070
1084
  "methodName": "debounceChanged"
1071
- }, {
1072
- "propName": "invalid",
1073
- "methodName": "invalidChanged"
1074
1085
  }, {
1075
1086
  "propName": "value",
1076
1087
  "methodName": "valueChanged"