@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,1141 +1,1141 @@
1
- import { Component, Element, Event, Method, Prop, State, Watch, h } 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
- const ICON_SIZES = {
6
- large: 'medium',
7
- medium: 'small',
8
- small: 'xSmall',
9
- };
10
- let id = 0;
11
- /**
12
- * @since 1.0
13
- * @status stable
14
- *
15
- * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.
16
- *
17
- * @slot label - The input's label. Alternatively, you can use the label prop.
18
- * @slot prefix - Used to prepend an icon or similar element to the input.
19
- * @slot suffix - Used to append an icon or similar element to the input.
20
- * @slot clear-icon - An icon to use in lieu of the default clear icon.
21
- * @slot show-password-icon - An icon to use in lieu of the default show password icon.
22
- * @slot hide-password-icon - An icon to use in lieu of the default hide password icon.
23
- * @slot help-text - Help text that describes how to use the input. Alternatively, you can use the help-text prop.
24
- * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.
25
- *
26
- * @part base - The component's base wrapper.
27
- * @part form-control - The form control that wraps the label, input, and help-text.
28
- * @part label - The input label.
29
- * @part input - The input control.
30
- * @part prefix - The input prefix container.
31
- * @part clear-button - The clear button.
32
- * @part password-toggle-button - The password toggle button.
33
- * @part suffix - The input suffix container.
34
- * @part help-text - The input help text.
35
- */
36
- export class SixInput {
37
- constructor() {
38
- this.inputId = `input-${++id}`;
39
- this.labelId = `input-label-${id}`;
40
- this.helpTextId = `input-help-text-${id}`;
41
- this.errorTextId = `input-error-text-${id}`;
42
- this.customErrorText = '';
43
- this.customValidation = false;
44
- this.eventListeners = new EventListeners();
45
- this.hasFocus = false;
46
- this.hasHelpTextSlot = false;
47
- this.hasErrorTextSlot = false;
48
- this.hasLabelSlot = false;
49
- this.isPasswordVisible = false;
50
- /** The input's type. */
51
- this.type = 'text';
52
- /** The input's size. */
53
- this.size = 'medium';
54
- /** The input's name attribute. */
55
- this.name = '';
56
- /** The input's value attribute. */
57
- this.value = '';
58
- /** Set to true to draw a pill-style input with rounded edges. */
59
- this.pill = false;
60
- /** The input's label. Alternatively, you can use the label slot. */
61
- this.label = '';
62
- /** The input's help text. Alternatively, you can use the help-text slot. */
63
- this.helpText = '';
64
- /** The input's error text. Alternatively, you can use the error-text slot. */
65
- this.errorText = '';
66
- /** Set to true to disable the input. */
67
- this.disabled = false;
68
- /** Set to true to make the input readonly. */
69
- this.readonly = false;
70
- /**
71
- * This will be true when the control is in an invalid state. Validity is determined by props such as `type`,
72
- * `required`, `minlength`, `maxlength`, and `pattern` using the browser's constraint validation API.
73
- */
74
- this.invalid = false;
75
- /** Set to true to add a clear button when the input is populated. */
76
- this.clearable = false;
77
- /** Set to true to add a password toggle button for password inputs. */
78
- this.togglePassword = false;
79
- /** Set to render as line */
80
- this.line = false;
81
- /** Set to display the error text on blur and not when typing */
82
- this.errorOnBlur = false;
83
- /** defaultValue which the input will be reverted to when executing reset */
84
- this.defaultValue = '';
85
- }
86
- handleLabelChange() {
87
- this.handleSlotChange();
88
- }
89
- handleValueChange() {
90
- if (!this.input) {
91
- return;
92
- }
93
- this.input.value = this.value;
94
- this.invalid = !this.input.checkValidity();
95
- this.sixValueChange.emit();
96
- }
97
- connectedCallback() {
98
- this.handleChange = this.handleChange.bind(this);
99
- this.handleInput = this.handleInput.bind(this);
100
- this.handleInvalid = this.handleInvalid.bind(this);
101
- this.handleBlur = this.handleBlur.bind(this);
102
- this.handleFocus = this.handleFocus.bind(this);
103
- this.handleClearClick = this.handleClearClick.bind(this);
104
- this.handlePasswordToggle = this.handlePasswordToggle.bind(this);
105
- this.handleSlotChange = this.handleSlotChange.bind(this);
106
- this.host.shadowRoot.addEventListener('slotchange', this.handleSlotChange);
107
- }
108
- componentWillLoad() {
109
- this.defaultValue = this.value;
110
- this.handleSlotChange();
111
- }
112
- componentDidLoad() {
113
- this.eventListeners.add(this.input, 'invalid', (event) => {
114
- if (this.customValidation || (!this.hasErrorTextSlot && !this.errorText && !this.customErrorText)) {
115
- this.customErrorText = this.input.validationMessage;
116
- }
117
- event.preventDefault();
118
- });
119
- }
120
- disconnectedCallback() {
121
- this.host.shadowRoot.removeEventListener('slotchange', this.handleSlotChange);
122
- this.eventListeners.removeAll();
123
- }
124
- /** Sets focus on the input. */
125
- async setFocus(options) {
126
- this.input.focus(options);
127
- }
128
- /** Removes focus from the input. */
129
- async removeFocus() {
130
- this.input.blur();
131
- }
132
- /** Selects all the text in the input. */
133
- async select() {
134
- return this.input.select();
135
- }
136
- /** Sets the start and end positions of the text selection (0-based). */
137
- async setSelectionRange(selectionStart, selectionEnd, selectionDirection = 'none') {
138
- return this.input.setSelectionRange(selectionStart, selectionEnd, selectionDirection);
139
- }
140
- /** Replaces a range of text with a new string. */
141
- async setRangeText(replacement, start, end, selectMode = 'preserve') {
142
- this.input.setRangeText(replacement, start, end, selectMode);
143
- if (this.value !== this.input.value) {
144
- this.value = this.input.value;
145
- this.sixChange.emit();
146
- this.sixInput.emit();
147
- }
148
- }
149
- /** Checks for validity and shows the browser's validation message if the control is invalid. */
150
- async reportValidity() {
151
- return this.input.reportValidity();
152
- }
153
- /** Checks for validity. */
154
- async checkValidity() {
155
- return this.input.validity.valid;
156
- }
157
- /** Sets a custom validation message. If `message` is not empty, the field will be considered invalid. */
158
- async setCustomValidity(message) {
159
- this.customErrorText = '';
160
- this.customValidation = message !== '';
161
- this.input.setCustomValidity(message);
162
- this.invalid = !this.input.checkValidity();
163
- }
164
- /** Returns the native input's validity */
165
- async getValidity() {
166
- return this.input.validity;
167
- }
168
- /** Returns the native input's validity */
169
- async isValid() {
170
- return this.input.validity.valid;
171
- }
172
- /** Returns the native input's validationMessage */
173
- async getValidationMessage() {
174
- return this.input.validationMessage;
175
- }
176
- /** Resets the formcontrol */
177
- async reset() {
178
- this.value = this.defaultValue;
179
- this.customErrorText = '';
180
- this.customValidation = false;
181
- this.input.setCustomValidity('');
182
- this.invalid = false;
183
- }
184
- handleChange() {
185
- this.value = this.input.value;
186
- this.sixChange.emit();
187
- }
188
- handleInput() {
189
- this.value = this.input.value;
190
- this.sixInput.emit();
191
- }
192
- handleInvalid() {
193
- this.invalid = true;
194
- }
195
- handleBlur() {
196
- this.hasFocus = false;
197
- this.sixBlur.emit();
198
- }
199
- handleFocus() {
200
- this.hasFocus = true;
201
- this.sixFocus.emit();
202
- }
203
- handleClearClick(event) {
204
- this.value = '';
205
- this.sixClear.emit();
206
- this.sixInput.emit();
207
- this.sixChange.emit();
208
- this.input.focus();
209
- event.stopPropagation();
210
- }
211
- handlePasswordToggle() {
212
- this.isPasswordVisible = !this.isPasswordVisible;
213
- }
214
- handleSlotChange() {
215
- this.hasHelpTextSlot = hasSlot(this.host, 'help-text');
216
- this.hasErrorTextSlot = hasSlot(this.host, 'error-text');
217
- this.hasLabelSlot = hasSlot(this.host, 'label');
218
- }
219
- displayError() {
220
- return this.invalid && (!this.errorOnBlur || !this.hasFocus);
221
- }
222
- render() {
223
- var _a;
224
- 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() },
225
- h("div", { part: "base", class: {
226
- input: true,
227
- // Sizes
228
- 'input--small': this.size === 'small',
229
- 'input--medium': this.size === 'medium',
230
- 'input--large': this.size === 'large',
231
- // States
232
- 'input--line': this.line,
233
- 'input--pill': this.pill,
234
- 'input--disabled': this.disabled,
235
- 'input--focused': this.hasFocus,
236
- 'input--empty': ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) === 0,
237
- 'input--invalid': this.invalid,
238
- } },
239
- h("span", { part: "prefix", class: "input__prefix" },
240
- h("slot", { name: "prefix" })),
241
- h("input", { part: "input", ref: (el) => (this.input = el), id: this.inputId, size: 1, class: {
242
- input__control: true,
243
- input__control__prefix: hasSlot(this.host, 'prefix'),
244
- }, type: this.type === 'password' && this.isPasswordVisible ? 'text' : this.type, name: this.name, placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, minLength: this.minlength, maxLength: this.maxlength, min: this.min, max: this.max, step: this.step, value: this.value, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, spellcheck: this.spellcheck, pattern: this.pattern, required: this.required, inputMode: this.inputmode, "aria-labelledby": this.labelId, "aria-describedby": this.helpTextId, "aria-invalid": this.invalid ? 'true' : 'false', onChange: this.handleChange, onInput: this.handleInput, onInvalid: this.handleInvalid, onFocus: this.handleFocus, onBlur: this.handleBlur, "data-testid": "input-control" }),
245
- this.clearable && (h("button", { part: "clear-button", class: "input__clear", type: "button", onClick: this.handleClearClick, tabindex: "-1", "data-testid": "input-clear-button" },
246
- h("slot", { name: "clear-icon" },
247
- h("six-icon", { size: ICON_SIZES[this.size] }, "clear")))),
248
- this.togglePassword && (h("button", { part: "password-toggle-button", class: "input__password-toggle", type: "button", onClick: this.handlePasswordToggle, tabindex: "-1" }, this.isPasswordVisible ? (h("slot", { name: "show-password-icon" },
249
- h("six-icon", { size: ICON_SIZES[this.size] }, "visibility_off"))) : (h("slot", { name: "hide-password-icon" },
250
- h("six-icon", { size: ICON_SIZES[this.size] }, "visibility"))))),
251
- h("span", { part: "suffix", class: "input__suffix" },
252
- h("slot", { name: "suffix" })))));
253
- }
254
- static get is() { return "six-input"; }
255
- static get encapsulation() { return "shadow"; }
256
- static get originalStyleUrls() { return {
257
- "$": ["six-input.scss"]
258
- }; }
259
- static get styleUrls() { return {
260
- "$": ["six-input.css"]
261
- }; }
262
- static get properties() { return {
263
- "type": {
264
- "type": "string",
265
- "mutable": false,
266
- "complexType": {
267
- "original": "'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url'",
268
- "resolved": "\"email\" | \"number\" | \"password\" | \"search\" | \"tel\" | \"text\" | \"url\"",
269
- "references": {}
270
- },
271
- "required": false,
272
- "optional": false,
273
- "docs": {
274
- "tags": [],
275
- "text": "The input's type."
276
- },
277
- "attribute": "type",
278
- "reflect": true,
279
- "defaultValue": "'text'"
280
- },
281
- "size": {
282
- "type": "string",
283
- "mutable": false,
284
- "complexType": {
285
- "original": "'small' | 'medium' | 'large'",
286
- "resolved": "\"large\" | \"medium\" | \"small\"",
287
- "references": {}
288
- },
289
- "required": false,
290
- "optional": false,
291
- "docs": {
292
- "tags": [],
293
- "text": "The input's size."
294
- },
295
- "attribute": "size",
296
- "reflect": true,
297
- "defaultValue": "'medium'"
298
- },
299
- "name": {
300
- "type": "string",
301
- "mutable": false,
302
- "complexType": {
303
- "original": "string",
304
- "resolved": "string",
305
- "references": {}
306
- },
307
- "required": false,
308
- "optional": false,
309
- "docs": {
310
- "tags": [],
311
- "text": "The input's name attribute."
312
- },
313
- "attribute": "name",
314
- "reflect": true,
315
- "defaultValue": "''"
316
- },
317
- "value": {
318
- "type": "string",
319
- "mutable": true,
320
- "complexType": {
321
- "original": "string",
322
- "resolved": "string",
323
- "references": {}
324
- },
325
- "required": false,
326
- "optional": false,
327
- "docs": {
328
- "tags": [],
329
- "text": "The input's value attribute."
330
- },
331
- "attribute": "value",
332
- "reflect": true,
333
- "defaultValue": "''"
334
- },
335
- "pill": {
336
- "type": "boolean",
337
- "mutable": false,
338
- "complexType": {
339
- "original": "boolean",
340
- "resolved": "boolean",
341
- "references": {}
342
- },
343
- "required": false,
344
- "optional": false,
345
- "docs": {
346
- "tags": [],
347
- "text": "Set to true to draw a pill-style input with rounded edges."
348
- },
349
- "attribute": "pill",
350
- "reflect": true,
351
- "defaultValue": "false"
352
- },
353
- "label": {
354
- "type": "string",
355
- "mutable": false,
356
- "complexType": {
357
- "original": "string",
358
- "resolved": "string",
359
- "references": {}
360
- },
361
- "required": false,
362
- "optional": false,
363
- "docs": {
364
- "tags": [],
365
- "text": "The input's label. Alternatively, you can use the label slot."
366
- },
367
- "attribute": "label",
368
- "reflect": false,
369
- "defaultValue": "''"
370
- },
371
- "helpText": {
372
- "type": "string",
373
- "mutable": false,
374
- "complexType": {
375
- "original": "string",
376
- "resolved": "string",
377
- "references": {}
378
- },
379
- "required": false,
380
- "optional": false,
381
- "docs": {
382
- "tags": [],
383
- "text": "The input's help text. Alternatively, you can use the help-text slot."
384
- },
385
- "attribute": "help-text",
386
- "reflect": false,
387
- "defaultValue": "''"
388
- },
389
- "errorText": {
390
- "type": "string",
391
- "mutable": false,
392
- "complexType": {
393
- "original": "string",
394
- "resolved": "string",
395
- "references": {}
396
- },
397
- "required": false,
398
- "optional": false,
399
- "docs": {
400
- "tags": [],
401
- "text": "The input's error text. Alternatively, you can use the error-text slot."
402
- },
403
- "attribute": "error-text",
404
- "reflect": false,
405
- "defaultValue": "''"
406
- },
407
- "placeholder": {
408
- "type": "string",
409
- "mutable": false,
410
- "complexType": {
411
- "original": "string",
412
- "resolved": "string",
413
- "references": {}
414
- },
415
- "required": false,
416
- "optional": false,
417
- "docs": {
418
- "tags": [],
419
- "text": "The input's placeholder text."
420
- },
421
- "attribute": "placeholder",
422
- "reflect": false
423
- },
424
- "disabled": {
425
- "type": "boolean",
426
- "mutable": false,
427
- "complexType": {
428
- "original": "boolean",
429
- "resolved": "boolean",
430
- "references": {}
431
- },
432
- "required": false,
433
- "optional": false,
434
- "docs": {
435
- "tags": [],
436
- "text": "Set to true to disable the input."
437
- },
438
- "attribute": "disabled",
439
- "reflect": true,
440
- "defaultValue": "false"
441
- },
442
- "readonly": {
443
- "type": "boolean",
444
- "mutable": false,
445
- "complexType": {
446
- "original": "boolean",
447
- "resolved": "boolean",
448
- "references": {}
449
- },
450
- "required": false,
451
- "optional": false,
452
- "docs": {
453
- "tags": [],
454
- "text": "Set to true to make the input readonly."
455
- },
456
- "attribute": "readonly",
457
- "reflect": true,
458
- "defaultValue": "false"
459
- },
460
- "minlength": {
461
- "type": "number",
462
- "mutable": false,
463
- "complexType": {
464
- "original": "number",
465
- "resolved": "number",
466
- "references": {}
467
- },
468
- "required": false,
469
- "optional": false,
470
- "docs": {
471
- "tags": [],
472
- "text": "The minimum length of input that will be considered valid."
473
- },
474
- "attribute": "minlength",
475
- "reflect": true
476
- },
477
- "maxlength": {
478
- "type": "number",
479
- "mutable": false,
480
- "complexType": {
481
- "original": "number",
482
- "resolved": "number",
483
- "references": {}
484
- },
485
- "required": false,
486
- "optional": false,
487
- "docs": {
488
- "tags": [],
489
- "text": "The maximum length of input that will be considered valid."
490
- },
491
- "attribute": "maxlength",
492
- "reflect": true
493
- },
494
- "min": {
495
- "type": "number",
496
- "mutable": false,
497
- "complexType": {
498
- "original": "number",
499
- "resolved": "number",
500
- "references": {}
501
- },
502
- "required": false,
503
- "optional": false,
504
- "docs": {
505
- "tags": [],
506
- "text": "The input's minimum value."
507
- },
508
- "attribute": "min",
509
- "reflect": true
510
- },
511
- "max": {
512
- "type": "number",
513
- "mutable": false,
514
- "complexType": {
515
- "original": "number",
516
- "resolved": "number",
517
- "references": {}
518
- },
519
- "required": false,
520
- "optional": false,
521
- "docs": {
522
- "tags": [],
523
- "text": "The input's maximum value."
524
- },
525
- "attribute": "max",
526
- "reflect": true
527
- },
528
- "step": {
529
- "type": "number",
530
- "mutable": false,
531
- "complexType": {
532
- "original": "number",
533
- "resolved": "number",
534
- "references": {}
535
- },
536
- "required": false,
537
- "optional": false,
538
- "docs": {
539
- "tags": [],
540
- "text": "The input's step attribute."
541
- },
542
- "attribute": "step",
543
- "reflect": true
544
- },
545
- "pattern": {
546
- "type": "string",
547
- "mutable": false,
548
- "complexType": {
549
- "original": "string",
550
- "resolved": "string",
551
- "references": {}
552
- },
553
- "required": false,
554
- "optional": false,
555
- "docs": {
556
- "tags": [],
557
- "text": "A pattern to validate input against."
558
- },
559
- "attribute": "pattern",
560
- "reflect": true
561
- },
562
- "required": {
563
- "type": "boolean",
564
- "mutable": false,
565
- "complexType": {
566
- "original": "boolean",
567
- "resolved": "boolean",
568
- "references": {}
569
- },
570
- "required": false,
571
- "optional": false,
572
- "docs": {
573
- "tags": [],
574
- "text": "Set to true to make the input a required field."
575
- },
576
- "attribute": "required",
577
- "reflect": true
578
- },
579
- "autocapitalize": {
580
- "type": "string",
581
- "mutable": false,
582
- "complexType": {
583
- "original": "string",
584
- "resolved": "string",
585
- "references": {}
586
- },
587
- "required": false,
588
- "optional": false,
589
- "docs": {
590
- "tags": [],
591
- "text": "The input's autocaptialize attribute."
592
- },
593
- "attribute": "autocapitalize",
594
- "reflect": false
595
- },
596
- "autocorrect": {
597
- "type": "string",
598
- "mutable": false,
599
- "complexType": {
600
- "original": "string",
601
- "resolved": "string",
602
- "references": {}
603
- },
604
- "required": false,
605
- "optional": false,
606
- "docs": {
607
- "tags": [],
608
- "text": "The input's autocorrect attribute."
609
- },
610
- "attribute": "autocorrect",
611
- "reflect": false
612
- },
613
- "autocomplete": {
614
- "type": "string",
615
- "mutable": false,
616
- "complexType": {
617
- "original": "string",
618
- "resolved": "string",
619
- "references": {}
620
- },
621
- "required": false,
622
- "optional": false,
623
- "docs": {
624
- "tags": [],
625
- "text": "The input's autocomplete attribute."
626
- },
627
- "attribute": "autocomplete",
628
- "reflect": false
629
- },
630
- "autofocus": {
631
- "type": "boolean",
632
- "mutable": false,
633
- "complexType": {
634
- "original": "boolean",
635
- "resolved": "boolean",
636
- "references": {}
637
- },
638
- "required": false,
639
- "optional": false,
640
- "docs": {
641
- "tags": [],
642
- "text": "The input's autofocus attribute."
643
- },
644
- "attribute": "autofocus",
645
- "reflect": false
646
- },
647
- "spellcheck": {
648
- "type": "boolean",
649
- "mutable": false,
650
- "complexType": {
651
- "original": "boolean",
652
- "resolved": "boolean",
653
- "references": {}
654
- },
655
- "required": false,
656
- "optional": false,
657
- "docs": {
658
- "tags": [],
659
- "text": "Enables spell checking on the input."
660
- },
661
- "attribute": "spellcheck",
662
- "reflect": false
663
- },
664
- "invalid": {
665
- "type": "boolean",
666
- "mutable": true,
667
- "complexType": {
668
- "original": "boolean",
669
- "resolved": "boolean",
670
- "references": {}
671
- },
672
- "required": false,
673
- "optional": false,
674
- "docs": {
675
- "tags": [],
676
- "text": "This will be true when the control is in an invalid state. Validity is determined by props such as `type`,\n`required`, `minlength`, `maxlength`, and `pattern` using the browser's constraint validation API."
677
- },
678
- "attribute": "invalid",
679
- "reflect": true,
680
- "defaultValue": "false"
681
- },
682
- "clearable": {
683
- "type": "boolean",
684
- "mutable": false,
685
- "complexType": {
686
- "original": "boolean",
687
- "resolved": "boolean",
688
- "references": {}
689
- },
690
- "required": false,
691
- "optional": false,
692
- "docs": {
693
- "tags": [],
694
- "text": "Set to true to add a clear button when the input is populated."
695
- },
696
- "attribute": "clearable",
697
- "reflect": false,
698
- "defaultValue": "false"
699
- },
700
- "togglePassword": {
701
- "type": "boolean",
702
- "mutable": false,
703
- "complexType": {
704
- "original": "boolean",
705
- "resolved": "boolean",
706
- "references": {}
707
- },
708
- "required": false,
709
- "optional": false,
710
- "docs": {
711
- "tags": [],
712
- "text": "Set to true to add a password toggle button for password inputs."
713
- },
714
- "attribute": "toggle-password",
715
- "reflect": false,
716
- "defaultValue": "false"
717
- },
718
- "inputmode": {
719
- "type": "string",
720
- "mutable": false,
721
- "complexType": {
722
- "original": "'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url'",
723
- "resolved": "\"decimal\" | \"email\" | \"none\" | \"numeric\" | \"search\" | \"tel\" | \"text\" | \"url\"",
724
- "references": {}
725
- },
726
- "required": false,
727
- "optional": false,
728
- "docs": {
729
- "tags": [],
730
- "text": "The input's inputmode attribute."
731
- },
732
- "attribute": "inputmode",
733
- "reflect": false
734
- },
735
- "line": {
736
- "type": "boolean",
737
- "mutable": false,
738
- "complexType": {
739
- "original": "boolean",
740
- "resolved": "boolean",
741
- "references": {}
742
- },
743
- "required": false,
744
- "optional": false,
745
- "docs": {
746
- "tags": [],
747
- "text": "Set to render as line"
748
- },
749
- "attribute": "line",
750
- "reflect": false,
751
- "defaultValue": "false"
752
- },
753
- "errorOnBlur": {
754
- "type": "boolean",
755
- "mutable": false,
756
- "complexType": {
757
- "original": "boolean",
758
- "resolved": "boolean",
759
- "references": {}
760
- },
761
- "required": false,
762
- "optional": false,
763
- "docs": {
764
- "tags": [],
765
- "text": "Set to display the error text on blur and not when typing"
766
- },
767
- "attribute": "error-on-blur",
768
- "reflect": false,
769
- "defaultValue": "false"
770
- }
771
- }; }
772
- static get states() { return {
773
- "hasFocus": {},
774
- "hasHelpTextSlot": {},
775
- "hasErrorTextSlot": {},
776
- "hasLabelSlot": {},
777
- "isPasswordVisible": {}
778
- }; }
779
- static get events() { return [{
780
- "method": "sixChange",
781
- "name": "six-input-change",
782
- "bubbles": true,
783
- "cancelable": true,
784
- "composed": true,
785
- "docs": {
786
- "tags": [],
787
- "text": "Emitted when the control's value changes. Access the new value via event.target.value."
788
- },
789
- "complexType": {
790
- "original": "EmptyPayload",
791
- "resolved": "undefined",
792
- "references": {
793
- "EmptyPayload": {
794
- "location": "import",
795
- "path": "../../utils/types"
796
- }
797
- }
798
- }
799
- }, {
800
- "method": "sixClear",
801
- "name": "six-input-clear",
802
- "bubbles": true,
803
- "cancelable": true,
804
- "composed": true,
805
- "docs": {
806
- "tags": [],
807
- "text": "Emitted when the clear button is activated."
808
- },
809
- "complexType": {
810
- "original": "EmptyPayload",
811
- "resolved": "undefined",
812
- "references": {
813
- "EmptyPayload": {
814
- "location": "import",
815
- "path": "../../utils/types"
816
- }
817
- }
818
- }
819
- }, {
820
- "method": "sixInput",
821
- "name": "six-input-input",
822
- "bubbles": true,
823
- "cancelable": true,
824
- "composed": true,
825
- "docs": {
826
- "tags": [],
827
- "text": "Emitted when the control receives input. Access the new value via event.target.value."
828
- },
829
- "complexType": {
830
- "original": "EmptyPayload",
831
- "resolved": "undefined",
832
- "references": {
833
- "EmptyPayload": {
834
- "location": "import",
835
- "path": "../../utils/types"
836
- }
837
- }
838
- }
839
- }, {
840
- "method": "sixFocus",
841
- "name": "six-input-focus",
842
- "bubbles": true,
843
- "cancelable": true,
844
- "composed": true,
845
- "docs": {
846
- "tags": [],
847
- "text": "Emitted when the control gains focus."
848
- },
849
- "complexType": {
850
- "original": "EmptyPayload",
851
- "resolved": "undefined",
852
- "references": {
853
- "EmptyPayload": {
854
- "location": "import",
855
- "path": "../../utils/types"
856
- }
857
- }
858
- }
859
- }, {
860
- "method": "sixBlur",
861
- "name": "six-input-blur",
862
- "bubbles": true,
863
- "cancelable": true,
864
- "composed": true,
865
- "docs": {
866
- "tags": [],
867
- "text": "Emitted when the control loses focus. Access the new value via event.target.value."
868
- },
869
- "complexType": {
870
- "original": "EmptyPayload",
871
- "resolved": "undefined",
872
- "references": {
873
- "EmptyPayload": {
874
- "location": "import",
875
- "path": "../../utils/types"
876
- }
877
- }
878
- }
879
- }, {
880
- "method": "sixValueChange",
881
- "name": "six-input-value-change",
882
- "bubbles": true,
883
- "cancelable": true,
884
- "composed": true,
885
- "docs": {
886
- "tags": [],
887
- "text": "Emitted whenever the value changes. Access the new value via event.target.value.\nsix-input-value-change will emit whenever the value changes.\nSo be it on input or when dynamically set. six-input-input will only be emitted when the user enters data,\nbut not when a value is dynamically set. six-input-change will only be emitted when the user either presses enter\nor leaves the input field after entering some data."
888
- },
889
- "complexType": {
890
- "original": "EmptyPayload",
891
- "resolved": "undefined",
892
- "references": {
893
- "EmptyPayload": {
894
- "location": "import",
895
- "path": "../../utils/types"
896
- }
897
- }
898
- }
899
- }]; }
900
- static get methods() { return {
901
- "setFocus": {
902
- "complexType": {
903
- "signature": "(options?: FocusOptions) => Promise<void>",
904
- "parameters": [{
905
- "tags": [],
906
- "text": ""
907
- }],
908
- "references": {
909
- "Promise": {
910
- "location": "global"
911
- },
912
- "FocusOptions": {
913
- "location": "global"
914
- }
915
- },
916
- "return": "Promise<void>"
917
- },
918
- "docs": {
919
- "text": "Sets focus on the input.",
920
- "tags": []
921
- }
922
- },
923
- "removeFocus": {
924
- "complexType": {
925
- "signature": "() => Promise<void>",
926
- "parameters": [],
927
- "references": {
928
- "Promise": {
929
- "location": "global"
930
- }
931
- },
932
- "return": "Promise<void>"
933
- },
934
- "docs": {
935
- "text": "Removes focus from the input.",
936
- "tags": []
937
- }
938
- },
939
- "select": {
940
- "complexType": {
941
- "signature": "() => Promise<void>",
942
- "parameters": [],
943
- "references": {
944
- "Promise": {
945
- "location": "global"
946
- }
947
- },
948
- "return": "Promise<void>"
949
- },
950
- "docs": {
951
- "text": "Selects all the text in the input.",
952
- "tags": []
953
- }
954
- },
955
- "setSelectionRange": {
956
- "complexType": {
957
- "signature": "(selectionStart: number, selectionEnd: number, selectionDirection?: 'forward' | 'backward' | 'none') => Promise<void>",
958
- "parameters": [{
959
- "tags": [],
960
- "text": ""
961
- }, {
962
- "tags": [],
963
- "text": ""
964
- }, {
965
- "tags": [],
966
- "text": ""
967
- }],
968
- "references": {
969
- "Promise": {
970
- "location": "global"
971
- }
972
- },
973
- "return": "Promise<void>"
974
- },
975
- "docs": {
976
- "text": "Sets the start and end positions of the text selection (0-based).",
977
- "tags": []
978
- }
979
- },
980
- "setRangeText": {
981
- "complexType": {
982
- "signature": "(replacement: string, start: number, end: number, selectMode?: 'select' | 'start' | 'end' | 'preserve') => Promise<void>",
983
- "parameters": [{
984
- "tags": [],
985
- "text": ""
986
- }, {
987
- "tags": [],
988
- "text": ""
989
- }, {
990
- "tags": [],
991
- "text": ""
992
- }, {
993
- "tags": [],
994
- "text": ""
995
- }],
996
- "references": {
997
- "Promise": {
998
- "location": "global"
999
- }
1000
- },
1001
- "return": "Promise<void>"
1002
- },
1003
- "docs": {
1004
- "text": "Replaces a range of text with a new string.",
1005
- "tags": []
1006
- }
1007
- },
1008
- "reportValidity": {
1009
- "complexType": {
1010
- "signature": "() => Promise<boolean>",
1011
- "parameters": [],
1012
- "references": {
1013
- "Promise": {
1014
- "location": "global"
1015
- }
1016
- },
1017
- "return": "Promise<boolean>"
1018
- },
1019
- "docs": {
1020
- "text": "Checks for validity and shows the browser's validation message if the control is invalid.",
1021
- "tags": []
1022
- }
1023
- },
1024
- "checkValidity": {
1025
- "complexType": {
1026
- "signature": "() => Promise<boolean>",
1027
- "parameters": [],
1028
- "references": {
1029
- "Promise": {
1030
- "location": "global"
1031
- }
1032
- },
1033
- "return": "Promise<boolean>"
1034
- },
1035
- "docs": {
1036
- "text": "Checks for validity.",
1037
- "tags": []
1038
- }
1039
- },
1040
- "setCustomValidity": {
1041
- "complexType": {
1042
- "signature": "(message: string) => Promise<void>",
1043
- "parameters": [{
1044
- "tags": [],
1045
- "text": ""
1046
- }],
1047
- "references": {
1048
- "Promise": {
1049
- "location": "global"
1050
- }
1051
- },
1052
- "return": "Promise<void>"
1053
- },
1054
- "docs": {
1055
- "text": "Sets a custom validation message. If `message` is not empty, the field will be considered invalid.",
1056
- "tags": []
1057
- }
1058
- },
1059
- "getValidity": {
1060
- "complexType": {
1061
- "signature": "() => Promise<ValidityState>",
1062
- "parameters": [],
1063
- "references": {
1064
- "Promise": {
1065
- "location": "global"
1066
- },
1067
- "ValidityState": {
1068
- "location": "global"
1069
- }
1070
- },
1071
- "return": "Promise<ValidityState>"
1072
- },
1073
- "docs": {
1074
- "text": "Returns the native input's validity",
1075
- "tags": []
1076
- }
1077
- },
1078
- "isValid": {
1079
- "complexType": {
1080
- "signature": "() => Promise<boolean>",
1081
- "parameters": [],
1082
- "references": {
1083
- "Promise": {
1084
- "location": "global"
1085
- }
1086
- },
1087
- "return": "Promise<boolean>"
1088
- },
1089
- "docs": {
1090
- "text": "Returns the native input's validity",
1091
- "tags": []
1092
- }
1093
- },
1094
- "getValidationMessage": {
1095
- "complexType": {
1096
- "signature": "() => Promise<string>",
1097
- "parameters": [],
1098
- "references": {
1099
- "Promise": {
1100
- "location": "global"
1101
- }
1102
- },
1103
- "return": "Promise<string>"
1104
- },
1105
- "docs": {
1106
- "text": "Returns the native input's validationMessage",
1107
- "tags": []
1108
- }
1109
- },
1110
- "reset": {
1111
- "complexType": {
1112
- "signature": "() => Promise<void>",
1113
- "parameters": [],
1114
- "references": {
1115
- "Promise": {
1116
- "location": "global"
1117
- }
1118
- },
1119
- "return": "Promise<void>"
1120
- },
1121
- "docs": {
1122
- "text": "Resets the formcontrol",
1123
- "tags": []
1124
- }
1125
- }
1126
- }; }
1127
- static get elementRef() { return "host"; }
1128
- static get watchers() { return [{
1129
- "propName": "helpText",
1130
- "methodName": "handleLabelChange"
1131
- }, {
1132
- "propName": "errorText",
1133
- "methodName": "handleLabelChange"
1134
- }, {
1135
- "propName": "label",
1136
- "methodName": "handleLabelChange"
1137
- }, {
1138
- "propName": "value",
1139
- "methodName": "handleValueChange"
1140
- }]; }
1141
- }
1
+ import { Component, Element, Event, Method, Prop, State, Watch, h } 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
+ const ICON_SIZES = {
6
+ large: 'medium',
7
+ medium: 'small',
8
+ small: 'xSmall',
9
+ };
10
+ let id = 0;
11
+ /**
12
+ * @since 1.0
13
+ * @status stable
14
+ *
15
+ * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.
16
+ *
17
+ * @slot label - The input's label. Alternatively, you can use the label prop.
18
+ * @slot prefix - Used to prepend an icon or similar element to the input.
19
+ * @slot suffix - Used to append an icon or similar element to the input.
20
+ * @slot clear-icon - An icon to use in lieu of the default clear icon.
21
+ * @slot show-password-icon - An icon to use in lieu of the default show password icon.
22
+ * @slot hide-password-icon - An icon to use in lieu of the default hide password icon.
23
+ * @slot help-text - Help text that describes how to use the input. Alternatively, you can use the help-text prop.
24
+ * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.
25
+ *
26
+ * @part base - The component's base wrapper.
27
+ * @part form-control - The form control that wraps the label, input, and help-text.
28
+ * @part label - The input label.
29
+ * @part input - The input control.
30
+ * @part prefix - The input prefix container.
31
+ * @part clear-button - The clear button.
32
+ * @part password-toggle-button - The password toggle button.
33
+ * @part suffix - The input suffix container.
34
+ * @part help-text - The input help text.
35
+ */
36
+ export class SixInput {
37
+ constructor() {
38
+ this.inputId = `input-${++id}`;
39
+ this.labelId = `input-label-${id}`;
40
+ this.helpTextId = `input-help-text-${id}`;
41
+ this.errorTextId = `input-error-text-${id}`;
42
+ this.customErrorText = '';
43
+ this.customValidation = false;
44
+ this.eventListeners = new EventListeners();
45
+ this.hasFocus = false;
46
+ this.hasHelpTextSlot = false;
47
+ this.hasErrorTextSlot = false;
48
+ this.hasLabelSlot = false;
49
+ this.isPasswordVisible = false;
50
+ /** The input's type. */
51
+ this.type = 'text';
52
+ /** The input's size. */
53
+ this.size = 'medium';
54
+ /** The input's name attribute. */
55
+ this.name = '';
56
+ /** The input's value attribute. */
57
+ this.value = '';
58
+ /** Set to true to draw a pill-style input with rounded edges. */
59
+ this.pill = false;
60
+ /** The input's label. Alternatively, you can use the label slot. */
61
+ this.label = '';
62
+ /** The input's help text. Alternatively, you can use the help-text slot. */
63
+ this.helpText = '';
64
+ /** The input's error text. Alternatively, you can use the error-text slot. */
65
+ this.errorText = '';
66
+ /** Set to true to disable the input. */
67
+ this.disabled = false;
68
+ /** Set to true to make the input readonly. */
69
+ this.readonly = false;
70
+ /**
71
+ * This will be true when the control is in an invalid state. Validity is determined by props such as `type`,
72
+ * `required`, `minlength`, `maxlength`, and `pattern` using the browser's constraint validation API.
73
+ */
74
+ this.invalid = false;
75
+ /** Set to true to add a clear button when the input is populated. */
76
+ this.clearable = false;
77
+ /** Set to true to add a password toggle button for password inputs. */
78
+ this.togglePassword = false;
79
+ /** Set to render as line */
80
+ this.line = false;
81
+ /** Set to display the error text on blur and not when typing */
82
+ this.errorOnBlur = false;
83
+ /** defaultValue which the input will be reverted to when executing reset */
84
+ this.defaultValue = '';
85
+ }
86
+ handleLabelChange() {
87
+ this.handleSlotChange();
88
+ }
89
+ handleValueChange() {
90
+ if (!this.input) {
91
+ return;
92
+ }
93
+ this.input.value = this.value;
94
+ this.invalid = !this.input.checkValidity();
95
+ this.sixValueChange.emit();
96
+ }
97
+ connectedCallback() {
98
+ this.handleChange = this.handleChange.bind(this);
99
+ this.handleInput = this.handleInput.bind(this);
100
+ this.handleInvalid = this.handleInvalid.bind(this);
101
+ this.handleBlur = this.handleBlur.bind(this);
102
+ this.handleFocus = this.handleFocus.bind(this);
103
+ this.handleClearClick = this.handleClearClick.bind(this);
104
+ this.handlePasswordToggle = this.handlePasswordToggle.bind(this);
105
+ this.handleSlotChange = this.handleSlotChange.bind(this);
106
+ this.host.shadowRoot.addEventListener('slotchange', this.handleSlotChange);
107
+ }
108
+ componentWillLoad() {
109
+ this.defaultValue = this.value;
110
+ this.handleSlotChange();
111
+ }
112
+ componentDidLoad() {
113
+ this.eventListeners.add(this.input, 'invalid', (event) => {
114
+ if (this.customValidation || (!this.hasErrorTextSlot && !this.errorText && !this.customErrorText)) {
115
+ this.customErrorText = this.input.validationMessage;
116
+ }
117
+ event.preventDefault();
118
+ });
119
+ }
120
+ disconnectedCallback() {
121
+ this.host.shadowRoot.removeEventListener('slotchange', this.handleSlotChange);
122
+ this.eventListeners.removeAll();
123
+ }
124
+ /** Sets focus on the input. */
125
+ async setFocus(options) {
126
+ this.input.focus(options);
127
+ }
128
+ /** Removes focus from the input. */
129
+ async removeFocus() {
130
+ this.input.blur();
131
+ }
132
+ /** Selects all the text in the input. */
133
+ async select() {
134
+ return this.input.select();
135
+ }
136
+ /** Sets the start and end positions of the text selection (0-based). */
137
+ async setSelectionRange(selectionStart, selectionEnd, selectionDirection = 'none') {
138
+ return this.input.setSelectionRange(selectionStart, selectionEnd, selectionDirection);
139
+ }
140
+ /** Replaces a range of text with a new string. */
141
+ async setRangeText(replacement, start, end, selectMode = 'preserve') {
142
+ this.input.setRangeText(replacement, start, end, selectMode);
143
+ if (this.value !== this.input.value) {
144
+ this.value = this.input.value;
145
+ this.sixChange.emit();
146
+ this.sixInput.emit();
147
+ }
148
+ }
149
+ /** Checks for validity and shows the browser's validation message if the control is invalid. */
150
+ async reportValidity() {
151
+ return this.input.reportValidity();
152
+ }
153
+ /** Checks for validity. */
154
+ async checkValidity() {
155
+ return this.input.validity.valid;
156
+ }
157
+ /** Sets a custom validation message. If `message` is not empty, the field will be considered invalid. */
158
+ async setCustomValidity(message) {
159
+ this.customErrorText = '';
160
+ this.customValidation = message !== '';
161
+ this.input.setCustomValidity(message);
162
+ this.invalid = !this.input.checkValidity();
163
+ }
164
+ /** Returns the native input's validity */
165
+ async getValidity() {
166
+ return this.input.validity;
167
+ }
168
+ /** Returns the native input's validity */
169
+ async isValid() {
170
+ return this.input.validity.valid;
171
+ }
172
+ /** Returns the native input's validationMessage */
173
+ async getValidationMessage() {
174
+ return this.input.validationMessage;
175
+ }
176
+ /** Resets the formcontrol */
177
+ async reset() {
178
+ this.value = this.defaultValue;
179
+ this.customErrorText = '';
180
+ this.customValidation = false;
181
+ this.input.setCustomValidity('');
182
+ this.invalid = false;
183
+ }
184
+ handleChange() {
185
+ this.value = this.input.value;
186
+ this.sixChange.emit();
187
+ }
188
+ handleInput() {
189
+ this.value = this.input.value;
190
+ this.sixInput.emit();
191
+ }
192
+ handleInvalid() {
193
+ this.invalid = true;
194
+ }
195
+ handleBlur() {
196
+ this.hasFocus = false;
197
+ this.sixBlur.emit();
198
+ }
199
+ handleFocus() {
200
+ this.hasFocus = true;
201
+ this.sixFocus.emit();
202
+ }
203
+ handleClearClick(event) {
204
+ this.value = '';
205
+ this.sixClear.emit();
206
+ this.sixInput.emit();
207
+ this.sixChange.emit();
208
+ this.input.focus();
209
+ event.stopPropagation();
210
+ }
211
+ handlePasswordToggle() {
212
+ this.isPasswordVisible = !this.isPasswordVisible;
213
+ }
214
+ handleSlotChange() {
215
+ this.hasHelpTextSlot = hasSlot(this.host, 'help-text');
216
+ this.hasErrorTextSlot = hasSlot(this.host, 'error-text');
217
+ this.hasLabelSlot = hasSlot(this.host, 'label');
218
+ }
219
+ displayError() {
220
+ return this.invalid && (!this.errorOnBlur || !this.hasFocus);
221
+ }
222
+ render() {
223
+ var _a;
224
+ 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() },
225
+ h("div", { part: "base", class: {
226
+ input: true,
227
+ // Sizes
228
+ 'input--small': this.size === 'small',
229
+ 'input--medium': this.size === 'medium',
230
+ 'input--large': this.size === 'large',
231
+ // States
232
+ 'input--line': this.line,
233
+ 'input--pill': this.pill,
234
+ 'input--disabled': this.disabled,
235
+ 'input--focused': this.hasFocus,
236
+ 'input--empty': ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) === 0,
237
+ 'input--invalid': this.invalid,
238
+ } },
239
+ h("span", { part: "prefix", class: "input__prefix" },
240
+ h("slot", { name: "prefix" })),
241
+ h("input", { part: "input", ref: (el) => (this.input = el), id: this.inputId, size: 1, class: {
242
+ input__control: true,
243
+ input__control__prefix: hasSlot(this.host, 'prefix'),
244
+ }, type: this.type === 'password' && this.isPasswordVisible ? 'text' : this.type, name: this.name, placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, minLength: this.minlength, maxLength: this.maxlength, min: this.min, max: this.max, step: this.step, value: this.value, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, spellcheck: this.spellcheck, pattern: this.pattern, required: this.required, inputMode: this.inputmode, "aria-labelledby": this.labelId, "aria-describedby": this.helpTextId, "aria-invalid": this.invalid ? 'true' : 'false', onChange: this.handleChange, onInput: this.handleInput, onInvalid: this.handleInvalid, onFocus: this.handleFocus, onBlur: this.handleBlur, "data-testid": "input-control" }),
245
+ this.clearable && (h("button", { part: "clear-button", class: "input__clear", type: "button", onClick: this.handleClearClick, tabindex: "-1", "data-testid": "input-clear-button" },
246
+ h("slot", { name: "clear-icon" },
247
+ h("six-icon", { size: ICON_SIZES[this.size] }, "clear")))),
248
+ this.togglePassword && (h("button", { part: "password-toggle-button", class: "input__password-toggle", type: "button", onClick: this.handlePasswordToggle, tabindex: "-1" }, this.isPasswordVisible ? (h("slot", { name: "show-password-icon" },
249
+ h("six-icon", { size: ICON_SIZES[this.size] }, "visibility_off"))) : (h("slot", { name: "hide-password-icon" },
250
+ h("six-icon", { size: ICON_SIZES[this.size] }, "visibility"))))),
251
+ h("span", { part: "suffix", class: "input__suffix" },
252
+ h("slot", { name: "suffix" })))));
253
+ }
254
+ static get is() { return "six-input"; }
255
+ static get encapsulation() { return "shadow"; }
256
+ static get originalStyleUrls() { return {
257
+ "$": ["six-input.scss"]
258
+ }; }
259
+ static get styleUrls() { return {
260
+ "$": ["six-input.css"]
261
+ }; }
262
+ static get properties() { return {
263
+ "type": {
264
+ "type": "string",
265
+ "mutable": false,
266
+ "complexType": {
267
+ "original": "'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url'",
268
+ "resolved": "\"email\" | \"number\" | \"password\" | \"search\" | \"tel\" | \"text\" | \"url\"",
269
+ "references": {}
270
+ },
271
+ "required": false,
272
+ "optional": false,
273
+ "docs": {
274
+ "tags": [],
275
+ "text": "The input's type."
276
+ },
277
+ "attribute": "type",
278
+ "reflect": true,
279
+ "defaultValue": "'text'"
280
+ },
281
+ "size": {
282
+ "type": "string",
283
+ "mutable": false,
284
+ "complexType": {
285
+ "original": "'small' | 'medium' | 'large'",
286
+ "resolved": "\"large\" | \"medium\" | \"small\"",
287
+ "references": {}
288
+ },
289
+ "required": false,
290
+ "optional": false,
291
+ "docs": {
292
+ "tags": [],
293
+ "text": "The input's size."
294
+ },
295
+ "attribute": "size",
296
+ "reflect": true,
297
+ "defaultValue": "'medium'"
298
+ },
299
+ "name": {
300
+ "type": "string",
301
+ "mutable": false,
302
+ "complexType": {
303
+ "original": "string",
304
+ "resolved": "string",
305
+ "references": {}
306
+ },
307
+ "required": false,
308
+ "optional": false,
309
+ "docs": {
310
+ "tags": [],
311
+ "text": "The input's name attribute."
312
+ },
313
+ "attribute": "name",
314
+ "reflect": true,
315
+ "defaultValue": "''"
316
+ },
317
+ "value": {
318
+ "type": "string",
319
+ "mutable": true,
320
+ "complexType": {
321
+ "original": "string",
322
+ "resolved": "string",
323
+ "references": {}
324
+ },
325
+ "required": false,
326
+ "optional": false,
327
+ "docs": {
328
+ "tags": [],
329
+ "text": "The input's value attribute."
330
+ },
331
+ "attribute": "value",
332
+ "reflect": true,
333
+ "defaultValue": "''"
334
+ },
335
+ "pill": {
336
+ "type": "boolean",
337
+ "mutable": false,
338
+ "complexType": {
339
+ "original": "boolean",
340
+ "resolved": "boolean",
341
+ "references": {}
342
+ },
343
+ "required": false,
344
+ "optional": false,
345
+ "docs": {
346
+ "tags": [],
347
+ "text": "Set to true to draw a pill-style input with rounded edges."
348
+ },
349
+ "attribute": "pill",
350
+ "reflect": true,
351
+ "defaultValue": "false"
352
+ },
353
+ "label": {
354
+ "type": "string",
355
+ "mutable": false,
356
+ "complexType": {
357
+ "original": "string",
358
+ "resolved": "string",
359
+ "references": {}
360
+ },
361
+ "required": false,
362
+ "optional": false,
363
+ "docs": {
364
+ "tags": [],
365
+ "text": "The input's label. Alternatively, you can use the label slot."
366
+ },
367
+ "attribute": "label",
368
+ "reflect": false,
369
+ "defaultValue": "''"
370
+ },
371
+ "helpText": {
372
+ "type": "string",
373
+ "mutable": false,
374
+ "complexType": {
375
+ "original": "string",
376
+ "resolved": "string",
377
+ "references": {}
378
+ },
379
+ "required": false,
380
+ "optional": false,
381
+ "docs": {
382
+ "tags": [],
383
+ "text": "The input's help text. Alternatively, you can use the help-text slot."
384
+ },
385
+ "attribute": "help-text",
386
+ "reflect": false,
387
+ "defaultValue": "''"
388
+ },
389
+ "errorText": {
390
+ "type": "string",
391
+ "mutable": false,
392
+ "complexType": {
393
+ "original": "string",
394
+ "resolved": "string",
395
+ "references": {}
396
+ },
397
+ "required": false,
398
+ "optional": false,
399
+ "docs": {
400
+ "tags": [],
401
+ "text": "The input's error text. Alternatively, you can use the error-text slot."
402
+ },
403
+ "attribute": "error-text",
404
+ "reflect": false,
405
+ "defaultValue": "''"
406
+ },
407
+ "placeholder": {
408
+ "type": "string",
409
+ "mutable": false,
410
+ "complexType": {
411
+ "original": "string",
412
+ "resolved": "string",
413
+ "references": {}
414
+ },
415
+ "required": false,
416
+ "optional": false,
417
+ "docs": {
418
+ "tags": [],
419
+ "text": "The input's placeholder text."
420
+ },
421
+ "attribute": "placeholder",
422
+ "reflect": false
423
+ },
424
+ "disabled": {
425
+ "type": "boolean",
426
+ "mutable": false,
427
+ "complexType": {
428
+ "original": "boolean",
429
+ "resolved": "boolean",
430
+ "references": {}
431
+ },
432
+ "required": false,
433
+ "optional": false,
434
+ "docs": {
435
+ "tags": [],
436
+ "text": "Set to true to disable the input."
437
+ },
438
+ "attribute": "disabled",
439
+ "reflect": true,
440
+ "defaultValue": "false"
441
+ },
442
+ "readonly": {
443
+ "type": "boolean",
444
+ "mutable": false,
445
+ "complexType": {
446
+ "original": "boolean",
447
+ "resolved": "boolean",
448
+ "references": {}
449
+ },
450
+ "required": false,
451
+ "optional": false,
452
+ "docs": {
453
+ "tags": [],
454
+ "text": "Set to true to make the input readonly."
455
+ },
456
+ "attribute": "readonly",
457
+ "reflect": true,
458
+ "defaultValue": "false"
459
+ },
460
+ "minlength": {
461
+ "type": "number",
462
+ "mutable": false,
463
+ "complexType": {
464
+ "original": "number",
465
+ "resolved": "number",
466
+ "references": {}
467
+ },
468
+ "required": false,
469
+ "optional": false,
470
+ "docs": {
471
+ "tags": [],
472
+ "text": "The minimum length of input that will be considered valid."
473
+ },
474
+ "attribute": "minlength",
475
+ "reflect": true
476
+ },
477
+ "maxlength": {
478
+ "type": "number",
479
+ "mutable": false,
480
+ "complexType": {
481
+ "original": "number",
482
+ "resolved": "number",
483
+ "references": {}
484
+ },
485
+ "required": false,
486
+ "optional": false,
487
+ "docs": {
488
+ "tags": [],
489
+ "text": "The maximum length of input that will be considered valid."
490
+ },
491
+ "attribute": "maxlength",
492
+ "reflect": true
493
+ },
494
+ "min": {
495
+ "type": "number",
496
+ "mutable": false,
497
+ "complexType": {
498
+ "original": "number",
499
+ "resolved": "number",
500
+ "references": {}
501
+ },
502
+ "required": false,
503
+ "optional": false,
504
+ "docs": {
505
+ "tags": [],
506
+ "text": "The input's minimum value."
507
+ },
508
+ "attribute": "min",
509
+ "reflect": true
510
+ },
511
+ "max": {
512
+ "type": "number",
513
+ "mutable": false,
514
+ "complexType": {
515
+ "original": "number",
516
+ "resolved": "number",
517
+ "references": {}
518
+ },
519
+ "required": false,
520
+ "optional": false,
521
+ "docs": {
522
+ "tags": [],
523
+ "text": "The input's maximum value."
524
+ },
525
+ "attribute": "max",
526
+ "reflect": true
527
+ },
528
+ "step": {
529
+ "type": "number",
530
+ "mutable": false,
531
+ "complexType": {
532
+ "original": "number",
533
+ "resolved": "number",
534
+ "references": {}
535
+ },
536
+ "required": false,
537
+ "optional": false,
538
+ "docs": {
539
+ "tags": [],
540
+ "text": "The input's step attribute."
541
+ },
542
+ "attribute": "step",
543
+ "reflect": true
544
+ },
545
+ "pattern": {
546
+ "type": "string",
547
+ "mutable": false,
548
+ "complexType": {
549
+ "original": "string",
550
+ "resolved": "string",
551
+ "references": {}
552
+ },
553
+ "required": false,
554
+ "optional": false,
555
+ "docs": {
556
+ "tags": [],
557
+ "text": "A pattern to validate input against."
558
+ },
559
+ "attribute": "pattern",
560
+ "reflect": true
561
+ },
562
+ "required": {
563
+ "type": "boolean",
564
+ "mutable": false,
565
+ "complexType": {
566
+ "original": "boolean",
567
+ "resolved": "boolean",
568
+ "references": {}
569
+ },
570
+ "required": false,
571
+ "optional": false,
572
+ "docs": {
573
+ "tags": [],
574
+ "text": "Set to true to make the input a required field."
575
+ },
576
+ "attribute": "required",
577
+ "reflect": true
578
+ },
579
+ "autocapitalize": {
580
+ "type": "string",
581
+ "mutable": false,
582
+ "complexType": {
583
+ "original": "string",
584
+ "resolved": "string",
585
+ "references": {}
586
+ },
587
+ "required": false,
588
+ "optional": false,
589
+ "docs": {
590
+ "tags": [],
591
+ "text": "The input's autocaptialize attribute."
592
+ },
593
+ "attribute": "autocapitalize",
594
+ "reflect": false
595
+ },
596
+ "autocorrect": {
597
+ "type": "string",
598
+ "mutable": false,
599
+ "complexType": {
600
+ "original": "string",
601
+ "resolved": "string",
602
+ "references": {}
603
+ },
604
+ "required": false,
605
+ "optional": false,
606
+ "docs": {
607
+ "tags": [],
608
+ "text": "The input's autocorrect attribute."
609
+ },
610
+ "attribute": "autocorrect",
611
+ "reflect": false
612
+ },
613
+ "autocomplete": {
614
+ "type": "string",
615
+ "mutable": false,
616
+ "complexType": {
617
+ "original": "string",
618
+ "resolved": "string",
619
+ "references": {}
620
+ },
621
+ "required": false,
622
+ "optional": false,
623
+ "docs": {
624
+ "tags": [],
625
+ "text": "The input's autocomplete attribute."
626
+ },
627
+ "attribute": "autocomplete",
628
+ "reflect": false
629
+ },
630
+ "autofocus": {
631
+ "type": "boolean",
632
+ "mutable": false,
633
+ "complexType": {
634
+ "original": "boolean",
635
+ "resolved": "boolean",
636
+ "references": {}
637
+ },
638
+ "required": false,
639
+ "optional": false,
640
+ "docs": {
641
+ "tags": [],
642
+ "text": "The input's autofocus attribute."
643
+ },
644
+ "attribute": "autofocus",
645
+ "reflect": false
646
+ },
647
+ "spellcheck": {
648
+ "type": "boolean",
649
+ "mutable": false,
650
+ "complexType": {
651
+ "original": "boolean",
652
+ "resolved": "boolean",
653
+ "references": {}
654
+ },
655
+ "required": false,
656
+ "optional": false,
657
+ "docs": {
658
+ "tags": [],
659
+ "text": "Enables spell checking on the input."
660
+ },
661
+ "attribute": "spellcheck",
662
+ "reflect": false
663
+ },
664
+ "invalid": {
665
+ "type": "boolean",
666
+ "mutable": true,
667
+ "complexType": {
668
+ "original": "boolean",
669
+ "resolved": "boolean",
670
+ "references": {}
671
+ },
672
+ "required": false,
673
+ "optional": false,
674
+ "docs": {
675
+ "tags": [],
676
+ "text": "This will be true when the control is in an invalid state. Validity is determined by props such as `type`,\n`required`, `minlength`, `maxlength`, and `pattern` using the browser's constraint validation API."
677
+ },
678
+ "attribute": "invalid",
679
+ "reflect": true,
680
+ "defaultValue": "false"
681
+ },
682
+ "clearable": {
683
+ "type": "boolean",
684
+ "mutable": false,
685
+ "complexType": {
686
+ "original": "boolean",
687
+ "resolved": "boolean",
688
+ "references": {}
689
+ },
690
+ "required": false,
691
+ "optional": false,
692
+ "docs": {
693
+ "tags": [],
694
+ "text": "Set to true to add a clear button when the input is populated."
695
+ },
696
+ "attribute": "clearable",
697
+ "reflect": false,
698
+ "defaultValue": "false"
699
+ },
700
+ "togglePassword": {
701
+ "type": "boolean",
702
+ "mutable": false,
703
+ "complexType": {
704
+ "original": "boolean",
705
+ "resolved": "boolean",
706
+ "references": {}
707
+ },
708
+ "required": false,
709
+ "optional": false,
710
+ "docs": {
711
+ "tags": [],
712
+ "text": "Set to true to add a password toggle button for password inputs."
713
+ },
714
+ "attribute": "toggle-password",
715
+ "reflect": false,
716
+ "defaultValue": "false"
717
+ },
718
+ "inputmode": {
719
+ "type": "string",
720
+ "mutable": false,
721
+ "complexType": {
722
+ "original": "'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url'",
723
+ "resolved": "\"decimal\" | \"email\" | \"none\" | \"numeric\" | \"search\" | \"tel\" | \"text\" | \"url\"",
724
+ "references": {}
725
+ },
726
+ "required": false,
727
+ "optional": false,
728
+ "docs": {
729
+ "tags": [],
730
+ "text": "The input's inputmode attribute."
731
+ },
732
+ "attribute": "inputmode",
733
+ "reflect": false
734
+ },
735
+ "line": {
736
+ "type": "boolean",
737
+ "mutable": false,
738
+ "complexType": {
739
+ "original": "boolean",
740
+ "resolved": "boolean",
741
+ "references": {}
742
+ },
743
+ "required": false,
744
+ "optional": false,
745
+ "docs": {
746
+ "tags": [],
747
+ "text": "Set to render as line"
748
+ },
749
+ "attribute": "line",
750
+ "reflect": false,
751
+ "defaultValue": "false"
752
+ },
753
+ "errorOnBlur": {
754
+ "type": "boolean",
755
+ "mutable": false,
756
+ "complexType": {
757
+ "original": "boolean",
758
+ "resolved": "boolean",
759
+ "references": {}
760
+ },
761
+ "required": false,
762
+ "optional": false,
763
+ "docs": {
764
+ "tags": [],
765
+ "text": "Set to display the error text on blur and not when typing"
766
+ },
767
+ "attribute": "error-on-blur",
768
+ "reflect": false,
769
+ "defaultValue": "false"
770
+ }
771
+ }; }
772
+ static get states() { return {
773
+ "hasFocus": {},
774
+ "hasHelpTextSlot": {},
775
+ "hasErrorTextSlot": {},
776
+ "hasLabelSlot": {},
777
+ "isPasswordVisible": {}
778
+ }; }
779
+ static get events() { return [{
780
+ "method": "sixChange",
781
+ "name": "six-input-change",
782
+ "bubbles": true,
783
+ "cancelable": true,
784
+ "composed": true,
785
+ "docs": {
786
+ "tags": [],
787
+ "text": "Emitted when the control's value changes. Access the new value via event.target.value."
788
+ },
789
+ "complexType": {
790
+ "original": "EmptyPayload",
791
+ "resolved": "undefined",
792
+ "references": {
793
+ "EmptyPayload": {
794
+ "location": "import",
795
+ "path": "../../utils/types"
796
+ }
797
+ }
798
+ }
799
+ }, {
800
+ "method": "sixClear",
801
+ "name": "six-input-clear",
802
+ "bubbles": true,
803
+ "cancelable": true,
804
+ "composed": true,
805
+ "docs": {
806
+ "tags": [],
807
+ "text": "Emitted when the clear button is activated."
808
+ },
809
+ "complexType": {
810
+ "original": "EmptyPayload",
811
+ "resolved": "undefined",
812
+ "references": {
813
+ "EmptyPayload": {
814
+ "location": "import",
815
+ "path": "../../utils/types"
816
+ }
817
+ }
818
+ }
819
+ }, {
820
+ "method": "sixInput",
821
+ "name": "six-input-input",
822
+ "bubbles": true,
823
+ "cancelable": true,
824
+ "composed": true,
825
+ "docs": {
826
+ "tags": [],
827
+ "text": "Emitted when the control receives input. Access the new value via event.target.value."
828
+ },
829
+ "complexType": {
830
+ "original": "EmptyPayload",
831
+ "resolved": "undefined",
832
+ "references": {
833
+ "EmptyPayload": {
834
+ "location": "import",
835
+ "path": "../../utils/types"
836
+ }
837
+ }
838
+ }
839
+ }, {
840
+ "method": "sixFocus",
841
+ "name": "six-input-focus",
842
+ "bubbles": true,
843
+ "cancelable": true,
844
+ "composed": true,
845
+ "docs": {
846
+ "tags": [],
847
+ "text": "Emitted when the control gains focus."
848
+ },
849
+ "complexType": {
850
+ "original": "EmptyPayload",
851
+ "resolved": "undefined",
852
+ "references": {
853
+ "EmptyPayload": {
854
+ "location": "import",
855
+ "path": "../../utils/types"
856
+ }
857
+ }
858
+ }
859
+ }, {
860
+ "method": "sixBlur",
861
+ "name": "six-input-blur",
862
+ "bubbles": true,
863
+ "cancelable": true,
864
+ "composed": true,
865
+ "docs": {
866
+ "tags": [],
867
+ "text": "Emitted when the control loses focus. Access the new value via event.target.value."
868
+ },
869
+ "complexType": {
870
+ "original": "EmptyPayload",
871
+ "resolved": "undefined",
872
+ "references": {
873
+ "EmptyPayload": {
874
+ "location": "import",
875
+ "path": "../../utils/types"
876
+ }
877
+ }
878
+ }
879
+ }, {
880
+ "method": "sixValueChange",
881
+ "name": "six-input-value-change",
882
+ "bubbles": true,
883
+ "cancelable": true,
884
+ "composed": true,
885
+ "docs": {
886
+ "tags": [],
887
+ "text": "Emitted whenever the value changes. Access the new value via event.target.value.\nsix-input-value-change will emit whenever the value changes.\nSo be it on input or when dynamically set. six-input-input will only be emitted when the user enters data,\nbut not when a value is dynamically set. six-input-change will only be emitted when the user either presses enter\nor leaves the input field after entering some data."
888
+ },
889
+ "complexType": {
890
+ "original": "EmptyPayload",
891
+ "resolved": "undefined",
892
+ "references": {
893
+ "EmptyPayload": {
894
+ "location": "import",
895
+ "path": "../../utils/types"
896
+ }
897
+ }
898
+ }
899
+ }]; }
900
+ static get methods() { return {
901
+ "setFocus": {
902
+ "complexType": {
903
+ "signature": "(options?: FocusOptions) => Promise<void>",
904
+ "parameters": [{
905
+ "tags": [],
906
+ "text": ""
907
+ }],
908
+ "references": {
909
+ "Promise": {
910
+ "location": "global"
911
+ },
912
+ "FocusOptions": {
913
+ "location": "global"
914
+ }
915
+ },
916
+ "return": "Promise<void>"
917
+ },
918
+ "docs": {
919
+ "text": "Sets focus on the input.",
920
+ "tags": []
921
+ }
922
+ },
923
+ "removeFocus": {
924
+ "complexType": {
925
+ "signature": "() => Promise<void>",
926
+ "parameters": [],
927
+ "references": {
928
+ "Promise": {
929
+ "location": "global"
930
+ }
931
+ },
932
+ "return": "Promise<void>"
933
+ },
934
+ "docs": {
935
+ "text": "Removes focus from the input.",
936
+ "tags": []
937
+ }
938
+ },
939
+ "select": {
940
+ "complexType": {
941
+ "signature": "() => Promise<void>",
942
+ "parameters": [],
943
+ "references": {
944
+ "Promise": {
945
+ "location": "global"
946
+ }
947
+ },
948
+ "return": "Promise<void>"
949
+ },
950
+ "docs": {
951
+ "text": "Selects all the text in the input.",
952
+ "tags": []
953
+ }
954
+ },
955
+ "setSelectionRange": {
956
+ "complexType": {
957
+ "signature": "(selectionStart: number, selectionEnd: number, selectionDirection?: 'forward' | 'backward' | 'none') => Promise<void>",
958
+ "parameters": [{
959
+ "tags": [],
960
+ "text": ""
961
+ }, {
962
+ "tags": [],
963
+ "text": ""
964
+ }, {
965
+ "tags": [],
966
+ "text": ""
967
+ }],
968
+ "references": {
969
+ "Promise": {
970
+ "location": "global"
971
+ }
972
+ },
973
+ "return": "Promise<void>"
974
+ },
975
+ "docs": {
976
+ "text": "Sets the start and end positions of the text selection (0-based).",
977
+ "tags": []
978
+ }
979
+ },
980
+ "setRangeText": {
981
+ "complexType": {
982
+ "signature": "(replacement: string, start: number, end: number, selectMode?: 'select' | 'start' | 'end' | 'preserve') => Promise<void>",
983
+ "parameters": [{
984
+ "tags": [],
985
+ "text": ""
986
+ }, {
987
+ "tags": [],
988
+ "text": ""
989
+ }, {
990
+ "tags": [],
991
+ "text": ""
992
+ }, {
993
+ "tags": [],
994
+ "text": ""
995
+ }],
996
+ "references": {
997
+ "Promise": {
998
+ "location": "global"
999
+ }
1000
+ },
1001
+ "return": "Promise<void>"
1002
+ },
1003
+ "docs": {
1004
+ "text": "Replaces a range of text with a new string.",
1005
+ "tags": []
1006
+ }
1007
+ },
1008
+ "reportValidity": {
1009
+ "complexType": {
1010
+ "signature": "() => Promise<boolean>",
1011
+ "parameters": [],
1012
+ "references": {
1013
+ "Promise": {
1014
+ "location": "global"
1015
+ }
1016
+ },
1017
+ "return": "Promise<boolean>"
1018
+ },
1019
+ "docs": {
1020
+ "text": "Checks for validity and shows the browser's validation message if the control is invalid.",
1021
+ "tags": []
1022
+ }
1023
+ },
1024
+ "checkValidity": {
1025
+ "complexType": {
1026
+ "signature": "() => Promise<boolean>",
1027
+ "parameters": [],
1028
+ "references": {
1029
+ "Promise": {
1030
+ "location": "global"
1031
+ }
1032
+ },
1033
+ "return": "Promise<boolean>"
1034
+ },
1035
+ "docs": {
1036
+ "text": "Checks for validity.",
1037
+ "tags": []
1038
+ }
1039
+ },
1040
+ "setCustomValidity": {
1041
+ "complexType": {
1042
+ "signature": "(message: string) => Promise<void>",
1043
+ "parameters": [{
1044
+ "tags": [],
1045
+ "text": ""
1046
+ }],
1047
+ "references": {
1048
+ "Promise": {
1049
+ "location": "global"
1050
+ }
1051
+ },
1052
+ "return": "Promise<void>"
1053
+ },
1054
+ "docs": {
1055
+ "text": "Sets a custom validation message. If `message` is not empty, the field will be considered invalid.",
1056
+ "tags": []
1057
+ }
1058
+ },
1059
+ "getValidity": {
1060
+ "complexType": {
1061
+ "signature": "() => Promise<ValidityState>",
1062
+ "parameters": [],
1063
+ "references": {
1064
+ "Promise": {
1065
+ "location": "global"
1066
+ },
1067
+ "ValidityState": {
1068
+ "location": "global"
1069
+ }
1070
+ },
1071
+ "return": "Promise<ValidityState>"
1072
+ },
1073
+ "docs": {
1074
+ "text": "Returns the native input's validity",
1075
+ "tags": []
1076
+ }
1077
+ },
1078
+ "isValid": {
1079
+ "complexType": {
1080
+ "signature": "() => Promise<boolean>",
1081
+ "parameters": [],
1082
+ "references": {
1083
+ "Promise": {
1084
+ "location": "global"
1085
+ }
1086
+ },
1087
+ "return": "Promise<boolean>"
1088
+ },
1089
+ "docs": {
1090
+ "text": "Returns the native input's validity",
1091
+ "tags": []
1092
+ }
1093
+ },
1094
+ "getValidationMessage": {
1095
+ "complexType": {
1096
+ "signature": "() => Promise<string>",
1097
+ "parameters": [],
1098
+ "references": {
1099
+ "Promise": {
1100
+ "location": "global"
1101
+ }
1102
+ },
1103
+ "return": "Promise<string>"
1104
+ },
1105
+ "docs": {
1106
+ "text": "Returns the native input's validationMessage",
1107
+ "tags": []
1108
+ }
1109
+ },
1110
+ "reset": {
1111
+ "complexType": {
1112
+ "signature": "() => Promise<void>",
1113
+ "parameters": [],
1114
+ "references": {
1115
+ "Promise": {
1116
+ "location": "global"
1117
+ }
1118
+ },
1119
+ "return": "Promise<void>"
1120
+ },
1121
+ "docs": {
1122
+ "text": "Resets the formcontrol",
1123
+ "tags": []
1124
+ }
1125
+ }
1126
+ }; }
1127
+ static get elementRef() { return "host"; }
1128
+ static get watchers() { return [{
1129
+ "propName": "helpText",
1130
+ "methodName": "handleLabelChange"
1131
+ }, {
1132
+ "propName": "errorText",
1133
+ "methodName": "handleLabelChange"
1134
+ }, {
1135
+ "propName": "label",
1136
+ "methodName": "handleLabelChange"
1137
+ }, {
1138
+ "propName": "value",
1139
+ "methodName": "handleValueChange"
1140
+ }]; }
1141
+ }