@six-group/ui-library 0.0.0-insider.a358260 → 0.0.0-insider.cd0cd0d

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 (737) hide show
  1. package/dist/cjs/event-listeners-b835dfae.js +61 -0
  2. package/dist/cjs/event-listeners-b835dfae.js.map +1 -0
  3. package/dist/cjs/{execution-control-46f388e0.js → execution-control-45c84c46.js} +6 -3
  4. package/dist/cjs/execution-control-45c84c46.js.map +1 -0
  5. package/dist/cjs/{focus-visible-0b352c74.js → focus-visible-e0d93a95.js} +3 -3
  6. package/dist/cjs/focus-visible-e0d93a95.js.map +1 -0
  7. package/dist/cjs/form-8cbd4e0e.js +20 -0
  8. package/dist/cjs/form-8cbd4e0e.js.map +1 -0
  9. package/dist/cjs/{form-control-2c17c573.js → form-control-8df00a52.js} +9 -10
  10. package/dist/cjs/form-control-8df00a52.js.map +1 -0
  11. package/dist/cjs/index.cjs.js +94 -0
  12. package/dist/cjs/index.cjs.js.map +1 -1
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/cjs/{modal-48d42228.js → modal-21350fb5.js} +4 -3
  15. package/dist/cjs/modal-21350fb5.js.map +1 -0
  16. package/dist/cjs/{popover-f743f62b.js → popover-8885d50f.js} +39 -31
  17. package/dist/cjs/popover-8885d50f.js.map +1 -0
  18. package/dist/cjs/popup-44836aaf.js +103 -0
  19. package/dist/cjs/popup-44836aaf.js.map +1 -0
  20. package/dist/cjs/set-attributes_2.cjs.entry.js +3 -1
  21. package/dist/cjs/set-attributes_2.cjs.entry.js.map +1 -1
  22. package/dist/cjs/six-alert.cjs.entry.js +17 -22
  23. package/dist/cjs/six-alert.cjs.entry.js.map +1 -1
  24. package/dist/cjs/six-avatar.cjs.entry.js +4 -7
  25. package/dist/cjs/six-avatar.cjs.entry.js.map +1 -1
  26. package/dist/cjs/six-badge.cjs.entry.js +1 -1
  27. package/dist/cjs/six-badge.cjs.entry.js.map +1 -1
  28. package/dist/cjs/six-button.cjs.entry.js +35 -33
  29. package/dist/cjs/six-button.cjs.entry.js.map +1 -1
  30. package/dist/cjs/six-card.cjs.entry.js.map +1 -1
  31. package/dist/cjs/six-checkbox.cjs.entry.js +9 -47
  32. package/dist/cjs/six-checkbox.cjs.entry.js.map +1 -1
  33. package/dist/cjs/six-datepicker.cjs.entry.js +150 -278
  34. package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
  35. package/dist/cjs/six-details.cjs.entry.js +47 -46
  36. package/dist/cjs/six-details.cjs.entry.js.map +1 -1
  37. package/dist/cjs/six-dialog.cjs.entry.js +35 -39
  38. package/dist/cjs/six-dialog.cjs.entry.js.map +1 -1
  39. package/dist/cjs/six-drawer.cjs.entry.js +32 -36
  40. package/dist/cjs/six-drawer.cjs.entry.js.map +1 -1
  41. package/dist/cjs/six-dropdown_2.cjs.entry.js +214 -195
  42. package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
  43. package/dist/cjs/six-error-page.cjs.entry.js +19 -21
  44. package/dist/cjs/six-error-page.cjs.entry.js.map +1 -1
  45. package/dist/cjs/six-file-list-item.cjs.entry.js +1 -1
  46. package/dist/cjs/six-file-list-item.cjs.entry.js.map +1 -1
  47. package/dist/cjs/six-file-upload.cjs.entry.js +20 -20
  48. package/dist/cjs/six-file-upload.cjs.entry.js.map +1 -1
  49. package/dist/cjs/six-group-label.cjs.entry.js +11 -10
  50. package/dist/cjs/six-group-label.cjs.entry.js.map +1 -1
  51. package/dist/cjs/six-header.cjs.entry.js +65 -43
  52. package/dist/cjs/six-header.cjs.entry.js.map +1 -1
  53. package/dist/cjs/six-icon-button.cjs.entry.js +3 -3
  54. package/dist/cjs/six-icon-button.cjs.entry.js.map +1 -1
  55. package/dist/cjs/six-input.cjs.entry.js +28 -87
  56. package/dist/cjs/six-input.cjs.entry.js.map +1 -1
  57. package/dist/cjs/six-item-picker.cjs.entry.js +58 -77
  58. package/dist/cjs/six-item-picker.cjs.entry.js.map +1 -1
  59. package/dist/cjs/six-language-switcher.cjs.entry.js +1 -1
  60. package/dist/cjs/six-language-switcher.cjs.entry.js.map +1 -1
  61. package/dist/cjs/six-layout-grid.cjs.entry.js +4 -2
  62. package/dist/cjs/six-layout-grid.cjs.entry.js.map +1 -1
  63. package/dist/cjs/six-main-container.cjs.entry.js.map +1 -1
  64. package/dist/cjs/six-menu-item.cjs.entry.js +8 -6
  65. package/dist/cjs/six-menu-item.cjs.entry.js.map +1 -1
  66. package/dist/cjs/six-picto.cjs.entry.js +4 -1
  67. package/dist/cjs/six-picto.cjs.entry.js.map +1 -1
  68. package/dist/cjs/six-progress-ring.cjs.entry.js +3 -3
  69. package/dist/cjs/six-progress-ring.cjs.entry.js.map +1 -1
  70. package/dist/cjs/six-radio.cjs.entry.js +17 -23
  71. package/dist/cjs/six-radio.cjs.entry.js.map +1 -1
  72. package/dist/cjs/six-range.cjs.entry.js +6 -44
  73. package/dist/cjs/six-range.cjs.entry.js.map +1 -1
  74. package/dist/cjs/six-root.cjs.entry.js +1 -1
  75. package/dist/cjs/six-root.cjs.entry.js.map +1 -1
  76. package/dist/cjs/six-search-field.cjs.entry.js +10 -5
  77. package/dist/cjs/six-search-field.cjs.entry.js.map +1 -1
  78. package/dist/cjs/six-select.cjs.entry.js +129 -222
  79. package/dist/cjs/six-select.cjs.entry.js.map +1 -1
  80. package/dist/cjs/six-sidebar-item-group.cjs.entry.js +9 -5
  81. package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -1
  82. package/dist/cjs/six-sidebar.cjs.entry.js +39 -18
  83. package/dist/cjs/six-sidebar.cjs.entry.js.map +1 -1
  84. package/dist/cjs/six-spinner.cjs.entry.js.map +1 -1
  85. package/dist/cjs/six-switch.cjs.entry.js +54 -62
  86. package/dist/cjs/six-switch.cjs.entry.js.map +1 -1
  87. package/dist/cjs/six-tab-group.cjs.entry.js +130 -112
  88. package/dist/cjs/six-tab-group.cjs.entry.js.map +1 -1
  89. package/dist/cjs/six-tab-panel.cjs.entry.js +1 -1
  90. package/dist/cjs/six-tab-panel.cjs.entry.js.map +1 -1
  91. package/dist/cjs/six-tab.cjs.entry.js +4 -2
  92. package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
  93. package/dist/cjs/six-tag.cjs.entry.js +4 -7
  94. package/dist/cjs/six-tag.cjs.entry.js.map +1 -1
  95. package/dist/cjs/six-textarea.cjs.entry.js +27 -76
  96. package/dist/cjs/six-textarea.cjs.entry.js.map +1 -1
  97. package/dist/cjs/six-tile.cjs.entry.js +13 -16
  98. package/dist/cjs/six-tile.cjs.entry.js.map +1 -1
  99. package/dist/cjs/six-timepicker.cjs.entry.js +157 -213
  100. package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -1
  101. package/dist/cjs/six-tooltip.cjs.entry.js +53 -56
  102. package/dist/cjs/six-tooltip.cjs.entry.js.map +1 -1
  103. package/dist/cjs/{slot-ad537f24.js → slot-bccbdb59.js} +11 -10
  104. package/dist/cjs/slot-bccbdb59.js.map +1 -0
  105. package/dist/cjs/ui-library.cjs.js +1 -1
  106. package/dist/collection/collection-manifest.json +0 -1
  107. package/dist/collection/components/six-alert/six-alert.js +17 -22
  108. package/dist/collection/components/six-alert/six-alert.js.map +1 -1
  109. package/dist/collection/components/six-avatar/six-avatar.js +4 -7
  110. package/dist/collection/components/six-avatar/six-avatar.js.map +1 -1
  111. package/dist/collection/components/six-badge/six-badge.js +1 -1
  112. package/dist/collection/components/six-badge/six-badge.js.map +1 -1
  113. package/dist/collection/components/six-button/six-button.js +44 -40
  114. package/dist/collection/components/six-button/six-button.js.map +1 -1
  115. package/dist/collection/components/six-card/six-card.js +1 -1
  116. package/dist/collection/components/six-card/six-card.js.map +1 -1
  117. package/dist/collection/components/six-checkbox/six-checkbox.js +20 -128
  118. package/dist/collection/components/six-checkbox/six-checkbox.js.map +1 -1
  119. package/dist/collection/components/six-datepicker/components/day-selection.js +2 -2
  120. package/dist/collection/components/six-datepicker/components/day-selection.js.map +1 -1
  121. package/dist/collection/components/six-datepicker/components/month-selection.js +4 -3
  122. package/dist/collection/components/six-datepicker/components/month-selection.js.map +1 -1
  123. package/dist/collection/components/six-datepicker/components/year-selection.js +9 -6
  124. package/dist/collection/components/six-datepicker/components/year-selection.js.map +1 -1
  125. package/dist/collection/components/six-datepicker/six-datepicker.js +186 -376
  126. package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
  127. package/dist/collection/components/six-details/six-details.js +51 -50
  128. package/dist/collection/components/six-details/six-details.js.map +1 -1
  129. package/dist/collection/components/six-dialog/six-dialog.js +34 -38
  130. package/dist/collection/components/six-dialog/six-dialog.js.map +1 -1
  131. package/dist/collection/components/six-drawer/six-drawer.js +31 -35
  132. package/dist/collection/components/six-drawer/six-drawer.js.map +1 -1
  133. package/dist/collection/components/six-dropdown/six-dropdown.js +185 -173
  134. package/dist/collection/components/six-dropdown/six-dropdown.js.map +1 -1
  135. package/dist/collection/components/six-error-page/six-error-page.js +25 -27
  136. package/dist/collection/components/six-error-page/six-error-page.js.map +1 -1
  137. package/dist/collection/components/six-file-list-item/six-file-list-item.js +3 -3
  138. package/dist/collection/components/six-file-list-item/six-file-list-item.js.map +1 -1
  139. package/dist/collection/components/six-file-upload/six-file-upload.js +32 -32
  140. package/dist/collection/components/six-file-upload/six-file-upload.js.map +1 -1
  141. package/dist/collection/components/six-group-label/six-group-label.js +12 -10
  142. package/dist/collection/components/six-group-label/six-group-label.js.map +1 -1
  143. package/dist/collection/components/six-header/six-header.js +64 -42
  144. package/dist/collection/components/six-header/six-header.js.map +1 -1
  145. package/dist/collection/components/six-icon-button/six-icon-button.js +8 -8
  146. package/dist/collection/components/six-icon-button/six-icon-button.js.map +1 -1
  147. package/dist/collection/components/six-input/six-input.js +77 -274
  148. package/dist/collection/components/six-input/six-input.js.map +1 -1
  149. package/dist/collection/components/six-item-picker/six-item-picker.js +65 -84
  150. package/dist/collection/components/six-item-picker/six-item-picker.js.map +1 -1
  151. package/dist/collection/components/six-language-switcher/six-language-switcher.js +2 -2
  152. package/dist/collection/components/six-language-switcher/six-language-switcher.js.map +1 -1
  153. package/dist/collection/components/six-layout-grid/six-layout-grid.js +10 -8
  154. package/dist/collection/components/six-layout-grid/six-layout-grid.js.map +1 -1
  155. package/dist/collection/components/six-main-container/six-main-container.js +1 -1
  156. package/dist/collection/components/six-main-container/six-main-container.js.map +1 -1
  157. package/dist/collection/components/six-menu/six-menu.js +29 -23
  158. package/dist/collection/components/six-menu/six-menu.js.map +1 -1
  159. package/dist/collection/components/six-menu-item/six-menu-item.js +7 -5
  160. package/dist/collection/components/six-menu-item/six-menu-item.js.map +1 -1
  161. package/dist/collection/components/six-picto/six-picto.js +5 -2
  162. package/dist/collection/components/six-picto/six-picto.js.map +1 -1
  163. package/dist/collection/components/six-progress-ring/six-progress-ring.js +5 -4
  164. package/dist/collection/components/six-progress-ring/six-progress-ring.js.map +1 -1
  165. package/dist/collection/components/six-radio/six-radio.js +21 -76
  166. package/dist/collection/components/six-radio/six-radio.js.map +1 -1
  167. package/dist/collection/components/six-range/six-range.js +27 -119
  168. package/dist/collection/components/six-range/six-range.js.map +1 -1
  169. package/dist/collection/components/six-root/six-root.js +4 -4
  170. package/dist/collection/components/six-root/six-root.js.map +1 -1
  171. package/dist/collection/components/six-search-field/six-search-field.js +10 -5
  172. package/dist/collection/components/six-search-field/six-search-field.js.map +1 -1
  173. package/dist/collection/components/six-select/six-select.js +165 -294
  174. package/dist/collection/components/six-select/six-select.js.map +1 -1
  175. package/dist/collection/components/six-select/util.js.map +1 -1
  176. package/dist/collection/components/six-sidebar/six-sidebar.js +40 -19
  177. package/dist/collection/components/six-sidebar/six-sidebar.js.map +1 -1
  178. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js +12 -8
  179. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js.map +1 -1
  180. package/dist/collection/components/six-spinner/six-spinner.js.map +1 -1
  181. package/dist/collection/components/six-stage-indicator/six-stage-indicator.js +1 -1
  182. package/dist/collection/components/six-switch/six-switch.css +77 -0
  183. package/dist/collection/components/six-switch/six-switch.js +96 -133
  184. package/dist/collection/components/six-switch/six-switch.js.map +1 -1
  185. package/dist/collection/components/six-tab/six-tab.js +5 -3
  186. package/dist/collection/components/six-tab/six-tab.js.map +1 -1
  187. package/dist/collection/components/six-tab-group/six-tab-group.js +130 -112
  188. package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -1
  189. package/dist/collection/components/six-tab-panel/six-tab-panel.js +2 -2
  190. package/dist/collection/components/six-tab-panel/six-tab-panel.js.map +1 -1
  191. package/dist/collection/components/six-tag/six-tag.js +4 -7
  192. package/dist/collection/components/six-tag/six-tag.js.map +1 -1
  193. package/dist/collection/components/six-textarea/six-textarea.js +72 -207
  194. package/dist/collection/components/six-textarea/six-textarea.js.map +1 -1
  195. package/dist/collection/components/six-tile/six-tile.js +17 -20
  196. package/dist/collection/components/six-tile/six-tile.js.map +1 -1
  197. package/dist/collection/components/six-timepicker/six-timepicker.js +153 -254
  198. package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -1
  199. package/dist/collection/components/six-tooltip/six-tooltip.js +56 -59
  200. package/dist/collection/components/six-tooltip/six-tooltip.js.map +1 -1
  201. package/dist/collection/functional-components/form-control/form-control.js +8 -9
  202. package/dist/collection/functional-components/form-control/form-control.js.map +1 -1
  203. package/dist/collection/index.js +1 -1
  204. package/dist/collection/index.js.map +1 -1
  205. package/dist/collection/testUtil/delay.js.map +1 -1
  206. package/dist/collection/utils/date-util.js +25 -16
  207. package/dist/collection/utils/date-util.js.map +1 -1
  208. package/dist/collection/utils/error-messages.js +91 -0
  209. package/dist/collection/utils/error-messages.js.map +1 -0
  210. package/dist/collection/utils/event-listeners.js +22 -6
  211. package/dist/collection/utils/event-listeners.js.map +1 -1
  212. package/dist/collection/utils/execution-control.js +5 -4
  213. package/dist/collection/utils/execution-control.js.map +1 -1
  214. package/dist/collection/utils/focus-visible.js +2 -2
  215. package/dist/collection/utils/focus-visible.js.map +1 -1
  216. package/dist/collection/utils/form.js +15 -0
  217. package/dist/collection/utils/form.js.map +1 -0
  218. package/dist/collection/utils/modal.js +3 -2
  219. package/dist/collection/utils/modal.js.map +1 -1
  220. package/dist/collection/utils/popover.js +32 -18
  221. package/dist/collection/utils/popover.js.map +1 -1
  222. package/dist/collection/utils/popup.js +95 -0
  223. package/dist/collection/utils/popup.js.map +1 -0
  224. package/dist/collection/utils/slot.js +9 -24
  225. package/dist/collection/utils/slot.js.map +1 -1
  226. package/dist/collection/utils/tabbable.js +6 -6
  227. package/dist/collection/utils/tabbable.js.map +1 -1
  228. package/dist/collection/utils/time.util.js +48 -34
  229. package/dist/collection/utils/time.util.js.map +1 -1
  230. package/dist/collection/utils/type-check.js +0 -1
  231. package/dist/collection/utils/type-check.js.map +1 -1
  232. package/dist/collection/wrappers/set-attributes/set-attributes.js +3 -1
  233. package/dist/collection/wrappers/set-attributes/set-attributes.js.map +1 -1
  234. package/dist/components/event-listeners.js +22 -6
  235. package/dist/components/event-listeners.js.map +1 -1
  236. package/dist/components/execution-control.js +5 -2
  237. package/dist/components/execution-control.js.map +1 -1
  238. package/dist/components/focus-visible.js +2 -2
  239. package/dist/components/focus-visible.js.map +1 -1
  240. package/dist/components/form-control.js +8 -9
  241. package/dist/components/form-control.js.map +1 -1
  242. package/dist/components/form.js +18 -0
  243. package/dist/components/form.js.map +1 -0
  244. package/dist/components/index.js +92 -3
  245. package/dist/components/index.js.map +1 -1
  246. package/dist/components/modal.js +3 -2
  247. package/dist/components/modal.js.map +1 -1
  248. package/dist/components/popover.js +38 -30
  249. package/dist/components/popover.js.map +1 -1
  250. package/dist/components/set-attributes2.js +3 -1
  251. package/dist/components/set-attributes2.js.map +1 -1
  252. package/dist/components/six-alert.js +17 -22
  253. package/dist/components/six-alert.js.map +1 -1
  254. package/dist/components/six-avatar.js +4 -7
  255. package/dist/components/six-avatar.js.map +1 -1
  256. package/dist/components/six-badge.js +1 -1
  257. package/dist/components/six-badge.js.map +1 -1
  258. package/dist/components/six-button.js +34 -32
  259. package/dist/components/six-button.js.map +1 -1
  260. package/dist/components/six-card.js.map +1 -1
  261. package/dist/components/six-checkbox.js +7 -50
  262. package/dist/components/six-checkbox.js.map +1 -1
  263. package/dist/components/six-datepicker.js +150 -281
  264. package/dist/components/six-datepicker.js.map +1 -1
  265. package/dist/components/six-details2.js +46 -45
  266. package/dist/components/six-details2.js.map +1 -1
  267. package/dist/components/six-dialog.js +33 -37
  268. package/dist/components/six-dialog.js.map +1 -1
  269. package/dist/components/six-drawer.js +30 -34
  270. package/dist/components/six-drawer.js.map +1 -1
  271. package/dist/components/six-dropdown2.js +185 -173
  272. package/dist/components/six-dropdown2.js.map +1 -1
  273. package/dist/components/six-error-page.js +19 -21
  274. package/dist/components/six-error-page.js.map +1 -1
  275. package/dist/components/six-file-list-item.js +1 -1
  276. package/dist/components/six-file-list-item.js.map +1 -1
  277. package/dist/components/six-file-upload.js +20 -20
  278. package/dist/components/six-file-upload.js.map +1 -1
  279. package/dist/components/six-group-label.js +10 -9
  280. package/dist/components/six-group-label.js.map +1 -1
  281. package/dist/components/six-header.js +64 -42
  282. package/dist/components/six-header.js.map +1 -1
  283. package/dist/components/six-icon-button2.js +2 -2
  284. package/dist/components/six-icon-button2.js.map +1 -1
  285. package/dist/components/six-input2.js +30 -98
  286. package/dist/components/six-input2.js.map +1 -1
  287. package/dist/components/six-item-picker2.js +56 -75
  288. package/dist/components/six-item-picker2.js.map +1 -1
  289. package/dist/components/six-language-switcher.js +1 -1
  290. package/dist/components/six-language-switcher.js.map +1 -1
  291. package/dist/components/six-layout-grid.js +5 -3
  292. package/dist/components/six-layout-grid.js.map +1 -1
  293. package/dist/components/six-main-container.js.map +1 -1
  294. package/dist/components/six-menu-item2.js +7 -5
  295. package/dist/components/six-menu-item2.js.map +1 -1
  296. package/dist/components/six-menu2.js +25 -18
  297. package/dist/components/six-menu2.js.map +1 -1
  298. package/dist/components/six-picto2.js +4 -1
  299. package/dist/components/six-picto2.js.map +1 -1
  300. package/dist/components/six-progress-ring.js +3 -3
  301. package/dist/components/six-progress-ring.js.map +1 -1
  302. package/dist/components/six-radio.js +19 -28
  303. package/dist/components/six-radio.js.map +1 -1
  304. package/dist/components/six-range.js +8 -50
  305. package/dist/components/six-range.js.map +1 -1
  306. package/dist/components/six-root.js +1 -1
  307. package/dist/components/six-root.js.map +1 -1
  308. package/dist/components/six-search-field.js +8 -3
  309. package/dist/components/six-search-field.js.map +1 -1
  310. package/dist/components/six-select.js +129 -228
  311. package/dist/components/six-select.js.map +1 -1
  312. package/dist/components/six-sidebar-item-group.js +8 -4
  313. package/dist/components/six-sidebar-item-group.js.map +1 -1
  314. package/dist/components/six-sidebar.js +39 -18
  315. package/dist/components/six-sidebar.js.map +1 -1
  316. package/dist/components/six-spinner2.js.map +1 -1
  317. package/dist/components/six-switch.js +58 -68
  318. package/dist/components/six-switch.js.map +1 -1
  319. package/dist/components/six-tab-group.js +129 -111
  320. package/dist/components/six-tab-group.js.map +1 -1
  321. package/dist/components/six-tab-panel.js +1 -1
  322. package/dist/components/six-tab-panel.js.map +1 -1
  323. package/dist/components/six-tab.js +4 -2
  324. package/dist/components/six-tab.js.map +1 -1
  325. package/dist/components/six-tag2.js +4 -7
  326. package/dist/components/six-tag2.js.map +1 -1
  327. package/dist/components/six-textarea.js +29 -84
  328. package/dist/components/six-textarea.js.map +1 -1
  329. package/dist/components/six-tile.js +14 -17
  330. package/dist/components/six-tile.js.map +1 -1
  331. package/dist/components/six-timepicker.js +1 -1
  332. package/dist/components/six-timepicker2.js +247 -258
  333. package/dist/components/six-timepicker2.js.map +1 -1
  334. package/dist/components/six-tooltip2.js +52 -55
  335. package/dist/components/six-tooltip2.js.map +1 -1
  336. package/dist/components/slot.js +10 -9
  337. package/dist/components/slot.js.map +1 -1
  338. package/dist/components.json +494 -891
  339. package/dist/esm/event-listeners-535f3ad1.js +59 -0
  340. package/dist/esm/event-listeners-535f3ad1.js.map +1 -0
  341. package/dist/esm/{execution-control-1a60d709.js → execution-control-72cc50f4.js} +6 -3
  342. package/dist/esm/execution-control-72cc50f4.js.map +1 -0
  343. package/dist/esm/{focus-visible-97933ea9.js → focus-visible-fa7129a0.js} +3 -3
  344. package/dist/esm/focus-visible-fa7129a0.js.map +1 -0
  345. package/dist/esm/form-0b9c11cd.js +18 -0
  346. package/dist/esm/form-0b9c11cd.js.map +1 -0
  347. package/dist/esm/{form-control-3b440ea1.js → form-control-785c5f79.js} +9 -10
  348. package/dist/esm/form-control-785c5f79.js.map +1 -0
  349. package/dist/esm/index.js +91 -0
  350. package/dist/esm/index.js.map +1 -1
  351. package/dist/esm/loader.js +1 -1
  352. package/dist/esm/{modal-5ebdc320.js → modal-b1d96441.js} +4 -3
  353. package/dist/esm/modal-b1d96441.js.map +1 -0
  354. package/dist/esm/{popover-bd2c2fca.js → popover-2e72e7d8.js} +39 -31
  355. package/dist/esm/popover-2e72e7d8.js.map +1 -0
  356. package/dist/esm/popup-678b8592.js +98 -0
  357. package/dist/esm/popup-678b8592.js.map +1 -0
  358. package/dist/esm/set-attributes_2.entry.js +3 -1
  359. package/dist/esm/set-attributes_2.entry.js.map +1 -1
  360. package/dist/esm/six-alert.entry.js +17 -22
  361. package/dist/esm/six-alert.entry.js.map +1 -1
  362. package/dist/esm/six-avatar.entry.js +4 -7
  363. package/dist/esm/six-avatar.entry.js.map +1 -1
  364. package/dist/esm/six-badge.entry.js +1 -1
  365. package/dist/esm/six-badge.entry.js.map +1 -1
  366. package/dist/esm/six-button.entry.js +35 -33
  367. package/dist/esm/six-button.entry.js.map +1 -1
  368. package/dist/esm/six-card.entry.js.map +1 -1
  369. package/dist/esm/six-checkbox.entry.js +9 -47
  370. package/dist/esm/six-checkbox.entry.js.map +1 -1
  371. package/dist/esm/six-datepicker.entry.js +148 -276
  372. package/dist/esm/six-datepicker.entry.js.map +1 -1
  373. package/dist/esm/six-details.entry.js +47 -46
  374. package/dist/esm/six-details.entry.js.map +1 -1
  375. package/dist/esm/six-dialog.entry.js +35 -39
  376. package/dist/esm/six-dialog.entry.js.map +1 -1
  377. package/dist/esm/six-drawer.entry.js +32 -36
  378. package/dist/esm/six-drawer.entry.js.map +1 -1
  379. package/dist/esm/six-dropdown_2.entry.js +214 -195
  380. package/dist/esm/six-dropdown_2.entry.js.map +1 -1
  381. package/dist/esm/six-error-page.entry.js +19 -21
  382. package/dist/esm/six-error-page.entry.js.map +1 -1
  383. package/dist/esm/six-file-list-item.entry.js +1 -1
  384. package/dist/esm/six-file-list-item.entry.js.map +1 -1
  385. package/dist/esm/six-file-upload.entry.js +20 -20
  386. package/dist/esm/six-file-upload.entry.js.map +1 -1
  387. package/dist/esm/six-group-label.entry.js +11 -10
  388. package/dist/esm/six-group-label.entry.js.map +1 -1
  389. package/dist/esm/six-header.entry.js +65 -43
  390. package/dist/esm/six-header.entry.js.map +1 -1
  391. package/dist/esm/six-icon-button.entry.js +3 -3
  392. package/dist/esm/six-icon-button.entry.js.map +1 -1
  393. package/dist/esm/six-input.entry.js +28 -87
  394. package/dist/esm/six-input.entry.js.map +1 -1
  395. package/dist/esm/six-item-picker.entry.js +58 -77
  396. package/dist/esm/six-item-picker.entry.js.map +1 -1
  397. package/dist/esm/six-language-switcher.entry.js +1 -1
  398. package/dist/esm/six-language-switcher.entry.js.map +1 -1
  399. package/dist/esm/six-layout-grid.entry.js +4 -2
  400. package/dist/esm/six-layout-grid.entry.js.map +1 -1
  401. package/dist/esm/six-main-container.entry.js.map +1 -1
  402. package/dist/esm/six-menu-item.entry.js +8 -6
  403. package/dist/esm/six-menu-item.entry.js.map +1 -1
  404. package/dist/esm/six-picto.entry.js +4 -1
  405. package/dist/esm/six-picto.entry.js.map +1 -1
  406. package/dist/esm/six-progress-ring.entry.js +3 -3
  407. package/dist/esm/six-progress-ring.entry.js.map +1 -1
  408. package/dist/esm/six-radio.entry.js +17 -23
  409. package/dist/esm/six-radio.entry.js.map +1 -1
  410. package/dist/esm/six-range.entry.js +6 -44
  411. package/dist/esm/six-range.entry.js.map +1 -1
  412. package/dist/esm/six-root.entry.js +1 -1
  413. package/dist/esm/six-root.entry.js.map +1 -1
  414. package/dist/esm/six-search-field.entry.js +10 -5
  415. package/dist/esm/six-search-field.entry.js.map +1 -1
  416. package/dist/esm/six-select.entry.js +129 -222
  417. package/dist/esm/six-select.entry.js.map +1 -1
  418. package/dist/esm/six-sidebar-item-group.entry.js +9 -5
  419. package/dist/esm/six-sidebar-item-group.entry.js.map +1 -1
  420. package/dist/esm/six-sidebar.entry.js +39 -18
  421. package/dist/esm/six-sidebar.entry.js.map +1 -1
  422. package/dist/esm/six-spinner.entry.js.map +1 -1
  423. package/dist/esm/six-switch.entry.js +55 -63
  424. package/dist/esm/six-switch.entry.js.map +1 -1
  425. package/dist/esm/six-tab-group.entry.js +130 -112
  426. package/dist/esm/six-tab-group.entry.js.map +1 -1
  427. package/dist/esm/six-tab-panel.entry.js +1 -1
  428. package/dist/esm/six-tab-panel.entry.js.map +1 -1
  429. package/dist/esm/six-tab.entry.js +4 -2
  430. package/dist/esm/six-tab.entry.js.map +1 -1
  431. package/dist/esm/six-tag.entry.js +4 -7
  432. package/dist/esm/six-tag.entry.js.map +1 -1
  433. package/dist/esm/six-textarea.entry.js +27 -76
  434. package/dist/esm/six-textarea.entry.js.map +1 -1
  435. package/dist/esm/six-tile.entry.js +13 -16
  436. package/dist/esm/six-tile.entry.js.map +1 -1
  437. package/dist/esm/six-timepicker.entry.js +157 -213
  438. package/dist/esm/six-timepicker.entry.js.map +1 -1
  439. package/dist/esm/six-tooltip.entry.js +53 -56
  440. package/dist/esm/six-tooltip.entry.js.map +1 -1
  441. package/dist/esm/{slot-6f3984c7.js → slot-2e64df19.js} +11 -10
  442. package/dist/esm/slot-2e64df19.js.map +1 -0
  443. package/dist/esm/ui-library.js +1 -1
  444. package/dist/types/components/six-alert/six-alert.d.ts +5 -7
  445. package/dist/types/components/six-avatar/six-avatar.d.ts +1 -2
  446. package/dist/types/components/six-badge/six-badge.d.ts +0 -1
  447. package/dist/types/components/six-button/six-button.d.ts +8 -9
  448. package/dist/types/components/six-checkbox/six-checkbox.d.ts +5 -17
  449. package/dist/types/components/six-datepicker/components/day-selection.d.ts +9 -5
  450. package/dist/types/components/six-datepicker/components/month-selection.d.ts +8 -5
  451. package/dist/types/components/six-datepicker/components/year-selection.d.ts +7 -5
  452. package/dist/types/components/six-datepicker/six-datepicker.d.ts +41 -52
  453. package/dist/types/components/six-details/six-details.d.ts +12 -12
  454. package/dist/types/components/six-dialog/six-dialog.d.ts +12 -13
  455. package/dist/types/components/six-drawer/six-drawer.d.ts +12 -13
  456. package/dist/types/components/six-dropdown/six-dropdown.d.ts +28 -32
  457. package/dist/types/components/six-error-page/six-error-page.d.ts +1 -1
  458. package/dist/types/components/six-file-list-item/six-file-list-item.d.ts +3 -3
  459. package/dist/types/components/six-file-upload/six-file-upload.d.ts +11 -11
  460. package/dist/types/components/six-group-label/six-group-label.d.ts +5 -5
  461. package/dist/types/components/six-header/six-header.d.ts +16 -27
  462. package/dist/types/components/six-icon-button/six-icon-button.d.ts +4 -4
  463. package/dist/types/components/six-input/six-input.d.ts +9 -35
  464. package/dist/types/components/six-item-picker/six-item-picker.d.ts +13 -16
  465. package/dist/types/components/six-layout-grid/six-layout-grid.d.ts +1 -1
  466. package/dist/types/components/six-menu/six-menu.d.ts +10 -11
  467. package/dist/types/components/six-menu-item/six-menu-item.d.ts +6 -6
  468. package/dist/types/components/six-progress-ring/six-progress-ring.d.ts +2 -2
  469. package/dist/types/components/six-radio/six-radio.d.ts +5 -10
  470. package/dist/types/components/six-range/six-range.d.ts +6 -21
  471. package/dist/types/components/six-root/six-root.d.ts +3 -3
  472. package/dist/types/components/six-search-field/six-search-field.d.ts +4 -5
  473. package/dist/types/components/six-select/six-select.d.ts +19 -31
  474. package/dist/types/components/six-sidebar/six-sidebar.d.ts +5 -5
  475. package/dist/types/components/six-sidebar-item-group/six-sidebar-item-group.d.ts +7 -6
  476. package/dist/types/components/six-spinner/six-spinner.d.ts +2 -2
  477. package/dist/types/components/six-switch/six-switch.d.ts +18 -21
  478. package/dist/types/components/six-tab/six-tab.d.ts +3 -3
  479. package/dist/types/components/six-tab-group/six-tab-group.d.ts +20 -21
  480. package/dist/types/components/six-tab-panel/six-tab-panel.d.ts +1 -1
  481. package/dist/types/components/six-tag/six-tag.d.ts +1 -3
  482. package/dist/types/components/six-textarea/six-textarea.d.ts +9 -28
  483. package/dist/types/components/six-tile/six-tile.d.ts +2 -3
  484. package/dist/types/components/six-timepicker/six-timepicker.d.ts +26 -43
  485. package/dist/types/components/six-tooltip/six-tooltip.d.ts +19 -21
  486. package/dist/types/components.d.ts +190 -417
  487. package/dist/types/functional-components/form-control/form-control.d.ts +5 -6
  488. package/dist/types/index.d.ts +1 -0
  489. package/dist/types/testUtil/delay.d.ts +1 -1
  490. package/dist/types/types.d.ts +2 -0
  491. package/dist/types/utils/date-util.d.ts +18 -10
  492. package/dist/types/utils/error-messages.d.ts +42 -0
  493. package/dist/types/utils/event-listeners.d.ts +2 -1
  494. package/dist/types/utils/execution-control.d.ts +1 -3
  495. package/dist/types/utils/form.d.ts +1 -0
  496. package/dist/types/utils/modal.d.ts +2 -2
  497. package/dist/types/utils/popover.d.ts +5 -5
  498. package/dist/types/utils/popup.d.ts +9 -0
  499. package/dist/types/utils/slot.d.ts +2 -7
  500. package/dist/types/utils/tabbable.d.ts +1 -1
  501. package/dist/types/utils/time.util.d.ts +18 -9
  502. package/dist/types/utils/type-check.d.ts +3 -4
  503. package/dist/types/wrappers/set-attributes/set-attributes.d.ts +1 -1
  504. package/dist/ui-library/index.esm.js +1 -1
  505. package/dist/ui-library/index.esm.js.map +1 -1
  506. package/dist/ui-library/p-0108fe92.entry.js +2 -0
  507. package/dist/ui-library/p-0108fe92.entry.js.map +1 -0
  508. package/dist/ui-library/p-03a145f5.entry.js +2 -0
  509. package/dist/ui-library/p-03a145f5.entry.js.map +1 -0
  510. package/dist/ui-library/{p-3c635d0a.entry.js → p-087fdd96.entry.js} +2 -2
  511. package/dist/ui-library/p-087fdd96.entry.js.map +1 -0
  512. package/dist/ui-library/p-09779e47.entry.js +2 -0
  513. package/dist/ui-library/p-09779e47.entry.js.map +1 -0
  514. package/dist/ui-library/p-097cced4.entry.js.map +1 -1
  515. package/dist/ui-library/p-0b2c6348.js +2 -0
  516. package/dist/ui-library/p-0b2c6348.js.map +1 -0
  517. package/dist/ui-library/p-0cc08e91.js +2 -0
  518. package/dist/ui-library/p-0cc08e91.js.map +1 -0
  519. package/dist/ui-library/p-0fe78f9b.js +2 -0
  520. package/dist/ui-library/p-0fe78f9b.js.map +1 -0
  521. package/dist/ui-library/p-18e9f8b8.entry.js +2 -0
  522. package/dist/ui-library/p-18e9f8b8.entry.js.map +1 -0
  523. package/dist/ui-library/p-2761f908.js +2 -0
  524. package/dist/ui-library/p-2761f908.js.map +1 -0
  525. package/dist/ui-library/{p-19b50b5a.entry.js → p-28be55f0.entry.js} +2 -2
  526. package/dist/ui-library/p-28be55f0.entry.js.map +1 -0
  527. package/dist/ui-library/{p-c349d1d4.entry.js → p-3929b0af.entry.js} +2 -2
  528. package/dist/ui-library/p-3929b0af.entry.js.map +1 -0
  529. package/dist/ui-library/{p-9328e5bc.entry.js → p-445ba5b8.entry.js} +2 -2
  530. package/dist/ui-library/p-445ba5b8.entry.js.map +1 -0
  531. package/dist/ui-library/p-4d408fb4.js +2 -0
  532. package/dist/ui-library/p-4d408fb4.js.map +1 -0
  533. package/dist/ui-library/p-502ff3d3.entry.js +2 -0
  534. package/dist/ui-library/p-502ff3d3.entry.js.map +1 -0
  535. package/dist/ui-library/p-5a34c93e.entry.js +2 -0
  536. package/dist/ui-library/p-5a34c93e.entry.js.map +1 -0
  537. package/dist/ui-library/p-60621dc6.js +2 -0
  538. package/dist/ui-library/p-60621dc6.js.map +1 -0
  539. package/dist/ui-library/p-63703ba3.entry.js.map +1 -1
  540. package/dist/ui-library/p-66180e89.entry.js +2 -0
  541. package/dist/ui-library/p-66180e89.entry.js.map +1 -0
  542. package/dist/ui-library/p-686b12ec.entry.js +2 -0
  543. package/dist/ui-library/p-686b12ec.entry.js.map +1 -0
  544. package/dist/ui-library/p-71035abf.entry.js +2 -0
  545. package/dist/ui-library/p-71035abf.entry.js.map +1 -0
  546. package/dist/ui-library/{p-8a970a40.entry.js → p-724e154d.entry.js} +2 -2
  547. package/dist/ui-library/p-724e154d.entry.js.map +1 -0
  548. package/dist/ui-library/p-72ca96e1.entry.js +2 -0
  549. package/dist/ui-library/p-72ca96e1.entry.js.map +1 -0
  550. package/dist/ui-library/p-73597d13.entry.js.map +1 -1
  551. package/dist/ui-library/{p-c30f9e0b.entry.js → p-778cf804.entry.js} +2 -2
  552. package/dist/ui-library/p-778cf804.entry.js.map +1 -0
  553. package/dist/ui-library/p-87032e26.entry.js +2 -0
  554. package/dist/ui-library/p-87032e26.entry.js.map +1 -0
  555. package/dist/ui-library/p-8cf72af6.js +2 -0
  556. package/dist/ui-library/p-8cf72af6.js.map +1 -0
  557. package/dist/ui-library/p-8e0b6b7e.entry.js +2 -0
  558. package/dist/ui-library/p-8e0b6b7e.entry.js.map +1 -0
  559. package/dist/ui-library/p-912092c0.entry.js +2 -0
  560. package/dist/ui-library/p-912092c0.entry.js.map +1 -0
  561. package/dist/ui-library/p-92ca6a84.entry.js +2 -0
  562. package/dist/ui-library/p-92ca6a84.entry.js.map +1 -0
  563. package/dist/ui-library/{p-d5633a29.entry.js → p-9337cdd6.entry.js} +2 -2
  564. package/dist/ui-library/p-9337cdd6.entry.js.map +1 -0
  565. package/dist/ui-library/p-9461417e.entry.js +2 -0
  566. package/dist/ui-library/p-9461417e.entry.js.map +1 -0
  567. package/dist/ui-library/p-a1d4f6cf.entry.js.map +1 -1
  568. package/dist/ui-library/p-a49ae60a.entry.js +2 -0
  569. package/dist/ui-library/p-a49ae60a.entry.js.map +1 -0
  570. package/dist/ui-library/{p-611e1978.entry.js → p-a844cb72.entry.js} +2 -2
  571. package/dist/ui-library/{p-611e1978.entry.js.map → p-a844cb72.entry.js.map} +1 -1
  572. package/dist/ui-library/p-afcbe9da.entry.js +2 -0
  573. package/dist/ui-library/p-afcbe9da.entry.js.map +1 -0
  574. package/dist/ui-library/{p-97cc839c.entry.js → p-b3bff992.entry.js} +2 -2
  575. package/dist/ui-library/p-b3bff992.entry.js.map +1 -0
  576. package/dist/ui-library/p-b4547fb5.entry.js +2 -0
  577. package/dist/ui-library/p-b4547fb5.entry.js.map +1 -0
  578. package/dist/ui-library/{p-4f8394d7.js → p-ba74863a.js} +2 -2
  579. package/dist/ui-library/p-ba74863a.js.map +1 -0
  580. package/dist/ui-library/p-bd8f8eef.entry.js +2 -0
  581. package/dist/ui-library/p-bd8f8eef.entry.js.map +1 -0
  582. package/dist/ui-library/p-c57f16af.entry.js +2 -0
  583. package/dist/ui-library/p-c57f16af.entry.js.map +1 -0
  584. package/dist/ui-library/p-c5cdba08.entry.js +2 -0
  585. package/dist/ui-library/p-c5cdba08.entry.js.map +1 -0
  586. package/dist/ui-library/p-c87810b0.entry.js +2 -0
  587. package/dist/ui-library/p-c87810b0.entry.js.map +1 -0
  588. package/dist/ui-library/{p-af793d04.entry.js → p-cdcde4cd.entry.js} +2 -2
  589. package/dist/ui-library/p-cdcde4cd.entry.js.map +1 -0
  590. package/dist/ui-library/p-d6798d35.entry.js +2 -0
  591. package/dist/ui-library/p-d6798d35.entry.js.map +1 -0
  592. package/dist/ui-library/p-d87a6f4d.js +2 -0
  593. package/dist/ui-library/p-d87a6f4d.js.map +1 -0
  594. package/dist/ui-library/p-dc3f5996.entry.js +2 -0
  595. package/dist/ui-library/p-dc3f5996.entry.js.map +1 -0
  596. package/dist/ui-library/p-dcd7c547.entry.js +2 -0
  597. package/dist/ui-library/p-dcd7c547.entry.js.map +1 -0
  598. package/dist/ui-library/p-e07b3f0c.entry.js +2 -0
  599. package/dist/ui-library/p-e07b3f0c.entry.js.map +1 -0
  600. package/dist/ui-library/{p-19364560.entry.js → p-e8feb81f.entry.js} +2 -2
  601. package/dist/ui-library/{p-19364560.entry.js.map → p-e8feb81f.entry.js.map} +1 -1
  602. package/dist/ui-library/p-ef3936e5.entry.js +2 -0
  603. package/dist/ui-library/p-ef3936e5.entry.js.map +1 -0
  604. package/dist/ui-library/p-f0dd77e1.entry.js +2 -0
  605. package/dist/ui-library/p-f0dd77e1.entry.js.map +1 -0
  606. package/dist/ui-library/ui-library.esm.js +1 -1
  607. package/dist/ui-library/ui-library.esm.js.map +1 -1
  608. package/package.json +2 -2
  609. package/dist/cjs/event-listeners-74715e62.js +0 -45
  610. package/dist/cjs/event-listeners-74715e62.js.map +0 -1
  611. package/dist/cjs/execution-control-46f388e0.js.map +0 -1
  612. package/dist/cjs/focus-visible-0b352c74.js.map +0 -1
  613. package/dist/cjs/form-control-2c17c573.js.map +0 -1
  614. package/dist/cjs/modal-48d42228.js.map +0 -1
  615. package/dist/cjs/popover-f743f62b.js.map +0 -1
  616. package/dist/cjs/six-form.cjs.entry.js +0 -231
  617. package/dist/cjs/six-form.cjs.entry.js.map +0 -1
  618. package/dist/cjs/six-timepicker.types-c19ebff3.js +0 -56
  619. package/dist/cjs/six-timepicker.types-c19ebff3.js.map +0 -1
  620. package/dist/cjs/slot-ad537f24.js.map +0 -1
  621. package/dist/collection/components/six-form/six-form.css +0 -11
  622. package/dist/collection/components/six-form/six-form.js +0 -419
  623. package/dist/collection/components/six-form/six-form.js.map +0 -1
  624. package/dist/collection/components/six-timepicker/six-time-format.js +0 -15
  625. package/dist/collection/components/six-timepicker/six-time-format.js.map +0 -1
  626. package/dist/collection/components/six-timepicker/six-timepicker.types.js +0 -41
  627. package/dist/collection/components/six-timepicker/six-timepicker.types.js.map +0 -1
  628. package/dist/collection/utils/as-array.js +0 -2
  629. package/dist/collection/utils/as-array.js.map +0 -1
  630. package/dist/collection/utils/matchers.js +0 -3
  631. package/dist/collection/utils/matchers.js.map +0 -1
  632. package/dist/collection/utils/testing.js +0 -39
  633. package/dist/collection/utils/testing.js.map +0 -1
  634. package/dist/components/six-form.d.ts +0 -11
  635. package/dist/components/six-form.js +0 -252
  636. package/dist/components/six-form.js.map +0 -1
  637. package/dist/esm/event-listeners-570a24ea.js +0 -43
  638. package/dist/esm/event-listeners-570a24ea.js.map +0 -1
  639. package/dist/esm/execution-control-1a60d709.js.map +0 -1
  640. package/dist/esm/focus-visible-97933ea9.js.map +0 -1
  641. package/dist/esm/form-control-3b440ea1.js.map +0 -1
  642. package/dist/esm/modal-5ebdc320.js.map +0 -1
  643. package/dist/esm/popover-bd2c2fca.js.map +0 -1
  644. package/dist/esm/six-form.entry.js +0 -227
  645. package/dist/esm/six-form.entry.js.map +0 -1
  646. package/dist/esm/six-timepicker.types-e161a447.js +0 -50
  647. package/dist/esm/six-timepicker.types-e161a447.js.map +0 -1
  648. package/dist/esm/slot-6f3984c7.js.map +0 -1
  649. package/dist/types/components/six-form/six-form.d.ts +0 -69
  650. package/dist/types/components/six-timepicker/six-time-format.d.ts +0 -13
  651. package/dist/types/components/six-timepicker/six-timepicker.types.d.ts +0 -36
  652. package/dist/types/utils/as-array.d.ts +0 -1
  653. package/dist/types/utils/matchers.d.ts +0 -2
  654. package/dist/types/utils/popper.d.ts +0 -33
  655. package/dist/types/utils/testing.d.ts +0 -2
  656. package/dist/ui-library/p-054e12cc.entry.js +0 -2
  657. package/dist/ui-library/p-054e12cc.entry.js.map +0 -1
  658. package/dist/ui-library/p-0786fa7c.js +0 -2
  659. package/dist/ui-library/p-0786fa7c.js.map +0 -1
  660. package/dist/ui-library/p-163f2bb0.entry.js +0 -2
  661. package/dist/ui-library/p-163f2bb0.entry.js.map +0 -1
  662. package/dist/ui-library/p-18e5f772.entry.js +0 -2
  663. package/dist/ui-library/p-18e5f772.entry.js.map +0 -1
  664. package/dist/ui-library/p-18ea0c56.js +0 -2
  665. package/dist/ui-library/p-18ea0c56.js.map +0 -1
  666. package/dist/ui-library/p-19b50b5a.entry.js.map +0 -1
  667. package/dist/ui-library/p-2e48c8d2.entry.js +0 -2
  668. package/dist/ui-library/p-2e48c8d2.entry.js.map +0 -1
  669. package/dist/ui-library/p-308261c4.entry.js +0 -2
  670. package/dist/ui-library/p-308261c4.entry.js.map +0 -1
  671. package/dist/ui-library/p-33f7e22b.entry.js +0 -2
  672. package/dist/ui-library/p-33f7e22b.entry.js.map +0 -1
  673. package/dist/ui-library/p-394a2a12.entry.js +0 -2
  674. package/dist/ui-library/p-394a2a12.entry.js.map +0 -1
  675. package/dist/ui-library/p-3c635d0a.entry.js.map +0 -1
  676. package/dist/ui-library/p-4ae91795.entry.js +0 -2
  677. package/dist/ui-library/p-4ae91795.entry.js.map +0 -1
  678. package/dist/ui-library/p-4f8394d7.js.map +0 -1
  679. package/dist/ui-library/p-53a13db5.entry.js +0 -2
  680. package/dist/ui-library/p-53a13db5.entry.js.map +0 -1
  681. package/dist/ui-library/p-559c87f0.entry.js +0 -2
  682. package/dist/ui-library/p-559c87f0.entry.js.map +0 -1
  683. package/dist/ui-library/p-5a25d6fb.entry.js +0 -2
  684. package/dist/ui-library/p-5a25d6fb.entry.js.map +0 -1
  685. package/dist/ui-library/p-6403fd87.entry.js +0 -2
  686. package/dist/ui-library/p-6403fd87.entry.js.map +0 -1
  687. package/dist/ui-library/p-6433c0da.entry.js +0 -2
  688. package/dist/ui-library/p-6433c0da.entry.js.map +0 -1
  689. package/dist/ui-library/p-79eee01b.js +0 -2
  690. package/dist/ui-library/p-79eee01b.js.map +0 -1
  691. package/dist/ui-library/p-8a970a40.entry.js.map +0 -1
  692. package/dist/ui-library/p-90824648.entry.js +0 -2
  693. package/dist/ui-library/p-90824648.entry.js.map +0 -1
  694. package/dist/ui-library/p-9328e5bc.entry.js.map +0 -1
  695. package/dist/ui-library/p-97cc839c.entry.js.map +0 -1
  696. package/dist/ui-library/p-9a860acc.js +0 -2
  697. package/dist/ui-library/p-9a860acc.js.map +0 -1
  698. package/dist/ui-library/p-9d1d222f.entry.js +0 -2
  699. package/dist/ui-library/p-9d1d222f.entry.js.map +0 -1
  700. package/dist/ui-library/p-af793d04.entry.js.map +0 -1
  701. package/dist/ui-library/p-b0e5658f.entry.js +0 -2
  702. package/dist/ui-library/p-b0e5658f.entry.js.map +0 -1
  703. package/dist/ui-library/p-b1e66136.js +0 -2
  704. package/dist/ui-library/p-b1e66136.js.map +0 -1
  705. package/dist/ui-library/p-b4dfb7cf.js +0 -2
  706. package/dist/ui-library/p-b4dfb7cf.js.map +0 -1
  707. package/dist/ui-library/p-b997e43c.entry.js +0 -2
  708. package/dist/ui-library/p-b997e43c.entry.js.map +0 -1
  709. package/dist/ui-library/p-c0cb6436.entry.js +0 -2
  710. package/dist/ui-library/p-c0cb6436.entry.js.map +0 -1
  711. package/dist/ui-library/p-c30f9e0b.entry.js.map +0 -1
  712. package/dist/ui-library/p-c349d1d4.entry.js.map +0 -1
  713. package/dist/ui-library/p-c53a63f9.entry.js +0 -2
  714. package/dist/ui-library/p-c53a63f9.entry.js.map +0 -1
  715. package/dist/ui-library/p-c640c2d8.entry.js +0 -2
  716. package/dist/ui-library/p-c640c2d8.entry.js.map +0 -1
  717. package/dist/ui-library/p-c94d0b07.entry.js +0 -2
  718. package/dist/ui-library/p-c94d0b07.entry.js.map +0 -1
  719. package/dist/ui-library/p-d12c6092.js +0 -2
  720. package/dist/ui-library/p-d12c6092.js.map +0 -1
  721. package/dist/ui-library/p-d5633a29.entry.js.map +0 -1
  722. package/dist/ui-library/p-df655bc9.entry.js +0 -2
  723. package/dist/ui-library/p-df655bc9.entry.js.map +0 -1
  724. package/dist/ui-library/p-f18ba86f.entry.js +0 -2
  725. package/dist/ui-library/p-f18ba86f.entry.js.map +0 -1
  726. package/dist/ui-library/p-f4938771.entry.js +0 -2
  727. package/dist/ui-library/p-f4938771.entry.js.map +0 -1
  728. package/dist/ui-library/p-f604e067.entry.js +0 -2
  729. package/dist/ui-library/p-f604e067.entry.js.map +0 -1
  730. package/dist/ui-library/p-f70e2403.entry.js +0 -2
  731. package/dist/ui-library/p-f70e2403.entry.js.map +0 -1
  732. package/dist/ui-library/p-f9d345e0.entry.js +0 -2
  733. package/dist/ui-library/p-f9d345e0.entry.js.map +0 -1
  734. package/dist/ui-library/p-fed07a1f.entry.js +0 -2
  735. package/dist/ui-library/p-fed07a1f.entry.js.map +0 -1
  736. package/dist/ui-library/p-ff0257bf.entry.js +0 -2
  737. package/dist/ui-library/p-ff0257bf.entry.js.map +0 -1
@@ -25,11 +25,8 @@ export class SixTextarea {
25
25
  this.labelId = `textarea-label-${id}`;
26
26
  this.helpTextId = `textarea-help-text-${id}`;
27
27
  this.errorTextId = `input-error-text-${id}`;
28
- this.customErrorText = '';
29
- this.customValidation = false;
30
28
  this.eventListeners = new EventListeners();
31
- /** default value the textarea will be reverted to when reset is executed */
32
- this.defaultValue = '';
29
+ this.resizeObserver = new ResizeObserver(() => this.setTextareaHeight());
33
30
  this.handleChange = () => {
34
31
  if (this.nativeTextarea != null) {
35
32
  this.value = this.nativeTextarea.value;
@@ -39,7 +36,7 @@ export class SixTextarea {
39
36
  this.handleInput = () => {
40
37
  if (this.nativeTextarea != null) {
41
38
  this.value = this.nativeTextarea.value;
42
- this.setTextareaHeight(this.nativeTextarea);
39
+ this.setTextareaHeight();
43
40
  this.sixInput.emit();
44
41
  }
45
42
  };
@@ -54,18 +51,14 @@ export class SixTextarea {
54
51
  this.handleSlotChange = () => {
55
52
  this.hasLabelSlot = hasSlot(this.host, 'label');
56
53
  this.hasHelpTextSlot = hasSlot(this.host, 'help-text');
57
- this.hasErrorTextSlot = hasSlot(this.host, 'error-text');
58
54
  };
59
55
  this.hasFocus = false;
60
56
  this.hasHelpTextSlot = false;
61
- this.hasErrorTextSlot = false;
62
57
  this.hasLabelSlot = false;
63
58
  this.size = 'medium';
64
59
  this.name = '';
65
60
  this.value = '';
66
- this.label = '';
67
61
  this.helpText = '';
68
- this.errorText = '';
69
62
  this.placeholder = undefined;
70
63
  this.rows = 4;
71
64
  this.resize = 'vertical';
@@ -74,6 +67,8 @@ export class SixTextarea {
74
67
  this.minlength = undefined;
75
68
  this.maxlength = undefined;
76
69
  this.required = false;
70
+ this.label = '';
71
+ this.errorText = '';
77
72
  this.invalid = false;
78
73
  this.autocapitalize = 'off';
79
74
  this.autocorrect = 'off';
@@ -81,15 +76,12 @@ export class SixTextarea {
81
76
  this.autofocus = false;
82
77
  this.spellcheck = false;
83
78
  this.inputmode = undefined;
84
- this.errorOnBlur = false;
85
79
  }
86
80
  handleLabelChange() {
87
81
  this.handleSlotChange();
88
82
  }
89
83
  handleRowsChange() {
90
- if (this.nativeTextarea != null) {
91
- this.setTextareaHeight(this.nativeTextarea);
92
- }
84
+ this.setTextareaHeight();
93
85
  }
94
86
  handleValueChange() {
95
87
  this.value = this.getValue();
@@ -97,39 +89,31 @@ export class SixTextarea {
97
89
  if (this.nativeTextarea.value !== this.value) {
98
90
  this.nativeTextarea.value = this.value;
99
91
  }
100
- this.invalid = !this.nativeTextarea.checkValidity();
101
92
  }
102
93
  }
103
94
  connectedCallback() {
104
95
  var _a;
105
96
  (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.addEventListener('slotchange', this.handleSlotChange);
97
+ this.eventListeners.forward('six-textarea-input', 'input', this.host);
98
+ this.eventListeners.forward('six-textarea-change', 'change', this.host);
99
+ this.eventListeners.forward('six-textarea-focus', 'focus', this.host);
100
+ this.eventListeners.forward('six-textarea-blur', 'blur', this.host);
106
101
  }
107
102
  componentWillLoad() {
108
- this.defaultValue = this.value || '';
109
103
  this.handleSlotChange();
110
104
  }
111
105
  componentDidLoad() {
112
- const nativeTextarea = this.nativeTextarea;
113
- if (nativeTextarea == null) {
114
- return;
106
+ this.setTextareaHeight();
107
+ if (this.nativeTextarea != null) {
108
+ this.resizeObserver.observe(this.nativeTextarea);
115
109
  }
116
- this.setTextareaHeight(nativeTextarea);
117
- this.resizeObserver = new ResizeObserver(() => this.setTextareaHeight(nativeTextarea));
118
- this.resizeObserver.observe(nativeTextarea);
119
- this.eventListeners.add(nativeTextarea, 'invalid', (event) => {
120
- this.invalid = true;
121
- if (this.customValidation || (!this.hasErrorTextSlot && this.errorText === '' && this.customErrorText === '')) {
122
- this.customErrorText = nativeTextarea.validationMessage;
123
- }
124
- event.preventDefault();
125
- });
126
110
  }
127
111
  disconnectedCallback() {
128
- var _a, _b;
112
+ var _a;
129
113
  if (this.nativeTextarea != null) {
130
- (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.unobserve(this.nativeTextarea);
114
+ this.resizeObserver.unobserve(this.nativeTextarea);
131
115
  }
132
- (_b = this.host.shadowRoot) === null || _b === void 0 ? void 0 : _b.removeEventListener('slotchange', this.handleSlotChange);
116
+ (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.removeEventListener('slotchange', this.handleSlotChange);
133
117
  this.eventListeners.removeAll();
134
118
  }
135
119
  /** Sets focus on the textarea. */
@@ -154,66 +138,33 @@ export class SixTextarea {
154
138
  }
155
139
  /** Replaces a range of text with a new string. */
156
140
  async setRangeText(replacement, start, end, selectMode = 'preserve') {
157
- if (this.nativeTextarea == null) {
141
+ if (this.nativeTextarea == null)
158
142
  return;
159
- }
160
143
  this.nativeTextarea.setRangeText(replacement, start, end, selectMode);
161
144
  if (this.getValue() !== this.nativeTextarea.value) {
162
145
  this.value = this.nativeTextarea.value;
163
- this.setTextareaHeight(this.nativeTextarea);
146
+ this.setTextareaHeight();
164
147
  this.sixChange.emit();
165
148
  this.sixInput.emit();
166
149
  }
167
150
  }
168
- /** Checks for validity and shows the browser's validation message if the control is invalid. */
169
- async reportValidity() {
170
- var _a;
171
- return (_a = this.nativeTextarea) === null || _a === void 0 ? void 0 : _a.reportValidity();
172
- }
173
- /** Checks for validity. */
174
- async checkValidity() {
175
- if (this.nativeTextarea == null) {
176
- return true;
177
- }
178
- return this.nativeTextarea.validity.valid;
179
- }
180
- /** Sets a custom validation message. If `message` is not empty, the field will be considered invalid. */
181
- async setCustomValidity(message) {
182
- this.customErrorText = '';
183
- this.customValidation = message !== '';
184
- if (this.nativeTextarea != null) {
185
- this.nativeTextarea.setCustomValidity(message);
186
- this.invalid = !this.nativeTextarea.checkValidity();
187
- }
188
- }
189
- /** Resets the formcontrol */
190
- async reset() {
191
- var _a;
192
- this.value = this.defaultValue;
193
- this.customErrorText = '';
194
- this.customValidation = false;
195
- (_a = this.nativeTextarea) === null || _a === void 0 ? void 0 : _a.setCustomValidity('');
196
- this.invalid = false;
197
- }
198
- setTextareaHeight(nativeTextarea) {
151
+ setTextareaHeight() {
152
+ if (this.nativeTextarea == null)
153
+ return;
199
154
  if (this.resize === 'auto') {
200
- nativeTextarea.style.height = 'auto';
201
- const height = nativeTextarea.scrollHeight + 1;
202
- nativeTextarea.style.height = height + 'px';
155
+ this.nativeTextarea.style.height = 'auto';
156
+ this.nativeTextarea.style.height = this.nativeTextarea.scrollHeight + 'px';
203
157
  }
204
158
  else {
205
- nativeTextarea.style.height = '';
159
+ this.nativeTextarea.style.height = undefined;
206
160
  }
207
161
  }
208
- displayError() {
209
- return this.invalid && (!this.errorOnBlur || !this.hasFocus);
210
- }
211
162
  getValue() {
212
163
  var _a;
213
164
  return ((_a = this.value) !== null && _a !== void 0 ? _a : '').toString();
214
165
  }
215
166
  render() {
216
- 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.customErrorText != null ? this.customErrorText : this.errorText, hasErrorTextSlot: this.hasErrorTextSlot, size: this.size, disabled: this.disabled, required: this.required, displayError: this.displayError() }, h("div", { part: "base", class: {
167
+ 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: {
217
168
  textarea: true,
218
169
  // Sizes
219
170
  'textarea--small': this.size === 'small',
@@ -298,24 +249,6 @@ export class SixTextarea {
298
249
  "reflect": true,
299
250
  "defaultValue": "''"
300
251
  },
301
- "label": {
302
- "type": "string",
303
- "mutable": false,
304
- "complexType": {
305
- "original": "string",
306
- "resolved": "string",
307
- "references": {}
308
- },
309
- "required": false,
310
- "optional": false,
311
- "docs": {
312
- "tags": [],
313
- "text": "The textarea's label. Alternatively, you can use the label slot."
314
- },
315
- "attribute": "label",
316
- "reflect": false,
317
- "defaultValue": "''"
318
- },
319
252
  "helpText": {
320
253
  "type": "string",
321
254
  "mutable": false,
@@ -334,30 +267,12 @@ export class SixTextarea {
334
267
  "reflect": false,
335
268
  "defaultValue": "''"
336
269
  },
337
- "errorText": {
338
- "type": "string",
339
- "mutable": false,
340
- "complexType": {
341
- "original": "string",
342
- "resolved": "string",
343
- "references": {}
344
- },
345
- "required": false,
346
- "optional": false,
347
- "docs": {
348
- "tags": [],
349
- "text": "The textarea's error text. Alternatively, you can use the error-text slot."
350
- },
351
- "attribute": "error-text",
352
- "reflect": false,
353
- "defaultValue": "''"
354
- },
355
270
  "placeholder": {
356
271
  "type": "string",
357
272
  "mutable": false,
358
273
  "complexType": {
359
274
  "original": "string",
360
- "resolved": "string",
275
+ "resolved": "string | undefined",
361
276
  "references": {}
362
277
  },
363
278
  "required": false,
@@ -446,7 +361,7 @@ export class SixTextarea {
446
361
  "mutable": false,
447
362
  "complexType": {
448
363
  "original": "number",
449
- "resolved": "number",
364
+ "resolved": "number | undefined",
450
365
  "references": {}
451
366
  },
452
367
  "required": false,
@@ -463,7 +378,7 @@ export class SixTextarea {
463
378
  "mutable": false,
464
379
  "complexType": {
465
380
  "original": "number",
466
- "resolved": "number",
381
+ "resolved": "number | undefined",
467
382
  "references": {}
468
383
  },
469
384
  "required": false,
@@ -487,15 +402,51 @@ export class SixTextarea {
487
402
  "optional": false,
488
403
  "docs": {
489
404
  "tags": [],
490
- "text": "The textarea's required attribute."
405
+ "text": "Set to true to show an asterisk beneath the label."
491
406
  },
492
407
  "attribute": "required",
493
- "reflect": true,
408
+ "reflect": false,
494
409
  "defaultValue": "false"
495
410
  },
411
+ "label": {
412
+ "type": "string",
413
+ "mutable": false,
414
+ "complexType": {
415
+ "original": "string",
416
+ "resolved": "string",
417
+ "references": {}
418
+ },
419
+ "required": false,
420
+ "optional": false,
421
+ "docs": {
422
+ "tags": [],
423
+ "text": "The label text."
424
+ },
425
+ "attribute": "label",
426
+ "reflect": false,
427
+ "defaultValue": "''"
428
+ },
429
+ "errorText": {
430
+ "type": "string",
431
+ "mutable": false,
432
+ "complexType": {
433
+ "original": "string",
434
+ "resolved": "string",
435
+ "references": {}
436
+ },
437
+ "required": false,
438
+ "optional": false,
439
+ "docs": {
440
+ "tags": [],
441
+ "text": "The error message shown, if `invalid` is set to true."
442
+ },
443
+ "attribute": "error-text",
444
+ "reflect": false,
445
+ "defaultValue": "''"
446
+ },
496
447
  "invalid": {
497
448
  "type": "boolean",
498
- "mutable": true,
449
+ "mutable": false,
499
450
  "complexType": {
500
451
  "original": "boolean",
501
452
  "resolved": "boolean",
@@ -505,7 +456,7 @@ export class SixTextarea {
505
456
  "optional": false,
506
457
  "docs": {
507
458
  "tags": [],
508
- "text": "This will be true when the control is in an invalid state. Validity is determined by props such as `required`,\n`minlength`, and `maxlength` using the browser's constraint validation API."
459
+ "text": "If this property is set to true and an error message is provided by `errorText`, the error message is displayed."
509
460
  },
510
461
  "attribute": "invalid",
511
462
  "reflect": true,
@@ -606,7 +557,7 @@ export class SixTextarea {
606
557
  "mutable": false,
607
558
  "complexType": {
608
559
  "original": "'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url'",
609
- "resolved": "\"decimal\" | \"email\" | \"none\" | \"numeric\" | \"search\" | \"tel\" | \"text\" | \"url\"",
560
+ "resolved": "\"decimal\" | \"email\" | \"none\" | \"numeric\" | \"search\" | \"tel\" | \"text\" | \"url\" | undefined",
610
561
  "references": {}
611
562
  },
612
563
  "required": false,
@@ -617,24 +568,6 @@ export class SixTextarea {
617
568
  },
618
569
  "attribute": "inputmode",
619
570
  "reflect": false
620
- },
621
- "errorOnBlur": {
622
- "type": "boolean",
623
- "mutable": false,
624
- "complexType": {
625
- "original": "boolean",
626
- "resolved": "boolean",
627
- "references": {}
628
- },
629
- "required": false,
630
- "optional": false,
631
- "docs": {
632
- "tags": [],
633
- "text": "Set to display the error text on blur and not when typing"
634
- },
635
- "attribute": "error-on-blur",
636
- "reflect": false,
637
- "defaultValue": "false"
638
571
  }
639
572
  };
640
573
  }
@@ -642,7 +575,6 @@ export class SixTextarea {
642
575
  return {
643
576
  "hasFocus": {},
644
577
  "hasHelpTextSlot": {},
645
- "hasErrorTextSlot": {},
646
578
  "hasLabelSlot": {}
647
579
  };
648
580
  }
@@ -771,14 +703,14 @@ export class SixTextarea {
771
703
  },
772
704
  "select": {
773
705
  "complexType": {
774
- "signature": "() => Promise<void>",
706
+ "signature": "() => Promise<void | undefined>",
775
707
  "parameters": [],
776
708
  "references": {
777
709
  "Promise": {
778
710
  "location": "global"
779
711
  }
780
712
  },
781
- "return": "Promise<void>"
713
+ "return": "Promise<void | undefined>"
782
714
  },
783
715
  "docs": {
784
716
  "text": "Selects all the text in the input.",
@@ -787,7 +719,7 @@ export class SixTextarea {
787
719
  },
788
720
  "setSelectionRange": {
789
721
  "complexType": {
790
- "signature": "(selectionStart: number, selectionEnd: number, selectionDirection?: 'forward' | 'backward' | 'none') => Promise<void>",
722
+ "signature": "(selectionStart: number, selectionEnd: number, selectionDirection?: 'forward' | 'backward' | 'none') => Promise<void | undefined>",
791
723
  "parameters": [{
792
724
  "tags": [],
793
725
  "text": ""
@@ -803,7 +735,7 @@ export class SixTextarea {
803
735
  "location": "global"
804
736
  }
805
737
  },
806
- "return": "Promise<void>"
738
+ "return": "Promise<void | undefined>"
807
739
  },
808
740
  "docs": {
809
741
  "text": "Sets the start and end positions of the text selection (0-based).",
@@ -837,73 +769,6 @@ export class SixTextarea {
837
769
  "text": "Replaces a range of text with a new string.",
838
770
  "tags": []
839
771
  }
840
- },
841
- "reportValidity": {
842
- "complexType": {
843
- "signature": "() => Promise<boolean>",
844
- "parameters": [],
845
- "references": {
846
- "Promise": {
847
- "location": "global"
848
- }
849
- },
850
- "return": "Promise<boolean>"
851
- },
852
- "docs": {
853
- "text": "Checks for validity and shows the browser's validation message if the control is invalid.",
854
- "tags": []
855
- }
856
- },
857
- "checkValidity": {
858
- "complexType": {
859
- "signature": "() => Promise<boolean>",
860
- "parameters": [],
861
- "references": {
862
- "Promise": {
863
- "location": "global"
864
- }
865
- },
866
- "return": "Promise<boolean>"
867
- },
868
- "docs": {
869
- "text": "Checks for validity.",
870
- "tags": []
871
- }
872
- },
873
- "setCustomValidity": {
874
- "complexType": {
875
- "signature": "(message: string) => Promise<void>",
876
- "parameters": [{
877
- "tags": [],
878
- "text": ""
879
- }],
880
- "references": {
881
- "Promise": {
882
- "location": "global"
883
- }
884
- },
885
- "return": "Promise<void>"
886
- },
887
- "docs": {
888
- "text": "Sets a custom validation message. If `message` is not empty, the field will be considered invalid.",
889
- "tags": []
890
- }
891
- },
892
- "reset": {
893
- "complexType": {
894
- "signature": "() => Promise<void>",
895
- "parameters": [],
896
- "references": {
897
- "Promise": {
898
- "location": "global"
899
- }
900
- },
901
- "return": "Promise<void>"
902
- },
903
- "docs": {
904
- "text": "Resets the formcontrol",
905
- "tags": []
906
- }
907
772
  }
908
773
  };
909
774
  }
@@ -1 +1 @@
1
- {"version":3,"file":"six-textarea.js","sourceRoot":"","sources":["../../../src/components/six-textarea/six-textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,WAAW,MAAM,uDAAuD,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport FormControl from '../../functional-components/form-control/form-control';\nimport { hasSlot } from '../../utils/slot';\nimport { 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 customErrorText = '';\n private customValidation = false;\n private eventListeners = new EventListeners();\n private resizeObserver?: ResizeObserver;\n\n @Element() host!: HTMLSixTextareaElement;\n\n @State() hasFocus = false;\n @State() hasHelpTextSlot = false;\n @State() hasErrorTextSlot = 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 label. Alternatively, you can use the label slot. */\n @Prop() label = '';\n\n /** The textarea's help text. Alternatively, you can use the help-text slot. */\n @Prop() helpText = '';\n\n /** The textarea's error text. Alternatively, you can use the error-text slot. */\n @Prop() errorText = '';\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 /** The textarea's required attribute. */\n @Prop({ reflect: true }) required = false;\n\n /**\n * This will be true when the control is in an invalid state. Validity is determined by props such as `required`,\n * `minlength`, and `maxlength` using the browser's constraint validation API.\n */\n @Prop({ mutable: true, 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 /** Set to display the error text on blur and not when typing */\n @Prop() errorOnBlur = false;\n\n /** Emitted when the control's value changes. 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 if (this.nativeTextarea != null) {\n this.setTextareaHeight(this.nativeTextarea);\n }\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 this.invalid = !this.nativeTextarea.checkValidity();\n }\n }\n\n /** default value the textarea will be reverted to when reset is executed */\n private defaultValue = '';\n\n connectedCallback() {\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n }\n\n componentWillLoad() {\n this.defaultValue = this.value || '';\n this.handleSlotChange();\n }\n\n componentDidLoad() {\n const nativeTextarea = this.nativeTextarea;\n if (nativeTextarea == null) {\n return;\n }\n this.setTextareaHeight(nativeTextarea);\n this.resizeObserver = new ResizeObserver(() => this.setTextareaHeight(nativeTextarea));\n this.resizeObserver.observe(nativeTextarea);\n this.eventListeners.add(nativeTextarea, 'invalid', (event) => {\n this.invalid = true;\n if (this.customValidation || (!this.hasErrorTextSlot && this.errorText === '' && this.customErrorText === '')) {\n this.customErrorText = nativeTextarea.validationMessage;\n }\n event.preventDefault();\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) {\n 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(this.nativeTextarea);\n this.sixChange.emit();\n this.sixInput.emit();\n }\n }\n\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n @Method()\n async reportValidity() {\n return this.nativeTextarea?.reportValidity();\n }\n\n /** Checks for validity. */\n @Method()\n async checkValidity() {\n if (this.nativeTextarea == null) {\n return true;\n }\n return this.nativeTextarea.validity.valid;\n }\n\n /** Sets a custom validation message. If `message` is not empty, the field will be considered invalid. */\n @Method()\n async setCustomValidity(message: string) {\n this.customErrorText = '';\n this.customValidation = message !== '';\n if (this.nativeTextarea != null) {\n this.nativeTextarea.setCustomValidity(message);\n this.invalid = !this.nativeTextarea.checkValidity();\n }\n }\n\n /** Resets the formcontrol */\n @Method()\n async reset() {\n this.value = this.defaultValue;\n this.customErrorText = '';\n this.customValidation = false;\n this.nativeTextarea?.setCustomValidity('');\n this.invalid = false;\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(this.nativeTextarea);\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(nativeTextarea: HTMLTextAreaElement) {\n if (this.resize === 'auto') {\n nativeTextarea.style.height = 'auto';\n const height = nativeTextarea.scrollHeight + 1;\n nativeTextarea.style.height = height + 'px';\n } else {\n nativeTextarea.style.height = '';\n }\n }\n\n private displayError() {\n return this.invalid && (!this.errorOnBlur || !this.hasFocus);\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.customErrorText != null ? this.customErrorText : this.errorText}\n hasErrorTextSlot={this.hasErrorTextSlot}\n size={this.size}\n disabled={this.disabled}\n required={this.required}\n displayError={this.displayError()}\n >\n <div\n part=\"base\"\n class={{\n 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"]}
1
+ {"version":3,"file":"six-textarea.js","sourceRoot":"","sources":["../../../src/components/six-textarea/six-textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,WAAW,MAAM,uDAAuD,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAG7D,IAAI,EAAE,GAAG,CAAC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport FormControl from '../../functional-components/form-control/form-control';\nimport { hasSlot } from '../../utils/slot';\nimport { 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 </div>\n </FormControl>\n );\n }\n}\n"]}
@@ -1,11 +1,23 @@
1
1
  import { h } from '@stencil/core';
2
- import { hasSlot } from '../../utils/slot';
2
+ import { getSlot, hasSlot } from '../../utils/slot';
3
3
  /**
4
4
  * @since 1.0
5
5
  * @status stable
6
6
  */
7
7
  export class SixTile {
8
8
  constructor() {
9
+ this.handleSlotChange = () => {
10
+ this.hasIconSlot = hasSlot(this.host, 'icon');
11
+ this.hasLabelSlot = hasSlot(this.host, 'label');
12
+ if (this.hasIconSlot) {
13
+ const slot = getSlot(this.host, 'icon');
14
+ slot === null || slot === void 0 ? void 0 : slot.addEventListener('click', this.handleClickEvent);
15
+ }
16
+ if (this.hasLabelSlot) {
17
+ const slot = getSlot(this.host, 'label');
18
+ slot === null || slot === void 0 ? void 0 : slot.addEventListener('click', this.handleClickEvent);
19
+ }
20
+ };
9
21
  this.handleCloseClickEvent = () => {
10
22
  this.visible = false;
11
23
  this.sixTileClose.emit();
@@ -32,24 +44,9 @@ export class SixTile {
32
44
  async show() {
33
45
  this.visible = true;
34
46
  }
35
- connectedCallback() {
36
- this.handleSlotChange = this.handleSlotChange.bind(this);
37
- }
38
47
  componentWillLoad() {
39
48
  this.handleSlotChange();
40
49
  }
41
- handleSlotChange() {
42
- this.hasIconSlot = hasSlot(this.host, 'icon');
43
- this.hasLabelSlot = hasSlot(this.host, 'label');
44
- if (this.hasIconSlot) {
45
- let slot = this.host.querySelector(`[slot="icon"]`);
46
- slot.addEventListener('click', this.handleClickEvent);
47
- }
48
- if (this.hasLabelSlot) {
49
- let slot = this.host.querySelector(`[slot="label"]`);
50
- slot.addEventListener('click', this.handleClickEvent);
51
- }
52
- }
53
50
  render() {
54
51
  return (h("six-tooltip", { disabled: this.disableTooltip || this.label === '', content: this.label }, h("div", { part: "base", class: {
55
52
  tile: true,
@@ -101,15 +98,15 @@ export class SixTile {
101
98
  "defaultValue": "''"
102
99
  },
103
100
  "iconName": {
104
- "type": "any",
101
+ "type": "string",
105
102
  "mutable": false,
106
103
  "complexType": {
107
- "original": "any",
108
- "resolved": "any",
104
+ "original": "string",
105
+ "resolved": "string | undefined",
109
106
  "references": {}
110
107
  },
111
108
  "required": false,
112
- "optional": false,
109
+ "optional": true,
113
110
  "docs": {
114
111
  "tags": [],
115
112
  "text": "The icon's name."