@six-group/ui-library 3.0.0-beta.1.7 → 3.0.0-beta.1.8

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 (367) hide show
  1. package/dist/cjs/{event-listeners-4a8d66d5.js → event-listeners-74715e62.js} +38 -38
  2. package/dist/cjs/{execution-control-3bc9c7c4.js → execution-control-46f388e0.js} +35 -35
  3. package/dist/cjs/{focus-visible-b08d956f.js → focus-visible-0b352c74.js} +40 -40
  4. package/dist/cjs/{form-control-9e4dffd1.js → form-control-866bbece.js} +25 -25
  5. package/dist/cjs/{modal-a9679ddf.js → modal-48d42228.js} +41 -41
  6. package/dist/cjs/{popover-e3781f5a.js → popover-1d2a037c.js} +95 -95
  7. package/dist/cjs/{scroll-5b8676ba.js → scroll-76e6f5d7.js} +57 -57
  8. package/dist/cjs/set-attributes_2.cjs.entry.js +57 -57
  9. package/dist/cjs/six-alert.cjs.entry.js +131 -131
  10. package/dist/cjs/six-avatar.cjs.entry.js +28 -28
  11. package/dist/cjs/six-badge.cjs.entry.js +26 -26
  12. package/dist/cjs/six-button.cjs.entry.js +97 -97
  13. package/dist/cjs/six-card.cjs.entry.js +8 -8
  14. package/dist/cjs/six-checkbox.cjs.entry.js +152 -152
  15. package/dist/cjs/six-datepicker.cjs.entry.js +1189 -1189
  16. package/dist/cjs/six-details.cjs.entry.js +139 -139
  17. package/dist/cjs/six-dialog.cjs.entry.js +152 -152
  18. package/dist/cjs/six-drawer.cjs.entry.js +174 -174
  19. package/dist/cjs/six-dropdown_3.cjs.entry.js +728 -728
  20. package/dist/cjs/six-error-page.cjs.entry.js +94 -94
  21. package/dist/cjs/six-file-list-item.cjs.entry.js +38 -38
  22. package/dist/cjs/six-file-list.cjs.entry.js +8 -8
  23. package/dist/cjs/six-file-upload.cjs.entry.js +96 -96
  24. package/dist/cjs/six-footer.cjs.entry.js +8 -8
  25. package/dist/cjs/six-form.cjs.entry.js +219 -219
  26. package/dist/cjs/six-group-label.cjs.entry.js +46 -46
  27. package/dist/cjs/six-header.cjs.entry.js +149 -149
  28. package/dist/cjs/six-icon-button.cjs.entry.js +33 -33
  29. package/dist/cjs/six-icon.cjs.entry.js +24 -24
  30. package/dist/cjs/six-input.cjs.entry.js +230 -230
  31. package/dist/cjs/six-item-picker.cjs.entry.js +361 -361
  32. package/dist/cjs/six-language-switcher.cjs.entry.js +52 -52
  33. package/dist/cjs/six-layout-grid.cjs.entry.js +19 -19
  34. package/dist/cjs/six-main-container.cjs.entry.js +11 -11
  35. package/dist/cjs/six-menu-divider.cjs.entry.js +8 -8
  36. package/dist/cjs/six-menu-label.cjs.entry.js +8 -8
  37. package/dist/cjs/six-picto.cjs.entry.js +15 -15
  38. package/dist/cjs/six-progress-bar.cjs.entry.js +17 -17
  39. package/dist/cjs/six-progress-ring.cjs.entry.js +31 -31
  40. package/dist/cjs/six-radio.cjs.entry.js +121 -121
  41. package/dist/cjs/six-range.cjs.entry.js +198 -198
  42. package/dist/cjs/six-root.cjs.entry.js +34 -34
  43. package/dist/cjs/six-search-field.cjs.entry.js +43 -43
  44. package/dist/cjs/six-select.cjs.entry.js +447 -447
  45. package/dist/cjs/six-sidebar-item-group.cjs.entry.js +42 -42
  46. package/dist/cjs/six-sidebar-item.cjs.entry.js +18 -18
  47. package/dist/cjs/six-sidebar.cjs.entry.js +171 -171
  48. package/dist/cjs/six-spinner.cjs.entry.js +16 -16
  49. package/dist/cjs/six-switch.cjs.entry.js +100 -100
  50. package/dist/cjs/six-tab-group.cjs.entry.js +226 -226
  51. package/dist/cjs/six-tab-panel.cjs.entry.js +17 -17
  52. package/dist/cjs/six-tab.cjs.entry.js +42 -42
  53. package/dist/cjs/six-table-cell_4.cjs.entry.js +70 -70
  54. package/dist/cjs/six-table.cjs.entry.js +145 -145
  55. package/dist/cjs/six-tag.cjs.entry.js +40 -40
  56. package/dist/cjs/six-textarea.cjs.entry.js +211 -211
  57. package/dist/cjs/six-tile.cjs.entry.js +89 -89
  58. package/dist/cjs/six-timepicker.cjs.entry.js +489 -489
  59. package/dist/cjs/{six-timepicker.types-c58cc88b.js → six-timepicker.types-c19ebff3.js} +43 -43
  60. package/dist/cjs/six-tooltip.cjs.entry.js +172 -172
  61. package/dist/cjs/{slot-8abe833c.js → slot-ad537f24.js} +42 -42
  62. package/dist/cjs/{types-65e5c95b.js → types-581e8ff0.js} +12 -12
  63. package/dist/cjs/{types-0c28e484.js → types-64878648.js} +12 -12
  64. package/dist/collection/components/six-alert/six-alert.js +366 -366
  65. package/dist/collection/components/six-avatar/six-avatar.js +131 -131
  66. package/dist/collection/components/six-badge/six-badge.js +101 -101
  67. package/dist/collection/components/six-button/six-button.js +466 -466
  68. package/dist/collection/components/six-card/six-card.js +21 -21
  69. package/dist/collection/components/six-checkbox/six-checkbox.js +550 -550
  70. package/dist/collection/components/six-datepicker/components/day-selection.js +13 -13
  71. package/dist/collection/components/six-datepicker/components/month-selection.js +12 -12
  72. package/dist/collection/components/six-datepicker/components/year-selection.js +10 -10
  73. package/dist/collection/components/six-datepicker/six-date-formats.js +23 -23
  74. package/dist/collection/components/six-datepicker/six-datepicker.js +1343 -1343
  75. package/dist/collection/components/six-datepicker/test/six-datepicker.test-helpers.js +16 -16
  76. package/dist/collection/components/six-details/six-details.js +432 -432
  77. package/dist/collection/components/six-dialog/six-dialog.js +401 -401
  78. package/dist/collection/components/six-drawer/six-drawer.js +458 -458
  79. package/dist/collection/components/six-dropdown/six-dropdown.js +939 -939
  80. package/dist/collection/components/six-error-page/six-error-page.js +199 -199
  81. package/dist/collection/components/six-file-list/six-file-list.js +20 -20
  82. package/dist/collection/components/six-file-list-item/six-file-list-item.js +203 -203
  83. package/dist/collection/components/six-file-upload/six-file-upload.js +272 -272
  84. package/dist/collection/components/six-footer/six-footer.js +21 -21
  85. package/dist/collection/components/six-form/six-form.js +408 -408
  86. package/dist/collection/components/six-group-label/six-group-label.js +166 -166
  87. package/dist/collection/components/six-header/six-header.js +420 -420
  88. package/dist/collection/components/six-icon/six-icon.js +77 -77
  89. package/dist/collection/components/six-icon-button/six-icon-button.js +142 -142
  90. package/dist/collection/components/six-input/six-input.js +1141 -1141
  91. package/dist/collection/components/six-item-picker/six-item-picker.js +688 -688
  92. package/dist/collection/components/six-item-picker/types.js +13 -13
  93. package/dist/collection/components/six-language-switcher/six-language-switcher.js +128 -128
  94. package/dist/collection/components/six-layout-grid/six-layout-grid.js +52 -52
  95. package/dist/collection/components/six-main-container/six-main-container.js +53 -53
  96. package/dist/collection/components/six-menu/six-menu.js +406 -406
  97. package/dist/collection/components/six-menu-divider/six-menu-divider.js +22 -22
  98. package/dist/collection/components/six-menu-item/six-menu-item.js +177 -177
  99. package/dist/collection/components/six-menu-label/six-menu-label.js +25 -25
  100. package/dist/collection/components/six-picto/six-picto.js +50 -50
  101. package/dist/collection/components/six-progress-bar/six-progress-bar.js +77 -77
  102. package/dist/collection/components/six-progress-ring/six-progress-ring.js +111 -111
  103. package/dist/collection/components/six-radio/six-radio.js +410 -410
  104. package/dist/collection/components/six-range/six-range.js +620 -620
  105. package/dist/collection/components/six-root/six-root.js +167 -167
  106. package/dist/collection/components/six-search-field/six-search-field.js +171 -171
  107. package/dist/collection/components/six-select/six-select.js +1105 -1105
  108. package/dist/collection/components/six-sidebar/six-sidebar.js +455 -455
  109. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +89 -89
  110. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js +158 -158
  111. package/dist/collection/components/six-spinner/six-spinner.js +55 -55
  112. package/dist/collection/components/six-stage-indicator/six-stage-indicator.js +46 -46
  113. package/dist/collection/components/six-switch/six-switch.js +393 -393
  114. package/dist/collection/components/six-tab/six-tab.js +198 -198
  115. package/dist/collection/components/six-tab-group/six-tab-group.js +362 -362
  116. package/dist/collection/components/six-tab-panel/six-tab-panel.js +75 -75
  117. package/dist/collection/components/six-table/six-table.js +209 -209
  118. package/dist/collection/components/six-table/test/helpers.js +13 -13
  119. package/dist/collection/components/six-table/types.js +8 -8
  120. package/dist/collection/components/six-table/util/filter-by.js +34 -34
  121. package/dist/collection/components/six-table/util/from-data.js +33 -33
  122. package/dist/collection/components/six-table/util/is.js +3 -3
  123. package/dist/collection/components/six-table/util/quick-filter-by.js +13 -13
  124. package/dist/collection/components/six-table/util/sort-by.js +25 -25
  125. package/dist/collection/components/six-table-cell/six-table-cell.js +21 -21
  126. package/dist/collection/components/six-table-header/six-table-header.js +21 -21
  127. package/dist/collection/components/six-table-header-cell/get-next-state.js +7 -7
  128. package/dist/collection/components/six-table-header-cell/icons.js +12 -12
  129. package/dist/collection/components/six-table-header-cell/six-table-header-cell.js +174 -174
  130. package/dist/collection/components/six-table-header-cell/types.js +13 -13
  131. package/dist/collection/components/six-table-header-cell/util/create-model.js +6 -6
  132. package/dist/collection/components/six-table-header-cell/util/get-next-state.js +7 -7
  133. package/dist/collection/components/six-table-row/six-table-row.js +21 -21
  134. package/dist/collection/components/six-tag/six-tag.js +157 -157
  135. package/dist/collection/components/six-textarea/six-textarea.js +912 -912
  136. package/dist/collection/components/six-tile/six-tile.js +315 -315
  137. package/dist/collection/components/six-timepicker/six-time-format.js +14 -14
  138. package/dist/collection/components/six-timepicker/six-timepicker.js +980 -980
  139. package/dist/collection/components/six-timepicker/six-timepicker.types.js +40 -40
  140. package/dist/collection/components/six-tooltip/six-tooltip.js +435 -435
  141. package/dist/collection/functional-components/form-control/form-control.js +28 -28
  142. package/dist/collection/index.js +1 -1
  143. package/dist/collection/testUtil/delay.js +3 -3
  144. package/dist/collection/utils/as-array.js +1 -1
  145. package/dist/collection/utils/date-util.js +712 -712
  146. package/dist/collection/utils/event-listeners.js +39 -39
  147. package/dist/collection/utils/execution-control.js +38 -38
  148. package/dist/collection/utils/focus-visible.js +41 -41
  149. package/dist/collection/utils/matchers.js +2 -2
  150. package/dist/collection/utils/modal.js +28 -28
  151. package/dist/collection/utils/offset.js +13 -13
  152. package/dist/collection/utils/popover.js +113 -113
  153. package/dist/collection/utils/scroll.js +47 -47
  154. package/dist/collection/utils/slot.js +59 -59
  155. package/dist/collection/utils/support.js +15 -15
  156. package/dist/collection/utils/tabbable.js +22 -22
  157. package/dist/collection/utils/testing.js +38 -38
  158. package/dist/collection/utils/time.util.js +74 -74
  159. package/dist/collection/utils/type-check.js +5 -5
  160. package/dist/collection/utils/types.js +1 -1
  161. package/dist/collection/wrappers/set-attributes/set-attributes.js +68 -68
  162. package/dist/components.json +1 -1
  163. package/dist/custom-elements/index.js +7595 -7595
  164. package/dist/esm/{event-listeners-1bef934e.js → event-listeners-570a24ea.js} +38 -38
  165. package/dist/esm/{execution-control-235f5126.js → execution-control-1a60d709.js} +35 -35
  166. package/dist/esm/{focus-visible-4b7946aa.js → focus-visible-97933ea9.js} +40 -40
  167. package/dist/esm/{form-control-17478ad2.js → form-control-24f446af.js} +25 -25
  168. package/dist/esm/{modal-e5709f6b.js → modal-5ebdc320.js} +41 -41
  169. package/dist/esm/polyfills/core-js.js +0 -0
  170. package/dist/esm/polyfills/dom.js +0 -0
  171. package/dist/esm/polyfills/es5-html-element.js +0 -0
  172. package/dist/esm/polyfills/index.js +0 -0
  173. package/dist/esm/polyfills/system.js +0 -0
  174. package/dist/esm/{popover-5a51f84d.js → popover-1c7a1139.js} +95 -95
  175. package/dist/esm/{scroll-99b214c2.js → scroll-180b53fd.js} +57 -57
  176. package/dist/esm/set-attributes_2.entry.js +57 -57
  177. package/dist/esm/six-alert.entry.js +131 -131
  178. package/dist/esm/six-avatar.entry.js +28 -28
  179. package/dist/esm/six-badge.entry.js +26 -26
  180. package/dist/esm/six-button.entry.js +97 -97
  181. package/dist/esm/six-card.entry.js +8 -8
  182. package/dist/esm/six-checkbox.entry.js +152 -152
  183. package/dist/esm/six-datepicker.entry.js +1189 -1189
  184. package/dist/esm/six-details.entry.js +139 -139
  185. package/dist/esm/six-dialog.entry.js +152 -152
  186. package/dist/esm/six-drawer.entry.js +174 -174
  187. package/dist/esm/six-dropdown_3.entry.js +728 -728
  188. package/dist/esm/six-error-page.entry.js +94 -94
  189. package/dist/esm/six-file-list-item.entry.js +38 -38
  190. package/dist/esm/six-file-list.entry.js +8 -8
  191. package/dist/esm/six-file-upload.entry.js +96 -96
  192. package/dist/esm/six-footer.entry.js +8 -8
  193. package/dist/esm/six-form.entry.js +219 -219
  194. package/dist/esm/six-group-label.entry.js +46 -46
  195. package/dist/esm/six-header.entry.js +149 -149
  196. package/dist/esm/six-icon-button.entry.js +33 -33
  197. package/dist/esm/six-icon.entry.js +24 -24
  198. package/dist/esm/six-input.entry.js +230 -230
  199. package/dist/esm/six-item-picker.entry.js +361 -361
  200. package/dist/esm/six-language-switcher.entry.js +52 -52
  201. package/dist/esm/six-layout-grid.entry.js +19 -19
  202. package/dist/esm/six-main-container.entry.js +11 -11
  203. package/dist/esm/six-menu-divider.entry.js +8 -8
  204. package/dist/esm/six-menu-label.entry.js +8 -8
  205. package/dist/esm/six-picto.entry.js +15 -15
  206. package/dist/esm/six-progress-bar.entry.js +17 -17
  207. package/dist/esm/six-progress-ring.entry.js +31 -31
  208. package/dist/esm/six-radio.entry.js +121 -121
  209. package/dist/esm/six-range.entry.js +198 -198
  210. package/dist/esm/six-root.entry.js +34 -34
  211. package/dist/esm/six-search-field.entry.js +43 -43
  212. package/dist/esm/six-select.entry.js +447 -447
  213. package/dist/esm/six-sidebar-item-group.entry.js +42 -42
  214. package/dist/esm/six-sidebar-item.entry.js +18 -18
  215. package/dist/esm/six-sidebar.entry.js +171 -171
  216. package/dist/esm/six-spinner.entry.js +16 -16
  217. package/dist/esm/six-switch.entry.js +100 -100
  218. package/dist/esm/six-tab-group.entry.js +226 -226
  219. package/dist/esm/six-tab-panel.entry.js +17 -17
  220. package/dist/esm/six-tab.entry.js +42 -42
  221. package/dist/esm/six-table-cell_4.entry.js +70 -70
  222. package/dist/esm/six-table.entry.js +145 -145
  223. package/dist/esm/six-tag.entry.js +40 -40
  224. package/dist/esm/six-textarea.entry.js +211 -211
  225. package/dist/esm/six-tile.entry.js +89 -89
  226. package/dist/esm/six-timepicker.entry.js +489 -489
  227. package/dist/esm/{six-timepicker.types-cd6bac03.js → six-timepicker.types-e161a447.js} +43 -43
  228. package/dist/esm/six-tooltip.entry.js +172 -172
  229. package/dist/esm/{slot-5253e199.js → slot-6f3984c7.js} +42 -42
  230. package/dist/esm/{types-a37c1695.js → types-4b10b413.js} +12 -12
  231. package/dist/esm/{types-33d15673.js → types-ed860f7c.js} +12 -12
  232. package/dist/types/components/six-alert/six-alert.d.ts +60 -60
  233. package/dist/types/components/six-avatar/six-avatar.d.ts +27 -27
  234. package/dist/types/components/six-badge/six-badge.d.ts +20 -20
  235. package/dist/types/components/six-button/six-button.d.ts +69 -69
  236. package/dist/types/components/six-card/six-card.d.ts +9 -9
  237. package/dist/types/components/six-checkbox/six-checkbox.d.ts +86 -86
  238. package/dist/types/components/six-datepicker/components/day-selection.d.ts +5 -5
  239. package/dist/types/components/six-datepicker/components/month-selection.d.ts +5 -5
  240. package/dist/types/components/six-datepicker/components/year-selection.d.ts +5 -5
  241. package/dist/types/components/six-datepicker/six-date-formats.d.ts +22 -22
  242. package/dist/types/components/six-datepicker/six-datepicker.d.ts +214 -214
  243. package/dist/types/components/six-datepicker/test/six-datepicker.test-helpers.d.ts +1 -1
  244. package/dist/types/components/six-details/six-details.d.ts +61 -61
  245. package/dist/types/components/six-dialog/six-dialog.d.ts +75 -75
  246. package/dist/types/components/six-drawer/six-drawer.d.ts +82 -82
  247. package/dist/types/components/six-dropdown/six-dropdown.d.ts +140 -140
  248. package/dist/types/components/six-error-page/six-error-page.d.ts +27 -27
  249. package/dist/types/components/six-file-list/six-file-list.d.ts +8 -8
  250. package/dist/types/components/six-file-list-item/six-file-list-item.d.ts +35 -35
  251. package/dist/types/components/six-file-upload/six-file-upload.d.ts +42 -42
  252. package/dist/types/components/six-footer/six-footer.d.ts +9 -9
  253. package/dist/types/components/six-form/six-form.d.ts +69 -69
  254. package/dist/types/components/six-group-label/six-group-label.d.ts +37 -37
  255. package/dist/types/components/six-header/six-header.d.ts +90 -90
  256. package/dist/types/components/six-icon/six-icon.d.ts +13 -13
  257. package/dist/types/components/six-icon-button/six-icon-button.d.ts +28 -28
  258. package/dist/types/components/six-input/six-input.d.ts +165 -165
  259. package/dist/types/components/six-item-picker/six-item-picker.d.ts +106 -106
  260. package/dist/types/components/six-item-picker/types.d.ts +11 -11
  261. package/dist/types/components/six-language-switcher/six-language-switcher.d.ts +25 -25
  262. package/dist/types/components/six-layout-grid/six-layout-grid.d.ts +14 -14
  263. package/dist/types/components/six-main-container/six-main-container.d.ts +16 -16
  264. package/dist/types/components/six-menu/six-menu.d.ts +81 -81
  265. package/dist/types/components/six-menu-divider/six-menu-divider.d.ts +11 -11
  266. package/dist/types/components/six-menu-item/six-menu-item.d.ts +36 -36
  267. package/dist/types/components/six-menu-label/six-menu-label.d.ts +13 -13
  268. package/dist/types/components/six-picto/six-picto.d.ts +14 -14
  269. package/dist/types/components/six-progress-bar/six-progress-bar.d.ts +19 -19
  270. package/dist/types/components/six-progress-ring/six-progress-ring.d.ts +24 -24
  271. package/dist/types/components/six-radio/six-radio.d.ts +66 -66
  272. package/dist/types/components/six-range/six-range.d.ts +101 -101
  273. package/dist/types/components/six-root/six-root.d.ts +34 -34
  274. package/dist/types/components/six-search-field/six-search-field.d.ts +32 -32
  275. package/dist/types/components/six-select/six-select.d.ts +163 -163
  276. package/dist/types/components/six-sidebar/six-sidebar.d.ts +55 -55
  277. package/dist/types/components/six-sidebar-item/six-sidebar-item.d.ts +15 -15
  278. package/dist/types/components/six-sidebar-item-group/six-sidebar-item-group.d.ts +26 -26
  279. package/dist/types/components/six-spinner/six-spinner.d.ts +15 -15
  280. package/dist/types/components/six-stage-indicator/six-stage-indicator.d.ts +6 -6
  281. package/dist/types/components/six-switch/six-switch.d.ts +62 -62
  282. package/dist/types/components/six-tab/six-tab.d.ts +35 -35
  283. package/dist/types/components/six-tab-group/six-tab-group.d.ts +62 -62
  284. package/dist/types/components/six-tab-panel/six-tab-panel.d.ts +19 -19
  285. package/dist/types/components/six-table/six-table.d.ts +30 -30
  286. package/dist/types/components/six-table/test/helpers.d.ts +2 -2
  287. package/dist/types/components/six-table/types.d.ts +33 -33
  288. package/dist/types/components/six-table/util/filter-by.d.ts +2 -2
  289. package/dist/types/components/six-table/util/from-data.d.ts +8 -8
  290. package/dist/types/components/six-table/util/is.d.ts +3 -3
  291. package/dist/types/components/six-table/util/quick-filter-by.d.ts +2 -2
  292. package/dist/types/components/six-table/util/sort-by.d.ts +2 -2
  293. package/dist/types/components/six-table-cell/six-table-cell.d.ts +9 -9
  294. package/dist/types/components/six-table-header/six-table-header.d.ts +9 -9
  295. package/dist/types/components/six-table-header-cell/get-next-state.d.ts +2 -2
  296. package/dist/types/components/six-table-header-cell/icons.d.ts +3 -3
  297. package/dist/types/components/six-table-header-cell/six-table-header-cell.d.ts +32 -32
  298. package/dist/types/components/six-table-header-cell/types.d.ts +11 -11
  299. package/dist/types/components/six-table-header-cell/util/create-model.d.ts +4 -4
  300. package/dist/types/components/six-table-header-cell/util/get-next-state.d.ts +3 -3
  301. package/dist/types/components/six-table-row/six-table-row.d.ts +9 -9
  302. package/dist/types/components/six-tag/six-tag.d.ts +30 -30
  303. package/dist/types/components/six-textarea/six-textarea.d.ts +134 -134
  304. package/dist/types/components/six-tile/six-tile.d.ts +40 -40
  305. package/dist/types/components/six-timepicker/six-time-format.d.ts +13 -13
  306. package/dist/types/components/six-timepicker/six-timepicker.d.ts +184 -184
  307. package/dist/types/components/six-timepicker/six-timepicker.types.d.ts +36 -36
  308. package/dist/types/components/six-tooltip/six-tooltip.d.ts +72 -72
  309. package/dist/types/functional-components/form-control/form-control.d.ts +34 -34
  310. package/dist/types/index.d.ts +1 -1
  311. package/dist/types/testUtil/delay.d.ts +1 -1
  312. package/dist/types/utils/as-array.d.ts +1 -1
  313. package/dist/types/utils/date-util.d.ts +194 -194
  314. package/dist/types/utils/event-listeners.d.ts +15 -15
  315. package/dist/types/utils/execution-control.d.ts +26 -26
  316. package/dist/types/utils/focus-visible.d.ts +6 -6
  317. package/dist/types/utils/matchers.d.ts +2 -2
  318. package/dist/types/utils/modal.d.ts +13 -13
  319. package/dist/types/utils/offset.d.ts +4 -4
  320. package/dist/types/utils/popover.d.ts +27 -27
  321. package/dist/types/utils/scroll.d.ts +3 -3
  322. package/dist/types/utils/slot.d.ts +9 -9
  323. package/dist/types/utils/support.d.ts +1 -1
  324. package/dist/types/utils/tabbable.d.ts +2 -2
  325. package/dist/types/utils/testing.d.ts +2 -2
  326. package/dist/types/utils/time.util.d.ts +10 -10
  327. package/dist/types/utils/type-check.d.ts +4 -4
  328. package/dist/types/utils/types.d.ts +4 -4
  329. package/dist/types/wrappers/set-attributes/set-attributes.d.ts +9 -9
  330. package/dist/ui-library/{p-a8c225f2.entry.js → p-007bc8e8.entry.js} +1 -1
  331. package/dist/ui-library/{p-f9c0cfb7.entry.js → p-044b784e.entry.js} +1 -1
  332. package/dist/ui-library/{p-c733dead.js → p-0786fa7c.js} +0 -0
  333. package/dist/ui-library/{p-12cc24c3.js → p-07d1e830.js} +0 -0
  334. package/dist/ui-library/{p-48ea4419.entry.js → p-09cb13fa.entry.js} +1 -1
  335. package/dist/ui-library/{p-e96dcf96.entry.js → p-0c596054.entry.js} +1 -1
  336. package/dist/ui-library/{p-a77a6442.entry.js → p-1b8dc7b7.entry.js} +1 -1
  337. package/dist/ui-library/{p-68d31736.js → p-25a3bf57.js} +0 -0
  338. package/dist/ui-library/{p-ebaea182.entry.js → p-281e8c2d.entry.js} +1 -1
  339. package/dist/ui-library/{p-9f2dc381.entry.js → p-2924f82f.entry.js} +1 -1
  340. package/dist/ui-library/{p-ea1fcff2.entry.js → p-2d7ed407.entry.js} +1 -1
  341. package/dist/ui-library/{p-89f68e76.entry.js → p-4162dcdd.entry.js} +1 -1
  342. package/dist/ui-library/{p-6f67f986.entry.js → p-4d3a4e93.entry.js} +1 -1
  343. package/dist/ui-library/{p-8bd0873f.entry.js → p-4ed023b8.entry.js} +1 -1
  344. package/dist/ui-library/{p-af3d757c.js → p-4f8394d7.js} +0 -0
  345. package/dist/ui-library/{p-1b92cc7a.entry.js → p-530ea6ec.entry.js} +1 -1
  346. package/dist/ui-library/{p-19543c96.entry.js → p-531ab886.entry.js} +1 -1
  347. package/dist/ui-library/{p-fdb455d7.entry.js → p-54c48654.entry.js} +1 -1
  348. package/dist/ui-library/{p-c948d3db.entry.js → p-55c64cbc.entry.js} +1 -1
  349. package/dist/ui-library/{p-1c9f0dc6.js → p-5f1c6a5f.js} +0 -0
  350. package/dist/ui-library/{p-60491176.entry.js → p-675a8243.entry.js} +1 -1
  351. package/dist/ui-library/{p-b9fb8455.entry.js → p-6d622ed0.entry.js} +1 -1
  352. package/dist/ui-library/{p-572e3690.js → p-75297ad7.js} +0 -0
  353. package/dist/ui-library/{p-2ff97cdf.entry.js → p-90b26447.entry.js} +1 -1
  354. package/dist/ui-library/{p-fcd2356c.entry.js → p-93945629.entry.js} +1 -1
  355. package/dist/ui-library/{p-7735d99f.js → p-9a860acc.js} +0 -0
  356. package/dist/ui-library/{p-4cc01afc.entry.js → p-aa37e45a.entry.js} +1 -1
  357. package/dist/ui-library/{p-191f958b.js → p-b1e66136.js} +0 -0
  358. package/dist/ui-library/{p-c09dc3a9.js → p-b4dfb7cf.js} +0 -0
  359. package/dist/ui-library/{p-968c5169.entry.js → p-c24292b3.entry.js} +1 -1
  360. package/dist/ui-library/{p-ed21cc57.entry.js → p-cd79de73.entry.js} +1 -1
  361. package/dist/ui-library/{p-34e6d8e8.js → p-d12c6092.js} +0 -0
  362. package/dist/ui-library/{p-f0e91e17.entry.js → p-d28ac80a.entry.js} +1 -1
  363. package/dist/ui-library/{p-5ead7b2f.entry.js → p-d837e5a8.entry.js} +1 -1
  364. package/dist/ui-library/{p-ec1ecc2a.entry.js → p-dd3cae68.entry.js} +1 -1
  365. package/dist/ui-library/{p-044c6bf9.js → p-eb8f05a9.js} +0 -0
  366. package/dist/ui-library/ui-library.esm.js +1 -1
  367. package/package.json +1 -1
@@ -1,912 +1,912 @@
1
- import { Component, Element, Event, h, Method, Prop, State, Watch } from '@stencil/core';
2
- import FormControl from '../../functional-components/form-control/form-control';
3
- import { hasSlot } from '../../utils/slot';
4
- import { EventListeners } from '../../utils/event-listeners';
5
- let id = 0;
6
- /**
7
- * @since 1.0
8
- * @status stable
9
- *
10
- * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.
11
- *
12
- * @slot label - The textarea's label. Alternatively, you can use the label prop.
13
- * @slot help-text - Help text that describes how to use the input.
14
- * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.
15
- *
16
- * @part base - The component's base wrapper.
17
- * @part form-control - The form control that wraps the label, textarea, and help text.
18
- * @part label - The textarea label.
19
- * @part textarea - The textarea control.
20
- * @part help-text - The textarea help text.
21
- */
22
- export class SixTextarea {
23
- constructor() {
24
- this.inputId = `textarea-${++id}`;
25
- this.labelId = `textarea-label-${id}`;
26
- this.helpTextId = `textarea-help-text-${id}`;
27
- this.errorTextId = `input-error-text-${id}`;
28
- this.customErrorText = '';
29
- this.customValidation = false;
30
- this.eventListeners = new EventListeners();
31
- this.hasFocus = false;
32
- this.hasHelpTextSlot = false;
33
- this.hasErrorTextSlot = false;
34
- this.hasLabelSlot = false;
35
- /** The textarea's size. */
36
- this.size = 'medium';
37
- /** The textarea's name attribute. */
38
- this.name = '';
39
- /** The textarea's value attribute. */
40
- this.value = '';
41
- /** The textarea's label. Alternatively, you can use the label slot. */
42
- this.label = '';
43
- /** The textarea's help text. Alternatively, you can use the help-text slot. */
44
- this.helpText = '';
45
- /** The textarea's error text. Alternatively, you can use the error-text slot. */
46
- this.errorText = '';
47
- /** The number of rows to display by default. */
48
- this.rows = 4;
49
- /** Controls how the textarea can be resized. */
50
- this.resize = 'vertical';
51
- /** Set to true to disable the textarea. */
52
- this.disabled = false;
53
- /** Set to true for a readonly textarea. */
54
- this.readonly = false;
55
- /**
56
- * This will be true when the control is in an invalid state. Validity is determined by props such as `required`,
57
- * `minlength`, and `maxlength` using the browser's constraint validation API.
58
- */
59
- this.invalid = false;
60
- /** Set to display the error text on blur and not when typing */
61
- this.errorOnBlur = false;
62
- /** default value the textarea will be reverted to when reset is executed */
63
- this.defaultValue = '';
64
- }
65
- handleLabelChange() {
66
- this.handleSlotChange();
67
- }
68
- handleRowsChange() {
69
- if (this.textarea) {
70
- this.setTextareaHeight();
71
- }
72
- }
73
- handleValueChange() {
74
- if (!this.textarea) {
75
- return;
76
- }
77
- this.textarea.value = this.value;
78
- this.invalid = !this.textarea.checkValidity();
79
- this.sixValueChange.emit();
80
- }
81
- connectedCallback() {
82
- this.handleChange = this.handleChange.bind(this);
83
- this.handleInput = this.handleInput.bind(this);
84
- this.handleInvalid = this.handleInvalid.bind(this);
85
- this.handleBlur = this.handleBlur.bind(this);
86
- this.handleFocus = this.handleFocus.bind(this);
87
- this.handleSlotChange = this.handleSlotChange.bind(this);
88
- this.host.shadowRoot.addEventListener('slotchange', this.handleSlotChange);
89
- }
90
- componentWillLoad() {
91
- this.defaultValue = this.value || '';
92
- this.handleSlotChange();
93
- }
94
- componentDidLoad() {
95
- this.setTextareaHeight();
96
- this.resizeObserver = new ResizeObserver(() => this.setTextareaHeight());
97
- this.resizeObserver.observe(this.textarea);
98
- this.eventListeners.add(this.textarea, 'invalid', (event) => {
99
- if (this.customValidation || (!this.hasErrorTextSlot && !this.errorText && !this.customErrorText)) {
100
- this.customErrorText = this.textarea.validationMessage;
101
- }
102
- event.preventDefault();
103
- });
104
- }
105
- disconnectedCallback() {
106
- this.resizeObserver.unobserve(this.textarea);
107
- this.host.shadowRoot.removeEventListener('slotchange', this.handleSlotChange);
108
- this.eventListeners.removeAll();
109
- }
110
- /** Sets focus on the textarea. */
111
- async setFocus(options) {
112
- this.textarea.focus(options);
113
- }
114
- /** Removes focus fromt the textarea. */
115
- async removeFocus() {
116
- this.textarea.blur();
117
- }
118
- /** Selects all the text in the input. */
119
- async select() {
120
- return this.textarea.select();
121
- }
122
- /** Sets the start and end positions of the text selection (0-based). */
123
- async setSelectionRange(selectionStart, selectionEnd, selectionDirection = 'none') {
124
- return this.textarea.setSelectionRange(selectionStart, selectionEnd, selectionDirection);
125
- }
126
- /** Replaces a range of text with a new string. */
127
- async setRangeText(replacement, start, end, selectMode = 'preserve') {
128
- this.textarea.setRangeText(replacement, start, end, selectMode);
129
- if (this.value !== this.textarea.value) {
130
- this.value = this.textarea.value;
131
- this.setTextareaHeight();
132
- this.sixChange.emit();
133
- this.sixInput.emit();
134
- }
135
- }
136
- /** Checks for validity and shows the browser's validation message if the control is invalid. */
137
- async reportValidity() {
138
- return this.textarea.reportValidity();
139
- }
140
- /** Checks for validity. */
141
- async checkValidity() {
142
- return this.textarea.validity.valid;
143
- }
144
- /** Sets a custom validation message. If `message` is not empty, the field will be considered invalid. */
145
- async setCustomValidity(message) {
146
- this.customErrorText = '';
147
- this.customValidation = message !== '';
148
- this.textarea.setCustomValidity(message);
149
- this.invalid = !this.textarea.checkValidity();
150
- }
151
- /** Resets the formcontrol */
152
- async reset() {
153
- this.value = this.defaultValue;
154
- this.customErrorText = '';
155
- this.customValidation = false;
156
- this.textarea.setCustomValidity('');
157
- this.invalid = false;
158
- }
159
- handleChange() {
160
- this.sixChange.emit();
161
- }
162
- handleInput() {
163
- this.value = this.textarea.value;
164
- this.setTextareaHeight();
165
- this.sixInput.emit();
166
- }
167
- handleInvalid() {
168
- this.invalid = true;
169
- }
170
- handleBlur() {
171
- this.hasFocus = false;
172
- this.sixBlur.emit();
173
- }
174
- handleFocus() {
175
- this.hasFocus = true;
176
- this.sixFocus.emit();
177
- }
178
- handleSlotChange() {
179
- this.hasLabelSlot = hasSlot(this.host, 'label');
180
- this.hasHelpTextSlot = hasSlot(this.host, 'help-text');
181
- this.hasErrorTextSlot = hasSlot(this.host, 'error-text');
182
- }
183
- setTextareaHeight() {
184
- if (this.resize === 'auto') {
185
- this.textarea.style.height = 'auto';
186
- this.textarea.style.height = this.textarea.scrollHeight + 'px';
187
- }
188
- else {
189
- this.textarea.style.height = undefined;
190
- }
191
- }
192
- displayError() {
193
- return this.invalid && (!this.errorOnBlur || !this.hasFocus);
194
- }
195
- render() {
196
- var _a;
197
- 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 ? this.customErrorText : this.errorText, hasErrorTextSlot: this.hasErrorTextSlot, size: this.size, disabled: this.disabled, required: this.required, displayError: this.displayError() },
198
- h("div", { part: "base", class: {
199
- textarea: true,
200
- // Sizes
201
- 'textarea--small': this.size === 'small',
202
- 'textarea--medium': this.size === 'medium',
203
- 'textarea--large': this.size === 'large',
204
- // States
205
- 'textarea--disabled': this.disabled,
206
- 'textarea--focused': this.hasFocus,
207
- 'textarea--empty': ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) === 0,
208
- 'textarea--invalid': this.invalid,
209
- // Modifiers
210
- 'textarea--resize-none': this.resize === 'none',
211
- 'textarea--resize-vertical': this.resize === 'vertical',
212
- 'textarea--resize-auto': this.resize === 'auto',
213
- } },
214
- h("textarea", { part: "textarea", ref: (el) => (this.textarea = el), id: this.inputId, class: "textarea__control", name: this.name, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, rows: this.rows, minLength: this.minlength, maxLength: this.maxlength, value: this.value, autoCapitalize: this.autocapitalize, autoCorrect: this.autocorrect, autoFocus: this.autofocus, spellcheck: this.spellcheck, required: this.required, inputMode: this.inputmode, "aria-labelledby": this.labelId, onChange: this.handleChange, onInput: this.handleInput, onInvalid: this.handleInvalid, onFocus: this.handleFocus, onBlur: this.handleBlur }))));
215
- }
216
- static get is() { return "six-textarea"; }
217
- static get encapsulation() { return "shadow"; }
218
- static get originalStyleUrls() { return {
219
- "$": ["six-textarea.scss"]
220
- }; }
221
- static get styleUrls() { return {
222
- "$": ["six-textarea.css"]
223
- }; }
224
- static get properties() { return {
225
- "size": {
226
- "type": "string",
227
- "mutable": false,
228
- "complexType": {
229
- "original": "'small' | 'medium' | 'large'",
230
- "resolved": "\"large\" | \"medium\" | \"small\"",
231
- "references": {}
232
- },
233
- "required": false,
234
- "optional": false,
235
- "docs": {
236
- "tags": [],
237
- "text": "The textarea's size."
238
- },
239
- "attribute": "size",
240
- "reflect": true,
241
- "defaultValue": "'medium'"
242
- },
243
- "name": {
244
- "type": "string",
245
- "mutable": false,
246
- "complexType": {
247
- "original": "string",
248
- "resolved": "string",
249
- "references": {}
250
- },
251
- "required": false,
252
- "optional": false,
253
- "docs": {
254
- "tags": [],
255
- "text": "The textarea's name attribute."
256
- },
257
- "attribute": "name",
258
- "reflect": true,
259
- "defaultValue": "''"
260
- },
261
- "value": {
262
- "type": "string",
263
- "mutable": true,
264
- "complexType": {
265
- "original": "string",
266
- "resolved": "string",
267
- "references": {}
268
- },
269
- "required": false,
270
- "optional": false,
271
- "docs": {
272
- "tags": [],
273
- "text": "The textarea's value attribute."
274
- },
275
- "attribute": "value",
276
- "reflect": true,
277
- "defaultValue": "''"
278
- },
279
- "label": {
280
- "type": "string",
281
- "mutable": false,
282
- "complexType": {
283
- "original": "string",
284
- "resolved": "string",
285
- "references": {}
286
- },
287
- "required": false,
288
- "optional": false,
289
- "docs": {
290
- "tags": [],
291
- "text": "The textarea's label. Alternatively, you can use the label slot."
292
- },
293
- "attribute": "label",
294
- "reflect": false,
295
- "defaultValue": "''"
296
- },
297
- "helpText": {
298
- "type": "string",
299
- "mutable": false,
300
- "complexType": {
301
- "original": "string",
302
- "resolved": "string",
303
- "references": {}
304
- },
305
- "required": false,
306
- "optional": false,
307
- "docs": {
308
- "tags": [],
309
- "text": "The textarea's help text. Alternatively, you can use the help-text slot."
310
- },
311
- "attribute": "help-text",
312
- "reflect": false,
313
- "defaultValue": "''"
314
- },
315
- "errorText": {
316
- "type": "string",
317
- "mutable": false,
318
- "complexType": {
319
- "original": "string",
320
- "resolved": "string",
321
- "references": {}
322
- },
323
- "required": false,
324
- "optional": false,
325
- "docs": {
326
- "tags": [],
327
- "text": "The textarea's error text. Alternatively, you can use the error-text slot."
328
- },
329
- "attribute": "error-text",
330
- "reflect": false,
331
- "defaultValue": "''"
332
- },
333
- "placeholder": {
334
- "type": "string",
335
- "mutable": false,
336
- "complexType": {
337
- "original": "string",
338
- "resolved": "string",
339
- "references": {}
340
- },
341
- "required": false,
342
- "optional": false,
343
- "docs": {
344
- "tags": [],
345
- "text": "The textarea's placeholder text."
346
- },
347
- "attribute": "placeholder",
348
- "reflect": false
349
- },
350
- "rows": {
351
- "type": "number",
352
- "mutable": false,
353
- "complexType": {
354
- "original": "number",
355
- "resolved": "number",
356
- "references": {}
357
- },
358
- "required": false,
359
- "optional": false,
360
- "docs": {
361
- "tags": [],
362
- "text": "The number of rows to display by default."
363
- },
364
- "attribute": "rows",
365
- "reflect": false,
366
- "defaultValue": "4"
367
- },
368
- "resize": {
369
- "type": "string",
370
- "mutable": false,
371
- "complexType": {
372
- "original": "'none' | 'vertical' | 'auto'",
373
- "resolved": "\"auto\" | \"none\" | \"vertical\"",
374
- "references": {}
375
- },
376
- "required": false,
377
- "optional": false,
378
- "docs": {
379
- "tags": [],
380
- "text": "Controls how the textarea can be resized."
381
- },
382
- "attribute": "resize",
383
- "reflect": false,
384
- "defaultValue": "'vertical'"
385
- },
386
- "disabled": {
387
- "type": "boolean",
388
- "mutable": false,
389
- "complexType": {
390
- "original": "boolean",
391
- "resolved": "boolean",
392
- "references": {}
393
- },
394
- "required": false,
395
- "optional": false,
396
- "docs": {
397
- "tags": [],
398
- "text": "Set to true to disable the textarea."
399
- },
400
- "attribute": "disabled",
401
- "reflect": true,
402
- "defaultValue": "false"
403
- },
404
- "readonly": {
405
- "type": "boolean",
406
- "mutable": false,
407
- "complexType": {
408
- "original": "boolean",
409
- "resolved": "boolean",
410
- "references": {}
411
- },
412
- "required": false,
413
- "optional": false,
414
- "docs": {
415
- "tags": [],
416
- "text": "Set to true for a readonly textarea."
417
- },
418
- "attribute": "readonly",
419
- "reflect": true,
420
- "defaultValue": "false"
421
- },
422
- "minlength": {
423
- "type": "number",
424
- "mutable": false,
425
- "complexType": {
426
- "original": "number",
427
- "resolved": "number",
428
- "references": {}
429
- },
430
- "required": false,
431
- "optional": false,
432
- "docs": {
433
- "tags": [],
434
- "text": "The minimum length of input that will be considered valid."
435
- },
436
- "attribute": "minlength",
437
- "reflect": true
438
- },
439
- "maxlength": {
440
- "type": "number",
441
- "mutable": false,
442
- "complexType": {
443
- "original": "number",
444
- "resolved": "number",
445
- "references": {}
446
- },
447
- "required": false,
448
- "optional": false,
449
- "docs": {
450
- "tags": [],
451
- "text": "The maximum length of input that will be considered valid."
452
- },
453
- "attribute": "maxlength",
454
- "reflect": true
455
- },
456
- "required": {
457
- "type": "boolean",
458
- "mutable": false,
459
- "complexType": {
460
- "original": "boolean",
461
- "resolved": "boolean",
462
- "references": {}
463
- },
464
- "required": false,
465
- "optional": false,
466
- "docs": {
467
- "tags": [],
468
- "text": "The textarea's required attribute."
469
- },
470
- "attribute": "required",
471
- "reflect": true
472
- },
473
- "invalid": {
474
- "type": "boolean",
475
- "mutable": true,
476
- "complexType": {
477
- "original": "boolean",
478
- "resolved": "boolean",
479
- "references": {}
480
- },
481
- "required": false,
482
- "optional": false,
483
- "docs": {
484
- "tags": [],
485
- "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."
486
- },
487
- "attribute": "invalid",
488
- "reflect": true,
489
- "defaultValue": "false"
490
- },
491
- "autocapitalize": {
492
- "type": "string",
493
- "mutable": false,
494
- "complexType": {
495
- "original": "string",
496
- "resolved": "string",
497
- "references": {}
498
- },
499
- "required": false,
500
- "optional": false,
501
- "docs": {
502
- "tags": [],
503
- "text": "The textarea's autocaptialize attribute."
504
- },
505
- "attribute": "autocapitalize",
506
- "reflect": false
507
- },
508
- "autocorrect": {
509
- "type": "string",
510
- "mutable": false,
511
- "complexType": {
512
- "original": "string",
513
- "resolved": "string",
514
- "references": {}
515
- },
516
- "required": false,
517
- "optional": false,
518
- "docs": {
519
- "tags": [],
520
- "text": "The textarea's autocorrect attribute."
521
- },
522
- "attribute": "autocorrect",
523
- "reflect": false
524
- },
525
- "autocomplete": {
526
- "type": "string",
527
- "mutable": false,
528
- "complexType": {
529
- "original": "string",
530
- "resolved": "string",
531
- "references": {}
532
- },
533
- "required": false,
534
- "optional": false,
535
- "docs": {
536
- "tags": [],
537
- "text": "The textarea's autocomplete attribute."
538
- },
539
- "attribute": "autocomplete",
540
- "reflect": false
541
- },
542
- "autofocus": {
543
- "type": "boolean",
544
- "mutable": false,
545
- "complexType": {
546
- "original": "boolean",
547
- "resolved": "boolean",
548
- "references": {}
549
- },
550
- "required": false,
551
- "optional": false,
552
- "docs": {
553
- "tags": [],
554
- "text": "The textarea's autofocus attribute."
555
- },
556
- "attribute": "autofocus",
557
- "reflect": false
558
- },
559
- "spellcheck": {
560
- "type": "boolean",
561
- "mutable": false,
562
- "complexType": {
563
- "original": "boolean",
564
- "resolved": "boolean",
565
- "references": {}
566
- },
567
- "required": false,
568
- "optional": false,
569
- "docs": {
570
- "tags": [],
571
- "text": "The textarea's spellcheck attribute."
572
- },
573
- "attribute": "spellcheck",
574
- "reflect": false
575
- },
576
- "inputmode": {
577
- "type": "string",
578
- "mutable": false,
579
- "complexType": {
580
- "original": "'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url'",
581
- "resolved": "\"decimal\" | \"email\" | \"none\" | \"numeric\" | \"search\" | \"tel\" | \"text\" | \"url\"",
582
- "references": {}
583
- },
584
- "required": false,
585
- "optional": false,
586
- "docs": {
587
- "tags": [],
588
- "text": "The textarea's inputmode attribute."
589
- },
590
- "attribute": "inputmode",
591
- "reflect": false
592
- },
593
- "errorOnBlur": {
594
- "type": "boolean",
595
- "mutable": false,
596
- "complexType": {
597
- "original": "boolean",
598
- "resolved": "boolean",
599
- "references": {}
600
- },
601
- "required": false,
602
- "optional": false,
603
- "docs": {
604
- "tags": [],
605
- "text": "Set to display the error text on blur and not when typing"
606
- },
607
- "attribute": "error-on-blur",
608
- "reflect": false,
609
- "defaultValue": "false"
610
- }
611
- }; }
612
- static get states() { return {
613
- "hasFocus": {},
614
- "hasHelpTextSlot": {},
615
- "hasErrorTextSlot": {},
616
- "hasLabelSlot": {}
617
- }; }
618
- static get events() { return [{
619
- "method": "sixChange",
620
- "name": "six-textarea-change",
621
- "bubbles": true,
622
- "cancelable": true,
623
- "composed": true,
624
- "docs": {
625
- "tags": [],
626
- "text": "Emitted when the control's value changes. Access the new value via event.target.value."
627
- },
628
- "complexType": {
629
- "original": "EmptyPayload",
630
- "resolved": "undefined",
631
- "references": {
632
- "EmptyPayload": {
633
- "location": "import",
634
- "path": "../../utils/types"
635
- }
636
- }
637
- }
638
- }, {
639
- "method": "sixInput",
640
- "name": "six-textarea-input",
641
- "bubbles": true,
642
- "cancelable": true,
643
- "composed": true,
644
- "docs": {
645
- "tags": [],
646
- "text": "Emitted when the control receives input. Access the new value via event.target.value."
647
- },
648
- "complexType": {
649
- "original": "EmptyPayload",
650
- "resolved": "undefined",
651
- "references": {
652
- "EmptyPayload": {
653
- "location": "import",
654
- "path": "../../utils/types"
655
- }
656
- }
657
- }
658
- }, {
659
- "method": "sixFocus",
660
- "name": "six-textarea-focus",
661
- "bubbles": true,
662
- "cancelable": true,
663
- "composed": true,
664
- "docs": {
665
- "tags": [],
666
- "text": "Emitted when the control gains focus."
667
- },
668
- "complexType": {
669
- "original": "EmptyPayload",
670
- "resolved": "undefined",
671
- "references": {
672
- "EmptyPayload": {
673
- "location": "import",
674
- "path": "../../utils/types"
675
- }
676
- }
677
- }
678
- }, {
679
- "method": "sixBlur",
680
- "name": "six-textarea-blur",
681
- "bubbles": true,
682
- "cancelable": true,
683
- "composed": true,
684
- "docs": {
685
- "tags": [],
686
- "text": "Emitted when the control loses focus. Access the new value via event.target.value."
687
- },
688
- "complexType": {
689
- "original": "EmptyPayload",
690
- "resolved": "undefined",
691
- "references": {
692
- "EmptyPayload": {
693
- "location": "import",
694
- "path": "../../utils/types"
695
- }
696
- }
697
- }
698
- }, {
699
- "method": "sixValueChange",
700
- "name": "six-textarea-value-change",
701
- "bubbles": true,
702
- "cancelable": true,
703
- "composed": true,
704
- "docs": {
705
- "tags": [],
706
- "text": "Emitted whenever the value changes. Access the new value via event.target.value.\nsix-textarea-value-change will emit whenever the value changes.\nSo be it on textarea or when dynamically set. six-textarea-input will only be emitted when the user enters data,\nbut not when a value is dynamically set. six-textarea-change will only be emitted when the user either presses enter\nor leaves the textarea field after entering some data."
707
- },
708
- "complexType": {
709
- "original": "EmptyPayload",
710
- "resolved": "undefined",
711
- "references": {
712
- "EmptyPayload": {
713
- "location": "import",
714
- "path": "../../utils/types"
715
- }
716
- }
717
- }
718
- }]; }
719
- static get methods() { return {
720
- "setFocus": {
721
- "complexType": {
722
- "signature": "(options?: FocusOptions) => Promise<void>",
723
- "parameters": [{
724
- "tags": [],
725
- "text": ""
726
- }],
727
- "references": {
728
- "Promise": {
729
- "location": "global"
730
- },
731
- "FocusOptions": {
732
- "location": "global"
733
- }
734
- },
735
- "return": "Promise<void>"
736
- },
737
- "docs": {
738
- "text": "Sets focus on the textarea.",
739
- "tags": []
740
- }
741
- },
742
- "removeFocus": {
743
- "complexType": {
744
- "signature": "() => Promise<void>",
745
- "parameters": [],
746
- "references": {
747
- "Promise": {
748
- "location": "global"
749
- }
750
- },
751
- "return": "Promise<void>"
752
- },
753
- "docs": {
754
- "text": "Removes focus fromt the textarea.",
755
- "tags": []
756
- }
757
- },
758
- "select": {
759
- "complexType": {
760
- "signature": "() => Promise<void>",
761
- "parameters": [],
762
- "references": {
763
- "Promise": {
764
- "location": "global"
765
- }
766
- },
767
- "return": "Promise<void>"
768
- },
769
- "docs": {
770
- "text": "Selects all the text in the input.",
771
- "tags": []
772
- }
773
- },
774
- "setSelectionRange": {
775
- "complexType": {
776
- "signature": "(selectionStart: number, selectionEnd: number, selectionDirection?: 'forward' | 'backward' | 'none') => Promise<void>",
777
- "parameters": [{
778
- "tags": [],
779
- "text": ""
780
- }, {
781
- "tags": [],
782
- "text": ""
783
- }, {
784
- "tags": [],
785
- "text": ""
786
- }],
787
- "references": {
788
- "Promise": {
789
- "location": "global"
790
- }
791
- },
792
- "return": "Promise<void>"
793
- },
794
- "docs": {
795
- "text": "Sets the start and end positions of the text selection (0-based).",
796
- "tags": []
797
- }
798
- },
799
- "setRangeText": {
800
- "complexType": {
801
- "signature": "(replacement: string, start: number, end: number, selectMode?: 'select' | 'start' | 'end' | 'preserve') => Promise<void>",
802
- "parameters": [{
803
- "tags": [],
804
- "text": ""
805
- }, {
806
- "tags": [],
807
- "text": ""
808
- }, {
809
- "tags": [],
810
- "text": ""
811
- }, {
812
- "tags": [],
813
- "text": ""
814
- }],
815
- "references": {
816
- "Promise": {
817
- "location": "global"
818
- }
819
- },
820
- "return": "Promise<void>"
821
- },
822
- "docs": {
823
- "text": "Replaces a range of text with a new string.",
824
- "tags": []
825
- }
826
- },
827
- "reportValidity": {
828
- "complexType": {
829
- "signature": "() => Promise<boolean>",
830
- "parameters": [],
831
- "references": {
832
- "Promise": {
833
- "location": "global"
834
- }
835
- },
836
- "return": "Promise<boolean>"
837
- },
838
- "docs": {
839
- "text": "Checks for validity and shows the browser's validation message if the control is invalid.",
840
- "tags": []
841
- }
842
- },
843
- "checkValidity": {
844
- "complexType": {
845
- "signature": "() => Promise<boolean>",
846
- "parameters": [],
847
- "references": {
848
- "Promise": {
849
- "location": "global"
850
- }
851
- },
852
- "return": "Promise<boolean>"
853
- },
854
- "docs": {
855
- "text": "Checks for validity.",
856
- "tags": []
857
- }
858
- },
859
- "setCustomValidity": {
860
- "complexType": {
861
- "signature": "(message: string) => Promise<void>",
862
- "parameters": [{
863
- "tags": [],
864
- "text": ""
865
- }],
866
- "references": {
867
- "Promise": {
868
- "location": "global"
869
- }
870
- },
871
- "return": "Promise<void>"
872
- },
873
- "docs": {
874
- "text": "Sets a custom validation message. If `message` is not empty, the field will be considered invalid.",
875
- "tags": []
876
- }
877
- },
878
- "reset": {
879
- "complexType": {
880
- "signature": "() => Promise<void>",
881
- "parameters": [],
882
- "references": {
883
- "Promise": {
884
- "location": "global"
885
- }
886
- },
887
- "return": "Promise<void>"
888
- },
889
- "docs": {
890
- "text": "Resets the formcontrol",
891
- "tags": []
892
- }
893
- }
894
- }; }
895
- static get elementRef() { return "host"; }
896
- static get watchers() { return [{
897
- "propName": "helpText",
898
- "methodName": "handleLabelChange"
899
- }, {
900
- "propName": "errorText",
901
- "methodName": "handleLabelChange"
902
- }, {
903
- "propName": "label",
904
- "methodName": "handleLabelChange"
905
- }, {
906
- "propName": "rows",
907
- "methodName": "handleRowsChange"
908
- }, {
909
- "propName": "value",
910
- "methodName": "handleValueChange"
911
- }]; }
912
- }
1
+ import { Component, Element, Event, h, Method, Prop, State, Watch } from '@stencil/core';
2
+ import FormControl from '../../functional-components/form-control/form-control';
3
+ import { hasSlot } from '../../utils/slot';
4
+ import { EventListeners } from '../../utils/event-listeners';
5
+ let id = 0;
6
+ /**
7
+ * @since 1.0
8
+ * @status stable
9
+ *
10
+ * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.
11
+ *
12
+ * @slot label - The textarea's label. Alternatively, you can use the label prop.
13
+ * @slot help-text - Help text that describes how to use the input.
14
+ * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.
15
+ *
16
+ * @part base - The component's base wrapper.
17
+ * @part form-control - The form control that wraps the label, textarea, and help text.
18
+ * @part label - The textarea label.
19
+ * @part textarea - The textarea control.
20
+ * @part help-text - The textarea help text.
21
+ */
22
+ export class SixTextarea {
23
+ constructor() {
24
+ this.inputId = `textarea-${++id}`;
25
+ this.labelId = `textarea-label-${id}`;
26
+ this.helpTextId = `textarea-help-text-${id}`;
27
+ this.errorTextId = `input-error-text-${id}`;
28
+ this.customErrorText = '';
29
+ this.customValidation = false;
30
+ this.eventListeners = new EventListeners();
31
+ this.hasFocus = false;
32
+ this.hasHelpTextSlot = false;
33
+ this.hasErrorTextSlot = false;
34
+ this.hasLabelSlot = false;
35
+ /** The textarea's size. */
36
+ this.size = 'medium';
37
+ /** The textarea's name attribute. */
38
+ this.name = '';
39
+ /** The textarea's value attribute. */
40
+ this.value = '';
41
+ /** The textarea's label. Alternatively, you can use the label slot. */
42
+ this.label = '';
43
+ /** The textarea's help text. Alternatively, you can use the help-text slot. */
44
+ this.helpText = '';
45
+ /** The textarea's error text. Alternatively, you can use the error-text slot. */
46
+ this.errorText = '';
47
+ /** The number of rows to display by default. */
48
+ this.rows = 4;
49
+ /** Controls how the textarea can be resized. */
50
+ this.resize = 'vertical';
51
+ /** Set to true to disable the textarea. */
52
+ this.disabled = false;
53
+ /** Set to true for a readonly textarea. */
54
+ this.readonly = false;
55
+ /**
56
+ * This will be true when the control is in an invalid state. Validity is determined by props such as `required`,
57
+ * `minlength`, and `maxlength` using the browser's constraint validation API.
58
+ */
59
+ this.invalid = false;
60
+ /** Set to display the error text on blur and not when typing */
61
+ this.errorOnBlur = false;
62
+ /** default value the textarea will be reverted to when reset is executed */
63
+ this.defaultValue = '';
64
+ }
65
+ handleLabelChange() {
66
+ this.handleSlotChange();
67
+ }
68
+ handleRowsChange() {
69
+ if (this.textarea) {
70
+ this.setTextareaHeight();
71
+ }
72
+ }
73
+ handleValueChange() {
74
+ if (!this.textarea) {
75
+ return;
76
+ }
77
+ this.textarea.value = this.value;
78
+ this.invalid = !this.textarea.checkValidity();
79
+ this.sixValueChange.emit();
80
+ }
81
+ connectedCallback() {
82
+ this.handleChange = this.handleChange.bind(this);
83
+ this.handleInput = this.handleInput.bind(this);
84
+ this.handleInvalid = this.handleInvalid.bind(this);
85
+ this.handleBlur = this.handleBlur.bind(this);
86
+ this.handleFocus = this.handleFocus.bind(this);
87
+ this.handleSlotChange = this.handleSlotChange.bind(this);
88
+ this.host.shadowRoot.addEventListener('slotchange', this.handleSlotChange);
89
+ }
90
+ componentWillLoad() {
91
+ this.defaultValue = this.value || '';
92
+ this.handleSlotChange();
93
+ }
94
+ componentDidLoad() {
95
+ this.setTextareaHeight();
96
+ this.resizeObserver = new ResizeObserver(() => this.setTextareaHeight());
97
+ this.resizeObserver.observe(this.textarea);
98
+ this.eventListeners.add(this.textarea, 'invalid', (event) => {
99
+ if (this.customValidation || (!this.hasErrorTextSlot && !this.errorText && !this.customErrorText)) {
100
+ this.customErrorText = this.textarea.validationMessage;
101
+ }
102
+ event.preventDefault();
103
+ });
104
+ }
105
+ disconnectedCallback() {
106
+ this.resizeObserver.unobserve(this.textarea);
107
+ this.host.shadowRoot.removeEventListener('slotchange', this.handleSlotChange);
108
+ this.eventListeners.removeAll();
109
+ }
110
+ /** Sets focus on the textarea. */
111
+ async setFocus(options) {
112
+ this.textarea.focus(options);
113
+ }
114
+ /** Removes focus fromt the textarea. */
115
+ async removeFocus() {
116
+ this.textarea.blur();
117
+ }
118
+ /** Selects all the text in the input. */
119
+ async select() {
120
+ return this.textarea.select();
121
+ }
122
+ /** Sets the start and end positions of the text selection (0-based). */
123
+ async setSelectionRange(selectionStart, selectionEnd, selectionDirection = 'none') {
124
+ return this.textarea.setSelectionRange(selectionStart, selectionEnd, selectionDirection);
125
+ }
126
+ /** Replaces a range of text with a new string. */
127
+ async setRangeText(replacement, start, end, selectMode = 'preserve') {
128
+ this.textarea.setRangeText(replacement, start, end, selectMode);
129
+ if (this.value !== this.textarea.value) {
130
+ this.value = this.textarea.value;
131
+ this.setTextareaHeight();
132
+ this.sixChange.emit();
133
+ this.sixInput.emit();
134
+ }
135
+ }
136
+ /** Checks for validity and shows the browser's validation message if the control is invalid. */
137
+ async reportValidity() {
138
+ return this.textarea.reportValidity();
139
+ }
140
+ /** Checks for validity. */
141
+ async checkValidity() {
142
+ return this.textarea.validity.valid;
143
+ }
144
+ /** Sets a custom validation message. If `message` is not empty, the field will be considered invalid. */
145
+ async setCustomValidity(message) {
146
+ this.customErrorText = '';
147
+ this.customValidation = message !== '';
148
+ this.textarea.setCustomValidity(message);
149
+ this.invalid = !this.textarea.checkValidity();
150
+ }
151
+ /** Resets the formcontrol */
152
+ async reset() {
153
+ this.value = this.defaultValue;
154
+ this.customErrorText = '';
155
+ this.customValidation = false;
156
+ this.textarea.setCustomValidity('');
157
+ this.invalid = false;
158
+ }
159
+ handleChange() {
160
+ this.sixChange.emit();
161
+ }
162
+ handleInput() {
163
+ this.value = this.textarea.value;
164
+ this.setTextareaHeight();
165
+ this.sixInput.emit();
166
+ }
167
+ handleInvalid() {
168
+ this.invalid = true;
169
+ }
170
+ handleBlur() {
171
+ this.hasFocus = false;
172
+ this.sixBlur.emit();
173
+ }
174
+ handleFocus() {
175
+ this.hasFocus = true;
176
+ this.sixFocus.emit();
177
+ }
178
+ handleSlotChange() {
179
+ this.hasLabelSlot = hasSlot(this.host, 'label');
180
+ this.hasHelpTextSlot = hasSlot(this.host, 'help-text');
181
+ this.hasErrorTextSlot = hasSlot(this.host, 'error-text');
182
+ }
183
+ setTextareaHeight() {
184
+ if (this.resize === 'auto') {
185
+ this.textarea.style.height = 'auto';
186
+ this.textarea.style.height = this.textarea.scrollHeight + 'px';
187
+ }
188
+ else {
189
+ this.textarea.style.height = undefined;
190
+ }
191
+ }
192
+ displayError() {
193
+ return this.invalid && (!this.errorOnBlur || !this.hasFocus);
194
+ }
195
+ render() {
196
+ var _a;
197
+ 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 ? this.customErrorText : this.errorText, hasErrorTextSlot: this.hasErrorTextSlot, size: this.size, disabled: this.disabled, required: this.required, displayError: this.displayError() },
198
+ h("div", { part: "base", class: {
199
+ textarea: true,
200
+ // Sizes
201
+ 'textarea--small': this.size === 'small',
202
+ 'textarea--medium': this.size === 'medium',
203
+ 'textarea--large': this.size === 'large',
204
+ // States
205
+ 'textarea--disabled': this.disabled,
206
+ 'textarea--focused': this.hasFocus,
207
+ 'textarea--empty': ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) === 0,
208
+ 'textarea--invalid': this.invalid,
209
+ // Modifiers
210
+ 'textarea--resize-none': this.resize === 'none',
211
+ 'textarea--resize-vertical': this.resize === 'vertical',
212
+ 'textarea--resize-auto': this.resize === 'auto',
213
+ } },
214
+ h("textarea", { part: "textarea", ref: (el) => (this.textarea = el), id: this.inputId, class: "textarea__control", name: this.name, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, rows: this.rows, minLength: this.minlength, maxLength: this.maxlength, value: this.value, autoCapitalize: this.autocapitalize, autoCorrect: this.autocorrect, autoFocus: this.autofocus, spellcheck: this.spellcheck, required: this.required, inputMode: this.inputmode, "aria-labelledby": this.labelId, onChange: this.handleChange, onInput: this.handleInput, onInvalid: this.handleInvalid, onFocus: this.handleFocus, onBlur: this.handleBlur }))));
215
+ }
216
+ static get is() { return "six-textarea"; }
217
+ static get encapsulation() { return "shadow"; }
218
+ static get originalStyleUrls() { return {
219
+ "$": ["six-textarea.scss"]
220
+ }; }
221
+ static get styleUrls() { return {
222
+ "$": ["six-textarea.css"]
223
+ }; }
224
+ static get properties() { return {
225
+ "size": {
226
+ "type": "string",
227
+ "mutable": false,
228
+ "complexType": {
229
+ "original": "'small' | 'medium' | 'large'",
230
+ "resolved": "\"large\" | \"medium\" | \"small\"",
231
+ "references": {}
232
+ },
233
+ "required": false,
234
+ "optional": false,
235
+ "docs": {
236
+ "tags": [],
237
+ "text": "The textarea's size."
238
+ },
239
+ "attribute": "size",
240
+ "reflect": true,
241
+ "defaultValue": "'medium'"
242
+ },
243
+ "name": {
244
+ "type": "string",
245
+ "mutable": false,
246
+ "complexType": {
247
+ "original": "string",
248
+ "resolved": "string",
249
+ "references": {}
250
+ },
251
+ "required": false,
252
+ "optional": false,
253
+ "docs": {
254
+ "tags": [],
255
+ "text": "The textarea's name attribute."
256
+ },
257
+ "attribute": "name",
258
+ "reflect": true,
259
+ "defaultValue": "''"
260
+ },
261
+ "value": {
262
+ "type": "string",
263
+ "mutable": true,
264
+ "complexType": {
265
+ "original": "string",
266
+ "resolved": "string",
267
+ "references": {}
268
+ },
269
+ "required": false,
270
+ "optional": false,
271
+ "docs": {
272
+ "tags": [],
273
+ "text": "The textarea's value attribute."
274
+ },
275
+ "attribute": "value",
276
+ "reflect": true,
277
+ "defaultValue": "''"
278
+ },
279
+ "label": {
280
+ "type": "string",
281
+ "mutable": false,
282
+ "complexType": {
283
+ "original": "string",
284
+ "resolved": "string",
285
+ "references": {}
286
+ },
287
+ "required": false,
288
+ "optional": false,
289
+ "docs": {
290
+ "tags": [],
291
+ "text": "The textarea's label. Alternatively, you can use the label slot."
292
+ },
293
+ "attribute": "label",
294
+ "reflect": false,
295
+ "defaultValue": "''"
296
+ },
297
+ "helpText": {
298
+ "type": "string",
299
+ "mutable": false,
300
+ "complexType": {
301
+ "original": "string",
302
+ "resolved": "string",
303
+ "references": {}
304
+ },
305
+ "required": false,
306
+ "optional": false,
307
+ "docs": {
308
+ "tags": [],
309
+ "text": "The textarea's help text. Alternatively, you can use the help-text slot."
310
+ },
311
+ "attribute": "help-text",
312
+ "reflect": false,
313
+ "defaultValue": "''"
314
+ },
315
+ "errorText": {
316
+ "type": "string",
317
+ "mutable": false,
318
+ "complexType": {
319
+ "original": "string",
320
+ "resolved": "string",
321
+ "references": {}
322
+ },
323
+ "required": false,
324
+ "optional": false,
325
+ "docs": {
326
+ "tags": [],
327
+ "text": "The textarea's error text. Alternatively, you can use the error-text slot."
328
+ },
329
+ "attribute": "error-text",
330
+ "reflect": false,
331
+ "defaultValue": "''"
332
+ },
333
+ "placeholder": {
334
+ "type": "string",
335
+ "mutable": false,
336
+ "complexType": {
337
+ "original": "string",
338
+ "resolved": "string",
339
+ "references": {}
340
+ },
341
+ "required": false,
342
+ "optional": false,
343
+ "docs": {
344
+ "tags": [],
345
+ "text": "The textarea's placeholder text."
346
+ },
347
+ "attribute": "placeholder",
348
+ "reflect": false
349
+ },
350
+ "rows": {
351
+ "type": "number",
352
+ "mutable": false,
353
+ "complexType": {
354
+ "original": "number",
355
+ "resolved": "number",
356
+ "references": {}
357
+ },
358
+ "required": false,
359
+ "optional": false,
360
+ "docs": {
361
+ "tags": [],
362
+ "text": "The number of rows to display by default."
363
+ },
364
+ "attribute": "rows",
365
+ "reflect": false,
366
+ "defaultValue": "4"
367
+ },
368
+ "resize": {
369
+ "type": "string",
370
+ "mutable": false,
371
+ "complexType": {
372
+ "original": "'none' | 'vertical' | 'auto'",
373
+ "resolved": "\"auto\" | \"none\" | \"vertical\"",
374
+ "references": {}
375
+ },
376
+ "required": false,
377
+ "optional": false,
378
+ "docs": {
379
+ "tags": [],
380
+ "text": "Controls how the textarea can be resized."
381
+ },
382
+ "attribute": "resize",
383
+ "reflect": false,
384
+ "defaultValue": "'vertical'"
385
+ },
386
+ "disabled": {
387
+ "type": "boolean",
388
+ "mutable": false,
389
+ "complexType": {
390
+ "original": "boolean",
391
+ "resolved": "boolean",
392
+ "references": {}
393
+ },
394
+ "required": false,
395
+ "optional": false,
396
+ "docs": {
397
+ "tags": [],
398
+ "text": "Set to true to disable the textarea."
399
+ },
400
+ "attribute": "disabled",
401
+ "reflect": true,
402
+ "defaultValue": "false"
403
+ },
404
+ "readonly": {
405
+ "type": "boolean",
406
+ "mutable": false,
407
+ "complexType": {
408
+ "original": "boolean",
409
+ "resolved": "boolean",
410
+ "references": {}
411
+ },
412
+ "required": false,
413
+ "optional": false,
414
+ "docs": {
415
+ "tags": [],
416
+ "text": "Set to true for a readonly textarea."
417
+ },
418
+ "attribute": "readonly",
419
+ "reflect": true,
420
+ "defaultValue": "false"
421
+ },
422
+ "minlength": {
423
+ "type": "number",
424
+ "mutable": false,
425
+ "complexType": {
426
+ "original": "number",
427
+ "resolved": "number",
428
+ "references": {}
429
+ },
430
+ "required": false,
431
+ "optional": false,
432
+ "docs": {
433
+ "tags": [],
434
+ "text": "The minimum length of input that will be considered valid."
435
+ },
436
+ "attribute": "minlength",
437
+ "reflect": true
438
+ },
439
+ "maxlength": {
440
+ "type": "number",
441
+ "mutable": false,
442
+ "complexType": {
443
+ "original": "number",
444
+ "resolved": "number",
445
+ "references": {}
446
+ },
447
+ "required": false,
448
+ "optional": false,
449
+ "docs": {
450
+ "tags": [],
451
+ "text": "The maximum length of input that will be considered valid."
452
+ },
453
+ "attribute": "maxlength",
454
+ "reflect": true
455
+ },
456
+ "required": {
457
+ "type": "boolean",
458
+ "mutable": false,
459
+ "complexType": {
460
+ "original": "boolean",
461
+ "resolved": "boolean",
462
+ "references": {}
463
+ },
464
+ "required": false,
465
+ "optional": false,
466
+ "docs": {
467
+ "tags": [],
468
+ "text": "The textarea's required attribute."
469
+ },
470
+ "attribute": "required",
471
+ "reflect": true
472
+ },
473
+ "invalid": {
474
+ "type": "boolean",
475
+ "mutable": true,
476
+ "complexType": {
477
+ "original": "boolean",
478
+ "resolved": "boolean",
479
+ "references": {}
480
+ },
481
+ "required": false,
482
+ "optional": false,
483
+ "docs": {
484
+ "tags": [],
485
+ "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."
486
+ },
487
+ "attribute": "invalid",
488
+ "reflect": true,
489
+ "defaultValue": "false"
490
+ },
491
+ "autocapitalize": {
492
+ "type": "string",
493
+ "mutable": false,
494
+ "complexType": {
495
+ "original": "string",
496
+ "resolved": "string",
497
+ "references": {}
498
+ },
499
+ "required": false,
500
+ "optional": false,
501
+ "docs": {
502
+ "tags": [],
503
+ "text": "The textarea's autocaptialize attribute."
504
+ },
505
+ "attribute": "autocapitalize",
506
+ "reflect": false
507
+ },
508
+ "autocorrect": {
509
+ "type": "string",
510
+ "mutable": false,
511
+ "complexType": {
512
+ "original": "string",
513
+ "resolved": "string",
514
+ "references": {}
515
+ },
516
+ "required": false,
517
+ "optional": false,
518
+ "docs": {
519
+ "tags": [],
520
+ "text": "The textarea's autocorrect attribute."
521
+ },
522
+ "attribute": "autocorrect",
523
+ "reflect": false
524
+ },
525
+ "autocomplete": {
526
+ "type": "string",
527
+ "mutable": false,
528
+ "complexType": {
529
+ "original": "string",
530
+ "resolved": "string",
531
+ "references": {}
532
+ },
533
+ "required": false,
534
+ "optional": false,
535
+ "docs": {
536
+ "tags": [],
537
+ "text": "The textarea's autocomplete attribute."
538
+ },
539
+ "attribute": "autocomplete",
540
+ "reflect": false
541
+ },
542
+ "autofocus": {
543
+ "type": "boolean",
544
+ "mutable": false,
545
+ "complexType": {
546
+ "original": "boolean",
547
+ "resolved": "boolean",
548
+ "references": {}
549
+ },
550
+ "required": false,
551
+ "optional": false,
552
+ "docs": {
553
+ "tags": [],
554
+ "text": "The textarea's autofocus attribute."
555
+ },
556
+ "attribute": "autofocus",
557
+ "reflect": false
558
+ },
559
+ "spellcheck": {
560
+ "type": "boolean",
561
+ "mutable": false,
562
+ "complexType": {
563
+ "original": "boolean",
564
+ "resolved": "boolean",
565
+ "references": {}
566
+ },
567
+ "required": false,
568
+ "optional": false,
569
+ "docs": {
570
+ "tags": [],
571
+ "text": "The textarea's spellcheck attribute."
572
+ },
573
+ "attribute": "spellcheck",
574
+ "reflect": false
575
+ },
576
+ "inputmode": {
577
+ "type": "string",
578
+ "mutable": false,
579
+ "complexType": {
580
+ "original": "'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url'",
581
+ "resolved": "\"decimal\" | \"email\" | \"none\" | \"numeric\" | \"search\" | \"tel\" | \"text\" | \"url\"",
582
+ "references": {}
583
+ },
584
+ "required": false,
585
+ "optional": false,
586
+ "docs": {
587
+ "tags": [],
588
+ "text": "The textarea's inputmode attribute."
589
+ },
590
+ "attribute": "inputmode",
591
+ "reflect": false
592
+ },
593
+ "errorOnBlur": {
594
+ "type": "boolean",
595
+ "mutable": false,
596
+ "complexType": {
597
+ "original": "boolean",
598
+ "resolved": "boolean",
599
+ "references": {}
600
+ },
601
+ "required": false,
602
+ "optional": false,
603
+ "docs": {
604
+ "tags": [],
605
+ "text": "Set to display the error text on blur and not when typing"
606
+ },
607
+ "attribute": "error-on-blur",
608
+ "reflect": false,
609
+ "defaultValue": "false"
610
+ }
611
+ }; }
612
+ static get states() { return {
613
+ "hasFocus": {},
614
+ "hasHelpTextSlot": {},
615
+ "hasErrorTextSlot": {},
616
+ "hasLabelSlot": {}
617
+ }; }
618
+ static get events() { return [{
619
+ "method": "sixChange",
620
+ "name": "six-textarea-change",
621
+ "bubbles": true,
622
+ "cancelable": true,
623
+ "composed": true,
624
+ "docs": {
625
+ "tags": [],
626
+ "text": "Emitted when the control's value changes. Access the new value via event.target.value."
627
+ },
628
+ "complexType": {
629
+ "original": "EmptyPayload",
630
+ "resolved": "undefined",
631
+ "references": {
632
+ "EmptyPayload": {
633
+ "location": "import",
634
+ "path": "../../utils/types"
635
+ }
636
+ }
637
+ }
638
+ }, {
639
+ "method": "sixInput",
640
+ "name": "six-textarea-input",
641
+ "bubbles": true,
642
+ "cancelable": true,
643
+ "composed": true,
644
+ "docs": {
645
+ "tags": [],
646
+ "text": "Emitted when the control receives input. Access the new value via event.target.value."
647
+ },
648
+ "complexType": {
649
+ "original": "EmptyPayload",
650
+ "resolved": "undefined",
651
+ "references": {
652
+ "EmptyPayload": {
653
+ "location": "import",
654
+ "path": "../../utils/types"
655
+ }
656
+ }
657
+ }
658
+ }, {
659
+ "method": "sixFocus",
660
+ "name": "six-textarea-focus",
661
+ "bubbles": true,
662
+ "cancelable": true,
663
+ "composed": true,
664
+ "docs": {
665
+ "tags": [],
666
+ "text": "Emitted when the control gains focus."
667
+ },
668
+ "complexType": {
669
+ "original": "EmptyPayload",
670
+ "resolved": "undefined",
671
+ "references": {
672
+ "EmptyPayload": {
673
+ "location": "import",
674
+ "path": "../../utils/types"
675
+ }
676
+ }
677
+ }
678
+ }, {
679
+ "method": "sixBlur",
680
+ "name": "six-textarea-blur",
681
+ "bubbles": true,
682
+ "cancelable": true,
683
+ "composed": true,
684
+ "docs": {
685
+ "tags": [],
686
+ "text": "Emitted when the control loses focus. Access the new value via event.target.value."
687
+ },
688
+ "complexType": {
689
+ "original": "EmptyPayload",
690
+ "resolved": "undefined",
691
+ "references": {
692
+ "EmptyPayload": {
693
+ "location": "import",
694
+ "path": "../../utils/types"
695
+ }
696
+ }
697
+ }
698
+ }, {
699
+ "method": "sixValueChange",
700
+ "name": "six-textarea-value-change",
701
+ "bubbles": true,
702
+ "cancelable": true,
703
+ "composed": true,
704
+ "docs": {
705
+ "tags": [],
706
+ "text": "Emitted whenever the value changes. Access the new value via event.target.value.\nsix-textarea-value-change will emit whenever the value changes.\nSo be it on textarea or when dynamically set. six-textarea-input will only be emitted when the user enters data,\nbut not when a value is dynamically set. six-textarea-change will only be emitted when the user either presses enter\nor leaves the textarea field after entering some data."
707
+ },
708
+ "complexType": {
709
+ "original": "EmptyPayload",
710
+ "resolved": "undefined",
711
+ "references": {
712
+ "EmptyPayload": {
713
+ "location": "import",
714
+ "path": "../../utils/types"
715
+ }
716
+ }
717
+ }
718
+ }]; }
719
+ static get methods() { return {
720
+ "setFocus": {
721
+ "complexType": {
722
+ "signature": "(options?: FocusOptions) => Promise<void>",
723
+ "parameters": [{
724
+ "tags": [],
725
+ "text": ""
726
+ }],
727
+ "references": {
728
+ "Promise": {
729
+ "location": "global"
730
+ },
731
+ "FocusOptions": {
732
+ "location": "global"
733
+ }
734
+ },
735
+ "return": "Promise<void>"
736
+ },
737
+ "docs": {
738
+ "text": "Sets focus on the textarea.",
739
+ "tags": []
740
+ }
741
+ },
742
+ "removeFocus": {
743
+ "complexType": {
744
+ "signature": "() => Promise<void>",
745
+ "parameters": [],
746
+ "references": {
747
+ "Promise": {
748
+ "location": "global"
749
+ }
750
+ },
751
+ "return": "Promise<void>"
752
+ },
753
+ "docs": {
754
+ "text": "Removes focus fromt the textarea.",
755
+ "tags": []
756
+ }
757
+ },
758
+ "select": {
759
+ "complexType": {
760
+ "signature": "() => Promise<void>",
761
+ "parameters": [],
762
+ "references": {
763
+ "Promise": {
764
+ "location": "global"
765
+ }
766
+ },
767
+ "return": "Promise<void>"
768
+ },
769
+ "docs": {
770
+ "text": "Selects all the text in the input.",
771
+ "tags": []
772
+ }
773
+ },
774
+ "setSelectionRange": {
775
+ "complexType": {
776
+ "signature": "(selectionStart: number, selectionEnd: number, selectionDirection?: 'forward' | 'backward' | 'none') => Promise<void>",
777
+ "parameters": [{
778
+ "tags": [],
779
+ "text": ""
780
+ }, {
781
+ "tags": [],
782
+ "text": ""
783
+ }, {
784
+ "tags": [],
785
+ "text": ""
786
+ }],
787
+ "references": {
788
+ "Promise": {
789
+ "location": "global"
790
+ }
791
+ },
792
+ "return": "Promise<void>"
793
+ },
794
+ "docs": {
795
+ "text": "Sets the start and end positions of the text selection (0-based).",
796
+ "tags": []
797
+ }
798
+ },
799
+ "setRangeText": {
800
+ "complexType": {
801
+ "signature": "(replacement: string, start: number, end: number, selectMode?: 'select' | 'start' | 'end' | 'preserve') => Promise<void>",
802
+ "parameters": [{
803
+ "tags": [],
804
+ "text": ""
805
+ }, {
806
+ "tags": [],
807
+ "text": ""
808
+ }, {
809
+ "tags": [],
810
+ "text": ""
811
+ }, {
812
+ "tags": [],
813
+ "text": ""
814
+ }],
815
+ "references": {
816
+ "Promise": {
817
+ "location": "global"
818
+ }
819
+ },
820
+ "return": "Promise<void>"
821
+ },
822
+ "docs": {
823
+ "text": "Replaces a range of text with a new string.",
824
+ "tags": []
825
+ }
826
+ },
827
+ "reportValidity": {
828
+ "complexType": {
829
+ "signature": "() => Promise<boolean>",
830
+ "parameters": [],
831
+ "references": {
832
+ "Promise": {
833
+ "location": "global"
834
+ }
835
+ },
836
+ "return": "Promise<boolean>"
837
+ },
838
+ "docs": {
839
+ "text": "Checks for validity and shows the browser's validation message if the control is invalid.",
840
+ "tags": []
841
+ }
842
+ },
843
+ "checkValidity": {
844
+ "complexType": {
845
+ "signature": "() => Promise<boolean>",
846
+ "parameters": [],
847
+ "references": {
848
+ "Promise": {
849
+ "location": "global"
850
+ }
851
+ },
852
+ "return": "Promise<boolean>"
853
+ },
854
+ "docs": {
855
+ "text": "Checks for validity.",
856
+ "tags": []
857
+ }
858
+ },
859
+ "setCustomValidity": {
860
+ "complexType": {
861
+ "signature": "(message: string) => Promise<void>",
862
+ "parameters": [{
863
+ "tags": [],
864
+ "text": ""
865
+ }],
866
+ "references": {
867
+ "Promise": {
868
+ "location": "global"
869
+ }
870
+ },
871
+ "return": "Promise<void>"
872
+ },
873
+ "docs": {
874
+ "text": "Sets a custom validation message. If `message` is not empty, the field will be considered invalid.",
875
+ "tags": []
876
+ }
877
+ },
878
+ "reset": {
879
+ "complexType": {
880
+ "signature": "() => Promise<void>",
881
+ "parameters": [],
882
+ "references": {
883
+ "Promise": {
884
+ "location": "global"
885
+ }
886
+ },
887
+ "return": "Promise<void>"
888
+ },
889
+ "docs": {
890
+ "text": "Resets the formcontrol",
891
+ "tags": []
892
+ }
893
+ }
894
+ }; }
895
+ static get elementRef() { return "host"; }
896
+ static get watchers() { return [{
897
+ "propName": "helpText",
898
+ "methodName": "handleLabelChange"
899
+ }, {
900
+ "propName": "errorText",
901
+ "methodName": "handleLabelChange"
902
+ }, {
903
+ "propName": "label",
904
+ "methodName": "handleLabelChange"
905
+ }, {
906
+ "propName": "rows",
907
+ "methodName": "handleRowsChange"
908
+ }, {
909
+ "propName": "value",
910
+ "methodName": "handleValueChange"
911
+ }]; }
912
+ }