@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
@@ -1,6 +1,6 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-8a74f992.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-4ee8b33e.js';
2
2
 
3
- const sixTabCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{display:inline-block}.tab{display:inline-flex;align-items:center;font-family:var(--six-font-family);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-semibold);border-radius:4px;color:var(--six-tab-color);padding:var(--six-spacing-medium) var(--six-spacing-large);white-space:nowrap;user-select:none;cursor:pointer;transition:var(--six-transition-fast) box-shadow, var(--six-transition-fast) color}.tab:focus{outline:none}.tab:focus:not(.tab--disabled){color:var(--six-tab-color-active)}.tab.tab--active:not(.tab--disabled){color:var(--six-tab-color-active);font-weight:var(--six-font-weight-bold)}.tab.tab--closable{padding-right:var(--six-spacing-small)}.tab.tab--disabled{color:var(--six-tab-color-disabled);cursor:not-allowed}.tab:hover:not(.tab--disabled){color:var(--six-tab-color-hover)}.tab__close-button{font-size:var(--six-font-size-large);margin-left:var(--six-spacing-xx-small)}.tab__close-button::part(base){padding:var(--six-spacing-xxx-small)}";
3
+ const sixTabCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{display:flex}.tab{display:inline-flex;align-items:center;font-family:var(--six-font-family);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-semibold);color:var(--six-tab-color);padding:var(--six-spacing-medium) var(--six-spacing-large);white-space:nowrap;user-select:none;cursor:pointer;width:100%}.tab:focus{outline:none}.tab:focus-visible{outline:var(--six-focus-ring);outline-offset:calc(-1 * var(--six-focus-ring-width) - var(--six-focus-ring-offset))}.tab.tab--active:not(.tab--disabled){color:var(--six-tab-color-active);font-weight:var(--six-font-weight-bold)}.tab.tab--closable{padding-right:var(--six-spacing-small)}.tab.tab--disabled{color:var(--six-tab-color-disabled);cursor:not-allowed}.tab:hover:not(.tab--disabled){color:var(--six-tab-color-hover)}.tab__close-button{font-size:var(--six-font-size-large);margin-left:var(--six-spacing-xx-small)}.tab__close-button::part(base){padding:var(--six-spacing-xxx-small)}.tab__indicator{position:absolute}.tab__indicator.tab__indicator--active{background-color:var(--six-tab-border-color-active)}.tab--top{margin-bottom:var(--six-spacing-xxx-small)}.tab__indicator--top{width:100%;bottom:0;height:var(--six-tab-border-width)}.tab--bottom{margin-top:var(--six-spacing-xxx-small)}.tab__indicator--bottom{width:100%;top:0;height:var(--six-tab-border-width)}.tab--left{margin-right:var(--six-spacing-xxx-small)}.tab__indicator--left{height:100%;right:0;top:0;width:var(--six-tab-border-width)}.tab--right{margin-left:var(--six-spacing-xxx-small)}.tab__indicator--right{height:100%;left:0;top:0;width:var(--six-tab-border-width)}";
4
4
 
5
5
  let id = 0;
6
6
  const SixTab = class {
@@ -30,15 +30,31 @@ const SixTab = class {
30
30
  this.sixClose.emit();
31
31
  }
32
32
  render() {
33
+ var _a;
34
+ const tabGroup = this.host.closest('six-tab-group');
35
+ const placement = (_a = tabGroup === null || tabGroup === void 0 ? void 0 : tabGroup.placement) !== null && _a !== void 0 ? _a : 'top';
33
36
  return (
34
- // If the user didn't provide an ID, we'll set one so we can link tabs and tab panels with aria labels
37
+ // If the user didn't provide an ID, we'll set one, so we can link tabs and tab panels with aria labels
35
38
  h(Host, { id: this.host.id || this.componentId }, h("div", { part: "base", ref: (el) => (this.tab = el), class: {
36
39
  tab: true,
40
+ // Placements
41
+ 'tab--top': placement === 'top',
42
+ 'tab--bottom': placement === 'bottom',
43
+ 'tab--left': placement === 'left',
44
+ 'tab--right': placement === 'right',
37
45
  // States
38
46
  'tab--active': this.active,
39
47
  'tab--closable': this.closable,
40
48
  'tab--disabled': this.disabled,
41
- }, role: "tab", "aria-disabled": this.disabled ? 'true' : 'false', "aria-selected": this.active ? 'true' : 'false', tabindex: this.disabled || !this.active ? '-1' : '0' }, h("slot", null), this.closable && (h("six-icon-button", { name: "close", size: "xSmall", exportparts: "base:close-button", class: "tab__close-button", onClick: this.handleCloseClick, tabIndex: -1, "aria-hidden": "true" })))));
49
+ }, role: "tab", "aria-disabled": this.disabled ? 'true' : 'false', "aria-selected": this.active ? 'true' : 'false', tabindex: this.disabled || !this.active ? '-1' : '0' }, h("slot", null), this.closable && (h("six-icon-button", { name: "close", size: "xSmall", exportparts: "base:close-button", class: "tab__close-button", onClick: this.handleCloseClick, tabIndex: -1, "aria-hidden": "true" }))), h("div", { class: {
50
+ tab__indicator: true,
51
+ 'tab__indicator--active': this.active,
52
+ // Placements
53
+ 'tab__indicator--top': placement === 'top',
54
+ 'tab__indicator--bottom': placement === 'bottom',
55
+ 'tab__indicator--left': placement === 'left',
56
+ 'tab__indicator--right': placement === 'right',
57
+ } })));
42
58
  }
43
59
  get host() { return getElement(this); }
44
60
  };
@@ -1 +1 @@
1
- {"file":"six-tab.entry.js","mappings":";;AAAA,MAAM,SAAS,GAAG,ikCAAikC;;ACGnlC,IAAI,EAAE,GAAG,CAAC,CAAC;MAmBE,MAAM;;;;IACT,gBAAW,GAAG,OAAO,EAAE,EAAE,EAAE,CAAC;iBAMH,EAAE;kBAGD,KAAK;oBAGpB,KAAK;oBAGY,KAAK;;EAKzC,iBAAiB;IACf,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;GAC1D;;EAID,MAAM,QAAQ,CAAC,OAAsB;;IACnC,MAAA,IAAI,CAAC,GAAG,0CAAE,KAAK,CAAC,OAAO,CAAC,CAAC;GAC1B;;EAID,MAAM,WAAW;;IACf,MAAA,IAAI,CAAC,GAAG,0CAAE,IAAI,EAAE,CAAC;GAClB;EAEO,gBAAgB;IACtB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;GACtB;EAED,MAAM;IACJ;;IAEE,EAAC,IAAI,IAAC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,WAAW,IACxC,WACE,IAAI,EAAC,MAAM,EACX,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,EAC5B,KAAK,EAAE;QACL,GAAG,EAAE,IAAI;;QAGT,aAAa,EAAE,IAAI,CAAC,MAAM;QAC1B,eAAe,EAAE,IAAI,CAAC,QAAQ;QAC9B,eAAe,EAAE,IAAI,CAAC,QAAQ;OAC/B,EACD,IAAI,EAAC,KAAK,mBACK,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,OAAO,mBAChC,IAAI,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,EAC7C,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,GAAG,IAEpD,eAAQ,EACP,IAAI,CAAC,QAAQ,KACZ,uBACE,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,QAAQ,EACb,WAAW,EAAC,mBAAmB,EAC/B,KAAK,EAAC,mBAAmB,EACzB,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAC9B,QAAQ,EAAE,CAAC,CAAC,iBACA,MAAM,GAClB,CACH,CACG,CACD,EACP;GACH;;;;;;;","names":[],"sources":["src/components/six-tab/six-tab.scss?tag=six-tab&encapsulation=shadow","src/components/six-tab/six-tab.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: inline-block;\n}\n\n.tab {\n display: inline-flex;\n align-items: center;\n font-family: var(--six-font-family);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-semibold);\n border-radius: 4px;\n color: var(--six-tab-color);\n padding: var(--six-spacing-medium) var(--six-spacing-large);\n white-space: nowrap;\n user-select: none;\n cursor: pointer;\n transition: var(--six-transition-fast) box-shadow, var(--six-transition-fast) color;\n\n &:focus {\n outline: none;\n }\n\n &:focus:not(.tab--disabled) {\n color: var(--six-tab-color-active);\n }\n\n &.tab--active:not(.tab--disabled) {\n color: var(--six-tab-color-active);\n font-weight: var(--six-font-weight-bold);\n }\n\n &.tab--closable {\n padding-right: var(--six-spacing-small);\n }\n\n &.tab--disabled {\n color: var(--six-tab-color-disabled);\n cursor: not-allowed;\n }\n\n &:hover:not(.tab--disabled) {\n color: var(--six-tab-color-hover);\n }\n}\n\n.tab__close-button {\n font-size: var(--six-font-size-large);\n margin-left: var(--six-spacing-xx-small);\n\n &::part(base) {\n padding: var(--six-spacing-xxx-small);\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The tab's label.\n *\n * @part base - The component's base wrapper.\n * @part close-button - The close button, which is the icon button's base wrapper.\n */\n\n@Component({\n tag: 'six-tab',\n styleUrl: 'six-tab.scss',\n shadow: true,\n})\nexport class SixTab {\n private componentId = `tab-${++id}`;\n private tab?: HTMLElement;\n\n @Element() host!: HTMLSixTabElement;\n\n /** The name of the tab panel the tab will control. The panel must be located in the same tab group. */\n @Prop({ reflect: true }) panel = '';\n\n /** Set to true to draw the tab in an active state. */\n @Prop({ reflect: true }) active = false;\n\n /** When true, the tab will be rendered with a close icon. */\n @Prop() closable = false;\n\n /** Set to true to draw the tab in a disabled state. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Emitted when the tab is closable and the close button is activated. */\n @Event({ eventName: 'six-tab-close' }) sixClose!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.handleCloseClick = this.handleCloseClick.bind(this);\n }\n\n /** Sets focus to the tab. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.tab?.focus(options);\n }\n\n /** Removes focus from the tab. */\n @Method()\n async removeFocus() {\n this.tab?.blur();\n }\n\n private handleCloseClick() {\n this.sixClose.emit();\n }\n\n render() {\n return (\n // If the user didn't provide an ID, we'll set one so we can link tabs and tab panels with aria labels\n <Host id={this.host.id || this.componentId}>\n <div\n part=\"base\"\n ref={(el) => (this.tab = el)}\n class={{\n tab: true,\n\n // States\n 'tab--active': this.active,\n 'tab--closable': this.closable,\n 'tab--disabled': this.disabled,\n }}\n role=\"tab\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-selected={this.active ? 'true' : 'false'}\n tabindex={this.disabled || !this.active ? '-1' : '0'}\n >\n <slot />\n {this.closable && (\n <six-icon-button\n name=\"close\"\n size=\"xSmall\"\n exportparts=\"base:close-button\"\n class=\"tab__close-button\"\n onClick={this.handleCloseClick}\n tabIndex={-1}\n aria-hidden=\"true\"\n />\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"six-tab.entry.js","mappings":";;AAAA,MAAM,SAAS,GAAG,irDAAirD;;ACGnsD,IAAI,EAAE,GAAG,CAAC,CAAC;MAmBE,MAAM;;;;IACT,gBAAW,GAAG,OAAO,EAAE,EAAE,EAAE,CAAC;iBAMH,EAAE;kBAGD,KAAK;oBAGpB,KAAK;oBAGY,KAAK;;EAKzC,iBAAiB;IACf,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;GAC1D;;EAID,MAAM,QAAQ,CAAC,OAAsB;;IACnC,MAAA,IAAI,CAAC,GAAG,0CAAE,KAAK,CAAC,OAAO,CAAC,CAAC;GAC1B;;EAID,MAAM,WAAW;;IACf,MAAA,IAAI,CAAC,GAAG,0CAAE,IAAI,EAAE,CAAC;GAClB;EAEO,gBAAgB;IACtB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;GACtB;EAED,MAAM;;IACJ,MAAM,QAAQ,GAAkC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IACnF,MAAM,SAAS,GAAG,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QA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,SAAS,KAAK,OAAO;OAC/C,GACI,CACF,EACP;GACH;;;;;;;","names":[],"sources":["src/components/six-tab/six-tab.scss?tag=six-tab&encapsulation=shadow","src/components/six-tab/six-tab.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: flex;\n}\n\n.tab {\n display: inline-flex;\n align-items: center;\n font-family: var(--six-font-family);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-semibold);\n color: var(--six-tab-color);\n padding: var(--six-spacing-medium) var(--six-spacing-large);\n white-space: nowrap;\n user-select: none;\n cursor: pointer;\n width: 100%;\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: var(--six-focus-ring);\n outline-offset: calc(-1 * var(--six-focus-ring-width) - var(--six-focus-ring-offset));\n }\n\n &.tab--active:not(.tab--disabled) {\n color: var(--six-tab-color-active);\n font-weight: var(--six-font-weight-bold);\n }\n\n &.tab--closable {\n padding-right: var(--six-spacing-small);\n }\n\n &.tab--disabled {\n color: var(--six-tab-color-disabled);\n cursor: not-allowed;\n }\n\n &:hover:not(.tab--disabled) {\n color: var(--six-tab-color-hover);\n }\n}\n\n.tab__close-button {\n font-size: var(--six-font-size-large);\n margin-left: var(--six-spacing-xx-small);\n\n &::part(base) {\n padding: var(--six-spacing-xxx-small);\n }\n}\n\n// TAB INDICATOR\n.tab__indicator {\n position: absolute;\n &.tab__indicator--active {\n background-color: var(--six-tab-border-color-active);\n }\n}\n\n// TOP\n.tab--top {\n margin-bottom: var(--six-spacing-xxx-small);\n}\n\n.tab__indicator--top {\n width: 100%;\n bottom: 0;\n height: var(--six-tab-border-width);\n}\n\n// BOTTOM\n.tab--bottom {\n margin-top: var(--six-spacing-xxx-small);\n}\n\n.tab__indicator--bottom {\n width: 100%;\n top: 0;\n height: var(--six-tab-border-width);\n}\n\n// LEFT\n.tab--left {\n margin-right: var(--six-spacing-xxx-small);\n}\n\n.tab__indicator--left {\n height: 100%;\n right: 0;\n top: 0;\n width: var(--six-tab-border-width);\n}\n\n// RIGHT\n.tab--right {\n margin-left: var(--six-spacing-xxx-small);\n}\n\n.tab__indicator--right {\n height: 100%;\n left: 0;\n top: 0;\n width: var(--six-tab-border-width);\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The tab's label.\n *\n * @part base - The component's base wrapper.\n * @part close-button - The close button, which is the icon button's base wrapper.\n */\n\n@Component({\n tag: 'six-tab',\n styleUrl: 'six-tab.scss',\n shadow: true,\n})\nexport class SixTab {\n private componentId = `tab-${++id}`;\n private tab?: HTMLElement;\n\n @Element() host!: HTMLSixTabElement;\n\n /** The name of the tab panel the tab will control. The panel must be located in the same tab group. */\n @Prop({ reflect: true }) panel = '';\n\n /** Set to true to draw the tab in an active state. */\n @Prop({ reflect: true }) active = false;\n\n /** When true, the tab will be rendered with a close icon. */\n @Prop() closable = false;\n\n /** Set to true to draw the tab in a disabled state. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Emitted when the tab is closable and the close button is activated. */\n @Event({ eventName: 'six-tab-close' }) sixClose!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.handleCloseClick = this.handleCloseClick.bind(this);\n }\n\n /** Sets focus to the tab. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.tab?.focus(options);\n }\n\n /** Removes focus from the tab. */\n @Method()\n async removeFocus() {\n this.tab?.blur();\n }\n\n private handleCloseClick() {\n this.sixClose.emit();\n }\n\n render() {\n const tabGroup: HTMLSixTabGroupElement | null = this.host.closest('six-tab-group');\n const placement = tabGroup?.placement ?? 'top';\n return (\n // If the user didn't provide an ID, we'll set one, so we can link tabs and tab panels with aria labels\n <Host id={this.host.id || this.componentId}>\n <div\n part=\"base\"\n ref={(el) => (this.tab = el)}\n class={{\n tab: true,\n\n // Placements\n 'tab--top': placement === 'top',\n 'tab--bottom': placement === 'bottom',\n 'tab--left': placement === 'left',\n 'tab--right': placement === 'right',\n\n // States\n 'tab--active': this.active,\n 'tab--closable': this.closable,\n 'tab--disabled': this.disabled,\n }}\n role=\"tab\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-selected={this.active ? 'true' : 'false'}\n tabindex={this.disabled || !this.active ? '-1' : '0'}\n >\n <slot />\n {this.closable && (\n <six-icon-button\n name=\"close\"\n size=\"xSmall\"\n exportparts=\"base:close-button\"\n class=\"tab__close-button\"\n onClick={this.handleCloseClick}\n tabIndex={-1}\n aria-hidden=\"true\"\n />\n )}\n </div>\n <div\n class={{\n tab__indicator: true,\n 'tab__indicator--active': this.active,\n\n // Placements\n 'tab__indicator--top': placement === 'top',\n 'tab__indicator--bottom': placement === 'bottom',\n 'tab__indicator--left': placement === 'left',\n 'tab__indicator--right': placement === 'right',\n }}\n ></div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,4 +1,6 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-8a74f992.js';
1
+ import { r as registerInstance, c as createEvent, h } from './index-4ee8b33e.js';
2
+ import { a as getTextContent } from './slot-ad36df3a.js';
3
+ import { a as debounce } from './execution-control-e0892a05.js';
2
4
 
3
5
  const sixTagCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{display:inline-block;overflow:hidden}.tag{display:flex;align-items:center;border:solid 1px;font-family:var(--six-font-family);line-height:1;white-space:nowrap;user-select:none;cursor:default}.tag__content{text-overflow:ellipsis;overflow:hidden}.tag__clear::part(base){color:inherit;padding:0}.tag--info{color:var(--six-color-white);background-color:var(--six-color-web-rock-900);border-color:var(--six-color-web-rock-900)}.tag--success{color:var(--six-color-web-rock-900);border-color:var(--six-color-success-500);background-color:var(--six-color-success-500)}.tag--primary{color:var(--six-color-web-rock-900);border-color:var(--six-color-clay-50);background-color:var(--six-color-clay-50)}.tag--warning{color:var(--six-color-web-rock-900);border-color:var(--six-color-warning-700);background-color:var(--six-color-warning-700)}.tag--danger{color:var(--six-color-white);border-color:var(--six-color-danger-800);background-color:var(--six-color-danger-800)}.tag--action{color:var(--six-color-white);border-color:var(--six-color-action-500);background-color:var(--six-color-action-500)}.tag--small{font-size:var(--six-button-font-size-small);height:calc(var(--six-height-small) * 0.8);line-height:calc(var(--six-height-small) - var(--six-border-width) * 2);border-radius:var(--six-input-border-radius-small);padding:0 var(--six-spacing-x-small)}.tag--small .tag__clear{margin-left:var(--six-spacing-xx-small);margin-right:calc(-1 * var(--six-spacing-xxx-small))}.tag--medium{font-size:var(--six-button-font-size-medium);height:calc(var(--six-height-medium) * 0.8);line-height:calc(var(--six-height-medium) - var(--six-border-width) * 2);border-radius:var(--six-input-border-radius-medium);padding:0 var(--six-spacing-small)}.tag--medium .tag__clear{margin-left:var(--six-spacing-xx-small);margin-right:calc(-1 * var(--six-spacing-xx-small))}.tag--large{font-size:var(--six-button-font-size-large);height:calc(var(--six-height-large) * 0.8);line-height:calc(var(--six-height-large) - var(--six-border-width) * 2);border-radius:var(--six-input-border-radius-large);padding:0 var(--six-spacing-medium)}.tag--large .tag__clear{margin-left:var(--six-spacing-xx-small);margin-right:calc(-1 * var(--six-spacing-x-small))}.tag--pill{border-radius:var(--six-border-radius-pill)}";
4
6
 
@@ -6,6 +8,13 @@ const SixTag = class {
6
8
  constructor(hostRef) {
7
9
  registerInstance(this, hostRef);
8
10
  this.sixClear = createEvent(this, "six-tag-clear", 7);
11
+ this.resizeObserver = new ResizeObserver(debounce(() => this.updateTooltip()));
12
+ this.updateTooltip = () => {
13
+ if (this.tooltipElement != null && this.contentSlotElement != null && this.contentElement != null) {
14
+ this.tooltipElement.content = getTextContent(this.contentSlotElement);
15
+ this.tooltipElement.disabled = !(this.contentElement.offsetWidth < this.contentElement.scrollWidth);
16
+ }
17
+ };
9
18
  this.handleClearClick = () => {
10
19
  this.sixClear.emit();
11
20
  };
@@ -14,6 +23,19 @@ const SixTag = class {
14
23
  this.pill = false;
15
24
  this.clearable = false;
16
25
  }
26
+ connectedCallback() {
27
+ if (this.contentElement != null) {
28
+ this.resizeObserver.observe(this.contentElement);
29
+ }
30
+ }
31
+ componentDidLoad() {
32
+ if (this.contentElement != null) {
33
+ this.resizeObserver.observe(this.contentElement);
34
+ }
35
+ }
36
+ disconnectedCallback() {
37
+ this.resizeObserver.disconnect();
38
+ }
17
39
  render() {
18
40
  return (h("span", { part: "base", class: {
19
41
  tag: true,
@@ -32,7 +54,7 @@ const SixTag = class {
32
54
  // Modifers
33
55
  'tag--pill': this.pill,
34
56
  'tag--clear': this.clearable,
35
- } }, h("span", { part: "content", class: "tag__content" }, h("slot", null)), this.clearable && (h("six-icon-button", { exportparts: "base:clear-button", size: "xSmall", name: "clear", class: "tag__clear", onClick: this.handleClearClick }))));
57
+ } }, h("six-tooltip", { ref: (el) => (this.tooltipElement = el) }, h("span", { ref: (el) => (this.contentElement = el), part: "content", class: "tag__content" }, h("slot", { ref: (el) => (this.contentSlotElement = el) }))), this.clearable && (h("six-icon-button", { exportparts: "base:clear-button", size: "xSmall", name: "clear", class: "tag__clear", onClick: this.handleClearClick }))));
36
58
  }
37
59
  };
38
60
  SixTag.style = sixTagCss;
@@ -1 +1 @@
1
- {"file":"six-tag.entry.js","mappings":";;AAAA,MAAM,SAAS,GAAG,y0EAAy0E;;MCqB90E,MAAM;;;;IAgBT,qBAAgB,GAAG;MACzB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;KACtB,CAAC;gBAhByG,SAAS;gBAGtD,QAAQ;gBAGtC,KAAK;qBAGA,KAAK;;EAS1C,MAAM;IACJ,QACE,YACE,IAAI,EAAC,MAAM,EACX,KAAK,EAAE;QACL,GAAG,EAAE,IAAI;;QAGT,cAAc,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;QACvC,cAAc,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;QACvC,WAAW,EAAE,IAAI,CAAC,IAAI,KAAK,MAAM;QACjC,cAAc,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;QACvC,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;QACrC,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;QACrC,WAAW,EAAE,IAAI,CAAC,IAAI,KAAK,MAAM;;QAGjC,YAAY,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;QACnC,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;QACrC,YAAY,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;;QAGnC,WAAW,EAAE,IAAI,CAAC,IAAI;QACtB,YAAY,EAAE,IAAI,CAAC,SAAS;OAC7B,IAED,YAAM,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,cAAc,IACvC,eAAQ,CACH,EAEN,IAAI,CAAC,SAAS,KACb,uBACE,WAAW,EAAC,mBAAmB,EAC/B,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,OAAO,EACZ,KAAK,EAAC,YAAY,EAClB,OAAO,EAAE,IAAI,CAAC,gBAAgB,GAC9B,CACH,CACI,EACP;GACH;;;;;;","names":[],"sources":["src/components/six-tag/six-tag.scss?tag=six-tag&encapsulation=shadow","src/components/six-tag/six-tag.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: inline-block;\n overflow: hidden;\n}\n\n.tag {\n display: flex;\n align-items: center;\n border: solid 1px;\n font-family: var(--six-font-family);\n line-height: 1;\n white-space: nowrap;\n user-select: none;\n cursor: default;\n}\n\n.tag__content {\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.tag__clear::part(base) {\n color: inherit;\n padding: 0;\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Type modifiers\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.tag--info {\n color: var(--six-color-white);\n background-color: var(--six-color-web-rock-900);\n border-color: var(--six-color-web-rock-900);\n}\n\n.tag--success {\n color: var(--six-color-web-rock-900);\n border-color: var(--six-color-success-500);\n background-color: var(--six-color-success-500);\n}\n\n.tag--primary {\n color: var(--six-color-web-rock-900);\n border-color: var(--six-color-clay-50);\n background-color: var(--six-color-clay-50);\n}\n\n.tag--warning {\n color: var(--six-color-web-rock-900);\n border-color: var(--six-color-warning-700);\n background-color: var(--six-color-warning-700);\n}\n\n.tag--danger {\n color: var(--six-color-white);\n border-color: var(--six-color-danger-800);\n background-color: var(--six-color-danger-800);\n}\n\n.tag--action {\n color: var(--six-color-white);\n border-color: var(--six-color-action-500);\n background-color: var(--six-color-action-500);\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Size modifiers\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.tag--small {\n font-size: var(--six-button-font-size-small);\n height: calc(var(--six-height-small) * 0.8);\n line-height: calc(var(--six-height-small) - var(--six-border-width) * 2);\n border-radius: var(--six-input-border-radius-small);\n padding: 0 var(--six-spacing-x-small);\n\n .tag__clear {\n margin-left: var(--six-spacing-xx-small);\n margin-right: calc(-1 * var(--six-spacing-xxx-small));\n }\n}\n\n.tag--medium {\n font-size: var(--six-button-font-size-medium);\n height: calc(var(--six-height-medium) * 0.8);\n line-height: calc(var(--six-height-medium) - var(--six-border-width) * 2);\n border-radius: var(--six-input-border-radius-medium);\n padding: 0 var(--six-spacing-small);\n\n .tag__clear {\n margin-left: var(--six-spacing-xx-small);\n margin-right: calc(-1 * var(--six-spacing-xx-small));\n }\n}\n\n.tag--large {\n font-size: var(--six-button-font-size-large);\n height: calc(var(--six-height-large) * 0.8);\n line-height: calc(var(--six-height-large) - var(--six-border-width) * 2);\n border-radius: var(--six-input-border-radius-large);\n padding: 0 var(--six-spacing-medium);\n\n .tag__clear {\n margin-left: var(--six-spacing-xx-small);\n margin-right: calc(-1 * var(--six-spacing-x-small));\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Pill modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.tag--pill {\n border-radius: var(--six-border-radius-pill);\n}\n","import { Component, Event, EventEmitter, h, Prop } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\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 tag's content.\n *\n * @part base - The component's base wrapper.\n * @part content - The tag content.\n * @part clear-button - The clear button.\n */\n\n@Component({\n tag: 'six-tag',\n styleUrl: 'six-tag.scss',\n shadow: true,\n})\nexport class SixTag {\n /** The tag's type. */\n @Prop({ reflect: true }) type: 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'action' | 'text' = 'primary';\n\n /** The tag's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to draw a pill-style tag with rounded edges. */\n @Prop({ reflect: true }) pill = false;\n\n /** Set to true to make the tag clearable. */\n @Prop({ reflect: true }) clearable = false;\n\n /** Emitted when the clear button is activated. */\n @Event({ eventName: 'six-tag-clear' }) sixClear!: EventEmitter<EmptyPayload>;\n\n private handleClearClick = () => {\n this.sixClear.emit();\n };\n\n render() {\n return (\n <span\n part=\"base\"\n class={{\n tag: true,\n\n // Types\n 'tag--primary': this.type === 'primary',\n 'tag--success': this.type === 'success',\n 'tag--info': this.type === 'info',\n 'tag--warning': this.type === 'warning',\n 'tag--danger': this.type === 'danger',\n 'tag--action': this.type === 'action',\n 'tag--text': this.type === 'text',\n\n // Sizes\n 'tag--small': this.size === 'small',\n 'tag--medium': this.size === 'medium',\n 'tag--large': this.size === 'large',\n\n // Modifers\n 'tag--pill': this.pill,\n 'tag--clear': this.clearable,\n }}\n >\n <span part=\"content\" class=\"tag__content\">\n <slot />\n </span>\n\n {this.clearable && (\n <six-icon-button\n exportparts=\"base:clear-button\"\n size=\"xSmall\"\n name=\"clear\"\n class=\"tag__clear\"\n onClick={this.handleClearClick}\n />\n )}\n </span>\n );\n }\n}\n"],"version":3}
1
+ {"file":"six-tag.entry.js","mappings":";;;;AAAA,MAA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,IAAI,KAAK,MAAM;QACjC,cAAc,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;QACvC,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;QACrC,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;QACrC,WAAW,EAAE,IAAI,CAAC,IAAI,KAAK,MAAM;;QAGjC,YAAY,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;QACnC,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;QACrC,YAAY,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;;QAGnC,WAAW,EAAE,IAAI,CAAC,IAAI;QACtB,YAAY,EAAE,IAAI,CAAC,SAAS;OAC7B,IAED,mBAAa,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,IAClD,YAAM,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EAAE,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,cAAc,IAChF,YAAM,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,kBAAkB,GAAG,EAAqB,CAAC,GAAI,CACnE,CACK,EAEb,IAAI,CAAC,SAAS,KACb,uBACE,WAAW,EAAC,mBAAmB,EAC/B,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,OAAO,EACZ,KAAK,EAAC,YAAY,EAClB,OAAO,EAAE,IAAI,CAAC,gBAAgB,GAC9B,CACH,CACI,EACP;GACH;;;;;;","names":[],"sources":["src/components/six-tag/six-tag.scss?tag=six-tag&encapsulation=shadow","src/components/six-tag/six-tag.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: inline-block;\n overflow: hidden;\n}\n\n.tag {\n display: flex;\n align-items: center;\n border: solid 1px;\n font-family: var(--six-font-family);\n line-height: 1;\n white-space: nowrap;\n user-select: none;\n cursor: default;\n}\n\n.tag__content {\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.tag__clear::part(base) {\n color: inherit;\n padding: 0;\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Type modifiers\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.tag--info {\n color: var(--six-color-white);\n background-color: var(--six-color-web-rock-900);\n border-color: var(--six-color-web-rock-900);\n}\n\n.tag--success {\n color: var(--six-color-web-rock-900);\n border-color: var(--six-color-success-500);\n background-color: var(--six-color-success-500);\n}\n\n.tag--primary {\n color: var(--six-color-web-rock-900);\n border-color: var(--six-color-clay-50);\n background-color: var(--six-color-clay-50);\n}\n\n.tag--warning {\n color: var(--six-color-web-rock-900);\n border-color: var(--six-color-warning-700);\n background-color: var(--six-color-warning-700);\n}\n\n.tag--danger {\n color: var(--six-color-white);\n border-color: var(--six-color-danger-800);\n background-color: var(--six-color-danger-800);\n}\n\n.tag--action {\n color: var(--six-color-white);\n border-color: var(--six-color-action-500);\n background-color: var(--six-color-action-500);\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Size modifiers\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.tag--small {\n font-size: var(--six-button-font-size-small);\n height: calc(var(--six-height-small) * 0.8);\n line-height: calc(var(--six-height-small) - var(--six-border-width) * 2);\n border-radius: var(--six-input-border-radius-small);\n padding: 0 var(--six-spacing-x-small);\n\n .tag__clear {\n margin-left: var(--six-spacing-xx-small);\n margin-right: calc(-1 * var(--six-spacing-xxx-small));\n }\n}\n\n.tag--medium {\n font-size: var(--six-button-font-size-medium);\n height: calc(var(--six-height-medium) * 0.8);\n line-height: calc(var(--six-height-medium) - var(--six-border-width) * 2);\n border-radius: var(--six-input-border-radius-medium);\n padding: 0 var(--six-spacing-small);\n\n .tag__clear {\n margin-left: var(--six-spacing-xx-small);\n margin-right: calc(-1 * var(--six-spacing-xx-small));\n }\n}\n\n.tag--large {\n font-size: var(--six-button-font-size-large);\n height: calc(var(--six-height-large) * 0.8);\n line-height: calc(var(--six-height-large) - var(--six-border-width) * 2);\n border-radius: var(--six-input-border-radius-large);\n padding: 0 var(--six-spacing-medium);\n\n .tag__clear {\n margin-left: var(--six-spacing-xx-small);\n margin-right: calc(-1 * var(--six-spacing-x-small));\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Pill modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.tag--pill {\n border-radius: var(--six-border-radius-pill);\n}\n","import { Component, Event, EventEmitter, h, Prop } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\nimport { getTextContent } from '../../utils/slot';\nimport { debounce } from '../../utils/execution-control';\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 tag's content.\n *\n * @part base - The component's base wrapper.\n * @part content - The tag content.\n * @part clear-button - The clear button.\n */\n\n@Component({\n tag: 'six-tag',\n styleUrl: 'six-tag.scss',\n shadow: true,\n})\nexport class SixTag {\n /** The tag's type. */\n @Prop({ reflect: true }) type: 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'action' | 'text' = 'primary';\n\n /** The tag's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to draw a pill-style tag with rounded edges. */\n @Prop({ reflect: true }) pill = false;\n\n /** Set to true to make the tag clearable. */\n @Prop({ reflect: true }) clearable = false;\n\n /** Emitted when the clear button is activated. */\n @Event({ eventName: 'six-tag-clear' }) sixClear!: EventEmitter<EmptyPayload>;\n\n private contentSlotElement: HTMLSlotElement | undefined;\n private tooltipElement: HTMLSixTooltipElement | undefined;\n private contentElement: HTMLElement | undefined;\n private resizeObserver = new ResizeObserver(debounce(() => this.updateTooltip()));\n\n connectedCallback() {\n if (this.contentElement != null) {\n this.resizeObserver.observe(this.contentElement);\n }\n }\n\n componentDidLoad() {\n if (this.contentElement != null) {\n this.resizeObserver.observe(this.contentElement);\n }\n }\n\n disconnectedCallback() {\n this.resizeObserver.disconnect();\n }\n\n private updateTooltip = () => {\n if (this.tooltipElement != null && this.contentSlotElement != null && this.contentElement != null) {\n this.tooltipElement.content = getTextContent(this.contentSlotElement);\n this.tooltipElement.disabled = !(this.contentElement.offsetWidth < this.contentElement.scrollWidth);\n }\n };\n\n private handleClearClick = () => {\n this.sixClear.emit();\n };\n\n render() {\n return (\n <span\n part=\"base\"\n class={{\n tag: true,\n\n // Types\n 'tag--primary': this.type === 'primary',\n 'tag--success': this.type === 'success',\n 'tag--info': this.type === 'info',\n 'tag--warning': this.type === 'warning',\n 'tag--danger': this.type === 'danger',\n 'tag--action': this.type === 'action',\n 'tag--text': this.type === 'text',\n\n // Sizes\n 'tag--small': this.size === 'small',\n 'tag--medium': this.size === 'medium',\n 'tag--large': this.size === 'large',\n\n // Modifers\n 'tag--pill': this.pill,\n 'tag--clear': this.clearable,\n }}\n >\n <six-tooltip ref={(el) => (this.tooltipElement = el)}>\n <span ref={(el) => (this.contentElement = el)} part=\"content\" class=\"tag__content\">\n <slot ref={(el) => (this.contentSlotElement = el as HTMLSlotElement)} />\n </span>\n </six-tooltip>\n\n {this.clearable && (\n <six-icon-button\n exportparts=\"base:clear-button\"\n size=\"xSmall\"\n name=\"clear\"\n class=\"tag__clear\"\n onClick={this.handleClearClick}\n />\n )}\n </span>\n );\n }\n}\n"],"version":3}
@@ -1,9 +1,9 @@
1
- import { r as registerInstance, c as createEvent, h, g as getElement } from './index-8a74f992.js';
2
- import { F as FormControl } from './form-control-32cb533f.js';
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index-4ee8b33e.js';
2
+ import { F as FormControl } from './form-control-079f7fb6.js';
3
3
  import { h as hasSlot } from './slot-ad36df3a.js';
4
4
  import { E as EventListeners } from './event-listeners-f6e5b0ab.js';
5
5
 
6
- const sixTextareaCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control .form-control__error-text{display:none}.form-control--has-label .form-control__label{display:inline-block;color:var(--six-input-label-color);font-weight:var(--six-font-weight-bold);margin-bottom:var(--six-spacing-x-small)}.form-control--has-label .form-control__label__required::after{color:var(--six-color-danger-800);content:\"*\"}.form-control--has-label.form-control--small .form-control__label{font-size:var(--six-input-label-font-size-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--six-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control_label{font-size:var(--six-input-label-font-size-large)}.form-control--has-help-text .form-control__help-text{display:block;color:var(--six-input-help-text-color);margin-top:var(--six-spacing-x-small)}.form-control--has-help-text .form-control__help-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--has-error-text .form-control__error-text{display:block;color:var(--six-color-danger-800);margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text .form-control__error-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text.form-control--small .form-control__error-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-error-text.form-control--medium .form-control__error-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-error-text.form-control--large .form-control__error-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--disabled .form-control__help-text{color:var(--six-input-help-text-color-disabled)}.form-control--disabled .form-control__label{color:var(--six-input-label-color-disabled)}.form-control--invalid:not(.form-control--disabled) .form-control__label{color:var(--six-input-label-color)}:host{display:block}.textarea{display:flex;align-items:center;position:relative;width:100%;font-family:var(--six-font-family);font-weight:var(--six-input-font-weight);line-height:var(--six-line-height-normal);letter-spacing:var(--six-input-letter-spacing);background-color:var(--six-input-background-color);border:solid var(--six-border-width) var(--six-input-border-color);vertical-align:middle;transition:var(--six-transition-fast) color, var(--six-transition-fast) border, var(--six-transition-fast) box-shadow;cursor:text}.textarea:hover:not(.textarea--disabled){background-color:var(--six-input-background-color-hover);border-color:var(--six-input-border-color-hover)}.textarea:hover:not(.textarea--disabled) .textarea__control{color:var(--six-input-color-hover)}.textarea.textarea--focused:not(.textarea--disabled){background-color:var(--six-input-background-color-focus);box-shadow:var(--six-input-focus-shadow);border-color:var(--six-input-border-color-focus);color:var(--six-input-color-focus)}.textarea.textarea--focused:not(.textarea--disabled) .textarea__control{color:var(--six-input-color-focus)}.textarea.textarea--disabled{background-color:var(--six-input-background-color-disabled);border-color:var(--six-input-border-color-disabled);cursor:not-allowed}.textarea.textarea--disabled .textarea__control{color:var(--six-input-color-disabled)}.textarea.textarea--disabled .textarea__control::placeholder{color:var(--six-input-placeholder-color-disabled)}.textarea__control{flex:1 1 auto;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:1.4;color:var(--sl-input-color);border:none;background:none;box-shadow:none;cursor:inherit;-webkit-appearance:none}.textarea__control::-webkit-search-decoration,.textarea__control::-webkit-search-cancel-button,.textarea__control::-webkit-search-results-button,.textarea__control::-webkit-search-results-decoration{-webkit-appearance:none}.textarea__control::placeholder{color:var(--six-input-placeholder-color);user-select:none}.textarea__control:focus{outline:none}.textarea--invalid:not(.textarea--disabled):not(.textarea--focused){border-color:var(--six-input-border-color-danger)}.textarea--small{border-radius:var(--six-input-border-radius-small);font-size:var(--six-input-font-size-small)}.textarea--small .textarea__control{padding:0.5em var(--six-input-spacing-small)}.textarea--medium{border-radius:var(--six-input-border-radius-medium);font-size:var(--six-input-font-size-medium)}.textarea--medium .textarea__control{padding:0.5em var(--six-input-spacing-medium)}.textarea--large{border-radius:var(--six-input-border-radius-large);font-size:var(--six-input-font-size-large)}.textarea--large .textarea__control{padding:0.5em var(--six-input-spacing-large)}.textarea--resize-none .textarea__control{resize:none}.textarea--resize-vertical .textarea__control{resize:vertical}.textarea--resize-auto .textarea__control{height:auto;resize:none}";
6
+ const sixTextareaCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control .form-control__error-text{display:none;text-align:left}.form-control--has-label .form-control__label{display:inline-block;color:var(--six-input-label-color);font-weight:var(--six-font-weight-bold);margin-bottom:var(--six-spacing-x-small)}.form-control--has-label .form-control__label__required::after{color:var(--six-color-danger-800);content:\"*\";transform:scale(1.1);margin-left:var(--six-spacing-xxx-small);position:absolute}.form-control--has-label.form-control--small .form-control__label{font-size:var(--six-input-label-font-size-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--six-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control_label{font-size:var(--six-input-label-font-size-large)}.form-control--has-help-text .form-control__help-text{display:block;color:var(--six-input-help-text-color);margin-top:var(--six-spacing-x-small)}.form-control--has-help-text .form-control__help-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--has-error-text .form-control__error-text{display:block;margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text .form-control__error-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text.form-control--small .form-control__error-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-error-text.form-control--medium .form-control__error-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-error-text.form-control--large .form-control__error-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--disabled .form-control__help-text{color:var(--six-input-help-text-color-disabled)}.form-control--disabled .form-control__label{color:var(--six-input-label-color-disabled)}.form-control--invalid:not(.form-control--disabled) .form-control__label{color:var(--six-input-label-color)}:host{display:block}.textarea{display:flex;align-items:center;position:relative;width:100%;font-family:var(--six-font-family);font-weight:var(--six-input-font-weight);line-height:var(--six-line-height-normal);letter-spacing:var(--six-input-letter-spacing);background-color:var(--six-input-background-color);border:solid var(--six-border-width) var(--six-input-border-color);vertical-align:middle;transition:var(--six-transition-fast) color, var(--six-transition-fast) border, var(--six-transition-fast) box-shadow;cursor:text}.textarea:hover:not(.textarea--disabled){background-color:var(--six-input-background-color-hover);border-color:var(--six-input-border-color-hover)}.textarea:hover:not(.textarea--disabled) .textarea__control{color:var(--six-input-color-hover)}.textarea.textarea--focused:not(.textarea--disabled){background-color:var(--six-input-background-color-focus);box-shadow:var(--six-input-focus-shadow);border-color:var(--six-input-border-color-focus);color:var(--six-input-color-focus)}.textarea.textarea--focused:not(.textarea--disabled) .textarea__control{color:var(--six-input-color-focus)}.textarea.textarea--disabled{background-color:var(--six-input-background-color-disabled);border-color:var(--six-input-border-color-disabled);cursor:not-allowed}.textarea.textarea--disabled .textarea__control{color:var(--six-input-color-disabled)}.textarea.textarea--disabled .textarea__control::placeholder{color:var(--six-input-placeholder-color-disabled)}.textarea__control{flex:1 1 auto;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:1.4;color:var(--sl-input-color);border:none;background:none;box-shadow:none;cursor:inherit;-webkit-appearance:none}.textarea__control::-webkit-search-decoration,.textarea__control::-webkit-search-cancel-button,.textarea__control::-webkit-search-results-button,.textarea__control::-webkit-search-results-decoration{-webkit-appearance:none}.textarea__control::placeholder{color:var(--six-input-placeholder-color);user-select:none}.textarea__control:focus{outline:none}.textarea--invalid:not(.textarea--disabled):not(.textarea--focused){border-color:var(--six-input-border-color-danger)}.textarea--small{border-radius:var(--six-input-border-radius-small);font-size:var(--six-input-font-size-small)}.textarea--small .textarea__control{padding:0.5em var(--six-input-spacing-small)}.textarea--medium{border-radius:var(--six-input-border-radius-medium);font-size:var(--six-input-font-size-medium)}.textarea--medium .textarea__control{padding:0.5em var(--six-input-spacing-medium)}.textarea--large{border-radius:var(--six-input-border-radius-large);font-size:var(--six-input-font-size-large)}.textarea--large .textarea__control{padding:0.5em var(--six-input-spacing-large)}.textarea--resize-none .textarea__control{resize:none}.textarea--resize-vertical .textarea__control{resize:vertical}.textarea--resize-auto .textarea__control{height:auto;resize:none}";
7
7
 
8
8
  let id = 0;
9
9
  const SixTextarea = class {
@@ -43,10 +43,12 @@ const SixTextarea = class {
43
43
  this.handleSlotChange = () => {
44
44
  this.hasLabelSlot = hasSlot(this.host, 'label');
45
45
  this.hasHelpTextSlot = hasSlot(this.host, 'help-text');
46
+ this.hasErrorTextSlot = hasSlot(this.host, 'error-text');
46
47
  };
47
48
  this.hasFocus = false;
48
49
  this.hasHelpTextSlot = false;
49
50
  this.hasLabelSlot = false;
51
+ this.hasErrorTextSlot = false;
50
52
  this.size = 'medium';
51
53
  this.name = '';
52
54
  this.value = '';
@@ -61,6 +63,7 @@ const SixTextarea = class {
61
63
  this.required = false;
62
64
  this.label = '';
63
65
  this.errorText = '';
66
+ this.errorTextCount = undefined;
64
67
  this.invalid = false;
65
68
  this.autocapitalize = 'off';
66
69
  this.autocorrect = 'off';
@@ -156,7 +159,7 @@ const SixTextarea = class {
156
159
  return ((_a = this.value) !== null && _a !== void 0 ? _a : '').toString();
157
160
  }
158
161
  render() {
159
- 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: {
162
+ 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.hasErrorTextSlot, size: this.size, disabled: this.disabled, required: this.required, displayError: this.invalid }, h("div", { part: "base", class: {
160
163
  textarea: true,
161
164
  // Sizes
162
165
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,IAAI,CAAC,WAAW,EAC7B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,SAAS,EAAE,IAAI,CAAC,SAAS,qBACR,IAAI,CAAC,OAAO,EAC7B,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,MAAM,EAAE,IAAI,CAAC,UAAU,GACvB,CACE,CACM,EACd;GACH;;;;;;;;;;;;;;","names":[],"sources":["src/components/six-textarea/six-textarea.scss?tag=six-textarea&encapsulation=shadow","src/components/six-textarea/six-textarea.tsx"],"sourcesContent":["@import 'src/global/component';\n@import '../../functional-components/form-control/form-control';\n\n:host {\n display: block;\n}\n\n.textarea {\n display: flex;\n align-items: center;\n position: relative;\n width: 100%;\n font-family: var(--six-font-family);\n font-weight: var(--six-input-font-weight);\n line-height: var(--six-line-height-normal);\n letter-spacing: var(--six-input-letter-spacing);\n background-color: var(--six-input-background-color);\n border: solid var(--six-border-width) var(--six-input-border-color);\n vertical-align: middle;\n transition: var(--six-transition-fast) color, var(--six-transition-fast) border, var(--six-transition-fast) box-shadow;\n cursor: text;\n\n &:hover:not(.textarea--disabled) {\n background-color: var(--six-input-background-color-hover);\n border-color: var(--six-input-border-color-hover);\n\n .textarea__control {\n color: var(--six-input-color-hover);\n }\n }\n\n &.textarea--focused:not(.textarea--disabled) {\n background-color: var(--six-input-background-color-focus);\n box-shadow: var(--six-input-focus-shadow);\n border-color: var(--six-input-border-color-focus);\n color: var(--six-input-color-focus);\n\n .textarea__control {\n color: var(--six-input-color-focus);\n }\n }\n\n &.textarea--disabled {\n background-color: var(--six-input-background-color-disabled);\n border-color: var(--six-input-border-color-disabled);\n cursor: not-allowed;\n\n .textarea__control {\n color: var(--six-input-color-disabled);\n\n &::placeholder {\n color: var(--six-input-placeholder-color-disabled);\n }\n }\n }\n}\n\n.textarea__control {\n flex: 1 1 auto;\n font-family: inherit;\n font-size: inherit;\n font-weight: inherit;\n line-height: 1.4;\n color: var(--sl-input-color);\n border: none;\n background: none;\n box-shadow: none;\n cursor: inherit;\n -webkit-appearance: none;\n\n &::-webkit-search-decoration,\n &::-webkit-search-cancel-button,\n &::-webkit-search-results-button,\n &::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n\n &::placeholder {\n color: var(--six-input-placeholder-color);\n user-select: none;\n }\n\n &:focus {\n outline: none;\n }\n}\n\n.textarea--invalid:not(.textarea--disabled):not(.textarea--focused) {\n border-color: var(--six-input-border-color-danger);\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Size modifiers\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.textarea--small {\n border-radius: var(--six-input-border-radius-small);\n font-size: var(--six-input-font-size-small);\n\n .textarea__control {\n padding: 0.5em var(--six-input-spacing-small);\n }\n}\n\n.textarea--medium {\n border-radius: var(--six-input-border-radius-medium);\n font-size: var(--six-input-font-size-medium);\n\n .textarea__control {\n padding: 0.5em var(--six-input-spacing-medium);\n }\n}\n\n.textarea--large {\n border-radius: var(--six-input-border-radius-large);\n font-size: var(--six-input-font-size-large);\n\n .textarea__control {\n padding: 0.5em var(--six-input-spacing-large);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Resize types\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.textarea--resize-none .textarea__control {\n resize: none;\n}\n\n.textarea--resize-vertical .textarea__control {\n resize: vertical;\n}\n\n.textarea--resize-auto .textarea__control {\n height: auto;\n resize: none;\n}\n","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 { EventListeners } from '../../utils/event-listeners';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot label - The textarea's label. Alternatively, you can use the label prop.\n * @slot help-text - Help text that describes how to use the input.\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n *\n * @part base - The component's base wrapper.\n * @part form-control - The form control that wraps the label, textarea, and help text.\n * @part label - The textarea label.\n * @part textarea - The textarea control.\n * @part help-text - The textarea help text.\n */\n@Component({\n tag: 'six-textarea',\n styleUrl: 'six-textarea.scss',\n shadow: true,\n})\nexport class SixTextarea {\n private inputId = `textarea-${++id}`;\n private labelId = `textarea-label-${id}`;\n private helpTextId = `textarea-help-text-${id}`;\n private errorTextId = `input-error-text-${id}`;\n private nativeTextarea?: HTMLTextAreaElement;\n private eventListeners = new EventListeners();\n private resizeObserver = new ResizeObserver(() => this.setTextareaHeight());\n\n @Element() host!: HTMLSixTextareaElement;\n\n @State() hasFocus = false;\n @State() hasHelpTextSlot = false;\n @State() hasLabelSlot = false;\n\n /** The textarea's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** The textarea's name attribute. */\n @Prop({ reflect: true }) name = '';\n\n /** The textarea's value attribute. */\n @Prop({ mutable: true, reflect: true }) value = '';\n\n /** The textarea's help text. Alternatively, you can use the help-text slot. */\n @Prop() helpText = '';\n\n /** The textarea's placeholder text. */\n @Prop() placeholder?: string;\n\n /** The number of rows to display by default. */\n @Prop() rows = 4;\n\n /** Controls how the textarea can be resized. */\n @Prop() resize: 'none' | 'vertical' | 'auto' = 'vertical';\n\n /** Set to true to disable the textarea. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true for a readonly textarea. */\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 /** 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 /** The textarea's autocaptialize attribute. */\n @Prop() autocapitalize = 'off';\n\n /** The textarea's autocorrect attribute. */\n @Prop() autocorrect: 'on' | 'off' = 'off';\n\n /** The textarea's autocomplete attribute. */\n @Prop() autocomplete = 'off';\n\n /** The textarea's autofocus attribute. */\n @Prop() autofocus = false;\n\n /** The textarea's spellcheck attribute. */\n @Prop() spellcheck = false;\n\n /** The textarea's inputmode attribute. */\n @Prop() inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';\n\n /** Emitted when the control's value changes. Access the new value via event.target.value. */\n @Event({ eventName: 'six-textarea-change' }) sixChange!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control receives input. Access the new value via event.target.value. */\n @Event({ eventName: 'six-textarea-input' }) sixInput!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-textarea-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control loses focus. Access the new value via event.target.value. */\n @Event({ eventName: 'six-textarea-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n @Watch('helpText')\n @Watch('errorText')\n @Watch('label')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n @Watch('rows')\n handleRowsChange() {\n this.setTextareaHeight();\n }\n\n @Watch('value')\n handleValueChange() {\n this.value = this.getValue();\n if (this.nativeTextarea != null) {\n if (this.nativeTextarea.value !== this.value) {\n this.nativeTextarea.value = this.value;\n }\n }\n }\n\n connectedCallback() {\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.forward('six-textarea-input', 'input', this.host);\n this.eventListeners.forward('six-textarea-change', 'change', this.host);\n this.eventListeners.forward('six-textarea-focus', 'focus', this.host);\n this.eventListeners.forward('six-textarea-blur', 'blur', this.host);\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n componentDidLoad() {\n this.setTextareaHeight();\n if (this.nativeTextarea != null) {\n this.resizeObserver.observe(this.nativeTextarea);\n }\n }\n\n disconnectedCallback() {\n if (this.nativeTextarea != null) {\n this.resizeObserver.unobserve(this.nativeTextarea);\n }\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.removeAll();\n }\n\n /** Sets focus on the textarea. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeTextarea?.focus(options);\n }\n\n /** Removes focus fromt the textarea. */\n @Method()\n async removeFocus() {\n this.nativeTextarea?.blur();\n }\n\n /** Selects all the text in the input. */\n @Method()\n async select() {\n return this.nativeTextarea?.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.nativeTextarea?.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.nativeTextarea == null) return;\n\n this.nativeTextarea.setRangeText(replacement, start, end, selectMode);\n if (this.getValue() !== this.nativeTextarea.value) {\n this.value = this.nativeTextarea.value;\n this.setTextareaHeight();\n this.sixChange.emit();\n this.sixInput.emit();\n }\n }\n\n private handleChange = () => {\n if (this.nativeTextarea != null) {\n this.value = this.nativeTextarea.value;\n this.sixChange.emit();\n }\n };\n\n private handleInput = () => {\n if (this.nativeTextarea != null) {\n this.value = this.nativeTextarea.value;\n this.setTextareaHeight();\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 handleSlotChange = () => {\n this.hasLabelSlot = hasSlot(this.host, 'label');\n this.hasHelpTextSlot = hasSlot(this.host, 'help-text');\n };\n\n private setTextareaHeight() {\n if (this.nativeTextarea == null) return;\n\n if (this.resize === 'auto') {\n this.nativeTextarea.style.height = 'auto';\n this.nativeTextarea.style.height = this.nativeTextarea.scrollHeight + 'px';\n } else {\n (this.nativeTextarea.style.height as string | undefined) = undefined;\n }\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 textarea: true,\n\n // Sizes\n 'textarea--small': this.size === 'small',\n 'textarea--medium': this.size === 'medium',\n 'textarea--large': this.size === 'large',\n\n // States\n 'textarea--disabled': this.disabled,\n 'textarea--focused': this.hasFocus,\n 'textarea--empty': this.getValue().length === 0,\n 'textarea--invalid': this.invalid,\n\n // Modifiers\n 'textarea--resize-none': this.resize === 'none',\n 'textarea--resize-vertical': this.resize === 'vertical',\n 'textarea--resize-auto': this.resize === 'auto',\n }}\n >\n <textarea\n part=\"textarea\"\n ref={(el) => (this.nativeTextarea = el)}\n id={this.inputId}\n class=\"textarea__control\"\n name={this.name}\n placeholder={this.placeholder}\n disabled={this.disabled}\n readOnly={this.readonly}\n rows={this.rows}\n minLength={this.minlength}\n maxLength={this.maxlength}\n value={this.getValue()}\n autoCapitalize={this.autocapitalize}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n spellcheck={this.spellcheck}\n required={this.required}\n inputMode={this.inputmode}\n aria-labelledby={this.labelId}\n onChange={this.handleChange}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n </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,CAAC,IAAI,EACf,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,EACtB,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,SAAS,EAAE,IAAI,CAAC,SAAS,qBACR,IAAI,CAAC,OAAO,EAC7B,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,MAAM,EAAE,IAAI,CAAC,UAAU,GACvB,CACE,CACM,EACd;GACH;;;;;;;;;;;;;;","names":[],"sources":["src/components/six-textarea/six-textarea.scss?tag=six-textarea&encapsulation=shadow","src/components/six-textarea/six-textarea.tsx"],"sourcesContent":["@import 'src/global/component';\n@import '../../functional-components/form-control/form-control';\n\n:host {\n display: block;\n}\n\n.textarea {\n display: flex;\n align-items: center;\n position: relative;\n width: 100%;\n font-family: var(--six-font-family);\n font-weight: var(--six-input-font-weight);\n line-height: var(--six-line-height-normal);\n letter-spacing: var(--six-input-letter-spacing);\n background-color: var(--six-input-background-color);\n border: solid var(--six-border-width) var(--six-input-border-color);\n vertical-align: middle;\n transition: var(--six-transition-fast) color, var(--six-transition-fast) border, var(--six-transition-fast) box-shadow;\n cursor: text;\n\n &:hover:not(.textarea--disabled) {\n background-color: var(--six-input-background-color-hover);\n border-color: var(--six-input-border-color-hover);\n\n .textarea__control {\n color: var(--six-input-color-hover);\n }\n }\n\n &.textarea--focused:not(.textarea--disabled) {\n background-color: var(--six-input-background-color-focus);\n box-shadow: var(--six-input-focus-shadow);\n border-color: var(--six-input-border-color-focus);\n color: var(--six-input-color-focus);\n\n .textarea__control {\n color: var(--six-input-color-focus);\n }\n }\n\n &.textarea--disabled {\n background-color: var(--six-input-background-color-disabled);\n border-color: var(--six-input-border-color-disabled);\n cursor: not-allowed;\n\n .textarea__control {\n color: var(--six-input-color-disabled);\n\n &::placeholder {\n color: var(--six-input-placeholder-color-disabled);\n }\n }\n }\n}\n\n.textarea__control {\n flex: 1 1 auto;\n font-family: inherit;\n font-size: inherit;\n font-weight: inherit;\n line-height: 1.4;\n color: var(--sl-input-color);\n border: none;\n background: none;\n box-shadow: none;\n cursor: inherit;\n -webkit-appearance: none;\n\n &::-webkit-search-decoration,\n &::-webkit-search-cancel-button,\n &::-webkit-search-results-button,\n &::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n\n &::placeholder {\n color: var(--six-input-placeholder-color);\n user-select: none;\n }\n\n &:focus {\n outline: none;\n }\n}\n\n.textarea--invalid:not(.textarea--disabled):not(.textarea--focused) {\n border-color: var(--six-input-border-color-danger);\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Size modifiers\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.textarea--small {\n border-radius: var(--six-input-border-radius-small);\n font-size: var(--six-input-font-size-small);\n\n .textarea__control {\n padding: 0.5em var(--six-input-spacing-small);\n }\n}\n\n.textarea--medium {\n border-radius: var(--six-input-border-radius-medium);\n font-size: var(--six-input-font-size-medium);\n\n .textarea__control {\n padding: 0.5em var(--six-input-spacing-medium);\n }\n}\n\n.textarea--large {\n border-radius: var(--six-input-border-radius-large);\n font-size: var(--six-input-font-size-large);\n\n .textarea__control {\n padding: 0.5em var(--six-input-spacing-large);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Resize types\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.textarea--resize-none .textarea__control {\n resize: none;\n}\n\n.textarea--resize-vertical .textarea__control {\n resize: vertical;\n}\n\n.textarea--resize-auto .textarea__control {\n height: auto;\n resize: none;\n}\n","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 { EventListeners } from '../../utils/event-listeners';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot label - The textarea's label. Alternatively, you can use the label prop.\n * @slot help-text - Help text that describes how to use the input.\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n *\n * @part base - The component's base wrapper.\n * @part form-control - The form control that wraps the label, textarea, and help text.\n * @part label - The textarea label.\n * @part textarea - The textarea control.\n * @part help-text - The textarea help text.\n */\n@Component({\n tag: 'six-textarea',\n styleUrl: 'six-textarea.scss',\n shadow: true,\n})\nexport class SixTextarea {\n private inputId = `textarea-${++id}`;\n private labelId = `textarea-label-${id}`;\n private helpTextId = `textarea-help-text-${id}`;\n private errorTextId = `input-error-text-${id}`;\n private nativeTextarea?: HTMLTextAreaElement;\n private eventListeners = new EventListeners();\n private resizeObserver = new ResizeObserver(() => this.setTextareaHeight());\n\n @Element() host!: HTMLSixTextareaElement;\n\n @State() hasFocus = false;\n @State() hasHelpTextSlot = false;\n @State() hasLabelSlot = false;\n @State() hasErrorTextSlot = false;\n\n /** The textarea's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** The textarea's name attribute. */\n @Prop({ reflect: true }) name = '';\n\n /** The textarea's value attribute. */\n @Prop({ mutable: true, reflect: true }) value = '';\n\n /** The textarea's help text. Alternatively, you can use the help-text slot. */\n @Prop() helpText = '';\n\n /** The textarea's placeholder text. */\n @Prop() placeholder?: string;\n\n /** The number of rows to display by default. */\n @Prop() rows = 4;\n\n /** Controls how the textarea can be resized. */\n @Prop() resize: 'none' | 'vertical' | 'auto' = 'vertical';\n\n /** Set to true to disable the textarea. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true for a readonly textarea. */\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 /** 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 /** The textarea's autocaptialize attribute. */\n @Prop() autocapitalize = 'off';\n\n /** The textarea's autocorrect attribute. */\n @Prop() autocorrect: 'on' | 'off' = 'off';\n\n /** The textarea's autocomplete attribute. */\n @Prop() autocomplete = 'off';\n\n /** The textarea's autofocus attribute. */\n @Prop() autofocus = false;\n\n /** The textarea's spellcheck attribute. */\n @Prop() spellcheck = false;\n\n /** The textarea's inputmode attribute. */\n @Prop() inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';\n\n /** Emitted when the control's value changes. Access the new value via event.target.value. */\n @Event({ eventName: 'six-textarea-change' }) sixChange!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control receives input. Access the new value via event.target.value. */\n @Event({ eventName: 'six-textarea-input' }) sixInput!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-textarea-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control loses focus. Access the new value via event.target.value. */\n @Event({ eventName: 'six-textarea-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n @Watch('helpText')\n @Watch('errorText')\n @Watch('label')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n @Watch('rows')\n handleRowsChange() {\n this.setTextareaHeight();\n }\n\n @Watch('value')\n handleValueChange() {\n this.value = this.getValue();\n if (this.nativeTextarea != null) {\n if (this.nativeTextarea.value !== this.value) {\n this.nativeTextarea.value = this.value;\n }\n }\n }\n\n connectedCallback() {\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.forward('six-textarea-input', 'input', this.host);\n this.eventListeners.forward('six-textarea-change', 'change', this.host);\n this.eventListeners.forward('six-textarea-focus', 'focus', this.host);\n this.eventListeners.forward('six-textarea-blur', 'blur', this.host);\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n componentDidLoad() {\n this.setTextareaHeight();\n if (this.nativeTextarea != null) {\n this.resizeObserver.observe(this.nativeTextarea);\n }\n }\n\n disconnectedCallback() {\n if (this.nativeTextarea != null) {\n this.resizeObserver.unobserve(this.nativeTextarea);\n }\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.removeAll();\n }\n\n /** Sets focus on the textarea. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeTextarea?.focus(options);\n }\n\n /** Removes focus fromt the textarea. */\n @Method()\n async removeFocus() {\n this.nativeTextarea?.blur();\n }\n\n /** Selects all the text in the input. */\n @Method()\n async select() {\n return this.nativeTextarea?.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.nativeTextarea?.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.nativeTextarea == null) return;\n\n this.nativeTextarea.setRangeText(replacement, start, end, selectMode);\n if (this.getValue() !== this.nativeTextarea.value) {\n this.value = this.nativeTextarea.value;\n this.setTextareaHeight();\n this.sixChange.emit();\n this.sixInput.emit();\n }\n }\n\n private handleChange = () => {\n if (this.nativeTextarea != null) {\n this.value = this.nativeTextarea.value;\n this.sixChange.emit();\n }\n };\n\n private handleInput = () => {\n if (this.nativeTextarea != null) {\n this.value = this.nativeTextarea.value;\n this.setTextareaHeight();\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 handleSlotChange = () => {\n this.hasLabelSlot = hasSlot(this.host, 'label');\n this.hasHelpTextSlot = hasSlot(this.host, 'help-text');\n this.hasErrorTextSlot = hasSlot(this.host, 'error-text');\n };\n\n private setTextareaHeight() {\n if (this.nativeTextarea == null) return;\n\n if (this.resize === 'auto') {\n this.nativeTextarea.style.height = 'auto';\n this.nativeTextarea.style.height = this.nativeTextarea.scrollHeight + 'px';\n } else {\n (this.nativeTextarea.style.height as string | undefined) = undefined;\n }\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.hasErrorTextSlot}\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 textarea: true,\n\n // Sizes\n 'textarea--small': this.size === 'small',\n 'textarea--medium': this.size === 'medium',\n 'textarea--large': this.size === 'large',\n\n // States\n 'textarea--disabled': this.disabled,\n 'textarea--focused': this.hasFocus,\n 'textarea--empty': this.getValue().length === 0,\n 'textarea--invalid': this.invalid,\n\n // Modifiers\n 'textarea--resize-none': this.resize === 'none',\n 'textarea--resize-vertical': this.resize === 'vertical',\n 'textarea--resize-auto': this.resize === 'auto',\n }}\n >\n <textarea\n part=\"textarea\"\n ref={(el) => (this.nativeTextarea = el)}\n id={this.inputId}\n class=\"textarea__control\"\n name={this.name}\n placeholder={this.placeholder}\n disabled={this.disabled}\n readOnly={this.readonly}\n rows={this.rows}\n minLength={this.minlength}\n maxLength={this.maxlength}\n value={this.getValue()}\n autoCapitalize={this.autocapitalize}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n spellcheck={this.spellcheck}\n required={this.required}\n inputMode={this.inputmode}\n aria-labelledby={this.labelId}\n onChange={this.handleChange}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n </div>\n </FormControl>\n );\n }\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, g as getElement } from './index-8a74f992.js';
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index-4ee8b33e.js';
2
2
  import { h as hasSlot, g as getSlot } from './slot-ad36df3a.js';
3
3
 
4
4
  const sixTileCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{display:inline-block}.tile{min-height:var(--tile-size);width:var(--tile-size);background-color:var(--six-color-clay-50);display:inline-grid;grid-template-columns:100%;grid-template-areas:\"header\" \"middle\" \"footer\"}.tile--small{--tile-size:80px;--tile-padding-size:var(--six-spacing-medium)}.tile--medium{--tile-size:120px;--tile-padding-size:var(--six-spacing-large)}.tile--large{--tile-size:160px;--tile-padding-size:var(--six-spacing-x-large)}.tile:not(.tile--visible){visibility:hidden}.tile--elevated{border:0;box-shadow:var(--six-elevation-8dp)}.tile__header{grid-area:header;height:5%;justify-self:right;display:flex;justify-content:right;opacity:0;transition:var(--six-transition-fast) opacity}.tile:hover>.tile__header{opacity:1}.tile__header--hidden{visibility:hidden}.tile__header six-icon-button{margin-top:-6px;margin-right:-6px;margin-bottom:-16px}.tile__body,.tile__body--large,.tile__body--medium,.tile__body--small{grid-area:middle;display:grid;place-items:center;cursor:pointer;padding-left:var(--tile-padding-size);padding-right:var(--tile-padding-size)}.tile__body six-icon::part(base),.tile__body--large six-icon::part(base),.tile__body--medium six-icon::part(base),.tile__body--small six-icon::part(base){padding:0}.tile__body--small{--tile-padding-size:var(--six-spacing-medium)}.tile__body--medium{--tile-padding-size:var(--six-spacing-large)}.tile__body--large{--tile-padding-size:var(--six-spacing-x-large)}.tile__footer,.tile__footer--large,.tile__footer--medium,.tile__footer--small{grid-area:footer;display:flex;justify-content:center;cursor:pointer;font-weight:var(--six-font-weight-normal);color:var(--six-color-web-rock-900)}.tile__footer--small{font-size:var(--six-font-size-xxx-small)}.tile__footer--medium{font-size:var(--six-font-size-xx-small)}.tile__footer--large{font-size:var(--six-font-size-small)}.tile__footer .label__footer,.tile__footer--small .label__footer,.tile__footer--medium .label__footer,.tile__footer--large .label__footer{overflow:hidden;text-overflow:ellipsis;width:calc(var(--tile-size) - 2em);text-align:center}";
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, g as getElement } from './index-8a74f992.js';
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index-4ee8b33e.js';
2
2
  import { I as ItemPickerType } from './types-59b455aa.js';
3
3
  import { D as DEFAULT_DEBOUNCE_FAST, b as DEFAULT_DEBOUNCE_INSANELY_FAST, a as debounce } from './execution-control-e0892a05.js';
4
4
  import { E as EventListeners } from './event-listeners-f6e5b0ab.js';
@@ -153,6 +153,7 @@ const SixTimepicker = class {
153
153
  this.required = false;
154
154
  this.placeholder = undefined;
155
155
  this.errorText = '';
156
+ this.errorTextCount = undefined;
156
157
  this.label = '';
157
158
  this.invalid = false;
158
159
  this.name = '';
@@ -181,11 +182,6 @@ const SixTimepicker = class {
181
182
  valueChanged() {
182
183
  this.updateValue();
183
184
  }
184
- invalidChanged(invalid) {
185
- if (this.inputElement) {
186
- this.inputElement.invalid = invalid;
187
- }
188
- }
189
185
  /** Sets focus on the datepickers input. */
190
186
  async setFocus(options) {
191
187
  var _a;
@@ -373,10 +369,10 @@ const SixTimepicker = class {
373
369
  } }, icon));
374
370
  }
375
371
  render() {
376
- return (h("div", { part: "container", ref: (el) => (this.wrapper = el), class: "timepicker__container" }, h("six-input", { ref: (el) => (this.inputElement = el), part: "input", onClick: () => this.openPopup(), value: this.value, placeholder: this.placeholder, readonly: this.readonly, disabled: this.disabled, size: this.size, name: this.name, label: this.label, required: this.required, "error-text": this.errorText, class: {
372
+ return (h("div", { part: "container", ref: (el) => (this.wrapper = el), class: "timepicker__container" }, h("six-input", { ref: (el) => (this.inputElement = el), part: "input", onClick: () => this.openPopup(), value: this.value, placeholder: this.placeholder, readonly: this.readonly, disabled: this.disabled, errorTextCount: this.errorTextCount, errorText: this.errorText, invalid: this.invalid, size: this.size, name: this.name, label: this.label, required: this.required, class: {
377
373
  'input--empty': this.value === '',
378
374
  'input--hide': this.inline,
379
- } }, this.renderCustomIcon(), this.renderClearable(), hasSlot(this.host, 'label') ? (h("span", { slot: "label" }, h("slot", { name: "label" }))) : null), this.open && (h("div", { ref: (el) => (this.popup = el), part: "popup", class: {
375
+ } }, 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", { ref: (el) => (this.popup = el), part: "popup", class: {
380
376
  timepicker__popup: true,
381
377
  'timepicker__popup--is-up': this.placement == null ? this.placement === 'top' : this.isPopupContentUp,
382
378
  'timepicker__popup--is-inline': this.inline,
@@ -384,8 +380,7 @@ const SixTimepicker = class {
384
380
  }
385
381
  get host() { return getElement(this); }
386
382
  static get watchers() { return {
387
- "value": ["valueChanged"],
388
- "invalid": ["invalidChanged"]
383
+ "value": ["valueChanged"]
389
384
  }; }
390
385
  };
391
386
  SixTimepicker.style = sixTimepickerCss;